neoctl 0.2.55 → 0.2.56
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.md +58 -58
- package/dist/context/compaction.js +2 -1
- package/dist/context/compaction.js.map +1 -1
- package/dist/context/context-manager.d.ts +7 -1
- package/dist/context/context-manager.js +0 -1
- package/dist/context/context-manager.js.map +1 -1
- package/dist/context/system.md +16 -16
- package/dist/core/execution-state.js +3 -3
- package/dist/core/execution-state.js.map +1 -1
- package/dist/core/message-pipeline.d.ts +3 -0
- package/dist/core/message-pipeline.js +31 -23
- package/dist/core/message-pipeline.js.map +1 -1
- package/dist/core/query-engine.js +31 -23
- package/dist/core/query-engine.js.map +1 -1
- package/dist/core/query.d.ts +3 -1
- package/dist/core/query.js +29 -7
- package/dist/core/query.js.map +1 -1
- package/dist/core/run-agent.d.ts +1 -0
- package/dist/core/run-agent.js +1 -0
- package/dist/core/run-agent.js.map +1 -1
- package/dist/execution/filesystem.js +22 -22
- package/dist/execution/process.js +44 -44
- package/dist/model/anthropic-mapper.d.ts +4 -0
- package/dist/model/anthropic-mapper.js +84 -9
- package/dist/model/anthropic-mapper.js.map +1 -1
- package/dist/model/model-gateway.d.ts +4 -0
- package/dist/model/model-gateway.js +1 -0
- package/dist/model/model-gateway.js.map +1 -1
- package/dist/model/model-metadata.json +144 -144
- package/dist/model/openai-chat-mapper.js +45 -12
- package/dist/model/openai-chat-mapper.js.map +1 -1
- package/dist/model/openai-responses-mapper.js +70 -17
- package/dist/model/openai-responses-mapper.js.map +1 -1
- package/dist/model/thinking-lifecycle.d.ts +5 -0
- package/dist/model/thinking-lifecycle.js +43 -0
- package/dist/model/thinking-lifecycle.js.map +1 -0
- package/dist/repl/index.js +4 -0
- package/dist/repl/index.js.map +1 -1
- package/dist/types/events.d.ts +2 -0
- package/dist/web/index.d.ts +2 -0
- package/dist/web/index.js +31 -2
- package/dist/web/index.js.map +1 -1
- package/docs/prompt-config.md +86 -86
- package/package.json +96 -96
- package/scripts/copy-prompt-resources.mjs +5 -5
package/dist/types/events.d.ts
CHANGED
package/dist/web/index.d.ts
CHANGED
package/dist/web/index.js
CHANGED
|
@@ -2211,7 +2211,23 @@ export class WebRepl {
|
|
|
2211
2211
|
// two-second playback and must not be interrupted by the next request.
|
|
2212
2212
|
if (event.type === "state" && event.phase === "calling_model")
|
|
2213
2213
|
this.previousTurnToolId = undefined;
|
|
2214
|
+
// End thinking before publishing the next operation, even for custom/legacy
|
|
2215
|
+
// gateways that did not emit an explicit boundary. Keep the text for history.
|
|
2216
|
+
const endsThinking = event.type === "thinking.done" || event.type === "assistant.output.done"
|
|
2217
|
+
|| (event.type === "assistant.delta" && !!event.text)
|
|
2218
|
+
|| (event.type === "message" && event.message.role === "assistant")
|
|
2219
|
+
|| event.type === "tool_call.started" || event.type === "tool_call.input" || event.type === "tool_call.delta" || event.type === "tool_call.ready"
|
|
2220
|
+
|| event.type === "tool.started" || event.type === "retrying" || event.type === "error" || event.type === "terminal"
|
|
2221
|
+
|| (event.type === "state" && event.phase !== "thinking");
|
|
2222
|
+
if (endsThinking)
|
|
2223
|
+
this.reduce({ type: "thinking.done" });
|
|
2214
2224
|
this.reduce(event);
|
|
2225
|
+
if (endsThinking)
|
|
2226
|
+
this.finalizeThinkingLine();
|
|
2227
|
+
if (event.type === "thinking.done") {
|
|
2228
|
+
this.broadcastSync();
|
|
2229
|
+
return;
|
|
2230
|
+
}
|
|
2215
2231
|
if (event.type === "timing.updated") {
|
|
2216
2232
|
if (event.timing.kind === "tool") {
|
|
2217
2233
|
const line = this.lines.find(item => item.timing?.id === event.timing.id)
|
|
@@ -2293,7 +2309,15 @@ export class WebRepl {
|
|
|
2293
2309
|
return;
|
|
2294
2310
|
}
|
|
2295
2311
|
if (event.type === "thinking.delta") {
|
|
2312
|
+
if (!event.text)
|
|
2313
|
+
return;
|
|
2296
2314
|
const id = this.thinkingLineId ?? this.finalizedThinkingLineId ?? this.append(thinkingLine("", true), true);
|
|
2315
|
+
// Responses may deliver several summary parts with their own done frames.
|
|
2316
|
+
// Reusing the row must reactivate it only while the next part is arriving.
|
|
2317
|
+
if (this.thinkingLineId === undefined && this.finalizedThinkingLineId !== undefined) {
|
|
2318
|
+
this.lines = this.lines.map(line => line.id === id ? { ...line, live: true } : line);
|
|
2319
|
+
this.queueDeltaOperation({ type: "line.patch", id, patch: { live: true } });
|
|
2320
|
+
}
|
|
2297
2321
|
this.thinkingLineId = id;
|
|
2298
2322
|
this.finalizedThinkingLineId = undefined;
|
|
2299
2323
|
this.appendLineText(id, event.text);
|
|
@@ -3422,8 +3446,12 @@ function reduceStatus(status, event) {
|
|
|
3422
3446
|
return status;
|
|
3423
3447
|
if (event.type === "assistant.delta")
|
|
3424
3448
|
return { ...status, phase: "calling_model", modelOutput: { kind: "text" }, streamedOutputTokens: status.streamedOutputTokens + estimateTokens(event.text), outputTokenUpdatedAt: Date.now(), activityTick: status.activityTick + 1 };
|
|
3449
|
+
if (event.type === "thinking.done")
|
|
3450
|
+
return status.phase === "thinking" || status.modelOutput?.kind === "thinking" ? { ...status, phase: "calling_model", modelOutput: undefined, activityTick: status.activityTick + 1 } : status;
|
|
3451
|
+
if (event.type === "thinking.delta" && !event.text)
|
|
3452
|
+
return status;
|
|
3425
3453
|
if (event.type === "thinking.delta")
|
|
3426
|
-
return { ...status, phase: "thinking", modelOutput:
|
|
3454
|
+
return { ...status, phase: "thinking", modelOutput: { kind: "thinking" }, streamedOutputTokens: status.streamedOutputTokens + estimateTokens(event.text), outputTokenUpdatedAt: Date.now(), activityTick: status.activityTick + 1 };
|
|
3427
3455
|
if (event.type === "tool_call.started")
|
|
3428
3456
|
return { ...status, phase: "calling_model", modelOutput: { kind: "tool_call", callId: event.callId, name: event.name }, activityTick: status.activityTick + 1 };
|
|
3429
3457
|
if (event.type === "tool_call.delta")
|
|
@@ -3768,7 +3796,8 @@ function renderMessage(message, append, activeAssistantId, options = {}) {
|
|
|
3768
3796
|
rendered = true;
|
|
3769
3797
|
}
|
|
3770
3798
|
else if (block.type === "thinking") {
|
|
3771
|
-
|
|
3799
|
+
// Signed/opaque history may legitimately contain no readable summary.
|
|
3800
|
+
if (options.includeThinkingBlocks === false || !block.text.trim())
|
|
3772
3801
|
continue;
|
|
3773
3802
|
append({ ...thinkingLine(block.text), messageId: message.id });
|
|
3774
3803
|
rendered = true;
|