neoctl 0.2.56 → 0.2.58
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/agents/agent-tool.js +1 -0
- package/dist/agents/agent-tool.js.map +1 -1
- package/dist/agents/local-agent-task.d.ts +1 -0
- package/dist/agents/local-agent-task.js.map +1 -1
- package/dist/context/compaction.d.ts +3 -0
- package/dist/context/compaction.js +2 -0
- package/dist/context/compaction.js.map +1 -1
- package/dist/context/system.md +18 -16
- package/dist/core/compaction-progress.d.ts +3 -1
- package/dist/core/compaction-progress.js +5 -0
- package/dist/core/compaction-progress.js.map +1 -1
- package/dist/core/query-engine.d.ts +5 -0
- package/dist/core/query-engine.js +30 -8
- package/dist/core/query-engine.js.map +1 -1
- package/dist/core/query.d.ts +4 -1
- package/dist/core/query.js +23 -8
- 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-adapter.js +9 -15
- package/dist/model/anthropic-adapter.js.map +1 -1
- package/dist/model/anthropic-mapper.js +5 -1
- package/dist/model/anthropic-mapper.js.map +1 -1
- package/dist/model/fast-mode.d.ts +6 -0
- package/dist/model/fast-mode.js +36 -0
- package/dist/model/fast-mode.js.map +1 -0
- package/dist/model/model-gateway.d.ts +4 -0
- package/dist/model/model-gateway.js.map +1 -1
- package/dist/model/model-metadata.json +144 -144
- package/dist/model/openai-adapter.js +5 -3
- package/dist/model/openai-adapter.js.map +1 -1
- package/dist/model/openai-chat-mapper.js +1 -1
- package/dist/model/openai-chat-mapper.js.map +1 -1
- package/dist/model/openai-responses-mapper.js +1 -1
- package/dist/model/openai-responses-mapper.js.map +1 -1
- package/dist/model/retry-policy.d.ts +5 -0
- package/dist/model/retry-policy.js +17 -0
- package/dist/model/retry-policy.js.map +1 -0
- package/dist/model/retry-runner.d.ts +4 -1
- package/dist/model/retry-runner.js +11 -11
- package/dist/model/retry-runner.js.map +1 -1
- package/dist/repl/index.js +1 -1
- package/dist/session/session-store.d.ts +2 -0
- package/dist/session/session-store.js +5 -1
- package/dist/session/session-store.js.map +1 -1
- package/dist/tasks/task-persistence.js +1 -0
- package/dist/tasks/task-persistence.js.map +1 -1
- package/dist/tools/builtins/framework-feedback-tool.d.ts +1 -1
- package/dist/tools/builtins/framework-feedback-tool.js +4 -4
- package/dist/tools/builtins/framework-feedback-tool.js.map +1 -1
- package/dist/tools/registry.d.ts +2 -2
- package/dist/tools/registry.js +3 -3
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/tool.d.ts +1 -0
- package/dist/tools/tool.js.map +1 -1
- package/dist/types/events.d.ts +3 -0
- package/dist/web/index.d.ts +2 -0
- package/dist/web/index.js +26 -9
- 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
|
@@ -735,6 +735,7 @@ export declare class WebRepl {
|
|
|
735
735
|
sessionPrompt?: import("../core/session-settings-prompt.js").SessionPromptState | null;
|
|
736
736
|
};
|
|
737
737
|
fastMode: boolean;
|
|
738
|
+
fastModeRevision: number;
|
|
738
739
|
appPrompt: import("../app/app-prompt.js").AppPromptSnapshot;
|
|
739
740
|
catalog: {
|
|
740
741
|
commands: import("../repl/commands.js").ReplCommandDefinition[];
|
|
@@ -873,6 +874,7 @@ export declare class WebRepl {
|
|
|
873
874
|
setFastMode(enabled: boolean): Promise<WebActionResult<{
|
|
874
875
|
fastMode: boolean;
|
|
875
876
|
deferred: boolean;
|
|
877
|
+
fastModeRevision: number;
|
|
876
878
|
}>>;
|
|
877
879
|
setContextWindowK(value: unknown): Promise<WebActionResult<{
|
|
878
880
|
contextWindowK: number;
|
package/dist/web/index.js
CHANGED
|
@@ -937,6 +937,7 @@ export class WebRepl {
|
|
|
937
937
|
modelSettings: { model: engineSnapshot.model, reasoning: engineSnapshot.reasoning, imageInput: findModelMetadata(engineSnapshot.model || "")?.imageInput },
|
|
938
938
|
pendingSessionSettings,
|
|
939
939
|
fastMode: this.runtime.engine.isFastMode(),
|
|
940
|
+
fastModeRevision: engineSnapshot.fastModeRevision,
|
|
940
941
|
appPrompt: this.runtime.engine.getAppPrompt(),
|
|
941
942
|
catalog: webCatalog(this.runtime),
|
|
942
943
|
interactive: includeCatalog ? webInteractiveCatalog(this.runtime) : undefined,
|
|
@@ -1503,7 +1504,7 @@ export class WebRepl {
|
|
|
1503
1504
|
const { deferred } = await engine.updateSessionSettings({ fastMode: enabled });
|
|
1504
1505
|
if (this.runtime.engine === engine)
|
|
1505
1506
|
this.broadcastSync();
|
|
1506
|
-
return { ok: true, fastMode:
|
|
1507
|
+
return { ok: true, fastMode: engine.getPendingSessionSettings().fastMode ?? engine.isFastMode(), deferred, fastModeRevision: engine.getFastModeRevision() };
|
|
1507
1508
|
}
|
|
1508
1509
|
catch (error) {
|
|
1509
1510
|
return actionFailure("FAST_MODE_UPDATE_FAILED", error instanceof Error ? error.message : String(error));
|
|
@@ -1605,7 +1606,10 @@ export class WebRepl {
|
|
|
1605
1606
|
}
|
|
1606
1607
|
try {
|
|
1607
1608
|
// An idle click executes now through the settings barrier, not the chat/input queue.
|
|
1608
|
-
const result = await engine.updateSessionSettings({ compact: true }, { abortSignal: controller?.signal,
|
|
1609
|
+
const result = await engine.updateSessionSettings({ compact: true }, { abortSignal: controller?.signal, onRetry: event => {
|
|
1610
|
+
if (showProgress && this.runtime.engine === engine && this.foregroundRunToken === runToken && !controller?.signal.aborted)
|
|
1611
|
+
this.handleEvent(event);
|
|
1612
|
+
}, onCompactionDelta: text => {
|
|
1609
1613
|
if (showProgress && this.runtime.engine === engine && this.foregroundRunToken === runToken && !controller?.signal.aborted) {
|
|
1610
1614
|
this.handleEvent({ type: "context.compaction.delta", text });
|
|
1611
1615
|
}
|
|
@@ -2293,6 +2297,12 @@ export class WebRepl {
|
|
|
2293
2297
|
this.appendCompaction(event.compaction);
|
|
2294
2298
|
return;
|
|
2295
2299
|
}
|
|
2300
|
+
if (event.type === "fast-mode.fallback") {
|
|
2301
|
+
this.broadcastSync();
|
|
2302
|
+
for (const subscriber of this.subscribers)
|
|
2303
|
+
this.send(subscriber, "fast-mode.fallback", { revision: event.revision, sessionId: this.runtime.engine.snapshot().session?.sessionId });
|
|
2304
|
+
return;
|
|
2305
|
+
}
|
|
2296
2306
|
if (event.type === "state" || event.type === "context.metrics" || event.type === "usage" || event.type === "retrying") {
|
|
2297
2307
|
this.broadcastSync();
|
|
2298
2308
|
return;
|
|
@@ -2573,7 +2583,7 @@ export class WebRepl {
|
|
|
2573
2583
|
if (this.runtime.engine !== engine)
|
|
2574
2584
|
continue;
|
|
2575
2585
|
if (this.suppressReattachedStreaming.has(engine)) {
|
|
2576
|
-
if (event.type === "message" || event.type === "terminal" || event.type === "error" || event.type === "context.metrics" || event.type === "usage" || event.type === "timing.updated") {
|
|
2586
|
+
if (event.type === "message" || event.type === "terminal" || event.type === "error" || event.type === "context.metrics" || event.type === "usage" || event.type === "timing.updated" || event.type === "fast-mode.fallback") {
|
|
2577
2587
|
if (event.type === "message" || event.type === "terminal" || event.type === "error")
|
|
2578
2588
|
this.suppressReattachedStreaming.delete(engine);
|
|
2579
2589
|
this.handleEvent(event);
|
|
@@ -2664,6 +2674,8 @@ export class WebRepl {
|
|
|
2664
2674
|
if (subscriber.blocked) {
|
|
2665
2675
|
if (event === "client.reload")
|
|
2666
2676
|
subscriber.pendingClientReload = data;
|
|
2677
|
+
else if (event === "fast-mode.fallback")
|
|
2678
|
+
subscriber.pendingFastModeFallback = data;
|
|
2667
2679
|
else if (event === "runtime.context")
|
|
2668
2680
|
subscriber.needsRuntimeContext = true;
|
|
2669
2681
|
else
|
|
@@ -2688,6 +2700,11 @@ export class WebRepl {
|
|
|
2688
2700
|
subscriber.needsSync = false;
|
|
2689
2701
|
this.send(subscriber, "sync", this.snapshot(false));
|
|
2690
2702
|
}
|
|
2703
|
+
if (subscriber.pendingFastModeFallback) {
|
|
2704
|
+
const payload = subscriber.pendingFastModeFallback;
|
|
2705
|
+
subscriber.pendingFastModeFallback = undefined;
|
|
2706
|
+
this.send(subscriber, "fast-mode.fallback", payload);
|
|
2707
|
+
}
|
|
2691
2708
|
if (subscriber.needsRuntimeContext) {
|
|
2692
2709
|
subscriber.needsRuntimeContext = false;
|
|
2693
2710
|
this.publishRuntimeContext([subscriber]);
|
|
@@ -3429,7 +3446,7 @@ function toolStreamStepStatus(phase) {
|
|
|
3429
3446
|
}
|
|
3430
3447
|
function reduceStatus(status, event) {
|
|
3431
3448
|
if (event.type === "context.compaction.delta")
|
|
3432
|
-
return { ...status, phase: "compacting", compactionText: (status.compactionText || "") + event.text, activityTick: status.activityTick + 1 };
|
|
3449
|
+
return { ...status, retryCooldownUntil: undefined, phase: "compacting", compactionText: (status.compactionText || "") + event.text, activityTick: status.activityTick + 1 };
|
|
3433
3450
|
if (event.type === "state")
|
|
3434
3451
|
return { ...status, phase: event.phase, detail: event.detail, compactionText: event.phase === "compacting" && status.phase === "compacting" ? status.compactionText : undefined, modelOutput: undefined, currentTool: event.phase === "running_tools" ? status.currentTool : undefined, usage: event.phase === "preparing" ? undefined : status.usage, streamedOutputTokens: event.phase === "preparing" ? 0 : status.streamedOutputTokens, inputTokenUpdatedAt: event.phase === "preparing" ? undefined : status.inputTokenUpdatedAt, outputTokenUpdatedAt: event.phase === "preparing" ? undefined : status.outputTokenUpdatedAt, retryCooldownUntil: event.phase === "preparing" ? undefined : status.retryCooldownUntil, activityTick: status.activityTick + 1 };
|
|
3435
3452
|
if (event.type === "context.compacted")
|
|
@@ -3445,19 +3462,19 @@ function reduceStatus(status, event) {
|
|
|
3445
3462
|
if (event.type === "assistant.delta" && !event.text)
|
|
3446
3463
|
return status;
|
|
3447
3464
|
if (event.type === "assistant.delta")
|
|
3448
|
-
return { ...status, phase: "calling_model", modelOutput: { kind: "text" }, streamedOutputTokens: status.streamedOutputTokens + estimateTokens(event.text), outputTokenUpdatedAt: Date.now(), activityTick: status.activityTick + 1 };
|
|
3465
|
+
return { ...status, retryCooldownUntil: undefined, phase: "calling_model", modelOutput: { kind: "text" }, streamedOutputTokens: status.streamedOutputTokens + estimateTokens(event.text), outputTokenUpdatedAt: Date.now(), activityTick: status.activityTick + 1 };
|
|
3449
3466
|
if (event.type === "thinking.done")
|
|
3450
3467
|
return status.phase === "thinking" || status.modelOutput?.kind === "thinking" ? { ...status, phase: "calling_model", modelOutput: undefined, activityTick: status.activityTick + 1 } : status;
|
|
3451
3468
|
if (event.type === "thinking.delta" && !event.text)
|
|
3452
3469
|
return status;
|
|
3453
3470
|
if (event.type === "thinking.delta")
|
|
3454
|
-
return { ...status, phase: "thinking", modelOutput: { kind: "thinking" }, streamedOutputTokens: status.streamedOutputTokens + estimateTokens(event.text), outputTokenUpdatedAt: Date.now(), activityTick: status.activityTick + 1 };
|
|
3471
|
+
return { ...status, retryCooldownUntil: undefined, phase: "thinking", modelOutput: { kind: "thinking" }, streamedOutputTokens: status.streamedOutputTokens + estimateTokens(event.text), outputTokenUpdatedAt: Date.now(), activityTick: status.activityTick + 1 };
|
|
3455
3472
|
if (event.type === "tool_call.started")
|
|
3456
|
-
return { ...status, phase: "calling_model", modelOutput: { kind: "tool_call", callId: event.callId, name: event.name }, activityTick: status.activityTick + 1 };
|
|
3473
|
+
return { ...status, retryCooldownUntil: undefined, phase: "calling_model", modelOutput: { kind: "tool_call", callId: event.callId, name: event.name }, activityTick: status.activityTick + 1 };
|
|
3457
3474
|
if (event.type === "tool_call.delta")
|
|
3458
3475
|
return { ...status, phase: "calling_model", modelOutput: { kind: "tool_call", callId: event.callId, name: event.name ?? (status.modelOutput?.kind === "tool_call" && status.modelOutput.callId === event.callId ? status.modelOutput.name : undefined) }, streamedOutputTokens: status.streamedOutputTokens + estimateTokens(event.argumentsDelta), outputTokenUpdatedAt: Date.now(), activityTick: status.activityTick + 1 };
|
|
3459
3476
|
if (event.type === "retrying")
|
|
3460
|
-
return { ...status, phase: "calling_model", modelOutput: undefined, detail: `retrying in ${(event.delayMs / 1000).toFixed(1)}s`, retryCooldownUntil: Date.now() + event.delayMs, activityTick: status.activityTick + 1 };
|
|
3477
|
+
return { ...status, phase: status.phase === "compacting" ? "compacting" : "calling_model", modelOutput: undefined, detail: `retrying in ${(event.delayMs / 1000).toFixed(1)}s`, retryCooldownUntil: Date.now() + event.delayMs, activityTick: status.activityTick + 1 };
|
|
3461
3478
|
if (event.type === "tool.started")
|
|
3462
3479
|
return { ...status, phase: "running_tools", modelOutput: undefined, currentTool: { id: event.toolUse.id, name: event.toolUse.name, input: event.toolUse.input, startedAt: Date.now() }, activityTick: status.activityTick + 1 };
|
|
3463
3480
|
if (event.type === "tool.progress")
|
|
@@ -3581,7 +3598,7 @@ const SHARED_LOGIN_FIELDS = [
|
|
|
3581
3598
|
{ key: "maxOutputTokens", label: "Max output tokens", envKey: "MODEL_MAX_OUTPUT_TOKENS", scope: "shared", placeholder: "Leave empty for server default" },
|
|
3582
3599
|
{ key: "timeoutMs", label: "Timeout ms", envKey: "MODEL_TIMEOUT_MS", scope: "shared", placeholder: "120000" },
|
|
3583
3600
|
{ key: "streamIdleTimeoutMs", label: "Stream idle timeout ms", envKey: "MODEL_STREAM_IDLE_TIMEOUT_MS", scope: "shared", placeholder: "120000" },
|
|
3584
|
-
{ key: "maxRetries", label: "Max retries", envKey: "MODEL_MAX_RETRIES", scope: "shared", placeholder: "
|
|
3601
|
+
{ key: "maxRetries", label: "Max retries", envKey: "MODEL_MAX_RETRIES", scope: "shared", placeholder: "5" },
|
|
3585
3602
|
];
|
|
3586
3603
|
const LOGIN_FIELD_DEFINITIONS = {
|
|
3587
3604
|
anthropic: [
|