@tangle-network/sdk-provider-cli-base 0.13.19 → 0.13.20
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/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/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-BpO3fvbf.d.mts → index-D-Q-mvnc.d.mts} +26 -10
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{src-Fn8Pu1xq.mjs → src-DVjhkeiC.mjs} +82 -25
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Mt as CliExecArgs, Pt as CliProviderConfig, Rt as ExecutionState, ht as CliProviderAdapterBase } from "../../index-
|
|
1
|
+
import { Mt as CliExecArgs, Pt as CliProviderConfig, Rt as ExecutionState, ht as CliProviderAdapterBase } from "../../index-D-Q-mvnc.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 { At as
|
|
1
|
+
import { At as toolResultEvents, Et as sessionObservedEvents, H as recordCliTokenUsage, I as jsonEventParser, J as localMcpEnv, Ot as textDeltaEvents, Tt as reasoningEvents, U as CliProviderAdapterBase, jt as toolStartEvents, q as localMcpArgv } from "../../src-DVjhkeiC.mjs";
|
|
2
2
|
//#region src/adapters/amp/types.ts
|
|
3
3
|
/**
|
|
4
4
|
* Type guard for AMP events.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Mt as CliExecArgs, Pt as CliProviderConfig, Rt as ExecutionState, ht as CliProviderAdapterBase } from "../../index-
|
|
1
|
+
import { Mt as CliExecArgs, Pt as CliProviderConfig, Rt as ExecutionState, ht as CliProviderAdapterBase } from "../../index-D-Q-mvnc.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 { A as McpInteractionSupport, At as toolResultEvents, Dt as streamPartBase, Et as sessionObservedEvents, H as recordCliTokenUsage, I as jsonEventParser, J as localMcpEnv, K as isLocalMcpConfig, Ot as textDeltaEvents, Tt as reasoningEvents, U as CliProviderAdapterBase, Y as enabledInteractionKinds, jt as toolStartEvents, q as localMcpArgv, tt as withTurnInteractions } from "../../src-DVjhkeiC.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 { Mt as CliExecArgs, Pt as CliProviderConfig, Rt as ExecutionState, ht as CliProviderAdapterBase } from "../../index-
|
|
1
|
+
import { Mt as CliExecArgs, Pt as CliProviderConfig, Rt as ExecutionState, ht as CliProviderAdapterBase } from "../../index-D-Q-mvnc.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 { Et as sessionObservedEvents, L as plaintextResponseParser, U as CliProviderAdapterBase, st as prependPromptSection } from "../../src-DVjhkeiC.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 { Mt as CliExecArgs, Pt as CliProviderConfig, Rt as ExecutionState, ht as CliProviderAdapterBase, n as HarnessId } from "../../index-
|
|
1
|
+
import { Mt as CliExecArgs, Pt as CliProviderConfig, Rt as ExecutionState, ht as CliProviderAdapterBase, n as HarnessId } from "../../index-D-Q-mvnc.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 { Et as sessionObservedEvents, H as recordCliTokenUsage, J as localMcpEnv, K as isLocalMcpConfig, L as plaintextResponseParser, U as CliProviderAdapterBase, at as partitionImageAttachments, q as localMcpArgv, st as prependPromptSection } from "../../src-DVjhkeiC.mjs";
|
|
2
2
|
import { resolveTangleRouterDefaults } from "@tangle-network/agent-interface";
|
|
3
3
|
import { lchown, mkdir, writeFile } from "node:fs/promises";
|
|
4
4
|
import { dirname, join } from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Mt as CliExecArgs, Pt as CliProviderConfig, Rt as ExecutionState, ht as CliProviderAdapterBase, n as HarnessId } from "../../index-
|
|
1
|
+
import { Mt as CliExecArgs, Pt as CliProviderConfig, Rt as ExecutionState, ht as CliProviderAdapterBase, n as HarnessId } from "../../index-D-Q-mvnc.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 { B as parseCliUsageLine, Et as sessionObservedEvents, H as recordCliTokenUsage, L as plaintextResponseParser, U as CliProviderAdapterBase, st as prependPromptSection } from "../../src-DVjhkeiC.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 { Mt as CliExecArgs, Pt as CliProviderConfig, Rt as ExecutionState, ht as CliProviderAdapterBase, n as HarnessId, o as WorkspacePlanApplication } from "../../index-
|
|
1
|
+
import { Mt as CliExecArgs, Pt as CliProviderConfig, Rt as ExecutionState, ht as CliProviderAdapterBase, n as HarnessId, o as WorkspacePlanApplication } from "../../index-D-Q-mvnc.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 { Et as sessionObservedEvents, H as recordCliTokenUsage, S as nativeEffortArgs, U as CliProviderAdapterBase, st as prependPromptSection, wt as finalTextEvent } from "../../src-DVjhkeiC.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 { At as AcpTurn, Ct as AcpBridgeConfig,
|
|
1
|
+
import { At as AcpTurn, Ct as AcpBridgeConfig, mn as AcpProcessSpec, mt as AcpProviderAdapterBase, pn as AcpBridgeSpawn, wt as AcpContentBlock } from "../../index-D-Q-mvnc.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 { It as spawnAcpBridge, R as AcpProviderAdapterBase, st as prependPromptSection } from "../../src-DVjhkeiC.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";
|
|
@@ -3,7 +3,7 @@ import { AskUserBridge, DEFAULT_INTERACTION_DECISION_TIMEOUT_MS as PERMISSION_DE
|
|
|
3
3
|
import * as _$_tangle_network_agent_profile_materialize0 from "@tangle-network/agent-profile-materialize";
|
|
4
4
|
import { BindableLaunchControl, CODEX_DISABLED_FEATURE_ARGS, HarnessId, HarnessId as HarnessId$1, WorkspacePlan, WorkspacePlanApplication, WorkspacePlanApplication as WorkspacePlanApplication$1, WorkspacePlanReceipt, codexDeveloperInstructionArgs } from "@tangle-network/agent-profile-materialize";
|
|
5
5
|
import { CliExecResult, CliExitResult, CliLauncher, CliProcess, CliSpawnConfig, InvalidAttachmentError, JsonRpcError, RpcBridge, StreamParserConfig } from "@tangle-network/sdk-cli-runner";
|
|
6
|
-
import { AgentExecutionInput, AgentExecutionOutcome, AgentExecutionResult, AgentProfile, AgentProfileSecretProvider, AgentRuntimeAttachments, BackendCapabilities, BackendMessage, CliAuthFile, DurablePlan, GetMessagesOptions, HarnessType, InputPart, InteractionExecutionBinding, InteractionResponse, LocalMcpConfig, McpConfig, McpStatusResponse, PlanProviderState, ProviderConfig, ReasoningEffort, RequestedInteractions, SdkHostServices, SdkPlanHost, SdkProviderAdapter, StreamEvent, TokenUsage, ToolPart } from "@tangle-network/agent-interface";
|
|
6
|
+
import { AgentExecutionInput, AgentExecutionOutcome, AgentExecutionResult, AgentProfile, AgentProfileSecretProvider, AgentRuntimeAttachments, BackendCapabilities, BackendMessage, CliAuthFile, DurablePlan, GetMessagesOptions, HarnessType, InputPart, InteractionExecutionBinding, InteractionResponse, LocalMcpConfig, McpConfig, McpStatusResponse, PlanProviderState, ProviderConfig, ProxySecretReceipt, ReasoningEffort, RequestedInteractions, SdkHostServices, SdkPlanHost, SdkProviderAdapter, StreamEvent, TokenUsage, ToolPart } from "@tangle-network/agent-interface";
|
|
7
7
|
import { HarnessSessionContract } from "@tangle-network/cli-agent-registry/session-contract";
|
|
8
8
|
import * as _$_tangle_network_sdk_session_persistence0 from "@tangle-network/sdk-session-persistence";
|
|
9
9
|
import { MessagePart, MessageStore, PersistedMessage, PersistedSession, SessionStore, readProviderMessageIds } from "@tangle-network/sdk-session-persistence";
|
|
@@ -39,16 +39,23 @@ declare function spawnAcpBridge(request: AcpBridgeSpawn): RpcBridge;
|
|
|
39
39
|
declare const SECRET_REFERENCE_PREFIX = "TANGLE_PROFILE_SECRET_";
|
|
40
40
|
declare const SECRET_REFERENCE: RegExp;
|
|
41
41
|
declare function requireRecord(raw: unknown, message: string): Record<string, unknown>;
|
|
42
|
+
type SecretProfileMcpStdio<Value = string> = {
|
|
43
|
+
name: string;
|
|
44
|
+
command: readonly string[];
|
|
45
|
+
environment: Readonly<Record<string, Value>>;
|
|
46
|
+
};
|
|
42
47
|
/** One MCP server the executor serves for a secret launch. */
|
|
43
48
|
type SecretProfileMcpServer = {
|
|
44
49
|
name: string; /** The server's own upstream URL. */
|
|
45
50
|
url: string; /** Every header the upstream needs, credentials included. */
|
|
46
51
|
headers: Readonly<Record<string, string>>;
|
|
47
|
-
} | {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
environment: Readonly<Record<string, string>>; /** Every secret value its environment references, whatever its length. */
|
|
52
|
+
} | (SecretProfileMcpStdio & {
|
|
53
|
+
/** The executor serves this command unless its lease supplies an acknowledged direct projection. */
|
|
54
|
+
/** Every secret value its environment references, whatever its length. */
|
|
51
55
|
secrets: readonly string[];
|
|
56
|
+
});
|
|
57
|
+
type SecretProfileMcpLease = (() => void | Promise<void>) & {
|
|
58
|
+
/** Only the accepted executor may supply this after exact Host installation ACK. */readonly directStdio?: readonly SecretProfileMcpStdio[];
|
|
52
59
|
};
|
|
53
60
|
/** The executor's loopback proxy for a secret launch's MCP servers. */
|
|
54
61
|
type SecretProfileMcpCredentialProxy = {
|
|
@@ -56,19 +63,25 @@ type SecretProfileMcpCredentialProxy = {
|
|
|
56
63
|
placeholder: string;
|
|
57
64
|
urls: Readonly<Record<string, string>>;
|
|
58
65
|
}>; /** Serve `servers` before resolving; release acknowledges lease termination before the turn settles or its scope is reused. */
|
|
59
|
-
lease(scope: string, servers: ReadonlyArray<SecretProfileMcpServer
|
|
66
|
+
lease(scope: string, servers: ReadonlyArray<SecretProfileMcpServer>, input?: AgentExecutionInput): Promise<SecretProfileMcpLease>; /** The scope's session ended: its placeholder is refused from now on and its stdio servers are stopped. */
|
|
60
67
|
forget(scope: string): Promise<void>;
|
|
61
68
|
};
|
|
69
|
+
/** Snapshot the executor's projection; it may only replace an admitted stdio launch. */
|
|
70
|
+
declare function directStdioMcpServers(lease: SecretProfileMcpLease | undefined, servers: readonly (SecretProfileMcpStdio<unknown> | {
|
|
71
|
+
name: string;
|
|
72
|
+
url: string;
|
|
73
|
+
})[]): ReadonlyMap<string, SecretProfileMcpStdio>;
|
|
62
74
|
/** A config value with its secret references resolved, or undefined. */
|
|
63
|
-
declare function resolveReferences(value: string, references: Readonly<Record<string, string
|
|
75
|
+
declare function resolveReferences(value: string, references: Readonly<Record<string, string>>, secrets?: Set<string>): string | undefined;
|
|
64
76
|
/** A stdio server the executor can run: its command and its environment with every secret reference resolved. */
|
|
65
77
|
declare function servableStdioServer(name: string, entry: Record<string, unknown>, references: Readonly<Record<string, string>>): SecretProfileMcpServer | string;
|
|
66
78
|
/** A remote server the executor can serve: its fixed upstream URL and every header with its secret references resolved. */
|
|
67
79
|
declare function servableMcpServer(name: string, entry: Record<string, unknown>, references: Readonly<Record<string, string>>): SecretProfileMcpServer | string;
|
|
68
|
-
/**
|
|
80
|
+
/** Earlier physical cleanup must succeed before another holder is admitted. */
|
|
69
81
|
declare function joinQueue(queues: Map<string, Promise<void>>, key: string): {
|
|
70
82
|
previous: Promise<void>;
|
|
71
83
|
release: () => void;
|
|
84
|
+
retryCleanup(retry: () => Promise<void>): void;
|
|
72
85
|
};
|
|
73
86
|
declare function untilSettledOrAborted(previous: Promise<void>, signal: AbortSignal): Promise<void>;
|
|
74
87
|
/** Every native discovery ancestor is sealed and free of ambient configuration. */
|
|
@@ -76,6 +89,7 @@ declare function assertSealedNativeSearchPath(cwd: string, configNames: readonly
|
|
|
76
89
|
declare function secretSessionTurnQueue(view: string): {
|
|
77
90
|
previous: Promise<void>;
|
|
78
91
|
release: () => void;
|
|
92
|
+
retryCleanup(retry: () => Promise<void>): void;
|
|
79
93
|
};
|
|
80
94
|
/** An HTTP URL on loopback with an explicit port and no URL credentials. */
|
|
81
95
|
declare function isLoopbackEndpoint(value: unknown): boolean;
|
|
@@ -108,6 +122,8 @@ interface CliProviderLogger {
|
|
|
108
122
|
error(message: string, meta?: Record<string, unknown>): void;
|
|
109
123
|
}
|
|
110
124
|
interface CliProviderConfig {
|
|
125
|
+
/** Trusted executor metadata binds a native credential generation to its revision. */
|
|
126
|
+
proxySecretReceipt?: ProxySecretReceipt;
|
|
111
127
|
/** Trusted native auth projection resolved by the owning execution host. */
|
|
112
128
|
nativeAuthEnv?: Record<string, string>;
|
|
113
129
|
nativeAuthSecretEnv?: string;
|
|
@@ -1250,5 +1266,5 @@ declare function homeXdgEnv(home: string): {
|
|
|
1250
1266
|
XDG_STATE_HOME: string;
|
|
1251
1267
|
};
|
|
1252
1268
|
//#endregion
|
|
1253
|
-
export { deterministicFilePartId as $, SecretProfileMcpCredentialProxy as $t, isTrustedStoreBinary as A, AcpTurn as At, localMcpEnv as B, InteractionToggleKind as Bt, createRepeatedToolFailureGuard as C, AcpBridgeConfig as Ct, NATIVE_SESSION_CONTRACTS$1 as D, AcpNewSessionResult as Dt, nativeEffortArgs as E, AcpInitializeResult as Et, parseCliUsageLine as F, CliProviderLogger as Ft, InteractionMcpServerConfig$1 as G, interactionToggleEnabled as Gt, AskUserBridge as H, ToolCallState as Ht, readCliTokenUsage as I, CliProviderOptions as It, RequestPlanBridge as J, turnInteractionEnabled as Jt, PermissionPromptBridge as K, readEphemeralContext as Kt, recordCliTokenUsage as L, EphemeralContextInput as Lt, refuseSecretLaunch as M, CliExecArgs as Mt, resolveExecutableRealpath as N, CliExecutionInput as Nt, SEALED_NATIVE_HOME_LAYOUT as O, AcpPromptResult as Ot, accumulateCliTokenUsage as P, CliProviderConfig as Pt, deriveFilePart as Q, SECRET_REFERENCE_PREFIX as Qt, isLocalMcpConfig as R, ExecutionState as Rt, RepeatedToolFailureGuardOptions as S, ACP_PROTOCOL_VERSION as St, kimiThinkingArgs as T, AcpInitializeParams as Tt, DEFAULT_INTERACTION_MCP_SERVER_NAME as U, TurnEndReason as Ut, McpInteractionSupport as V, PerTurnInteractionInput as Vt, InteractionMcpServer$1 as W, enabledInteractionKinds as Wt, interactionMcpToolName as X, withTurnInteractions as Xt, brokerInteractionTools$1 as Y, withEphemeralContext as Yt, buildFileUrl as Z, SECRET_REFERENCE as Zt, toolResultEvents as _, createExecutionState as _t, PERMISSION_DECISION_TIMEOUT_MS as a,
|
|
1254
|
-
//# sourceMappingURL=index-
|
|
1269
|
+
export { deterministicFilePartId as $, SecretProfileMcpCredentialProxy as $t, isTrustedStoreBinary as A, AcpTurn as At, localMcpEnv as B, InteractionToggleKind as Bt, createRepeatedToolFailureGuard as C, AcpBridgeConfig as Ct, NATIVE_SESSION_CONTRACTS$1 as D, AcpNewSessionResult as Dt, nativeEffortArgs as E, AcpInitializeResult as Et, parseCliUsageLine as F, CliProviderLogger as Ft, InteractionMcpServerConfig$1 as G, interactionToggleEnabled as Gt, AskUserBridge as H, ToolCallState as Ht, readCliTokenUsage as I, CliProviderOptions as It, RequestPlanBridge as J, turnInteractionEnabled as Jt, PermissionPromptBridge as K, readEphemeralContext as Kt, recordCliTokenUsage as L, EphemeralContextInput as Lt, refuseSecretLaunch as M, CliExecArgs as Mt, resolveExecutableRealpath as N, CliExecutionInput as Nt, SEALED_NATIVE_HOME_LAYOUT as O, AcpPromptResult as Ot, accumulateCliTokenUsage as P, CliProviderConfig as Pt, deriveFilePart as Q, SECRET_REFERENCE_PREFIX as Qt, isLocalMcpConfig as R, ExecutionState as Rt, RepeatedToolFailureGuardOptions as S, ACP_PROTOCOL_VERSION as St, kimiThinkingArgs as T, AcpInitializeParams as Tt, DEFAULT_INTERACTION_MCP_SERVER_NAME as U, TurnEndReason as Ut, McpInteractionSupport as V, PerTurnInteractionInput as Vt, InteractionMcpServer$1 as W, enabledInteractionKinds as Wt, interactionMcpToolName as X, withTurnInteractions as Xt, brokerInteractionTools$1 as Y, withEphemeralContext as Yt, buildFileUrl as Z, SECRET_REFERENCE as Zt, toolResultEvents as _, createExecutionState as _t, PERMISSION_DECISION_TIMEOUT_MS as a, isPlainRecord as an, MANAGED_QUOTE_VERSION_HEADER as at, secretMcpScope as b, PreparedCliLaunch as bt, homeXdgEnv as c, resolveReferences as cn, jsonEventParser as ct, finalTextEvent as d, servableStdioServer as dn, SessionRehydrationError as dt, SecretProfileMcpLease as en, inferMediaType as et, reasoningEvents as f, untilSettledOrAborted as fn, rejectNotLaunched as ft, textSnapshotEvents as g, runtimeSecretsOverlay as gt, textDeltaEvents as h, spawnAcpBridge as hn, CliProviderAdapterBase as ht, InteractionHttpBridge as i, isLoopbackEndpoint as in, EXECUTION_TRACE_HEADER as it, provenStoreBinary as j, acpContentText as jt, assertSealedNativeHome as k, AcpSessionUpdateParams as kt, TerminalPlanSupport as l, secretSessionTurnQueue as ln, plaintextResponseParser as lt, streamPartBase as m, AcpProcessSpec as mn, AcpProviderAdapterBase as mt, HarnessId$1 as n, assertSealedNativeSearchPath as nn, EXECUTION_CORRELATION_HEADERS as nt, WorkspacePlanApplication$1 as o, joinQueue as on, executionCorrelationHeaders as ot, sessionObservedEvents as p, AcpBridgeSpawn as pn, wasNeverLaunched as pt, RequestPermissionBridge as q, turnEndReason as qt, InteractionBroker$1 as r, directStdioMcpServers as rn, EXECUTION_ID_HEADER as rt, codexDeveloperInstructionArgs as s, requireRecord as sn, PlaintextResponse as st, CODEX_DISABLED_FEATURE_ARGS as t, SecretProfileMcpServer as tn, trackFilePart as tt, TerminalPlanSupportOptions as u, servableMcpServer as un, InvalidAttachmentError as ut, toolStartEvents as v, CliTurnProcess as vt, trackReasoningBlock as w, AcpContentBlock as wt, RepeatedToolFailure as x, ACP_MIN_PROTOCOL_VERSION as xt, forgetSessionScopes as y, CliTurnSpawn as yt, localMcpArgv as z, InteractionToggleConfig as zt };
|
|
1270
|
+
//# sourceMappingURL=index-D-Q-mvnc.d.mts.map
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as deterministicFilePartId, $t as SecretProfileMcpCredentialProxy, A as isTrustedStoreBinary, At as AcpTurn, B as localMcpEnv, Bt as InteractionToggleKind, C as createRepeatedToolFailureGuard, Ct as AcpBridgeConfig, D as NATIVE_SESSION_CONTRACTS, Dt as AcpNewSessionResult, E as nativeEffortArgs, Et as AcpInitializeResult, F as parseCliUsageLine, Ft as CliProviderLogger, G as InteractionMcpServerConfig, Gt as interactionToggleEnabled, H as AskUserBridge, Ht as ToolCallState, I as readCliTokenUsage, It as CliProviderOptions, J as RequestPlanBridge, Jt as turnInteractionEnabled, K as PermissionPromptBridge, Kt as readEphemeralContext, L as recordCliTokenUsage, Lt as EphemeralContextInput, M as refuseSecretLaunch, Mt as CliExecArgs, N as resolveExecutableRealpath, Nt as CliExecutionInput, O as SEALED_NATIVE_HOME_LAYOUT, Ot as AcpPromptResult, P as accumulateCliTokenUsage, Pt as CliProviderConfig, Q as deriveFilePart, Qt as SECRET_REFERENCE_PREFIX, R as isLocalMcpConfig, Rt as ExecutionState, S as RepeatedToolFailureGuardOptions, St as ACP_PROTOCOL_VERSION, T as kimiThinkingArgs, Tt as AcpInitializeParams, U as DEFAULT_INTERACTION_MCP_SERVER_NAME, Ut as TurnEndReason, V as McpInteractionSupport, Vt as PerTurnInteractionInput, W as InteractionMcpServer, Wt as enabledInteractionKinds, X as interactionMcpToolName, Xt as withTurnInteractions, Y as brokerInteractionTools, Yt as withEphemeralContext, Z as buildFileUrl, Zt as SECRET_REFERENCE, _ as toolResultEvents, _t as createExecutionState, a as PERMISSION_DECISION_TIMEOUT_MS, an as
|
|
1
|
+
import { $ as deterministicFilePartId, $t as SecretProfileMcpCredentialProxy, A as isTrustedStoreBinary, At as AcpTurn, B as localMcpEnv, Bt as InteractionToggleKind, C as createRepeatedToolFailureGuard, Ct as AcpBridgeConfig, D as NATIVE_SESSION_CONTRACTS, Dt as AcpNewSessionResult, E as nativeEffortArgs, Et as AcpInitializeResult, F as parseCliUsageLine, Ft as CliProviderLogger, G as InteractionMcpServerConfig, Gt as interactionToggleEnabled, H as AskUserBridge, Ht as ToolCallState, I as readCliTokenUsage, It as CliProviderOptions, J as RequestPlanBridge, Jt as turnInteractionEnabled, K as PermissionPromptBridge, Kt as readEphemeralContext, L as recordCliTokenUsage, Lt as EphemeralContextInput, M as refuseSecretLaunch, Mt as CliExecArgs, N as resolveExecutableRealpath, Nt as CliExecutionInput, O as SEALED_NATIVE_HOME_LAYOUT, Ot as AcpPromptResult, P as accumulateCliTokenUsage, Pt as CliProviderConfig, Q as deriveFilePart, Qt as SECRET_REFERENCE_PREFIX, R as isLocalMcpConfig, Rt as ExecutionState, S as RepeatedToolFailureGuardOptions, St as ACP_PROTOCOL_VERSION, T as kimiThinkingArgs, Tt as AcpInitializeParams, U as DEFAULT_INTERACTION_MCP_SERVER_NAME, Ut as TurnEndReason, V as McpInteractionSupport, Vt as PerTurnInteractionInput, W as InteractionMcpServer, Wt as enabledInteractionKinds, X as interactionMcpToolName, Xt as withTurnInteractions, Y as brokerInteractionTools, Yt as withEphemeralContext, Z as buildFileUrl, Zt as SECRET_REFERENCE, _ as toolResultEvents, _t as createExecutionState, a as PERMISSION_DECISION_TIMEOUT_MS, an as isPlainRecord, at as MANAGED_QUOTE_VERSION_HEADER, b as secretMcpScope, bt as PreparedCliLaunch, c as homeXdgEnv, cn as resolveReferences, ct as jsonEventParser, d as finalTextEvent, dn as servableStdioServer, dt as SessionRehydrationError, en as SecretProfileMcpLease, et as inferMediaType, f as reasoningEvents, fn as untilSettledOrAborted, ft as rejectNotLaunched, g as textSnapshotEvents, gt as runtimeSecretsOverlay, h as textDeltaEvents, hn as spawnAcpBridge, ht as CliProviderAdapterBase, i as InteractionHttpBridge, in as isLoopbackEndpoint, it as EXECUTION_TRACE_HEADER, j as provenStoreBinary, jt as acpContentText, k as assertSealedNativeHome, kt as AcpSessionUpdateParams, l as TerminalPlanSupport, ln as secretSessionTurnQueue, lt as plaintextResponseParser, m as streamPartBase, mn as AcpProcessSpec, mt as AcpProviderAdapterBase, n as HarnessId, nn as assertSealedNativeSearchPath, nt as EXECUTION_CORRELATION_HEADERS, o as WorkspacePlanApplication, on as joinQueue, ot as executionCorrelationHeaders, p as sessionObservedEvents, pn as AcpBridgeSpawn, pt as wasNeverLaunched, q as RequestPermissionBridge, qt as turnEndReason, r as InteractionBroker, rn as directStdioMcpServers, rt as EXECUTION_ID_HEADER, s as codexDeveloperInstructionArgs, sn as requireRecord, st as PlaintextResponse, t as CODEX_DISABLED_FEATURE_ARGS, tn as SecretProfileMcpServer, tt as trackFilePart, u as TerminalPlanSupportOptions, un as servableMcpServer, ut as InvalidAttachmentError, v as toolStartEvents, vt as CliTurnProcess, w as trackReasoningBlock, wt as AcpContentBlock, x as RepeatedToolFailure, xt as ACP_MIN_PROTOCOL_VERSION, y as forgetSessionScopes, yt as CliTurnSpawn, z as localMcpArgv, zt as InteractionToggleConfig } from "./index-D-Q-mvnc.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, RepeatedToolFailure, RepeatedToolFailureGuardOptions, RequestPermissionBridge, RequestPlanBridge, SEALED_NATIVE_HOME_LAYOUT, SECRET_REFERENCE, SECRET_REFERENCE_PREFIX, SecretProfileMcpCredentialProxy, SecretProfileMcpServer, SessionRehydrationError, TerminalPlanSupport, TerminalPlanSupportOptions, ToolCallState, TurnEndReason, WorkspacePlanApplication, accumulateCliTokenUsage, acpContentText, assertSealedNativeHome, assertSealedNativeSearchPath, brokerInteractionTools, buildFileUrl, codexDeveloperInstructionArgs, createExecutionState, createRepeatedToolFailureGuard, deriveFilePart, deterministicFilePartId, enabledInteractionKinds, executionCorrelationHeaders, finalTextEvent, forgetSessionScopes, homeXdgEnv, inferMediaType, interactionMcpToolName, interactionToggleEnabled, isLocalMcpConfig, isLoopbackEndpoint, isPlainRecord, isTrustedStoreBinary, joinQueue, jsonEventParser, kimiThinkingArgs, localMcpArgv, localMcpEnv, nativeEffortArgs, parseCliUsageLine, partitionImageAttachments, plaintextResponseParser, preparePromptInputParts, prependPromptSection, provenStoreBinary, readCliTokenUsage, readEphemeralContext, reasoningEvents, recordCliTokenUsage, refuseSecretLaunch, rejectNotLaunched, requireRecord, resolveExecutableRealpath, resolveReferences, 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, RepeatedToolFailure, RepeatedToolFailureGuardOptions, RequestPermissionBridge, RequestPlanBridge, SEALED_NATIVE_HOME_LAYOUT, SECRET_REFERENCE, SECRET_REFERENCE_PREFIX, SecretProfileMcpCredentialProxy, SecretProfileMcpLease, SecretProfileMcpServer, SessionRehydrationError, TerminalPlanSupport, TerminalPlanSupportOptions, ToolCallState, TurnEndReason, WorkspacePlanApplication, accumulateCliTokenUsage, acpContentText, assertSealedNativeHome, assertSealedNativeSearchPath, brokerInteractionTools, buildFileUrl, codexDeveloperInstructionArgs, createExecutionState, createRepeatedToolFailureGuard, deriveFilePart, deterministicFilePartId, directStdioMcpServers, enabledInteractionKinds, executionCorrelationHeaders, finalTextEvent, forgetSessionScopes, homeXdgEnv, inferMediaType, interactionMcpToolName, interactionToggleEnabled, isLocalMcpConfig, isLoopbackEndpoint, isPlainRecord, isTrustedStoreBinary, joinQueue, jsonEventParser, kimiThinkingArgs, localMcpArgv, localMcpEnv, nativeEffortArgs, parseCliUsageLine, partitionImageAttachments, plaintextResponseParser, preparePromptInputParts, prependPromptSection, provenStoreBinary, readCliTokenUsage, readEphemeralContext, reasoningEvents, recordCliTokenUsage, refuseSecretLaunch, rejectNotLaunched, requireRecord, resolveExecutableRealpath, resolveReferences, runtimeSecretsOverlay, secretMcpScope, secretSessionTurnQueue, servableMcpServer, servableStdioServer, sessionObservedEvents, spawnAcpBridge, 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, SEALED_NATIVE_HOME_LAYOUT, SECRET_REFERENCE, SECRET_REFERENCE_PREFIX, SessionRehydrationError, TerminalPlanSupport, accumulateCliTokenUsage, acpContentText, assertSealedNativeHome, assertSealedNativeSearchPath, brokerInteractionTools, buildFileUrl, codexDeveloperInstructionArgs, createExecutionState, createRepeatedToolFailureGuard, deriveFilePart, deterministicFilePartId, enabledInteractionKinds, executionCorrelationHeaders, finalTextEvent, forgetSessionScopes, homeXdgEnv, inferMediaType, interactionMcpToolName, interactionToggleEnabled, isLocalMcpConfig, isLoopbackEndpoint, isPlainRecord, isTrustedStoreBinary, joinQueue, jsonEventParser, kimiThinkingArgs, localMcpArgv, localMcpEnv, nativeEffortArgs, parseCliUsageLine, partitionImageAttachments, plaintextResponseParser, preparePromptInputParts, prependPromptSection, provenStoreBinary, readCliTokenUsage, readEphemeralContext, reasoningEvents, recordCliTokenUsage, refuseSecretLaunch, rejectNotLaunched, requireRecord, resolveExecutableRealpath, resolveReferences, runtimeSecretsOverlay, secretMcpScope, secretSessionTurnQueue, servableMcpServer, servableStdioServer, sessionObservedEvents, spawnAcpBridge, streamPartBase, textDeltaEvents, textSnapshotEvents, toolResultEvents, toolStartEvents, trackFilePart, trackReasoningBlock, turnEndReason, turnInteractionEnabled, untilSettledOrAborted, wasNeverLaunched, withEphemeralContext, withTurnInteractions };
|
|
1
|
+
import { $ as turnInteractionEnabled, A as McpInteractionSupport, At as toolResultEvents, B as parseCliUsageLine, C as NATIVE_SESSION_CONTRACTS, Ct as homeXdgEnv, D as provenStoreBinary, Dt as streamPartBase, E as isTrustedStoreBinary, Et as sessionObservedEvents, F as interactionMcpToolName, Ft as acpContentText, G as createExecutionState, H as recordCliTokenUsage, I as jsonEventParser, It as spawnAcpBridge, J as localMcpEnv, K as isLocalMcpConfig, L as plaintextResponseParser, M as DEFAULT_INTERACTION_MCP_SERVER_NAME, Mt as trackReasoningBlock, N as InteractionMcpServer, Nt as ACP_MIN_PROTOCOL_VERSION, O as refuseSecretLaunch, Ot as textDeltaEvents, P as brokerInteractionTools, Pt as ACP_PROTOCOL_VERSION, Q as turnEndReason, R as AcpProviderAdapterBase, S as nativeEffortArgs, St as executionCorrelationHeaders, T as assertSealedNativeHome, Tt as reasoningEvents, U as CliProviderAdapterBase, V as readCliTokenUsage, W as createRepeatedToolFailureGuard, X as interactionToggleEnabled, Y as enabledInteractionKinds, Z as readEphemeralContext, _ as secretSessionTurnQueue, _t as runtimeSecretsOverlay, a as codexDeveloperInstructionArgs, at as partitionImageAttachments, b as untilSettledOrAborted, bt as EXECUTION_TRACE_HEADER, c as SECRET_REFERENCE, ct as buildFileUrl, d as directStdioMcpServers, dt as inferMediaType, et as withEphemeralContext, f as isLoopbackEndpoint, ft as trackFilePart, g as resolveReferences, gt as wasNeverLaunched, h as requireRecord, ht as rejectNotLaunched, i as PERMISSION_DECISION_TIMEOUT_MS, it as PROMPT_SECTION_SEPARATOR, j as TerminalPlanSupport, jt as toolStartEvents, k as resolveExecutableRealpath, kt as textSnapshotEvents, l as SECRET_REFERENCE_PREFIX, lt as deriveFilePart, m as joinQueue, mt as SessionRehydrationError, n as InteractionBroker, nt as MAX_INLINE_IMAGE_BYTES, o as forgetSessionScopes, ot as preparePromptInputParts, p as isPlainRecord, pt as InvalidAttachmentError, q as localMcpArgv, r as InteractionHttpBridge, rt as MAX_TOTAL_INLINE_IMAGE_BYTES, s as secretMcpScope, st as prependPromptSection, t as CODEX_DISABLED_FEATURE_ARGS, tt as withTurnInteractions, u as assertSealedNativeSearchPath, ut as deterministicFilePartId, v as servableMcpServer, vt as EXECUTION_CORRELATION_HEADERS, w as SEALED_NATIVE_HOME_LAYOUT, wt as finalTextEvent, x as kimiThinkingArgs, xt as MANAGED_QUOTE_VERSION_HEADER, y as servableStdioServer, yt as EXECUTION_ID_HEADER, z as accumulateCliTokenUsage } from "./src-DVjhkeiC.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, SEALED_NATIVE_HOME_LAYOUT, SECRET_REFERENCE, SECRET_REFERENCE_PREFIX, SessionRehydrationError, TerminalPlanSupport, accumulateCliTokenUsage, acpContentText, assertSealedNativeHome, assertSealedNativeSearchPath, brokerInteractionTools, buildFileUrl, codexDeveloperInstructionArgs, createExecutionState, createRepeatedToolFailureGuard, deriveFilePart, deterministicFilePartId, directStdioMcpServers, enabledInteractionKinds, executionCorrelationHeaders, finalTextEvent, forgetSessionScopes, homeXdgEnv, inferMediaType, interactionMcpToolName, interactionToggleEnabled, isLocalMcpConfig, isLoopbackEndpoint, isPlainRecord, isTrustedStoreBinary, joinQueue, jsonEventParser, kimiThinkingArgs, localMcpArgv, localMcpEnv, nativeEffortArgs, parseCliUsageLine, partitionImageAttachments, plaintextResponseParser, preparePromptInputParts, prependPromptSection, provenStoreBinary, readCliTokenUsage, readEphemeralContext, reasoningEvents, recordCliTokenUsage, refuseSecretLaunch, rejectNotLaunched, requireRecord, resolveExecutableRealpath, resolveReferences, runtimeSecretsOverlay, secretMcpScope, secretSessionTurnQueue, servableMcpServer, servableStdioServer, sessionObservedEvents, spawnAcpBridge, streamPartBase, textDeltaEvents, textSnapshotEvents, toolResultEvents, toolStartEvents, trackFilePart, trackReasoningBlock, turnEndReason, turnInteractionEnabled, untilSettledOrAborted, wasNeverLaunched, withEphemeralContext, withTurnInteractions };
|
|
@@ -2,7 +2,7 @@ import { DEFAULT_INTERACTION_DECISION_TIMEOUT_MS as PERMISSION_DECISION_TIMEOUT_
|
|
|
2
2
|
import { CODEX_DISABLED_FEATURE_ARGS, HARNESS_LAUNCH_MATERIALIZE_OPTIONS, UNAVAILABLE_AGENT_PROFILE_SECRET_PROVIDER, applyWorkspacePlanWithSecretProvider, bindLaunchToolBinDirs, bindSecretSessionView, codexDeveloperInstructionArgs, enforceWorkspacePlanSupport, ensurePublicConcurrentProfileRoots, joinSystemPromptAdditions, keepsHarnessSystemPrompt, materializeProfile, modelIdsMatch, parseSandboxToolBinDirs, preparePublicConcurrentProfileRevision, prepareSecretConcurrentProfileRevision, resolveAgentProfileResources, secretSessionViewWorkspace } from "@tangle-network/agent-profile-materialize";
|
|
3
3
|
import { BridgeClosedError, InvalidAttachmentError, JsonRpcError, RpcRequestTimeoutError, execCli, launchCliProcess, resolveRawCapturePath, spawnCliProcess, spawnRpcBridge } from "@tangle-network/sdk-cli-runner";
|
|
4
4
|
import { createHash, createHmac, randomUUID } from "node:crypto";
|
|
5
|
-
import { AgentExecutionError, AgentExecutionOutcomeSchema, AgentRuntimeAttachmentsSchema, InteractionExecutionBindingSchema, InteractionKind, REASONING_EFFORTS, agentProfileSchema, nativeReasoningControl, normalizeInputParts } from "@tangle-network/agent-interface";
|
|
5
|
+
import { AgentExecutionError, AgentExecutionOutcomeSchema, AgentRuntimeAttachmentsSchema, InteractionExecutionBindingSchema, InteractionKind, ProxySecretReceiptSchema, REASONING_EFFORTS, agentProfileSchema, nativeReasoningControl, normalizeInputParts } from "@tangle-network/agent-interface";
|
|
6
6
|
import { HarnessSessionContractError, assertArgvHonoursSessionContract, assertFlagsHonourSessionContract, assertStoreLocationHonoursSessionContract, compileSessionStoreGlob } from "@tangle-network/cli-agent-registry/session-contract";
|
|
7
7
|
import { MAX_SECRET_PROFILE_REPLAY_CHARS, RESTORED_SESSION_CONTEXT_PREAMBLE, RESTORED_SESSION_CONTEXT_TAG, buildCompleteForkContextBlock, buildForkContextBlock, createMessageStore, createSessionStore, forkSessionWithMessages, readProviderMessageIds } from "@tangle-network/sdk-session-persistence";
|
|
8
8
|
import { mkdir, open, readdir, writeFile } from "node:fs/promises";
|
|
@@ -19,6 +19,7 @@ import { fileURLToPath, pathToFileURL } from "node:url";
|
|
|
19
19
|
import { DatabaseSync } from "node:sqlite";
|
|
20
20
|
import { StringDecoder } from "node:string_decoder";
|
|
21
21
|
import { DEFAULT_INTERACTION_MCP_SERVER_NAME, InteractionMcpServer, interactionMcpToolName } from "@tangle-network/agent-core/interactions/mcp";
|
|
22
|
+
import { addAbortListener } from "node:events";
|
|
22
23
|
import { isRecord, isRecord as isPlainRecord } from "@tangle-network/agent-core";
|
|
23
24
|
//#region src/acp-process-launch.ts
|
|
24
25
|
/** Spawn an ACP agent over NDJSON stdio from `env` alone, never the sidecar's own environment. The adapter owns abort, so no signal. */
|
|
@@ -452,6 +453,8 @@ var InitializationTracker = class {
|
|
|
452
453
|
*/
|
|
453
454
|
function overlayProviderConfig(provider, initialConfig, config) {
|
|
454
455
|
const nextConfig = cloneConfig(initialConfig);
|
|
456
|
+
const proxySecretReceipt = config.proxySecretReceipt;
|
|
457
|
+
if (proxySecretReceipt !== void 0) nextConfig.proxySecretReceipt = ProxySecretReceiptSchema.parse(proxySecretReceipt);
|
|
455
458
|
const runtimeAttachments = config.runtimeAttachments;
|
|
456
459
|
if (runtimeAttachments !== void 0) nextConfig.runtimeAttachments = structuredClone(runtimeAttachments);
|
|
457
460
|
const runtimeSecrets = config.runtimeSecrets;
|
|
@@ -1606,8 +1609,10 @@ var CliAdapterProfile = class extends CliAdapterLifecycle {
|
|
|
1606
1609
|
});
|
|
1607
1610
|
return plan;
|
|
1608
1611
|
}
|
|
1609
|
-
async applyProfileResources(inputProfile, workspaceRoot,
|
|
1612
|
+
async applyProfileResources(inputProfile, workspaceRoot, inputOwnerId, sessionId) {
|
|
1610
1613
|
const profile = inputProfile ?? {};
|
|
1614
|
+
let ownerId = inputOwnerId;
|
|
1615
|
+
if (ownerId && this.config.proxySecretReceipt) ownerId = createHash("sha256").update(ownerId).update("\0").update(JSON.stringify(this.config.proxySecretReceipt)).digest("hex");
|
|
1611
1616
|
const harness = this.profileHarness;
|
|
1612
1617
|
if (!harness) {
|
|
1613
1618
|
if (hasPortableProfileControls(profile) || this.config.runtimeAttachments !== void 0) throw new Error(`${this.provider} does not support portable AgentProfile controls`);
|
|
@@ -1618,9 +1623,11 @@ var CliAdapterProfile = class extends CliAdapterLifecycle {
|
|
|
1618
1623
|
if (this.config.secretProfileRevisionRoot) return await this.applySecretProfileRevision(plan, this.config.secretProfileRevisionRoot, workspaceRoot, ownerId, sessionId);
|
|
1619
1624
|
if (this.config.publicProfileRevisionRoot) {
|
|
1620
1625
|
if (!ownerId) throw new Error("Concurrent public profile launch requires a session scope; idle prewarm is unsupported");
|
|
1626
|
+
const roots = ensurePublicConcurrentProfileRoots(this.config.publicProfileRevisionRoot);
|
|
1621
1627
|
const revision = await preparePublicConcurrentProfileRevision({
|
|
1622
1628
|
plan,
|
|
1623
|
-
|
|
1629
|
+
proxySecretReceipt: this.config.proxySecretReceipt,
|
|
1630
|
+
...roots,
|
|
1624
1631
|
sharedWorkspaceDir: workspaceRoot,
|
|
1625
1632
|
ownerId,
|
|
1626
1633
|
secretProvider: runtimeSecretsOverlay(this.config.runtimeSecrets, this.profileSecretProvider)
|
|
@@ -1659,6 +1666,7 @@ var CliAdapterProfile = class extends CliAdapterLifecycle {
|
|
|
1659
1666
|
const roots = ensurePublicConcurrentProfileRoots(secretProfileRevisionRoot);
|
|
1660
1667
|
const revision = await prepareSecretConcurrentProfileRevision({
|
|
1661
1668
|
plan,
|
|
1669
|
+
proxySecretReceipt: this.config.proxySecretReceipt,
|
|
1662
1670
|
providerConfig: this.secretProfileProviderConfig(),
|
|
1663
1671
|
...roots,
|
|
1664
1672
|
sharedWorkspaceDir: workspaceRoot,
|
|
@@ -4434,12 +4442,35 @@ const SECRET_REFERENCE = /\{env:(TANGLE_PROFILE_SECRET_[0-9A-F]{24})\}/g;
|
|
|
4434
4442
|
function requireRecord(raw, message) {
|
|
4435
4443
|
return isRecord(raw) ? raw : refuseSecretLaunch(message);
|
|
4436
4444
|
}
|
|
4445
|
+
/** Snapshot the executor's projection; it may only replace an admitted stdio launch. */
|
|
4446
|
+
function directStdioMcpServers(lease, servers) {
|
|
4447
|
+
const direct = /* @__PURE__ */ new Map();
|
|
4448
|
+
const projection = lease?.directStdio;
|
|
4449
|
+
if (projection === void 0) return direct;
|
|
4450
|
+
if (!Array.isArray(projection)) refuseSecretLaunch("Direct MCP projection must be an array");
|
|
4451
|
+
for (const item of projection) {
|
|
4452
|
+
const original = servers.find((server) => server.name === item?.name);
|
|
4453
|
+
const environment = isRecord(item?.environment) ? { ...item.environment } : void 0;
|
|
4454
|
+
if (!isRecord(item) || Object.keys(item).some((key) => ![
|
|
4455
|
+
"name",
|
|
4456
|
+
"command",
|
|
4457
|
+
"environment"
|
|
4458
|
+
].includes(key)) || !original || !("command" in original) || direct.has(item.name) || JSON.stringify(item.command) !== JSON.stringify(original.command) || !environment || Object.keys(environment).length !== Object.keys(original.environment).length || Object.keys(original.environment).some((key) => !Object.hasOwn(environment, key) || typeof environment[key] !== "string")) refuseSecretLaunch("Direct MCP projection differs from admitted stdio");
|
|
4459
|
+
direct.set(item.name, Object.freeze({
|
|
4460
|
+
name: item.name,
|
|
4461
|
+
command: Object.freeze([...original.command]),
|
|
4462
|
+
environment: Object.freeze(environment)
|
|
4463
|
+
}));
|
|
4464
|
+
}
|
|
4465
|
+
return direct;
|
|
4466
|
+
}
|
|
4437
4467
|
/** A config value with its secret references resolved, or undefined. */
|
|
4438
|
-
function resolveReferences(value, references) {
|
|
4468
|
+
function resolveReferences(value, references, secrets) {
|
|
4439
4469
|
let unresolved = false;
|
|
4440
4470
|
const resolved = value.replace(SECRET_REFERENCE, (_match, reference) => {
|
|
4441
4471
|
const secret = references[reference];
|
|
4442
4472
|
if (secret === void 0) unresolved = true;
|
|
4473
|
+
if (secret) secrets?.add(secret);
|
|
4443
4474
|
return secret ?? "";
|
|
4444
4475
|
});
|
|
4445
4476
|
return unresolved || /\{(?:env|file):/.test(resolved) ? void 0 : resolved;
|
|
@@ -4455,13 +4486,9 @@ function servableStdioServer(name, entry, references) {
|
|
|
4455
4486
|
const secrets = /* @__PURE__ */ new Set();
|
|
4456
4487
|
for (const [variable, value] of Object.entries(declared)) {
|
|
4457
4488
|
if (typeof value !== "string") return `its ${variable} is not text`;
|
|
4458
|
-
const resolved = resolveReferences(value, references);
|
|
4489
|
+
const resolved = resolveReferences(value, references, secrets);
|
|
4459
4490
|
if (resolved === void 0) return `its ${variable} names a value the executor cannot resolve`;
|
|
4460
4491
|
environment[variable] = resolved;
|
|
4461
|
-
for (const [, reference] of value.matchAll(SECRET_REFERENCE)) {
|
|
4462
|
-
const secret = references[reference];
|
|
4463
|
-
if (secret) secrets.add(secret);
|
|
4464
|
-
}
|
|
4465
4492
|
}
|
|
4466
4493
|
return {
|
|
4467
4494
|
name,
|
|
@@ -4495,41 +4522,71 @@ function servableMcpServer(name, entry, references) {
|
|
|
4495
4522
|
headers
|
|
4496
4523
|
};
|
|
4497
4524
|
}
|
|
4498
|
-
|
|
4525
|
+
const cleanupKey = Symbol.for("tangle.secret-native-turn-cleanup");
|
|
4526
|
+
const awaitQueuedTurn = (turn) => turn[cleanupKey]?.() ?? turn;
|
|
4527
|
+
/** Earlier physical cleanup must succeed before another holder is admitted. */
|
|
4499
4528
|
function joinQueue(queues, key) {
|
|
4500
4529
|
const previous = queues.get(key) ?? Promise.resolve();
|
|
4501
|
-
let
|
|
4530
|
+
let finish;
|
|
4531
|
+
let notify;
|
|
4532
|
+
let cleanup;
|
|
4533
|
+
let recovering;
|
|
4534
|
+
const ready = new Promise((resolve) => {
|
|
4535
|
+
notify = resolve;
|
|
4536
|
+
});
|
|
4502
4537
|
const finished = new Promise((resolve) => {
|
|
4503
|
-
|
|
4538
|
+
finish = resolve;
|
|
4504
4539
|
});
|
|
4540
|
+
const release = () => {
|
|
4541
|
+
finish();
|
|
4542
|
+
notify();
|
|
4543
|
+
};
|
|
4505
4544
|
const tail = previous.then(() => finished);
|
|
4545
|
+
tail[cleanupKey] = async () => {
|
|
4546
|
+
await awaitQueuedTurn(previous);
|
|
4547
|
+
await ready;
|
|
4548
|
+
if (cleanup) {
|
|
4549
|
+
recovering ??= Promise.resolve().then(cleanup).then(() => {
|
|
4550
|
+
cleanup = void 0;
|
|
4551
|
+
release();
|
|
4552
|
+
}).finally(() => {
|
|
4553
|
+
recovering = void 0;
|
|
4554
|
+
});
|
|
4555
|
+
await recovering;
|
|
4556
|
+
}
|
|
4557
|
+
await tail;
|
|
4558
|
+
};
|
|
4506
4559
|
queues.set(key, tail);
|
|
4507
4560
|
tail.then(() => {
|
|
4561
|
+
delete tail[cleanupKey];
|
|
4508
4562
|
if (queues.get(key) === tail) queues.delete(key);
|
|
4509
4563
|
});
|
|
4510
4564
|
return {
|
|
4511
|
-
previous,
|
|
4512
|
-
release
|
|
4565
|
+
previous: awaitQueuedTurn(previous),
|
|
4566
|
+
release,
|
|
4567
|
+
retryCleanup(retry) {
|
|
4568
|
+
cleanup ??= retry;
|
|
4569
|
+
notify();
|
|
4570
|
+
}
|
|
4513
4571
|
};
|
|
4514
4572
|
}
|
|
4515
4573
|
function untilSettledOrAborted(previous, signal) {
|
|
4516
4574
|
const aborted = () => signal.reason ?? /* @__PURE__ */ new Error("Secret native turn aborted before its session view was free");
|
|
4517
|
-
if (signal.aborted)
|
|
4575
|
+
if (signal.aborted) {
|
|
4576
|
+
previous.catch(() => {});
|
|
4577
|
+
return Promise.reject(aborted());
|
|
4578
|
+
}
|
|
4518
4579
|
return new Promise((resolve, reject) => {
|
|
4519
|
-
const
|
|
4520
|
-
|
|
4521
|
-
previous.then(() => {
|
|
4522
|
-
signal.removeEventListener("abort", onAbort);
|
|
4523
|
-
resolve();
|
|
4524
|
-
});
|
|
4580
|
+
const listener = addAbortListener(signal, () => reject(aborted()));
|
|
4581
|
+
previous.then(resolve, reject).finally(() => listener[Symbol.dispose]());
|
|
4525
4582
|
});
|
|
4526
4583
|
}
|
|
4527
4584
|
/** Every native discovery ancestor is sealed and free of ambient configuration. */
|
|
4528
4585
|
function assertSealedNativeSearchPath(cwd, configNames) {
|
|
4529
|
-
for (let child = cwd
|
|
4586
|
+
for (let child = cwd;; child = dirname(child)) {
|
|
4530
4587
|
const stat = lstatSync(child);
|
|
4531
4588
|
if (!stat.isDirectory() || stat.isSymbolicLink() || realpathSync(child) !== child || stat.uid !== 0 || (stat.mode & 18) !== 0 || child !== cwd && configNames.some((name) => lstatSync(join(child, name), { throwIfNoEntry: false }))) throw new Error("Secret native launch has mutable or ambient discovery authority");
|
|
4532
|
-
if (
|
|
4589
|
+
if (dirname(child) === child) break;
|
|
4533
4590
|
}
|
|
4534
4591
|
}
|
|
4535
4592
|
/** One session view changes only after its previous physical native process exits. */
|
|
@@ -4581,6 +4638,6 @@ async function forgetSessionScopes(target) {
|
|
|
4581
4638
|
}
|
|
4582
4639
|
}
|
|
4583
4640
|
//#endregion
|
|
4584
|
-
export {
|
|
4641
|
+
export { turnInteractionEnabled as $, McpInteractionSupport as A, toolResultEvents as At, parseCliUsageLine as B, NATIVE_SESSION_CONTRACTS$1 as C, homeXdgEnv as Ct, provenStoreBinary as D, streamPartBase as Dt, isTrustedStoreBinary as E, sessionObservedEvents as Et, interactionMcpToolName as F, acpContentText as Ft, createExecutionState as G, recordCliTokenUsage as H, jsonEventParser as I, spawnAcpBridge as It, localMcpEnv as J, isLocalMcpConfig as K, plaintextResponseParser as L, DEFAULT_INTERACTION_MCP_SERVER_NAME as M, trackReasoningBlock as Mt, InteractionMcpServer$1 as N, ACP_MIN_PROTOCOL_VERSION as Nt, refuseSecretLaunch as O, textDeltaEvents as Ot, brokerInteractionTools$1 as P, ACP_PROTOCOL_VERSION as Pt, turnEndReason as Q, AcpProviderAdapterBase as R, nativeEffortArgs as S, executionCorrelationHeaders as St, assertSealedNativeHome as T, reasoningEvents as Tt, CliProviderAdapterBase as U, readCliTokenUsage as V, createRepeatedToolFailureGuard as W, interactionToggleEnabled as X, enabledInteractionKinds as Y, readEphemeralContext as Z, secretSessionTurnQueue as _, runtimeSecretsOverlay as _t, codexDeveloperInstructionArgs as a, partitionImageAttachments as at, untilSettledOrAborted as b, EXECUTION_TRACE_HEADER as bt, SECRET_REFERENCE as c, buildFileUrl as ct, directStdioMcpServers as d, inferMediaType as dt, withEphemeralContext as et, isLoopbackEndpoint as f, trackFilePart as ft, resolveReferences as g, wasNeverLaunched as gt, requireRecord as h, rejectNotLaunched as ht, PERMISSION_DECISION_TIMEOUT_MS as i, PROMPT_SECTION_SEPARATOR as it, TerminalPlanSupport as j, toolStartEvents as jt, resolveExecutableRealpath as k, textSnapshotEvents as kt, SECRET_REFERENCE_PREFIX as l, deriveFilePart as lt, joinQueue as m, SessionRehydrationError as mt, InteractionBroker$1 as n, MAX_INLINE_IMAGE_BYTES as nt, forgetSessionScopes as o, preparePromptInputParts as ot, isPlainRecord as p, InvalidAttachmentError as pt, localMcpArgv as q, InteractionHttpBridge as r, MAX_TOTAL_INLINE_IMAGE_BYTES as rt, secretMcpScope as s, prependPromptSection as st, CODEX_DISABLED_FEATURE_ARGS as t, withTurnInteractions as tt, assertSealedNativeSearchPath as u, deterministicFilePartId as ut, servableMcpServer as v, EXECUTION_CORRELATION_HEADERS as vt, SEALED_NATIVE_HOME_LAYOUT as w, finalTextEvent as wt, kimiThinkingArgs as x, MANAGED_QUOTE_VERSION_HEADER as xt, servableStdioServer as y, EXECUTION_ID_HEADER as yt, accumulateCliTokenUsage as z };
|
|
4585
4642
|
|
|
4586
|
-
//# sourceMappingURL=src-
|
|
4643
|
+
//# sourceMappingURL=src-DVjhkeiC.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.20",
|
|
4
4
|
"description": "Base adapter for CLI-based AI agent providers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
53
53
|
"@tangle-network/agent-core": "^1.0.3",
|
|
54
54
|
"@tangle-network/agent-interface": "^5.10.20",
|
|
55
|
-
"@tangle-network/agent-profile-materialize": "1.1.
|
|
55
|
+
"@tangle-network/agent-profile-materialize": "1.1.57",
|
|
56
56
|
"@tangle-network/agent-trace-contract": "^2.2.0",
|
|
57
|
-
"@tangle-network/cli-agent-registry": "0.15.
|
|
57
|
+
"@tangle-network/cli-agent-registry": "0.15.33",
|
|
58
58
|
"@tangle-network/sdk-cli-runner": "0.3.9",
|
|
59
59
|
"@tangle-network/sdk-session-persistence": "0.7.5",
|
|
60
60
|
"zod": "4.6.7"
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"registry": "https://registry.npmjs.org"
|
|
72
72
|
},
|
|
73
73
|
"tangleRelease": {
|
|
74
|
-
"sourceSha": "
|
|
75
|
-
"mergedAt": "2026-11-
|
|
74
|
+
"sourceSha": "8af7f9410f67473cf82e7c48ee3bf284a2afea77",
|
|
75
|
+
"mergedAt": "2026-11-07T00:12:57-08:00"
|
|
76
76
|
},
|
|
77
77
|
"scripts": {
|
|
78
78
|
"build": "tsdown",
|