@tangle-network/sdk-provider-cli-base 0.13.106 → 0.13.107
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/adapters/amp/index.d.mts +1 -1
- package/dist/adapters/amp/index.mjs +1 -1
- package/dist/adapters/exo/index.d.mts +1 -1
- package/dist/adapters/exo/index.mjs +1 -1
- package/dist/adapters/factory-droids/index.d.mts +1 -1
- package/dist/adapters/factory-droids/index.mjs +1 -1
- package/dist/adapters/grok/index.d.mts +1 -1
- package/dist/adapters/grok/index.mjs +1 -1
- package/dist/adapters/hermes/index.d.mts +1 -1
- package/dist/adapters/hermes/index.mjs +1 -1
- package/dist/adapters/nanoclaw/index.d.mts +1 -1
- package/dist/adapters/nanoclaw/index.mjs +1 -1
- package/dist/adapters/nanocode/index.d.mts +1 -1
- package/dist/adapters/nanocode/index.mjs +1 -1
- package/dist/adapters/openclaw/index.d.mts +1 -1
- package/dist/adapters/openclaw/index.mjs +1 -1
- package/dist/adapters/prime/index.d.mts +1 -1
- package/dist/adapters/prime/index.mjs +1 -1
- package/dist/{index-B3cyaXV5.d.mts → index-CX7MWkZK.d.mts} +42 -33
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{src-DjNUQ88T.mjs → src-CHtyVoNN.mjs} +41 -5
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Et as CliProviderAdapterBase,
|
|
1
|
+
import { Et as CliProviderAdapterBase, Ut as CliProviderConfig, Vt as CliExecArgs, qt as ExecutionState } from "../../index-CX7MWkZK.mjs";
|
|
2
2
|
import { StreamParserConfig } from "@tangle-network/sdk-cli-runner";
|
|
3
3
|
import { McpConfig, ProviderConfig, StreamEvent } from "@tangle-network/agent-interface";
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bt as toolResultEvents, Ft as reasoningEvents, It as sessionObservedEvents, Rt as textDeltaEvents, Vt as toolStartEvents, W as jsonEventParser, X as recordCliTokenUsage, Z as CliProviderAdapterBase, nt as localMcpEnv, tt as localMcpArgv } from "../../src-CHtyVoNN.mjs";
|
|
2
2
|
//#region src/adapters/amp/types.ts
|
|
3
3
|
/**
|
|
4
4
|
* Type guard for AMP events.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Et as CliProviderAdapterBase, Tn as CliTurnSpawn, Ut as CliProviderConfig, Vt as CliExecArgs, qt as ExecutionState, wn as CliTurnProcess } from "../../index-CX7MWkZK.mjs";
|
|
2
2
|
import { StreamParserConfig } from "@tangle-network/sdk-cli-runner";
|
|
3
3
|
import { StreamEvent } from "@tangle-network/agent-interface";
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { G as plaintextResponseParser, It as sessionObservedEvents, Z as CliProviderAdapterBase } from "../../src-CHtyVoNN.mjs";
|
|
2
2
|
import { normalizeOpenAiCompatibleBaseUrl, resolveTangleRouterDefaults } from "@tangle-network/agent-interface";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
//#region src/adapters/exo/adapter.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Et as CliProviderAdapterBase,
|
|
1
|
+
import { Et as CliProviderAdapterBase, Ut as CliProviderConfig, Vt as CliExecArgs, qt as ExecutionState } from "../../index-CX7MWkZK.mjs";
|
|
2
2
|
import { StreamParserConfig } from "@tangle-network/sdk-cli-runner";
|
|
3
3
|
import { AgentExecutionInput, AgentExecutionResult, BackendCapabilities, InteractionResponse, McpConfig, ProviderConfig, SdkHostServices, StreamEvent } from "@tangle-network/agent-interface";
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bt as toolResultEvents, Ft as reasoningEvents, It as sessionObservedEvents, Lt as streamPartBase, R as McpInteractionSupport, Rt as textDeltaEvents, Vt as toolStartEvents, W as jsonEventParser, X as recordCliTokenUsage, Z as CliProviderAdapterBase, et as isLocalMcpConfig, lt as withTurnInteractions, nt as localMcpEnv, rt as enabledInteractionKinds, tt as localMcpArgv } from "../../src-CHtyVoNN.mjs";
|
|
2
2
|
import { createHash, randomUUID } from "node:crypto";
|
|
3
3
|
import { InteractionKind } from "@tangle-network/agent-interface";
|
|
4
4
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Et as CliProviderAdapterBase,
|
|
1
|
+
import { Et as CliProviderAdapterBase, Ut as CliProviderConfig, Vt as CliExecArgs, qt as ExecutionState } from "../../index-CX7MWkZK.mjs";
|
|
2
2
|
import { StreamParserConfig } from "@tangle-network/sdk-cli-runner";
|
|
3
3
|
import { StreamEvent } from "@tangle-network/agent-interface";
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { G as plaintextResponseParser, It as sessionObservedEvents, Z as CliProviderAdapterBase, ht as prependPromptSection } from "../../src-CHtyVoNN.mjs";
|
|
2
2
|
//#region src/adapters/grok/adapter.ts
|
|
3
3
|
const DECLARE_MODEL = "d=$HOME/.grok; [ -z \"$GROK_HOME\" ] || d=$GROK_HOME; t=\"[model.\\\"$1\\\"]\"; mkdir -p \"$d\" && { grep -qxF \"$t\" \"$d/managed_config.toml\" 2>/dev/null || printf '%s\\nmodel = \"%s\"\\n' \"$t\" \"$1\" >> \"$d/managed_config.toml\"; }; shift; exec \"$@\"";
|
|
4
4
|
var GrokProviderAdapter = class extends CliProviderAdapterBase {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Et as CliProviderAdapterBase,
|
|
1
|
+
import { Et as CliProviderAdapterBase, Ut as CliProviderConfig, Vt as CliExecArgs, n as HarnessId, qt as ExecutionState } from "../../index-CX7MWkZK.mjs";
|
|
2
2
|
import { i as PreparedAttachment } from "../../prompt-input-CD7okX8T.mjs";
|
|
3
3
|
import { StreamParserConfig } from "@tangle-network/sdk-cli-runner";
|
|
4
4
|
import { InputPart, McpConfig, StreamEvent } from "@tangle-network/agent-interface";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { G as plaintextResponseParser, It as sessionObservedEvents, X as recordCliTokenUsage, Z as CliProviderAdapterBase, et as isLocalMcpConfig, ht as prependPromptSection, nt as localMcpEnv, pt as partitionImageAttachments, tt as localMcpArgv } from "../../src-CHtyVoNN.mjs";
|
|
2
2
|
import { resolveTangleRouterDefaults } from "@tangle-network/agent-interface";
|
|
3
3
|
import { writeFile } from "node:fs/promises";
|
|
4
4
|
import { dirname, join } from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Et as CliProviderAdapterBase,
|
|
1
|
+
import { Et as CliProviderAdapterBase, Ut as CliProviderConfig, Vt as CliExecArgs, n as HarnessId, qt as ExecutionState } from "../../index-CX7MWkZK.mjs";
|
|
2
2
|
import { StreamParserConfig } from "@tangle-network/sdk-cli-runner";
|
|
3
3
|
import { StreamEvent } from "@tangle-network/agent-interface";
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { G as plaintextResponseParser, It as sessionObservedEvents, J as parseCliUsageLine, X as recordCliTokenUsage, Z as CliProviderAdapterBase, ht as prependPromptSection } from "../../src-CHtyVoNN.mjs";
|
|
2
2
|
import { normalizeOpenAiCompatibleBaseUrl, resolveTangleRouterDefaults } from "@tangle-network/agent-interface";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
//#region src/adapters/nanoclaw/adapter.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Et as CliProviderAdapterBase,
|
|
1
|
+
import { Et as CliProviderAdapterBase, Ut as CliProviderConfig, Vt as CliExecArgs, qt as ExecutionState } from "../../index-CX7MWkZK.mjs";
|
|
2
2
|
import { i as PreparedAttachment } from "../../prompt-input-CD7okX8T.mjs";
|
|
3
3
|
import { StreamParserConfig } from "@tangle-network/sdk-cli-runner";
|
|
4
4
|
import { InputPart, StreamEvent } from "@tangle-network/agent-interface";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { G as plaintextResponseParser, It as sessionObservedEvents, Z as CliProviderAdapterBase, ht as prependPromptSection } from "../../src-CHtyVoNN.mjs";
|
|
2
2
|
import { qualifyModelId } from "@tangle-network/agent-profile-materialize";
|
|
3
3
|
import { normalizeOpenAiCompatibleBaseUrl, resolveTangleRouterDefaults } from "@tangle-network/agent-interface";
|
|
4
4
|
import { join } from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Et as CliProviderAdapterBase,
|
|
1
|
+
import { Et as CliProviderAdapterBase, Ut as CliProviderConfig, Vt as CliExecArgs, c as WorkspacePlanApplication, n as HarnessId, qt as ExecutionState } from "../../index-CX7MWkZK.mjs";
|
|
2
2
|
import { StreamParserConfig } from "@tangle-network/sdk-cli-runner";
|
|
3
3
|
import { CliAuthFile, ProviderConfig, StreamEvent } from "@tangle-network/agent-interface";
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { It as sessionObservedEvents, L as nativeEffortArgs, Pt as finalTextEvent, X as recordCliTokenUsage, Z as CliProviderAdapterBase, ht as prependPromptSection } from "../../src-CHtyVoNN.mjs";
|
|
2
2
|
import { resolveTangleRouterDefaults } from "@tangle-network/agent-interface";
|
|
3
3
|
//#region src/adapters/openclaw/adapter.ts
|
|
4
4
|
/** openclaw's default agent id; the synthesized config declares only it. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dn as AcpBridgeSpawn, Mt as AcpContentBlock, On as AcpProcessSpec, Rt as AcpTurn, Tt as AcpProviderAdapterBase, jt as AcpBridgeConfig } from "../../index-CX7MWkZK.mjs";
|
|
2
2
|
import { i as PreparedAttachment } from "../../prompt-input-CD7okX8T.mjs";
|
|
3
3
|
import { PRIME_AGENT_DIR_ENV_VAR, PRIME_AGENT_DIR_ENV_VARS, PRIME_HARNESS_STATE_ENV_DENYLIST, PRIME_KERNEL_DEAD_MARKERS, PRIME_KERNEL_ENV_PASSTHROUGH, PRIME_MCP_UNSUPPORTED_REASON, PrimeHarnessStateError, PrimeMaterializeOptions, PrimeProfileControls, PrimeProfileControls as PrimeProfileControls$1, PrimeProfileError, PrimeProfileSkill, PrimeProfileSubagent, assertPrimeModelAgreement, hasPrimeProfileMaterial, matchPrimeKernelDeadMarker, materializePrimeProfileControls, primeAgentDirEnv, primeProfileNeedsAgentDir, primeSubagentEntryId as subagentEntryId, primeThinkingLevel, prunePrimeProfileMaterial, readPrimeProfileControls } from "@tangle-network/agent-profile-materialize";
|
|
4
4
|
import { RpcBridge } from "@tangle-network/sdk-cli-runner";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { K as AcpProviderAdapterBase, ht as prependPromptSection, qt as spawnAcpBridge } from "../../src-CHtyVoNN.mjs";
|
|
2
2
|
import { PRIME_AGENT_DIR_ENV_VAR, PRIME_AGENT_DIR_ENV_VARS, PRIME_HARNESS_STATE_ENV_DENYLIST, PRIME_HARNESS_STATE_ENV_DENYLIST as PRIME_HARNESS_STATE_ENV_DENYLIST$1, PRIME_KERNEL_DEAD_MARKERS, PRIME_KERNEL_ENV_PASSTHROUGH, PRIME_KERNEL_ENV_PASSTHROUGH as PRIME_KERNEL_ENV_PASSTHROUGH$1, PRIME_MCP_UNSUPPORTED_REASON, PrimeHarnessStateError, PrimeProfileError, assertPrimeModelAgreement, assertPrimeModelAgreement as assertPrimeModelAgreement$1, buildPiModelsConfig, hasPrimeProfileMaterial, matchPrimeKernelDeadMarker, materializePrimeProfileControls, materializePrimeProfileControls as materializePrimeProfileControls$1, primeAgentDirEnv, primeAgentDirEnv as primeAgentDirEnv$1, primeHarnessStatePath, primeProfileNeedsAgentDir, primeSubagentEntryId as subagentEntryId, primeThinkingLevel, primeThinkingLevel as primeThinkingLevel$1, prunePrimeProfileMaterial, readPrimeProfileControls, readPrimeProfileControls as readPrimeProfileControls$1, writePrimeAgentFile } from "@tangle-network/agent-profile-materialize";
|
|
3
3
|
import { isAbsolute, join, relative, sep } from "node:path";
|
|
4
4
|
import { existsSync, lchownSync, lstatSync, mkdirSync } from "node:fs";
|
|
@@ -34,6 +34,38 @@ interface AcpBridgeSpawn {
|
|
|
34
34
|
/** Spawn an ACP agent over NDJSON stdio from `env` alone, never the sidecar's own environment. The adapter owns abort, so no signal. */
|
|
35
35
|
declare function spawnAcpBridge(request: AcpBridgeSpawn): RpcBridge;
|
|
36
36
|
//#endregion
|
|
37
|
+
//#region src/turn-process.d.ts
|
|
38
|
+
/** A turn transport may finish while its provider server remains alive. */
|
|
39
|
+
type CliTurnProcess = Pick<CliProcess, "pid" | "write" | "closeInput" | "kill" | "exitPromise" | "beginRawCapture"> & {
|
|
40
|
+
stderr?: NodeJS.ReadableStream;
|
|
41
|
+
};
|
|
42
|
+
type CliTurnSpawn<TConfig, TEvent> = {
|
|
43
|
+
input: AgentExecutionInput;
|
|
44
|
+
sessionId: string;
|
|
45
|
+
providerSessionId?: string;
|
|
46
|
+
config: TConfig;
|
|
47
|
+
execArgs: CliExecArgs;
|
|
48
|
+
workspaceRoot: string;
|
|
49
|
+
env: Record<string, string | undefined>;
|
|
50
|
+
signal: AbortSignal;
|
|
51
|
+
timeoutMs?: number;
|
|
52
|
+
parser: StreamParserConfig<TEvent>; /** The profile plan the turn applied, whose secret references a spawn may serve. */
|
|
53
|
+
profilePlan?: WorkspacePlanApplication;
|
|
54
|
+
/**
|
|
55
|
+
* A process started before the turn it serves (a held spare): its raw
|
|
56
|
+
* capture opens when a turn adopts it (`beginRawCapture`), inside that
|
|
57
|
+
* turn's attempt, not at spawn.
|
|
58
|
+
*/
|
|
59
|
+
deferRawCapture?: boolean;
|
|
60
|
+
};
|
|
61
|
+
/** One turn's launch, prepared for a caller that runs the process itself. */
|
|
62
|
+
type PreparedCliLaunch = {
|
|
63
|
+
/** Pass to `execCli` or `launchCliProcess`, adding `signal` and `timeoutMs`. */spawn: CliSpawnConfig; /** Write to the child's stdin and close it; absent when the prompt is in argv. */
|
|
64
|
+
stdin?: string; /** The native session id the argv names, for a harness that pre-mints it. */
|
|
65
|
+
nativeSessionId?: string; /** The profile's workspace files and spawn inputs that were applied. */
|
|
66
|
+
workspacePlan?: WorkspacePlanReceipt;
|
|
67
|
+
};
|
|
68
|
+
//#endregion
|
|
37
69
|
//#region src/secret-profile-mcp.d.ts
|
|
38
70
|
declare function requireRecord(raw: unknown, message: string): Record<string, unknown>;
|
|
39
71
|
type SecretProfileMcpStdio<Value = string> = {
|
|
@@ -112,6 +144,10 @@ declare function secretSessionTurnQueue(view: string): {
|
|
|
112
144
|
release: () => void;
|
|
113
145
|
retryCleanup(retry: () => Promise<void>): void;
|
|
114
146
|
};
|
|
147
|
+
/** A shared launch never serves a secret MCP server to an agent on the executor's UID, nor a stdio one without a root sidecar to bridge it. */
|
|
148
|
+
declare function sharedSecretMcpRefused(servers: readonly SecretProfileMcpServer[], agentUid: number | undefined): boolean;
|
|
149
|
+
/** Spawn a turn under its session's MCP lease: the session's turns hold it one at a time, each until its process exits. */
|
|
150
|
+
declare function spawnUnderSecretMcpLease(scope: string, signal: AbortSignal, lease: () => Promise<SecretProfileMcpLease | undefined>, spawn: () => CliTurnProcess | Promise<CliTurnProcess>): Promise<CliTurnProcess>;
|
|
115
151
|
/** An HTTP URL on loopback with an explicit port and no URL credentials. */
|
|
116
152
|
declare function isLoopbackEndpoint(value: unknown): boolean;
|
|
117
153
|
//#endregion
|
|
@@ -402,37 +438,6 @@ interface AcpTurn<TConfig extends AcpBridgeConfig> {
|
|
|
402
438
|
/** Text carried by ACP content blocks, including tool-call content. */
|
|
403
439
|
declare function acpContentText(content: AcpContentBlock | AcpContentBlock[] | undefined): string;
|
|
404
440
|
//#endregion
|
|
405
|
-
//#region src/turn-process.d.ts
|
|
406
|
-
/** A turn transport may finish while its provider server remains alive. */
|
|
407
|
-
type CliTurnProcess = Pick<CliProcess, "pid" | "write" | "closeInput" | "kill" | "exitPromise" | "beginRawCapture"> & {
|
|
408
|
-
stderr?: NodeJS.ReadableStream;
|
|
409
|
-
};
|
|
410
|
-
type CliTurnSpawn<TConfig, TEvent> = {
|
|
411
|
-
input: AgentExecutionInput;
|
|
412
|
-
sessionId: string;
|
|
413
|
-
providerSessionId?: string;
|
|
414
|
-
config: TConfig;
|
|
415
|
-
execArgs: CliExecArgs;
|
|
416
|
-
workspaceRoot: string;
|
|
417
|
-
env: Record<string, string | undefined>;
|
|
418
|
-
signal: AbortSignal;
|
|
419
|
-
timeoutMs?: number;
|
|
420
|
-
parser: StreamParserConfig<TEvent>;
|
|
421
|
-
/**
|
|
422
|
-
* A process started before the turn it serves (a held spare): its raw
|
|
423
|
-
* capture opens when a turn adopts it (`beginRawCapture`), inside that
|
|
424
|
-
* turn's attempt, not at spawn.
|
|
425
|
-
*/
|
|
426
|
-
deferRawCapture?: boolean;
|
|
427
|
-
};
|
|
428
|
-
/** One turn's launch, prepared for a caller that runs the process itself. */
|
|
429
|
-
type PreparedCliLaunch = {
|
|
430
|
-
/** Pass to `execCli` or `launchCliProcess`, adding `signal` and `timeoutMs`. */spawn: CliSpawnConfig; /** Write to the child's stdin and close it; absent when the prompt is in argv. */
|
|
431
|
-
stdin?: string; /** The native session id the argv names, for a harness that pre-mints it. */
|
|
432
|
-
nativeSessionId?: string; /** The profile's workspace files and spawn inputs that were applied. */
|
|
433
|
-
workspacePlan?: WorkspacePlanReceipt;
|
|
434
|
-
};
|
|
435
|
-
//#endregion
|
|
436
441
|
//#region src/adapter-lifecycle.d.ts
|
|
437
442
|
/** Owns configuration, initialization, cancellation, and subprocess identity. */
|
|
438
443
|
declare abstract class CliAdapterLifecycle<TConfig extends CliProviderConfig = CliProviderConfig> {
|
|
@@ -518,6 +523,10 @@ declare abstract class CliAdapterProfile<TConfig extends CliProviderConfig = Cli
|
|
|
518
523
|
protected readonly referencesSharedFileSecrets: boolean;
|
|
519
524
|
private readonly profileSecretProvider;
|
|
520
525
|
private readonly secretProfileRuntimeKeyProvider;
|
|
526
|
+
/** The executor's MCP proxy, as the owner of the secret scopes this adapter opens. */
|
|
527
|
+
protected readonly mcpOwner: {
|
|
528
|
+
readonly proxy?: SecretProfileMcpCredentialProxy;
|
|
529
|
+
};
|
|
521
530
|
/** Private native preparation state; never part of a returned receipt. */
|
|
522
531
|
private readonly secretProfileRevisions;
|
|
523
532
|
constructor(options?: CliProviderOptions<TConfig>);
|
|
@@ -1410,5 +1419,5 @@ declare function homeXdgEnv(home: string): {
|
|
|
1410
1419
|
XDG_STATE_HOME: string;
|
|
1411
1420
|
};
|
|
1412
1421
|
//#endregion
|
|
1413
|
-
export { InteractionMcpServer$1 as $,
|
|
1414
|
-
//# sourceMappingURL=index-
|
|
1422
|
+
export { InteractionMcpServer$1 as $, enabledInteractionKinds as $t, ROUTER_MODEL_CATALOG_TIMEOUT_MS as A, ACP_PROTOCOL_VERSION as At, trackReasoningBlock as B, assertAcpTurnFinished as Bt, NATIVE_SESSION_CONTRACTS$1 as C, untilSettledOrAborted as Cn, wasNeverLaunched as Ct, provenStoreBinary as D, AcpBridgeSpawn as Dn, runtimeSecretsOverlay as Dt, isTrustedStoreBinary as E, PreparedCliLaunch as En, CliProviderAdapterBase as Et, resolveRouterModelLimits as F, AcpNewSessionResult as Ft, readCliTokenUsage as G, CliProviderOptions as Gt, nativeEffortArgs as H, CliExecutionInput as Ht, resolveRouterModelReasoningEfforts as I, AcpPromptResult as It, localMcpArgv as J, InteractionToggleConfig as Jt, recordCliTokenUsage as K, EphemeralContextInput as Kt, RepeatedToolFailure as L, AcpSessionUpdateParams as Lt, RouterModelLimits as M, AcpContentBlock as Mt, RouterModelLimitsResult as N, AcpInitializeParams as Nt, refuseSecretLaunch as O, AcpProcessSpec as On, createExecutionState as Ot, findRouterCatalogEntry as P, AcpInitializeResult as Pt, DEFAULT_INTERACTION_MCP_SERVER_NAME as Q, TurnEndReason as Qt, RepeatedToolFailureGuardOptions as R, AcpTurn as Rt, secretMcpScope as S, spawnUnderSecretMcpLease as Sn, rejectNotLaunched as St, assertSealedNativeHome as T, CliTurnSpawn as Tn, AcpProviderAdapterBase as Tt, accumulateCliTokenUsage as U, CliProviderConfig as Ut, kimiThinkingArgs as V, CliExecArgs as Vt, parseCliUsageLine as W, CliProviderLogger as Wt, McpInteractionSupport as X, PerTurnInteractionInput as Xt, localMcpEnv as Y, InteractionToggleKind as Yt, AskUserBridge as Z, ToolCallState as Zt, textDeltaEvents as _, resolveReferences as _n, jsonEventParser as _t, PERMISSION_DECISION_TIMEOUT_MS as a, withTurnInteractions as an, interactionMcpToolName as at, toolStartEvents as b, servableStdioServer as bn, SessionRehydrationError as bt, WorkspacePlanApplication$1 as c, SecretProfileMcpLease as cn, deterministicFilePartId as ct, TerminalPlanSupport as d, directStdioMcpServers as dn, EXECUTION_CORRELATION_HEADERS as dt, interactionToggleEnabled as en, InteractionMcpServerConfig$1 as et, TerminalPlanSupportOptions as f, exposedStdioServer as fn, EXECUTION_ID_HEADER as ft, streamPartBase as g, requireRecord as gn, PlaintextResponse as gt, sessionObservedEvents as h, joinQueue as hn, executionCorrelationHeaders as ht, InteractionHttpBridge as i, withEphemeralContext as in, brokerInteractionTools$1 as it, ResolveRouterModelLimitsInput as j, AcpBridgeConfig as jt, resolveExecutableRealpath as k, spawnAcpBridge as kn, ACP_MIN_PROTOCOL_VERSION as kt, codexDeveloperInstructionArgs as l, SecretProfileMcpServer as ln, inferMediaType as lt, reasoningEvents as m, isPlainRecord as mn, MANAGED_QUOTE_VERSION_HEADER as mt, HarnessId$1 as n, turnEndReason as nn, RequestPermissionBridge as nt, SECRET_REFERENCE$1 as o, SHARED_WORKSPACE_DIR_ENV as on, buildFileUrl as ot, finalTextEvent as p, isLoopbackEndpoint as pn, EXECUTION_TRACE_HEADER as pt, isLocalMcpConfig as q, ExecutionState as qt, InteractionBroker$1 as r, turnInteractionEnabled as rn, RequestPlanBridge as rt, SECRET_REFERENCE_PREFIX as s, SecretProfileMcpCredentialProxy as sn, deriveFilePart as st, CODEX_DISABLED_FEATURE_ARGS as t, readEphemeralContext as tn, PermissionPromptBridge as tt, homeXdgEnv as u, assertSealedNativeSearchPath as un, trackFilePart as ut, textSnapshotEvents as v, secretSessionTurnQueue as vn, plaintextResponseParser as vt, SEALED_NATIVE_HOME_LAYOUT as w, CliTurnProcess as wn, mapAcpSessionUpdate as wt, forgetSessionScopes as x, sharedSecretMcpRefused as xn, failureAfterCleanup as xt, toolResultEvents as y, servableMcpServer as yn, InvalidAttachmentError as yt, createRepeatedToolFailureGuard as z, acpContentText as zt };
|
|
1423
|
+
//# sourceMappingURL=index-CX7MWkZK.d.mts.map
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as InteractionMcpServer, $t as
|
|
1
|
+
import { $ as InteractionMcpServer, $t as enabledInteractionKinds, A as ROUTER_MODEL_CATALOG_TIMEOUT_MS, At as ACP_PROTOCOL_VERSION, B as trackReasoningBlock, Bt as assertAcpTurnFinished, C as NATIVE_SESSION_CONTRACTS, Cn as untilSettledOrAborted, Ct as wasNeverLaunched, D as provenStoreBinary, Dn as AcpBridgeSpawn, Dt as runtimeSecretsOverlay, E as isTrustedStoreBinary, En as PreparedCliLaunch, Et as CliProviderAdapterBase, F as resolveRouterModelLimits, Ft as AcpNewSessionResult, G as readCliTokenUsage, Gt as CliProviderOptions, H as nativeEffortArgs, Ht as CliExecutionInput, I as resolveRouterModelReasoningEfforts, It as AcpPromptResult, J as localMcpArgv, Jt as InteractionToggleConfig, K as recordCliTokenUsage, Kt as EphemeralContextInput, L as RepeatedToolFailure, Lt as AcpSessionUpdateParams, M as RouterModelLimits, Mt as AcpContentBlock, N as RouterModelLimitsResult, Nt as AcpInitializeParams, O as refuseSecretLaunch, On as AcpProcessSpec, Ot as createExecutionState, P as findRouterCatalogEntry, Pt as AcpInitializeResult, Q as DEFAULT_INTERACTION_MCP_SERVER_NAME, Qt as TurnEndReason, R as RepeatedToolFailureGuardOptions, Rt as AcpTurn, S as secretMcpScope, Sn as spawnUnderSecretMcpLease, St as rejectNotLaunched, T as assertSealedNativeHome, Tn as CliTurnSpawn, Tt as AcpProviderAdapterBase, U as accumulateCliTokenUsage, Ut as CliProviderConfig, V as kimiThinkingArgs, Vt as CliExecArgs, W as parseCliUsageLine, Wt as CliProviderLogger, X as McpInteractionSupport, Xt as PerTurnInteractionInput, Y as localMcpEnv, Yt as InteractionToggleKind, Z as AskUserBridge, Zt as ToolCallState, _ as textDeltaEvents, _n as resolveReferences, _t as jsonEventParser, a as PERMISSION_DECISION_TIMEOUT_MS, an as withTurnInteractions, at as interactionMcpToolName, b as toolStartEvents, bn as servableStdioServer, bt as SessionRehydrationError, c as WorkspacePlanApplication, cn as SecretProfileMcpLease, ct as deterministicFilePartId, d as TerminalPlanSupport, dn as directStdioMcpServers, dt as EXECUTION_CORRELATION_HEADERS, en as interactionToggleEnabled, et as InteractionMcpServerConfig, f as TerminalPlanSupportOptions, fn as exposedStdioServer, ft as EXECUTION_ID_HEADER, g as streamPartBase, gn as requireRecord, gt as PlaintextResponse, h as sessionObservedEvents, hn as joinQueue, ht as executionCorrelationHeaders, i as InteractionHttpBridge, in as withEphemeralContext, it as brokerInteractionTools, j as ResolveRouterModelLimitsInput, jt as AcpBridgeConfig, k as resolveExecutableRealpath, kn as spawnAcpBridge, kt as ACP_MIN_PROTOCOL_VERSION, l as codexDeveloperInstructionArgs, ln as SecretProfileMcpServer, lt as inferMediaType, m as reasoningEvents, mn as isPlainRecord, mt as MANAGED_QUOTE_VERSION_HEADER, n as HarnessId, nn as turnEndReason, nt as RequestPermissionBridge, o as SECRET_REFERENCE, on as SHARED_WORKSPACE_DIR_ENV, ot as buildFileUrl, p as finalTextEvent, pn as isLoopbackEndpoint, pt as EXECUTION_TRACE_HEADER, q as isLocalMcpConfig, qt as ExecutionState, r as InteractionBroker, rn as turnInteractionEnabled, rt as RequestPlanBridge, s as SECRET_REFERENCE_PREFIX, sn as SecretProfileMcpCredentialProxy, st as deriveFilePart, t as CODEX_DISABLED_FEATURE_ARGS, tn as readEphemeralContext, tt as PermissionPromptBridge, u as homeXdgEnv, un as assertSealedNativeSearchPath, ut as trackFilePart, v as textSnapshotEvents, vn as secretSessionTurnQueue, vt as plaintextResponseParser, w as SEALED_NATIVE_HOME_LAYOUT, wn as CliTurnProcess, wt as mapAcpSessionUpdate, x as forgetSessionScopes, xn as sharedSecretMcpRefused, xt as failureAfterCleanup, y as toolResultEvents, yn as servableMcpServer, yt as InvalidAttachmentError, z as createRepeatedToolFailureGuard, zt as acpContentText } from "./index-CX7MWkZK.mjs";
|
|
2
2
|
import { a as partitionImageAttachments, i as PreparedAttachment, n as MAX_TOTAL_INLINE_IMAGE_BYTES, o as preparePromptInputParts, r as PROMPT_SECTION_SEPARATOR, s as prependPromptSection, t as MAX_INLINE_IMAGE_BYTES } from "./prompt-input-CD7okX8T.mjs";
|
|
3
|
-
export { ACP_MIN_PROTOCOL_VERSION, ACP_PROTOCOL_VERSION, AcpBridgeConfig, AcpBridgeSpawn, AcpContentBlock, AcpInitializeParams, AcpInitializeResult, AcpNewSessionResult, AcpProcessSpec, AcpPromptResult, AcpProviderAdapterBase, AcpSessionUpdateParams, AcpTurn, AskUserBridge, CODEX_DISABLED_FEATURE_ARGS, CliExecArgs, CliExecutionInput, CliProviderAdapterBase, CliProviderConfig, CliProviderLogger, CliProviderOptions, CliTurnProcess, CliTurnSpawn, DEFAULT_INTERACTION_MCP_SERVER_NAME, EXECUTION_CORRELATION_HEADERS, EXECUTION_ID_HEADER, EXECUTION_TRACE_HEADER, EphemeralContextInput, ExecutionState, HarnessId, InteractionBroker, InteractionHttpBridge, InteractionMcpServer, InteractionMcpServerConfig, InteractionToggleConfig, InteractionToggleKind, InvalidAttachmentError, MANAGED_QUOTE_VERSION_HEADER, MAX_INLINE_IMAGE_BYTES, MAX_TOTAL_INLINE_IMAGE_BYTES, McpInteractionSupport, NATIVE_SESSION_CONTRACTS, PERMISSION_DECISION_TIMEOUT_MS, PROMPT_SECTION_SEPARATOR, PerTurnInteractionInput, PermissionPromptBridge, PlaintextResponse, PreparedAttachment, PreparedCliLaunch, ROUTER_MODEL_CATALOG_TIMEOUT_MS, RepeatedToolFailure, RepeatedToolFailureGuardOptions, RequestPermissionBridge, RequestPlanBridge, ResolveRouterModelLimitsInput, RouterModelLimits, RouterModelLimitsResult, SEALED_NATIVE_HOME_LAYOUT, SECRET_REFERENCE, SECRET_REFERENCE_PREFIX, SHARED_WORKSPACE_DIR_ENV, SecretProfileMcpCredentialProxy, SecretProfileMcpLease, SecretProfileMcpServer, SessionRehydrationError, TerminalPlanSupport, TerminalPlanSupportOptions, ToolCallState, TurnEndReason, WorkspacePlanApplication, accumulateCliTokenUsage, acpContentText, assertAcpTurnFinished, assertSealedNativeHome, assertSealedNativeSearchPath, brokerInteractionTools, buildFileUrl, codexDeveloperInstructionArgs, createExecutionState, createRepeatedToolFailureGuard, deriveFilePart, deterministicFilePartId, directStdioMcpServers, enabledInteractionKinds, executionCorrelationHeaders, exposedStdioServer, failureAfterCleanup, finalTextEvent, findRouterCatalogEntry, forgetSessionScopes, homeXdgEnv, inferMediaType, interactionMcpToolName, interactionToggleEnabled, isLocalMcpConfig, isLoopbackEndpoint, isPlainRecord, isTrustedStoreBinary, joinQueue, jsonEventParser, kimiThinkingArgs, localMcpArgv, localMcpEnv, mapAcpSessionUpdate, nativeEffortArgs, parseCliUsageLine, partitionImageAttachments, plaintextResponseParser, preparePromptInputParts, prependPromptSection, provenStoreBinary, readCliTokenUsage, readEphemeralContext, reasoningEvents, recordCliTokenUsage, refuseSecretLaunch, rejectNotLaunched, requireRecord, resolveExecutableRealpath, resolveReferences, resolveRouterModelLimits, resolveRouterModelReasoningEfforts, runtimeSecretsOverlay, secretMcpScope, secretSessionTurnQueue, servableMcpServer, servableStdioServer, sessionObservedEvents, spawnAcpBridge, streamPartBase, textDeltaEvents, textSnapshotEvents, toolResultEvents, toolStartEvents, trackFilePart, trackReasoningBlock, turnEndReason, turnInteractionEnabled, untilSettledOrAborted, wasNeverLaunched, withEphemeralContext, withTurnInteractions };
|
|
3
|
+
export { ACP_MIN_PROTOCOL_VERSION, ACP_PROTOCOL_VERSION, AcpBridgeConfig, AcpBridgeSpawn, AcpContentBlock, AcpInitializeParams, AcpInitializeResult, AcpNewSessionResult, AcpProcessSpec, AcpPromptResult, AcpProviderAdapterBase, AcpSessionUpdateParams, AcpTurn, AskUserBridge, CODEX_DISABLED_FEATURE_ARGS, CliExecArgs, CliExecutionInput, CliProviderAdapterBase, CliProviderConfig, CliProviderLogger, CliProviderOptions, CliTurnProcess, CliTurnSpawn, DEFAULT_INTERACTION_MCP_SERVER_NAME, EXECUTION_CORRELATION_HEADERS, EXECUTION_ID_HEADER, EXECUTION_TRACE_HEADER, EphemeralContextInput, ExecutionState, HarnessId, InteractionBroker, InteractionHttpBridge, InteractionMcpServer, InteractionMcpServerConfig, InteractionToggleConfig, InteractionToggleKind, InvalidAttachmentError, MANAGED_QUOTE_VERSION_HEADER, MAX_INLINE_IMAGE_BYTES, MAX_TOTAL_INLINE_IMAGE_BYTES, McpInteractionSupport, NATIVE_SESSION_CONTRACTS, PERMISSION_DECISION_TIMEOUT_MS, PROMPT_SECTION_SEPARATOR, PerTurnInteractionInput, PermissionPromptBridge, PlaintextResponse, PreparedAttachment, PreparedCliLaunch, ROUTER_MODEL_CATALOG_TIMEOUT_MS, RepeatedToolFailure, RepeatedToolFailureGuardOptions, RequestPermissionBridge, RequestPlanBridge, ResolveRouterModelLimitsInput, RouterModelLimits, RouterModelLimitsResult, SEALED_NATIVE_HOME_LAYOUT, SECRET_REFERENCE, SECRET_REFERENCE_PREFIX, SHARED_WORKSPACE_DIR_ENV, SecretProfileMcpCredentialProxy, SecretProfileMcpLease, SecretProfileMcpServer, SessionRehydrationError, TerminalPlanSupport, TerminalPlanSupportOptions, ToolCallState, TurnEndReason, WorkspacePlanApplication, accumulateCliTokenUsage, acpContentText, assertAcpTurnFinished, assertSealedNativeHome, assertSealedNativeSearchPath, brokerInteractionTools, buildFileUrl, codexDeveloperInstructionArgs, createExecutionState, createRepeatedToolFailureGuard, deriveFilePart, deterministicFilePartId, directStdioMcpServers, enabledInteractionKinds, executionCorrelationHeaders, exposedStdioServer, failureAfterCleanup, finalTextEvent, findRouterCatalogEntry, forgetSessionScopes, homeXdgEnv, inferMediaType, interactionMcpToolName, interactionToggleEnabled, isLocalMcpConfig, isLoopbackEndpoint, isPlainRecord, isTrustedStoreBinary, joinQueue, jsonEventParser, kimiThinkingArgs, localMcpArgv, localMcpEnv, mapAcpSessionUpdate, nativeEffortArgs, parseCliUsageLine, partitionImageAttachments, plaintextResponseParser, preparePromptInputParts, prependPromptSection, provenStoreBinary, readCliTokenUsage, readEphemeralContext, reasoningEvents, recordCliTokenUsage, refuseSecretLaunch, rejectNotLaunched, requireRecord, resolveExecutableRealpath, resolveReferences, resolveRouterModelLimits, resolveRouterModelReasoningEfforts, runtimeSecretsOverlay, secretMcpScope, secretSessionTurnQueue, servableMcpServer, servableStdioServer, sessionObservedEvents, sharedSecretMcpRefused, spawnAcpBridge, spawnUnderSecretMcpLease, streamPartBase, textDeltaEvents, textSnapshotEvents, toolResultEvents, toolStartEvents, trackFilePart, trackReasoningBlock, turnEndReason, turnInteractionEnabled, untilSettledOrAborted, wasNeverLaunched, withEphemeralContext, withTurnInteractions };
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { ACP_MIN_PROTOCOL_VERSION, ACP_PROTOCOL_VERSION, AcpProviderAdapterBase, CODEX_DISABLED_FEATURE_ARGS, CliProviderAdapterBase, DEFAULT_INTERACTION_MCP_SERVER_NAME, EXECUTION_CORRELATION_HEADERS, EXECUTION_ID_HEADER, EXECUTION_TRACE_HEADER, InteractionBroker, InteractionHttpBridge, InteractionMcpServer, InvalidAttachmentError, MANAGED_QUOTE_VERSION_HEADER, MAX_INLINE_IMAGE_BYTES, MAX_TOTAL_INLINE_IMAGE_BYTES, McpInteractionSupport, NATIVE_SESSION_CONTRACTS, PERMISSION_DECISION_TIMEOUT_MS, PROMPT_SECTION_SEPARATOR, ROUTER_MODEL_CATALOG_TIMEOUT_MS, SEALED_NATIVE_HOME_LAYOUT, SECRET_REFERENCE, SECRET_REFERENCE_PREFIX, SHARED_WORKSPACE_DIR_ENV, SessionRehydrationError, TerminalPlanSupport, accumulateCliTokenUsage, acpContentText, assertAcpTurnFinished, assertSealedNativeHome, assertSealedNativeSearchPath, brokerInteractionTools, buildFileUrl, codexDeveloperInstructionArgs, createExecutionState, createRepeatedToolFailureGuard, deriveFilePart, deterministicFilePartId, directStdioMcpServers, enabledInteractionKinds, executionCorrelationHeaders, exposedStdioServer, failureAfterCleanup, finalTextEvent, findRouterCatalogEntry, forgetSessionScopes, homeXdgEnv, inferMediaType, interactionMcpToolName, interactionToggleEnabled, isLocalMcpConfig, isLoopbackEndpoint, isPlainRecord, isTrustedStoreBinary, joinQueue, jsonEventParser, kimiThinkingArgs, localMcpArgv, localMcpEnv, mapAcpSessionUpdate, nativeEffortArgs, parseCliUsageLine, partitionImageAttachments, plaintextResponseParser, preparePromptInputParts, prependPromptSection, provenStoreBinary, readCliTokenUsage, readEphemeralContext, reasoningEvents, recordCliTokenUsage, refuseSecretLaunch, rejectNotLaunched, requireRecord, resolveExecutableRealpath, resolveReferences, resolveRouterModelLimits, resolveRouterModelReasoningEfforts, runtimeSecretsOverlay, secretMcpScope, secretSessionTurnQueue, servableMcpServer, servableStdioServer, sessionObservedEvents, spawnAcpBridge, streamPartBase, textDeltaEvents, textSnapshotEvents, toolResultEvents, toolStartEvents, trackFilePart, trackReasoningBlock, turnEndReason, turnInteractionEnabled, untilSettledOrAborted, wasNeverLaunched, withEphemeralContext, withTurnInteractions };
|
|
1
|
+
import { $ as createExecutionState, A as refuseSecretLaunch, At as MANAGED_QUOTE_VERSION_HEADER, B as DEFAULT_INTERACTION_MCP_SERVER_NAME, Bt as toolResultEvents, C as spawnUnderSecretMcpLease, Ct as failureAfterCleanup, D as assertSealedNativeHome, Dt as EXECUTION_CORRELATION_HEADERS, E as SEALED_NATIVE_HOME_LAYOUT, Et as runtimeSecretsOverlay, F as resolveRouterModelReasoningEfforts, Ft as reasoningEvents, G as plaintextResponseParser, Gt as acpContentText, H as brokerInteractionTools, Ht as trackReasoningBlock, I as kimiThinkingArgs, It as sessionObservedEvents, J as parseCliUsageLine, K as AcpProviderAdapterBase, Kt as assertAcpTurnFinished, L as nativeEffortArgs, Lt as streamPartBase, M as ROUTER_MODEL_CATALOG_TIMEOUT_MS, Mt as homeXdgEnv, N as findRouterCatalogEntry, Nt as mapAcpSessionUpdate, O as isTrustedStoreBinary, Ot as EXECUTION_ID_HEADER, P as resolveRouterModelLimits, Pt as finalTextEvent, Q as createRepeatedToolFailureGuard, R as McpInteractionSupport, Rt as textDeltaEvents, S as sharedSecretMcpRefused, St as SessionRehydrationError, T as NATIVE_SESSION_CONTRACTS, Tt as wasNeverLaunched, U as interactionMcpToolName, Ut as ACP_MIN_PROTOCOL_VERSION, V as InteractionMcpServer, Vt as toolStartEvents, W as jsonEventParser, Wt as ACP_PROTOCOL_VERSION, X as recordCliTokenUsage, Y as readCliTokenUsage, Z as CliProviderAdapterBase, _ as requireRecord, _t as deriveFilePart, a as SECRET_REFERENCE, at as readEphemeralContext, b as servableMcpServer, bt as trackFilePart, c as forgetSessionScopes, ct as withEphemeralContext, d as assertSealedNativeSearchPath, dt as MAX_TOTAL_INLINE_IMAGE_BYTES, et as isLocalMcpConfig, f as directStdioMcpServers, ft as PROMPT_SECTION_SEPARATOR, g as joinQueue, gt as buildFileUrl, h as isPlainRecord, ht as prependPromptSection, i as PERMISSION_DECISION_TIMEOUT_MS, it as interactionToggleEnabled, j as resolveExecutableRealpath, jt as executionCorrelationHeaders, k as provenStoreBinary, kt as EXECUTION_TRACE_HEADER, l as secretMcpScope, lt as withTurnInteractions, m as isLoopbackEndpoint, mt as preparePromptInputParts, n as InteractionBroker, nt as localMcpEnv, o as SECRET_REFERENCE_PREFIX, ot as turnEndReason, p as exposedStdioServer, pt as partitionImageAttachments, q as accumulateCliTokenUsage, qt as spawnAcpBridge, r as InteractionHttpBridge, rt as enabledInteractionKinds, s as codexDeveloperInstructionArgs, st as turnInteractionEnabled, t as CODEX_DISABLED_FEATURE_ARGS, tt as localMcpArgv, u as SHARED_WORKSPACE_DIR_ENV, ut as MAX_INLINE_IMAGE_BYTES, v as resolveReferences, vt as deterministicFilePartId, w as untilSettledOrAborted, wt as rejectNotLaunched, x as servableStdioServer, xt as InvalidAttachmentError, y as secretSessionTurnQueue, yt as inferMediaType, z as TerminalPlanSupport, zt as textSnapshotEvents } from "./src-CHtyVoNN.mjs";
|
|
2
|
+
export { ACP_MIN_PROTOCOL_VERSION, ACP_PROTOCOL_VERSION, AcpProviderAdapterBase, CODEX_DISABLED_FEATURE_ARGS, CliProviderAdapterBase, DEFAULT_INTERACTION_MCP_SERVER_NAME, EXECUTION_CORRELATION_HEADERS, EXECUTION_ID_HEADER, EXECUTION_TRACE_HEADER, InteractionBroker, InteractionHttpBridge, InteractionMcpServer, InvalidAttachmentError, MANAGED_QUOTE_VERSION_HEADER, MAX_INLINE_IMAGE_BYTES, MAX_TOTAL_INLINE_IMAGE_BYTES, McpInteractionSupport, NATIVE_SESSION_CONTRACTS, PERMISSION_DECISION_TIMEOUT_MS, PROMPT_SECTION_SEPARATOR, ROUTER_MODEL_CATALOG_TIMEOUT_MS, SEALED_NATIVE_HOME_LAYOUT, SECRET_REFERENCE, SECRET_REFERENCE_PREFIX, SHARED_WORKSPACE_DIR_ENV, SessionRehydrationError, TerminalPlanSupport, accumulateCliTokenUsage, acpContentText, assertAcpTurnFinished, assertSealedNativeHome, assertSealedNativeSearchPath, brokerInteractionTools, buildFileUrl, codexDeveloperInstructionArgs, createExecutionState, createRepeatedToolFailureGuard, deriveFilePart, deterministicFilePartId, directStdioMcpServers, enabledInteractionKinds, executionCorrelationHeaders, exposedStdioServer, failureAfterCleanup, finalTextEvent, findRouterCatalogEntry, forgetSessionScopes, homeXdgEnv, inferMediaType, interactionMcpToolName, interactionToggleEnabled, isLocalMcpConfig, isLoopbackEndpoint, isPlainRecord, isTrustedStoreBinary, joinQueue, jsonEventParser, kimiThinkingArgs, localMcpArgv, localMcpEnv, mapAcpSessionUpdate, nativeEffortArgs, parseCliUsageLine, partitionImageAttachments, plaintextResponseParser, preparePromptInputParts, prependPromptSection, provenStoreBinary, readCliTokenUsage, readEphemeralContext, reasoningEvents, recordCliTokenUsage, refuseSecretLaunch, rejectNotLaunched, requireRecord, resolveExecutableRealpath, resolveReferences, resolveRouterModelLimits, resolveRouterModelReasoningEfforts, runtimeSecretsOverlay, secretMcpScope, secretSessionTurnQueue, servableMcpServer, servableStdioServer, sessionObservedEvents, sharedSecretMcpRefused, spawnAcpBridge, spawnUnderSecretMcpLease, streamPartBase, textDeltaEvents, textSnapshotEvents, toolResultEvents, toolStartEvents, trackFilePart, trackReasoningBlock, turnEndReason, turnInteractionEnabled, untilSettledOrAborted, wasNeverLaunched, withEphemeralContext, withTurnInteractions };
|
|
@@ -1613,12 +1613,15 @@ var CliAdapterProfile = class extends CliAdapterLifecycle {
|
|
|
1613
1613
|
referencesSharedFileSecrets = false;
|
|
1614
1614
|
profileSecretProvider;
|
|
1615
1615
|
secretProfileRuntimeKeyProvider;
|
|
1616
|
+
/** The executor's MCP proxy, as the owner of the secret scopes this adapter opens. */
|
|
1617
|
+
mcpOwner;
|
|
1616
1618
|
/** Private native preparation state; never part of a returned receipt. */
|
|
1617
1619
|
secretProfileRevisions = /* @__PURE__ */ new WeakMap();
|
|
1618
1620
|
constructor(options = {}) {
|
|
1619
1621
|
super(options);
|
|
1620
1622
|
this.profileSecretProvider = options.profileSecretProvider ?? UNAVAILABLE_AGENT_PROFILE_SECRET_PROVIDER;
|
|
1621
1623
|
this.secretProfileRuntimeKeyProvider = options.secretProfileRuntimeKeyProvider ?? UNAVAILABLE_AGENT_PROFILE_SECRET_PROVIDER;
|
|
1624
|
+
this.mcpOwner = { proxy: options.mcpCredentialProxy };
|
|
1622
1625
|
}
|
|
1623
1626
|
/** The exact child environment a turn uses; shared with prewarm paths. */
|
|
1624
1627
|
buildTurnEnvironment(executionConfig, profilePlan, workspaceRoot, correlationHeaders) {
|
|
@@ -1760,7 +1763,10 @@ var CliAdapterProfile = class extends CliAdapterLifecycle {
|
|
|
1760
1763
|
references,
|
|
1761
1764
|
files: plan.files.filter((file) => file.source === "user" && file.root !== "agent")
|
|
1762
1765
|
});
|
|
1763
|
-
const exposed = this.referencesSharedFileSecrets ?
|
|
1766
|
+
const exposed = workspacePlanSecretCount(this.referencesSharedFileSecrets ? {
|
|
1767
|
+
...plan,
|
|
1768
|
+
files: []
|
|
1769
|
+
} : plan);
|
|
1764
1770
|
if (exposed > 0) this.logger.warn("profile_secret_exposed_shared_launch", {
|
|
1765
1771
|
harness: plan.harness,
|
|
1766
1772
|
secretSlots: exposed
|
|
@@ -3451,7 +3457,8 @@ var CliProviderAdapterBase = class extends CliAdapterMcp {
|
|
|
3451
3457
|
sessionContract,
|
|
3452
3458
|
timeoutMs,
|
|
3453
3459
|
mintedSessionId,
|
|
3454
|
-
execArgs
|
|
3460
|
+
execArgs,
|
|
3461
|
+
profilePlan
|
|
3455
3462
|
};
|
|
3456
3463
|
}
|
|
3457
3464
|
/** Reserve and announce the native session id a pre-minted harness already has. */
|
|
@@ -3487,7 +3494,8 @@ var CliProviderAdapterBase = class extends CliAdapterMcp {
|
|
|
3487
3494
|
env,
|
|
3488
3495
|
signal: executionSignal,
|
|
3489
3496
|
timeoutMs: launch.timeoutMs,
|
|
3490
|
-
parser: parserConfig
|
|
3497
|
+
parser: parserConfig,
|
|
3498
|
+
profilePlan: launch.profilePlan
|
|
3491
3499
|
});
|
|
3492
3500
|
const cliProcess = spawnedProcess instanceof Promise ? await spawnedProcess : spawnedProcess;
|
|
3493
3501
|
this.activeProcesses.add(cliProcess);
|
|
@@ -4865,6 +4873,34 @@ turnsRuntime[turnsKey] = sessionTurns;
|
|
|
4865
4873
|
function secretSessionTurnQueue(view) {
|
|
4866
4874
|
return joinQueue(sessionTurns, view);
|
|
4867
4875
|
}
|
|
4876
|
+
/** A shared launch never serves a secret MCP server to an agent on the executor's UID, nor a stdio one without a root sidecar to bridge it. */
|
|
4877
|
+
function sharedSecretMcpRefused(servers, agentUid) {
|
|
4878
|
+
return servers.length > 0 && (!agentUid || servers.some((server) => "command" in server) && process.getuid?.() !== 0);
|
|
4879
|
+
}
|
|
4880
|
+
/** Spawn a turn under its session's MCP lease: the session's turns hold it one at a time, each until its process exits. */
|
|
4881
|
+
async function spawnUnderSecretMcpLease(scope, signal, lease, spawn) {
|
|
4882
|
+
const queue = secretSessionTurnQueue(scope);
|
|
4883
|
+
let release;
|
|
4884
|
+
const done = async () => {
|
|
4885
|
+
try {
|
|
4886
|
+
await release?.();
|
|
4887
|
+
queue.release();
|
|
4888
|
+
} catch (error) {
|
|
4889
|
+
queue.retryCleanup(done);
|
|
4890
|
+
throw error;
|
|
4891
|
+
}
|
|
4892
|
+
};
|
|
4893
|
+
try {
|
|
4894
|
+
await untilSettledOrAborted(queue.previous, signal);
|
|
4895
|
+
release = await lease();
|
|
4896
|
+
const turn = await spawn();
|
|
4897
|
+
turn.exitPromise = turn.exitPromise.finally(done);
|
|
4898
|
+
return turn;
|
|
4899
|
+
} catch (error) {
|
|
4900
|
+
await done();
|
|
4901
|
+
throw error;
|
|
4902
|
+
}
|
|
4903
|
+
}
|
|
4868
4904
|
/** An HTTP URL on loopback with an explicit port and no URL credentials. */
|
|
4869
4905
|
function isLoopbackEndpoint(value) {
|
|
4870
4906
|
if (typeof value !== "string") return false;
|
|
@@ -4906,6 +4942,6 @@ async function forgetSessionScopes(target) {
|
|
|
4906
4942
|
}
|
|
4907
4943
|
}
|
|
4908
4944
|
//#endregion
|
|
4909
|
-
export {
|
|
4945
|
+
export { createExecutionState as $, refuseSecretLaunch as A, MANAGED_QUOTE_VERSION_HEADER as At, DEFAULT_INTERACTION_MCP_SERVER_NAME as B, toolResultEvents as Bt, spawnUnderSecretMcpLease as C, failureAfterCleanup as Ct, assertSealedNativeHome as D, EXECUTION_CORRELATION_HEADERS as Dt, SEALED_NATIVE_HOME_LAYOUT as E, runtimeSecretsOverlay as Et, resolveRouterModelReasoningEfforts as F, reasoningEvents as Ft, plaintextResponseParser as G, acpContentText as Gt, brokerInteractionTools$1 as H, trackReasoningBlock as Ht, kimiThinkingArgs as I, sessionObservedEvents as It, parseCliUsageLine as J, AcpProviderAdapterBase as K, assertAcpTurnFinished as Kt, nativeEffortArgs as L, streamPartBase as Lt, ROUTER_MODEL_CATALOG_TIMEOUT_MS as M, homeXdgEnv as Mt, findRouterCatalogEntry as N, mapAcpSessionUpdate as Nt, isTrustedStoreBinary as O, EXECUTION_ID_HEADER as Ot, resolveRouterModelLimits as P, finalTextEvent as Pt, createRepeatedToolFailureGuard as Q, McpInteractionSupport as R, textDeltaEvents as Rt, sharedSecretMcpRefused as S, SessionRehydrationError as St, NATIVE_SESSION_CONTRACTS$1 as T, wasNeverLaunched as Tt, interactionMcpToolName as U, ACP_MIN_PROTOCOL_VERSION as Ut, InteractionMcpServer$1 as V, toolStartEvents as Vt, jsonEventParser as W, ACP_PROTOCOL_VERSION as Wt, recordCliTokenUsage as X, readCliTokenUsage as Y, CliProviderAdapterBase as Z, requireRecord as _, deriveFilePart as _t, SECRET_REFERENCE$1 as a, readEphemeralContext as at, servableMcpServer as b, trackFilePart as bt, forgetSessionScopes as c, withEphemeralContext as ct, assertSealedNativeSearchPath as d, MAX_TOTAL_INLINE_IMAGE_BYTES as dt, isLocalMcpConfig as et, directStdioMcpServers as f, PROMPT_SECTION_SEPARATOR as ft, joinQueue as g, buildFileUrl as gt, isPlainRecord as h, prependPromptSection as ht, PERMISSION_DECISION_TIMEOUT_MS as i, interactionToggleEnabled as it, resolveExecutableRealpath as j, executionCorrelationHeaders as jt, provenStoreBinary as k, EXECUTION_TRACE_HEADER as kt, secretMcpScope as l, withTurnInteractions as lt, isLoopbackEndpoint as m, preparePromptInputParts as mt, InteractionBroker$1 as n, localMcpEnv as nt, SECRET_REFERENCE_PREFIX as o, turnEndReason as ot, exposedStdioServer as p, partitionImageAttachments as pt, accumulateCliTokenUsage as q, spawnAcpBridge as qt, InteractionHttpBridge as r, enabledInteractionKinds as rt, codexDeveloperInstructionArgs as s, turnInteractionEnabled as st, CODEX_DISABLED_FEATURE_ARGS as t, localMcpArgv as tt, SHARED_WORKSPACE_DIR_ENV as u, MAX_INLINE_IMAGE_BYTES as ut, resolveReferences as v, deterministicFilePartId as vt, untilSettledOrAborted as w, rejectNotLaunched as wt, servableStdioServer as x, InvalidAttachmentError as xt, secretSessionTurnQueue as y, inferMediaType as yt, TerminalPlanSupport as z, textSnapshotEvents as zt };
|
|
4910
4946
|
|
|
4911
|
-
//# sourceMappingURL=src-
|
|
4947
|
+
//# sourceMappingURL=src-CHtyVoNN.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sdk-provider-cli-base",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.107",
|
|
4
4
|
"description": "Base adapter for CLI-based AI agent providers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"registry": "https://registry.npmjs.org"
|
|
80
80
|
},
|
|
81
81
|
"tangleRelease": {
|
|
82
|
-
"sourceSha": "
|
|
83
|
-
"mergedAt": "2026-11-
|
|
82
|
+
"sourceSha": "030aa2ef36fc993a5256efe975418fb3e7bac4f3",
|
|
83
|
+
"mergedAt": "2026-11-16T19:25:32-08:00"
|
|
84
84
|
},
|
|
85
85
|
"scripts": {
|
|
86
86
|
"build": "tsdown",
|