@tangle-network/sdk-provider-cli-base 0.13.130 → 0.13.132
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.mjs +1 -1
- package/dist/adapters/exo/index.mjs +1 -1
- package/dist/adapters/factory-droids/index.mjs +1 -1
- package/dist/adapters/grok/index.mjs +1 -1
- package/dist/adapters/hermes/index.mjs +1 -1
- package/dist/adapters/nanoclaw/index.mjs +1 -1
- package/dist/adapters/nanocode/index.mjs +1 -1
- package/dist/adapters/openclaw/index.d.mts +4 -13
- package/dist/adapters/openclaw/index.mjs +52 -25
- package/dist/adapters/prime/index.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{src-Bkpdq_jn.mjs → src-BjWuYvIc.mjs} +2 -1
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bt as textDeltaEvents, Ht as toolResultEvents, I as localMcpArgv, L as localMcpEnv, Lt as reasoningEvents, O as recordCliTokenUsage, Rt as sessionObservedEvents, S as jsonEventParser, Ut as toolStartEvents, k as CliProviderAdapterBase } from "../../src-
|
|
1
|
+
import { Bt as textDeltaEvents, Ht as toolResultEvents, I as localMcpArgv, L as localMcpEnv, Lt as reasoningEvents, O as recordCliTokenUsage, Rt as sessionObservedEvents, S as jsonEventParser, Ut as toolStartEvents, k as CliProviderAdapterBase } from "../../src-BjWuYvIc.mjs";
|
|
2
2
|
//#region src/adapters/amp/types.ts
|
|
3
3
|
/**
|
|
4
4
|
* Type guard for AMP events.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as plaintextResponseParser, Rt as sessionObservedEvents, k as CliProviderAdapterBase } from "../../src-
|
|
1
|
+
import { C as plaintextResponseParser, Rt as sessionObservedEvents, k as CliProviderAdapterBase } from "../../src-BjWuYvIc.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 { Bt as textDeltaEvents, F as isLocalMcpConfig, Ht as toolResultEvents, I as localMcpArgv, L as localMcpEnv, Lt as reasoningEvents, O as recordCliTokenUsage, R as enabledInteractionKinds, Rt as sessionObservedEvents, S as jsonEventParser, Ut as toolStartEvents, W as withTurnInteractions, g as McpInteractionSupport, k as CliProviderAdapterBase, zt as streamPartBase } from "../../src-
|
|
1
|
+
import { Bt as textDeltaEvents, F as isLocalMcpConfig, Ht as toolResultEvents, I as localMcpArgv, L as localMcpEnv, Lt as reasoningEvents, O as recordCliTokenUsage, R as enabledInteractionKinds, Rt as sessionObservedEvents, S as jsonEventParser, Ut as toolStartEvents, W as withTurnInteractions, g as McpInteractionSupport, k as CliProviderAdapterBase, zt as streamPartBase } from "../../src-BjWuYvIc.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 { Bt as textDeltaEvents, Ht as toolResultEvents, Lt as reasoningEvents, O as recordCliTokenUsage, Rt as sessionObservedEvents, S as jsonEventParser, Ut as toolStartEvents, _t as prependPromptSection, k as CliProviderAdapterBase } from "../../src-
|
|
1
|
+
import { Bt as textDeltaEvents, Ht as toolResultEvents, Lt as reasoningEvents, O as recordCliTokenUsage, Rt as sessionObservedEvents, S as jsonEventParser, Ut as toolStartEvents, _t as prependPromptSection, k as CliProviderAdapterBase } from "../../src-BjWuYvIc.mjs";
|
|
2
2
|
import { isRecord } from "@tangle-network/agent-core";
|
|
3
3
|
//#region src/adapters/grok/adapter.ts
|
|
4
4
|
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 \"$@\"";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as plaintextResponseParser, F as isLocalMcpConfig, I as localMcpArgv, L as localMcpEnv, O as recordCliTokenUsage, Rt as sessionObservedEvents, _t as prependPromptSection, ht as partitionImageAttachments, k as CliProviderAdapterBase } from "../../src-
|
|
1
|
+
import { C as plaintextResponseParser, F as isLocalMcpConfig, I as localMcpArgv, L as localMcpEnv, O as recordCliTokenUsage, Rt as sessionObservedEvents, _t as prependPromptSection, ht as partitionImageAttachments, k as CliProviderAdapterBase } from "../../src-BjWuYvIc.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 { C as plaintextResponseParser, E as parseCliUsageLine, O as recordCliTokenUsage, Rt as sessionObservedEvents, _t as prependPromptSection, k as CliProviderAdapterBase } from "../../src-
|
|
1
|
+
import { C as plaintextResponseParser, E as parseCliUsageLine, O as recordCliTokenUsage, Rt as sessionObservedEvents, _t as prependPromptSection, k as CliProviderAdapterBase } from "../../src-BjWuYvIc.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 { C as plaintextResponseParser, Rt as sessionObservedEvents, _t as prependPromptSection, k as CliProviderAdapterBase } from "../../src-
|
|
1
|
+
import { C as plaintextResponseParser, Rt as sessionObservedEvents, _t as prependPromptSection, k as CliProviderAdapterBase } from "../../src-BjWuYvIc.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 { Kt as CliProviderConfig, Ot as CliProviderAdapterBase, Wt as CliExecArgs, Xt as ExecutionState, c as WorkspacePlanApplication, n as HarnessId } from "../../index-BvoaIiz8.mjs";
|
|
1
|
+
import { Dn as CliTurnSpawn, En as CliTurnProcess, Kt as CliProviderConfig, Ot as CliProviderAdapterBase, Wt as CliExecArgs, Xt as ExecutionState, c as WorkspacePlanApplication, n as HarnessId } from "../../index-BvoaIiz8.mjs";
|
|
2
2
|
import { StreamParserConfig } from "@tangle-network/sdk-cli-runner";
|
|
3
3
|
import { CliAuthFile, ProviderConfig, StreamEvent } from "@tangle-network/agent-interface";
|
|
4
4
|
|
|
@@ -12,13 +12,7 @@ import { CliAuthFile, ProviderConfig, StreamEvent } from "@tangle-network/agent-
|
|
|
12
12
|
interface OpenclawConfig extends CliProviderConfig {
|
|
13
13
|
authMode?: "auth-files" | "config-only";
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
* OpenClaw's embedded agent: `openclaw agent --local --json --agent main
|
|
17
|
-
* --session-id <id> -m "<prompt>"`, configured by `~/.openclaw/openclaw.json`.
|
|
18
|
-
* It does not stream: `--json` prints one envelope when the turn ends, and
|
|
19
|
-
* that envelope is the only place it reports usage and its session id.
|
|
20
|
-
*/
|
|
21
|
-
declare class OpenclawProviderAdapter extends CliProviderAdapterBase<OpenclawConfig, never> {
|
|
15
|
+
declare class OpenclawProviderAdapter extends CliProviderAdapterBase<OpenclawConfig, string> {
|
|
22
16
|
readonly provider = "openclaw";
|
|
23
17
|
protected readonly profileHarness: HarnessId;
|
|
24
18
|
protected readonly defaultCliPath = "openclaw";
|
|
@@ -68,11 +62,8 @@ declare class OpenclawProviderAdapter extends CliProviderAdapterBase<OpenclawCon
|
|
|
68
62
|
success: boolean;
|
|
69
63
|
};
|
|
70
64
|
}): Promise<void>;
|
|
71
|
-
protected
|
|
72
|
-
|
|
73
|
-
* Parse the buffered stdout as openclaw's JSON envelope and synthesize the
|
|
74
|
-
* canonical message.part.updated + status:completed events.
|
|
75
|
-
*/
|
|
65
|
+
protected spawnExecutionProcess(request: CliTurnSpawn<OpenclawConfig, string>): CliTurnProcess | Promise<CliTurnProcess>;
|
|
66
|
+
protected createEventParser(state: ExecutionState, onEvent?: (event: StreamEvent) => void): StreamParserConfig<string>;
|
|
76
67
|
private flushEnvelope;
|
|
77
68
|
}
|
|
78
69
|
//#endregion
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
import { It as finalTextEvent, O as recordCliTokenUsage, Rt as sessionObservedEvents, _t as prependPromptSection, h as nativeEffortArgs, k as CliProviderAdapterBase } from "../../src-
|
|
1
|
+
import { Bt as textDeltaEvents, It as finalTextEvent, O as recordCliTokenUsage, Rt as sessionObservedEvents, Vt as textSnapshotEvents, _t as prependPromptSection, h as nativeEffortArgs, k as CliProviderAdapterBase } from "../../src-BjWuYvIc.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. */
|
|
5
5
|
const OPENCLAW_AGENT_ID = "main";
|
|
6
|
-
|
|
7
|
-
* OpenClaw's embedded agent: `openclaw agent --local --json --agent main
|
|
8
|
-
* --session-id <id> -m "<prompt>"`, configured by `~/.openclaw/openclaw.json`.
|
|
9
|
-
* It does not stream: `--json` prints one envelope when the turn ends, and
|
|
10
|
-
* that envelope is the only place it reports usage and its session id.
|
|
11
|
-
*/
|
|
6
|
+
const PARTIAL_REPLY = "@openclaw/partial ";
|
|
12
7
|
var OpenclawProviderAdapter = class extends CliProviderAdapterBase {
|
|
13
8
|
provider = "openclaw";
|
|
14
9
|
profileHarness = "openclaw";
|
|
@@ -105,33 +100,58 @@ var OpenclawProviderAdapter = class extends CliProviderAdapterBase {
|
|
|
105
100
|
statusCode
|
|
106
101
|
};
|
|
107
102
|
}
|
|
103
|
+
spawnExecutionProcess(request) {
|
|
104
|
+
const sessionArg = request.execArgs.args.indexOf("--session-id");
|
|
105
|
+
return super.spawnExecutionProcess({
|
|
106
|
+
...request,
|
|
107
|
+
env: {
|
|
108
|
+
...request.env,
|
|
109
|
+
OPENCLAW_SIDECAR_SESSION: sessionArg >= 0 ? request.execArgs.args[sessionArg + 1] : void 0,
|
|
110
|
+
OPENCLAW_STREAM: process.env.OPENCLAW_STREAM === "1" ? "1" : void 0
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}
|
|
108
114
|
createEventParser(state, onEvent) {
|
|
109
|
-
const
|
|
110
|
-
ext.stdoutBuffer = "";
|
|
115
|
+
const envelope = [];
|
|
111
116
|
return {
|
|
112
|
-
parseAs: "
|
|
113
|
-
onEvent: () => {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
+
parseAs: "lines",
|
|
118
|
+
onEvent: (line) => {
|
|
119
|
+
if (!line.startsWith(PARTIAL_REPLY)) {
|
|
120
|
+
envelope.push(line);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
let partial;
|
|
124
|
+
try {
|
|
125
|
+
partial = JSON.parse(line.slice(18));
|
|
126
|
+
} catch {
|
|
127
|
+
onEvent?.({
|
|
128
|
+
type: "warning",
|
|
129
|
+
code: "OPENCLAW_PARSE_ERROR",
|
|
130
|
+
message: "Malformed OpenClaw partial reply"
|
|
131
|
+
});
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
if (!partial || typeof partial !== "object") return;
|
|
135
|
+
const updates = "delta" in partial && typeof partial.delta === "string" ? textDeltaEvents(state, partial.delta) : "text" in partial && typeof partial.text === "string" ? openclawSnapshotEvents(state, partial.text) : [];
|
|
136
|
+
for (const update of updates) onEvent?.(update);
|
|
137
|
+
},
|
|
138
|
+
onComplete: () => {
|
|
139
|
+
for (const event of this.flushEnvelope(state, envelope.join("\n"))) onEvent?.(event);
|
|
117
140
|
}
|
|
118
141
|
};
|
|
119
142
|
}
|
|
120
|
-
|
|
121
|
-
* Parse the buffered stdout as openclaw's JSON envelope and synthesize the
|
|
122
|
-
* canonical message.part.updated + status:completed events.
|
|
123
|
-
*/
|
|
124
|
-
flushEnvelope(state) {
|
|
125
|
-
const trimmed = state.stdoutBuffer.trim();
|
|
143
|
+
flushEnvelope(state, trimmed) {
|
|
126
144
|
if (!trimmed) return [];
|
|
127
145
|
let parsed;
|
|
128
146
|
try {
|
|
129
|
-
|
|
130
|
-
|
|
147
|
+
const envelope = JSON.parse(trimmed);
|
|
148
|
+
if (!envelope || typeof envelope !== "object" || Array.isArray(envelope)) throw new Error("Expected an OpenClaw result object");
|
|
149
|
+
parsed = envelope;
|
|
150
|
+
} catch {
|
|
131
151
|
return [{
|
|
132
152
|
type: "warning",
|
|
133
153
|
code: "OPENCLAW_PARSE_ERROR",
|
|
134
|
-
message:
|
|
154
|
+
message: "Malformed OpenClaw result envelope"
|
|
135
155
|
}];
|
|
136
156
|
}
|
|
137
157
|
const text = extractFinalText(parsed);
|
|
@@ -139,8 +159,7 @@ var OpenclawProviderAdapter = class extends CliProviderAdapterBase {
|
|
|
139
159
|
const sessionId = typeof agentMeta.sessionId === "string" ? agentMeta.sessionId : void 0;
|
|
140
160
|
const events = sessionId ? sessionObservedEvents(state, "openclaw", sessionId) : [];
|
|
141
161
|
recordCliTokenUsage(state, agentMeta);
|
|
142
|
-
|
|
143
|
-
if (text) events.push(textEvent);
|
|
162
|
+
events.push(...openclawSnapshotEvents(state, text));
|
|
144
163
|
events.push({
|
|
145
164
|
type: "raw",
|
|
146
165
|
backend: this.provider,
|
|
@@ -156,6 +175,14 @@ var OpenclawProviderAdapter = class extends CliProviderAdapterBase {
|
|
|
156
175
|
return events;
|
|
157
176
|
}
|
|
158
177
|
};
|
|
178
|
+
function openclawSnapshotEvents(state, text) {
|
|
179
|
+
if (text.startsWith(state.textBuffer)) return textSnapshotEvents(state, text);
|
|
180
|
+
const event = finalTextEvent(state, text);
|
|
181
|
+
return event.type === "message.part.updated" ? [{
|
|
182
|
+
type: event.type,
|
|
183
|
+
part: event.part
|
|
184
|
+
}] : [event];
|
|
185
|
+
}
|
|
159
186
|
/**
|
|
160
187
|
* Walk an arbitrary content node and accumulate every string-valued `text`
|
|
161
188
|
* field plus any direct strings. Bounded depth (default 4) prevents
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Yt as spawnAcpBridge, _t as prependPromptSection, w as AcpProviderAdapterBase } from "../../src-
|
|
1
|
+
import { Yt as spawnAcpBridge, _t as prependPromptSection, w as AcpProviderAdapterBase } from "../../src-BjWuYvIc.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";
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as secretSessionTurnQueue, A as TurnObserver, At as EXECUTION_ID_HEADER, B as readEphemeralContext, Bt as textDeltaEvents, C as plaintextResponseParser, Ct as InvalidAttachmentError, D as readCliTokenUsage, Dt as wasNeverLaunched, E as parseCliUsageLine, Et as rejectNotLaunched, F as isLocalMcpConfig, Ft as mapAcpSessionUpdate, G as SHARED_WORKSPACE_DIR_ENV, Gt as ACP_MIN_PROTOCOL_VERSION, H as turnInteractionEnabled, Ht as toolResultEvents, I as localMcpArgv, It as finalTextEvent, J as isLoopbackEndpoint, Jt as assertAcpTurnFinished, K as assertSealedNativeSearchPath, Kt as ACP_PROTOCOL_VERSION, L as localMcpEnv, Lt as reasoningEvents, M as endFailedTurn, Mt as MANAGED_QUOTE_VERSION_HEADER, N as recordTurnInterruption, Nt as executionCorrelationHeaders, O as recordCliTokenUsage, Ot as runtimeSecretsOverlay, P as createExecutionState, Pt as homeXdgEnv, Q as resolveReferences, R as enabledInteractionKinds, Rt as sessionObservedEvents, S as jsonEventParser, St as trackFilePart, T as accumulateCliTokenUsage, Tt as failureAfterCleanup, U as withEphemeralContext, Ut as toolStartEvents, V as turnEndReason, Vt as textSnapshotEvents, W as withTurnInteractions, Wt as trackReasoningBlock, X as joinQueue, Y as isPlainRecord, Yt as spawnAcpBridge, Z as requireRecord, _ as TerminalPlanSupport, _t as prependPromptSection, a as SECRET_REFERENCE, at as NATIVE_SESSION_CONTRACTS, b as brokerInteractionTools, bt as deterministicFilePartId, c as forgetSessionScopes, ct as isTrustedStoreBinary, d as findRouterCatalogEntry, dt as resolveExecutableRealpath, et as servableMcpServer, f as resolveRouterModelLimits, ft as MAX_INLINE_IMAGE_BYTES, g as McpInteractionSupport, gt as preparePromptInputParts, h as nativeEffortArgs, ht as partitionImageAttachments, i as PERMISSION_DECISION_TIMEOUT_MS, it as untilSettledOrAborted, j as createRepeatedToolFailureGuard, jt as EXECUTION_TRACE_HEADER, k as CliProviderAdapterBase, kt as EXECUTION_CORRELATION_HEADERS, l as secretMcpScope, lt as provenStoreBinary, m as kimiThinkingArgs, mt as PROMPT_SECTION_SEPARATOR, n as InteractionBroker, nt as sharedSecretMcpRefused, o as SECRET_REFERENCE_PREFIX, ot as SEALED_NATIVE_HOME_LAYOUT, p as resolveRouterModelReasoningEfforts, pt as MAX_TOTAL_INLINE_IMAGE_BYTES, q as directStdioMcpServers, qt as acpContentText, r as InteractionHttpBridge, rt as spawnUnderSecretMcpLease, s as codexDeveloperInstructionArgs, st as assertSealedNativeHome, t as CODEX_DISABLED_FEATURE_ARGS, tt as servableStdioServer, u as ROUTER_MODEL_CATALOG_TIMEOUT_MS, ut as refuseSecretLaunch, v as DEFAULT_INTERACTION_MCP_SERVER_NAME, vt as buildFileUrl, w as AcpProviderAdapterBase, wt as SessionRehydrationError, x as interactionMcpToolName, xt as inferMediaType, y as InteractionMcpServer, yt as deriveFilePart, z as interactionToggleEnabled, zt as streamPartBase } from "./src-
|
|
1
|
+
import { $ as secretSessionTurnQueue, A as TurnObserver, At as EXECUTION_ID_HEADER, B as readEphemeralContext, Bt as textDeltaEvents, C as plaintextResponseParser, Ct as InvalidAttachmentError, D as readCliTokenUsage, Dt as wasNeverLaunched, E as parseCliUsageLine, Et as rejectNotLaunched, F as isLocalMcpConfig, Ft as mapAcpSessionUpdate, G as SHARED_WORKSPACE_DIR_ENV, Gt as ACP_MIN_PROTOCOL_VERSION, H as turnInteractionEnabled, Ht as toolResultEvents, I as localMcpArgv, It as finalTextEvent, J as isLoopbackEndpoint, Jt as assertAcpTurnFinished, K as assertSealedNativeSearchPath, Kt as ACP_PROTOCOL_VERSION, L as localMcpEnv, Lt as reasoningEvents, M as endFailedTurn, Mt as MANAGED_QUOTE_VERSION_HEADER, N as recordTurnInterruption, Nt as executionCorrelationHeaders, O as recordCliTokenUsage, Ot as runtimeSecretsOverlay, P as createExecutionState, Pt as homeXdgEnv, Q as resolveReferences, R as enabledInteractionKinds, Rt as sessionObservedEvents, S as jsonEventParser, St as trackFilePart, T as accumulateCliTokenUsage, Tt as failureAfterCleanup, U as withEphemeralContext, Ut as toolStartEvents, V as turnEndReason, Vt as textSnapshotEvents, W as withTurnInteractions, Wt as trackReasoningBlock, X as joinQueue, Y as isPlainRecord, Yt as spawnAcpBridge, Z as requireRecord, _ as TerminalPlanSupport, _t as prependPromptSection, a as SECRET_REFERENCE, at as NATIVE_SESSION_CONTRACTS, b as brokerInteractionTools, bt as deterministicFilePartId, c as forgetSessionScopes, ct as isTrustedStoreBinary, d as findRouterCatalogEntry, dt as resolveExecutableRealpath, et as servableMcpServer, f as resolveRouterModelLimits, ft as MAX_INLINE_IMAGE_BYTES, g as McpInteractionSupport, gt as preparePromptInputParts, h as nativeEffortArgs, ht as partitionImageAttachments, i as PERMISSION_DECISION_TIMEOUT_MS, it as untilSettledOrAborted, j as createRepeatedToolFailureGuard, jt as EXECUTION_TRACE_HEADER, k as CliProviderAdapterBase, kt as EXECUTION_CORRELATION_HEADERS, l as secretMcpScope, lt as provenStoreBinary, m as kimiThinkingArgs, mt as PROMPT_SECTION_SEPARATOR, n as InteractionBroker, nt as sharedSecretMcpRefused, o as SECRET_REFERENCE_PREFIX, ot as SEALED_NATIVE_HOME_LAYOUT, p as resolveRouterModelReasoningEfforts, pt as MAX_TOTAL_INLINE_IMAGE_BYTES, q as directStdioMcpServers, qt as acpContentText, r as InteractionHttpBridge, rt as spawnUnderSecretMcpLease, s as codexDeveloperInstructionArgs, st as assertSealedNativeHome, t as CODEX_DISABLED_FEATURE_ARGS, tt as servableStdioServer, u as ROUTER_MODEL_CATALOG_TIMEOUT_MS, ut as refuseSecretLaunch, v as DEFAULT_INTERACTION_MCP_SERVER_NAME, vt as buildFileUrl, w as AcpProviderAdapterBase, wt as SessionRehydrationError, x as interactionMcpToolName, xt as inferMediaType, y as InteractionMcpServer, yt as deriveFilePart, z as interactionToggleEnabled, zt as streamPartBase } from "./src-BjWuYvIc.mjs";
|
|
2
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, TurnObserver, accumulateCliTokenUsage, acpContentText, assertAcpTurnFinished, assertSealedNativeHome, assertSealedNativeSearchPath, brokerInteractionTools, buildFileUrl, codexDeveloperInstructionArgs, createExecutionState, createRepeatedToolFailureGuard, deriveFilePart, deterministicFilePartId, directStdioMcpServers, enabledInteractionKinds, endFailedTurn, executionCorrelationHeaders, 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, recordTurnInterruption, 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 };
|
|
@@ -2367,6 +2367,7 @@ var CliAdapterSessions = class extends CliAdapterProfile {
|
|
|
2367
2367
|
this.ensureInitialized();
|
|
2368
2368
|
const result = await forkSessionWithMessages(this.getSessionStore(), this.getMessageStore(), options.sessionId, {
|
|
2369
2369
|
id: options.targetSessionId,
|
|
2370
|
+
copyOnWrite: process.env.SESSION_FORK_COW === "true",
|
|
2370
2371
|
messageId: options.messageId,
|
|
2371
2372
|
workspaceRoot: options.workspaceRoot
|
|
2372
2373
|
});
|
|
@@ -4946,4 +4947,4 @@ async function forgetSessionScopes(target) {
|
|
|
4946
4947
|
//#endregion
|
|
4947
4948
|
export { secretSessionTurnQueue as $, TurnObserver as A, EXECUTION_ID_HEADER as At, readEphemeralContext as B, textDeltaEvents as Bt, plaintextResponseParser as C, InvalidAttachmentError as Ct, readCliTokenUsage as D, wasNeverLaunched as Dt, parseCliUsageLine as E, rejectNotLaunched as Et, isLocalMcpConfig as F, mapAcpSessionUpdate as Ft, SHARED_WORKSPACE_DIR_ENV as G, ACP_MIN_PROTOCOL_VERSION as Gt, turnInteractionEnabled as H, toolResultEvents as Ht, localMcpArgv as I, finalTextEvent as It, isLoopbackEndpoint as J, assertAcpTurnFinished as Jt, assertSealedNativeSearchPath as K, ACP_PROTOCOL_VERSION as Kt, localMcpEnv as L, reasoningEvents as Lt, endFailedTurn as M, MANAGED_QUOTE_VERSION_HEADER as Mt, recordTurnInterruption as N, executionCorrelationHeaders as Nt, recordCliTokenUsage as O, runtimeSecretsOverlay as Ot, createExecutionState as P, homeXdgEnv as Pt, resolveReferences as Q, enabledInteractionKinds as R, sessionObservedEvents as Rt, jsonEventParser as S, trackFilePart as St, accumulateCliTokenUsage as T, failureAfterCleanup as Tt, withEphemeralContext as U, toolStartEvents as Ut, turnEndReason as V, textSnapshotEvents as Vt, withTurnInteractions as W, trackReasoningBlock as Wt, joinQueue as X, isPlainRecord as Y, spawnAcpBridge as Yt, requireRecord as Z, TerminalPlanSupport as _, prependPromptSection as _t, SECRET_REFERENCE$1 as a, NATIVE_SESSION_CONTRACTS$1 as at, brokerInteractionTools$1 as b, deterministicFilePartId as bt, forgetSessionScopes as c, isTrustedStoreBinary as ct, findRouterCatalogEntry as d, resolveExecutableRealpath as dt, servableMcpServer as et, resolveRouterModelLimits as f, MAX_INLINE_IMAGE_BYTES as ft, McpInteractionSupport as g, preparePromptInputParts as gt, nativeEffortArgs as h, partitionImageAttachments as ht, PERMISSION_DECISION_TIMEOUT_MS as i, untilSettledOrAborted as it, createRepeatedToolFailureGuard as j, EXECUTION_TRACE_HEADER as jt, CliProviderAdapterBase as k, EXECUTION_CORRELATION_HEADERS as kt, secretMcpScope as l, provenStoreBinary as lt, kimiThinkingArgs as m, PROMPT_SECTION_SEPARATOR as mt, InteractionBroker$1 as n, sharedSecretMcpRefused as nt, SECRET_REFERENCE_PREFIX$1 as o, SEALED_NATIVE_HOME_LAYOUT as ot, resolveRouterModelReasoningEfforts as p, MAX_TOTAL_INLINE_IMAGE_BYTES as pt, directStdioMcpServers as q, acpContentText as qt, InteractionHttpBridge as r, spawnUnderSecretMcpLease as rt, codexDeveloperInstructionArgs as s, assertSealedNativeHome as st, CODEX_DISABLED_FEATURE_ARGS as t, servableStdioServer as tt, ROUTER_MODEL_CATALOG_TIMEOUT_MS as u, refuseSecretLaunch as ut, DEFAULT_INTERACTION_MCP_SERVER_NAME as v, buildFileUrl as vt, AcpProviderAdapterBase as w, SessionRehydrationError as wt, interactionMcpToolName as x, inferMediaType as xt, InteractionMcpServer$1 as y, deriveFilePart as yt, interactionToggleEnabled as z, streamPartBase as zt };
|
|
4948
4949
|
|
|
4949
|
-
//# sourceMappingURL=src-
|
|
4950
|
+
//# sourceMappingURL=src-BjWuYvIc.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.132",
|
|
4
4
|
"description": "Base adapter for CLI-based AI agent providers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
61
61
|
"@tangle-network/agent-core": "^1.0.3",
|
|
62
62
|
"@tangle-network/agent-interface": "^5.10.28",
|
|
63
|
-
"@tangle-network/agent-profile-materialize": "1.1.
|
|
63
|
+
"@tangle-network/agent-profile-materialize": "1.1.144",
|
|
64
64
|
"@tangle-network/agent-trace-contract": "^2.2.0",
|
|
65
|
-
"@tangle-network/cli-agent-registry": "0.15.
|
|
65
|
+
"@tangle-network/cli-agent-registry": "0.15.126",
|
|
66
66
|
"@tangle-network/sdk-cli-runner": "0.3.14",
|
|
67
|
-
"@tangle-network/sdk-session-persistence": "0.7.
|
|
67
|
+
"@tangle-network/sdk-session-persistence": "0.7.16",
|
|
68
68
|
"zod": "4.6.7"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"registry": "https://registry.npmjs.org"
|
|
80
80
|
},
|
|
81
81
|
"tangleRelease": {
|
|
82
|
-
"sourceSha": "
|
|
83
|
-
"mergedAt": "2026-11-19T18:
|
|
82
|
+
"sourceSha": "4ff41a929144ee1fe61c013253eeb73837d9e061",
|
|
83
|
+
"mergedAt": "2026-11-19T18:41:18-08:00"
|
|
84
84
|
},
|
|
85
85
|
"scripts": {
|
|
86
86
|
"build": "tsdown",
|