@parcha/agentrun-serve 0.1.0-beta.52 → 0.1.0-beta.54

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.
Files changed (287) hide show
  1. package/CHANGELOG.md +149 -1
  2. package/README.md +295 -37
  3. package/dist/agent-delete.d.ts +5 -6
  4. package/dist/agent-delete.js +30 -67
  5. package/dist/agent-package.d.ts +71 -0
  6. package/dist/agent-package.js +345 -0
  7. package/dist/agent-rows.d.ts +1 -1
  8. package/dist/agents-store.d.ts +26 -20
  9. package/dist/agents-store.js +42 -34
  10. package/dist/api-only.d.ts +25 -6
  11. package/dist/api-only.js +34 -13
  12. package/dist/claude-login.d.ts +1 -0
  13. package/dist/claude-login.js +1 -1
  14. package/dist/cli-learning/cli.d.ts +3 -0
  15. package/dist/cli-learning/cli.js +17 -3
  16. package/dist/cli-learning/connections.js +3 -2
  17. package/dist/cli-learning/schema.js +2 -1
  18. package/dist/cli.js +76 -8
  19. package/dist/composio-preset.d.ts +3 -1
  20. package/dist/composio-preset.js +5 -3
  21. package/dist/composio-triggers.d.ts +4 -0
  22. package/dist/composio-triggers.js +4 -1
  23. package/dist/computer-needs.d.ts +32 -0
  24. package/dist/computer-needs.js +80 -0
  25. package/dist/computer-setting.d.ts +5 -2
  26. package/dist/computer-setting.js +8 -1
  27. package/dist/computers.d.ts +0 -2
  28. package/dist/computers.js +1 -1
  29. package/dist/console/assets/index-B_85An2t.js +745 -0
  30. package/dist/console/assets/index-n1YsbnYh.css +1 -0
  31. package/dist/console/index.html +2 -2
  32. package/dist/console-links.d.ts +1 -0
  33. package/dist/console-links.js +2 -0
  34. package/dist/env-switch.d.ts +14 -0
  35. package/dist/env-switch.js +23 -0
  36. package/dist/errors.d.ts +5 -0
  37. package/dist/errors.js +10 -0
  38. package/dist/eval-previous.js +4 -3
  39. package/dist/fal-price.js +10 -13
  40. package/dist/github-connection.d.ts +50 -1
  41. package/dist/github-connection.js +96 -3
  42. package/dist/github-faux.d.ts +11 -2
  43. package/dist/github-faux.js +138 -7
  44. package/dist/github-pull-request.d.ts +37 -0
  45. package/dist/github-pull-request.js +110 -0
  46. package/dist/handed-secret.d.ts +4 -0
  47. package/dist/handed-secret.js +10 -0
  48. package/dist/harness-archive.d.ts +15 -5
  49. package/dist/harness-archive.js +71 -34
  50. package/dist/harness-check.d.ts +2 -1
  51. package/dist/harness-check.js +36 -95
  52. package/dist/harness-egress.d.ts +23 -0
  53. package/dist/harness-egress.js +69 -0
  54. package/dist/harness-recipe-entry.d.ts +71 -0
  55. package/dist/harness-recipe-entry.js +184 -0
  56. package/dist/harness-recipe.d.ts +73 -6
  57. package/dist/harness-recipe.js +185 -31
  58. package/dist/harness-sign-in.d.ts +29 -0
  59. package/dist/harness-sign-in.js +122 -0
  60. package/dist/harness-table.d.ts +21 -0
  61. package/dist/harness-table.js +58 -3
  62. package/dist/harness-zip.d.ts +6 -0
  63. package/dist/harness-zip.js +203 -0
  64. package/dist/ids.d.ts +11 -0
  65. package/dist/ids.js +36 -0
  66. package/dist/learn/commit.d.ts +14 -1
  67. package/dist/learn/commit.js +156 -1
  68. package/dist/learn/compile.js +22 -8
  69. package/dist/learn/folder.d.ts +5 -0
  70. package/dist/learn/folder.js +10 -1
  71. package/dist/learn/learning.sh +15 -3
  72. package/dist/learn/promote.d.ts +2 -2
  73. package/dist/learn/secrets.js +30 -7
  74. package/dist/learning-routes.d.ts +23 -11
  75. package/dist/learning-routes.js +110 -20
  76. package/dist/learning.d.ts +9 -6
  77. package/dist/learning.js +9 -4
  78. package/dist/live-reach.d.ts +34 -7
  79. package/dist/live-reach.js +76 -11
  80. package/dist/mcp-gateway.js +15 -2
  81. package/dist/mcp-probe.d.ts +3 -0
  82. package/dist/mcp-probe.js +8 -3
  83. package/dist/mcp-resources.d.ts +44 -0
  84. package/dist/mcp-resources.js +100 -0
  85. package/dist/mcp-servers-store.d.ts +16 -12
  86. package/dist/model.d.ts +4 -4
  87. package/dist/model.js +6 -6
  88. package/dist/native/cli.js +9 -2
  89. package/dist/native/connection.d.ts +2 -2
  90. package/dist/native/connection.js +5 -2
  91. package/dist/native/discovery.d.ts +2 -0
  92. package/dist/native/discovery.js +10 -6
  93. package/dist/native/remote-worker-bridge.js +36 -4
  94. package/dist/native/remote.d.ts +18 -1
  95. package/dist/native/remote.js +126 -37
  96. package/dist/native/schema.d.ts +6 -0
  97. package/dist/native/schema.js +31 -6
  98. package/dist/native/source-account.d.ts +13 -0
  99. package/dist/native/source-account.js +114 -0
  100. package/dist/native/source-capture-hooks.d.ts +5 -0
  101. package/dist/native/source-capture-hooks.js +102 -0
  102. package/dist/native/source-mcp-selection.d.ts +13 -0
  103. package/dist/native/source-mcp-selection.js +72 -0
  104. package/dist/native/source-runtime-tools.d.ts +19 -0
  105. package/dist/native/source-runtime-tools.js +103 -0
  106. package/dist/native/source-snapshot-types.d.ts +138 -0
  107. package/dist/native/source-snapshot-types.js +12 -0
  108. package/dist/native/source-snapshot.d.ts +8 -0
  109. package/dist/native/source-snapshot.js +1201 -0
  110. package/dist/observation/learning.js +3 -2
  111. package/dist/openapi.js +275 -40
  112. package/dist/print.js +1 -1
  113. package/dist/purged-workflow.d.ts +12 -0
  114. package/dist/purged-workflow.js +43 -0
  115. package/dist/run-keys.d.ts +46 -0
  116. package/dist/run-keys.js +109 -0
  117. package/dist/run-launch.d.ts +16 -1
  118. package/dist/run-launch.js +30 -1
  119. package/dist/run-learning-served.d.ts +2 -2
  120. package/dist/run-model-key.d.ts +2 -2
  121. package/dist/run-model-key.js +5 -5
  122. package/dist/run-secrets.d.ts +2 -0
  123. package/dist/run-secrets.js +7 -4
  124. package/dist/run-view.d.ts +17 -0
  125. package/dist/run-view.js +25 -1
  126. package/dist/runner/adapter-loop.d.ts +11 -3
  127. package/dist/runner/adapter-loop.js +138 -22
  128. package/dist/runner/adapter-run-spec.js +26 -13
  129. package/dist/runner/audit.d.ts +2 -0
  130. package/dist/runner/audit.js +9 -1
  131. package/dist/runner/beside.js +2 -1
  132. package/dist/runner/claim-secrets.d.ts +29 -3
  133. package/dist/runner/claim-secrets.js +38 -4
  134. package/dist/runner/cli-run-spec.js +24 -13
  135. package/dist/runner/harness-loops.d.ts +6 -0
  136. package/dist/runner/harness-loops.js +11 -1
  137. package/dist/runner/held.d.ts +4 -0
  138. package/dist/runner/journal-kinds.d.ts +2 -0
  139. package/dist/runner/learned-first.d.ts +2 -0
  140. package/dist/runner/learned-first.js +1 -1
  141. package/dist/runner/learning-end.d.ts +7 -2
  142. package/dist/runner/learning-end.js +22 -10
  143. package/dist/runner/learning-seed.d.ts +9 -3
  144. package/dist/runner/learning-seed.js +2 -2
  145. package/dist/runner/main.d.ts +1 -0
  146. package/dist/runner/main.js +20 -13
  147. package/dist/runner/mcp-claim.js +6 -1
  148. package/dist/runner/mcp-run.d.ts +10 -7
  149. package/dist/runner/mcp-run.js +3 -5
  150. package/dist/runner/metrics.d.ts +4 -2
  151. package/dist/runner/metrics.js +15 -3
  152. package/dist/runner/monid-run.js +9 -11
  153. package/dist/runner/pr-checkout.d.ts +21 -4
  154. package/dist/runner/pr-checkout.js +103 -4
  155. package/dist/runner/project-checkpoint.d.ts +35 -0
  156. package/dist/runner/project-checkpoint.js +116 -0
  157. package/dist/runner/project-drain.d.ts +8 -0
  158. package/dist/runner/project-drain.js +25 -0
  159. package/dist/runner/project-host.d.ts +10 -0
  160. package/dist/runner/project-host.js +52 -0
  161. package/dist/runner/promotion.d.ts +14 -6
  162. package/dist/runner/promotion.js +98 -41
  163. package/dist/runner/redact.d.ts +13 -0
  164. package/dist/runner/redact.js +67 -1
  165. package/dist/runner/run-channel.d.ts +9 -0
  166. package/dist/runner/run-channel.js +15 -2
  167. package/dist/runner/run-child-host.d.ts +8 -4
  168. package/dist/runner/run-child-host.js +178 -45
  169. package/dist/runner/run-errors.js +2 -2
  170. package/dist/runner/runner-check.d.ts +3 -0
  171. package/dist/runner/runner-check.js +28 -2
  172. package/dist/runner/runner.js +26 -9
  173. package/dist/runner/store-secrets.js +7 -3
  174. package/dist/runner/workflow-first.d.ts +4 -0
  175. package/dist/runner/workflow-first.js +13 -0
  176. package/dist/runner/workflow-loop.d.ts +2 -1
  177. package/dist/runner/workflow-loop.js +2 -1
  178. package/dist/runner/workflow-spec.js +1 -1
  179. package/dist/runs-over-store.d.ts +34 -6
  180. package/dist/runs-over-store.js +133 -25
  181. package/dist/sdk/runs.d.ts +11 -1
  182. package/dist/sdk/runs.js +117 -26
  183. package/dist/sdk/schema.js +12 -2
  184. package/dist/sdk/workflows.d.ts +1 -1
  185. package/dist/server.d.ts +79 -32
  186. package/dist/server.js +673 -113
  187. package/dist/skills/agentrun-serve/SKILL.md +2 -1
  188. package/dist/source-sync/adoption.d.ts +15 -0
  189. package/dist/source-sync/adoption.js +36 -0
  190. package/dist/source-sync/auxiliary.d.ts +23 -0
  191. package/dist/source-sync/auxiliary.js +64 -0
  192. package/dist/source-sync/capture-git.d.ts +5 -0
  193. package/dist/source-sync/capture-git.js +272 -0
  194. package/dist/source-sync/capture-project.d.ts +53 -0
  195. package/dist/source-sync/capture-project.js +206 -0
  196. package/dist/source-sync/capture-refusal.d.ts +7 -0
  197. package/dist/source-sync/capture-refusal.js +16 -0
  198. package/dist/source-sync/capture.d.ts +11 -0
  199. package/dist/source-sync/capture.js +22 -0
  200. package/dist/source-sync/checkpoint-gate.d.ts +21 -0
  201. package/dist/source-sync/checkpoint-gate.js +52 -0
  202. package/dist/source-sync/checkpoints.d.ts +66 -0
  203. package/dist/source-sync/checkpoints.js +168 -0
  204. package/dist/source-sync/claim.d.ts +11 -0
  205. package/dist/source-sync/claim.js +48 -0
  206. package/dist/source-sync/destination.d.ts +47 -0
  207. package/dist/source-sync/destination.js +239 -0
  208. package/dist/source-sync/io.d.ts +15 -0
  209. package/dist/source-sync/io.js +52 -0
  210. package/dist/source-sync/local.d.ts +43 -0
  211. package/dist/source-sync/local.js +229 -0
  212. package/dist/source-sync/prepare.d.ts +59 -0
  213. package/dist/source-sync/prepare.js +93 -0
  214. package/dist/source-sync/projects.d.ts +61 -0
  215. package/dist/source-sync/projects.js +130 -0
  216. package/dist/source-sync/registry.d.ts +95 -0
  217. package/dist/source-sync/registry.js +226 -0
  218. package/dist/source-sync/service.d.ts +33 -0
  219. package/dist/source-sync/service.js +118 -0
  220. package/dist/source-sync/skill-edits.d.ts +12 -0
  221. package/dist/source-sync/skill-edits.js +122 -0
  222. package/dist/source-sync/snapshots.d.ts +48 -0
  223. package/dist/source-sync/snapshots.js +448 -0
  224. package/dist/source-sync/types.d.ts +9 -0
  225. package/dist/source-sync/types.js +14 -0
  226. package/dist/source-sync/workspace.d.ts +66 -0
  227. package/dist/source-sync/workspace.js +273 -0
  228. package/dist/store/agent-body.d.ts +6 -2
  229. package/dist/store/agent-body.js +18 -7
  230. package/dist/store/index.d.ts +2 -2
  231. package/dist/store/index.js +1 -1
  232. package/dist/store/schema.d.ts +2 -1
  233. package/dist/store/schema.js +2 -1
  234. package/dist/store/seal.d.ts +5 -1
  235. package/dist/store/seal.js +12 -3
  236. package/dist/store/sqlite/project-checkpoints.d.ts +11 -0
  237. package/dist/store/sqlite/project-checkpoints.js +70 -0
  238. package/dist/store/sqlite/run-launch.d.ts +4 -12
  239. package/dist/store/sqlite/run-launch.js +5 -19
  240. package/dist/store/sqlite/store.js +224 -170
  241. package/dist/store/store.d.ts +116 -39
  242. package/dist/store/store.js +14 -1
  243. package/dist/store-reads/learning.d.ts +2 -2
  244. package/dist/store-view.d.ts +3 -1
  245. package/dist/store-view.js +17 -5
  246. package/dist/suggestions.d.ts +282 -0
  247. package/dist/suggestions.js +919 -0
  248. package/dist/telemetry.d.ts +8 -1
  249. package/dist/telemetry.js +12 -4
  250. package/dist/template-import.d.ts +27 -2
  251. package/dist/template-import.js +148 -13
  252. package/dist/templates.d.ts +103 -77
  253. package/dist/templates.js +71 -17
  254. package/dist/timeline/index.d.ts +1 -1
  255. package/dist/timeline/index.js +1 -1
  256. package/dist/timeline/timeline.d.ts +5 -0
  257. package/dist/timeline/timeline.js +8 -0
  258. package/dist/tool-plane.d.ts +12 -12
  259. package/dist/tools.d.ts +8 -8
  260. package/dist/trigger-launch-hook.d.ts +49 -0
  261. package/dist/trigger-launch-hook.js +91 -0
  262. package/dist/trigger-targets.d.ts +14 -1
  263. package/dist/trigger-targets.js +20 -0
  264. package/dist/triggers.d.ts +54 -5
  265. package/dist/triggers.js +143 -8
  266. package/dist/uploads-archil.js +1 -1
  267. package/dist/uploads.js +1 -1
  268. package/dist/validate.d.ts +1 -1
  269. package/dist/validate.js +3 -4
  270. package/dist/workspace/computer-for-claim.d.ts +2 -0
  271. package/dist/workspace/computer-for-claim.js +43 -0
  272. package/dist/workspace/paths.d.ts +6 -0
  273. package/dist/workspace/paths.js +6 -0
  274. package/dist/workspace/resolve-computer.d.ts +1 -0
  275. package/dist/workspace/run-tools.d.ts +2 -0
  276. package/dist/workspace/run-tools.js +8 -0
  277. package/dist/workspace/synced-folder.d.ts +1 -1
  278. package/dist/workspace/synced-folder.js +11 -14
  279. package/launcher/agentrun-serve +1 -1
  280. package/package.json +10 -10
  281. package/skills/agentrun-serve/SKILL.md +2 -1
  282. package/templates/README.md +8 -4
  283. package/templates/agent-scout/agent.md +46 -0
  284. package/templates/agent-scout/skills/scout/SKILL.md +88 -0
  285. package/templates/agent-scout/skills/scout/suggestions.schema.json +112 -0
  286. package/dist/console/assets/index-B-D0EM3j.js +0 -733
  287. package/dist/console/assets/index-DlQepP2J.css +0 -1
@@ -1,3 +1,4 @@
1
+ import { LABEL_KEY, MAX_LABEL_VALUE, MAX_LABELS } from "../run-labels.js";
1
2
  import { MCP_TOOL_KEY_PATTERN } from "../tool-names.js";
2
3
  import { SDK_RUNTIMES, SDK_PLATFORM_MAX_LENGTH, SDK_PLATFORM_PATTERN } from "./runtimes.js";
3
4
  const text = { type: "string" };
@@ -78,7 +79,7 @@ export const SDK_PATHS = {
78
79
  ...mark,
79
80
  operationId: "startSdkRun",
80
81
  summary: "Register a task executed by an existing backend SDK",
81
- description: "Requires an SDK agent definition. Captures the actual original policy and input, pins promoted workflows and any compiled shadow-check candidate separately, and returns a credential scoped to this run. The backend retains all model/tool/auth settings. Learning requires a configured server reflection/grading model; learning Off needs no server model key.",
82
+ description: "Requires an SDK agent definition. Captures the actual original policy and input, pins promoted workflows and any compiled shadow-check candidate separately, and returns a credential scoped to this run. The backend retains all model/tool/auth settings. Learning requires a configured server reflection/grading model; learning Off needs no server model key. The run takes evidence until an hour after this request; each events batch moves that deadline to an hour after the batch, up to 24 hours after this request (capabilities.features.sdk_runs.max_open_s).",
82
83
  parameters: [id("agent_id"), { ...key, required: true }],
83
84
  requestBody: body(sdkObject({
84
85
  input: { ...text, maxLength: 128000 },
@@ -93,6 +94,15 @@ export const SDK_PATHS = {
93
94
  price_usd: { type: "number", minimum: 0 },
94
95
  }, ["name", "description", "input_schema", "permission"]) },
95
96
  workflow_adapters: { type: "array", maxItems: 2, uniqueItems: true, items: { enum: ["runNode", "runJudge"] }, description: "Optional backend callbacks available for workflow model and decision nodes. Default empty; requires workflow_tools." },
97
+ started_at: { ...text, format: "date-time", description: "When the backend began the task, as an RFC 3339 date-time: the run's created_at. At most 60 seconds ahead of the server's clock and at most 7 days behind it. Absent: now. The evidence deadline is still counted from this request." },
98
+ title: { ...text, minLength: 1, maxLength: 200, description: "The run's title, trimmed and with whitespace collapsed. Absent: the first 80 characters of input." },
99
+ labels: {
100
+ type: "object",
101
+ maxProperties: MAX_LABELS,
102
+ propertyNames: { pattern: LABEL_KEY.source },
103
+ additionalProperties: { type: "string", minLength: 1, maxLength: MAX_LABEL_VALUE },
104
+ description: "The caller's own labels for the run, under the same rules as RunCreate.labels: kept on the run, served on every read of it and matched by GET /runs' label. Put no secret in one: a label holding a server secret is refused.",
105
+ },
96
106
  }, ["input", "instructions"])),
97
107
  responses: {
98
108
  201: response(object({
@@ -129,7 +139,7 @@ export const SDK_PATHS = {
129
139
  ...mark,
130
140
  operationId: "sdkRunEvents",
131
141
  summary: "Record bounded SDK execution evidence",
132
- description: "Use the scoped run token. Batches are contiguous from sequence 1, at most 100 events and 256 KB each, 4 MB total per run. Exact retries are idempotent; conflicting retries and events after completion are refused. Tool start IDs are unique per run. A nested callback names an already open, pinned learned_workflow invocation in parent_tool_use_id, and its result keeps the original call name and parent. Evidence never authorizes or executes a tool.",
142
+ description: "Use the scoped run token. Batches are contiguous from sequence 1, at most 100 events and 256 KB each, 4 MB total per run. Each new batch, an empty one (events: []) included, moves the run's deadline to an hour after it, up to 24 hours after the start; a run past its deadline takes no more evidence or completion and ends with an unknown outcome. Exact retries are idempotent; conflicting retries and events after completion are refused. Tool start IDs are unique per run. A nested callback names an already open, pinned learned_workflow invocation in parent_tool_use_id, and its result keeps the original call name and parent. Evidence never authorizes or executes a tool.",
133
143
  parameters: [id("run_id"), key],
134
144
  requestBody: body(object({ sequence: { type: "integer", minimum: 1 }, events: { type: "array", maxItems: 100, items: event } })),
135
145
  responses: { 200: response(object({ accepted: { const: true } })), ...errors },
@@ -14,7 +14,7 @@ export declare function sdkWorkflowManifest(tools: unknown, adapters: unknown):
14
14
  export declare function sdkDraftTools(manifest: readonly SdkWorkflowTool[]): {
15
15
  tools: string[];
16
16
  gated: {
17
- [k: string]: "ask" | "allow" | "deny";
17
+ [k: string]: "ask" | "deny" | "allow";
18
18
  };
19
19
  deniedBy: {
20
20
  [k: string]: "agent";
package/dist/server.d.ts CHANGED
@@ -11,8 +11,10 @@ import { type Store } from "./store/index.js";
11
11
  import { type BoxOffer } from "./place-offers.js";
12
12
  import { type StoredKeys } from "./secrets.js";
13
13
  import { type ComposioControl } from "./composio-preset.js";
14
+ import type { UsageEventName } from "./telemetry.js";
14
15
  import type { TriggerAdapter } from "./trigger-adapter.js";
15
16
  import { type TriggerClock } from "./triggers.js";
17
+ import type { LaunchHook } from "./trigger-launch-hook.js";
16
18
  import { type ToolSettingsMap } from "./tool-plane.js";
17
19
  import { AttachHub, type HostedDial } from "@parcha/agentrun-computer";
18
20
  import { type AttachTiming } from "./computer-attach.js";
@@ -26,6 +28,9 @@ export type ServeOptions = {
26
28
  /** On Postgres: told when this server's owner lock is lost for good (another server took the schema, or the lock could
27
29
  * not be taken back): every store call is refused from then. The CLI exits 1 on it, so the platform restarts the server. */
28
30
  onStoreLost?: (error: Error) => void;
31
+ /** Told when someone uses a feature the anonymous counts name (telemetry.ts UsageEventName: a suggestions scan, a
32
+ * discard, a suggested agent created). The CLI hands it the counts' `used`; it hears the event's name and nothing else. */
33
+ onUsage?: (event: UsageEventName) => void;
29
34
  /** The owner, signed in with a password (owner.ts): the page asks for it, and the token stays for scripts and the CLI. */
30
35
  accounts?: boolean;
31
36
  /** With accounts: the first visit sets the password with no setup code (a server with no public address). Honored only
@@ -88,6 +93,12 @@ export type ServeOptions = {
88
93
  * (the console, sign-in, setup, settings, MCP, triggers, hooks, ...) with a 404 before anything reads the request.
89
94
  * It has no owner: accounts and open setup are off, there being no page to sign in to. */
90
95
  apiOnly?: boolean;
96
+ /** The launch hook (AGENTRUN_LAUNCH_HOOK_URL and _SECRET, trigger-launch-hook.ts): each trigger firing that would start
97
+ * a run is handed to the host instead, which starts it through the API. None, firings start their runs here. */
98
+ launchHook?: LaunchHook;
99
+ /** The run-keys setting (AGENTRUN_RUN_KEYS=1, run-keys.ts): a template's apply makes its agent though a tool key it
100
+ * declares is not set here, and a run of it that does not carry that key in `keys` is refused. */
101
+ runKeys?: boolean;
91
102
  /** Another Archil control plane than the key's region's, and its fetch, and another maker of a disk's file API: a
92
103
  * test's fakes, for the server's own Archil calls (a launch's disk read, the settings' test, an agent's disk removed,
93
104
  * a deleted agent's run folder removed from a disk its launch named). */
@@ -141,6 +152,12 @@ export type ServeOptions = {
141
152
  /** The owner's harness modules (harness-table.ts HARNESS_MODULES_ENV): packages or paths, each exporting a
142
153
  * HarnessTableModule whose entries add harnesses of their own, for this server and its runs. Never a built-in one. */
143
154
  harnessModules?: readonly string[];
155
+ /** The owner's harness recipes (harness-table.ts HARNESS_RECIPES_ENV): recipe files installed into `data`, each adding
156
+ * the harness it describes to this server and its runs once a harness-check of it passed there (HARNESS.md#a-recipe). */
157
+ harnessRecipes?: readonly string[];
158
+ /** The owner's say-so (--harness-sign-in) that a plan-billed recipe with a sign-in runs a person's runs on the owner's
159
+ * own sign-in: a start refuses it unless this server is one owner's own, on their own machine (harnessSignInRefusal). */
160
+ harnessSignIn?: boolean;
144
161
  /** With `faux` only: Docker answers, so docker is available, and nothing asks Docker (place-offers.ts). */
145
162
  fauxDocker?: boolean;
146
163
  /** For tests: the lock each harness's first use installs by (harness-install.ts), by harness, with the package.json it
@@ -285,6 +302,13 @@ export type Serve = {
285
302
  * loopback. The runner beside it is told them with localInstall (runner/beside.ts mcpOwn), so its runs' loopback reads
286
303
  * never reach this server, as its own reads never do. */
287
304
  own: readonly string[];
305
+ /** With --faux-github: the fake GitHub's API and its repository's site, for a test's own runner alone
306
+ * (test/support.mjs): the runner's GitHub API has one way in, a test runner's option, so neither the CLI's runner nor
307
+ * any setting is ever pointed at it. */
308
+ fauxGitHub?: {
309
+ api: string;
310
+ web?: string;
311
+ };
288
312
  /** What a stop waits on: the runs whose processes still finish their turn, and the longest it waits on them. */
289
313
  stopping(): {
290
314
  runs: number;
@@ -404,13 +428,13 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
404
428
  providers?: string[] | undefined;
405
429
  provider?: string | undefined;
406
430
  default_provider?: string | undefined;
407
- resolves?: Record<"opencode" | "codex" | "claude-agent" | "pi", import("./tool-plane.js").Resolution> | undefined;
408
- why?: Record<"opencode" | "codex" | "claude-agent" | "pi", string> | undefined;
409
- default_permission: "ask" | "allow" | "deny";
410
- permissions: ("ask" | "allow" | "deny")[];
431
+ resolves?: Record<"opencode" | "codex" | "pi" | "claude-agent", import("./tool-plane.js").Resolution> | undefined;
432
+ why?: Record<"opencode" | "codex" | "pi" | "claude-agent", string> | undefined;
433
+ default_permission: "ask" | "deny" | "allow";
434
+ permissions: ("ask" | "deny" | "allow")[];
411
435
  fallback_allow_reads?: true | undefined;
412
436
  allow_reads?: true | undefined;
413
- permission: "ask" | "allow" | "deny";
437
+ permission: "ask" | "deny" | "allow";
414
438
  harnesses: string[];
415
439
  missing?: string[] | undefined;
416
440
  reason?: string | undefined;
@@ -423,11 +447,11 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
423
447
  name: string;
424
448
  summary: string;
425
449
  } | {
426
- default_permission: "ask" | "allow" | "deny";
427
- permissions: ("ask" | "allow" | "deny")[];
450
+ default_permission: "ask" | "deny" | "allow";
451
+ permissions: ("ask" | "deny" | "allow")[];
428
452
  fallback_allow_reads?: true | undefined;
429
453
  allow_reads?: true | undefined;
430
- permission: "ask" | "allow" | "deny";
454
+ permission: "ask" | "deny" | "allow";
431
455
  name: string;
432
456
  summary: string;
433
457
  blurb: string;
@@ -441,13 +465,13 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
441
465
  providers?: string[] | undefined;
442
466
  provider?: string | undefined;
443
467
  default_provider?: string | undefined;
444
- resolves?: Record<"opencode" | "codex" | "claude-agent" | "pi", import("./tool-plane.js").Resolution> | undefined;
445
- why?: Record<"opencode" | "codex" | "claude-agent" | "pi", string> | undefined;
446
- default_permission: "ask" | "allow" | "deny";
447
- permissions: ("ask" | "allow" | "deny")[];
468
+ resolves?: Record<"opencode" | "codex" | "pi" | "claude-agent", import("./tool-plane.js").Resolution> | undefined;
469
+ why?: Record<"opencode" | "codex" | "pi" | "claude-agent", string> | undefined;
470
+ default_permission: "ask" | "deny" | "allow";
471
+ permissions: ("ask" | "deny" | "allow")[];
448
472
  fallback_allow_reads?: true | undefined;
449
473
  allow_reads?: true | undefined;
450
- permission: "ask" | "allow" | "deny";
474
+ permission: "ask" | "deny" | "allow";
451
475
  harnesses: string[];
452
476
  missing?: string[] | undefined;
453
477
  reason?: string | undefined;
@@ -461,11 +485,11 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
461
485
  summary: string;
462
486
  } | {
463
487
  key: string | undefined;
464
- default_permission: "ask" | "allow" | "deny";
465
- permissions: ("ask" | "allow" | "deny")[];
488
+ default_permission: "ask" | "deny" | "allow";
489
+ permissions: ("ask" | "deny" | "allow")[];
466
490
  fallback_allow_reads?: true | undefined;
467
491
  allow_reads?: true | undefined;
468
- permission: "ask" | "allow" | "deny";
492
+ permission: "ask" | "deny" | "allow";
469
493
  name: string;
470
494
  summary: string;
471
495
  blurb: string;
@@ -610,6 +634,13 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
610
634
  at_rest: string;
611
635
  };
612
636
  /** /triggers: what starts an agent's capped runs with no caller (triggers.ts). */
637
+ /** A backend SDK run's start (sdk/runs.ts): the fields it takes, and the most seconds it stays open. */
638
+ sdk_runs: {
639
+ started_at: boolean;
640
+ title: boolean;
641
+ labels: boolean;
642
+ max_open_s: number;
643
+ };
613
644
  triggers: {
614
645
  routes: boolean;
615
646
  sources: string[];
@@ -725,13 +756,13 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
725
756
  providers?: string[] | undefined;
726
757
  provider?: string | undefined;
727
758
  default_provider?: string | undefined;
728
- resolves?: Record<"opencode" | "codex" | "claude-agent" | "pi", import("./tool-plane.js").Resolution> | undefined;
729
- why?: Record<"opencode" | "codex" | "claude-agent" | "pi", string> | undefined;
730
- default_permission: "ask" | "allow" | "deny";
731
- permissions: ("ask" | "allow" | "deny")[];
759
+ resolves?: Record<"opencode" | "codex" | "pi" | "claude-agent", import("./tool-plane.js").Resolution> | undefined;
760
+ why?: Record<"opencode" | "codex" | "pi" | "claude-agent", string> | undefined;
761
+ default_permission: "ask" | "deny" | "allow";
762
+ permissions: ("ask" | "deny" | "allow")[];
732
763
  fallback_allow_reads?: true | undefined;
733
764
  allow_reads?: true | undefined;
734
- permission: "ask" | "allow" | "deny";
765
+ permission: "ask" | "deny" | "allow";
735
766
  harnesses: string[];
736
767
  missing?: string[] | undefined;
737
768
  reason?: string | undefined;
@@ -744,11 +775,11 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
744
775
  name: string;
745
776
  summary: string;
746
777
  } | {
747
- default_permission: "ask" | "allow" | "deny";
748
- permissions: ("ask" | "allow" | "deny")[];
778
+ default_permission: "ask" | "deny" | "allow";
779
+ permissions: ("ask" | "deny" | "allow")[];
749
780
  fallback_allow_reads?: true | undefined;
750
781
  allow_reads?: true | undefined;
751
- permission: "ask" | "allow" | "deny";
782
+ permission: "ask" | "deny" | "allow";
752
783
  name: string;
753
784
  summary: string;
754
785
  blurb: string;
@@ -762,13 +793,13 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
762
793
  providers?: string[] | undefined;
763
794
  provider?: string | undefined;
764
795
  default_provider?: string | undefined;
765
- resolves?: Record<"opencode" | "codex" | "claude-agent" | "pi", import("./tool-plane.js").Resolution> | undefined;
766
- why?: Record<"opencode" | "codex" | "claude-agent" | "pi", string> | undefined;
767
- default_permission: "ask" | "allow" | "deny";
768
- permissions: ("ask" | "allow" | "deny")[];
796
+ resolves?: Record<"opencode" | "codex" | "pi" | "claude-agent", import("./tool-plane.js").Resolution> | undefined;
797
+ why?: Record<"opencode" | "codex" | "pi" | "claude-agent", string> | undefined;
798
+ default_permission: "ask" | "deny" | "allow";
799
+ permissions: ("ask" | "deny" | "allow")[];
769
800
  fallback_allow_reads?: true | undefined;
770
801
  allow_reads?: true | undefined;
771
- permission: "ask" | "allow" | "deny";
802
+ permission: "ask" | "deny" | "allow";
772
803
  harnesses: string[];
773
804
  missing?: string[] | undefined;
774
805
  reason?: string | undefined;
@@ -782,11 +813,11 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
782
813
  summary: string;
783
814
  } | {
784
815
  key: string | undefined;
785
- default_permission: "ask" | "allow" | "deny";
786
- permissions: ("ask" | "allow" | "deny")[];
816
+ default_permission: "ask" | "deny" | "allow";
817
+ permissions: ("ask" | "deny" | "allow")[];
787
818
  fallback_allow_reads?: true | undefined;
788
819
  allow_reads?: true | undefined;
789
- permission: "ask" | "allow" | "deny";
820
+ permission: "ask" | "deny" | "allow";
790
821
  name: string;
791
822
  summary: string;
792
823
  blurb: string;
@@ -931,6 +962,13 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
931
962
  at_rest: string;
932
963
  };
933
964
  /** /triggers: what starts an agent's capped runs with no caller (triggers.ts). */
965
+ /** A backend SDK run's start (sdk/runs.ts): the fields it takes, and the most seconds it stays open. */
966
+ sdk_runs: {
967
+ started_at: boolean;
968
+ title: boolean;
969
+ labels: boolean;
970
+ max_open_s: number;
971
+ };
934
972
  triggers: {
935
973
  routes: boolean;
936
974
  sources: string[];
@@ -983,4 +1021,13 @@ type LearningCaps = {
983
1021
  export declare function forCaller<T extends {
984
1022
  learning: LearningCaps;
985
1023
  }>(caps: T, ownerSession: boolean): T;
1024
+ /** A start with --harness-sign-in on a server that is not one owner's own, on their own machine. */
1025
+ export declare const HARNESS_SIGN_IN_NOT_LOCAL = "HARNESS_SIGN_IN_NOT_LOCAL";
1026
+ /** Why `options` on `data` may not run a recipe on its owner's own sign-in (--harness-sign-in), in words; undefined when
1027
+ * it may. One owner's own server on their own machine: it listens on loopback alone, with no public address; its store
1028
+ * is the SQLite one in its data directory (no AGENTRUN_STORE_URL, which servers elsewhere share); its runs run beside
1029
+ * it as its own user (`ownUser`: runIsolationOf's `process`), never under --no-runner or a user of their own; and one
1030
+ * person starts them, as Claude Code's login on this machine asks (claude-login.ts whyNotOneOwner): an owner, and one
1031
+ * API token. A check, a schedule and a shared server run on a key (HARNESS.md#sign-in). */
1032
+ export declare function harnessSignInRefusal(options: Pick<ServeOptions, "host" | "publicUrl" | "runnerApart" | "apiOnly" | "token" | "tokens">, data: string, ownUser: boolean): string | undefined;
986
1033
  export declare function startServe(options: ServeOptions): Promise<Serve>;