@kmmao/happy-wire 0.11.6 → 0.11.8
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 +61 -0
- package/dist/index.d.cts +128 -7
- package/dist/index.d.mts +128 -7
- package/dist/index.mjs +57 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1485,6 +1485,62 @@ function isTrustedRuntimeProfile(runtimeProfile) {
|
|
|
1485
1485
|
return runtimeProfile?.trust === "trusted";
|
|
1486
1486
|
}
|
|
1487
1487
|
|
|
1488
|
+
const sessionProgressTodoStatusSchema = z__namespace.enum([
|
|
1489
|
+
"pending",
|
|
1490
|
+
"in_progress",
|
|
1491
|
+
"completed"
|
|
1492
|
+
]);
|
|
1493
|
+
const sessionProgressTodoSchema = z__namespace.object({
|
|
1494
|
+
content: z__namespace.string(),
|
|
1495
|
+
status: sessionProgressTodoStatusSchema,
|
|
1496
|
+
/** SDK-native: imperative-present form shown when status is in_progress. */
|
|
1497
|
+
activeForm: z__namespace.string().optional(),
|
|
1498
|
+
/** Optional phase/stage label a step belongs to, e.g. "Phase 2". */
|
|
1499
|
+
stage: z__namespace.string().optional(),
|
|
1500
|
+
/**
|
|
1501
|
+
* Carried over from SDK's `TodoWriteOutput.verificationNudgeNeeded` — SDK
|
|
1502
|
+
* flags items it suspects were marked completed without verification.
|
|
1503
|
+
*/
|
|
1504
|
+
verificationNudgeNeeded: z__namespace.boolean().optional()
|
|
1505
|
+
});
|
|
1506
|
+
const sessionProgressListSchema = z__namespace.object({
|
|
1507
|
+
/** Stable UUID for tab switching / explicit Agent addressing. */
|
|
1508
|
+
id: z__namespace.string(),
|
|
1509
|
+
/** Short human-readable label; auto-derived from first todo if absent. */
|
|
1510
|
+
label: z__namespace.string().optional(),
|
|
1511
|
+
todos: z__namespace.array(sessionProgressTodoSchema),
|
|
1512
|
+
/** Optional overall stage for this list (set via MCP). */
|
|
1513
|
+
currentStage: z__namespace.string().optional(),
|
|
1514
|
+
/** Optional blocker list (set via MCP). */
|
|
1515
|
+
blockers: z__namespace.array(z__namespace.string()).optional(),
|
|
1516
|
+
startedAt: z__namespace.number(),
|
|
1517
|
+
updatedAt: z__namespace.number(),
|
|
1518
|
+
/** When this list stopped being active (got pushed to history). */
|
|
1519
|
+
archivedAt: z__namespace.number().optional()
|
|
1520
|
+
});
|
|
1521
|
+
const sessionProgressStateSchema = z__namespace.object({
|
|
1522
|
+
/** Ordered by startedAt asc; last item is typically the active one. */
|
|
1523
|
+
lists: z__namespace.array(sessionProgressListSchema).optional(),
|
|
1524
|
+
/** Points at the active list within `lists`. */
|
|
1525
|
+
currentListId: z__namespace.string().optional(),
|
|
1526
|
+
/**
|
|
1527
|
+
* Legacy flat fields. Still written for backward compat with older
|
|
1528
|
+
* readers — kept in sync with `lists[currentListId]` on each update.
|
|
1529
|
+
*/
|
|
1530
|
+
todos: z__namespace.array(sessionProgressTodoSchema).optional(),
|
|
1531
|
+
currentStage: z__namespace.string().optional(),
|
|
1532
|
+
blockers: z__namespace.array(z__namespace.string()).optional(),
|
|
1533
|
+
updatedAt: z__namespace.number()
|
|
1534
|
+
});
|
|
1535
|
+
const sessionSummaryStateSchema = z__namespace.object({
|
|
1536
|
+
goal: z__namespace.string(),
|
|
1537
|
+
currentFocus: z__namespace.string().optional(),
|
|
1538
|
+
keyDecisions: z__namespace.array(z__namespace.string()).optional(),
|
|
1539
|
+
openQuestions: z__namespace.array(z__namespace.string()).optional(),
|
|
1540
|
+
impactScope: z__namespace.array(z__namespace.string()).optional(),
|
|
1541
|
+
updatedAt: z__namespace.number()
|
|
1542
|
+
});
|
|
1543
|
+
|
|
1488
1544
|
exports.AGENT_MSG_PRIORITIES = AGENT_MSG_PRIORITIES;
|
|
1489
1545
|
exports.AGENT_MSG_STATUSES = AGENT_MSG_STATUSES;
|
|
1490
1546
|
exports.AGENT_MSG_TYPES = AGENT_MSG_TYPES;
|
|
@@ -1628,12 +1684,17 @@ exports.sessionEventSchema = sessionEventSchema;
|
|
|
1628
1684
|
exports.sessionFileEventSchema = sessionFileEventSchema;
|
|
1629
1685
|
exports.sessionModelUsageSchema = sessionModelUsageSchema;
|
|
1630
1686
|
exports.sessionNeedsContinueEventSchema = sessionNeedsContinueEventSchema;
|
|
1687
|
+
exports.sessionProgressListSchema = sessionProgressListSchema;
|
|
1688
|
+
exports.sessionProgressStateSchema = sessionProgressStateSchema;
|
|
1689
|
+
exports.sessionProgressTodoSchema = sessionProgressTodoSchema;
|
|
1690
|
+
exports.sessionProgressTodoStatusSchema = sessionProgressTodoStatusSchema;
|
|
1631
1691
|
exports.sessionPromptSuggestionEventSchema = sessionPromptSuggestionEventSchema;
|
|
1632
1692
|
exports.sessionRoleSchema = sessionRoleSchema;
|
|
1633
1693
|
exports.sessionServiceMessageEventSchema = sessionServiceMessageEventSchema;
|
|
1634
1694
|
exports.sessionStartEventSchema = sessionStartEventSchema;
|
|
1635
1695
|
exports.sessionStateChangedEventSchema = sessionStateChangedEventSchema;
|
|
1636
1696
|
exports.sessionStopEventSchema = sessionStopEventSchema;
|
|
1697
|
+
exports.sessionSummaryStateSchema = sessionSummaryStateSchema;
|
|
1637
1698
|
exports.sessionTaskEndEventSchema = sessionTaskEndEventSchema;
|
|
1638
1699
|
exports.sessionTaskLogEventSchema = sessionTaskLogEventSchema;
|
|
1639
1700
|
exports.sessionTaskProgressEventSchema = sessionTaskProgressEventSchema;
|
package/dist/index.d.cts
CHANGED
|
@@ -2102,9 +2102,9 @@ 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";
|
|
2107
2106
|
supervisor: "supervisor";
|
|
2107
|
+
session: "session";
|
|
2108
2108
|
}>;
|
|
2109
2109
|
type KnowledgeContributorType = z.infer<typeof KnowledgeContributorTypeSchema>;
|
|
2110
2110
|
declare const KnowledgeActionSchema: z.ZodEnum<{
|
|
@@ -2135,9 +2135,9 @@ declare const CreateKnowledgeEntryBodySchema: z.ZodObject<{
|
|
|
2135
2135
|
warning: "warning";
|
|
2136
2136
|
}>;
|
|
2137
2137
|
contributorType: z.ZodEnum<{
|
|
2138
|
-
session: "session";
|
|
2139
2138
|
user: "user";
|
|
2140
2139
|
supervisor: "supervisor";
|
|
2140
|
+
session: "session";
|
|
2141
2141
|
}>;
|
|
2142
2142
|
action: z.ZodEnum<{
|
|
2143
2143
|
create: "create";
|
|
@@ -2614,10 +2614,10 @@ declare const SkillContentSchema: z.ZodObject<{
|
|
|
2614
2614
|
type SkillContent = z.infer<typeof SkillContentSchema>;
|
|
2615
2615
|
|
|
2616
2616
|
declare const InboxCategorySchema: z.ZodEnum<{
|
|
2617
|
-
session: "session";
|
|
2618
2617
|
supervisor: "supervisor";
|
|
2619
2618
|
task: "task";
|
|
2620
2619
|
trigger: "trigger";
|
|
2620
|
+
session: "session";
|
|
2621
2621
|
knowledge: "knowledge";
|
|
2622
2622
|
system: "system";
|
|
2623
2623
|
}>;
|
|
@@ -2631,10 +2631,10 @@ type InboxSeverity = z.infer<typeof InboxSeveritySchema>;
|
|
|
2631
2631
|
declare const InboxItemSummarySchema: z.ZodObject<{
|
|
2632
2632
|
id: z.ZodString;
|
|
2633
2633
|
category: z.ZodEnum<{
|
|
2634
|
-
session: "session";
|
|
2635
2634
|
supervisor: "supervisor";
|
|
2636
2635
|
task: "task";
|
|
2637
2636
|
trigger: "trigger";
|
|
2637
|
+
session: "session";
|
|
2638
2638
|
knowledge: "knowledge";
|
|
2639
2639
|
system: "system";
|
|
2640
2640
|
}>;
|
|
@@ -2659,10 +2659,10 @@ declare const InboxNewItemSchema: z.ZodObject<{
|
|
|
2659
2659
|
item: z.ZodObject<{
|
|
2660
2660
|
id: z.ZodString;
|
|
2661
2661
|
category: z.ZodEnum<{
|
|
2662
|
-
session: "session";
|
|
2663
2662
|
supervisor: "supervisor";
|
|
2664
2663
|
task: "task";
|
|
2665
2664
|
trigger: "trigger";
|
|
2665
|
+
session: "session";
|
|
2666
2666
|
knowledge: "knowledge";
|
|
2667
2667
|
system: "system";
|
|
2668
2668
|
}>;
|
|
@@ -3429,5 +3429,126 @@ declare function normalizeResolvedRuntimeProfile(input: unknown, options?: {
|
|
|
3429
3429
|
}): ResolvedRuntimeProfile | undefined;
|
|
3430
3430
|
declare function isTrustedRuntimeProfile(runtimeProfile: ResolvedRuntimeProfile | null | undefined): boolean;
|
|
3431
3431
|
|
|
3432
|
-
|
|
3433
|
-
|
|
3432
|
+
/**
|
|
3433
|
+
* Shared schemas for live session state surfaced to the App's Progress tab.
|
|
3434
|
+
*
|
|
3435
|
+
* These live inside the encrypted `Session.metadata` blob — no new server
|
|
3436
|
+
* storage or migration needed. Two sources feed this state:
|
|
3437
|
+
* 1. CLI auto-mirror hook: captures SDK's TodoWrite tool_result and
|
|
3438
|
+
* writes todos directly (no Agent prompting required).
|
|
3439
|
+
* 2. MCP tools update_progress / update_session_summary: optional
|
|
3440
|
+
* Agent-driven paths for richer fields the SDK doesn't expose.
|
|
3441
|
+
*
|
|
3442
|
+
* Keep fields small: they ride inside the metadata envelope on every
|
|
3443
|
+
* socket update, so avoid attaching large structured content here.
|
|
3444
|
+
*/
|
|
3445
|
+
declare const sessionProgressTodoStatusSchema: z.ZodEnum<{
|
|
3446
|
+
completed: "completed";
|
|
3447
|
+
pending: "pending";
|
|
3448
|
+
in_progress: "in_progress";
|
|
3449
|
+
}>;
|
|
3450
|
+
type SessionProgressTodoStatus = z.infer<typeof sessionProgressTodoStatusSchema>;
|
|
3451
|
+
/**
|
|
3452
|
+
* One checklist item. Mirrors the shape of Claude Code SDK's TodoWriteInput
|
|
3453
|
+
* items, with Happy extensions (`stage`, `verificationNudgeNeeded`).
|
|
3454
|
+
*/
|
|
3455
|
+
declare const sessionProgressTodoSchema: z.ZodObject<{
|
|
3456
|
+
content: z.ZodString;
|
|
3457
|
+
status: z.ZodEnum<{
|
|
3458
|
+
completed: "completed";
|
|
3459
|
+
pending: "pending";
|
|
3460
|
+
in_progress: "in_progress";
|
|
3461
|
+
}>;
|
|
3462
|
+
activeForm: z.ZodOptional<z.ZodString>;
|
|
3463
|
+
stage: z.ZodOptional<z.ZodString>;
|
|
3464
|
+
verificationNudgeNeeded: z.ZodOptional<z.ZodBoolean>;
|
|
3465
|
+
}, z.core.$strip>;
|
|
3466
|
+
type SessionProgressTodo = z.infer<typeof sessionProgressTodoSchema>;
|
|
3467
|
+
/**
|
|
3468
|
+
* One task list = one "generation" of the checklist. A session can contain
|
|
3469
|
+
* multiple generations across time; the auto-mirror hook partitions them
|
|
3470
|
+
* by a boundary heuristic (prior list fully completed + low overlap).
|
|
3471
|
+
*/
|
|
3472
|
+
declare const sessionProgressListSchema: z.ZodObject<{
|
|
3473
|
+
id: z.ZodString;
|
|
3474
|
+
label: z.ZodOptional<z.ZodString>;
|
|
3475
|
+
todos: z.ZodArray<z.ZodObject<{
|
|
3476
|
+
content: z.ZodString;
|
|
3477
|
+
status: z.ZodEnum<{
|
|
3478
|
+
completed: "completed";
|
|
3479
|
+
pending: "pending";
|
|
3480
|
+
in_progress: "in_progress";
|
|
3481
|
+
}>;
|
|
3482
|
+
activeForm: z.ZodOptional<z.ZodString>;
|
|
3483
|
+
stage: z.ZodOptional<z.ZodString>;
|
|
3484
|
+
verificationNudgeNeeded: z.ZodOptional<z.ZodBoolean>;
|
|
3485
|
+
}, z.core.$strip>>;
|
|
3486
|
+
currentStage: z.ZodOptional<z.ZodString>;
|
|
3487
|
+
blockers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3488
|
+
startedAt: z.ZodNumber;
|
|
3489
|
+
updatedAt: z.ZodNumber;
|
|
3490
|
+
archivedAt: z.ZodOptional<z.ZodNumber>;
|
|
3491
|
+
}, z.core.$strip>;
|
|
3492
|
+
type SessionProgressList = z.infer<typeof sessionProgressListSchema>;
|
|
3493
|
+
/**
|
|
3494
|
+
* Live progress state. Holds a list-of-lists plus a pointer to the active
|
|
3495
|
+
* one.
|
|
3496
|
+
*
|
|
3497
|
+
* Backward compatibility: older CLI / App versions wrote flat `todos` at
|
|
3498
|
+
* the top level. Readers should prefer `lists[currentListId]` when present
|
|
3499
|
+
* and fall back to the legacy `todos` otherwise.
|
|
3500
|
+
*/
|
|
3501
|
+
declare const sessionProgressStateSchema: z.ZodObject<{
|
|
3502
|
+
lists: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3503
|
+
id: z.ZodString;
|
|
3504
|
+
label: z.ZodOptional<z.ZodString>;
|
|
3505
|
+
todos: z.ZodArray<z.ZodObject<{
|
|
3506
|
+
content: z.ZodString;
|
|
3507
|
+
status: z.ZodEnum<{
|
|
3508
|
+
completed: "completed";
|
|
3509
|
+
pending: "pending";
|
|
3510
|
+
in_progress: "in_progress";
|
|
3511
|
+
}>;
|
|
3512
|
+
activeForm: z.ZodOptional<z.ZodString>;
|
|
3513
|
+
stage: z.ZodOptional<z.ZodString>;
|
|
3514
|
+
verificationNudgeNeeded: z.ZodOptional<z.ZodBoolean>;
|
|
3515
|
+
}, z.core.$strip>>;
|
|
3516
|
+
currentStage: z.ZodOptional<z.ZodString>;
|
|
3517
|
+
blockers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3518
|
+
startedAt: z.ZodNumber;
|
|
3519
|
+
updatedAt: z.ZodNumber;
|
|
3520
|
+
archivedAt: z.ZodOptional<z.ZodNumber>;
|
|
3521
|
+
}, z.core.$strip>>>;
|
|
3522
|
+
currentListId: z.ZodOptional<z.ZodString>;
|
|
3523
|
+
todos: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3524
|
+
content: z.ZodString;
|
|
3525
|
+
status: z.ZodEnum<{
|
|
3526
|
+
completed: "completed";
|
|
3527
|
+
pending: "pending";
|
|
3528
|
+
in_progress: "in_progress";
|
|
3529
|
+
}>;
|
|
3530
|
+
activeForm: z.ZodOptional<z.ZodString>;
|
|
3531
|
+
stage: z.ZodOptional<z.ZodString>;
|
|
3532
|
+
verificationNudgeNeeded: z.ZodOptional<z.ZodBoolean>;
|
|
3533
|
+
}, z.core.$strip>>>;
|
|
3534
|
+
currentStage: z.ZodOptional<z.ZodString>;
|
|
3535
|
+
blockers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3536
|
+
updatedAt: z.ZodNumber;
|
|
3537
|
+
}, z.core.$strip>;
|
|
3538
|
+
type SessionProgressState = z.infer<typeof sessionProgressStateSchema>;
|
|
3539
|
+
/**
|
|
3540
|
+
* Live narrative summary updated at milestones, not per tool call. Arrays
|
|
3541
|
+
* are full-rewrite for simplicity (no append/remove deltas).
|
|
3542
|
+
*/
|
|
3543
|
+
declare const sessionSummaryStateSchema: z.ZodObject<{
|
|
3544
|
+
goal: z.ZodString;
|
|
3545
|
+
currentFocus: z.ZodOptional<z.ZodString>;
|
|
3546
|
+
keyDecisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3547
|
+
openQuestions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3548
|
+
impactScope: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3549
|
+
updatedAt: z.ZodNumber;
|
|
3550
|
+
}, z.core.$strip>;
|
|
3551
|
+
type SessionSummaryState = z.infer<typeof sessionSummaryStateSchema>;
|
|
3552
|
+
|
|
3553
|
+
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 };
|
|
3554
|
+
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 };
|
package/dist/index.d.mts
CHANGED
|
@@ -2102,9 +2102,9 @@ 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";
|
|
2107
2106
|
supervisor: "supervisor";
|
|
2107
|
+
session: "session";
|
|
2108
2108
|
}>;
|
|
2109
2109
|
type KnowledgeContributorType = z.infer<typeof KnowledgeContributorTypeSchema>;
|
|
2110
2110
|
declare const KnowledgeActionSchema: z.ZodEnum<{
|
|
@@ -2135,9 +2135,9 @@ declare const CreateKnowledgeEntryBodySchema: z.ZodObject<{
|
|
|
2135
2135
|
warning: "warning";
|
|
2136
2136
|
}>;
|
|
2137
2137
|
contributorType: z.ZodEnum<{
|
|
2138
|
-
session: "session";
|
|
2139
2138
|
user: "user";
|
|
2140
2139
|
supervisor: "supervisor";
|
|
2140
|
+
session: "session";
|
|
2141
2141
|
}>;
|
|
2142
2142
|
action: z.ZodEnum<{
|
|
2143
2143
|
create: "create";
|
|
@@ -2614,10 +2614,10 @@ declare const SkillContentSchema: z.ZodObject<{
|
|
|
2614
2614
|
type SkillContent = z.infer<typeof SkillContentSchema>;
|
|
2615
2615
|
|
|
2616
2616
|
declare const InboxCategorySchema: z.ZodEnum<{
|
|
2617
|
-
session: "session";
|
|
2618
2617
|
supervisor: "supervisor";
|
|
2619
2618
|
task: "task";
|
|
2620
2619
|
trigger: "trigger";
|
|
2620
|
+
session: "session";
|
|
2621
2621
|
knowledge: "knowledge";
|
|
2622
2622
|
system: "system";
|
|
2623
2623
|
}>;
|
|
@@ -2631,10 +2631,10 @@ type InboxSeverity = z.infer<typeof InboxSeveritySchema>;
|
|
|
2631
2631
|
declare const InboxItemSummarySchema: z.ZodObject<{
|
|
2632
2632
|
id: z.ZodString;
|
|
2633
2633
|
category: z.ZodEnum<{
|
|
2634
|
-
session: "session";
|
|
2635
2634
|
supervisor: "supervisor";
|
|
2636
2635
|
task: "task";
|
|
2637
2636
|
trigger: "trigger";
|
|
2637
|
+
session: "session";
|
|
2638
2638
|
knowledge: "knowledge";
|
|
2639
2639
|
system: "system";
|
|
2640
2640
|
}>;
|
|
@@ -2659,10 +2659,10 @@ declare const InboxNewItemSchema: z.ZodObject<{
|
|
|
2659
2659
|
item: z.ZodObject<{
|
|
2660
2660
|
id: z.ZodString;
|
|
2661
2661
|
category: z.ZodEnum<{
|
|
2662
|
-
session: "session";
|
|
2663
2662
|
supervisor: "supervisor";
|
|
2664
2663
|
task: "task";
|
|
2665
2664
|
trigger: "trigger";
|
|
2665
|
+
session: "session";
|
|
2666
2666
|
knowledge: "knowledge";
|
|
2667
2667
|
system: "system";
|
|
2668
2668
|
}>;
|
|
@@ -3429,5 +3429,126 @@ declare function normalizeResolvedRuntimeProfile(input: unknown, options?: {
|
|
|
3429
3429
|
}): ResolvedRuntimeProfile | undefined;
|
|
3430
3430
|
declare function isTrustedRuntimeProfile(runtimeProfile: ResolvedRuntimeProfile | null | undefined): boolean;
|
|
3431
3431
|
|
|
3432
|
-
|
|
3433
|
-
|
|
3432
|
+
/**
|
|
3433
|
+
* Shared schemas for live session state surfaced to the App's Progress tab.
|
|
3434
|
+
*
|
|
3435
|
+
* These live inside the encrypted `Session.metadata` blob — no new server
|
|
3436
|
+
* storage or migration needed. Two sources feed this state:
|
|
3437
|
+
* 1. CLI auto-mirror hook: captures SDK's TodoWrite tool_result and
|
|
3438
|
+
* writes todos directly (no Agent prompting required).
|
|
3439
|
+
* 2. MCP tools update_progress / update_session_summary: optional
|
|
3440
|
+
* Agent-driven paths for richer fields the SDK doesn't expose.
|
|
3441
|
+
*
|
|
3442
|
+
* Keep fields small: they ride inside the metadata envelope on every
|
|
3443
|
+
* socket update, so avoid attaching large structured content here.
|
|
3444
|
+
*/
|
|
3445
|
+
declare const sessionProgressTodoStatusSchema: z.ZodEnum<{
|
|
3446
|
+
completed: "completed";
|
|
3447
|
+
pending: "pending";
|
|
3448
|
+
in_progress: "in_progress";
|
|
3449
|
+
}>;
|
|
3450
|
+
type SessionProgressTodoStatus = z.infer<typeof sessionProgressTodoStatusSchema>;
|
|
3451
|
+
/**
|
|
3452
|
+
* One checklist item. Mirrors the shape of Claude Code SDK's TodoWriteInput
|
|
3453
|
+
* items, with Happy extensions (`stage`, `verificationNudgeNeeded`).
|
|
3454
|
+
*/
|
|
3455
|
+
declare const sessionProgressTodoSchema: z.ZodObject<{
|
|
3456
|
+
content: z.ZodString;
|
|
3457
|
+
status: z.ZodEnum<{
|
|
3458
|
+
completed: "completed";
|
|
3459
|
+
pending: "pending";
|
|
3460
|
+
in_progress: "in_progress";
|
|
3461
|
+
}>;
|
|
3462
|
+
activeForm: z.ZodOptional<z.ZodString>;
|
|
3463
|
+
stage: z.ZodOptional<z.ZodString>;
|
|
3464
|
+
verificationNudgeNeeded: z.ZodOptional<z.ZodBoolean>;
|
|
3465
|
+
}, z.core.$strip>;
|
|
3466
|
+
type SessionProgressTodo = z.infer<typeof sessionProgressTodoSchema>;
|
|
3467
|
+
/**
|
|
3468
|
+
* One task list = one "generation" of the checklist. A session can contain
|
|
3469
|
+
* multiple generations across time; the auto-mirror hook partitions them
|
|
3470
|
+
* by a boundary heuristic (prior list fully completed + low overlap).
|
|
3471
|
+
*/
|
|
3472
|
+
declare const sessionProgressListSchema: z.ZodObject<{
|
|
3473
|
+
id: z.ZodString;
|
|
3474
|
+
label: z.ZodOptional<z.ZodString>;
|
|
3475
|
+
todos: z.ZodArray<z.ZodObject<{
|
|
3476
|
+
content: z.ZodString;
|
|
3477
|
+
status: z.ZodEnum<{
|
|
3478
|
+
completed: "completed";
|
|
3479
|
+
pending: "pending";
|
|
3480
|
+
in_progress: "in_progress";
|
|
3481
|
+
}>;
|
|
3482
|
+
activeForm: z.ZodOptional<z.ZodString>;
|
|
3483
|
+
stage: z.ZodOptional<z.ZodString>;
|
|
3484
|
+
verificationNudgeNeeded: z.ZodOptional<z.ZodBoolean>;
|
|
3485
|
+
}, z.core.$strip>>;
|
|
3486
|
+
currentStage: z.ZodOptional<z.ZodString>;
|
|
3487
|
+
blockers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3488
|
+
startedAt: z.ZodNumber;
|
|
3489
|
+
updatedAt: z.ZodNumber;
|
|
3490
|
+
archivedAt: z.ZodOptional<z.ZodNumber>;
|
|
3491
|
+
}, z.core.$strip>;
|
|
3492
|
+
type SessionProgressList = z.infer<typeof sessionProgressListSchema>;
|
|
3493
|
+
/**
|
|
3494
|
+
* Live progress state. Holds a list-of-lists plus a pointer to the active
|
|
3495
|
+
* one.
|
|
3496
|
+
*
|
|
3497
|
+
* Backward compatibility: older CLI / App versions wrote flat `todos` at
|
|
3498
|
+
* the top level. Readers should prefer `lists[currentListId]` when present
|
|
3499
|
+
* and fall back to the legacy `todos` otherwise.
|
|
3500
|
+
*/
|
|
3501
|
+
declare const sessionProgressStateSchema: z.ZodObject<{
|
|
3502
|
+
lists: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3503
|
+
id: z.ZodString;
|
|
3504
|
+
label: z.ZodOptional<z.ZodString>;
|
|
3505
|
+
todos: z.ZodArray<z.ZodObject<{
|
|
3506
|
+
content: z.ZodString;
|
|
3507
|
+
status: z.ZodEnum<{
|
|
3508
|
+
completed: "completed";
|
|
3509
|
+
pending: "pending";
|
|
3510
|
+
in_progress: "in_progress";
|
|
3511
|
+
}>;
|
|
3512
|
+
activeForm: z.ZodOptional<z.ZodString>;
|
|
3513
|
+
stage: z.ZodOptional<z.ZodString>;
|
|
3514
|
+
verificationNudgeNeeded: z.ZodOptional<z.ZodBoolean>;
|
|
3515
|
+
}, z.core.$strip>>;
|
|
3516
|
+
currentStage: z.ZodOptional<z.ZodString>;
|
|
3517
|
+
blockers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3518
|
+
startedAt: z.ZodNumber;
|
|
3519
|
+
updatedAt: z.ZodNumber;
|
|
3520
|
+
archivedAt: z.ZodOptional<z.ZodNumber>;
|
|
3521
|
+
}, z.core.$strip>>>;
|
|
3522
|
+
currentListId: z.ZodOptional<z.ZodString>;
|
|
3523
|
+
todos: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3524
|
+
content: z.ZodString;
|
|
3525
|
+
status: z.ZodEnum<{
|
|
3526
|
+
completed: "completed";
|
|
3527
|
+
pending: "pending";
|
|
3528
|
+
in_progress: "in_progress";
|
|
3529
|
+
}>;
|
|
3530
|
+
activeForm: z.ZodOptional<z.ZodString>;
|
|
3531
|
+
stage: z.ZodOptional<z.ZodString>;
|
|
3532
|
+
verificationNudgeNeeded: z.ZodOptional<z.ZodBoolean>;
|
|
3533
|
+
}, z.core.$strip>>>;
|
|
3534
|
+
currentStage: z.ZodOptional<z.ZodString>;
|
|
3535
|
+
blockers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3536
|
+
updatedAt: z.ZodNumber;
|
|
3537
|
+
}, z.core.$strip>;
|
|
3538
|
+
type SessionProgressState = z.infer<typeof sessionProgressStateSchema>;
|
|
3539
|
+
/**
|
|
3540
|
+
* Live narrative summary updated at milestones, not per tool call. Arrays
|
|
3541
|
+
* are full-rewrite for simplicity (no append/remove deltas).
|
|
3542
|
+
*/
|
|
3543
|
+
declare const sessionSummaryStateSchema: z.ZodObject<{
|
|
3544
|
+
goal: z.ZodString;
|
|
3545
|
+
currentFocus: z.ZodOptional<z.ZodString>;
|
|
3546
|
+
keyDecisions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3547
|
+
openQuestions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3548
|
+
impactScope: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
3549
|
+
updatedAt: z.ZodNumber;
|
|
3550
|
+
}, z.core.$strip>;
|
|
3551
|
+
type SessionSummaryState = z.infer<typeof sessionSummaryStateSchema>;
|
|
3552
|
+
|
|
3553
|
+
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 };
|
|
3554
|
+
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 };
|
package/dist/index.mjs
CHANGED
|
@@ -1465,4 +1465,60 @@ function isTrustedRuntimeProfile(runtimeProfile) {
|
|
|
1465
1465
|
return runtimeProfile?.trust === "trusted";
|
|
1466
1466
|
}
|
|
1467
1467
|
|
|
1468
|
-
|
|
1468
|
+
const sessionProgressTodoStatusSchema = z.enum([
|
|
1469
|
+
"pending",
|
|
1470
|
+
"in_progress",
|
|
1471
|
+
"completed"
|
|
1472
|
+
]);
|
|
1473
|
+
const sessionProgressTodoSchema = z.object({
|
|
1474
|
+
content: z.string(),
|
|
1475
|
+
status: sessionProgressTodoStatusSchema,
|
|
1476
|
+
/** SDK-native: imperative-present form shown when status is in_progress. */
|
|
1477
|
+
activeForm: z.string().optional(),
|
|
1478
|
+
/** Optional phase/stage label a step belongs to, e.g. "Phase 2". */
|
|
1479
|
+
stage: z.string().optional(),
|
|
1480
|
+
/**
|
|
1481
|
+
* Carried over from SDK's `TodoWriteOutput.verificationNudgeNeeded` — SDK
|
|
1482
|
+
* flags items it suspects were marked completed without verification.
|
|
1483
|
+
*/
|
|
1484
|
+
verificationNudgeNeeded: z.boolean().optional()
|
|
1485
|
+
});
|
|
1486
|
+
const sessionProgressListSchema = z.object({
|
|
1487
|
+
/** Stable UUID for tab switching / explicit Agent addressing. */
|
|
1488
|
+
id: z.string(),
|
|
1489
|
+
/** Short human-readable label; auto-derived from first todo if absent. */
|
|
1490
|
+
label: z.string().optional(),
|
|
1491
|
+
todos: z.array(sessionProgressTodoSchema),
|
|
1492
|
+
/** Optional overall stage for this list (set via MCP). */
|
|
1493
|
+
currentStage: z.string().optional(),
|
|
1494
|
+
/** Optional blocker list (set via MCP). */
|
|
1495
|
+
blockers: z.array(z.string()).optional(),
|
|
1496
|
+
startedAt: z.number(),
|
|
1497
|
+
updatedAt: z.number(),
|
|
1498
|
+
/** When this list stopped being active (got pushed to history). */
|
|
1499
|
+
archivedAt: z.number().optional()
|
|
1500
|
+
});
|
|
1501
|
+
const sessionProgressStateSchema = z.object({
|
|
1502
|
+
/** Ordered by startedAt asc; last item is typically the active one. */
|
|
1503
|
+
lists: z.array(sessionProgressListSchema).optional(),
|
|
1504
|
+
/** Points at the active list within `lists`. */
|
|
1505
|
+
currentListId: z.string().optional(),
|
|
1506
|
+
/**
|
|
1507
|
+
* Legacy flat fields. Still written for backward compat with older
|
|
1508
|
+
* readers — kept in sync with `lists[currentListId]` on each update.
|
|
1509
|
+
*/
|
|
1510
|
+
todos: z.array(sessionProgressTodoSchema).optional(),
|
|
1511
|
+
currentStage: z.string().optional(),
|
|
1512
|
+
blockers: z.array(z.string()).optional(),
|
|
1513
|
+
updatedAt: z.number()
|
|
1514
|
+
});
|
|
1515
|
+
const sessionSummaryStateSchema = z.object({
|
|
1516
|
+
goal: z.string(),
|
|
1517
|
+
currentFocus: z.string().optional(),
|
|
1518
|
+
keyDecisions: z.array(z.string()).optional(),
|
|
1519
|
+
openQuestions: z.array(z.string()).optional(),
|
|
1520
|
+
impactScope: z.array(z.string()).optional(),
|
|
1521
|
+
updatedAt: z.number()
|
|
1522
|
+
});
|
|
1523
|
+
|
|
1524
|
+
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 };
|