negotium 0.1.30 → 0.1.31
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/dist/agent-helpers.js +14 -28
- package/dist/agent-helpers.js.map +7 -7
- package/dist/{chunk-en2s6xnh.js → chunk-1p2n47qd.js} +5 -22
- package/dist/{chunk-en2s6xnh.js.map → chunk-1p2n47qd.js.map} +3 -3
- package/dist/cron.js +73 -42
- package/dist/cron.js.map +8 -8
- package/dist/hosted-agent.js +9 -27
- package/dist/hosted-agent.js.map +5 -5
- package/dist/main.js +376 -375
- package/dist/main.js.map +16 -15
- package/dist/mcp-factories.js +13 -8
- package/dist/mcp-factories.js.map +4 -4
- package/dist/prompts.js +2 -3
- package/dist/prompts.js.map +3 -3
- package/dist/registry.js +1 -1
- package/dist/rollout.js +1 -1
- package/dist/runtime/src/agents/rollout/codex.ts +3 -20
- package/dist/runtime/src/mcp/background-bash-server.ts +7 -4
- package/dist/runtime/src/mcp/wiki-server.ts +8 -5
- package/dist/runtime/src/platform/mcp-config.ts +9 -4
- package/dist/runtime/src/prompts/builders.ts +2 -3
- package/dist/runtime/src/runtime/turn-runner.ts +60 -12
- package/dist/runtime/src/storage/wiki-summary-names.ts +25 -5
- package/dist/runtime/src/version.ts +1 -1
- package/dist/storage.js +17 -4
- package/dist/storage.js.map +3 -3
- package/dist/types/packages/core/src/prompts/builders.d.ts +1 -1
- package/dist/types/packages/core/src/storage/wiki-summary-names.d.ts +9 -0
- package/dist/types/packages/core/src/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/agent-helpers.js
CHANGED
|
@@ -1515,28 +1515,11 @@ function extractLatestCodexContextUsage(jsonl) {
|
|
|
1515
1515
|
return;
|
|
1516
1516
|
}
|
|
1517
1517
|
function readLatestCodexContextUsage(threadId) {
|
|
1518
|
-
const
|
|
1519
|
-
|
|
1520
|
-
|
|
1518
|
+
const path = latestCodexRolloutPath(threadId);
|
|
1519
|
+
if (!path)
|
|
1520
|
+
return;
|
|
1521
1521
|
try {
|
|
1522
|
-
|
|
1523
|
-
for (const bucket of buckets) {
|
|
1524
|
-
const dir = join7(sessionsDir, bucket);
|
|
1525
|
-
if (!existsSync5(dir))
|
|
1526
|
-
continue;
|
|
1527
|
-
const glob = new Bun.Glob(`rollout-*-${threadId}.jsonl`);
|
|
1528
|
-
for (const rel of glob.scanSync({ cwd: dir, onlyFiles: true })) {
|
|
1529
|
-
candidates.push(join7(dir, rel));
|
|
1530
|
-
}
|
|
1531
|
-
}
|
|
1532
|
-
} else {
|
|
1533
|
-
const glob = new Bun.Glob(`**/rollout-*-${threadId}.jsonl`);
|
|
1534
|
-
for (const rel of glob.scanSync({ cwd: sessionsDir, onlyFiles: true })) {
|
|
1535
|
-
candidates.push(join7(sessionsDir, rel));
|
|
1536
|
-
}
|
|
1537
|
-
}
|
|
1538
|
-
const path = candidates.sort((a, b) => statSync2(b).mtimeMs - statSync2(a).mtimeMs)[0];
|
|
1539
|
-
return path ? extractLatestCodexContextUsage(readFileSync4(path, "utf8")) : undefined;
|
|
1522
|
+
return extractLatestCodexContextUsage(readFileSync4(path, "utf8"));
|
|
1540
1523
|
} catch (error) {
|
|
1541
1524
|
logger.debug({ error, threadId }, "codex context usage: rollout read failed");
|
|
1542
1525
|
return;
|
|
@@ -2739,11 +2722,10 @@ var MCP_CATALOG = {
|
|
|
2739
2722
|
},
|
|
2740
2723
|
"background-bash": {
|
|
2741
2724
|
...commonRuntimeMcpPolicy("background-bash"),
|
|
2742
|
-
build({ agent, bgBashPort, userId, topicId
|
|
2743
|
-
|
|
2744
|
-
if (bgBashPort === undefined || !topic)
|
|
2725
|
+
build({ agent, bgBashPort, userId, topicId }) {
|
|
2726
|
+
if (bgBashPort === undefined || !topicId)
|
|
2745
2727
|
return null;
|
|
2746
|
-
return backgroundBashTransport(agent, bgBashPort, userId,
|
|
2728
|
+
return backgroundBashTransport(agent, bgBashPort, userId, topicId);
|
|
2747
2729
|
}
|
|
2748
2730
|
},
|
|
2749
2731
|
"agent-health": {
|
|
@@ -3537,7 +3519,7 @@ import { tmpdir } from "os";
|
|
|
3537
3519
|
import { dirname as dirname7, join as join11 } from "path";
|
|
3538
3520
|
|
|
3539
3521
|
// ../../packages/core/src/version.ts
|
|
3540
|
-
var NEGOTIUM_VERSION = "0.1.
|
|
3522
|
+
var NEGOTIUM_VERSION = "0.1.31";
|
|
3541
3523
|
|
|
3542
3524
|
// ../../packages/core/src/agents/codex-native-multi-agent.ts
|
|
3543
3525
|
var moduleRequire = createRequire(import.meta.url);
|
|
@@ -5200,7 +5182,11 @@ function isEphemeralWikiTopicId(topicId) {
|
|
|
5200
5182
|
return topicId?.startsWith("__") ?? false;
|
|
5201
5183
|
}
|
|
5202
5184
|
function wikiSummaryStorageSlug(rawTopic, topicId) {
|
|
5203
|
-
|
|
5185
|
+
const titleSlug = wikiSummarySlug(rawTopic);
|
|
5186
|
+
if (!topicId || isEphemeralWikiTopicId(topicId))
|
|
5187
|
+
return titleSlug;
|
|
5188
|
+
const idSlug = wikiSummarySlug(topicId);
|
|
5189
|
+
return titleSlug === idSlug ? idSlug : `${titleSlug}--${idSlug}`;
|
|
5204
5190
|
}
|
|
5205
5191
|
function wikiSummaryFilename(date, rawTopic, topicId) {
|
|
5206
5192
|
return `${date}-${wikiSummaryStorageSlug(rawTopic, topicId)}.md`;
|
|
@@ -6883,4 +6869,4 @@ export {
|
|
|
6883
6869
|
MIN_MEMORY_ARCHIVE_EXCHANGES
|
|
6884
6870
|
};
|
|
6885
6871
|
|
|
6886
|
-
//# debugId=
|
|
6872
|
+
//# debugId=F639F58BC810D1BD64756E2164756E21
|