negotium 0.18.0 → 0.18.2

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 (29) hide show
  1. package/dist/agent-helpers.js +7082 -7062
  2. package/dist/agent-helpers.js.map +10 -10
  3. package/dist/{chunk-th3a0ew7.js → chunk-3d1pjgfw.js} +633 -195
  4. package/dist/{chunk-th3a0ew7.js.map → chunk-3d1pjgfw.js.map} +9 -6
  5. package/dist/{chunk-kgwgwc3r.js → chunk-44ajn328.js} +3 -3
  6. package/dist/{chunk-kgwgwc3r.js.map → chunk-44ajn328.js.map} +2 -2
  7. package/dist/{chunk-axa09pgx.js → chunk-q2s5f70x.js} +1 -1
  8. package/dist/hosted-agent.js +634 -196
  9. package/dist/hosted-agent.js.map +10 -7
  10. package/dist/main.js +5942 -5908
  11. package/dist/main.js.map +13 -13
  12. package/dist/mcp-factories.js +3418 -3393
  13. package/dist/mcp-factories.js.map +11 -11
  14. package/dist/prompts.js +18 -14
  15. package/dist/prompts.js.map +3 -3
  16. package/dist/registry.js +3 -3
  17. package/dist/rollout.js +2 -2
  18. package/dist/runtime/src/agents/mcp-tools/spawn-subagent.ts +43 -16
  19. package/dist/runtime/src/mcp/factories/decision.ts +11 -3
  20. package/dist/runtime/src/mcp/session-comm/server.ts +1 -1
  21. package/dist/runtime/src/platform/mcp-config.ts +79 -58
  22. package/dist/runtime/src/prompts/builders.ts +34 -17
  23. package/dist/runtime/src/prompts/sessions/surfaces/otium-manager.md +18 -0
  24. package/dist/runtime/src/version.ts +1 -1
  25. package/dist/types/packages/core/src/agents/mcp-tools/spawn-subagent.d.ts +8 -4
  26. package/dist/types/packages/core/src/mcp/factories/decision.d.ts +2 -0
  27. package/dist/types/packages/core/src/version.d.ts +1 -1
  28. package/package.json +1 -1
  29. /package/dist/{chunk-axa09pgx.js.map → chunk-q2s5f70x.js.map} +0 -0
@@ -55,6 +55,11 @@ export interface SpawnSubagentToolContext {
55
55
 
56
56
  export type SubagentToolContext = Pick<SpawnSubagentToolContext, "userId" | "topicId">;
57
57
 
58
+ export interface SubagentToolDefinitionOptions {
59
+ /** Otium owns provider routing, so its public tools inherit execution and omit overrides. */
60
+ executionOverrides?: boolean;
61
+ }
62
+
58
63
  export interface SubagentWatch {
59
64
  parentTopicId: string;
60
65
  childTopicId: string;
@@ -157,8 +162,14 @@ export interface SubagentLifecycle<
157
162
  sweepStaleSubagentCards(): void;
158
163
  subagentReportMode(childTopicId: string): SubagentReportMode;
159
164
  createSubagentManagementToolDefinitions(ctx: SubagentToolContext): SharedMcpTool[];
160
- createSpawnSubagentToolDefinition(ctx: TContext): SharedMcpTool;
161
- createPrepareSubagentToolDefinition(ctx: TContext): SharedMcpTool;
165
+ createSpawnSubagentToolDefinition(
166
+ ctx: TContext,
167
+ options?: SubagentToolDefinitionOptions,
168
+ ): SharedMcpTool;
169
+ createPrepareSubagentToolDefinition(
170
+ ctx: TContext,
171
+ options?: SubagentToolDefinitionOptions,
172
+ ): SharedMcpTool;
162
173
  }
163
174
 
164
175
  export function createSubagentLifecycle<TContext extends SpawnSubagentToolContext>(
@@ -982,7 +993,25 @@ export function createSubagentLifecycle<TContext extends SpawnSubagentToolContex
982
993
  ];
983
994
  }
984
995
 
985
- function createSpawnSubagentToolDefinition(ctx: TContext): SharedMcpTool {
996
+ function createSpawnSubagentToolDefinition(
997
+ ctx: TContext,
998
+ options: SubagentToolDefinitionOptions = {},
999
+ ): SharedMcpTool {
1000
+ const executionOverrideSchema =
1001
+ options.executionOverrides === false
1002
+ ? {}
1003
+ : {
1004
+ agent: z
1005
+ .enum(["claude", "codex", "maestro"])
1006
+ .optional()
1007
+ .describe("Agent backend override. Defaults to this room's agent."),
1008
+ model: z
1009
+ .string()
1010
+ .optional()
1011
+ .describe(
1012
+ `Best-fit model override from the system prompt catalog. Omit agent+model to inherit ${ctx.agent}/${ctx.model ?? "default"}; overriding agent without model uses that agent's default.`,
1013
+ ),
1014
+ };
986
1015
  return {
987
1016
  name: "spawn_subagent",
988
1017
  description:
@@ -1000,16 +1029,7 @@ export function createSubagentLifecycle<TContext extends SpawnSubagentToolContex
1000
1029
  .string()
1001
1030
  .optional()
1002
1031
  .describe("Short name for the subagent room. Auto-generated when omitted."),
1003
- agent: z
1004
- .enum(["claude", "codex", "maestro"])
1005
- .optional()
1006
- .describe("Agent backend override. Defaults to this room's agent."),
1007
- model: z
1008
- .string()
1009
- .optional()
1010
- .describe(
1011
- `Best-fit model override from the system prompt catalog. Omit agent+model to inherit ${ctx.agent}/${ctx.model ?? "default"}; overriding agent without model uses that agent's default.`,
1012
- ),
1032
+ ...executionOverrideSchema,
1013
1033
  memory_topic: z
1014
1034
  .string()
1015
1035
  .optional()
@@ -1029,7 +1049,10 @@ export function createSubagentLifecycle<TContext extends SpawnSubagentToolContex
1029
1049
  };
1030
1050
  }
1031
1051
 
1032
- function createPrepareSubagentToolDefinition(ctx: TContext): SharedMcpTool {
1052
+ function createPrepareSubagentToolDefinition(
1053
+ ctx: TContext,
1054
+ options: SubagentToolDefinitionOptions = {},
1055
+ ): SharedMcpTool {
1033
1056
  return {
1034
1057
  name: "create_subagent",
1035
1058
  description:
@@ -1038,8 +1061,12 @@ export function createSubagentLifecycle<TContext extends SpawnSubagentToolContex
1038
1061
  schema: {
1039
1062
  task: z.string().describe("Self-contained task brief for the subagent."),
1040
1063
  name: z.string().optional().describe("Short room name. Auto-generated when omitted."),
1041
- agent: z.enum(["claude", "codex", "maestro"]).optional(),
1042
- model: z.string().optional(),
1064
+ ...(options.executionOverrides === false
1065
+ ? {}
1066
+ : {
1067
+ agent: z.enum(["claude", "codex", "maestro"]).optional(),
1068
+ model: z.string().optional(),
1069
+ }),
1043
1070
  memory_topic: z
1044
1071
  .string()
1045
1072
  .optional()
@@ -1,6 +1,7 @@
1
1
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
2
  import { z } from "zod";
3
3
  import { errMsg } from "#platform/error";
4
+ import { getTopic } from "#storage/api-topics";
4
5
  import {
5
6
  createDecisions,
6
7
  DECISION_STATUS_VALUES,
@@ -21,6 +22,8 @@ export interface DecisionMcpContext {
21
22
  topicId?: string;
22
23
  agent: AgentKind;
23
24
  model?: string;
25
+ /** False for product surfaces that keep provider routing private. */
26
+ exposeExecutionMetadata?: boolean;
24
27
  }
25
28
 
26
29
  export interface DecisionMcpHost {
@@ -41,6 +44,9 @@ export function createDecisionMcpServer(
41
44
  const requireContext = (): ReturnType<typeof mcpError> | null =>
42
45
  !context.userId || !scopeKey ? mcpError("Error: missing userId/topic context.") : null;
43
46
  const statusEnum = z.enum(DECISION_STATUS_VALUES);
47
+ const exposeExecutionMetadata =
48
+ context.exposeExecutionMetadata ??
49
+ (!context.topicId || getTopic(context.topicId)?.surface !== "otium");
44
50
 
45
51
  server.tool(
46
52
  "decision_create",
@@ -146,9 +152,11 @@ export function createDecisionMcpServer(
146
152
  const decision = host
147
153
  .readDecisions(context.userId, scopeKey)
148
154
  .find((item) => item.id === id);
149
- return decision
150
- ? mcpOk(JSON.stringify(decision, null, 2))
151
- : mcpError(`Decision #${id} not found.`);
155
+ if (!decision) return mcpError(`Decision #${id} not found.`);
156
+ const visibleDecision = exposeExecutionMetadata
157
+ ? decision
158
+ : (({ agent: _agent, model: _model, ...visible }) => visible)(decision);
159
+ return mcpOk(JSON.stringify(visibleDecision, null, 2));
152
160
  } catch (error) {
153
161
  return mcpError(`decision_get failed: ${errMsg(error)}`);
154
162
  }
@@ -142,7 +142,7 @@ function canCurrentSubagentTell(targetTopicId: string): boolean {
142
142
 
143
143
  server.tool(
144
144
  "list_sessions",
145
- "List all available Claude sessions (forum topics) for inter-session communication. Topics without an active session are still valid targets — ask_session / tell_session will wake them with a fresh session on first delivery.",
145
+ "List all available AI sessions (forum topics) for inter-session communication. Topics without an active session are still valid targets — ask_session / tell_session will wake them with a fresh session on first delivery.",
146
146
  {},
147
147
  async () => {
148
148
  const entries = listSessionTargetsForUser()
@@ -40,6 +40,7 @@ import {
40
40
  } from "#platform/playwright/mcp-transport";
41
41
  import { getRegisteredCronSession } from "#runtime/cron-sessions";
42
42
  import type { HostMcpServerSpec } from "#runtime-gateway";
43
+ import { getTopic } from "#storage/api-topics";
43
44
  import type { AgentKind, AgentQueryOptions, PeerRuntimeBridgeContext } from "#types";
44
45
 
45
46
  export type { RuntimeMcpScope } from "#platform/mcp-catalog-policy";
@@ -1111,37 +1112,10 @@ export function getMcpServersForQuery(opts: AgentQueryOptions): Record<string, u
1111
1112
  }
1112
1113
  if (opts.sessionType === "cron") {
1113
1114
  if (!opts.topicId) throw new Error("getMcpServersForQuery: cron sessionType requires topicId");
1114
- return getCronMcpServers({
1115
- userId: opts.userId || "local",
1116
- session: opts.session || "cron",
1117
- topicId: opts.topicId,
1118
- queryId: opts.queryId,
1119
- wikiTopicId: opts.wikiTopicId,
1120
- agent: opts.agent,
1121
- cwd: opts.cwd,
1122
- model: opts.model,
1123
- currentUserPrompt: opts.prompt,
1124
- playwrightPort: opts.playwrightPort,
1125
- playwrightCapability: opts.playwrightCapability,
1126
- visualTools: opts.visualTools,
1127
- fileDeliveryTools: opts.fileDeliveryTools,
1128
- });
1129
- }
1130
- if (opts.sessionType === "dm" || opts.sessionType === "ephemeral") {
1131
- return getDmMcpServers({
1132
- userId: opts.userId || "local",
1133
- session: opts.session,
1134
- topicId: opts.topicId,
1135
- agent: opts.agent,
1136
- playwrightPort: opts.playwrightPort,
1137
- playwrightCapability: opts.playwrightCapability,
1138
- });
1139
- }
1140
- if (opts.sessionType === "manager") {
1141
- return mergeHostMcpServers(
1142
- getManagerMcpServers({
1115
+ return hideProviderIntrospectionForOtium(
1116
+ getCronMcpServers({
1143
1117
  userId: opts.userId || "local",
1144
- session: opts.session,
1118
+ session: opts.session || "cron",
1145
1119
  topicId: opts.topicId,
1146
1120
  queryId: opts.queryId,
1147
1121
  wikiTopicId: opts.wikiTopicId,
@@ -1151,37 +1125,84 @@ export function getMcpServersForQuery(opts: AgentQueryOptions): Record<string, u
1151
1125
  currentUserPrompt: opts.prompt,
1152
1126
  playwrightPort: opts.playwrightPort,
1153
1127
  playwrightCapability: opts.playwrightCapability,
1154
- autoContinue: opts.autoContinue,
1155
1128
  visualTools: opts.visualTools,
1156
1129
  fileDeliveryTools: opts.fileDeliveryTools,
1157
1130
  }),
1158
- opts.hostMcpServers,
1131
+ opts.topicId,
1159
1132
  );
1160
1133
  }
1161
- return getForumMcpServers({
1162
- userId: opts.userId || "local",
1163
- actorUserId: opts.actorUserId,
1164
- vaultUserId: opts.vaultUserId,
1165
- session: opts.session || "default",
1166
- topicId: opts.topicId,
1167
- subagentParentTopicId: opts.subagentParentTopicId,
1168
- queryId: opts.queryId,
1169
- wikiTopicId: opts.wikiTopicId,
1170
- agent: opts.agent,
1171
- cwd: opts.cwd,
1172
- model: opts.model,
1173
- currentUserPrompt: opts.prompt,
1174
- playwrightPort: opts.playwrightPort,
1175
- playwrightCapability: opts.playwrightCapability,
1176
- bgBashPort: opts.bgBashPort,
1177
- autoContinue: opts.autoContinue,
1178
- visualTools: opts.visualTools,
1179
- fileDeliveryTools: opts.fileDeliveryTools,
1180
- threadRootId: opts.threadRootId,
1181
- depth: opts.depth,
1182
- enabled: opts.mcpEnabled,
1183
- extra: opts.mcpExtra,
1184
- silent: opts.silent,
1185
- peerBridge: opts.peerBridge,
1186
- });
1134
+ if (opts.sessionType === "dm" || opts.sessionType === "ephemeral") {
1135
+ return getDmMcpServers({
1136
+ userId: opts.userId || "local",
1137
+ session: opts.session,
1138
+ topicId: opts.topicId,
1139
+ agent: opts.agent,
1140
+ playwrightPort: opts.playwrightPort,
1141
+ playwrightCapability: opts.playwrightCapability,
1142
+ });
1143
+ }
1144
+ if (opts.sessionType === "manager") {
1145
+ return hideProviderIntrospectionForOtium(
1146
+ mergeHostMcpServers(
1147
+ getManagerMcpServers({
1148
+ userId: opts.userId || "local",
1149
+ session: opts.session,
1150
+ topicId: opts.topicId,
1151
+ queryId: opts.queryId,
1152
+ wikiTopicId: opts.wikiTopicId,
1153
+ agent: opts.agent,
1154
+ cwd: opts.cwd,
1155
+ model: opts.model,
1156
+ currentUserPrompt: opts.prompt,
1157
+ playwrightPort: opts.playwrightPort,
1158
+ playwrightCapability: opts.playwrightCapability,
1159
+ autoContinue: opts.autoContinue,
1160
+ visualTools: opts.visualTools,
1161
+ fileDeliveryTools: opts.fileDeliveryTools,
1162
+ }),
1163
+ opts.hostMcpServers,
1164
+ ),
1165
+ opts.topicId,
1166
+ );
1167
+ }
1168
+ return hideProviderIntrospectionForOtium(
1169
+ getForumMcpServers({
1170
+ userId: opts.userId || "local",
1171
+ actorUserId: opts.actorUserId,
1172
+ vaultUserId: opts.vaultUserId,
1173
+ session: opts.session || "default",
1174
+ topicId: opts.topicId,
1175
+ subagentParentTopicId: opts.subagentParentTopicId,
1176
+ queryId: opts.queryId,
1177
+ wikiTopicId: opts.wikiTopicId,
1178
+ agent: opts.agent,
1179
+ cwd: opts.cwd,
1180
+ model: opts.model,
1181
+ currentUserPrompt: opts.prompt,
1182
+ playwrightPort: opts.playwrightPort,
1183
+ playwrightCapability: opts.playwrightCapability,
1184
+ bgBashPort: opts.bgBashPort,
1185
+ autoContinue: opts.autoContinue,
1186
+ visualTools: opts.visualTools,
1187
+ fileDeliveryTools: opts.fileDeliveryTools,
1188
+ threadRootId: opts.threadRootId,
1189
+ depth: opts.depth,
1190
+ enabled: opts.mcpEnabled,
1191
+ extra: opts.mcpExtra,
1192
+ silent: opts.silent,
1193
+ peerBridge: opts.peerBridge,
1194
+ }),
1195
+ opts.topicId,
1196
+ );
1197
+ }
1198
+
1199
+ function hideProviderIntrospectionForOtium(
1200
+ servers: Record<string, unknown>,
1201
+ topicId: string | undefined,
1202
+ ): Record<string, unknown> {
1203
+ if (!topicId || getTopic(topicId)?.surface !== "otium") return servers;
1204
+ const filtered = { ...servers };
1205
+ delete filtered["agent-health"];
1206
+ delete filtered["token-stats"];
1207
+ return filtered;
1187
1208
  }
@@ -272,6 +272,8 @@ export interface PromptBuilders {
272
272
 
273
273
  interface RuntimeToolSectionOpts {
274
274
  agentKind: AgentKind;
275
+ /** Product surfaces such as Otium own routing policy and must not expose provider details. */
276
+ hideExecutionDetails?: boolean;
275
277
  canSpawnSubagents?: boolean;
276
278
  canStageSubagents?: boolean;
277
279
  visualTools?: boolean;
@@ -294,6 +296,7 @@ function buildRuntimeToolSection(
294
296
  ): string {
295
297
  const {
296
298
  agentKind,
299
+ hideExecutionDetails = false,
297
300
  canSpawnSubagents = false,
298
301
  canStageSubagents = canSpawnSubagents,
299
302
  visualTools = false,
@@ -348,7 +351,9 @@ function buildRuntimeToolSection(
348
351
  "## Subagent Delegation",
349
352
  spawnSubagentToolLine,
350
353
  ...(canStageSubagents ? [lifecycleToolLine, subagentTopologyPolicyLine] : []),
351
- "A subagent starts fresh but inherits this room's agent, model, and effective topic memory; include all required context, paths, and acceptance criteria in `task`.",
354
+ hideExecutionDetails
355
+ ? "A subagent starts fresh with this room's execution profile and effective topic memory; include all required context, paths, and acceptance criteria in `task`."
356
+ : "A subagent starts fresh but inherits this room's agent, model, and effective topic memory; include all required context, paths, and acceptance criteria in `task`.",
352
357
  "Subagents run asynchronously. Choose one result path: `auto` returns the final body to the direct parent; `tell` requires child `tell_session` to its recipient and does not auto-return the body; `status-only` returns lifecycle without content. Runtime length alone does not justify `status-only`. Do not wait or poll; continue or finish the turn.",
353
358
  ]
354
359
  : [];
@@ -356,7 +361,7 @@ function buildRuntimeToolSection(
356
361
  agentKind === "claude"
357
362
  ? `Do not use provider-native todo/task/subagent tools such as "TodoWrite", "Task", "Agent", "TaskCreate", "TaskUpdate", "TaskList", "TaskOutput", or "TaskStop"; they are disabled or not shared across agents.${canSpawnSubagents ? " For delegation, use the runtime spawn_subagent tool instead." : ""}`
358
363
  : agentKind === "maestro"
359
- ? `Do not use provider-native task-store tools such as "TaskCreate", "TaskUpdate", "TaskList", "TaskGet", "TaskOutput", or "TaskStop"; they are disabled or not shared across agents. Do not use the Maestro "Agent" sub-agent tool either; it is disabled.${canSpawnSubagents ? " Use the runtime spawn_subagent tool for delegation so work is visible in its own room and reporting follows report_mode." : " Delegation is unavailable in this room."}`
364
+ ? `Do not use provider-native task-store tools such as "TaskCreate", "TaskUpdate", "TaskList", "TaskGet", "TaskOutput", or "TaskStop"; they are disabled or not shared across agents. Do not use the ${hideExecutionDetails ? "provider-native" : "Maestro"} "Agent" sub-agent tool either; it is disabled.${canSpawnSubagents ? " Use the runtime spawn_subagent tool for delegation so work is visible in its own room and reporting follows report_mode." : " Delegation is unavailable in this room."}`
360
365
  : 'Do not use provider-native goal/todo/plan surfaces such as "create_goal", "get_goal", "update_goal", "todo_list", or "update_plan"; they are disabled, ignored, or not shared across agents.';
361
366
  const visualSection = visualTools
362
367
  ? [
@@ -396,7 +401,9 @@ function buildRuntimeToolSection(
396
401
  "",
397
402
  "## Shared Tasks",
398
403
  taskToolLine,
399
- "Use this shared task store for plans, progress, and checklist updates; it is visible across claude/codex/maestro turns.",
404
+ hideExecutionDetails
405
+ ? "Use this shared task store for plans, progress, and checklist updates; it is visible across all turns in this workspace."
406
+ : "Use this shared task store for plans, progress, and checklist updates; it is visible across claude/codex/maestro turns.",
400
407
  nativeTaskPolicyLine,
401
408
  "",
402
409
  "## Shared Decisions",
@@ -453,24 +460,25 @@ function buildRuntimeToolSection(
453
460
  "Agent guidance when the user explicitly asks to switch: `codex` for deepest reasoning and complex code/math; `claude` for tool-heavy MCP/file automation; `maestro` for inexpensive fast drafts and lighter experiments.",
454
461
  ];
455
462
 
463
+ const topicConfiguration = hideExecutionDetails
464
+ ? []
465
+ : [
466
+ ...extensions.render("before-topic-configuration"),
467
+ ...topicConfig,
468
+ ...extensions.render("after-topic-configuration"),
469
+ ];
470
+
456
471
  if (agentKind !== "claude") {
457
472
  return [
458
473
  ...shared,
459
- ...extensions.render("before-topic-configuration"),
460
- ...topicConfig,
461
- ...extensions.render("after-topic-configuration"),
474
+ ...topicConfiguration,
462
475
  "",
463
476
  "## Runtime Tool Limits",
464
477
  "If file delivery or topic configuration tools are not present in your available tools for this session, do not claim you used them. Tell the user this session does not expose that in-chat tool action.",
465
478
  ].join("\n");
466
479
  }
467
480
 
468
- return [
469
- ...shared,
470
- ...extensions.render("before-topic-configuration"),
471
- ...topicConfig,
472
- ...extensions.render("after-topic-configuration"),
473
- ].join("\n");
481
+ return [...shared, ...topicConfiguration].join("\n");
474
482
  }
475
483
 
476
484
  export function createPromptBuilders(host: PromptBuilderHost = {}): PromptBuilders {
@@ -560,6 +568,7 @@ export function createPromptBuilders(host: PromptBuilderHost = {}): PromptBuilde
560
568
  buildRuntimeToolSection(
561
569
  {
562
570
  agentKind: opts.agentKind,
571
+ hideExecutionDetails: opts.surface === "otium",
563
572
  canSpawnSubagents: sessionKind === "channel" ? false : opts.canSpawnSubagents,
564
573
  canStageSubagents: sessionKind === "channel" ? false : opts.canStageSubagents,
565
574
  visualTools: opts.visualTools,
@@ -586,11 +595,19 @@ export function createPromptBuilders(host: PromptBuilderHost = {}): PromptBuilde
586
595
  // Substitute the same vars so a host manager template using placeholders
587
596
  // like {{RESPONSE_LANGUAGE}} never reaches the model unresolved.
588
597
  const managerTemplate = replaceVars(
589
- template({
590
- kind: "manager-system",
591
- filename: "manager-system.md",
592
- fallback: FALLBACK_MANAGER_SYSTEM_PROMPT_TEMPLATE,
593
- }),
598
+ template(
599
+ opts.surface === "otium"
600
+ ? {
601
+ kind: "surface-profile",
602
+ filename: "surfaces/otium-manager.md",
603
+ fallback: FALLBACK_MANAGER_SYSTEM_PROMPT_TEMPLATE,
604
+ }
605
+ : {
606
+ kind: "manager-system",
607
+ filename: "manager-system.md",
608
+ fallback: FALLBACK_MANAGER_SYSTEM_PROMPT_TEMPLATE,
609
+ },
610
+ ),
594
611
  templateVars,
595
612
  );
596
613
  prompt += `\n\n${managerTemplate}`;
@@ -0,0 +1,18 @@
1
+ ## Manager Role
2
+ This is the shared "General" hub of the user's Otium workspace.
3
+ Act as the workspace manager: orient the user across rooms, summarize what is going on, and route focused work to the right room.
4
+
5
+ Move substantial coding, browsing, long document work, or file conversion into a dedicated room when it benefits from focused context or tools. Handle small coordination tasks directly. General itself does not load browser tools.
6
+ General is also the workspace memory hub for past decisions, archived rooms, and cross-room context.
7
+
8
+ ## State Check
9
+ At the start of room-management work, call the host-provided `list_topics` tool first.
10
+ - Resolve names from the current list before create, update, delete, or configuration changes.
11
+ - Use only the public execution profiles offered by the host tools. Provider routing is private infrastructure and must not be inferred, requested, or disclosed.
12
+
13
+ Use the host-provided topic administration tools for room creation, updates, resets, deletion, and MCP configuration. Confirm destructive operations with the user. Use session communication only when the user also asked to start or coordinate work in another room.
14
+
15
+ ## Worker Nodes
16
+ Use `list_nodes`, `check_node`, and `get_node_health` for placement readiness. These tools intentionally expose operational readiness without provider routing details.
17
+
18
+ After creating or changing a room, briefly state what changed and, when useful, suggest moving the next focused task into that room. Keep a concise, practical tone.
@@ -1 +1 @@
1
- export const NEGOTIUM_VERSION = "0.18.0";
1
+ export const NEGOTIUM_VERSION = "0.18.2";
@@ -15,6 +15,10 @@ export interface SpawnSubagentToolContext {
15
15
  model?: string;
16
16
  }
17
17
  export type SubagentToolContext = Pick<SpawnSubagentToolContext, "userId" | "topicId">;
18
+ export interface SubagentToolDefinitionOptions {
19
+ /** Otium owns provider routing, so its public tools inherit execution and omit overrides. */
20
+ executionOverrides?: boolean;
21
+ }
18
22
  export interface SubagentWatch {
19
23
  parentTopicId: string;
20
24
  childTopicId: string;
@@ -117,8 +121,8 @@ export interface SubagentLifecycle<TContext extends SpawnSubagentToolContext = S
117
121
  sweepStaleSubagentCards(): void;
118
122
  subagentReportMode(childTopicId: string): SubagentReportMode;
119
123
  createSubagentManagementToolDefinitions(ctx: SubagentToolContext): SharedMcpTool[];
120
- createSpawnSubagentToolDefinition(ctx: TContext): SharedMcpTool;
121
- createPrepareSubagentToolDefinition(ctx: TContext): SharedMcpTool;
124
+ createSpawnSubagentToolDefinition(ctx: TContext, options?: SubagentToolDefinitionOptions): SharedMcpTool;
125
+ createPrepareSubagentToolDefinition(ctx: TContext, options?: SubagentToolDefinitionOptions): SharedMcpTool;
122
126
  }
123
127
  export declare function createSubagentLifecycle<TContext extends SpawnSubagentToolContext>(host: SubagentLifecycleHost<TContext>): SubagentLifecycle<TContext>;
124
128
  export declare const computeSubagentDepth: (topicId: string) => number;
@@ -130,5 +134,5 @@ export declare const settleSubagentFailure: (queryId: string, reason: string) =>
130
134
  export declare const sweepStaleSubagentCards: () => void;
131
135
  export declare const subagentReportMode: (childTopicId: string) => SubagentReportMode;
132
136
  export declare const createSubagentManagementToolDefinitions: (ctx: SubagentToolContext) => SharedMcpTool[];
133
- export declare const createSpawnSubagentToolDefinition: (ctx: SpawnSubagentToolContext) => SharedMcpTool;
134
- export declare const createPrepareSubagentToolDefinition: (ctx: SpawnSubagentToolContext) => SharedMcpTool;
137
+ export declare const createSpawnSubagentToolDefinition: (ctx: SpawnSubagentToolContext, options?: SubagentToolDefinitionOptions) => SharedMcpTool;
138
+ export declare const createPrepareSubagentToolDefinition: (ctx: SpawnSubagentToolContext, options?: SubagentToolDefinitionOptions) => SharedMcpTool;
@@ -7,6 +7,8 @@ export interface DecisionMcpContext {
7
7
  topicId?: string;
8
8
  agent: AgentKind;
9
9
  model?: string;
10
+ /** False for product surfaces that keep provider routing private. */
11
+ exposeExecutionMetadata?: boolean;
10
12
  }
11
13
  export interface DecisionMcpHost {
12
14
  readDecisions(userId: string, scopeKey: string): StoredDecision[];
@@ -1 +1 @@
1
- export declare const NEGOTIUM_VERSION = "0.18.0";
1
+ export declare const NEGOTIUM_VERSION = "0.18.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "negotium",
3
- "version": "0.18.0",
3
+ "version": "0.18.2",
4
4
  "type": "module",
5
5
  "description": "Install the Negotium multi-agent runtime and CLI with one package",
6
6
  "license": "Apache-2.0",