@parcha/agentrun-serve 0.1.0-beta.32 → 0.1.0-beta.33
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 +37 -0
- package/README.md +78 -46
- package/dist/adapters.d.ts +0 -3
- package/dist/adapters.js +0 -7
- package/dist/agents.d.ts +1 -1
- package/dist/api-only.d.ts +14 -0
- package/dist/api-only.js +33 -0
- package/dist/archil-routes.d.ts +1 -1
- package/dist/box-egress-vm.d.ts +0 -8
- package/dist/box-egress-vm.js +0 -10
- package/dist/box-egress.d.ts +0 -4
- package/dist/box-egress.js +1 -16
- package/dist/box-paths.d.ts +25 -2
- package/dist/box-paths.js +79 -11
- package/dist/box-relay.d.ts +0 -11
- package/dist/box-relay.js +0 -20
- package/dist/box-settings.d.ts +46 -0
- package/dist/box-settings.js +107 -0
- package/dist/boxes.d.ts +4 -1
- package/dist/browser-cost.js +2 -1
- package/dist/browser-person.d.ts +0 -2
- package/dist/browser-person.js +0 -2
- package/dist/budget.d.ts +0 -4
- package/dist/budget.js +0 -7
- package/dist/cap.d.ts +0 -7
- package/dist/cap.js +0 -22
- package/dist/cli.js +23 -8
- package/dist/computers.d.ts +1 -1
- package/dist/console/assets/index-Dn0ngwG9.js +535 -0
- package/dist/console/assets/index-DvW6Aled.css +1 -0
- package/dist/console/index.html +2 -2
- package/dist/daytona-api.d.ts +0 -11
- package/dist/daytona-api.js +1 -82
- package/dist/docker-host-addresses.d.ts +37 -0
- package/dist/docker-host-addresses.js +110 -0
- package/dist/files.d.ts +0 -8
- package/dist/files.js +0 -17
- package/dist/github-connection.d.ts +1 -1
- package/dist/github-connection.js +1 -1
- package/dist/harness-install.d.ts +23 -0
- package/dist/harness-install.js +99 -4
- package/dist/harness.d.ts +4 -3
- package/dist/harness.js +16 -1
- package/dist/import.js +52 -13
- package/dist/learn/secrets.d.ts +2 -1
- package/dist/learn/secrets.js +19 -6
- package/dist/learned-workflow.d.ts +5 -4
- package/dist/learned-workflow.js +6 -3
- package/dist/learning-routes.d.ts +9 -46
- package/dist/learning-routes.js +25 -29
- package/dist/learning-run.d.ts +4 -231
- package/dist/learning-run.js +7 -651
- package/dist/live/translate.js +1 -1
- package/dist/mcp-gateway.d.ts +0 -3
- package/dist/mcp-gateway.js +0 -13
- package/dist/mcp-probe.d.ts +2 -2
- package/dist/mcp-probe.js +2 -2
- package/dist/mcp-servers-store.js +1 -1
- package/dist/openapi.js +3 -3
- package/dist/page.js +3 -1
- package/dist/paid-calls.js +3 -2
- package/dist/pause.d.ts +0 -2
- package/dist/pause.js +1 -8
- package/dist/place.d.ts +0 -5
- package/dist/place.js +0 -10
- package/dist/print.d.ts +2 -1
- package/dist/print.js +4 -2
- package/dist/run-db.d.ts +0 -2
- package/dist/run-db.js +0 -4
- package/dist/run-learning-served.d.ts +38 -0
- package/dist/run-learning-served.js +9 -0
- package/dist/run-secrets.d.ts +33 -0
- package/dist/run-secrets.js +53 -0
- package/dist/run-timeline-served.js +5 -2
- package/dist/run-view.d.ts +5 -9
- package/dist/run-view.js +4 -22
- package/dist/runner/adapter-loop.d.ts +8 -2
- package/dist/runner/adapter-loop.js +44 -12
- package/dist/runner/adapter-run-spec.d.ts +8 -0
- package/dist/runner/adapter-run-spec.js +6 -5
- package/dist/runner/adapters/pi.d.ts +4 -0
- package/dist/runner/adapters/pi.js +4 -1
- package/dist/runner/beside.js +19 -8
- package/dist/runner/claim-secrets.js +1 -1
- package/dist/runner/cli-run-spec.js +15 -1
- package/dist/runner/journal-kinds.d.ts +6 -0
- package/dist/runner/live-ticker.d.ts +1 -1
- package/dist/runner/live-ticker.js +28 -4
- package/dist/runner/loop-contract.d.ts +3 -2
- package/dist/runner/main.d.ts +11 -4
- package/dist/runner/main.js +39 -10
- package/dist/runner/mcp-claim.d.ts +1 -1
- package/dist/runner/mcp-claim.js +1 -1
- package/dist/runner/model-route.js +21 -2
- package/dist/runner/redact.d.ts +8 -2
- package/dist/runner/redact.js +11 -2
- package/dist/runner/workflow-spec.js +5 -9
- package/dist/runs-over-store.d.ts +1 -1
- package/dist/runs-over-store.js +16 -5
- package/dist/seal-key.d.ts +54 -15
- package/dist/seal-key.js +272 -84
- package/dist/sealed-settings.d.ts +2 -2
- package/dist/sealed-settings.js +3 -10
- package/dist/secrets.d.ts +2 -10
- package/dist/secrets.js +21 -17
- package/dist/server-secrets-store.js +1 -1
- package/dist/server-secrets.js +3 -0
- package/dist/server.d.ts +10 -6
- package/dist/server.js +89 -41
- package/dist/store/index.d.ts +1 -1
- package/dist/store/index.js +1 -1
- package/dist/store/open.d.ts +12 -2
- package/dist/store/open.js +23 -3
- package/dist/store/postgres/migrate.js +18 -1
- package/dist/store/sqlite/store.js +23 -8
- package/dist/store/store.d.ts +3 -0
- package/dist/store-reads/journal.d.ts +16 -0
- package/dist/store-reads/journal.js +82 -6
- package/dist/store-view.js +38 -5
- package/dist/tool-keys.d.ts +4 -3
- package/dist/tool-keys.js +7 -4
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +4 -1
- package/dist/trigger-schedule.js +2 -1
- package/dist/trigger-secrets-shown.js +5 -1
- package/dist/workspace/computer-deps.d.ts +29 -0
- package/dist/workspace/computer-deps.js +48 -1
- package/dist/workspace/computer-for-claim.d.ts +7 -3
- package/dist/workspace/computer-for-claim.js +1 -1
- package/dist/workspace/computer-providers.d.ts +6 -2
- package/dist/workspace/computer-providers.js +1 -1
- package/dist/workspace/index.d.ts +1 -1
- package/dist/workspace/index.js +1 -1
- package/dist/workspace.d.ts +0 -3
- package/dist/workspace.js +0 -3
- package/launcher/agentrun-serve +6 -33
- package/package.json +14 -14
- package/templates/inbound-lead/agent.md +1 -1
- package/templates/kyb/agent.md +1 -1
- package/dist/app.d.ts +0 -5
- package/dist/app.js +0 -514
- package/dist/bounds.d.ts +0 -26
- package/dist/bounds.js +0 -137
- package/dist/console/assets/index-35-7aeIZ.js +0 -519
- package/dist/console/assets/index-Cejbov-Y.css +0 -1
- package/dist/content-filter.d.ts +0 -7
- package/dist/content-filter.js +0 -23
- package/dist/disk.d.ts +0 -33
- package/dist/disk.js +0 -85
- package/dist/door-line.d.ts +0 -23
- package/dist/door-line.js +0 -83
- package/dist/harness-app.d.ts +0 -69
- package/dist/harness-app.js +0 -1162
- package/dist/request-start.d.ts +0 -27
- package/dist/request-start.js +0 -381
- package/dist/run-box.d.ts +0 -205
- package/dist/run-box.js +0 -661
- package/dist/run-holder.d.ts +0 -52
- package/dist/run-holder.js +0 -139
- package/dist/runs.d.ts +0 -1200
- package/dist/runs.js +0 -4103
- package/dist/served-only.d.ts +0 -5
- package/dist/served-only.js +0 -12
package/dist/workspace.js
CHANGED
|
@@ -296,6 +296,3 @@ export function assertHardlinkProtection(read = () => readFileSync("/proc/sys/fs
|
|
|
296
296
|
if (value !== "1")
|
|
297
297
|
throw new Error(`agentrun-serve: fs.protected_hardlinks is ${value}, not 1; a run's workspace could hold a link to this server's files`);
|
|
298
298
|
}
|
|
299
|
-
/** Does nothing: the run's host tools file through its Workspace, and nothing copies their files into a remote box any
|
|
300
|
-
* more. Kept only so the run's start (app.ts) compiles until its rewrite drops the call. */
|
|
301
|
-
export function mirrorWrites(_work, _mirror) { }
|
package/launcher/agentrun-serve
CHANGED
|
@@ -7,17 +7,15 @@
|
|
|
7
7
|
#
|
|
8
8
|
# Each secret named below that is set goes into one pipe as NAME=VALUE and a NUL, AGENTRUN_SECRETS_LEN bytes in all,
|
|
9
9
|
# on fd AGENTRUN_SECRETS_FD; the server reads exactly that many bytes first thing and closes the pipe. First, each
|
|
10
|
-
# secret moves out of the environment into this shell's own memory, so no process it starts (
|
|
11
|
-
#
|
|
10
|
+
# secret moves out of the environment into this shell's own memory, so no process it starts (mktemp, mkfifo, rm, env)
|
|
11
|
+
# inherits one; only this launcher's own initial environment, gone at the exec, ever held them. The
|
|
12
12
|
# pipe is a FIFO whose name is gone before any secret is written, and only this shell writes it, with its builtin
|
|
13
13
|
# printf; `env -u` drops every name from what COMMAND inherits too. The condition: this runs before any run's process
|
|
14
14
|
# exists. A process of the same user started earlier could open the FIFO while it is named.
|
|
15
15
|
#
|
|
16
|
-
# AGENTRUN_SEAL_KEY, the key the server keeps
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
# 0600 in a 0700 directory, written by this shell's printf, never on a command line. It is outside the data directory
|
|
20
|
-
# on purpose: a copy of that holds the tool keys as ciphertext alone.
|
|
16
|
+
# AGENTRUN_SEAL_KEY, the key the server keeps every secret under (src/seal-key.ts), is one of them. Not set, the
|
|
17
|
+
# server keeps its own in seal/seal.key in its data directory, beside the store, made at its first start: this launcher
|
|
18
|
+
# neither makes nor reads one.
|
|
21
19
|
#
|
|
22
20
|
# AGENTRUN_STORE_URL, the store's connection, is one too: its URL may hold the database's password. The server and the
|
|
23
21
|
# runner each read it from what they were handed (secrets.ts secret), and no run is handed it.
|
|
@@ -50,32 +48,7 @@ locale=${LC_ALL-}
|
|
|
50
48
|
locale_set=${LC_ALL+x}
|
|
51
49
|
LC_ALL=C
|
|
52
50
|
|
|
53
|
-
# Every other process this launcher starts, it starts here, before it writes a secret.
|
|
54
|
-
# not given.
|
|
55
|
-
config=${XDG_CONFIG_HOME:-${HOME:+$HOME/.config}}
|
|
56
|
-
if [ -z "${agentrun_secret_AGENTRUN_SEAL_KEY+x}" ] && [ -n "$config" ]; then
|
|
57
|
-
keys=$config/agentrun
|
|
58
|
-
# Its own directory, when the person made it with a plain mkdir (0755) and no key is there yet: tightened to 0700
|
|
59
|
-
# before a key is written in it, only when it is this user's. An existing key's directory is never changed, nor a
|
|
60
|
-
# symlink's target, which may be shared (the key check below refuses a linked directory anyway).
|
|
61
|
-
if [ ! -e "$keys/seal.key" ] && [ ! -L "$keys" ] && [ -d "$keys" ] && [ -O "$keys" ]; then
|
|
62
|
-
case $(ls -ld "$keys" 2>/dev/null) in d???------*) ;; *) chmod 700 "$keys" 2>/dev/null || : ;; esac
|
|
63
|
-
fi
|
|
64
|
-
# Made whole beside its name, then linked to it, which fails if another start made it first: each start reads one.
|
|
65
|
-
if [ ! -e "$keys/seal.key" ] && (umask 077 && mkdir -p "$keys") && made=$(head -c 32 /dev/urandom | base64) && [ ${#made} -eq 44 ]; then
|
|
66
|
-
(umask 077 && printf '%s\n' "$made" >"$keys/seal.key.$$" && { ln "$keys/seal.key.$$" "$keys/seal.key" 2>/dev/null || :; }) || :
|
|
67
|
-
rm -f "$keys/seal.key.$$"
|
|
68
|
-
fi
|
|
69
|
-
made=
|
|
70
|
-
# Only a key no other user can read, in a directory no other user can: one they can is refused, never changed.
|
|
71
|
-
case $(ls -ld "$keys" 2>/dev/null):$(ls -l "$keys/seal.key" 2>/dev/null) in
|
|
72
|
-
d???------*:-??-------*) IFS= read -r agentrun_secret_AGENTRUN_SEAL_KEY <"$keys/seal.key" || : ;;
|
|
73
|
-
esac
|
|
74
|
-
if [ -z "${agentrun_secret_AGENTRUN_SEAL_KEY:-}" ]; then
|
|
75
|
-
unset agentrun_secret_AGENTRUN_SEAL_KEY
|
|
76
|
-
echo "agentrun-serve: no seal key in $keys/seal.key (none, or another user can read it or its directory), so the server keeps no tool key and no MCP server credential: make the file 0600 and its directory 0700 (chmod 700 $keys; chmod 600 $keys/seal.key), or remove it to have a new one made at the next start" >&2
|
|
77
|
-
fi
|
|
78
|
-
fi
|
|
51
|
+
# Every other process this launcher starts, it starts here, before it writes a secret.
|
|
79
52
|
dir=$(mktemp -d "${TMPDIR:-/tmp}/agentrun-serve.XXXXXX")
|
|
80
53
|
mkfifo -m 600 "$dir/secrets"
|
|
81
54
|
exec 3<>"$dir/secrets"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parcha/agentrun-serve",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
4
|
-
"description": "The
|
|
3
|
+
"version": "0.1.0-beta.33",
|
|
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",
|
|
7
7
|
"agent",
|
|
@@ -54,18 +54,18 @@
|
|
|
54
54
|
"@earendil-works/pi-coding-agent": "1.5.0",
|
|
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/agentrun-pi": "0.1.0-beta.
|
|
65
|
-
"@parcha/pi-browser": "0.1.0-beta.
|
|
66
|
-
"@parcha/pi-durable-agent": "0.1.0-beta.
|
|
67
|
-
"@parcha/pi-durable-disk": "0.1.0-beta.
|
|
68
|
-
"@parcha/pi-transport": "0.1.0-beta.
|
|
57
|
+
"@parcha/agentrun-computer": "0.1.0-beta.33",
|
|
58
|
+
"@parcha/agentrun-decisions": "0.1.0-beta.33",
|
|
59
|
+
"@parcha/agentrun-dsl": "0.1.0-beta.33",
|
|
60
|
+
"@parcha/agentrun-harness-claude": "0.1.0-beta.33",
|
|
61
|
+
"@parcha/agentrun-harness-codex": "0.1.0-beta.33",
|
|
62
|
+
"@parcha/agentrun-jev": "0.1.0-beta.33",
|
|
63
|
+
"@parcha/agentrun-kernel": "0.1.0-beta.33",
|
|
64
|
+
"@parcha/agentrun-pi": "0.1.0-beta.33",
|
|
65
|
+
"@parcha/pi-browser": "0.1.0-beta.33",
|
|
66
|
+
"@parcha/pi-durable-agent": "0.1.0-beta.33",
|
|
67
|
+
"@parcha/pi-durable-disk": "0.1.0-beta.33",
|
|
68
|
+
"@parcha/pi-transport": "0.1.0-beta.33",
|
|
69
69
|
"@secretlint/core": "13.1.0",
|
|
70
70
|
"@secretlint/profiler": "13.1.0",
|
|
71
71
|
"@secretlint/secretlint-rule-preset-recommend": "13.1.0",
|
|
@@ -21,7 +21,7 @@ mcp:
|
|
|
21
21
|
pin: { slack_send_message: { channel_id: "${parameters.slack_channel}" } }
|
|
22
22
|
parameters:
|
|
23
23
|
icp: { type: string, required: true, description: "your ideal customer in your own words: industry, company size, region, buying signals, and what disqualifies a lead (e.g. 'B2B fintech, 50-2000 people, US or EU, has a compliance team; never gambling operators')" }
|
|
24
|
-
post_to: { type: string, required:
|
|
24
|
+
post_to: { type: string, required: false, default: none, enum: [crm, slack, none], description: "where each brief goes: crm (a note and the score field on the HubSpot contact), slack (a message in one channel) or none (the run's answer only)" }
|
|
25
25
|
slack_channel: { type: string, pattern: "^[CG][A-Z0-9]{8,12}$", description: "a Slack channel ID like C0123ABCD (the channel's details in Slack show it), never its name: where the brief is posted when post_to is slack" }
|
|
26
26
|
crm_score_property: { type: string, pattern: "^[a-z][a-z0-9_]{0,99}$", description: "a HubSpot contact number property's internal name, like lead_fit_score (lowercase letters, digits and underscores): the fit score is written there when post_to is crm; empty: the note only" }
|
|
27
27
|
competitors: { type: string, description: "your competitors' names or domains, comma-separated; a lead from one is flagged, never scored as a customer" }
|
package/templates/kyb/agent.md
CHANGED
|
@@ -11,7 +11,7 @@ model: { tier: balanced }
|
|
|
11
11
|
effort: medium
|
|
12
12
|
tools: [read, web_search, web_fetch, ask_person]
|
|
13
13
|
parameters:
|
|
14
|
-
risk_appetite: { type: string, required:
|
|
14
|
+
risk_appetite: { type: string, required: false, default: medium, enum: [low, medium, high], description: "low, medium or high: how much risk you accept, which sets how each red flag is graded and which verdict it leads to. Use medium (the default) unless your policy says otherwise; low is for regulated onboarding, high for low-exposure vendors." }
|
|
15
15
|
jurisdictions_of_interest: { type: string, required: false, pattern: "^$|^[A-Za-z]{2}(\\s*,\\s*[A-Za-z]{2})*$", description: "Optional. Countries that matter to you, as ISO 3166-1 alpha-2 codes separated by commas (e.g. US,GB,AE). Every tie the company has to one (incorporation, address, owner, officer, operations) is reported. Empty: none." }
|
|
16
16
|
opensanctions: { type: boolean, required: false, default: false, description: "Optional. Also look each name up in OpenSanctions (opensanctions.org), one index of every sanctions list, beside the list owners' own sites. Licence: OpenSanctions data is CC BY-NC 4.0, free for non-commercial use only; commercial use needs a paid licence from OpenSanctions. Turn it on only if your use is non-commercial or you hold that licence. Off (the default): the list owners' own sites only." }
|
|
17
17
|
budget: { per_run_usd: 5.00 }
|
package/dist/app.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type AppContext, type AppOptions } from "@parcha/pi-durable-disk";
|
|
2
|
-
import { promptOf } from "./skills.js";
|
|
3
|
-
export { WORKFLOW_ADAPTERS } from "./runner/workflow-adapters.js";
|
|
4
|
-
export { promptOf };
|
|
5
|
-
export default function app(where: AppContext): Promise<AppOptions>;
|