negotium 0.7.0 → 0.8.0

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.
Files changed (46) hide show
  1. package/README.md +3 -4
  2. package/dist/agent-helpers.js +17 -8
  3. package/dist/agent-helpers.js.map +10 -9
  4. package/dist/background-bash.js.map +2 -2
  5. package/dist/browser-runtime.js.map +2 -2
  6. package/dist/{chunk-9h53kw24.js → chunk-1bfta5qh.js} +2 -2
  7. package/dist/{chunk-9h53kw24.js.map → chunk-1bfta5qh.js.map} +2 -2
  8. package/dist/chunk-pp6dvrzq.js.map +2 -2
  9. package/dist/hosted-agent.js +2 -2
  10. package/dist/hosted-agent.js.map +4 -4
  11. package/dist/main.js +419 -150
  12. package/dist/main.js.map +19 -18
  13. package/dist/mcp-factories.js +17 -8
  14. package/dist/mcp-factories.js.map +10 -9
  15. package/dist/media.js.map +2 -2
  16. package/dist/prompts.js.map +2 -2
  17. package/dist/query-runtime.js +7 -2
  18. package/dist/query-runtime.js.map +7 -6
  19. package/dist/registry.js +1 -1
  20. package/dist/runtime/src/identifiers.ts +28 -0
  21. package/dist/runtime/src/index.ts +21 -2
  22. package/dist/runtime/src/node-host.ts +5 -1
  23. package/dist/runtime/src/query/index.ts +0 -1
  24. package/dist/runtime/src/query/public-runtime.ts +1 -5
  25. package/dist/runtime/src/query/room-query-registry.ts +4 -2
  26. package/dist/runtime/src/query/types.ts +0 -76
  27. package/dist/runtime/src/runtime/turn-runner.ts +4 -2
  28. package/dist/runtime/src/storage/api-topics.ts +32 -12
  29. package/dist/runtime/src/storage/storage-public.ts +4 -39
  30. package/dist/runtime/src/topics/personal-general.ts +3 -3
  31. package/dist/runtime/src/topics/update.ts +66 -1
  32. package/dist/runtime/src/types.ts +0 -11
  33. package/dist/runtime/src/version.ts +1 -1
  34. package/dist/runtime-helpers.js.map +2 -2
  35. package/dist/storage.js +11 -35
  36. package/dist/storage.js.map +4 -4
  37. package/dist/types/packages/core/src/identifiers.d.ts +21 -0
  38. package/dist/types/packages/core/src/query/public-runtime.d.ts +1 -1
  39. package/dist/types/packages/core/src/query/room-query-registry.d.ts +2 -1
  40. package/dist/types/packages/core/src/query/types.d.ts +0 -59
  41. package/dist/types/packages/core/src/storage/api-topics.d.ts +10 -4
  42. package/dist/types/packages/core/src/storage/storage-public.d.ts +2 -3
  43. package/dist/types/packages/core/src/types.d.ts +0 -10
  44. package/dist/types/packages/core/src/version.d.ts +1 -1
  45. package/dist/vault.js.map +2 -2
  46. package/package.json +1 -1
@@ -3040,7 +3040,7 @@ var init_codex = __esm(async () => {
3040
3040
  });
3041
3041
 
3042
3042
  // ../../packages/core/src/version.ts
3043
- var NEGOTIUM_VERSION = "0.7.0";
3043
+ var NEGOTIUM_VERSION = "0.8.0";
3044
3044
 
3045
3045
  // ../../packages/core/src/agents/codex-native-multi-agent.ts
3046
3046
  import { spawn as spawn2 } from "child_process";
@@ -4600,11 +4600,9 @@ function normalizedTitle(title) {
4600
4600
  return title.trim().toLowerCase();
4601
4601
  }
4602
4602
  function surfaceScopeForWrite(t) {
4603
- if (normalizeTopicSurface(t.surface ?? defaultTopicSurface()) !== "otium")
4604
- return null;
4605
4603
  if (t.surfaceScope !== undefined)
4606
4604
  return normalizeSurfaceScope(t.surfaceScope);
4607
- return defaultSurfaceScope();
4605
+ return normalizeTopicSurface(t.surface ?? defaultTopicSurface()) === "otium" ? defaultSurfaceScope() : null;
4608
4606
  }
4609
4607
  function upsertTopic(t) {
4610
4608
  const normalized = normalizeTopicState({
@@ -7009,9 +7007,17 @@ var init_manager2 = __esm(async () => {
7009
7007
  }, 30 * 60 * 1000).unref();
7010
7008
  });
7011
7009
 
7010
+ // ../../packages/core/src/identifiers.ts
7011
+ function asTurnId(value2) {
7012
+ return value2;
7013
+ }
7014
+ function asTurnSlotKey(value2) {
7015
+ return value2;
7016
+ }
7017
+
7012
7018
  // ../../packages/core/src/query/room-query-registry.ts
7013
7019
  function isolatedTurnRoomId(topicId, queryId) {
7014
- return `${topicId}${ISOLATED_TURN_ROOM_MARKER}${queryId}`;
7020
+ return asTurnSlotKey(`${topicId}${ISOLATED_TURN_ROOM_MARKER}${queryId}`);
7015
7021
  }
7016
7022
  function isIsolatedTurnRoomId(roomId) {
7017
7023
  return roomId.includes(ISOLATED_TURN_ROOM_MARKER);
@@ -7140,6 +7146,7 @@ function createRoomQueryRegistry(host) {
7140
7146
  };
7141
7147
  }
7142
7148
  var ISOLATED_TURN_ROOM_MARKER = "::isolated-turn::";
7149
+ var init_room_query_registry = () => {};
7143
7150
 
7144
7151
  // ../../packages/core/src/query/types.ts
7145
7152
  var init_types2 = () => {};
@@ -7357,7 +7364,9 @@ var roomQueryRegistry, interSessionQueue;
7357
7364
  var init_active_rooms = __esm(async () => {
7358
7365
  init_logger();
7359
7366
  await init_runtime_leases();
7367
+ init_room_query_registry();
7360
7368
  init_types2();
7369
+ init_room_query_registry();
7361
7370
  roomQueryRegistry = createRoomQueryRegistry({
7362
7371
  instanceId: RUNTIME_INSTANCE_ID,
7363
7372
  internalAbortReason: "internal" /* Internal */,
@@ -17429,8 +17438,8 @@ function startAiTurn(params) {
17429
17438
  const askReplySources = params.askReplySources;
17430
17439
  const sessionRetried = params._sessionRetried === true;
17431
17440
  const emptyResponseRetried = params._emptyResponseRetried === true;
17432
- const queryId = params._queryId ?? randomUUID16();
17433
- const roomId = turnConcurrency === "isolated" ? isolatedTurnRoomId(topicId, queryId) : topicId;
17441
+ const queryId = asTurnId(params._queryId ?? randomUUID16());
17442
+ const roomId = turnConcurrency === "isolated" ? isolatedTurnRoomId(topicId, queryId) : asTurnSlotKey(topicId);
17434
17443
  const currentRuntimeEpoch = getRuntimeTopicEpoch(topic.id);
17435
17444
  const runtimeEpoch = params._runtimeEpoch ?? currentRuntimeEpoch;
17436
17445
  if (params._runtimeEpoch !== undefined && params._runtimeEpoch !== currentRuntimeEpoch) {
@@ -22446,4 +22455,4 @@ export {
22446
22455
  createAgentHealthMcpServer
22447
22456
  };
22448
22457
 
22449
- //# debugId=A59D0588D2DB06F364756E2164756E21
22458
+ //# debugId=1314F4DEA4E9A63564756E2164756E21