openfox 2.0.113 → 2.0.115
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 +43 -0
- package/dist/CHANGELOG.md +43 -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-PEK5JDHO.js → chat-handler-5SP265CR.js} +32 -26
- package/dist/{chunk-HKD4IMOE.js → chunk-27NABDXB.js} +2 -2
- package/dist/{chunk-FF2EKUQO.js → chunk-2FCLCUVR.js} +6 -6
- package/dist/{chunk-ONONXV3N.js → chunk-37QLXLML.js} +4 -4
- package/dist/{chunk-YB6WYVNY.js → chunk-3KBRMBTP.js} +2 -2
- package/dist/{chunk-YGPPFVLJ.js → chunk-3NPLERPQ.js} +17 -17
- package/dist/{chunk-XQR76MQ5.js → chunk-3PG65AXG.js} +18 -3
- package/dist/chunk-3QQAIUZI.js +957 -0
- package/dist/{chunk-PWXBIUEY.js → chunk-5PT4UMRR.js} +89 -1
- package/dist/chunk-5V3BF67X.js +7 -0
- package/dist/{chunk-6UPBZ2ZR.js → chunk-6KPJLELC.js} +4 -4
- package/dist/chunk-6RGACY4E.js +1081 -0
- package/dist/{chunk-BNFGDTEU.js → chunk-AESOGRFK.js} +2 -2
- package/dist/{chunk-YHEQTVFV.js → chunk-AZHWLLPP.js} +1 -1
- package/dist/{chunk-TCGWZBTS.js → chunk-BVVCRIVM.js} +4 -4
- package/dist/{chunk-EMI3YYLP.js → chunk-BWVO5WFK.js} +4 -4
- package/dist/{chunk-CP44U7BT.js → chunk-ERNWAKUB.js} +7 -7
- package/dist/{chunk-WWTYWLDM.js → chunk-HD6Y77RO.js} +2 -2
- package/dist/{chunk-4NMGX5F2.js → chunk-I7FY2LTR.js} +2 -2
- package/dist/{chunk-5VYSKVZT.js → chunk-JFK4GKQD.js} +321 -54
- package/dist/{chunk-43M7QZMX.js → chunk-JGWHRYWG.js} +4 -4
- package/dist/{chunk-Y64PEWKP.js → chunk-JLAR2CMV.js} +2 -2
- package/dist/{chunk-BYSUSSSC.js → chunk-LNNBLB6G.js} +48 -151
- package/dist/{chunk-V4664YKR.js → chunk-LTYL6ZGH.js} +2 -2
- package/dist/{chunk-R2MTWC7C.js → chunk-M6X6AIEG.js} +6 -4
- package/dist/{chunk-VGRVPYZ5.js → chunk-O6DU226D.js} +2 -2
- package/dist/{chunk-TEQEDOWI.js → chunk-OCBBAEMT.js} +288 -316
- package/dist/{chunk-SNLLOXCM.js → chunk-OCSTEGK7.js} +3 -3
- package/dist/{chunk-HGOTZWON.js → chunk-OKVHMKE2.js} +60 -1064
- package/dist/chunk-OSXPQSLW.js +128 -0
- package/dist/{chunk-O2YSYW2F.js → chunk-TFF5T3K3.js} +10 -10
- package/dist/{chunk-3R43CMLS.js → chunk-TGLVWAFC.js} +11 -11
- package/dist/{chunk-L737Y63F.js → chunk-TOKQ2UVG.js} +2 -2
- package/dist/{chunk-AZFZE36I.js → chunk-VWEATA7R.js} +18 -8
- package/dist/{chunk-BKCW3JLL.js → chunk-X25Q6RAV.js} +1 -1
- package/dist/{chunk-JR54MDZI.js → chunk-YX3OQBNX.js} +3 -3
- package/dist/{chunk-EC5T5A6O.js → chunk-ZTOG6LJD.js} +3 -3
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/client-KE7EDI2D.js +16 -0
- package/dist/{client-pure-VFZIIK4S.js → client-pure-66Z6FWS6.js} +2 -2
- package/dist/command-defaults/mark-done.command.md +14 -0
- package/dist/compactor-SKVC2VNL.js +32 -0
- package/dist/{dynamic-context-F2XTQJR5.js → dynamic-context-QNB4ELLP.js} +10 -9
- package/dist/{events-224IO5NJ.js → events-5PLO4QJU.js} +9 -7
- package/dist/{folding-YTTTVS56.js → folding-CJWYFUKD.js} +7 -5
- package/dist/http-client-KLODRQC2.js +11 -0
- package/dist/{inspect-proxy-B7LGGTM7.js → inspect-proxy-K6QKEYDT.js} +4 -4
- package/dist/launch-EOXVWLOP.js +52 -0
- package/dist/{manager-4QGXI6WZ.js → manager-LZ3JQ443.js} +5 -5
- package/dist/{model-overrides-OY2YKUNV.js → model-overrides-5UVW3KTE.js} +4 -4
- package/dist/orchestrator-ED3KFPXO.js +63 -0
- package/dist/package.json +3 -3
- package/dist/{path-security-PFMZY7IA.js → path-security-B6EZC63L.js} +13 -11
- package/dist/{platform-QNGCKX4L.js → platform-6RPPBHKH.js} +4 -4
- package/dist/{processor-NYPJ5PFA.js → processor-226ZOTRI.js} +31 -25
- package/dist/{project-creator-AWP2JUFS.js → project-creator-VBFE35NI.js} +3 -3
- package/dist/{projects-C4353IQK.js → projects-AXHZOBR2.js} +5 -3
- package/dist/{protocol-CBT1d98i.d.ts → protocol-JdxRpPxM.d.ts} +21 -3
- package/dist/{protocol-LZZ7C4VQ.js → protocol-RKSWKNXI.js} +3 -3
- package/dist/provider/index.d.ts +4 -4
- package/dist/{provider-PIRPN2CC.js → provider-DL4ZWQY7.js} +8 -8
- package/dist/{provider-manager-GNEPR6UN.js → provider-manager-6CLRMGDE.js} +8 -8
- package/dist/{registry-VCKDSVKA.js → registry-5XI5NDBF.js} +6 -4
- package/dist/{serve-6DRHQLCG.js → serve-DARV4NJG.js} +36 -33
- package/dist/server/index.d.ts +13 -6
- package/dist/server/index.js +35 -32
- package/dist/server-LQJ7MBDS.js +55 -0
- package/dist/service-4JKTGPRG.js +25 -0
- package/dist/{session-overrides-RNKV35MU.js → session-overrides-AZKV6BRD.js} +8 -6
- package/dist/{sessions-D5CEPQGU.js → sessions-752IZIIK.js} +7 -5
- package/dist/{settings-BNRNX6IW.js → settings-2AHDKCD7.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 +24 -6
- package/dist/tasks-XJXHU623.js +217 -0
- package/dist/{tools-2B363F7L.js → tools-QYYNFMGU.js} +31 -23
- package/dist/{types-cVfqOj6M.d.ts → types-CIVhQMvD.d.ts} +1 -1
- package/dist/{types-BAxh20ZL.d.ts → types-Df7NM9b5.d.ts} +76 -1
- package/dist/{update-IQMRYN7J.js → update-2REP2WB6.js} +2 -2
- package/dist/web/assets/{index-CjWC6EQ4.css → index-BmILAZrT.css} +1 -1
- package/dist/web/assets/index-M7ToECa4.js +324 -0
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/dist/workflow-defaults/default.workflow.json +5 -3
- package/dist/{workspace-YUNHV4WS.js → workspace-RMZVTFJD.js} +4 -4
- package/package.json +3 -3
- package/dist/chunk-B2PHPBFU.js +0 -7
- package/dist/client-3LJGD6KY.js +0 -16
- package/dist/compactor-ZBNKANHV.js +0 -30
- package/dist/http-client-YC3UA5OZ.js +0 -11
- package/dist/orchestrator-JKBY7B3P.js +0 -57
- package/dist/server-HUHFJW7U.js +0 -48
- package/dist/web/assets/index-DBUtUSHK.js +0 -323
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import {
|
|
2
|
+
logger
|
|
3
|
+
} from "./chunk-K44MW7JJ.js";
|
|
4
|
+
|
|
5
|
+
// src/server/shared/item-loader.ts
|
|
6
|
+
import { readdir, readFile, access, writeFile, mkdir, unlink } from "fs/promises";
|
|
7
|
+
import { join } from "path";
|
|
8
|
+
import { constants } from "fs";
|
|
9
|
+
import matter from "gray-matter";
|
|
10
|
+
async function pathExists(path) {
|
|
11
|
+
try {
|
|
12
|
+
await access(path, constants.R_OK);
|
|
13
|
+
return true;
|
|
14
|
+
} catch {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
async function getDefaultIds(dir, extension) {
|
|
19
|
+
try {
|
|
20
|
+
const files = (await readdir(dir)).filter((f) => f.endsWith(extension));
|
|
21
|
+
return files.map((f) => f.replace(extension, ""));
|
|
22
|
+
} catch {
|
|
23
|
+
return [];
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
async function loadItemsFromDir(dir, options) {
|
|
27
|
+
if (!await pathExists(dir)) {
|
|
28
|
+
return [];
|
|
29
|
+
}
|
|
30
|
+
let files;
|
|
31
|
+
try {
|
|
32
|
+
files = (await readdir(dir)).filter((f) => f.endsWith(options.extension));
|
|
33
|
+
} catch {
|
|
34
|
+
return [];
|
|
35
|
+
}
|
|
36
|
+
const items = [];
|
|
37
|
+
for (const file of files) {
|
|
38
|
+
try {
|
|
39
|
+
const raw = await readFile(join(dir, file), "utf-8");
|
|
40
|
+
const { data, content } = matter(raw);
|
|
41
|
+
if (data.id && content.trim()) {
|
|
42
|
+
items.push({
|
|
43
|
+
metadata: data,
|
|
44
|
+
prompt: content.trim()
|
|
45
|
+
});
|
|
46
|
+
} else {
|
|
47
|
+
logger.warn(`Skipping invalid ${options.logName} file`, { file });
|
|
48
|
+
}
|
|
49
|
+
} catch (err) {
|
|
50
|
+
logger.warn(`Failed to parse ${options.logName} file`, {
|
|
51
|
+
file,
|
|
52
|
+
error: err instanceof Error ? err.message : String(err)
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return items;
|
|
57
|
+
}
|
|
58
|
+
async function findFileByInternalId(dir, id, ext) {
|
|
59
|
+
if (!await pathExists(dir)) return null;
|
|
60
|
+
let files;
|
|
61
|
+
try {
|
|
62
|
+
files = await readdir(dir);
|
|
63
|
+
} catch {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
for (const file of files) {
|
|
67
|
+
if (!file.endsWith(ext)) continue;
|
|
68
|
+
try {
|
|
69
|
+
const raw = await readFile(join(dir, file), "utf-8");
|
|
70
|
+
let parsedId;
|
|
71
|
+
if (ext === ".md" || ext === ".mdx") {
|
|
72
|
+
const { data } = matter(raw);
|
|
73
|
+
parsedId = data.id;
|
|
74
|
+
} else {
|
|
75
|
+
const parsed = JSON.parse(raw);
|
|
76
|
+
parsedId = parsed.metadata?.id ?? parsed.id;
|
|
77
|
+
}
|
|
78
|
+
if (parsedId === id) {
|
|
79
|
+
return join(dir, file);
|
|
80
|
+
}
|
|
81
|
+
} catch {
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
async function saveItemToDir(dir, item, ext, serialize) {
|
|
87
|
+
if (!await pathExists(dir)) {
|
|
88
|
+
await mkdir(dir, { recursive: true });
|
|
89
|
+
}
|
|
90
|
+
const meta = item.metadata;
|
|
91
|
+
const filePath = join(dir, `${meta.id}${ext}`);
|
|
92
|
+
const existing = await findFileByInternalId(dir, meta.id, ext);
|
|
93
|
+
if (existing && existing !== filePath) {
|
|
94
|
+
await unlink(existing).catch(() => {
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
await writeFile(filePath, serialize(item), "utf-8");
|
|
98
|
+
}
|
|
99
|
+
var jsonSerializer = (item) => JSON.stringify(item, null, 2) + "\n";
|
|
100
|
+
async function deleteItemFromDir(dir, id, ext) {
|
|
101
|
+
const fastPath = join(dir, `${id}${ext}`);
|
|
102
|
+
try {
|
|
103
|
+
await unlink(fastPath);
|
|
104
|
+
return { success: true };
|
|
105
|
+
} catch {
|
|
106
|
+
const found = await findFileByInternalId(dir, id, ext);
|
|
107
|
+
if (found) {
|
|
108
|
+
try {
|
|
109
|
+
await unlink(found);
|
|
110
|
+
return { success: true };
|
|
111
|
+
} catch {
|
|
112
|
+
return { success: false };
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return { success: false };
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export {
|
|
120
|
+
pathExists,
|
|
121
|
+
getDefaultIds,
|
|
122
|
+
loadItemsFromDir,
|
|
123
|
+
findFileByInternalId,
|
|
124
|
+
saveItemToDir,
|
|
125
|
+
jsonSerializer,
|
|
126
|
+
deleteItemFromDir
|
|
127
|
+
};
|
|
128
|
+
//# sourceMappingURL=chunk-OSXPQSLW.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getAllInstructions,
|
|
3
3
|
getEnabledSkillMetadata
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2FCLCUVR.js";
|
|
5
5
|
import {
|
|
6
6
|
buildTopLevelSystemPrompt
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-27NABDXB.js";
|
|
8
8
|
import {
|
|
9
9
|
findAgentById,
|
|
10
10
|
getRuntimeConfig,
|
|
11
11
|
getSubAgents,
|
|
12
12
|
loadAllAgentsDefault,
|
|
13
13
|
resolveDefaultAgentId
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-LNNBLB6G.js";
|
|
15
15
|
import {
|
|
16
16
|
logger
|
|
17
17
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -94,21 +94,21 @@ async function loadSessionContext(sessionManager, sessionId) {
|
|
|
94
94
|
const { content: instructionContent } = await getAllInstructions(session.workdir, session.projectId);
|
|
95
95
|
const runtimeConfig = getRuntimeConfig();
|
|
96
96
|
const configDir = getGlobalConfigDir(runtimeConfig.mode ?? "production");
|
|
97
|
-
const skills = await getEnabledSkillMetadata(configDir, sessionManager.
|
|
97
|
+
const skills = await getEnabledSkillMetadata(configDir, sessionManager.getProjectWorkdir(sessionId));
|
|
98
98
|
return { instructionContent: instructionContent ?? "", skills };
|
|
99
99
|
}
|
|
100
100
|
function resolveAgentDef(sessionManager, sessionId) {
|
|
101
|
-
return loadAllAgentsDefault().then((allAgents) => {
|
|
101
|
+
return loadAllAgentsDefault(sessionManager.getProjectWorkdir(sessionId)).then((allAgents) => {
|
|
102
102
|
const session = sessionManager.requireSession(sessionId);
|
|
103
103
|
return findAgentById(session.mode, allAgents) ?? findAgentById(resolveDefaultAgentId(), allAgents);
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
106
|
async function buildCachedPrompt(sessionManager, sessionId, agentDef, modelName) {
|
|
107
107
|
const { instructionContent, skills } = await loadSessionContext(sessionManager, sessionId);
|
|
108
|
-
const { getToolRegistryForAgent } = await import("./tools-
|
|
108
|
+
const { getToolRegistryForAgent } = await import("./tools-QYYNFMGU.js");
|
|
109
109
|
const tools = getToolRegistryForAgent(agentDef, sessionId).definitions;
|
|
110
110
|
const toolFingerprint = getToolFingerprint(tools);
|
|
111
|
-
const allAgents = await loadAllAgentsDefault();
|
|
111
|
+
const allAgents = await loadAllAgentsDefault(sessionManager.getProjectWorkdir(sessionId));
|
|
112
112
|
const subAgentDefs = getSubAgents(allAgents);
|
|
113
113
|
const session = sessionManager.requireSession(sessionId);
|
|
114
114
|
const systemPrompt = buildTopLevelSystemPrompt(
|
|
@@ -124,14 +124,14 @@ async function buildCachedPrompt(sessionManager, sessionId, agentDef, modelName)
|
|
|
124
124
|
async function computeSessionHash(sessionManager, sessionId, modelName) {
|
|
125
125
|
const { instructionContent, skills } = await loadSessionContext(sessionManager, sessionId);
|
|
126
126
|
const agentDef = await resolveAgentDef(sessionManager, sessionId);
|
|
127
|
-
const { getToolRegistryForAgent } = await import("./tools-
|
|
127
|
+
const { getToolRegistryForAgent } = await import("./tools-QYYNFMGU.js");
|
|
128
128
|
const tools = getToolRegistryForAgent(agentDef, sessionId).definitions;
|
|
129
129
|
const toolFingerprint = getToolFingerprint(tools);
|
|
130
130
|
return computeDynamicContextHash(instructionContent, skills, toolFingerprint, modelName);
|
|
131
131
|
}
|
|
132
132
|
async function applyDynamicContext(sessionManager, sessionId, modelName) {
|
|
133
133
|
const session = sessionManager.requireSession(sessionId);
|
|
134
|
-
const allAgents = await loadAllAgentsDefault();
|
|
134
|
+
const allAgents = await loadAllAgentsDefault(sessionManager.getProjectWorkdir(sessionId));
|
|
135
135
|
const agentDef = findAgentById(session.mode, allAgents) ?? findAgentById(resolveDefaultAgentId(), allAgents);
|
|
136
136
|
const { systemPrompt, tools, hash } = await buildCachedPrompt(sessionManager, sessionId, agentDef, modelName);
|
|
137
137
|
sessionManager.setCachedPrompt(sessionId, systemPrompt, tools, hash);
|
|
@@ -148,4 +148,4 @@ export {
|
|
|
148
148
|
computeSessionHash,
|
|
149
149
|
applyDynamicContext
|
|
150
150
|
};
|
|
151
|
-
//# sourceMappingURL=chunk-
|
|
151
|
+
//# sourceMappingURL=chunk-TFF5T3K3.js.map
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
combineEventsWithSnapshot,
|
|
3
3
|
getEventStore
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ERNWAKUB.js";
|
|
5
|
+
import {
|
|
6
|
+
updateSessionMetadata
|
|
7
|
+
} from "./chunk-VWEATA7R.js";
|
|
5
8
|
import {
|
|
6
9
|
createContextStateMessage,
|
|
7
10
|
createSessionStateMessage
|
|
8
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-I7FY2LTR.js";
|
|
9
12
|
import {
|
|
10
13
|
getPendingQuestionsForSession
|
|
11
14
|
} from "./chunk-JURM3RPZ.js";
|
|
12
15
|
import {
|
|
13
16
|
buildMessagesFromStoredEvents,
|
|
14
17
|
foldPendingConfirmations
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
updateSessionMetadata
|
|
18
|
-
} from "./chunk-AZFZE36I.js";
|
|
18
|
+
} from "./chunk-3KBRMBTP.js";
|
|
19
19
|
import {
|
|
20
20
|
getRuntimeConfig
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-LNNBLB6G.js";
|
|
22
22
|
import {
|
|
23
23
|
getMaxVisibleItems
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-HD6Y77RO.js";
|
|
25
25
|
import {
|
|
26
26
|
logger
|
|
27
27
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -34,7 +34,7 @@ function getSessionMessageCount(sessionId) {
|
|
|
34
34
|
for (const event of events) {
|
|
35
35
|
if (event.type === "message.start") {
|
|
36
36
|
const data = event.data;
|
|
37
|
-
if (data.role === "user") {
|
|
37
|
+
if (data.role === "user" && !data.isSystemGenerated) {
|
|
38
38
|
count++;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -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-KE7EDI2D.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-TGLVWAFC.js.map
|
|
@@ -501,7 +501,7 @@ function getThinking(msg, override) {
|
|
|
501
501
|
function buildAssistantMessage(msg, thinkingField, sendReasoningInMessages) {
|
|
502
502
|
const result = {
|
|
503
503
|
role: "assistant",
|
|
504
|
-
content: msg.
|
|
504
|
+
content: msg.content || " "
|
|
505
505
|
};
|
|
506
506
|
if (msg.toolCalls?.length) {
|
|
507
507
|
result["tool_calls"] = convertToolCalls(msg.toolCalls);
|
|
@@ -697,4 +697,4 @@ export {
|
|
|
697
697
|
buildStreamingCreateParams,
|
|
698
698
|
mapFinishReason
|
|
699
699
|
};
|
|
700
|
-
//# sourceMappingURL=chunk-
|
|
700
|
+
//# sourceMappingURL=chunk-TOKQ2UVG.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveDefaultAgentId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LNNBLB6G.js";
|
|
4
4
|
import {
|
|
5
5
|
getDatabase
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5PT4UMRR.js";
|
|
7
7
|
|
|
8
8
|
// src/server/db/sessions.ts
|
|
9
9
|
function getProjectDangerLevel(projectId) {
|
|
@@ -20,7 +20,7 @@ function createSession(projectId, workdir, title, providerId, providerModel, wor
|
|
|
20
20
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
21
21
|
const id = crypto.randomUUID();
|
|
22
22
|
const dangerLevel = getProjectDangerLevel(projectId);
|
|
23
|
-
const defaultAgent = resolveDefaultAgentId();
|
|
23
|
+
const defaultAgent = resolveDefaultAgentId(projectId);
|
|
24
24
|
db.prepare(
|
|
25
25
|
`
|
|
26
26
|
INSERT INTO sessions (id, project_id, workdir, workspace, branch, phase, mode, workflow_phase, is_running, created_at, updated_at, title, provider_id, provider_model, danger_level)
|
|
@@ -362,13 +362,23 @@ function toggleFavorite(id, isFavorite) {
|
|
|
362
362
|
const db = getDatabase();
|
|
363
363
|
db.prepare(`UPDATE sessions SET is_favorite = ? WHERE id = ?`).run(isFavorite ? 1 : 0, id);
|
|
364
364
|
}
|
|
365
|
-
function createWorkflowExecution(id, sessionId, workflowId, workflowName, workflowColor, params) {
|
|
365
|
+
function createWorkflowExecution(id, sessionId, workflowId, workflowName, workflowColor, params, subGroup) {
|
|
366
366
|
const db = getDatabase();
|
|
367
367
|
const now = Date.now();
|
|
368
368
|
db.prepare(
|
|
369
|
-
`INSERT INTO workflow_executions (id, session_id, workflow_id, workflow_name, workflow_color, status, step_output, params, created_at, updated_at)
|
|
370
|
-
VALUES (?, ?, ?, ?, ?, 'running', '{}', ?, ?, ?)`
|
|
371
|
-
).run(
|
|
369
|
+
`INSERT INTO workflow_executions (id, session_id, workflow_id, workflow_name, workflow_color, status, step_output, params, sub_group, created_at, updated_at)
|
|
370
|
+
VALUES (?, ?, ?, ?, ?, 'running', '{}', ?, ?, ?, ?)`
|
|
371
|
+
).run(
|
|
372
|
+
id,
|
|
373
|
+
sessionId,
|
|
374
|
+
workflowId,
|
|
375
|
+
workflowName,
|
|
376
|
+
workflowColor ?? null,
|
|
377
|
+
JSON.stringify(params),
|
|
378
|
+
subGroup ?? null,
|
|
379
|
+
now,
|
|
380
|
+
now
|
|
381
|
+
);
|
|
372
382
|
}
|
|
373
383
|
function updateWorkflowExecutionStatus(executionId, status, stepId, stepName, stepOutput, pendingChoices) {
|
|
374
384
|
const db = getDatabase();
|
|
@@ -419,4 +429,4 @@ export {
|
|
|
419
429
|
getActiveWorkflowExecution,
|
|
420
430
|
clearWorkflowExecution
|
|
421
431
|
};
|
|
422
|
-
//# sourceMappingURL=chunk-
|
|
432
|
+
//# sourceMappingURL=chunk-VWEATA7R.js.map
|
|
@@ -6,10 +6,10 @@ 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
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TOKQ2UVG.js";
|
|
13
13
|
import {
|
|
14
14
|
logger
|
|
15
15
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -438,4 +438,4 @@ export {
|
|
|
438
438
|
createChatDoneEvent,
|
|
439
439
|
consumeStreamGenerator
|
|
440
440
|
};
|
|
441
|
-
//# sourceMappingURL=chunk-
|
|
441
|
+
//# sourceMappingURL=chunk-YX3OQBNX.js.map
|
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
} from "./chunk-I72ACQ6R.js";
|
|
12
12
|
import {
|
|
13
13
|
getPlatformShell
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-AESOGRFK.js";
|
|
15
15
|
import {
|
|
16
16
|
SETTINGS_KEYS,
|
|
17
17
|
getSetting
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-HD6Y77RO.js";
|
|
19
19
|
|
|
20
20
|
// src/server/utils/shell.ts
|
|
21
21
|
import { spawn } from "child_process";
|
|
@@ -214,4 +214,4 @@ export {
|
|
|
214
214
|
getSessionProcesses2 as getSessionProcesses,
|
|
215
215
|
getProcessLogs
|
|
216
216
|
};
|
|
217
|
-
//# sourceMappingURL=chunk-
|
|
217
|
+
//# sourceMappingURL=chunk-ZTOG6LJD.js.map
|
package/dist/cli/dev.js
CHANGED
package/dist/cli/index.js
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createLLMClient
|
|
3
|
+
} from "./chunk-JGWHRYWG.js";
|
|
4
|
+
import "./chunk-V4IE7HJY.js";
|
|
5
|
+
import "./chunk-AZHWLLPP.js";
|
|
6
|
+
import "./chunk-HNCM3D7Y.js";
|
|
7
|
+
import "./chunk-TOKQ2UVG.js";
|
|
8
|
+
import "./chunk-LTYL6ZGH.js";
|
|
9
|
+
import "./chunk-HD6Y77RO.js";
|
|
10
|
+
import "./chunk-5PT4UMRR.js";
|
|
11
|
+
import "./chunk-K44MW7JJ.js";
|
|
12
|
+
import "./chunk-5WRI5ZAA.js";
|
|
13
|
+
export {
|
|
14
|
+
createLLMClient
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=client-KE7EDI2D.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
mapFinishReason,
|
|
9
9
|
parseToolArguments,
|
|
10
10
|
resolveAttachmentsInMessages
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-TOKQ2UVG.js";
|
|
12
12
|
import "./chunk-5WRI5ZAA.js";
|
|
13
13
|
export {
|
|
14
14
|
buildModelParams,
|
|
@@ -21,4 +21,4 @@ export {
|
|
|
21
21
|
parseToolArguments,
|
|
22
22
|
resolveAttachmentsInMessages
|
|
23
23
|
};
|
|
24
|
-
//# sourceMappingURL=client-pure-
|
|
24
|
+
//# sourceMappingURL=client-pure-66Z6FWS6.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: mark-done
|
|
3
|
+
name: Mark Task as Done
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Mark the task you are currently working on as done using the `project_tasks` tool.
|
|
7
|
+
|
|
8
|
+
1. Use `project_tasks` with `action=list` to find the task bound to your current session (the one in the In Progress column).
|
|
9
|
+
2. Confirm the work is genuinely complete before proceeding.
|
|
10
|
+
3. Move it: `action=move`, `taskId=<id>`, `to='done'`.
|
|
11
|
+
4. If the move is blocked by unmet column gates, the error lists the missing fields: fill each with `action=set_gate_value` (`taskId`, `gateId`, `value` — provide real proof/evidence as part of your work), then retry the move.
|
|
12
|
+
5. If you get a CONFLICT, someone else changed the task: re-list and retry.
|
|
13
|
+
6. If the task is already done, report that instead of re-moving it.
|
|
14
|
+
7. Confirm the final state to the user.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import {
|
|
2
|
+
COMPACTION_HEADROOM_TOKENS,
|
|
3
|
+
COMPACTION_MAX_RATIO,
|
|
4
|
+
appendCompactionPrompt,
|
|
5
|
+
shouldCompact
|
|
6
|
+
} from "./chunk-BWVO5WFK.js";
|
|
7
|
+
import "./chunk-YX3OQBNX.js";
|
|
8
|
+
import "./chunk-27NABDXB.js";
|
|
9
|
+
import "./chunk-ERNWAKUB.js";
|
|
10
|
+
import "./chunk-VWEATA7R.js";
|
|
11
|
+
import "./chunk-AESOGRFK.js";
|
|
12
|
+
import "./chunk-3KBRMBTP.js";
|
|
13
|
+
import "./chunk-LCLH6ZUL.js";
|
|
14
|
+
import "./chunk-LNNBLB6G.js";
|
|
15
|
+
import "./chunk-OSXPQSLW.js";
|
|
16
|
+
import "./chunk-3PG65AXG.js";
|
|
17
|
+
import "./chunk-J2GP3J3X.js";
|
|
18
|
+
import "./chunk-V4IE7HJY.js";
|
|
19
|
+
import "./chunk-AZHWLLPP.js";
|
|
20
|
+
import "./chunk-TOKQ2UVG.js";
|
|
21
|
+
import "./chunk-HD6Y77RO.js";
|
|
22
|
+
import "./chunk-5PT4UMRR.js";
|
|
23
|
+
import "./chunk-K44MW7JJ.js";
|
|
24
|
+
import "./chunk-CQGTEGKL.js";
|
|
25
|
+
import "./chunk-5WRI5ZAA.js";
|
|
26
|
+
export {
|
|
27
|
+
COMPACTION_HEADROOM_TOKENS,
|
|
28
|
+
COMPACTION_MAX_RATIO,
|
|
29
|
+
appendCompactionPrompt,
|
|
30
|
+
shouldCompact
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=compactor-SKVC2VNL.js.map
|
|
@@ -5,14 +5,15 @@ import {
|
|
|
5
5
|
computeSessionHash,
|
|
6
6
|
computeUnifiedDiff,
|
|
7
7
|
getToolFingerprint
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-TFF5T3K3.js";
|
|
9
|
+
import "./chunk-2FCLCUVR.js";
|
|
10
|
+
import "./chunk-27NABDXB.js";
|
|
11
|
+
import "./chunk-AESOGRFK.js";
|
|
12
|
+
import "./chunk-LNNBLB6G.js";
|
|
13
|
+
import "./chunk-OSXPQSLW.js";
|
|
14
|
+
import "./chunk-3PG65AXG.js";
|
|
15
|
+
import "./chunk-HD6Y77RO.js";
|
|
16
|
+
import "./chunk-5PT4UMRR.js";
|
|
16
17
|
import "./chunk-K44MW7JJ.js";
|
|
17
18
|
import "./chunk-CQGTEGKL.js";
|
|
18
19
|
import "./chunk-5WRI5ZAA.js";
|
|
@@ -24,4 +25,4 @@ export {
|
|
|
24
25
|
computeUnifiedDiff,
|
|
25
26
|
getToolFingerprint
|
|
26
27
|
};
|
|
27
|
-
//# sourceMappingURL=dynamic-context-
|
|
28
|
+
//# sourceMappingURL=dynamic-context-QNB4ELLP.js.map
|
|
@@ -40,7 +40,8 @@ import {
|
|
|
40
40
|
isStoredEvent,
|
|
41
41
|
isTurnEvent,
|
|
42
42
|
truncateSessionMessages
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-ERNWAKUB.js";
|
|
44
|
+
import "./chunk-VWEATA7R.js";
|
|
44
45
|
import {
|
|
45
46
|
buildContextMessagesFromEventHistory,
|
|
46
47
|
buildContextMessagesFromMessages,
|
|
@@ -57,12 +58,13 @@ import {
|
|
|
57
58
|
foldTodos,
|
|
58
59
|
foldTurnEventsToSnapshotMessages,
|
|
59
60
|
getMessagesForWindow
|
|
60
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-3KBRMBTP.js";
|
|
61
62
|
import "./chunk-LCLH6ZUL.js";
|
|
62
|
-
import "./chunk-
|
|
63
|
-
import "./chunk-
|
|
64
|
-
import "./chunk-
|
|
65
|
-
import "./chunk-
|
|
63
|
+
import "./chunk-LNNBLB6G.js";
|
|
64
|
+
import "./chunk-OSXPQSLW.js";
|
|
65
|
+
import "./chunk-3PG65AXG.js";
|
|
66
|
+
import "./chunk-HD6Y77RO.js";
|
|
67
|
+
import "./chunk-5PT4UMRR.js";
|
|
66
68
|
import "./chunk-K44MW7JJ.js";
|
|
67
69
|
import "./chunk-CQGTEGKL.js";
|
|
68
70
|
import "./chunk-5WRI5ZAA.js";
|
|
@@ -124,4 +126,4 @@ export {
|
|
|
124
126
|
isTurnEvent,
|
|
125
127
|
truncateSessionMessages
|
|
126
128
|
};
|
|
127
|
-
//# sourceMappingURL=events-
|
|
129
|
+
//# sourceMappingURL=events-5PLO4QJU.js.map
|
|
@@ -26,11 +26,13 @@ import {
|
|
|
26
26
|
spreadOptionalMessageFields,
|
|
27
27
|
stripOrphanedToolCalls,
|
|
28
28
|
trimSnapshotStreamingOutput
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-3KBRMBTP.js";
|
|
30
30
|
import "./chunk-LCLH6ZUL.js";
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-LNNBLB6G.js";
|
|
32
|
+
import "./chunk-OSXPQSLW.js";
|
|
33
|
+
import "./chunk-3PG65AXG.js";
|
|
34
|
+
import "./chunk-HD6Y77RO.js";
|
|
35
|
+
import "./chunk-5PT4UMRR.js";
|
|
34
36
|
import "./chunk-K44MW7JJ.js";
|
|
35
37
|
import "./chunk-CQGTEGKL.js";
|
|
36
38
|
import "./chunk-5WRI5ZAA.js";
|
|
@@ -63,4 +65,4 @@ export {
|
|
|
63
65
|
stripOrphanedToolCalls,
|
|
64
66
|
trimSnapshotStreamingOutput
|
|
65
67
|
};
|
|
66
|
-
//# sourceMappingURL=folding-
|
|
68
|
+
//# sourceMappingURL=folding-CJWYFUKD.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
OpenAIHttpClient
|
|
3
|
+
} from "./chunk-LTYL6ZGH.js";
|
|
4
|
+
import "./chunk-HD6Y77RO.js";
|
|
5
|
+
import "./chunk-5PT4UMRR.js";
|
|
6
|
+
import "./chunk-K44MW7JJ.js";
|
|
7
|
+
import "./chunk-5WRI5ZAA.js";
|
|
8
|
+
export {
|
|
9
|
+
OpenAIHttpClient
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=http-client-KLODRQC2.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
startInspectProxy,
|
|
3
3
|
stopAllInspectProxies
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-M6X6AIEG.js";
|
|
5
|
+
import "./chunk-3PG65AXG.js";
|
|
6
|
+
import "./chunk-5PT4UMRR.js";
|
|
7
7
|
import "./chunk-K44MW7JJ.js";
|
|
8
8
|
import "./chunk-5WRI5ZAA.js";
|
|
9
9
|
export {
|
|
10
10
|
startInspectProxy,
|
|
11
11
|
stopAllInspectProxies
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=inspect-proxy-
|
|
13
|
+
//# sourceMappingURL=inspect-proxy-K6QKEYDT.js.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import {
|
|
2
|
+
abortRunnerRun,
|
|
3
|
+
launchWorkflowRun
|
|
4
|
+
} from "./chunk-3QQAIUZI.js";
|
|
5
|
+
import "./chunk-3NPLERPQ.js";
|
|
6
|
+
import "./chunk-JFK4GKQD.js";
|
|
7
|
+
import "./chunk-TFF5T3K3.js";
|
|
8
|
+
import "./chunk-2FCLCUVR.js";
|
|
9
|
+
import "./chunk-YX3OQBNX.js";
|
|
10
|
+
import "./chunk-27NABDXB.js";
|
|
11
|
+
import "./chunk-M6X6AIEG.js";
|
|
12
|
+
import "./chunk-ZTOG6LJD.js";
|
|
13
|
+
import "./chunk-I72ACQ6R.js";
|
|
14
|
+
import "./chunk-JE7LW7Y6.js";
|
|
15
|
+
import "./chunk-OAN4BXEW.js";
|
|
16
|
+
import "./chunk-O6DU226D.js";
|
|
17
|
+
import "./chunk-J7GAZGZT.js";
|
|
18
|
+
import "./chunk-6RGACY4E.js";
|
|
19
|
+
import "./chunk-OCSTEGK7.js";
|
|
20
|
+
import "./chunk-6KPJLELC.js";
|
|
21
|
+
import "./chunk-ERNWAKUB.js";
|
|
22
|
+
import "./chunk-VWEATA7R.js";
|
|
23
|
+
import "./chunk-I7FY2LTR.js";
|
|
24
|
+
import "./chunk-AESOGRFK.js";
|
|
25
|
+
import "./chunk-JURM3RPZ.js";
|
|
26
|
+
import "./chunk-JLAR2CMV.js";
|
|
27
|
+
import "./chunk-3KBRMBTP.js";
|
|
28
|
+
import "./chunk-LCLH6ZUL.js";
|
|
29
|
+
import "./chunk-LNNBLB6G.js";
|
|
30
|
+
import "./chunk-OSXPQSLW.js";
|
|
31
|
+
import "./chunk-3PG65AXG.js";
|
|
32
|
+
import "./chunk-BVVCRIVM.js";
|
|
33
|
+
import "./chunk-J2GP3J3X.js";
|
|
34
|
+
import "./chunk-JGWHRYWG.js";
|
|
35
|
+
import "./chunk-V4IE7HJY.js";
|
|
36
|
+
import "./chunk-AZHWLLPP.js";
|
|
37
|
+
import "./chunk-HNCM3D7Y.js";
|
|
38
|
+
import "./chunk-TOKQ2UVG.js";
|
|
39
|
+
import "./chunk-LTYL6ZGH.js";
|
|
40
|
+
import "./chunk-HD6Y77RO.js";
|
|
41
|
+
import "./chunk-5PT4UMRR.js";
|
|
42
|
+
import "./chunk-K44MW7JJ.js";
|
|
43
|
+
import "./chunk-VUQCQXXJ.js";
|
|
44
|
+
import "./chunk-X25Q6RAV.js";
|
|
45
|
+
import "./chunk-KSXCOHHW.js";
|
|
46
|
+
import "./chunk-CQGTEGKL.js";
|
|
47
|
+
import "./chunk-5WRI5ZAA.js";
|
|
48
|
+
export {
|
|
49
|
+
abortRunnerRun,
|
|
50
|
+
launchWorkflowRun
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=launch-EOXVWLOP.js.map
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
onProcessEvent,
|
|
7
7
|
startProcessCommand,
|
|
8
8
|
stopProcess
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZTOG6LJD.js";
|
|
10
10
|
import "./chunk-I72ACQ6R.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-AESOGRFK.js";
|
|
12
|
+
import "./chunk-HD6Y77RO.js";
|
|
13
|
+
import "./chunk-5PT4UMRR.js";
|
|
14
14
|
import "./chunk-K44MW7JJ.js";
|
|
15
15
|
import "./chunk-5WRI5ZAA.js";
|
|
16
16
|
export {
|
|
@@ -22,4 +22,4 @@ export {
|
|
|
22
22
|
startProcessCommand,
|
|
23
23
|
stopProcess
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=manager-
|
|
25
|
+
//# sourceMappingURL=manager-LZ3JQ443.js.map
|