openfox 2.0.115 → 2.0.116
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/CHANGELOG.md +22 -0
- package/dist/CHANGELOG.md +22 -0
- package/dist/{ask-ZYPCJKZD.js → ask-UBIRH3SO.js} +2 -2
- package/dist/{auth-YY5PJYSC.js → auth-GTGIGX5X.js} +2 -2
- package/dist/{auto-config-T5GR2N6X.js → auto-config-AAUO4PKW.js} +2 -2
- package/dist/{backend-LVYHLGQJ.js → backend-67OLCS5O.js} +2 -2
- package/dist/{branch.api-XVTYACSH.js → branch.api-UMKSQMSA.js} +2 -2
- package/dist/changelog-FZUE6OSG.js +63 -0
- package/dist/{chat-handler-5SP265CR.js → chat-handler-Z6BEY66U.js} +17 -17
- package/dist/{chunk-OCBBAEMT.js → chunk-4E52GUXJ.js} +179 -137
- package/dist/{chunk-I7FY2LTR.js → chunk-4GHLULHB.js} +18 -2
- package/dist/{chunk-JFK4GKQD.js → chunk-4HV3PDEK.js} +58 -90
- package/dist/{chunk-TGLVWAFC.js → chunk-6XHDNSA3.js} +5 -5
- package/dist/{chunk-4H427UBV.js → chunk-AGXJ5O63.js} +2 -2
- package/dist/{chunk-OKVHMKE2.js → chunk-BH3BBUGB.js} +19 -17
- package/dist/{chunk-OCSTEGK7.js → chunk-EQ5CGNOT.js} +2 -2
- package/dist/{chunk-YX3OQBNX.js → chunk-EQ7DK2TG.js} +9 -5
- package/dist/{chunk-BVVCRIVM.js → chunk-GZTMCTUS.js} +3 -3
- package/dist/chunk-HNHSUQCN.js +7 -0
- package/dist/{chunk-3QQAIUZI.js → chunk-HYPXL7K5.js} +175 -30
- package/dist/{chunk-6RGACY4E.js → chunk-HZSKKJHQ.js} +4 -3
- package/dist/{chunk-VWEATA7R.js → chunk-KLQEL2DZ.js} +7 -1
- package/dist/{chunk-JGWHRYWG.js → chunk-MKWS7TQH.js} +2 -2
- package/dist/{chunk-37QLXLML.js → chunk-QJWTBVJO.js} +14 -14
- package/dist/{chunk-6KPJLELC.js → chunk-QQVPUZQB.js} +156 -20
- package/dist/{chunk-TFF5T3K3.js → chunk-SQLJRO3J.js} +3 -3
- package/dist/{chunk-ERNWAKUB.js → chunk-TGVDUK4N.js} +2 -2
- package/dist/{chunk-3NPLERPQ.js → chunk-U4HMAYAD.js} +9 -8
- package/dist/{chunk-V4IE7HJY.js → chunk-W7VIYHPQ.js} +2 -2
- package/dist/{chunk-BWVO5WFK.js → chunk-X3XKYGUN.js} +3 -3
- package/dist/{chunk-5WRI5ZAA.js → chunk-YLJ4XMA6.js} +6 -2
- package/dist/{chunk-X25Q6RAV.js → chunk-ZKLE2Q3I.js} +1 -1
- package/dist/cli/dev.js +3 -3
- package/dist/cli/index.js +3 -3
- package/dist/{client-KE7EDI2D.js → client-KCNTDTIR.js} +4 -4
- package/dist/{client-pure-66Z6FWS6.js → client-pure-B5DHEKQJ.js} +2 -2
- package/dist/command-defaults/mark-done.command.md +6 -6
- package/dist/{compactor-SKVC2VNL.js → compactor-LAXZLPPA.js} +7 -7
- package/dist/{config-EAB3V4QK.js → config-TUCHLIWD.js} +2 -2
- package/dist/{dynamic-context-QNB4ELLP.js → dynamic-context-YHWFFP53.js} +3 -3
- package/dist/{events-5PLO4QJU.js → events-IVPAMMR5.js} +4 -4
- package/dist/{folding-CJWYFUKD.js → folding-RTGU63BW.js} +2 -2
- package/dist/{http-client-KLODRQC2.js → http-client-IPUW2MSW.js} +2 -2
- package/dist/{inspect-proxy-K6QKEYDT.js → inspect-proxy-WPEDMCG7.js} +2 -2
- package/dist/{install-CPOPMCSE.js → install-VA2F6X6Z.js} +2 -2
- package/dist/{launch-EOXVWLOP.js → launch-PAVQAWGP.js} +17 -17
- package/dist/{manager-LZ3JQ443.js → manager-EMLSLMMT.js} +2 -2
- package/dist/{model-overrides-5UVW3KTE.js → model-overrides-7F2EOA4U.js} +2 -2
- package/dist/{oauth-provider-52YILVUJ.js → oauth-provider-DGBC2YM6.js} +2 -2
- package/dist/{oauth-store-XCFXV2VM.js → oauth-store-KECHUT54.js} +2 -2
- package/dist/{openFolder-HX7X356L.js → openFolder-XCMSU3OI.js} +2 -2
- package/dist/{orchestrator-ED3KFPXO.js → orchestrator-CS3KXLZE.js} +16 -16
- package/dist/package.json +5 -2
- package/dist/{path-security-B6EZC63L.js → path-security-JTCHWYG3.js} +7 -7
- package/dist/{paths-F27V3S4I.js → paths-BHR7CZ7I.js} +2 -2
- package/dist/{permissions-K6YEA2ZZ.js → permissions-UKR524ZB.js} +2 -2
- package/dist/{platform-6RPPBHKH.js → platform-ECDDYMAR.js} +2 -2
- package/dist/{processor-226ZOTRI.js → processor-RZD4JRDX.js} +16 -16
- package/dist/profiles-GYHXBWPV.js +10 -0
- package/dist/{project-creator-VBFE35NI.js → project-creator-PMQ65NKN.js} +2 -2
- package/dist/{projects-AXHZOBR2.js → projects-NDPNOV6D.js} +2 -2
- package/dist/{protocol-JdxRpPxM.d.ts → protocol-CfUkCYxF.d.ts} +11 -2
- package/dist/{protocol-RKSWKNXI.js → protocol-HYA5BYVN.js} +8 -4
- package/dist/{provider-DL4ZWQY7.js → provider-Q7J4UFTS.js} +7 -7
- package/dist/{provider-manager-6CLRMGDE.js → provider-manager-TMBO4DFG.js} +5 -5
- package/dist/{pwa-XPHP3PY2.js → pwa-2GRFSXD7.js} +3 -3
- package/dist/{registry-5XI5NDBF.js → registry-5QL3BOWN.js} +2 -2
- package/dist/{serve-DARV4NJG.js → serve-KR22J37W.js} +22 -22
- package/dist/server/index.d.ts +15 -2
- package/dist/server/index.js +21 -21
- package/dist/{server-LQJ7MBDS.js → server-ESKTIZL5.js} +20 -20
- package/dist/{service-4JKTGPRG.js → service-M7XJHAK4.js} +6 -6
- package/dist/{service-CXWJQFOZ.js → service-WKABQHKL.js} +2 -2
- package/dist/{session-overrides-AZKV6BRD.js → session-overrides-CWBKPHMF.js} +4 -4
- package/dist/{sessions-752IZIIK.js → sessions-I7ELDIIP.js} +5 -3
- package/dist/{settings-2AHDKCD7.js → settings-FGXQHKUH.js} +2 -2
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/index.js +2 -2
- package/dist/{store-SARB6V2N.js → store-JYPZ2RXB.js} +2 -2
- package/dist/{tasks-XJXHU623.js → tasks-X5H5HM4J.js} +6 -6
- package/dist/{tool-adapter-FEAHWU5C.js → tool-adapter-FJAFLDZA.js} +2 -2
- package/dist/{tools-QYYNFMGU.js → tools-KBS6X3EN.js} +14 -14
- package/dist/{update-2REP2WB6.js → update-TDS6LP5N.js} +4 -4
- package/dist/{update-server-LOOXIXDW.js → update-server-SVPV6ZJZ.js} +2 -2
- package/dist/{url-utils-SAJP7AEX.js → url-utils-C5BM7NF7.js} +2 -2
- package/dist/web/assets/index-ChtRS33s.js +324 -0
- package/dist/web/assets/{index-BmILAZrT.css → index-c43YT-4A.css} +1 -1
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/dist/workflow-defaults/default.workflow.json +2 -2
- package/dist/{workspace-RMZVTFJD.js → workspace-IQLLHMYR.js} +2 -2
- package/package.json +5 -2
- package/dist/chunk-5V3BF67X.js +0 -7
- package/dist/profiles-5J7F4BML.js +0 -10
- package/dist/web/assets/index-M7ToECa4.js +0 -324
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
createServerMessage,
|
|
6
6
|
isClientMessage
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZKLE2Q3I.js";
|
|
8
8
|
|
|
9
9
|
// src/server/session/client-session.ts
|
|
10
10
|
function toClientSession(session) {
|
|
@@ -140,6 +140,12 @@ function createChatDoneMessage(messageId, reason, stats, agentType) {
|
|
|
140
140
|
function createChatErrorMessage(error, recoverable) {
|
|
141
141
|
return createServerMessage("chat.error", { error, recoverable });
|
|
142
142
|
}
|
|
143
|
+
function createChatMessageRemovedMessage(messageIds) {
|
|
144
|
+
return createServerMessage("chat.message_removed", { messageIds });
|
|
145
|
+
}
|
|
146
|
+
function createChatStepRetryMessage(stepName, attempt, retryInMs) {
|
|
147
|
+
return createServerMessage("chat.step_retry", { stepName, attempt, retryInMs });
|
|
148
|
+
}
|
|
143
149
|
function createChatPathConfirmationMessage(callId, tool, paths, workdir, reason) {
|
|
144
150
|
return createServerMessage("chat.path_confirmation", { callId, tool, paths, workdir, reason });
|
|
145
151
|
}
|
|
@@ -316,6 +322,14 @@ function storedEventToServerMessage(event) {
|
|
|
316
322
|
const data = event.data;
|
|
317
323
|
return createChatFormatRetryMessage(data.attempt, data.maxAttempts, data.pattern, data.field, data.matchedContent);
|
|
318
324
|
}
|
|
325
|
+
case "message.removed": {
|
|
326
|
+
const data = event.data;
|
|
327
|
+
return createChatMessageRemovedMessage(data.messageIds);
|
|
328
|
+
}
|
|
329
|
+
case "workflow.step_retry": {
|
|
330
|
+
const data = event.data;
|
|
331
|
+
return createChatStepRetryMessage(data.stepName, data.attempt, data.retryInMs);
|
|
332
|
+
}
|
|
319
333
|
case "path.confirmation_pending":
|
|
320
334
|
case "path.confirmation_responded":
|
|
321
335
|
return null;
|
|
@@ -351,6 +365,8 @@ export {
|
|
|
351
365
|
createChatMessageUpdatedMessage,
|
|
352
366
|
createChatDoneMessage,
|
|
353
367
|
createChatErrorMessage,
|
|
368
|
+
createChatMessageRemovedMessage,
|
|
369
|
+
createChatStepRetryMessage,
|
|
354
370
|
createChatPathConfirmationMessage,
|
|
355
371
|
createChatAskUserMessage,
|
|
356
372
|
createModeChangedMessage,
|
|
@@ -366,4 +382,4 @@ export {
|
|
|
366
382
|
createQueueStateMessage,
|
|
367
383
|
storedEventToServerMessage
|
|
368
384
|
};
|
|
369
|
-
//# sourceMappingURL=chunk-
|
|
385
|
+
//# sourceMappingURL=chunk-4GHLULHB.js.map
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
createToolCallEvent,
|
|
15
15
|
createToolResultEvent,
|
|
16
16
|
streamLLMPure
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-EQ7DK2TG.js";
|
|
18
18
|
import {
|
|
19
19
|
COMPACTION_PROMPT,
|
|
20
20
|
buildBasePrompt,
|
|
@@ -57,29 +57,29 @@ import {
|
|
|
57
57
|
getGateConfig,
|
|
58
58
|
isTaskConflictError,
|
|
59
59
|
isTaskGateError
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-HZSKKJHQ.js";
|
|
61
61
|
import {
|
|
62
62
|
getSessionDisabledServers
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-EQ5CGNOT.js";
|
|
64
64
|
import {
|
|
65
65
|
PathAccessDeniedError,
|
|
66
66
|
extractAbsolutePathsFromCommand,
|
|
67
67
|
extractSensitivePathsFromCommand,
|
|
68
68
|
registerPathConfirmation,
|
|
69
69
|
requestPathAccess
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-QQVPUZQB.js";
|
|
71
71
|
import {
|
|
72
72
|
getCurrentContextWindowId,
|
|
73
73
|
getCurrentWindowMessageOptions,
|
|
74
74
|
getEventStore
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-TGVDUK4N.js";
|
|
76
76
|
import {
|
|
77
77
|
createChatDoneMessage,
|
|
78
78
|
createChatMessageMessage,
|
|
79
79
|
createChatMessageUpdatedMessage,
|
|
80
80
|
createChatPathConfirmationMessage,
|
|
81
81
|
createQueueStateMessage
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-4GHLULHB.js";
|
|
83
83
|
import {
|
|
84
84
|
AskUserInterrupt,
|
|
85
85
|
askUserTool
|
|
@@ -105,7 +105,7 @@ import {
|
|
|
105
105
|
} from "./chunk-LNNBLB6G.js";
|
|
106
106
|
import {
|
|
107
107
|
modelSupportsVision
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-W7VIYHPQ.js";
|
|
109
109
|
import {
|
|
110
110
|
OUTPUT_LIMITS,
|
|
111
111
|
cacheSet,
|
|
@@ -144,7 +144,7 @@ async function requestUserConfirmation(context, toolLabel, desc) {
|
|
|
144
144
|
if (context.dangerLevel === "dangerous") return Promise.resolve(true);
|
|
145
145
|
if (toolLabel === "workspace" || toolLabel === "command") {
|
|
146
146
|
try {
|
|
147
|
-
const { getSetting: getSetting2, SETTINGS_KEYS: SETTINGS_KEYS2 } = await import("./settings-
|
|
147
|
+
const { getSetting: getSetting2, SETTINGS_KEYS: SETTINGS_KEYS2 } = await import("./settings-FGXQHKUH.js");
|
|
148
148
|
if (getSetting2(SETTINGS_KEYS2.CONFIRM_ON_WORKSPACE_ACTIONS) !== "true") {
|
|
149
149
|
return Promise.resolve(true);
|
|
150
150
|
}
|
|
@@ -1593,7 +1593,7 @@ async function executeTools(assistantMsgId, toolCalls, ctx, append) {
|
|
|
1593
1593
|
data: { callId: error.callId, question: error.question, type: error.type, options: error.options }
|
|
1594
1594
|
});
|
|
1595
1595
|
append(createChatDoneEvent(assistantMsgId, "waiting_for_user"));
|
|
1596
|
-
const { awaitAnswer } = await import("./ask-
|
|
1596
|
+
const { awaitAnswer } = await import("./ask-UBIRH3SO.js");
|
|
1597
1597
|
const answerPromise = awaitAnswer(error.callId);
|
|
1598
1598
|
if (!answerPromise) {
|
|
1599
1599
|
throw new Error(`No pending question found for callId: ${error.callId}`);
|
|
@@ -1903,6 +1903,7 @@ ${CONTINUE_PROMPT}` : CONTINUE_PROMPT;
|
|
|
1903
1903
|
signal,
|
|
1904
1904
|
subAgentAliases,
|
|
1905
1905
|
...config.retryPatterns ? { retryPatterns: config.retryPatterns } : {},
|
|
1906
|
+
...config.suppressChatError ? { suppressChatError: true } : {},
|
|
1906
1907
|
...modelSettings && { modelSettings }
|
|
1907
1908
|
});
|
|
1908
1909
|
const result = await consumeStreamGenerator(streamGen, (event) => {
|
|
@@ -1950,22 +1951,35 @@ ${CONTINUE_PROMPT}` : CONTINUE_PROMPT;
|
|
|
1950
1951
|
emitPartialDoneEvents(sessionId, assistantMsgId, statsIdentity, mode, turnMetrics, append, agentType);
|
|
1951
1952
|
throw new Error("Aborted");
|
|
1952
1953
|
}
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
result.
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1954
|
+
if (result.error) {
|
|
1955
|
+
const stats2 = turnMetrics.buildStats(statsIdentity, mode);
|
|
1956
|
+
append(
|
|
1957
|
+
createMessageDoneEvent(assistantMsgId, {
|
|
1958
|
+
segments: result.segments,
|
|
1959
|
+
stats: stats2
|
|
1960
|
+
})
|
|
1961
|
+
);
|
|
1962
|
+
append(createChatDoneEvent(assistantMsgId, "error", stats2, agentType));
|
|
1963
|
+
return { failed: { error: result.error } };
|
|
1964
|
+
}
|
|
1965
|
+
if (!result.error) {
|
|
1966
|
+
turnMetrics.addLLMCall(
|
|
1967
|
+
result.timing,
|
|
1968
|
+
result.usage.promptTokens,
|
|
1969
|
+
result.usage.completionTokens,
|
|
1970
|
+
previousContextTokens,
|
|
1971
|
+
result.modelParams
|
|
1972
|
+
);
|
|
1973
|
+
sessionManager.setCurrentContextSize(
|
|
1974
|
+
sessionId,
|
|
1975
|
+
result.usage.promptTokens,
|
|
1976
|
+
result.usage.completionTokens,
|
|
1977
|
+
config.subAgentMetadata?.subAgentId
|
|
1978
|
+
);
|
|
1979
|
+
}
|
|
1966
1980
|
if (!compacting) {
|
|
1967
1981
|
const contextState2 = sessionManager.getContextState(sessionId);
|
|
1968
|
-
const { shouldCompact, appendCompactionPrompt } = await import("./compactor-
|
|
1982
|
+
const { shouldCompact, appendCompactionPrompt } = await import("./compactor-LAXZLPPA.js");
|
|
1969
1983
|
if (shouldCompact(
|
|
1970
1984
|
contextState2.currentTokens,
|
|
1971
1985
|
contextState2.maxTokens,
|
|
@@ -2335,7 +2349,7 @@ async function describeImageFromDataUrl(dataUrl, visionModel, options) {
|
|
|
2335
2349
|
// src/server/context/image-processor.ts
|
|
2336
2350
|
async function loadVisionModelFromGlobalConfig() {
|
|
2337
2351
|
try {
|
|
2338
|
-
const { loadGlobalConfig: loadGlobalConfig2, resolveVisionFallback } = await import("./config-
|
|
2352
|
+
const { loadGlobalConfig: loadGlobalConfig2, resolveVisionFallback } = await import("./config-TUCHLIWD.js");
|
|
2339
2353
|
const runtimeConfig = getRuntimeConfig();
|
|
2340
2354
|
const mode = runtimeConfig.mode ?? "production";
|
|
2341
2355
|
const globalConfig = await loadGlobalConfig2(mode);
|
|
@@ -2953,7 +2967,7 @@ var callSubAgentTool = {
|
|
|
2953
2967
|
};
|
|
2954
2968
|
}
|
|
2955
2969
|
try {
|
|
2956
|
-
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-
|
|
2970
|
+
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-KBS6X3EN.js");
|
|
2957
2971
|
const toolRegistry = getToolRegistryForAgent2(agentDef);
|
|
2958
2972
|
const turnMetrics = new TurnMetrics();
|
|
2959
2973
|
const result = await executeSubAgent({
|
|
@@ -3975,7 +3989,7 @@ var mcpConfigTool = createTool(
|
|
|
3975
3989
|
mcpNotifyChanged?.(sessionId);
|
|
3976
3990
|
}
|
|
3977
3991
|
async function rebuildTools() {
|
|
3978
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
3992
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-KBS6X3EN.js");
|
|
3979
3993
|
const mcpTools = createMcpTools(mcpManagerForTools);
|
|
3980
3994
|
setMcpTools2(mcpTools);
|
|
3981
3995
|
}
|
|
@@ -4400,33 +4414,20 @@ function getTasksService() {
|
|
|
4400
4414
|
}
|
|
4401
4415
|
return tasksService;
|
|
4402
4416
|
}
|
|
4403
|
-
var VALID_ACTIONS = [
|
|
4404
|
-
|
|
4405
|
-
"get",
|
|
4406
|
-
"create",
|
|
4407
|
-
"edit",
|
|
4408
|
-
"move",
|
|
4409
|
-
"set_gate_value",
|
|
4410
|
-
"set_gates",
|
|
4411
|
-
"duplicate",
|
|
4412
|
-
"delete",
|
|
4413
|
-
"reorder"
|
|
4414
|
-
];
|
|
4417
|
+
var VALID_ACTIONS = ["list", "create", "edit", "move", "set_gate_value", "delete"];
|
|
4418
|
+
var LIST_STATUSES = ["todo", "in_progress", "done", "all"];
|
|
4415
4419
|
var projectTasksTool = createTool(
|
|
4416
4420
|
"project_tasks",
|
|
4417
4421
|
{
|
|
4418
4422
|
type: "function",
|
|
4419
4423
|
function: {
|
|
4420
4424
|
name: "project_tasks",
|
|
4421
|
-
description: "
|
|
4425
|
+
description: "Kanban task board for this project. Core loop: list \u2192 move \u2192 set_gate_value.\n\nRules:\n- Moving to in_progress binds the task to YOUR current session.\n- Moving to done is blocked by unmet gates: the error names the missing fields \u2014 fill them via set_gate_value (that's part of the work), then retry the move.\n- Stale writes fail with CONFLICT \u2014 re-list and retry.\n\nActions:\n- list: tasks (status, gate values, queue position, bound session, audit trail); defaults to open tasks, filter via status (todo | in_progress | done | all)\n- create: add a task to To Do (prompt required)\n- edit: update prompt/attachments/agent/model (taskId + fields)\n- move: change column (to: todo | in_progress | done; optional reason)\n- set_gate_value: fill a gate field (taskId, gateId, value)\n- delete: remove a task (taskId)",
|
|
4422
4426
|
parameters: {
|
|
4423
4427
|
type: "object",
|
|
4424
4428
|
properties: {
|
|
4425
4429
|
action: { type: "string", enum: VALID_ACTIONS, description: "The action to perform" },
|
|
4426
|
-
taskId: {
|
|
4427
|
-
type: "string",
|
|
4428
|
-
description: "Target task id (get, edit, move, set_gate_value, duplicate, delete, reorder)"
|
|
4429
|
-
},
|
|
4430
|
+
taskId: { type: "string", description: "Target task id (edit, move, set_gate_value, delete)" },
|
|
4430
4431
|
prompt: { type: "string", description: "The prompt/instruction executed when the task launches" },
|
|
4431
4432
|
attachments: { type: "array", description: "Optional attachments (same shape as chat attachments)" },
|
|
4432
4433
|
agentId: { type: "string", description: "Selected agent id" },
|
|
@@ -4436,15 +4437,14 @@ var projectTasksTool = createTool(
|
|
|
4436
4437
|
reason: { type: "string", description: "Optional short reason (recorded in the audit trail) for reverts" },
|
|
4437
4438
|
gateId: { type: "string", description: "Gate field id for set_gate_value" },
|
|
4438
4439
|
value: { type: "string", description: "Proof/evidence value for set_gate_value" },
|
|
4439
|
-
|
|
4440
|
-
type: "
|
|
4441
|
-
|
|
4440
|
+
status: {
|
|
4441
|
+
type: "string",
|
|
4442
|
+
enum: ["todo", "in_progress", "done", "all"],
|
|
4443
|
+
description: "Column filter for action=list (default: open tasks)"
|
|
4442
4444
|
},
|
|
4443
|
-
status: { type: "string", enum: ["todo", "in_progress", "done"], description: "Column for reorder" },
|
|
4444
|
-
index: { type: "number", description: "Zero-based target index within the column (reorder)" },
|
|
4445
4445
|
expectedVersion: {
|
|
4446
4446
|
type: "number",
|
|
4447
|
-
description: "
|
|
4447
|
+
description: "Task version from your last read; stale writes fail with CONFLICT"
|
|
4448
4448
|
}
|
|
4449
4449
|
},
|
|
4450
4450
|
required: ["action"]
|
|
@@ -4463,15 +4463,16 @@ var projectTasksTool = createTool(
|
|
|
4463
4463
|
try {
|
|
4464
4464
|
switch (action) {
|
|
4465
4465
|
case "list": {
|
|
4466
|
+
const status = args.status;
|
|
4467
|
+
if (status !== void 0 && !LIST_STATUSES.includes(status)) {
|
|
4468
|
+
return helpers.error(
|
|
4469
|
+
`Invalid "status" filter for action=list: "${String(status)}". Expected one of: todo, in_progress, done, all.`
|
|
4470
|
+
);
|
|
4471
|
+
}
|
|
4466
4472
|
const tasks = svc.list(projectId);
|
|
4473
|
+
const filtered = status === "all" ? tasks : tasks.filter((t) => status === void 0 ? t.status !== "done" : t.status === status);
|
|
4467
4474
|
const gates = getGateConfig(projectId);
|
|
4468
|
-
return helpers.success(JSON.stringify({ gates, tasks:
|
|
4469
|
-
}
|
|
4470
|
-
case "get": {
|
|
4471
|
-
if (!args.taskId) return helpers.error('Parameter "taskId" is required for action=get');
|
|
4472
|
-
const task = svc.get(projectId, args.taskId);
|
|
4473
|
-
if (!task) return helpers.error(`Task not found: ${args.taskId}`);
|
|
4474
|
-
return helpers.success(JSON.stringify(taskForAgent(task), null, 2));
|
|
4475
|
+
return helpers.success(JSON.stringify({ gates, tasks: filtered.map((t) => taskForAgent(t)) }, null, 2));
|
|
4475
4476
|
}
|
|
4476
4477
|
case "create": {
|
|
4477
4478
|
const task = svc.create(
|
|
@@ -4532,19 +4533,6 @@ var projectTasksTool = createTool(
|
|
|
4532
4533
|
);
|
|
4533
4534
|
return helpers.success(JSON.stringify(taskForAgent(result.task), null, 2));
|
|
4534
4535
|
}
|
|
4535
|
-
case "set_gates": {
|
|
4536
|
-
if (!Array.isArray(args.gates)) {
|
|
4537
|
-
return helpers.error('Parameter "gates" (array) is required for action=set_gates');
|
|
4538
|
-
}
|
|
4539
|
-
const gates = sanitizeGates(args.gates);
|
|
4540
|
-
svc.setGateConfig(projectId, gates, actor);
|
|
4541
|
-
return helpers.success(JSON.stringify({ gates }, null, 2));
|
|
4542
|
-
}
|
|
4543
|
-
case "duplicate": {
|
|
4544
|
-
if (!args.taskId) return helpers.error('Parameter "taskId" is required for action=duplicate');
|
|
4545
|
-
const task = svc.duplicate(projectId, args.taskId, actor);
|
|
4546
|
-
return helpers.success(JSON.stringify(taskForAgent(task), null, 2));
|
|
4547
|
-
}
|
|
4548
4536
|
case "delete": {
|
|
4549
4537
|
if (!args.taskId) return helpers.error('Parameter "taskId" is required for action=delete');
|
|
4550
4538
|
const task = svc.get(projectId, args.taskId);
|
|
@@ -4558,14 +4546,6 @@ var projectTasksTool = createTool(
|
|
|
4558
4546
|
)
|
|
4559
4547
|
);
|
|
4560
4548
|
}
|
|
4561
|
-
case "reorder": {
|
|
4562
|
-
if (!args.taskId) return helpers.error('Parameter "taskId" is required for action=reorder');
|
|
4563
|
-
if (!args.status || args.index === void 0) {
|
|
4564
|
-
return helpers.error('Parameters "status" and "index" are required for action=reorder');
|
|
4565
|
-
}
|
|
4566
|
-
const task = svc.reorder(projectId, args.taskId, args.status, args.index);
|
|
4567
|
-
return helpers.success(JSON.stringify(taskForAgent(task), null, 2));
|
|
4568
|
-
}
|
|
4569
4549
|
default:
|
|
4570
4550
|
return helpers.error(`Unknown action: ${String(action)}`);
|
|
4571
4551
|
}
|
|
@@ -4611,18 +4591,6 @@ function sanitizeAttachments(raw) {
|
|
|
4611
4591
|
(a) => typeof a === "object" && a !== null && typeof a.id === "string" && typeof a.filename === "string"
|
|
4612
4592
|
);
|
|
4613
4593
|
}
|
|
4614
|
-
function sanitizeGates(raw) {
|
|
4615
|
-
return raw.map((g, i) => {
|
|
4616
|
-
const gate = g;
|
|
4617
|
-
return {
|
|
4618
|
-
id: typeof gate.id === "string" && gate.id ? gate.id : `gate_${i}`,
|
|
4619
|
-
name: typeof gate.name === "string" && gate.name ? gate.name : `Gate ${i + 1}`,
|
|
4620
|
-
description: typeof gate.description === "string" ? gate.description : "",
|
|
4621
|
-
required: gate.required !== false,
|
|
4622
|
-
variant: gate.variant === "ready" ? "ready" : "done"
|
|
4623
|
-
};
|
|
4624
|
-
});
|
|
4625
|
-
}
|
|
4626
4594
|
|
|
4627
4595
|
// src/server/tools/index.ts
|
|
4628
4596
|
var _builtInTools;
|
|
@@ -4905,4 +4873,4 @@ export {
|
|
|
4905
4873
|
getToolRegistryForAgent,
|
|
4906
4874
|
createToolRegistry
|
|
4907
4875
|
};
|
|
4908
|
-
//# sourceMappingURL=chunk-
|
|
4876
|
+
//# sourceMappingURL=chunk-4HV3PDEK.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
combineEventsWithSnapshot,
|
|
3
3
|
getEventStore
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TGVDUK4N.js";
|
|
5
5
|
import {
|
|
6
6
|
updateSessionMetadata
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KLQEL2DZ.js";
|
|
8
8
|
import {
|
|
9
9
|
createContextStateMessage,
|
|
10
10
|
createSessionStateMessage
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4GHLULHB.js";
|
|
12
12
|
import {
|
|
13
13
|
getPendingQuestionsForSession
|
|
14
14
|
} from "./chunk-JURM3RPZ.js";
|
|
@@ -153,7 +153,7 @@ async function generateSessionNameForSession(sessionId, userMessage, deps, signa
|
|
|
153
153
|
client = deps.getLLMClient();
|
|
154
154
|
client.setModel(providerConfig.model);
|
|
155
155
|
} else if (providerConfig) {
|
|
156
|
-
const { createLLMClient } = await import("./client-
|
|
156
|
+
const { createLLMClient } = await import("./client-KCNTDTIR.js");
|
|
157
157
|
client = createLLMClient({
|
|
158
158
|
llm: {
|
|
159
159
|
baseUrl: providerConfig.baseUrl,
|
|
@@ -204,4 +204,4 @@ export {
|
|
|
204
204
|
needsNameGeneration,
|
|
205
205
|
generateSessionNameForSession
|
|
206
206
|
};
|
|
207
|
-
//# sourceMappingURL=chunk-
|
|
207
|
+
//# sourceMappingURL=chunk-6XHDNSA3.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__commonJS,
|
|
3
3
|
__toESM
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YLJ4XMA6.js";
|
|
5
5
|
|
|
6
6
|
// node_modules/sisteransi/src/index.js
|
|
7
7
|
var require_src = __commonJS({
|
|
@@ -1295,4 +1295,4 @@ export {
|
|
|
1295
1295
|
select,
|
|
1296
1296
|
text
|
|
1297
1297
|
};
|
|
1298
|
-
//# sourceMappingURL=chunk-
|
|
1298
|
+
//# sourceMappingURL=chunk-AGXJ5O63.js.map
|
|
@@ -2,24 +2,24 @@ import {
|
|
|
2
2
|
generateSessionNameForSession,
|
|
3
3
|
getSessionMessageCount,
|
|
4
4
|
needsNameGeneration
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6XHDNSA3.js";
|
|
6
6
|
import {
|
|
7
7
|
launchWorkflowRun
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HYPXL7K5.js";
|
|
9
9
|
import {
|
|
10
10
|
runChatTurn
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-U4HMAYAD.js";
|
|
12
12
|
import {
|
|
13
13
|
devServerManager
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-4HV3PDEK.js";
|
|
15
15
|
import {
|
|
16
16
|
applyDynamicContext,
|
|
17
17
|
computeSessionHash,
|
|
18
18
|
computeUnifiedDiff
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-SQLJRO3J.js";
|
|
20
20
|
import {
|
|
21
21
|
appendCompactionPrompt
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-X3XKYGUN.js";
|
|
23
23
|
import {
|
|
24
24
|
onProcessEvent
|
|
25
25
|
} from "./chunk-ZTOG6LJD.js";
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
combineEventsWithSnapshot,
|
|
34
34
|
getEventStore
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-TGVDUK4N.js";
|
|
36
36
|
import {
|
|
37
37
|
createChatErrorMessage,
|
|
38
38
|
createChatMessageMessage,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
parseClientMessage,
|
|
48
48
|
serializeServerMessage,
|
|
49
49
|
storedEventToServerMessage
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-4GHLULHB.js";
|
|
51
51
|
import {
|
|
52
52
|
getPlatformShell
|
|
53
53
|
} from "./chunk-AESOGRFK.js";
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
} from "./chunk-K44MW7JJ.js";
|
|
71
71
|
import {
|
|
72
72
|
createServerMessage
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-ZKLE2Q3I.js";
|
|
74
74
|
|
|
75
75
|
// src/server/ws/server.ts
|
|
76
76
|
import { WebSocketServer, WebSocket as WebSocket2 } from "ws";
|
|
@@ -885,7 +885,7 @@ function createWebSocketServer(httpServer, _config, getLLMClient, getActiveProvi
|
|
|
885
885
|
const { messages, hiddenCount } = buildMessagesFromStoredEvents(events, maxVisible || void 0);
|
|
886
886
|
const pendingConfirmations = foldPendingConfirmations(events);
|
|
887
887
|
const pendingQuestions = getPendingQuestionsForSession(updatedSession.id);
|
|
888
|
-
const activeWorkflowExecution = sessionManager.
|
|
888
|
+
const activeWorkflowExecution = sessionManager.getDisplayWorkflowExecution(updatedSession.id);
|
|
889
889
|
const effectiveWorkdir = updatedSession.workspace ?? updatedSession.workdir;
|
|
890
890
|
for (const [, client] of clients) {
|
|
891
891
|
if (client.activeSessionId === updatedSession.id && client.activeWorkdir !== effectiveWorkdir) {
|
|
@@ -1266,15 +1266,16 @@ async function handleClientMessage(ws, client, message, _getLLMClient, _getActiv
|
|
|
1266
1266
|
break;
|
|
1267
1267
|
}
|
|
1268
1268
|
case "context.applyDynamic.preview": {
|
|
1269
|
-
|
|
1269
|
+
const payload = message.payload;
|
|
1270
|
+
const sessionId = payload?.sessionId ?? client.activeSessionId;
|
|
1271
|
+
if (!sessionId) {
|
|
1270
1272
|
send(createErrorMessage("NO_SESSION", "No active session", message.id));
|
|
1271
1273
|
return;
|
|
1272
1274
|
}
|
|
1273
|
-
const sessionId = client.activeSessionId;
|
|
1274
1275
|
const session = sessionManager.requireSession(sessionId);
|
|
1275
1276
|
try {
|
|
1276
|
-
const { buildCachedPrompt } = await import("./dynamic-context-
|
|
1277
|
-
const allAgents = await import("./registry-
|
|
1277
|
+
const { buildCachedPrompt } = await import("./dynamic-context-YHWFFP53.js");
|
|
1278
|
+
const allAgents = await import("./registry-5QL3BOWN.js");
|
|
1278
1279
|
const agentDef = allAgents.findAgentById(session.mode, await allAgents.loadAllAgentsDefault()) ?? allAgents.findAgentById("planner", await allAgents.loadAllAgentsDefault());
|
|
1279
1280
|
const modelName = session.providerModel ?? _providerManager?.getCurrentModel();
|
|
1280
1281
|
const { systemPrompt: newPrompt, hash: newHash } = await buildCachedPrompt(
|
|
@@ -1313,11 +1314,12 @@ async function handleClientMessage(ws, client, message, _getLLMClient, _getActiv
|
|
|
1313
1314
|
break;
|
|
1314
1315
|
}
|
|
1315
1316
|
case "context.applyDynamic": {
|
|
1316
|
-
|
|
1317
|
+
const payload = message.payload;
|
|
1318
|
+
const sessionId = payload?.sessionId ?? client.activeSessionId;
|
|
1319
|
+
if (!sessionId) {
|
|
1317
1320
|
send(createErrorMessage("NO_SESSION", "No active session", message.id));
|
|
1318
1321
|
return;
|
|
1319
1322
|
}
|
|
1320
|
-
const sessionId = client.activeSessionId;
|
|
1321
1323
|
const session = sessionManager.requireSession(sessionId);
|
|
1322
1324
|
if (session.isRunning) {
|
|
1323
1325
|
send(createErrorMessage("SESSION_RUNNING", "Cannot apply dynamic context while session is running", message.id));
|
|
@@ -1542,4 +1544,4 @@ export {
|
|
|
1542
1544
|
signalMcpReady,
|
|
1543
1545
|
createWebSocketServer
|
|
1544
1546
|
};
|
|
1545
|
-
//# sourceMappingURL=chunk-
|
|
1547
|
+
//# sourceMappingURL=chunk-BH3BBUGB.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
updateSessionMcpDisabledServers
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KLQEL2DZ.js";
|
|
4
4
|
import {
|
|
5
5
|
getDatabase
|
|
6
6
|
} from "./chunk-5PT4UMRR.js";
|
|
@@ -62,4 +62,4 @@ export {
|
|
|
62
62
|
clearSessionOverrides,
|
|
63
63
|
getAllSessionOverrides
|
|
64
64
|
};
|
|
65
|
-
//# sourceMappingURL=chunk-
|
|
65
|
+
//# sourceMappingURL=chunk-EQ5CGNOT.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-J2GP3J3X.js";
|
|
4
4
|
import {
|
|
5
5
|
getModelProfile
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-W7VIYHPQ.js";
|
|
7
7
|
import {
|
|
8
8
|
getBackendCapabilities
|
|
9
9
|
} from "./chunk-AZHWLLPP.js";
|
|
@@ -84,7 +84,7 @@ function computeAggregatedStats(input) {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
// src/server/chat/stream-pure.ts
|
|
87
|
-
function createEmptyStreamResult(aborted, modelParams, patternMatch) {
|
|
87
|
+
function createEmptyStreamResult(aborted, modelParams, patternMatch, error) {
|
|
88
88
|
return {
|
|
89
89
|
content: "",
|
|
90
90
|
toolCalls: [],
|
|
@@ -94,7 +94,8 @@ function createEmptyStreamResult(aborted, modelParams, patternMatch) {
|
|
|
94
94
|
aborted,
|
|
95
95
|
modelParams,
|
|
96
96
|
finishReason: "stop",
|
|
97
|
-
...patternMatch ? { patternMatch } : {}
|
|
97
|
+
...patternMatch ? { patternMatch } : {},
|
|
98
|
+
...error ? { error } : {}
|
|
98
99
|
};
|
|
99
100
|
}
|
|
100
101
|
async function* streamLLMPure(options) {
|
|
@@ -142,6 +143,7 @@ async function* streamLLMPure(options) {
|
|
|
142
143
|
const toolArgs = /* @__PURE__ */ new Map();
|
|
143
144
|
let result = null;
|
|
144
145
|
let aborted = false;
|
|
146
|
+
let streamError;
|
|
145
147
|
let accumulatedContent = "";
|
|
146
148
|
let accumulatedThinking = "";
|
|
147
149
|
let patternMatch;
|
|
@@ -241,6 +243,8 @@ async function* streamLLMPure(options) {
|
|
|
241
243
|
}
|
|
242
244
|
case "error":
|
|
243
245
|
if (signal?.aborted) break;
|
|
246
|
+
streamError = value.error;
|
|
247
|
+
if (options.suppressChatError) break;
|
|
244
248
|
yield {
|
|
245
249
|
type: "chat.error",
|
|
246
250
|
data: { error: value.error, recoverable: true }
|
|
@@ -267,7 +271,7 @@ async function* streamLLMPure(options) {
|
|
|
267
271
|
return createEmptyStreamResult(false, modelParams, patternMatch);
|
|
268
272
|
}
|
|
269
273
|
if (!result) {
|
|
270
|
-
return createEmptyStreamResult(aborted, modelParams);
|
|
274
|
+
return createEmptyStreamResult(aborted, modelParams, void 0, streamError);
|
|
271
275
|
}
|
|
272
276
|
const baseResult = {
|
|
273
277
|
content: result.content,
|
|
@@ -438,4 +442,4 @@ export {
|
|
|
438
442
|
createChatDoneEvent,
|
|
439
443
|
consumeStreamGenerator
|
|
440
444
|
};
|
|
441
|
-
//# sourceMappingURL=chunk-
|
|
445
|
+
//# sourceMappingURL=chunk-EQ7DK2TG.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLLMClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MKWS7TQH.js";
|
|
4
4
|
import {
|
|
5
5
|
getModelProfile
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-W7VIYHPQ.js";
|
|
7
7
|
import {
|
|
8
8
|
getBackendCapabilities
|
|
9
9
|
} from "./chunk-AZHWLLPP.js";
|
|
@@ -803,4 +803,4 @@ export {
|
|
|
803
803
|
parseDefaultModelSelection,
|
|
804
804
|
createProviderManager
|
|
805
805
|
};
|
|
806
|
-
//# sourceMappingURL=chunk-
|
|
806
|
+
//# sourceMappingURL=chunk-GZTMCTUS.js.map
|