@tangle-network/agent-runtime 10.0.8 → 10.0.10
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 +26 -0
- package/dist/{activation-Gi19oho7.d.ts → activation-D9ENOWud.d.ts} +2 -2
- package/dist/{activation-pRO-xNlo.js → activation-s2z6kO2P.js} +2 -2
- package/dist/{activation-pRO-xNlo.js.map → activation-s2z6kO2P.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/{delegate-ChsxEeFK.js → delegate-4KpqPGv3.js} +2 -2
- package/dist/{delegate-ChsxEeFK.js.map → delegate-4KpqPGv3.js.map} +1 -1
- package/dist/{driver-control-acknowledgers-DL-lN2Pb.js → driver-control-acknowledgers-Bnbn34Mp.js} +37 -22
- package/dist/driver-control-acknowledgers-Bnbn34Mp.js.map +1 -0
- package/dist/durable.d.ts +1 -1
- package/dist/durable.js +4 -4
- package/dist/{graph-CKdDENlv.js → graph-CDZWVNys.js} +6 -5
- package/dist/{graph-CKdDENlv.js.map → graph-CDZWVNys.js.map} +1 -1
- package/dist/{graph-registry-CRskE_Yp.js → graph-registry-BmghD_VO.js} +5 -2
- package/dist/graph-registry-BmghD_VO.js.map +1 -0
- package/dist/{graph-registry-CGKyYabE.js → graph-registry-DQ2-dA0X.js} +1 -1
- package/dist/{improve-DNOZVLb-.js → improve-D_HT75pe.js} +20 -6
- package/dist/improve-D_HT75pe.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +2 -2
- package/dist/intelligence.js +3 -3
- package/dist/kernel.d.ts +1 -1
- package/dist/kernel.js +11 -11
- package/dist/{loop-runner-CPxQyiWQ.d.ts → loop-runner-AQcWx9uu.d.ts} +2 -2
- package/dist/{loop-runner-DmDW9BKB.js → loop-runner-C_ruSZRz.js} +2 -2
- package/dist/{loop-runner-DmDW9BKB.js.map → loop-runner-C_ruSZRz.js.map} +1 -1
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/mcp/bin.js +2 -2
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +4 -4
- package/dist/profile-Cxl_Ajl2.js.map +1 -1
- package/dist/profiles.d.ts +1 -1
- package/dist/{provision-supervisor-DdsrpA3I.js → provision-supervisor-Cv5X_ITd.js} +3 -3
- package/dist/{provision-supervisor-DdsrpA3I.js.map → provision-supervisor-Cv5X_ITd.js.map} +1 -1
- package/dist/{run-state-CX8OTr-9.js → run-state-BWWardB0.js} +2 -2
- package/dist/{run-state-CX8OTr-9.js.map → run-state-BWWardB0.js.map} +1 -1
- package/dist/{runtime-ERkXbzFe.js → runtime-vv3D3bx6.js} +47 -32
- package/dist/{runtime-ERkXbzFe.js.map → runtime-vv3D3bx6.js.map} +1 -1
- package/dist/{search-executor-DDb4sT3E.js → search-executor-C-kp1eg-.js} +2 -2
- package/dist/{search-executor-DDb4sT3E.js.map → search-executor-C-kp1eg-.js.map} +1 -1
- package/dist/{server-B9tOx3CY.js → server-CqADHr2f.js} +2 -2
- package/dist/{server-B9tOx3CY.js.map → server-CqADHr2f.js.map} +1 -1
- package/dist/{structural-rollout-B6RlFKxq.js → structural-rollout-Ct_uQtGw.js} +2 -2
- package/dist/{structural-rollout-B6RlFKxq.js.map → structural-rollout-Ct_uQtGw.js.map} +1 -1
- package/dist/{supervise-CikShHxF.js → supervise-CRz9bjPA.js} +36 -34
- package/dist/supervise-CRz9bjPA.js.map +1 -0
- package/dist/{supervisor-BvEe3y0c.js → supervisor-B9A_Cnxo.js} +51 -11
- package/dist/supervisor-B9A_Cnxo.js.map +1 -0
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +11 -11
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +1 -1
- package/dist/{types-BYiwLO2L.d.ts → types-Br9sWTWk.d.ts} +11 -2
- package/package.json +5 -5
- package/skills/agent-graphs/SKILL.md +40 -50
- package/skills/be-ambitious/SKILL.md +29 -25
- package/skills/build-with-agent-runtime/SKILL.md +17 -20
- package/skills/graph-designer/SKILL.md +1 -1
- package/skills/profile-authoring/SKILL.md +16 -11
- package/dist/driver-control-acknowledgers-DL-lN2Pb.js.map +0 -1
- package/dist/graph-registry-CRskE_Yp.js.map +0 -1
- package/dist/improve-DNOZVLb-.js.map +0 -1
- package/dist/supervise-CikShHxF.js.map +0 -1
- package/dist/supervisor-BvEe3y0c.js.map +0 -1
|
@@ -15,7 +15,7 @@ import { t as PROTOCOL_VERSION } from "./tool-server-Cb7LBW4e.js";
|
|
|
15
15
|
import { i as notifyRuntimeHookEvent } from "./runtime-hooks-CsW2pfFk.js";
|
|
16
16
|
import { n as encodeResultBlob } from "./result-blob-store-BMMzqpHa.js";
|
|
17
17
|
import { a as recordRootReentered, c as rootMaterializationReceipt, i as changesRootProfile, l as rootStartedAtMs, o as recordRootSegment, r as assertRootIdentity, s as rootExecutionBindingReceipt, t as assertResumeContract } from "./supervisor-root-contract-Ca5xp0Vg.js";
|
|
18
|
-
import { AGENT_PROFILE_MATERIALIZATION_AXES, AgentExactRunControlRefSchema, AgentFileOutputPolicySchema, AgentRetainedFilePublicationSchema, AgentRunCancellationRequestSchema, AgentTurnInputSchema, REASONING_EFFORTS, agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, canonicalWorkspaceCwd, harnessTypeSchema, mergeProxySecretBindings, nativeReasoningControl, profileMaterializationAxes, profileMaterializationAxes as profileMaterializationAxes$1, renderInputPartsAsText, sameAgentRunControlRef, workspaceCwdPathForBase } from "@tangle-network/agent-interface";
|
|
18
|
+
import { AGENT_PROFILE_MATERIALIZATION_AXES, AgentExactRunControlRefSchema, AgentFileOutputPolicySchema, AgentRetainedFilePublicationSchema, AgentRunCancellationRequestSchema, AgentTurnInputSchema, REASONING_EFFORTS, WorkspaceCheckpointRefSchema, agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, canonicalWorkspaceCwd, harnessTypeSchema, mergeProxySecretBindings, nativeReasoningControl, profileMaterializationAxes, profileMaterializationAxes as profileMaterializationAxes$1, renderInputPartsAsText, sameAgentRunControlRef, workspaceCwdPathForBase } from "@tangle-network/agent-interface";
|
|
19
19
|
import { createAgentRunOutcomeTracker } from "@tangle-network/sandbox/runtime";
|
|
20
20
|
import { SDKError, generateIdempotencyKey, isRecord, withRetry } from "@tangle-network/agent-core";
|
|
21
21
|
import { collectAgentFinalMessageText, collectAgentResponseText, isToolBearingEvent } from "@tangle-network/sandbox";
|
|
@@ -7301,7 +7301,42 @@ const cliInPlaceExecutor = (spec, ctx) => {
|
|
|
7301
7301
|
// src/runtime/provider-placement.ts
|
|
7302
7302
|
const placementMetadataKey = "runtimeProviderPlacement";
|
|
7303
7303
|
/** Select exactly one declaration before any provider effects. Shared defaults carry infrastructure only. */
|
|
7304
|
-
function selectProviderPlacement(profile, options) {
|
|
7304
|
+
function selectProviderPlacement(profile, options, node) {
|
|
7305
|
+
const placed = declaredPlacement(profile, options);
|
|
7306
|
+
if (options.checkpointForNode === void 0) return placed;
|
|
7307
|
+
if (!node) throw new ValidationError$1("checkpointForNode requires a supervised node");
|
|
7308
|
+
const value = options.checkpointForNode(detachedSnapshot(node, "checkpointForNode assignment"));
|
|
7309
|
+
if (value === void 0) return placed;
|
|
7310
|
+
const checkpoint = WorkspaceCheckpointRefSchema.parse(value);
|
|
7311
|
+
const defaults = placed.options.defaults ?? {};
|
|
7312
|
+
if (defaults.workspace?.checkpoint && canonicalCandidateDigest(defaults.workspace.checkpoint) !== canonicalCandidateDigest(checkpoint)) throw new ValidationError$1("checkpointForNode disagrees with the declared workspace checkpoint");
|
|
7313
|
+
if (!placed.identity && Object.hasOwn(defaults.metadata ?? {}, placementMetadataKey)) throw new ValidationError$1("checkpointForNode: reserved placement metadata key");
|
|
7314
|
+
const identity = {
|
|
7315
|
+
id: placed.identity?.id ?? "node-workspace",
|
|
7316
|
+
digest: canonicalCandidateDigest({
|
|
7317
|
+
placement: placed.identity ?? null,
|
|
7318
|
+
checkpoint
|
|
7319
|
+
})
|
|
7320
|
+
};
|
|
7321
|
+
return {
|
|
7322
|
+
options: {
|
|
7323
|
+
...placed.options,
|
|
7324
|
+
defaults: {
|
|
7325
|
+
...defaults,
|
|
7326
|
+
workspace: {
|
|
7327
|
+
...defaults.workspace,
|
|
7328
|
+
checkpoint
|
|
7329
|
+
},
|
|
7330
|
+
metadata: {
|
|
7331
|
+
...defaults.metadata,
|
|
7332
|
+
[placementMetadataKey]: identity
|
|
7333
|
+
}
|
|
7334
|
+
}
|
|
7335
|
+
},
|
|
7336
|
+
identity
|
|
7337
|
+
};
|
|
7338
|
+
}
|
|
7339
|
+
function declaredPlacement(profile, options) {
|
|
7305
7340
|
if (options.placements === void 0) return { options };
|
|
7306
7341
|
if (options.defaults?.backend !== void 0 || options.defaults?.secrets !== void 0 || options.promptOptions !== void 0) throw new ValidationError$1("provider placements: backend, secrets and promptOptions belong in each placement");
|
|
7307
7342
|
for (const key of [
|
|
@@ -8813,17 +8848,21 @@ function providerAsSandboxClient(provider, options = {}) {
|
|
|
8813
8848
|
const defaults = options.defaults ?? {};
|
|
8814
8849
|
const sandboxInput = createInputFromSandboxOptions(createOptions, options.mapCreateOptions !== void 0);
|
|
8815
8850
|
const selected = structuredClone(sandboxInput.secrets ?? defaults.secrets);
|
|
8816
|
-
const authored =
|
|
8851
|
+
const authored = createOptions?.backend?.profile ?? defaults.profile;
|
|
8817
8852
|
const bindings = [
|
|
8818
8853
|
defaults.proxySecrets,
|
|
8819
8854
|
sandboxInput.proxySecrets,
|
|
8820
8855
|
typeof authored === "object" ? authored.proxySecrets : void 0
|
|
8821
8856
|
].flatMap((value) => value === void 0 ? [] : [mergeProxySecretBindings(value)]);
|
|
8822
|
-
const customInput =
|
|
8857
|
+
const { profile, ...customInput } = {
|
|
8858
|
+
profile: authored,
|
|
8859
|
+
...options.mapCreateOptions?.(createOptions)
|
|
8860
|
+
};
|
|
8823
8861
|
const mapped = {
|
|
8824
8862
|
...defaults,
|
|
8825
8863
|
...sandboxInput,
|
|
8826
8864
|
...customInput,
|
|
8865
|
+
profile: typeof profile === "object" ? agentProfileSchema.parse(profile) : profile,
|
|
8827
8866
|
...defaults.env || sandboxInput.env || customInput.env ? { env: {
|
|
8828
8867
|
...defaults.env,
|
|
8829
8868
|
...sandboxInput.env,
|
|
@@ -8843,7 +8882,6 @@ function providerAsSandboxClient(provider, options = {}) {
|
|
|
8843
8882
|
const entries = new Set((Array.isArray(mapped.secrets) ? mapped.secrets : []).map(bindingId));
|
|
8844
8883
|
for (const binding of Array.isArray(selected) ? selected : []) if (typeof binding !== "string" && !entries.has(bindingId(binding))) throw new ValidationError("mapped create changed a stored host binding");
|
|
8845
8884
|
if (bindings.length) mapped.proxySecrets = mergeProxySecretBindings(...bindings, mapped.proxySecrets, typeof mapped.profile === "object" ? mapped.profile.proxySecrets : void 0);
|
|
8846
|
-
if (typeof mapped.profile === "object") mapped.profile = structuredClone(mapped.profile);
|
|
8847
8885
|
if (mapped.backend === void 0) delete mapped.backend;
|
|
8848
8886
|
if (mapped.profile === void 0) throw new ValidationError(`providerAsSandboxClient(${provider.name}): profile required in defaults or CreateSandboxOptions.backend.profile`);
|
|
8849
8887
|
const needsMcp = hasRuntimeMcpAttachments(mapped);
|
|
@@ -8899,7 +8937,6 @@ function createInputFromSandboxOptions(options, customMapping) {
|
|
|
8899
8937
|
}
|
|
8900
8938
|
if (unsupported.length > 0) throw new ValidationError(`providerAsSandboxClient: Sandbox create controls require mapCreateOptions: ${unsupported.join(", ")}`);
|
|
8901
8939
|
}
|
|
8902
|
-
const profile = options?.backend?.profile;
|
|
8903
8940
|
const backend = options?.backend?.type;
|
|
8904
8941
|
const cwd = options?.cwd === void 0 ? void 0 : canonicalWorkspaceCwd({
|
|
8905
8942
|
base: "repository",
|
|
@@ -8912,7 +8949,6 @@ function createInputFromSandboxOptions(options, customMapping) {
|
|
|
8912
8949
|
...cwd === void 0 ? {} : { cwd }
|
|
8913
8950
|
};
|
|
8914
8951
|
return {
|
|
8915
|
-
...profile !== void 0 ? { profile } : {},
|
|
8916
8952
|
...backend ? { backend } : {},
|
|
8917
8953
|
...Object.keys(workspace).length > 0 ? { workspace } : {},
|
|
8918
8954
|
...options?.resources ? { resources: options.resources } : {},
|
|
@@ -10197,7 +10233,7 @@ function providerAsExecutor(provider, options = {}) {
|
|
|
10197
10233
|
};
|
|
10198
10234
|
return (spec, ctx) => {
|
|
10199
10235
|
const profile = captured.placements === void 0 ? spec.profile : detachedSnapshot(spec.profile, "provider placement profile");
|
|
10200
|
-
const selected = selectProviderPlacement(profile, captured);
|
|
10236
|
+
const selected = selectProviderPlacement(profile, captured, ctx.node);
|
|
10201
10237
|
return createProviderExecutor(provider, profile, ctx, selected.options, selected.identity);
|
|
10202
10238
|
};
|
|
10203
10239
|
}
|
|
@@ -14579,7 +14615,9 @@ function snapshotExecutorConfig(config, mode = "execution") {
|
|
|
14579
14615
|
if (config.outputFile !== void 0 && config.shared !== void 0) throw new ValidationError$1("createExecutor(provider): file output requires a dedicated retained environment");
|
|
14580
14616
|
if ((config.outputFormat ?? config.outputFile) !== void 0 && config.steering !== void 0) throw new ValidationError$1("createExecutor(provider): JSON output is not supported with steering");
|
|
14581
14617
|
if (config.harnessTranscript !== void 0 && config.steering !== void 0) throw new ValidationError$1("createExecutor(provider): native capture is not supported with steering");
|
|
14582
|
-
const { provider, registry, profileForCreate, taskToTurn, validator, harnessTranscript, shared, ...decisionData } = config;
|
|
14618
|
+
const { provider, registry, profileForCreate, checkpointForNode, taskToTurn, validator, harnessTranscript, shared, ...decisionData } = config;
|
|
14619
|
+
if (checkpointForNode !== void 0 && typeof checkpointForNode !== "function") throw new ValidationError$1("createExecutor provider: checkpointForNode must be a function");
|
|
14620
|
+
if (shared !== void 0 && checkpointForNode !== void 0) throw new ValidationError$1("createExecutor provider: a per-node checkpoint requires a dedicated environment");
|
|
14583
14621
|
if (harnessTranscript !== void 0 && typeof harnessTranscript !== "function") throw new ValidationError$1("createExecutor provider: harnessTranscript must be a capture function");
|
|
14584
14622
|
if (shared !== void 0 && (decisionData.steering !== void 0 || decisionData.placements !== void 0)) throw new ValidationError$1("createExecutor(provider): shared placement cannot combine with steering or placements");
|
|
14585
14623
|
const snapshot = detachedSnapshot(decisionData, "createExecutor provider config");
|
|
@@ -14589,6 +14627,7 @@ function snapshotExecutorConfig(config, mode = "execution") {
|
|
|
14589
14627
|
provider: resolvedProvider,
|
|
14590
14628
|
...profileForCreate === void 0 ? {} : { profileForCreate },
|
|
14591
14629
|
...taskToTurn === void 0 ? {} : { taskToTurn },
|
|
14630
|
+
...checkpointForNode === void 0 ? {} : { checkpointForNode },
|
|
14592
14631
|
...validator === void 0 ? {} : { validator },
|
|
14593
14632
|
...harnessTranscript === void 0 ? {} : { harnessTranscript },
|
|
14594
14633
|
...shared === void 0 ? {} : { shared }
|
|
@@ -14734,7 +14773,7 @@ function createExecutor(config) {
|
|
|
14734
14773
|
...providerOutputOptions(spec.profile, declared)
|
|
14735
14774
|
};
|
|
14736
14775
|
if (originalSeam.outputFile !== void 0 && (originalSeam.steering !== void 0 || originalSeam.shared !== void 0)) throw new ValidationError$1("profile outputFile requires a dedicated retained provider without steering");
|
|
14737
|
-
const selected = originalSeam.steering ? selectProviderPlacement(spec.profile, originalSeam) : void 0;
|
|
14776
|
+
const selected = originalSeam.steering ? selectProviderPlacement(spec.profile, originalSeam, seamed.node) : void 0;
|
|
14738
14777
|
const providerSeam = selected?.options ?? originalSeam;
|
|
14739
14778
|
const provider = resolveAgentEnvironmentProvider(providerSeam.provider, providerSeam.registry);
|
|
14740
14779
|
if (providerSeam.steering) {
|
|
@@ -15413,6 +15452,7 @@ const bestDelivered = (ctx) => pickBestDelivered(ctx.delivered)?.out;
|
|
|
15413
15452
|
* oracle surfaces a validation error. Neither changes child validity.
|
|
15414
15453
|
*/
|
|
15415
15454
|
async function runFinalizer(finalizer, args) {
|
|
15455
|
+
if (args.deliverable?.requireSubmission) return void 0;
|
|
15416
15456
|
const deliveredRows = args.settled.filter((w) => w.status === "done" && w.valid === true);
|
|
15417
15457
|
const deliveredRefs = /* @__PURE__ */ new Set();
|
|
15418
15458
|
for (const w of deliveredRows) if (w.outRef !== void 0) deliveredRefs.add(w.outRef);
|
|
@@ -16585,4 +16625,4 @@ async function noWinner(settled, rejection) {
|
|
|
16585
16625
|
}
|
|
16586
16626
|
export { failPendingAfter as $, worktreeCliProfileMaterialization as $t, readPromptOptions as A, readCodexRolloutSession as At, toolResultText as B, terminateProcessTreeAndConfirm as Bt, captureReusableExecutorConfig as C, bridgeAdmissionRefusal as Ct, createSteerableSandboxSession as D, addHarnessUsage as Dt, DEFAULT_SANDBOX_STEERING_MAX_TURNS as E, ROUTER_PRICE_SOURCE as Et, defaultSelectWinner as F, defaultRunCommand as Ft, providerAsExecutor as G, fullProfileMaterialization as Gt, routerBrain as H, assertProfileMaterializes as Ht, codeModeArguments as I, runSettledCommand as It, providerAsSandboxClient as J, promptModelProfileMaterialization as Jt, providerOutputOptions as K, profileMaterializationAxes$1 as Kt, codeModeModelOutput as L, runWorktreeHarness as Lt, createSandboxLineage as M, bridgeRuntimeAttachmentsKey as Mt, acquireSandbox as N, bridgeRuntimeEnvKey as Nt, runAgentRounds as O, createCodexRolloutStoreReader as Ot, TERMINAL_DECISIONS as P, bridgeStopSignalKey as Pt, createInbox as Q, unsupportedProfileDimensions as Qt, createCodeModeTools as R, LOCAL_HARNESSES as Rt, bindReusableExecutorExecutionId as S, verdictFromJudgeScore as St, snapshotExecutorConfig as T, priceTokens as Tt, createAgentEnvironmentProviderRegistry as U, controlProfileMaterialization as Ut, createRouterTranscript as V, assertProfileMaterialization as Vt, resolveAgentEnvironmentProvider as W, defineProfileMaterializationContract as Wt, createInPlaceCliExecutor as X, sandboxActProfileMaterialization as Xt, createWorktreeCliExecutor as Y, renderUnsupported as Yt, INBOX_RECEIPT_KEY as Z, sandboxProfileMaterialization as Zt, isDriverSpec as _, preflightPublicCoordination as _t, awaitRootWake as a, isPeerMailEnvelope as at, InMemorySpawnJournal as b, gateOnDeliverable as bt, readRunParking as c, taskToPrompt$1 as ct, bestDelivered as d, abandonablePending as dt, projectSandboxOutcome as en, AUTHORITY_MARKERS as et, runFinalizer as f, classifyDriverFailure as ft, driverExecutorFactory as g, upstreamUnavailableSignal as gt, driverChild as h, undispatchedCredentialExit as ht, assertRunParking as i, createPeerMailbox as it, createSandboxForSpec as j, createPushTraceSource as jt, assertBoxlessPromptOptions as k, harnessUsageIsEmpty as kt, sleepScopeWait as l, DriverAttemptsExhaustedError as lt, createRootHandle as m, transientFailureKind as mt, createSupervisor as n, PEER_MAIL_WIRE_KEY as nt, bindScopeParkingDrain as o, peerMailTools as ot, runTree as p, summarizeDriverAttempts as pt, LEAF_CONTINUATION_TASK as q, promptControlProfileMaterialization as qt, RunParkedError as r, claimsAuthority as rt, isRunParked as s, peerMailVerbNames as st, DEFAULT_MAX_DEPTH as t, readSandboxOutcome as tn, DEFAULT_PEER_MAIL_LIMITS as tt, withRunParking as u, HarnessTurnFailedError as ut, withDriverExecutor as v, CheckUnavailableError as vt, createExecutor as w, bridgeModelRouteRefusal as wt, createExecutorRegistry as x, mapExecutorResult as xt, InMemoryResultBlobStore as y, gateFactoryOnDeliverable as yt, runCodeMode as z, harnessInvocation as zt };
|
|
16587
16627
|
|
|
16588
|
-
//# sourceMappingURL=supervisor-
|
|
16628
|
+
//# sourceMappingURL=supervisor-B9A_Cnxo.js.map
|