negotium 0.12.2 → 0.12.3

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/registry.js CHANGED
@@ -133,7 +133,7 @@ var codexRegistryOperations = {
133
133
  return { sessionId: threadId, rolloutPath };
134
134
  },
135
135
  async forkSession({ parentSessionId }) {
136
- const { forkCodexSession } = await import("./chunk-bw6mrsc6.js");
136
+ const { forkCodexSession } = await import("./chunk-pva2g5qz.js");
137
137
  return await forkCodexSession(parentSessionId);
138
138
  },
139
139
  async cleanupRollouts({ sessionIds }) {
@@ -287,6 +287,7 @@ export function notifyCallerTopic(
287
287
  targetLabel: string,
288
288
  message: string,
289
289
  label = `Reply from ${targetLabel}`,
290
+ threadRootId?: string,
290
291
  ): void {
291
292
  const msg: MessageDto = {
292
293
  id: randomUUID(),
@@ -299,6 +300,7 @@ export function notifyCallerTopic(
299
300
  label,
300
301
  message,
301
302
  },
303
+ ...(threadRootId ? { threadRootId } : {}),
302
304
  createdAt: new Date().toISOString(),
303
305
  };
304
306
  appendApiMessage(msg, { notify: false });
@@ -311,6 +313,8 @@ function persistVisibleAskMessage(args: {
311
313
  targetLabel: string;
312
314
  requestId: string;
313
315
  message: string;
316
+ /** Thread the ask was raised from, so the question card stays beside it. */
317
+ threadRootId?: string;
314
318
  }): void {
315
319
  const msg: MessageDto = {
316
320
  id: `ask-${args.requestId}-sent`,
@@ -323,6 +327,10 @@ function persistVisibleAskMessage(args: {
323
327
  label: `Ask to ${args.targetLabel}`,
324
328
  message: args.message,
325
329
  },
330
+ // The outgoing question belongs where it was asked. Its answer is already
331
+ // placed there; leaving the question in the channel splits one exchange
332
+ // across two conversations.
333
+ ...(args.threadRootId ? { threadRootId: args.threadRootId } : {}),
326
334
  createdAt: new Date().toISOString(),
327
335
  };
328
336
  try {
@@ -351,7 +359,13 @@ async function notifyAskDrop(
351
359
  return;
352
360
  }
353
361
  try {
354
- notifyCallerTopic(callerTopic.id, targetLabel, message, `Error from ${targetLabel}`);
362
+ notifyCallerTopic(
363
+ callerTopic.id,
364
+ targetLabel,
365
+ message,
366
+ `Error from ${targetLabel}`,
367
+ entry.fromThreadRootId,
368
+ );
355
369
  } catch (err) {
356
370
  logger.warn(
357
371
  { err, from: entry.from, to: targetLabel, requestId: entry.requestId },
@@ -1036,6 +1050,7 @@ async function handleAskEntry(
1036
1050
  targetLabel,
1037
1051
  requestId,
1038
1052
  message: entry.message,
1053
+ ...(entry.fromThreadRootId ? { threadRootId: entry.fromThreadRootId } : {}),
1039
1054
  });
1040
1055
  }
1041
1056
 
@@ -1 +1 @@
1
- export const NEGOTIUM_VERSION = "0.12.2";
1
+ export const NEGOTIUM_VERSION = "0.12.3";
@@ -1 +1 @@
1
- export declare const NEGOTIUM_VERSION = "0.12.2";
1
+ export declare const NEGOTIUM_VERSION = "0.12.3";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "negotium",
3
- "version": "0.12.2",
3
+ "version": "0.12.3",
4
4
  "type": "module",
5
5
  "description": "Install the Negotium multi-agent runtime and CLI with one package",
6
6
  "license": "Apache-2.0",