negotium 0.1.20 → 0.1.21

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 (34) hide show
  1. package/dist/agent-helpers.js +119 -9
  2. package/dist/agent-helpers.js.map +10 -8
  3. package/dist/cron.js +108 -35
  4. package/dist/cron.js.map +16 -15
  5. package/dist/hosted-agent.js +2 -2
  6. package/dist/hosted-agent.js.map +2 -2
  7. package/dist/main.js +116 -38
  8. package/dist/main.js.map +16 -15
  9. package/dist/prompts.js +98 -9
  10. package/dist/prompts.js.map +6 -5
  11. package/dist/runtime/scripts/browser-passkey-policy.mjs +36 -0
  12. package/dist/runtime/scripts/mcp-patchright-http.mjs +14 -4
  13. package/dist/runtime/src/agents/archiver.ts +0 -14
  14. package/dist/runtime/src/agents/idle-archiver.ts +21 -0
  15. package/dist/runtime/src/agents/mcp-tools/self-config.ts +1 -1
  16. package/dist/runtime/src/agents/mcp-tools/spawn-subagent.ts +6 -1
  17. package/dist/runtime/src/agents/memory-archive-policy.ts +34 -0
  18. package/dist/runtime/src/agents/model-catalog.ts +84 -18
  19. package/dist/runtime/src/platform/playwright/manager.ts +4 -2
  20. package/dist/runtime/src/prompts/builders.ts +36 -7
  21. package/dist/runtime/src/runtime/turn-runner.ts +2 -0
  22. package/dist/runtime/src/storage/topic-archive.ts +5 -2
  23. package/dist/runtime/src/topics/lifecycle.ts +2 -1
  24. package/dist/runtime/src/topics/session.ts +2 -0
  25. package/dist/runtime/src/version.ts +1 -1
  26. package/dist/storage.js +23 -3
  27. package/dist/storage.js.map +5 -4
  28. package/dist/types/packages/core/src/agents/idle-archiver.d.ts +2 -0
  29. package/dist/types/packages/core/src/agents/memory-archive-policy.d.ts +14 -0
  30. package/dist/types/packages/core/src/agents/model-catalog.d.ts +77 -0
  31. package/dist/types/packages/core/src/prompts/builders.d.ts +5 -1
  32. package/dist/types/packages/core/src/storage/topic-archive.d.ts +1 -0
  33. package/dist/types/packages/core/src/version.d.ts +1 -1
  34. package/package.json +2 -2
package/dist/cron.js CHANGED
@@ -3469,7 +3469,7 @@ var init_claude_provider = __esm(async () => {
3469
3469
  });
3470
3470
 
3471
3471
  // ../../packages/core/src/version.ts
3472
- var NEGOTIUM_VERSION = "0.1.20";
3472
+ var NEGOTIUM_VERSION = "0.1.21";
3473
3473
 
3474
3474
  // ../../packages/core/src/agents/codex-native-multi-agent.ts
3475
3475
  import { spawn as spawn3 } from "child_process";
@@ -5448,6 +5448,10 @@ var init_ask_user = __esm(async () => {
5448
5448
  });
5449
5449
 
5450
5450
  // ../../packages/core/src/agents/model-catalog.ts
5451
+ function formatSelectableModel(candidate) {
5452
+ const tier = `${candidate.intelligenceTier[0].toUpperCase()}${candidate.intelligenceTier.slice(1)}`;
5453
+ return `${candidate.agent} / \`${candidate.model}\` [${tier}-level]: ${candidate.routingSummary}`;
5454
+ }
5451
5455
  function selectableModel(value) {
5452
5456
  const normalized = value.trim().toLowerCase();
5453
5457
  return SELECTABLE_MODELS.find((candidate) => candidate.model === normalized);
@@ -5470,7 +5474,7 @@ function resolveModelForAgent(agent, requested, registry) {
5470
5474
  return defaultModel;
5471
5475
  return registry.validateModel(requested) ? requested : defaultModel;
5472
5476
  }
5473
- var MODEL_OWNER, SELECTABLE_MODELS, FALLBACK_ORDER, AGENT_DISPLAY_NAME;
5477
+ var MODEL_OWNER, MODEL_COST_RESEARCHED_AT = "2026-07-19", MODEL_COST_ROUTING_SUMMARY = "Cost basis (2026-07-19): Codex Pro 20x and Claude Max 20x are each $200/month; DeepSeek Pro is pay-per-token. Relative marginal token cost: DeepSeek Pro << Codex < Claude.", CODEX_PRO_20X_COST = "ChatGPT Pro 20x subscription: $200/month", CODEX_COMMUNITY_WEEKLY = "Community plan-level observation: roughly 2\u20134B raw/cached tokens per week; fresh-input equivalent is much lower and unstable (low confidence)", CLAUDE_MAX_20X_COST = "Claude Max 20x subscription: $200/month", CLAUDE_COMMUNITY_SESSION = "Community observations vary from roughly 220\u2013250K locally displayed tokens per 5-hour session to billions of cache-heavy raw tokens per week; calibrated reports value a full weekly allowance around $680\u2013$1,900 at API rates. Recent heavy-model reports reach the weekly cap after about 4\u20135 full sessions (low confidence; not a token cap)", SELECTABLE_MODELS, FALLBACK_ORDER, AGENT_DISPLAY_NAME;
5474
5478
  var init_model_catalog = __esm(() => {
5475
5479
  init_config();
5476
5480
  MODEL_OWNER = {
@@ -5490,47 +5494,72 @@ var init_model_catalog = __esm(() => {
5490
5494
  {
5491
5495
  model: "gpt-5.6-sol",
5492
5496
  agent: "codex",
5493
- description: "Latest frontier agentic coding model."
5497
+ description: "Highest-capability Codex route for the hardest agentic coding work.",
5498
+ intelligenceTier: "fable",
5499
+ routingSummary: "hardest coding work; 5x Codex quota cost",
5500
+ accessCost: CODEX_PRO_20X_COST,
5501
+ marginalTokenCost: "Codex credits: $5/M uncached input, $0.50/M cached input, $30/M output",
5502
+ estimatedUsage: `Official Pro 20x range: 300\u20131,800 local messages per 5 hours; quota weight 5x Luna. ${CODEX_COMMUNITY_WEEKLY}`
5494
5503
  },
5495
5504
  {
5496
5505
  model: "gpt-5.6-terra",
5497
5506
  agent: "codex",
5498
- description: "Balanced agentic coding model for everyday work."
5507
+ description: "High-capability Codex route for complex coding and reasoning.",
5508
+ intelligenceTier: "opus",
5509
+ routingSummary: "complex coding and reasoning; 2.5x Codex quota cost",
5510
+ accessCost: CODEX_PRO_20X_COST,
5511
+ marginalTokenCost: "Codex credits: $2.50/M uncached input, $0.25/M cached input, $15/M output",
5512
+ estimatedUsage: `Official Pro 20x range: 400\u20132,200 local messages per 5 hours; quota weight 2.5x Luna. ${CODEX_COMMUNITY_WEEKLY}`
5499
5513
  },
5500
5514
  {
5501
5515
  model: "gpt-5.6-luna",
5502
5516
  agent: "codex",
5503
- description: "Fast and affordable agentic coding model."
5504
- },
5505
- {
5506
- model: "gpt-5.5",
5507
- agent: "codex",
5508
- description: "Frontier model for complex coding, research, and real-world work."
5517
+ description: "Default Codex route with strong everyday coding intelligence.",
5518
+ intelligenceTier: "sonnet",
5519
+ routingSummary: "everyday coding default; lowest Codex quota cost (1x)",
5520
+ accessCost: CODEX_PRO_20X_COST,
5521
+ marginalTokenCost: "Codex credits: $1/M uncached input, $0.10/M cached input, $6/M output",
5522
+ estimatedUsage: `Official Pro 20x range: 1,000\u20135,600 local messages per 5 hours; lowest Codex quota weight (1x). ${CODEX_COMMUNITY_WEEKLY}`
5509
5523
  },
5510
5524
  {
5511
5525
  model: "fable",
5512
5526
  agent: "claude",
5513
- description: "Fable 5 \xB7 Most capable for your hardest and longest-running tasks \xB7 $10/$50 per Mtok"
5527
+ description: "Highest-capability Claude route for the hardest and longest-running tasks.",
5528
+ intelligenceTier: "fable",
5529
+ routingSummary: "hardest long-running work; highest Claude cost; explicit request only",
5530
+ accessCost: CLAUDE_MAX_20X_COST,
5531
+ marginalTokenCost: "Claude API/extra usage: $10/M input, $12.50/M cache write, $1/M cache read, $50/M output",
5532
+ estimatedUsage: `${CLAUDE_COMMUNITY_SESSION}; Fable drains weighted quota fastest, so use only on explicit user request. No stable per-model token cap is published.`
5514
5533
  },
5515
5534
  {
5516
5535
  model: "opus",
5517
5536
  agent: "claude",
5518
- description: "Opus 4.8 with 1M context \xB7 Best for everyday, complex tasks \xB7 $5/$25 per Mtok"
5537
+ description: "High-capability Claude route for complex reasoning and tool-heavy work.",
5538
+ intelligenceTier: "opus",
5539
+ routingSummary: "complex reasoning and tool-heavy work; about 2.5x Sonnet marginal cost",
5540
+ accessCost: CLAUDE_MAX_20X_COST,
5541
+ marginalTokenCost: "Claude API/extra usage: $5/M input, $6.25/M cache write, $0.50/M cache read, $25/M output",
5542
+ estimatedUsage: `${CLAUDE_COMMUNITY_SESSION}; Opus uses the shared all-model weekly pool more quickly than Sonnet. No stable per-model token cap is published.`
5519
5543
  },
5520
5544
  {
5521
5545
  model: "sonnet",
5522
5546
  agent: "claude",
5523
- description: "Sonnet 5 \xB7 Efficient for routine tasks \xB7 $2/$10 per Mtok \xB7 promo through Aug 31"
5547
+ description: "Default Claude route for capable, efficient everyday work.",
5548
+ intelligenceTier: "sonnet",
5549
+ routingSummary: "capable everyday default; lowest Claude model cost",
5550
+ accessCost: CLAUDE_MAX_20X_COST,
5551
+ marginalTokenCost: "Claude API/extra usage introductory rate: $2/M input, $2.50/M cache write, $0.20/M cache read, $10/M output through 2026-08-31; then $3/M input and $15/M output",
5552
+ estimatedUsage: `${CLAUDE_COMMUNITY_SESSION}; Sonnet also has a separate weekly allowance and normally provides the highest Claude throughput. No stable weekly token cap is published.`
5524
5553
  },
5525
5554
  {
5526
5555
  model: "deepseek-pro",
5527
5556
  agent: "maestro",
5528
- description: "Sonnet-level performance at lower cost \xB7 Best for everyday tasks over coding"
5529
- },
5530
- {
5531
- model: "deepseek-flash",
5532
- agent: "maestro",
5533
- description: "DeepSeek V4 Flash \xB7 Fast and low-cost for lightweight everyday tasks"
5557
+ description: "API-priced Sonnet-level route for cost-efficient everyday work.",
5558
+ intelligenceTier: "sonnet",
5559
+ routingSummary: "cost-efficient everyday work; pay-per-token and cheapest route",
5560
+ accessCost: "DeepSeek V4 Pro pay-as-you-go API; no monthly subscription required",
5561
+ marginalTokenCost: "DeepSeek API: $0.435/M uncached input, $0.003625/M cached input, $0.87/M output",
5562
+ estimatedUsage: "No subscription token cap; pay per token. Official account concurrency limit is 500 requests."
5534
5563
  }
5535
5564
  ];
5536
5565
  FALLBACK_ORDER = {
@@ -6166,6 +6195,7 @@ async function spawnPlaywright(instanceKey, userId, reservedPort, browserBin = P
6166
6195
  String(port),
6167
6196
  "--host",
6168
6197
  "127.0.0.1",
6198
+ "--headed",
6169
6199
  "--user-data-dir",
6170
6200
  userDataDir
6171
6201
  ];
@@ -7006,7 +7036,7 @@ function loadAgentPrompt(filename) {
7006
7036
  prompt: match[2].trim()
7007
7037
  };
7008
7038
  }
7009
- function buildRuntimeToolSection(agentKind, canSpawnSubagents = false, visualTools = false, fileDeliveryTools = false) {
7039
+ function buildRuntimeToolSection(agentKind, canSpawnSubagents = false, visualTools = false, fileDeliveryTools = false, currentModel, currentEffort) {
7010
7040
  const runtimeNamespace = "mcp__runtime";
7011
7041
  const taskNamespace = "mcp__task";
7012
7042
  const visualToolLine = agentKind === "codex" ? `To display charts, tables, or interactive HTML results to the user, call the \`show_html\` function in the \`${runtimeNamespace}\` namespace with { html: "<complete HTML string>", title?: "optional title" }.` : `To display charts, tables, or interactive HTML results to the user, call the MCP tool "${runtimeNamespace}__show_html" with { html: "<complete HTML string>", title?: "optional title" }.`;
@@ -7064,20 +7094,26 @@ function buildRuntimeToolSection(agentKind, canSpawnSubagents = false, visualToo
7064
7094
  "Do not use session communication to make another topic perform destructive changes without the user's clear intent.",
7065
7095
  ...spawnSubagentSection
7066
7096
  ];
7097
+ const modelCatalog = SELECTABLE_MODELS.map((candidate) => `- ${formatSelectableModel(candidate)}`);
7067
7098
  const topicConfig = [
7068
7099
  "",
7069
7100
  "## Topic Configuration (model / agent / effort)",
7101
+ `Current execution: agent=\`${agentKind}\`, model=\`${currentModel ?? "unknown (call get_model)"}\`, effort=\`${currentEffort ?? "provider default/off"}\`.`,
7070
7102
  "The user's configured agent/model/effort is intentional. Preserve it by default.",
7071
7103
  `When the user explicitly asks to change the model, agent backend, or reasoning effort for THIS topic, call "${runtimeNamespace}__set_model", "${runtimeNamespace}__set_agent", or "${runtimeNamespace}__set_effort". The change applies from your NEXT turn. After calling, briefly confirm and the system will continue with the new setting.`,
7072
7104
  "`set_effort` is available but discouraged; use it only when the user explicitly requests an effort change.",
7073
- "`set_model` may be called autonomously only when the current model is clearly below the task's required capability, such as complex algorithm design, proof-level math, or broad multi-file refactoring. In that case, move up one step within the same agent and end the turn. Do not use vague task complexity as a trigger.",
7105
+ "`set_model` may be called autonomously only when the current model is clearly below the task's required capability, such as complex algorithm design, proof-level math, or broad multi-file refactoring. Choose the best-fit model directly from the same-agent catalog; model selection is not a mandatory one-step ladder. End the turn after changing it. Do not use vague task complexity as a trigger.",
7074
7106
  "`set_agent` autonomous calls are forbidden. Only switch agent when the user explicitly asks to switch runtime, e.g. \u201Ccodex\uB85C \uAC00\u201D, \u201Cclaude\uB85C \uBC14\uAFD4\u201D.",
7075
7107
  "Never use `fable` unless the user explicitly requests it; it is expensive.",
7076
7108
  "",
7077
- "Accepted values:",
7078
- "- claude models: `sonnet` (default), `opus`, `fable`; efforts: `low`, `medium`, `high`, `xhigh`, `max`.",
7079
- "- codex models: `gpt-5.6-luna` (default), `gpt-5.6-terra`, `gpt-5.6-sol`; efforts: `low`, `medium`, `high`, `xhigh`, `max`.",
7080
- "- maestro models: `deepseek-pro` (default), `deepseek-flash`, `deepseek`; efforts: `low`, `medium`, `high`, `xhigh`, `max`.",
7109
+ "Model catalog (capability/cost routing guidance):",
7110
+ MODEL_COST_ROUTING_SUMMARY,
7111
+ ...modelCatalog,
7112
+ "",
7113
+ "Accepted effort values:",
7114
+ "- claude: `low`, `medium`, `high`, `xhigh`, `max`.",
7115
+ "- codex: `low`, `medium`, `high`, `xhigh`, `max`.",
7116
+ "- maestro: `low`, `medium`, `high`, `xhigh`, `max`.",
7081
7117
  "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."
7082
7118
  ];
7083
7119
  if (agentKind !== "claude") {
@@ -7100,7 +7136,7 @@ function buildTopicSystemPrompt(opts) {
7100
7136
  TOPIC_TITLE: opts.topicTitle,
7101
7137
  WORKSPACE_CWD: opts.workspaceCwd,
7102
7138
  UPLOADS_DIR: uploadsDir
7103
- }) + buildRuntimeToolSection(opts.agentKind, opts.canSpawnSubagents, opts.visualTools, opts.fileDeliveryTools);
7139
+ }) + buildRuntimeToolSection(opts.agentKind, opts.canSpawnSubagents, opts.visualTools, opts.fileDeliveryTools, opts.currentModel, opts.currentEffort);
7104
7140
  if (opts.description?.trim()) {
7105
7141
  prompt += `
7106
7142
 
@@ -7116,7 +7152,7 @@ function buildChannelSystemPrompt(opts) {
7116
7152
  TOPIC_TITLE: opts.topicTitle,
7117
7153
  WORKSPACE_CWD: opts.workspaceCwd,
7118
7154
  UPLOADS_DIR: uploadsDir
7119
- }) + buildRuntimeToolSection(opts.agentKind, false, opts.visualTools, opts.fileDeliveryTools);
7155
+ }) + buildRuntimeToolSection(opts.agentKind, false, opts.visualTools, opts.fileDeliveryTools, opts.currentModel, opts.currentEffort);
7120
7156
  }
7121
7157
  function buildManagerSystemPrompt(opts) {
7122
7158
  return `${buildTopicSystemPrompt(opts)}
@@ -7166,6 +7202,7 @@ User-uploaded files for this Channel are copied under "{{UPLOADS_DIR}}" as attac
7166
7202
  This is the shared "General" hub of the user's workspace.
7167
7203
  Act as the workspace manager: orient the user across topics, summarize what is going on, and route focused work to the right room.`, _topicSystemPromptTemplate = null, _channelSystemPromptTemplate = null, _managerSystemPromptTemplate = null, _visualDesignGuide = null;
7168
7204
  var init_builders = __esm(() => {
7205
+ init_model_catalog();
7169
7206
  init_config();
7170
7207
  init_logger();
7171
7208
  PROMPTS_DIR = resolve6(PROJECT_ROOT, "src/prompts");
@@ -7278,10 +7315,6 @@ function getArchiverDef() {
7278
7315
  }
7279
7316
  function runArchiverTurn(params) {
7280
7317
  const { userId, topicId, topicTitle, archivePath, messageCount, mode = "deleted-topic" } = params;
7281
- if (mode !== "active-topic" && messageCount < MIN_ARCHIVE_MESSAGES) {
7282
- logger.info({ userId, topicTitle, messageCount, min: MIN_ARCHIVE_MESSAGES }, "archiver: skipped \u2014 too few messages to distil");
7283
- return false;
7284
- }
7285
7318
  let archiverDef;
7286
7319
  try {
7287
7320
  archiverDef = getArchiverDef();
@@ -7489,7 +7522,7 @@ ${rolled.join(`
7489
7522
  logger.warn({ err, topicTitle }, "archiver: failed to post #General notification");
7490
7523
  }
7491
7524
  }
7492
- var MAX_BRIEF_ENTRIES = 8, MIN_ARCHIVE_MESSAGES = 4, MAX_SESSION_STEPS = 20, activeArchiverSessions, _archiverDef = null;
7525
+ var MAX_BRIEF_ENTRIES = 8, MAX_SESSION_STEPS = 20, activeArchiverSessions, _archiverDef = null;
7493
7526
  var init_archiver = __esm(async () => {
7494
7527
  await init_agents();
7495
7528
  await init_bus();
@@ -7504,6 +7537,25 @@ var init_archiver = __esm(async () => {
7504
7537
  activeArchiverSessions = new Map;
7505
7538
  });
7506
7539
 
7540
+ // ../../packages/core/src/agents/memory-archive-policy.ts
7541
+ function countMemoryArchiveExchanges(rows) {
7542
+ let waitingForAssistant = false;
7543
+ let completed = 0;
7544
+ for (const row of rows) {
7545
+ const assistant = row.author_id === "ai" || Boolean(row.agent_type);
7546
+ const conversational = row.kind == null || row.kind === "message";
7547
+ if (!assistant && row.author_id !== "system" && conversational) {
7548
+ waitingForAssistant = true;
7549
+ continue;
7550
+ }
7551
+ if (assistant && conversational && waitingForAssistant) {
7552
+ completed++;
7553
+ waitingForAssistant = false;
7554
+ }
7555
+ }
7556
+ return completed;
7557
+ }
7558
+
7507
7559
  // ../../packages/core/src/storage/topic-transcript.ts
7508
7560
  function parseJsonField(value) {
7509
7561
  if (!value)
@@ -7591,8 +7643,9 @@ function archiveTopicMessages(topicId, topicTitle, options = {}) {
7591
7643
  counter++;
7592
7644
  }
7593
7645
  }
7594
- logger.info({ topicId, topicTitle, archive: path, messageCount: rows.length, lastRowid }, "archiveTopicMessages: archived topic messages");
7595
- return { path, messageCount: rows.length, lastRowid };
7646
+ const exchangeCount = countMemoryArchiveExchanges(rows);
7647
+ logger.info({ topicId, topicTitle, archive: path, messageCount: rows.length, exchangeCount, lastRowid }, "archiveTopicMessages: archived topic messages");
7648
+ return { path, messageCount: rows.length, exchangeCount, lastRowid };
7596
7649
  }
7597
7650
  var init_topic_archive = __esm(async () => {
7598
7651
  init_logger();
@@ -7796,6 +7849,7 @@ function archiveActiveTopicForMemory(topicId, userId, options) {
7796
7849
  if (!options.allowMentionOnly && topic.aiMode === "mention")
7797
7850
  return "mention-only-channel";
7798
7851
  let skipped = "empty";
7852
+ let skipMemoryTurn = false;
7799
7853
  const claim = claimTopicArchiveJob(topicId, (afterRowid) => {
7800
7854
  const pending = getMessagesForTopicAfterRowid(topicId, afterRowid);
7801
7855
  const minMessages = options.minMessages;
@@ -7804,6 +7858,8 @@ function archiveActiveTopicForMemory(topicId, userId, options) {
7804
7858
  logger.debug({ topicId, topicTitle: topic.title, pending: pending.length, minMessages }, "topic-memory-archiver: skipped below threshold");
7805
7859
  return null;
7806
7860
  }
7861
+ const exchangeCount = countMemoryArchiveExchanges(pending);
7862
+ skipMemoryTurn = options.minExchanges !== undefined && exchangeCount < options.minExchanges;
7807
7863
  const archived = (options.archiveMessages ?? archiveTopicMessages)(topicId, topic.title, {
7808
7864
  afterRowid,
7809
7865
  reason: options.reason
@@ -7821,6 +7877,18 @@ function archiveActiveTopicForMemory(topicId, userId, options) {
7821
7877
  if (claim.kind === "busy")
7822
7878
  return "busy";
7823
7879
  const { job } = claim;
7880
+ if (skipMemoryTurn) {
7881
+ settleTopicArchiveJob(topicId, job.archivePath, true);
7882
+ logger.info({
7883
+ topicId,
7884
+ topicTitle: topic.title,
7885
+ messageCount: job.messageCount,
7886
+ minExchanges: options.minExchanges,
7887
+ archive: job.archivePath,
7888
+ reason: options.reason
7889
+ }, "topic-memory-archiver: raw snapshot preserved below exchange threshold");
7890
+ return "below-threshold";
7891
+ }
7824
7892
  const memoryTopic = getTopicMemoryOrigin(topicId) ?? topic;
7825
7893
  const launched = (options.launchArchiver ?? runArchiverTurn)({
7826
7894
  userId,
@@ -9723,6 +9791,7 @@ __export(exports_turn_runner, {
9723
9791
  isPathInside: () => isPathInside,
9724
9792
  isLikelyCurrentChannelTrigger: () => isLikelyCurrentChannelTrigger,
9725
9793
  ingestAttachment: () => ingestAttachment,
9794
+ formatSelectableModel: () => formatSelectableModel,
9726
9795
  formatChannelTranscriptLine: () => formatChannelTranscriptLine,
9727
9796
  escapeRegExp: () => escapeRegExp,
9728
9797
  escapeHtml: () => escapeHtml2,
@@ -9740,6 +9809,8 @@ __export(exports_turn_runner, {
9740
9809
  SESSION_EXPIRED_MSG: () => SESSION_EXPIRED_MSG,
9741
9810
  SELECTABLE_MODELS: () => SELECTABLE_MODELS,
9742
9811
  MODEL_OWNER: () => MODEL_OWNER,
9812
+ MODEL_COST_ROUTING_SUMMARY: () => MODEL_COST_ROUTING_SUMMARY,
9813
+ MODEL_COST_RESEARCHED_AT: () => MODEL_COST_RESEARCHED_AT,
9743
9814
  FALLBACK_ORDER: () => FALLBACK_ORDER,
9744
9815
  AGENT_DISPLAY_NAME: () => AGENT_DISPLAY_NAME
9745
9816
  });
@@ -10947,6 +11018,8 @@ function startAiTurn(params) {
10947
11018
  topicTitle: topic.title,
10948
11019
  workspaceCwd,
10949
11020
  agentKind,
11021
+ currentModel: resolvedModel,
11022
+ currentEffort: resolvedEffort,
10950
11023
  description: topic.description,
10951
11024
  canSpawnSubagents: peerBridge?.canSpawnSubagents ?? (topicRecord?.kind === "agent" && !topicRecord.isSubagent),
10952
11025
  visualTools,
@@ -13857,4 +13930,4 @@ export {
13857
13930
  CRON_CONTEXT_RETAIN_TURNS
13858
13931
  };
13859
13932
 
13860
- //# debugId=077E0F8D1E641D5B64756E2164756E21
13933
+ //# debugId=85C745F136B1D17364756E2164756E21