@ateam-ai-mobile/core 0.1.35 → 0.1.38

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.d.mts CHANGED
@@ -916,6 +916,13 @@ declare const DETAILS_BLOCK_CLOSE = "\uE103";
916
916
  */
917
917
  declare const DIAGRAM_BLOCK_OPEN = "\uE104";
918
918
  declare const DIAGRAM_BLOCK_CLOSE = "\uE105";
919
+ /** The same for the other visual kinds (the registry `VISUALS` below says which is which): chart, comparison, timeline. */
920
+ declare const CHART_BLOCK_OPEN = "\uE106";
921
+ declare const CHART_BLOCK_CLOSE = "\uE107";
922
+ declare const COMPARISON_BLOCK_OPEN = "\uE108";
923
+ declare const COMPARISON_BLOCK_CLOSE = "\uE109";
924
+ declare const TIMELINE_BLOCK_OPEN = "\uE10A";
925
+ declare const TIMELINE_BLOCK_CLOSE = "\uE10B";
919
926
  /** A block of a conversation turn, as /api/conversation serves it. */
920
927
  interface ConversationBlock {
921
928
  kind: string;
@@ -932,39 +939,144 @@ interface ConversationBlock {
932
939
  */
933
940
  declare const DIAGRAM_STATUSES: readonly ["ok", "bad", "warn", "info"];
934
941
  type DiagramStatus = (typeof DIAGRAM_STATUSES)[number];
935
- interface DiagramView {
942
+ interface DiagramStep {
936
943
  title: string;
937
- steps: Array<{
938
- title: string;
944
+ text: string;
945
+ status: DiagramStatus | '';
946
+ badges: Array<{
939
947
  text: string;
940
948
  status: DiagramStatus | '';
941
- badges: Array<{
942
- text: string;
943
- status: DiagramStatus | '';
944
- }>;
945
949
  }>;
950
+ /** A decision (a gate): drawn as a dashed card with a diamond number. */
951
+ decision: boolean;
952
+ /**
953
+ * The ways out of this step, `to` a 1-based step number. null = the natural arrow to the following step (a straight list is all
954
+ * null). [] = an end. Core settles them (backend `diagramOf`); this is the phone's net.
955
+ */
956
+ next: Array<{
957
+ to: number;
958
+ label: string;
959
+ }> | null;
960
+ }
961
+ interface DiagramView {
962
+ title: string;
963
+ steps: DiagramStep[];
946
964
  }
947
965
  /**
948
966
  * The diagram a block holds, ready to draw, every field text; null when there is nothing to draw (fewer than 2 steps). Core sends it
949
- * clean (`diagramOf`); this is the phone's own net, so a field of the wrong type can never reach a native <Text>.
967
+ * clean (`diagramOf`); this is the phone's own net, so a field of the wrong type can never reach a native <Text>, and a way out that
968
+ * points at a step that is not there is dropped (the numbers follow the steps that remain).
950
969
  */
951
970
  declare function diagramView(content: any): DiagramView | null;
952
- /** A diagram as readable text, the same numbered list Core gives other channels (backend `diagramToText`). */
971
+ /** Where each arrow of a step is drawn: the arrow down to the next step, the jumps ahead, the loops back. */
972
+ interface DiagramFlow {
973
+ /** The arrow to the following step, with its label ('' = none); null = no arrow (this step does not flow into the next). */
974
+ arrow: {
975
+ label: string;
976
+ } | null;
977
+ /** Ways out that skip ahead: drawn as a "Go to step N" pill under the step. */
978
+ jumps: Array<{
979
+ to: number;
980
+ label: string;
981
+ }>;
982
+ /** Ways out that go back to an earlier step: drawn as a loop in the margin. */
983
+ loops: Array<{
984
+ to: number;
985
+ label: string;
986
+ }>;
987
+ }
988
+ /** The ONE layout rule for the phone and the web: natural arrow, forward jumps, back loops. */
989
+ declare function diagramFlow(view: DiagramView): DiagramFlow[];
990
+ /** A diagram as readable text, the same list Core gives other channels (backend `diagramToText`). */
953
991
  declare function diagramAsText(d: DiagramView): string;
992
+ /** How a number is written on a chart and in its text form: at most 2 decimals (0.1 + 0.2 is 0.3), the same as Core's text form. */
993
+ declare const numText: (n: number) => string;
994
+ interface ChartSeries {
995
+ name: string;
996
+ values: number[];
997
+ }
998
+ interface ChartView {
999
+ title: string;
1000
+ type: 'bar' | 'line';
1001
+ labels: string[];
1002
+ series: ChartSeries[];
1003
+ unit: string;
1004
+ /** One of the labels, or ''. */
1005
+ highlight: string;
1006
+ }
1007
+ /** The chart a block holds, ready to draw; null when there is nothing to draw (fewer than 2 points, or no readable series). */
1008
+ declare function chartView(content: any): ChartView | null;
1009
+ /** Where values sit between the baseline and the top: always spans zero, so a bar grows from a zero line; a flat chart still has a span. */
1010
+ declare function chartScale(view: ChartView): {
1011
+ lo: number;
1012
+ hi: number;
1013
+ };
1014
+ declare function chartAsText(view: ChartView): string;
1015
+ interface ComparisonRow {
1016
+ text: string;
1017
+ ok: boolean | null;
1018
+ }
1019
+ interface ComparisonOption {
1020
+ name: string;
1021
+ price: string;
1022
+ badge: string;
1023
+ best: boolean;
1024
+ rows: ComparisonRow[];
1025
+ }
1026
+ interface ComparisonView {
1027
+ title: string;
1028
+ options: ComparisonOption[];
1029
+ }
1030
+ /** The comparison a block holds (2 or 3 options, at most one best); null when there is nothing to draw. */
1031
+ declare function comparisonView(content: any): ComparisonView | null;
1032
+ declare function comparisonAsText(view: ComparisonView): string;
1033
+ interface TimelineEvent {
1034
+ time: string;
1035
+ text: string;
1036
+ }
1037
+ interface TimelineDay {
1038
+ title: string;
1039
+ events: TimelineEvent[];
1040
+ }
1041
+ interface TimelineView {
1042
+ title: string;
1043
+ subtitle: string;
1044
+ days: TimelineDay[];
1045
+ }
1046
+ /** The timeline a block holds; null when there is nothing to draw (fewer than 2 events in all). */
1047
+ declare function timelineView(content: any): TimelineView | null;
1048
+ declare function timelineAsText(view: TimelineView): string;
1049
+ /** The visual block kinds the phone draws, each between its own pair of sentinels. Same four as Core's `VISUALS` (backend utils/blockShape.js). */
1050
+ type VisualKind = 'diagram' | 'chart' | 'comparison' | 'timeline';
1051
+ /**
1052
+ * THE REGISTRY of visual kinds on the phone: for each, its sentinels, the net that reads the content into a clean view (null when
1053
+ * there is nothing to draw), and the view's text form (what copy and a screen reader are given). A new kind is one more entry here,
1054
+ * one component in the UI package (`VISUAL_BLOCKS`), and one in Core; nothing else names a visual.
1055
+ */
1056
+ declare const VISUALS: Record<VisualKind, {
1057
+ open: string;
1058
+ close: string;
1059
+ view: (content: any) => any | null;
1060
+ asText: (view: any) => string;
1061
+ }>;
1062
+ /** Whether a block kind is a visual the phone knows. */
1063
+ declare const isVisualKind: (kind: any) => kind is VisualKind;
1064
+ /** The clean view inside a visual segment's payload (still percent-encoded, as `splitBlockSegments` gives it), or null when it cannot be read. */
1065
+ declare function visualViewOf(kind: VisualKind, payload: string): any | null;
954
1066
  /**
955
1067
  * Extract display text from a conversation turn's blocks. Handles multiple block kinds (text, code, json, markdown, table, html).
956
1068
  * Every block that holds something is in the result, in order; a block Core marked `meta.display: "folded"` is wrapped in the
957
1069
  * DETAILS sentinels so the bubble draws it closed.
958
1070
  */
959
1071
  declare function blocksToText(blocks?: ConversationBlock[]): string;
960
- /** One piece of a flat message string, as the bubble draws it: markdown, a table payload, a diagram payload, or a closed "Details" payload. */
1072
+ /** One piece of a flat message string, as the bubble draws it: markdown, a table payload, a visual payload, or a closed "Details" payload. */
961
1073
  interface BlockSegment {
962
- kind: 'md' | 'table' | 'details' | 'diagram';
963
- /** md: the markdown. table / details / diagram: the still percent-encoded payload between the sentinels. */
1074
+ kind: 'md' | 'table' | 'details' | VisualKind;
1075
+ /** md: the markdown. table / details / a visual: the still percent-encoded payload between the sentinels. */
964
1076
  content: string;
965
1077
  }
966
1078
  /**
967
- * Split a flat message string on the table, details and diagram sentinels, in order. A string with none is one markdown segment. An
1079
+ * Split a flat message string on the table, details and visual sentinels, in order. A string with none is one markdown segment. An
968
1080
  * unterminated marker is kept as markdown from the marker on, so nothing is lost.
969
1081
  */
970
1082
  declare function splitBlockSegments(content: string): BlockSegment[];
@@ -1135,6 +1247,7 @@ declare const borderRadius: {
1135
1247
  * DELETE /api/acs/artifacts/{id} — user-initiated retire (idempotent)
1136
1248
  * PATCH /api/acs/artifacts/{id} — visibility + rename
1137
1249
  * PUT /api/acs/order — drag-reorder
1250
+ * GET /api/acs/launcher — where each of my widgets sits in the Apps grid
1138
1251
  * GET /api/acs/home-actions — top-actions feed (+ PATCH/PUT order)
1139
1252
  * WS topics acs.artifacts / acs.home-actions — cross-device sync (see ./ws)
1140
1253
  */
@@ -1234,6 +1347,29 @@ declare function setOrder(pinned: string[]): Promise<{
1234
1347
  * (e.g. 'home' for the carousel).
1235
1348
  */
1236
1349
  declare function recordEvent(artifactId: string, event: AcsEvent, surface?: AcsSurface): Promise<void>;
1350
+ /** One of my widgets in the Apps grid: its plugin id (acs:art_… / actor_skills:…) and display name. */
1351
+ interface LauncherPlace {
1352
+ id: string;
1353
+ name?: string;
1354
+ }
1355
+ /** Where each of my widgets sits in the Apps grid. A widget in none of them lives in its chat. */
1356
+ interface LauncherPlaces {
1357
+ mine: LauncherPlace[];
1358
+ resting: LauncherPlace[];
1359
+ hidden: string[];
1360
+ }
1361
+ /**
1362
+ * Where each of my widgets sits in the Apps grid (GET /api/acs/launcher). The rule is the server's
1363
+ * (ACS projection/launcherPlace.js) and the web's Apps panel reads the same answer. null when there
1364
+ * is no answer: the picker then keeps its full list, so nothing disappears on a failed read.
1365
+ */
1366
+ declare function fetchLauncherPlaces(): Promise<LauncherPlaces | null>;
1367
+ /**
1368
+ * The person opened one of their own ACS widgets themselves: a tile in the Apps grid ('apps') or
1369
+ * its button in a chat ('chat'). That is what keeps it in (or brings it back to) My apps.
1370
+ * Fire-and-forget; any other id is ignored (only ACS widgets fold when unused).
1371
+ */
1372
+ declare function recordWidgetOpen(pluginId: string, surface: 'apps' | 'chat'): void;
1237
1373
  type HomeActionLeaf = {
1238
1374
  type: 'send_message';
1239
1375
  prompt: string;
@@ -1428,4 +1564,4 @@ interface AcsKvStorage {
1428
1564
  }
1429
1565
  declare function setAcsCacheStorage(kv: AcsKvStorage | null): void;
1430
1566
 
1431
- export { type AcsArtifact, type AcsDeleteReason, type AcsEvent, type AcsKvStorage, type AcsPatchReason, type AcsReachabilityReporter, type AcsSurface, type AdasConfig, type AdasGateFlags, type AdasPhase, type AdasSession, type AdasUser, type AttachmentCache, type AttachmentPreview, type AuthSession, type AuthSessionDeps, type AuthSessionState, type BlockSegment, type BufferedCommand, type ChannelPrefs, type ConsumerCapabilityConfig, type ConsumerProviderConfig, type ConsumerSignInResult, type ConversationBlock, DETAILS_BLOCK_CLOSE, DETAILS_BLOCK_OPEN, DIAGRAM_BLOCK_CLOSE, DIAGRAM_BLOCK_OPEN, DIAGRAM_STATUSES, type DeleteResult, type DevModeState, type DevicePlatform, type DiagramStatus, type DiagramView, type DispatchRow, type FileUploadRequest, type FileUploader, type HandoffExchangeResult, type HomeAction, type HomeActionLeaf, type HomeActionReason, type InvitePreview, type JobProgress, MAX_ATTACHMENT_BYTES, MAX_INLINE_ATTACHMENT_BYTES, type Message, type MessageAttachment, type NotifChannel, type NotifPrefs, type OtpStartResult, type OutgoingAttachment, type PatchResult, PluginCommandEmitter, type PushBackend, type PushRegistration, type QuietHoursPrefs, type RefreshOutcome, type RegisterDeviceResponse, type Session, type SessionEnv, type SessionPersistence, type SessionStatus, type SessionUser, TABLE_BLOCK_CLOSE, TABLE_BLOCK_OPEN, type TelegramBotInfo, type TenantMembership, type TenantRow, type TokenProvider, type ToolCall, type UIAction, type UploadedArtifact, type WireAttachment, type WorkspaceCapabilities, type WorkspaceSnapshot, type WorkspaceState, ada, apiFetch, apiFetchRaw, blocksToText, borderRadius, capabilityEnabled, closeChatStream, colors, connectAcsWs, connectorCall, createAuthSession, createPushRegistration, deleteArtifact, devModeFromCatalog, diagramAsText, diagramView, disconnectAcsWs, exchangeHandoff, fetchConsumerConfig, focusPlugin, fontSize, getConfig, getConsumerAuthApiUrl, getCoreApiUrl, getCoreWsUrl, getPrefs as getNotifPrefs, getTelegramBotInfo as getNotifTelegramBotInfo, getSession, getTenant, getToken, getUser, getVoiceApiUrl, initAdas, isAdasInitialized, isDevHost, joinWithApple, joinWithGoogle, linkChannelStart, linkChannelVerify, linkTelegram as linkNotifTelegram, listHomeActions, listMadeForYou, listMyTenants, listSurface, mcpFetch, mcpToolCall, nestByMaster, notifyAcsWsForeground, notifyAppForeground, onAppForeground, openJoinWithApple, openJoinWithGoogle, parseDeepLinkParam, parseHandoffCode, parseInviteCode, patchArtifact, patchHomeAction, plainTextOf, pluginCommandEmitter, postCommandResult, prepareAttachments, previewInvite, readDevMode, recentDispatches as recentNotifDispatches, recordEvent, refreshToken, registerHostIntent, registerDevice as registerPushDevice, resolveAdasPhase, setAcsCacheStorage, setAcsReachabilityReporter, setClientDeclarationProvider, setDevMode, setHomeActionOrder, setPrefs as setNotifPrefs, setOrder, signInWithApple, signInWithGoogle, spacing, splitBlockSegments, switchTenant, tenantFromToken, unlinkChannel as unlinkNotifChannel, unregisterDevice as unregisterPushDevice, unwrapMcpResult, useCapability, useChatStore, useHomeActionsStore, useWidgetsStore, useWorkspaceStore, userFromJwt };
1567
+ export { type AcsArtifact, type AcsDeleteReason, type AcsEvent, type AcsKvStorage, type AcsPatchReason, type AcsReachabilityReporter, type AcsSurface, type AdasConfig, type AdasGateFlags, type AdasPhase, type AdasSession, type AdasUser, type AttachmentCache, type AttachmentPreview, type AuthSession, type AuthSessionDeps, type AuthSessionState, type BlockSegment, type BufferedCommand, CHART_BLOCK_CLOSE, CHART_BLOCK_OPEN, COMPARISON_BLOCK_CLOSE, COMPARISON_BLOCK_OPEN, type ChannelPrefs, type ChartSeries, type ChartView, type ComparisonOption, type ComparisonRow, type ComparisonView, type ConsumerCapabilityConfig, type ConsumerProviderConfig, type ConsumerSignInResult, type ConversationBlock, DETAILS_BLOCK_CLOSE, DETAILS_BLOCK_OPEN, DIAGRAM_BLOCK_CLOSE, DIAGRAM_BLOCK_OPEN, DIAGRAM_STATUSES, type DeleteResult, type DevModeState, type DevicePlatform, type DiagramFlow, type DiagramStatus, type DiagramStep, type DiagramView, type DispatchRow, type FileUploadRequest, type FileUploader, type HandoffExchangeResult, type HomeAction, type HomeActionLeaf, type HomeActionReason, type InvitePreview, type JobProgress, type LauncherPlace, type LauncherPlaces, MAX_ATTACHMENT_BYTES, MAX_INLINE_ATTACHMENT_BYTES, type Message, type MessageAttachment, type NotifChannel, type NotifPrefs, type OtpStartResult, type OutgoingAttachment, type PatchResult, PluginCommandEmitter, type PushBackend, type PushRegistration, type QuietHoursPrefs, type RefreshOutcome, type RegisterDeviceResponse, type Session, type SessionEnv, type SessionPersistence, type SessionStatus, type SessionUser, TABLE_BLOCK_CLOSE, TABLE_BLOCK_OPEN, TIMELINE_BLOCK_CLOSE, TIMELINE_BLOCK_OPEN, type TelegramBotInfo, type TenantMembership, type TenantRow, type TimelineDay, type TimelineEvent, type TimelineView, type TokenProvider, type ToolCall, type UIAction, type UploadedArtifact, VISUALS, type VisualKind, type WireAttachment, type WorkspaceCapabilities, type WorkspaceSnapshot, type WorkspaceState, ada, apiFetch, apiFetchRaw, blocksToText, borderRadius, capabilityEnabled, chartAsText, chartScale, chartView, closeChatStream, colors, comparisonAsText, comparisonView, connectAcsWs, connectorCall, createAuthSession, createPushRegistration, deleteArtifact, devModeFromCatalog, diagramAsText, diagramFlow, diagramView, disconnectAcsWs, exchangeHandoff, fetchConsumerConfig, fetchLauncherPlaces, focusPlugin, fontSize, getConfig, getConsumerAuthApiUrl, getCoreApiUrl, getCoreWsUrl, getPrefs as getNotifPrefs, getTelegramBotInfo as getNotifTelegramBotInfo, getSession, getTenant, getToken, getUser, getVoiceApiUrl, initAdas, isAdasInitialized, isDevHost, isVisualKind, joinWithApple, joinWithGoogle, linkChannelStart, linkChannelVerify, linkTelegram as linkNotifTelegram, listHomeActions, listMadeForYou, listMyTenants, listSurface, mcpFetch, mcpToolCall, nestByMaster, notifyAcsWsForeground, notifyAppForeground, numText, onAppForeground, openJoinWithApple, openJoinWithGoogle, parseDeepLinkParam, parseHandoffCode, parseInviteCode, patchArtifact, patchHomeAction, plainTextOf, pluginCommandEmitter, postCommandResult, prepareAttachments, previewInvite, readDevMode, recentDispatches as recentNotifDispatches, recordEvent, recordWidgetOpen, refreshToken, registerHostIntent, registerDevice as registerPushDevice, resolveAdasPhase, setAcsCacheStorage, setAcsReachabilityReporter, setClientDeclarationProvider, setDevMode, setHomeActionOrder, setPrefs as setNotifPrefs, setOrder, signInWithApple, signInWithGoogle, spacing, splitBlockSegments, switchTenant, tenantFromToken, timelineAsText, timelineView, unlinkChannel as unlinkNotifChannel, unregisterDevice as unregisterPushDevice, unwrapMcpResult, useCapability, useChatStore, useHomeActionsStore, useWidgetsStore, useWorkspaceStore, userFromJwt, visualViewOf };
package/dist/index.d.ts CHANGED
@@ -916,6 +916,13 @@ declare const DETAILS_BLOCK_CLOSE = "\uE103";
916
916
  */
917
917
  declare const DIAGRAM_BLOCK_OPEN = "\uE104";
918
918
  declare const DIAGRAM_BLOCK_CLOSE = "\uE105";
919
+ /** The same for the other visual kinds (the registry `VISUALS` below says which is which): chart, comparison, timeline. */
920
+ declare const CHART_BLOCK_OPEN = "\uE106";
921
+ declare const CHART_BLOCK_CLOSE = "\uE107";
922
+ declare const COMPARISON_BLOCK_OPEN = "\uE108";
923
+ declare const COMPARISON_BLOCK_CLOSE = "\uE109";
924
+ declare const TIMELINE_BLOCK_OPEN = "\uE10A";
925
+ declare const TIMELINE_BLOCK_CLOSE = "\uE10B";
919
926
  /** A block of a conversation turn, as /api/conversation serves it. */
920
927
  interface ConversationBlock {
921
928
  kind: string;
@@ -932,39 +939,144 @@ interface ConversationBlock {
932
939
  */
933
940
  declare const DIAGRAM_STATUSES: readonly ["ok", "bad", "warn", "info"];
934
941
  type DiagramStatus = (typeof DIAGRAM_STATUSES)[number];
935
- interface DiagramView {
942
+ interface DiagramStep {
936
943
  title: string;
937
- steps: Array<{
938
- title: string;
944
+ text: string;
945
+ status: DiagramStatus | '';
946
+ badges: Array<{
939
947
  text: string;
940
948
  status: DiagramStatus | '';
941
- badges: Array<{
942
- text: string;
943
- status: DiagramStatus | '';
944
- }>;
945
949
  }>;
950
+ /** A decision (a gate): drawn as a dashed card with a diamond number. */
951
+ decision: boolean;
952
+ /**
953
+ * The ways out of this step, `to` a 1-based step number. null = the natural arrow to the following step (a straight list is all
954
+ * null). [] = an end. Core settles them (backend `diagramOf`); this is the phone's net.
955
+ */
956
+ next: Array<{
957
+ to: number;
958
+ label: string;
959
+ }> | null;
960
+ }
961
+ interface DiagramView {
962
+ title: string;
963
+ steps: DiagramStep[];
946
964
  }
947
965
  /**
948
966
  * The diagram a block holds, ready to draw, every field text; null when there is nothing to draw (fewer than 2 steps). Core sends it
949
- * clean (`diagramOf`); this is the phone's own net, so a field of the wrong type can never reach a native <Text>.
967
+ * clean (`diagramOf`); this is the phone's own net, so a field of the wrong type can never reach a native <Text>, and a way out that
968
+ * points at a step that is not there is dropped (the numbers follow the steps that remain).
950
969
  */
951
970
  declare function diagramView(content: any): DiagramView | null;
952
- /** A diagram as readable text, the same numbered list Core gives other channels (backend `diagramToText`). */
971
+ /** Where each arrow of a step is drawn: the arrow down to the next step, the jumps ahead, the loops back. */
972
+ interface DiagramFlow {
973
+ /** The arrow to the following step, with its label ('' = none); null = no arrow (this step does not flow into the next). */
974
+ arrow: {
975
+ label: string;
976
+ } | null;
977
+ /** Ways out that skip ahead: drawn as a "Go to step N" pill under the step. */
978
+ jumps: Array<{
979
+ to: number;
980
+ label: string;
981
+ }>;
982
+ /** Ways out that go back to an earlier step: drawn as a loop in the margin. */
983
+ loops: Array<{
984
+ to: number;
985
+ label: string;
986
+ }>;
987
+ }
988
+ /** The ONE layout rule for the phone and the web: natural arrow, forward jumps, back loops. */
989
+ declare function diagramFlow(view: DiagramView): DiagramFlow[];
990
+ /** A diagram as readable text, the same list Core gives other channels (backend `diagramToText`). */
953
991
  declare function diagramAsText(d: DiagramView): string;
992
+ /** How a number is written on a chart and in its text form: at most 2 decimals (0.1 + 0.2 is 0.3), the same as Core's text form. */
993
+ declare const numText: (n: number) => string;
994
+ interface ChartSeries {
995
+ name: string;
996
+ values: number[];
997
+ }
998
+ interface ChartView {
999
+ title: string;
1000
+ type: 'bar' | 'line';
1001
+ labels: string[];
1002
+ series: ChartSeries[];
1003
+ unit: string;
1004
+ /** One of the labels, or ''. */
1005
+ highlight: string;
1006
+ }
1007
+ /** The chart a block holds, ready to draw; null when there is nothing to draw (fewer than 2 points, or no readable series). */
1008
+ declare function chartView(content: any): ChartView | null;
1009
+ /** Where values sit between the baseline and the top: always spans zero, so a bar grows from a zero line; a flat chart still has a span. */
1010
+ declare function chartScale(view: ChartView): {
1011
+ lo: number;
1012
+ hi: number;
1013
+ };
1014
+ declare function chartAsText(view: ChartView): string;
1015
+ interface ComparisonRow {
1016
+ text: string;
1017
+ ok: boolean | null;
1018
+ }
1019
+ interface ComparisonOption {
1020
+ name: string;
1021
+ price: string;
1022
+ badge: string;
1023
+ best: boolean;
1024
+ rows: ComparisonRow[];
1025
+ }
1026
+ interface ComparisonView {
1027
+ title: string;
1028
+ options: ComparisonOption[];
1029
+ }
1030
+ /** The comparison a block holds (2 or 3 options, at most one best); null when there is nothing to draw. */
1031
+ declare function comparisonView(content: any): ComparisonView | null;
1032
+ declare function comparisonAsText(view: ComparisonView): string;
1033
+ interface TimelineEvent {
1034
+ time: string;
1035
+ text: string;
1036
+ }
1037
+ interface TimelineDay {
1038
+ title: string;
1039
+ events: TimelineEvent[];
1040
+ }
1041
+ interface TimelineView {
1042
+ title: string;
1043
+ subtitle: string;
1044
+ days: TimelineDay[];
1045
+ }
1046
+ /** The timeline a block holds; null when there is nothing to draw (fewer than 2 events in all). */
1047
+ declare function timelineView(content: any): TimelineView | null;
1048
+ declare function timelineAsText(view: TimelineView): string;
1049
+ /** The visual block kinds the phone draws, each between its own pair of sentinels. Same four as Core's `VISUALS` (backend utils/blockShape.js). */
1050
+ type VisualKind = 'diagram' | 'chart' | 'comparison' | 'timeline';
1051
+ /**
1052
+ * THE REGISTRY of visual kinds on the phone: for each, its sentinels, the net that reads the content into a clean view (null when
1053
+ * there is nothing to draw), and the view's text form (what copy and a screen reader are given). A new kind is one more entry here,
1054
+ * one component in the UI package (`VISUAL_BLOCKS`), and one in Core; nothing else names a visual.
1055
+ */
1056
+ declare const VISUALS: Record<VisualKind, {
1057
+ open: string;
1058
+ close: string;
1059
+ view: (content: any) => any | null;
1060
+ asText: (view: any) => string;
1061
+ }>;
1062
+ /** Whether a block kind is a visual the phone knows. */
1063
+ declare const isVisualKind: (kind: any) => kind is VisualKind;
1064
+ /** The clean view inside a visual segment's payload (still percent-encoded, as `splitBlockSegments` gives it), or null when it cannot be read. */
1065
+ declare function visualViewOf(kind: VisualKind, payload: string): any | null;
954
1066
  /**
955
1067
  * Extract display text from a conversation turn's blocks. Handles multiple block kinds (text, code, json, markdown, table, html).
956
1068
  * Every block that holds something is in the result, in order; a block Core marked `meta.display: "folded"` is wrapped in the
957
1069
  * DETAILS sentinels so the bubble draws it closed.
958
1070
  */
959
1071
  declare function blocksToText(blocks?: ConversationBlock[]): string;
960
- /** One piece of a flat message string, as the bubble draws it: markdown, a table payload, a diagram payload, or a closed "Details" payload. */
1072
+ /** One piece of a flat message string, as the bubble draws it: markdown, a table payload, a visual payload, or a closed "Details" payload. */
961
1073
  interface BlockSegment {
962
- kind: 'md' | 'table' | 'details' | 'diagram';
963
- /** md: the markdown. table / details / diagram: the still percent-encoded payload between the sentinels. */
1074
+ kind: 'md' | 'table' | 'details' | VisualKind;
1075
+ /** md: the markdown. table / details / a visual: the still percent-encoded payload between the sentinels. */
964
1076
  content: string;
965
1077
  }
966
1078
  /**
967
- * Split a flat message string on the table, details and diagram sentinels, in order. A string with none is one markdown segment. An
1079
+ * Split a flat message string on the table, details and visual sentinels, in order. A string with none is one markdown segment. An
968
1080
  * unterminated marker is kept as markdown from the marker on, so nothing is lost.
969
1081
  */
970
1082
  declare function splitBlockSegments(content: string): BlockSegment[];
@@ -1135,6 +1247,7 @@ declare const borderRadius: {
1135
1247
  * DELETE /api/acs/artifacts/{id} — user-initiated retire (idempotent)
1136
1248
  * PATCH /api/acs/artifacts/{id} — visibility + rename
1137
1249
  * PUT /api/acs/order — drag-reorder
1250
+ * GET /api/acs/launcher — where each of my widgets sits in the Apps grid
1138
1251
  * GET /api/acs/home-actions — top-actions feed (+ PATCH/PUT order)
1139
1252
  * WS topics acs.artifacts / acs.home-actions — cross-device sync (see ./ws)
1140
1253
  */
@@ -1234,6 +1347,29 @@ declare function setOrder(pinned: string[]): Promise<{
1234
1347
  * (e.g. 'home' for the carousel).
1235
1348
  */
1236
1349
  declare function recordEvent(artifactId: string, event: AcsEvent, surface?: AcsSurface): Promise<void>;
1350
+ /** One of my widgets in the Apps grid: its plugin id (acs:art_… / actor_skills:…) and display name. */
1351
+ interface LauncherPlace {
1352
+ id: string;
1353
+ name?: string;
1354
+ }
1355
+ /** Where each of my widgets sits in the Apps grid. A widget in none of them lives in its chat. */
1356
+ interface LauncherPlaces {
1357
+ mine: LauncherPlace[];
1358
+ resting: LauncherPlace[];
1359
+ hidden: string[];
1360
+ }
1361
+ /**
1362
+ * Where each of my widgets sits in the Apps grid (GET /api/acs/launcher). The rule is the server's
1363
+ * (ACS projection/launcherPlace.js) and the web's Apps panel reads the same answer. null when there
1364
+ * is no answer: the picker then keeps its full list, so nothing disappears on a failed read.
1365
+ */
1366
+ declare function fetchLauncherPlaces(): Promise<LauncherPlaces | null>;
1367
+ /**
1368
+ * The person opened one of their own ACS widgets themselves: a tile in the Apps grid ('apps') or
1369
+ * its button in a chat ('chat'). That is what keeps it in (or brings it back to) My apps.
1370
+ * Fire-and-forget; any other id is ignored (only ACS widgets fold when unused).
1371
+ */
1372
+ declare function recordWidgetOpen(pluginId: string, surface: 'apps' | 'chat'): void;
1237
1373
  type HomeActionLeaf = {
1238
1374
  type: 'send_message';
1239
1375
  prompt: string;
@@ -1428,4 +1564,4 @@ interface AcsKvStorage {
1428
1564
  }
1429
1565
  declare function setAcsCacheStorage(kv: AcsKvStorage | null): void;
1430
1566
 
1431
- export { type AcsArtifact, type AcsDeleteReason, type AcsEvent, type AcsKvStorage, type AcsPatchReason, type AcsReachabilityReporter, type AcsSurface, type AdasConfig, type AdasGateFlags, type AdasPhase, type AdasSession, type AdasUser, type AttachmentCache, type AttachmentPreview, type AuthSession, type AuthSessionDeps, type AuthSessionState, type BlockSegment, type BufferedCommand, type ChannelPrefs, type ConsumerCapabilityConfig, type ConsumerProviderConfig, type ConsumerSignInResult, type ConversationBlock, DETAILS_BLOCK_CLOSE, DETAILS_BLOCK_OPEN, DIAGRAM_BLOCK_CLOSE, DIAGRAM_BLOCK_OPEN, DIAGRAM_STATUSES, type DeleteResult, type DevModeState, type DevicePlatform, type DiagramStatus, type DiagramView, type DispatchRow, type FileUploadRequest, type FileUploader, type HandoffExchangeResult, type HomeAction, type HomeActionLeaf, type HomeActionReason, type InvitePreview, type JobProgress, MAX_ATTACHMENT_BYTES, MAX_INLINE_ATTACHMENT_BYTES, type Message, type MessageAttachment, type NotifChannel, type NotifPrefs, type OtpStartResult, type OutgoingAttachment, type PatchResult, PluginCommandEmitter, type PushBackend, type PushRegistration, type QuietHoursPrefs, type RefreshOutcome, type RegisterDeviceResponse, type Session, type SessionEnv, type SessionPersistence, type SessionStatus, type SessionUser, TABLE_BLOCK_CLOSE, TABLE_BLOCK_OPEN, type TelegramBotInfo, type TenantMembership, type TenantRow, type TokenProvider, type ToolCall, type UIAction, type UploadedArtifact, type WireAttachment, type WorkspaceCapabilities, type WorkspaceSnapshot, type WorkspaceState, ada, apiFetch, apiFetchRaw, blocksToText, borderRadius, capabilityEnabled, closeChatStream, colors, connectAcsWs, connectorCall, createAuthSession, createPushRegistration, deleteArtifact, devModeFromCatalog, diagramAsText, diagramView, disconnectAcsWs, exchangeHandoff, fetchConsumerConfig, focusPlugin, fontSize, getConfig, getConsumerAuthApiUrl, getCoreApiUrl, getCoreWsUrl, getPrefs as getNotifPrefs, getTelegramBotInfo as getNotifTelegramBotInfo, getSession, getTenant, getToken, getUser, getVoiceApiUrl, initAdas, isAdasInitialized, isDevHost, joinWithApple, joinWithGoogle, linkChannelStart, linkChannelVerify, linkTelegram as linkNotifTelegram, listHomeActions, listMadeForYou, listMyTenants, listSurface, mcpFetch, mcpToolCall, nestByMaster, notifyAcsWsForeground, notifyAppForeground, onAppForeground, openJoinWithApple, openJoinWithGoogle, parseDeepLinkParam, parseHandoffCode, parseInviteCode, patchArtifact, patchHomeAction, plainTextOf, pluginCommandEmitter, postCommandResult, prepareAttachments, previewInvite, readDevMode, recentDispatches as recentNotifDispatches, recordEvent, refreshToken, registerHostIntent, registerDevice as registerPushDevice, resolveAdasPhase, setAcsCacheStorage, setAcsReachabilityReporter, setClientDeclarationProvider, setDevMode, setHomeActionOrder, setPrefs as setNotifPrefs, setOrder, signInWithApple, signInWithGoogle, spacing, splitBlockSegments, switchTenant, tenantFromToken, unlinkChannel as unlinkNotifChannel, unregisterDevice as unregisterPushDevice, unwrapMcpResult, useCapability, useChatStore, useHomeActionsStore, useWidgetsStore, useWorkspaceStore, userFromJwt };
1567
+ export { type AcsArtifact, type AcsDeleteReason, type AcsEvent, type AcsKvStorage, type AcsPatchReason, type AcsReachabilityReporter, type AcsSurface, type AdasConfig, type AdasGateFlags, type AdasPhase, type AdasSession, type AdasUser, type AttachmentCache, type AttachmentPreview, type AuthSession, type AuthSessionDeps, type AuthSessionState, type BlockSegment, type BufferedCommand, CHART_BLOCK_CLOSE, CHART_BLOCK_OPEN, COMPARISON_BLOCK_CLOSE, COMPARISON_BLOCK_OPEN, type ChannelPrefs, type ChartSeries, type ChartView, type ComparisonOption, type ComparisonRow, type ComparisonView, type ConsumerCapabilityConfig, type ConsumerProviderConfig, type ConsumerSignInResult, type ConversationBlock, DETAILS_BLOCK_CLOSE, DETAILS_BLOCK_OPEN, DIAGRAM_BLOCK_CLOSE, DIAGRAM_BLOCK_OPEN, DIAGRAM_STATUSES, type DeleteResult, type DevModeState, type DevicePlatform, type DiagramFlow, type DiagramStatus, type DiagramStep, type DiagramView, type DispatchRow, type FileUploadRequest, type FileUploader, type HandoffExchangeResult, type HomeAction, type HomeActionLeaf, type HomeActionReason, type InvitePreview, type JobProgress, type LauncherPlace, type LauncherPlaces, MAX_ATTACHMENT_BYTES, MAX_INLINE_ATTACHMENT_BYTES, type Message, type MessageAttachment, type NotifChannel, type NotifPrefs, type OtpStartResult, type OutgoingAttachment, type PatchResult, PluginCommandEmitter, type PushBackend, type PushRegistration, type QuietHoursPrefs, type RefreshOutcome, type RegisterDeviceResponse, type Session, type SessionEnv, type SessionPersistence, type SessionStatus, type SessionUser, TABLE_BLOCK_CLOSE, TABLE_BLOCK_OPEN, TIMELINE_BLOCK_CLOSE, TIMELINE_BLOCK_OPEN, type TelegramBotInfo, type TenantMembership, type TenantRow, type TimelineDay, type TimelineEvent, type TimelineView, type TokenProvider, type ToolCall, type UIAction, type UploadedArtifact, VISUALS, type VisualKind, type WireAttachment, type WorkspaceCapabilities, type WorkspaceSnapshot, type WorkspaceState, ada, apiFetch, apiFetchRaw, blocksToText, borderRadius, capabilityEnabled, chartAsText, chartScale, chartView, closeChatStream, colors, comparisonAsText, comparisonView, connectAcsWs, connectorCall, createAuthSession, createPushRegistration, deleteArtifact, devModeFromCatalog, diagramAsText, diagramFlow, diagramView, disconnectAcsWs, exchangeHandoff, fetchConsumerConfig, fetchLauncherPlaces, focusPlugin, fontSize, getConfig, getConsumerAuthApiUrl, getCoreApiUrl, getCoreWsUrl, getPrefs as getNotifPrefs, getTelegramBotInfo as getNotifTelegramBotInfo, getSession, getTenant, getToken, getUser, getVoiceApiUrl, initAdas, isAdasInitialized, isDevHost, isVisualKind, joinWithApple, joinWithGoogle, linkChannelStart, linkChannelVerify, linkTelegram as linkNotifTelegram, listHomeActions, listMadeForYou, listMyTenants, listSurface, mcpFetch, mcpToolCall, nestByMaster, notifyAcsWsForeground, notifyAppForeground, numText, onAppForeground, openJoinWithApple, openJoinWithGoogle, parseDeepLinkParam, parseHandoffCode, parseInviteCode, patchArtifact, patchHomeAction, plainTextOf, pluginCommandEmitter, postCommandResult, prepareAttachments, previewInvite, readDevMode, recentDispatches as recentNotifDispatches, recordEvent, recordWidgetOpen, refreshToken, registerHostIntent, registerDevice as registerPushDevice, resolveAdasPhase, setAcsCacheStorage, setAcsReachabilityReporter, setClientDeclarationProvider, setDevMode, setHomeActionOrder, setPrefs as setNotifPrefs, setOrder, signInWithApple, signInWithGoogle, spacing, splitBlockSegments, switchTenant, tenantFromToken, timelineAsText, timelineView, unlinkChannel as unlinkNotifChannel, unregisterDevice as unregisterPushDevice, unwrapMcpResult, useCapability, useChatStore, useHomeActionsStore, useWidgetsStore, useWorkspaceStore, userFromJwt, visualViewOf };