@parcha/agentrun-serve 0.1.0-beta.52 → 0.1.0-beta.53
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 +122 -1
- package/README.md +213 -24
- package/dist/agent-delete.d.ts +5 -6
- package/dist/agent-delete.js +30 -67
- package/dist/agent-package.d.ts +71 -0
- package/dist/agent-package.js +345 -0
- package/dist/agents-store.d.ts +26 -20
- package/dist/agents-store.js +41 -33
- package/dist/api-only.d.ts +26 -6
- package/dist/api-only.js +35 -13
- package/dist/claude-login.d.ts +1 -0
- package/dist/claude-login.js +1 -1
- package/dist/cli-learning/cli.d.ts +3 -0
- package/dist/cli-learning/cli.js +17 -3
- package/dist/cli-learning/connections.js +3 -2
- package/dist/cli-learning/schema.js +2 -1
- package/dist/cli.js +70 -7
- package/dist/composio-preset.d.ts +2 -1
- package/dist/composio-preset.js +4 -3
- package/dist/composio-triggers.d.ts +4 -0
- package/dist/composio-triggers.js +4 -1
- package/dist/computer-needs.d.ts +32 -0
- package/dist/computer-needs.js +80 -0
- package/dist/computer-setting.d.ts +1 -0
- package/dist/computer-setting.js +8 -1
- package/dist/console/assets/index-BFgyZzF_.js +734 -0
- package/dist/console/assets/index-DbilxljH.css +1 -0
- package/dist/console/index.html +2 -2
- package/dist/console-links.d.ts +1 -0
- package/dist/console-links.js +2 -0
- package/dist/env-switch.d.ts +14 -0
- package/dist/env-switch.js +23 -0
- package/dist/errors.d.ts +1 -0
- package/dist/errors.js +3 -0
- package/dist/eval-previous.js +4 -3
- package/dist/fal-price.js +10 -13
- package/dist/handed-secret.d.ts +4 -0
- package/dist/handed-secret.js +10 -0
- package/dist/harness-archive.d.ts +15 -5
- package/dist/harness-archive.js +71 -34
- package/dist/harness-check.d.ts +2 -1
- package/dist/harness-check.js +36 -95
- package/dist/harness-egress.d.ts +23 -0
- package/dist/harness-egress.js +69 -0
- package/dist/harness-recipe-entry.d.ts +71 -0
- package/dist/harness-recipe-entry.js +184 -0
- package/dist/harness-recipe.d.ts +73 -6
- package/dist/harness-recipe.js +185 -31
- package/dist/harness-sign-in.d.ts +29 -0
- package/dist/harness-sign-in.js +122 -0
- package/dist/harness-table.d.ts +21 -0
- package/dist/harness-table.js +58 -3
- package/dist/harness-zip.d.ts +6 -0
- package/dist/harness-zip.js +203 -0
- package/dist/ids.d.ts +11 -0
- package/dist/ids.js +36 -0
- package/dist/learn/commit.d.ts +14 -1
- package/dist/learn/commit.js +156 -1
- package/dist/learn/compile.js +22 -8
- package/dist/learn/folder.d.ts +5 -0
- package/dist/learn/folder.js +10 -1
- package/dist/learn/learning.sh +15 -3
- package/dist/learn/promote.d.ts +2 -2
- package/dist/learn/secrets.js +30 -7
- package/dist/learning-routes.d.ts +23 -11
- package/dist/learning-routes.js +110 -20
- package/dist/learning.d.ts +9 -6
- package/dist/learning.js +9 -4
- package/dist/mcp-gateway.js +15 -2
- package/dist/mcp-probe.d.ts +3 -0
- package/dist/mcp-probe.js +7 -2
- package/dist/mcp-resources.d.ts +44 -0
- package/dist/mcp-resources.js +100 -0
- package/dist/mcp-servers-store.d.ts +16 -12
- package/dist/model.d.ts +4 -4
- package/dist/model.js +6 -6
- package/dist/native/cli.js +9 -2
- package/dist/native/connection.d.ts +2 -2
- package/dist/native/connection.js +5 -2
- package/dist/native/discovery.d.ts +2 -0
- package/dist/native/discovery.js +10 -6
- package/dist/native/remote-worker-bridge.js +36 -4
- package/dist/native/remote.d.ts +18 -1
- package/dist/native/remote.js +126 -37
- package/dist/native/schema.d.ts +6 -0
- package/dist/native/schema.js +31 -6
- package/dist/native/source-account.d.ts +13 -0
- package/dist/native/source-account.js +114 -0
- package/dist/native/source-capture-hooks.d.ts +5 -0
- package/dist/native/source-capture-hooks.js +102 -0
- package/dist/native/source-mcp-selection.d.ts +13 -0
- package/dist/native/source-mcp-selection.js +72 -0
- package/dist/native/source-runtime-tools.d.ts +19 -0
- package/dist/native/source-runtime-tools.js +103 -0
- package/dist/native/source-snapshot-types.d.ts +138 -0
- package/dist/native/source-snapshot-types.js +12 -0
- package/dist/native/source-snapshot.d.ts +8 -0
- package/dist/native/source-snapshot.js +1201 -0
- package/dist/observation/learning.js +3 -2
- package/dist/openapi.js +167 -36
- package/dist/print.js +1 -1
- package/dist/purged-workflow.d.ts +12 -0
- package/dist/purged-workflow.js +43 -0
- package/dist/run-keys.d.ts +46 -0
- package/dist/run-keys.js +109 -0
- package/dist/run-launch.d.ts +16 -1
- package/dist/run-launch.js +30 -1
- package/dist/run-learning-served.d.ts +2 -2
- package/dist/run-model-key.d.ts +2 -2
- package/dist/run-model-key.js +5 -5
- package/dist/run-secrets.d.ts +2 -0
- package/dist/run-secrets.js +7 -4
- package/dist/run-view.d.ts +17 -0
- package/dist/run-view.js +25 -1
- package/dist/runner/adapter-loop.d.ts +11 -3
- package/dist/runner/adapter-loop.js +138 -22
- package/dist/runner/adapter-run-spec.js +25 -12
- package/dist/runner/audit.d.ts +2 -0
- package/dist/runner/audit.js +9 -1
- package/dist/runner/beside.js +2 -1
- package/dist/runner/claim-secrets.d.ts +29 -3
- package/dist/runner/claim-secrets.js +38 -4
- package/dist/runner/cli-run-spec.js +23 -12
- package/dist/runner/harness-loops.d.ts +6 -0
- package/dist/runner/harness-loops.js +11 -1
- package/dist/runner/held.d.ts +4 -0
- package/dist/runner/journal-kinds.d.ts +2 -0
- package/dist/runner/learned-first.d.ts +2 -0
- package/dist/runner/learned-first.js +1 -1
- package/dist/runner/learning-end.d.ts +7 -2
- package/dist/runner/learning-end.js +22 -10
- package/dist/runner/learning-seed.d.ts +9 -3
- package/dist/runner/learning-seed.js +2 -2
- package/dist/runner/main.d.ts +1 -0
- package/dist/runner/main.js +20 -13
- package/dist/runner/mcp-claim.js +6 -1
- package/dist/runner/mcp-run.d.ts +10 -7
- package/dist/runner/mcp-run.js +3 -5
- package/dist/runner/monid-run.js +9 -11
- package/dist/runner/project-checkpoint.d.ts +35 -0
- package/dist/runner/project-checkpoint.js +116 -0
- package/dist/runner/project-drain.d.ts +8 -0
- package/dist/runner/project-drain.js +25 -0
- package/dist/runner/project-host.d.ts +10 -0
- package/dist/runner/project-host.js +52 -0
- package/dist/runner/promotion.d.ts +14 -6
- package/dist/runner/promotion.js +98 -41
- package/dist/runner/redact.d.ts +13 -0
- package/dist/runner/redact.js +67 -1
- package/dist/runner/run-channel.d.ts +9 -0
- package/dist/runner/run-channel.js +15 -2
- package/dist/runner/run-child-host.d.ts +8 -4
- package/dist/runner/run-child-host.js +171 -41
- package/dist/runner/run-errors.js +2 -2
- package/dist/runner/runner-check.js +5 -2
- package/dist/runner/runner.js +26 -9
- package/dist/runner/store-secrets.js +7 -3
- package/dist/runner/workflow-first.d.ts +4 -0
- package/dist/runner/workflow-first.js +13 -0
- package/dist/runner/workflow-loop.d.ts +2 -1
- package/dist/runner/workflow-loop.js +2 -1
- package/dist/runner/workflow-spec.js +1 -1
- package/dist/runs-over-store.d.ts +34 -6
- package/dist/runs-over-store.js +133 -25
- package/dist/sdk/runs.d.ts +11 -1
- package/dist/sdk/runs.js +117 -26
- package/dist/sdk/schema.js +12 -2
- package/dist/sdk/workflows.d.ts +1 -1
- package/dist/server.d.ts +68 -32
- package/dist/server.js +600 -110
- package/dist/skills/agentrun-serve/SKILL.md +2 -1
- package/dist/source-sync/adoption.d.ts +15 -0
- package/dist/source-sync/adoption.js +36 -0
- package/dist/source-sync/auxiliary.d.ts +23 -0
- package/dist/source-sync/auxiliary.js +64 -0
- package/dist/source-sync/capture-git.d.ts +5 -0
- package/dist/source-sync/capture-git.js +272 -0
- package/dist/source-sync/capture-project.d.ts +53 -0
- package/dist/source-sync/capture-project.js +206 -0
- package/dist/source-sync/capture-refusal.d.ts +7 -0
- package/dist/source-sync/capture-refusal.js +16 -0
- package/dist/source-sync/capture.d.ts +11 -0
- package/dist/source-sync/capture.js +22 -0
- package/dist/source-sync/checkpoint-gate.d.ts +21 -0
- package/dist/source-sync/checkpoint-gate.js +52 -0
- package/dist/source-sync/checkpoints.d.ts +66 -0
- package/dist/source-sync/checkpoints.js +168 -0
- package/dist/source-sync/claim.d.ts +11 -0
- package/dist/source-sync/claim.js +48 -0
- package/dist/source-sync/destination.d.ts +47 -0
- package/dist/source-sync/destination.js +239 -0
- package/dist/source-sync/io.d.ts +15 -0
- package/dist/source-sync/io.js +52 -0
- package/dist/source-sync/local.d.ts +43 -0
- package/dist/source-sync/local.js +229 -0
- package/dist/source-sync/prepare.d.ts +59 -0
- package/dist/source-sync/prepare.js +93 -0
- package/dist/source-sync/projects.d.ts +61 -0
- package/dist/source-sync/projects.js +130 -0
- package/dist/source-sync/registry.d.ts +95 -0
- package/dist/source-sync/registry.js +226 -0
- package/dist/source-sync/service.d.ts +33 -0
- package/dist/source-sync/service.js +118 -0
- package/dist/source-sync/skill-edits.d.ts +12 -0
- package/dist/source-sync/skill-edits.js +122 -0
- package/dist/source-sync/snapshots.d.ts +48 -0
- package/dist/source-sync/snapshots.js +448 -0
- package/dist/source-sync/types.d.ts +9 -0
- package/dist/source-sync/types.js +14 -0
- package/dist/source-sync/workspace.d.ts +66 -0
- package/dist/source-sync/workspace.js +273 -0
- package/dist/store/agent-body.d.ts +4 -0
- package/dist/store/agent-body.js +16 -5
- package/dist/store/index.d.ts +2 -2
- package/dist/store/index.js +1 -1
- package/dist/store/schema.d.ts +2 -1
- package/dist/store/schema.js +2 -1
- package/dist/store/seal.d.ts +5 -1
- package/dist/store/seal.js +12 -3
- package/dist/store/sqlite/project-checkpoints.d.ts +11 -0
- package/dist/store/sqlite/project-checkpoints.js +70 -0
- package/dist/store/sqlite/run-launch.d.ts +4 -12
- package/dist/store/sqlite/run-launch.js +5 -19
- package/dist/store/sqlite/store.js +224 -170
- package/dist/store/store.d.ts +116 -39
- package/dist/store/store.js +14 -1
- package/dist/store-reads/learning.d.ts +2 -2
- package/dist/store-view.d.ts +3 -1
- package/dist/store-view.js +17 -5
- package/dist/template-import.d.ts +10 -2
- package/dist/template-import.js +116 -13
- package/dist/templates.d.ts +26 -5
- package/dist/templates.js +62 -10
- package/dist/timeline/index.d.ts +1 -1
- package/dist/timeline/index.js +1 -1
- package/dist/timeline/timeline.d.ts +5 -0
- package/dist/timeline/timeline.js +8 -0
- package/dist/tool-plane.d.ts +12 -12
- package/dist/tools.d.ts +8 -8
- package/dist/trigger-launch-hook.d.ts +47 -0
- package/dist/trigger-launch-hook.js +90 -0
- package/dist/trigger-targets.d.ts +14 -1
- package/dist/trigger-targets.js +20 -0
- package/dist/triggers.d.ts +54 -5
- package/dist/triggers.js +143 -8
- package/dist/uploads-archil.js +1 -1
- package/dist/uploads.js +1 -1
- package/dist/validate.js +1 -2
- package/dist/workspace/computer-for-claim.d.ts +2 -0
- package/dist/workspace/computer-for-claim.js +43 -0
- package/dist/workspace/paths.d.ts +6 -0
- package/dist/workspace/paths.js +6 -0
- package/dist/workspace/resolve-computer.d.ts +1 -0
- package/dist/workspace/run-tools.d.ts +2 -0
- package/dist/workspace/run-tools.js +8 -0
- package/launcher/agentrun-serve +1 -1
- package/package.json +10 -10
- package/skills/agentrun-serve/SKILL.md +2 -1
- package/templates/README.md +5 -2
- package/dist/console/assets/index-B-D0EM3j.js +0 -733
- package/dist/console/assets/index-DlQepP2J.css +0 -1
|
@@ -160,7 +160,7 @@ export function workflowSpecOf(deps) {
|
|
|
160
160
|
// models, its decisions, its call nodes' effects and its model nodes' tools all run on these, never on another run's
|
|
161
161
|
// keys or on this process's whole environment.
|
|
162
162
|
// Held by the runner's one redactor before anything can echo one (holding: run.redact), as the decision keys were.
|
|
163
|
-
const claimedEnv = await holding(claimSecrets({ store: deps.store, sealKey: deps.sealKey, ...(deps.env ? { env: deps.env } : {}) }, claimed.revision, { plane: claimed.plane }));
|
|
163
|
+
const claimedEnv = await holding(claimSecrets({ store: deps.store, sealKey: deps.sealKey, ...(deps.env ? { env: deps.env } : {}), redact: run?.redact }, claimed.revision, { plane: claimed.plane }, claim.runId));
|
|
164
164
|
// The run's models resolve the one way the runner resolves any (routeProviderOf over routeOf), unless a test gives its
|
|
165
165
|
// own: each tier's key from the runner's environment, else the one the claim opened (a key saved in
|
|
166
166
|
// Settings → Model keys runs the next run with no restart).
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SourceIOReceipt } from "./source-sync/io.js";
|
|
1
2
|
import type { Revision } from "./agent-rows.js";
|
|
2
3
|
import type { MessageOrigin } from "./timeline/index.js";
|
|
3
4
|
import { type AgentEntry, type ExternalRef } from "./agents-store.js";
|
|
@@ -88,8 +89,6 @@ export declare function raiseCap(store: RunsStore, moment: RunMoment, cap: numbe
|
|
|
88
89
|
* each write or lose to the store's one-answer index, and the one that loses reads the one that won. The note is the
|
|
89
90
|
* person's words, carried on the command for the run's gate. */
|
|
90
91
|
export declare function approve(store: RunsStore, moment: RunMoment, id: string, decision: "allow" | "deny", note?: string, confirmed?: boolean): Promise<void>;
|
|
91
|
-
/** A UUIDv7 run id: time-ordered, so a listing by start time is stable, and unique per run. */
|
|
92
|
-
export declare function uuidv7(now?: number): string;
|
|
93
92
|
/** The revision's body fields a start reads: its default cap, its place, and (agentic) its tools, for the place
|
|
94
93
|
* fallback. Read with the shapes the old start read them with. */
|
|
95
94
|
type StartBody = {
|
|
@@ -124,9 +123,11 @@ export interface StartDeps {
|
|
|
124
123
|
explainRun(issues: InputIssue[], body: Json, revision: Revision | null | undefined): Promise<InputIssue[]>;
|
|
125
124
|
/** Marks an input refusal as told from a revision (server.ts told). */
|
|
126
125
|
told(error: ApiError): ApiError;
|
|
127
|
-
/** Refuses a revision this host cannot run, by field (server.ts runnable)
|
|
126
|
+
/** Refuses a revision this host cannot run, by field (server.ts runnable), each tool key the run carries (`carried`, by
|
|
127
|
+
* name) read as one the host holds. */
|
|
128
128
|
runnable(revision: Revision, place: Place, options: {
|
|
129
129
|
capped: boolean;
|
|
130
|
+
carried?: readonly string[];
|
|
130
131
|
}): Promise<void>;
|
|
131
132
|
/** The revision a run starts on, its MCP tools pinned: one that grants an MCP tool and was saved with no pin (before
|
|
132
133
|
* pins were made at save, or an inline agent's version stored then) is pinned once, at its first run (server.ts
|
|
@@ -148,6 +149,26 @@ export interface StartDeps {
|
|
|
148
149
|
undo(): Promise<void>;
|
|
149
150
|
} | undefined>;
|
|
150
151
|
};
|
|
152
|
+
/** Complete a moved project's placement before admission. Upload placement has already pinned its destination disk.
|
|
153
|
+
* `undo` may remove only this exclusively prepared run and must await outstanding writes. The caller invokes it only
|
|
154
|
+
* after a definite admission refusal; unknown admission keeps the preparation for explicit reconciliation. */
|
|
155
|
+
readonly project?: {
|
|
156
|
+
hold?(input: {
|
|
157
|
+
runId: string;
|
|
158
|
+
agentId: string;
|
|
159
|
+
}): Promise<SourceIOReceipt>;
|
|
160
|
+
place(input: {
|
|
161
|
+
hold?: SourceIOReceipt;
|
|
162
|
+
runId: string;
|
|
163
|
+
agentId: string;
|
|
164
|
+
revision: Pick<NewRevision, "id" | "kind" | "body">;
|
|
165
|
+
launch: RunLaunch;
|
|
166
|
+
}): Promise<{
|
|
167
|
+
readonly launch: RunLaunch;
|
|
168
|
+
undo(): Promise<void>;
|
|
169
|
+
admitted?(): Promise<void>;
|
|
170
|
+
} | undefined>;
|
|
171
|
+
};
|
|
151
172
|
/** Where a revision naming these tools and no place runs here (server.ts fallbackPlace). */
|
|
152
173
|
fallbackPlace(kind: "agentic" | "workflow", tools: readonly unknown[]): Place;
|
|
153
174
|
/** The Archil disk the run's launch record keeps (server.ts launchDiskOf): the one its body's `archil_disk` names, else
|
|
@@ -206,6 +227,8 @@ export interface StartOptions {
|
|
|
206
227
|
readonly origin?: RunOrigin;
|
|
207
228
|
readonly capped?: boolean;
|
|
208
229
|
readonly from?: MessageOrigin;
|
|
230
|
+
/** The names of the tool keys the run carries (`keys`, run-keys.ts; their values go only into `sealed`). */
|
|
231
|
+
readonly keys?: readonly string[];
|
|
209
232
|
}
|
|
210
233
|
/** The run's learning start: undefined when the run does not learn (the server's learning off, a workflow revision, or
|
|
211
234
|
* its revision does not say learning), else the seed sha it starts from, its # Learned text (its owner's corrections,
|
|
@@ -227,7 +250,12 @@ export declare function learningStartFor(deps: StartDeps, entry: AgentEntry, rev
|
|
|
227
250
|
* (store.runs.create), which a runner reads at its claim. No process, no door, no setup file: where the run runs is the
|
|
228
251
|
* runner's. Under `origin`, a key that already started a run gets that run (the store's one-run-per-key), so a retry never
|
|
229
252
|
* starts a second. */
|
|
230
|
-
export declare function startRun(store:
|
|
253
|
+
export declare function startRun(store: Store, deps: StartDeps, entry: AgentEntry, body: Json, { trigger, origin, capped, from, title, sealed, keys }?: StartOptions): Promise<RunRow>;
|
|
254
|
+
/** Writes run `runId` of agent `agentId` with `write`, its files (launch.files) held for it first (StartDeps.files): a
|
|
255
|
+
* hold that fails part way, a write that fails, or one that answers another run (an origin key's run started before),
|
|
256
|
+
* lets go of the hold. In Mode 2 they are placed in the run's folder instead (StartDeps.files.place), and the run is
|
|
257
|
+
* written with the launch that says so; the same failures undo the placing. */
|
|
258
|
+
export declare function withHeldFiles(store: Pick<Store, "runs">, deps: Pick<StartDeps, "files" | "project">, runId: string, agentId: string, revision: Pick<NewRevision, "id" | "kind" | "body">, launch: RunLaunch, write: (launch: RunLaunch) => Promise<RunRow>): Promise<RunRow>;
|
|
231
259
|
/** An agent given inline (POST /runs): its reference in its source with the version, its name and description, and the
|
|
232
260
|
* revision its checked definition makes (agents-store makeRevision), not yet stored. */
|
|
233
261
|
export interface InlineAgent {
|
|
@@ -249,14 +277,14 @@ export interface InlineAgent {
|
|
|
249
277
|
* agent already mapped to the reference is the run's (its id, its learning), so a run of a later version learns from the
|
|
250
278
|
* earlier ones. A different definition under a version already run is 409 external_body_conflict, nothing written; under
|
|
251
279
|
* `origin`, a key that already started a run gets that run, as startRun's. */
|
|
252
|
-
export declare function startInline(store: Pick<Store, "runs" | "runOfOrigin" | "agents">, deps: StartDeps, inline: InlineAgent, body: Json, options?: Pick<StartOptions, "origin" | "sealed">): Promise<RunRow>;
|
|
280
|
+
export declare function startInline(store: Pick<Store, "runs" | "runOfOrigin" | "agents">, deps: StartDeps, inline: InlineAgent, body: Json, options?: Pick<StartOptions, "origin" | "sealed" | "keys">): Promise<RunRow>;
|
|
253
281
|
/** A run's launch from its create body, with every check the old start made before a run started, in the same order and
|
|
254
282
|
* words: the body's fields, the revision it pins, the input against its schema, the cap rules, the plane this host
|
|
255
283
|
* resolves, whether the revision can run here; then its title, plane, model and learning start. Nothing is written: the
|
|
256
284
|
* caller INSERTs the run with it (startRun; an inline agent's run, which writes its agent and revision in the same
|
|
257
285
|
* transaction). `revision`: the revision the run starts on, given (an inline agent's, not yet stored), in place of the
|
|
258
286
|
* one the body pins or the agent's current (deps.pinnedOf). */
|
|
259
|
-
export declare function prepareLaunch(deps: StartDeps, entry: AgentEntry, body: Json, { trigger, capped, from, title: given, revision: onRevision }?: Omit<StartOptions, "origin"> & {
|
|
287
|
+
export declare function prepareLaunch(deps: StartDeps, entry: AgentEntry, body: Json, { trigger, capped, from, title: given, revision: onRevision, keys }?: Omit<StartOptions, "origin"> & {
|
|
260
288
|
readonly revision?: Revision;
|
|
261
289
|
}): Promise<{
|
|
262
290
|
launch: RunLaunch;
|
package/dist/runs-over-store.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { reconcileProjectCheckpoints } from "./source-sync/checkpoints.js";
|
|
2
|
+
import { requireSavedProject } from "./source-sync/checkpoint-gate.js";
|
|
1
3
|
import { NATIVE_RUN_OVERRIDES_UNSUPPORTED, nativeOf, nativeRunOverrides } from "./native/binding.js";
|
|
2
4
|
import { launchNative } from "./native/connection.js";
|
|
3
5
|
// The write half of the run's server cut (design 2.1, "the runner takes every run"): the functions the v2 routes call to
|
|
@@ -12,29 +14,32 @@ import { launchNative } from "./native/connection.js";
|
|
|
12
14
|
// is the run view's to read from the journal (the server's view layer, run-view.ts). These writers take it as `RunMoment`
|
|
13
15
|
// and never recompute it; the coarse facts a row already holds (its state, its launch cap) they read from the store.
|
|
14
16
|
import { randomBytes } from "node:crypto";
|
|
15
|
-
import { externalKey, getAgent } from "./agents-store.js";
|
|
17
|
+
import { externalKey, getAgent, ownedElsewhere } from "./agents-store.js";
|
|
16
18
|
import { CAP_TOLERANCE, money } from "./cap.js";
|
|
17
19
|
import { holdOf } from "./computer-held.js";
|
|
18
20
|
import { computerOfPlace, settingOfDefinition } from "./computer-setting.js";
|
|
19
21
|
import { ApiError, invalid, unsupported } from "./errors.js";
|
|
20
22
|
import { labelsOf } from "./run-labels.js";
|
|
21
23
|
import { harnessOfBody } from "./harness.js";
|
|
24
|
+
import { uuidv7 } from "./ids.js";
|
|
22
25
|
import { redacted, redactedOutput } from "./key-refusal.js";
|
|
23
26
|
import { chooseWorkflows, learnedSection, learnsOf, RUN_LEARNING_USE } from "./learning.js";
|
|
24
27
|
import { thinkingLevel } from "./model.js";
|
|
25
28
|
import { resolvePlace } from "./place.js";
|
|
26
29
|
import { githubTargetOf } from "./github.js";
|
|
27
30
|
import { repoOf } from "./run-repo.js";
|
|
28
|
-
import { launchBody } from "./run-launch.js";
|
|
31
|
+
import { launchBody, sourceProjectOf } from "./run-launch.js";
|
|
29
32
|
import { learningDiskOf } from "./learn/learning-of.js";
|
|
30
33
|
import { modelKeyRequired, serverKeyMissing } from "./run-model-key.js";
|
|
31
34
|
import { raiseFollowUpId } from "./run-view.js";
|
|
32
35
|
import { sendCommand } from "./runner/commands.js";
|
|
33
36
|
import { refuseWhileNoRunner } from "./runner/presence.js";
|
|
34
|
-
import { AgentDeleting, AnswerTaken, ExternalBodyConflict, RunFinal, StoreConstraint, StoreLaunchMissing } from "./store/index.js";
|
|
37
|
+
import { RevisionMoved, AgentDeleting, AgentPurged, AgentArchived, AnswerTaken, ExternalBodyConflict, RunFinal, StoreConstraint, StoreLaunchMissing } from "./store/index.js";
|
|
35
38
|
import { canonical } from "./store/agent-body.js";
|
|
39
|
+
import { sourceSyncOf } from "./source-sync/types.js";
|
|
36
40
|
import { toolingOf } from "./tools.js";
|
|
37
41
|
import { planeFor } from "./tool-plane.js";
|
|
42
|
+
import { declaredKeys, undeclaredKeys, withCarried } from "./run-keys.js";
|
|
38
43
|
import { clip } from "./web-fetch-direct.js";
|
|
39
44
|
import { isObject } from "./validate.js";
|
|
40
45
|
/** Why a message that may not answer a person's question is not sent (runs.ts WAITS_ON_A_PERSON). */
|
|
@@ -175,7 +180,8 @@ export async function message(store, moment, content, { requestId, answers = tru
|
|
|
175
180
|
throw new ApiError("input_invalid", "Native jobs do not support in-session steering or follow-up messages. Start a new native run.");
|
|
176
181
|
// Archiving closes a run: it, or a run of its archived agent, takes no message, said as archived (never as finished). Another
|
|
177
182
|
// system's agent is archived only by its delete: said so, as every run of it is refused (AgentDeleting).
|
|
178
|
-
|
|
183
|
+
const archivedAgent = moment.archived === "agent" ? await store.agents.get(moment.agentId) : null;
|
|
184
|
+
if (archivedAgent && ownedElsewhere(archivedAgent))
|
|
179
185
|
throw new AgentDeleting(moment.agentId);
|
|
180
186
|
if (moment.archived !== undefined)
|
|
181
187
|
throw archivedRefusal(moment);
|
|
@@ -397,16 +403,6 @@ export async function approve(store, moment, id, decision, note, confirmed = fal
|
|
|
397
403
|
throw alreadyAnswered(id, end.decision);
|
|
398
404
|
}
|
|
399
405
|
}
|
|
400
|
-
// ---- start -----------------------------------------------------------------------------------------------------------
|
|
401
|
-
/** A UUIDv7 run id: time-ordered, so a listing by start time is stable, and unique per run. */
|
|
402
|
-
export function uuidv7(now = Date.now()) {
|
|
403
|
-
const bytes = randomBytes(16);
|
|
404
|
-
bytes.writeUIntBE(now, 0, 6);
|
|
405
|
-
bytes[6] = (bytes[6] & 0x0f) | 0x70;
|
|
406
|
-
bytes[8] = (bytes[8] & 0x3f) | 0x80;
|
|
407
|
-
const hex = bytes.toString("hex");
|
|
408
|
-
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
|
|
409
|
-
}
|
|
410
406
|
/** A no-op redactor, when the server gives none: no secret is cut (the switch wires the real shown for a learning run). */
|
|
411
407
|
const noShown = { text: (text) => text, name: (name) => name, holds: () => false };
|
|
412
408
|
/** The run's learning start: undefined when the run does not learn (the server's learning off, a workflow revision, or
|
|
@@ -448,19 +444,37 @@ export async function learningStartFor(deps, entry, revision, rbody, { use = fal
|
|
|
448
444
|
* (store.runs.create), which a runner reads at its claim. No process, no door, no setup file: where the run runs is the
|
|
449
445
|
* runner's. Under `origin`, a key that already started a run gets that run (the store's one-run-per-key), so a retry never
|
|
450
446
|
* starts a second. */
|
|
451
|
-
export async function startRun(store, deps, entry, body, { trigger, origin, capped = false, from, title, sealed } = {}) {
|
|
447
|
+
export async function startRun(store, deps, entry, body, { trigger, origin, capped = false, from, title, sealed, keys } = {}) {
|
|
448
|
+
if (sourceSyncOf(entry.revision?.body)) {
|
|
449
|
+
// Re-delivery of a firing that already admitted a run is not a new start and needs no new project preparation.
|
|
450
|
+
if (origin) {
|
|
451
|
+
const found = await store.runOfOrigin(origin.key);
|
|
452
|
+
const existing = found && found.fingerprint === (origin.fingerprint ?? null) ? await store.runs.get(found.runId) : undefined;
|
|
453
|
+
if (existing?.agentId === entry.agent.id)
|
|
454
|
+
return existing;
|
|
455
|
+
}
|
|
456
|
+
await reconcileProjectCheckpoints(store, entry.agent.id);
|
|
457
|
+
const current = await getAgent(store, entry.agent.id);
|
|
458
|
+
if (!current)
|
|
459
|
+
throw new ApiError("not_found", "The agent no longer exists.");
|
|
460
|
+
// The body still pins any explicitly requested revision; refresh the current pointer used by admission's CAS.
|
|
461
|
+
entry = current;
|
|
462
|
+
await requireSavedProject(store, entry.agent.id);
|
|
463
|
+
}
|
|
452
464
|
if (entry.revision?.body?.cli_learning)
|
|
453
465
|
throw new ApiError("agent_not_runnable", "Start the next prompt in your existing CLI session. AgentRun records its learning; it does not launch this connection.");
|
|
454
466
|
if (entry.revision?.body?.sdk)
|
|
455
467
|
throw new ApiError("agent_not_runnable", "This agent runs in your backend SDK. Start it through its SDK learning wrapper; AgentRun does not launch its tools or credentials.");
|
|
456
|
-
const { launch, revision } = await prepareLaunch(deps, entry, body, { ...(trigger ? { trigger } : {}), capped, ...(from ? { from } : {}), ...(title !== undefined ? { title } : {}) });
|
|
468
|
+
const { launch, revision } = await prepareLaunch(deps, entry, body, { ...(trigger ? { trigger } : {}), capped, ...(from ? { from } : {}), ...(title !== undefined ? { title } : {}), ...(keys ? { keys } : {}) });
|
|
457
469
|
keyedOrRefused(deps, launch, revision.kind, sealed);
|
|
458
470
|
const runId = (deps.newRunId ?? uuidv7)();
|
|
459
471
|
try {
|
|
460
472
|
const labels = labelsOf(body.labels);
|
|
461
|
-
return await withHeldFiles(deps, runId, entry.agent.id, launch, (launch) => store.runs.create({ id: runId, agentId: entry.agent.id, revisionId: revision.id, ...(origin ? { origin } : {}), ...(labels ? { labels } : {}) }, { body: launchBody(launch), ...(sealed ? { sealed: sealed(runId, launch, revision.kind) } : {}) }));
|
|
473
|
+
return await withHeldFiles(store, deps, runId, entry.agent.id, revision, launch, (launch) => store.runs.create({ id: runId, agentId: entry.agent.id, revisionId: revision.id, expectedCurrent: entry.agent.currentRevision, ...(origin ? { origin } : {}), ...(labels ? { labels } : {}) }, { body: launchBody(launch), ...(sealed ? { sealed: sealed(runId, launch, revision.kind) } : {}) }));
|
|
462
474
|
}
|
|
463
475
|
catch (error) {
|
|
476
|
+
if (error instanceof RevisionMoved)
|
|
477
|
+
throw new ApiError("precondition_failed", "The agent changed while this run was prepared. Start again using its current setup.");
|
|
464
478
|
// Only another writer of the store got here first under the same origin key: its run is the one asked for.
|
|
465
479
|
if (origin && error instanceof StoreConstraint) {
|
|
466
480
|
const existing = await store.runOfOrigin(origin.key);
|
|
@@ -482,7 +496,95 @@ function keyedOrRefused(deps, launch, kind, sealed) {
|
|
|
482
496
|
* hold that fails part way, a write that fails, or one that answers another run (an origin key's run started before),
|
|
483
497
|
* lets go of the hold. In Mode 2 they are placed in the run's folder instead (StartDeps.files.place), and the run is
|
|
484
498
|
* written with the launch that says so; the same failures undo the placing. */
|
|
485
|
-
async function withHeldFiles(deps, runId, agentId, launch, write) {
|
|
499
|
+
export async function withHeldFiles(store, deps, runId, agentId, revision, launch, write) {
|
|
500
|
+
const source = sourceSyncOf(revision.body);
|
|
501
|
+
if (!source)
|
|
502
|
+
return withUploads(deps, runId, agentId, launch, write);
|
|
503
|
+
if (!deps.project)
|
|
504
|
+
throw new ApiError("agent_not_runnable", "This project must be prepared before its run can start.");
|
|
505
|
+
const ownership = await deps.project.hold?.({ runId, agentId });
|
|
506
|
+
let projectSettled = false;
|
|
507
|
+
const preparationOwnership = ownership ? { settled: async () => { projectSettled = true; } } : undefined;
|
|
508
|
+
const undos = [];
|
|
509
|
+
const undo = async (settled = false) => {
|
|
510
|
+
let complete = true;
|
|
511
|
+
for (const release of [...undos].reverse())
|
|
512
|
+
try {
|
|
513
|
+
await release();
|
|
514
|
+
}
|
|
515
|
+
catch {
|
|
516
|
+
complete = false;
|
|
517
|
+
}
|
|
518
|
+
if ((settled || projectSettled) && complete)
|
|
519
|
+
await ownership?.settled();
|
|
520
|
+
};
|
|
521
|
+
let prepared = launch, admitted;
|
|
522
|
+
try {
|
|
523
|
+
const ids = launch.files ?? [];
|
|
524
|
+
if (ids.length && deps.files) {
|
|
525
|
+
const uploaded = await deps.files.place?.(runId, agentId, prepared);
|
|
526
|
+
if (uploaded) {
|
|
527
|
+
prepared = uploaded.launch;
|
|
528
|
+
undos.push(() => uploaded.undo());
|
|
529
|
+
}
|
|
530
|
+
else {
|
|
531
|
+
undos.push(() => deps.files.release(runId));
|
|
532
|
+
await deps.files.hold(runId, ids);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
const placed = await deps.project.place({ runId, agentId, revision, launch: prepared, ...(preparationOwnership ? { hold: preparationOwnership } : {}) });
|
|
536
|
+
if (!placed)
|
|
537
|
+
throw new ApiError("agent_not_runnable", "This project has no completed placement for its run.");
|
|
538
|
+
undos.push(() => placed.undo());
|
|
539
|
+
admitted = placed.admitted;
|
|
540
|
+
prepared = placed.launch;
|
|
541
|
+
const receipt = sourceProjectOf(prepared.sourceProject);
|
|
542
|
+
if (!receipt || receipt.sourceId !== source.id || receipt.digest !== source.project || receipt.baselineRevision !== revision.id)
|
|
543
|
+
throw new ApiError("agent_not_runnable", "The prepared project does not match this run's pinned revision.");
|
|
544
|
+
}
|
|
545
|
+
catch (error) {
|
|
546
|
+
await undo();
|
|
547
|
+
throw error;
|
|
548
|
+
}
|
|
549
|
+
try {
|
|
550
|
+
const row = await write(prepared);
|
|
551
|
+
if (row.id !== runId)
|
|
552
|
+
await undo(true);
|
|
553
|
+
else {
|
|
554
|
+
if (ownership)
|
|
555
|
+
await ownership.settled();
|
|
556
|
+
else
|
|
557
|
+
await admitted?.();
|
|
558
|
+
}
|
|
559
|
+
return row;
|
|
560
|
+
}
|
|
561
|
+
catch (error) {
|
|
562
|
+
// A transport/COMMIT answer can be lost after admission. Never erase a runner's files on that evidence. Even a
|
|
563
|
+
// successful absent-row read does not prove an in-flight commit cannot land later: unknown admissions stay retained.
|
|
564
|
+
let knownAbsent = false;
|
|
565
|
+
try {
|
|
566
|
+
const row = await store.runs.get(runId);
|
|
567
|
+
if (row) {
|
|
568
|
+
const kept = await store.runs.launch(runId);
|
|
569
|
+
if (row.agentId === agentId && row.revisionId === revision.id && kept && canonical(kept.body) === canonical(launchBody(prepared))) {
|
|
570
|
+
if (ownership)
|
|
571
|
+
await ownership.settled();
|
|
572
|
+
else
|
|
573
|
+
await admitted?.();
|
|
574
|
+
return row;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
else
|
|
578
|
+
knownAbsent = true;
|
|
579
|
+
}
|
|
580
|
+
catch { /* preserve preparation until the admission can be resolved */ }
|
|
581
|
+
if (knownAbsent && (error instanceof StoreConstraint || error instanceof RevisionMoved || error instanceof AgentDeleting
|
|
582
|
+
|| error instanceof AgentPurged || error instanceof AgentArchived || error instanceof ExternalBodyConflict || error instanceof ApiError))
|
|
583
|
+
await undo(true);
|
|
584
|
+
throw error;
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
async function withUploads(deps, runId, agentId, launch, write) {
|
|
486
588
|
const ids = launch.files ?? [];
|
|
487
589
|
if (!ids.length || !deps.files)
|
|
488
590
|
return await write(launch);
|
|
@@ -546,7 +648,7 @@ export async function startInline(store, deps, inline, body, options = {}) {
|
|
|
546
648
|
}
|
|
547
649
|
/** The agent id each reference's first starts in progress share, and a failed first start's kept (startInline). */
|
|
548
650
|
const tentativeAgents = new Map();
|
|
549
|
-
async function startInlineOnce(store, deps, inline, body, { origin, sealed }, newAgentId) {
|
|
651
|
+
async function startInlineOnce(store, deps, inline, body, { origin, sealed, keys }, newAgentId) {
|
|
550
652
|
const { external, revision, stored: storedRevision } = inline;
|
|
551
653
|
const ref = externalKey(external);
|
|
552
654
|
// A version's body never changes here: a different one is refused before anything else is read or written.
|
|
@@ -570,12 +672,12 @@ async function startInlineOnce(store, deps, inline, body, { origin, sealed }, ne
|
|
|
570
672
|
};
|
|
571
673
|
// A store revision is the revision the run path reads as a pi Revision (its body is the revision body), as pinnedOf hands
|
|
572
674
|
// one across.
|
|
573
|
-
const { launch } = await prepareLaunch(deps, entry, body, { revision: (storedRevision ?? revision) });
|
|
675
|
+
const { launch } = await prepareLaunch(deps, entry, body, { revision: (storedRevision ?? revision), ...(keys ? { keys } : {}) });
|
|
574
676
|
keyedOrRefused(deps, launch, (storedRevision ?? revision).kind, sealed);
|
|
575
677
|
const runId = (deps.newRunId ?? uuidv7)();
|
|
576
678
|
const labels = labelsOf(body.labels);
|
|
577
679
|
try {
|
|
578
|
-
return await withHeldFiles(deps, runId, entry.agent.id, launch, (launch) => store.runs.createInline({
|
|
680
|
+
return await withHeldFiles(store, deps, runId, entry.agent.id, revision, launch, (launch) => store.runs.createInline({
|
|
579
681
|
agent: { id: entry.agent.id, name: inline.name, description: inline.description, ref },
|
|
580
682
|
revision: { id: revision.id, version: external.version, kind: revision.kind, body: revision.body, skills: revision.skills, ...(revision.note !== undefined ? { note: revision.note } : {}), ...(revision.mcpPin !== undefined ? { mcpPin: revision.mcpPin } : {}), ...(revision.monidPin !== undefined ? { monidPin: revision.monidPin } : {}) },
|
|
581
683
|
run: { id: runId, ...(origin ? { origin } : {}), ...(labels ? { labels } : {}) },
|
|
@@ -600,7 +702,7 @@ async function startInlineOnce(store, deps, inline, body, { origin, sealed }, ne
|
|
|
600
702
|
* caller INSERTs the run with it (startRun; an inline agent's run, which writes its agent and revision in the same
|
|
601
703
|
* transaction). `revision`: the revision the run starts on, given (an inline agent's, not yet stored), in place of the
|
|
602
704
|
* one the body pins or the agent's current (deps.pinnedOf). */
|
|
603
|
-
export async function prepareLaunch(deps, entry, body, { trigger, capped = false, from, title: given, revision: onRevision } = {}) {
|
|
705
|
+
export async function prepareLaunch(deps, entry, body, { trigger, capped = false, from, title: given, revision: onRevision, keys } = {}) {
|
|
604
706
|
const pinnedOf = onRevision ? async () => ({ revision: onRevision, version: entry.version }) : () => deps.pinnedOf(entry, body);
|
|
605
707
|
const issues = deps.runBodyIssues(body);
|
|
606
708
|
if (issues.length) {
|
|
@@ -630,6 +732,11 @@ export async function prepareLaunch(deps, entry, body, { trigger, capped = false
|
|
|
630
732
|
const wrong = await deps.inputIssuesOf(revision, input);
|
|
631
733
|
if (wrong.length)
|
|
632
734
|
throw deps.told(invalid(await deps.explainRun(wrong, body, revision)));
|
|
735
|
+
// The tool keys the run carries (run-keys.ts), by name: each one a tool of its revision reads, or its template declared.
|
|
736
|
+
const carried = keys ?? [];
|
|
737
|
+
const undeclared = carried.length ? undeclaredKeys(carried, await declaredKeys(revision)) : [];
|
|
738
|
+
if (undeclared.length)
|
|
739
|
+
throw invalid(undeclared);
|
|
633
740
|
// The run's own cap, else the agent's default: the caller chose its own.
|
|
634
741
|
const cap = typeof body.max_cost_usd === "number" ? body.max_cost_usd : rbody.maxCostUsd;
|
|
635
742
|
if (capped && cap === undefined)
|
|
@@ -642,7 +749,7 @@ export async function prepareLaunch(deps, entry, body, { trigger, capped = false
|
|
|
642
749
|
const place = resolvePlace(rbody.place, deps.fallbackPlace(revision.kind, revision.kind === "agentic" ? (rbody.tools ?? []) : []));
|
|
643
750
|
// Checked as pinned: an earlier revision with no pin is pinned now, once (StartDeps.pinFirst); one that could not be, as
|
|
644
751
|
// its server could not be listed, is refused with the rest (runnable).
|
|
645
|
-
await deps.runnable(deps.pinFirst ? await deps.pinFirst(revision) : revision, place, { capped: cap !== undefined });
|
|
752
|
+
await deps.runnable(deps.pinFirst ? await deps.pinFirst(revision) : revision, place, { capped: cap !== undefined, carried });
|
|
646
753
|
// A held computer (computer-held.ts): only one that speaks the protocol, its kind as the claim reads it (the
|
|
647
754
|
// revision's computer, else its place's).
|
|
648
755
|
const hold = holdOf(body, (settingOfDefinition(rbody)?.computer ?? computerOfPlace(place)).kind);
|
|
@@ -657,9 +764,10 @@ export async function prepareLaunch(deps, entry, body, { trigger, capped = false
|
|
|
657
764
|
// A starter's title (a trigger's "<Source> <name>") is shown words too: cut as the input is, then as every title is below.
|
|
658
765
|
const title = given !== undefined ? String(redactedOutput(given, deps.serverSecrets())) : revision.kind === "workflow" ? deps.workflowTitle(entry.agent.name || entry.agent.id, isObject(shown) ? shown : {}) : typeof input.content === "string" ? input.content : (Object.values(input).find((v) => typeof v === "string") ?? JSON.stringify(input));
|
|
659
766
|
// Its tools' providers, resolved before the run exists (tool-plane.ts) and kept in its launch body, so a claim reads them
|
|
660
|
-
// back, never the settings of that moment. (The old start wrote them to serve.json; now they ride the launch row.)
|
|
767
|
+
// back, never the settings of that moment. (The old start wrote them to serve.json; now they ride the launch row.) A key
|
|
768
|
+
// the run carries resolves a tool as one the host holds would.
|
|
661
769
|
const tooling = await toolingOf(revision);
|
|
662
|
-
const plane = tooling ? planeFor(deps.planeEnv(), tooling, deps.toolSettings(), { capped: cap !== undefined, run: true }) : {};
|
|
770
|
+
const plane = tooling ? planeFor(withCarried(deps.planeEnv(), carried), tooling, deps.toolSettings(), { capped: cap !== undefined, run: true }) : {};
|
|
663
771
|
// The run's model, resolved once, at start (the runner reads launch.model only).
|
|
664
772
|
const model = await deps.modelOf(entry, revision);
|
|
665
773
|
// The run's Archil disk, chosen now and kept in its launch (run-launch.ts archilDisk): the one the body names (a disk per
|
package/dist/sdk/runs.d.ts
CHANGED
|
@@ -64,6 +64,9 @@ export type SdkInbox = {
|
|
|
64
64
|
}[];
|
|
65
65
|
/** Exact promoted executable workflows delivered by the start receipt. */
|
|
66
66
|
learning_workflows?: LearnedWorkflow[];
|
|
67
|
+
/** The learning commit each of learning_workflows was read at, by name (its seed's, or its champion record's): where
|
|
68
|
+
* the receipt asks whether a purged run wrote it (receipt). */
|
|
69
|
+
learning_commits?: Record<string, string>;
|
|
67
70
|
/** A compiled draft reserved for a shadow check, never supplied to the native agent. */
|
|
68
71
|
learning_check?: SdkWorkflowCheck;
|
|
69
72
|
/** Server cleaning changed evidence: two different secret-bearing answers must never agree by their placeholder. */
|
|
@@ -76,10 +79,12 @@ export type SdkInbox = {
|
|
|
76
79
|
};
|
|
77
80
|
/** The settings key an SDK run's record is kept under (the run's delete with its agent's: agent-delete.ts). */
|
|
78
81
|
export declare const sdkRunKey: (id: string) => string;
|
|
82
|
+
export declare const SDK_MAX_OPEN_MS = 86400000;
|
|
79
83
|
export declare const sdkOf: (body: unknown) => SdkBinding | undefined;
|
|
80
84
|
export declare function sdkInbox(store: Pick<Store, "settings">, runId: string): Promise<SdkInbox>;
|
|
81
85
|
/** Completion and closure compete on the same inbox. A stale runner cannot close it, and a completion that won
|
|
82
|
-
* remains available to the next claim even if this one cannot read or journal it. No external SDK call is replayed.
|
|
86
|
+
* remains available to the next claim even if this one cannot read or journal it. No external SDK call is replayed.
|
|
87
|
+
* An expiry is checked against the row it replaces: an events batch that moved the deadline keeps the inbox open. */
|
|
83
88
|
export declare function closeSdkInbox(store: Pick<Store, "settings">, claim: Claim, reason: NonNullable<SdkInbox["closed"]>): Promise<SdkInbox>;
|
|
84
89
|
/** The key a server signs its SDK runs' credentials with: derived from its seal key (seal-key.ts), which stays the
|
|
85
90
|
* store's for its life, so adding, reordering or removing an API token (api-token.ts) never changes a run's credential. */
|
|
@@ -126,6 +131,11 @@ export declare class SdkRuns {
|
|
|
126
131
|
workflows: LearnedWorkflow[];
|
|
127
132
|
};
|
|
128
133
|
}>;
|
|
134
|
+
/** The purged run (purged-workflow.ts) that wrote a workflow of `pinned`, each read at the learning commit a start took
|
|
135
|
+
* its text from. One read-only exec per commit. */
|
|
136
|
+
private purgedPinned;
|
|
137
|
+
/** The workflows a start delivers and the learning commit each was read at (`commits`: the seed's, or its champion
|
|
138
|
+
* record's), and the drafts a check may take. */
|
|
129
139
|
private selectedWorkflows;
|
|
130
140
|
private modify;
|
|
131
141
|
private writable;
|