@kmmao/happy-wire 0.11.9 → 0.11.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.cjs CHANGED
@@ -1523,7 +1523,14 @@ const sessionProgressListSchema = z__namespace.object({
1523
1523
  * resolve these against the session message stream to render per-list
1524
1524
  * file change summaries without duplicating diff content into metadata.
1525
1525
  */
1526
- toolCallIds: z__namespace.array(z__namespace.string()).optional()
1526
+ toolCallIds: z__namespace.array(z__namespace.string()).optional(),
1527
+ /**
1528
+ * Timestamp at which an auto-summary was triggered for this list's
1529
+ * completion (all todos completed → all completed transition). Dedup flag
1530
+ * so the CLI hook only fires ONE synthetic summary-trigger message per
1531
+ * list lifecycle, even if subsequent TodoWrite calls keep it all done.
1532
+ */
1533
+ summaryGeneratedAt: z__namespace.number().optional()
1527
1534
  });
1528
1535
  const sessionProgressStateSchema = z__namespace.object({
1529
1536
  /** Ordered by startedAt asc; last item is typically the active one. */
@@ -1548,6 +1555,169 @@ const sessionSummaryStateSchema = z__namespace.object({
1548
1555
  updatedAt: z__namespace.number()
1549
1556
  });
1550
1557
 
1558
+ const HAPPY_MCP_TOOL_NAMES = [
1559
+ "change_title",
1560
+ "query_project_knowledge",
1561
+ "update_progress",
1562
+ "update_session_summary"
1563
+ ];
1564
+ const HAPPY_MCP_TOOL_SPECS = {
1565
+ change_title: {
1566
+ title: "Change Title",
1567
+ description: 'Set or update the chat session title. Titles should be short (under 50 chars) and action-oriented, e.g. "Fix auth token refresh".',
1568
+ failureLabel: "Failed to change chat title",
1569
+ inputSchema: {
1570
+ title: z.z.string().describe("The new title for the chat session")
1571
+ },
1572
+ hideSuccessfulCall: true,
1573
+ autoApproveByDefault: true,
1574
+ permissionAction: "Waiting for approval to update chat title",
1575
+ dynamicAction: "Updating chat title",
1576
+ fallbackAction: "Update chat title",
1577
+ reasonPhrases: ["title update", "title updates", "change_title"]
1578
+ },
1579
+ query_project_knowledge: {
1580
+ title: "Project Knowledge",
1581
+ description: "Search the project knowledge base for relevant context, past decisions, known pitfalls, and conventions.",
1582
+ failureLabel: "Knowledge query failed",
1583
+ inputSchema: {
1584
+ query: z.z.string().describe("Search query describing what you want to know")
1585
+ },
1586
+ hideSuccessfulCall: false,
1587
+ autoApproveByDefault: false,
1588
+ permissionAction: "Waiting for approval to search project knowledge",
1589
+ dynamicAction: "Searching project knowledge",
1590
+ fallbackAction: "Search project knowledge",
1591
+ reasonPhrases: []
1592
+ },
1593
+ update_progress: {
1594
+ title: "Update Progress",
1595
+ description: 'Optional override for the App\'s Progress tab. In most cases your TodoWrite calls are auto-mirrored, so you do NOT need to call this. Use it only when you want to set extra fields the CLI hook does not capture (currentStage, blockers) or to force a new list boundary with `listId: "new"`.',
1596
+ failureLabel: "Failed to update progress",
1597
+ inputSchema: {
1598
+ todos: z.z.array(
1599
+ z.z.object({
1600
+ content: z.z.string().describe("Concise description of the task"),
1601
+ status: z.z.enum(["pending", "in_progress", "completed"]).describe("Current status of the task"),
1602
+ activeForm: z.z.string().optional().describe(
1603
+ "Imperative-present form shown when status is in_progress"
1604
+ ),
1605
+ stage: z.z.string().optional().describe("Optional phase/stage label")
1606
+ })
1607
+ ).describe("The full checklist \u2014 always send every item, not a delta"),
1608
+ currentStage: z.z.string().optional().describe("Optional overall stage name for the checklist"),
1609
+ blockers: z.z.array(z.z.string()).optional().describe("Optional list of things blocking progress"),
1610
+ listId: z.z.string().optional().describe("Target list id. Use 'new' to force a fresh list"),
1611
+ label: z.z.string().optional().describe("Short human-readable name for this task list")
1612
+ },
1613
+ hideSuccessfulCall: false,
1614
+ autoApproveByDefault: true,
1615
+ permissionAction: "Waiting for approval to update progress",
1616
+ dynamicAction: "Updating progress",
1617
+ fallbackAction: "Update progress",
1618
+ reasonPhrases: ["progress update", "progress updates", "update_progress"]
1619
+ },
1620
+ update_session_summary: {
1621
+ title: "Update Session Summary",
1622
+ description: "Write a narrative session summary the App shows above the progress checklist. Call at milestones, not per task: after first understanding the goal, when scope shifts significantly, when key decisions are made, or when moving to a new phase. Full rewrite each call.",
1623
+ failureLabel: "Failed to update session summary",
1624
+ inputSchema: {
1625
+ goal: z.z.string().describe("What the user ultimately wants to accomplish"),
1626
+ currentFocus: z.z.string().optional().describe("Brief description of the active task or phase"),
1627
+ keyDecisions: z.z.array(z.z.string()).optional().describe("Important choices already made this session"),
1628
+ openQuestions: z.z.array(z.z.string()).optional().describe("Unresolved questions or pending decisions"),
1629
+ impactScope: z.z.array(z.z.string()).optional().describe("Modules/files/areas affected by this session's work")
1630
+ },
1631
+ hideSuccessfulCall: false,
1632
+ autoApproveByDefault: true,
1633
+ permissionAction: "Waiting for approval to update session summary",
1634
+ dynamicAction: "Updating session summary",
1635
+ fallbackAction: "Update session summary",
1636
+ reasonPhrases: [
1637
+ "session summary",
1638
+ "update_session_summary",
1639
+ "summary update"
1640
+ ]
1641
+ }
1642
+ };
1643
+ const HAPPY_MCP_TOOL_NAME_SET = new Set(HAPPY_MCP_TOOL_NAMES);
1644
+ const HAPPY_MCP_AUTO_APPROVE_TOOL_NAMES = HAPPY_MCP_TOOL_NAMES.filter(
1645
+ (toolName) => HAPPY_MCP_TOOL_SPECS[toolName].autoApproveByDefault
1646
+ );
1647
+ const HAPPY_MCP_SILENT_SUCCESS_TOOL_NAMES = HAPPY_MCP_TOOL_NAMES.filter(
1648
+ (toolName) => HAPPY_MCP_TOOL_SPECS[toolName].hideSuccessfulCall
1649
+ );
1650
+ function getHappyMcpToolAliases(toolName) {
1651
+ return [
1652
+ toolName,
1653
+ `happy__${toolName}`,
1654
+ `mcp__happy__${toolName}`
1655
+ ];
1656
+ }
1657
+ function normalizeHappyMcpToolName(toolName) {
1658
+ if (typeof toolName !== "string") {
1659
+ return null;
1660
+ }
1661
+ const trimmed = toolName.trim();
1662
+ if (!trimmed) {
1663
+ return null;
1664
+ }
1665
+ if (HAPPY_MCP_TOOL_NAME_SET.has(trimmed)) {
1666
+ return trimmed;
1667
+ }
1668
+ const withoutNamespace = trimmed.startsWith("mcp__happy__") ? trimmed.slice("mcp__happy__".length) : trimmed.startsWith("happy__") ? trimmed.slice("happy__".length) : null;
1669
+ if (withoutNamespace && HAPPY_MCP_TOOL_NAME_SET.has(withoutNamespace)) {
1670
+ return withoutNamespace;
1671
+ }
1672
+ return null;
1673
+ }
1674
+ function isHappyMcpToolName(toolName) {
1675
+ return normalizeHappyMcpToolName(toolName) !== null;
1676
+ }
1677
+ function isHappyMcpToolAlias(toolName, canonicalToolName) {
1678
+ return normalizeHappyMcpToolName(toolName) === canonicalToolName;
1679
+ }
1680
+ function getHappyMcpToolTitle(toolName) {
1681
+ const canonical = normalizeHappyMcpToolName(toolName);
1682
+ return canonical ? HAPPY_MCP_TOOL_SPECS[canonical].title : null;
1683
+ }
1684
+ function getHappyMcpToolAction(toolName, mode) {
1685
+ const canonical = normalizeHappyMcpToolName(toolName);
1686
+ if (!canonical) {
1687
+ return null;
1688
+ }
1689
+ const spec = HAPPY_MCP_TOOL_SPECS[canonical];
1690
+ if (mode === "permission") {
1691
+ return spec.permissionAction;
1692
+ }
1693
+ if (mode === "dynamic") {
1694
+ return spec.dynamicAction;
1695
+ }
1696
+ return spec.fallbackAction;
1697
+ }
1698
+ function shouldHideSuccessfulHappyMcpTool(toolName) {
1699
+ const canonical = normalizeHappyMcpToolName(toolName);
1700
+ return canonical ? HAPPY_MCP_TOOL_SPECS[canonical].hideSuccessfulCall : false;
1701
+ }
1702
+ function shouldAutoApproveHappyMcpToolName(toolName) {
1703
+ const canonical = normalizeHappyMcpToolName(toolName);
1704
+ return canonical ? HAPPY_MCP_TOOL_SPECS[canonical].autoApproveByDefault : false;
1705
+ }
1706
+ function shouldAutoApproveHappyMcpReason(reason) {
1707
+ if (typeof reason !== "string") {
1708
+ return false;
1709
+ }
1710
+ const normalizedReason = reason.toLowerCase();
1711
+ if (!normalizedReason.includes("happy")) {
1712
+ return false;
1713
+ }
1714
+ return HAPPY_MCP_AUTO_APPROVE_TOOL_NAMES.some(
1715
+ (toolName) => HAPPY_MCP_TOOL_SPECS[toolName].reasonPhrases.some(
1716
+ (phrase) => normalizedReason.includes(phrase)
1717
+ )
1718
+ );
1719
+ }
1720
+
1551
1721
  exports.AGENT_MSG_PRIORITIES = AGENT_MSG_PRIORITIES;
1552
1722
  exports.AGENT_MSG_STATUSES = AGENT_MSG_STATUSES;
1553
1723
  exports.AGENT_MSG_TYPES = AGENT_MSG_TYPES;
@@ -1593,6 +1763,10 @@ exports.DaemonStateSchema = DaemonStateSchema;
1593
1763
  exports.DefaultPermissionModeSchema = DefaultPermissionModeSchema;
1594
1764
  exports.EVIDENCE_KINDS = EVIDENCE_KINDS;
1595
1765
  exports.EnvironmentVariableSchema = EnvironmentVariableSchema;
1766
+ exports.HAPPY_MCP_AUTO_APPROVE_TOOL_NAMES = HAPPY_MCP_AUTO_APPROVE_TOOL_NAMES;
1767
+ exports.HAPPY_MCP_SILENT_SUCCESS_TOOL_NAMES = HAPPY_MCP_SILENT_SUCCESS_TOOL_NAMES;
1768
+ exports.HAPPY_MCP_TOOL_NAMES = HAPPY_MCP_TOOL_NAMES;
1769
+ exports.HAPPY_MCP_TOOL_SPECS = HAPPY_MCP_TOOL_SPECS;
1596
1770
  exports.InboxCategorySchema = InboxCategorySchema;
1597
1771
  exports.InboxItemSummarySchema = InboxItemSummarySchema;
1598
1772
  exports.InboxNewItemSchema = InboxNewItemSchema;
@@ -1680,9 +1854,15 @@ exports.WorldAutonomyPolicySchema = WorldAutonomyPolicySchema;
1680
1854
  exports.WorldSuggestionUpdatedSchema = WorldSuggestionUpdatedSchema;
1681
1855
  exports.createEnvelope = createEnvelope;
1682
1856
  exports.createResolvedRuntimeProfile = createResolvedRuntimeProfile;
1857
+ exports.getHappyMcpToolAction = getHappyMcpToolAction;
1858
+ exports.getHappyMcpToolAliases = getHappyMcpToolAliases;
1859
+ exports.getHappyMcpToolTitle = getHappyMcpToolTitle;
1683
1860
  exports.getProfileEnvironmentVariables = getProfileEnvironmentVariables;
1684
1861
  exports.getSuggestionPayloadSchema = getSuggestionPayloadSchema;
1862
+ exports.isHappyMcpToolAlias = isHappyMcpToolAlias;
1863
+ exports.isHappyMcpToolName = isHappyMcpToolName;
1685
1864
  exports.isTrustedRuntimeProfile = isTrustedRuntimeProfile;
1865
+ exports.normalizeHappyMcpToolName = normalizeHappyMcpToolName;
1686
1866
  exports.normalizeResolvedRuntimeProfile = normalizeResolvedRuntimeProfile;
1687
1867
  exports.sessionContextUsageCategorySchema = sessionContextUsageCategorySchema;
1688
1868
  exports.sessionContextUsageEventSchema = sessionContextUsageEventSchema;
@@ -1715,6 +1895,9 @@ exports.sessionTurnEndEventSchema = sessionTurnEndEventSchema;
1715
1895
  exports.sessionTurnEndStatusSchema = sessionTurnEndStatusSchema;
1716
1896
  exports.sessionTurnStartEventSchema = sessionTurnStartEventSchema;
1717
1897
  exports.sessionUsageUpdateEventSchema = sessionUsageUpdateEventSchema;
1898
+ exports.shouldAutoApproveHappyMcpReason = shouldAutoApproveHappyMcpReason;
1899
+ exports.shouldAutoApproveHappyMcpToolName = shouldAutoApproveHappyMcpToolName;
1900
+ exports.shouldHideSuccessfulHappyMcpTool = shouldHideSuccessfulHappyMcpTool;
1718
1901
  exports.terminalCloseRequestSchema = terminalCloseRequestSchema;
1719
1902
  exports.terminalExitPayloadSchema = terminalExitPayloadSchema;
1720
1903
  exports.terminalInputPayloadSchema = terminalInputPayloadSchema;
package/dist/index.d.cts CHANGED
@@ -1534,8 +1534,8 @@ declare const AutomationPrioritySchema: z.ZodEnum<{
1534
1534
  }>;
1535
1535
  type AutomationPriority = z.infer<typeof AutomationPrioritySchema>;
1536
1536
  declare const AutomationJobKindSchema: z.ZodEnum<{
1537
- webhook: "webhook";
1538
1537
  supervisor: "supervisor";
1538
+ webhook: "webhook";
1539
1539
  agent_loop: "agent_loop";
1540
1540
  task: "task";
1541
1541
  }>;
@@ -1552,8 +1552,8 @@ type AutomationJobStatus = z.infer<typeof AutomationJobStatusSchema>;
1552
1552
  declare const AutomationJobSummarySchema: z.ZodObject<{
1553
1553
  id: z.ZodString;
1554
1554
  kind: z.ZodEnum<{
1555
- webhook: "webhook";
1556
1555
  supervisor: "supervisor";
1556
+ webhook: "webhook";
1557
1557
  agent_loop: "agent_loop";
1558
1558
  task: "task";
1559
1559
  }>;
@@ -1715,8 +1715,8 @@ declare const AutomationStateSchema: z.ZodObject<{
1715
1715
  recentJobs: z.ZodArray<z.ZodObject<{
1716
1716
  id: z.ZodString;
1717
1717
  kind: z.ZodEnum<{
1718
- webhook: "webhook";
1719
1718
  supervisor: "supervisor";
1719
+ webhook: "webhook";
1720
1720
  agent_loop: "agent_loop";
1721
1721
  task: "task";
1722
1722
  }>;
@@ -1942,8 +1942,8 @@ declare const DaemonStateSchema: z.ZodObject<{
1942
1942
  recentJobs: z.ZodArray<z.ZodObject<{
1943
1943
  id: z.ZodString;
1944
1944
  kind: z.ZodEnum<{
1945
- webhook: "webhook";
1946
1945
  supervisor: "supervisor";
1946
+ webhook: "webhook";
1947
1947
  agent_loop: "agent_loop";
1948
1948
  task: "task";
1949
1949
  }>;
@@ -2102,8 +2102,8 @@ declare const KnowledgeEntryTypeSchema: z.ZodEnum<{
2102
2102
  }>;
2103
2103
  type KnowledgeEntryType = z.infer<typeof KnowledgeEntryTypeSchema>;
2104
2104
  declare const KnowledgeContributorTypeSchema: z.ZodEnum<{
2105
- session: "session";
2106
2105
  user: "user";
2106
+ session: "session";
2107
2107
  supervisor: "supervisor";
2108
2108
  }>;
2109
2109
  type KnowledgeContributorType = z.infer<typeof KnowledgeContributorTypeSchema>;
@@ -2116,8 +2116,8 @@ declare const KnowledgeActionSchema: z.ZodEnum<{
2116
2116
  type KnowledgeAction = z.infer<typeof KnowledgeActionSchema>;
2117
2117
  declare const KnowledgeStatusSchema: z.ZodEnum<{
2118
2118
  active: "active";
2119
- superseded: "superseded";
2120
2119
  archived: "archived";
2120
+ superseded: "superseded";
2121
2121
  }>;
2122
2122
  type KnowledgeStatus = z.infer<typeof KnowledgeStatusSchema>;
2123
2123
  declare const KnowledgeConfidenceSchema: z.ZodEnum<{
@@ -2135,8 +2135,8 @@ declare const CreateKnowledgeEntryBodySchema: z.ZodObject<{
2135
2135
  warning: "warning";
2136
2136
  }>;
2137
2137
  contributorType: z.ZodEnum<{
2138
- session: "session";
2139
2138
  user: "user";
2139
+ session: "session";
2140
2140
  supervisor: "supervisor";
2141
2141
  }>;
2142
2142
  action: z.ZodEnum<{
@@ -2168,8 +2168,8 @@ type CreateKnowledgeEntryBody = z.infer<typeof CreateKnowledgeEntryBodySchema>;
2168
2168
  declare const UpdateKnowledgeEntryBodySchema: z.ZodObject<{
2169
2169
  status: z.ZodOptional<z.ZodEnum<{
2170
2170
  active: "active";
2171
- superseded: "superseded";
2172
2171
  archived: "archived";
2172
+ superseded: "superseded";
2173
2173
  }>>;
2174
2174
  pinned: z.ZodOptional<z.ZodBoolean>;
2175
2175
  title: z.ZodOptional<z.ZodString>;
@@ -2192,8 +2192,8 @@ declare const QueryKnowledgeParamsSchema: z.ZodObject<{
2192
2192
  }>>;
2193
2193
  status: z.ZodOptional<z.ZodEnum<{
2194
2194
  active: "active";
2195
- superseded: "superseded";
2196
2195
  archived: "archived";
2196
+ superseded: "superseded";
2197
2197
  }>>;
2198
2198
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
2199
2199
  search: z.ZodOptional<z.ZodString>;
@@ -2281,8 +2281,8 @@ declare const KnowledgeChainEntrySchema: z.ZodObject<{
2281
2281
  }>;
2282
2282
  status: z.ZodEnum<{
2283
2283
  active: "active";
2284
- superseded: "superseded";
2285
2284
  archived: "archived";
2285
+ superseded: "superseded";
2286
2286
  }>;
2287
2287
  title: z.ZodString;
2288
2288
  content: z.ZodString;
@@ -2314,8 +2314,8 @@ declare const KnowledgeChainResponseSchema: z.ZodObject<{
2314
2314
  }>;
2315
2315
  status: z.ZodEnum<{
2316
2316
  active: "active";
2317
- superseded: "superseded";
2318
2317
  archived: "archived";
2318
+ superseded: "superseded";
2319
2319
  }>;
2320
2320
  title: z.ZodString;
2321
2321
  content: z.ZodString;
@@ -2461,9 +2461,9 @@ declare const TaskStatusSchema: z.ZodEnum<{
2461
2461
  }>;
2462
2462
  type TaskStatus = z.infer<typeof TaskStatusSchema>;
2463
2463
  declare const TaskTriggerTypeSchema: z.ZodEnum<{
2464
+ webhook: "webhook";
2464
2465
  manual: "manual";
2465
2466
  cron: "cron";
2466
- webhook: "webhook";
2467
2467
  }>;
2468
2468
  type TaskTriggerType = z.infer<typeof TaskTriggerTypeSchema>;
2469
2469
  declare const TaskSummarySchema: z.ZodObject<{
@@ -2484,9 +2484,9 @@ declare const TaskSummarySchema: z.ZodObject<{
2484
2484
  dispatching: "dispatching";
2485
2485
  }>;
2486
2486
  triggerType: z.ZodEnum<{
2487
+ webhook: "webhook";
2487
2488
  manual: "manual";
2488
2489
  cron: "cron";
2489
- webhook: "webhook";
2490
2490
  }>;
2491
2491
  triggerRef: z.ZodOptional<z.ZodString>;
2492
2492
  attempt: z.ZodNumber;
@@ -2850,8 +2850,8 @@ declare const EVIDENCE_KINDS: readonly ["goal", "task", "decision", "message", "
2850
2850
  declare const SuggestionEvidenceSchema: z$1.ZodObject<{
2851
2851
  kind: z$1.ZodEnum<{
2852
2852
  message: "message";
2853
- decision: "decision";
2854
2853
  task: "task";
2854
+ decision: "decision";
2855
2855
  goal: "goal";
2856
2856
  narrative: "narrative";
2857
2857
  }>;
@@ -3489,6 +3489,7 @@ declare const sessionProgressListSchema: z.ZodObject<{
3489
3489
  updatedAt: z.ZodNumber;
3490
3490
  archivedAt: z.ZodOptional<z.ZodNumber>;
3491
3491
  toolCallIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
3492
+ summaryGeneratedAt: z.ZodOptional<z.ZodNumber>;
3492
3493
  }, z.core.$strip>;
3493
3494
  type SessionProgressList = z.infer<typeof sessionProgressListSchema>;
3494
3495
  /**
@@ -3520,6 +3521,7 @@ declare const sessionProgressStateSchema: z.ZodObject<{
3520
3521
  updatedAt: z.ZodNumber;
3521
3522
  archivedAt: z.ZodOptional<z.ZodNumber>;
3522
3523
  toolCallIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
3524
+ summaryGeneratedAt: z.ZodOptional<z.ZodNumber>;
3523
3525
  }, z.core.$strip>>>;
3524
3526
  currentListId: z.ZodOptional<z.ZodString>;
3525
3527
  todos: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -3552,5 +3554,33 @@ declare const sessionSummaryStateSchema: z.ZodObject<{
3552
3554
  }, z.core.$strip>;
3553
3555
  type SessionSummaryState = z.infer<typeof sessionSummaryStateSchema>;
3554
3556
 
3555
- export { AGENT_MSG_PRIORITIES, AGENT_MSG_STATUSES, AGENT_MSG_TYPES, AIBackendProfileSchema, AcceptBodySchema, AgentLoopSummarySchema, AgentMessageSchema, AgentMessageSummarySchema, AgentMsgTypeSchema, AnthropicConfigSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, AutoDreamProfileSummarySchema, AutomationAuditEventSummarySchema, AutomationAuditStatsSchema, AutomationCountsSchema, AutomationGuardianSummarySchema, AutomationGuardianUsageSummarySchema, AutomationJobKindSchema, AutomationJobStatusSchema, AutomationJobSummarySchema, AutomationPrioritySchema, AutomationStateSchema, AutonomyStatsRecentActionSchema, AutonomyStatsSchema, AzureOpenAIConfigSchema, BUILT_IN_AI_BACKEND_PROFILE_IDS, BootstrapProfileSummarySchema, BriefMessageSchema, BuiltInAIBackendProfileIdSchema, CodexConfigSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, CreateKnowledgeEntryBodySchema, CreateSkillBodySchema, CreateTaskBodySchema, CrossProjectSearchResponseSchema, CrossProjectSearchResultSchema, CustomModelSchema, DaemonStateSchema, DefaultPermissionModeSchema, EVIDENCE_KINDS, EnvironmentVariableSchema, InboxCategorySchema, InboxItemSummarySchema, InboxNewItemSchema, InboxSeveritySchema, InboxUnreadCountSchema, KnowledgeActionSchema, KnowledgeChainEntrySchema, KnowledgeChainRelationSchema, KnowledgeChainResponseSchema, KnowledgeConfidenceSchema, KnowledgeContributorTypeSchema, KnowledgeEntryTypeSchema, KnowledgeInjectionModeSchema, KnowledgeInjectionRequestSchema, KnowledgeInjectionResponseSchema, KnowledgeStatusSchema, LegacyMessageContentSchema, MachineMetadataSchema, MessageContentSchema, MessageMetaSchema, OpenAIConfigSchema, ProfileCompatibilitySchema, ProjectProfileSchema, QueryKnowledgeParamsSchema, RESOLVED_RUNTIME_PROFILE_SCHEMA_VERSION, ResolvedRuntimeProfileSchema, RuntimeProfileSourceSchema, RuntimeProfileTrustSchema, SUGGESTION_ACCEPT_AUDIT_RULES, SUGGESTION_ACCEPT_SOURCES, SUGGESTION_AUTO_ACCEPT_FAILURE_DETAILS, SUGGESTION_AUTO_ACCEPT_REASON_CODES, SUGGESTION_AUTO_ACCEPT_STATUSES, SUGGESTION_BUCKETS, SUGGESTION_STATUSES, SUGGESTION_TYPES, SUPERVISOR_MODES, SessionEventCreatedSchema, SessionEventReportSchema, SessionEventSummarySchema, SessionEventTypeSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, SkillContentSchema, SkillSummarySchema, SuggestionAcceptAuditSchema, SuggestionDecisionPayloadSchema, SuggestionEvidenceSchema, SuggestionGoalPayloadSchema, SuggestionPayloadSchema, SuggestionSkillPayloadSchema, SuggestionTaskPayloadSchema, TailscaleInfoSchema, TailscaleServeEntrySchema, TaskOutcomeSchema, TaskPrioritySchema, TaskStatusChangedSchema, TaskStatusReportSchema, TaskStatusSchema, TaskSummarySchema, TaskTriggerDataSchema, TaskTriggerTypeSchema, TmuxConfigSchema, TogetherAIConfigSchema, TunnelEntrySchema, TunnelProviderInfoSchema, TunnelStateSchema, TurnKnowledgeExtractionSchema, UpdateBodySchema, UpdateKnowledgeEntryBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UpdateSkillBodySchema, UserMessageSchema, VersionedEncryptedValueSchema, VersionedMachineEncryptedValueSchema, VersionedNullableEncryptedValueSchema, VoiceTokenAllowedSchema, VoiceTokenDeniedSchema, VoiceTokenResponseSchema, WorldAutonomyPolicySchema, WorldSuggestionUpdatedSchema, createEnvelope, createResolvedRuntimeProfile, getProfileEnvironmentVariables, getSuggestionPayloadSchema, isTrustedRuntimeProfile, normalizeResolvedRuntimeProfile, sessionContextUsageCategorySchema, sessionContextUsageEventSchema, sessionEnvelopeSchema, sessionEventSchema, sessionFileEventSchema, sessionModelUsageSchema, sessionNeedsContinueEventSchema, sessionProgressListSchema, sessionProgressStateSchema, sessionProgressTodoSchema, sessionProgressTodoStatusSchema, sessionPromptSuggestionEventSchema, sessionRoleSchema, sessionServiceMessageEventSchema, sessionStartEventSchema, sessionStateChangedEventSchema, sessionStopEventSchema, sessionSummaryStateSchema, sessionTaskEndEventSchema, sessionTaskLogEventSchema, sessionTaskProgressEventSchema, sessionTaskStartEventSchema, sessionTextDeltaEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionToolProgressEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema, terminalCloseRequestSchema, terminalExitPayloadSchema, terminalInputPayloadSchema, terminalOutputPayloadSchema, terminalResizeRequestSchema, terminalSpawnRequestSchema, terminalSpawnResponseSchema, validateProfileForAgent };
3556
- export type { AIBackendProfile, AcceptBody, AgentLoopSummary, AgentMessage, AgentMessageSummary, AgentMsgPriority, AgentMsgStatus, AgentMsgType, ApiMessage, ApiUpdateMachineState, ApiUpdateNewMessage, ApiUpdateSessionState, AutoDreamProfileSummary, AutomationAuditEventSummary, AutomationAuditStats, AutomationCounts, AutomationGuardianSummary, AutomationGuardianUsageSummary, AutomationJobKind, AutomationJobStatus, AutomationJobSummary, AutomationPriority, AutomationState, AutonomyStats, BootstrapProfileSummary, BriefMessage, BuiltInAIBackendProfileId, CoreUpdateBody, CoreUpdateContainer, CreateEnvelopeOptions, CreateKnowledgeEntryBody, CreateSkillBody, CreateTaskBody, CrossProjectSearchResponse, CrossProjectSearchResult, DaemonState, InboxCategory, InboxItemSummary, InboxNewItem, InboxSeverity, InboxUnreadCount, KnowledgeAction, KnowledgeChainEntry, KnowledgeChainRelation, KnowledgeChainResponse, KnowledgeConfidence, KnowledgeContributorType, KnowledgeEntryType, KnowledgeInjectionMode, KnowledgeInjectionRequest, KnowledgeInjectionResponse, KnowledgeStatus, LegacyMessageContent, MachineMetadata, MessageContent, MessageMeta, ProjectProfile, QueryKnowledgeParams, ResolvedRuntimeProfile, RuntimeProfileSource, RuntimeProfileTrust, SessionContextUsageEvent, SessionEnvelope, SessionEvent, SessionEventCreated, SessionEventReport, SessionEventSummary, SessionEventType, SessionMessage, SessionMessageContent, SessionModelUsage, SessionProgressList, SessionProgressState, SessionProgressTodo, SessionProgressTodoStatus, SessionProtocolMessage, SessionRole, SessionSummaryState, SessionTurnEndStatus, SkillContent, SkillSummary, SuggestionAcceptAudit, SuggestionAcceptAuditRule, SuggestionAcceptSource, SuggestionAutoAcceptFailureDetail, SuggestionAutoAcceptReasonCode, SuggestionAutoAcceptStatus, SuggestionBucket, SuggestionDecisionPayload, SuggestionEvidence, SuggestionGoalPayload, SuggestionPayload, SuggestionSerialized, SuggestionSkillPayload, SuggestionStatus, SuggestionSummary, SuggestionTaskPayload, SuggestionType, SupervisorMode, TailscaleInfo, TailscaleServeEntry, TaskOutcome, TaskPriority, TaskStatus, TaskStatusChanged, TaskStatusReport, TaskSummary, TaskTriggerData, TaskTriggerType, TerminalCloseRequest, TerminalExitPayload, TerminalInputPayload, TerminalOutputPayload, TerminalResizeRequest, TerminalSpawnRequest, TerminalSpawnResponse, TunnelEntry, TunnelProviderInfo, TunnelState, TurnKnowledgeExtraction, Update, UpdateBody, UpdateKnowledgeEntryBody, UpdateMachineBody, UpdateNewMessageBody, UpdateSessionBody, UpdateSkillBody, UserMessage, VersionedEncryptedValue, VersionedMachineEncryptedValue, VersionedNullableEncryptedValue, VoiceTokenResponse, WorldAutonomyPolicy, WorldSuggestionUpdated };
3557
+ declare const HAPPY_MCP_TOOL_NAMES: readonly ["change_title", "query_project_knowledge", "update_progress", "update_session_summary"];
3558
+ type HappyMcpCanonicalToolName = (typeof HAPPY_MCP_TOOL_NAMES)[number];
3559
+ type HappyMcpToolActionMode = "dynamic" | "permission" | "fallback";
3560
+ type HappyMcpToolSpec = {
3561
+ title: string;
3562
+ description: string;
3563
+ failureLabel: string;
3564
+ inputSchema: Record<string, z$1.ZodTypeAny>;
3565
+ hideSuccessfulCall: boolean;
3566
+ autoApproveByDefault: boolean;
3567
+ permissionAction: string;
3568
+ dynamicAction: string;
3569
+ fallbackAction: string;
3570
+ reasonPhrases: string[];
3571
+ };
3572
+ declare const HAPPY_MCP_TOOL_SPECS: Record<HappyMcpCanonicalToolName, HappyMcpToolSpec>;
3573
+ declare const HAPPY_MCP_AUTO_APPROVE_TOOL_NAMES: HappyMcpCanonicalToolName[];
3574
+ declare const HAPPY_MCP_SILENT_SUCCESS_TOOL_NAMES: HappyMcpCanonicalToolName[];
3575
+ declare function getHappyMcpToolAliases(toolName: HappyMcpCanonicalToolName): readonly string[];
3576
+ declare function normalizeHappyMcpToolName(toolName: string | null | undefined): HappyMcpCanonicalToolName | null;
3577
+ declare function isHappyMcpToolName(toolName: string | null | undefined): boolean;
3578
+ declare function isHappyMcpToolAlias(toolName: string | null | undefined, canonicalToolName: HappyMcpCanonicalToolName): boolean;
3579
+ declare function getHappyMcpToolTitle(toolName: string | null | undefined): string | null;
3580
+ declare function getHappyMcpToolAction(toolName: string | null | undefined, mode: HappyMcpToolActionMode): string | null;
3581
+ declare function shouldHideSuccessfulHappyMcpTool(toolName: string | null | undefined): boolean;
3582
+ declare function shouldAutoApproveHappyMcpToolName(toolName: string | null | undefined): boolean;
3583
+ declare function shouldAutoApproveHappyMcpReason(reason: string | null | undefined): boolean;
3584
+
3585
+ export { AGENT_MSG_PRIORITIES, AGENT_MSG_STATUSES, AGENT_MSG_TYPES, AIBackendProfileSchema, AcceptBodySchema, AgentLoopSummarySchema, AgentMessageSchema, AgentMessageSummarySchema, AgentMsgTypeSchema, AnthropicConfigSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, AutoDreamProfileSummarySchema, AutomationAuditEventSummarySchema, AutomationAuditStatsSchema, AutomationCountsSchema, AutomationGuardianSummarySchema, AutomationGuardianUsageSummarySchema, AutomationJobKindSchema, AutomationJobStatusSchema, AutomationJobSummarySchema, AutomationPrioritySchema, AutomationStateSchema, AutonomyStatsRecentActionSchema, AutonomyStatsSchema, AzureOpenAIConfigSchema, BUILT_IN_AI_BACKEND_PROFILE_IDS, BootstrapProfileSummarySchema, BriefMessageSchema, BuiltInAIBackendProfileIdSchema, CodexConfigSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, CreateKnowledgeEntryBodySchema, CreateSkillBodySchema, CreateTaskBodySchema, CrossProjectSearchResponseSchema, CrossProjectSearchResultSchema, CustomModelSchema, DaemonStateSchema, DefaultPermissionModeSchema, EVIDENCE_KINDS, EnvironmentVariableSchema, HAPPY_MCP_AUTO_APPROVE_TOOL_NAMES, HAPPY_MCP_SILENT_SUCCESS_TOOL_NAMES, HAPPY_MCP_TOOL_NAMES, HAPPY_MCP_TOOL_SPECS, InboxCategorySchema, InboxItemSummarySchema, InboxNewItemSchema, InboxSeveritySchema, InboxUnreadCountSchema, KnowledgeActionSchema, KnowledgeChainEntrySchema, KnowledgeChainRelationSchema, KnowledgeChainResponseSchema, KnowledgeConfidenceSchema, KnowledgeContributorTypeSchema, KnowledgeEntryTypeSchema, KnowledgeInjectionModeSchema, KnowledgeInjectionRequestSchema, KnowledgeInjectionResponseSchema, KnowledgeStatusSchema, LegacyMessageContentSchema, MachineMetadataSchema, MessageContentSchema, MessageMetaSchema, OpenAIConfigSchema, ProfileCompatibilitySchema, ProjectProfileSchema, QueryKnowledgeParamsSchema, RESOLVED_RUNTIME_PROFILE_SCHEMA_VERSION, ResolvedRuntimeProfileSchema, RuntimeProfileSourceSchema, RuntimeProfileTrustSchema, SUGGESTION_ACCEPT_AUDIT_RULES, SUGGESTION_ACCEPT_SOURCES, SUGGESTION_AUTO_ACCEPT_FAILURE_DETAILS, SUGGESTION_AUTO_ACCEPT_REASON_CODES, SUGGESTION_AUTO_ACCEPT_STATUSES, SUGGESTION_BUCKETS, SUGGESTION_STATUSES, SUGGESTION_TYPES, SUPERVISOR_MODES, SessionEventCreatedSchema, SessionEventReportSchema, SessionEventSummarySchema, SessionEventTypeSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, SkillContentSchema, SkillSummarySchema, SuggestionAcceptAuditSchema, SuggestionDecisionPayloadSchema, SuggestionEvidenceSchema, SuggestionGoalPayloadSchema, SuggestionPayloadSchema, SuggestionSkillPayloadSchema, SuggestionTaskPayloadSchema, TailscaleInfoSchema, TailscaleServeEntrySchema, TaskOutcomeSchema, TaskPrioritySchema, TaskStatusChangedSchema, TaskStatusReportSchema, TaskStatusSchema, TaskSummarySchema, TaskTriggerDataSchema, TaskTriggerTypeSchema, TmuxConfigSchema, TogetherAIConfigSchema, TunnelEntrySchema, TunnelProviderInfoSchema, TunnelStateSchema, TurnKnowledgeExtractionSchema, UpdateBodySchema, UpdateKnowledgeEntryBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UpdateSkillBodySchema, UserMessageSchema, VersionedEncryptedValueSchema, VersionedMachineEncryptedValueSchema, VersionedNullableEncryptedValueSchema, VoiceTokenAllowedSchema, VoiceTokenDeniedSchema, VoiceTokenResponseSchema, WorldAutonomyPolicySchema, WorldSuggestionUpdatedSchema, createEnvelope, createResolvedRuntimeProfile, getHappyMcpToolAction, getHappyMcpToolAliases, getHappyMcpToolTitle, getProfileEnvironmentVariables, getSuggestionPayloadSchema, isHappyMcpToolAlias, isHappyMcpToolName, isTrustedRuntimeProfile, normalizeHappyMcpToolName, normalizeResolvedRuntimeProfile, sessionContextUsageCategorySchema, sessionContextUsageEventSchema, sessionEnvelopeSchema, sessionEventSchema, sessionFileEventSchema, sessionModelUsageSchema, sessionNeedsContinueEventSchema, sessionProgressListSchema, sessionProgressStateSchema, sessionProgressTodoSchema, sessionProgressTodoStatusSchema, sessionPromptSuggestionEventSchema, sessionRoleSchema, sessionServiceMessageEventSchema, sessionStartEventSchema, sessionStateChangedEventSchema, sessionStopEventSchema, sessionSummaryStateSchema, sessionTaskEndEventSchema, sessionTaskLogEventSchema, sessionTaskProgressEventSchema, sessionTaskStartEventSchema, sessionTextDeltaEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionToolProgressEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema, shouldAutoApproveHappyMcpReason, shouldAutoApproveHappyMcpToolName, shouldHideSuccessfulHappyMcpTool, terminalCloseRequestSchema, terminalExitPayloadSchema, terminalInputPayloadSchema, terminalOutputPayloadSchema, terminalResizeRequestSchema, terminalSpawnRequestSchema, terminalSpawnResponseSchema, validateProfileForAgent };
3586
+ export type { AIBackendProfile, AcceptBody, AgentLoopSummary, AgentMessage, AgentMessageSummary, AgentMsgPriority, AgentMsgStatus, AgentMsgType, ApiMessage, ApiUpdateMachineState, ApiUpdateNewMessage, ApiUpdateSessionState, AutoDreamProfileSummary, AutomationAuditEventSummary, AutomationAuditStats, AutomationCounts, AutomationGuardianSummary, AutomationGuardianUsageSummary, AutomationJobKind, AutomationJobStatus, AutomationJobSummary, AutomationPriority, AutomationState, AutonomyStats, BootstrapProfileSummary, BriefMessage, BuiltInAIBackendProfileId, CoreUpdateBody, CoreUpdateContainer, CreateEnvelopeOptions, CreateKnowledgeEntryBody, CreateSkillBody, CreateTaskBody, CrossProjectSearchResponse, CrossProjectSearchResult, DaemonState, HappyMcpCanonicalToolName, HappyMcpToolActionMode, InboxCategory, InboxItemSummary, InboxNewItem, InboxSeverity, InboxUnreadCount, KnowledgeAction, KnowledgeChainEntry, KnowledgeChainRelation, KnowledgeChainResponse, KnowledgeConfidence, KnowledgeContributorType, KnowledgeEntryType, KnowledgeInjectionMode, KnowledgeInjectionRequest, KnowledgeInjectionResponse, KnowledgeStatus, LegacyMessageContent, MachineMetadata, MessageContent, MessageMeta, ProjectProfile, QueryKnowledgeParams, ResolvedRuntimeProfile, RuntimeProfileSource, RuntimeProfileTrust, SessionContextUsageEvent, SessionEnvelope, SessionEvent, SessionEventCreated, SessionEventReport, SessionEventSummary, SessionEventType, SessionMessage, SessionMessageContent, SessionModelUsage, SessionProgressList, SessionProgressState, SessionProgressTodo, SessionProgressTodoStatus, SessionProtocolMessage, SessionRole, SessionSummaryState, SessionTurnEndStatus, SkillContent, SkillSummary, SuggestionAcceptAudit, SuggestionAcceptAuditRule, SuggestionAcceptSource, SuggestionAutoAcceptFailureDetail, SuggestionAutoAcceptReasonCode, SuggestionAutoAcceptStatus, SuggestionBucket, SuggestionDecisionPayload, SuggestionEvidence, SuggestionGoalPayload, SuggestionPayload, SuggestionSerialized, SuggestionSkillPayload, SuggestionStatus, SuggestionSummary, SuggestionTaskPayload, SuggestionType, SupervisorMode, TailscaleInfo, TailscaleServeEntry, TaskOutcome, TaskPriority, TaskStatus, TaskStatusChanged, TaskStatusReport, TaskSummary, TaskTriggerData, TaskTriggerType, TerminalCloseRequest, TerminalExitPayload, TerminalInputPayload, TerminalOutputPayload, TerminalResizeRequest, TerminalSpawnRequest, TerminalSpawnResponse, TunnelEntry, TunnelProviderInfo, TunnelState, TurnKnowledgeExtraction, Update, UpdateBody, UpdateKnowledgeEntryBody, UpdateMachineBody, UpdateNewMessageBody, UpdateSessionBody, UpdateSkillBody, UserMessage, VersionedEncryptedValue, VersionedMachineEncryptedValue, VersionedNullableEncryptedValue, VoiceTokenResponse, WorldAutonomyPolicy, WorldSuggestionUpdated };
package/dist/index.d.mts CHANGED
@@ -1534,8 +1534,8 @@ declare const AutomationPrioritySchema: z.ZodEnum<{
1534
1534
  }>;
1535
1535
  type AutomationPriority = z.infer<typeof AutomationPrioritySchema>;
1536
1536
  declare const AutomationJobKindSchema: z.ZodEnum<{
1537
- webhook: "webhook";
1538
1537
  supervisor: "supervisor";
1538
+ webhook: "webhook";
1539
1539
  agent_loop: "agent_loop";
1540
1540
  task: "task";
1541
1541
  }>;
@@ -1552,8 +1552,8 @@ type AutomationJobStatus = z.infer<typeof AutomationJobStatusSchema>;
1552
1552
  declare const AutomationJobSummarySchema: z.ZodObject<{
1553
1553
  id: z.ZodString;
1554
1554
  kind: z.ZodEnum<{
1555
- webhook: "webhook";
1556
1555
  supervisor: "supervisor";
1556
+ webhook: "webhook";
1557
1557
  agent_loop: "agent_loop";
1558
1558
  task: "task";
1559
1559
  }>;
@@ -1715,8 +1715,8 @@ declare const AutomationStateSchema: z.ZodObject<{
1715
1715
  recentJobs: z.ZodArray<z.ZodObject<{
1716
1716
  id: z.ZodString;
1717
1717
  kind: z.ZodEnum<{
1718
- webhook: "webhook";
1719
1718
  supervisor: "supervisor";
1719
+ webhook: "webhook";
1720
1720
  agent_loop: "agent_loop";
1721
1721
  task: "task";
1722
1722
  }>;
@@ -1942,8 +1942,8 @@ declare const DaemonStateSchema: z.ZodObject<{
1942
1942
  recentJobs: z.ZodArray<z.ZodObject<{
1943
1943
  id: z.ZodString;
1944
1944
  kind: z.ZodEnum<{
1945
- webhook: "webhook";
1946
1945
  supervisor: "supervisor";
1946
+ webhook: "webhook";
1947
1947
  agent_loop: "agent_loop";
1948
1948
  task: "task";
1949
1949
  }>;
@@ -2102,8 +2102,8 @@ declare const KnowledgeEntryTypeSchema: z.ZodEnum<{
2102
2102
  }>;
2103
2103
  type KnowledgeEntryType = z.infer<typeof KnowledgeEntryTypeSchema>;
2104
2104
  declare const KnowledgeContributorTypeSchema: z.ZodEnum<{
2105
- session: "session";
2106
2105
  user: "user";
2106
+ session: "session";
2107
2107
  supervisor: "supervisor";
2108
2108
  }>;
2109
2109
  type KnowledgeContributorType = z.infer<typeof KnowledgeContributorTypeSchema>;
@@ -2116,8 +2116,8 @@ declare const KnowledgeActionSchema: z.ZodEnum<{
2116
2116
  type KnowledgeAction = z.infer<typeof KnowledgeActionSchema>;
2117
2117
  declare const KnowledgeStatusSchema: z.ZodEnum<{
2118
2118
  active: "active";
2119
- superseded: "superseded";
2120
2119
  archived: "archived";
2120
+ superseded: "superseded";
2121
2121
  }>;
2122
2122
  type KnowledgeStatus = z.infer<typeof KnowledgeStatusSchema>;
2123
2123
  declare const KnowledgeConfidenceSchema: z.ZodEnum<{
@@ -2135,8 +2135,8 @@ declare const CreateKnowledgeEntryBodySchema: z.ZodObject<{
2135
2135
  warning: "warning";
2136
2136
  }>;
2137
2137
  contributorType: z.ZodEnum<{
2138
- session: "session";
2139
2138
  user: "user";
2139
+ session: "session";
2140
2140
  supervisor: "supervisor";
2141
2141
  }>;
2142
2142
  action: z.ZodEnum<{
@@ -2168,8 +2168,8 @@ type CreateKnowledgeEntryBody = z.infer<typeof CreateKnowledgeEntryBodySchema>;
2168
2168
  declare const UpdateKnowledgeEntryBodySchema: z.ZodObject<{
2169
2169
  status: z.ZodOptional<z.ZodEnum<{
2170
2170
  active: "active";
2171
- superseded: "superseded";
2172
2171
  archived: "archived";
2172
+ superseded: "superseded";
2173
2173
  }>>;
2174
2174
  pinned: z.ZodOptional<z.ZodBoolean>;
2175
2175
  title: z.ZodOptional<z.ZodString>;
@@ -2192,8 +2192,8 @@ declare const QueryKnowledgeParamsSchema: z.ZodObject<{
2192
2192
  }>>;
2193
2193
  status: z.ZodOptional<z.ZodEnum<{
2194
2194
  active: "active";
2195
- superseded: "superseded";
2196
2195
  archived: "archived";
2196
+ superseded: "superseded";
2197
2197
  }>>;
2198
2198
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
2199
2199
  search: z.ZodOptional<z.ZodString>;
@@ -2281,8 +2281,8 @@ declare const KnowledgeChainEntrySchema: z.ZodObject<{
2281
2281
  }>;
2282
2282
  status: z.ZodEnum<{
2283
2283
  active: "active";
2284
- superseded: "superseded";
2285
2284
  archived: "archived";
2285
+ superseded: "superseded";
2286
2286
  }>;
2287
2287
  title: z.ZodString;
2288
2288
  content: z.ZodString;
@@ -2314,8 +2314,8 @@ declare const KnowledgeChainResponseSchema: z.ZodObject<{
2314
2314
  }>;
2315
2315
  status: z.ZodEnum<{
2316
2316
  active: "active";
2317
- superseded: "superseded";
2318
2317
  archived: "archived";
2318
+ superseded: "superseded";
2319
2319
  }>;
2320
2320
  title: z.ZodString;
2321
2321
  content: z.ZodString;
@@ -2461,9 +2461,9 @@ declare const TaskStatusSchema: z.ZodEnum<{
2461
2461
  }>;
2462
2462
  type TaskStatus = z.infer<typeof TaskStatusSchema>;
2463
2463
  declare const TaskTriggerTypeSchema: z.ZodEnum<{
2464
+ webhook: "webhook";
2464
2465
  manual: "manual";
2465
2466
  cron: "cron";
2466
- webhook: "webhook";
2467
2467
  }>;
2468
2468
  type TaskTriggerType = z.infer<typeof TaskTriggerTypeSchema>;
2469
2469
  declare const TaskSummarySchema: z.ZodObject<{
@@ -2484,9 +2484,9 @@ declare const TaskSummarySchema: z.ZodObject<{
2484
2484
  dispatching: "dispatching";
2485
2485
  }>;
2486
2486
  triggerType: z.ZodEnum<{
2487
+ webhook: "webhook";
2487
2488
  manual: "manual";
2488
2489
  cron: "cron";
2489
- webhook: "webhook";
2490
2490
  }>;
2491
2491
  triggerRef: z.ZodOptional<z.ZodString>;
2492
2492
  attempt: z.ZodNumber;
@@ -2850,8 +2850,8 @@ declare const EVIDENCE_KINDS: readonly ["goal", "task", "decision", "message", "
2850
2850
  declare const SuggestionEvidenceSchema: z$1.ZodObject<{
2851
2851
  kind: z$1.ZodEnum<{
2852
2852
  message: "message";
2853
- decision: "decision";
2854
2853
  task: "task";
2854
+ decision: "decision";
2855
2855
  goal: "goal";
2856
2856
  narrative: "narrative";
2857
2857
  }>;
@@ -3489,6 +3489,7 @@ declare const sessionProgressListSchema: z.ZodObject<{
3489
3489
  updatedAt: z.ZodNumber;
3490
3490
  archivedAt: z.ZodOptional<z.ZodNumber>;
3491
3491
  toolCallIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
3492
+ summaryGeneratedAt: z.ZodOptional<z.ZodNumber>;
3492
3493
  }, z.core.$strip>;
3493
3494
  type SessionProgressList = z.infer<typeof sessionProgressListSchema>;
3494
3495
  /**
@@ -3520,6 +3521,7 @@ declare const sessionProgressStateSchema: z.ZodObject<{
3520
3521
  updatedAt: z.ZodNumber;
3521
3522
  archivedAt: z.ZodOptional<z.ZodNumber>;
3522
3523
  toolCallIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
3524
+ summaryGeneratedAt: z.ZodOptional<z.ZodNumber>;
3523
3525
  }, z.core.$strip>>>;
3524
3526
  currentListId: z.ZodOptional<z.ZodString>;
3525
3527
  todos: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -3552,5 +3554,33 @@ declare const sessionSummaryStateSchema: z.ZodObject<{
3552
3554
  }, z.core.$strip>;
3553
3555
  type SessionSummaryState = z.infer<typeof sessionSummaryStateSchema>;
3554
3556
 
3555
- export { AGENT_MSG_PRIORITIES, AGENT_MSG_STATUSES, AGENT_MSG_TYPES, AIBackendProfileSchema, AcceptBodySchema, AgentLoopSummarySchema, AgentMessageSchema, AgentMessageSummarySchema, AgentMsgTypeSchema, AnthropicConfigSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, AutoDreamProfileSummarySchema, AutomationAuditEventSummarySchema, AutomationAuditStatsSchema, AutomationCountsSchema, AutomationGuardianSummarySchema, AutomationGuardianUsageSummarySchema, AutomationJobKindSchema, AutomationJobStatusSchema, AutomationJobSummarySchema, AutomationPrioritySchema, AutomationStateSchema, AutonomyStatsRecentActionSchema, AutonomyStatsSchema, AzureOpenAIConfigSchema, BUILT_IN_AI_BACKEND_PROFILE_IDS, BootstrapProfileSummarySchema, BriefMessageSchema, BuiltInAIBackendProfileIdSchema, CodexConfigSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, CreateKnowledgeEntryBodySchema, CreateSkillBodySchema, CreateTaskBodySchema, CrossProjectSearchResponseSchema, CrossProjectSearchResultSchema, CustomModelSchema, DaemonStateSchema, DefaultPermissionModeSchema, EVIDENCE_KINDS, EnvironmentVariableSchema, InboxCategorySchema, InboxItemSummarySchema, InboxNewItemSchema, InboxSeveritySchema, InboxUnreadCountSchema, KnowledgeActionSchema, KnowledgeChainEntrySchema, KnowledgeChainRelationSchema, KnowledgeChainResponseSchema, KnowledgeConfidenceSchema, KnowledgeContributorTypeSchema, KnowledgeEntryTypeSchema, KnowledgeInjectionModeSchema, KnowledgeInjectionRequestSchema, KnowledgeInjectionResponseSchema, KnowledgeStatusSchema, LegacyMessageContentSchema, MachineMetadataSchema, MessageContentSchema, MessageMetaSchema, OpenAIConfigSchema, ProfileCompatibilitySchema, ProjectProfileSchema, QueryKnowledgeParamsSchema, RESOLVED_RUNTIME_PROFILE_SCHEMA_VERSION, ResolvedRuntimeProfileSchema, RuntimeProfileSourceSchema, RuntimeProfileTrustSchema, SUGGESTION_ACCEPT_AUDIT_RULES, SUGGESTION_ACCEPT_SOURCES, SUGGESTION_AUTO_ACCEPT_FAILURE_DETAILS, SUGGESTION_AUTO_ACCEPT_REASON_CODES, SUGGESTION_AUTO_ACCEPT_STATUSES, SUGGESTION_BUCKETS, SUGGESTION_STATUSES, SUGGESTION_TYPES, SUPERVISOR_MODES, SessionEventCreatedSchema, SessionEventReportSchema, SessionEventSummarySchema, SessionEventTypeSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, SkillContentSchema, SkillSummarySchema, SuggestionAcceptAuditSchema, SuggestionDecisionPayloadSchema, SuggestionEvidenceSchema, SuggestionGoalPayloadSchema, SuggestionPayloadSchema, SuggestionSkillPayloadSchema, SuggestionTaskPayloadSchema, TailscaleInfoSchema, TailscaleServeEntrySchema, TaskOutcomeSchema, TaskPrioritySchema, TaskStatusChangedSchema, TaskStatusReportSchema, TaskStatusSchema, TaskSummarySchema, TaskTriggerDataSchema, TaskTriggerTypeSchema, TmuxConfigSchema, TogetherAIConfigSchema, TunnelEntrySchema, TunnelProviderInfoSchema, TunnelStateSchema, TurnKnowledgeExtractionSchema, UpdateBodySchema, UpdateKnowledgeEntryBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UpdateSkillBodySchema, UserMessageSchema, VersionedEncryptedValueSchema, VersionedMachineEncryptedValueSchema, VersionedNullableEncryptedValueSchema, VoiceTokenAllowedSchema, VoiceTokenDeniedSchema, VoiceTokenResponseSchema, WorldAutonomyPolicySchema, WorldSuggestionUpdatedSchema, createEnvelope, createResolvedRuntimeProfile, getProfileEnvironmentVariables, getSuggestionPayloadSchema, isTrustedRuntimeProfile, normalizeResolvedRuntimeProfile, sessionContextUsageCategorySchema, sessionContextUsageEventSchema, sessionEnvelopeSchema, sessionEventSchema, sessionFileEventSchema, sessionModelUsageSchema, sessionNeedsContinueEventSchema, sessionProgressListSchema, sessionProgressStateSchema, sessionProgressTodoSchema, sessionProgressTodoStatusSchema, sessionPromptSuggestionEventSchema, sessionRoleSchema, sessionServiceMessageEventSchema, sessionStartEventSchema, sessionStateChangedEventSchema, sessionStopEventSchema, sessionSummaryStateSchema, sessionTaskEndEventSchema, sessionTaskLogEventSchema, sessionTaskProgressEventSchema, sessionTaskStartEventSchema, sessionTextDeltaEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionToolProgressEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema, terminalCloseRequestSchema, terminalExitPayloadSchema, terminalInputPayloadSchema, terminalOutputPayloadSchema, terminalResizeRequestSchema, terminalSpawnRequestSchema, terminalSpawnResponseSchema, validateProfileForAgent };
3556
- export type { AIBackendProfile, AcceptBody, AgentLoopSummary, AgentMessage, AgentMessageSummary, AgentMsgPriority, AgentMsgStatus, AgentMsgType, ApiMessage, ApiUpdateMachineState, ApiUpdateNewMessage, ApiUpdateSessionState, AutoDreamProfileSummary, AutomationAuditEventSummary, AutomationAuditStats, AutomationCounts, AutomationGuardianSummary, AutomationGuardianUsageSummary, AutomationJobKind, AutomationJobStatus, AutomationJobSummary, AutomationPriority, AutomationState, AutonomyStats, BootstrapProfileSummary, BriefMessage, BuiltInAIBackendProfileId, CoreUpdateBody, CoreUpdateContainer, CreateEnvelopeOptions, CreateKnowledgeEntryBody, CreateSkillBody, CreateTaskBody, CrossProjectSearchResponse, CrossProjectSearchResult, DaemonState, InboxCategory, InboxItemSummary, InboxNewItem, InboxSeverity, InboxUnreadCount, KnowledgeAction, KnowledgeChainEntry, KnowledgeChainRelation, KnowledgeChainResponse, KnowledgeConfidence, KnowledgeContributorType, KnowledgeEntryType, KnowledgeInjectionMode, KnowledgeInjectionRequest, KnowledgeInjectionResponse, KnowledgeStatus, LegacyMessageContent, MachineMetadata, MessageContent, MessageMeta, ProjectProfile, QueryKnowledgeParams, ResolvedRuntimeProfile, RuntimeProfileSource, RuntimeProfileTrust, SessionContextUsageEvent, SessionEnvelope, SessionEvent, SessionEventCreated, SessionEventReport, SessionEventSummary, SessionEventType, SessionMessage, SessionMessageContent, SessionModelUsage, SessionProgressList, SessionProgressState, SessionProgressTodo, SessionProgressTodoStatus, SessionProtocolMessage, SessionRole, SessionSummaryState, SessionTurnEndStatus, SkillContent, SkillSummary, SuggestionAcceptAudit, SuggestionAcceptAuditRule, SuggestionAcceptSource, SuggestionAutoAcceptFailureDetail, SuggestionAutoAcceptReasonCode, SuggestionAutoAcceptStatus, SuggestionBucket, SuggestionDecisionPayload, SuggestionEvidence, SuggestionGoalPayload, SuggestionPayload, SuggestionSerialized, SuggestionSkillPayload, SuggestionStatus, SuggestionSummary, SuggestionTaskPayload, SuggestionType, SupervisorMode, TailscaleInfo, TailscaleServeEntry, TaskOutcome, TaskPriority, TaskStatus, TaskStatusChanged, TaskStatusReport, TaskSummary, TaskTriggerData, TaskTriggerType, TerminalCloseRequest, TerminalExitPayload, TerminalInputPayload, TerminalOutputPayload, TerminalResizeRequest, TerminalSpawnRequest, TerminalSpawnResponse, TunnelEntry, TunnelProviderInfo, TunnelState, TurnKnowledgeExtraction, Update, UpdateBody, UpdateKnowledgeEntryBody, UpdateMachineBody, UpdateNewMessageBody, UpdateSessionBody, UpdateSkillBody, UserMessage, VersionedEncryptedValue, VersionedMachineEncryptedValue, VersionedNullableEncryptedValue, VoiceTokenResponse, WorldAutonomyPolicy, WorldSuggestionUpdated };
3557
+ declare const HAPPY_MCP_TOOL_NAMES: readonly ["change_title", "query_project_knowledge", "update_progress", "update_session_summary"];
3558
+ type HappyMcpCanonicalToolName = (typeof HAPPY_MCP_TOOL_NAMES)[number];
3559
+ type HappyMcpToolActionMode = "dynamic" | "permission" | "fallback";
3560
+ type HappyMcpToolSpec = {
3561
+ title: string;
3562
+ description: string;
3563
+ failureLabel: string;
3564
+ inputSchema: Record<string, z$1.ZodTypeAny>;
3565
+ hideSuccessfulCall: boolean;
3566
+ autoApproveByDefault: boolean;
3567
+ permissionAction: string;
3568
+ dynamicAction: string;
3569
+ fallbackAction: string;
3570
+ reasonPhrases: string[];
3571
+ };
3572
+ declare const HAPPY_MCP_TOOL_SPECS: Record<HappyMcpCanonicalToolName, HappyMcpToolSpec>;
3573
+ declare const HAPPY_MCP_AUTO_APPROVE_TOOL_NAMES: HappyMcpCanonicalToolName[];
3574
+ declare const HAPPY_MCP_SILENT_SUCCESS_TOOL_NAMES: HappyMcpCanonicalToolName[];
3575
+ declare function getHappyMcpToolAliases(toolName: HappyMcpCanonicalToolName): readonly string[];
3576
+ declare function normalizeHappyMcpToolName(toolName: string | null | undefined): HappyMcpCanonicalToolName | null;
3577
+ declare function isHappyMcpToolName(toolName: string | null | undefined): boolean;
3578
+ declare function isHappyMcpToolAlias(toolName: string | null | undefined, canonicalToolName: HappyMcpCanonicalToolName): boolean;
3579
+ declare function getHappyMcpToolTitle(toolName: string | null | undefined): string | null;
3580
+ declare function getHappyMcpToolAction(toolName: string | null | undefined, mode: HappyMcpToolActionMode): string | null;
3581
+ declare function shouldHideSuccessfulHappyMcpTool(toolName: string | null | undefined): boolean;
3582
+ declare function shouldAutoApproveHappyMcpToolName(toolName: string | null | undefined): boolean;
3583
+ declare function shouldAutoApproveHappyMcpReason(reason: string | null | undefined): boolean;
3584
+
3585
+ export { AGENT_MSG_PRIORITIES, AGENT_MSG_STATUSES, AGENT_MSG_TYPES, AIBackendProfileSchema, AcceptBodySchema, AgentLoopSummarySchema, AgentMessageSchema, AgentMessageSummarySchema, AgentMsgTypeSchema, AnthropicConfigSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, AutoDreamProfileSummarySchema, AutomationAuditEventSummarySchema, AutomationAuditStatsSchema, AutomationCountsSchema, AutomationGuardianSummarySchema, AutomationGuardianUsageSummarySchema, AutomationJobKindSchema, AutomationJobStatusSchema, AutomationJobSummarySchema, AutomationPrioritySchema, AutomationStateSchema, AutonomyStatsRecentActionSchema, AutonomyStatsSchema, AzureOpenAIConfigSchema, BUILT_IN_AI_BACKEND_PROFILE_IDS, BootstrapProfileSummarySchema, BriefMessageSchema, BuiltInAIBackendProfileIdSchema, CodexConfigSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, CreateKnowledgeEntryBodySchema, CreateSkillBodySchema, CreateTaskBodySchema, CrossProjectSearchResponseSchema, CrossProjectSearchResultSchema, CustomModelSchema, DaemonStateSchema, DefaultPermissionModeSchema, EVIDENCE_KINDS, EnvironmentVariableSchema, HAPPY_MCP_AUTO_APPROVE_TOOL_NAMES, HAPPY_MCP_SILENT_SUCCESS_TOOL_NAMES, HAPPY_MCP_TOOL_NAMES, HAPPY_MCP_TOOL_SPECS, InboxCategorySchema, InboxItemSummarySchema, InboxNewItemSchema, InboxSeveritySchema, InboxUnreadCountSchema, KnowledgeActionSchema, KnowledgeChainEntrySchema, KnowledgeChainRelationSchema, KnowledgeChainResponseSchema, KnowledgeConfidenceSchema, KnowledgeContributorTypeSchema, KnowledgeEntryTypeSchema, KnowledgeInjectionModeSchema, KnowledgeInjectionRequestSchema, KnowledgeInjectionResponseSchema, KnowledgeStatusSchema, LegacyMessageContentSchema, MachineMetadataSchema, MessageContentSchema, MessageMetaSchema, OpenAIConfigSchema, ProfileCompatibilitySchema, ProjectProfileSchema, QueryKnowledgeParamsSchema, RESOLVED_RUNTIME_PROFILE_SCHEMA_VERSION, ResolvedRuntimeProfileSchema, RuntimeProfileSourceSchema, RuntimeProfileTrustSchema, SUGGESTION_ACCEPT_AUDIT_RULES, SUGGESTION_ACCEPT_SOURCES, SUGGESTION_AUTO_ACCEPT_FAILURE_DETAILS, SUGGESTION_AUTO_ACCEPT_REASON_CODES, SUGGESTION_AUTO_ACCEPT_STATUSES, SUGGESTION_BUCKETS, SUGGESTION_STATUSES, SUGGESTION_TYPES, SUPERVISOR_MODES, SessionEventCreatedSchema, SessionEventReportSchema, SessionEventSummarySchema, SessionEventTypeSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, SkillContentSchema, SkillSummarySchema, SuggestionAcceptAuditSchema, SuggestionDecisionPayloadSchema, SuggestionEvidenceSchema, SuggestionGoalPayloadSchema, SuggestionPayloadSchema, SuggestionSkillPayloadSchema, SuggestionTaskPayloadSchema, TailscaleInfoSchema, TailscaleServeEntrySchema, TaskOutcomeSchema, TaskPrioritySchema, TaskStatusChangedSchema, TaskStatusReportSchema, TaskStatusSchema, TaskSummarySchema, TaskTriggerDataSchema, TaskTriggerTypeSchema, TmuxConfigSchema, TogetherAIConfigSchema, TunnelEntrySchema, TunnelProviderInfoSchema, TunnelStateSchema, TurnKnowledgeExtractionSchema, UpdateBodySchema, UpdateKnowledgeEntryBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UpdateSkillBodySchema, UserMessageSchema, VersionedEncryptedValueSchema, VersionedMachineEncryptedValueSchema, VersionedNullableEncryptedValueSchema, VoiceTokenAllowedSchema, VoiceTokenDeniedSchema, VoiceTokenResponseSchema, WorldAutonomyPolicySchema, WorldSuggestionUpdatedSchema, createEnvelope, createResolvedRuntimeProfile, getHappyMcpToolAction, getHappyMcpToolAliases, getHappyMcpToolTitle, getProfileEnvironmentVariables, getSuggestionPayloadSchema, isHappyMcpToolAlias, isHappyMcpToolName, isTrustedRuntimeProfile, normalizeHappyMcpToolName, normalizeResolvedRuntimeProfile, sessionContextUsageCategorySchema, sessionContextUsageEventSchema, sessionEnvelopeSchema, sessionEventSchema, sessionFileEventSchema, sessionModelUsageSchema, sessionNeedsContinueEventSchema, sessionProgressListSchema, sessionProgressStateSchema, sessionProgressTodoSchema, sessionProgressTodoStatusSchema, sessionPromptSuggestionEventSchema, sessionRoleSchema, sessionServiceMessageEventSchema, sessionStartEventSchema, sessionStateChangedEventSchema, sessionStopEventSchema, sessionSummaryStateSchema, sessionTaskEndEventSchema, sessionTaskLogEventSchema, sessionTaskProgressEventSchema, sessionTaskStartEventSchema, sessionTextDeltaEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionToolProgressEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema, shouldAutoApproveHappyMcpReason, shouldAutoApproveHappyMcpToolName, shouldHideSuccessfulHappyMcpTool, terminalCloseRequestSchema, terminalExitPayloadSchema, terminalInputPayloadSchema, terminalOutputPayloadSchema, terminalResizeRequestSchema, terminalSpawnRequestSchema, terminalSpawnResponseSchema, validateProfileForAgent };
3586
+ export type { AIBackendProfile, AcceptBody, AgentLoopSummary, AgentMessage, AgentMessageSummary, AgentMsgPriority, AgentMsgStatus, AgentMsgType, ApiMessage, ApiUpdateMachineState, ApiUpdateNewMessage, ApiUpdateSessionState, AutoDreamProfileSummary, AutomationAuditEventSummary, AutomationAuditStats, AutomationCounts, AutomationGuardianSummary, AutomationGuardianUsageSummary, AutomationJobKind, AutomationJobStatus, AutomationJobSummary, AutomationPriority, AutomationState, AutonomyStats, BootstrapProfileSummary, BriefMessage, BuiltInAIBackendProfileId, CoreUpdateBody, CoreUpdateContainer, CreateEnvelopeOptions, CreateKnowledgeEntryBody, CreateSkillBody, CreateTaskBody, CrossProjectSearchResponse, CrossProjectSearchResult, DaemonState, HappyMcpCanonicalToolName, HappyMcpToolActionMode, InboxCategory, InboxItemSummary, InboxNewItem, InboxSeverity, InboxUnreadCount, KnowledgeAction, KnowledgeChainEntry, KnowledgeChainRelation, KnowledgeChainResponse, KnowledgeConfidence, KnowledgeContributorType, KnowledgeEntryType, KnowledgeInjectionMode, KnowledgeInjectionRequest, KnowledgeInjectionResponse, KnowledgeStatus, LegacyMessageContent, MachineMetadata, MessageContent, MessageMeta, ProjectProfile, QueryKnowledgeParams, ResolvedRuntimeProfile, RuntimeProfileSource, RuntimeProfileTrust, SessionContextUsageEvent, SessionEnvelope, SessionEvent, SessionEventCreated, SessionEventReport, SessionEventSummary, SessionEventType, SessionMessage, SessionMessageContent, SessionModelUsage, SessionProgressList, SessionProgressState, SessionProgressTodo, SessionProgressTodoStatus, SessionProtocolMessage, SessionRole, SessionSummaryState, SessionTurnEndStatus, SkillContent, SkillSummary, SuggestionAcceptAudit, SuggestionAcceptAuditRule, SuggestionAcceptSource, SuggestionAutoAcceptFailureDetail, SuggestionAutoAcceptReasonCode, SuggestionAutoAcceptStatus, SuggestionBucket, SuggestionDecisionPayload, SuggestionEvidence, SuggestionGoalPayload, SuggestionPayload, SuggestionSerialized, SuggestionSkillPayload, SuggestionStatus, SuggestionSummary, SuggestionTaskPayload, SuggestionType, SupervisorMode, TailscaleInfo, TailscaleServeEntry, TaskOutcome, TaskPriority, TaskStatus, TaskStatusChanged, TaskStatusReport, TaskSummary, TaskTriggerData, TaskTriggerType, TerminalCloseRequest, TerminalExitPayload, TerminalInputPayload, TerminalOutputPayload, TerminalResizeRequest, TerminalSpawnRequest, TerminalSpawnResponse, TunnelEntry, TunnelProviderInfo, TunnelState, TurnKnowledgeExtraction, Update, UpdateBody, UpdateKnowledgeEntryBody, UpdateMachineBody, UpdateNewMessageBody, UpdateSessionBody, UpdateSkillBody, UserMessage, VersionedEncryptedValue, VersionedMachineEncryptedValue, VersionedNullableEncryptedValue, VoiceTokenResponse, WorldAutonomyPolicy, WorldSuggestionUpdated };
package/dist/index.mjs CHANGED
@@ -1503,7 +1503,14 @@ const sessionProgressListSchema = z.object({
1503
1503
  * resolve these against the session message stream to render per-list
1504
1504
  * file change summaries without duplicating diff content into metadata.
1505
1505
  */
1506
- toolCallIds: z.array(z.string()).optional()
1506
+ toolCallIds: z.array(z.string()).optional(),
1507
+ /**
1508
+ * Timestamp at which an auto-summary was triggered for this list's
1509
+ * completion (all todos completed → all completed transition). Dedup flag
1510
+ * so the CLI hook only fires ONE synthetic summary-trigger message per
1511
+ * list lifecycle, even if subsequent TodoWrite calls keep it all done.
1512
+ */
1513
+ summaryGeneratedAt: z.number().optional()
1507
1514
  });
1508
1515
  const sessionProgressStateSchema = z.object({
1509
1516
  /** Ordered by startedAt asc; last item is typically the active one. */
@@ -1528,4 +1535,167 @@ const sessionSummaryStateSchema = z.object({
1528
1535
  updatedAt: z.number()
1529
1536
  });
1530
1537
 
1531
- export { AGENT_MSG_PRIORITIES, AGENT_MSG_STATUSES, AGENT_MSG_TYPES, AIBackendProfileSchema, AcceptBodySchema, AgentLoopSummarySchema, AgentMessageSchema, AgentMessageSummarySchema, AgentMsgTypeSchema, AnthropicConfigSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, AutoDreamProfileSummarySchema, AutomationAuditEventSummarySchema, AutomationAuditStatsSchema, AutomationCountsSchema, AutomationGuardianSummarySchema, AutomationGuardianUsageSummarySchema, AutomationJobKindSchema, AutomationJobStatusSchema, AutomationJobSummarySchema, AutomationPrioritySchema, AutomationStateSchema, AutonomyStatsRecentActionSchema, AutonomyStatsSchema, AzureOpenAIConfigSchema, BUILT_IN_AI_BACKEND_PROFILE_IDS, BootstrapProfileSummarySchema, BriefMessageSchema, BuiltInAIBackendProfileIdSchema, CodexConfigSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, CreateKnowledgeEntryBodySchema, CreateSkillBodySchema, CreateTaskBodySchema, CrossProjectSearchResponseSchema, CrossProjectSearchResultSchema, CustomModelSchema, DaemonStateSchema, DefaultPermissionModeSchema, EVIDENCE_KINDS, EnvironmentVariableSchema, InboxCategorySchema, InboxItemSummarySchema, InboxNewItemSchema, InboxSeveritySchema, InboxUnreadCountSchema, KnowledgeActionSchema, KnowledgeChainEntrySchema, KnowledgeChainRelationSchema, KnowledgeChainResponseSchema, KnowledgeConfidenceSchema, KnowledgeContributorTypeSchema, KnowledgeEntryTypeSchema, KnowledgeInjectionModeSchema, KnowledgeInjectionRequestSchema, KnowledgeInjectionResponseSchema, KnowledgeStatusSchema, LegacyMessageContentSchema, MachineMetadataSchema, MessageContentSchema, MessageMetaSchema, OpenAIConfigSchema, ProfileCompatibilitySchema, ProjectProfileSchema, QueryKnowledgeParamsSchema, RESOLVED_RUNTIME_PROFILE_SCHEMA_VERSION, ResolvedRuntimeProfileSchema, RuntimeProfileSourceSchema, RuntimeProfileTrustSchema, SUGGESTION_ACCEPT_AUDIT_RULES, SUGGESTION_ACCEPT_SOURCES, SUGGESTION_AUTO_ACCEPT_FAILURE_DETAILS, SUGGESTION_AUTO_ACCEPT_REASON_CODES, SUGGESTION_AUTO_ACCEPT_STATUSES, SUGGESTION_BUCKETS, SUGGESTION_STATUSES, SUGGESTION_TYPES, SUPERVISOR_MODES, SessionEventCreatedSchema, SessionEventReportSchema, SessionEventSummarySchema, SessionEventTypeSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, SkillContentSchema, SkillSummarySchema, SuggestionAcceptAuditSchema, SuggestionDecisionPayloadSchema, SuggestionEvidenceSchema, SuggestionGoalPayloadSchema, SuggestionPayloadSchema, SuggestionSkillPayloadSchema, SuggestionTaskPayloadSchema, TailscaleInfoSchema, TailscaleServeEntrySchema, TaskOutcomeSchema, TaskPrioritySchema, TaskStatusChangedSchema, TaskStatusReportSchema, TaskStatusSchema, TaskSummarySchema, TaskTriggerDataSchema, TaskTriggerTypeSchema, TmuxConfigSchema, TogetherAIConfigSchema, TunnelEntrySchema, TunnelProviderInfoSchema, TunnelStateSchema, TurnKnowledgeExtractionSchema, UpdateBodySchema, UpdateKnowledgeEntryBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UpdateSkillBodySchema, UserMessageSchema, VersionedEncryptedValueSchema, VersionedMachineEncryptedValueSchema, VersionedNullableEncryptedValueSchema, VoiceTokenAllowedSchema, VoiceTokenDeniedSchema, VoiceTokenResponseSchema, WorldAutonomyPolicySchema, WorldSuggestionUpdatedSchema, createEnvelope, createResolvedRuntimeProfile, getProfileEnvironmentVariables, getSuggestionPayloadSchema, isTrustedRuntimeProfile, normalizeResolvedRuntimeProfile, sessionContextUsageCategorySchema, sessionContextUsageEventSchema, sessionEnvelopeSchema, sessionEventSchema, sessionFileEventSchema, sessionModelUsageSchema, sessionNeedsContinueEventSchema, sessionProgressListSchema, sessionProgressStateSchema, sessionProgressTodoSchema, sessionProgressTodoStatusSchema, sessionPromptSuggestionEventSchema, sessionRoleSchema, sessionServiceMessageEventSchema, sessionStartEventSchema, sessionStateChangedEventSchema, sessionStopEventSchema, sessionSummaryStateSchema, sessionTaskEndEventSchema, sessionTaskLogEventSchema, sessionTaskProgressEventSchema, sessionTaskStartEventSchema, sessionTextDeltaEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionToolProgressEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema, terminalCloseRequestSchema, terminalExitPayloadSchema, terminalInputPayloadSchema, terminalOutputPayloadSchema, terminalResizeRequestSchema, terminalSpawnRequestSchema, terminalSpawnResponseSchema, validateProfileForAgent };
1538
+ const HAPPY_MCP_TOOL_NAMES = [
1539
+ "change_title",
1540
+ "query_project_knowledge",
1541
+ "update_progress",
1542
+ "update_session_summary"
1543
+ ];
1544
+ const HAPPY_MCP_TOOL_SPECS = {
1545
+ change_title: {
1546
+ title: "Change Title",
1547
+ description: 'Set or update the chat session title. Titles should be short (under 50 chars) and action-oriented, e.g. "Fix auth token refresh".',
1548
+ failureLabel: "Failed to change chat title",
1549
+ inputSchema: {
1550
+ title: z$1.string().describe("The new title for the chat session")
1551
+ },
1552
+ hideSuccessfulCall: true,
1553
+ autoApproveByDefault: true,
1554
+ permissionAction: "Waiting for approval to update chat title",
1555
+ dynamicAction: "Updating chat title",
1556
+ fallbackAction: "Update chat title",
1557
+ reasonPhrases: ["title update", "title updates", "change_title"]
1558
+ },
1559
+ query_project_knowledge: {
1560
+ title: "Project Knowledge",
1561
+ description: "Search the project knowledge base for relevant context, past decisions, known pitfalls, and conventions.",
1562
+ failureLabel: "Knowledge query failed",
1563
+ inputSchema: {
1564
+ query: z$1.string().describe("Search query describing what you want to know")
1565
+ },
1566
+ hideSuccessfulCall: false,
1567
+ autoApproveByDefault: false,
1568
+ permissionAction: "Waiting for approval to search project knowledge",
1569
+ dynamicAction: "Searching project knowledge",
1570
+ fallbackAction: "Search project knowledge",
1571
+ reasonPhrases: []
1572
+ },
1573
+ update_progress: {
1574
+ title: "Update Progress",
1575
+ description: 'Optional override for the App\'s Progress tab. In most cases your TodoWrite calls are auto-mirrored, so you do NOT need to call this. Use it only when you want to set extra fields the CLI hook does not capture (currentStage, blockers) or to force a new list boundary with `listId: "new"`.',
1576
+ failureLabel: "Failed to update progress",
1577
+ inputSchema: {
1578
+ todos: z$1.array(
1579
+ z$1.object({
1580
+ content: z$1.string().describe("Concise description of the task"),
1581
+ status: z$1.enum(["pending", "in_progress", "completed"]).describe("Current status of the task"),
1582
+ activeForm: z$1.string().optional().describe(
1583
+ "Imperative-present form shown when status is in_progress"
1584
+ ),
1585
+ stage: z$1.string().optional().describe("Optional phase/stage label")
1586
+ })
1587
+ ).describe("The full checklist \u2014 always send every item, not a delta"),
1588
+ currentStage: z$1.string().optional().describe("Optional overall stage name for the checklist"),
1589
+ blockers: z$1.array(z$1.string()).optional().describe("Optional list of things blocking progress"),
1590
+ listId: z$1.string().optional().describe("Target list id. Use 'new' to force a fresh list"),
1591
+ label: z$1.string().optional().describe("Short human-readable name for this task list")
1592
+ },
1593
+ hideSuccessfulCall: false,
1594
+ autoApproveByDefault: true,
1595
+ permissionAction: "Waiting for approval to update progress",
1596
+ dynamicAction: "Updating progress",
1597
+ fallbackAction: "Update progress",
1598
+ reasonPhrases: ["progress update", "progress updates", "update_progress"]
1599
+ },
1600
+ update_session_summary: {
1601
+ title: "Update Session Summary",
1602
+ description: "Write a narrative session summary the App shows above the progress checklist. Call at milestones, not per task: after first understanding the goal, when scope shifts significantly, when key decisions are made, or when moving to a new phase. Full rewrite each call.",
1603
+ failureLabel: "Failed to update session summary",
1604
+ inputSchema: {
1605
+ goal: z$1.string().describe("What the user ultimately wants to accomplish"),
1606
+ currentFocus: z$1.string().optional().describe("Brief description of the active task or phase"),
1607
+ keyDecisions: z$1.array(z$1.string()).optional().describe("Important choices already made this session"),
1608
+ openQuestions: z$1.array(z$1.string()).optional().describe("Unresolved questions or pending decisions"),
1609
+ impactScope: z$1.array(z$1.string()).optional().describe("Modules/files/areas affected by this session's work")
1610
+ },
1611
+ hideSuccessfulCall: false,
1612
+ autoApproveByDefault: true,
1613
+ permissionAction: "Waiting for approval to update session summary",
1614
+ dynamicAction: "Updating session summary",
1615
+ fallbackAction: "Update session summary",
1616
+ reasonPhrases: [
1617
+ "session summary",
1618
+ "update_session_summary",
1619
+ "summary update"
1620
+ ]
1621
+ }
1622
+ };
1623
+ const HAPPY_MCP_TOOL_NAME_SET = new Set(HAPPY_MCP_TOOL_NAMES);
1624
+ const HAPPY_MCP_AUTO_APPROVE_TOOL_NAMES = HAPPY_MCP_TOOL_NAMES.filter(
1625
+ (toolName) => HAPPY_MCP_TOOL_SPECS[toolName].autoApproveByDefault
1626
+ );
1627
+ const HAPPY_MCP_SILENT_SUCCESS_TOOL_NAMES = HAPPY_MCP_TOOL_NAMES.filter(
1628
+ (toolName) => HAPPY_MCP_TOOL_SPECS[toolName].hideSuccessfulCall
1629
+ );
1630
+ function getHappyMcpToolAliases(toolName) {
1631
+ return [
1632
+ toolName,
1633
+ `happy__${toolName}`,
1634
+ `mcp__happy__${toolName}`
1635
+ ];
1636
+ }
1637
+ function normalizeHappyMcpToolName(toolName) {
1638
+ if (typeof toolName !== "string") {
1639
+ return null;
1640
+ }
1641
+ const trimmed = toolName.trim();
1642
+ if (!trimmed) {
1643
+ return null;
1644
+ }
1645
+ if (HAPPY_MCP_TOOL_NAME_SET.has(trimmed)) {
1646
+ return trimmed;
1647
+ }
1648
+ const withoutNamespace = trimmed.startsWith("mcp__happy__") ? trimmed.slice("mcp__happy__".length) : trimmed.startsWith("happy__") ? trimmed.slice("happy__".length) : null;
1649
+ if (withoutNamespace && HAPPY_MCP_TOOL_NAME_SET.has(withoutNamespace)) {
1650
+ return withoutNamespace;
1651
+ }
1652
+ return null;
1653
+ }
1654
+ function isHappyMcpToolName(toolName) {
1655
+ return normalizeHappyMcpToolName(toolName) !== null;
1656
+ }
1657
+ function isHappyMcpToolAlias(toolName, canonicalToolName) {
1658
+ return normalizeHappyMcpToolName(toolName) === canonicalToolName;
1659
+ }
1660
+ function getHappyMcpToolTitle(toolName) {
1661
+ const canonical = normalizeHappyMcpToolName(toolName);
1662
+ return canonical ? HAPPY_MCP_TOOL_SPECS[canonical].title : null;
1663
+ }
1664
+ function getHappyMcpToolAction(toolName, mode) {
1665
+ const canonical = normalizeHappyMcpToolName(toolName);
1666
+ if (!canonical) {
1667
+ return null;
1668
+ }
1669
+ const spec = HAPPY_MCP_TOOL_SPECS[canonical];
1670
+ if (mode === "permission") {
1671
+ return spec.permissionAction;
1672
+ }
1673
+ if (mode === "dynamic") {
1674
+ return spec.dynamicAction;
1675
+ }
1676
+ return spec.fallbackAction;
1677
+ }
1678
+ function shouldHideSuccessfulHappyMcpTool(toolName) {
1679
+ const canonical = normalizeHappyMcpToolName(toolName);
1680
+ return canonical ? HAPPY_MCP_TOOL_SPECS[canonical].hideSuccessfulCall : false;
1681
+ }
1682
+ function shouldAutoApproveHappyMcpToolName(toolName) {
1683
+ const canonical = normalizeHappyMcpToolName(toolName);
1684
+ return canonical ? HAPPY_MCP_TOOL_SPECS[canonical].autoApproveByDefault : false;
1685
+ }
1686
+ function shouldAutoApproveHappyMcpReason(reason) {
1687
+ if (typeof reason !== "string") {
1688
+ return false;
1689
+ }
1690
+ const normalizedReason = reason.toLowerCase();
1691
+ if (!normalizedReason.includes("happy")) {
1692
+ return false;
1693
+ }
1694
+ return HAPPY_MCP_AUTO_APPROVE_TOOL_NAMES.some(
1695
+ (toolName) => HAPPY_MCP_TOOL_SPECS[toolName].reasonPhrases.some(
1696
+ (phrase) => normalizedReason.includes(phrase)
1697
+ )
1698
+ );
1699
+ }
1700
+
1701
+ export { AGENT_MSG_PRIORITIES, AGENT_MSG_STATUSES, AGENT_MSG_TYPES, AIBackendProfileSchema, AcceptBodySchema, AgentLoopSummarySchema, AgentMessageSchema, AgentMessageSummarySchema, AgentMsgTypeSchema, AnthropicConfigSchema, ApiMessageSchema, ApiUpdateMachineStateSchema, ApiUpdateNewMessageSchema, ApiUpdateSessionStateSchema, AutoDreamProfileSummarySchema, AutomationAuditEventSummarySchema, AutomationAuditStatsSchema, AutomationCountsSchema, AutomationGuardianSummarySchema, AutomationGuardianUsageSummarySchema, AutomationJobKindSchema, AutomationJobStatusSchema, AutomationJobSummarySchema, AutomationPrioritySchema, AutomationStateSchema, AutonomyStatsRecentActionSchema, AutonomyStatsSchema, AzureOpenAIConfigSchema, BUILT_IN_AI_BACKEND_PROFILE_IDS, BootstrapProfileSummarySchema, BriefMessageSchema, BuiltInAIBackendProfileIdSchema, CodexConfigSchema, CoreUpdateBodySchema, CoreUpdateContainerSchema, CreateKnowledgeEntryBodySchema, CreateSkillBodySchema, CreateTaskBodySchema, CrossProjectSearchResponseSchema, CrossProjectSearchResultSchema, CustomModelSchema, DaemonStateSchema, DefaultPermissionModeSchema, EVIDENCE_KINDS, EnvironmentVariableSchema, HAPPY_MCP_AUTO_APPROVE_TOOL_NAMES, HAPPY_MCP_SILENT_SUCCESS_TOOL_NAMES, HAPPY_MCP_TOOL_NAMES, HAPPY_MCP_TOOL_SPECS, InboxCategorySchema, InboxItemSummarySchema, InboxNewItemSchema, InboxSeveritySchema, InboxUnreadCountSchema, KnowledgeActionSchema, KnowledgeChainEntrySchema, KnowledgeChainRelationSchema, KnowledgeChainResponseSchema, KnowledgeConfidenceSchema, KnowledgeContributorTypeSchema, KnowledgeEntryTypeSchema, KnowledgeInjectionModeSchema, KnowledgeInjectionRequestSchema, KnowledgeInjectionResponseSchema, KnowledgeStatusSchema, LegacyMessageContentSchema, MachineMetadataSchema, MessageContentSchema, MessageMetaSchema, OpenAIConfigSchema, ProfileCompatibilitySchema, ProjectProfileSchema, QueryKnowledgeParamsSchema, RESOLVED_RUNTIME_PROFILE_SCHEMA_VERSION, ResolvedRuntimeProfileSchema, RuntimeProfileSourceSchema, RuntimeProfileTrustSchema, SUGGESTION_ACCEPT_AUDIT_RULES, SUGGESTION_ACCEPT_SOURCES, SUGGESTION_AUTO_ACCEPT_FAILURE_DETAILS, SUGGESTION_AUTO_ACCEPT_REASON_CODES, SUGGESTION_AUTO_ACCEPT_STATUSES, SUGGESTION_BUCKETS, SUGGESTION_STATUSES, SUGGESTION_TYPES, SUPERVISOR_MODES, SessionEventCreatedSchema, SessionEventReportSchema, SessionEventSummarySchema, SessionEventTypeSchema, SessionMessageContentSchema, SessionMessageSchema, SessionProtocolMessageSchema, SkillContentSchema, SkillSummarySchema, SuggestionAcceptAuditSchema, SuggestionDecisionPayloadSchema, SuggestionEvidenceSchema, SuggestionGoalPayloadSchema, SuggestionPayloadSchema, SuggestionSkillPayloadSchema, SuggestionTaskPayloadSchema, TailscaleInfoSchema, TailscaleServeEntrySchema, TaskOutcomeSchema, TaskPrioritySchema, TaskStatusChangedSchema, TaskStatusReportSchema, TaskStatusSchema, TaskSummarySchema, TaskTriggerDataSchema, TaskTriggerTypeSchema, TmuxConfigSchema, TogetherAIConfigSchema, TunnelEntrySchema, TunnelProviderInfoSchema, TunnelStateSchema, TurnKnowledgeExtractionSchema, UpdateBodySchema, UpdateKnowledgeEntryBodySchema, UpdateMachineBodySchema, UpdateNewMessageBodySchema, UpdateSchema, UpdateSessionBodySchema, UpdateSkillBodySchema, UserMessageSchema, VersionedEncryptedValueSchema, VersionedMachineEncryptedValueSchema, VersionedNullableEncryptedValueSchema, VoiceTokenAllowedSchema, VoiceTokenDeniedSchema, VoiceTokenResponseSchema, WorldAutonomyPolicySchema, WorldSuggestionUpdatedSchema, createEnvelope, createResolvedRuntimeProfile, getHappyMcpToolAction, getHappyMcpToolAliases, getHappyMcpToolTitle, getProfileEnvironmentVariables, getSuggestionPayloadSchema, isHappyMcpToolAlias, isHappyMcpToolName, isTrustedRuntimeProfile, normalizeHappyMcpToolName, normalizeResolvedRuntimeProfile, sessionContextUsageCategorySchema, sessionContextUsageEventSchema, sessionEnvelopeSchema, sessionEventSchema, sessionFileEventSchema, sessionModelUsageSchema, sessionNeedsContinueEventSchema, sessionProgressListSchema, sessionProgressStateSchema, sessionProgressTodoSchema, sessionProgressTodoStatusSchema, sessionPromptSuggestionEventSchema, sessionRoleSchema, sessionServiceMessageEventSchema, sessionStartEventSchema, sessionStateChangedEventSchema, sessionStopEventSchema, sessionSummaryStateSchema, sessionTaskEndEventSchema, sessionTaskLogEventSchema, sessionTaskProgressEventSchema, sessionTaskStartEventSchema, sessionTextDeltaEventSchema, sessionTextEventSchema, sessionToolCallEndEventSchema, sessionToolCallStartEventSchema, sessionToolProgressEventSchema, sessionTurnEndEventSchema, sessionTurnEndStatusSchema, sessionTurnStartEventSchema, sessionUsageUpdateEventSchema, shouldAutoApproveHappyMcpReason, shouldAutoApproveHappyMcpToolName, shouldHideSuccessfulHappyMcpTool, terminalCloseRequestSchema, terminalExitPayloadSchema, terminalInputPayloadSchema, terminalOutputPayloadSchema, terminalResizeRequestSchema, terminalSpawnRequestSchema, terminalSpawnResponseSchema, validateProfileForAgent };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmmao/happy-wire",
3
- "version": "0.11.9",
3
+ "version": "0.11.11",
4
4
  "description": "Shared message wire types and Zod schemas for Happy clients and services",
5
5
  "author": "kmmao",
6
6
  "license": "MIT",