openfox 2.0.112 → 2.0.114
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 +49 -0
- package/README.md +1 -0
- package/dist/CHANGELOG.md +49 -0
- package/dist/agent-defaults/builder.agent.md +1 -0
- package/dist/agent-defaults/planner.agent.md +1 -0
- package/dist/{backend-P3GHHLHJ.js → backend-LVYHLGQJ.js} +2 -2
- package/dist/{chat-handler-BYXZIIV3.js → chat-handler-KWXRSWXZ.js} +32 -26
- package/dist/{chunk-XWNCKIPO.js → chunk-2XD65L7M.js} +2 -2
- package/dist/{chunk-C5NQF2K4.js → chunk-3O77NT4T.js} +29 -10
- package/dist/{chunk-XCK5IBO4.js → chunk-7GWARYQC.js} +60 -1042
- package/dist/{chunk-YHEQTVFV.js → chunk-AZHWLLPP.js} +1 -1
- package/dist/{chunk-FFPCVN5M.js → chunk-BZVW77PI.js} +4 -4
- package/dist/{chunk-SDGNV45R.js → chunk-FW4NDUBL.js} +15 -15
- package/dist/{chunk-Z56SEG4Z.js → chunk-GUHHUDNL.js} +6 -6
- package/dist/{chunk-RT2A2RRL.js → chunk-HP5CIB66.js} +2 -2
- package/dist/{chunk-UAF2FOI5.js → chunk-HV6IALXF.js} +7 -7
- package/dist/{chunk-SYJMUIRC.js → chunk-I7FY2LTR.js} +2 -2
- package/dist/{chunk-RISQXU32.js → chunk-JP7NM545.js} +2 -2
- package/dist/{chunk-NB2D6I64.js → chunk-JXLRL5JR.js} +5 -5
- package/dist/{chunk-RAKPI4OE.js → chunk-K733B5T2.js} +264 -27
- package/dist/{chunk-C372UH7N.js → chunk-KSXCOHHW.js} +18 -20
- package/dist/{chunk-JDT63SSP.js → chunk-L63Q4JQJ.js} +3 -3
- package/dist/{chunk-ERYUSG5C.js → chunk-LXYPMFTH.js} +3 -3
- package/dist/{chunk-FSYRANYR.js → chunk-MUSPWEBB.js} +4 -5
- package/dist/chunk-NCZRWCJN.js +7 -0
- package/dist/{chunk-JR54MDZI.js → chunk-NLO64UE3.js} +2 -2
- package/dist/{chunk-3UILDGOO.js → chunk-NWJLWLKF.js} +8 -8
- package/dist/chunk-OSXPQSLW.js +128 -0
- package/dist/chunk-OTYAEEX3.js +1081 -0
- package/dist/{chunk-PCC4DBPF.js → chunk-OXSTNSCF.js} +2 -2
- package/dist/{chunk-33Q7LCVD.js → chunk-P5UANBBX.js} +6 -4
- package/dist/{chunk-LCQ5AN6Y.js → chunk-PBW3YC3G.js} +89 -1
- package/dist/{chunk-IYTDCPEQ.js → chunk-QD7MRMCH.js} +352 -333
- package/dist/{chunk-N4RTAGFY.js → chunk-SA34STZ6.js} +2 -2
- package/dist/{chunk-FR5LUTLQ.js → chunk-SBSUDHL4.js} +10 -6
- package/dist/{chunk-6FPGJR7O.js → chunk-SFZGMB2G.js} +2 -2
- package/dist/{chunk-SVJFMZ2Q.js → chunk-TKKP56QK.js} +11 -4
- package/dist/{chunk-JNHKKUGJ.js → chunk-UPBWEHIL.js} +30 -148
- package/dist/{chunk-QGXLZZBS.js → chunk-UTIQ7OO5.js} +2 -2
- package/dist/{chunk-RKMP74BB.js → chunk-VPVLO436.js} +4 -4
- package/dist/chunk-W77NBJAZ.js +957 -0
- package/dist/{chunk-P45RJGOT.js → chunk-X25Q6RAV.js} +1 -1
- package/dist/{chunk-BOSKQI62.js → chunk-YGJIK3CG.js} +4 -4
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{client-QNQTX5EA.js → client-EM7ISGUP.js} +6 -6
- package/dist/{compactor-X2KZ3XFU.js → compactor-V3LR7APW.js} +13 -12
- package/dist/{config-TW5FHQEM.js → config-EAB3V4QK.js} +2 -2
- package/dist/{dynamic-context-ZRQO2FJN.js → dynamic-context-MVGOF5V2.js} +10 -9
- package/dist/{events-Y6XXQYFG.js → events-PI7IMPHT.js} +8 -7
- package/dist/{folding-Z4GNWRC3.js → folding-FO57K4JM.js} +6 -5
- package/dist/http-client-33EZ3BLR.js +11 -0
- package/dist/{inspect-proxy-N42Z5TOG.js → inspect-proxy-NHKQQ2CD.js} +4 -4
- package/dist/launch-L5ROVNI3.js +52 -0
- package/dist/{manager-HCMDFEQH.js → manager-66YAEO7K.js} +5 -5
- package/dist/{model-overrides-O3ZYKFP7.js → model-overrides-L53PZNZA.js} +4 -4
- package/dist/orchestrator-XK5K3RPL.js +63 -0
- package/dist/package.json +7 -6
- package/dist/{path-security-525YLND3.js → path-security-RSEI3YKB.js} +12 -11
- package/dist/{platform-MEQUWG6U.js → platform-WA4GK5BO.js} +4 -4
- package/dist/{processor-UN4H4V7F.js → processor-WDZSFBVO.js} +31 -25
- package/dist/{project-creator-BVA55HY6.js → project-creator-676WQXVI.js} +3 -3
- package/dist/{projects-PQXME5S4.js → projects-SSBWIYL4.js} +3 -3
- package/dist/{protocol-D6MISQyz.d.ts → protocol-BzHs024-.d.ts} +23 -3
- package/dist/{protocol-FTHAR2YL.js → protocol-RKSWKNXI.js} +3 -3
- package/dist/provider/index.d.ts +4 -4
- package/dist/{provider-3R4X62LW.js → provider-PLIWRBCF.js} +9 -9
- package/dist/{provider-manager-W5N4XRE5.js → provider-manager-2QSJTPWS.js} +7 -7
- package/dist/{registry-74KPZ5NV.js → registry-ZP4TN2IN.js} +5 -4
- package/dist/{serve-WHFUNQ6Z.js → serve-MZ3BCCWC.js} +36 -33
- package/dist/server/index.d.ts +8 -5
- package/dist/server/index.js +35 -32
- package/dist/server-EPXODFMB.js +55 -0
- package/dist/service-54PGIPDQ.js +25 -0
- package/dist/{session-overrides-XH6I3COP.js → session-overrides-LXN6W7SA.js} +7 -6
- package/dist/{sessions-D772YTWL.js → sessions-CHPVUG6H.js} +8 -5
- package/dist/{settings-KO6DSJLD.js → settings-NEBM3GQX.js} +3 -3
- package/dist/shared/index.d.ts +3 -3
- package/dist/shared/index.js +1 -1
- package/dist/skill-defaults/workflows/SKILL.md +517 -0
- package/dist/tasks-TJXG2V3U.js +217 -0
- package/dist/{tools-HTUTYMKI.js → tools-CIM26IFB.js} +31 -23
- package/dist/{types-BMEOlLT0.d.ts → types-CMtHpDWT.d.ts} +81 -1
- package/dist/{types-D0TgGL3t.d.ts → types-CbggXFvR.d.ts} +1 -1
- package/dist/{update-BRUFGGTW.js → update-UZBBO42X.js} +2 -2
- package/dist/web/assets/{index-nS1p0g8O.css → index-BmILAZrT.css} +1 -1
- package/dist/web/assets/index-rZHXkfMq.js +324 -0
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/dist/workflow-defaults/default.workflow.json +45 -5
- package/dist/{workspace-YDUQZ3HC.js → workspace-2XODU4YJ.js} +4 -4
- package/package.json +7 -6
- package/dist/chunk-P5AA7OYJ.js +0 -7
- package/dist/http-client-2GDKHZIG.js +0 -11
- package/dist/orchestrator-P5EUMC7E.js +0 -57
- package/dist/server-7MOOJR2N.js +0 -48
- package/dist/web/assets/index-Dukvfqm-.js +0 -323
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getEnabledSkillMetadata,
|
|
5
5
|
isSkillEnabled,
|
|
6
6
|
loadAllSkills
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YGJIK3CG.js";
|
|
8
8
|
import {
|
|
9
9
|
TurnMetrics,
|
|
10
10
|
consumeStreamGenerator,
|
|
@@ -14,15 +14,15 @@ import {
|
|
|
14
14
|
createToolCallEvent,
|
|
15
15
|
createToolResultEvent,
|
|
16
16
|
streamLLMPure
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-NLO64UE3.js";
|
|
18
18
|
import {
|
|
19
19
|
COMPACTION_PROMPT,
|
|
20
20
|
buildBasePrompt,
|
|
21
21
|
computeEffectiveTools
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-2XD65L7M.js";
|
|
23
23
|
import {
|
|
24
24
|
startInspectProxy
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-P5UANBBX.js";
|
|
26
26
|
import {
|
|
27
27
|
checkAborted,
|
|
28
28
|
createProcess,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
spawnShellProcess,
|
|
37
37
|
startProcessCommand,
|
|
38
38
|
stopProcess
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-TKKP56QK.js";
|
|
40
40
|
import {
|
|
41
41
|
getMaxPerSession,
|
|
42
42
|
getSessionProcessCount,
|
|
@@ -52,36 +52,41 @@ import {
|
|
|
52
52
|
getGitBranch,
|
|
53
53
|
isGitRepository,
|
|
54
54
|
listWorkspaces
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-SBSUDHL4.js";
|
|
56
|
+
import {
|
|
57
|
+
getGateConfig,
|
|
58
|
+
isTaskConflictError,
|
|
59
|
+
isTaskGateError
|
|
60
|
+
} from "./chunk-OTYAEEX3.js";
|
|
56
61
|
import {
|
|
57
62
|
getSessionDisabledServers
|
|
58
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-L63Q4JQJ.js";
|
|
59
64
|
import {
|
|
60
65
|
PathAccessDeniedError,
|
|
61
66
|
extractAbsolutePathsFromCommand,
|
|
62
67
|
extractSensitivePathsFromCommand,
|
|
63
68
|
registerPathConfirmation,
|
|
64
69
|
requestPathAccess
|
|
65
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-BZVW77PI.js";
|
|
66
71
|
import {
|
|
67
72
|
getCurrentContextWindowId,
|
|
68
73
|
getCurrentWindowMessageOptions,
|
|
69
74
|
getEventStore
|
|
70
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-JXLRL5JR.js";
|
|
71
76
|
import {
|
|
72
77
|
createChatDoneMessage,
|
|
73
78
|
createChatMessageMessage,
|
|
74
79
|
createChatMessageUpdatedMessage,
|
|
75
80
|
createChatPathConfirmationMessage,
|
|
76
81
|
createQueueStateMessage
|
|
77
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-I7FY2LTR.js";
|
|
78
83
|
import {
|
|
79
84
|
AskUserInterrupt,
|
|
80
85
|
askUserTool
|
|
81
86
|
} from "./chunk-JURM3RPZ.js";
|
|
82
87
|
import {
|
|
83
88
|
resolveLLMClientForAgent
|
|
84
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-JP7NM545.js";
|
|
85
90
|
import {
|
|
86
91
|
buildContextMessagesFromEventHistory,
|
|
87
92
|
foldContextState,
|
|
@@ -91,13 +96,13 @@ import {
|
|
|
91
96
|
handleToolResult,
|
|
92
97
|
reorderToolMessages,
|
|
93
98
|
stripOrphanedToolCalls
|
|
94
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-UTIQ7OO5.js";
|
|
95
100
|
import {
|
|
96
101
|
findAgentById,
|
|
97
102
|
getRuntimeConfig,
|
|
98
103
|
getSubAgents,
|
|
99
104
|
loadAllAgentsDefault
|
|
100
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-UPBWEHIL.js";
|
|
101
106
|
import {
|
|
102
107
|
modelSupportsVision
|
|
103
108
|
} from "./chunk-V4IE7HJY.js";
|
|
@@ -115,14 +120,14 @@ import {
|
|
|
115
120
|
import {
|
|
116
121
|
SETTINGS_KEYS,
|
|
117
122
|
getSetting
|
|
118
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-HP5CIB66.js";
|
|
119
124
|
import {
|
|
120
125
|
logger
|
|
121
126
|
} from "./chunk-K44MW7JJ.js";
|
|
122
127
|
import {
|
|
123
128
|
loadGlobalConfig,
|
|
124
129
|
saveGlobalConfig
|
|
125
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-KSXCOHHW.js";
|
|
126
131
|
import {
|
|
127
132
|
getGlobalConfigDir
|
|
128
133
|
} from "./chunk-CQGTEGKL.js";
|
|
@@ -139,7 +144,7 @@ async function requestUserConfirmation(context, toolLabel, desc) {
|
|
|
139
144
|
if (context.dangerLevel === "dangerous") return Promise.resolve(true);
|
|
140
145
|
if (toolLabel === "workspace" || toolLabel === "command") {
|
|
141
146
|
try {
|
|
142
|
-
const { getSetting: getSetting2, SETTINGS_KEYS: SETTINGS_KEYS2 } = await import("./settings-
|
|
147
|
+
const { getSetting: getSetting2, SETTINGS_KEYS: SETTINGS_KEYS2 } = await import("./settings-NEBM3GQX.js");
|
|
143
148
|
if (getSetting2(SETTINGS_KEYS2.CONFIRM_ON_WORKSPACE_ACTIONS) !== "true") {
|
|
144
149
|
return Promise.resolve(true);
|
|
145
150
|
}
|
|
@@ -1927,10 +1932,15 @@ ${CONTINUE_PROMPT}` : CONTINUE_PROMPT;
|
|
|
1927
1932
|
previousContextTokens,
|
|
1928
1933
|
result.modelParams
|
|
1929
1934
|
);
|
|
1930
|
-
sessionManager.setCurrentContextSize(
|
|
1935
|
+
sessionManager.setCurrentContextSize(
|
|
1936
|
+
sessionId,
|
|
1937
|
+
result.usage.promptTokens,
|
|
1938
|
+
result.usage.completionTokens,
|
|
1939
|
+
config.subAgentMetadata?.subAgentId
|
|
1940
|
+
);
|
|
1931
1941
|
if (!compacting) {
|
|
1932
1942
|
const contextState2 = sessionManager.getContextState(sessionId);
|
|
1933
|
-
const { shouldCompact, appendCompactionPrompt } = await import("./compactor-
|
|
1943
|
+
const { shouldCompact, appendCompactionPrompt } = await import("./compactor-V3LR7APW.js");
|
|
1934
1944
|
if (shouldCompact(
|
|
1935
1945
|
contextState2.currentTokens,
|
|
1936
1946
|
contextState2.maxTokens,
|
|
@@ -2300,7 +2310,7 @@ async function describeImageFromDataUrl(dataUrl, visionModel, options) {
|
|
|
2300
2310
|
// src/server/context/image-processor.ts
|
|
2301
2311
|
async function loadVisionModelFromGlobalConfig() {
|
|
2302
2312
|
try {
|
|
2303
|
-
const { loadGlobalConfig: loadGlobalConfig2, resolveVisionFallback } = await import("./config-
|
|
2313
|
+
const { loadGlobalConfig: loadGlobalConfig2, resolveVisionFallback } = await import("./config-EAB3V4QK.js");
|
|
2304
2314
|
const runtimeConfig = getRuntimeConfig();
|
|
2305
2315
|
const mode = runtimeConfig.mode ?? "production";
|
|
2306
2316
|
const globalConfig = await loadGlobalConfig2(mode);
|
|
@@ -2918,7 +2928,7 @@ var callSubAgentTool = {
|
|
|
2918
2928
|
};
|
|
2919
2929
|
}
|
|
2920
2930
|
try {
|
|
2921
|
-
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-
|
|
2931
|
+
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-CIM26IFB.js");
|
|
2922
2932
|
const toolRegistry = getToolRegistryForAgent2(agentDef);
|
|
2923
2933
|
const turnMetrics = new TurnMetrics();
|
|
2924
2934
|
const result = await executeSubAgent({
|
|
@@ -3330,7 +3340,7 @@ var DevServerManager = class {
|
|
|
3330
3340
|
}
|
|
3331
3341
|
/**
|
|
3332
3342
|
* Load dev server config from workdir.
|
|
3333
|
-
* If not found and the path looks like a workspace (contains /workspaces/),
|
|
3343
|
+
* If not found and the path looks like a workspace (contains a /workspaces/ segment),
|
|
3334
3344
|
* falls back to the parent project root.
|
|
3335
3345
|
*/
|
|
3336
3346
|
async loadConfig(workdir) {
|
|
@@ -3352,7 +3362,7 @@ var DevServerManager = class {
|
|
|
3352
3362
|
};
|
|
3353
3363
|
const config = await tryLoad(workdir);
|
|
3354
3364
|
if (config) return config;
|
|
3355
|
-
const wsIdx = workdir.
|
|
3365
|
+
const wsIdx = workdir.search(/[\\/]workspaces[\\/]/);
|
|
3356
3366
|
if (wsIdx !== -1) {
|
|
3357
3367
|
const projectRoot = workdir.slice(0, wsIdx);
|
|
3358
3368
|
if (projectRoot !== workdir) {
|
|
@@ -3940,7 +3950,7 @@ var mcpConfigTool = createTool(
|
|
|
3940
3950
|
mcpNotifyChanged?.(sessionId);
|
|
3941
3951
|
}
|
|
3942
3952
|
async function rebuildTools() {
|
|
3943
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
3953
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-CIM26IFB.js");
|
|
3944
3954
|
const mcpTools = createMcpTools(mcpManagerForTools);
|
|
3945
3955
|
setMcpTools2(mcpTools);
|
|
3946
3956
|
}
|
|
@@ -4232,8 +4242,6 @@ If the requested branch does not exist, it will be created. By default it is bas
|
|
|
4232
4242
|
default branch of the project (origin/HEAD). You can specify sourceBranch to base the new
|
|
4233
4243
|
branch on a different existing branch.
|
|
4234
4244
|
|
|
4235
|
-
Actions that change the workspace (switch, delete) require explicit user approval via a confirmation dialog.
|
|
4236
|
-
|
|
4237
4245
|
Setup commands (e.g. npm install) are configured via .openfox/workspace.json.
|
|
4238
4246
|
|
|
4239
4247
|
Actions:
|
|
@@ -4356,6 +4364,233 @@ Actions:
|
|
|
4356
4364
|
}
|
|
4357
4365
|
);
|
|
4358
4366
|
|
|
4367
|
+
// src/server/tools/project-tasks.ts
|
|
4368
|
+
var tasksService = null;
|
|
4369
|
+
function setTasksService(service) {
|
|
4370
|
+
tasksService = service;
|
|
4371
|
+
}
|
|
4372
|
+
function getTasksService() {
|
|
4373
|
+
if (!tasksService) {
|
|
4374
|
+
throw new Error("Project tasks service not initialized");
|
|
4375
|
+
}
|
|
4376
|
+
return tasksService;
|
|
4377
|
+
}
|
|
4378
|
+
var VALID_ACTIONS = [
|
|
4379
|
+
"list",
|
|
4380
|
+
"get",
|
|
4381
|
+
"create",
|
|
4382
|
+
"edit",
|
|
4383
|
+
"move",
|
|
4384
|
+
"set_gate_value",
|
|
4385
|
+
"set_gates",
|
|
4386
|
+
"duplicate",
|
|
4387
|
+
"delete",
|
|
4388
|
+
"reorder"
|
|
4389
|
+
];
|
|
4390
|
+
var projectTasksTool = createTool(
|
|
4391
|
+
"project_tasks",
|
|
4392
|
+
{
|
|
4393
|
+
type: "function",
|
|
4394
|
+
function: {
|
|
4395
|
+
name: "project_tasks",
|
|
4396
|
+
description: "Work with the project task board \u2014 the kanban of tasks owned by this project. Provides full parity with the human UI: list, get, create, edit, move, fill gate values, set gate configuration, duplicate, delete, and reorder.\n\nRules:\n- Moving a task to in_progress binds it to YOUR current session (you never create a new session for it).\n- Entering 'done' is blocked by unmet column gates (definition of done). When blocked, the error lists the missing fields; set them with action=set_gate_value (filling proof/evidence as part of your work), then retry the move.\n- All transitions are serialized server-side. If another actor changed the task, you get a CONFLICT error: re-list and retry.\n\nActions:\n- list: list all tasks (with gate values, status, queue position, bound session, audit trail)\n- get: fetch a single task (taskId)\n- create: create a task in To Do (prompt must contain text or an attachment)\n- edit: update prompt/attachments/agent/model (taskId + any fields)\n- move: change state \u2014 to: 'todo' | 'in_progress' | 'done' (optional reason for reverts)\n- set_gate_value: fill a gate field (taskId, gateId, value)\n- set_gates: replace the project gate configuration (gates: array of {id, name, description, required, variant})\n- duplicate: copy a task into To Do (taskId)\n- delete: permanently delete a task (taskId). Sessions stay untouched.\n- reorder: move a task to an index within its column (taskId, status, index)",
|
|
4397
|
+
parameters: {
|
|
4398
|
+
type: "object",
|
|
4399
|
+
properties: {
|
|
4400
|
+
action: { type: "string", enum: VALID_ACTIONS, description: "The action to perform" },
|
|
4401
|
+
taskId: {
|
|
4402
|
+
type: "string",
|
|
4403
|
+
description: "Target task id (get, edit, move, set_gate_value, duplicate, delete, reorder)"
|
|
4404
|
+
},
|
|
4405
|
+
prompt: { type: "string", description: "The prompt/instruction executed when the task launches" },
|
|
4406
|
+
attachments: { type: "array", description: "Optional attachments (same shape as chat attachments)" },
|
|
4407
|
+
agentId: { type: "string", description: "Selected agent id" },
|
|
4408
|
+
providerId: { type: "string", description: "Provider id used when a session is spawned" },
|
|
4409
|
+
model: { type: "string", description: "Model label used when a session is spawned" },
|
|
4410
|
+
to: { type: "string", enum: ["todo", "in_progress", "done"], description: "Destination column for move" },
|
|
4411
|
+
reason: { type: "string", description: "Optional short reason (recorded in the audit trail) for reverts" },
|
|
4412
|
+
gateId: { type: "string", description: "Gate field id for set_gate_value" },
|
|
4413
|
+
value: { type: "string", description: "Proof/evidence value for set_gate_value" },
|
|
4414
|
+
gates: {
|
|
4415
|
+
type: "array",
|
|
4416
|
+
description: "Full replacement gate config: [{id, name, description, required, variant}]"
|
|
4417
|
+
},
|
|
4418
|
+
status: { type: "string", enum: ["todo", "in_progress", "done"], description: "Column for reorder" },
|
|
4419
|
+
index: { type: "number", description: "Zero-based target index within the column (reorder)" },
|
|
4420
|
+
expectedVersion: {
|
|
4421
|
+
type: "number",
|
|
4422
|
+
description: "Optimistic concurrency guard \u2014 pass the task version you saw; stale writes fail with CONFLICT"
|
|
4423
|
+
}
|
|
4424
|
+
},
|
|
4425
|
+
required: ["action"]
|
|
4426
|
+
}
|
|
4427
|
+
}
|
|
4428
|
+
},
|
|
4429
|
+
async (args, context, helpers) => {
|
|
4430
|
+
const action = args.action;
|
|
4431
|
+
const permError = validateActionWithPermission(action, VALID_ACTIONS, "project_tasks", context.permittedActions);
|
|
4432
|
+
if (permError) return permError;
|
|
4433
|
+
const session = context.sessionManager.getSession(context.sessionId);
|
|
4434
|
+
if (!session) return helpers.error("Session not found");
|
|
4435
|
+
const projectId = session.projectId;
|
|
4436
|
+
const svc = getTasksService();
|
|
4437
|
+
const actor = { actor: "agent", actorName: "agent" };
|
|
4438
|
+
try {
|
|
4439
|
+
switch (action) {
|
|
4440
|
+
case "list": {
|
|
4441
|
+
const tasks = svc.list(projectId);
|
|
4442
|
+
const gates = getGateConfig(projectId);
|
|
4443
|
+
return helpers.success(JSON.stringify({ gates, tasks: tasks.map((t) => taskForAgent(t)) }, null, 2));
|
|
4444
|
+
}
|
|
4445
|
+
case "get": {
|
|
4446
|
+
if (!args.taskId) return helpers.error('Parameter "taskId" is required for action=get');
|
|
4447
|
+
const task = svc.get(projectId, args.taskId);
|
|
4448
|
+
if (!task) return helpers.error(`Task not found: ${args.taskId}`);
|
|
4449
|
+
return helpers.success(JSON.stringify(taskForAgent(task), null, 2));
|
|
4450
|
+
}
|
|
4451
|
+
case "create": {
|
|
4452
|
+
const task = svc.create(
|
|
4453
|
+
projectId,
|
|
4454
|
+
{
|
|
4455
|
+
prompt: args.prompt ?? "",
|
|
4456
|
+
...args.attachments ? { attachments: sanitizeAttachments(args.attachments) } : {},
|
|
4457
|
+
...args.agentId ? { agentId: args.agentId } : {},
|
|
4458
|
+
...args.providerId ? { providerId: args.providerId } : {},
|
|
4459
|
+
...args.model ? { model: args.model } : {}
|
|
4460
|
+
},
|
|
4461
|
+
actor
|
|
4462
|
+
);
|
|
4463
|
+
return helpers.success(JSON.stringify(taskForAgent(task), null, 2));
|
|
4464
|
+
}
|
|
4465
|
+
case "edit": {
|
|
4466
|
+
if (!args.taskId) return helpers.error('Parameter "taskId" is required for action=edit');
|
|
4467
|
+
const result = await svc.update(
|
|
4468
|
+
projectId,
|
|
4469
|
+
args.taskId,
|
|
4470
|
+
{
|
|
4471
|
+
...args.prompt !== void 0 ? { prompt: args.prompt } : {},
|
|
4472
|
+
...args.attachments ? { attachments: sanitizeAttachments(args.attachments) } : {},
|
|
4473
|
+
...args.agentId !== void 0 ? { agentId: args.agentId } : {},
|
|
4474
|
+
...args.providerId !== void 0 ? { providerId: args.providerId } : {},
|
|
4475
|
+
...args.model !== void 0 ? { model: args.model } : {}
|
|
4476
|
+
},
|
|
4477
|
+
actor,
|
|
4478
|
+
args.expectedVersion
|
|
4479
|
+
);
|
|
4480
|
+
return helpers.success(JSON.stringify(taskForAgent(result.task), null, 2));
|
|
4481
|
+
}
|
|
4482
|
+
case "move": {
|
|
4483
|
+
if (!args.taskId) return helpers.error('Parameter "taskId" is required for action=move');
|
|
4484
|
+
if (!args.to)
|
|
4485
|
+
return helpers.error('Parameter "to" is required for action=move ("todo" | "in_progress" | "done")');
|
|
4486
|
+
const result = await svc.move(projectId, args.taskId, args.to, {
|
|
4487
|
+
actor: "agent",
|
|
4488
|
+
actorName: "agent",
|
|
4489
|
+
sessionId: context.sessionId,
|
|
4490
|
+
...args.reason ? { reason: args.reason } : {},
|
|
4491
|
+
...args.expectedVersion ? { expectedVersion: args.expectedVersion } : {}
|
|
4492
|
+
});
|
|
4493
|
+
return helpers.success(JSON.stringify(taskForAgent(result.task), null, 2));
|
|
4494
|
+
}
|
|
4495
|
+
case "set_gate_value": {
|
|
4496
|
+
if (!args.taskId) return helpers.error('Parameter "taskId" is required for action=set_gate_value');
|
|
4497
|
+
if (!args.gateId) return helpers.error('Parameter "gateId" is required for action=set_gate_value');
|
|
4498
|
+
if (args.value === void 0) return helpers.error('Parameter "value" is required for action=set_gate_value');
|
|
4499
|
+
const result = await svc.setGateValue(
|
|
4500
|
+
projectId,
|
|
4501
|
+
args.taskId,
|
|
4502
|
+
args.gateId,
|
|
4503
|
+
args.value,
|
|
4504
|
+
actor,
|
|
4505
|
+
context.sessionId,
|
|
4506
|
+
args.expectedVersion
|
|
4507
|
+
);
|
|
4508
|
+
return helpers.success(JSON.stringify(taskForAgent(result.task), null, 2));
|
|
4509
|
+
}
|
|
4510
|
+
case "set_gates": {
|
|
4511
|
+
if (!Array.isArray(args.gates)) {
|
|
4512
|
+
return helpers.error('Parameter "gates" (array) is required for action=set_gates');
|
|
4513
|
+
}
|
|
4514
|
+
const gates = sanitizeGates(args.gates);
|
|
4515
|
+
svc.setGateConfig(projectId, gates, actor);
|
|
4516
|
+
return helpers.success(JSON.stringify({ gates }, null, 2));
|
|
4517
|
+
}
|
|
4518
|
+
case "duplicate": {
|
|
4519
|
+
if (!args.taskId) return helpers.error('Parameter "taskId" is required for action=duplicate');
|
|
4520
|
+
const task = svc.duplicate(projectId, args.taskId, actor);
|
|
4521
|
+
return helpers.success(JSON.stringify(taskForAgent(task), null, 2));
|
|
4522
|
+
}
|
|
4523
|
+
case "delete": {
|
|
4524
|
+
if (!args.taskId) return helpers.error('Parameter "taskId" is required for action=delete');
|
|
4525
|
+
await svc.remove(projectId, args.taskId, actor);
|
|
4526
|
+
return helpers.success(`Task ${args.taskId} deleted (linked sessions untouched)`);
|
|
4527
|
+
}
|
|
4528
|
+
case "reorder": {
|
|
4529
|
+
if (!args.taskId) return helpers.error('Parameter "taskId" is required for action=reorder');
|
|
4530
|
+
if (!args.status || args.index === void 0) {
|
|
4531
|
+
return helpers.error('Parameters "status" and "index" are required for action=reorder');
|
|
4532
|
+
}
|
|
4533
|
+
const task = svc.reorder(projectId, args.taskId, args.status, args.index);
|
|
4534
|
+
return helpers.success(JSON.stringify(taskForAgent(task), null, 2));
|
|
4535
|
+
}
|
|
4536
|
+
default:
|
|
4537
|
+
return helpers.error(`Unknown action: ${String(action)}`);
|
|
4538
|
+
}
|
|
4539
|
+
} catch (error) {
|
|
4540
|
+
if (isTaskGateError(error)) {
|
|
4541
|
+
const missing = error.missing.map((m) => `'${m.name}' (${m.gateId}): ${m.description}`).join("; ");
|
|
4542
|
+
return helpers.error(
|
|
4543
|
+
`Move blocked by column gates. Missing required gate fields: ${missing}. Fill them with action=set_gate_value (taskId, gateId, value=<acceptable proof>) and then call move again. You set these values as part of your work \u2014 this is the intended loop, not a dead end.`
|
|
4544
|
+
);
|
|
4545
|
+
}
|
|
4546
|
+
if (isTaskConflictError(error)) {
|
|
4547
|
+
return helpers.error(
|
|
4548
|
+
`Task changed, refresh and retry. Another actor modified this task since your last read. Re-list and retry with the latest updatedAt.`
|
|
4549
|
+
);
|
|
4550
|
+
}
|
|
4551
|
+
throw error;
|
|
4552
|
+
}
|
|
4553
|
+
}
|
|
4554
|
+
);
|
|
4555
|
+
function taskForAgent(task) {
|
|
4556
|
+
return {
|
|
4557
|
+
id: task.id,
|
|
4558
|
+
prompt: task.prompt,
|
|
4559
|
+
status: task.status,
|
|
4560
|
+
...task.runState ? { runState: task.runState } : {},
|
|
4561
|
+
...task.queuePosition ? { queuePosition: task.queuePosition } : {},
|
|
4562
|
+
...task.activeSessionId ? { boundSession: task.activeSessionId } : {},
|
|
4563
|
+
...task.model ? { model: task.model } : {},
|
|
4564
|
+
version: task.version,
|
|
4565
|
+
attachments: task.attachments.length,
|
|
4566
|
+
gateValues: task.gateValues.map((v) => ({ [v.gateId]: v.value, actor: v.actor, timestamp: v.timestamp })),
|
|
4567
|
+
auditTrail: task.auditTrail.map((a) => ({
|
|
4568
|
+
action: a.action,
|
|
4569
|
+
actor: a.actor,
|
|
4570
|
+
detail: a.detail,
|
|
4571
|
+
timestamp: a.timestamp
|
|
4572
|
+
})),
|
|
4573
|
+
updatedAt: task.updatedAt
|
|
4574
|
+
};
|
|
4575
|
+
}
|
|
4576
|
+
function sanitizeAttachments(raw) {
|
|
4577
|
+
return raw.filter(
|
|
4578
|
+
(a) => typeof a === "object" && a !== null && typeof a.id === "string" && typeof a.filename === "string"
|
|
4579
|
+
);
|
|
4580
|
+
}
|
|
4581
|
+
function sanitizeGates(raw) {
|
|
4582
|
+
return raw.map((g, i) => {
|
|
4583
|
+
const gate = g;
|
|
4584
|
+
return {
|
|
4585
|
+
id: typeof gate.id === "string" && gate.id ? gate.id : `gate_${i}`,
|
|
4586
|
+
name: typeof gate.name === "string" && gate.name ? gate.name : `Gate ${i + 1}`,
|
|
4587
|
+
description: typeof gate.description === "string" ? gate.description : "",
|
|
4588
|
+
required: gate.required !== false,
|
|
4589
|
+
variant: gate.variant === "ready" ? "ready" : "done"
|
|
4590
|
+
};
|
|
4591
|
+
});
|
|
4592
|
+
}
|
|
4593
|
+
|
|
4359
4594
|
// src/server/tools/index.ts
|
|
4360
4595
|
var _builtInTools;
|
|
4361
4596
|
function getBuiltInTools() {
|
|
@@ -4376,7 +4611,8 @@ function getBuiltInTools() {
|
|
|
4376
4611
|
stepDoneTool,
|
|
4377
4612
|
backgroundProcessTool,
|
|
4378
4613
|
mcpConfigTool,
|
|
4379
|
-
workspaceTool
|
|
4614
|
+
workspaceTool,
|
|
4615
|
+
projectTasksTool
|
|
4380
4616
|
];
|
|
4381
4617
|
}
|
|
4382
4618
|
return _builtInTools;
|
|
@@ -4625,6 +4861,7 @@ export {
|
|
|
4625
4861
|
setMcpConfigMode,
|
|
4626
4862
|
setMcpConfigPath,
|
|
4627
4863
|
setNotifyMcpServersChanged,
|
|
4864
|
+
setTasksService,
|
|
4628
4865
|
getBuiltInToolNames,
|
|
4629
4866
|
parseToolPermissions,
|
|
4630
4867
|
getToolPermissions,
|
|
@@ -4635,4 +4872,4 @@ export {
|
|
|
4635
4872
|
getToolRegistryForAgent,
|
|
4636
4873
|
createToolRegistry
|
|
4637
4874
|
};
|
|
4638
|
-
//# sourceMappingURL=chunk-
|
|
4875
|
+
//# sourceMappingURL=chunk-K733B5T2.js.map
|
|
@@ -53,25 +53,23 @@ var providerSchema = z.object({
|
|
|
53
53
|
authAdapter: z.string().optional(),
|
|
54
54
|
transportAdapter: z.string().optional(),
|
|
55
55
|
credentialRef: z.string().optional()
|
|
56
|
-
}).transform(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
})
|
|
74
|
-
);
|
|
56
|
+
}).transform((provider) => ({
|
|
57
|
+
id: provider.id,
|
|
58
|
+
...provider.preset ? { preset: provider.preset } : {},
|
|
59
|
+
name: provider.name ?? provider.id,
|
|
60
|
+
url: provider.url ?? "",
|
|
61
|
+
backend: provider.backend ?? "unknown",
|
|
62
|
+
...provider.apiKey ? { apiKey: provider.apiKey } : {},
|
|
63
|
+
models: provider.models ?? [],
|
|
64
|
+
isActive: provider.isActive ?? false,
|
|
65
|
+
createdAt: provider.createdAt ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
66
|
+
...provider.isLocal !== void 0 ? { isLocal: provider.isLocal } : {},
|
|
67
|
+
...provider.thinkingField ? { thinkingField: provider.thinkingField } : {},
|
|
68
|
+
...provider.sendReasoningInMessages !== void 0 ? { sendReasoningInMessages: provider.sendReasoningInMessages } : {},
|
|
69
|
+
...provider.authAdapter ? { authAdapter: provider.authAdapter } : {},
|
|
70
|
+
...provider.transportAdapter ? { transportAdapter: provider.transportAdapter } : {},
|
|
71
|
+
...provider.credentialRef ? { credentialRef: provider.credentialRef } : {}
|
|
72
|
+
}));
|
|
75
73
|
var serverSchema = z.object({
|
|
76
74
|
port: z.number().default(10369),
|
|
77
75
|
host: z.string().default("127.0.0.1"),
|
|
@@ -371,4 +369,4 @@ export {
|
|
|
371
369
|
removeProvider,
|
|
372
370
|
activateProvider
|
|
373
371
|
};
|
|
374
|
-
//# sourceMappingURL=chunk-
|
|
372
|
+
//# sourceMappingURL=chunk-KSXCOHHW.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
updateSessionMcpDisabledServers
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3O77NT4T.js";
|
|
4
4
|
import {
|
|
5
5
|
getDatabase
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PBW3YC3G.js";
|
|
7
7
|
|
|
8
8
|
// src/server/mcp/session-overrides.ts
|
|
9
9
|
var sessionOverrides = /* @__PURE__ */ new Map();
|
|
@@ -62,4 +62,4 @@ export {
|
|
|
62
62
|
clearSessionOverrides,
|
|
63
63
|
getAllSessionOverrides
|
|
64
64
|
};
|
|
65
|
-
//# sourceMappingURL=chunk-
|
|
65
|
+
//# sourceMappingURL=chunk-L63Q4JQJ.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-V4IE7HJY.js";
|
|
4
4
|
import {
|
|
5
5
|
getBackendCapabilities
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AZHWLLPP.js";
|
|
7
7
|
import {
|
|
8
8
|
ensureVersionPrefix
|
|
9
9
|
} from "./chunk-HNCM3D7Y.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
LLMError,
|
|
19
19
|
OpenAIHttpClient
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-OXSTNSCF.js";
|
|
21
21
|
import {
|
|
22
22
|
logger
|
|
23
23
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -310,4 +310,4 @@ function createLLMClient(config, initialBackend = "unknown") {
|
|
|
310
310
|
export {
|
|
311
311
|
createLLMClient
|
|
312
312
|
};
|
|
313
|
-
//# sourceMappingURL=chunk-
|
|
313
|
+
//# sourceMappingURL=chunk-LXYPMFTH.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLLMClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LXYPMFTH.js";
|
|
4
4
|
import {
|
|
5
5
|
getModelProfile
|
|
6
6
|
} from "./chunk-V4IE7HJY.js";
|
|
7
7
|
import {
|
|
8
8
|
getBackendCapabilities
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AZHWLLPP.js";
|
|
10
10
|
import {
|
|
11
11
|
buildModelsUrl,
|
|
12
12
|
ensureVersionPrefix,
|
|
@@ -245,8 +245,7 @@ async function fetchModelsWithContext(baseUrl, apiKey, backend) {
|
|
|
245
245
|
if (lmStudioModels.length > 0) return lmStudioModels;
|
|
246
246
|
logger.info("LM Studio native endpoint unavailable, falling back to /v1/models");
|
|
247
247
|
}
|
|
248
|
-
const
|
|
249
|
-
const url = isOpenCodeGo ? buildModelsUrl(baseUrl.replace("/zen/go", "/zen")) : buildModelsUrl(baseUrl);
|
|
248
|
+
const url = buildModelsUrl(baseUrl);
|
|
250
249
|
logger.info("Fetching models via /v1/models", { url });
|
|
251
250
|
const models = await fetchModelsFromBackend(url, apiKey);
|
|
252
251
|
if (models.length === 0) return [];
|
|
@@ -804,4 +803,4 @@ export {
|
|
|
804
803
|
parseDefaultModelSelection,
|
|
805
804
|
createProviderManager
|
|
806
805
|
};
|
|
807
|
-
//# sourceMappingURL=chunk-
|
|
806
|
+
//# sourceMappingURL=chunk-MUSPWEBB.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-V4IE7HJY.js";
|
|
7
7
|
import {
|
|
8
8
|
getBackendCapabilities
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AZHWLLPP.js";
|
|
10
10
|
import {
|
|
11
11
|
buildModelParams
|
|
12
12
|
} from "./chunk-L737Y63F.js";
|
|
@@ -438,4 +438,4 @@ export {
|
|
|
438
438
|
createChatDoneEvent,
|
|
439
439
|
consumeStreamGenerator
|
|
440
440
|
};
|
|
441
|
-
//# sourceMappingURL=chunk-
|
|
441
|
+
//# sourceMappingURL=chunk-NLO64UE3.js.map
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
combineEventsWithSnapshot,
|
|
3
3
|
getEventStore
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-JXLRL5JR.js";
|
|
5
5
|
import {
|
|
6
6
|
createContextStateMessage,
|
|
7
7
|
createSessionStateMessage
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-I7FY2LTR.js";
|
|
9
9
|
import {
|
|
10
10
|
getPendingQuestionsForSession
|
|
11
11
|
} from "./chunk-JURM3RPZ.js";
|
|
12
12
|
import {
|
|
13
13
|
buildMessagesFromStoredEvents,
|
|
14
14
|
foldPendingConfirmations
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-UTIQ7OO5.js";
|
|
16
16
|
import {
|
|
17
17
|
updateSessionMetadata
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-3O77NT4T.js";
|
|
19
19
|
import {
|
|
20
20
|
getRuntimeConfig
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-UPBWEHIL.js";
|
|
22
22
|
import {
|
|
23
23
|
getMaxVisibleItems
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-HP5CIB66.js";
|
|
25
25
|
import {
|
|
26
26
|
logger
|
|
27
27
|
} from "./chunk-K44MW7JJ.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-EM7ISGUP.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-NWJLWLKF.js.map
|