negotium 0.16.3 → 0.16.4
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 +9 -10
- package/dist/agent-helpers.js.map +6 -6
- package/dist/{chunk-v18s6bj4.js → chunk-33exyd19.js} +1 -1
- package/dist/{chunk-2xcqbd94.js → chunk-atdgzpwv.js} +3 -3
- package/dist/{chunk-2xcqbd94.js.map → chunk-atdgzpwv.js.map} +2 -2
- package/dist/{chunk-yf3nnkc1.js → chunk-zt9dey0p.js} +3 -2
- package/dist/{chunk-yf3nnkc1.js.map → chunk-zt9dey0p.js.map} +3 -3
- package/dist/hosted-agent.js +4 -3
- package/dist/hosted-agent.js.map +4 -4
- package/dist/main.js +9 -10
- package/dist/main.js.map +6 -6
- package/dist/mcp-factories.js +9 -10
- package/dist/mcp-factories.js.map +6 -6
- package/dist/registry.js +3 -3
- package/dist/rollout.js +2 -2
- package/dist/runtime/src/agents/mcp-tools/spawn-subagent.ts +44 -28
- package/dist/runtime/src/platform/mcp-config.ts +5 -1
- package/dist/runtime/src/topics/derive.ts +23 -18
- package/dist/runtime/src/version.ts +1 -1
- package/dist/types/packages/core/src/topics/derive.d.ts +8 -4
- package/dist/types/packages/core/src/version.d.ts +1 -1
- package/package.json +1 -1
- /package/dist/{chunk-v18s6bj4.js.map → chunk-33exyd19.js.map} +0 -0
package/dist/main.js
CHANGED
|
@@ -3088,6 +3088,7 @@ var init_mcp_config = __esm(() => {
|
|
|
3088
3088
|
...commonRuntimeMcpPolicy("runtime"),
|
|
3089
3089
|
build({
|
|
3090
3090
|
userId,
|
|
3091
|
+
actorUserId,
|
|
3091
3092
|
session,
|
|
3092
3093
|
topicId,
|
|
3093
3094
|
queryId,
|
|
@@ -3104,7 +3105,7 @@ var init_mcp_config = __esm(() => {
|
|
|
3104
3105
|
if (!topicId || !agent)
|
|
3105
3106
|
return null;
|
|
3106
3107
|
return buildRuntimeMcpSpec(agent, {
|
|
3107
|
-
userId,
|
|
3108
|
+
userId: actorUserId ?? userId,
|
|
3108
3109
|
topicId,
|
|
3109
3110
|
topicTitle: session,
|
|
3110
3111
|
queryId,
|
|
@@ -3889,7 +3890,7 @@ var exports_version = {};
|
|
|
3889
3890
|
__export(exports_version, {
|
|
3890
3891
|
NEGOTIUM_VERSION: () => NEGOTIUM_VERSION
|
|
3891
3892
|
});
|
|
3892
|
-
var NEGOTIUM_VERSION = "0.16.
|
|
3893
|
+
var NEGOTIUM_VERSION = "0.16.4";
|
|
3893
3894
|
|
|
3894
3895
|
// ../../packages/core/src/agents/codex-native-multi-agent.ts
|
|
3895
3896
|
import { spawn as spawn2 } from "child_process";
|
|
@@ -15966,10 +15967,7 @@ async function createDerivedTopicImpl(topic, sourceTopicId, userId, copyHistory,
|
|
|
15966
15967
|
const sourceConfig = getApiTopicConfig(sourceTopicId);
|
|
15967
15968
|
const agent = subagent?.agent ?? effectiveAgentForTopic(sourceTopicId, topic);
|
|
15968
15969
|
const subagentModel = agent && subagent?.model ? resolveModelForAgent(agent, subagent.model, getRegistry(agent)) : undefined;
|
|
15969
|
-
const participants =
|
|
15970
|
-
...topic.participants.filter((p) => p.userId !== userId).map((p) => ({ ...p, role: "member" })),
|
|
15971
|
-
{ userId, role: "owner" }
|
|
15972
|
-
] : [{ userId, role: "owner" }];
|
|
15970
|
+
const participants = subagent ? topic.participants.map((p) => ({ ...p })) : [{ userId, role: "owner" }];
|
|
15973
15971
|
const kind = topic.kind ?? inferTopicKind(topic);
|
|
15974
15972
|
const surface = topic.surface ?? defaultTopicSurface();
|
|
15975
15973
|
const surfaceScope = topic.surfaceScope ?? null;
|
|
@@ -22080,10 +22078,11 @@ ${card.task}${reportInstruction}`;
|
|
|
22080
22078
|
error: "Error: subagent management is only available in agent rooms."
|
|
22081
22079
|
};
|
|
22082
22080
|
}
|
|
22081
|
+
const rootOwnerId = parent.participants.find((participant) => participant.role === "owner")?.userId;
|
|
22083
22082
|
return {
|
|
22084
22083
|
ok: true,
|
|
22085
22084
|
parent,
|
|
22086
|
-
children: (() => {
|
|
22085
|
+
children: rootOwnerId ? (() => {
|
|
22087
22086
|
const topics = host.storage.listTopics();
|
|
22088
22087
|
const byParent = new Map;
|
|
22089
22088
|
for (const topic of topics) {
|
|
@@ -22100,7 +22099,7 @@ ${card.task}${reportInstruction}`;
|
|
|
22100
22099
|
if (visited.has(child.id))
|
|
22101
22100
|
continue;
|
|
22102
22101
|
visited.add(child.id);
|
|
22103
|
-
if (!child.participants.some((participant) => participant.userId ===
|
|
22102
|
+
if (!child.participants.some((participant) => participant.userId === rootOwnerId && participant.role === "owner")) {
|
|
22104
22103
|
continue;
|
|
22105
22104
|
}
|
|
22106
22105
|
descendants.push(child);
|
|
@@ -22109,7 +22108,7 @@ ${card.task}${reportInstruction}`;
|
|
|
22109
22108
|
};
|
|
22110
22109
|
visit(ctx.topicId);
|
|
22111
22110
|
return descendants;
|
|
22112
|
-
})()
|
|
22111
|
+
})() : []
|
|
22113
22112
|
};
|
|
22114
22113
|
}
|
|
22115
22114
|
function subagentStatus(parentTopicId, childTopicId) {
|
|
@@ -51832,4 +51831,4 @@ switch (command) {
|
|
|
51832
51831
|
}
|
|
51833
51832
|
}
|
|
51834
51833
|
|
|
51835
|
-
//# debugId=
|
|
51834
|
+
//# debugId=25E31C8CAD59F99364756E2164756E21
|