negotium 0.16.3 → 0.16.5

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.
@@ -1299,6 +1299,7 @@ var init_mcp_config = __esm(() => {
1299
1299
  ...commonRuntimeMcpPolicy("runtime"),
1300
1300
  build({
1301
1301
  userId,
1302
+ actorUserId,
1302
1303
  session,
1303
1304
  topicId,
1304
1305
  queryId,
@@ -1316,6 +1317,7 @@ var init_mcp_config = __esm(() => {
1316
1317
  return null;
1317
1318
  return buildRuntimeMcpSpec(agent, {
1318
1319
  userId,
1320
+ ...actorUserId ? { actorUserId } : {},
1319
1321
  topicId,
1320
1322
  topicTitle: session,
1321
1323
  queryId,
@@ -3117,7 +3119,7 @@ var init_codex = __esm(async () => {
3117
3119
  });
3118
3120
 
3119
3121
  // ../../packages/core/src/version.ts
3120
- var NEGOTIUM_VERSION = "0.16.3";
3122
+ var NEGOTIUM_VERSION = "0.16.5";
3121
3123
 
3122
3124
  // ../../packages/core/src/agents/codex-native-multi-agent.ts
3123
3125
  import { spawn as spawn2 } from "child_process";
@@ -14316,10 +14318,7 @@ async function createDerivedTopicImpl(topic, sourceTopicId, userId, copyHistory,
14316
14318
  const sourceConfig = getApiTopicConfig(sourceTopicId);
14317
14319
  const agent = subagent?.agent ?? effectiveAgentForTopic(sourceTopicId, topic);
14318
14320
  const subagentModel = agent && subagent?.model ? resolveModelForAgent(agent, subagent.model, getRegistry(agent)) : undefined;
14319
- const participants = copyHistory || subagent ? [
14320
- ...topic.participants.filter((p) => p.userId !== userId).map((p) => ({ ...p, role: "member" })),
14321
- { userId, role: "owner" }
14322
- ] : [{ userId, role: "owner" }];
14321
+ const participants = subagent ? topic.participants.map((p) => ({ ...p })) : [{ userId, role: "owner" }];
14323
14322
  const kind = topic.kind ?? inferTopicKind(topic);
14324
14323
  const surface = topic.surface ?? defaultTopicSurface();
14325
14324
  const surfaceScope = topic.surfaceScope ?? null;
@@ -19267,10 +19266,11 @@ ${card.task}${reportInstruction}`;
19267
19266
  error: "Error: subagent management is only available in agent rooms."
19268
19267
  };
19269
19268
  }
19269
+ const rootOwnerId = parent.participants.find((participant) => participant.role === "owner")?.userId;
19270
19270
  return {
19271
19271
  ok: true,
19272
19272
  parent,
19273
- children: (() => {
19273
+ children: rootOwnerId ? (() => {
19274
19274
  const topics = host.storage.listTopics();
19275
19275
  const byParent = new Map;
19276
19276
  for (const topic of topics) {
@@ -19287,7 +19287,7 @@ ${card.task}${reportInstruction}`;
19287
19287
  if (visited.has(child.id))
19288
19288
  continue;
19289
19289
  visited.add(child.id);
19290
- if (!child.participants.some((participant) => participant.userId === ctx.userId && participant.role === "owner")) {
19290
+ if (!child.participants.some((participant) => participant.userId === rootOwnerId && participant.role === "owner")) {
19291
19291
  continue;
19292
19292
  }
19293
19293
  descendants.push(child);
@@ -19296,7 +19296,7 @@ ${card.task}${reportInstruction}`;
19296
19296
  };
19297
19297
  visit(ctx.topicId);
19298
19298
  return descendants;
19299
- })()
19299
+ })() : []
19300
19300
  };
19301
19301
  }
19302
19302
  function subagentStatus(parentTopicId, childTopicId) {
@@ -20886,4 +20886,4 @@ export {
20886
20886
  DEFAULT_SELF_CONFIG_PRODUCT
20887
20887
  };
20888
20888
 
20889
- //# debugId=45EDD0169F537C9E64756E2164756E21
20889
+ //# debugId=2A40B6553A89954964756E2164756E21