@tangle-network/agent-runtime 0.117.0 → 0.120.0
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/README.md +2 -0
- package/dist/{activation-BZ2FyX0O.js → activation-DdIpwQ0k.js} +3 -3
- package/dist/{activation-BZ2FyX0O.js.map → activation-DdIpwQ0k.js.map} +1 -1
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +3 -3
- package/dist/candidate-execution/index.d.ts +2 -2
- package/dist/candidate-execution/index.js +4 -4
- package/dist/{candidate-execution-PX61zXd2.js → candidate-execution-DDkSRPjY.js} +4 -4
- package/dist/{candidate-execution-PX61zXd2.js.map → candidate-execution-DDkSRPjY.js.map} +1 -1
- package/dist/{environment-provider-CTZjdIUg.d.ts → environment-provider-Bh4nX2qt.d.ts} +9 -1
- package/dist/{environment-provider-CzcEyRL7.js → environment-provider-Cr75N-rU.js} +2 -2
- package/dist/{environment-provider-CzcEyRL7.js.map → environment-provider-Cr75N-rU.js.map} +1 -1
- package/dist/environment-provider.d.ts +1 -1
- package/dist/environment-provider.js +1 -1
- package/dist/{improvement-cycle-Bcqz8rZI.js → improvement-cycle-zjR-MXwK.js} +7 -7
- package/dist/improvement-cycle-zjR-MXwK.js.map +1 -0
- package/dist/{index-X2YwyWkc.d.ts → index-B3bHsVLw.d.ts} +2 -2
- package/dist/{index-BHSYaWrC.d.ts → index-BLsKcxNd.d.ts} +3 -3
- package/dist/{index-DPWJxSRa.d.ts → index-CGADWaa_.d.ts} +20 -165
- package/dist/{index-BTUG4Xln.d.ts → index-I35151Fr.d.ts} +9 -9
- package/dist/index.d.ts +8 -8
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +4 -4
- package/dist/intelligence.js +6 -6
- package/dist/kernel.d.ts +4 -4
- package/dist/kernel.js +8 -7
- package/dist/{knowledge-CDlrayRc.js → knowledge-I1e9zQGj.js} +5 -5
- package/dist/{knowledge-CDlrayRc.js.map → knowledge-I1e9zQGj.js.map} +1 -1
- package/dist/knowledge.d.ts +1 -1
- package/dist/knowledge.js +1 -1
- package/dist/{local-harness-t6cDWDQ2.d.ts → local-harness-BIajef4A.d.ts} +29 -7
- package/dist/{loop-runner-bin-oyL7it5O.d.ts → loop-runner-bin-BeG9vTdE.d.ts} +3 -3
- package/dist/{loop-runner-bin-BxhhDtmG.js → loop-runner-bin-L996YVPS.js} +3 -3
- package/dist/{loop-runner-bin-BxhhDtmG.js.map → loop-runner-bin-L996YVPS.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/bin.js.map +1 -1
- package/dist/mcp/index.d.ts +5 -5
- package/dist/mcp/index.js +8 -13
- package/dist/mcp/index.js.map +1 -1
- package/dist/{openai-tools-CO9X36zy.js → openai-tools-CvFEzw6f.js} +2 -2
- package/dist/{openai-tools-CO9X36zy.js.map → openai-tools-CvFEzw6f.js.map} +1 -1
- package/dist/{prepare-BbI6qGOW.js → prepare-DpV6np9e.js} +44 -34
- package/dist/{prepare-BbI6qGOW.js.map → prepare-DpV6np9e.js.map} +1 -1
- package/dist/primeintellect/index.d.ts +1 -1
- package/dist/{protected-model-port-B0yXMpLL.d.ts → protected-model-port-CoJOiINX.d.ts} +2 -2
- package/dist/{protected-model-port-COnyZfML.js → protected-model-port-vQLBRoAQ.js} +2 -2
- package/dist/{protected-model-port-COnyZfML.js.map → protected-model-port-vQLBRoAQ.js.map} +1 -1
- package/dist/{redact-BEtQtvd6.d.ts → redact-PQzmE1Jn.d.ts} +4 -4
- package/dist/run-layout-C2FGmZ3v.js +158 -0
- package/dist/run-layout-C2FGmZ3v.js.map +1 -0
- package/dist/{runtime-Ce39zfqn.js → runtime-D4e3GP5K.js} +7 -142
- package/dist/runtime-D4e3GP5K.js.map +1 -0
- package/dist/{spawn-journal-B_mu_oH2.js → spawn-journal-IeXpidO2.js} +2 -2
- package/dist/{spawn-journal-B_mu_oH2.js.map → spawn-journal-IeXpidO2.js.map} +1 -1
- package/dist/{structural-rollout-DLwW69R4.js → structural-rollout-DQHO3b2Y.js} +3 -3
- package/dist/{structural-rollout-DLwW69R4.js.map → structural-rollout-DQHO3b2Y.js.map} +1 -1
- package/dist/{supervise-U7_K5yuV.js → supervise-Cq50UT5-.js} +289 -1084
- package/dist/supervise-Cq50UT5-.js.map +1 -0
- package/dist/{supervisor-CAXiCKnX.js → supervisor-CpT9yAxL.js} +113 -35
- package/dist/supervisor-CpT9yAxL.js.map +1 -0
- package/dist/testing.js +10 -10
- package/dist/top-app-5unxqovu.js +1088 -0
- package/dist/top-app-5unxqovu.js.map +1 -0
- package/dist/tui/bin.d.ts +1 -0
- package/dist/tui/bin.js +19 -0
- package/dist/tui/bin.js.map +1 -0
- package/dist/tui/index.d.ts +209 -0
- package/dist/tui/index.js +2 -0
- package/dist/{util-Cc9g9Y-o.js → util-MVgdwuIS.js} +2 -2
- package/dist/{util-Cc9g9Y-o.js.map → util-MVgdwuIS.js.map} +1 -1
- package/dist/{workspace-archive-CqPIijFA.js → workspace-archive-B4SkNJjw.js} +2 -2
- package/dist/{workspace-archive-CqPIijFA.js.map → workspace-archive-B4SkNJjw.js.map} +1 -1
- package/package.json +11 -5
- package/dist/improvement-cycle-Bcqz8rZI.js.map +0 -1
- package/dist/runtime-Ce39zfqn.js.map +0 -1
- package/dist/supervise-U7_K5yuV.js.map +0 -1
- package/dist/supervisor-CAXiCKnX.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { x as contentAddress } from "./spawn-journal-
|
|
1
|
+
import { x as contentAddress } from "./spawn-journal-IeXpidO2.js";
|
|
2
2
|
import { i as redactProtectedValue, n as createProtectedRecordRedactor, r as redactProtectedReason, t as assertNoProtectedBytes } from "./protected-redaction--F3v1oo8.js";
|
|
3
3
|
import { REDACTION_VERSION, canonicalJson, isLlmSpan } from "@tangle-network/agent-eval";
|
|
4
4
|
import { agentCandidateArtifactRefSchema, agentCandidateBenchmarkResultEvidenceSchema, agentCandidateBenchmarkSuiteSchema, agentCandidateBenchmarkTaskSchema, agentCandidateBundleSchema, agentCandidateContainerSchema, agentCandidateExecutionLimitsSchema, agentCandidateExecutionPlanEvidenceSchema, agentCandidateExecutionPlanMaterialSchema, agentCandidateMaterializationReceiptSchema, agentCandidateModelAccessNetworkSchema, agentCandidateModelSettlementEvidenceSchema, agentCandidateProfileActivationSchema, agentCandidateProfilePlanEvidenceSchema, agentCandidateProfileSchema, agentCandidateResolvedModelSchema, agentCandidateRunCellSchema, agentCandidateRunReceiptSchema, agentCandidateTaskOutcomeEvidenceSchema, agentCandidateTaskOutcomeSpecSchema, agentCandidateTerminationSchema, agentCandidateWorkspaceManifestMaterialSchema, agentCandidateWorkspaceSnapshotEvidenceSchema, agentProfileDiffSchema, agentProfileSchema, applyAgentProfileDiff, sha256DigestSchema } from "@tangle-network/agent-interface";
|
|
@@ -3736,33 +3736,55 @@ var CandidateExecutionDeadlineError = class extends Error {
|
|
|
3736
3736
|
};
|
|
3737
3737
|
//#endregion
|
|
3738
3738
|
//#region src/candidate-execution/system-prompt.ts
|
|
3739
|
-
const NATIVE_EXECUTABLES = {
|
|
3740
|
-
"claude-code": "claude",
|
|
3741
|
-
codex: "codex",
|
|
3742
|
-
opencode: "opencode",
|
|
3743
|
-
pi: "pi"
|
|
3744
|
-
};
|
|
3745
3739
|
const SYSTEM_PROMPT_FILE = ".tangle/system-prompt.md";
|
|
3740
|
+
const SYSTEM_PROMPT_FLAGS = ["--system-prompt", "--system-prompt-file"];
|
|
3741
|
+
/** Shared by the harnesses whose native control IS a `--system-prompt*` flag. */
|
|
3742
|
+
function argsSetSystemPromptFlag(values) {
|
|
3743
|
+
return values.some((value) => SYSTEM_PROMPT_FLAGS.some((flag) => value === flag || value.startsWith(`${flag}=`)));
|
|
3744
|
+
}
|
|
3745
|
+
function argsSetCodexDeveloperInstructions(values) {
|
|
3746
|
+
for (let index = 0; index < values.length; index++) {
|
|
3747
|
+
const value = values[index];
|
|
3748
|
+
if ((value === "-c" || value === "--config" ? values[index + 1] : value.startsWith("--config=") ? value.slice(9) : void 0)?.trimStart().startsWith("developer_instructions=")) return true;
|
|
3749
|
+
}
|
|
3750
|
+
return false;
|
|
3751
|
+
}
|
|
3752
|
+
const HARNESS_SYSTEM_PROMPTS = {
|
|
3753
|
+
"claude-code": {
|
|
3754
|
+
executable: "claude",
|
|
3755
|
+
project: (plan, systemPrompt, path) => appendFlags(addSystemPromptFile(plan, systemPrompt), "--system-prompt-file", path),
|
|
3756
|
+
conflictsWithArgs: argsSetSystemPromptFlag
|
|
3757
|
+
},
|
|
3758
|
+
codex: {
|
|
3759
|
+
executable: "codex",
|
|
3760
|
+
project: (plan, systemPrompt) => appendFlags(plan, "-c", `developer_instructions=${tomlString(systemPrompt)}`),
|
|
3761
|
+
conflictsWithArgs: argsSetCodexDeveloperInstructions
|
|
3762
|
+
},
|
|
3763
|
+
opencode: {
|
|
3764
|
+
executable: "opencode",
|
|
3765
|
+
project: (plan, systemPrompt) => ({
|
|
3766
|
+
...plan,
|
|
3767
|
+
files: projectOpenCodeSystemPrompt(plan.files, systemPrompt)
|
|
3768
|
+
}),
|
|
3769
|
+
conflictsWithArgs: () => false
|
|
3770
|
+
},
|
|
3771
|
+
pi: {
|
|
3772
|
+
executable: "pi",
|
|
3773
|
+
project: (plan, systemPrompt, path) => appendFlags(addSystemPromptFile(plan, systemPrompt), "--system-prompt", path),
|
|
3774
|
+
conflictsWithArgs: argsSetSystemPromptFlag
|
|
3775
|
+
}
|
|
3776
|
+
};
|
|
3746
3777
|
/** Project a replacement system prompt onto the exact native process control. */
|
|
3747
3778
|
function projectCandidateSystemPrompt(plan, launch, systemPromptFilePath) {
|
|
3748
3779
|
const systemPrompt = plan.systemPrompt;
|
|
3749
3780
|
if (systemPrompt === void 0) return plan;
|
|
3750
|
-
const
|
|
3751
|
-
if (!
|
|
3781
|
+
const projection = HARNESS_SYSTEM_PROMPTS[plan.harness];
|
|
3782
|
+
if (!projection) throw new Error(`candidate system prompt has no native launch projection for ${plan.harness}`);
|
|
3783
|
+
const expectedExecutable = projection.executable;
|
|
3752
3784
|
if (launch.kind !== "container-command") throw new Error(`candidate-entrypoint launch cannot prove ${plan.harness} system-prompt replacement`);
|
|
3753
3785
|
if (launch.executable !== expectedExecutable && !(posix.isAbsolute(launch.executable) && posix.basename(launch.executable) === expectedExecutable)) throw new Error(`${plan.harness} system-prompt replacement requires the native ${expectedExecutable} executable`);
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
switch (plan.harness) {
|
|
3757
|
-
case "codex": return appendFlags(projectedPlan, "-c", `developer_instructions=${tomlString(systemPrompt.value)}`);
|
|
3758
|
-
case "claude-code": return appendFlags(addSystemPromptFile(projectedPlan, systemPrompt.value), "--system-prompt-file", systemPromptFilePath);
|
|
3759
|
-
case "opencode": return {
|
|
3760
|
-
...projectedPlan,
|
|
3761
|
-
files: projectOpenCodeSystemPrompt(projectedPlan.files, systemPrompt.value)
|
|
3762
|
-
};
|
|
3763
|
-
case "pi": return appendFlags(addSystemPromptFile(projectedPlan, systemPrompt.value), "--system-prompt", systemPromptFilePath);
|
|
3764
|
-
default: throw new Error(`candidate system prompt has no native launch projection for ${plan.harness}`);
|
|
3765
|
-
}
|
|
3786
|
+
if (projection.conflictsWithArgs((launch.args ?? []).map((value) => value.value))) throw new Error(`${plan.harness} launch arguments conflict with the candidate profile system prompt`);
|
|
3787
|
+
return projection.project(omitUnappliedSystemPrompt(plan), systemPrompt.value, systemPromptFilePath);
|
|
3766
3788
|
}
|
|
3767
3789
|
function omitUnappliedSystemPrompt(plan) {
|
|
3768
3790
|
const { systemPrompt: _systemPrompt, ...projected } = plan;
|
|
@@ -3791,18 +3813,6 @@ function addSystemPromptFile(plan, systemPrompt) {
|
|
|
3791
3813
|
}]
|
|
3792
3814
|
};
|
|
3793
3815
|
}
|
|
3794
|
-
function assertNoSystemPromptOverride(harness, args) {
|
|
3795
|
-
const values = args.map((value) => value.value);
|
|
3796
|
-
if (harness === "claude-code" || harness === "pi") {
|
|
3797
|
-
if (values.some((value) => value === "--system-prompt" || value.startsWith("--system-prompt=") || value === "--system-prompt-file" || value.startsWith("--system-prompt-file="))) throw new Error(`${harness} launch arguments conflict with the candidate profile system prompt`);
|
|
3798
|
-
return;
|
|
3799
|
-
}
|
|
3800
|
-
if (harness !== "codex") return;
|
|
3801
|
-
for (let index = 0; index < values.length; index++) {
|
|
3802
|
-
const value = values[index];
|
|
3803
|
-
if ((value === "-c" || value === "--config" ? values[index + 1] : value.startsWith("--config=") ? value.slice(9) : void 0)?.trimStart().startsWith("developer_instructions=")) throw new Error("codex launch arguments conflict with the candidate profile system prompt");
|
|
3804
|
-
}
|
|
3805
|
-
}
|
|
3806
3816
|
function projectOpenCodeSystemPrompt(files, prompt) {
|
|
3807
3817
|
const configIndex = files.findIndex((file) => file.relPath === "opencode.json");
|
|
3808
3818
|
if (configIndex === -1) return [...files, {
|
|
@@ -4445,4 +4455,4 @@ function errorMessage(error) {
|
|
|
4445
4455
|
//#endregion
|
|
4446
4456
|
export { parseExactAgentProfile as $, verifyMaterializedWorkspace as A, rejectedStage as B, assertNoGitIndirection as C, captureMaterializedWorkspace as D, candidateWorkspaceManifest as E, assertTerminalAllowedInPhase as F, agentCandidateProfileAsAgentProfile as G, sealTerminalDigest as H, assertTerminalMatchesClaim as I, candidateMaterializerHarness as J, applyExactAgentProfileDiff as K, assertTerminalMatchesStaged as L, candidateCleanupTimeout as M, withinCandidateCleanupDeadline as N, readVerifiedArtifact as O, assertRecoveryMatchesStaged as P, parseAgentCandidateProfileActivation as Q, recoveredTerminalRecord as R, CANDIDATE_TRACE_TAGS as S, runCandidateGit as T, terminalRecord as U, requireStagedTerminal as V, assertExactObjectKeys as W, freezeGenericAgentCandidateProfile as X, createAgentCandidateProfileActivation as Y, omitUndefinedObjectFields as Z, candidateExecutionClaim as _, persistCandidateOutputArtifact as a, deepFreezeCandidate as at, consumePreparedCandidateExecution as b, CANDIDATE_KNOWLEDGE_ROOT_ENV as c, omitTopLevelDigest as ct, verifiedResourceTextByDigest as d, parseExactAgentProfileDiff as et, verifyAgentCandidateBundle as f, candidateClaimFileInternals as g, InMemoryAgentCandidateExecutionClaimStore as h, persistCandidateModelSettlementEvidence as i, canonicalCandidateDocument as it, candidateCleanupDeadline as j, verifyBytes as k, candidateKnowledgeExecutionPaths as l, sha256Bytes as lt, usdToNanos as m, executePreparedAgentCandidate as n, canonicalCandidateBytes as nt, sealAgentCandidateExecutorStopAcknowledgement as o, embeddedCandidateArtifact as ot, sealAgentCandidateModelSettlement as p, assertCandidateProfileBinding as q, RecoveryAgentCandidateTraceStore as r, canonicalCandidateDigest$1 as rt, CANDIDATE_KNOWLEDGE_RETRIEVAL_CONFIG_ENV as s, immutableCandidateValue as st, prepareAgentCandidateExecution as t, parseExactCandidateProfile as tt, AGENT_CANDIDATE_EXECUTION_SUPPORT as u, verifyCanonicalCandidateDocument as ut, assertPreparedCandidateIntegrity as v, readCandidateGitTreeFiles as w, CANDIDATE_TRACE_ENV as x, beginPreparedCandidateDisposal as y, rejectedFinish as z };
|
|
4447
4457
|
|
|
4448
|
-
//# sourceMappingURL=prepare-
|
|
4458
|
+
//# sourceMappingURL=prepare-DpV6np9e.js.map
|