@parcha/agentrun-serve 0.1.0-beta.40 → 0.1.0-beta.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +77 -0
- package/README.md +78 -15
- package/dist/api-only.d.ts +3 -1
- package/dist/api-only.js +4 -2
- package/dist/api-token.d.ts +30 -0
- package/dist/api-token.js +89 -0
- package/dist/cli.js +19 -5
- package/dist/composio-made.d.ts +54 -0
- package/dist/composio-made.js +83 -0
- package/dist/composio-preset.d.ts +16 -8
- package/dist/composio-preset.js +106 -43
- package/dist/composio-triggers.d.ts +7 -2
- package/dist/composio-triggers.js +13 -7
- package/dist/computer-attach.d.ts +29 -11
- package/dist/computer-attach.js +141 -47
- package/dist/computer-keys.d.ts +4 -0
- package/dist/computer-keys.js +5 -0
- package/dist/computers.d.ts +11 -1
- package/dist/computers.js +21 -12
- package/dist/console/assets/{index-B8Zn1Iqn.css → index-C3gNPz58.css} +1 -1
- package/dist/console/assets/index-COGhx_2Z.js +711 -0
- package/dist/console/index.html +2 -2
- package/dist/decisions.js +9 -2
- package/dist/eval-feed.d.ts +26 -0
- package/dist/eval-feed.js +68 -0
- package/dist/eval-mailbox.d.ts +4 -1
- package/dist/eval-mailbox.js +11 -3
- package/dist/exa-keyless.d.ts +1 -1
- package/dist/exa-keyless.js +1 -1
- package/dist/feed/feed-faux.d.ts +62 -0
- package/dist/feed/feed-faux.js +123 -0
- package/dist/feed/fetch.d.ts +41 -0
- package/dist/feed/fetch.js +128 -0
- package/dist/feed/parse.d.ts +41 -0
- package/dist/feed/parse.js +300 -0
- package/dist/learn/check.d.ts +3 -1
- package/dist/learn/check.js +57 -2
- package/dist/learn/compile.js +1 -1
- package/dist/learned-nodes.d.ts +21 -4
- package/dist/learned-nodes.js +21 -8
- package/dist/learned-workflow.d.ts +3 -3
- package/dist/learned-workflow.js +14 -5
- package/dist/mcp-oauth.d.ts +15 -1
- package/dist/mcp-oauth.js +39 -5
- package/dist/mcp-pin-first.d.ts +4 -2
- package/dist/mcp-pin-first.js +4 -3
- package/dist/mcp-servers-store.d.ts +58 -5
- package/dist/mcp-servers-store.js +136 -17
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.js +2 -2
- package/dist/observation/http.d.ts +4 -1
- package/dist/observation/http.js +5 -4
- package/dist/openapi.js +46 -12
- package/dist/print.d.ts +6 -3
- package/dist/print.js +4 -2
- package/dist/run-labels.d.ts +23 -0
- package/dist/run-labels.js +79 -0
- package/dist/run-secrets.js +12 -4
- package/dist/runner/adapter-loop.js +91 -10
- package/dist/runner/adapter-run-spec.d.ts +4 -0
- package/dist/runner/adapter-run-spec.js +38 -31
- package/dist/runner/beside.d.ts +6 -3
- package/dist/runner/beside.js +9 -7
- package/dist/runner/cli-run-spec.js +32 -26
- package/dist/runner/conformance/harness.js +69 -14
- package/dist/runner/conformance/subject.d.ts +4 -1
- package/dist/runner/main.d.ts +1 -1
- package/dist/runner/main.js +2 -2
- package/dist/runner/mcp-claim.d.ts +3 -0
- package/dist/runner/mcp-claim.js +1 -1
- package/dist/runner/mcp-run.d.ts +4 -0
- package/dist/runner/mcp-run.js +5 -3
- package/dist/runner/model-route.d.ts +4 -2
- package/dist/runner/model-route.js +8 -8
- package/dist/runner/promotion.d.ts +8 -0
- package/dist/runner/promotion.js +43 -1
- package/dist/runner/workflow-first.d.ts +6 -5
- package/dist/runner/workflow-first.js +9 -7
- package/dist/runs-over-store.js +5 -2
- package/dist/sdk/runs.d.ts +7 -1
- package/dist/sdk/runs.js +19 -6
- package/dist/secret-cut.js +3 -1
- package/dist/secrets.js +3 -1
- package/dist/server.d.ts +27 -2
- package/dist/server.js +168 -50
- package/dist/store/dialect.d.ts +3 -0
- package/dist/store/dialect.js +1 -0
- package/dist/store/index.d.ts +1 -1
- package/dist/store/postgres/dialect.js +1 -0
- package/dist/store/postgres/migrations/0015_run_labels.sql +5 -0
- package/dist/store/postgres/migrations/0016_minted_tokens.sql +21 -0
- package/dist/store/schema.d.ts +9 -0
- package/dist/store/schema.js +26 -2
- package/dist/store/sqlite/connection.js +11 -3
- package/dist/store/sqlite/run-patch.d.ts +2 -1
- package/dist/store/sqlite/run-patch.js +3 -2
- package/dist/store/sqlite/store.js +64 -10
- package/dist/store/store.d.ts +38 -1
- package/dist/store-reads/journal.js +2 -1
- package/dist/store-reads/learning.js +6 -1
- package/dist/store-reads/runs.d.ts +4 -3
- package/dist/store-reads/runs.js +3 -2
- package/dist/store-view.js +4 -2
- package/dist/template-eval.d.ts +4 -0
- package/dist/template-eval.js +127 -50
- package/dist/templates.d.ts +10 -0
- package/dist/templates.js +75 -17
- package/dist/timeline/origin.d.ts +1 -1
- package/dist/timeline/origin.js +2 -2
- package/dist/trigger-adapter.d.ts +9 -4
- package/dist/trigger-adapters.js +2 -1
- package/dist/trigger-feed.d.ts +12 -0
- package/dist/trigger-feed.js +371 -0
- package/dist/triggers.d.ts +2 -1
- package/dist/triggers.js +23 -5
- package/dist/webhooks.js +9 -5
- package/dist/workspace/computer-deps.d.ts +5 -1
- package/dist/workspace/computer-deps.js +2 -2
- package/dist/workspace/index.d.ts +1 -0
- package/dist/workspace/index.js +2 -0
- package/dist/workspace/resolve-computer.d.ts +32 -3
- package/dist/workspace/resolve-computer.js +47 -9
- package/launcher/agentrun-serve +6 -1
- package/package.json +10 -9
- package/templates/README.md +27 -2
- package/dist/console/assets/index-Jbxjcmdp.js +0 -705
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
// command there would run on the server itself. runShellOf reads it off a setting before anything starts (the tool
|
|
20
20
|
// plane shows bash unavailable by it), and the claim's runTools takes the same rule over the computer it started.
|
|
21
21
|
import { hostToolDefs } from "@parcha/agentrun-kernel/kernel";
|
|
22
|
-
import { configurationOf, imagesOf } from "@parcha/agentrun-computer";
|
|
22
|
+
import { configurationOf, imagesOf, mountsOf } from "@parcha/agentrun-computer";
|
|
23
23
|
import { noDockerWords } from "../docker-daemon.js";
|
|
24
24
|
import { gpuRefused } from "../gpu-words.js";
|
|
25
25
|
import { recordedClient } from "../computer-calls.js";
|
|
@@ -37,6 +37,34 @@ export const providerKeys = (registry, keyOf) => async (provider) => {
|
|
|
37
37
|
}
|
|
38
38
|
return keys;
|
|
39
39
|
};
|
|
40
|
+
/** `entry` as this server has it, by `set` (whether a key, or a setting of this server, has a value here): with the
|
|
41
|
+
* mounts the operator's keys turn on (its descriptor's mountsWith, by the computer package's mountsOf: Daytona's Archil
|
|
42
|
+
* mount where DAYTONA_ARCHIL_EGRESS names a self-hosted target's Archil egress relay), and imageNamed where its
|
|
43
|
+
* descriptor's imageEnv names its image here (Daytona's AGENTRUN_DAYTONA_SNAPSHOT). Any other entry as it is. Every
|
|
44
|
+
* reader of an entry's mounts (Settings → Computers, the claim, a run's start, its shell) reads this, so the
|
|
45
|
+
* provider made with those keys and the server agree on what it mounts. */
|
|
46
|
+
export function entryHere(entry, set) {
|
|
47
|
+
const keyed = entry.mountsWith === undefined ? undefined : mountsOf(entry, set);
|
|
48
|
+
const named = entry.imageEnv !== undefined && set(entry.imageEnv);
|
|
49
|
+
if (keyed === undefined && !named)
|
|
50
|
+
return entry;
|
|
51
|
+
return { ...entry, ...keyed, ...(named ? { imageNamed: true } : {}) };
|
|
52
|
+
}
|
|
53
|
+
/** The names entryHere reads of `entry`: the keys of its mountsWith, and its imageEnv. */
|
|
54
|
+
const hereNames = (entry) => [...Object.values(entry.mountsWith ?? {}).filter((name) => typeof name === "string"), ...(entry.imageEnv === undefined ? [] : [entry.imageEnv])];
|
|
55
|
+
/** `registry` with each provider as this server has it (entryHere), reading only the names an entry's mountsWith or
|
|
56
|
+
* imageEnv names, by `valueOf` (key-meta.ts keyReader: the environment's value, else the saved key). A value of
|
|
57
|
+
* whitespace alone is none. */
|
|
58
|
+
export async function registryHere(registry, valueOf) {
|
|
59
|
+
const names = [...new Set(registry.PROVIDERS.flatMap(hereNames))];
|
|
60
|
+
if (names.length === 0)
|
|
61
|
+
return registry;
|
|
62
|
+
const set = new Set((await Promise.all(names.map(async (name) => ((await valueOf(name))?.trim() ? name : "")))).filter((name) => name !== ""));
|
|
63
|
+
return { ...registry, PROVIDERS: registry.PROVIDERS.map((entry) => entryHere(entry, (name) => set.has(name))) };
|
|
64
|
+
}
|
|
65
|
+
/** Whether a computer of `entry` that mounts the owner's Archil disk has Archil's image in the owner's vendor account:
|
|
66
|
+
* its provider prepares it (prepareImage), or the operator names it here (imageNamed, entryHere). */
|
|
67
|
+
export const archilImageHere = (entry) => entry.prepareImage === true || entry.imageNamed === true;
|
|
40
68
|
/** Whether a provider's computers run only on the vendor's own network: the network forms it declares (its
|
|
41
69
|
* descriptor's, its capabilities().network) are "open" alone, as a cloud phone's and a hosted browser's are. */
|
|
42
70
|
export const vendorNetworkOnly = (network) => network !== undefined && network.length > 0 && network.every((one) => one === "open");
|
|
@@ -49,8 +77,12 @@ export const aLabel = (label, start = false) => `${start ? "A" : "a"}${/^[AEIOU]
|
|
|
49
77
|
/** Why a sandbox or a desktop that would mount the owner's Archil disk can't start in Mode 2: the mount needs Archil's
|
|
50
78
|
* image in the owner's own vendor account, and this server can't put it there yet. A provider that prepares its image
|
|
51
79
|
* (prepareImage: Agent37 registers the box image in the owner's workspace, Modal pulls it, E2B starts its public
|
|
52
|
-
* template) is never refused so
|
|
53
|
-
|
|
80
|
+
* template) is never refused so, nor one whose image the operator names here (archilImageHere: Daytona's
|
|
81
|
+
* AGENTRUN_DAYTONA_SNAPSHOT). For such a one, `imageEnv` says where to name it. Settings (computers.ts modeRefusal)
|
|
82
|
+
* and a run's start (computerReadiness) say it. */
|
|
83
|
+
export const mode2ArchilWhy = (label, kind, imageEnv) => imageEnv === undefined
|
|
84
|
+
? `${aLabel(label, true)} ${kind} can't start in Mode 2 yet: it needs Archil's image in your ${label} account, and this server can't put it there yet. Set this agent's computer to none (${SETTINGS})`
|
|
85
|
+
: `${aLabel(label, true)} ${kind} can't start in Mode 2 until this server names Archil's image in your ${label} account: build one from the computer package's box/Dockerfile and name it in ${imageEnv}, or set this agent's computer to none (${SETTINGS})`;
|
|
54
86
|
/** Why a computer that needs a network is refused where this server's AGENTRUN_BOX_ALLOW is none, in words that name the
|
|
55
87
|
* fix: the operator said no network at all, and the computer can't run without one. */
|
|
56
88
|
export const noNetworkRefusal = (label, kind) => `This agent's computer is ${aLabel(label)} ${kind}, which needs a network (the vendor's own, or public addresses from this machine), and this server's AGENTRUN_BOX_ALLOW is none (no network): pick a computer that runs with no network in ${SETTINGS}, or set AGENTRUN_BOX_ALLOW to a host list.`;
|
|
@@ -69,7 +101,9 @@ export const noNetworkRefusal = (label, kind) => `This agent's computer is ${aLa
|
|
|
69
101
|
*
|
|
70
102
|
* `hostWhy`: why this machine cannot run a provider's computers, in words that say how to fix it (computers.ts
|
|
71
103
|
* hostCommandRefusals, read at the server's start: the phone's adb not on PATH), or undefined. Absent: not asked. */
|
|
72
|
-
export async function computerReadiness(setting, mode,
|
|
104
|
+
export async function computerReadiness(setting, mode, given, keyOf, answers, boxAllow, hostWhy) {
|
|
105
|
+
// Each provider as this server has it: the mounts its keys turn on, and whether the operator names its image.
|
|
106
|
+
const registry = await registryHere(given, keyOf);
|
|
73
107
|
const resolved = await resolveComputer(setting, mode, registry, {
|
|
74
108
|
keysOf: providerKeys(registry, keyOf),
|
|
75
109
|
// A setting is given, so the Mode 1 default (the only asker) is never read; and nothing is launched.
|
|
@@ -79,8 +113,8 @@ export async function computerReadiness(setting, mode, registry, keyOf, answers,
|
|
|
79
113
|
if ("refused" in resolved)
|
|
80
114
|
return { refused: resolved.refused };
|
|
81
115
|
const entry = registry.PROVIDERS.find((one) => one.id === resolved.provider);
|
|
82
|
-
if (mode === 2 && (resolved.kind === "sandbox" || resolved.kind === "desktop") && resolved.mounts && entry && !entry
|
|
83
|
-
return { refused: `${mode2ArchilWhy(entry.label, resolved.kind)}.` };
|
|
116
|
+
if (mode === 2 && (resolved.kind === "sandbox" || resolved.kind === "desktop") && resolved.mounts && entry && !archilImageHere(entry))
|
|
117
|
+
return { refused: `${mode2ArchilWhy(entry.label, resolved.kind, entry.imageEnv)}.` };
|
|
84
118
|
if (entry && entry.mounts.includes("bind") && answers) {
|
|
85
119
|
const said = await answers(entry.id);
|
|
86
120
|
// It names the box whose probe said no (a refusal's details.box), as the box check did.
|
|
@@ -202,9 +236,13 @@ export async function resolveComputer(given, mode, registry, side) {
|
|
|
202
236
|
return { refused: `No provider gives a ${kind} computer on this server: pick another kind for this agent's computer in ${SETTINGS}.` };
|
|
203
237
|
if (!setting.provider)
|
|
204
238
|
return { refused: `A ${kind} computer needs a provider: pick ${pick}` };
|
|
205
|
-
const
|
|
206
|
-
if (!
|
|
239
|
+
const listed = registry.PROVIDERS.find((one) => one.id === setting.provider);
|
|
240
|
+
if (!listed)
|
|
207
241
|
return { refused: `${JSON.stringify(setting.provider)} is no computer provider this server knows: pick ${pick}` };
|
|
242
|
+
// The mounts its keys turn on (entryHere: Daytona's Archil mount with an Archil egress), read from the keys the claim
|
|
243
|
+
// gives it, so the folder it mounts is the one its provider, made with those keys, declares.
|
|
244
|
+
const keyed = listed.mountsWith === undefined ? undefined : await side.keysOf(listed.id);
|
|
245
|
+
const entry = keyed === undefined ? listed : entryHere(listed, (name) => Boolean(keyed[name]?.trim()));
|
|
208
246
|
// The configurations of the provider that serve the kind; none, and the registry says why, by its closest one.
|
|
209
247
|
const serving = servingOf(registry, entry, kind);
|
|
210
248
|
if (serving.length === 0) {
|
|
@@ -256,7 +294,7 @@ export async function resolveComputer(given, mode, registry, side) {
|
|
|
256
294
|
if (persistent && mounts)
|
|
257
295
|
return { refused: `${aLabel(entry.label, true)} ${kind} mounts each run's folder, so it can't be kept between runs: turn persistent off for this agent's computer in ${SETTINGS}.` };
|
|
258
296
|
// Its keys: every required one saved, before anything starts; only declared names go to the provider.
|
|
259
|
-
const saved = await side.keysOf(entry.id);
|
|
297
|
+
const saved = keyed ?? (await side.keysOf(entry.id));
|
|
260
298
|
const has = (name) => typeof saved[name] === "string" && saved[name] !== "";
|
|
261
299
|
const missing = entry.keys.filter((key) => key.required && !has(key.name)).map((key) => key.name);
|
|
262
300
|
if (missing.length > 0) {
|
package/launcher/agentrun-serve
CHANGED
|
@@ -23,13 +23,18 @@
|
|
|
23
23
|
# BROWSERBASE_PROJECT_ID is no secret, but a tool key's field: every field a person may save is on this list, so a
|
|
24
24
|
# saved one is read by the same name and reaches a run's process over its pipe, as the launcher's does.
|
|
25
25
|
#
|
|
26
|
+
# ARCHIL_API_KEY, the Archil account key, and every computer provider's key from E2B_API_KEY to MODAL_TOKEN_SECRET
|
|
27
|
+
# (src/computer-keys.ts COMPUTER_KEY_NAMES): only the server's and the runner's own code reads one (the Archil claim,
|
|
28
|
+
# a computer's create), and no run is handed one. AGENT37_SSH_KEY is a private key: an RSA one can come to more than the
|
|
29
|
+
# pipe holds (below), so save it in Settings -> Computers instead, or use an Ed25519 key.
|
|
30
|
+
#
|
|
26
31
|
# After MODAL_TOKEN_SECRET, the keys of pi-ai's other providers, which a pi run's model may need (GEMINI_API_KEY,
|
|
27
32
|
# DEEPSEEK_API_KEY, Bedrock's AWS keys, ...): the server holds each, and a run's process gets one over its pipe only when
|
|
28
33
|
# its model is that provider's (../src/model.ts' PROVIDER_KEYS). The custody test checks every key pi-ai's table names is
|
|
29
34
|
# here. Any other variable named like a key (a KEY, TOKEN, SECRET, PASSWORD, PASSWD, PASS, PAT, CREDENTIAL, CREDENTIALS or
|
|
30
35
|
# DSN segment, or a last PWD after another) stays in the server's environment, as this list does not take it, and in no
|
|
31
36
|
# run's: name it here to keep it from the server's too.
|
|
32
|
-
SECRETS='AGENTRUN_TOKEN AGENTRUN_API_KEY AGENTRUN_STORE_URL AGENT_MODEL_API_KEY OPENAI_API_KEY ANTHROPIC_API_KEY BROWSERBASE_API_KEY BROWSERBASE_PROJECT_ID KERNEL_API_KEY OPENROUTER_API_KEY TYPESAFE_API_KEY PARALLEL_API_KEY MONID_API_KEY AGENTRUN_SEAL_KEY DAYTONA_API_KEY MODAL_TOKEN_ID MODAL_TOKEN_SECRET ANTHROPIC_AUTH_TOKEN ANTHROPIC_OAUTH_TOKEN AI_GATEWAY_API_KEY ANT_LING_API_KEY AWS_ACCESS_KEY_ID AWS_BEARER_TOKEN_BEDROCK AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN AZURE_OPENAI_API_KEY BASETEN_API_KEY CEREBRAS_API_KEY CLOUDFLARE_API_KEY COPILOT_GITHUB_TOKEN DEEPSEEK_API_KEY FIREWORKS_API_KEY GEMINI_API_KEY GOOGLE_CLOUD_API_KEY GROQ_API_KEY HF_TOKEN KIMI_API_KEY META_API_KEY MINIMAX_API_KEY MINIMAX_CN_API_KEY MISTRAL_API_KEY MOONSHOT_API_KEY NVIDIA_API_KEY OPENCODE_API_KEY QWEN_TOKEN_PLAN_API_KEY QWEN_TOKEN_PLAN_CN_API_KEY RADIUS_API_KEY TOGETHER_API_KEY XAI_API_KEY XIAOMI_API_KEY XIAOMI_TOKEN_PLAN_AMS_API_KEY XIAOMI_TOKEN_PLAN_CN_API_KEY XIAOMI_TOKEN_PLAN_SGP_API_KEY ZAI_API_KEY ZAI_CODING_CN_API_KEY'
|
|
37
|
+
SECRETS='AGENTRUN_TOKEN AGENTRUN_TOKENS AGENTRUN_API_KEY AGENTRUN_STORE_URL AGENT_MODEL_API_KEY OPENAI_API_KEY ANTHROPIC_API_KEY BROWSERBASE_API_KEY BROWSERBASE_PROJECT_ID KERNEL_API_KEY OPENROUTER_API_KEY TYPESAFE_API_KEY PARALLEL_API_KEY MONID_API_KEY AGENTRUN_SEAL_KEY ARCHIL_API_KEY E2B_API_KEY ORGO_API_KEY PHONE_HARNESS_API_KEY AGENT37_API_KEY AGENT37_SSH_KEY DAYTONA_API_KEY MODAL_TOKEN_ID MODAL_TOKEN_SECRET ANTHROPIC_AUTH_TOKEN ANTHROPIC_OAUTH_TOKEN AI_GATEWAY_API_KEY ANT_LING_API_KEY AWS_ACCESS_KEY_ID AWS_BEARER_TOKEN_BEDROCK AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN AZURE_OPENAI_API_KEY BASETEN_API_KEY CEREBRAS_API_KEY CLOUDFLARE_API_KEY COPILOT_GITHUB_TOKEN DEEPSEEK_API_KEY FIREWORKS_API_KEY GEMINI_API_KEY GOOGLE_CLOUD_API_KEY GROQ_API_KEY HF_TOKEN KIMI_API_KEY META_API_KEY MINIMAX_API_KEY MINIMAX_CN_API_KEY MISTRAL_API_KEY MOONSHOT_API_KEY NVIDIA_API_KEY OPENCODE_API_KEY QWEN_TOKEN_PLAN_API_KEY QWEN_TOKEN_PLAN_CN_API_KEY RADIUS_API_KEY TOGETHER_API_KEY XAI_API_KEY XIAOMI_API_KEY XIAOMI_TOKEN_PLAN_AMS_API_KEY XIAOMI_TOKEN_PLAN_CN_API_KEY XIAOMI_TOKEN_PLAN_SGP_API_KEY ZAI_API_KEY ZAI_CODING_CN_API_KEY'
|
|
33
38
|
set -eu
|
|
34
39
|
# Each secret out of the environment and into an unexported variable of this shell (agentrun_secret_<NAME>).
|
|
35
40
|
for name in $SECRETS; do
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parcha/agentrun-serve",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.41",
|
|
4
4
|
"description": "The AgentRun server: the /v2 API and console over one store, with runners that run your agents; the deployable process of the AgentRun platform.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agentrun",
|
|
@@ -54,19 +54,20 @@
|
|
|
54
54
|
"@earendil-works/pi-coding-agent": "1.5.2",
|
|
55
55
|
"@modelcontextprotocol/client": "2.4.0",
|
|
56
56
|
"@modelcontextprotocol/server": "2.4.0",
|
|
57
|
-
"@parcha/agentrun-computer": "0.1.0-beta.
|
|
58
|
-
"@parcha/agentrun-decisions": "0.1.0-beta.
|
|
59
|
-
"@parcha/agentrun-dsl": "0.1.0-beta.
|
|
60
|
-
"@parcha/agentrun-harness-claude": "0.1.0-beta.
|
|
61
|
-
"@parcha/agentrun-harness-codex": "0.1.0-beta.
|
|
62
|
-
"@parcha/agentrun-jev": "0.1.0-beta.
|
|
63
|
-
"@parcha/agentrun-kernel": "0.1.0-beta.
|
|
64
|
-
"@parcha/pi-browser": "0.1.0-beta.
|
|
57
|
+
"@parcha/agentrun-computer": "0.1.0-beta.41",
|
|
58
|
+
"@parcha/agentrun-decisions": "0.1.0-beta.41",
|
|
59
|
+
"@parcha/agentrun-dsl": "0.1.0-beta.41",
|
|
60
|
+
"@parcha/agentrun-harness-claude": "0.1.0-beta.41",
|
|
61
|
+
"@parcha/agentrun-harness-codex": "0.1.0-beta.41",
|
|
62
|
+
"@parcha/agentrun-jev": "0.1.0-beta.41",
|
|
63
|
+
"@parcha/agentrun-kernel": "0.1.0-beta.41",
|
|
64
|
+
"@parcha/pi-browser": "0.1.0-beta.41",
|
|
65
65
|
"@secretlint/core": "13.1.0",
|
|
66
66
|
"@secretlint/profiler": "13.1.0",
|
|
67
67
|
"@secretlint/secretlint-rule-preset-recommend": "13.1.0",
|
|
68
68
|
"croner": "11.0.0",
|
|
69
69
|
"disk": "1.12.0",
|
|
70
|
+
"fast-xml-parser": "4.5.7",
|
|
70
71
|
"imapflow": "2.11.0",
|
|
71
72
|
"ipaddr.js": "2.5.0",
|
|
72
73
|
"mailparser": "3.14.3",
|
package/templates/README.md
CHANGED
|
@@ -165,6 +165,31 @@ Each `evals/<case>/` is one test of the package's agent. No eval runs on the ser
|
|
|
165
165
|
in_reply_to and text), the ones it moved or labelled (`message_id`, before and after, labels), and those it sent
|
|
166
166
|
(SMTP). The package's `tools` must name an email tool; only the eval's own server honours `email`, so a case with
|
|
167
167
|
it refuses `--server`.
|
|
168
|
+
- `feed: fixtures/feed.json`, a fixture file in the case: each run gets fake feeds of its own on this machine's
|
|
169
|
+
loopback, so no run reads a real feed. The first URL the package's feed trigger names (filled from the case's
|
|
170
|
+
`parameters`, as the apply fills it) is read from a fake serving the fixture's items; each other URL it names reads an
|
|
171
|
+
empty feed of the same format. The fixture:
|
|
172
|
+
```json
|
|
173
|
+
{ "description": "An open incident on GitHub's status page gets a status post.",
|
|
174
|
+
"format": "atom", "title": "GitHub Status - Incident History",
|
|
175
|
+
"items": [ { "id": "tag:status.example,2005:Incident/3", "link": "https://status.example/incidents/3",
|
|
176
|
+
"title": "Degraded Actions", "published": "2026-11-14T08:00:00Z", "updated": "2026-11-14T08:00:00Z",
|
|
177
|
+
"content": "<p><strong>Investigating</strong> - We are looking into it.</p>" } ],
|
|
178
|
+
"item": { "id": "tag:status.example,2005:Incident/3", "link": "https://status.example/incidents/3",
|
|
179
|
+
"title": "Degraded Actions", "published": "2026-11-14T08:00:00Z", "updated": "2026-11-14T09:30:00Z",
|
|
180
|
+
"content": "<p><strong>Resolved</strong> - This incident has been resolved.</p>" },
|
|
181
|
+
"trigger": "New item" }
|
|
182
|
+
```
|
|
183
|
+
`format` is `rss`, `atom` (served as a Statuspage history is), `json-feed` or `json-list` (an API's array of
|
|
184
|
+
objects, GitHub's pulls; served under the trigger's `items` pointer); `items` are the feed before the run, newest
|
|
185
|
+
first (an RSS, Atom or JSON Feed item's fields: `id`, `link`, `title`, `published`, `updated`, `author`, `summary`,
|
|
186
|
+
`content`, `categories`; a JSON list's are its raw objects). A run starts as its trigger would: the package is applied
|
|
187
|
+
(the trigger's first poll takes its start on `items`), `item` is added to the feed (or put in place of the item with
|
|
188
|
+
its `id`, an incident updated), and the trigger's next poll fires on it, `update: true` for an item it had seen with
|
|
189
|
+
an older `updated`. `trigger` names the trigger when the package has more than one feed trigger. The case's
|
|
190
|
+
`prompt.md` holds `description` and `runs` alone: the run's input and cap are the trigger's, and its graders' task is
|
|
191
|
+
that input, the item's payload in its tag. Only the eval's own server honours `feed`, so a case with it refuses
|
|
192
|
+
`--server`.
|
|
168
193
|
- A fake MCP server's fixture, one shape for every package:
|
|
169
194
|
```json
|
|
170
195
|
{ "server": "github", "description": "what the fake holds",
|
|
@@ -309,13 +334,13 @@ package}`, and a line in the markdown).
|
|
|
309
334
|
| `tool_policy` | `{bash: read-only}`: a policy on the agent's bash, the one tool that takes one. Apply writes it as `policy` on bash in the agent's `tool_settings` (`definition.tool_settings.bash.policy`), whatever bash's permission, and the tool gate reads each shell call's command before it runs or anyone is asked. Under `read-only` it refuses, in words the model reads, any command that could write, run code or read outside the run's folder: a program outside the read list (git's read subcommands `diff`, `show`, `log`, `blame`, `grep`, `ls-files`, `ls-tree`, `rev-parse`, `cat-file`, `merge-base`, `status`, `shortlog`, `rev-list`, `diff-tree`, `name-rev`, `describe`; `grep`, `egrep`, `fgrep`, `rg`, `sed -n 'N,Mp'`, `cat`, `head`, `tail`, `wc`, `nl`, `ls`, `find` without `-exec` or `-delete`, `sort`, `uniq`, `cut`, `tr`, `diff`, `basename`, `dirname`, `echo`, `true`), a redirection other than `2>/dev/null` and `2>&1`, `$` and backticks, a subshell, `\|\|` or a lone `&`, a pipe into anything but a filter (`head`, `tail`, `sed -n`, `grep`, `wc`, `sort`, `uniq`, `cut`, `tr`, `nl`), an unquoted glob (a glob is quoted, and only in a grep pattern, an `--include=` value or a `find -name` value), a path outside the run's folder, or one on the never-open list (`.env*`, `.ssh/`, `id_rsa*`, `*.pem`, `*.key`, `.npmrc`, `.netrc`, `.git-credentials`, `credentials`), which refuses a command that names such a file but is no fence around the folder: a recursive search reads all it holds, the run's own files and never a key of the server's. `git -C <dir>` is allowed to a directory inside the folder. A line with a `cd` joins its commands with `&&` only. `bash_background` and `bash_input` are refused under it. The check reads the command, never the folder, so a symbolic link in the folder reaches what the computer lets it; and it holds bash alone, so a read-only agent's tools are `read` and `bash` (one that may write can change what git obeys). Approvals `never` lifts none of it. A package with `tools` grants `bash` among them. |
|
|
310
335
|
| `computer` | `default` (or absent): the agent runs where this server puts a new one. Or a preference list, `[shell, none]`, read like `harness`: apply takes the first entry this server meets now and saves it as the agent's `computer`. `shell` is a computer that gives the agent a shell here: Archil's serverless exec on the runner when Archil is on (Settings → Workspace; `bash` alone, so `bash_background` and the other background tools are not granted), else the Docker sandbox where Docker answers. `none` is no shell, and is always met: the shell tools in `tools` (`bash` and the background tools) are not granted, and neither is `tool_policy`'s bash. A package with no `tools` is given the chosen shell's tools, as a new agent in a box is given the box's. A fallback, or a tool not granted, is said in a `computer` warning on the apply. A list with `shell` alone, where there is none, refuses the apply (`409`, nothing made). A list without `shell` grants no shell tool, so one in `tools` is refused, and so is an entry after `none`, which would never be picked. The choice is made at apply: a server that gains a shell later gives it to an agent applied again. `GET /v2/templates` shows the list as `computer`, and as `computer_here` what an apply here would pick now: the entry, the agent's `computer`, the shell in words, the tools it would not grant, and the warning or refusal. |
|
|
311
336
|
| `checkout` | `pull_request` only: apply sets the agent definition's `checkout`, and the server checks out the pull request each run's GitHub event names before its first turn, in `repo/` of the run's folder, detached at the head, with its base and their merge base (refs `pr/head`, `pr/base`, `pr/merge-base`: `git diff pr/merge-base pr/head` reads the change). The server fetches it with its GitHub App's token, narrowed to that one repository and `contents: read` and revoked after the fetch, or anonymously with no App; the agent never holds a token, and nothing of it is left in the folder or the checkout's git config. The run's system prompt says what was checked out, or why nothing was, so the package's instructions can fall back to the GitHub MCP. It is removed when the run's claim ends. With `tool_policy: {bash: read-only}` the agent reads it with git's read subcommands and never fetches itself. |
|
|
312
|
-
| `parameters` | The setup an owner fills once, at apply. Written exactly as `inputs` are (the same keys, the same rule: required unless `required: false`, a `default` only on one that is not) and compiled by the same code; `GET /v2/templates` shows them as a JSON Schema like `input_schema`, and the console's Apply form is the run form. The one difference is where they are filled: apply takes them in `parameters` (a blank one takes its `default`; they are checked as a run's input is, with the same `422` words under `parameters.<name>`), and puts them where the package writes `${parameters.<name>}`: `display_name`, the body, a trigger's `target.input`, a schedule's `cron` and `timezone`, the `in` values of a github, webhook or
|
|
337
|
+
| `parameters` | The setup an owner fills once, at apply. Written exactly as `inputs` are (the same keys, the same rule: required unless `required: false`, a `default` only on one that is not) and compiled by the same code; `GET /v2/templates` shows them as a JSON Schema like `input_schema`, and the console's Apply form is the run form. The one difference is where they are filled: apply takes them in `parameters` (a blank one takes its `default`; they are checked as a run's input is, with the same `422` words under `parameters.<name>`), and puts them where the package writes `${parameters.<name>}`: `display_name`, the body, a trigger's `target.input`, a schedule's `cron` and `timezone`, the `in` values of a github, webhook, composio or feed trigger's `accept` where conditions, a composio trigger's `config` values, a feed trigger's `urls`, a trigger's `enabled`, and an `mcp` entry's `pin` values, nowhere else. Text takes the value as text (a list as its items joined by `, `). A `target.input` value, a composio trigger's `config` value or a pin value that is one placeholder alone takes the value with its type (a list pinned is a one-of); in `target.input` one given no value is dropped, so the input schema sees the field absent. A trigger's `enabled` takes only one placeholder alone, naming a boolean parameter with a default: the trigger is made on or off by its value. A feed trigger's `urls` that are one placeholder alone take an array-of-strings parameter whole. A parameter a where, a composio `config` or a feed's `urls` take is required or has a default, so none fills empty; one a schedule uses has a default, which the package's own schedule is checked with, and apply checks every trigger with the values given before it makes anything (`422` under `triggers.<i>`). |
|
|
313
338
|
| `inputs` | By name: each run's typed input, which apply compiles into the agent's `input_schema` (a closed JSON Schema object). Each is `{type: string \| number \| integer \| boolean \| array, required?, title?, description?, examples?, default?, enum?, pattern? and format? (strings), minLength?/maxLength? (strings), minimum?/maximum? (numbers), items? (an array's scalar, with that scalar's keys)}`, nothing else; an input is required unless it says `required: false`, and a `default` is for one that is not. `format` is `uri`, `email`, `hostname`, `date`, `date-time` or `uuid`, which the server checks, or `cron` or `timezone`, which a form reads. A default and each example are checked against their own input. `content` is the run's message: named, it is a string. Every path that starts a run (the API, the CLI, a trigger, the console) checks the input against it and refuses one that does not meet it with `422 input_invalid`, a path per field (`input.country`). The model is sent the input's `content`, then the other fields as one fenced `json` block under the line `Input:`, so the instructions read each field by its name. `GET /v2/templates` shows it as `input_schema`, and the console's run form is drawn from it. A trigger's `target.input` and an eval case's `input` are checked against it too. Absent: a run takes `{content}`, as before. |
|
|
314
339
|
| `secrets` | Variable names (never values) the server must hold: a model or tool key Settings saves (`OPENROUTER_API_KEY`, `PARALLEL_API_KEY`, ...), set where it starts or saved there. Any other name is refused: the server could neither save it nor hand it to a run. Apply refuses with `409 agent_not_runnable`, making nothing, when one is missing. |
|
|
315
340
|
| `budget` | `{per_run_usd}`: each run's cap (the agent's `max_cost_usd`), required when the package has triggers. A call count belongs in the instructions ("about 30 calls"); the cap is the hard stop. |
|
|
316
341
|
| `learning` | `true` or `false`: whether the agent's runs learn. |
|
|
317
342
|
| `approvals` | `ask` (the default: the agent asks its person before a tool runs) or `never` (it runs unattended). The package's recommendation, shown as `approvals_default` for the apply screen; a template whose job runs on triggers says `never`. `never` only skips asking for the tools the agent was granted: an MCP tool the owner left unticked at apply is not one. Under `ask`, a ticked tool is granted but not allowed: it follows this server's tool settings, so a write asks unless the owner allowed it in Settings → Tools, and a read runs unasked only where the owner turned on Allow reads for its server. Deny settings and pins hold either way. |
|
|
318
|
-
| `triggers` | `POST /v2/triggers` bodies with no `agent_id` (the target is a `start_run`), each with a `name`, unique in the package: the key an upgrade will match triggers by. `enabled` is `true` (the default), `false`, or `"${parameters.<name>}"`, one placeholder alone naming a boolean parameter that has a default (validate refuses any other text there, a parameter of another type, or one with no default): apply makes the trigger enabled or disabled by the owner's answer, the default when it is left out, so a second schedule can be one the owner opts into (`weekly`, default `false`, turning on a `monday-brief` at `0 8 * * 1`). A trigger made off is off as any trigger is: the owner switches it on or off later with `PATCH /v2/triggers/{id}` or the console. A `composio` trigger's `source.server` is the toolkit of one of the package's `mcp` needs, one with `source: composio` and `required: true` (`server: github` for `{source: composio, toolkit: github}`), never a saved server's name: apply makes the trigger on the saved Composio server that need maps to, the one candidate or the owner's pick under `servers`. Its `config` values and its `accept` where `in` values may hold `${parameters.<name>}`, a parameter that is required or has a default (`config: {owner: "${parameters.owner}", repo: "${parameters.repo}"}`); its `server` and `event` can't. It can't carry `instance_id`, `hook` or `move_subscription`, which this server sets when it makes the trigger on Composio. A composio trigger this server can't set up yet (no public URL, the saved server's user with no connected account or several, the project's subscription at another address) is skipped with a `triggers.<i>` warning in the refusal's words, as a github one is with GitHub not connected: the agent stands, and the owner makes the trigger from Triggers → New app trigger once that's fixed. Any other refusal undoes the apply. |
|
|
343
|
+
| `triggers` | `POST /v2/triggers` bodies with no `agent_id` (the target is a `start_run`), each with a `name`, unique in the package: the key an upgrade will match triggers by. `enabled` is `true` (the default), `false`, or `"${parameters.<name>}"`, one placeholder alone naming a boolean parameter that has a default (validate refuses any other text there, a parameter of another type, or one with no default): apply makes the trigger enabled or disabled by the owner's answer, the default when it is left out, so a second schedule can be one the owner opts into (`weekly`, default `false`, turning on a `monday-brief` at `0 8 * * 1`). A trigger made off is off as any trigger is: the owner switches it on or off later with `PATCH /v2/triggers/{id}` or the console. A `composio` trigger's `source.server` is the toolkit of one of the package's `mcp` needs, one with `source: composio` and `required: true` (`server: github` for `{source: composio, toolkit: github}`), never a saved server's name: apply makes the trigger on the saved Composio server that need maps to, the one candidate or the owner's pick under `servers`. Its `config` values and its `accept` where `in` values may hold `${parameters.<name>}`, a parameter that is required or has a default (`config: {owner: "${parameters.owner}", repo: "${parameters.repo}"}`); its `server` and `event` can't. It can't carry `instance_id`, `hook` or `move_subscription`, which this server sets when it makes the trigger on Composio. A composio trigger this server can't set up yet (no public URL, the saved server's user with no connected account or several, the project's subscription at another address) is skipped with a `triggers.<i>` warning in the refusal's words, as a github one is with GitHub not connected: the agent stands, and the owner makes the trigger from Triggers → New app trigger once that's fixed. Any other refusal undoes the apply. A `feed` trigger's `urls` is a list of URLs, each of which may hold `${parameters.<name>}` (pr-alert's `https://api.github.com/repos/${parameters.owner}/${parameters.repo}/pulls?state=open&sort=created&direction=desc`), or one placeholder alone naming an array-of-strings parameter (vendor-outage-watch's `"${parameters.status_feeds}"`), filled whole; each parameter required or with a default, and each filled value an http(s) URL, which apply checks (`422` under `triggers.<i>.source.urls[<j>]`). An array parameter given empty (`[]`) reads no feed: apply skips that trigger with a `triggers.<i>` warning naming the parameter, as it skips a github one with GitHub not connected, and the agent stands. Its `every_s`, `items` and `id` take no placeholder, its `accept` where `in` values may, and it has no `key` in a package. |
|
|
319
344
|
| `output` | `{schema: <file>}`: the JSON Schema of the agent's answer, a file in the package. It becomes the agent's `output_schema`: the runner puts it in the instructions on every harness and asks once more when an answer misses it. A string property with `contentMediaType: "text/markdown"` is a report the console renders as Markdown. A skill that reads the schema itself keeps the file in its own folder. |
|
|
320
345
|
|
|
321
346
|
The check is whole: the package is compiled with a sample of each parameter, and the agent body and each trigger body are
|