negotium 0.1.30 → 0.1.32
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 +19 -31
- package/dist/agent-helpers.js.map +12 -12
- package/dist/background-bash.js.map +1 -1
- package/dist/{chunk-en2s6xnh.js → chunk-1p2n47qd.js} +5 -22
- package/dist/{chunk-en2s6xnh.js.map → chunk-1p2n47qd.js.map} +4 -4
- package/dist/cron.js +1299 -1186
- package/dist/cron.js.map +30 -26
- package/dist/hosted-agent.js +9 -28
- package/dist/hosted-agent.js.map +7 -7
- package/dist/main.js +8772 -8543
- package/dist/main.js.map +48 -38
- package/dist/mcp-factories.js +13 -8
- package/dist/mcp-factories.js.map +5 -5
- package/dist/prompts.js +2 -3
- package/dist/prompts.js.map +4 -4
- package/dist/query-runtime.js.map +1 -1
- package/dist/registry.js +1 -1
- package/dist/rollout.js +1 -1
- package/dist/runtime/src/agents/maestro-provider.ts +0 -15
- package/dist/runtime/src/agents/rollout/codex.ts +3 -20
- package/dist/runtime/src/agents/task-events.ts +3 -0
- package/dist/runtime/src/mcp/agent-health-server.ts +1 -1
- package/dist/runtime/src/mcp/background-bash-server.ts +7 -4
- package/dist/runtime/src/mcp/session-comm/server.ts +37 -17
- package/dist/runtime/src/mcp/session-comm/topics.ts +55 -32
- package/dist/runtime/src/mcp/wiki-server.ts +8 -5
- package/dist/runtime/src/platform/mcp-config.ts +10 -5
- package/dist/runtime/src/platform/playwright/browser-processes.ts +341 -0
- package/dist/runtime/src/platform/playwright/manager-utils.ts +84 -0
- package/dist/runtime/src/platform/playwright/manager.ts +31 -425
- package/dist/runtime/src/prompts/builders.ts +2 -3
- package/dist/runtime/src/query/active-rooms.ts +6 -6
- package/dist/runtime/src/query/state.ts +39 -71
- package/dist/runtime/src/runtime/tasks.ts +13 -2
- package/dist/runtime/src/runtime/turn-event-stream.ts +780 -0
- package/dist/runtime/src/runtime/turn-runner.ts +89 -851
- package/dist/runtime/src/runtime/turn-session.ts +115 -0
- package/dist/runtime/src/storage/api-messages.ts +18 -0
- package/dist/runtime/src/storage/wiki-summary-names.ts +25 -5
- package/dist/runtime/src/topics/lifecycle.ts +1 -1
- package/dist/runtime/src/types.ts +3 -1
- package/dist/runtime/src/version.ts +1 -1
- package/dist/runtime-helpers.js.map +2 -2
- package/dist/storage.js +31 -4
- package/dist/storage.js.map +5 -5
- package/dist/types/packages/core/src/agents/maestro-provider.d.ts +0 -9
- package/dist/types/packages/core/src/prompts/builders.d.ts +1 -1
- package/dist/types/packages/core/src/query/active-rooms.d.ts +3 -3
- package/dist/types/packages/core/src/storage/api-messages.d.ts +2 -0
- package/dist/types/packages/core/src/storage/wiki-summary-names.d.ts +9 -0
- package/dist/types/packages/core/src/types.d.ts +3 -1
- package/dist/types/packages/core/src/version.d.ts +1 -1
- package/dist/vault.js.map +1 -1
- package/package.json +2 -2
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.32";
|
|
3541
3523
|
|
|
3542
3524
|
// ../../packages/core/src/agents/codex-native-multi-agent.ts
|
|
3543
3525
|
var moduleRequire = createRequire(import.meta.url);
|
|
@@ -4481,7 +4463,6 @@ function maestroProvider(opts) {
|
|
|
4481
4463
|
const callerDisallowedTools = opts.disallowedTools ?? [];
|
|
4482
4464
|
const callerToolHooks = opts.toolHooks ?? [];
|
|
4483
4465
|
const sdkOpts = {
|
|
4484
|
-
enableBackgroundBash: false,
|
|
4485
4466
|
maxTokens: MAESTRO_DEFAULT_MAX_TOKENS,
|
|
4486
4467
|
enableToolSearch: true,
|
|
4487
4468
|
...opts,
|
|
@@ -4558,6 +4539,9 @@ function resolveTaskEventScope(opts, host = defaultTaskEventHost) {
|
|
|
4558
4539
|
}
|
|
4559
4540
|
async function* withTaskSnapshots(inner, scope, host = defaultTaskEventHost) {
|
|
4560
4541
|
let lastMtime = host.taskFileMtimeNs(scope.userId, scope.scopeKey);
|
|
4542
|
+
if (host.readTasks(scope.userId, scope.scopeKey).length === 0) {
|
|
4543
|
+
yield { type: "tasks", tasks: [] };
|
|
4544
|
+
}
|
|
4561
4545
|
for await (const event of inner) {
|
|
4562
4546
|
yield event;
|
|
4563
4547
|
if (event.type !== "tool_result" && event.type !== "result")
|
|
@@ -5200,7 +5184,11 @@ function isEphemeralWikiTopicId(topicId) {
|
|
|
5200
5184
|
return topicId?.startsWith("__") ?? false;
|
|
5201
5185
|
}
|
|
5202
5186
|
function wikiSummaryStorageSlug(rawTopic, topicId) {
|
|
5203
|
-
|
|
5187
|
+
const titleSlug = wikiSummarySlug(rawTopic);
|
|
5188
|
+
if (!topicId || isEphemeralWikiTopicId(topicId))
|
|
5189
|
+
return titleSlug;
|
|
5190
|
+
const idSlug = wikiSummarySlug(topicId);
|
|
5191
|
+
return titleSlug === idSlug ? idSlug : `${titleSlug}--${idSlug}`;
|
|
5204
5192
|
}
|
|
5205
5193
|
function wikiSummaryFilename(date, rawTopic, topicId) {
|
|
5206
5194
|
return `${date}-${wikiSummaryStorageSlug(rawTopic, topicId)}.md`;
|
|
@@ -6243,8 +6231,8 @@ var roomQueryRegistry = createRoomQueryRegistry({
|
|
|
6243
6231
|
releaseLease: releaseRuntimeTurnLease,
|
|
6244
6232
|
requestAbort: requestRuntimeTurnAbort
|
|
6245
6233
|
});
|
|
6246
|
-
function getRoomQuery(
|
|
6247
|
-
return roomQueryRegistry.get(
|
|
6234
|
+
function getRoomQuery(roomId) {
|
|
6235
|
+
return roomQueryRegistry.get(roomId);
|
|
6248
6236
|
}
|
|
6249
6237
|
class InterSessionQueue {
|
|
6250
6238
|
queue = new Map;
|
|
@@ -6883,4 +6871,4 @@ export {
|
|
|
6883
6871
|
MIN_MEMORY_ARCHIVE_EXCHANGES
|
|
6884
6872
|
};
|
|
6885
6873
|
|
|
6886
|
-
//# debugId=
|
|
6874
|
+
//# debugId=4FACA65AFA26F67B64756E2164756E21
|