chatroom-cli 1.65.9 → 1.65.11

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/index.js CHANGED
@@ -83768,6 +83768,20 @@ var init_messages = __esm(() => {
83768
83768
  init_services();
83769
83769
  });
83770
83770
 
83771
+ // src/commands/context/format-new-context-error.ts
83772
+ function formatNewContextError(cause3) {
83773
+ const message = getErrorMessage2(cause3);
83774
+ if (message.includes("triggerMessageId") && message.includes("chatroom_messages")) {
83775
+ return `${message}
83776
+ ${TRIGGER_MESSAGE_ID_HINT}`;
83777
+ }
83778
+ return message;
83779
+ }
83780
+ var TRIGGER_MESSAGE_ID_HINT = " hint: --trigger-message-id must be the origin-message-id attribute on the <task> tag, not task-id. Use the pre-filled value from the task intake command when provided.";
83781
+ var init_format_new_context_error = __esm(() => {
83782
+ init_convex_error();
83783
+ });
83784
+
83771
83785
  // src/commands/context/index.ts
83772
83786
  var exports_context2 = {};
83773
83787
  __export(exports_context2, {
@@ -83810,7 +83824,7 @@ function handleContextError(err) {
83810
83824
  console.error(`❌ Failed to read context: ${sanitizeUnknownForTerminal(err.cause.message)}`);
83811
83825
  process.exit(1);
83812
83826
  } else if (err._tag === "NewContextFailed") {
83813
- console.error(`❌ Failed to create context: ${err.cause.message}`);
83827
+ console.error(`❌ Failed to create context: ${formatNewContextError(err.cause)}`);
83814
83828
  process.exit(1);
83815
83829
  } else if (err._tag === "ListContextsFailed") {
83816
83830
  console.error(`❌ Failed to list contexts: ${sanitizeUnknownForTerminal(err.cause.message)}`);
@@ -84077,6 +84091,7 @@ var readContextEffect = (chatroomId, options) => exports_Effect.gen(function* ()
84077
84091
  });
84078
84092
  var init_context2 = __esm(() => {
84079
84093
  init_esm();
84094
+ init_format_new_context_error();
84080
84095
  init_api3();
84081
84096
  init_storage();
84082
84097
  init_client2();
@@ -84835,30 +84850,6 @@ var init_native_ready_invariant = __esm(() => {
84835
84850
  init_types();
84836
84851
  });
84837
84852
 
84838
- // src/commands/machine/daemon-start/assigned-task-snapshot-store.ts
84839
- function replaceAssignedTaskSnapshots(next4) {
84840
- rows = [...next4];
84841
- hasSnapshot = true;
84842
- }
84843
- function clearAssignedTaskSnapshots() {
84844
- rows = [];
84845
- hasSnapshot = false;
84846
- }
84847
- function hasAssignedTaskSnapshot() {
84848
- return hasSnapshot;
84849
- }
84850
- function listAssignedTaskSnapshots() {
84851
- return [...rows];
84852
- }
84853
- function listAssignedTaskSnapshotsForRole(chatroomId, role) {
84854
- const roleLower = role.toLowerCase();
84855
- return rows.filter((row) => row.chatroomId === chatroomId && row.agentConfig.role.toLowerCase() === roleLower);
84856
- }
84857
- var rows, hasSnapshot = false;
84858
- var init_assigned_task_snapshot_store = __esm(() => {
84859
- rows = [];
84860
- });
84861
-
84862
84853
  // src/commands/machine/daemon-start/native-delivery-log.ts
84863
84854
  function logNativeDeliveryPrimary(role, chatroomId) {
84864
84855
  console.log(`[NativeDelivery:primary] turn idle ${role}@${chatroomId} — trying inject`);
@@ -85225,6 +85216,30 @@ function getRoleDeliveryState() {
85225
85216
  }
85226
85217
  var shared;
85227
85218
 
85219
+ // src/infrastructure/stores/assigned-task-snapshot-store.ts
85220
+ function replaceAssignedTaskSnapshots(next4) {
85221
+ rows = [...next4];
85222
+ hasSnapshot = true;
85223
+ }
85224
+ function clearAssignedTaskSnapshots() {
85225
+ rows = [];
85226
+ hasSnapshot = false;
85227
+ }
85228
+ function hasAssignedTaskSnapshot() {
85229
+ return hasSnapshot;
85230
+ }
85231
+ function listAssignedTaskSnapshots() {
85232
+ return [...rows];
85233
+ }
85234
+ function listAssignedTaskSnapshotsForRole(chatroomId, role) {
85235
+ const roleLower = role.toLowerCase();
85236
+ return rows.filter((row) => row.chatroomId === chatroomId && row.agentConfig.role.toLowerCase() === roleLower);
85237
+ }
85238
+ var rows, hasSnapshot = false;
85239
+ var init_assigned_task_snapshot_store = __esm(() => {
85240
+ rows = [];
85241
+ });
85242
+
85228
85243
  // src/commands/machine/daemon-start/native-task-delivery-coordinator.ts
85229
85244
  class NativeTaskDeliveryCoordinator {
85230
85245
  onSessionLost(params) {
@@ -85328,10 +85343,10 @@ function notifyNativeTurnIdle(params) {
85328
85343
  var coordinator;
85329
85344
  var init_native_task_delivery_coordinator = __esm(() => {
85330
85345
  init_esm();
85331
- init_assigned_task_snapshot_store();
85332
85346
  init_native_task_injector_logic();
85333
85347
  init_native_task_injector();
85334
85348
  init_api3();
85349
+ init_assigned_task_snapshot_store();
85335
85350
  init_convex_error();
85336
85351
  });
85337
85352
 
@@ -110511,7 +110526,6 @@ var init_task_monitor = __esm(() => {
110511
110526
  init_parse_session_augmentation();
110512
110527
  init_assigned_task_monitor_contract();
110513
110528
  init_esm();
110514
- init_assigned_task_snapshot_store();
110515
110529
  init_daemon_services();
110516
110530
  init_native_ready_invariant();
110517
110531
  init_native_task_delivery_coordinator();
@@ -110522,6 +110536,7 @@ var init_task_monitor = __esm(() => {
110522
110536
  init_feed_runtime();
110523
110537
  init_assigned_task_presence();
110524
110538
  init_assigned_task_signals();
110539
+ init_assigned_task_snapshot_store();
110525
110540
  init_convex_error();
110526
110541
  });
110527
110542
 
@@ -111968,7 +111983,7 @@ contextCommand.command("inspect").description("View a specific context with stal
111968
111983
  const { inspectContext: inspectContext2 } = await Promise.resolve().then(() => (init_context2(), exports_context2));
111969
111984
  await inspectContext2(options.chatroomId, options);
111970
111985
  });
111971
- contextCommand.command("view-template").description("Print a template for `chatroom context new` content.").action(async () => {
111986
+ contextCommand.command("view-template").description("Print a template for `chatroom context new` content.").option("--chatroom-id <id>", "Ignored (accepted for copy-paste compatibility)").option("--role <role>", "Ignored (accepted for copy-paste compatibility)").action(async () => {
111972
111987
  const { viewTemplate: viewTemplate2 } = await Promise.resolve().then(() => (init_context2(), exports_context2));
111973
111988
  console.log(viewTemplate2());
111974
111989
  });
@@ -112067,4 +112082,4 @@ program2.hook("preAction", async (_thisCommand, actionCommand) => {
112067
112082
  });
112068
112083
  program2.parse();
112069
112084
 
112070
- //# debugId=A68932632BD7E62C64756E2164756E21
112085
+ //# debugId=7C02ECAE46A1934B64756E2164756E21