@tangle-network/agent-runtime 0.132.7 → 0.132.8

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.
Files changed (47) hide show
  1. package/dist/{activation-Cb1vGSdK.js → activation-BNyOriQ_.js} +2 -2
  2. package/dist/{activation-Cb1vGSdK.js.map → activation-BNyOriQ_.js.map} +1 -1
  3. package/dist/agent.d.ts +1 -1
  4. package/dist/agent.js +2 -2
  5. package/dist/{authoring-CQP4S4uc.js → authoring-BpIDTX_5.js} +2 -2
  6. package/dist/{authoring-CQP4S4uc.js.map → authoring-BpIDTX_5.js.map} +1 -1
  7. package/dist/{graph-DgDaI3KK.js → graph-lB5TUusP.js} +2 -2
  8. package/dist/{graph-DgDaI3KK.js.map → graph-lB5TUusP.js.map} +1 -1
  9. package/dist/{improvement-cycle-DCBmuhht.js → improvement-cycle-BSK4bjDT.js} +3 -3
  10. package/dist/{improvement-cycle-DCBmuhht.js.map → improvement-cycle-BSK4bjDT.js.map} +1 -1
  11. package/dist/{index-DixXnx07.d.ts → index-B2vnuE5e.d.ts} +4 -54
  12. package/dist/{index-BsrFZu0N.d.ts → index-B6vqfzZt.d.ts} +3 -3
  13. package/dist/index.d.ts +5 -5
  14. package/dist/index.js +7 -7
  15. package/dist/intelligence.d.ts +2 -2
  16. package/dist/intelligence.js +3 -3
  17. package/dist/kernel.d.ts +3 -3
  18. package/dist/kernel.js +6 -6
  19. package/dist/{knowledge-B8pmbGqF.js → knowledge-CAGriDRo.js} +3 -3
  20. package/dist/{knowledge-B8pmbGqF.js.map → knowledge-CAGriDRo.js.map} +1 -1
  21. package/dist/knowledge.d.ts +1 -1
  22. package/dist/knowledge.js +1 -1
  23. package/dist/{loop-runner-bin-BqJGlXju.d.ts → loop-runner-bin-C5oxfyi9.d.ts} +2 -2
  24. package/dist/{loop-runner-bin-D9qLc2dD.js → loop-runner-bin-DVqbR72k.js} +3 -3
  25. package/dist/{loop-runner-bin-D9qLc2dD.js.map → loop-runner-bin-DVqbR72k.js.map} +1 -1
  26. package/dist/loop-runner-bin.d.ts +1 -1
  27. package/dist/loop-runner-bin.js +1 -1
  28. package/dist/mcp/bin.js +3 -3
  29. package/dist/mcp/index.d.ts +2 -2
  30. package/dist/mcp/index.js +4 -4
  31. package/dist/{openai-tools-C6KQ6aVK.js → openai-tools-C2v4x1Lv.js} +2 -2
  32. package/dist/{openai-tools-C6KQ6aVK.js.map → openai-tools-C2v4x1Lv.js.map} +1 -1
  33. package/dist/primeintellect/index.d.ts +1 -1
  34. package/dist/{redact-BAnM2avI.d.ts → redact-CJpB66r5.d.ts} +2 -2
  35. package/dist/{runtime-B5z9C4gn.js → runtime-D7It83FH.js} +6 -6
  36. package/dist/{runtime-B5z9C4gn.js.map → runtime-D7It83FH.js.map} +1 -1
  37. package/dist/{runtime-CKk_poJ-.d.ts → runtime-laujrVXP.d.ts} +68 -3
  38. package/dist/{structural-rollout-DBYiyyE-.js → structural-rollout-Cd8ZM0dD.js} +2 -2
  39. package/dist/{structural-rollout-DBYiyyE-.js.map → structural-rollout-Cd8ZM0dD.js.map} +1 -1
  40. package/dist/{supervise-oLZHae_v.js → supervise-D8I1BRWe.js} +2 -2
  41. package/dist/{supervise-oLZHae_v.js.map → supervise-D8I1BRWe.js.map} +1 -1
  42. package/dist/{supervisor-D5ar0Rs6.js → supervisor-Dr3AoSh0.js} +66 -4
  43. package/dist/supervisor-Dr3AoSh0.js.map +1 -0
  44. package/dist/testing.d.ts +2 -2
  45. package/dist/testing.js +11 -11
  46. package/package.json +1 -1
  47. package/dist/supervisor-D5ar0Rs6.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { E as SandboxClient, i as ExecCtx } from "./types-6zHo67jn.js";
2
2
  import { V as Spend, X as UsageEvent, d as ExecutorFactory, m as ExecutorRegistry, mn as ExecutorProgress, sn as TraceSource } from "./types-BjUQODeG.js";
3
3
  import { i as AgentEnvironmentProvider, o as AgentEnvironmentProviderRegistry, w as ProviderExecutorOptions } from "./environment-provider-CkSDxRZd.js";
4
- import { AgentProfile, HarnessType, ReasoningEffort } from "@tangle-network/agent-interface";
4
+ import { AgentProfile, AgentProfileMcpServer, HarnessType, ReasoningEffort } from "@tangle-network/agent-interface";
5
5
  import { WorkspacePlanReceipt } from "@tangle-network/agent-profile-materialize";
6
6
  import { ChildProcess } from "node:child_process";
7
7
  import { BackendType } from "@tangle-network/sandbox";
@@ -533,6 +533,56 @@ type WorktreeCheckRunner = (opts: {
533
533
  output: string;
534
534
  }>;
535
535
  //#endregion
536
+ //#region src/runtime/key-provider.d.ts
537
+ /** Resolve named secrets. The ONE seam every secret store adapts to. */
538
+ interface KeyProvider {
539
+ /** The value for `name`, or `undefined` when this provider does not hold it. */
540
+ get(name: string): Promise<string | undefined>;
541
+ }
542
+ /** The env-backed provider: reads the (dotenvx-loaded) process env. Empty /
543
+ * whitespace-only values count as absent — fail loud, not with a blank key. */
544
+ declare function envKeyProvider(env?: Record<string, string | undefined>): KeyProvider;
545
+ /** The `AgentProfileMcpServer.metadata` key the declarative secret-env map
546
+ * rides under: `{ ENV_VAR_NAME: 'PROVIDER_KEY_NAME' }`. Names only — values
547
+ * are resolved at materialize time and never stored. */
548
+ declare const mcpSecretEnvMetadataKey = "secretEnv";
549
+ /** Read (and validate) a server entry's declared secret-env map, if any.
550
+ * Malformed metadata throws — a half-declared secret must never half-boot. */
551
+ declare function secretEnvOfMcpServer(server: AgentProfileMcpServer): Record<string, string> | undefined;
552
+ /**
553
+ * Resolve a declared secret-env map into the real env entries for a server
554
+ * spawn. Fail-closed: no provider or a missing key throws, naming the KEY
555
+ * NAME only (the value never appears in any message). `label` names the
556
+ * server for the error (e.g. `profile.mcp['exa']`).
557
+ */
558
+ declare function resolveSecretEnv(secretEnv: Record<string, string>, keys: KeyProvider | undefined, label: string): Promise<Record<string, string>>;
559
+ /** The spawn-ready strings for one stdio MCP server: profile config values
560
+ * resolved, secrets separated so the client can redact them. */
561
+ interface ResolvedMcpServerLaunch {
562
+ args?: string[];
563
+ /** Public env, safe to appear in diagnostics. */
564
+ env?: Record<string, string>;
565
+ /** Resolved secret env. Reaches only the child process; redacted everywhere else. */
566
+ protectedEnv?: Record<string, string>;
567
+ }
568
+ /**
569
+ * Resolve a profile MCP server's `args`/`env` config values (interface ≥0.40
570
+ * `AgentProfileConfigValue`) plus the legacy `metadata.secretEnv` channel into
571
+ * the plain strings a spawn needs.
572
+ *
573
+ * Rules, all fail-closed:
574
+ * - `args` must be public values. A secret-ref in argv is refused: argv is
575
+ * readable by every host process (/proc/PID/cmdline) and outside the
576
+ * protected-value redaction channel, so a secret there cannot be contained.
577
+ * - `env` secret-refs resolve through the KeyProvider (missing provider or key
578
+ * throws, naming the KEY NAME only) and land in `protectedEnv`.
579
+ * - An env var declared secret on BOTH channels (env secret-ref and
580
+ * metadata.secretEnv) is ambiguous configuration and throws.
581
+ * - A public `env` entry shadowed by a legacy metadata secret keeps the
582
+ * pre-0.40 spawn precedence: the secret value wins in the child env.
583
+ */
584
+ declare function resolveMcpServerLaunch(server: AgentProfileMcpServer, keys: KeyProvider | undefined, label: string): Promise<ResolvedMcpServerLaunch>;
585
+ //#endregion
536
586
  //#region src/runtime/supervise/inbox.d.ts
537
587
  /**
538
588
  *
@@ -782,6 +832,14 @@ interface CliWorktreeBridgeSeam {
782
832
  interface BridgeSeam {
783
833
  bridgeUrl: string;
784
834
  bridgeBearer: string;
835
+ /**
836
+ * Optional request-scoped model credential.
837
+ *
838
+ * The key name is portable configuration. The provider is a live service and is intentionally
839
+ * not serialised. Runtime resolves it immediately before every bridge POST and sends the value
840
+ * only to a loopback bridge through its private request header.
841
+ */
842
+ modelCredential?: BridgeModelCredential;
785
843
  /** Optional working directory forwarded to cli-bridge and persisted with the session. */
786
844
  cwd?: string;
787
845
  /** Caller-owned deadline for each bridge turn. Runtime enforces it locally and sends the
@@ -795,6 +853,13 @@ interface BridgeSeam {
795
853
  /** Newest-last activity window `progress()` reports. Default 12. */
796
854
  activityWindow?: number;
797
855
  }
856
+ /** A live, request-scoped model credential reference for a local cli-bridge. */
857
+ interface BridgeModelCredential {
858
+ /** Provider key name. The value is never part of a profile, artifact, or error. */
859
+ key: string;
860
+ /** Live credential service. Runtime retains this reference through reusable captures. */
861
+ provider: KeyProvider;
862
+ }
798
863
  /** Generic environment provider executor config. External packages implement
799
864
  * `AgentEnvironmentProvider`; this built-in wrapper lets `createExecutor`
800
865
  * consume them as backend data while preserving the existing usage channel. */
@@ -889,5 +954,5 @@ declare function createExecutor(config: ExecutorConfig): ExecutorFactory<unknown
889
954
  */
890
955
  declare function createExecutorRegistry(): ExecutorRegistry;
891
956
  //#endregion
892
- export { ToolLoopToolCall as $, LocalHarness as A, GitRunner as B, WorktreeHarnessResult as C, CodexTokenUsage as D, CodexExecutionPolicy as E, parseCodexTokenUsage as F, removeWorktree as G, WorktreeHandle as H, runLocalHarness as I, ToolLoopCallContext as J, RouterTransportConfig as K, CreateWorktreeOptions as L, RunLocalHarnessOptions as M, harnessSupportsReasoningEffort as N, DEFAULT_LOCAL_HARNESS as O, localHarnessExecutable as P, ToolLoopMessageRecord as Q, DiffOptions as R, WorktreeCommandResult as S, CodexExecutionEvidence as T, captureWorktreeDiff as U, RemoveWorktreeOptions as V, createWorktree as W, ToolLoopCompaction as X, ToolLoopChat as Y, ToolLoopCompactionOptions as Z, createSteerableSandboxSession as _, ExecutorConfig as a, createInbox as b, RouterToolsSeam as c, createExecutor as d, createExecutorRegistry as f, SteerableSandboxSession as g, SteerableSandboxArgs as h, CliWorktreeSeam as i, LocalHarnessResult as j, LOCAL_HARNESSES as k, SandboxSeam as l, SandboxSteeringOptions as m, CliSeam as n, ProviderSeam as o, DEFAULT_SANDBOX_STEERING_MAX_TURNS as p, ToolSpec as q, CliWorktreeBridgeSeam as r, RouterSeam as s, BridgeSeam as t, cliWorktreeExecutor as u, Inbox as v, WorktreeProfileMaterializationReceipt as w, WorktreeCheckRunner as x, InboxMessage as y, DiffResult as z };
893
- //# sourceMappingURL=runtime-CKk_poJ-.d.ts.map
957
+ export { removeWorktree as $, WorktreeCommandResult as A, RunLocalHarnessOptions as B, ResolvedMcpServerLaunch as C, resolveSecretEnv as D, resolveMcpServerLaunch as E, CodexTokenUsage as F, CreateWorktreeOptions as G, localHarnessExecutable as H, DEFAULT_LOCAL_HARNESS as I, GitRunner as J, DiffOptions as K, LOCAL_HARNESSES as L, WorktreeProfileMaterializationReceipt as M, CodexExecutionEvidence as N, secretEnvOfMcpServer as O, CodexExecutionPolicy as P, createWorktree as Q, LocalHarness as R, KeyProvider as S, mcpSecretEnvMetadataKey as T, parseCodexTokenUsage as U, harnessSupportsReasoningEffort as V, runLocalHarness as W, WorktreeHandle as X, RemoveWorktreeOptions as Y, captureWorktreeDiff as Z, SteerableSandboxSession as _, CliWorktreeSeam as a, ToolLoopCompactionOptions as at, InboxMessage as b, RouterSeam as c, cliWorktreeExecutor as d, RouterTransportConfig as et, createExecutor as f, SteerableSandboxArgs as g, SandboxSteeringOptions as h, CliWorktreeBridgeSeam as i, ToolLoopCompaction as it, WorktreeHarnessResult as j, WorktreeCheckRunner as k, RouterToolsSeam as l, DEFAULT_SANDBOX_STEERING_MAX_TURNS as m, BridgeSeam as n, ToolLoopCallContext as nt, ExecutorConfig as o, ToolLoopMessageRecord as ot, createExecutorRegistry as p, DiffResult as q, CliSeam as r, ToolLoopChat as rt, ProviderSeam as s, ToolLoopToolCall as st, BridgeModelCredential as t, ToolSpec as tt, SandboxSeam as u, createSteerableSandboxSession as v, envKeyProvider as w, createInbox as x, Inbox as y, LocalHarnessResult as z };
958
+ //# sourceMappingURL=runtime-laujrVXP.d.ts.map
@@ -2,7 +2,7 @@ import { n as streamAgentTurn, t as collectAgentTurn } from "./stream-agent-turn
2
2
  import { i as InMemorySpawnJournal, r as InMemoryResultBlobStore } from "./spawn-journal-Cd5L-Ie9.js";
3
3
  import { i as concreteModelId, s as profileModelExecutionSettings, t as assertExecutableAgentProfile } from "./model-policy-mWSoToiQ.js";
4
4
  import { b as executableAgentProfileSnapshot } from "./materialization-JR_nN_oT.js";
5
- import { N as createExecutor, j as captureReusableExecutorConfig, l as withDriverExecutor, n as createSupervisor } from "./supervisor-D5ar0Rs6.js";
5
+ import { N as createExecutor, j as captureReusableExecutorConfig, l as withDriverExecutor, n as createSupervisor } from "./supervisor-Dr3AoSh0.js";
6
6
  import { costForTokenPricing, makeProposalFinding } from "@tangle-network/agent-eval";
7
7
  import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest } from "@tangle-network/agent-interface";
8
8
  import { randomBytes } from "node:crypto";
@@ -1676,4 +1676,4 @@ function structuralRollout(config = {}) {
1676
1676
  //#endregion
1677
1677
  export { observe as C, optimizerMethod as D, profileOptimizerModelCall as E, strategyAuthorMethod as O, defaultAnalystInstruction as S, profileChatClient as T, depthStrategy as _, defaultStructuralRolloutPolicy as a, sample as b, officialChecksFromMeta as c, selectBestIndex as d, structuralRollout as f, defineStrategy as g, breadthStrategy as h, defaultExtractCandidate as i, resolveEntrySymbol as l, adaptiveRefine as m, compareCheckOutcomes as n, filterAuthoredAsserts as o, visibleCheckScore as p, composeCheckSources as r, modelAuthoredChecks as s, canDisplace as t, sandboxCheckRunner as u, refine as v, renderReport as w, sampleThenRefine as x, runAgentic as y };
1678
1678
 
1679
- //# sourceMappingURL=structural-rollout-DBYiyyE-.js.map
1679
+ //# sourceMappingURL=structural-rollout-Cd8ZM0dD.js.map