chatroom-cli 1.103.2 → 1.104.1

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.
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Chatroom Daemon</title>
7
- <script type="module" crossorigin src="/assets/index-DOiewvQz.js"></script>
7
+ <script type="module" crossorigin src="/assets/index-uWf8XoMg.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="/assets/index-iM2TK7kh.css">
9
9
  </head>
10
10
  <body>
package/dist/index.js CHANGED
@@ -29328,8 +29328,13 @@ var init_claude_model_variants = __esm(() => {
29328
29328
  {},
29329
29329
  ...CLAUDE_EFFORT_VALUES.map((effort) => ({ effort }))
29330
29330
  ];
29331
- CLAUDE_SPAWN_ALIASES = ["opus", "sonnet", "haiku"];
29331
+ CLAUDE_SPAWN_ALIASES = [];
29332
29332
  CLAUDE_CATALOG_BASE_MODEL_IDS = [
29333
+ "opus",
29334
+ "sonnet",
29335
+ "haiku",
29336
+ "claude-opus-5",
29337
+ "claude-sonnet-5",
29333
29338
  "claude-opus-4-8",
29334
29339
  "claude-opus-4-6",
29335
29340
  "claude-sonnet-4-6",
@@ -100836,9 +100841,11 @@ function snapshotKey(taskId, role) {
100836
100841
 
100837
100842
  class MachineTaskSnapshotState {
100838
100843
  snapshots = new Map;
100844
+ initialized = false;
100839
100845
  replace(snapshots) {
100840
100846
  this.snapshots.clear();
100841
100847
  this.upsert(snapshots);
100848
+ this.initialized = true;
100842
100849
  }
100843
100850
  applySignalPage(signals, snapshots) {
100844
100851
  const snapshotsByKey = new Map(snapshots.map((snapshot) => [
@@ -100859,6 +100866,13 @@ class MachineTaskSnapshotState {
100859
100866
  const roleLower = role.toLowerCase();
100860
100867
  return [...this.snapshots.values()].filter((snapshot) => snapshot.chatroomId === chatroomId && snapshot.agentConfig.role.toLowerCase() === roleLower);
100861
100868
  }
100869
+ isInitialized() {
100870
+ return this.initialized;
100871
+ }
100872
+ getForRole(chatroomId, role, taskId) {
100873
+ const snapshot = this.snapshots.get(snapshotKey(taskId, role));
100874
+ return snapshot?.chatroomId === chatroomId ? snapshot : null;
100875
+ }
100862
100876
  listAll() {
100863
100877
  return [...this.snapshots.values()];
100864
100878
  }
@@ -103195,6 +103209,27 @@ var init_native_harness_session_exit = __esm(() => {
103195
103209
  init_native_task_delivery_coordinator();
103196
103210
  });
103197
103211
 
103212
+ // src/daemon/entry/native-delivery/native-turn-end-inbox.ts
103213
+ function decideNativeTurnEndFromInbox(params) {
103214
+ const session2 = getNativeDeliverySession();
103215
+ if (!params.taskId || !session2)
103216
+ return "unknown";
103217
+ const { taskSnapshotState } = session2;
103218
+ if (!taskSnapshotState.isInitialized())
103219
+ return "unknown";
103220
+ const task = taskSnapshotState.getForRole(params.chatroomId, params.role, params.taskId);
103221
+ return task ? ACTIVE_TASK_DECISIONS[task.status] : "handoff-completed";
103222
+ }
103223
+ var ACTIVE_TASK_DECISIONS;
103224
+ var init_native_turn_end_inbox = __esm(() => {
103225
+ init_native_delivery_session_registry();
103226
+ ACTIVE_TASK_DECISIONS = {
103227
+ pending: "unknown",
103228
+ acknowledged: "unknown",
103229
+ in_progress: "needs-handoff-reminder"
103230
+ };
103231
+ });
103232
+
103198
103233
  // src/daemon/domain/entities/native-turn-phase.ts
103199
103234
  var init_native_turn_phase = () => {};
103200
103235
 
@@ -103659,6 +103694,25 @@ class AgentProcessManager {
103659
103694
  console.log(`[AgentProcessManager] ✅ Handled rapid resume storm for ${opts.role}`);
103660
103695
  return;
103661
103696
  }
103697
+ const inboxDecision = decideNativeTurnEndFromInbox({
103698
+ chatroomId: opts.chatroomId,
103699
+ role: opts.role,
103700
+ taskId: slot?.lastInFlightTaskId
103701
+ });
103702
+ if (inboxDecision === "needs-handoff-reminder") {
103703
+ await this.injectHarnessReminder(opts.chatroomId, opts.role, NATIVE_HANDOFF_REMINDER);
103704
+ console.log(`[AgentProcessManager] ⏩ Handoff reminder injected for ${opts.role} (inbox)`);
103705
+ return;
103706
+ }
103707
+ if (inboxDecision === "handoff-completed") {
103708
+ if (slot) {
103709
+ setNativeTurnPhase(slot, defaultNativeTurnPhase());
103710
+ this.clearLastInFlightTask(opts.chatroomId, opts.role);
103711
+ }
103712
+ notifyNativeTurnIdle({ chatroomId: opts.chatroomId, role: opts.role });
103713
+ console.log(`[AgentProcessManager] ✅ Native agent_end handled for ${opts.role} (inbox)`);
103714
+ return;
103715
+ }
103662
103716
  try {
103663
103717
  const result = await this.deps.backend.mutation(api.participants.handleNativeAgentEnd, {
103664
103718
  sessionId: this.deps.sessionId,
@@ -104989,6 +105043,7 @@ var init_agent_process_manager = __esm(() => {
104989
105043
  init_orphan_tracker();
104990
105044
  init_native_harness_session_exit();
104991
105045
  init_native_task_delivery_coordinator();
105046
+ init_native_turn_end_inbox();
104992
105047
  init_native_turn_phase2();
104993
105048
  init_native_spawn_presence();
104994
105049
  init_no_op_session_monitor();
@@ -135131,4 +135186,4 @@ program2.hook("preAction", async (_thisCommand, actionCommand) => {
135131
135186
  });
135132
135187
  program2.parse();
135133
135188
 
135134
- //# debugId=56DD8E367644E33A64756E2164756E21
135189
+ //# debugId=398908BA09BE4DBA64756E2164756E21