@mirasoth/soothe-client 0.4.1 → 0.5.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.
package/dist/index.cjs CHANGED
@@ -357,14 +357,14 @@ var init_protocol = __esm({
357
357
  import_node_crypto = require("crypto");
358
358
  PROTO_VERSION = "1";
359
359
  DEFAULT_CLIENT_CAPABILITIES = ["streaming", "batch", "heartbeat", "receipts"];
360
- CLIENT_VERSION = "0.4.1";
360
+ CLIENT_VERSION = "0.5.1";
361
361
  }
362
362
  });
363
363
 
364
364
  // src/intent_hints.ts
365
365
  function validateLoopInputIntentHint(hint) {
366
366
  const key = hint.trim().toLowerCase();
367
- if (key === "direct_llm" || key === "quiz") {
367
+ if (key in REMOVED_INTENT_HINT_MESSAGES) {
368
368
  return REMOVED_INTENT_HINT_MESSAGES[key];
369
369
  }
370
370
  return null;
@@ -377,16 +377,17 @@ var init_intent_hints = __esm({
377
377
  INTENT_HINT_IMAGE_TO_TEXT = "image_to_text";
378
378
  INTENT_HINT_OCR = "ocr";
379
379
  INTENT_HINT_EMBED = "embed";
380
- REMOVED_INTENT_HINTS = ["direct_llm", "quiz"];
380
+ REMOVED_INTENT_HINTS = ["direct_llm", "quiz", "direct_model"];
381
381
  REMOVED_INTENT_HINT_MESSAGES = {
382
382
  direct_llm: "intent_hint direct_llm is removed; use text_completion (text-only) or image_to_text (with attachments)",
383
- quiz: "intent_hint quiz is removed; omit intent_hint and let intake classify the turn"
383
+ quiz: "intent_hint quiz is removed; omit intent_hint and let intake classify the turn",
384
+ direct_model: "intent_hint direct_model is removed; use text_completion, image_to_text, ocr, or embed"
384
385
  };
385
386
  LOOP_ASSISTANT_OUTPUT_PHASES = [
386
387
  "goal_completion",
387
388
  "quiz",
388
389
  "autonomous_goal",
389
- "direct_model",
390
+ "chitchat",
390
391
  "text_completion",
391
392
  "image_to_text",
392
393
  "ocr",
@@ -396,7 +397,7 @@ var init_intent_hints = __esm({
396
397
  DEFAULT_DELIVERABLE_PHASES = /* @__PURE__ */ new Set([
397
398
  "quiz",
398
399
  "goal_completion",
399
- "direct_model",
400
+ "chitchat",
400
401
  "text_completion",
401
402
  "image_to_text",
402
403
  "ocr",
@@ -484,19 +485,22 @@ function isSubagentProgressEvent(eventType) {
484
485
  }
485
486
  return parsed.action === "started" || parsed.action === "completed";
486
487
  }
487
- var EventPlanCreated, EventExploreStarted, EventExploreMilestone, EventExploreStepCompleted, EventExploreCompleted, EventTacitusStarted, EventTacitusGatherSummary, EventTacitusCompleted, EventReplayComplete, EventLoopReattachedWire, EventCardReplayBegin, EventCardCreated, EventCardReplayEnd, EventToolStarted, EventToolCompleted, EventToolError, EventStreamToolCallUpdate, EventToolCallUpdatesBatch, EventStrangeLoopStarted, EventStrangeLoopCompleted, EventStrangeLoopPlanDecision, EventStrangeLoopReasoned, EventStrangeLoopStepStarted, EventStrangeLoopStepQueued, EventStrangeLoopStepCompleted, EventStrangeLoopContextCompacted, EventMessageReceived, EventMessageSent, EventFinalReport, EventAutopilotGoalStatus, EventAutopilotGoalProgress, EventAutopilotGoalCreated, EventAutopilotGoalCompleted, EventAutopilotWorkerAssigned, EventAutopilotWorkerUnassigned, EventGeneralFailed;
488
+ var EventPlanCreated, EventExplorerStarted, EventExplorerMilestone, EventExplorerStepCompleted, EventExplorerCompleted, EventDeepResearchStarted, EventDeepResearchProgress, EventDeepResearchStepCompleted, EventDeepResearchGatherSummary, EventDeepResearchCrawlSummary, EventDeepResearchCompleted, EventReplayComplete, EventLoopReattachedWire, EventCardReplayBegin, EventCardCreated, EventCardReplayEnd, EventToolStarted, EventToolCompleted, EventToolError, EventStreamToolCallUpdate, EventToolCallUpdatesBatch, EventStrangeLoopStarted, EventStrangeLoopCompleted, EventStrangeLoopPlanDecision, EventStrangeLoopReasoned, EventStrangeLoopStepStarted, EventStrangeLoopStepQueued, EventStrangeLoopStepCompleted, EventStrangeLoopContextCompacted, EventMessageReceived, EventMessageSent, EventFinalReport, EventAutopilotGoalStatus, EventAutopilotGoalProgress, EventAutopilotGoalCreated, EventAutopilotGoalCompleted, EventAutopilotWorkerAssigned, EventAutopilotWorkerUnassigned, EventGeneralFailed;
488
489
  var init_events = __esm({
489
490
  "src/events.ts"() {
490
491
  "use strict";
491
492
  init_verbosity();
492
493
  EventPlanCreated = "soothe.cognition.plan.created";
493
- EventExploreStarted = "soothe.subagent.explore.started";
494
- EventExploreMilestone = "soothe.subagent.explore.milestone";
495
- EventExploreStepCompleted = "soothe.subagent.explore.step.completed";
496
- EventExploreCompleted = "soothe.subagent.explore.completed";
497
- EventTacitusStarted = "soothe.subagent.tacitus.started";
498
- EventTacitusGatherSummary = "soothe.subagent.tacitus.gather.summary";
499
- EventTacitusCompleted = "soothe.subagent.tacitus.completed";
494
+ EventExplorerStarted = "soothe.subagent.explorer.started";
495
+ EventExplorerMilestone = "soothe.subagent.explorer.milestone";
496
+ EventExplorerStepCompleted = "soothe.subagent.explorer.step.completed";
497
+ EventExplorerCompleted = "soothe.subagent.explorer.completed";
498
+ EventDeepResearchStarted = "soothe.subagent.deep_research.started";
499
+ EventDeepResearchProgress = "soothe.subagent.deep_research.progress";
500
+ EventDeepResearchStepCompleted = "soothe.subagent.deep_research.step.completed";
501
+ EventDeepResearchGatherSummary = "soothe.subagent.deep_research.gather.summary";
502
+ EventDeepResearchCrawlSummary = "soothe.subagent.deep_research.crawl.summary";
503
+ EventDeepResearchCompleted = "soothe.subagent.deep_research.completed";
500
504
  EventReplayComplete = "replay_complete";
501
505
  EventLoopReattachedWire = "loop_reattached";
502
506
  EventCardReplayBegin = "card.replay_begin";
@@ -2020,10 +2024,16 @@ __export(index_exports, {
2020
2024
  EventCardReplayBegin: () => EventCardReplayBegin,
2021
2025
  EventCardReplayEnd: () => EventCardReplayEnd,
2022
2026
  EventClassifier: () => EventClassifier,
2023
- EventExploreCompleted: () => EventExploreCompleted,
2024
- EventExploreMilestone: () => EventExploreMilestone,
2025
- EventExploreStarted: () => EventExploreStarted,
2026
- EventExploreStepCompleted: () => EventExploreStepCompleted,
2027
+ EventDeepResearchCompleted: () => EventDeepResearchCompleted,
2028
+ EventDeepResearchCrawlSummary: () => EventDeepResearchCrawlSummary,
2029
+ EventDeepResearchGatherSummary: () => EventDeepResearchGatherSummary,
2030
+ EventDeepResearchProgress: () => EventDeepResearchProgress,
2031
+ EventDeepResearchStarted: () => EventDeepResearchStarted,
2032
+ EventDeepResearchStepCompleted: () => EventDeepResearchStepCompleted,
2033
+ EventExplorerCompleted: () => EventExplorerCompleted,
2034
+ EventExplorerMilestone: () => EventExplorerMilestone,
2035
+ EventExplorerStarted: () => EventExplorerStarted,
2036
+ EventExplorerStepCompleted: () => EventExplorerStepCompleted,
2027
2037
  EventFinalReport: () => EventFinalReport,
2028
2038
  EventGeneralFailed: () => EventGeneralFailed,
2029
2039
  EventLoopReattachedWire: () => EventLoopReattachedWire,
@@ -2040,9 +2050,6 @@ __export(index_exports, {
2040
2050
  EventStrangeLoopStepQueued: () => EventStrangeLoopStepQueued,
2041
2051
  EventStrangeLoopStepStarted: () => EventStrangeLoopStepStarted,
2042
2052
  EventStreamToolCallUpdate: () => EventStreamToolCallUpdate,
2043
- EventTacitusCompleted: () => EventTacitusCompleted,
2044
- EventTacitusGatherSummary: () => EventTacitusGatherSummary,
2045
- EventTacitusStarted: () => EventTacitusStarted,
2046
2053
  EventToolCallUpdatesBatch: () => EventToolCallUpdatesBatch,
2047
2054
  EventToolCompleted: () => EventToolCompleted,
2048
2055
  EventToolError: () => EventToolError,
@@ -2929,9 +2936,9 @@ var EventClassifier = class {
2929
2936
  return this.continueResult(content);
2930
2937
  }
2931
2938
  }
2932
- const [directContent, directOk] = this.messagesModeAssistantContent(data);
2933
- if (directOk && this.isSubstantiveAssistantReply(directContent)) {
2934
- return this.deliverableResult(directContent, "soothe.protocol.message.direct_model");
2939
+ const [unphasedContent, unphasedOk] = this.messagesModeAssistantContent(data);
2940
+ if (unphasedOk) {
2941
+ return this.continueResult(unphasedContent);
2935
2942
  }
2936
2943
  if (hasPayload && rawContent) {
2937
2944
  if (isTerminalMessageType(msgType) || msgType === "") {
@@ -2946,8 +2953,8 @@ var EventClassifier = class {
2946
2953
  }
2947
2954
  /**
2948
2955
  * Extracts plain assistant text from mode="messages" events that carry a
2949
- * terminal AIMessage without loop-tagged phase metadata (legacy direct_llm turns
2950
- * before phase tagging; prefer deliverablePhases including text_completion).
2956
+ * terminal AIMessage without loop-tagged phase metadata (prefer named
2957
+ * deliverablePhases such as text_completion).
2951
2958
  */
2952
2959
  messagesModeAssistantContent(data) {
2953
2960
  if (!Array.isArray(data) || data.length === 0) return ["", false];
@@ -4257,10 +4264,16 @@ var DaemonSession = class {
4257
4264
  EventCardReplayBegin,
4258
4265
  EventCardReplayEnd,
4259
4266
  EventClassifier,
4260
- EventExploreCompleted,
4261
- EventExploreMilestone,
4262
- EventExploreStarted,
4263
- EventExploreStepCompleted,
4267
+ EventDeepResearchCompleted,
4268
+ EventDeepResearchCrawlSummary,
4269
+ EventDeepResearchGatherSummary,
4270
+ EventDeepResearchProgress,
4271
+ EventDeepResearchStarted,
4272
+ EventDeepResearchStepCompleted,
4273
+ EventExplorerCompleted,
4274
+ EventExplorerMilestone,
4275
+ EventExplorerStarted,
4276
+ EventExplorerStepCompleted,
4264
4277
  EventFinalReport,
4265
4278
  EventGeneralFailed,
4266
4279
  EventLoopReattachedWire,
@@ -4277,9 +4290,6 @@ var DaemonSession = class {
4277
4290
  EventStrangeLoopStepQueued,
4278
4291
  EventStrangeLoopStepStarted,
4279
4292
  EventStreamToolCallUpdate,
4280
- EventTacitusCompleted,
4281
- EventTacitusGatherSummary,
4282
- EventTacitusStarted,
4283
4293
  EventToolCallUpdatesBatch,
4284
4294
  EventToolCompleted,
4285
4295
  EventToolError,