@tangle-network/sdk-provider-cli-base 0.13.133 → 0.13.135
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.
|
@@ -38,7 +38,7 @@ interface NanocodeConfig extends CliProviderConfig {
|
|
|
38
38
|
/** Extra flags appended before the terminal positional prompt. */
|
|
39
39
|
extraFlags?: string[];
|
|
40
40
|
}
|
|
41
|
-
/**
|
|
41
|
+
/** Text in a decoded chunk of the native assistant's stdout. */
|
|
42
42
|
interface NanocodeTextEvent {
|
|
43
43
|
type: "text";
|
|
44
44
|
line: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bt as textDeltaEvents, 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";
|
|
@@ -57,35 +57,28 @@ var NanocodeProviderAdapter = class extends CliProviderAdapterBase {
|
|
|
57
57
|
}
|
|
58
58
|
async afterCliProcessExit(params) {
|
|
59
59
|
const sessionId = parseNanocodeSessionId(params.stderr);
|
|
60
|
-
if (
|
|
61
|
-
|
|
60
|
+
if (sessionId) for (const event of sessionObservedEvents(params.state, "nanocode", sessionId)) params.onEvent?.(event);
|
|
61
|
+
if (params.exit.success && params.state.textBuffer) params.onEvent?.({
|
|
62
|
+
type: "status",
|
|
63
|
+
status: "completed"
|
|
64
|
+
});
|
|
62
65
|
}
|
|
63
66
|
createEventParser(state, onEvent) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
} : {
|
|
67
|
+
let whitespace = "";
|
|
68
|
+
return {
|
|
69
|
+
parseAs: "chunks",
|
|
70
|
+
transform: (raw) => ({
|
|
69
71
|
type: "text",
|
|
70
|
-
line
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
type: "warning",
|
|
81
|
-
code: "NANOCODE_ERROR",
|
|
82
|
-
message: event.message
|
|
83
|
-
}];
|
|
84
|
-
case "session": return [];
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
emptyFailureDetail: "nanocode exited without producing a response body"
|
|
88
|
-
});
|
|
72
|
+
line: String(raw)
|
|
73
|
+
}),
|
|
74
|
+
onEvent: (event) => {
|
|
75
|
+
if (event.type !== "text") return;
|
|
76
|
+
const chunk = whitespace + event.line;
|
|
77
|
+
const text = chunk.trimEnd();
|
|
78
|
+
whitespace = chunk.slice(text.length);
|
|
79
|
+
if (text) for (const delta of textDeltaEvents(state, text)) onEvent?.(delta);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
89
82
|
}
|
|
90
83
|
};
|
|
91
84
|
/** nanocode's catalog is the Router's `/models`, keyed `provider/model`; the
|
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.135",
|
|
4
4
|
"description": "Base adapter for CLI-based AI agent providers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
@@ -60,10 +60,10 @@
|
|
|
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.145",
|
|
64
64
|
"@tangle-network/agent-trace-contract": "^2.2.0",
|
|
65
|
-
"@tangle-network/cli-agent-registry": "0.15.
|
|
66
|
-
"@tangle-network/sdk-cli-runner": "0.3.
|
|
65
|
+
"@tangle-network/cli-agent-registry": "0.15.128",
|
|
66
|
+
"@tangle-network/sdk-cli-runner": "0.3.15",
|
|
67
67
|
"@tangle-network/sdk-session-persistence": "0.7.16",
|
|
68
68
|
"zod": "4.6.7"
|
|
69
69
|
},
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"registry": "https://registry.npmjs.org"
|
|
80
80
|
},
|
|
81
81
|
"tangleRelease": {
|
|
82
|
-
"sourceSha": "
|
|
83
|
-
"mergedAt": "2026-11-
|
|
82
|
+
"sourceSha": "51b269bed8de37eb53a80b87424adfd869bb1de9",
|
|
83
|
+
"mergedAt": "2026-11-19T20:08:54-08:00"
|
|
84
84
|
},
|
|
85
85
|
"scripts": {
|
|
86
86
|
"build": "tsdown",
|