@ziggy-ai/client-sdk 1.7.1 → 1.9.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @ziggy-ai/client-sdk changelog
2
2
 
3
+ ## 1.9.0
4
+
5
+ ### Added
6
+ - `client.app.getScores()` (`GET /v1/apps/scores`): the app's health, version 2. Every part that applies (security, code quality, tests, architecture, problems users hit, docs) comes with its score, or `null` when Ziggy has not measured it. It is never a default. There is an overall only when at least two parts and half the weight that applies are measured. Each part says which analysis it came from, when, and on which commit. Growth and Ziggy's impact will be added to the same response later.
7
+ - Types: `ScoresResponse`, `AppHealthView`, `HealthPartView`, `HealthPart`.
8
+ - Exports for the 1.8.0 card types: `UICardEvent`, `GuideCard`, `GuideRecordCard` and `GuideStepCard` can now be imported from the package by name. In 1.8.0 they were reachable only by narrowing `StreamEvent`.
9
+
10
+ ### Deprecated
11
+ - `client.observer.getHealth()` and `HealthScoreResponse`. Since health version 2 (November 30, 2026) `GET /v1/observer/health` always answers `healthScore: null` and `history: []`, because its shape has a number for every old part and cannot describe parts that are not measured. Its response carries `Deprecation` and `Sunset: Thu, 01 Apr 2027` headers; the endpoint is removed no earlier than that date. Use `client.app.getScores()`.
12
+
13
+ ## 1.8.0
14
+
15
+ Published by PR 472 (ZIG-362); this entry was added with 1.9.0.
16
+
17
+ ### Added
18
+ - The `ui.card` stream event (`UICardEvent`): a card in the reply being streamed. Its `card` is a `GuideCard`, either a `GuideRecordCard` (a finding, with its area, severity and source page or quote) or a `GuideStepCard` (one next step, with why, the screen it belongs on and, when this caller may take it, a button naming an action the host already has). The server does nothing when a card is made; the host presses the button through its own function for that action.
19
+ - Types `GuideCard`, `GuideRecordCard`, `GuideStepCard` and `UICardEvent`, reachable in 1.8.0 by narrowing `StreamEvent` (exported by name from 1.9.0).
20
+
3
21
  ## 1.7.0
4
22
 
5
23
  ### Added
package/dist/app.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * (resolved server-side by auth middleware), so no appId is needed here.
6
6
  */
7
7
  import type { Connection } from './connection.js';
8
- import type { RegisterTriggersRequest, RegisterTriggersResponse, ListTriggersResponse, DeleteResponse, RegisterQuickActionsRequest, RegisterQuickActionsResponse, ListQuickActionsResponse, RegisterHostActionsRequest, RegisterHostActionsResponse, ListHostActionsResponse, RegisterBrandRequest, OwnerProfileFields, SetProfileResponse, AddDomainConceptRequest, AddDomainConceptResponse, GetBrandResponse, PublicBrandResponse, SpokenVoiceRecommendationsResponse, SpokenVoiceConfig, SetCredentialsRequest, SetCredentialsResponse, GetCredentialsResponse, AppCallbackResponse, AppStatus, VerifyResponse, AppAvailabilityResponse, YoloConfig, SetYoloConfigRequest, DeploymentSettings, UpdateDeploymentSettingsRequest, TriageConfig, SetTriageConfigRequest, ToolConfig, SetToolConfigRequest, AuditTriggerResponse, ObserverConfigResponse, DesignSystemResponse, DesignTokensResponse, ComponentSpecResponse } from './types.js';
8
+ import type { RegisterTriggersRequest, RegisterTriggersResponse, ListTriggersResponse, DeleteResponse, RegisterQuickActionsRequest, RegisterQuickActionsResponse, ListQuickActionsResponse, RegisterHostActionsRequest, RegisterHostActionsResponse, ListHostActionsResponse, RegisterBrandRequest, OwnerProfileFields, SetProfileResponse, AddDomainConceptRequest, AddDomainConceptResponse, GetBrandResponse, PublicBrandResponse, SpokenVoiceRecommendationsResponse, SpokenVoiceConfig, SetCredentialsRequest, SetCredentialsResponse, GetCredentialsResponse, AppCallbackResponse, AppStatus, ScoresResponse, VerifyResponse, AppAvailabilityResponse, YoloConfig, SetYoloConfigRequest, DeploymentSettings, UpdateDeploymentSettingsRequest, TriageConfig, SetTriageConfigRequest, ToolConfig, SetToolConfigRequest, AuditTriggerResponse, ObserverConfigResponse, DesignSystemResponse, DesignTokensResponse, ComponentSpecResponse } from './types.js';
9
9
  export declare class AppClient {
10
10
  getConversationPolicy(): Promise<{
11
11
  mode: 'support_led' | 'visible_team';
@@ -151,6 +151,12 @@ export declare class AppClient {
151
151
  * Get app setup status (brand, triggers, actions, agents, readiness).
152
152
  */
153
153
  getStatus(): Promise<AppStatus>;
154
+ /**
155
+ * The numbers Ziggy shows the owner (GET /v1/apps/scores). Health only for now: every part that
156
+ * applies with its score, or null when Ziggy has not measured it, and an overall only when enough
157
+ * is measured. Growth and Ziggy's impact will be added as new fields.
158
+ */
159
+ getScores(): Promise<ScoresResponse>;
154
160
  /**
155
161
  * Mark the owner Connected moment complete (ZIG-119).
156
162
  * Called from the host overlay after engage/dismiss.
package/dist/index.d.ts CHANGED
@@ -134,7 +134,7 @@ export declare class ZiggyClient {
134
134
  */
135
135
  disconnect(): Promise<void>;
136
136
  }
137
- export type { RecommendationDiscussionReference, BrowserReviewDiscussionReference, ZiggyClientConfig, CreateSessionRequest, SessionResponse, SessionExperiences, ExperienceKey, ExperienceWalkthroughStep, SessionConfig, AgentSummary, CatalogAgent, AgentListResponse, CatalogTool, AgentDetailResponse, PageContext, ProcessContext, ContentContext, UserContext, ErrorEntry, SupportContext, ContextPushRequest, ContextPushResponse, ContextEvent, ChatRequest, ChatResponse, ChatAttachment, ActionRequest, ActionResponse, Confidence, Source, ToolUsage, StreamEvent, StreamStartEvent, AgentStartEvent, AgentSwitchEvent, ToolStartEvent, ToolProgressEvent, ToolResultEvent, ContentDeltaEvent, ContentDoneEvent, MetadataEvent, ReplyFeeling, StreamEndEvent, StreamErrorEvent, ToolErrorEvent, ReturnHandoffEvent, ActivityEvent, QuestStatusEvent, QuestStepUpdateEvent, QuestCompleteEvent, WalkthroughStep, UIHighlightEvent, UIScrollEvent, UIClickEvent, UITypeEvent, UIWalkthroughEvent, UINavigateEvent, UIScreenshotAnalysisEvent, UISurfaceEvent, HostActionEvent, ChatSurfaceMode, HostActionDefinition, RegisterHostActionsRequest, RegisterHostActionsResponse, ListHostActionsResponse, ScreenshotAnnotation, WalkthroughResult, BrandConfig, SpokenVoiceConfig, SpokenVoiceRecommendation, SpokenVoiceRecommendationsResponse, ProactiveTrigger, QuickAction, ToolInvokeRequest, ToolInvokeResponse, ReactionRequest, FeedbackRequest, Quest, QuestStep, TriggerCondition, TriggerRegistration, RegisterTriggersRequest, RegisterTriggersResponse, ListTriggersResponse, DeleteResponse, QuickActionSetConditions, QuickActionSet, RegisterQuickActionsRequest, RegisterQuickActionsResponse, ListQuickActionsResponse, RegisterBrandRequest, OwnerProfileFields, SetProfileResponse, AddDomainConceptRequest, AddDomainConceptResponse, GetBrandResponse, PublicBrandResponse, SetCredentialsRequest, SetCredentialsResponse, GetCredentialsResponse, AppCallbackResponse, Ticket, CreateTicketRequest, CreateTicketResponse, UpdateTicketRequest, TicketFilters, TicketResponse, CreateTicketResponseRequest, TicketAnalysis, TimelineEvent, TicketTimeline, TicketConversation, TriageTicket, TicketPattern, MediaAttachment, RequestUploadRequest, RequestUploadResponse, ConfirmUploadResponse, UploadMediaRequest, UploadMediaResponse, VoiceTokenResponse, VoiceTtsResult, VoiceTtsAudio, VoiceTtsFallback, LiveConversationState, LiveSessionCreateRequest, LiveSessionCreateResponse, LiveSessionCloseResponse, LiveInterruptResponse, LiveSessionStatus, LiveStateEvent, LiveTranscriptEvent, LiveTurnEvent, LiveCommentaryEvent, LiveUsageEvent, LiveClosedEvent, DiscoveryJobStatus, PageType, DiscoveryJob, DiscoveredPage, AnalysisType, AnalysisIssue, AnalysisResult, SpecialistAnalysis, AppPersona, TestScenario, TestStrategy, ChangeEvent, ScreenshotConfig, ScreencastConfig, ScreencastFrame, TestRunStatus, TestResultStatus, TestRun, TestResult, StepResult, TestInsight, TriggerDiscoveryRequest, TriggerAnalysisRequest, GeneratePersonasRequest, GenerateTestScenariosRequest, GenerateTestStrategyRequest, DetectChangesRequest, CaptureScreenshotsRequest, StartTestRunRequest, AnalyzeTestRunRequest, ConversationPartnerState, ConversationPartnerCommand, ConversationMessage, ConversationSummary, ConversationDetail, ConversationMessagesPage, AppStatus, VerifyResponse, AppAvailabilityResponse, AppPlanState, ChatAvailability, ChatFallback, YoloConfig, SetYoloConfigRequest, DeploymentSettings, UpdateDeploymentSettingsRequest, TriageConfig, SetTriageConfigRequest, ToolConfig, SetToolConfigRequest, ObservationCycle, ObservationCycleDetail, Observation, HealthScore, HealthScoreResponse, SignalsResponse, SelfTestCycle, SelfTestCycleDetail, SuiteResult, SelfTestResult, TestingBrainReport, SelfTestTrend, TriggerResponse, EngineeringJob, EngineeringProposal, ProposalDeployment, TriggerEngineeringRequest, UpdateProposalRequest, TriggerDeploymentRequest, UpdateDeploymentRequest, AuditTriggerResponse, ObserverConfigResponse, DesignTokens, ComponentSpec, DesignSystemResponse, DesignTokensResponse, ComponentSpecResponse, Notification, NotificationType, NotificationSeverity, NotificationStatus, NotificationsResponse, NotificationCountResponse, CodeChangeEvent, SignificanceLevel, StreamCollectingEvent, StreamQueuedEvent, StreamSteeringEvent, StreamInterruptedEvent, CoalesceResponse, TurnMetrics, TurnStartedEvent, TurnMetricsEvent, TurnCompletedEvent, SpanStartedEvent, SpanCompletedEvent, SpanErrorEvent, UICaptureScreenshotEvent, CrewPlanEvent, AgentDispatchedEvent, AgentProgressEvent, AgentFindingEvent, AgentCompleteEvent, CrewSynthesisEvent, CrewCompleteEvent, CrewAwaitingApprovalEvent, CrewApprovedEvent, CrewCancelledEvent, CrewStoppedEvent, AgentHandoffEvent, HookName, HookStyle, WebhookHook, CreateHookRequest, UpdateHookRequest, ListHooksResponse, InboundSignalStatus, InboundSignalOutcome, InboundSignalEnvironment, InboundSignalPriority, InboundSignalRelease, InboundSignal, CreateInboundSignalRequest, CreateInboundSignalResponse, InboundSignalFilters, InboundSignalDetailResponse, SignalAutomationMode, AutomationPolicy, SetAutomationPolicyRequest, SignalWebhookEventType, SignalWebhookSubscription, CreateSignalWebhookSubscriptionRequest, UpdateSignalWebhookSubscriptionRequest, CreateSignalWebhookSubscriptionResponse, SignalWebhookDeliveryStatus, SignalWebhookDelivery, RoomParticipantKind, RoomParticipantRole, RoomParticipantMode, RoomPresenceState, Participant, RoomEventType, RoomEvent, RoutingSignal, ReclaimSignal, RoutingEvent, RoomParticipantsResponse, InviteHumanRequest, InviteHumanResponse, } from './types.js';
137
+ export type { RecommendationDiscussionReference, BrowserReviewDiscussionReference, ZiggyClientConfig, CreateSessionRequest, SessionResponse, SessionExperiences, ExperienceKey, ExperienceWalkthroughStep, SessionConfig, AgentSummary, CatalogAgent, AgentListResponse, CatalogTool, AgentDetailResponse, PageContext, ProcessContext, ContentContext, UserContext, ErrorEntry, SupportContext, ContextPushRequest, ContextPushResponse, ContextEvent, ChatRequest, ChatResponse, ChatAttachment, ActionRequest, ActionResponse, Confidence, Source, ToolUsage, StreamEvent, StreamStartEvent, AgentStartEvent, AgentSwitchEvent, ToolStartEvent, ToolProgressEvent, ToolResultEvent, ContentDeltaEvent, ContentDoneEvent, MetadataEvent, ReplyFeeling, StreamEndEvent, StreamErrorEvent, ToolErrorEvent, ReturnHandoffEvent, ActivityEvent, QuestStatusEvent, QuestStepUpdateEvent, QuestCompleteEvent, WalkthroughStep, UIHighlightEvent, UIScrollEvent, UIClickEvent, UITypeEvent, UIWalkthroughEvent, UINavigateEvent, UIScreenshotAnalysisEvent, UISurfaceEvent, HostActionEvent, UICardEvent, GuideCard, GuideRecordCard, GuideStepCard, ChatSurfaceMode, HostActionDefinition, RegisterHostActionsRequest, RegisterHostActionsResponse, ListHostActionsResponse, ScreenshotAnnotation, WalkthroughResult, BrandConfig, SpokenVoiceConfig, SpokenVoiceRecommendation, SpokenVoiceRecommendationsResponse, ProactiveTrigger, QuickAction, ToolInvokeRequest, ToolInvokeResponse, ReactionRequest, FeedbackRequest, Quest, QuestStep, TriggerCondition, TriggerRegistration, RegisterTriggersRequest, RegisterTriggersResponse, ListTriggersResponse, DeleteResponse, QuickActionSetConditions, QuickActionSet, RegisterQuickActionsRequest, RegisterQuickActionsResponse, ListQuickActionsResponse, RegisterBrandRequest, OwnerProfileFields, SetProfileResponse, AddDomainConceptRequest, AddDomainConceptResponse, GetBrandResponse, PublicBrandResponse, SetCredentialsRequest, SetCredentialsResponse, GetCredentialsResponse, AppCallbackResponse, Ticket, CreateTicketRequest, CreateTicketResponse, UpdateTicketRequest, TicketFilters, TicketResponse, CreateTicketResponseRequest, TicketAnalysis, TimelineEvent, TicketTimeline, TicketConversation, TriageTicket, TicketPattern, MediaAttachment, RequestUploadRequest, RequestUploadResponse, ConfirmUploadResponse, UploadMediaRequest, UploadMediaResponse, VoiceTokenResponse, VoiceTtsResult, VoiceTtsAudio, VoiceTtsFallback, LiveConversationState, LiveSessionCreateRequest, LiveSessionCreateResponse, LiveSessionCloseResponse, LiveInterruptResponse, LiveSessionStatus, LiveStateEvent, LiveTranscriptEvent, LiveTurnEvent, LiveCommentaryEvent, LiveUsageEvent, LiveClosedEvent, DiscoveryJobStatus, PageType, DiscoveryJob, DiscoveredPage, AnalysisType, AnalysisIssue, AnalysisResult, SpecialistAnalysis, AppPersona, TestScenario, TestStrategy, ChangeEvent, ScreenshotConfig, ScreencastConfig, ScreencastFrame, TestRunStatus, TestResultStatus, TestRun, TestResult, StepResult, TestInsight, TriggerDiscoveryRequest, TriggerAnalysisRequest, GeneratePersonasRequest, GenerateTestScenariosRequest, GenerateTestStrategyRequest, DetectChangesRequest, CaptureScreenshotsRequest, StartTestRunRequest, AnalyzeTestRunRequest, ConversationPartnerState, ConversationPartnerCommand, ConversationMessage, ConversationSummary, ConversationDetail, ConversationMessagesPage, AppStatus, VerifyResponse, AppAvailabilityResponse, AppPlanState, ChatAvailability, ChatFallback, YoloConfig, SetYoloConfigRequest, DeploymentSettings, UpdateDeploymentSettingsRequest, TriageConfig, SetTriageConfigRequest, ToolConfig, SetToolConfigRequest, ObservationCycle, ObservationCycleDetail, Observation, HealthScore, HealthScoreResponse, HealthPart, HealthPartView, AppHealthView, ScoresResponse, SignalsResponse, SelfTestCycle, SelfTestCycleDetail, SuiteResult, SelfTestResult, TestingBrainReport, SelfTestTrend, TriggerResponse, EngineeringJob, EngineeringProposal, ProposalDeployment, TriggerEngineeringRequest, UpdateProposalRequest, TriggerDeploymentRequest, UpdateDeploymentRequest, AuditTriggerResponse, ObserverConfigResponse, DesignTokens, ComponentSpec, DesignSystemResponse, DesignTokensResponse, ComponentSpecResponse, Notification, NotificationType, NotificationSeverity, NotificationStatus, NotificationsResponse, NotificationCountResponse, CodeChangeEvent, SignificanceLevel, StreamCollectingEvent, StreamQueuedEvent, StreamSteeringEvent, StreamInterruptedEvent, CoalesceResponse, TurnMetrics, TurnStartedEvent, TurnMetricsEvent, TurnCompletedEvent, SpanStartedEvent, SpanCompletedEvent, SpanErrorEvent, UICaptureScreenshotEvent, CrewPlanEvent, AgentDispatchedEvent, AgentProgressEvent, AgentFindingEvent, AgentCompleteEvent, CrewSynthesisEvent, CrewCompleteEvent, CrewAwaitingApprovalEvent, CrewApprovedEvent, CrewCancelledEvent, CrewStoppedEvent, AgentHandoffEvent, HookName, HookStyle, WebhookHook, CreateHookRequest, UpdateHookRequest, ListHooksResponse, InboundSignalStatus, InboundSignalOutcome, InboundSignalEnvironment, InboundSignalPriority, InboundSignalRelease, InboundSignal, CreateInboundSignalRequest, CreateInboundSignalResponse, InboundSignalFilters, InboundSignalDetailResponse, SignalAutomationMode, AutomationPolicy, SetAutomationPolicyRequest, SignalWebhookEventType, SignalWebhookSubscription, CreateSignalWebhookSubscriptionRequest, UpdateSignalWebhookSubscriptionRequest, CreateSignalWebhookSubscriptionResponse, SignalWebhookDeliveryStatus, SignalWebhookDelivery, RoomParticipantKind, RoomParticipantRole, RoomParticipantMode, RoomPresenceState, Participant, RoomEventType, RoomEvent, RoutingSignal, ReclaimSignal, RoutingEvent, RoomParticipantsResponse, InviteHumanRequest, InviteHumanResponse, } from './types.js';
138
138
  export { ZiggyError, ZiggyConnectionError } from './errors.js';
139
139
  export { LocalStoragePersistence } from './persistence.js';
140
140
  export type { PersistenceAdapter } from './persistence.js';
package/dist/index.js CHANGED
@@ -1310,6 +1310,15 @@ var AppClient = class {
1310
1310
  async getStatus() {
1311
1311
  return this.connection.request("GET", "/apps/status");
1312
1312
  }
1313
+ // ─── Scores ─────────────────────────────────────────────────────────────────
1314
+ /**
1315
+ * The numbers Ziggy shows the owner (GET /v1/apps/scores). Health only for now: every part that
1316
+ * applies with its score, or null when Ziggy has not measured it, and an overall only when enough
1317
+ * is measured. Growth and Ziggy's impact will be added as new fields.
1318
+ */
1319
+ async getScores() {
1320
+ return this.connection.request("GET", "/apps/scores");
1321
+ }
1313
1322
  /**
1314
1323
  * Mark the owner Connected moment complete (ZIG-119).
1315
1324
  * Called from the host overlay after engage/dismiss.
@@ -2008,7 +2017,10 @@ var ObserverClient = class {
2008
2017
  async getCycle(cycleId) {
2009
2018
  return this.connection.request("GET", `/observer/cycles/${cycleId}`);
2010
2019
  }
2011
- /** Get latest health score and trend history. */
2020
+ /**
2021
+ * @deprecated Version-1 health. The server now always answers `healthScore: null` and will remove
2022
+ * `GET /v1/observer/health` (see its `Sunset` header). Use `client.app.getScores()`.
2023
+ */
2012
2024
  async getHealth() {
2013
2025
  return this.connection.request("GET", "/observer/health");
2014
2026
  }
@@ -14,7 +14,10 @@ export declare class ObserverClient {
14
14
  }>;
15
15
  /** Get a specific observation cycle with full detail. */
16
16
  getCycle(cycleId: string): Promise<ObservationCycleDetail>;
17
- /** Get latest health score and trend history. */
17
+ /**
18
+ * @deprecated Version-1 health. The server now always answers `healthScore: null` and will remove
19
+ * `GET /v1/observer/health` (see its `Sunset` header). Use `client.app.getScores()`.
20
+ */
18
21
  getHealth(): Promise<HealthScoreResponse>;
19
22
  /** Get current signal intelligence snapshot. */
20
23
  getSignals(): Promise<SignalsResponse>;
package/dist/types.d.ts CHANGED
@@ -426,7 +426,7 @@ export interface ToolUsage {
426
426
  durationMs: number;
427
427
  success: boolean;
428
428
  }
429
- export type StreamEvent = StreamStartEvent | RoutingEvent | AgentStartEvent | AgentSwitchEvent | CounselStartEvent | CounselEndEvent | DelegationAnnouncementEvent | ReturnHandoffEvent | ActivityEvent | ToolStartEvent | ToolProgressEvent | ToolResultEvent | ToolErrorEvent | ContentDeltaEvent | ContentDoneEvent | MetadataEvent | StreamEndEvent | StreamErrorEvent | QuestStatusEvent | QuestStepUpdateEvent | QuestCompleteEvent | UIHighlightEvent | UIScrollEvent | UIClickEvent | UITypeEvent | UIWalkthroughEvent | UINavigateEvent | UICaptureScreenshotEvent | UIScreenshotAnalysisEvent | UISurfaceEvent | HostActionEvent | StreamCollectingEvent | StreamQueuedEvent | StreamSteeringEvent | StreamInterruptedEvent | TurnStartedEvent | TurnMetricsEvent | TurnCompletedEvent | SpanStartedEvent | SpanCompletedEvent | SpanErrorEvent | CrewPlanEvent | AgentDispatchedEvent | AgentProgressEvent | AgentFindingEvent | AgentCompleteEvent | CrewSynthesisEvent | CrewCompleteEvent | CrewAwaitingApprovalEvent | CrewApprovedEvent | CrewCancelledEvent | CrewStoppedEvent | AgentHandoffEvent | CrewProposalsEvent | HeartbeatEvent | LiveStateEvent | LiveTranscriptEvent | LiveTurnEvent | LiveCommentaryEvent | LiveUsageEvent | LiveClosedEvent;
429
+ export type StreamEvent = StreamStartEvent | RoutingEvent | AgentStartEvent | AgentSwitchEvent | CounselStartEvent | CounselEndEvent | DelegationAnnouncementEvent | ReturnHandoffEvent | ActivityEvent | ToolStartEvent | ToolProgressEvent | ToolResultEvent | ToolErrorEvent | ContentDeltaEvent | ContentDoneEvent | MetadataEvent | StreamEndEvent | StreamErrorEvent | QuestStatusEvent | QuestStepUpdateEvent | QuestCompleteEvent | UIHighlightEvent | UIScrollEvent | UIClickEvent | UITypeEvent | UIWalkthroughEvent | UINavigateEvent | UICaptureScreenshotEvent | UIScreenshotAnalysisEvent | UISurfaceEvent | UICardEvent | HostActionEvent | StreamCollectingEvent | StreamQueuedEvent | StreamSteeringEvent | StreamInterruptedEvent | TurnStartedEvent | TurnMetricsEvent | TurnCompletedEvent | SpanStartedEvent | SpanCompletedEvent | SpanErrorEvent | CrewPlanEvent | AgentDispatchedEvent | AgentProgressEvent | AgentFindingEvent | AgentCompleteEvent | CrewSynthesisEvent | CrewCompleteEvent | CrewAwaitingApprovalEvent | CrewApprovedEvent | CrewCancelledEvent | CrewStoppedEvent | AgentHandoffEvent | CrewProposalsEvent | HeartbeatEvent | LiveStateEvent | LiveTranscriptEvent | LiveTurnEvent | LiveCommentaryEvent | LiveUsageEvent | LiveClosedEvent;
430
430
  export interface StreamStartEvent {
431
431
  type: 'stream.start';
432
432
  streamId: string;
@@ -733,6 +733,49 @@ export interface UISurfaceEvent {
733
733
  mode: ChatSurfaceMode;
734
734
  seq: number;
735
735
  }
736
+ /** A record shown with where it came from: built by the server from the stored record, never written by a model. */
737
+ export interface GuideRecordCard {
738
+ kind: 'record';
739
+ id: string;
740
+ record: 'finding';
741
+ area: 'site' | 'brand' | 'visitors' | 'marketing' | 'code';
742
+ title: string;
743
+ detail: string | null;
744
+ severity: 'high' | 'medium' | 'low';
745
+ source: {
746
+ page: string | null;
747
+ quote: string | null;
748
+ foundBy: string;
749
+ };
750
+ }
751
+ /**
752
+ * One next step. `button` names an action the Console already has on a screen; it is null when the step needs a
753
+ * form or when this caller may not take it. The server does nothing when the card is made: the host presses the
754
+ * button through its own function for that action.
755
+ */
756
+ export interface GuideStepCard {
757
+ kind: 'step';
758
+ id: string;
759
+ step: 'add_website' | 'start_review' | 'confirm_profile' | 'add_missing_details' | 'put_assistant_on_site' | 'turn_on_handoff' | 'answer_open_questions';
760
+ title: string;
761
+ why: string;
762
+ button: {
763
+ action: 'confirm_profile' | 'turn_on_handoff' | 'start_review';
764
+ label: string;
765
+ } | null;
766
+ screen: {
767
+ name: 'overview' | 'profile' | 'settings' | 'install' | 'questions';
768
+ label: string;
769
+ };
770
+ ownerOnly: string | null;
771
+ }
772
+ export type GuideCard = GuideRecordCard | GuideStepCard;
773
+ /** A card in the reply being streamed (SDK 1.8.0+). */
774
+ export interface UICardEvent {
775
+ type: 'ui.card';
776
+ card: GuideCard;
777
+ seq: number;
778
+ }
736
779
  /** Ask the host SDK to run a registered headless action */
737
780
  export interface HostActionEvent {
738
781
  type: 'host.action';
@@ -2323,6 +2366,49 @@ export interface HealthScore {
2323
2366
  trend: 'improving' | 'stable' | 'degrading';
2324
2367
  computedAt: string;
2325
2368
  }
2369
+ /** A part of app health (version 2). Accessibility joins the number in a later release. */
2370
+ export type HealthPart = 'security' | 'quality' | 'tests' | 'architecture' | 'userTrouble' | 'documentation' | 'accessibility';
2371
+ /** One part of health: its score, or null for "not measured", and where the score came from. */
2372
+ export interface HealthPartView {
2373
+ part: HealthPart;
2374
+ /** What the owner sees, for example "problems users hit". */
2375
+ label: string;
2376
+ /** The part's share of the overall when every part that applies is measured. */
2377
+ weight: number;
2378
+ /** Null when Ziggy has not measured this part. It is never a default. */
2379
+ score: number | null;
2380
+ /** The analysis the score came from, the commit it inspected and when it was measured, when recorded. */
2381
+ analysisId: string | null;
2382
+ measuredAt: string | null;
2383
+ revision: string | null;
2384
+ }
2385
+ /** The app's health, version 2: only what Ziggy has measured counts. */
2386
+ export interface AppHealthView {
2387
+ healthVersion: number;
2388
+ /** Null when fewer than two parts, or less than half the weight that applies, are measured. */
2389
+ overallScore: number | null;
2390
+ /** Share of the applicable weight that is measured, 0 to 1. */
2391
+ coverage: number;
2392
+ measuredCount: number;
2393
+ applicableCount: number;
2394
+ trend: 'improving' | 'stable' | 'degrading';
2395
+ /** False until two earlier records measured the same parts the same way; the trend is then "stable". */
2396
+ trendComparable: boolean;
2397
+ /** One plain sentence: what the number rests on and what is not measured. */
2398
+ sentence: string;
2399
+ newMethodNotice: boolean;
2400
+ /** Every part that applies to the app. */
2401
+ parts: HealthPartView[];
2402
+ /** Open test gaps, a fact shown even when tests have no coverage figure. */
2403
+ testsOpenGaps: number | null;
2404
+ computedAt: string;
2405
+ }
2406
+ /** GET /v1/apps/scores. Growth and Ziggy's impact will be added as new fields. */
2407
+ export interface ScoresResponse {
2408
+ /** Null until Ziggy has computed the app's health. */
2409
+ health: AppHealthView | null;
2410
+ }
2411
+ /** @deprecated Version-1 health. `GET /v1/observer/health` now always answers `healthScore: null`; use `client.app.getScores()`. */
2326
2412
  export interface HealthScoreResponse {
2327
2413
  healthScore: HealthScore | null;
2328
2414
  history: Array<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ziggy-ai/client-sdk",
3
- "version": "1.7.1",
3
+ "version": "1.9.0",
4
4
  "description": "Client SDK for integrating with Ziggy's v1 API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",