@parcha/agentrun-serve 0.1.0-beta.56 → 0.1.0-beta.57
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 +229 -0
- package/README.md +201 -52
- package/dist/acp-package.d.ts +2 -0
- package/dist/adapters.d.ts +15 -3
- package/dist/adapters.js +17 -6
- package/dist/agent-package.d.ts +3 -3
- package/dist/agent-package.js +17 -8
- package/dist/api-keys.d.ts +76 -0
- package/dist/api-keys.js +217 -0
- package/dist/api-only.d.ts +17 -5
- package/dist/api-only.js +34 -8
- package/dist/browser-hold.d.ts +23 -0
- package/dist/browser-hold.js +48 -0
- package/dist/browser-person.d.ts +3 -0
- package/dist/browser-person.js +4 -1
- package/dist/chatgpt-plan.d.ts +18 -8
- package/dist/chatgpt-plan.js +91 -34
- package/dist/claude-login.d.ts +74 -16
- package/dist/claude-login.js +215 -56
- package/dist/claude-sign-in.d.ts +17 -6
- package/dist/claude-sign-in.js +42 -39
- package/dist/cli.js +63 -6
- package/dist/composio-made.d.ts +4 -0
- package/dist/composio-made.js +4 -0
- package/dist/composio-preset.d.ts +43 -2
- package/dist/composio-preset.js +92 -4
- package/dist/computer-held-routes.d.ts +5 -4
- package/dist/computer-held-routes.js +29 -8
- package/dist/computer-held.d.ts +6 -1
- package/dist/computer-held.js +14 -0
- package/dist/computer-record.js +4 -2
- package/dist/computer-viewer.js +4 -1
- package/dist/console/assets/{backend-Boh7tC4i.js → backend-DVhHzJX2.js} +19 -19
- package/dist/console/assets/index-Bwn1oTem.css +1 -0
- package/dist/console/assets/index-okP-y8PK.js +747 -0
- package/dist/console/index.html +2 -2
- package/dist/decisions.d.ts +1 -1
- package/dist/decisions.js +1 -1
- package/dist/docker-host-addresses.d.ts +22 -11
- package/dist/docker-host-addresses.js +38 -26
- package/dist/env-switch.d.ts +10 -0
- package/dist/env-switch.js +33 -2
- package/dist/errors.d.ts +1 -0
- package/dist/errors.js +2 -0
- package/dist/fal-price.d.ts +58 -20
- package/dist/fal-price.js +341 -82
- package/dist/handed-values.d.ts +43 -1
- package/dist/handed-values.js +119 -2
- package/dist/harness-archive.d.ts +13 -10
- package/dist/harness-archive.js +60 -34
- package/dist/harness-check.d.ts +3 -1
- package/dist/harness-check.js +25 -46
- package/dist/harness-keys.d.ts +73 -27
- package/dist/harness-keys.js +194 -61
- package/dist/harness-recipe-entry.d.ts +8 -7
- package/dist/harness-recipe-entry.js +21 -32
- package/dist/harness-recipe.d.ts +38 -25
- package/dist/harness-recipe.js +49 -36
- package/dist/harness-sign-in.js +12 -23
- package/dist/harness-table.d.ts +10 -3
- package/dist/harness-table.js +26 -21
- package/dist/harness.d.ts +1 -0
- package/dist/harness.js +17 -5
- package/dist/hosted-search.d.ts +1 -1
- package/dist/hosted-search.js +1 -2
- package/dist/import-worker.d.ts +4 -2
- package/dist/import-worker.js +9 -2
- package/dist/in-flight.d.ts +26 -0
- package/dist/in-flight.js +52 -0
- package/dist/key-refusal.d.ts +9 -4
- package/dist/key-refusal.js +107 -25
- package/dist/learn/secrets.d.ts +13 -3
- package/dist/learn/secrets.js +118 -17
- package/dist/learning-cost.d.ts +6 -3
- package/dist/learning-cost.js +4 -2
- package/dist/link-check.js +1 -1
- package/dist/llms.txt +1 -1
- package/dist/marketplace.d.ts +77 -0
- package/dist/marketplace.js +224 -0
- package/dist/mcp-api-only-origins.d.ts +30 -0
- package/dist/mcp-api-only-origins.js +57 -0
- package/dist/mcp-gateway.d.ts +7 -5
- package/dist/mcp-gateway.js +9 -12
- package/dist/mcp-secret-writes.js +5 -3
- package/dist/mcp-servers-store.d.ts +28 -6
- package/dist/mcp-servers-store.js +53 -4
- package/dist/media-duration.d.ts +3 -0
- package/dist/media-duration.js +90 -9
- package/dist/model-form.d.ts +5 -4
- package/dist/model-form.js +11 -7
- package/dist/model.d.ts +5 -2
- package/dist/model.js +9 -5
- package/dist/ollama-provider.d.ts +7 -1
- package/dist/ollama-provider.js +14 -2
- package/dist/openapi.js +178 -27
- package/dist/otel/genai.d.ts +65 -0
- package/dist/otel/genai.js +116 -0
- package/dist/otel/tracer.d.ts +55 -0
- package/dist/otel/tracer.js +308 -0
- package/dist/page.d.ts +2 -0
- package/dist/page.js +3 -1
- package/dist/paid-calls.d.ts +1 -32
- package/dist/paid-calls.js +4 -39
- package/dist/provider.d.ts +9 -0
- package/dist/provider.js +50 -3
- package/dist/redact/match.d.ts +30 -3
- package/dist/redact/match.js +422 -41
- package/dist/refusal-words.d.ts +11 -0
- package/dist/refusal-words.js +11 -0
- package/dist/run-census.d.ts +67 -0
- package/dist/run-census.js +240 -0
- package/dist/run-computer.d.ts +6 -3
- package/dist/run-computer.js +4 -1
- package/dist/run-cut.d.ts +15 -6
- package/dist/run-cut.js +30 -9
- package/dist/run-files.d.ts +3 -0
- package/dist/run-files.js +3 -0
- package/dist/run-launch.d.ts +12 -1
- package/dist/run-launch.js +9 -10
- package/dist/run-learning-served.d.ts +2 -0
- package/dist/run-model-key.d.ts +8 -0
- package/dist/run-model-key.js +31 -1
- package/dist/run-reads-over-store.d.ts +24 -6
- package/dist/run-reads-over-store.js +67 -23
- package/dist/run-recordings.d.ts +5 -1
- package/dist/run-recordings.js +39 -14
- package/dist/run-timeline-served.d.ts +2 -0
- package/dist/run-timeline-served.js +2 -2
- package/dist/run-usage.d.ts +1 -0
- package/dist/runnable.d.ts +10 -1
- package/dist/runnable.js +20 -8
- package/dist/runner/adapter-loop.d.ts +11 -0
- package/dist/runner/adapter-loop.js +55 -10
- package/dist/runner/adapter-run-spec.d.ts +45 -8
- package/dist/runner/adapter-run-spec.js +150 -28
- package/dist/runner/adapters/pi.js +25 -3
- package/dist/runner/beside.js +4 -3
- package/dist/runner/big-writes.js +1 -10
- package/dist/runner/claim-secrets.d.ts +18 -3
- package/dist/runner/claim-secrets.js +35 -6
- package/dist/runner/cli-run-spec.d.ts +6 -0
- package/dist/runner/cli-run-spec.js +82 -35
- package/dist/runner/computer-journal.d.ts +9 -1
- package/dist/runner/computer-journal.js +26 -0
- package/dist/runner/conformance/harness.js +1 -1
- package/dist/runner/feedback-round.js +3 -0
- package/dist/runner/harness-loops.d.ts +6 -5
- package/dist/runner/harness-loops.js +7 -7
- package/dist/runner/held.d.ts +11 -5
- package/dist/runner/journal-kinds.d.ts +5 -0
- package/dist/runner/journal-kinds.js +5 -0
- package/dist/runner/main.js +7 -2
- package/dist/runner/mcp-claim.js +30 -3
- package/dist/runner/mcp-run.d.ts +12 -0
- package/dist/runner/mcp-run.js +12 -5
- package/dist/runner/model-route.d.ts +17 -0
- package/dist/runner/model-route.js +120 -2
- package/dist/runner/run-child-host.d.ts +3 -0
- package/dist/runner/run-child-host.js +69 -28
- package/dist/runner/run-child.js +5 -2
- package/dist/runner/runner.d.ts +14 -3
- package/dist/runner/runner.js +129 -33
- package/dist/runner/store-port.d.ts +1 -1
- package/dist/runner/store-secrets.d.ts +6 -0
- package/dist/runner/store-secrets.js +49 -7
- package/dist/runner/subagent.js +4 -40
- package/dist/runner/workflow-first.d.ts +11 -4
- package/dist/runner/workflow-first.js +14 -8
- package/dist/runner/workflow-spec.js +3 -2
- package/dist/runs-over-store.d.ts +15 -6
- package/dist/runs-over-store.js +33 -21
- package/dist/scrub-command.d.ts +73 -0
- package/dist/scrub-command.js +307 -0
- package/dist/secret-cut.d.ts +73 -0
- package/dist/secret-cut.js +291 -4
- package/dist/secret-rules.d.ts +143 -0
- package/dist/secret-rules.js +2564 -0
- package/dist/secrets.d.ts +7 -0
- package/dist/secrets.js +20 -0
- package/dist/server-keys.d.ts +20 -0
- package/dist/server-keys.js +25 -6
- package/dist/server.d.ts +52 -11
- package/dist/server.js +345 -118
- package/dist/skills/agentrun-serve/SKILL.md +4 -0
- package/dist/store/index.d.ts +1 -1
- package/dist/store/index.js +1 -1
- package/dist/store/journal/storage.js +1 -1
- package/dist/store/postgres/migrations/0027_run_launch_census.sql +31 -0
- package/dist/store/schema.d.ts +6 -0
- package/dist/store/schema.js +11 -1
- package/dist/store/seal.d.ts +6 -1
- package/dist/store/seal.js +5 -3
- package/dist/store/sqlite/run-launch.d.ts +9 -1
- package/dist/store/sqlite/run-launch.js +24 -13
- package/dist/store/sqlite/run-patch.d.ts +1 -1
- package/dist/store/sqlite/run-patch.js +13 -4
- package/dist/store/sqlite/store.js +34 -4
- package/dist/store/store.d.ts +43 -2
- package/dist/store/store.js +20 -0
- package/dist/store-reads/learning.d.ts +6 -3
- package/dist/store-reads/learning.js +22 -7
- package/dist/store-view.d.ts +3 -0
- package/dist/store-view.js +3 -3
- package/dist/suggestions.js +3 -2
- package/dist/template-eval.d.ts +20 -9
- package/dist/template-eval.js +115 -33
- package/dist/template-import.d.ts +10 -0
- package/dist/template-import.js +16 -7
- package/dist/templates.d.ts +10 -2
- package/dist/templates.js +28 -8
- package/dist/timeline/labels.d.ts +6 -4
- package/dist/timeline/labels.js +18 -6
- package/dist/timeline/timeline.d.ts +5 -0
- package/dist/timeline/timeline.js +14 -8
- package/dist/timeline/util.js +1 -1
- package/dist/timeline/web-calls.d.ts +26 -9
- package/dist/timeline/web-calls.js +124 -37
- package/dist/tool-gate.d.ts +42 -3
- package/dist/tool-gate.js +66 -5
- package/dist/tool-keys-store.d.ts +2 -4
- package/dist/tool-keys-store.js +5 -21
- package/dist/tool-keys.d.ts +2 -2
- package/dist/tool-keys.js +2 -2
- package/dist/tool-list.js +1 -1
- package/dist/tool-plane.d.ts +2 -2
- package/dist/tool-plane.js +35 -33
- package/dist/tools.js +13 -7
- package/dist/trigger-targets.d.ts +4 -0
- package/dist/trigger-targets.js +9 -2
- package/dist/triggers.d.ts +67 -4
- package/dist/triggers.js +171 -22
- package/dist/until.d.ts +3 -0
- package/dist/until.js +11 -0
- package/dist/web-fake.d.ts +1 -3
- package/dist/web-fake.js +7 -18
- package/dist/web-fetch.d.ts +6 -72
- package/dist/web-fetch.js +11 -265
- package/dist/web-run.d.ts +31 -0
- package/dist/web-run.js +90 -0
- package/dist/web-save.d.ts +6 -4
- package/dist/web-save.js +9 -12
- package/dist/web-search.d.ts +9 -127
- package/dist/web-search.js +23 -259
- package/dist/wires.d.ts +13 -0
- package/dist/wires.js +11 -0
- package/dist/workflow-run.d.ts +5 -4
- package/dist/workflow-run.js +5 -4
- package/dist/workspace/computer-deps.d.ts +2 -1
- package/dist/workspace/computer-deps.js +9 -2
- package/dist/workspace/computer-for-claim.d.ts +12 -1
- package/dist/workspace/computer-for-claim.js +77 -8
- package/dist/workspace/computer-kept.d.ts +3 -0
- package/dist/workspace/computer-kept.js +11 -2
- package/dist/workspace/index.d.ts +1 -1
- package/dist/workspace/index.js +1 -1
- package/dist/workspace/kind-skills.d.ts +4 -0
- package/dist/workspace/kind-skills.js +9 -0
- package/dist/workspace/synced-folder.js +3 -4
- package/dist/wrapped.d.ts +13 -5
- package/dist/wrapped.js +52 -26
- package/package.json +17 -11
- package/skills/agentrun-serve/SKILL.md +4 -0
- package/templates/README.md +30 -8
- package/dist/console/assets/index-CQ3cJRzI.js +0 -746
- package/dist/console/assets/index-DKkaS3a0.css +0 -1
- package/dist/exa-keyless.d.ts +0 -34
- package/dist/exa-keyless.js +0 -118
- package/dist/firecrawl-keyless.d.ts +0 -41
- package/dist/firecrawl-keyless.js +0 -152
- package/dist/keyless-mcp.d.ts +0 -36
- package/dist/keyless-mcp.js +0 -127
- package/dist/text-urls.d.ts +0 -38
- package/dist/text-urls.js +0 -170
- package/dist/web-fetch-direct.d.ts +0 -119
- package/dist/web-fetch-direct.js +0 -190
|
@@ -20,6 +20,10 @@ forbidden` with `error.details.console_url`, the console's form with the rest fi
|
|
|
20
20
|
Open that link in the person's browser for them and tell them to paste the secret there and save. Never ask for a
|
|
21
21
|
secret in the chat.
|
|
22
22
|
|
|
23
|
+
An API key for an app (`AGENTRUN_API_KEY`) is made the same way: the owner makes it in the console at
|
|
24
|
+
`<console>/#/settings/api-keys`, where it is shown once. `POST /v2/settings/api-keys` with the token is `403
|
|
25
|
+
forbidden`. A key the owner hands you is sent as the token is, as `Authorization: Bearer <key>`.
|
|
26
|
+
|
|
23
27
|
## Choose the onboarding path
|
|
24
28
|
|
|
25
29
|
For general setup, establish whether the user wants to **start a new agent** or **bring an existing agent**.
|
package/dist/store/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ActiveRuns, AgentArchived, AgentDeleting, AgentPurged, AnswerTaken, CommandTaken, endedReason, ExternalBodyConflict, FINAL_STATES, Fenced, KEPT_PREFIX, MCP_REFRESH_CALL_MS, MCP_REFRESH_LEASE_MS, RevisionMoved, RunFinal, RunPurged, RunnerBelowFloor, RUNNER_STALE_MS, RunsMadeFromLeft, SchemaVersionUnknown, SignInHandedTo, SignInMissing, StoreAwaitsServer, StoreBusy, StoreClosed, StoreConstraint, StoreDeadline, StoreFromEarlierVersion, StoreLaunchMissing, StoreOwned, StoreWorkerLost, STORE_WRITE_DEADLINE_MS, stoppedByPerson, TriggerFull, TriggersLeft, UPLOAD_PREFIX } from "./store.js";
|
|
1
|
+
export { ActiveRuns, AgentArchived, AgentDeleting, AgentPurged, AnswerTaken, CENSUS_PENDING, CENSUS_UNSCANNED, CommandTaken, endedReason, ExternalBodyConflict, FINAL_STATES, FiringMoved, Fenced, KEPT_PREFIX, MCP_REFRESH_CALL_MS, MCP_REFRESH_LEASE_MS, RevisionMoved, RunFinal, RunPurged, RunnerBelowFloor, RUNNER_STALE_MS, RunsMadeFromLeft, SchemaVersionUnknown, SignInHandedTo, SignInMissing, StoreAwaitsServer, StoreBusy, StoreClosed, StoreConstraint, StoreDeadline, StoreFromEarlierVersion, StoreLaunchMissing, StoreOwned, StoreWorkerLost, STORE_WRITE_DEADLINE_MS, stoppedByPerson, TriggerFull, TriggersLeft, UPLOAD_PREFIX } from "./store.js";
|
|
2
2
|
export type { ConstraintRule, SettingsGuard, McpGuard, AgentRow, Agents, AlsoRow, AttemptCause, ChannelPost, Claim, Command, ComputerIntervalRow, ComputerIntervals, ComputerLedger, ComputerLedgerRow, Firing, FiringChange, FiringRow, FiringStatus, FiringStreak, Journal, Live, LiveRow, Mcp, McpCredentialMark, McpRemoved, McpOauth, McpOauthPendingRow, McpPinRow, McpTokensMark, McpOwnersMark, McpServerRow, McpServerStamp, McpServerWrite, MintedTokenRow, MintedTokens, NewFiring, NewPairedComputer, NewRevision, NewTrigger, PairedComputerRow, PairedComputers, ReleasedState, RevisionRow, RunAttemptRow, RunAttempts, RunnerRow, Runners, RunPatch, RunRow, Runs, RunState, SealedKeyRow, SealedKeys, SealedPlane, SealedSecretRow, SealedSecrets, SettingRow, Settings, Staged, StagedTake, Store, StoreRole, StoreSchemaState, TemplatePackage, Templates, TriggerDef, TriggerPatch, TriggerRow, Triggers, TriggerScope, TriggerSettingRow, TriggerSettings, Channels, ChannelAttemptRow, ChannelPostRow, ChannelToldRow, ImportedFrom, ImportSource, ImportRunInput, JournalReads, RunLabels, RunOrigin, RunOutcome, RunLaunchInput, RunLaunchRow, LaunchSealed, LaunchSealedWrite, Learning, LearningProposal, LiveViewerRow, LiveViewers, PurgeKept, SignIns, SignInRow, SignInTombstoneRow, UpdatedRun, ViewerKind, } from "./store.js";
|
|
3
3
|
export { aadOf, type McpCredential, type OpenedMcpCredential, openMcpCredential, openRunLaunch, openRunMcpAuth, type RunLaunchSecrets, type ComposioBinding, type RunMcpAuth, type RunMcpEntry, type RunModelKey, sealColumn, type SealedAt, sealedAt, sealMcpCredential, sealRunLaunch, sealRunMcpAuth, unsealColumn } from "./seal.js";
|
|
4
4
|
export { AgentBodyInvalid, type AgenticBody, bodyOf, canonical, isObject, isSkillPath, type PromptVariant, type ModelTiers, type MonidPinBody, type RevisionBodyInput, type RevisionComputer, type RevisionPlace, sha256, type ToolSettings, type WorkflowBody, } from "./agent-body.js";
|
package/dist/store/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// The one store (design 2.1), for the cutover: nothing on main imports it until then.
|
|
2
|
-
export { ActiveRuns, AgentArchived, AgentDeleting, AgentPurged, AnswerTaken, CommandTaken, endedReason, ExternalBodyConflict, FINAL_STATES, Fenced, KEPT_PREFIX, MCP_REFRESH_CALL_MS, MCP_REFRESH_LEASE_MS, RevisionMoved, RunFinal, RunPurged, RunnerBelowFloor, RUNNER_STALE_MS, RunsMadeFromLeft, SchemaVersionUnknown, SignInHandedTo, SignInMissing, StoreAwaitsServer, StoreBusy, StoreClosed, StoreConstraint, StoreDeadline, StoreFromEarlierVersion, StoreLaunchMissing, StoreOwned, StoreWorkerLost, STORE_WRITE_DEADLINE_MS, stoppedByPerson, TriggerFull, TriggersLeft, UPLOAD_PREFIX } from "./store.js";
|
|
2
|
+
export { ActiveRuns, AgentArchived, AgentDeleting, AgentPurged, AnswerTaken, CENSUS_PENDING, CENSUS_UNSCANNED, CommandTaken, endedReason, ExternalBodyConflict, FINAL_STATES, FiringMoved, Fenced, KEPT_PREFIX, MCP_REFRESH_CALL_MS, MCP_REFRESH_LEASE_MS, RevisionMoved, RunFinal, RunPurged, RunnerBelowFloor, RUNNER_STALE_MS, RunsMadeFromLeft, SchemaVersionUnknown, SignInHandedTo, SignInMissing, StoreAwaitsServer, StoreBusy, StoreClosed, StoreConstraint, StoreDeadline, StoreFromEarlierVersion, StoreLaunchMissing, StoreOwned, StoreWorkerLost, STORE_WRITE_DEADLINE_MS, stoppedByPerson, TriggerFull, TriggersLeft, UPLOAD_PREFIX } from "./store.js";
|
|
3
3
|
export { aadOf, openMcpCredential, openRunLaunch, openRunMcpAuth, sealColumn, sealedAt, sealMcpCredential, sealRunLaunch, sealRunMcpAuth, unsealColumn } from "./seal.js";
|
|
4
4
|
export { AgentBodyInvalid, bodyOf, canonical, isObject, isSkillPath, sha256, } from "./agent-body.js";
|
|
5
5
|
export { checkPrompts, OTHER_OPTION, PromptsInvalid } from "./prompts.js";
|
|
@@ -325,7 +325,7 @@ export class RunStorage {
|
|
|
325
325
|
// A run patch that made the run final: its other untaken rows are refused in this commit, after its own takes.
|
|
326
326
|
// A person's message that came while it was ending opens a completed run again instead (refuseLeftovers).
|
|
327
327
|
if (patching)
|
|
328
|
-
await refuseLeftovers(tx, this.#runId, staged?.run?.state, now, this.#dialect, staged?.run?.keepsEnd === true);
|
|
328
|
+
await refuseLeftovers(tx, this.#runId, staged?.run?.state, now, this.#dialect, staged?.run?.keepsEnd === true, staged?.run?.census);
|
|
329
329
|
}
|
|
330
330
|
});
|
|
331
331
|
this.#nextId = Math.max(this.#nextId, candidateNextId);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
-- Version 27: a run's census (run_launch.census, as store/schema.ts keeps it on SQLite): where in each of the run's files
|
|
2
|
+
-- the secrets its caller handed it sat when its end erased them (run-census.ts), never the secrets; "pending" from when
|
|
3
|
+
-- a launch first holds sealed secrets until an end counts them (each launch holding them now is marked so here);
|
|
4
|
+
-- "unscanned" when an end erased them with no census made under them; null when a launch never held any (none handed,
|
|
5
|
+
-- or a run ended before this). Applied once, after 0026, inside the transaction migrate.ts opens. Never edit this file once
|
|
6
|
+
-- applied: a change is a new file.
|
|
7
|
+
ALTER TABLE run_launch ADD COLUMN IF NOT EXISTS census TEXT COLLATE "C" CHECK (census IS NULL OR census::json IS NOT NULL);
|
|
8
|
+
UPDATE run_launch SET census = '"pending"' WHERE sealed IS NOT NULL AND census IS NULL;
|
|
9
|
+
|
|
10
|
+
-- The same census rule for a write that never names it (store/sqlite/run-launch.ts censusOnSeal), held by the table: a
|
|
11
|
+
-- server of an earlier build still serving while this applies (a rolling deploy) writes sealed bytes and no census. Its
|
|
12
|
+
-- insert of a launch holding sealed bytes takes "pending", so an end by an earlier runner (which erases them and writes no
|
|
13
|
+
-- census) leaves "pending", read as uncounted, never as a launch handed nothing. Its seal over a "pending" whose sealed
|
|
14
|
+
-- bytes an end erased turns it to "unscanned", as this build's does: that end counted nothing, so the files it left stay
|
|
15
|
+
-- withheld, not cut of the new values alone. A write that names a census (this build's) keeps it.
|
|
16
|
+
CREATE OR REPLACE FUNCTION run_launch_census_on_seal() RETURNS trigger LANGUAGE plpgsql AS $$
|
|
17
|
+
BEGIN
|
|
18
|
+
IF NEW.sealed IS NOT NULL THEN
|
|
19
|
+
IF TG_OP = 'UPDATE' AND OLD.sealed IS NULL AND OLD.census = '"pending"' AND NEW.census IS NOT DISTINCT FROM OLD.census THEN
|
|
20
|
+
NEW.census := '"unscanned"';
|
|
21
|
+
ELSE
|
|
22
|
+
NEW.census := COALESCE(NEW.census, '"pending"');
|
|
23
|
+
END IF;
|
|
24
|
+
END IF;
|
|
25
|
+
RETURN NEW;
|
|
26
|
+
END
|
|
27
|
+
$$;
|
|
28
|
+
DROP TRIGGER IF EXISTS run_launch_census_on_seal ON run_launch;
|
|
29
|
+
CREATE TRIGGER run_launch_census_on_seal BEFORE INSERT OR UPDATE OF sealed ON run_launch
|
|
30
|
+
FOR EACH ROW EXECUTE FUNCTION run_launch_census_on_seal();
|
|
31
|
+
UPDATE store_meta SET schema_version = 27 WHERE singleton = 1;
|
package/dist/store/schema.d.ts
CHANGED
|
@@ -28,6 +28,12 @@ export declare function diskUpgrade(runColumns: ReadonlySet<string>): readonly s
|
|
|
28
28
|
* for one a person made. In STORE_DDL, and added at a server open to a store an earlier build of this version made, as
|
|
29
29
|
* RUNS_LABELS is (a trigger made before reads as no package's). */
|
|
30
30
|
export declare const TRIGGERS_TEMPLATE_ID = "ALTER TABLE triggers ADD COLUMN template_id TEXT";
|
|
31
|
+
/** A run's census (RunLaunchRow.census, run-census.ts): in STORE_DDL, and added at a server open to a store an earlier
|
|
32
|
+
* build of this version made, as RUNS_LABELS is (a run ended before reads as never handed a secret). */
|
|
33
|
+
export declare const RUN_LAUNCH_CENSUS: string;
|
|
34
|
+
/** Every launch holding sealed bytes when the census was added (RUN_LAUNCH_CENSUS) marked CENSUS_PENDING (store.ts): its
|
|
35
|
+
* end counts them, or its files read as uncounted. */
|
|
36
|
+
export declare const RUN_LAUNCH_CENSUS_PENDING = "UPDATE run_launch SET census = '\"pending\"' WHERE sealed IS NOT NULL AND census IS NULL";
|
|
31
37
|
/** A template package imported from GitHub (POST /v2/templates/import), by its id (`github:<owner>/<repo>[/<path>]`): its
|
|
32
38
|
* source as given (ref and all), the full commit SHA read, the GitHub account that publishes it, and its files as read
|
|
33
39
|
* (`files`, a JSON object of path to base64). A re-import of the id replaces the row. The server checks the files again
|
package/dist/store/schema.js
CHANGED
|
@@ -81,6 +81,12 @@ export function diskUpgrade(runColumns) {
|
|
|
81
81
|
* for one a person made. In STORE_DDL, and added at a server open to a store an earlier build of this version made, as
|
|
82
82
|
* RUNS_LABELS is (a trigger made before reads as no package's). */
|
|
83
83
|
export const TRIGGERS_TEMPLATE_ID = "ALTER TABLE triggers ADD COLUMN template_id TEXT";
|
|
84
|
+
/** A run's census (RunLaunchRow.census, run-census.ts): in STORE_DDL, and added at a server open to a store an earlier
|
|
85
|
+
* build of this version made, as RUNS_LABELS is (a run ended before reads as never handed a secret). */
|
|
86
|
+
export const RUN_LAUNCH_CENSUS = `ALTER TABLE run_launch ADD COLUMN ${json("census", true)}`;
|
|
87
|
+
/** Every launch holding sealed bytes when the census was added (RUN_LAUNCH_CENSUS) marked CENSUS_PENDING (store.ts): its
|
|
88
|
+
* end counts them, or its files read as uncounted. */
|
|
89
|
+
export const RUN_LAUNCH_CENSUS_PENDING = `UPDATE run_launch SET census = '"pending"' WHERE sealed IS NOT NULL AND census IS NULL`;
|
|
84
90
|
/** A template package imported from GitHub (POST /v2/templates/import), by its id (`github:<owner>/<repo>[/<path>]`): its
|
|
85
91
|
* source as given (ref and all), the full commit SHA read, the GitHub account that publishes it, and its files as read
|
|
86
92
|
* (`files`, a JSON object of path to base64). A re-import of the id replaces the row. The server checks the files again
|
|
@@ -749,11 +755,15 @@ export const STORE_DDL = [
|
|
|
749
755
|
// its claim to build the run's spec. It replaces the per-run serve.json the old per-run process read: one row per run,
|
|
750
756
|
// written in the same transaction as the queued run, never after. `body` is the launch JSON (run-launch.ts: the first
|
|
751
757
|
// input, title, place, effort, cap, and the trigger and origin that started it); `sealed` holds any secret sealed with
|
|
752
|
-
// the server's key outside the store (AAD run_launch|<run_id>|sealed), or null when the launch holds none.
|
|
758
|
+
// the server's key outside the store (AAD run_launch|<run_id>|sealed), or null when the launch holds none. `census` is
|
|
759
|
+
// null when the launch never held any; "pending" from when it first does until an end counts them; then where in the
|
|
760
|
+
// run's files they sat when that end erased them (run-census.ts), never the secrets, or "unscanned" when it erased them
|
|
761
|
+
// with no census made under them (store.ts CENSUS_PENDING, CENSUS_UNSCANNED).
|
|
753
762
|
`CREATE TABLE IF NOT EXISTS run_launch (
|
|
754
763
|
run_id TEXT PRIMARY KEY REFERENCES runs (id),
|
|
755
764
|
${json("body")},
|
|
756
765
|
sealed BLOB,
|
|
766
|
+
${json("census", true)},
|
|
757
767
|
created_at INTEGER NOT NULL
|
|
758
768
|
) STRICT`,
|
|
759
769
|
// A running run's live view (the tool it runs now, its partial text): one row, outside the journal, overwritten in place
|
package/dist/store/seal.d.ts
CHANGED
|
@@ -76,11 +76,16 @@ export type RunModelKey = {
|
|
|
76
76
|
/** A run's own tool keys (`keys` at its start or with a message, run-keys.ts), by name. */
|
|
77
77
|
export type RunToolKeys = Readonly<Record<string, string>>;
|
|
78
78
|
/** What a run's launch holds sealed: its handed MCP credentials, its own model key and its own tool keys, each when it
|
|
79
|
-
* has one.
|
|
79
|
+
* has one. `retired`: each value an earlier seal of the launch held that a message replaced since its turn began (a
|
|
80
|
+
* host that hands a fresh key with each message), kept only to be cut (the runner's cut, a served read's, its end's
|
|
81
|
+
* census) and never used, erased with the rest at the run's end. `lost`: a message sealed over bytes that did not open
|
|
82
|
+
* here, so what they held is not known: every cut of the run is unreadable until its end, which writes no census. */
|
|
80
83
|
export type RunLaunchSecrets = {
|
|
81
84
|
readonly mcp?: RunMcpAuth;
|
|
82
85
|
readonly model?: RunModelKey;
|
|
83
86
|
readonly keys?: RunToolKeys;
|
|
87
|
+
readonly retired?: readonly string[];
|
|
88
|
+
readonly lost?: true;
|
|
84
89
|
};
|
|
85
90
|
/** Seals a run's launch secrets as its launch's sealed column (AAD run_launch|<run_id>|sealed); null when it holds none. */
|
|
86
91
|
export declare function sealRunLaunch(key: Buffer, runId: string, secrets: RunLaunchSecrets): Uint8Array | null;
|
package/dist/store/seal.js
CHANGED
|
@@ -74,9 +74,10 @@ export function openMcpCredential(key, row) {
|
|
|
74
74
|
export function sealRunLaunch(key, runId, secrets) {
|
|
75
75
|
const mcp = secrets.mcp && Object.keys(secrets.mcp).length ? secrets.mcp : undefined;
|
|
76
76
|
const keys = secrets.keys && Object.keys(secrets.keys).length ? secrets.keys : undefined;
|
|
77
|
-
|
|
77
|
+
const retired = secrets.retired?.length ? secrets.retired : undefined;
|
|
78
|
+
if (!mcp && !secrets.model && !keys && !retired && !secrets.lost)
|
|
78
79
|
return null;
|
|
79
|
-
return sealColumn(key, sealedAt.runLaunch(runId), JSON.stringify({ ...(mcp ? { mcp } : {}), ...(secrets.model ? { model: secrets.model } : {}), ...(keys ? { keys } : {}) }));
|
|
80
|
+
return sealColumn(key, sealedAt.runLaunch(runId), JSON.stringify({ ...(mcp ? { mcp } : {}), ...(secrets.model ? { model: secrets.model } : {}), ...(keys ? { keys } : {}), ...(retired ? { retired } : {}), ...(secrets.lost ? { lost: true } : {}) }));
|
|
80
81
|
}
|
|
81
82
|
/** The tool keys of an opened launch: each name with text for its value, none else. */
|
|
82
83
|
const toolKeysOf = (keys) => {
|
|
@@ -94,7 +95,8 @@ export function openRunLaunch(key, runId, sealed) {
|
|
|
94
95
|
const opened = JSON.parse(unsealColumn(key, sealedAt.runLaunch(runId), sealed).toString("utf8"));
|
|
95
96
|
const model = typeof opened.model?.key === "string" && typeof opened.model.origin === "string" ? { key: opened.model.key, origin: opened.model.origin } : undefined;
|
|
96
97
|
const keys = toolKeysOf(opened.keys);
|
|
97
|
-
|
|
98
|
+
const retired = Array.isArray(opened.retired) ? opened.retired.filter((value) => typeof value === "string") : [];
|
|
99
|
+
return { ...(opened.mcp ? { mcp: opened.mcp } : {}), ...(model ? { model } : {}), ...(keys ? { keys } : {}), ...(retired.length ? { retired } : {}), ...(opened.lost === true ? { lost: true } : {}) };
|
|
98
100
|
}
|
|
99
101
|
catch {
|
|
100
102
|
return undefined;
|
|
@@ -7,8 +7,16 @@ import type { SqliteExecutor } from "./connection.js";
|
|
|
7
7
|
* member as written (readUsageMetadata, readLearningStarts) reads the column and retries on postgresUnicodeRefusal. */
|
|
8
8
|
export declare const readableJson: (dialect: Dialect, column: string) => string;
|
|
9
9
|
/** Writes a run's launch row inside `tx` (the same transaction as the queued run it belongs to): the run path and the
|
|
10
|
-
* trigger path both call it, so the row lands with its run or not at all.
|
|
10
|
+
* trigger path both call it, so the row lands with its run or not at all. A launch with sealed bytes takes the census
|
|
11
|
+
* CENSUS_PENDING with them. */
|
|
11
12
|
export declare function writeLaunch(tx: Pick<SqliteExecutor, "run">, runId: string, launch: RunLaunchInput, at: number): Promise<void>;
|
|
13
|
+
/** The census a launch whose census is `census` and sealed bytes `sealed` takes when `next` is written as its sealed
|
|
14
|
+
* bytes: as it is when `next` holds none, or an end counted what it held before (its census); CENSUS_PENDING when it
|
|
15
|
+
* never held any; CENSUS_UNSCANNED over a CENSUS_PENDING whose sealed bytes an end erased without writing a census (a
|
|
16
|
+
* runner from before the census), so the files that end left are still read as uncounted. On Postgres the table holds
|
|
17
|
+
* the same rule too (migration 0027's trigger), for a server of an earlier build still writing during a rolling deploy.
|
|
18
|
+
* A SQLite store has one server, so no earlier server writes beside this one: the rule lives here alone. */
|
|
19
|
+
export declare function censusOnSeal(census: string | null, sealed: Uint8Array | null, next: Uint8Array | null): string | null;
|
|
12
20
|
/** The disk a launch body names as the run's own (runs.disk, RunRow.disk): its `archil_disk` of kind "launch", by its id
|
|
13
21
|
* (run-launch.ts launchBody writes it so); null for none, or its agent's own disk (the default disk). The one read of the
|
|
14
22
|
* body's disk the store makes, at every create of a run, so no path that queues a run can leave it out. */
|
|
@@ -2,18 +2,33 @@
|
|
|
2
2
|
// trigger path (store.triggers.fire) both write a run's launch row inside their own transaction, through one
|
|
3
3
|
// helper, with no second copy of the SQL. The launch body itself is opaque here (run-launch.ts owns its shape); sealed
|
|
4
4
|
// bytes are the caller's, which the store never opens.
|
|
5
|
-
import { StoreLaunchMissing } from "../store.js";
|
|
6
|
-
const RUN_LAUNCH_COLUMNS = "run_id, body, sealed, created_at";
|
|
7
|
-
const runLaunchOf = (r) => ({ runId: r.run_id, body: JSON.parse(r.body), sealed: r.sealed === null ? null : Uint8Array.from(r.sealed), createdAt: r.created_at });
|
|
5
|
+
import { CENSUS_PENDING, CENSUS_UNSCANNED, StoreLaunchMissing } from "../store.js";
|
|
6
|
+
const RUN_LAUNCH_COLUMNS = "run_id, body, sealed, census, created_at";
|
|
7
|
+
const runLaunchOf = (r) => ({ runId: r.run_id, body: JSON.parse(r.body), sealed: r.sealed === null ? null : Uint8Array.from(r.sealed), census: r.census, createdAt: r.created_at });
|
|
8
8
|
/** JSON text `column` (a launch body, a command's body, a journal record) as every read of one id, number or flag out of
|
|
9
9
|
* it takes it: on Postgres its copy with escaped NULs and lone surrogates blanked (postgresReadableJson), so a run's text
|
|
10
10
|
* never makes the read fail; on SQLite (whose json functions read them) the column itself. Only a read that returns a
|
|
11
11
|
* member as written (readUsageMetadata, readLearningStarts) reads the column and retries on postgresUnicodeRefusal. */
|
|
12
12
|
export const readableJson = (dialect, column) => (dialect.name === "postgres" ? postgresReadableJson(column) : column);
|
|
13
13
|
/** Writes a run's launch row inside `tx` (the same transaction as the queued run it belongs to): the run path and the
|
|
14
|
-
* trigger path both call it, so the row lands with its run or not at all.
|
|
14
|
+
* trigger path both call it, so the row lands with its run or not at all. A launch with sealed bytes takes the census
|
|
15
|
+
* CENSUS_PENDING with them. */
|
|
15
16
|
export function writeLaunch(tx, runId, launch, at) {
|
|
16
|
-
|
|
17
|
+
const sealed = launch.sealed ?? null;
|
|
18
|
+
return tx.run("INSERT INTO run_launch (run_id, body, sealed, census, created_at) VALUES (?, ?, ?, ?, ?)", runId, JSON.stringify(launch.body ?? null), sealed, sealed === null ? null : CENSUS_PENDING, at);
|
|
19
|
+
}
|
|
20
|
+
/** The census a launch whose census is `census` and sealed bytes `sealed` takes when `next` is written as its sealed
|
|
21
|
+
* bytes: as it is when `next` holds none, or an end counted what it held before (its census); CENSUS_PENDING when it
|
|
22
|
+
* never held any; CENSUS_UNSCANNED over a CENSUS_PENDING whose sealed bytes an end erased without writing a census (a
|
|
23
|
+
* runner from before the census), so the files that end left are still read as uncounted. On Postgres the table holds
|
|
24
|
+
* the same rule too (migration 0027's trigger), for a server of an earlier build still writing during a rolling deploy.
|
|
25
|
+
* A SQLite store has one server, so no earlier server writes beside this one: the rule lives here alone. */
|
|
26
|
+
export function censusOnSeal(census, sealed, next) {
|
|
27
|
+
if (next === null)
|
|
28
|
+
return census;
|
|
29
|
+
if (census === null)
|
|
30
|
+
return CENSUS_PENDING;
|
|
31
|
+
return census === CENSUS_PENDING && sealed === null ? CENSUS_UNSCANNED : census;
|
|
17
32
|
}
|
|
18
33
|
/** The disk a launch body names as the run's own (runs.disk, RunRow.disk): its `archil_disk` of kind "launch", by its id
|
|
19
34
|
* (run-launch.ts launchBody writes it so); null for none, or its agent's own disk (the default disk). The one read of the
|
|
@@ -31,14 +46,10 @@ export function launchDiskOf(launch) {
|
|
|
31
46
|
/** A message's launch secrets written over the run's (runs.command, runs.reopen), inside `tx`: the bytes as given, or a
|
|
32
47
|
* function's answer to the bytes the launch holds now, read in the same transaction. */
|
|
33
48
|
export async function writeLaunchSealed(tx, runId, launchSealed) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
else
|
|
40
|
-
next = launchSealed;
|
|
41
|
-
await tx.run("UPDATE run_launch SET sealed = ? WHERE run_id = ?", next, runId);
|
|
49
|
+
const row = await tx.get("SELECT sealed, census FROM run_launch WHERE run_id = ?", runId);
|
|
50
|
+
const sealed = row?.sealed == null ? null : Uint8Array.from(row.sealed);
|
|
51
|
+
const next = typeof launchSealed === "function" ? launchSealed(sealed) : launchSealed;
|
|
52
|
+
await tx.run("UPDATE run_launch SET sealed = ?, census = ? WHERE run_id = ?", next, censusOnSeal(row?.census ?? null, sealed, next), runId);
|
|
42
53
|
}
|
|
43
54
|
/** The run's launch row, read by the runner at its claim (and the server for views). StoreLaunchMissing when the run has
|
|
44
55
|
* none, never a default. */
|
|
@@ -69,4 +69,4 @@ export declare const reopenableWhere: (d: Dialect) => string;
|
|
|
69
69
|
* while the run looked back: a cancel at it cut the look-back alone and is refused with the rest. Only with a person's
|
|
70
70
|
* message waiting (the run read as going on from it, as a completed run a message opens again) is a cancel, waiting or
|
|
71
71
|
* taken in this commit, that message's run's: it ends cancelled, at this commit's time. */
|
|
72
|
-
export declare function refuseLeftovers(tx: Pick<SqliteExecutor, "run" | "get">, runId: string, state: RunState | undefined, now: number, dialect?: Dialect, keepsEnd?: boolean): Promise<void>;
|
|
72
|
+
export declare function refuseLeftovers(tx: Pick<SqliteExecutor, "run" | "get">, runId: string, state: RunState | undefined, now: number, dialect?: Dialect, keepsEnd?: boolean, census?: RunPatch["census"]): Promise<void>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// runs.update and for the journal's commit (store/journal), which stages the patch and calls this inside its own
|
|
4
4
|
// transaction: the run's end and its outbox rows commit with the journal's last entry, or none of them do. The fence is
|
|
5
5
|
// the first statement: `WHERE id = ? AND epoch = ?` changing no row throws Fenced, and the caller's transaction rolls back.
|
|
6
|
-
import { endedReason, FINAL_STATES, Fenced } from "../store.js";
|
|
6
|
+
import { CENSUS_UNSCANNED, endedReason, FINAL_STATES, Fenced } from "../store.js";
|
|
7
7
|
import { settledBody, SQLITE } from "../dialect.js";
|
|
8
8
|
import { claimFence, storeNow } from "../fence.js";
|
|
9
9
|
import { readableJson } from "./run-launch.js";
|
|
@@ -128,7 +128,7 @@ export const reopenableWhere = (d) => `(state = 'ended' OR (state = 'stopped' AN
|
|
|
128
128
|
* while the run looked back: a cancel at it cut the look-back alone and is refused with the rest. Only with a person's
|
|
129
129
|
* message waiting (the run read as going on from it, as a completed run a message opens again) is a cancel, waiting or
|
|
130
130
|
* taken in this commit, that message's run's: it ends cancelled, at this commit's time. */
|
|
131
|
-
export async function refuseLeftovers(tx, runId, state, now, dialect = SQLITE, keepsEnd = false) {
|
|
131
|
+
export async function refuseLeftovers(tx, runId, state, now, dialect = SQLITE, keepsEnd = false, census) {
|
|
132
132
|
if (state !== "ended" && state !== "stopped" && state !== "failed")
|
|
133
133
|
return;
|
|
134
134
|
// A cancel the API accepted (202, not refused) promised a cancelled run, and the view reads cancelled from that 202 on.
|
|
@@ -146,7 +146,7 @@ export async function refuseLeftovers(tx, runId, state, now, dialect = SQLITE, k
|
|
|
146
146
|
if (won) {
|
|
147
147
|
await tx.run("UPDATE commands SET taken_at = ? WHERE run_id = ? AND taken_at IS NULL AND refused IS NULL AND kind = 'cancel'", now, runId);
|
|
148
148
|
await tx.run("UPDATE commands SET taken_at = ?, refused = ? WHERE run_id = ? AND taken_at IS NULL", now, endedReason("stopped"), runId);
|
|
149
|
-
await tx
|
|
149
|
+
await eraseLaunchSecrets(tx, runId, census);
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
152
152
|
}
|
|
@@ -161,5 +161,14 @@ export async function refuseLeftovers(tx, runId, state, now, dialect = SQLITE, k
|
|
|
161
161
|
await tx.run(`UPDATE commands SET taken_at = ?, refused = ?, ${settledBody(dialect)} WHERE run_id = ? AND taken_at IS NULL`, now, endedReason(state), runId);
|
|
162
162
|
// The run is over: the secrets its launch held for its life go with this same commit. A message that opens it again
|
|
163
163
|
// hands its own (runs.reopen).
|
|
164
|
-
await tx
|
|
164
|
+
await eraseLaunchSecrets(tx, runId, census);
|
|
165
|
+
}
|
|
166
|
+
/** A final run's launch secrets erased, in its end's commit, and what that end knew of where they sat written in their
|
|
167
|
+
* place: `census` when it was made under the sealed bytes erased here, else CENSUS_UNSCANNED (an end with none, or one
|
|
168
|
+
* whose launch a message sealed anew after the census read it). A launch with no sealed bytes is left as it is: its
|
|
169
|
+
* census, if any, is the end's that erased them. */
|
|
170
|
+
async function eraseLaunchSecrets(tx, runId, census) {
|
|
171
|
+
if (census)
|
|
172
|
+
await tx.run("UPDATE run_launch SET census = ?, sealed = NULL WHERE run_id = ? AND sealed = ?", census.json, runId, census.sealed);
|
|
173
|
+
await tx.run("UPDATE run_launch SET census = ?, sealed = NULL WHERE run_id = ? AND sealed IS NOT NULL", CENSUS_UNSCANNED, runId);
|
|
165
174
|
}
|
|
@@ -12,8 +12,8 @@ import { watchCommandsAt, wakeCommands } from "../command-wake.js";
|
|
|
12
12
|
import { claimFence, storeNow } from "../fence.js";
|
|
13
13
|
import { JOURNAL_FIRST_ID, RunStorage } from "../journal/storage.js";
|
|
14
14
|
import { RUNNER_RECORDS } from "@parcha/agentrun-kernel";
|
|
15
|
-
import { COMMANDS_ONE_ANSWER, COMPUTER_INTERVALS, COMPUTER_INTERVALS_ADDED, COMPUTER_INTERVALS_RUN, DDL, diskUpgrade, HAND_BACKS, HAND_BACKS_AT, HAND_BACKS_KEPT_MS, HAND_BACKS_RUN, IMPORTED_TEMPLATES, listingUpgrade, MINTED_TOKENS, purgeUpgrade, relayUpgrade, NATIVE_COMMANDS_INDEX, PI_TABLE, PI_TABLES, REVISIONS_MCP_PIN, REVISIONS_MONID_PIN, RUN_ATTEMPTS, RUNNERS, RUNNERS_ADDED, RUNS_COST_UPPER_BOUND, RUNS_LABELS, SCHEMA_VERSION, SETTLED_LIST_STATUS, TRIGGERS_TEMPLATE_ID } from "../schema.js";
|
|
16
|
-
import { ActiveRuns, AgentArchived, AgentDeleting, AgentPurged, CommandTaken, ExternalBodyConflict, Fenced, RunFinal, RunPurged, RunsMadeFromLeft, SchemaVersionUnknown, STORE_WRITE_DEADLINE_MS, StoreAwaitsServer, StoreBusy, StoreConstraint, StoreFromEarlierVersion, TriggerFull, TriggersLeft, UPLOAD_PREFIX, FINAL_STATES, MCP_REFRESH_CALL_MS, MCP_REFRESH_LEASE_MS, RevisionMoved, SignInHandedTo, SignInMissing, RUN_CHANGES_PAGE, KEPT_PREFIX, RUNNER_ROWS_KEPT_MS, RUNNER_STALE_MS, tombstoneMetrics, } from "../store.js";
|
|
15
|
+
import { COMMANDS_ONE_ANSWER, COMPUTER_INTERVALS, COMPUTER_INTERVALS_ADDED, COMPUTER_INTERVALS_RUN, DDL, diskUpgrade, HAND_BACKS, HAND_BACKS_AT, HAND_BACKS_KEPT_MS, HAND_BACKS_RUN, IMPORTED_TEMPLATES, listingUpgrade, MINTED_TOKENS, purgeUpgrade, relayUpgrade, NATIVE_COMMANDS_INDEX, PI_TABLE, PI_TABLES, REVISIONS_MCP_PIN, REVISIONS_MONID_PIN, RUN_ATTEMPTS, RUNNERS, RUNNERS_ADDED, RUN_LAUNCH_CENSUS, RUN_LAUNCH_CENSUS_PENDING, RUNS_COST_UPPER_BOUND, RUNS_LABELS, SCHEMA_VERSION, SETTLED_LIST_STATUS, TRIGGERS_TEMPLATE_ID } from "../schema.js";
|
|
16
|
+
import { ActiveRuns, AgentArchived, AgentDeleting, AgentPurged, CommandTaken, ExternalBodyConflict, Fenced, FiringMoved, RunFinal, RunPurged, RunsMadeFromLeft, SchemaVersionUnknown, STORE_WRITE_DEADLINE_MS, StoreAwaitsServer, StoreBusy, StoreConstraint, StoreFromEarlierVersion, TriggerFull, TriggersLeft, UPLOAD_PREFIX, FINAL_STATES, MCP_REFRESH_CALL_MS, MCP_REFRESH_LEASE_MS, RevisionMoved, SignInHandedTo, SignInMissing, RUN_CHANGES_PAGE, KEPT_PREFIX, RUNNER_ROWS_KEPT_MS, RUNNER_STALE_MS, tombstoneMetrics, } from "../store.js";
|
|
17
17
|
/** The run a launch body is made from (Runs.madeFrom): the run whose input it replays (`replay.of`) or audits (`audit.of`). */
|
|
18
18
|
const madeOf = (body) => {
|
|
19
19
|
for (const link of ["replay", "audit"]) {
|
|
@@ -275,6 +275,7 @@ export const SQLITE_RUNNER_NEEDS = [
|
|
|
275
275
|
{ table: "settings", columns: ["connector_id"], why: "add native command ownership metadata" },
|
|
276
276
|
{ table: "runs", columns: ["cost_upper_bound"], why: "add the bound beside each run's cost" },
|
|
277
277
|
{ table: "runs", columns: ["labels"], why: "add each run's labels" },
|
|
278
|
+
{ table: "run_launch", columns: ["census"], why: "add each run's census" },
|
|
278
279
|
{ table: "triggers", columns: ["template_id"], why: "add each trigger's package mark" },
|
|
279
280
|
{ table: "runners", columns: ["host"], why: "keep each runner's word that it is there and its relay in one table (runners)" },
|
|
280
281
|
{ table: "runners", columns: Object.keys(RUNNERS_ADDED), why: "keep each runner's version and slots, and each hand-back (runners.version, runners.slots, hand_backs)" },
|
|
@@ -453,6 +454,14 @@ export async function openSqliteStore(options) {
|
|
|
453
454
|
throw new StoreAwaitsServer("add each run's labels");
|
|
454
455
|
await connection.write([{ sql: RUNS_LABELS }], { full: true });
|
|
455
456
|
}
|
|
457
|
+
// An earlier build of this version kept no census on a run's launch (schema.ts RUN_LAUNCH_CENSUS): the server adds the
|
|
458
|
+
// column, nullable, every run ended before reading as never handed a secret, and marks each launch that holds one now
|
|
459
|
+
// as pending (store.ts CENSUS_PENDING). A runner writes it at each end, so it waits for that server.
|
|
460
|
+
if (!(await connection.all("SELECT name FROM pragma_table_info('run_launch')")).some((column) => column.name === "census")) {
|
|
461
|
+
if (role === "runner")
|
|
462
|
+
throw new StoreAwaitsServer("add each run's census");
|
|
463
|
+
await connection.write([{ sql: RUN_LAUNCH_CENSUS }, { sql: RUN_LAUNCH_CENSUS_PENDING }], { full: true });
|
|
464
|
+
}
|
|
456
465
|
// An earlier build of this version kept no package mark on a trigger (schema.ts TRIGGERS_TEMPLATE_ID): the server adds
|
|
457
466
|
// the column, nullable, every trigger made before reading as no package's. A runner reads each trigger through it, so
|
|
458
467
|
// it waits for that server.
|
|
@@ -707,6 +716,8 @@ class SqliteStore {
|
|
|
707
716
|
where;
|
|
708
717
|
/** The deadlines' clock now (fence.ts storeNow): the database's on Postgres, this store's clock bound on SQLite. */
|
|
709
718
|
#clock;
|
|
719
|
+
/** Store.leaseClock: this store's clock when the deadlines are stamped on it (no database clock: SQLite, or a test's). */
|
|
720
|
+
leaseClock;
|
|
710
721
|
/** Each claim's one journal, until it is closed. */
|
|
711
722
|
#journals = new Map();
|
|
712
723
|
/** Each run's claim this store released last (its epoch): journal() refuses that claim, or an older one, rather than
|
|
@@ -730,6 +741,8 @@ class SqliteStore {
|
|
|
730
741
|
const d = db.dialect;
|
|
731
742
|
const clock = () => storeNow(d, now);
|
|
732
743
|
this.#clock = clock;
|
|
744
|
+
if (!d.nowSql)
|
|
745
|
+
this.leaseClock = now;
|
|
733
746
|
const insertAgent = (tx, agent, at) => tx.run("INSERT INTO agents (id, name, description, created_at) VALUES (?, ?, ?, ?)", agent.id, agent.name, agent.description ?? null, at);
|
|
734
747
|
/** Agent `agentId`'s row, held (a writer's row lock, as its purge takes it), or undefined when there is none; refused
|
|
735
748
|
* (AgentPurged) once it is purged: a write that waited on the purge's lock reads its purge time, and one that took the
|
|
@@ -1087,6 +1100,8 @@ class SqliteStore {
|
|
|
1087
1100
|
return undefined;
|
|
1088
1101
|
if (change.startByWas !== undefined && !(was.status === "sent" && was.run_id === null && was.retry_at === change.startByWas))
|
|
1089
1102
|
return undefined;
|
|
1103
|
+
if (change.noRun && was.run_id !== null)
|
|
1104
|
+
return undefined;
|
|
1090
1105
|
const settled = change.status !== undefined && change.status !== "due";
|
|
1091
1106
|
// Out of due, a firing keeps no retry, wait, payload or attrs (unless keepAttrs), nor the reason its last try gave
|
|
1092
1107
|
// (unless it gives one). One exception: a sent firing keeps its startBy in retry_at (firingOf reads it back as
|
|
@@ -1252,8 +1267,21 @@ class SqliteStore {
|
|
|
1252
1267
|
return runOf(row);
|
|
1253
1268
|
})),
|
|
1254
1269
|
};
|
|
1270
|
+
/** Firing `firing` started with run `runId`, in the run's own transaction, under its trigger's row lock (as settle
|
|
1271
|
+
* takes it): only while it has no run and is due, or sent with a start_by (its host took it); else FiringMoved,
|
|
1272
|
+
* which rolls the run back. Its trigger's last run and failure streak move as a started firing's do (settle). */
|
|
1273
|
+
const startFiring = async (tx, { triggerId, key }, runId, at) => {
|
|
1274
|
+
await d.lockRow(tx, "triggers", "id", triggerId);
|
|
1275
|
+
const moved = await tx.runCounted("UPDATE trigger_firings SET status = 'started', run_id = ?, retry_at = NULL, waits_on = NULL, payload = NULL, attrs = NULL, reason = NULL, attempts = 0 WHERE trigger_id = ? AND key = ? AND run_id IS NULL AND (status = 'due' OR (status = 'sent' AND retry_at IS NOT NULL))", runId, triggerId, key);
|
|
1276
|
+
if (moved === 0)
|
|
1277
|
+
throw new FiringMoved(triggerId, key);
|
|
1278
|
+
const trigger = await tx.get("SELECT last_run_id FROM triggers WHERE id = ?", triggerId);
|
|
1279
|
+
// Run ids are UUIDv7s, sorted by when the run started: an older run never takes a later one's place (settle).
|
|
1280
|
+
const last = trigger?.last_run_id && trigger.last_run_id > runId ? trigger.last_run_id : runId;
|
|
1281
|
+
await tx.run("UPDATE triggers SET last_run_id = ?, failures_in_a_row = 0, updated_at = ? WHERE id = ?", last, at, triggerId);
|
|
1282
|
+
};
|
|
1255
1283
|
this.runs = {
|
|
1256
|
-
create: async ({ id, agentId, revisionId, origin, labels, expectedCurrent, settingsGuards, startedAt }, launch) => {
|
|
1284
|
+
create: async ({ id, agentId, revisionId, origin, labels, expectedCurrent, settingsGuards, startedAt, firing }, launch) => {
|
|
1257
1285
|
// sign_in_handed is not written here: the runner writes it at its claim (runs.update under the epoch fence).
|
|
1258
1286
|
const insert = `INSERT INTO runs (id, agent_id, revision_id, state, epoch, labels, disk, started_at) VALUES (?, ?, ?, 'queued', 0, ?, ?, ?) RETURNING ${RUN_COLUMNS}`;
|
|
1259
1287
|
const labelled = labelsColumn(labels);
|
|
@@ -1279,6 +1307,8 @@ class SqliteStore {
|
|
|
1279
1307
|
await tx.run("INSERT INTO run_origins (key, run_id, fingerprint, created_at) VALUES (?, ?, ?, ?)", origin.key, id, origin.fingerprint ?? null, at);
|
|
1280
1308
|
if (launch)
|
|
1281
1309
|
await writeLaunch(tx, id, launch, at);
|
|
1310
|
+
if (firing)
|
|
1311
|
+
await startFiring(tx, firing, id, at);
|
|
1282
1312
|
return runOf(row);
|
|
1283
1313
|
}));
|
|
1284
1314
|
},
|
|
@@ -1616,7 +1646,7 @@ class SqliteStore {
|
|
|
1616
1646
|
}
|
|
1617
1647
|
}
|
|
1618
1648
|
// An update that made the run final: its other untaken rows are refused in this transaction, after its own takes.
|
|
1619
|
-
await refuseLeftovers(tx, claim.runId, patch.state, at, d, patch.keepsEnd === true);
|
|
1649
|
+
await refuseLeftovers(tx, claim.runId, patch.state, at, d, patch.keepsEnd === true, patch.census);
|
|
1620
1650
|
// The bind's save lease, in this same transaction as the sign_in_handed write just made (applyRunPatch, under
|
|
1621
1651
|
// SIGN_IN_HANDED_LOCK): this run saves unless another run already holds one of the handed pointers (a running run,
|
|
1622
1652
|
// or — within signInSettleMs of leaving running, a vendor's settle window — one that left running less than that
|
package/dist/store/store.d.ts
CHANGED
|
@@ -314,6 +314,13 @@ export interface RunPatch {
|
|
|
314
314
|
* cancel waiting at its commit cut the look-back, never the job's end, and is refused (refuseLeftovers), unless a
|
|
315
315
|
* person's message waits too: that message's run is the one they stop or cancel. */
|
|
316
316
|
readonly keepsEnd?: boolean;
|
|
317
|
+
/** A final patch's census (run-census.ts): where in the run's files the secrets its launch holds sit, made under the
|
|
318
|
+
* launch's `sealed` bytes as they were then. The end that erases them writes it as the launch's census when its sealed
|
|
319
|
+
* bytes are still those, else the marker "unscanned" (refuseLeftovers), as it does for an end with none. */
|
|
320
|
+
readonly census?: {
|
|
321
|
+
readonly json: string;
|
|
322
|
+
readonly sealed: Uint8Array;
|
|
323
|
+
};
|
|
317
324
|
}
|
|
318
325
|
/** The row runs.update answers. When the patch wrote `signInHanded` (the runner's bind at its claim), `save` rides with it:
|
|
319
326
|
* whether this run holds the sign-in's save lease — true unless another run already holds one of the handed pointers,
|
|
@@ -331,12 +338,24 @@ export interface RunLaunchInput {
|
|
|
331
338
|
readonly body: unknown;
|
|
332
339
|
readonly sealed?: Uint8Array | null;
|
|
333
340
|
}
|
|
341
|
+
/** The census a launch takes when sealed bytes are first written on it (RunLaunchRow.census): it holds secrets its caller
|
|
342
|
+
* handed it, and no end has counted where they sit. An end erases them and writes its census in its place; an end that
|
|
343
|
+
* wrote none (a runner from before the census, during a rolling deploy) leaves it, and an ended run's files under it are
|
|
344
|
+
* withheld from a cut read, as under CENSUS_UNSCANNED. */
|
|
345
|
+
export declare const CENSUS_PENDING: string;
|
|
346
|
+
/** The census an end that erased a launch's sealed bytes writes when it has none made under them (RunLaunchRow.census), and
|
|
347
|
+
* a message's seal writes over CENSUS_PENDING left by such an end: what the run was handed may be in its files, and
|
|
348
|
+
* nothing says where. */
|
|
349
|
+
export declare const CENSUS_UNSCANNED: string;
|
|
334
350
|
/** A run's launch as the store holds it: the body the runner reads at its claim, and its sealed bytes, which the store never
|
|
335
|
-
* opens.
|
|
351
|
+
* opens. `census`: null when its launch never held sealed bytes (none handed, or a run ended before the census was kept);
|
|
352
|
+
* CENSUS_PENDING from when they were first written until an end counted them; then the JSON text the last end that
|
|
353
|
+
* erased them wrote (RunPatch.census, run-census.ts), or CENSUS_UNSCANNED when that end had none made under them. */
|
|
336
354
|
export interface RunLaunchRow {
|
|
337
355
|
readonly runId: string;
|
|
338
356
|
readonly body: unknown;
|
|
339
357
|
readonly sealed: Uint8Array | null;
|
|
358
|
+
readonly census: string | null;
|
|
340
359
|
readonly createdAt: number;
|
|
341
360
|
}
|
|
342
361
|
/** A message's new launch secrets (runs.command, runs.reopen): `launchSealed` replaces the run's launch `sealed` in the
|
|
@@ -745,6 +764,10 @@ export interface FiringChange {
|
|
|
745
764
|
* transaction: a host start that pushed a startBy out and wrote no run puts it back (triggers.ts handedStart), unless
|
|
746
765
|
* its run started, or another start moved it, meanwhile. */
|
|
747
766
|
readonly startByWas?: number;
|
|
767
|
+
/** Written only while the firing has no run, read in the settle's own transaction (with `from`, a firing's start by a
|
|
768
|
+
* run written apart from it, triggers.ts handedRan): one a release failed, or another run started, meanwhile is left
|
|
769
|
+
* as it is. */
|
|
770
|
+
readonly noRun?: true;
|
|
748
771
|
}
|
|
749
772
|
/** What a settle does to the firing's trigger besides: `reset` its failure streak (a run started, a message sent), or
|
|
750
773
|
* count a `failure` toward it, turning it off at `pauseAt` in a row (auto-pause, the firing marked paused). */
|
|
@@ -1020,7 +1043,10 @@ export interface Runs {
|
|
|
1020
1043
|
* `expectedCurrent` checks the agent's current revision under its lock (RevisionMoved on mismatch); this is separate
|
|
1021
1044
|
* from the pinned revisionId. Settings guards are locked before the agent. Refusal writes no run, origin or launch.
|
|
1022
1045
|
* `startedAt` (ms) is when the run began, for one reported after it began elsewhere (a backend SDK run's
|
|
1023
|
-
* `started_at`); absent, now.
|
|
1046
|
+
* `started_at`); absent, now. With `firing` (a launch hook's host starting the firing it was handed), that firing is
|
|
1047
|
+
* started with the run in the same transaction, its trigger's last run and failure streak as a started firing's
|
|
1048
|
+
* are, only while it has no run and is still due or sent with a start_by: any other (released, failed, settled) is
|
|
1049
|
+
* refused (FiringMoved), and nothing is written. */
|
|
1024
1050
|
create(run: {
|
|
1025
1051
|
id: string;
|
|
1026
1052
|
agentId: string;
|
|
@@ -1030,6 +1056,10 @@ export interface Runs {
|
|
|
1030
1056
|
expectedCurrent?: string | null;
|
|
1031
1057
|
settingsGuards?: readonly SettingsGuard[];
|
|
1032
1058
|
startedAt?: number;
|
|
1059
|
+
firing?: {
|
|
1060
|
+
triggerId: string;
|
|
1061
|
+
key: string;
|
|
1062
|
+
};
|
|
1033
1063
|
}, launch?: RunLaunchInput): Promise<RunRow>;
|
|
1034
1064
|
/** A run whose agent is given inline and mapped to a source system by `agent.ref` and `revision.version`. In one
|
|
1035
1065
|
* transaction: the agent (one per `ref`, written on its first run, its name and description brought up to the version
|
|
@@ -2111,6 +2141,11 @@ export interface Store {
|
|
|
2111
2141
|
/** Reads the store's schema version and its runner floor now, without a lock or a write: a runner reads it at each
|
|
2112
2142
|
* renewal (runner/main.ts), and stops once the floor is above the version its build knows. */
|
|
2113
2143
|
schemaState?(): Promise<StoreSchemaState>;
|
|
2144
|
+
/** The clock a claim's lease is judged and stamped on (its `until`), when it is this process's own: the store's clock on
|
|
2145
|
+
* SQLite (one host), or a test's. A runner reckons a claim's deadline from its `until` on it, so a claim or renew that
|
|
2146
|
+
* waited for the writer lock keeps the lease the store granted from the lock. Absent when the lease is the database's
|
|
2147
|
+
* clock (Postgres), which this process cannot read: the runner reckons from when it asked. */
|
|
2148
|
+
readonly leaseClock?: () => number;
|
|
2114
2149
|
/** Claims the run for `runner` until now + `leaseMs`: the run's epoch + 1 when it is claimable (runs.claimable); null when
|
|
2115
2150
|
* another claim holds it, or it is final, or parked with nothing to wake it. A queued or parked run becomes running. */
|
|
2116
2151
|
claim(runId: string, runner: string, options?: {
|
|
@@ -2322,6 +2357,12 @@ export declare class RunsMadeFromLeft extends StoreConstraint {
|
|
|
2322
2357
|
readonly runs: readonly string[];
|
|
2323
2358
|
constructor(runId: string, runs: readonly string[]);
|
|
2324
2359
|
}
|
|
2360
|
+
/** A run's firing (Runs.create `firing`) that no longer takes it: no longer due or sent with a start_by, or it has a run. */
|
|
2361
|
+
export declare class FiringMoved extends Error {
|
|
2362
|
+
readonly triggerId: string;
|
|
2363
|
+
readonly key: string;
|
|
2364
|
+
constructor(triggerId: string, key: string);
|
|
2365
|
+
}
|
|
2325
2366
|
/** A run made from a purged run (its launch's `replay.of` or `audit.of` names it): refused, nothing written. Its source's
|
|
2326
2367
|
* input is gone, and a copy of it is never made again (Runs.create). `runId`: the purged run. */
|
|
2327
2368
|
export declare class RunPurged extends Error {
|
package/dist/store/store.js
CHANGED
|
@@ -30,6 +30,15 @@ export function tombstoneMetrics(metrics, kept) {
|
|
|
30
30
|
out.purged = kept;
|
|
31
31
|
return out;
|
|
32
32
|
}
|
|
33
|
+
/** The census a launch takes when sealed bytes are first written on it (RunLaunchRow.census): it holds secrets its caller
|
|
34
|
+
* handed it, and no end has counted where they sit. An end erases them and writes its census in its place; an end that
|
|
35
|
+
* wrote none (a runner from before the census, during a rolling deploy) leaves it, and an ended run's files under it are
|
|
36
|
+
* withheld from a cut read, as under CENSUS_UNSCANNED. */
|
|
37
|
+
export const CENSUS_PENDING = JSON.stringify("pending");
|
|
38
|
+
/** The census an end that erased a launch's sealed bytes writes when it has none made under them (RunLaunchRow.census), and
|
|
39
|
+
* a message's seal writes over CENSUS_PENDING left by such an end: what the run was handed may be in its files, and
|
|
40
|
+
* nothing says where. */
|
|
41
|
+
export const CENSUS_UNSCANNED = JSON.stringify("unscanned");
|
|
33
42
|
/** A firing a trigger has no room for: `due` firings are DUE_KEPT already. Nothing was written. */
|
|
34
43
|
export class TriggerFull extends Error {
|
|
35
44
|
triggerId;
|
|
@@ -308,6 +317,17 @@ export class RunsMadeFromLeft extends StoreConstraint {
|
|
|
308
317
|
this.name = "RunsMadeFromLeft";
|
|
309
318
|
}
|
|
310
319
|
}
|
|
320
|
+
/** A run's firing (Runs.create `firing`) that no longer takes it: no longer due or sent with a start_by, or it has a run. */
|
|
321
|
+
export class FiringMoved extends Error {
|
|
322
|
+
triggerId;
|
|
323
|
+
key;
|
|
324
|
+
constructor(triggerId, key) {
|
|
325
|
+
super(`firing ${key} of trigger ${triggerId} no longer takes a run: nothing was written`);
|
|
326
|
+
this.triggerId = triggerId;
|
|
327
|
+
this.key = key;
|
|
328
|
+
this.name = "FiringMoved";
|
|
329
|
+
}
|
|
330
|
+
}
|
|
311
331
|
/** A run made from a purged run (its launch's `replay.of` or `audit.of` names it): refused, nothing written. Its source's
|
|
312
332
|
* input is gone, and a copy of it is never made again (Runs.create). `runId`: the purged run. */
|
|
313
333
|
export class RunPurged extends Error {
|
|
@@ -185,8 +185,9 @@ export declare function costRunOf(store: RunRecords, run: RunRecord, n: number |
|
|
|
185
185
|
* and the cost page: of its newest PAST_RUNS runs on no named disk (learn/learning-of.ts: one on a named disk learns
|
|
186
186
|
* nothing), each that ended (ended, stopped or failed) since its learning's reset (learn/compile.ts sinceReset: a
|
|
187
187
|
* workflow before it is not the one it learned after, whatever its name), is neither imported nor archived nor a
|
|
188
|
-
* workflow revision's run, with its all-in cost (
|
|
189
|
-
* page's series), read again for no run; `records`, where any other's rows
|
|
188
|
+
* workflow revision's run, with its all-in cost as the money rule reads it (moneyAllInOf). `known`: all-in costs already
|
|
189
|
+
* read (allInOf), by run id (the cost page's series), read again for no served run; `records`, where any other's rows
|
|
190
|
+
* are read (the store's by default). */
|
|
190
191
|
export declare function pastRunsOverStore(store: Store, agentId: string, known?: ReadonlyMap<string, number | null>, records?: RunRecords): Promise<PastRun[]>;
|
|
191
192
|
/** The money rule's decision for agent `agentId` (runner/workflow-first.ts costStopOf) over the runs a run's launch reads
|
|
192
193
|
* (pastRunsOverStore), as the launch reads them: runs that can't be read now stop nothing (workflowFirstOf serves). What
|
|
@@ -199,12 +200,14 @@ export declare const costStopOverStore: (store: Store, agentId: string) => Promi
|
|
|
199
200
|
* new answer is the agent's, with its digest. Else, for a run its launch offered a learned workflow, its timeline
|
|
200
201
|
* (runner/learning-end.ts runPathOf, the agent calling the tool itself): `workflow` when its job did only that,
|
|
201
202
|
* `handed_back` when the agent went on, with the workflow its job called last. Any other run's path is `agent`. Both
|
|
202
|
-
* read the run's rows less its feedback rounds' (withoutFeedbackRounds): a grade's round never moves the path.
|
|
203
|
+
* read the run's rows less its feedback rounds' (withoutFeedbackRounds): a grade's round never moves the path. `cut` on a
|
|
204
|
+
* hand-back a restart cut (servedOf: the workflow's call ended `interrupted`), never one the workflow made itself. */
|
|
203
205
|
export declare function runPathOverStore(store: Store, runId: string, started: RunLaunch["learning"], redact?: (text: string) => string): Promise<{
|
|
204
206
|
path: RunPath;
|
|
205
207
|
workflow: string | null;
|
|
206
208
|
digest?: string;
|
|
207
209
|
promotion?: number;
|
|
210
|
+
cut?: true;
|
|
208
211
|
}>;
|
|
209
212
|
/** The path a run's views say it took (GET /runs/{id} and each runs list row: `path`, and `workflow`), read off its record
|
|
210
213
|
* as the cost per run reads it (pathOfRow, revisionOfRow: costRunOf's own read, so the run views and GET
|