@tangle-network/agent-runtime 0.337.2 → 0.339.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/dist/{activation-DRHM55Oo.d.ts → activation-CJIIl_Ey.d.ts} +90 -22
- package/dist/activation-CVSFxis9.js +876 -0
- package/dist/activation-CVSFxis9.js.map +1 -0
- package/dist/agent.d.ts +4 -4
- package/dist/agent.js +4 -7
- package/dist/agent.js.map +1 -1
- package/dist/{bundle-BPGjESee.js → bundle-DVOhBTic.js} +2 -2
- package/dist/{bundle-BPGjESee.js.map → bundle-DVOhBTic.js.map} +1 -1
- package/dist/candidate-execution/index.d.ts +4 -63
- package/dist/candidate-execution/index.js +6 -146
- package/dist/candidate-execution/index.js.map +1 -1
- package/dist/content-digest-sBTLujlK.js +9 -0
- package/dist/content-digest-sBTLujlK.js.map +1 -0
- package/dist/{delegate-B-T_ZB50.js → delegate-CCWE_AkU.js} +2 -2
- package/dist/{delegate-B-T_ZB50.js.map → delegate-CCWE_AkU.js.map} +1 -1
- package/dist/{coordination-driver-BHkFVqIq.js → driver-control-acknowledgers-C53ggdJ6.js} +4520 -4442
- package/dist/driver-control-acknowledgers-C53ggdJ6.js.map +1 -0
- package/dist/{durable-file-B_eJr6Mb.js → durable-file-gNI9ILAn.js} +1 -3
- package/dist/durable-file-gNI9ILAn.js.map +1 -0
- package/dist/durable.d.ts +3 -35
- package/dist/durable.js +225 -229
- package/dist/durable.js.map +1 -1
- package/dist/{graph-C4RFlWAJ.js → graph-CI9JXKqO.js} +65 -18
- package/dist/graph-CI9JXKqO.js.map +1 -0
- package/dist/{graph-registry-DAI6KNXB.js → graph-registry-BnO64cn8.js} +18 -17
- package/dist/graph-registry-BnO64cn8.js.map +1 -0
- package/dist/{improvement-cycle-D1I4hQvf.js → improve-BOXTLWJ3.js} +76 -1248
- package/dist/improve-BOXTLWJ3.js.map +1 -0
- package/dist/{improvement-adapter-D5gwwoXQ.d.ts → improvement-adapter-HUt_-cWA.d.ts} +2 -20
- package/dist/index.d.ts +10 -207
- package/dist/index.js +91 -305
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +10 -229
- package/dist/intelligence.js +506 -88
- package/dist/intelligence.js.map +1 -1
- package/dist/{jsonl-file-DBv31uPi.js → jsonl-file-C9Kde_0Z.js} +2 -2
- package/dist/{jsonl-file-DBv31uPi.js.map → jsonl-file-C9Kde_0Z.js.map} +1 -1
- package/dist/kernel.d.ts +4 -3
- package/dist/kernel.js +12 -13
- package/dist/loop-runner-CWzG1bH4.d.ts +32 -0
- package/dist/loop-runner-bin.d.ts +32 -2
- package/dist/loop-runner-bin.js +93 -1
- package/dist/loop-runner-bin.js.map +1 -0
- package/dist/loop-runner-pmPIHFVY.js +59 -0
- package/dist/loop-runner-pmPIHFVY.js.map +1 -0
- package/dist/mcp/bin.js +3 -3
- package/dist/mcp/bin.js.map +1 -1
- package/dist/mcp/index.d.ts +101 -416
- package/dist/mcp/index.js +122 -206
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/memory-bin.js +231 -1
- package/dist/mcp/memory-bin.js.map +1 -1
- package/dist/model-policy-CyCUwHed.js.map +1 -1
- package/dist/placement.d.ts +2 -9
- package/dist/placement.js +1 -1
- package/dist/placement.js.map +1 -1
- package/dist/platform.d.ts +194 -2
- package/dist/platform.js +145 -9
- package/dist/platform.js.map +1 -1
- package/dist/{prepare-CER-ZkPp.js → prepare-bXkvPMJA.js} +1213 -710
- package/dist/prepare-bXkvPMJA.js.map +1 -0
- package/dist/{profile-gNUsHNIJ.js → profile-Dpei_Sq0.js} +89 -3
- package/dist/profile-Dpei_Sq0.js.map +1 -0
- package/dist/{profile-materialization-BnoEf1co.d.ts → profile-materialization-B1wm2SPT.d.ts} +3 -5
- package/dist/profiles.d.ts +2 -2
- package/dist/profiles.js +4 -43
- package/dist/profiles.js.map +1 -1
- package/dist/{protected-model-port-BhpQRTw-.d.ts → protected-model-port-BGgpy2r9.d.ts} +4 -30
- package/dist/protected-redaction-DFCeo4vg.js.map +1 -1
- package/dist/{provision-supervisor-DGegCUH4.js → provision-supervisor-CJ6Zz6dz.js} +13 -10
- package/dist/provision-supervisor-CJ6Zz6dz.js.map +1 -0
- package/dist/record-value-B6bwJxLa.js +12 -0
- package/dist/record-value-B6bwJxLa.js.map +1 -0
- package/dist/{run-layout-Cu8H7aeh.js → run-cancellation-C9oL62sW.js} +175 -100
- package/dist/run-cancellation-C9oL62sW.js.map +1 -0
- package/dist/{runtime-BOGpotnH.js → runtime-B2fjL9Oi.js} +2639 -3187
- package/dist/runtime-B2fjL9Oi.js.map +1 -0
- package/dist/{runtime-hooks-Bj6wJHlH.d.ts → runtime-hooks-nsqxSUFL.d.ts} +2 -6
- package/dist/{sandbox-profile-compat-QTkLe1Z6.js → sandbox-profile-compat-BzVBFqrz.js} +690 -699
- package/dist/sandbox-profile-compat-BzVBFqrz.js.map +1 -0
- package/dist/search-executor-zMumiak_.js +1916 -0
- package/dist/search-executor-zMumiak_.js.map +1 -0
- package/dist/{server-hZWM-G8w.js → server-_4voDNrl.js} +362 -67
- package/dist/server-_4voDNrl.js.map +1 -0
- package/dist/{search-executor-Cm1WZmL-.js → structural-rollout-DpLCXzaL.js} +1680 -3403
- package/dist/structural-rollout-DpLCXzaL.js.map +1 -0
- package/dist/{substrate-B0TYNrXn.js → substrate-CGDFTSRh.js} +2 -9
- package/dist/substrate-CGDFTSRh.js.map +1 -0
- package/dist/{supervise-CvAKVfue.js → supervise-qAwXmPtD.js} +7768 -5360
- package/dist/supervise-qAwXmPtD.js.map +1 -0
- package/dist/{supervisor-Rz8AGpYb.js → supervisor-DHrUJhEZ.js} +26301 -26964
- package/dist/supervisor-DHrUJhEZ.js.map +1 -0
- package/dist/testing.d.ts +227 -2
- package/dist/testing.js +13 -14
- package/dist/testing.js.map +1 -1
- package/dist/tool-loop.d.ts +1 -1
- package/dist/{tool-server-Dqer2M4_.js → tool-server-XV4aJwoQ.js} +2 -2
- package/dist/tool-server-XV4aJwoQ.js.map +1 -0
- package/dist/top-snapshot-CbZE1JsU.js +502 -0
- package/dist/top-snapshot-CbZE1JsU.js.map +1 -0
- package/dist/tui/bin.js +711 -1
- package/dist/tui/bin.js.map +1 -1
- package/dist/tui/index.d.ts +5 -71
- package/dist/tui/index.js +3 -3
- package/dist/{types-Dl5L4r8Z.d.ts → types-CaOXqRTq.d.ts} +16230 -17376
- package/dist/workspace-store/index.d.ts +2 -27
- package/dist/workspace-store/index.js +2 -2
- package/dist/workspace-store/index.js.map +1 -1
- package/dist/{workspace-streams-JLjh5DC6.d.ts → workspace-streams-BiS4ABah.d.ts} +19 -32
- package/package.json +2 -2
- package/skills/agent-graphs/SKILL.md +10 -3
- package/skills/agent-graphs/references/authoring.md +18 -0
- package/skills/profile-authoring/SKILL.md +3 -3
- package/skills/supervise/SKILL.md +2 -2
- package/dist/activation-BDP6Eivv.js +0 -234
- package/dist/activation-BDP6Eivv.js.map +0 -1
- package/dist/coder-yhVWbdWc.js +0 -40
- package/dist/coder-yhVWbdWc.js.map +0 -1
- package/dist/coordination-driver-BHkFVqIq.js.map +0 -1
- package/dist/delegation-status-CF4D0NZ_.js +0 -358
- package/dist/delegation-status-CF4D0NZ_.js.map +0 -1
- package/dist/durable-file-B_eJr6Mb.js.map +0 -1
- package/dist/graph-C4RFlWAJ.js.map +0 -1
- package/dist/graph-registry-DAI6KNXB.js.map +0 -1
- package/dist/improvement-cycle-D1I4hQvf.js.map +0 -1
- package/dist/integrations-DopfCC2a.d.ts +0 -190
- package/dist/integrations-dFi-ALk7.js +0 -132
- package/dist/integrations-dFi-ALk7.js.map +0 -1
- package/dist/kb-gate-C8z2juK8.d.ts +0 -80
- package/dist/kb-gate-DpaSwXVx.js +0 -80
- package/dist/kb-gate-DpaSwXVx.js.map +0 -1
- package/dist/loop-runner-bin-DOuBIJ2O.d.ts +0 -164
- package/dist/loop-runner-bin-Dv5QvYDH.js +0 -246
- package/dist/loop-runner-bin-Dv5QvYDH.js.map +0 -1
- package/dist/memory-server-DXQ8IxGR.js +0 -234
- package/dist/memory-server-DXQ8IxGR.js.map +0 -1
- package/dist/openai-tools-DoQ32vpe.js +0 -44
- package/dist/openai-tools-DoQ32vpe.js.map +0 -1
- package/dist/openai-tools-Oxk4KQrY.d.ts +0 -24
- package/dist/prepare-CER-ZkPp.js.map +0 -1
- package/dist/profile-gNUsHNIJ.js.map +0 -1
- package/dist/protected-model-port-BuRsviSL.js +0 -766
- package/dist/protected-model-port-BuRsviSL.js.map +0 -1
- package/dist/provision-supervisor-DGegCUH4.js.map +0 -1
- package/dist/run-layout-Cu8H7aeh.js.map +0 -1
- package/dist/runtime-BOGpotnH.js.map +0 -1
- package/dist/sandbox-profile-compat-QTkLe1Z6.js.map +0 -1
- package/dist/search-executor-Cm1WZmL-.js.map +0 -1
- package/dist/server-hZWM-G8w.js.map +0 -1
- package/dist/substrate-B0TYNrXn.js.map +0 -1
- package/dist/supervise-CvAKVfue.js.map +0 -1
- package/dist/supervisor-Rz8AGpYb.js.map +0 -1
- package/dist/tool-server-Dqer2M4_.js.map +0 -1
- package/dist/top-app-BaMw1W2z.js +0 -1212
- package/dist/top-app-BaMw1W2z.js.map +0 -1
package/dist/intelligence.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { S as RuntimeStreamEvent, V_ as RuntimeTelemetryOptions, k_ as OtelExportStats, lm as AgentEnvironmentProviderRef, nb as defaultRedactor, oS as LoopTraceEvent, tb as Redactor, um as AgentEnvironmentProviderRegistry } from "./types-CaOXqRTq.js";
|
|
2
|
+
import { H as AgentCandidateTaskExecution, N as AgentCandidateOutputArtifactPort, S as AgentCandidateExecutorPort, _ as AgentCandidateBenchmarkGraderPort, y as AgentCandidateExecutionPorts } from "./workspace-streams-BiS4ABah.js";
|
|
3
3
|
import { d as RunAnalystLoopOpts, f as RunAnalystLoopResult } from "./types-zWfqDjeL.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { AgentCandidateBenchmarkCellRef,
|
|
4
|
+
import { S as AgentCandidateExecutionClaimStore, d as parseAgentCandidateProfileActivation, g as ExecutePreparedAgentCandidateOptions, i as CreateProtectedAgentCandidateModelPortOptions, m as PrepareAgentCandidateExecutionOptions } from "./protected-model-port-BGgpy2r9.js";
|
|
5
|
+
import { A as AgentProfileMeasuredSurface, C as verifyAgentImprovementProposal, D as AgentImprovementActivationTargetIdentity, E as AGENT_PROFILE_MEASURED_SURFACES, F as isAgentImprovementProfileSurface, I as isAgentProfileMeasuredSurface, M as agentImprovementProfileSurfaceDigest, N as agentImprovementProfileSurfaceInput, O as AgentImprovementProfileSurface, P as agentImprovementTargetProfileDiffs, S as verifyAgentImprovementActivationResult, T as AGENT_IMPROVEMENT_PROFILE_SURFACES, _ as createAgentImprovementActivationResult, _t as ImproveResult, a as AgentImprovementActivationTransitionInput, b as reviewAgentImprovementProposal, c as CreateAgentImprovementActivationOptions, d as ExecuteAgentImprovementActivationInput, f as ExecuteAgentImprovementActivationOptions, g as createAgentImprovementActivation, h as SealedCandidateActivationTransitionInput, j as agentImprovementProfileDiffs, k as AgentImprovementTargetProfileDiffOptions, l as CreateAgentImprovementActivationResultOptions, lt as ImproveMethodOptions, m as ReviewAgentImprovementInput, o as AgentProfileImprovementActivationOperation, p as ProfileImprovementActivationTransitionInput, pt as ImproveOptions, r as AgentImprovementActivationTargetPlan, s as AgentProfileImprovementActivationTargetPlan, u as CreateAgentImprovementProposalOptions, ut as ImproveMethodResult, v as createAgentImprovementProposal, w as verifyAgentImprovementReview, x as verifyAgentImprovementActivation, y as executeAgentImprovementActivation, yt as ImproveScenarioPartitions } from "./activation-CJIIl_Ey.js";
|
|
6
|
+
import { AgentCandidateBenchmarkCellRef, AgentCandidateEvaluationPolicy, AgentCandidateExperiment, AgentCandidateExperimentMaterial, AgentCandidateExperimentMeasurement, AgentCandidateLineage, AgentImprovementActivation, AgentImprovementActivationIntent, AgentImprovementActivationOutcome, AgentImprovementActivationResult, AgentImprovementActivationTargetState, AgentImprovementActivationTargetTransition, AgentImprovementEvaluation, AgentImprovementMeasuredComparison, AgentImprovementProposal, AgentImprovementProposal as AgentImprovementProposal$1, AgentImprovementReview, AgentImprovementReviewDecision, AgentImprovementSource, AgentProfile, AgentProfileDiff, AgentProfileImprovementExecutionRef, AgentProfileImprovementExperiment, AgentProfileImprovementMeasuredComparison, AgentProfileImprovementMeasurement, AgentProfileImprovementRunReceipt, AgentProfileImprovementTaskMaterial, CandidateExecutionEvidence, CandidateExecutionEvidence as CandidateExecutionEvidence$1, Sha256Digest } from "@tangle-network/agent-interface";
|
|
7
7
|
import { CostLedgerHandle, TraceStore } from "@tangle-network/agent-eval";
|
|
8
8
|
import { ProposalFinding as ProposalFinding$1 } from "@tangle-network/agent-eval/analyst";
|
|
9
9
|
import { CampaignScenarioIdentity, OptimizationMethodComparison, OptimizationPackageSource, OptimizationTokenUsage } from "@tangle-network/agent-eval/campaign";
|
|
@@ -58,10 +58,6 @@ interface EffortSettings {
|
|
|
58
58
|
/** Per-field overrides applied on top of a tier preset. Any subset of the
|
|
59
59
|
* resolved settings; each provided field wins over the preset. */
|
|
60
60
|
type EffortOverrides = Partial<EffortSettings>;
|
|
61
|
-
/** The default tier when a client declares no effort. `'standard'` turns
|
|
62
|
-
* intelligence on with sensible knobs; opt down to `'off'`/`'eco'` or up to
|
|
63
|
-
* `'thorough'`/`'max'`. */
|
|
64
|
-
declare const defaultEffortTier: EffortTier;
|
|
65
61
|
/**
|
|
66
62
|
* Compile a named tier (plus optional per-field overrides) into the flat
|
|
67
63
|
* `EffortSettings` the wrapper reads. Pure: same inputs → same object, no I/O,
|
|
@@ -123,53 +119,6 @@ interface EffortOverridesCompiled {
|
|
|
123
119
|
*/
|
|
124
120
|
declare function compileEffort(settings: EffortSettings): EffortOverridesCompiled;
|
|
125
121
|
//#endregion
|
|
126
|
-
//#region src/intelligence/improvement-surfaces.d.ts
|
|
127
|
-
/** Agent improvement surfaces delivered as exact `AgentProfileDiff` replacements. */
|
|
128
|
-
declare const AGENT_IMPROVEMENT_PROFILE_SURFACES: readonly ["prompt", "skills", "tools", "mcp", "hooks", "subagents"];
|
|
129
|
-
type AgentImprovementProfileSurface = (typeof AGENT_IMPROVEMENT_PROFILE_SURFACES)[number];
|
|
130
|
-
/**
|
|
131
|
-
* Profile changes eligible for the product-owned measured comparison path.
|
|
132
|
-
* The six directly deliverable profile surfaces retain their granular labels;
|
|
133
|
-
* any residual profile axis also adds the complete `agent-profile` surface.
|
|
134
|
-
*/
|
|
135
|
-
declare const AGENT_PROFILE_MEASURED_SURFACES: readonly ["prompt", "skills", "tools", "mcp", "hooks", "subagents", "agent-profile"];
|
|
136
|
-
type AgentProfileMeasuredSurface = (typeof AGENT_PROFILE_MEASURED_SURFACES)[number];
|
|
137
|
-
interface AgentImprovementTargetProfileDiffOptions {
|
|
138
|
-
id: string;
|
|
139
|
-
source?: AgentProfileDiff['source'];
|
|
140
|
-
metadata?: Record<string, unknown>;
|
|
141
|
-
}
|
|
142
|
-
type AgentImprovementActivationTargetIdentity = Pick<AgentImprovementActivationTarget, 'surface' | 'identity'>;
|
|
143
|
-
/** Bind caller-owned target identities to the exact source state Runtime measured. */
|
|
144
|
-
declare function buildAgentImprovementActivationTargets(surfaces: readonly AgentImprovementSurface[], experiment: AgentImprovementEvaluation$1['experiment'], intent: AgentImprovementActivationIntent$1, identities: readonly AgentImprovementActivationTargetIdentity[]): [AgentImprovementActivationTarget, ...AgentImprovementActivationTarget[]];
|
|
145
|
-
/** Return whether a measured surface can be delivered through an agent profile. */
|
|
146
|
-
declare function isAgentImprovementProfileSurface(surface: AgentImprovementSurface): surface is AgentImprovementProfileSurface;
|
|
147
|
-
/** Return whether a surface is eligible for shared profile measurement. */
|
|
148
|
-
declare function isAgentProfileMeasuredSurface(surface: string): surface is AgentProfileMeasuredSurface;
|
|
149
|
-
/**
|
|
150
|
-
* Return the canonical current-state input for one profile-deliverable improvement target.
|
|
151
|
-
* Missing slots become `null`; tools and subagents include both their direct and resource slots.
|
|
152
|
-
* Unrelated profile fields are excluded. The result matches `agentImprovementTargetInput` for the
|
|
153
|
-
* same profile inside a candidate bundle.
|
|
154
|
-
*/
|
|
155
|
-
declare function agentImprovementProfileSurfaceInput(profile: AgentProfile, surface: AgentImprovementProfileSurface): unknown;
|
|
156
|
-
/** Return the `Sha256Digest` of one profile surface using Runtime's canonical candidate digest. */
|
|
157
|
-
declare function agentImprovementProfileSurfaceDigest(profile: AgentProfile, surface: AgentImprovementProfileSurface): Sha256Digest;
|
|
158
|
-
/**
|
|
159
|
-
* Replace one measured profile surface exactly, including array-valued resources.
|
|
160
|
-
* Apply the returned diffs in order: a diff applies its set before its removal,
|
|
161
|
-
* so exact replacement requires a reset record followed by a set record.
|
|
162
|
-
*/
|
|
163
|
-
declare function agentImprovementTargetProfileDiffs(target: {
|
|
164
|
-
surface: AgentImprovementProfileSurface;
|
|
165
|
-
desiredInput: unknown;
|
|
166
|
-
}, options: AgentImprovementTargetProfileDiffOptions): [AgentProfileDiff, ...AgentProfileDiff[]];
|
|
167
|
-
/**
|
|
168
|
-
* Derive the ordered profile patch that changes one executable profile into
|
|
169
|
-
* another, then prove the patch preserves the complete candidate state.
|
|
170
|
-
*/
|
|
171
|
-
declare function agentImprovementProfileDiffs(baselineInput: AgentProfile, candidateInput: AgentProfile, options: AgentImprovementTargetProfileDiffOptions): [AgentProfileDiff, ...AgentProfileDiff[]];
|
|
172
|
-
//#endregion
|
|
173
122
|
//#region src/intelligence/profile-activation.d.ts
|
|
174
123
|
type AgentImprovementProfileActivationTarget = Omit<AgentImprovementActivationTargetPlan, 'surface'> & {
|
|
175
124
|
surface: AgentImprovementProfileSurface;
|
|
@@ -251,7 +200,7 @@ interface RunAgentCandidateExperimentOptions extends Omit<CompareCandidateExperi
|
|
|
251
200
|
interface RunAgentCandidateExperimentResult {
|
|
252
201
|
experiment: AgentCandidateExperiment;
|
|
253
202
|
measurements: AgentCandidateExperimentMeasurement[];
|
|
254
|
-
evaluation: AgentImprovementMeasuredComparison
|
|
203
|
+
evaluation: AgentImprovementMeasuredComparison;
|
|
255
204
|
}
|
|
256
205
|
interface ExecuteAgentCandidateExperimentCellOptions extends CandidateExperimentExecutionInput, AgentCandidateExperimentCellPlacement {}
|
|
257
206
|
interface VerifyCandidateExecutionEvidenceOptions {
|
|
@@ -262,40 +211,6 @@ interface VerifyCandidateExecutionEvidenceOptions {
|
|
|
262
211
|
attempt?: number;
|
|
263
212
|
resolvedResources?: ReadonlyMap<Sha256Digest, string>;
|
|
264
213
|
}
|
|
265
|
-
/** A failed baseline or candidate cell with its complete Runtime failure result. */
|
|
266
|
-
declare class AgentCandidateExperimentCellExecutionError extends Error {
|
|
267
|
-
readonly finalization: Extract<AgentCandidateRunFinalization, {
|
|
268
|
-
succeeded: false;
|
|
269
|
-
}>;
|
|
270
|
-
constructor(finalization: Extract<AgentCandidateRunFinalization, {
|
|
271
|
-
succeeded: false;
|
|
272
|
-
}>);
|
|
273
|
-
}
|
|
274
|
-
interface CreateAgentImprovementProposalOptions {
|
|
275
|
-
runId: string;
|
|
276
|
-
findings: readonly ProposalFinding$1[];
|
|
277
|
-
evaluation: AgentImprovementEvaluation$1;
|
|
278
|
-
now?: () => Date;
|
|
279
|
-
}
|
|
280
|
-
type CreateAgentImprovementMeasuredComparisonOptions = CompareCandidateExperimentOptions;
|
|
281
|
-
interface ReviewAgentImprovementInput {
|
|
282
|
-
decision: AgentImprovementReviewDecision$1;
|
|
283
|
-
reviewedBy: string;
|
|
284
|
-
reason: string;
|
|
285
|
-
feedback?: string;
|
|
286
|
-
now?: () => Date;
|
|
287
|
-
}
|
|
288
|
-
interface CreateAgentImprovementActivationOptions {
|
|
289
|
-
intent: AgentImprovementActivationIntent$1;
|
|
290
|
-
/** Runtime derives each exact source digest; callers identify only the records to change. */
|
|
291
|
-
targets: [AgentImprovementActivationTargetIdentity, ...AgentImprovementActivationTargetIdentity[]];
|
|
292
|
-
fundingOwner: string;
|
|
293
|
-
authorizedBy: string;
|
|
294
|
-
expiresAt: string;
|
|
295
|
-
/** Required only when an activation targets the complete `agent-profile` surface. */
|
|
296
|
-
executionRef?: AgentProfileImprovementExecutionRef;
|
|
297
|
-
now?: () => Date;
|
|
298
|
-
}
|
|
299
214
|
type AgentImprovementAnalysisOptions = Omit<RunAnalystLoopOpts, 'runId' | 'inputs' | 'improvementProposalSource' | 'knowledgeProposalSource' | 'onEvent' | 'log' | 'costLedger' | 'costPhase' | 'signal'> & {
|
|
300
215
|
inputs: Omit<RunAnalystLoopOpts['inputs'], 'judgeInput'> & {
|
|
301
216
|
judgeInput?: never;
|
|
@@ -316,8 +231,8 @@ interface ProposeAgentImprovementOptions<TScenario extends Scenario$1, TArtifact
|
|
|
316
231
|
placeCell: RunAgentCandidateExperimentOptions['placeCell'];
|
|
317
232
|
maxConcurrency?: number;
|
|
318
233
|
signal?: AbortSignal;
|
|
319
|
-
candidate?: AgentImprovementMeasuredComparison
|
|
320
|
-
metadata?: AgentImprovementMeasuredComparison
|
|
234
|
+
candidate?: AgentImprovementMeasuredComparison['candidate'];
|
|
235
|
+
metadata?: AgentImprovementMeasuredComparison['metadata'];
|
|
321
236
|
now?: () => Date;
|
|
322
237
|
}
|
|
323
238
|
/** Product-supplied experiment material. Runtime supplies optimizer ancestry and the final digest. */
|
|
@@ -386,8 +301,6 @@ interface ProposeAgentProfileImprovementResult {
|
|
|
386
301
|
declare function runAgentCandidateExperiment(options: RunAgentCandidateExperimentOptions): Promise<RunAgentCandidateExperimentResult>;
|
|
387
302
|
/** Execute one exact arm, task, repetition, seed, and attempt through Runtime. */
|
|
388
303
|
declare function executeAgentCandidateExperimentCell(options: ExecuteAgentCandidateExperimentCellOptions): Promise<CandidateExecutionEvidence$1>;
|
|
389
|
-
/** Delegate all statistics and promotion checks to agent-eval's receipt-based comparison. */
|
|
390
|
-
declare function createAgentImprovementMeasuredComparison(options: CreateAgentImprovementMeasuredComparisonOptions): AgentImprovementMeasuredComparison$1;
|
|
391
304
|
/**
|
|
392
305
|
* Analyze a product-owned profile, search one profile surface, then run the
|
|
393
306
|
* exact baseline and candidate through the product executor before proposing.
|
|
@@ -395,22 +308,6 @@ declare function createAgentImprovementMeasuredComparison(options: CreateAgentIm
|
|
|
395
308
|
declare function proposeAgentProfileImprovement<TScenario extends Scenario$1, TArtifact>(options: ProposeAgentProfileImprovementOptions<TScenario, TArtifact>): Promise<ProposeAgentProfileImprovementResult>;
|
|
396
309
|
/** Analyze, search, then remeasure the resulting exact candidate before proposing it. */
|
|
397
310
|
declare function proposeAgentImprovement<TScenario extends Scenario$1, TArtifact>(options: ProposeAgentImprovementOptions<TScenario, TArtifact>): Promise<ProposeAgentImprovementResult<TScenario, TArtifact>>;
|
|
398
|
-
/** Create the reviewable record only from a complete, recomputable experiment result. */
|
|
399
|
-
declare function createAgentImprovementProposal(options: CreateAgentImprovementProposalOptions): AgentImprovementProposal$1;
|
|
400
|
-
/** Persist a human or tenant-policy decision bound to one exact proposal. */
|
|
401
|
-
declare function reviewAgentImprovementProposal(inputProposal: AgentImprovementProposal$1, input: ReviewAgentImprovementInput): AgentImprovementReview$1;
|
|
402
|
-
/** Authorize product-owned writes only after the exact candidate was measured and approved. */
|
|
403
|
-
declare function createAgentImprovementActivation(inputProposal: AgentImprovementProposal$1, inputReview: AgentImprovementReview$1, options: CreateAgentImprovementActivationOptions): AgentImprovementActivation$1;
|
|
404
|
-
/** Validate a proposal and recompute every binding to its measured experiment. */
|
|
405
|
-
declare function verifyAgentImprovementProposal(input: unknown): AgentImprovementProposal$1;
|
|
406
|
-
/** Validate the canonical identity and wire shape of an improvement review. */
|
|
407
|
-
declare function verifyAgentImprovementReview(input: unknown): AgentImprovementReview$1;
|
|
408
|
-
/** Validate activation authority against the exact proposal, review, experiment, and base state. */
|
|
409
|
-
declare function verifyAgentImprovementActivation(input: {
|
|
410
|
-
proposal: unknown;
|
|
411
|
-
review: unknown;
|
|
412
|
-
activation: unknown;
|
|
413
|
-
}): AgentImprovementActivation$1;
|
|
414
311
|
/** Recheck one Runtime receipt against its exact signed experiment cell. */
|
|
415
312
|
declare function verifyCandidateExecutionEvidence(input: unknown, options: VerifyCandidateExecutionEvidenceOptions): CandidateExecutionEvidence$1;
|
|
416
313
|
//#endregion
|
|
@@ -560,47 +457,6 @@ interface PullCertifiedOptions {
|
|
|
560
457
|
/** Abort the request after this many ms. Default 10000. */
|
|
561
458
|
timeoutMs?: number;
|
|
562
459
|
}
|
|
563
|
-
/** What Runtime knows about a failed proposal submission.
|
|
564
|
-
* `not-sent` means no request began, `rejected` means Intelligence returned a
|
|
565
|
-
* definitive 4xx response, and `unconfirmed` means the caller may safely retry
|
|
566
|
-
* the same immutable proposal. */
|
|
567
|
-
type AgentImprovementProposalSubmissionState = 'not-sent' | 'rejected' | 'unconfirmed';
|
|
568
|
-
/** Submit a completed measured proposal for product-side review. */
|
|
569
|
-
interface SubmitAgentImprovementProposalOptions {
|
|
570
|
-
proposal: AgentImprovementProposal$1;
|
|
571
|
-
/** Bearer key. Defaults to `process.env.TANGLE_API_KEY`. */
|
|
572
|
-
apiKey?: string;
|
|
573
|
-
/** Plane base URL. Defaults to `process.env.TANGLE_INTELLIGENCE_URL` then
|
|
574
|
-
* `https://intelligence.tangle.tools`. */
|
|
575
|
-
baseUrl?: string;
|
|
576
|
-
/** fetch impl (tests / non-global-fetch runtimes). Defaults to global fetch. */
|
|
577
|
-
fetchImpl?: typeof fetch;
|
|
578
|
-
/** Abort the request after this many ms. Default 10000. */
|
|
579
|
-
timeoutMs?: number;
|
|
580
|
-
}
|
|
581
|
-
/** Typed result for proposal submission. A successful result contains the
|
|
582
|
-
* exact immutable proposal Intelligence recorded. */
|
|
583
|
-
type SubmitAgentImprovementProposalOutcome = {
|
|
584
|
-
succeeded: true;
|
|
585
|
-
value: AgentImprovementProposal$1;
|
|
586
|
-
status: number;
|
|
587
|
-
} | {
|
|
588
|
-
succeeded: false;
|
|
589
|
-
submission: AgentImprovementProposalSubmissionState;
|
|
590
|
-
error: string;
|
|
591
|
-
status?: number;
|
|
592
|
-
code?: string;
|
|
593
|
-
};
|
|
594
|
-
/** Resolve the ONE Intelligence base URL — the single knob both the send and
|
|
595
|
-
* receive paths derive from. Env fallback: `TANGLE_INTELLIGENCE_URL`. */
|
|
596
|
-
declare function resolveIntelligenceBaseUrl(baseUrl: string | undefined): string;
|
|
597
|
-
/**
|
|
598
|
-
* Deserialize the composed-endpoint response into a `CertifiedProfile`. The
|
|
599
|
-
* previously-dropped `agentProfileDiffs`/`capabilities`/`agentProfile` are read
|
|
600
|
-
* here so they round-trip to the consumer; a plane that has not yet promoted any
|
|
601
|
-
* diffs simply yields empty arrays / a null profile (fail-closed, never a crash).
|
|
602
|
-
*/
|
|
603
|
-
declare function normalizeCertifiedProfile(raw: unknown): CertifiedProfile;
|
|
604
460
|
/**
|
|
605
461
|
* Pull the certified composed profile for a target. Fail-closed: a network
|
|
606
462
|
* error or a non-2xx returns a typed `succeeded: false` (never throws), so a
|
|
@@ -608,14 +464,6 @@ declare function normalizeCertifiedProfile(raw: unknown): CertifiedProfile;
|
|
|
608
464
|
* the normal "nothing promoted yet" signal, carried as `status: 404`.
|
|
609
465
|
*/
|
|
610
466
|
declare function pullCertified(opts: PullCertifiedOptions): Promise<PullOutcome>;
|
|
611
|
-
/**
|
|
612
|
-
* Submit a completed Runtime proposal to Intelligence for product-side review.
|
|
613
|
-
* This never runs an experiment, approves a proposal, or applies a candidate.
|
|
614
|
-
* A 4xx response is a confirmed `rejected` request. Network failures, timeouts,
|
|
615
|
-
* 5xx responses, and invalid success responses are `unconfirmed`, so callers
|
|
616
|
-
* can retry the same digest because Intelligence stores proposals idempotently.
|
|
617
|
-
*/
|
|
618
|
-
declare function submitAgentImprovementProposal(opts: SubmitAgentImprovementProposalOptions): Promise<SubmitAgentImprovementProposalOutcome>;
|
|
619
467
|
/**
|
|
620
468
|
* Fold the certified prompt surface (and any certified prompt-folding artifacts:
|
|
621
469
|
* `prompt-surface` / `skill` / `instructions`) into a base system prompt under a
|
|
@@ -692,8 +540,6 @@ type CapabilityInterface = {
|
|
|
692
540
|
name: string;
|
|
693
541
|
description?: string;
|
|
694
542
|
};
|
|
695
|
-
/** Every interface surface tag supported by the manifest schema. */
|
|
696
|
-
type CapabilitySurface = CapabilityInterface['surface'];
|
|
697
543
|
/**
|
|
698
544
|
* Where a capability's bytes live. A leaked manifest carries no live secret and
|
|
699
545
|
* no inlined blob: `github`/`blob` are pointers resolved at provision time.
|
|
@@ -845,56 +691,6 @@ interface CapabilityManifest {
|
|
|
845
691
|
promptSurface: CertifiedPromptSurface | null;
|
|
846
692
|
capabilities: CertifiedCapability[];
|
|
847
693
|
}
|
|
848
|
-
/** One retrieval handle. The agent never learns vector vs graph vs index. */
|
|
849
|
-
interface ResolvedRetrieval {
|
|
850
|
-
name: string;
|
|
851
|
-
retrieve(query: string, k?: number): Promise<Array<{
|
|
852
|
-
text: string;
|
|
853
|
-
score?: number;
|
|
854
|
-
}>>;
|
|
855
|
-
}
|
|
856
|
-
/** One resolved hook — event + the command/matcher the seam folds into
|
|
857
|
-
* `AgentProfile.hooks`. */
|
|
858
|
-
interface ResolvedHook {
|
|
859
|
-
event: string;
|
|
860
|
-
command: string;
|
|
861
|
-
matcher?: string;
|
|
862
|
-
}
|
|
863
|
-
/** One resolved subagent — folded into `AgentProfile.subagents`. */
|
|
864
|
-
interface ResolvedSubagent {
|
|
865
|
-
name: string;
|
|
866
|
-
description?: string;
|
|
867
|
-
prompt?: string;
|
|
868
|
-
}
|
|
869
|
-
/** Materialized capability surfaces supplied by a consumer-owned executor. */
|
|
870
|
-
interface ResolvedSurface {
|
|
871
|
-
/** Host-side tool defs → `RouterToolsSeam.tools` / agent-app `extraTools`. */
|
|
872
|
-
tools: ToolSpec[];
|
|
873
|
-
/** Host-side dispatch for a resolved tool. Throws when `name` is unknown so a
|
|
874
|
-
* mis-dispatch is loud, never a silent empty string. */
|
|
875
|
-
execute(name: string, args: Record<string, unknown>, task: unknown): Promise<string>;
|
|
876
|
-
/** Sandbox-side tool delivery → `AgentProfile.mcp` / in-proc `createMcpEnvironment`. */
|
|
877
|
-
mcpConnections: Record<string, AgentProfileMcpServer>;
|
|
878
|
-
/** Prompt-context additions, byte-stable-ordered → folded system prompt. */
|
|
879
|
-
promptAdditions: string[];
|
|
880
|
-
/** Workspace files → `AgentProfile.resources.files`. */
|
|
881
|
-
files: Array<{
|
|
882
|
-
path: string;
|
|
883
|
-
content: string;
|
|
884
|
-
executable?: boolean;
|
|
885
|
-
}>;
|
|
886
|
-
/** Uniform retrieval handles. */
|
|
887
|
-
retrieval: ResolvedRetrieval[];
|
|
888
|
-
/** Hooks → `AgentProfile.hooks`. */
|
|
889
|
-
hooks: ResolvedHook[];
|
|
890
|
-
/** Subagents → `AgentProfile.subagents`. */
|
|
891
|
-
subagents: ResolvedSubagent[];
|
|
892
|
-
/** The folded system prompt — base + the byte-stable prompt additions, exactly
|
|
893
|
-
* as `composeCertifiedPrompt` renders the inline/context capabilities. */
|
|
894
|
-
systemPrompt: string;
|
|
895
|
-
/** Tear down provisioned hosts (reverse dependency order). */
|
|
896
|
-
dispose(): Promise<void>;
|
|
897
|
-
}
|
|
898
694
|
/**
|
|
899
695
|
* A consumer rejected a binding that its executor does not admit.
|
|
900
696
|
*/
|
|
@@ -1023,7 +819,7 @@ interface OptimizationReceiptCost {
|
|
|
1023
819
|
/** Build a detached receipt only for methods backed by an identified external optimizer. */
|
|
1024
820
|
declare function createOptimizationActivationReceipt(improvement: ImproveMethodResult): OptimizationActivationReceipt | undefined;
|
|
1025
821
|
/** Read and verify the optimizer evidence carried by a measured proposal. */
|
|
1026
|
-
declare function optimizationActivationReceiptFromMetadata(metadata: AgentImprovementMeasuredComparison
|
|
822
|
+
declare function optimizationActivationReceiptFromMetadata(metadata: AgentImprovementMeasuredComparison['metadata']): OptimizationActivationReceipt | undefined;
|
|
1027
823
|
//#endregion
|
|
1028
824
|
//#region src/intelligence/with-intelligence.d.ts
|
|
1029
825
|
/** What the hook hands the agent each run. Additive over the prompt-only
|
|
@@ -1279,21 +1075,6 @@ interface RecordTraceMeta {
|
|
|
1279
1075
|
* `traceRun` span). Omitted ⇒ the loop root is the trace root. */
|
|
1280
1076
|
rootParentSpanId?: string;
|
|
1281
1077
|
}
|
|
1282
|
-
/** The resolved outcome of one traced run, surfaced on the export span and
|
|
1283
|
-
* available to the caller for downstream billing assertions. */
|
|
1284
|
-
interface TraceOutcome {
|
|
1285
|
-
runId: string;
|
|
1286
|
-
traceId: string;
|
|
1287
|
-
project: string;
|
|
1288
|
-
/** The resolved effort settings this run executed under. */
|
|
1289
|
-
effort: EffortSettings;
|
|
1290
|
-
/** True when this run ran as pure passthrough (the OFF floor). */
|
|
1291
|
-
intelligenceOff: boolean;
|
|
1292
|
-
success?: boolean;
|
|
1293
|
-
score?: number;
|
|
1294
|
-
/** Per-class billing split. `intelligenceUsd` is `0` at the OFF tier. */
|
|
1295
|
-
usage: UsageSplit;
|
|
1296
|
-
}
|
|
1297
1078
|
/** The Observe-mode Intelligence client. */
|
|
1298
1079
|
interface IntelligenceClient {
|
|
1299
1080
|
/** The resolved project id. */
|
|
@@ -1369,5 +1150,5 @@ interface DoctorReport {
|
|
|
1369
1150
|
*/
|
|
1370
1151
|
declare function createIntelligenceClient(config: IntelligenceConfig): IntelligenceClient;
|
|
1371
1152
|
//#endregion
|
|
1372
|
-
export { AGENT_IMPROVEMENT_PROFILE_SURFACES, AGENT_PROFILE_MEASURED_SURFACES, type AgentCandidateExecutionHostPorts,
|
|
1153
|
+
export { type AGENT_IMPROVEMENT_PROFILE_SURFACES, type AGENT_PROFILE_MEASURED_SURFACES, type AgentCandidateExecutionHostPorts, type AgentCandidateExperimentCellPlacement, type AgentEnvironmentProviderRef, type AgentImprovementActivation, type AgentImprovementActivationIntent, type AgentImprovementActivationOutcome, type AgentImprovementActivationResult, type AgentImprovementActivationTargetIdentity, type AgentImprovementActivationTargetPlan, type AgentImprovementActivationTransitionInput, type AgentImprovementAnalysisOptions, type AgentImprovementEvaluation, type AgentImprovementExperimentMaterial, type AgentImprovementProfileActivationInput, type AgentImprovementProfileActivationPreparation, type AgentImprovementProfileActivationTarget, type AgentImprovementProfileReplacement, type AgentImprovementProfileStateDigest, type AgentImprovementProfileStateDigestInput, type AgentImprovementProfileStateResolver, type AgentImprovementProfileStateResolverInput, type AgentImprovementProfileSurface, type AgentImprovementProfileTargetState, type AgentImprovementProfileTargetTransition, type AgentImprovementProposal, type AgentImprovementReview, type AgentImprovementReviewDecision, type AgentImprovementTargetProfileDiffOptions, type AgentProfileCandidateMeasurementExecutor, type AgentProfileImprovementActivationOperation, type AgentProfileImprovementActivationTargetPlan, type AgentProfileImprovementBenchmark, type AgentProfileImprovementExecutor, type AgentProfileImprovementMethodOptions, type AgentProfileMeasuredSurface, type AppliedIntelligence, type AuthoredAgentProfileCandidateLineage, type CandidateExecutionEvidence, type CapabilityAuth, type CapabilityInterface, type CapabilityManifest, CapabilityNotAdmittedError, type CertProvenance, type CertifiedArtifact, type CertifiedCapability, type CertifiedCapabilitySummary, type CertifiedProfile, type CertifiedPromptSource, type CertifiedPromptSourceOptions, type CertifiedPromptSurface, type ContentRef, type CorpusAccess, type CreateAgentImprovementActivationOptions, type CreateAgentImprovementActivationResultOptions, type CreateAgentImprovementProposalOptions, type CreateExactProcessCandidateExperimentExecutorOptions, type CreateProtectedExactProcessCandidateExperimentExecutorOptions, type CredentialRef, type DeliveryBinding, type DiffProvenance, DoctorReport, type EffortOverridesCompiled, type EffortSettings, type EffortTier, type ExactProcessCandidateExperimentExecution, type ExactProcessCandidateExperimentExecutor, type ExecuteAgentCandidateExperimentCellOptions, type ExecuteAgentImprovementActivationInput, type ExecuteAgentImprovementActivationOptions, type HostSpec, type ImproveResult, type IntelligenceAgent, IntelligenceClient, IntelligenceConfig, type IntelligenceHookConfig, type IntelligenceWrapped, type JsonSchema, ModeReadiness, type OptimizationActivationReceipt, type OptimizationReceiptCost, type PrepareAgentCandidateExecutionOptions, type ProfileImprovementActivationTransitionInput, type ProposeAgentImprovementOptions, type ProposeAgentImprovementResult, type ProposeAgentProfileImprovementOptions, type ProposeAgentProfileImprovementResult, type ProposeAuthoredAgentProfileImprovementOptions, type ProposeAuthoredAgentProfileImprovementResult, type ProposedProfileDiff, type ProtectedExactProcessCandidateExperimentExecutor, type PullCertifiedOptions, type PullOutcome, RecordTraceMeta, type Redactor, RepoConfig, type ReviewAgentImprovementInput, type RunAgentCandidateExperimentOptions, type RunAgentCandidateExperimentResult, RunRecord, RunReport, type SealedCandidateActivationTransitionInput, TraceHandle, TraceMeta, UsageSplit, type VerifyCandidateExecutionEvidenceOptions, agentImprovementProfileDiffs, agentImprovementProfileSurfaceDigest, agentImprovementProfileSurfaceInput, agentImprovementTargetProfileDiffs, compileEffort, composeCertifiedPrompt, createAgentImprovementActivation, createAgentImprovementActivationResult, createAgentImprovementProposal, createCertifiedPromptSource, createExactProcessCandidateExperimentExecutor, createIntelligenceClient, createOptimizationActivationReceipt, createProtectedExactProcessCandidateExperimentExecutor, defaultRedactor, exactProcessCandidateExperimentExecutionSupport, executeAgentCandidateExperimentCell, executeAgentImprovementActivation, isAgentImprovementProfileSurface, isAgentProfileMeasuredSurface, isIntelligenceOff, manifestFromProfile, optimizationActivationReceiptFromMetadata, parseAgentCandidateProfileActivation as parseCandidateProfileMaterialization, prepareAgentImprovementProfileActivation, proposeAgentImprovement, proposeAgentProfileImprovement, proposeAuthoredAgentProfileImprovement, pullCertified, resolveEffort, reviewAgentImprovementProposal, runAgentCandidateExperiment, verifyAgentImprovementActivation, verifyAgentImprovementActivationResult, verifyAgentImprovementProposal, verifyAgentImprovementReview, verifyCandidateExecutionEvidence, withIntelligence };
|
|
1373
1154
|
//# sourceMappingURL=intelligence.d.ts.map
|