@parcha/agentrun-serve 0.1.0-beta.53 → 0.1.0-beta.55
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 +138 -3
- package/README.md +346 -99
- package/dist/adapters.d.ts +10 -0
- package/dist/adapters.js +46 -0
- package/dist/agent-package.d.ts +3 -3
- package/dist/agent-package.js +7 -14
- package/dist/agent-rows.d.ts +1 -1
- package/dist/agents-store.js +7 -6
- package/dist/api-only.d.ts +17 -6
- package/dist/api-only.js +22 -9
- package/dist/cli.js +11 -4
- package/dist/composio-made.d.ts +26 -1
- package/dist/composio-made.js +39 -2
- package/dist/composio-preset.d.ts +6 -4
- package/dist/composio-preset.js +50 -17
- package/dist/computer-held-routes.js +2 -3
- package/dist/computer-needs.d.ts +1 -1
- package/dist/computer-needs.js +1 -1
- package/dist/computer-setting.d.ts +8 -4
- package/dist/computer-setting.js +0 -2
- package/dist/computers-running.d.ts +8 -0
- package/dist/computers-running.js +27 -0
- package/dist/computers.d.ts +0 -2
- package/dist/computers.js +1 -1
- package/dist/console/assets/backend-D5EmB4N3.js +166 -0
- package/dist/console/assets/index-DUYLaqiR.js +746 -0
- package/dist/console/assets/index-DYhU4adm.css +1 -0
- package/dist/console/index.html +2 -2
- package/dist/docker-host-addresses.d.ts +23 -3
- package/dist/docker-host-addresses.js +90 -18
- package/dist/errors.d.ts +4 -0
- package/dist/errors.js +7 -0
- package/dist/exa-keyless.d.ts +2 -3
- package/dist/exa-keyless.js +43 -127
- package/dist/firecrawl-keyless.d.ts +41 -0
- package/dist/firecrawl-keyless.js +152 -0
- package/dist/github-connection.d.ts +50 -1
- package/dist/github-connection.js +96 -3
- package/dist/github-faux.d.ts +11 -2
- package/dist/github-faux.js +138 -7
- package/dist/github-pull-request.d.ts +37 -0
- package/dist/github-pull-request.js +110 -0
- package/dist/handed-secret.d.ts +3 -1
- package/dist/handed-secret.js +4 -2
- package/dist/harness-keys.d.ts +98 -0
- package/dist/harness-keys.js +247 -0
- package/dist/harness-recipe-entry.d.ts +14 -9
- package/dist/harness-recipe-entry.js +25 -14
- package/dist/harness-table.d.ts +16 -1
- package/dist/harness-table.js +19 -7
- package/dist/harness.d.ts +4 -0
- package/dist/harness.js +12 -1
- package/dist/host-check.d.ts +2 -0
- package/dist/host-check.js +6 -0
- package/dist/import-summary.d.ts +1 -1
- package/dist/import-summary.js +1 -1
- package/dist/import.d.ts +5 -5
- package/dist/import.js +54 -67
- package/dist/keyless-mcp.d.ts +36 -0
- package/dist/keyless-mcp.js +127 -0
- package/dist/learn/audit.d.ts +3 -3
- package/dist/learn/audit.js +3 -3
- package/dist/learn/commit.d.ts +8 -7
- package/dist/learn/commit.js +60 -20
- package/dist/learn/compile.d.ts +4 -3
- package/dist/learn/compile.js +7 -5
- package/dist/learn/folder.d.ts +16 -3
- package/dist/learn/folder.js +46 -13
- package/dist/learn/promote.d.ts +37 -13
- package/dist/learn/promote.js +112 -40
- package/dist/learn/secrets.js +10 -2
- package/dist/learning-routes.d.ts +22 -17
- package/dist/learning-routes.js +40 -39
- package/dist/learning.js +2 -2
- package/dist/live-reach.d.ts +34 -7
- package/dist/live-reach.js +76 -11
- package/dist/manifest.d.ts +10 -0
- package/dist/manifest.js +30 -0
- package/dist/mcp-pin-first.d.ts +4 -2
- package/dist/mcp-pin-first.js +5 -2
- package/dist/mcp-probe.js +2 -2
- package/dist/mcp-secret-writes.d.ts +16 -7
- package/dist/mcp-secret-writes.js +35 -27
- package/dist/mcp-servers-store.d.ts +30 -6
- package/dist/mcp-servers-store.js +112 -28
- package/dist/mcp-sources.d.ts +10 -2
- package/dist/mcp-sources.js +9 -2
- package/dist/mcp-store.d.ts +13 -7
- package/dist/mcp-store.js +12 -9
- package/dist/model-form.d.ts +3 -2
- package/dist/model-form.js +11 -7
- package/dist/model.d.ts +20 -4
- package/dist/model.js +68 -9
- package/dist/native/history.d.ts +1 -1
- package/dist/native/history.js +2 -2
- package/dist/ollama-provider.d.ts +92 -0
- package/dist/ollama-provider.js +495 -0
- package/dist/openapi/agentrun-v2.openapi.json +2 -2
- package/dist/openapi.js +235 -41
- package/dist/page.d.ts +11 -3
- package/dist/page.js +22 -7
- package/dist/place-offers.d.ts +17 -1
- package/dist/place-offers.js +46 -5
- package/dist/print.js +1 -1
- package/dist/purged-workflow.d.ts +35 -7
- package/dist/purged-workflow.js +73 -26
- package/dist/run-computer.d.ts +2 -0
- package/dist/run-computer.js +2 -0
- package/dist/run-files.d.ts +4 -0
- package/dist/run-files.js +4 -0
- package/dist/run-keys.d.ts +2 -4
- package/dist/run-keys.js +6 -7
- package/dist/run-launch.d.ts +4 -0
- package/dist/run-launch.js +4 -0
- package/dist/run-reads-over-store.d.ts +3 -2
- package/dist/run-reads-over-store.js +66 -2
- package/dist/run-secrets.js +5 -2
- package/dist/runner/adapter-loop.d.ts +6 -3
- package/dist/runner/adapter-loop.js +34 -15
- package/dist/runner/adapter-run-spec.d.ts +3 -0
- package/dist/runner/adapter-run-spec.js +6 -4
- package/dist/runner/audit.js +8 -4
- package/dist/runner/beside.d.ts +2 -1
- package/dist/runner/beside.js +6 -2
- package/dist/runner/claim-secrets.d.ts +5 -8
- package/dist/runner/claim-secrets.js +6 -0
- package/dist/runner/cli-run-spec.d.ts +1 -1
- package/dist/runner/cli-run-spec.js +39 -7
- package/dist/runner/harness-loops.d.ts +22 -9
- package/dist/runner/harness-loops.js +21 -11
- package/dist/runner/held.d.ts +3 -0
- package/dist/runner/learning-end.d.ts +1 -1
- package/dist/runner/learning-end.js +8 -3
- package/dist/runner/loop-contract.d.ts +5 -4
- package/dist/runner/main.js +4 -2
- package/dist/runner/mcp-claim.d.ts +3 -0
- package/dist/runner/mcp-claim.js +26 -2
- package/dist/runner/mcp-run.d.ts +3 -0
- package/dist/runner/mcp-run.js +2 -1
- package/dist/runner/metrics.d.ts +10 -8
- package/dist/runner/metrics.js +20 -27
- package/dist/runner/model-route.d.ts +3 -0
- package/dist/runner/model-route.js +6 -2
- package/dist/runner/pr-checkout.d.ts +21 -4
- package/dist/runner/pr-checkout.js +103 -4
- package/dist/runner/promotion.d.ts +15 -9
- package/dist/runner/promotion.js +25 -15
- package/dist/runner/run-child-host.js +24 -11
- package/dist/runner/run-child.js +3 -1
- package/dist/runner/runner-check.d.ts +3 -0
- package/dist/runner/runner-check.js +23 -0
- package/dist/runner/sdk-loop.js +2 -0
- package/dist/runner/workflow-loop.d.ts +2 -2
- package/dist/runner/workflow-loop.js +1 -2
- package/dist/runner/workflow-spec.d.ts +1 -1
- package/dist/runner/workflow-spec.js +6 -6
- package/dist/sdk/check.d.ts +4 -1
- package/dist/sdk/check.js +2 -1
- package/dist/sdk/runs.d.ts +2 -2
- package/dist/sdk/runs.js +8 -6
- package/dist/secret-cut.js +2 -1
- package/dist/secret-writes.d.ts +3 -2
- package/dist/secret-writes.js +1 -1
- package/dist/server.d.ts +55 -8
- package/dist/server.js +363 -118
- package/dist/standard-webhooks.d.ts +11 -0
- package/dist/standard-webhooks.js +20 -2
- package/dist/store/agent-body.d.ts +2 -2
- package/dist/store/agent-body.js +2 -2
- package/dist/store/index.d.ts +1 -1
- package/dist/store/schema.js +5 -2
- package/dist/store/sqlite/store.js +90 -34
- package/dist/store/store.d.ts +54 -14
- package/dist/store-reads/journal.d.ts +7 -2
- package/dist/store-reads/journal.js +9 -6
- package/dist/store-reads/learning.d.ts +12 -9
- package/dist/store-reads/learning.js +18 -24
- package/dist/store-view.d.ts +0 -5
- package/dist/store-view.js +9 -8
- package/dist/suggestions.d.ts +282 -0
- package/dist/suggestions.js +919 -0
- package/dist/telemetry.d.ts +8 -1
- package/dist/telemetry.js +12 -4
- package/dist/template-eval.d.ts +49 -4
- package/dist/template-eval.js +168 -45
- package/dist/template-import.d.ts +17 -0
- package/dist/template-import.js +36 -2
- package/dist/templates.d.ts +83 -76
- package/dist/templates.js +29 -48
- package/dist/timeline/labels.d.ts +2 -2
- package/dist/timeline/labels.js +2 -2
- package/dist/timeline/timeline.d.ts +2 -2
- package/dist/timeline/timeline.js +1 -1
- package/dist/tool-plane.d.ts +17 -9
- package/dist/tool-plane.js +38 -17
- package/dist/tools.js +2 -2
- package/dist/trigger-launch-hook.d.ts +19 -9
- package/dist/trigger-launch-hook.js +35 -25
- package/dist/trigger-targets.d.ts +18 -8
- package/dist/trigger-targets.js +42 -19
- package/dist/triggers.d.ts +85 -23
- package/dist/triggers.js +303 -96
- package/dist/validate.d.ts +1 -1
- package/dist/validate.js +2 -2
- package/dist/web-fake.js +3 -3
- package/dist/web-fetch-direct.d.ts +4 -0
- package/dist/web-fetch-direct.js +8 -1
- package/dist/web-fetch.d.ts +12 -3
- package/dist/web-fetch.js +47 -14
- package/dist/web-search.d.ts +33 -4
- package/dist/web-search.js +100 -41
- package/dist/webhooks.js +4 -5
- package/dist/workspace/synced-folder.d.ts +1 -1
- package/dist/workspace/synced-folder.js +11 -14
- package/launcher/agentrun-serve +5 -1
- package/package.json +17 -13
- package/templates/README.md +5 -4
- package/templates/agent-scout/agent.md +46 -0
- package/templates/agent-scout/skills/scout/SKILL.md +88 -0
- package/templates/agent-scout/skills/scout/suggestions.schema.json +112 -0
- package/dist/console/assets/index-BFgyZzF_.js +0 -734
- package/dist/console/assets/index-DbilxljH.css +0 -1
- package/dist/import-sources.d.ts +0 -116
- package/dist/import-sources.js +0 -693
|
@@ -15,7 +15,7 @@ import { defineExtension, ROOT_CONVERSATION_ID, wrapTool } from "@earendil-works
|
|
|
15
15
|
import { chargedCost, DecisionProviderError, EffectFailure, inspectWorkflow } from "@parcha/agentrun-dsl";
|
|
16
16
|
import { modelPortFor } from "@parcha/agentrun-kernel";
|
|
17
17
|
import { startModelProxy } from "@parcha/agentrun-kernel/host";
|
|
18
|
-
import { CapRefused, checkRaise, DecisionPriceUnreadable, DECISION_SESSION, followUpOf, freeCeilingMessage, freeRequestLimitOf, parkOf, runCap } from "@parcha/agentrun-kernel/kernel/cap";
|
|
18
|
+
import { CapRefused, checkRaise, DecisionPriceUnreadable, DECISION_SESSION, followUpOf, freeCeilingMessage, freeRequestLimitOf, maxRequestsOf, parkOf, runCap } from "@parcha/agentrun-kernel/kernel/cap";
|
|
19
19
|
import { completer } from "../llm.js";
|
|
20
20
|
// The decision providers' list prices, the catalog's read and the replay check (decision-cap.ts), with holdOf, which the
|
|
21
21
|
// parity tests hold this cap's figures to.
|
|
@@ -43,7 +43,7 @@ import { KINDS, NODE_LOG_SESSION, WORKFLOW_SESSION } from "./journal-kinds.js";
|
|
|
43
43
|
import { cutStrings } from "../key-refusal.js";
|
|
44
44
|
import { CLOSE_MS } from "./loop.js";
|
|
45
45
|
import { PAUSED_WORDS } from "./workflow-loop.js";
|
|
46
|
-
import {
|
|
46
|
+
import { holdClaimed } from "./redact.js";
|
|
47
47
|
import { holdStored } from "./store-secrets.js";
|
|
48
48
|
import { workflowHost } from "./workflow-host.js";
|
|
49
49
|
import { SUBMIT_TOOL } from "../workflow/host-tools.js";
|
|
@@ -140,7 +140,7 @@ export function workflowSpecOf(deps) {
|
|
|
140
140
|
const holding = async (opening) => {
|
|
141
141
|
const opened = await opening;
|
|
142
142
|
if (run?.redact)
|
|
143
|
-
holdClaimed(
|
|
143
|
+
holdClaimed(run.redact, opened);
|
|
144
144
|
return opened;
|
|
145
145
|
};
|
|
146
146
|
const claimed = await readClaim(deps, claim.runId);
|
|
@@ -153,7 +153,7 @@ export function workflowSpecOf(deps) {
|
|
|
153
153
|
throw new Error(nodeToolUnboundText(unbound));
|
|
154
154
|
// Every secret the server keeps sealed (store-secrets.ts) held by the runner's one redactor before the workflow runs.
|
|
155
155
|
if (run?.redact && deps.sealKey)
|
|
156
|
-
await holdStored(
|
|
156
|
+
await holdStored(run.redact, deps.store, deps.sealKey, deps.data);
|
|
157
157
|
const tiers = tiersOf(claimed.workflow);
|
|
158
158
|
// The run's own keys, as the server's runnable check reads them: each by its name from the runner's environment first,
|
|
159
159
|
// then the store's sealed value (claim-secrets.ts; the environment wins, rule 4), scoped to what the run needs. Its
|
|
@@ -171,7 +171,7 @@ export function workflowSpecOf(deps) {
|
|
|
171
171
|
if (keyedAtClaim(runKey))
|
|
172
172
|
withoutModelKeys(claimedEnv);
|
|
173
173
|
if (runKey && run?.redact)
|
|
174
|
-
holdRunKey(
|
|
174
|
+
holdRunKey(run.redact, runKey);
|
|
175
175
|
const providerOf = deps.providerOf ?? routeProviderOf(claimModelEnv(deps.env ?? process.env, claimedEnv, runKey, claim));
|
|
176
176
|
// Each tier's provider and cap model, resolved once; the proxies start here (before the Harness opens, since the models
|
|
177
177
|
// catalog the Harness takes points at them), their hooks deferred to the booking wired at harnessReady.
|
|
@@ -342,7 +342,7 @@ export function workflowSpecOf(deps) {
|
|
|
342
342
|
const writer = await sessions.open(SESSION);
|
|
343
343
|
// Its model nodes' requests on free models count toward the run's limit of them, capped or not. A step waiting for
|
|
344
344
|
// room under it (a map's branch, beside its siblings' holds) leaves at the run's stop or park, unsent.
|
|
345
|
-
const run = runCap({ sessions: sessions, capUsd: () => effectiveCapUsd, modelOf: capModelOf, freeRequests: freeRequestLimitOf(deps.env ?? process.env, claimed.revision.body.maxRequests), ...(context.abortSignal ? { stopped: context.abortSignal } : {}) });
|
|
345
|
+
const run = runCap({ sessions: sessions, capUsd: () => effectiveCapUsd, modelOf: capModelOf, freeRequests: freeRequestLimitOf(deps.env ?? process.env, claimed.revision.body.maxRequests), ...(maxRequestsOf(claimed.revision.body.maxRequests) === undefined ? {} : { maxRequests: maxRequestsOf(claimed.revision.body.maxRequests) }), ...(context.abortSignal ? { stopped: context.abortSignal } : {}) });
|
|
346
346
|
booking = await modelPortFor(writer, {
|
|
347
347
|
key: SESSION,
|
|
348
348
|
label: SESSION,
|
package/dist/sdk/check.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Shown } from "../learning.js";
|
|
2
|
+
import { type PromotionDeps } from "../runner/promotion.js";
|
|
2
3
|
import type { RunLaunch } from "../run-launch.js";
|
|
3
4
|
import type { Store } from "../store/store.js";
|
|
4
5
|
import type { SdkInbox } from "./runs.js";
|
|
@@ -21,7 +22,8 @@ export type SdkWorkflowCheckEvent = {
|
|
|
21
22
|
* the check (sdkCheckTurn: kept until the check holds compile_after rows, the one that makes compile_after deciding on
|
|
22
23
|
* them all); any other turn is given back (releaseSdkCheck) and the check waits for the next turn; a turn the backend
|
|
23
24
|
* never completed before its inbox expired is one failed row (sdkCheckDeadline). Exact retries and reclaims compete on
|
|
24
|
-
* the reservation.
|
|
25
|
+
* the reservation. `refused`: what the purge gate refuses of the records, so the promotions trim keeps the champion its
|
|
26
|
+
* readers serve (purged-workflow.ts refusedIn). */
|
|
25
27
|
export declare function settleSdkCheck(deps: {
|
|
26
28
|
store: Store;
|
|
27
29
|
agentId: string;
|
|
@@ -29,4 +31,5 @@ export declare function settleSdkCheck(deps: {
|
|
|
29
31
|
inbox: SdkInbox;
|
|
30
32
|
shown: () => Promise<Shown>;
|
|
31
33
|
log: (line: string) => void;
|
|
34
|
+
refused?: PromotionDeps["refused"];
|
|
32
35
|
}): Promise<import("../learn/promote.js").Recorded | undefined>;
|
package/dist/sdk/check.js
CHANGED
|
@@ -25,7 +25,8 @@ function notBaseline(inbox, reported) {
|
|
|
25
25
|
* the check (sdkCheckTurn: kept until the check holds compile_after rows, the one that makes compile_after deciding on
|
|
26
26
|
* them all); any other turn is given back (releaseSdkCheck) and the check waits for the next turn; a turn the backend
|
|
27
27
|
* never completed before its inbox expired is one failed row (sdkCheckDeadline). Exact retries and reclaims compete on
|
|
28
|
-
* the reservation.
|
|
28
|
+
* the reservation. `refused`: what the purge gate refuses of the records, so the promotions trim keeps the champion its
|
|
29
|
+
* readers serve (purged-workflow.ts refusedIn). */
|
|
29
30
|
export async function settleSdkCheck(deps) {
|
|
30
31
|
const { inbox } = deps;
|
|
31
32
|
const check = inbox.learning_check;
|
package/dist/sdk/runs.d.ts
CHANGED
|
@@ -131,8 +131,8 @@ export declare class SdkRuns {
|
|
|
131
131
|
workflows: LearnedWorkflow[];
|
|
132
132
|
};
|
|
133
133
|
}>;
|
|
134
|
-
/** The purged run (
|
|
135
|
-
*
|
|
134
|
+
/** The purged run (purgeGate) that wrote a workflow of `pinned`, each read at the learning commit a start took its
|
|
135
|
+
* text from. One read-only exec per commit. */
|
|
136
136
|
private purgedPinned;
|
|
137
137
|
/** The workflows a start delivers and the learning commit each was read at (`commits`: the seed's, or its champion
|
|
138
138
|
* record's), and the drafts a check may take. */
|
package/dist/sdk/runs.js
CHANGED
|
@@ -18,7 +18,7 @@ import { secretRedactor } from "../runner/redact.js";
|
|
|
18
18
|
import { redactedOutput } from "../key-refusal.js";
|
|
19
19
|
import { decodedStrings, draftProblems } from "../learn/workflow-draft.js";
|
|
20
20
|
import { snapshotAt } from "../learn/folder.js";
|
|
21
|
-
import { purgedRun,
|
|
21
|
+
import { purgedRun, purgeGate, refusedIn, refusedOf } from "../purged-workflow.js";
|
|
22
22
|
import { sdkWorkflowManifest, sdkDraftTools } from "./workflows.js";
|
|
23
23
|
import { promotionOf, promotionsOf, resetAtOf } from "../learn/promote.js";
|
|
24
24
|
import { championTextOf, releaseSdkCheck, reserveSdkCheck } from "../runner/promotion.js";
|
|
@@ -308,7 +308,7 @@ export class SdkRuns {
|
|
|
308
308
|
// A turn is a check only when it can be one's baseline: no protected value in its task or policy, and an input the
|
|
309
309
|
// draft takes (sdkTakes). A prose turn whose input the client cannot resolve is given back (releaseSdkCheck).
|
|
310
310
|
const takes = (flow) => !redacted && sdkTakes(flow, input, resolveSchemaForWorkflow);
|
|
311
|
-
const checkDeps = { store: this.store, agentId: entry.agent.id, log: () => { }, shown: async () => secretsShown(this.secrets(), { local: true }) };
|
|
311
|
+
const checkDeps = { store: this.store, agentId: entry.agent.id, log: () => { }, shown: async () => secretsShown(this.secrets(), { local: true }), refused: refusedIn(() => learningFolderOf(this.data, entry.agent.id), this.store) };
|
|
312
312
|
const check = learning ? await reserveSdkCheck(checkDeps, { runId, revision: learning.seed, learning: revisionBody.learning, flows: selected.candidates, takes }) : undefined;
|
|
313
313
|
// A shadow check needs the original agent's own answer, not an answer produced by its existing champion.
|
|
314
314
|
const workflows = check ? [] : selected.workflows;
|
|
@@ -407,15 +407,15 @@ export class SdkRuns {
|
|
|
407
407
|
},
|
|
408
408
|
};
|
|
409
409
|
}
|
|
410
|
-
/** The purged run (
|
|
411
|
-
*
|
|
410
|
+
/** The purged run (purgeGate) that wrote a workflow of `pinned`, each read at the learning commit a start took its
|
|
411
|
+
* text from. One read-only exec per commit. */
|
|
412
412
|
async purgedPinned(agentId, pinned) {
|
|
413
413
|
if (pinned.length === 0)
|
|
414
414
|
return undefined;
|
|
415
415
|
const folder = learningFolderOf(this.data, agentId);
|
|
416
416
|
try {
|
|
417
417
|
const reads = new Map();
|
|
418
|
-
const at = (commit) => reads.get(commit) ?? reads.set(commit, snapshotAt(folder.workspace, commit).then((snapshot) =>
|
|
418
|
+
const at = (commit) => reads.get(commit) ?? reads.set(commit, snapshotAt(folder.workspace, commit).then(async (snapshot) => (await purgeGate(snapshot, this.store)).workflows)).get(commit);
|
|
419
419
|
for (const [flow, commit] of pinned) {
|
|
420
420
|
const row = (await at(commit)).get(flow.name);
|
|
421
421
|
if (row)
|
|
@@ -447,8 +447,10 @@ export class SdkRuns {
|
|
|
447
447
|
};
|
|
448
448
|
const workflows = [], candidates = [], commits = {};
|
|
449
449
|
const atCommit = async (name, commit) => chooseWorkflows(await seedAt(folder.workspace, commit, this.store), secretsShown(this.secrets(), { local: true })).flows.find((one) => one.name === name);
|
|
450
|
+
// The champion skips a record the purge gate refuses at its commit (purged-workflow.ts refusedOf), as a claim's does.
|
|
451
|
+
const refused = async (all, names) => refusedOf(all, names ?? all.map((one) => one.workflow), folder.workspace, this.store);
|
|
450
452
|
for (const flow of flows) {
|
|
451
|
-
const { text: serving, champion } = await championTextOf(records, flow, atCommit);
|
|
453
|
+
const { text: serving, champion } = await championTextOf(records, flow, atCommit, refused);
|
|
452
454
|
if (serving && compatible(serving)) {
|
|
453
455
|
workflows.push(serving);
|
|
454
456
|
commits[serving.name] = serving === flow ? seed.sha : champion.commit;
|
package/dist/secret-cut.js
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
// cut, for what the importer writes (a transcript can hold a key a tool printed or was given). The import adds the keys
|
|
3
3
|
// secretlint finds in what it reads (`secretsIn`): keys of a known format, whoever's they are.
|
|
4
4
|
import { lintSource } from "@secretlint/core";
|
|
5
|
+
// The recommended preset's rules, built into core since secretlint v14 (the preset's own package is deprecated).
|
|
6
|
+
import { recommendedRules as recommended } from "@secretlint/core/builtin";
|
|
5
7
|
import { secretLintProfiler } from "@secretlint/profiler";
|
|
6
|
-
import { rules as recommended } from "@secretlint/secretlint-rule-preset-recommend";
|
|
7
8
|
// No performance marks: the profiler would leave about 14 a call in the process's global buffer.
|
|
8
9
|
secretLintProfiler.setEnabled(false);
|
|
9
10
|
import { keyShaped } from "./secret-name.js";
|
package/dist/secret-writes.d.ts
CHANGED
|
@@ -63,10 +63,11 @@ export type SecretPredicate = (body: unknown) => boolean;
|
|
|
63
63
|
/** What a request is besides its body, for a predicate that must read what is stored: the route's path parameters (in
|
|
64
64
|
* the order its pattern names them) and the server's one store. `seen`: what the predicate read to let the request
|
|
65
65
|
* through, which the dispatch hands its operation, so a write allowed against one stored state is refused when that
|
|
66
|
-
* state changed before the write lands. */
|
|
66
|
+
* state changed before the write lands. `apiOnly`: the server is API-only (api-only.ts), with no owner to write one. */
|
|
67
67
|
export type SecretRequest = {
|
|
68
68
|
readonly params: readonly string[];
|
|
69
69
|
readonly store: unknown;
|
|
70
|
+
readonly apiOnly?: boolean;
|
|
70
71
|
seen?: unknown;
|
|
71
72
|
};
|
|
72
73
|
/** Whether a request writes a secret by what it would do to what is stored (drop or replace a sealed credential), read
|
|
@@ -139,7 +140,7 @@ export declare const SECRET_META_SCHEMA: {
|
|
|
139
140
|
readonly name: {
|
|
140
141
|
readonly type: "string";
|
|
141
142
|
readonly pattern: "^[a-z][a-z0-9-]*(:[^:]+)+$";
|
|
142
|
-
readonly description: "The secret's name, \"<plane>:<id>\": a lowercase plane and the id as the plane keys it, joined with \":\": tool:<KEY_NAME>, model:<KEY_NAME>, mcp:<server> (several of one server: mcp:<server>:<field>), computer:<provider>:<KEY>, workspace:archil, trigger:<id>, webhook:outbound, github:app, source:<adapter>:<field>. An object holding one secret carries it as `secret`, one holding several as `secrets`.";
|
|
143
|
+
readonly description: "The secret's name, \"<plane>:<id>\": a lowercase plane and the id as the plane keys it, joined with \":\": tool:<KEY_NAME>, model:<KEY_NAME>, mcp:<server> (several of one server: mcp:<server>:<field>), computer:<provider>:<KEY>, harness:<harness>:<KEY>, workspace:archil, trigger:<id>, webhook:outbound, github:app, source:<adapter>:<field>. An object holding one secret carries it as `secret`, one holding several as `secrets`.";
|
|
143
144
|
};
|
|
144
145
|
readonly set: {
|
|
145
146
|
readonly type: "boolean";
|
package/dist/secret-writes.js
CHANGED
|
@@ -160,7 +160,7 @@ export const SECRET_META_SCHEMA = {
|
|
|
160
160
|
required: ["name", "set", "source", "changed_at"],
|
|
161
161
|
description: "What a secret's view says of it: its name, whether it is set, where it came from, and when it last changed. Never a value, a prefix, a length or a hash.",
|
|
162
162
|
properties: {
|
|
163
|
-
name: { type: "string", pattern: "^[a-z][a-z0-9-]*(:[^:]+)+$", description: "The secret's name, \"<plane>:<id>\": a lowercase plane and the id as the plane keys it, joined with \":\": tool:<KEY_NAME>, model:<KEY_NAME>, mcp:<server> (several of one server: mcp:<server>:<field>), computer:<provider>:<KEY>, workspace:archil, trigger:<id>, webhook:outbound, github:app, source:<adapter>:<field>. An object holding one secret carries it as `secret`, one holding several as `secrets`." },
|
|
163
|
+
name: { type: "string", pattern: "^[a-z][a-z0-9-]*(:[^:]+)+$", description: "The secret's name, \"<plane>:<id>\": a lowercase plane and the id as the plane keys it, joined with \":\": tool:<KEY_NAME>, model:<KEY_NAME>, mcp:<server> (several of one server: mcp:<server>:<field>), computer:<provider>:<KEY>, harness:<harness>:<KEY>, workspace:archil, trigger:<id>, webhook:outbound, github:app, source:<adapter>:<field>. An object holding one secret carries it as `secret`, one holding several as `secrets`." },
|
|
164
164
|
set: { type: "boolean", description: "Whether a value is set." },
|
|
165
165
|
source: { enum: ["env", "console", "sign-in", null], description: "Where it came from: env, the environment the server starts with (which always wins, by the same name, and greys the console's field); console, pasted in the console by the owner's session; sign-in, obtained by an OAuth sign-in or Connect. null when not set." },
|
|
166
166
|
changed_at: { type: ["string", "null"], format: "date-time", description: "When the credential itself last changed (pasted, signed in, rotated); null when not set or not known." },
|
package/dist/server.d.ts
CHANGED
|
@@ -8,9 +8,11 @@ import { type LearningMode } from "./learning.js";
|
|
|
8
8
|
import { type Place } from "./place.js";
|
|
9
9
|
import { type ApiToken } from "./api-token.js";
|
|
10
10
|
import { type Store } from "./store/index.js";
|
|
11
|
-
import { type BoxOffer } from "./place-offers.js";
|
|
11
|
+
import { type BoxOffer, type ContainerFacts } from "./place-offers.js";
|
|
12
|
+
import { type Wait } from "./docker-host-addresses.js";
|
|
12
13
|
import { type StoredKeys } from "./secrets.js";
|
|
13
14
|
import { type ComposioControl } from "./composio-preset.js";
|
|
15
|
+
import type { UsageEventName } from "./telemetry.js";
|
|
14
16
|
import type { TriggerAdapter } from "./trigger-adapter.js";
|
|
15
17
|
import { type TriggerClock } from "./triggers.js";
|
|
16
18
|
import type { LaunchHook } from "./trigger-launch-hook.js";
|
|
@@ -27,6 +29,9 @@ export type ServeOptions = {
|
|
|
27
29
|
/** On Postgres: told when this server's owner lock is lost for good (another server took the schema, or the lock could
|
|
28
30
|
* not be taken back): every store call is refused from then. The CLI exits 1 on it, so the platform restarts the server. */
|
|
29
31
|
onStoreLost?: (error: Error) => void;
|
|
32
|
+
/** Told when someone uses a feature the anonymous counts name (telemetry.ts UsageEventName: a suggestions scan, a
|
|
33
|
+
* discard, a suggested agent created). The CLI hands it the counts' `used`; it hears the event's name and nothing else. */
|
|
34
|
+
onUsage?: (event: UsageEventName) => void;
|
|
30
35
|
/** The owner, signed in with a password (owner.ts): the page asks for it, and the token stays for scripts and the CLI. */
|
|
31
36
|
accounts?: boolean;
|
|
32
37
|
/** With accounts: the first visit sets the password with no setup code (a server with no public address). Honored only
|
|
@@ -142,6 +147,10 @@ export type ServeOptions = {
|
|
|
142
147
|
/** With `faux` only: a module whose default export is the fetch web_search's keyless Exa search sends through, in place
|
|
143
148
|
* of Exa's MCP endpoint (exa-keyless.ts). */
|
|
144
149
|
fauxExa?: string;
|
|
150
|
+
/** With `faux` only: the URL of a fake MCP server (a test's, on loopback) that web_search's and web_fetch's keyless
|
|
151
|
+
* Firecrawl ask in place of Firecrawl's endpoint (firecrawl-keyless.ts). A URL, not a module: it is passed as given.
|
|
152
|
+
* Under `faux` with none, keyless Firecrawl is never asked. */
|
|
153
|
+
fauxFirecrawl?: string;
|
|
145
154
|
/** A module of harness table entries merged over the built-in ones (harness-table.ts HARNESS_TABLE_ENV): a test's
|
|
146
155
|
* stand-ins for the harnesses. */
|
|
147
156
|
harnessTable?: string;
|
|
@@ -165,6 +174,12 @@ export type ServeOptions = {
|
|
|
165
174
|
/** Under `faux`: a file read as this server's /proc/self/mountinfo (box-paths.ts), a container's in a test; absent (and
|
|
166
175
|
* no FAUX_MOUNTINFO_ENV), a faux server is on a host. */
|
|
167
176
|
fauxMountinfo?: string;
|
|
177
|
+
/** For tests: whether Docker's start probe takes this server to be in a container (place-offers.ts containerReason),
|
|
178
|
+
* in place of its own marks; a faux server's is a host's. */
|
|
179
|
+
probeContainer?: ContainerFacts;
|
|
180
|
+
/** For tests: the wait before each read again of the Docker host's addresses after the start's failed
|
|
181
|
+
* (docker-host-addresses.ts retryHostAddresses), in place of the backoff's timer. */
|
|
182
|
+
hostReadWait?: Wait;
|
|
168
183
|
/** Extra `Host` names to accept besides the loopback ones, on any port (host-check.ts). */
|
|
169
184
|
allowHosts?: string[];
|
|
170
185
|
/** The console's built files, answered at / (default dist/console beside the server, which this package's build copies
|
|
@@ -215,6 +230,9 @@ export type ServeOptions = {
|
|
|
215
230
|
githubApi?: string;
|
|
216
231
|
/** A test's seam: the origin a github_app MCP server may have (default GitHub's hosted MCP: github.ts GITHUB_MCP_ORIGIN). */
|
|
217
232
|
githubMcpOrigin?: string;
|
|
233
|
+
/** A test's seam: the one origin a Composio key read from the environment is sent to (default Composio's:
|
|
234
|
+
* composio-made.ts COMPOSIO_ORIGIN). */
|
|
235
|
+
composioMcpOrigin?: string;
|
|
218
236
|
/** A test's seam: how long a hook's body has to arrive, whole (default 30 s: push-handler.ts HOOK_BODY_MS). */
|
|
219
237
|
hookBodyMs?: number;
|
|
220
238
|
/** A test's seam: awaited by a message (a person's, or a trigger's firing) once its checks have passed and just before its
|
|
@@ -294,10 +312,20 @@ export type Serve = {
|
|
|
294
312
|
* it is this process's finding, never a store's, so another runner on a shared store never inherits it. A runner in
|
|
295
313
|
* its own process takes its own operator's opt-in from its own environment (runner/main.ts runnerLoopback). */
|
|
296
314
|
localInstall: boolean;
|
|
315
|
+
/** The OLLAMA_HOST its runner beside it asks (ollama-provider.ts ollamaHostOf): this server's own, else the default
|
|
316
|
+
* address where this is one owner's own machine; none on a shared one that names none (runner/beside.ts ollamaHost). */
|
|
317
|
+
ollamaHost: string | undefined;
|
|
297
318
|
/** This server's own addresses (McpServersOverStore.own): where it listens, and its public address when that is on
|
|
298
319
|
* loopback. The runner beside it is told them with localInstall (runner/beside.ts mcpOwn), so its runs' loopback reads
|
|
299
320
|
* never reach this server, as its own reads never do. */
|
|
300
321
|
own: readonly string[];
|
|
322
|
+
/** With --faux-github: the fake GitHub's API and its repository's site, for a test's own runner alone
|
|
323
|
+
* (test/support.mjs): the runner's GitHub API has one way in, a test runner's option, so neither the CLI's runner nor
|
|
324
|
+
* any setting is ever pointed at it. */
|
|
325
|
+
fauxGitHub?: {
|
|
326
|
+
api: string;
|
|
327
|
+
web?: string;
|
|
328
|
+
};
|
|
301
329
|
/** What a stop waits on: the runs whose processes still finish their turn, and the longest it waits on them. */
|
|
302
330
|
stopping(): {
|
|
303
331
|
runs: number;
|
|
@@ -364,11 +392,11 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
|
|
|
364
392
|
run_isolation: "uid" | "process";
|
|
365
393
|
/** The harnesses a revision may name (`definition.harness`), whether this server runs each, and how many at once. */
|
|
366
394
|
harnesses: {
|
|
395
|
+
available: boolean;
|
|
367
396
|
max_concurrent_runs: number;
|
|
368
397
|
id: string;
|
|
369
398
|
label: string;
|
|
370
399
|
promises: import("./harness-table.js").HarnessPromises;
|
|
371
|
-
available: boolean;
|
|
372
400
|
steer: boolean;
|
|
373
401
|
reason?: string;
|
|
374
402
|
default_model: string | null;
|
|
@@ -596,6 +624,13 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
|
|
|
596
624
|
routes: boolean;
|
|
597
625
|
at_rest: string;
|
|
598
626
|
};
|
|
627
|
+
/** GET /settings/harness-keys and PUT/DELETE of one key: a plan-billed recipe's keys, saved for that harness alone
|
|
628
|
+
* (harness-keys.ts); `harnesses` its ids here, so the console offers the page only where there is one. */
|
|
629
|
+
harness_keys: {
|
|
630
|
+
routes: boolean;
|
|
631
|
+
at_rest: string;
|
|
632
|
+
harnesses: string[];
|
|
633
|
+
};
|
|
599
634
|
/** /settings/mcp-servers: remote MCP servers previewed and saved, each credential sealed under the server's seal key,
|
|
600
635
|
* which always exists (seal-key.ts), so MCP credentials are always kept sealed. Every harness of the table runs a
|
|
601
636
|
* grant (runnable.ts takes one on any), a module's among them. */
|
|
@@ -692,11 +727,11 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
|
|
|
692
727
|
run_isolation: "uid" | "process";
|
|
693
728
|
/** The harnesses a revision may name (`definition.harness`), whether this server runs each, and how many at once. */
|
|
694
729
|
harnesses: {
|
|
730
|
+
available: boolean;
|
|
695
731
|
max_concurrent_runs: number;
|
|
696
732
|
id: string;
|
|
697
733
|
label: string;
|
|
698
734
|
promises: import("./harness-table.js").HarnessPromises;
|
|
699
|
-
available: boolean;
|
|
700
735
|
steer: boolean;
|
|
701
736
|
reason?: string;
|
|
702
737
|
default_model: string | null;
|
|
@@ -924,6 +959,13 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
|
|
|
924
959
|
routes: boolean;
|
|
925
960
|
at_rest: string;
|
|
926
961
|
};
|
|
962
|
+
/** GET /settings/harness-keys and PUT/DELETE of one key: a plan-billed recipe's keys, saved for that harness alone
|
|
963
|
+
* (harness-keys.ts); `harnesses` its ids here, so the console offers the page only where there is one. */
|
|
964
|
+
harness_keys: {
|
|
965
|
+
routes: boolean;
|
|
966
|
+
at_rest: string;
|
|
967
|
+
harnesses: string[];
|
|
968
|
+
};
|
|
927
969
|
/** /settings/mcp-servers: remote MCP servers previewed and saved, each credential sealed under the server's seal key,
|
|
928
970
|
* which always exists (seal-key.ts), so MCP credentials are always kept sealed. Every harness of the table runs a
|
|
929
971
|
* grant (runnable.ts takes one on any), a module's among them. */
|
|
@@ -1012,11 +1054,16 @@ export declare function forCaller<T extends {
|
|
|
1012
1054
|
}>(caps: T, ownerSession: boolean): T;
|
|
1013
1055
|
/** A start with --harness-sign-in on a server that is not one owner's own, on their own machine. */
|
|
1014
1056
|
export declare const HARNESS_SIGN_IN_NOT_LOCAL = "HARNESS_SIGN_IN_NOT_LOCAL";
|
|
1057
|
+
/** Why `options` on `data` is not one owner's own server on their own machine, each reason in words; none when it is. One
|
|
1058
|
+
* owner's own: it listens on loopback alone, with no public address; its store is the SQLite one in its data directory (no
|
|
1059
|
+
* AGENTRUN_STORE_URL, which servers elsewhere share); its runs run beside it as its own user (`ownUser`:
|
|
1060
|
+
* runIsolationOf's `process`), never under --no-runner or a user of their own; and one person starts them, as Claude
|
|
1061
|
+
* Code's login on this machine asks (claude-login.ts whyNotOneOwner): an owner, and one API token. What --harness-sign-in
|
|
1062
|
+
* starts under (harnessSignInRefusal), and where the Ollama at this machine's default address is a model of the person
|
|
1063
|
+
* who starts runs (ollama-provider.ts ollamaHostOf). */
|
|
1064
|
+
export declare function whyNotOwnMachine(options: Pick<ServeOptions, "host" | "publicUrl" | "runnerApart" | "apiOnly" | "token" | "tokens">, data: string, ownUser: boolean): string[];
|
|
1015
1065
|
/** Why `options` on `data` may not run a recipe on its owner's own sign-in (--harness-sign-in), in words; undefined when
|
|
1016
|
-
* it may
|
|
1017
|
-
*
|
|
1018
|
-
* it as its own user (`ownUser`: runIsolationOf's `process`), never under --no-runner or a user of their own; and one
|
|
1019
|
-
* person starts them, as Claude Code's login on this machine asks (claude-login.ts whyNotOneOwner): an owner, and one
|
|
1020
|
-
* API token. A check, a schedule and a shared server run on a key (HARNESS.md#sign-in). */
|
|
1066
|
+
* it may: one owner's own server on their own machine alone (whyNotOwnMachine). A check, a schedule and a shared server
|
|
1067
|
+
* run on a key (HARNESS.md#sign-in). */
|
|
1021
1068
|
export declare function harnessSignInRefusal(options: Pick<ServeOptions, "host" | "publicUrl" | "runnerApart" | "apiOnly" | "token" | "tokens">, data: string, ownUser: boolean): string | undefined;
|
|
1022
1069
|
export declare function startServe(options: ServeOptions): Promise<Serve>;
|