@tangle-network/agent-runtime 0.104.0 → 0.106.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 +176 -42
- package/dist/activation-CRjVfOiy.js +203 -0
- package/dist/activation-CRjVfOiy.js.map +1 -0
- package/dist/activation-DyWB0K6E.d.ts +98 -0
- package/dist/agent.d.ts +216 -234
- package/dist/agent.js +615 -547
- package/dist/agent.js.map +1 -1
- package/dist/analyst-loop-DGdtVENg.js +517 -0
- package/dist/analyst-loop-DGdtVENg.js.map +1 -0
- package/dist/analyst-loop.d.ts +10 -43
- package/dist/analyst-loop.js +2 -11
- package/dist/backends-Dy8NujB4.js +713 -0
- package/dist/backends-Dy8NujB4.js.map +1 -0
- package/dist/candidate-execution/index.d.ts +4 -192
- package/dist/candidate-execution/index.js +5 -66
- package/dist/candidate-execution-DqMbv1rU.js +488 -0
- package/dist/candidate-execution-DqMbv1rU.js.map +1 -0
- package/dist/coder-yhVWbdWc.js +40 -0
- package/dist/coder-yhVWbdWc.js.map +1 -0
- package/dist/conversation-XucG_K3l.js +1265 -0
- package/dist/conversation-XucG_K3l.js.map +1 -0
- package/dist/conversation.d.ts +2 -804
- package/dist/conversation.js +2 -55
- package/dist/environment-provider-CfLUmKmf.js +1168 -0
- package/dist/environment-provider-CfLUmKmf.js.map +1 -0
- package/dist/environment-provider-IUGU3epE.d.ts +964 -0
- package/dist/environment-provider.d.ts +2 -78
- package/dist/environment-provider.js +2 -18
- package/dist/errors-DEAvWQPy.js +111 -0
- package/dist/errors-DEAvWQPy.js.map +1 -0
- package/dist/improvement-adapter-Cr5TBSji.d.ts +166 -0
- package/dist/improvement-cycle-C095kS_g.js +2624 -0
- package/dist/improvement-cycle-C095kS_g.js.map +1 -0
- package/dist/index-BGdxAwfO.d.ts +838 -0
- package/dist/index-C-FYUuFG.d.ts +193 -0
- package/dist/index-CbNM40xG.d.ts +140 -0
- package/dist/index-DruSKs3Z.d.ts +7224 -0
- package/dist/index-Efjb3nrQ.d.ts +671 -0
- package/dist/index.d.ts +14 -1134
- package/dist/index.js +2134 -1972
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +776 -888
- package/dist/intelligence.js +1466 -1410
- package/dist/intelligence.js.map +1 -1
- package/dist/{kb-gate-CwHO0vz6.d.ts → kb-gate-C8z2juK8.d.ts} +33 -31
- package/dist/kb-gate-DpaSwXVx.js +80 -0
- package/dist/kb-gate-DpaSwXVx.js.map +1 -0
- package/dist/knowledge-Ku-mPP4f.js +433 -0
- package/dist/knowledge-Ku-mPP4f.js.map +1 -0
- package/dist/knowledge.d.ts +2 -150
- package/dist/knowledge.js +2 -40
- package/dist/local-harness-Dh8PJ0ot.d.ts +455 -0
- package/dist/loop-runner-bin-BXsFEUcf.d.ts +162 -0
- package/dist/loop-runner-bin-BwjQ1NfH.js +268 -0
- package/dist/loop-runner-bin-BwjQ1NfH.js.map +1 -0
- package/dist/loop-runner-bin.d.ts +2 -17
- package/dist/loop-runner-bin.js +2 -24
- package/dist/loops.d.ts +5 -4164
- package/dist/loops.js +8 -419
- package/dist/mcp/bin.d.ts +1 -1
- package/dist/mcp/bin.js +116 -146
- package/dist/mcp/bin.js.map +1 -1
- package/dist/mcp/index.d.ts +295 -437
- package/dist/mcp/index.js +1242 -1177
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/memory-bin.d.ts +1 -1
- package/dist/mcp/memory-bin.js +37 -16
- package/dist/mcp/memory-bin.js.map +1 -1
- package/dist/memory-server-DL6cE2Ag.js +234 -0
- package/dist/memory-server-DL6cE2Ag.js.map +1 -0
- package/dist/model-resolution-Btd9iIKV.js +98 -0
- package/dist/model-resolution-Btd9iIKV.js.map +1 -0
- package/dist/openai-tools-B68JaOCx.d.ts +24 -0
- package/dist/openai-tools-CKLy1C7M.js +44 -0
- package/dist/openai-tools-CKLy1C7M.js.map +1 -0
- package/dist/otel-export-D34IQW1C.js +843 -0
- package/dist/otel-export-D34IQW1C.js.map +1 -0
- package/dist/platform.d.ts +188 -185
- package/dist/platform.js +185 -218
- package/dist/platform.js.map +1 -1
- package/dist/prepare-B53sPV7M.js +4292 -0
- package/dist/prepare-B53sPV7M.js.map +1 -0
- package/dist/primeintellect/index.d.ts +150 -147
- package/dist/primeintellect/index.js +626 -1004
- package/dist/primeintellect/index.js.map +1 -1
- package/dist/profiles.d.ts +296 -490
- package/dist/profiles.js +722 -749
- package/dist/profiles.js.map +1 -1
- package/dist/protected-model-port-BLPH5VVv.js +722 -0
- package/dist/protected-model-port-BLPH5VVv.js.map +1 -0
- package/dist/protected-model-port-BP6Z4eau.d.ts +283 -0
- package/dist/protected-redaction--F3v1oo8.js +200 -0
- package/dist/protected-redaction--F3v1oo8.js.map +1 -0
- package/dist/redact-D-u-rrcn.js +82 -0
- package/dist/redact-D-u-rrcn.js.map +1 -0
- package/dist/redact-kbIOjfjM.d.ts +452 -0
- package/dist/researcher-CoVqNhfI.js +433 -0
- package/dist/researcher-CoVqNhfI.js.map +1 -0
- package/dist/runtime-BG0BziaP.js +5408 -0
- package/dist/runtime-BG0BziaP.js.map +1 -0
- package/dist/sandbox-events-DeI5xX8P.js +316 -0
- package/dist/sandbox-events-DeI5xX8P.js.map +1 -0
- package/dist/spawn-journal-CwPvKUTa.js +456 -0
- package/dist/spawn-journal-CwPvKUTa.js.map +1 -0
- package/dist/structural-rollout-IXUEplky.js +1445 -0
- package/dist/structural-rollout-IXUEplky.js.map +1 -0
- package/dist/substrate-B0TYNrXn.js +27 -0
- package/dist/substrate-B0TYNrXn.js.map +1 -0
- package/dist/{substrate-Dyiqmd3o.d.ts → substrate-BcnuSHXm.d.ts} +57 -54
- package/dist/supervise-BiRutHS9.js +7321 -0
- package/dist/supervise-BiRutHS9.js.map +1 -0
- package/dist/supervisor-DTKhF-RV.js +3826 -0
- package/dist/supervisor-DTKhF-RV.js.map +1 -0
- package/dist/testing.d.ts +4 -3
- package/dist/testing.js +2478 -2637
- package/dist/testing.js.map +1 -1
- package/dist/tool-server-RcWgLIsL.js +141 -0
- package/dist/tool-server-RcWgLIsL.js.map +1 -0
- package/dist/trace-propagation-CJJC7SVB.js +57 -0
- package/dist/trace-propagation-CJJC7SVB.js.map +1 -0
- package/dist/types-BaIpb0XT.d.ts +492 -0
- package/dist/types-BevOjfTY.d.ts +765 -0
- package/dist/types-C9j4qg6l.d.ts +500 -0
- package/dist/types-Cja5OTGh.d.ts +190 -0
- package/dist/util-MVgdwuIS.js +145 -0
- package/dist/util-MVgdwuIS.js.map +1 -0
- package/dist/workspace-archive-BosQiotA.js +575 -0
- package/dist/workspace-archive-BosQiotA.js.map +1 -0
- package/package.json +43 -55
- package/skills/build-with-agent-runtime/SKILL.md +16 -9
- package/skills/loop-writer/SKILL.md +1 -1
- package/dist/activation-Cm-9MMX1.d.ts +0 -69
- package/dist/analyst-loop.js.map +0 -1
- package/dist/backends-BO4Jqoe2.d.ts +0 -134
- package/dist/candidate-execution/index.js.map +0 -1
- package/dist/chunk-2KGAN2HM.js +0 -1256
- package/dist/chunk-2KGAN2HM.js.map +0 -1
- package/dist/chunk-2QJSNOGK.js +0 -48
- package/dist/chunk-2QJSNOGK.js.map +0 -1
- package/dist/chunk-2UABGGUB.js +0 -474
- package/dist/chunk-2UABGGUB.js.map +0 -1
- package/dist/chunk-2VZYRB55.js +0 -834
- package/dist/chunk-2VZYRB55.js.map +0 -1
- package/dist/chunk-2X65HYMI.js +0 -3526
- package/dist/chunk-2X65HYMI.js.map +0 -1
- package/dist/chunk-3MDZX7YU.js +0 -125
- package/dist/chunk-3MDZX7YU.js.map +0 -1
- package/dist/chunk-3PPVCS75.js +0 -199
- package/dist/chunk-3PPVCS75.js.map +0 -1
- package/dist/chunk-5HNDYWUT.js +0 -6424
- package/dist/chunk-5HNDYWUT.js.map +0 -1
- package/dist/chunk-5IBQAPVB.js +0 -29
- package/dist/chunk-5IBQAPVB.js.map +0 -1
- package/dist/chunk-5QOB7H74.js +0 -387
- package/dist/chunk-5QOB7H74.js.map +0 -1
- package/dist/chunk-ATDFUJYI.js +0 -4728
- package/dist/chunk-ATDFUJYI.js.map +0 -1
- package/dist/chunk-B7K7V22Y.js +0 -699
- package/dist/chunk-B7K7V22Y.js.map +0 -1
- package/dist/chunk-DPEUKJRO.js +0 -27
- package/dist/chunk-DPEUKJRO.js.map +0 -1
- package/dist/chunk-FD2MBMOH.js +0 -494
- package/dist/chunk-FD2MBMOH.js.map +0 -1
- package/dist/chunk-FJI3EXU3.js +0 -2402
- package/dist/chunk-FJI3EXU3.js.map +0 -1
- package/dist/chunk-HAO4CXHP.js +0 -200
- package/dist/chunk-HAO4CXHP.js.map +0 -1
- package/dist/chunk-ISPWRSEC.js +0 -408
- package/dist/chunk-ISPWRSEC.js.map +0 -1
- package/dist/chunk-KRBFHMV6.js +0 -1228
- package/dist/chunk-KRBFHMV6.js.map +0 -1
- package/dist/chunk-L5DST3QC.js +0 -351
- package/dist/chunk-L5DST3QC.js.map +0 -1
- package/dist/chunk-M22PL4GH.js +0 -171
- package/dist/chunk-M22PL4GH.js.map +0 -1
- package/dist/chunk-NURIQBJQ.js +0 -72
- package/dist/chunk-NURIQBJQ.js.map +0 -1
- package/dist/chunk-PZZKQVQV.js +0 -52
- package/dist/chunk-PZZKQVQV.js.map +0 -1
- package/dist/chunk-Q2JSAVQ3.js +0 -671
- package/dist/chunk-Q2JSAVQ3.js.map +0 -1
- package/dist/chunk-SBTWKPVR.js +0 -5576
- package/dist/chunk-SBTWKPVR.js.map +0 -1
- package/dist/chunk-SGKPNBXE.js +0 -60
- package/dist/chunk-SGKPNBXE.js.map +0 -1
- package/dist/chunk-SNSMRT6H.js +0 -680
- package/dist/chunk-SNSMRT6H.js.map +0 -1
- package/dist/chunk-STJEHM5F.js +0 -1338
- package/dist/chunk-STJEHM5F.js.map +0 -1
- package/dist/chunk-UPWGXKXB.js +0 -254
- package/dist/chunk-UPWGXKXB.js.map +0 -1
- package/dist/chunk-YEJR7IXO.js +0 -68
- package/dist/chunk-YEJR7IXO.js.map +0 -1
- package/dist/chunk-ZXICDSAK.js +0 -907
- package/dist/chunk-ZXICDSAK.js.map +0 -1
- package/dist/completion-gate-Bv47cOnn.d.ts +0 -256
- package/dist/conversation.js.map +0 -1
- package/dist/coordination-CxtzMxSM.d.ts +0 -2570
- package/dist/environment-provider.js.map +0 -1
- package/dist/improve--2A0gK1-.d.ts +0 -440
- package/dist/improvement-adapter-HAZz-7vK.d.ts +0 -203
- package/dist/knowledge.js.map +0 -1
- package/dist/local-harness-CtK9dSny.d.ts +0 -175
- package/dist/loop-runner-bin-DUOGtvOl.d.ts +0 -207
- package/dist/loop-runner-bin.js.map +0 -1
- package/dist/loops.js.map +0 -1
- package/dist/openai-tools-fnj6SRVg.d.ts +0 -46
- package/dist/protected-model-port-DzkUY3HQ.d.ts +0 -271
- package/dist/sanitize-DEbPNtyI.d.ts +0 -328
- package/dist/structural-rollout-C4mabf87.d.ts +0 -446
- package/dist/supervise-7q9F5brx.d.ts +0 -379
- package/dist/types-BCoemcXU.d.ts +0 -802
- package/dist/types-BwoZWq-i.d.ts +0 -510
- package/dist/types-Cbp72qyu.d.ts +0 -491
- package/dist/types-CmYCMbFT.d.ts +0 -203
- package/dist/types-CvNwMzQt.d.ts +0 -957
- package/dist/worktree-fanout-WsOzt8qu.d.ts +0 -999
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { D as AgentCandidateExecutionPhaseResult, O as AgentCandidateExecutionRecoveryEvidence, T as AgentCandidateExecutionLease, _ as AgentCandidateExecutionAttemptRecord, b as AgentCandidateExecutionClaimResult, j as AgentCandidateExecutionTerminalResult, k as AgentCandidateExecutionStageResult, v as AgentCandidateExecutionAttemptRef, w as AgentCandidateExecutionFinishResult, x as AgentCandidateExecutionClaimStore, y as AgentCandidateExecutionClaim } from "./protected-model-port-BP6Z4eau.js";
|
|
2
|
+
import { B as VerifiedAgentCandidate, O as AgentCandidateVerificationPorts, P as PreparedAgentCandidateExecution, a as AgentCandidateExecutionPorts, b as AgentCandidateOutputPurpose, c as AgentCandidateExecutorPort, k as AgentCandidateWorkspacePort, p as AgentCandidateExecutorWorkspaceFile, y as AgentCandidateOutputArtifactPort } from "./types-BaIpb0XT.js";
|
|
3
|
+
import { TraceStore } from "@tangle-network/agent-eval";
|
|
4
|
+
import { CodeSurface } from "@tangle-network/agent-eval/campaign";
|
|
5
|
+
import { AgentCandidateArtifactRef, AgentCandidateBundle, AgentCandidateCapturedArtifact, AgentCandidateCodeDisabled, AgentCandidateCodeNoOp, AgentCandidateExecution, AgentCandidateGitHubRepository, AgentCandidateKnowledge, AgentCandidateMemoryPolicy, AgentCandidateProfile, AgentCandidateRunCell, AgentCandidateWorkspaceSnapshotEvidence, AgentProfile as AgentProfile$1, AgentProfileDiff, Sha256Digest } from "@tangle-network/agent-interface";
|
|
6
|
+
import { AgentEnvironmentProvider, AgentExactProcessResources } from "@tangle-network/agent-interface/environment-provider";
|
|
7
|
+
//#region src/candidate-execution/bundle.d.ts
|
|
8
|
+
/** Exact candidate wire shape before the runtime computes its canonical digest. */
|
|
9
|
+
type AgentCandidateBundleInput = Omit<AgentCandidateBundle, 'digest'>;
|
|
10
|
+
/** Validate and content-address a candidate bundle before it crosses an approval boundary. */
|
|
11
|
+
declare function sealAgentCandidateBundle(input: AgentCandidateBundleInput): AgentCandidateBundle;
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/candidate-execution/builder.d.ts
|
|
14
|
+
/** A complete profile that can be frozen without losing behavior. */
|
|
15
|
+
type AgentCandidateProfileSource = {
|
|
16
|
+
kind: 'profile';
|
|
17
|
+
profile: AgentProfile$1;
|
|
18
|
+
} | {
|
|
19
|
+
kind: 'profile-diffs';
|
|
20
|
+
base: AgentProfile$1;
|
|
21
|
+
/** Applied in order before the resulting profile is frozen into the bundle. */
|
|
22
|
+
diffs: readonly AgentProfileDiff[];
|
|
23
|
+
} | {
|
|
24
|
+
kind: 'candidate-profile';
|
|
25
|
+
/** Already converted to the closed, secret-free candidate profile contract. */
|
|
26
|
+
profile: AgentCandidateProfile;
|
|
27
|
+
};
|
|
28
|
+
/** The only accepted path from an agent-eval code candidate to executable bytes. */
|
|
29
|
+
interface AgentCandidateCodeSurfaceSource {
|
|
30
|
+
kind: 'code-surface';
|
|
31
|
+
surface: CodeSurface;
|
|
32
|
+
repository: AgentCandidateGitHubRepository;
|
|
33
|
+
/** Optional parent directory used to resolve a relative `surface.worktreeRef`. */
|
|
34
|
+
worktreeDir?: string;
|
|
35
|
+
}
|
|
36
|
+
/** Explicit control/no-op code or one finalized CodeSurface whose bytes must still verify. */
|
|
37
|
+
type AgentCandidateCodeSource = AgentCandidateCodeDisabled | AgentCandidateCodeNoOp | AgentCandidateCodeSurfaceSource;
|
|
38
|
+
/** Complete measured surfaces and execution policy compiled into one candidate bundle. */
|
|
39
|
+
interface BuildAgentCandidateBundleInput {
|
|
40
|
+
profile: AgentCandidateProfileSource;
|
|
41
|
+
code: AgentCandidateCodeSource;
|
|
42
|
+
execution: AgentCandidateExecution;
|
|
43
|
+
knowledge?: AgentCandidateKnowledge;
|
|
44
|
+
memory: AgentCandidateMemoryPolicy;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Compile one measured profile/code candidate into the immutable execution
|
|
48
|
+
* contract. Code bytes are re-read and verified by agent-eval before they are
|
|
49
|
+
* embedded. The returned bundle is schema-validated, canonically digested, and
|
|
50
|
+
* deeply immutable; call `verifyAgentCandidateBundle` at the execution boundary
|
|
51
|
+
* to re-read external memory, repository, and workspace artifacts.
|
|
52
|
+
*/
|
|
53
|
+
declare function buildAgentCandidateBundle(input: BuildAgentCandidateBundleInput): ReturnType<typeof sealAgentCandidateBundle>;
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/candidate-execution/claim-file-store.d.ts
|
|
56
|
+
interface FileAgentCandidateExecutionClaimStoreOptions {
|
|
57
|
+
/** Evaluator-owned directory shared by every process allowed to execute candidates. */
|
|
58
|
+
directory: string;
|
|
59
|
+
/** Testable evaluator clock; defaults to `Date.now`. */
|
|
60
|
+
now?: () => number;
|
|
61
|
+
}
|
|
62
|
+
/** Cross-process lifecycle implemented as fsynced, create-if-absent records. */
|
|
63
|
+
declare class FileAgentCandidateExecutionClaimStore implements AgentCandidateExecutionClaimStore {
|
|
64
|
+
private readonly directory;
|
|
65
|
+
private readonly now;
|
|
66
|
+
constructor(options: FileAgentCandidateExecutionClaimStoreOptions);
|
|
67
|
+
tryClaim(requested: AgentCandidateExecutionClaim): Promise<AgentCandidateExecutionClaimResult>;
|
|
68
|
+
getAttempt(requestedAttempt: AgentCandidateExecutionAttemptRef): Promise<AgentCandidateExecutionAttemptRecord | undefined>;
|
|
69
|
+
markCandidateMayRun(requestedLease: AgentCandidateExecutionLease): Promise<AgentCandidateExecutionPhaseResult>;
|
|
70
|
+
stageTerminal(requestedLease: AgentCandidateExecutionLease, result: AgentCandidateExecutionTerminalResult): Promise<AgentCandidateExecutionStageResult>;
|
|
71
|
+
finish(requestedLease: AgentCandidateExecutionLease, requestedTerminalDigest: Sha256Digest): Promise<AgentCandidateExecutionFinishResult>;
|
|
72
|
+
recoverExpired(requestedAttempt: AgentCandidateExecutionAttemptRef, evidence: AgentCandidateExecutionRecoveryEvidence): Promise<AgentCandidateExecutionFinishResult>;
|
|
73
|
+
private storedAttempt;
|
|
74
|
+
private transitionState;
|
|
75
|
+
private retryFailure;
|
|
76
|
+
private ownerPublication;
|
|
77
|
+
private claimPath;
|
|
78
|
+
private terminalPath;
|
|
79
|
+
private transitionPath;
|
|
80
|
+
}
|
|
81
|
+
//#endregion
|
|
82
|
+
//#region src/candidate-execution/dispose.d.ts
|
|
83
|
+
interface DisposePreparedAgentCandidateOptions {
|
|
84
|
+
cleanupTimeoutMs?: number;
|
|
85
|
+
}
|
|
86
|
+
/** Revoke reservations held by a prepared candidate that will not be executed. */
|
|
87
|
+
declare function disposePreparedAgentCandidateExecution(prepared: PreparedAgentCandidateExecution, options?: DisposePreparedAgentCandidateOptions): Promise<{
|
|
88
|
+
disposed: true;
|
|
89
|
+
}>;
|
|
90
|
+
//#endregion
|
|
91
|
+
//#region src/candidate-execution/exact-process-executor.d.ts
|
|
92
|
+
interface ExactProcessCandidateExecutorOptions {
|
|
93
|
+
provider: AgentEnvironmentProvider;
|
|
94
|
+
resources: AgentExactProcessResources;
|
|
95
|
+
provisionTimeoutMs?: number;
|
|
96
|
+
recoveryRetentionMs?: number;
|
|
97
|
+
providerOptions?: Record<string, unknown>;
|
|
98
|
+
}
|
|
99
|
+
/** Adapt one neutral exact-process provider to Runtime's trusted candidate boundary. */
|
|
100
|
+
declare function exactProcessProviderAsCandidateExecutor(options: ExactProcessCandidateExecutorOptions): AgentCandidateExecutorPort;
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region src/candidate-execution/knowledge.d.ts
|
|
103
|
+
/** Environment variable containing the materialized candidate knowledge root. */
|
|
104
|
+
declare const CANDIDATE_KNOWLEDGE_ROOT_ENV = "TANGLE_CANDIDATE_KNOWLEDGE_ROOT";
|
|
105
|
+
/** Environment variable containing the materialized retrieval configuration path. */
|
|
106
|
+
declare const CANDIDATE_KNOWLEDGE_RETRIEVAL_CONFIG_ENV = "TANGLE_CANDIDATE_KNOWLEDGE_RETRIEVAL_CONFIG";
|
|
107
|
+
/** Deterministic, signed locations used by every candidate executor. */
|
|
108
|
+
declare function candidateKnowledgeExecutionPaths(taskRoot: string, hasRetrievalConfig: boolean): {
|
|
109
|
+
root: string;
|
|
110
|
+
retrievalConfig?: string;
|
|
111
|
+
};
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region src/candidate-execution/output-artifacts.d.ts
|
|
114
|
+
/** Persist evaluator evidence, read it back, and bind the returned locator to the exact bytes. */
|
|
115
|
+
declare function persistCandidateOutputArtifact(port: AgentCandidateOutputArtifactPort, input: {
|
|
116
|
+
executionId: string;
|
|
117
|
+
purpose: AgentCandidateOutputPurpose;
|
|
118
|
+
bytes: Uint8Array;
|
|
119
|
+
signal?: AbortSignal;
|
|
120
|
+
}): Promise<AgentCandidateArtifactRef>;
|
|
121
|
+
//#endregion
|
|
122
|
+
//#region src/candidate-execution/recover.d.ts
|
|
123
|
+
interface RecoverExpiredAgentCandidateOptions {
|
|
124
|
+
attempt: AgentCandidateExecutionAttemptRef;
|
|
125
|
+
claimStore: AgentCandidateExecutionClaimStore;
|
|
126
|
+
executor: AgentCandidateExecutorPort;
|
|
127
|
+
traceStore: TraceStore;
|
|
128
|
+
ports: Pick<AgentCandidateExecutionPorts, 'models' | 'memory'>;
|
|
129
|
+
outputArtifacts: AgentCandidateOutputArtifactPort;
|
|
130
|
+
cleanupTimeoutMs?: number;
|
|
131
|
+
/** Evaluator clock; must be the same clock used by the claim store. */
|
|
132
|
+
now?: () => number;
|
|
133
|
+
}
|
|
134
|
+
/** Close an expired crashed attempt from persisted non-secret handles, then record failure. */
|
|
135
|
+
declare function recoverExpiredAgentCandidateExecution(options: RecoverExpiredAgentCandidateOptions): Promise<AgentCandidateExecutionFinishResult>;
|
|
136
|
+
//#endregion
|
|
137
|
+
//#region src/candidate-execution/verify.d.ts
|
|
138
|
+
/** Surfaces admitted by Runtime's verifier before an environment adapter is selected. */
|
|
139
|
+
declare const AGENT_CANDIDATE_EXECUTION_SUPPORT: Readonly<{
|
|
140
|
+
outcomes: readonly ["workspace", "output"];
|
|
141
|
+
code: readonly ["disabled", "no-op", "git-patch"];
|
|
142
|
+
memory: readonly ["disabled", "isolated"];
|
|
143
|
+
knowledge: true;
|
|
144
|
+
profile: Readonly<{
|
|
145
|
+
mcpTransports: readonly ["stdio"];
|
|
146
|
+
remoteMcp: false;
|
|
147
|
+
tools: false;
|
|
148
|
+
permissions: false;
|
|
149
|
+
modes: false;
|
|
150
|
+
confidential: false;
|
|
151
|
+
}>;
|
|
152
|
+
}>;
|
|
153
|
+
/** Verifies every digest, resource, workspace, and Git object in a candidate bundle. */
|
|
154
|
+
declare function verifyAgentCandidateBundle(input: unknown, ports: AgentCandidateVerificationPorts): Promise<VerifiedAgentCandidate>;
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region src/candidate-execution/workspace-archive.d.ts
|
|
157
|
+
interface AgentCandidateWorkspaceArchiveLimits {
|
|
158
|
+
maxArchiveBytes: number;
|
|
159
|
+
maxEmbeddedArtifactBytes: number;
|
|
160
|
+
maxFiles: number;
|
|
161
|
+
maxFileBytes: number;
|
|
162
|
+
maxTotalFileBytes: number;
|
|
163
|
+
maxPathBytes: number;
|
|
164
|
+
maxRepositoryBundleBytes: number;
|
|
165
|
+
}
|
|
166
|
+
interface CaptureAgentCandidateWorkspaceOptions {
|
|
167
|
+
/** Include Git HEAD so task preparation can prove its exact commit and tree. */
|
|
168
|
+
includeRepository?: boolean;
|
|
169
|
+
limits?: Partial<AgentCandidateWorkspaceArchiveLimits>;
|
|
170
|
+
/** Use the evaluator-owned artifact store when manifest or archive bytes should not be embedded. */
|
|
171
|
+
artifactPersistence?: {
|
|
172
|
+
executionId: string;
|
|
173
|
+
outputArtifacts: AgentCandidateOutputArtifactPort;
|
|
174
|
+
signal?: AbortSignal;
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
interface CreateAgentCandidateWorkspacePortOptions {
|
|
178
|
+
limits?: Partial<AgentCandidateWorkspaceArchiveLimits>;
|
|
179
|
+
}
|
|
180
|
+
interface CapturedAgentCandidateWorkspace {
|
|
181
|
+
readonly snapshot: AgentCandidateWorkspaceSnapshotEvidence;
|
|
182
|
+
/** Caller-owned bytes accepted by createAgentCandidateWorkspacePort. */
|
|
183
|
+
readonly archive: Uint8Array;
|
|
184
|
+
}
|
|
185
|
+
/** Capture one exact regular-file workspace for immutable candidate execution. */
|
|
186
|
+
declare function captureAgentCandidateWorkspace(rootInput: string, options?: CaptureAgentCandidateWorkspaceOptions): Promise<CapturedAgentCandidateWorkspace>;
|
|
187
|
+
/** Capture detached files returned by a remote executor into the standard archive. */
|
|
188
|
+
declare function captureAgentCandidateWorkspaceFiles(input: readonly AgentCandidateExecutorWorkspaceFile[], options?: Omit<CaptureAgentCandidateWorkspaceOptions, 'includeRepository'>): Promise<CapturedAgentCandidateWorkspace>;
|
|
189
|
+
/** Create the standard bounded materializer for candidate execution ports. */
|
|
190
|
+
declare function createAgentCandidateWorkspacePort(options?: CreateAgentCandidateWorkspacePortOptions): AgentCandidateWorkspacePort;
|
|
191
|
+
//#endregion
|
|
192
|
+
export { AgentCandidateCodeSurfaceSource as C, AgentCandidateBundleInput as D, buildAgentCandidateBundle as E, sealAgentCandidateBundle as O, AgentCandidateCodeSource as S, BuildAgentCandidateBundleInput as T, exactProcessProviderAsCandidateExecutor as _, captureAgentCandidateWorkspace as a, FileAgentCandidateExecutionClaimStore as b, AGENT_CANDIDATE_EXECUTION_SUPPORT as c, recoverExpiredAgentCandidateExecution as d, persistCandidateOutputArtifact as f, ExactProcessCandidateExecutorOptions as g, candidateKnowledgeExecutionPaths as h, CreateAgentCandidateWorkspacePortOptions as i, verifyAgentCandidateBundle as l, CANDIDATE_KNOWLEDGE_ROOT_ENV as m, CaptureAgentCandidateWorkspaceOptions as n, captureAgentCandidateWorkspaceFiles as o, CANDIDATE_KNOWLEDGE_RETRIEVAL_CONFIG_ENV as p, CapturedAgentCandidateWorkspace as r, createAgentCandidateWorkspacePort as s, AgentCandidateWorkspaceArchiveLimits as t, RecoverExpiredAgentCandidateOptions as u, DisposePreparedAgentCandidateOptions as v, AgentCandidateProfileSource as w, FileAgentCandidateExecutionClaimStoreOptions as x, disposePreparedAgentCandidateExecution as y };
|
|
193
|
+
//# sourceMappingURL=index-C-FYUuFG.d.ts.map
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { R as Budget, st as SupervisedResult } from "./environment-provider-IUGU3epE.js";
|
|
2
|
+
import { Ec as DeliverableSpec, ct as SupervisorProfile, j as SuperviseOptions, qs as ExecutorConfig } from "./index-DruSKs3Z.js";
|
|
3
|
+
import { y as AgentCandidateOutputArtifactPort } from "./types-BaIpb0XT.js";
|
|
4
|
+
import { i as AgentImprovementActivationTransition, n as AgentImprovementActivationResultStore, t as AgentImprovementActivationReconciliation } from "./activation-DyWB0K6E.js";
|
|
5
|
+
import { AgentCandidateBundle, AgentCandidateCapturedArtifact, AgentCandidateKnowledge } from "@tangle-network/agent-interface";
|
|
6
|
+
import { BuildEvalKnowledgeBundleOptions, KnowledgeBaseQualityOptions, KnowledgeImprovementOptions, KnowledgeImprovementResult, KnowledgeReadinessSpec, PromoteKnowledgeCandidateOptions, RagKnowledgeUpdateResult } from "@tangle-network/agent-knowledge";
|
|
7
|
+
//#region src/knowledge/activation.d.ts
|
|
8
|
+
interface CreateKnowledgeImprovementActivationExecutorOptions extends Omit<PromoteKnowledgeCandidateOptions, 'root' | 'candidate'> {
|
|
9
|
+
root: string;
|
|
10
|
+
identity: string;
|
|
11
|
+
results: AgentImprovementActivationResultStore;
|
|
12
|
+
}
|
|
13
|
+
interface KnowledgeImprovementActivationExecutor {
|
|
14
|
+
transition: AgentImprovementActivationTransition;
|
|
15
|
+
reconcile: AgentImprovementActivationReconciliation;
|
|
16
|
+
}
|
|
17
|
+
/** Apply or restore one local knowledge candidate through the shared activation contract. */
|
|
18
|
+
declare function createKnowledgeImprovementActivationExecutor(options: CreateKnowledgeImprovementActivationExecutorOptions): KnowledgeImprovementActivationExecutor;
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/knowledge/supervised-update.d.ts
|
|
21
|
+
/** Standing prompt for a supervisor that grows a shared knowledge base through spawned researchers. */
|
|
22
|
+
declare const RESEARCH_SUPERVISOR_SYSTEM_PROMPT: string;
|
|
23
|
+
interface KnowledgeReadinessCheckInput {
|
|
24
|
+
root: string;
|
|
25
|
+
goal: string;
|
|
26
|
+
readinessSpecs?: readonly unknown[];
|
|
27
|
+
readinessTaskId?: string;
|
|
28
|
+
readiness?: unknown;
|
|
29
|
+
}
|
|
30
|
+
type KnowledgeReadinessCheckResult = boolean | {
|
|
31
|
+
ready: boolean;
|
|
32
|
+
summary?: string;
|
|
33
|
+
metadata?: Record<string, unknown>;
|
|
34
|
+
};
|
|
35
|
+
type KnowledgeReadinessCheck = (input: KnowledgeReadinessCheckInput) => Promise<KnowledgeReadinessCheckResult> | KnowledgeReadinessCheckResult;
|
|
36
|
+
interface SupervisedKnowledgeUpdateInput {
|
|
37
|
+
goal?: string;
|
|
38
|
+
root?: string;
|
|
39
|
+
candidateRoot?: string;
|
|
40
|
+
findings?: readonly unknown[];
|
|
41
|
+
metadata?: Record<string, unknown>;
|
|
42
|
+
}
|
|
43
|
+
interface SupervisedKnowledgeUpdateResult {
|
|
44
|
+
applied: boolean;
|
|
45
|
+
summary: string;
|
|
46
|
+
supervised: SupervisedResult<unknown>;
|
|
47
|
+
metadata: NonNullable<RagKnowledgeUpdateResult['metadata']>;
|
|
48
|
+
}
|
|
49
|
+
interface SupervisedKnowledgeUpdateOptions {
|
|
50
|
+
root: string;
|
|
51
|
+
goal: string;
|
|
52
|
+
readiness: KnowledgeReadinessCheck;
|
|
53
|
+
readinessSpecs?: readonly unknown[];
|
|
54
|
+
readinessTaskId?: string;
|
|
55
|
+
readinessOptions?: unknown;
|
|
56
|
+
findings?: readonly unknown[];
|
|
57
|
+
metadata?: Record<string, unknown>;
|
|
58
|
+
budget: Budget;
|
|
59
|
+
backend?: ExecutorConfig;
|
|
60
|
+
makeWorkerAgent?: SuperviseOptions['makeWorkerAgent'];
|
|
61
|
+
harness?: string;
|
|
62
|
+
supervisorModel?: string;
|
|
63
|
+
supervisorSystemPrompt?: string;
|
|
64
|
+
superviseOptions?: Partial<Omit<SuperviseOptions, 'budget' | 'backend' | 'deliverable' | 'makeWorkerAgent' | 'allowedModels'>>;
|
|
65
|
+
allowedModels?: readonly string[];
|
|
66
|
+
runSupervised?: (profile: SupervisorProfile, task: unknown, opts: SuperviseOptions) => Promise<SupervisedResult<unknown>>;
|
|
67
|
+
}
|
|
68
|
+
type SupervisedKnowledgeUpdater = (input: SupervisedKnowledgeUpdateInput) => Promise<SupervisedKnowledgeUpdateResult>;
|
|
69
|
+
/** Build the completion check a supervised KB update uses to stop only when the KB is ready. */
|
|
70
|
+
declare function knowledgeReadinessDeliverable(options: Pick<SupervisedKnowledgeUpdateOptions, 'root' | 'goal' | 'readiness' | 'readinessSpecs' | 'readinessTaskId' | 'readinessOptions'>): DeliverableSpec<unknown>;
|
|
71
|
+
/** Create an `improveKnowledgeBase` update callback backed by runtime supervision. */
|
|
72
|
+
declare function createSupervisedKnowledgeUpdater(options: SupervisedKnowledgeUpdateOptions): SupervisedKnowledgeUpdater;
|
|
73
|
+
/** Run a runtime supervisor that updates one candidate knowledge base and stops on readiness. */
|
|
74
|
+
declare function runSupervisedKnowledgeUpdate(options: SupervisedKnowledgeUpdateOptions): Promise<SupervisedKnowledgeUpdateResult>;
|
|
75
|
+
/** Format the supervisor task with the KB root, readiness requirements, current findings, and metadata. */
|
|
76
|
+
declare function formatSupervisedKnowledgeTask(options: Pick<SupervisedKnowledgeUpdateOptions, 'root' | 'goal' | 'readinessSpecs' | 'readinessTaskId' | 'findings' | 'metadata'>): string;
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/knowledge/improvement-job.d.ts
|
|
79
|
+
interface RunKnowledgeImprovementJobOptions extends Omit<KnowledgeImprovementOptions, 'updateKnowledge'> {
|
|
80
|
+
budget: Budget;
|
|
81
|
+
readinessCheck?: KnowledgeReadinessCheck;
|
|
82
|
+
backend?: ExecutorConfig;
|
|
83
|
+
makeWorkerAgent?: SuperviseOptions['makeWorkerAgent'];
|
|
84
|
+
harness?: string;
|
|
85
|
+
supervisorModel?: string;
|
|
86
|
+
supervisorSystemPrompt?: string;
|
|
87
|
+
superviseOptions?: Partial<Omit<SuperviseOptions, 'budget' | 'backend' | 'deliverable' | 'makeWorkerAgent' | 'allowedModels'>>;
|
|
88
|
+
allowedModels?: readonly string[];
|
|
89
|
+
runSupervised?: (profile: SupervisorProfile, task: unknown, opts: SuperviseOptions) => Promise<SupervisedResult<unknown>>;
|
|
90
|
+
candidateArtifacts?: AgentCandidateOutputArtifactPort;
|
|
91
|
+
onMeasurement?: (measurement: KnowledgeImprovementJobMeasurement) => Promise<void> | void;
|
|
92
|
+
}
|
|
93
|
+
interface KnowledgeImprovementJobMeasurement {
|
|
94
|
+
startedAt: string;
|
|
95
|
+
finishedAt: string;
|
|
96
|
+
durationMs: number;
|
|
97
|
+
updateCalls: number;
|
|
98
|
+
updateDurationMs: number;
|
|
99
|
+
supervisedSpent: {
|
|
100
|
+
iterations: number;
|
|
101
|
+
inputTokens: number;
|
|
102
|
+
outputTokens: number;
|
|
103
|
+
usdKnown: boolean;
|
|
104
|
+
usd: number;
|
|
105
|
+
ms: number;
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
interface KnowledgeImprovementJobResult {
|
|
109
|
+
improvement: KnowledgeImprovementResult;
|
|
110
|
+
knowledge?: KnowledgeImprovementCandidatePair;
|
|
111
|
+
measurement: KnowledgeImprovementJobMeasurement;
|
|
112
|
+
blocked: boolean;
|
|
113
|
+
}
|
|
114
|
+
interface KnowledgeImprovementCandidatePair {
|
|
115
|
+
reference: AgentCandidateKnowledge['candidate'];
|
|
116
|
+
evaluation: AgentCandidateCapturedArtifact;
|
|
117
|
+
baseline: AgentCandidateKnowledge['snapshot'];
|
|
118
|
+
candidate: AgentCandidateKnowledge['snapshot'];
|
|
119
|
+
}
|
|
120
|
+
interface KnowledgeImprovementExperimentBundles {
|
|
121
|
+
baseline: AgentCandidateBundle;
|
|
122
|
+
candidate: AgentCandidateBundle;
|
|
123
|
+
}
|
|
124
|
+
interface AgentKnowledgeReadinessCheckOptions {
|
|
125
|
+
goal: string;
|
|
126
|
+
readinessSpecs?: readonly KnowledgeReadinessSpec[];
|
|
127
|
+
readinessTaskId?: string;
|
|
128
|
+
readiness?: Omit<BuildEvalKnowledgeBundleOptions, 'taskId' | 'index' | 'specs'>;
|
|
129
|
+
strict?: boolean;
|
|
130
|
+
kbQuality?: KnowledgeBaseQualityOptions;
|
|
131
|
+
}
|
|
132
|
+
/** Build the default readiness check backed by `@tangle-network/agent-knowledge` validation and scoring. */
|
|
133
|
+
declare function createAgentKnowledgeReadinessCheck(options: AgentKnowledgeReadinessCheckOptions): KnowledgeReadinessCheck;
|
|
134
|
+
/** Produce a frozen KB candidate while leaving live knowledge content unchanged. */
|
|
135
|
+
declare function runKnowledgeImprovementJob(options: RunKnowledgeImprovementJobOptions): Promise<KnowledgeImprovementJobResult>;
|
|
136
|
+
/** Attach both frozen knowledge inputs to one otherwise-identical bundle pair. */
|
|
137
|
+
declare function buildKnowledgeImprovementExperimentBundles(bundle: AgentCandidateBundle, knowledge: KnowledgeImprovementCandidatePair): KnowledgeImprovementExperimentBundles;
|
|
138
|
+
//#endregion
|
|
139
|
+
export { KnowledgeImprovementActivationExecutor as C, CreateKnowledgeImprovementActivationExecutorOptions as S, SupervisedKnowledgeUpdater as _, KnowledgeImprovementJobResult as a, knowledgeReadinessDeliverable as b, createAgentKnowledgeReadinessCheck as c, KnowledgeReadinessCheckInput as d, KnowledgeReadinessCheckResult as f, SupervisedKnowledgeUpdateResult as g, SupervisedKnowledgeUpdateOptions as h, KnowledgeImprovementJobMeasurement as i, runKnowledgeImprovementJob as l, SupervisedKnowledgeUpdateInput as m, KnowledgeImprovementCandidatePair as n, RunKnowledgeImprovementJobOptions as o, RESEARCH_SUPERVISOR_SYSTEM_PROMPT as p, KnowledgeImprovementExperimentBundles as r, buildKnowledgeImprovementExperimentBundles as s, AgentKnowledgeReadinessCheckOptions as t, KnowledgeReadinessCheck as u, createSupervisedKnowledgeUpdater as v, createKnowledgeImprovementActivationExecutor as w, runSupervisedKnowledgeUpdate as x, formatSupervisedKnowledgeTask as y };
|
|
140
|
+
//# sourceMappingURL=index-CbNM40xG.d.ts.map
|