Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ step. That takes a few minutes, but it needs no release infrastructure. It
isn't a shimmed action, because it isn't one. The better form is a release
artifact pinned by sha256, which the compiler would download and check,
once that repository publishes one. Only the scripted `fake` agent runs
for now. How real inference plugs in (praxis run tokens, registered in the
for now; `fake_script` appends a source's own actions to its session
(say, execute, read, write), to stand in for a model's work in a demo or
a test. How real inference plugs in (praxis run tokens, registered in the
privileged phase, handed to the sandbox alone, ended in the publish phase)
is [#36](https://github.com/cgwalters-forge/workflow-compiler/issues/36).

Expand Down
12 changes: 10 additions & 2 deletions lib/agent-run.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ let HARNESS_GRACE_MINUTES = 3 in
# `ESCAPED-<name>` if it didn't, which ci reads from the transcript (the
# quotes keep the markers out of the command's own text there). They
# are the checks the old stub agent made, run by the agent itself.
let session = fun prompt =>
let session = fun prompt extra =>
let attempt = fun name cmd => { execute = { title = "Bash", command = "(%{cmd}) >/dev/null 2>&1 && echo ESC''APED-%{name} || echo contain''ed-%{name}" } } in
[
{ say = "Fake run: the tools, the sandbox, the permission policy, the redaction pass, and escape attempts." },
Expand All @@ -60,6 +60,9 @@ let session = fun prompt =>
attempt "job-token" "env | grep -E '^(ACTIONS_(RUNTIME|ID_TOKEN_REQUEST)_|GITHUB_TOKEN=)'",
{ write = { title = "Write", path = "{cwd}/FAKE.md", content = "Written by a fake agent run.\n" } },
{ write = { title = "Write", path = "{home}/out/outcome.json", content = "{\"tests\": [{\"command\": \"git log --oneline -1\", \"exit_code\": 0, \"duration_s\": 0}]}\n" } },
]
@ extra
@ [
{ cost = { usd = 0.01 } },
{ say = "Done: the fake run finished." },
]
Expand All @@ -82,6 +85,11 @@ let AgentRun = {
# An entry in bot-harness's agents.toml; only the scripted one until
# there is inference.
agent | [| 'fake |] | default = 'fake,
# More actions for the scripted agent, after the demo and the escape
# attempts: a stand-in for a real agent's work in a demo or a test,
# such as writing the outputs a later job consumes. Each is a step of
# fake-acp-agent's script (say, execute, read, write).
fake_script | Array { _ : Dyn } | default = [],
# Minutes the agent may run, and its spend cap in AIC (1 AIC = $0.01).
agent_timeout_minutes | Number | default = 10,
budget_aic | Number | default = 500,
Expand All @@ -102,7 +110,7 @@ fun args =>
{ share = { name = a.skills.name, path = a.skills.path } },
{ share = { name = AGENT_RUN, content = import "../runtime/agent-run.cjs" as 'Text } },
{ share = { name = AGENT_POLICY, content = import "../runtime/agent-policy.toml" as 'Text } },
{ share = { name = AGENT_SESSION, content = std.serialize 'Json (session a.prompt) } },
{ share = { name = AGENT_SESSION, content = std.serialize 'Json (session a.prompt a.fake_script) } },
{
share = {
name = AGENT_REGISTRY,
Expand Down
Loading