@dan-ai-studio/dshopencodego 0.1.87 → 0.1.89
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/README.en.md +5 -5
- package/README.md +5 -5
- package/lib/client.js +148 -27
- package/lib/index.js +767 -257
- package/lib/types/request-log/store.d.ts +54 -0
- package/package.json +29 -29
|
@@ -125,6 +125,36 @@ export interface RequestLogEntry {
|
|
|
125
125
|
* misreport a buffered reply as infinitely quick.
|
|
126
126
|
*/
|
|
127
127
|
readonly tps?: number;
|
|
128
|
+
/**
|
|
129
|
+
* Tools this request actually invoked, in first-seen order with call
|
|
130
|
+
* counts. Declarations live in `shape.tools`; this names what ran, so a
|
|
131
|
+
* row reads like the Harness's own per-turn execution summary. Absent
|
|
132
|
+
* when the request invoked nothing. Capped — a pathological turn cannot
|
|
133
|
+
* grow a bounded row.
|
|
134
|
+
*/
|
|
135
|
+
readonly toolCalls?: ReadonlyArray<{
|
|
136
|
+
readonly name: string;
|
|
137
|
+
readonly count: number;
|
|
138
|
+
}>;
|
|
139
|
+
/**
|
|
140
|
+
* Conservative input estimate the adapter fitted against, in tokens. An
|
|
141
|
+
* upper bound, not a count: the gateway's tokenizer is unknown, so the
|
|
142
|
+
* estimate only ever overstates. Absent when the request failed before
|
|
143
|
+
* fitting ran.
|
|
144
|
+
*/
|
|
145
|
+
readonly estimatedInputTokens?: number;
|
|
146
|
+
/**
|
|
147
|
+
* The output cap actually sent on the wire, in tokens. Absent when the
|
|
148
|
+
* call sent none (caller and route both silent) or failed before
|
|
149
|
+
* fitting ran.
|
|
150
|
+
*/
|
|
151
|
+
readonly fittedMaxTokens?: number;
|
|
152
|
+
/**
|
|
153
|
+
* Present only when the fitted cap sits below what was asked: the input
|
|
154
|
+
* plus the requested output would not fit the window, so this call went
|
|
155
|
+
* out smaller instead of taking a gateway 400.
|
|
156
|
+
*/
|
|
157
|
+
readonly maxTokensClamped?: boolean;
|
|
128
158
|
/**
|
|
129
159
|
* Whether the request is still in flight. Present only while it runs:
|
|
130
160
|
* `finish` removes it. A running row always reads `ok: false` with no
|
|
@@ -191,6 +221,12 @@ export interface RequestLogGates {
|
|
|
191
221
|
/** How many entries to keep; the ring trims to it on every append. */
|
|
192
222
|
readonly maxEntries: () => number;
|
|
193
223
|
}
|
|
224
|
+
/**
|
|
225
|
+
* How many distinct tool names one row keeps. Past the cap extra tools
|
|
226
|
+
* are still executed — only the record stops naming them — so a turn
|
|
227
|
+
* that fans out across dozens of tools cannot grow a bounded row.
|
|
228
|
+
*/
|
|
229
|
+
export declare const MAX_TOOL_CALLS = 32;
|
|
194
230
|
/**
|
|
195
231
|
* How many streaming timestamps one row keeps at most. Past the cap the
|
|
196
232
|
* trail simply stops growing: the newest marks matter more than the oldest
|
|
@@ -249,6 +285,24 @@ export interface RequestSpan {
|
|
|
249
285
|
* `finish`; a second call keeps the first.
|
|
250
286
|
*/
|
|
251
287
|
identify(protocol: WireProtocol): void;
|
|
288
|
+
/**
|
|
289
|
+
* Count one invoked tool by name, in first-seen order. Called once per
|
|
290
|
+
* completed tool call the stream carries; a second sighting of the same
|
|
291
|
+
* name bumps its count instead of appending. Past the distinct-name cap
|
|
292
|
+
* extra tools are ignored by the record, never by the request.
|
|
293
|
+
*/
|
|
294
|
+
toolCall(name: string): void;
|
|
295
|
+
/**
|
|
296
|
+
* Record the context fit this request was sent under. Called once, with
|
|
297
|
+
* the estimate and the cap the adapter actually sent; first call wins,
|
|
298
|
+
* like the wire line. A clamped cap is flagged so the row explains a
|
|
299
|
+
* shorter-than-asked reply.
|
|
300
|
+
* @param inputTokens - the conservative input estimate, in tokens.
|
|
301
|
+
* @param maxTokens - the output cap sent on the wire, or undefined when
|
|
302
|
+
* the call sent none.
|
|
303
|
+
* @param clamped - whether the cap sits below what was asked.
|
|
304
|
+
*/
|
|
305
|
+
fit(inputTokens: number, maxTokens: number | undefined, clamped: boolean): void;
|
|
252
306
|
/**
|
|
253
307
|
* Close the span and complete its running row in place.
|
|
254
308
|
* @param ok - whether the request completed.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dan-ai-studio/dshopencodego",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.89",
|
|
4
4
|
"description": "OpenCode Go provider for DeepSeek Harness: live gateway catalog, per-conversation session header, usage",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"prepack": "npm run build"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
|
-
"@deepseek-ai/cordis": "4.0.4 || 4.0.5-alpha.1 || 4.0.5-alpha.2 || 4.0.5",
|
|
74
|
+
"@deepseek-ai/cordis": "4.0.4 || 4.0.5-alpha.1 || 4.0.5-alpha.2 || 4.0.5 || 4.0.6-alpha.1 || 4.0.6-alpha.2",
|
|
75
75
|
"@deepseek-ai/dsh-api-remotes": ">=0.2.0-rc.1 <0.3.0-0",
|
|
76
76
|
"@deepseek-ai/dsh-attachment": ">=0.2.0-rc.1 <0.3.0-0",
|
|
77
77
|
"@deepseek-ai/dsh-brand": ">=0.2.0-rc.1 <0.3.0-0",
|
|
@@ -123,33 +123,33 @@
|
|
|
123
123
|
}
|
|
124
124
|
},
|
|
125
125
|
"devDependencies": {
|
|
126
|
-
"@deepseek-ai/cordis": "4.0.
|
|
127
|
-
"@deepseek-ai/dsh-api-remotes": "0.2.
|
|
128
|
-
"@deepseek-ai/dsh-attachment": "0.2.
|
|
129
|
-
"@deepseek-ai/dsh-brand": "0.2.
|
|
130
|
-
"@deepseek-ai/dsh-client-locale": "0.2.
|
|
131
|
-
"@deepseek-ai/dsh-client-store": "0.2.
|
|
132
|
-
"@deepseek-ai/dsh-client-ui-conversation": "0.2.
|
|
133
|
-
"@deepseek-ai/dsh-client-ui-layout": "0.2.
|
|
134
|
-
"@deepseek-ai/dsh-client-ui-model-selection": "0.2.
|
|
135
|
-
"@deepseek-ai/dsh-client-ui-primitives": "0.2.
|
|
136
|
-
"@deepseek-ai/dsh-client-ui-renderer": "0.2.
|
|
137
|
-
"@deepseek-ai/dsh-client-ui-settings": "0.2.
|
|
138
|
-
"@deepseek-ai/dsh-client-ui-sidebar": "0.2.
|
|
139
|
-
"@deepseek-ai/dsh-client-ui-slots": "0.2.
|
|
140
|
-
"@deepseek-ai/dsh-credentials": "0.2.
|
|
141
|
-
"@deepseek-ai/dsh-fs": "0.2.
|
|
142
|
-
"@deepseek-ai/dsh-launch-environment": "0.2.
|
|
143
|
-
"@deepseek-ai/dsh-llm": "0.2.
|
|
144
|
-
"@deepseek-ai/dsh-sandbox": "0.2.
|
|
145
|
-
"@deepseek-ai/dsh-scope": "0.2.
|
|
146
|
-
"@deepseek-ai/dsh-session": "0.2.
|
|
147
|
-
"@deepseek-ai/dsh-settings": "0.2.
|
|
148
|
-
"@deepseek-ai/dsh-timeout": "0.2.
|
|
149
|
-
"@deepseek-ai/dsh-typert-protocol": "0.2.
|
|
150
|
-
"@deepseek-ai/dsh-typert-registry": "0.2.
|
|
151
|
-
"@deepseek-ai/schemastery": "~3.18.
|
|
152
|
-
"@earendil-works/pi-ai": "
|
|
126
|
+
"@deepseek-ai/cordis": "4.0.6-alpha.2",
|
|
127
|
+
"@deepseek-ai/dsh-api-remotes": "0.2.2-alpha.3",
|
|
128
|
+
"@deepseek-ai/dsh-attachment": "0.2.2-alpha.3",
|
|
129
|
+
"@deepseek-ai/dsh-brand": "0.2.2-alpha.3",
|
|
130
|
+
"@deepseek-ai/dsh-client-locale": "0.2.2-alpha.3",
|
|
131
|
+
"@deepseek-ai/dsh-client-store": "0.2.2-alpha.3",
|
|
132
|
+
"@deepseek-ai/dsh-client-ui-conversation": "0.2.2-alpha.3",
|
|
133
|
+
"@deepseek-ai/dsh-client-ui-layout": "0.2.2-alpha.3",
|
|
134
|
+
"@deepseek-ai/dsh-client-ui-model-selection": "0.2.2-alpha.3",
|
|
135
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.2.2-alpha.3",
|
|
136
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.2.2-alpha.3",
|
|
137
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.2.2-alpha.3",
|
|
138
|
+
"@deepseek-ai/dsh-client-ui-sidebar": "0.2.2-alpha.3",
|
|
139
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.2.2-alpha.3",
|
|
140
|
+
"@deepseek-ai/dsh-credentials": "0.2.2-alpha.3",
|
|
141
|
+
"@deepseek-ai/dsh-fs": "0.2.2-alpha.3",
|
|
142
|
+
"@deepseek-ai/dsh-launch-environment": "0.2.2-alpha.3",
|
|
143
|
+
"@deepseek-ai/dsh-llm": "0.2.2-alpha.3",
|
|
144
|
+
"@deepseek-ai/dsh-sandbox": "0.2.2-alpha.3",
|
|
145
|
+
"@deepseek-ai/dsh-scope": "0.2.2-alpha.3",
|
|
146
|
+
"@deepseek-ai/dsh-session": "0.2.2-alpha.3",
|
|
147
|
+
"@deepseek-ai/dsh-settings": "0.2.2-alpha.3",
|
|
148
|
+
"@deepseek-ai/dsh-timeout": "0.2.2-alpha.3",
|
|
149
|
+
"@deepseek-ai/dsh-typert-protocol": "0.2.2-alpha.3",
|
|
150
|
+
"@deepseek-ai/dsh-typert-registry": "0.2.2-alpha.3",
|
|
151
|
+
"@deepseek-ai/schemastery": "~3.18.6-alpha.2",
|
|
152
|
+
"@earendil-works/pi-ai": "1.5.0",
|
|
153
153
|
"@testing-library/dom": "^10.4.1",
|
|
154
154
|
"@testing-library/react": "^16.3.0",
|
|
155
155
|
"@types/node": "^22.20.0",
|