@agimon-ai/po-web-dashboard 0.0.0-alpha.3 → 0.0.0-alpha.4

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.
Files changed (224) hide show
  1. package/dist/types/hub.cjs +6 -6
  2. package/dist/types/hub.cjs.map +1 -1
  3. package/dist/types/hub.d.mts +6 -6
  4. package/dist/types/hub.mjs +6 -6
  5. package/dist/types/hub.mjs.map +1 -1
  6. package/dist/types/notification.cjs +4 -4
  7. package/dist/types/notification.cjs.map +1 -1
  8. package/dist/types/notification.d.mts +5 -5
  9. package/dist/types/notification.d.mts.map +1 -1
  10. package/dist/types/notification.mjs +5 -5
  11. package/dist/types/notification.mjs.map +1 -1
  12. package/dist/types/settings.cjs.map +1 -1
  13. package/dist/types/settings.d.mts +1 -1
  14. package/dist/types/settings.mjs.map +1 -1
  15. package/dist/types.cjs +1 -1
  16. package/dist/types.d.mts +2 -2
  17. package/dist/types.mjs +2 -2
  18. package/dist/web/components/SessionMcp.cjs +17 -17
  19. package/dist/web/components/SessionMcp.cjs.map +1 -1
  20. package/dist/web/components/SessionMcp.mjs +17 -17
  21. package/dist/web/components/SessionMcp.mjs.map +1 -1
  22. package/dist/web/components/Story.fixture.cjs +2 -2
  23. package/dist/web/components/Story.fixture.cjs.map +1 -1
  24. package/dist/web/components/Story.fixture.mjs +2 -2
  25. package/dist/web/components/Story.fixture.mjs.map +1 -1
  26. package/dist/web/components/Template.fixture.cjs +1 -1
  27. package/dist/web/components/Template.fixture.cjs.map +1 -1
  28. package/dist/web/components/Template.fixture.mjs +1 -1
  29. package/dist/web/components/Template.fixture.mjs.map +1 -1
  30. package/dist/web/features/activity/ActivityDock.cjs +25 -25
  31. package/dist/web/features/activity/ActivityDock.cjs.map +1 -1
  32. package/dist/web/features/activity/ActivityDock.mjs +25 -25
  33. package/dist/web/features/activity/ActivityDock.mjs.map +1 -1
  34. package/dist/web/features/activity/ContextItemDialog.cjs +17 -17
  35. package/dist/web/features/activity/ContextItemDialog.cjs.map +1 -1
  36. package/dist/web/features/activity/ContextItemDialog.mjs +17 -17
  37. package/dist/web/features/activity/ContextItemDialog.mjs.map +1 -1
  38. package/dist/web/features/activity/ContextPanel.cjs +21 -21
  39. package/dist/web/features/activity/ContextPanel.cjs.map +1 -1
  40. package/dist/web/features/activity/ContextPanel.mjs +21 -21
  41. package/dist/web/features/activity/ContextPanel.mjs.map +1 -1
  42. package/dist/web/features/activity/DockTabs.cjs +1 -1
  43. package/dist/web/features/activity/DockTabs.cjs.map +1 -1
  44. package/dist/web/features/activity/DockTabs.mjs +1 -1
  45. package/dist/web/features/activity/DockTabs.mjs.map +1 -1
  46. package/dist/web/features/connection/RefusedCard.cjs +9 -9
  47. package/dist/web/features/connection/RefusedCard.cjs.map +1 -1
  48. package/dist/web/features/connection/RefusedCard.mjs +9 -9
  49. package/dist/web/features/connection/RefusedCard.mjs.map +1 -1
  50. package/dist/web/features/dialogs/DialogOverlay.cjs +9 -9
  51. package/dist/web/features/dialogs/DialogOverlay.cjs.map +1 -1
  52. package/dist/web/features/dialogs/DialogOverlay.mjs +9 -9
  53. package/dist/web/features/dialogs/DialogOverlay.mjs.map +1 -1
  54. package/dist/web/features/leader/CommandPalette.cjs +23 -23
  55. package/dist/web/features/leader/CommandPalette.cjs.map +1 -1
  56. package/dist/web/features/leader/CommandPalette.mjs +23 -23
  57. package/dist/web/features/leader/CommandPalette.mjs.map +1 -1
  58. package/dist/web/features/remote/DevProxyTargets.cjs +6 -6
  59. package/dist/web/features/remote/DevProxyTargets.cjs.map +1 -1
  60. package/dist/web/features/remote/DevProxyTargets.mjs +6 -6
  61. package/dist/web/features/remote/DevProxyTargets.mjs.map +1 -1
  62. package/dist/web/features/remote/HandoverProgress.cjs +2 -2
  63. package/dist/web/features/remote/HandoverProgress.cjs.map +1 -1
  64. package/dist/web/features/remote/HandoverProgress.mjs +2 -2
  65. package/dist/web/features/remote/HandoverProgress.mjs.map +1 -1
  66. package/dist/web/features/remote/PairedDeviceList.cjs +3 -3
  67. package/dist/web/features/remote/PairedDeviceList.cjs.map +1 -1
  68. package/dist/web/features/remote/PairedDeviceList.mjs +3 -3
  69. package/dist/web/features/remote/PairedDeviceList.mjs.map +1 -1
  70. package/dist/web/features/remote/PairingApprovalDialog.cjs +3 -3
  71. package/dist/web/features/remote/PairingApprovalDialog.cjs.map +1 -1
  72. package/dist/web/features/remote/PairingApprovalDialog.mjs +3 -3
  73. package/dist/web/features/remote/PairingApprovalDialog.mjs.map +1 -1
  74. package/dist/web/features/remote/RemoteAccessDialog.cjs +2 -2
  75. package/dist/web/features/remote/RemoteAccessDialog.cjs.map +1 -1
  76. package/dist/web/features/remote/RemoteAccessDialog.mjs +2 -2
  77. package/dist/web/features/remote/RemoteAccessDialog.mjs.map +1 -1
  78. package/dist/web/features/remote/RemoteAccessOptions.cjs +11 -11
  79. package/dist/web/features/remote/RemoteAccessOptions.cjs.map +1 -1
  80. package/dist/web/features/remote/RemoteAccessOptions.mjs +11 -11
  81. package/dist/web/features/remote/RemoteAccessOptions.mjs.map +1 -1
  82. package/dist/web/features/remote/RemoteAccessPairing.cjs +8 -8
  83. package/dist/web/features/remote/RemoteAccessPairing.cjs.map +1 -1
  84. package/dist/web/features/remote/RemoteAccessPairing.mjs +8 -8
  85. package/dist/web/features/remote/RemoteAccessPairing.mjs.map +1 -1
  86. package/dist/web/features/remote/SandboxWorkspaces.cjs +3 -3
  87. package/dist/web/features/remote/SandboxWorkspaces.cjs.map +1 -1
  88. package/dist/web/features/remote/SandboxWorkspaces.mjs +3 -3
  89. package/dist/web/features/remote/SandboxWorkspaces.mjs.map +1 -1
  90. package/dist/web/features/remote/TrustedDeviceList.cjs +4 -4
  91. package/dist/web/features/remote/TrustedDeviceList.cjs.map +1 -1
  92. package/dist/web/features/remote/TrustedDeviceList.mjs +4 -4
  93. package/dist/web/features/remote/TrustedDeviceList.mjs.map +1 -1
  94. package/dist/web/features/selection/SelectionBar.cjs +13 -13
  95. package/dist/web/features/selection/SelectionBar.cjs.map +1 -1
  96. package/dist/web/features/selection/SelectionBar.mjs +13 -13
  97. package/dist/web/features/selection/SelectionBar.mjs.map +1 -1
  98. package/dist/web/features/session/AgentLockPanel.cjs +3 -3
  99. package/dist/web/features/session/AgentLockPanel.cjs.map +1 -1
  100. package/dist/web/features/session/AgentLockPanel.mjs +3 -3
  101. package/dist/web/features/session/AgentLockPanel.mjs.map +1 -1
  102. package/dist/web/features/session/Composer.cjs +11 -11
  103. package/dist/web/features/session/Composer.cjs.map +1 -1
  104. package/dist/web/features/session/Composer.mjs +11 -11
  105. package/dist/web/features/session/Composer.mjs.map +1 -1
  106. package/dist/web/features/session/DormantPanel.cjs +4 -4
  107. package/dist/web/features/session/DormantPanel.cjs.map +1 -1
  108. package/dist/web/features/session/DormantPanel.mjs +4 -4
  109. package/dist/web/features/session/DormantPanel.mjs.map +1 -1
  110. package/dist/web/features/session/MentionPreviews.cjs +10 -10
  111. package/dist/web/features/session/MentionPreviews.cjs.map +1 -1
  112. package/dist/web/features/session/MentionPreviews.mjs +10 -10
  113. package/dist/web/features/session/MentionPreviews.mjs.map +1 -1
  114. package/dist/web/features/session/QueueSheet.cjs +18 -18
  115. package/dist/web/features/session/QueueSheet.cjs.map +1 -1
  116. package/dist/web/features/session/QueueSheet.mjs +18 -18
  117. package/dist/web/features/session/QueueSheet.mjs.map +1 -1
  118. package/dist/web/features/session/SessionActivity.cjs +4 -4
  119. package/dist/web/features/session/SessionActivity.cjs.map +1 -1
  120. package/dist/web/features/session/SessionActivity.mjs +4 -4
  121. package/dist/web/features/session/SessionActivity.mjs.map +1 -1
  122. package/dist/web/features/session/Timeline.cjs +16 -16
  123. package/dist/web/features/session/Timeline.cjs.map +1 -1
  124. package/dist/web/features/session/Timeline.mjs +16 -16
  125. package/dist/web/features/session/Timeline.mjs.map +1 -1
  126. package/dist/web/features/session/ToolCard.cjs +6 -6
  127. package/dist/web/features/session/ToolCard.cjs.map +1 -1
  128. package/dist/web/features/session/ToolCard.mjs +6 -6
  129. package/dist/web/features/session/ToolCard.mjs.map +1 -1
  130. package/dist/web/features/sessions/NewSessionDialog.cjs +3 -3
  131. package/dist/web/features/sessions/NewSessionDialog.cjs.map +1 -1
  132. package/dist/web/features/sessions/NewSessionDialog.mjs +3 -3
  133. package/dist/web/features/sessions/NewSessionDialog.mjs.map +1 -1
  134. package/dist/web/features/sessions/ResumeSessionDialog.cjs +7 -7
  135. package/dist/web/features/sessions/ResumeSessionDialog.cjs.map +1 -1
  136. package/dist/web/features/sessions/ResumeSessionDialog.mjs +7 -7
  137. package/dist/web/features/sessions/ResumeSessionDialog.mjs.map +1 -1
  138. package/dist/web/features/sessions/WelcomePanel.cjs +1 -1
  139. package/dist/web/features/sessions/WelcomePanel.cjs.map +1 -1
  140. package/dist/web/features/sessions/WelcomePanel.mjs +1 -1
  141. package/dist/web/features/sessions/WelcomePanel.mjs.map +1 -1
  142. package/dist/web/features/settings/AppearanceSettings.cjs +3 -3
  143. package/dist/web/features/settings/AppearanceSettings.cjs.map +1 -1
  144. package/dist/web/features/settings/AppearanceSettings.mjs +3 -3
  145. package/dist/web/features/settings/AppearanceSettings.mjs.map +1 -1
  146. package/dist/web/features/settings/ContributedSettings.cjs +9 -9
  147. package/dist/web/features/settings/ContributedSettings.cjs.map +1 -1
  148. package/dist/web/features/settings/ContributedSettings.mjs +9 -9
  149. package/dist/web/features/settings/ContributedSettings.mjs.map +1 -1
  150. package/dist/web/features/settings/ImageSettings.cjs +2 -2
  151. package/dist/web/features/settings/ImageSettings.cjs.map +1 -1
  152. package/dist/web/features/settings/ImageSettings.d.mts +1 -1
  153. package/dist/web/features/settings/ImageSettings.mjs +2 -2
  154. package/dist/web/features/settings/ImageSettings.mjs.map +1 -1
  155. package/dist/web/features/settings/LoginFlowDialog.cjs +18 -18
  156. package/dist/web/features/settings/LoginFlowDialog.cjs.map +1 -1
  157. package/dist/web/features/settings/LoginFlowDialog.mjs +18 -18
  158. package/dist/web/features/settings/LoginFlowDialog.mjs.map +1 -1
  159. package/dist/web/features/settings/PluginSettings.cjs +1 -1
  160. package/dist/web/features/settings/PluginSettings.cjs.map +1 -1
  161. package/dist/web/features/settings/PluginSettings.mjs +1 -1
  162. package/dist/web/features/settings/PluginSettings.mjs.map +1 -1
  163. package/dist/web/features/settings/ProviderSettings.cjs +18 -18
  164. package/dist/web/features/settings/ProviderSettings.cjs.map +1 -1
  165. package/dist/web/features/settings/ProviderSettings.mjs +18 -18
  166. package/dist/web/features/settings/ProviderSettings.mjs.map +1 -1
  167. package/dist/web/features/settings/RepositorySettings.cjs +6 -6
  168. package/dist/web/features/settings/RepositorySettings.cjs.map +1 -1
  169. package/dist/web/features/settings/RepositorySettings.mjs +6 -6
  170. package/dist/web/features/settings/RepositorySettings.mjs.map +1 -1
  171. package/dist/web/features/settings/RepositoryWorkspace.cjs +3 -3
  172. package/dist/web/features/settings/RepositoryWorkspace.cjs.map +1 -1
  173. package/dist/web/features/settings/RepositoryWorkspace.mjs +3 -3
  174. package/dist/web/features/settings/RepositoryWorkspace.mjs.map +1 -1
  175. package/dist/web/features/settings/SessionMcpSettings.cjs +14 -14
  176. package/dist/web/features/settings/SessionMcpSettings.cjs.map +1 -1
  177. package/dist/web/features/settings/SessionMcpSettings.mjs +14 -14
  178. package/dist/web/features/settings/SessionMcpSettings.mjs.map +1 -1
  179. package/dist/web/features/settings/SettingsMenu.cjs +8 -8
  180. package/dist/web/features/settings/SettingsMenu.cjs.map +1 -1
  181. package/dist/web/features/settings/SettingsMenu.mjs +8 -8
  182. package/dist/web/features/settings/SettingsMenu.mjs.map +1 -1
  183. package/dist/web/features/settings/TemplateSettings.cjs +8 -8
  184. package/dist/web/features/settings/TemplateSettings.cjs.map +1 -1
  185. package/dist/web/features/settings/TemplateSettings.mjs +8 -8
  186. package/dist/web/features/settings/TemplateSettings.mjs.map +1 -1
  187. package/dist/web/features/settings/TunnelSettings.cjs +6 -6
  188. package/dist/web/features/settings/TunnelSettings.cjs.map +1 -1
  189. package/dist/web/features/settings/TunnelSettings.mjs +6 -6
  190. package/dist/web/features/settings/TunnelSettings.mjs.map +1 -1
  191. package/dist/web/features/status/TopBar.cjs +6 -6
  192. package/dist/web/features/status/TopBar.cjs.map +1 -1
  193. package/dist/web/features/status/TopBar.mjs +6 -6
  194. package/dist/web/features/status/TopBar.mjs.map +1 -1
  195. package/dist/web/lib/browserNotifications.cjs.map +1 -1
  196. package/dist/web/lib/browserNotifications.d.mts +2 -2
  197. package/dist/web/lib/browserNotifications.d.mts.map +1 -1
  198. package/dist/web/lib/browserNotifications.mjs.map +1 -1
  199. package/dist/web/lib/composition.cjs +5 -5
  200. package/dist/web/lib/composition.cjs.map +1 -1
  201. package/dist/web/lib/composition.mjs +5 -5
  202. package/dist/web/lib/composition.mjs.map +1 -1
  203. package/dist/web/lib/contextComposition.cjs +1 -1
  204. package/dist/web/lib/contextComposition.cjs.map +1 -1
  205. package/dist/web/lib/contextComposition.mjs +1 -1
  206. package/dist/web/lib/contextComposition.mjs.map +1 -1
  207. package/dist/web/lib/protocolHubSocket.cjs.map +1 -1
  208. package/dist/web/lib/protocolHubSocket.d.mts +2 -2
  209. package/dist/web/lib/protocolHubSocket.d.mts.map +1 -1
  210. package/dist/web/lib/protocolHubSocket.mjs.map +1 -1
  211. package/dist/web/lib/sessionModel.cjs +8 -8
  212. package/dist/web/lib/sessionModel.cjs.map +1 -1
  213. package/dist/web/lib/sessionModel.mjs +9 -9
  214. package/dist/web/lib/sessionModel.mjs.map +1 -1
  215. package/dist/web/stores/pagedTranscriptStore.cjs +1 -1
  216. package/dist/web/stores/pagedTranscriptStore.cjs.map +1 -1
  217. package/dist/web/stores/pagedTranscriptStore.mjs +1 -1
  218. package/dist/web/stores/pagedTranscriptStore.mjs.map +1 -1
  219. package/dist/web/stores/templateStore.cjs +1 -1
  220. package/dist/web/stores/templateStore.cjs.map +1 -1
  221. package/dist/web/stores/templateStore.d.mts +1 -1
  222. package/dist/web/stores/templateStore.mjs +1 -1
  223. package/dist/web/stores/templateStore.mjs.map +1 -1
  224. package/package.json +10 -10
@@ -51,7 +51,7 @@ const HUB_RESYNCED_TYPE = "hub_resynced";
51
51
  * catalog projection; it arrives inside Pi's entry_appended frames. The shape
52
52
  * mirrors MinorModeProjection in po-minor-mode.
53
53
  */
54
- const MINOR_MODE_ENTRY_TYPE = "doom-minor-modes";
54
+ const MINOR_MODE_ENTRY_TYPE = "po-minor-modes";
55
55
  /**
56
56
  * The custom session entry the Po runtime journals when the agent's model
57
57
  * changes without a client having asked for it. The shape mirrors
@@ -62,7 +62,7 @@ const MINOR_MODE_ENTRY_TYPE = "doom-minor-modes";
62
62
  * its configured planning model would otherwise leave the chip naming the
63
63
  * model the session left behind.
64
64
  */
65
- const AGENT_MODEL_ENTRY_TYPE = "doom-agent-model";
65
+ const AGENT_MODEL_ENTRY_TYPE = "po-agent-model";
66
66
  /**
67
67
  * The custom session entry Po journals describing what the session is
68
68
  * composed of: which mode admitted each tool and skill, and what each costs.
@@ -70,7 +70,7 @@ const AGENT_MODEL_ENTRY_TYPE = "doom-agent-model";
70
70
  * Schemas are deliberately absent. Only names, kinds, owners and integer token
71
71
  * counts travel, so republishing the whole composition stays cheap.
72
72
  */
73
- const CONTEXT_ENTRY_TYPE = "doom-context";
73
+ const CONTEXT_ENTRY_TYPE = "po-context";
74
74
  /**
75
75
  * The custom session entry po-profile journals naming the persona the
76
76
  * session speaks as. The shape mirrors ProfileIdentityProjection in
@@ -81,17 +81,17 @@ const CONTEXT_ENTRY_TYPE = "doom-context";
81
81
  * message keeps the persona it was written under. Adding it to
82
82
  * PROJECTION_ENTRY_TYPES would repaint the whole transcript on every switch.
83
83
  */
84
- const PROFILE_IDENTITY_ENTRY_TYPE = "doom-profile-identity";
84
+ const PROFILE_IDENTITY_ENTRY_TYPE = "po-profile-identity";
85
85
  /**
86
86
  * The custom session entry po-domain journals once Pi has rebuilt its
87
- * resource catalog for a reload; it mirrors DOOM_RESOURCE_CATALOG_ENTRY_TYPE in
87
+ * resource catalog for a reload; it mirrors PO_RESOURCE_CATALOG_ENTRY_TYPE in
88
88
  * po-core.
89
89
  *
90
90
  * A reload is what changes the skills the composer offers under `$`, and Pi
91
91
  * reports nothing else for one, so this entry is the cockpit's only notice that
92
92
  * the command list it cached belongs to the previous selection.
93
93
  */
94
- const RESOURCE_CATALOG_ENTRY_TYPE = "doom-resource-catalog";
94
+ const RESOURCE_CATALOG_ENTRY_TYPE = "po-resource-catalog";
95
95
  const SUBSCRIBE_TYPE = "subscribe";
96
96
  const UNSUBSCRIBE_TYPE = "unsubscribe";
97
97
  const SESSION_COMMAND_TYPE = "session_command";
@@ -1 +1 @@
1
- {"version":3,"file":"hub.cjs","names":[],"sources":["../../src/types/hub.ts"],"sourcesContent":["import type { BridgeState, SessionFrame } from './session';\n\n/**\n * Wire vocabulary between the hub and its pages.\n *\n * One WebSocket carries every session: hub-level frames describe the set of\n * sessions, and session-scoped traffic travels enveloped with the session id.\n * Field naming follows @earendil-works/pi-protocol so a future swap to the\n * upstream session server stays a transport change, not a rename.\n */\nexport const HUB_PROTOCOL_VERSION = 2;\n\n/** Role marker in the health payload; po-server probes for it before binding the port. */\nexport const HUB_ROLE = 'hub';\n\n/** REST endpoint for admitting and listing durable workspaces. */\nexport const WORKSPACES_API_ROUTE = '/api/workspaces';\n\n/** REST endpoint for creating sessions and browsing resumable Pi history. */\nexport const SESSIONS_API_ROUTE = '/api/workspaces/:workspaceId/sessions';\n\n/** One durable repository workspace shown in the rail, even while it has no sessions. */\nexport interface WorkspaceSummary {\n id: string;\n root: string;\n /** Display name chosen when the workspace was added; the folder basename stands in when absent. */\n name?: string;\n /** A remembered workspace whose root could not be mounted on this server start. */\n available?: boolean;\n error?: string;\n}\n\n/** One inactive Pi thread available to resume in a live session's workspace. */\nexport interface PiSessionHistoryItem {\n id: string;\n name?: string;\n firstMessage: string;\n createdAt: string;\n updatedAt: string;\n messageCount: number;\n}\n\n/**\n * REST endpoint behind the new-session directory picker; the page sends the\n * typed path as ?q= and receives {directories}: the children of the parent\n * directory whose names match the trailing segment as a regular expression.\n */\nexport const DIRECTORIES_API_ROUTE = '/api/directories';\n\n/** Lists the visible child folders of ?path= (home when absent) for the workspace folder browser. */\nexport const DIRECTORY_CHILDREN_API_ROUTE = '/api/directories/children';\n\n/** One folder's visible child directories, as absolute paths. */\nexport interface DirectoryListing {\n path: string;\n parent?: string;\n directories: string[];\n}\n\n/**\n * Query parameter that routes a package API request to one session's server.\n * Without it the request is answered by a hub-scoped API in this process.\n */\nexport const API_SESSION_QUERY_PARAM = 'session';\n\n/** What the agent is doing right now, derived from its frame stream. */\nexport type SessionPhase = 'idle' | 'turn' | 'compaction' | 'retry';\n\nexport interface SessionProfile {\n name: string;\n displayName?: string;\n /** Changes whenever the icon does; absent when the profile has no icon. */\n iconVersion?: string;\n}\n\nexport interface SessionGitStatus {\n branch: string;\n /** True when the working tree has uncommitted changes; rendered as a star. */\n dirty: boolean;\n}\n\n/** One immutable, signed client composition resolved for a session. */\nexport interface SessionWebComposition {\n /** Stable identity of the synchronized root and generation. */\n id: string;\n /** Monotonic signing revision advertised by the manifest. */\n revision: number;\n /** Same-origin signed-manifest route read by the trusted service worker. */\n manifestUrl: string;\n /** Same-origin prefix for the untrusted source bytes verified by the worker. */\n rawAssetBaseUrl: string;\n /** Worker-owned prefix from which the page may execute verified bytes. */\n verifiedAssetBaseUrl: string;\n /** `[slot, entry]` per plugin copy this mount runs, each entry an absolute path below both asset prefixes. */\n pluginEntries: [string, string][];\n /** Absolute paths below both asset prefixes of every file this mount's slots can load. */\n assetPaths: string[];\n /** Absolute paths below both asset prefixes, replaced when this session is focused. */\n stylePaths: string[];\n /** Frame types owned by the matching session-local hub composition. */\n channels: string[];\n /**\n * The slots this mount runs out of a shared build. Absent means the composition\n * holds only this mount's plugins, as in-memory test hosts publish it.\n */\n plugins?: string[];\n}\n\n/** One immutable, signed native composition resolved for a session; read by po-native, ignored by the web. */\nexport interface SessionNativeComposition {\n /** Stable identity of the synchronized root and generation. */\n id: string;\n scope: 'global' | 'workspace' | 'session';\n /** Monotonic signing revision advertised by the manifest. */\n revision: number;\n manifestUrl: string;\n rawAssetBaseUrl: string;\n /** Always `/composition.js`. */\n entryPath: string;\n channels: string[];\n /** The `poNative.pluginId` values resolved for this mount; the shell installs only these. */\n plugins: string[];\n}\n\n/**\n * Everything the rail needs to render one session without subscribing to it.\n */\nexport interface SessionSummary {\n workspaceId?: string;\n id: string;\n name: string;\n cwd: string;\n /** ISO 8601, from the session's registry record. */\n createdAt: string;\n /** ISO 8601, bumped whenever the session's frame stream moves. */\n updatedAt: string;\n phase: SessionPhase;\n /** ISO 8601 timestamp of the last phase change; drives \"running · 12m\". */\n phaseSince: string;\n /** The hub's own attachment to the session socket. */\n attach: BridgeState;\n /** Human-readable cause, present when attach is refused or closed. */\n attachReason?: string;\n pendingMessageCount: number;\n /** False until the first prompt is forwarded; \"fresh session · nothing sent yet\". */\n everPrompted: boolean;\n /** True while the agent waits on a dialog answer; \"waiting for your input\". */\n awaitingInput: boolean;\n /** ISO 8601 of the last settled run, once one finished. */\n lastSettledAt?: string;\n /** Omitted when the cwd is not a git repository or git is unavailable. */\n git?: SessionGitStatus;\n /** Selected profile; the icon itself is served by the session avatar route. */\n profile?: SessionProfile;\n /** Signed plugin composition independently resolved for this session. */\n webComposition?: SessionWebComposition;\n /** Signed native composition for this session, when native targets were built. */\n nativeComposition?: SessionNativeComposition;\n /**\n * The session this one was spawned from, recorded by the hub when it opened the session.\n * The rail nests a session under its parent; absent means a top-level row.\n */\n parentSessionId?: string;\n /**\n * The spawning package's own label for the relationship, such as \"worktree\".\n * The hub does not interpret it; the rail uses it to pick an affordance.\n */\n sessionProvenance?: string;\n /** User-assigned groups; sessions sharing one may message each other. Absent means none. */\n groups?: string[];\n /** Host reservations awaiting a durable child runtime, not live sessions. */\n pendingSetups?: Array<{\n id: string;\n name: string;\n createdAt: string;\n cwd?: string;\n status?: 'provisioning' | 'failed' | 'interrupted';\n setupKind?: 'managed-worktree' | 'existing-directory';\n errorCode?: 'SESSION_WORKTREE_PROVISION_FAILED' | 'SESSION_UNAVAILABLE';\n }>;\n /**\n * One line an extension published about background work it runs for this\n * session, such as a workflow; the rail shows it in place of the idle copy.\n */\n activity?: { label: string; attention?: boolean; since?: string };\n /**\n * The hub recorded this session but has not reopened it since its last\n * restart. Its journal is on disk; nothing is running behind the card until\n * the page asks for it.\n */\n dormant?: boolean;\n}\n\nexport const HUB_HELLO_TYPE = 'hub_hello';\nexport const WORKSPACES_SNAPSHOT_TYPE = 'workspaces_snapshot';\nexport const WORKSPACE_UPSERT_TYPE = 'workspace_upsert';\nexport const WORKSPACE_REMOVED_TYPE = 'workspace_removed';\nexport const SESSIONS_SNAPSHOT_TYPE = 'sessions_snapshot';\nexport const SESSION_UPSERT_TYPE = 'session_upsert';\nexport const SESSION_REMOVED_TYPE = 'session_removed';\nexport const SESSION_BACKLOG_TYPE = 'session_backlog';\nexport const SESSION_FRAME_TYPE = 'session_frame';\n/** Hub-synthesized close for an answered dialog; Pi itself never announces one. */\nexport const DIALOG_ANSWERED_TYPE = 'extension_ui_answered';\n/**\n * Sync rebuilt the artifacts this page is running against.\n *\n * The plugin bundle the browser loaded is one of them, and a bundle only\n * changes on disk: nothing about the running page notices. The page reloads\n * itself rather than staying on surfaces the repository no longer describes.\n */\nexport const HUB_RESYNCED_TYPE = 'hub_resynced';\n\n/**\n * The custom session entry the Po runtime journals with its minor-mode\n * catalog projection; it arrives inside Pi's entry_appended frames. The shape\n * mirrors MinorModeProjection in po-minor-mode.\n */\nexport const MINOR_MODE_ENTRY_TYPE = 'doom-minor-modes';\n\n/**\n * The custom session entry the Po runtime journals when the agent's model\n * changes without a client having asked for it. The shape mirrors\n * AgentModelProjection in po-core.\n *\n * Pi reports a thinking-level switch on the wire, so that field follows from\n * the frame alone. It has no wire event for the model, so plan mode applying\n * its configured planning model would otherwise leave the chip naming the\n * model the session left behind.\n */\nexport const AGENT_MODEL_ENTRY_TYPE = 'doom-agent-model';\n/**\n * The custom session entry Po journals describing what the session is\n * composed of: which mode admitted each tool and skill, and what each costs.\n *\n * Schemas are deliberately absent. Only names, kinds, owners and integer token\n * counts travel, so republishing the whole composition stays cheap.\n */\nexport const CONTEXT_ENTRY_TYPE = 'doom-context';\n\n/**\n * The custom session entry po-profile journals naming the persona the\n * session speaks as. The shape mirrors ProfileIdentityProjection in\n * po-core.\n *\n * Unlike the entries above, this one is transcript rather than projection: it\n * stays in journal order and is never collapsed to the latest record, because a\n * message keeps the persona it was written under. Adding it to\n * PROJECTION_ENTRY_TYPES would repaint the whole transcript on every switch.\n */\nexport const PROFILE_IDENTITY_ENTRY_TYPE = 'doom-profile-identity';\n/**\n * The custom session entry po-domain journals once Pi has rebuilt its\n * resource catalog for a reload; it mirrors DOOM_RESOURCE_CATALOG_ENTRY_TYPE in\n * po-core.\n *\n * A reload is what changes the skills the composer offers under `$`, and Pi\n * reports nothing else for one, so this entry is the cockpit's only notice that\n * the command list it cached belongs to the previous selection.\n */\nexport const RESOURCE_CATALOG_ENTRY_TYPE = 'doom-resource-catalog';\nexport interface MinorModeActionProjection {\n id: string;\n label: string;\n description: string;\n enabled: boolean;\n disabledReason?: string;\n needsInput: boolean;\n}\n\nexport interface MinorModeRecordProjection {\n id: string;\n label: string;\n description: string;\n order: number;\n activation: 'inactive' | 'activating' | 'active' | 'deactivating';\n condition: string;\n detail?: string;\n actions: MinorModeActionProjection[];\n}\n\nexport interface MinorModeProjection {\n version: 1;\n revision: number;\n modes: MinorModeRecordProjection[];\n}\n\nexport type ContextGroupKind = 'major' | 'minor' | 'domain' | 'core';\nexport type ContextItemSource = 'extension' | 'mcp' | 'plugin' | 'core';\n\nexport interface ContextItemProjection {\n name: string;\n itemKind: 'tool' | 'skill';\n source: ContextItemSource;\n owner: string;\n tokens: number;\n active: boolean;\n}\n\nexport interface ContextGroupProjection {\n id: string;\n label: string;\n kind: ContextGroupKind;\n items: ContextItemProjection[];\n /** What the group costs now: active items only. */\n tokens: number;\n /** What its gated items would add if switched on. */\n inactiveTokens: number;\n}\n\nexport interface ContextProjection {\n version: 1;\n revision: number;\n selection?: { majorMode: string; domains: string[]; profile?: string };\n groups: ContextGroupProjection[];\n totalTokens: number;\n inactiveTokens: number;\n /**\n * What the assembled system prompt costs, deliberately outside the groups.\n *\n * Every tool's prose and every skill's listing already count inside\n * `totalTokens`, and those are slices of this same text, so the two figures\n * overlap and must not be added. `stage` is `base` when the session has sent\n * nothing yet and the prompt shown is the one before packages patch it.\n */\n systemPrompt?: { tokens: number; stage: 'base' | 'effective' };\n /** Names the tokenizer, because the figures are indicative, not billed. */\n estimator: string;\n}\nexport const SUBSCRIBE_TYPE = 'subscribe';\nexport const UNSUBSCRIBE_TYPE = 'unsubscribe';\nexport const SESSION_COMMAND_TYPE = 'session_command';\n/** A page follows one thread of a session: a journal a plugin's hub source names, such as a subagent run. */\nexport const SUBSCRIBE_THREAD_TYPE = 'subscribe_thread';\nexport const UNSUBSCRIBE_THREAD_TYPE = 'unsubscribe_thread';\nexport const THREAD_BACKLOG_TYPE = 'thread_backlog';\nexport const THREAD_FRAME_TYPE = 'thread_frame';\n\n/** A page asks for the transcript before what it already holds. */\nexport const HISTORY_REQUEST_TYPE = 'history_request';\n/** One older window, oldest first, answering a history_request. */\nexport const HISTORY_PAGE_TYPE = 'history_page';\n\n/**\n * How many journalled messages one page carries. Small enough that prepending\n * a window never blocks the reader's scroll, large enough that a flick through\n * a long transcript does not turn into a hundred round trips.\n */\nexport const HISTORY_PAGE_SIZE = 100;\n\nexport interface HistoryRequestFrame {\n type: typeof HISTORY_REQUEST_TYPE;\n sessionId: string;\n /** Journal id of the oldest entry the page holds; absent asks for the newest window. */\n before?: string;\n limit?: number;\n}\n\nexport interface HistoryPageFrame {\n type: typeof HISTORY_PAGE_TYPE;\n sessionId: string;\n /** Entry frames, oldest first, to prepend above what the page holds. */\n frames: Record<string, unknown>[];\n /** The cursor for the next older window; null when the transcript starts here. */\n cursor: string | null;\n /** Whether anything older than this window exists. */\n hasMore: boolean;\n /** Echoed so a page can drop an answer to a question it has since abandoned. */\n before?: string;\n}\n\n/** First frame on every page socket, before the snapshot. */\nexport interface HubHelloFrame {\n type: typeof HUB_HELLO_TYPE;\n protocol: number;\n /** Frame types of the hub's loaded data channels; lets a panel tell \"plugin server not installed\" from \"no data\". */\n channels: string[];\n}\n\nexport interface WorkspacesSnapshotFrame {\n type: typeof WORKSPACES_SNAPSHOT_TYPE;\n workspaces: WorkspaceSummary[];\n}\n\nexport interface WorkspaceUpsertFrame {\n type: typeof WORKSPACE_UPSERT_TYPE;\n workspace: WorkspaceSummary;\n}\n\nexport interface WorkspaceRemovedFrame {\n type: typeof WORKSPACE_REMOVED_TYPE;\n workspaceId: string;\n}\n\nexport interface SessionsSnapshotFrame {\n type: typeof SESSIONS_SNAPSHOT_TYPE;\n sessions: SessionSummary[];\n}\n\nexport interface SessionUpsertFrame {\n type: typeof SESSION_UPSERT_TYPE;\n session: SessionSummary;\n}\n\nexport interface SessionRemovedFrame {\n type: typeof SESSION_REMOVED_TYPE;\n sessionId: string;\n}\n\n/**\n * Reply to subscribe: this session's latest status and widget projections first,\n * then its bounded transient history. Live frames follow.\n */\nexport interface SessionBacklogFrame {\n type: typeof SESSION_BACKLOG_TYPE;\n sessionId: string;\n frames: SessionFrame[];\n /** Transient frames the bounded ring discarded; projections do not contribute. */\n dropped: number;\n}\n\n/** One live agent frame, addressed to subscribers of its session. */\nexport interface SessionFrameEnvelope {\n type: typeof SESSION_FRAME_TYPE;\n sessionId: string;\n frame: SessionFrame;\n}\n\nexport interface SubscribeFrame {\n type: typeof SUBSCRIBE_TYPE;\n sessionId: string;\n}\n\nexport interface UnsubscribeFrame {\n type: typeof UNSUBSCRIBE_TYPE;\n sessionId: string;\n}\n\n/** One command frame from the page, addressed to a session's agent. */\nexport interface SessionCommandFrame {\n type: typeof SESSION_COMMAND_TYPE;\n sessionId: string;\n frame: SessionFrame;\n}\n\nexport function hubHello(channels: string[]): HubHelloFrame {\n return { type: HUB_HELLO_TYPE, protocol: HUB_PROTOCOL_VERSION, channels };\n}\n\nexport function sessionFrameEnvelope(sessionId: string, frame: SessionFrame): SessionFrameEnvelope {\n return { type: SESSION_FRAME_TYPE, sessionId, frame };\n}\n\nexport function sessionCommand(sessionId: string, frame: SessionFrame): SessionCommandFrame {\n return { type: SESSION_COMMAND_TYPE, sessionId, frame };\n}\n\nexport function subscribeFrame(sessionId: string): SubscribeFrame {\n return { type: SUBSCRIBE_TYPE, sessionId };\n}\n\nexport function unsubscribeFrame(sessionId: string): UnsubscribeFrame {\n return { type: UNSUBSCRIBE_TYPE, sessionId };\n}\n\nexport interface SubscribeThreadFrame {\n type: typeof SUBSCRIBE_THREAD_TYPE;\n sessionId: string;\n threadId: string;\n}\n\nexport interface UnsubscribeThreadFrame {\n type: typeof UNSUBSCRIBE_THREAD_TYPE;\n sessionId: string;\n threadId: string;\n}\n\n/** Reply to subscribe_thread: the journal's newest entries as entry_appended frames, then live ones follow. */\nexport interface ThreadBacklogFrame {\n type: typeof THREAD_BACKLOG_TYPE;\n sessionId: string;\n threadId: string;\n frames: SessionFrame[];\n}\n\n/** One journal entry a followed thread gained, addressed to the pages following it. */\nexport interface ThreadFrameEnvelope {\n type: typeof THREAD_FRAME_TYPE;\n sessionId: string;\n threadId: string;\n frame: SessionFrame;\n}\n\nexport function subscribeThreadFrame(sessionId: string, threadId: string): SubscribeThreadFrame {\n return { type: SUBSCRIBE_THREAD_TYPE, sessionId, threadId };\n}\n\nexport function unsubscribeThreadFrame(sessionId: string, threadId: string): UnsubscribeThreadFrame {\n return { type: UNSUBSCRIBE_THREAD_TYPE, sessionId, threadId };\n}\n\nexport function threadBacklog(sessionId: string, threadId: string, frames: SessionFrame[]): ThreadBacklogFrame {\n return { type: THREAD_BACKLOG_TYPE, sessionId, threadId, frames };\n}\n\nexport function threadFrameEnvelope(sessionId: string, threadId: string, frame: SessionFrame): ThreadFrameEnvelope {\n return { type: THREAD_FRAME_TYPE, sessionId, threadId, frame };\n}\n"],"mappings":";;;;;;;;;AAUA,MAAa,uBAAuB;;AAGpC,MAAa,WAAW;;AAGxB,MAAa,uBAAuB;;AAGpC,MAAa,qBAAqB;;;;;;AA4BlC,MAAa,wBAAwB;;AAGrC,MAAa,+BAA+B;;;;;AAa5C,MAAa,0BAA0B;AAkIvC,MAAa,iBAAiB;AAC9B,MAAa,2BAA2B;AACxC,MAAa,wBAAwB;AACrC,MAAa,yBAAyB;AACtC,MAAa,yBAAyB;AACtC,MAAa,sBAAsB;AACnC,MAAa,uBAAuB;AACpC,MAAa,uBAAuB;AACpC,MAAa,qBAAqB;;AAElC,MAAa,uBAAuB;;;;;;;;AAQpC,MAAa,oBAAoB;;;;;;AAOjC,MAAa,wBAAwB;;;;;;;;;;;AAYrC,MAAa,yBAAyB;;;;;;;;AAQtC,MAAa,qBAAqB;;;;;;;;;;;AAYlC,MAAa,8BAA8B;;;;;;;;;;AAU3C,MAAa,8BAA8B;AAqE3C,MAAa,iBAAiB;AAC9B,MAAa,mBAAmB;AAChC,MAAa,uBAAuB;;AAEpC,MAAa,wBAAwB;AACrC,MAAa,0BAA0B;AACvC,MAAa,sBAAsB;AACnC,MAAa,oBAAoB;;AAGjC,MAAa,uBAAuB;;AAEpC,MAAa,oBAAoB;;;;;;AAOjC,MAAa,oBAAoB;AAiGjC,SAAgB,SAAS,UAAmC;CAC1D,OAAO;EAAE,MAAM;EAAgB,UAAA;EAAgC;CAAS;AAC1E;AAEA,SAAgB,qBAAqB,WAAmB,OAA2C;CACjG,OAAO;EAAE,MAAM;EAAoB;EAAW;CAAM;AACtD;AAEA,SAAgB,eAAe,WAAmB,OAA0C;CAC1F,OAAO;EAAE,MAAM;EAAsB;EAAW;CAAM;AACxD;AAEA,SAAgB,eAAe,WAAmC;CAChE,OAAO;EAAE,MAAM;EAAgB;CAAU;AAC3C;AAEA,SAAgB,iBAAiB,WAAqC;CACpE,OAAO;EAAE,MAAM;EAAkB;CAAU;AAC7C;AA8BA,SAAgB,qBAAqB,WAAmB,UAAwC;CAC9F,OAAO;EAAE,MAAM;EAAuB;EAAW;CAAS;AAC5D;AAEA,SAAgB,uBAAuB,WAAmB,UAA0C;CAClG,OAAO;EAAE,MAAM;EAAyB;EAAW;CAAS;AAC9D;AAEA,SAAgB,cAAc,WAAmB,UAAkB,QAA4C;CAC7G,OAAO;EAAE,MAAM;EAAqB;EAAW;EAAU;CAAO;AAClE;AAEA,SAAgB,oBAAoB,WAAmB,UAAkB,OAA0C;CACjH,OAAO;EAAE,MAAM;EAAmB;EAAW;EAAU;CAAM;AAC/D"}
1
+ {"version":3,"file":"hub.cjs","names":[],"sources":["../../src/types/hub.ts"],"sourcesContent":["import type { BridgeState, SessionFrame } from './session';\n\n/**\n * Wire vocabulary between the hub and its pages.\n *\n * One WebSocket carries every session: hub-level frames describe the set of\n * sessions, and session-scoped traffic travels enveloped with the session id.\n * Field naming follows @earendil-works/pi-protocol so a future swap to the\n * upstream session server stays a transport change, not a rename.\n */\nexport const HUB_PROTOCOL_VERSION = 2;\n\n/** Role marker in the health payload; po-server probes for it before binding the port. */\nexport const HUB_ROLE = 'hub';\n\n/** REST endpoint for admitting and listing durable workspaces. */\nexport const WORKSPACES_API_ROUTE = '/api/workspaces';\n\n/** REST endpoint for creating sessions and browsing resumable Pi history. */\nexport const SESSIONS_API_ROUTE = '/api/workspaces/:workspaceId/sessions';\n\n/** One durable repository workspace shown in the rail, even while it has no sessions. */\nexport interface WorkspaceSummary {\n id: string;\n root: string;\n /** Display name chosen when the workspace was added; the folder basename stands in when absent. */\n name?: string;\n /** A remembered workspace whose root could not be mounted on this server start. */\n available?: boolean;\n error?: string;\n}\n\n/** One inactive Pi thread available to resume in a live session's workspace. */\nexport interface PiSessionHistoryItem {\n id: string;\n name?: string;\n firstMessage: string;\n createdAt: string;\n updatedAt: string;\n messageCount: number;\n}\n\n/**\n * REST endpoint behind the new-session directory picker; the page sends the\n * typed path as ?q= and receives {directories}: the children of the parent\n * directory whose names match the trailing segment as a regular expression.\n */\nexport const DIRECTORIES_API_ROUTE = '/api/directories';\n\n/** Lists the visible child folders of ?path= (home when absent) for the workspace folder browser. */\nexport const DIRECTORY_CHILDREN_API_ROUTE = '/api/directories/children';\n\n/** One folder's visible child directories, as absolute paths. */\nexport interface DirectoryListing {\n path: string;\n parent?: string;\n directories: string[];\n}\n\n/**\n * Query parameter that routes a package API request to one session's server.\n * Without it the request is answered by a hub-scoped API in this process.\n */\nexport const API_SESSION_QUERY_PARAM = 'session';\n\n/** What the agent is doing right now, derived from its frame stream. */\nexport type SessionPhase = 'idle' | 'turn' | 'compaction' | 'retry';\n\nexport interface SessionProfile {\n name: string;\n displayName?: string;\n /** Changes whenever the icon does; absent when the profile has no icon. */\n iconVersion?: string;\n}\n\nexport interface SessionGitStatus {\n branch: string;\n /** True when the working tree has uncommitted changes; rendered as a star. */\n dirty: boolean;\n}\n\n/** One immutable, signed client composition resolved for a session. */\nexport interface SessionWebComposition {\n /** Stable identity of the synchronized root and generation. */\n id: string;\n /** Monotonic signing revision advertised by the manifest. */\n revision: number;\n /** Same-origin signed-manifest route read by the trusted service worker. */\n manifestUrl: string;\n /** Same-origin prefix for the untrusted source bytes verified by the worker. */\n rawAssetBaseUrl: string;\n /** Worker-owned prefix from which the page may execute verified bytes. */\n verifiedAssetBaseUrl: string;\n /** `[slot, entry]` per plugin copy this mount runs, each entry an absolute path below both asset prefixes. */\n pluginEntries: [string, string][];\n /** Absolute paths below both asset prefixes of every file this mount's slots can load. */\n assetPaths: string[];\n /** Absolute paths below both asset prefixes, replaced when this session is focused. */\n stylePaths: string[];\n /** Frame types owned by the matching session-local hub composition. */\n channels: string[];\n /**\n * The slots this mount runs out of a shared build. Absent means the composition\n * holds only this mount's plugins, as in-memory test hosts publish it.\n */\n plugins?: string[];\n}\n\n/** One immutable, signed native composition resolved for a session; read by po-native, ignored by the web. */\nexport interface SessionNativeComposition {\n /** Stable identity of the synchronized root and generation. */\n id: string;\n scope: 'global' | 'workspace' | 'session';\n /** Monotonic signing revision advertised by the manifest. */\n revision: number;\n manifestUrl: string;\n rawAssetBaseUrl: string;\n /** Always `/composition.js`. */\n entryPath: string;\n channels: string[];\n /** The `poNative.pluginId` values resolved for this mount; the shell installs only these. */\n plugins: string[];\n}\n\n/**\n * Everything the rail needs to render one session without subscribing to it.\n */\nexport interface SessionSummary {\n workspaceId?: string;\n id: string;\n name: string;\n cwd: string;\n /** ISO 8601, from the session's registry record. */\n createdAt: string;\n /** ISO 8601, bumped whenever the session's frame stream moves. */\n updatedAt: string;\n phase: SessionPhase;\n /** ISO 8601 timestamp of the last phase change; drives \"running · 12m\". */\n phaseSince: string;\n /** The hub's own attachment to the session socket. */\n attach: BridgeState;\n /** Human-readable cause, present when attach is refused or closed. */\n attachReason?: string;\n pendingMessageCount: number;\n /** False until the first prompt is forwarded; \"fresh session · nothing sent yet\". */\n everPrompted: boolean;\n /** True while the agent waits on a dialog answer; \"waiting for your input\". */\n awaitingInput: boolean;\n /** ISO 8601 of the last settled run, once one finished. */\n lastSettledAt?: string;\n /** Omitted when the cwd is not a git repository or git is unavailable. */\n git?: SessionGitStatus;\n /** Selected profile; the icon itself is served by the session avatar route. */\n profile?: SessionProfile;\n /** Signed plugin composition independently resolved for this session. */\n webComposition?: SessionWebComposition;\n /** Signed native composition for this session, when native targets were built. */\n nativeComposition?: SessionNativeComposition;\n /**\n * The session this one was spawned from, recorded by the hub when it opened the session.\n * The rail nests a session under its parent; absent means a top-level row.\n */\n parentSessionId?: string;\n /**\n * The spawning package's own label for the relationship, such as \"worktree\".\n * The hub does not interpret it; the rail uses it to pick an affordance.\n */\n sessionProvenance?: string;\n /** User-assigned groups; sessions sharing one may message each other. Absent means none. */\n groups?: string[];\n /** Host reservations awaiting a durable child runtime, not live sessions. */\n pendingSetups?: Array<{\n id: string;\n name: string;\n createdAt: string;\n cwd?: string;\n status?: 'provisioning' | 'failed' | 'interrupted';\n setupKind?: 'managed-worktree' | 'existing-directory';\n errorCode?: 'SESSION_WORKTREE_PROVISION_FAILED' | 'SESSION_UNAVAILABLE';\n }>;\n /**\n * One line an extension published about background work it runs for this\n * session, such as a workflow; the rail shows it in place of the idle copy.\n */\n activity?: { label: string; attention?: boolean; since?: string };\n /**\n * The hub recorded this session but has not reopened it since its last\n * restart. Its journal is on disk; nothing is running behind the card until\n * the page asks for it.\n */\n dormant?: boolean;\n}\n\nexport const HUB_HELLO_TYPE = 'hub_hello';\nexport const WORKSPACES_SNAPSHOT_TYPE = 'workspaces_snapshot';\nexport const WORKSPACE_UPSERT_TYPE = 'workspace_upsert';\nexport const WORKSPACE_REMOVED_TYPE = 'workspace_removed';\nexport const SESSIONS_SNAPSHOT_TYPE = 'sessions_snapshot';\nexport const SESSION_UPSERT_TYPE = 'session_upsert';\nexport const SESSION_REMOVED_TYPE = 'session_removed';\nexport const SESSION_BACKLOG_TYPE = 'session_backlog';\nexport const SESSION_FRAME_TYPE = 'session_frame';\n/** Hub-synthesized close for an answered dialog; Pi itself never announces one. */\nexport const DIALOG_ANSWERED_TYPE = 'extension_ui_answered';\n/**\n * Sync rebuilt the artifacts this page is running against.\n *\n * The plugin bundle the browser loaded is one of them, and a bundle only\n * changes on disk: nothing about the running page notices. The page reloads\n * itself rather than staying on surfaces the repository no longer describes.\n */\nexport const HUB_RESYNCED_TYPE = 'hub_resynced';\n\n/**\n * The custom session entry the Po runtime journals with its minor-mode\n * catalog projection; it arrives inside Pi's entry_appended frames. The shape\n * mirrors MinorModeProjection in po-minor-mode.\n */\nexport const MINOR_MODE_ENTRY_TYPE = 'po-minor-modes';\n\n/**\n * The custom session entry the Po runtime journals when the agent's model\n * changes without a client having asked for it. The shape mirrors\n * AgentModelProjection in po-core.\n *\n * Pi reports a thinking-level switch on the wire, so that field follows from\n * the frame alone. It has no wire event for the model, so plan mode applying\n * its configured planning model would otherwise leave the chip naming the\n * model the session left behind.\n */\nexport const AGENT_MODEL_ENTRY_TYPE = 'po-agent-model';\n/**\n * The custom session entry Po journals describing what the session is\n * composed of: which mode admitted each tool and skill, and what each costs.\n *\n * Schemas are deliberately absent. Only names, kinds, owners and integer token\n * counts travel, so republishing the whole composition stays cheap.\n */\nexport const CONTEXT_ENTRY_TYPE = 'po-context';\n\n/**\n * The custom session entry po-profile journals naming the persona the\n * session speaks as. The shape mirrors ProfileIdentityProjection in\n * po-core.\n *\n * Unlike the entries above, this one is transcript rather than projection: it\n * stays in journal order and is never collapsed to the latest record, because a\n * message keeps the persona it was written under. Adding it to\n * PROJECTION_ENTRY_TYPES would repaint the whole transcript on every switch.\n */\nexport const PROFILE_IDENTITY_ENTRY_TYPE = 'po-profile-identity';\n/**\n * The custom session entry po-domain journals once Pi has rebuilt its\n * resource catalog for a reload; it mirrors PO_RESOURCE_CATALOG_ENTRY_TYPE in\n * po-core.\n *\n * A reload is what changes the skills the composer offers under `$`, and Pi\n * reports nothing else for one, so this entry is the cockpit's only notice that\n * the command list it cached belongs to the previous selection.\n */\nexport const RESOURCE_CATALOG_ENTRY_TYPE = 'po-resource-catalog';\nexport interface MinorModeActionProjection {\n id: string;\n label: string;\n description: string;\n enabled: boolean;\n disabledReason?: string;\n needsInput: boolean;\n}\n\nexport interface MinorModeRecordProjection {\n id: string;\n label: string;\n description: string;\n order: number;\n activation: 'inactive' | 'activating' | 'active' | 'deactivating';\n condition: string;\n detail?: string;\n actions: MinorModeActionProjection[];\n}\n\nexport interface MinorModeProjection {\n version: 1;\n revision: number;\n modes: MinorModeRecordProjection[];\n}\n\nexport type ContextGroupKind = 'major' | 'minor' | 'domain' | 'core';\nexport type ContextItemSource = 'extension' | 'mcp' | 'plugin' | 'core';\n\nexport interface ContextItemProjection {\n name: string;\n itemKind: 'tool' | 'skill';\n source: ContextItemSource;\n owner: string;\n tokens: number;\n active: boolean;\n}\n\nexport interface ContextGroupProjection {\n id: string;\n label: string;\n kind: ContextGroupKind;\n items: ContextItemProjection[];\n /** What the group costs now: active items only. */\n tokens: number;\n /** What its gated items would add if switched on. */\n inactiveTokens: number;\n}\n\nexport interface ContextProjection {\n version: 1;\n revision: number;\n selection?: { majorMode: string; domains: string[]; profile?: string };\n groups: ContextGroupProjection[];\n totalTokens: number;\n inactiveTokens: number;\n /**\n * What the assembled system prompt costs, deliberately outside the groups.\n *\n * Every tool's prose and every skill's listing already count inside\n * `totalTokens`, and those are slices of this same text, so the two figures\n * overlap and must not be added. `stage` is `base` when the session has sent\n * nothing yet and the prompt shown is the one before packages patch it.\n */\n systemPrompt?: { tokens: number; stage: 'base' | 'effective' };\n /** Names the tokenizer, because the figures are indicative, not billed. */\n estimator: string;\n}\nexport const SUBSCRIBE_TYPE = 'subscribe';\nexport const UNSUBSCRIBE_TYPE = 'unsubscribe';\nexport const SESSION_COMMAND_TYPE = 'session_command';\n/** A page follows one thread of a session: a journal a plugin's hub source names, such as a subagent run. */\nexport const SUBSCRIBE_THREAD_TYPE = 'subscribe_thread';\nexport const UNSUBSCRIBE_THREAD_TYPE = 'unsubscribe_thread';\nexport const THREAD_BACKLOG_TYPE = 'thread_backlog';\nexport const THREAD_FRAME_TYPE = 'thread_frame';\n\n/** A page asks for the transcript before what it already holds. */\nexport const HISTORY_REQUEST_TYPE = 'history_request';\n/** One older window, oldest first, answering a history_request. */\nexport const HISTORY_PAGE_TYPE = 'history_page';\n\n/**\n * How many journalled messages one page carries. Small enough that prepending\n * a window never blocks the reader's scroll, large enough that a flick through\n * a long transcript does not turn into a hundred round trips.\n */\nexport const HISTORY_PAGE_SIZE = 100;\n\nexport interface HistoryRequestFrame {\n type: typeof HISTORY_REQUEST_TYPE;\n sessionId: string;\n /** Journal id of the oldest entry the page holds; absent asks for the newest window. */\n before?: string;\n limit?: number;\n}\n\nexport interface HistoryPageFrame {\n type: typeof HISTORY_PAGE_TYPE;\n sessionId: string;\n /** Entry frames, oldest first, to prepend above what the page holds. */\n frames: Record<string, unknown>[];\n /** The cursor for the next older window; null when the transcript starts here. */\n cursor: string | null;\n /** Whether anything older than this window exists. */\n hasMore: boolean;\n /** Echoed so a page can drop an answer to a question it has since abandoned. */\n before?: string;\n}\n\n/** First frame on every page socket, before the snapshot. */\nexport interface HubHelloFrame {\n type: typeof HUB_HELLO_TYPE;\n protocol: number;\n /** Frame types of the hub's loaded data channels; lets a panel tell \"plugin server not installed\" from \"no data\". */\n channels: string[];\n}\n\nexport interface WorkspacesSnapshotFrame {\n type: typeof WORKSPACES_SNAPSHOT_TYPE;\n workspaces: WorkspaceSummary[];\n}\n\nexport interface WorkspaceUpsertFrame {\n type: typeof WORKSPACE_UPSERT_TYPE;\n workspace: WorkspaceSummary;\n}\n\nexport interface WorkspaceRemovedFrame {\n type: typeof WORKSPACE_REMOVED_TYPE;\n workspaceId: string;\n}\n\nexport interface SessionsSnapshotFrame {\n type: typeof SESSIONS_SNAPSHOT_TYPE;\n sessions: SessionSummary[];\n}\n\nexport interface SessionUpsertFrame {\n type: typeof SESSION_UPSERT_TYPE;\n session: SessionSummary;\n}\n\nexport interface SessionRemovedFrame {\n type: typeof SESSION_REMOVED_TYPE;\n sessionId: string;\n}\n\n/**\n * Reply to subscribe: this session's latest status and widget projections first,\n * then its bounded transient history. Live frames follow.\n */\nexport interface SessionBacklogFrame {\n type: typeof SESSION_BACKLOG_TYPE;\n sessionId: string;\n frames: SessionFrame[];\n /** Transient frames the bounded ring discarded; projections do not contribute. */\n dropped: number;\n}\n\n/** One live agent frame, addressed to subscribers of its session. */\nexport interface SessionFrameEnvelope {\n type: typeof SESSION_FRAME_TYPE;\n sessionId: string;\n frame: SessionFrame;\n}\n\nexport interface SubscribeFrame {\n type: typeof SUBSCRIBE_TYPE;\n sessionId: string;\n}\n\nexport interface UnsubscribeFrame {\n type: typeof UNSUBSCRIBE_TYPE;\n sessionId: string;\n}\n\n/** One command frame from the page, addressed to a session's agent. */\nexport interface SessionCommandFrame {\n type: typeof SESSION_COMMAND_TYPE;\n sessionId: string;\n frame: SessionFrame;\n}\n\nexport function hubHello(channels: string[]): HubHelloFrame {\n return { type: HUB_HELLO_TYPE, protocol: HUB_PROTOCOL_VERSION, channels };\n}\n\nexport function sessionFrameEnvelope(sessionId: string, frame: SessionFrame): SessionFrameEnvelope {\n return { type: SESSION_FRAME_TYPE, sessionId, frame };\n}\n\nexport function sessionCommand(sessionId: string, frame: SessionFrame): SessionCommandFrame {\n return { type: SESSION_COMMAND_TYPE, sessionId, frame };\n}\n\nexport function subscribeFrame(sessionId: string): SubscribeFrame {\n return { type: SUBSCRIBE_TYPE, sessionId };\n}\n\nexport function unsubscribeFrame(sessionId: string): UnsubscribeFrame {\n return { type: UNSUBSCRIBE_TYPE, sessionId };\n}\n\nexport interface SubscribeThreadFrame {\n type: typeof SUBSCRIBE_THREAD_TYPE;\n sessionId: string;\n threadId: string;\n}\n\nexport interface UnsubscribeThreadFrame {\n type: typeof UNSUBSCRIBE_THREAD_TYPE;\n sessionId: string;\n threadId: string;\n}\n\n/** Reply to subscribe_thread: the journal's newest entries as entry_appended frames, then live ones follow. */\nexport interface ThreadBacklogFrame {\n type: typeof THREAD_BACKLOG_TYPE;\n sessionId: string;\n threadId: string;\n frames: SessionFrame[];\n}\n\n/** One journal entry a followed thread gained, addressed to the pages following it. */\nexport interface ThreadFrameEnvelope {\n type: typeof THREAD_FRAME_TYPE;\n sessionId: string;\n threadId: string;\n frame: SessionFrame;\n}\n\nexport function subscribeThreadFrame(sessionId: string, threadId: string): SubscribeThreadFrame {\n return { type: SUBSCRIBE_THREAD_TYPE, sessionId, threadId };\n}\n\nexport function unsubscribeThreadFrame(sessionId: string, threadId: string): UnsubscribeThreadFrame {\n return { type: UNSUBSCRIBE_THREAD_TYPE, sessionId, threadId };\n}\n\nexport function threadBacklog(sessionId: string, threadId: string, frames: SessionFrame[]): ThreadBacklogFrame {\n return { type: THREAD_BACKLOG_TYPE, sessionId, threadId, frames };\n}\n\nexport function threadFrameEnvelope(sessionId: string, threadId: string, frame: SessionFrame): ThreadFrameEnvelope {\n return { type: THREAD_FRAME_TYPE, sessionId, threadId, frame };\n}\n"],"mappings":";;;;;;;;;AAUA,MAAa,uBAAuB;;AAGpC,MAAa,WAAW;;AAGxB,MAAa,uBAAuB;;AAGpC,MAAa,qBAAqB;;;;;;AA4BlC,MAAa,wBAAwB;;AAGrC,MAAa,+BAA+B;;;;;AAa5C,MAAa,0BAA0B;AAkIvC,MAAa,iBAAiB;AAC9B,MAAa,2BAA2B;AACxC,MAAa,wBAAwB;AACrC,MAAa,yBAAyB;AACtC,MAAa,yBAAyB;AACtC,MAAa,sBAAsB;AACnC,MAAa,uBAAuB;AACpC,MAAa,uBAAuB;AACpC,MAAa,qBAAqB;;AAElC,MAAa,uBAAuB;;;;;;;;AAQpC,MAAa,oBAAoB;;;;;;AAOjC,MAAa,wBAAwB;;;;;;;;;;;AAYrC,MAAa,yBAAyB;;;;;;;;AAQtC,MAAa,qBAAqB;;;;;;;;;;;AAYlC,MAAa,8BAA8B;;;;;;;;;;AAU3C,MAAa,8BAA8B;AAqE3C,MAAa,iBAAiB;AAC9B,MAAa,mBAAmB;AAChC,MAAa,uBAAuB;;AAEpC,MAAa,wBAAwB;AACrC,MAAa,0BAA0B;AACvC,MAAa,sBAAsB;AACnC,MAAa,oBAAoB;;AAGjC,MAAa,uBAAuB;;AAEpC,MAAa,oBAAoB;;;;;;AAOjC,MAAa,oBAAoB;AAiGjC,SAAgB,SAAS,UAAmC;CAC1D,OAAO;EAAE,MAAM;EAAgB,UAAA;EAAgC;CAAS;AAC1E;AAEA,SAAgB,qBAAqB,WAAmB,OAA2C;CACjG,OAAO;EAAE,MAAM;EAAoB;EAAW;CAAM;AACtD;AAEA,SAAgB,eAAe,WAAmB,OAA0C;CAC1F,OAAO;EAAE,MAAM;EAAsB;EAAW;CAAM;AACxD;AAEA,SAAgB,eAAe,WAAmC;CAChE,OAAO;EAAE,MAAM;EAAgB;CAAU;AAC3C;AAEA,SAAgB,iBAAiB,WAAqC;CACpE,OAAO;EAAE,MAAM;EAAkB;CAAU;AAC7C;AA8BA,SAAgB,qBAAqB,WAAmB,UAAwC;CAC9F,OAAO;EAAE,MAAM;EAAuB;EAAW;CAAS;AAC5D;AAEA,SAAgB,uBAAuB,WAAmB,UAA0C;CAClG,OAAO;EAAE,MAAM;EAAyB;EAAW;CAAS;AAC9D;AAEA,SAAgB,cAAc,WAAmB,UAAkB,QAA4C;CAC7G,OAAO;EAAE,MAAM;EAAqB;EAAW;EAAU;CAAO;AAClE;AAEA,SAAgB,oBAAoB,WAAmB,UAAkB,OAA0C;CACjH,OAAO;EAAE,MAAM;EAAmB;EAAW;EAAU;CAAM;AAC/D"}
@@ -203,7 +203,7 @@ export declare const HUB_RESYNCED_TYPE = "hub_resynced";
203
203
  * catalog projection; it arrives inside Pi's entry_appended frames. The shape
204
204
  * mirrors MinorModeProjection in po-minor-mode.
205
205
  */
206
- export declare const MINOR_MODE_ENTRY_TYPE = "doom-minor-modes";
206
+ export declare const MINOR_MODE_ENTRY_TYPE = "po-minor-modes";
207
207
  /**
208
208
  * The custom session entry the Po runtime journals when the agent's model
209
209
  * changes without a client having asked for it. The shape mirrors
@@ -214,7 +214,7 @@ export declare const MINOR_MODE_ENTRY_TYPE = "doom-minor-modes";
214
214
  * its configured planning model would otherwise leave the chip naming the
215
215
  * model the session left behind.
216
216
  */
217
- export declare const AGENT_MODEL_ENTRY_TYPE = "doom-agent-model";
217
+ export declare const AGENT_MODEL_ENTRY_TYPE = "po-agent-model";
218
218
  /**
219
219
  * The custom session entry Po journals describing what the session is
220
220
  * composed of: which mode admitted each tool and skill, and what each costs.
@@ -222,7 +222,7 @@ export declare const AGENT_MODEL_ENTRY_TYPE = "doom-agent-model";
222
222
  * Schemas are deliberately absent. Only names, kinds, owners and integer token
223
223
  * counts travel, so republishing the whole composition stays cheap.
224
224
  */
225
- export declare const CONTEXT_ENTRY_TYPE = "doom-context";
225
+ export declare const CONTEXT_ENTRY_TYPE = "po-context";
226
226
  /**
227
227
  * The custom session entry po-profile journals naming the persona the
228
228
  * session speaks as. The shape mirrors ProfileIdentityProjection in
@@ -233,17 +233,17 @@ export declare const CONTEXT_ENTRY_TYPE = "doom-context";
233
233
  * message keeps the persona it was written under. Adding it to
234
234
  * PROJECTION_ENTRY_TYPES would repaint the whole transcript on every switch.
235
235
  */
236
- export declare const PROFILE_IDENTITY_ENTRY_TYPE = "doom-profile-identity";
236
+ export declare const PROFILE_IDENTITY_ENTRY_TYPE = "po-profile-identity";
237
237
  /**
238
238
  * The custom session entry po-domain journals once Pi has rebuilt its
239
- * resource catalog for a reload; it mirrors DOOM_RESOURCE_CATALOG_ENTRY_TYPE in
239
+ * resource catalog for a reload; it mirrors PO_RESOURCE_CATALOG_ENTRY_TYPE in
240
240
  * po-core.
241
241
  *
242
242
  * A reload is what changes the skills the composer offers under `$`, and Pi
243
243
  * reports nothing else for one, so this entry is the cockpit's only notice that
244
244
  * the command list it cached belongs to the previous selection.
245
245
  */
246
- export declare const RESOURCE_CATALOG_ENTRY_TYPE = "doom-resource-catalog";
246
+ export declare const RESOURCE_CATALOG_ENTRY_TYPE = "po-resource-catalog";
247
247
  export interface MinorModeActionProjection {
248
248
  id: string;
249
249
  label: string;
@@ -51,7 +51,7 @@ const HUB_RESYNCED_TYPE = "hub_resynced";
51
51
  * catalog projection; it arrives inside Pi's entry_appended frames. The shape
52
52
  * mirrors MinorModeProjection in po-minor-mode.
53
53
  */
54
- const MINOR_MODE_ENTRY_TYPE = "doom-minor-modes";
54
+ const MINOR_MODE_ENTRY_TYPE = "po-minor-modes";
55
55
  /**
56
56
  * The custom session entry the Po runtime journals when the agent's model
57
57
  * changes without a client having asked for it. The shape mirrors
@@ -62,7 +62,7 @@ const MINOR_MODE_ENTRY_TYPE = "doom-minor-modes";
62
62
  * its configured planning model would otherwise leave the chip naming the
63
63
  * model the session left behind.
64
64
  */
65
- const AGENT_MODEL_ENTRY_TYPE = "doom-agent-model";
65
+ const AGENT_MODEL_ENTRY_TYPE = "po-agent-model";
66
66
  /**
67
67
  * The custom session entry Po journals describing what the session is
68
68
  * composed of: which mode admitted each tool and skill, and what each costs.
@@ -70,7 +70,7 @@ const AGENT_MODEL_ENTRY_TYPE = "doom-agent-model";
70
70
  * Schemas are deliberately absent. Only names, kinds, owners and integer token
71
71
  * counts travel, so republishing the whole composition stays cheap.
72
72
  */
73
- const CONTEXT_ENTRY_TYPE = "doom-context";
73
+ const CONTEXT_ENTRY_TYPE = "po-context";
74
74
  /**
75
75
  * The custom session entry po-profile journals naming the persona the
76
76
  * session speaks as. The shape mirrors ProfileIdentityProjection in
@@ -81,17 +81,17 @@ const CONTEXT_ENTRY_TYPE = "doom-context";
81
81
  * message keeps the persona it was written under. Adding it to
82
82
  * PROJECTION_ENTRY_TYPES would repaint the whole transcript on every switch.
83
83
  */
84
- const PROFILE_IDENTITY_ENTRY_TYPE = "doom-profile-identity";
84
+ const PROFILE_IDENTITY_ENTRY_TYPE = "po-profile-identity";
85
85
  /**
86
86
  * The custom session entry po-domain journals once Pi has rebuilt its
87
- * resource catalog for a reload; it mirrors DOOM_RESOURCE_CATALOG_ENTRY_TYPE in
87
+ * resource catalog for a reload; it mirrors PO_RESOURCE_CATALOG_ENTRY_TYPE in
88
88
  * po-core.
89
89
  *
90
90
  * A reload is what changes the skills the composer offers under `$`, and Pi
91
91
  * reports nothing else for one, so this entry is the cockpit's only notice that
92
92
  * the command list it cached belongs to the previous selection.
93
93
  */
94
- const RESOURCE_CATALOG_ENTRY_TYPE = "doom-resource-catalog";
94
+ const RESOURCE_CATALOG_ENTRY_TYPE = "po-resource-catalog";
95
95
  const SUBSCRIBE_TYPE = "subscribe";
96
96
  const UNSUBSCRIBE_TYPE = "unsubscribe";
97
97
  const SESSION_COMMAND_TYPE = "session_command";
@@ -1 +1 @@
1
- {"version":3,"file":"hub.mjs","names":[],"sources":["../../src/types/hub.ts"],"sourcesContent":["import type { BridgeState, SessionFrame } from './session';\n\n/**\n * Wire vocabulary between the hub and its pages.\n *\n * One WebSocket carries every session: hub-level frames describe the set of\n * sessions, and session-scoped traffic travels enveloped with the session id.\n * Field naming follows @earendil-works/pi-protocol so a future swap to the\n * upstream session server stays a transport change, not a rename.\n */\nexport const HUB_PROTOCOL_VERSION = 2;\n\n/** Role marker in the health payload; po-server probes for it before binding the port. */\nexport const HUB_ROLE = 'hub';\n\n/** REST endpoint for admitting and listing durable workspaces. */\nexport const WORKSPACES_API_ROUTE = '/api/workspaces';\n\n/** REST endpoint for creating sessions and browsing resumable Pi history. */\nexport const SESSIONS_API_ROUTE = '/api/workspaces/:workspaceId/sessions';\n\n/** One durable repository workspace shown in the rail, even while it has no sessions. */\nexport interface WorkspaceSummary {\n id: string;\n root: string;\n /** Display name chosen when the workspace was added; the folder basename stands in when absent. */\n name?: string;\n /** A remembered workspace whose root could not be mounted on this server start. */\n available?: boolean;\n error?: string;\n}\n\n/** One inactive Pi thread available to resume in a live session's workspace. */\nexport interface PiSessionHistoryItem {\n id: string;\n name?: string;\n firstMessage: string;\n createdAt: string;\n updatedAt: string;\n messageCount: number;\n}\n\n/**\n * REST endpoint behind the new-session directory picker; the page sends the\n * typed path as ?q= and receives {directories}: the children of the parent\n * directory whose names match the trailing segment as a regular expression.\n */\nexport const DIRECTORIES_API_ROUTE = '/api/directories';\n\n/** Lists the visible child folders of ?path= (home when absent) for the workspace folder browser. */\nexport const DIRECTORY_CHILDREN_API_ROUTE = '/api/directories/children';\n\n/** One folder's visible child directories, as absolute paths. */\nexport interface DirectoryListing {\n path: string;\n parent?: string;\n directories: string[];\n}\n\n/**\n * Query parameter that routes a package API request to one session's server.\n * Without it the request is answered by a hub-scoped API in this process.\n */\nexport const API_SESSION_QUERY_PARAM = 'session';\n\n/** What the agent is doing right now, derived from its frame stream. */\nexport type SessionPhase = 'idle' | 'turn' | 'compaction' | 'retry';\n\nexport interface SessionProfile {\n name: string;\n displayName?: string;\n /** Changes whenever the icon does; absent when the profile has no icon. */\n iconVersion?: string;\n}\n\nexport interface SessionGitStatus {\n branch: string;\n /** True when the working tree has uncommitted changes; rendered as a star. */\n dirty: boolean;\n}\n\n/** One immutable, signed client composition resolved for a session. */\nexport interface SessionWebComposition {\n /** Stable identity of the synchronized root and generation. */\n id: string;\n /** Monotonic signing revision advertised by the manifest. */\n revision: number;\n /** Same-origin signed-manifest route read by the trusted service worker. */\n manifestUrl: string;\n /** Same-origin prefix for the untrusted source bytes verified by the worker. */\n rawAssetBaseUrl: string;\n /** Worker-owned prefix from which the page may execute verified bytes. */\n verifiedAssetBaseUrl: string;\n /** `[slot, entry]` per plugin copy this mount runs, each entry an absolute path below both asset prefixes. */\n pluginEntries: [string, string][];\n /** Absolute paths below both asset prefixes of every file this mount's slots can load. */\n assetPaths: string[];\n /** Absolute paths below both asset prefixes, replaced when this session is focused. */\n stylePaths: string[];\n /** Frame types owned by the matching session-local hub composition. */\n channels: string[];\n /**\n * The slots this mount runs out of a shared build. Absent means the composition\n * holds only this mount's plugins, as in-memory test hosts publish it.\n */\n plugins?: string[];\n}\n\n/** One immutable, signed native composition resolved for a session; read by po-native, ignored by the web. */\nexport interface SessionNativeComposition {\n /** Stable identity of the synchronized root and generation. */\n id: string;\n scope: 'global' | 'workspace' | 'session';\n /** Monotonic signing revision advertised by the manifest. */\n revision: number;\n manifestUrl: string;\n rawAssetBaseUrl: string;\n /** Always `/composition.js`. */\n entryPath: string;\n channels: string[];\n /** The `poNative.pluginId` values resolved for this mount; the shell installs only these. */\n plugins: string[];\n}\n\n/**\n * Everything the rail needs to render one session without subscribing to it.\n */\nexport interface SessionSummary {\n workspaceId?: string;\n id: string;\n name: string;\n cwd: string;\n /** ISO 8601, from the session's registry record. */\n createdAt: string;\n /** ISO 8601, bumped whenever the session's frame stream moves. */\n updatedAt: string;\n phase: SessionPhase;\n /** ISO 8601 timestamp of the last phase change; drives \"running · 12m\". */\n phaseSince: string;\n /** The hub's own attachment to the session socket. */\n attach: BridgeState;\n /** Human-readable cause, present when attach is refused or closed. */\n attachReason?: string;\n pendingMessageCount: number;\n /** False until the first prompt is forwarded; \"fresh session · nothing sent yet\". */\n everPrompted: boolean;\n /** True while the agent waits on a dialog answer; \"waiting for your input\". */\n awaitingInput: boolean;\n /** ISO 8601 of the last settled run, once one finished. */\n lastSettledAt?: string;\n /** Omitted when the cwd is not a git repository or git is unavailable. */\n git?: SessionGitStatus;\n /** Selected profile; the icon itself is served by the session avatar route. */\n profile?: SessionProfile;\n /** Signed plugin composition independently resolved for this session. */\n webComposition?: SessionWebComposition;\n /** Signed native composition for this session, when native targets were built. */\n nativeComposition?: SessionNativeComposition;\n /**\n * The session this one was spawned from, recorded by the hub when it opened the session.\n * The rail nests a session under its parent; absent means a top-level row.\n */\n parentSessionId?: string;\n /**\n * The spawning package's own label for the relationship, such as \"worktree\".\n * The hub does not interpret it; the rail uses it to pick an affordance.\n */\n sessionProvenance?: string;\n /** User-assigned groups; sessions sharing one may message each other. Absent means none. */\n groups?: string[];\n /** Host reservations awaiting a durable child runtime, not live sessions. */\n pendingSetups?: Array<{\n id: string;\n name: string;\n createdAt: string;\n cwd?: string;\n status?: 'provisioning' | 'failed' | 'interrupted';\n setupKind?: 'managed-worktree' | 'existing-directory';\n errorCode?: 'SESSION_WORKTREE_PROVISION_FAILED' | 'SESSION_UNAVAILABLE';\n }>;\n /**\n * One line an extension published about background work it runs for this\n * session, such as a workflow; the rail shows it in place of the idle copy.\n */\n activity?: { label: string; attention?: boolean; since?: string };\n /**\n * The hub recorded this session but has not reopened it since its last\n * restart. Its journal is on disk; nothing is running behind the card until\n * the page asks for it.\n */\n dormant?: boolean;\n}\n\nexport const HUB_HELLO_TYPE = 'hub_hello';\nexport const WORKSPACES_SNAPSHOT_TYPE = 'workspaces_snapshot';\nexport const WORKSPACE_UPSERT_TYPE = 'workspace_upsert';\nexport const WORKSPACE_REMOVED_TYPE = 'workspace_removed';\nexport const SESSIONS_SNAPSHOT_TYPE = 'sessions_snapshot';\nexport const SESSION_UPSERT_TYPE = 'session_upsert';\nexport const SESSION_REMOVED_TYPE = 'session_removed';\nexport const SESSION_BACKLOG_TYPE = 'session_backlog';\nexport const SESSION_FRAME_TYPE = 'session_frame';\n/** Hub-synthesized close for an answered dialog; Pi itself never announces one. */\nexport const DIALOG_ANSWERED_TYPE = 'extension_ui_answered';\n/**\n * Sync rebuilt the artifacts this page is running against.\n *\n * The plugin bundle the browser loaded is one of them, and a bundle only\n * changes on disk: nothing about the running page notices. The page reloads\n * itself rather than staying on surfaces the repository no longer describes.\n */\nexport const HUB_RESYNCED_TYPE = 'hub_resynced';\n\n/**\n * The custom session entry the Po runtime journals with its minor-mode\n * catalog projection; it arrives inside Pi's entry_appended frames. The shape\n * mirrors MinorModeProjection in po-minor-mode.\n */\nexport const MINOR_MODE_ENTRY_TYPE = 'doom-minor-modes';\n\n/**\n * The custom session entry the Po runtime journals when the agent's model\n * changes without a client having asked for it. The shape mirrors\n * AgentModelProjection in po-core.\n *\n * Pi reports a thinking-level switch on the wire, so that field follows from\n * the frame alone. It has no wire event for the model, so plan mode applying\n * its configured planning model would otherwise leave the chip naming the\n * model the session left behind.\n */\nexport const AGENT_MODEL_ENTRY_TYPE = 'doom-agent-model';\n/**\n * The custom session entry Po journals describing what the session is\n * composed of: which mode admitted each tool and skill, and what each costs.\n *\n * Schemas are deliberately absent. Only names, kinds, owners and integer token\n * counts travel, so republishing the whole composition stays cheap.\n */\nexport const CONTEXT_ENTRY_TYPE = 'doom-context';\n\n/**\n * The custom session entry po-profile journals naming the persona the\n * session speaks as. The shape mirrors ProfileIdentityProjection in\n * po-core.\n *\n * Unlike the entries above, this one is transcript rather than projection: it\n * stays in journal order and is never collapsed to the latest record, because a\n * message keeps the persona it was written under. Adding it to\n * PROJECTION_ENTRY_TYPES would repaint the whole transcript on every switch.\n */\nexport const PROFILE_IDENTITY_ENTRY_TYPE = 'doom-profile-identity';\n/**\n * The custom session entry po-domain journals once Pi has rebuilt its\n * resource catalog for a reload; it mirrors DOOM_RESOURCE_CATALOG_ENTRY_TYPE in\n * po-core.\n *\n * A reload is what changes the skills the composer offers under `$`, and Pi\n * reports nothing else for one, so this entry is the cockpit's only notice that\n * the command list it cached belongs to the previous selection.\n */\nexport const RESOURCE_CATALOG_ENTRY_TYPE = 'doom-resource-catalog';\nexport interface MinorModeActionProjection {\n id: string;\n label: string;\n description: string;\n enabled: boolean;\n disabledReason?: string;\n needsInput: boolean;\n}\n\nexport interface MinorModeRecordProjection {\n id: string;\n label: string;\n description: string;\n order: number;\n activation: 'inactive' | 'activating' | 'active' | 'deactivating';\n condition: string;\n detail?: string;\n actions: MinorModeActionProjection[];\n}\n\nexport interface MinorModeProjection {\n version: 1;\n revision: number;\n modes: MinorModeRecordProjection[];\n}\n\nexport type ContextGroupKind = 'major' | 'minor' | 'domain' | 'core';\nexport type ContextItemSource = 'extension' | 'mcp' | 'plugin' | 'core';\n\nexport interface ContextItemProjection {\n name: string;\n itemKind: 'tool' | 'skill';\n source: ContextItemSource;\n owner: string;\n tokens: number;\n active: boolean;\n}\n\nexport interface ContextGroupProjection {\n id: string;\n label: string;\n kind: ContextGroupKind;\n items: ContextItemProjection[];\n /** What the group costs now: active items only. */\n tokens: number;\n /** What its gated items would add if switched on. */\n inactiveTokens: number;\n}\n\nexport interface ContextProjection {\n version: 1;\n revision: number;\n selection?: { majorMode: string; domains: string[]; profile?: string };\n groups: ContextGroupProjection[];\n totalTokens: number;\n inactiveTokens: number;\n /**\n * What the assembled system prompt costs, deliberately outside the groups.\n *\n * Every tool's prose and every skill's listing already count inside\n * `totalTokens`, and those are slices of this same text, so the two figures\n * overlap and must not be added. `stage` is `base` when the session has sent\n * nothing yet and the prompt shown is the one before packages patch it.\n */\n systemPrompt?: { tokens: number; stage: 'base' | 'effective' };\n /** Names the tokenizer, because the figures are indicative, not billed. */\n estimator: string;\n}\nexport const SUBSCRIBE_TYPE = 'subscribe';\nexport const UNSUBSCRIBE_TYPE = 'unsubscribe';\nexport const SESSION_COMMAND_TYPE = 'session_command';\n/** A page follows one thread of a session: a journal a plugin's hub source names, such as a subagent run. */\nexport const SUBSCRIBE_THREAD_TYPE = 'subscribe_thread';\nexport const UNSUBSCRIBE_THREAD_TYPE = 'unsubscribe_thread';\nexport const THREAD_BACKLOG_TYPE = 'thread_backlog';\nexport const THREAD_FRAME_TYPE = 'thread_frame';\n\n/** A page asks for the transcript before what it already holds. */\nexport const HISTORY_REQUEST_TYPE = 'history_request';\n/** One older window, oldest first, answering a history_request. */\nexport const HISTORY_PAGE_TYPE = 'history_page';\n\n/**\n * How many journalled messages one page carries. Small enough that prepending\n * a window never blocks the reader's scroll, large enough that a flick through\n * a long transcript does not turn into a hundred round trips.\n */\nexport const HISTORY_PAGE_SIZE = 100;\n\nexport interface HistoryRequestFrame {\n type: typeof HISTORY_REQUEST_TYPE;\n sessionId: string;\n /** Journal id of the oldest entry the page holds; absent asks for the newest window. */\n before?: string;\n limit?: number;\n}\n\nexport interface HistoryPageFrame {\n type: typeof HISTORY_PAGE_TYPE;\n sessionId: string;\n /** Entry frames, oldest first, to prepend above what the page holds. */\n frames: Record<string, unknown>[];\n /** The cursor for the next older window; null when the transcript starts here. */\n cursor: string | null;\n /** Whether anything older than this window exists. */\n hasMore: boolean;\n /** Echoed so a page can drop an answer to a question it has since abandoned. */\n before?: string;\n}\n\n/** First frame on every page socket, before the snapshot. */\nexport interface HubHelloFrame {\n type: typeof HUB_HELLO_TYPE;\n protocol: number;\n /** Frame types of the hub's loaded data channels; lets a panel tell \"plugin server not installed\" from \"no data\". */\n channels: string[];\n}\n\nexport interface WorkspacesSnapshotFrame {\n type: typeof WORKSPACES_SNAPSHOT_TYPE;\n workspaces: WorkspaceSummary[];\n}\n\nexport interface WorkspaceUpsertFrame {\n type: typeof WORKSPACE_UPSERT_TYPE;\n workspace: WorkspaceSummary;\n}\n\nexport interface WorkspaceRemovedFrame {\n type: typeof WORKSPACE_REMOVED_TYPE;\n workspaceId: string;\n}\n\nexport interface SessionsSnapshotFrame {\n type: typeof SESSIONS_SNAPSHOT_TYPE;\n sessions: SessionSummary[];\n}\n\nexport interface SessionUpsertFrame {\n type: typeof SESSION_UPSERT_TYPE;\n session: SessionSummary;\n}\n\nexport interface SessionRemovedFrame {\n type: typeof SESSION_REMOVED_TYPE;\n sessionId: string;\n}\n\n/**\n * Reply to subscribe: this session's latest status and widget projections first,\n * then its bounded transient history. Live frames follow.\n */\nexport interface SessionBacklogFrame {\n type: typeof SESSION_BACKLOG_TYPE;\n sessionId: string;\n frames: SessionFrame[];\n /** Transient frames the bounded ring discarded; projections do not contribute. */\n dropped: number;\n}\n\n/** One live agent frame, addressed to subscribers of its session. */\nexport interface SessionFrameEnvelope {\n type: typeof SESSION_FRAME_TYPE;\n sessionId: string;\n frame: SessionFrame;\n}\n\nexport interface SubscribeFrame {\n type: typeof SUBSCRIBE_TYPE;\n sessionId: string;\n}\n\nexport interface UnsubscribeFrame {\n type: typeof UNSUBSCRIBE_TYPE;\n sessionId: string;\n}\n\n/** One command frame from the page, addressed to a session's agent. */\nexport interface SessionCommandFrame {\n type: typeof SESSION_COMMAND_TYPE;\n sessionId: string;\n frame: SessionFrame;\n}\n\nexport function hubHello(channels: string[]): HubHelloFrame {\n return { type: HUB_HELLO_TYPE, protocol: HUB_PROTOCOL_VERSION, channels };\n}\n\nexport function sessionFrameEnvelope(sessionId: string, frame: SessionFrame): SessionFrameEnvelope {\n return { type: SESSION_FRAME_TYPE, sessionId, frame };\n}\n\nexport function sessionCommand(sessionId: string, frame: SessionFrame): SessionCommandFrame {\n return { type: SESSION_COMMAND_TYPE, sessionId, frame };\n}\n\nexport function subscribeFrame(sessionId: string): SubscribeFrame {\n return { type: SUBSCRIBE_TYPE, sessionId };\n}\n\nexport function unsubscribeFrame(sessionId: string): UnsubscribeFrame {\n return { type: UNSUBSCRIBE_TYPE, sessionId };\n}\n\nexport interface SubscribeThreadFrame {\n type: typeof SUBSCRIBE_THREAD_TYPE;\n sessionId: string;\n threadId: string;\n}\n\nexport interface UnsubscribeThreadFrame {\n type: typeof UNSUBSCRIBE_THREAD_TYPE;\n sessionId: string;\n threadId: string;\n}\n\n/** Reply to subscribe_thread: the journal's newest entries as entry_appended frames, then live ones follow. */\nexport interface ThreadBacklogFrame {\n type: typeof THREAD_BACKLOG_TYPE;\n sessionId: string;\n threadId: string;\n frames: SessionFrame[];\n}\n\n/** One journal entry a followed thread gained, addressed to the pages following it. */\nexport interface ThreadFrameEnvelope {\n type: typeof THREAD_FRAME_TYPE;\n sessionId: string;\n threadId: string;\n frame: SessionFrame;\n}\n\nexport function subscribeThreadFrame(sessionId: string, threadId: string): SubscribeThreadFrame {\n return { type: SUBSCRIBE_THREAD_TYPE, sessionId, threadId };\n}\n\nexport function unsubscribeThreadFrame(sessionId: string, threadId: string): UnsubscribeThreadFrame {\n return { type: UNSUBSCRIBE_THREAD_TYPE, sessionId, threadId };\n}\n\nexport function threadBacklog(sessionId: string, threadId: string, frames: SessionFrame[]): ThreadBacklogFrame {\n return { type: THREAD_BACKLOG_TYPE, sessionId, threadId, frames };\n}\n\nexport function threadFrameEnvelope(sessionId: string, threadId: string, frame: SessionFrame): ThreadFrameEnvelope {\n return { type: THREAD_FRAME_TYPE, sessionId, threadId, frame };\n}\n"],"mappings":";;;;;;;;;AAUA,MAAa,uBAAuB;;AAGpC,MAAa,WAAW;;AAGxB,MAAa,uBAAuB;;AAGpC,MAAa,qBAAqB;;;;;;AA4BlC,MAAa,wBAAwB;;AAGrC,MAAa,+BAA+B;;;;;AAa5C,MAAa,0BAA0B;AAkIvC,MAAa,iBAAiB;AAC9B,MAAa,2BAA2B;AACxC,MAAa,wBAAwB;AACrC,MAAa,yBAAyB;AACtC,MAAa,yBAAyB;AACtC,MAAa,sBAAsB;AACnC,MAAa,uBAAuB;AACpC,MAAa,uBAAuB;AACpC,MAAa,qBAAqB;;AAElC,MAAa,uBAAuB;;;;;;;;AAQpC,MAAa,oBAAoB;;;;;;AAOjC,MAAa,wBAAwB;;;;;;;;;;;AAYrC,MAAa,yBAAyB;;;;;;;;AAQtC,MAAa,qBAAqB;;;;;;;;;;;AAYlC,MAAa,8BAA8B;;;;;;;;;;AAU3C,MAAa,8BAA8B;AAqE3C,MAAa,iBAAiB;AAC9B,MAAa,mBAAmB;AAChC,MAAa,uBAAuB;;AAEpC,MAAa,wBAAwB;AACrC,MAAa,0BAA0B;AACvC,MAAa,sBAAsB;AACnC,MAAa,oBAAoB;;AAGjC,MAAa,uBAAuB;;AAEpC,MAAa,oBAAoB;;;;;;AAOjC,MAAa,oBAAoB;AAiGjC,SAAgB,SAAS,UAAmC;CAC1D,OAAO;EAAE,MAAM;EAAgB,UAAA;EAAgC;CAAS;AAC1E;AAEA,SAAgB,qBAAqB,WAAmB,OAA2C;CACjG,OAAO;EAAE,MAAM;EAAoB;EAAW;CAAM;AACtD;AAEA,SAAgB,eAAe,WAAmB,OAA0C;CAC1F,OAAO;EAAE,MAAM;EAAsB;EAAW;CAAM;AACxD;AAEA,SAAgB,eAAe,WAAmC;CAChE,OAAO;EAAE,MAAM;EAAgB;CAAU;AAC3C;AAEA,SAAgB,iBAAiB,WAAqC;CACpE,OAAO;EAAE,MAAM;EAAkB;CAAU;AAC7C;AA8BA,SAAgB,qBAAqB,WAAmB,UAAwC;CAC9F,OAAO;EAAE,MAAM;EAAuB;EAAW;CAAS;AAC5D;AAEA,SAAgB,uBAAuB,WAAmB,UAA0C;CAClG,OAAO;EAAE,MAAM;EAAyB;EAAW;CAAS;AAC9D;AAEA,SAAgB,cAAc,WAAmB,UAAkB,QAA4C;CAC7G,OAAO;EAAE,MAAM;EAAqB;EAAW;EAAU;CAAO;AAClE;AAEA,SAAgB,oBAAoB,WAAmB,UAAkB,OAA0C;CACjH,OAAO;EAAE,MAAM;EAAmB;EAAW;EAAU;CAAM;AAC/D"}
1
+ {"version":3,"file":"hub.mjs","names":[],"sources":["../../src/types/hub.ts"],"sourcesContent":["import type { BridgeState, SessionFrame } from './session';\n\n/**\n * Wire vocabulary between the hub and its pages.\n *\n * One WebSocket carries every session: hub-level frames describe the set of\n * sessions, and session-scoped traffic travels enveloped with the session id.\n * Field naming follows @earendil-works/pi-protocol so a future swap to the\n * upstream session server stays a transport change, not a rename.\n */\nexport const HUB_PROTOCOL_VERSION = 2;\n\n/** Role marker in the health payload; po-server probes for it before binding the port. */\nexport const HUB_ROLE = 'hub';\n\n/** REST endpoint for admitting and listing durable workspaces. */\nexport const WORKSPACES_API_ROUTE = '/api/workspaces';\n\n/** REST endpoint for creating sessions and browsing resumable Pi history. */\nexport const SESSIONS_API_ROUTE = '/api/workspaces/:workspaceId/sessions';\n\n/** One durable repository workspace shown in the rail, even while it has no sessions. */\nexport interface WorkspaceSummary {\n id: string;\n root: string;\n /** Display name chosen when the workspace was added; the folder basename stands in when absent. */\n name?: string;\n /** A remembered workspace whose root could not be mounted on this server start. */\n available?: boolean;\n error?: string;\n}\n\n/** One inactive Pi thread available to resume in a live session's workspace. */\nexport interface PiSessionHistoryItem {\n id: string;\n name?: string;\n firstMessage: string;\n createdAt: string;\n updatedAt: string;\n messageCount: number;\n}\n\n/**\n * REST endpoint behind the new-session directory picker; the page sends the\n * typed path as ?q= and receives {directories}: the children of the parent\n * directory whose names match the trailing segment as a regular expression.\n */\nexport const DIRECTORIES_API_ROUTE = '/api/directories';\n\n/** Lists the visible child folders of ?path= (home when absent) for the workspace folder browser. */\nexport const DIRECTORY_CHILDREN_API_ROUTE = '/api/directories/children';\n\n/** One folder's visible child directories, as absolute paths. */\nexport interface DirectoryListing {\n path: string;\n parent?: string;\n directories: string[];\n}\n\n/**\n * Query parameter that routes a package API request to one session's server.\n * Without it the request is answered by a hub-scoped API in this process.\n */\nexport const API_SESSION_QUERY_PARAM = 'session';\n\n/** What the agent is doing right now, derived from its frame stream. */\nexport type SessionPhase = 'idle' | 'turn' | 'compaction' | 'retry';\n\nexport interface SessionProfile {\n name: string;\n displayName?: string;\n /** Changes whenever the icon does; absent when the profile has no icon. */\n iconVersion?: string;\n}\n\nexport interface SessionGitStatus {\n branch: string;\n /** True when the working tree has uncommitted changes; rendered as a star. */\n dirty: boolean;\n}\n\n/** One immutable, signed client composition resolved for a session. */\nexport interface SessionWebComposition {\n /** Stable identity of the synchronized root and generation. */\n id: string;\n /** Monotonic signing revision advertised by the manifest. */\n revision: number;\n /** Same-origin signed-manifest route read by the trusted service worker. */\n manifestUrl: string;\n /** Same-origin prefix for the untrusted source bytes verified by the worker. */\n rawAssetBaseUrl: string;\n /** Worker-owned prefix from which the page may execute verified bytes. */\n verifiedAssetBaseUrl: string;\n /** `[slot, entry]` per plugin copy this mount runs, each entry an absolute path below both asset prefixes. */\n pluginEntries: [string, string][];\n /** Absolute paths below both asset prefixes of every file this mount's slots can load. */\n assetPaths: string[];\n /** Absolute paths below both asset prefixes, replaced when this session is focused. */\n stylePaths: string[];\n /** Frame types owned by the matching session-local hub composition. */\n channels: string[];\n /**\n * The slots this mount runs out of a shared build. Absent means the composition\n * holds only this mount's plugins, as in-memory test hosts publish it.\n */\n plugins?: string[];\n}\n\n/** One immutable, signed native composition resolved for a session; read by po-native, ignored by the web. */\nexport interface SessionNativeComposition {\n /** Stable identity of the synchronized root and generation. */\n id: string;\n scope: 'global' | 'workspace' | 'session';\n /** Monotonic signing revision advertised by the manifest. */\n revision: number;\n manifestUrl: string;\n rawAssetBaseUrl: string;\n /** Always `/composition.js`. */\n entryPath: string;\n channels: string[];\n /** The `poNative.pluginId` values resolved for this mount; the shell installs only these. */\n plugins: string[];\n}\n\n/**\n * Everything the rail needs to render one session without subscribing to it.\n */\nexport interface SessionSummary {\n workspaceId?: string;\n id: string;\n name: string;\n cwd: string;\n /** ISO 8601, from the session's registry record. */\n createdAt: string;\n /** ISO 8601, bumped whenever the session's frame stream moves. */\n updatedAt: string;\n phase: SessionPhase;\n /** ISO 8601 timestamp of the last phase change; drives \"running · 12m\". */\n phaseSince: string;\n /** The hub's own attachment to the session socket. */\n attach: BridgeState;\n /** Human-readable cause, present when attach is refused or closed. */\n attachReason?: string;\n pendingMessageCount: number;\n /** False until the first prompt is forwarded; \"fresh session · nothing sent yet\". */\n everPrompted: boolean;\n /** True while the agent waits on a dialog answer; \"waiting for your input\". */\n awaitingInput: boolean;\n /** ISO 8601 of the last settled run, once one finished. */\n lastSettledAt?: string;\n /** Omitted when the cwd is not a git repository or git is unavailable. */\n git?: SessionGitStatus;\n /** Selected profile; the icon itself is served by the session avatar route. */\n profile?: SessionProfile;\n /** Signed plugin composition independently resolved for this session. */\n webComposition?: SessionWebComposition;\n /** Signed native composition for this session, when native targets were built. */\n nativeComposition?: SessionNativeComposition;\n /**\n * The session this one was spawned from, recorded by the hub when it opened the session.\n * The rail nests a session under its parent; absent means a top-level row.\n */\n parentSessionId?: string;\n /**\n * The spawning package's own label for the relationship, such as \"worktree\".\n * The hub does not interpret it; the rail uses it to pick an affordance.\n */\n sessionProvenance?: string;\n /** User-assigned groups; sessions sharing one may message each other. Absent means none. */\n groups?: string[];\n /** Host reservations awaiting a durable child runtime, not live sessions. */\n pendingSetups?: Array<{\n id: string;\n name: string;\n createdAt: string;\n cwd?: string;\n status?: 'provisioning' | 'failed' | 'interrupted';\n setupKind?: 'managed-worktree' | 'existing-directory';\n errorCode?: 'SESSION_WORKTREE_PROVISION_FAILED' | 'SESSION_UNAVAILABLE';\n }>;\n /**\n * One line an extension published about background work it runs for this\n * session, such as a workflow; the rail shows it in place of the idle copy.\n */\n activity?: { label: string; attention?: boolean; since?: string };\n /**\n * The hub recorded this session but has not reopened it since its last\n * restart. Its journal is on disk; nothing is running behind the card until\n * the page asks for it.\n */\n dormant?: boolean;\n}\n\nexport const HUB_HELLO_TYPE = 'hub_hello';\nexport const WORKSPACES_SNAPSHOT_TYPE = 'workspaces_snapshot';\nexport const WORKSPACE_UPSERT_TYPE = 'workspace_upsert';\nexport const WORKSPACE_REMOVED_TYPE = 'workspace_removed';\nexport const SESSIONS_SNAPSHOT_TYPE = 'sessions_snapshot';\nexport const SESSION_UPSERT_TYPE = 'session_upsert';\nexport const SESSION_REMOVED_TYPE = 'session_removed';\nexport const SESSION_BACKLOG_TYPE = 'session_backlog';\nexport const SESSION_FRAME_TYPE = 'session_frame';\n/** Hub-synthesized close for an answered dialog; Pi itself never announces one. */\nexport const DIALOG_ANSWERED_TYPE = 'extension_ui_answered';\n/**\n * Sync rebuilt the artifacts this page is running against.\n *\n * The plugin bundle the browser loaded is one of them, and a bundle only\n * changes on disk: nothing about the running page notices. The page reloads\n * itself rather than staying on surfaces the repository no longer describes.\n */\nexport const HUB_RESYNCED_TYPE = 'hub_resynced';\n\n/**\n * The custom session entry the Po runtime journals with its minor-mode\n * catalog projection; it arrives inside Pi's entry_appended frames. The shape\n * mirrors MinorModeProjection in po-minor-mode.\n */\nexport const MINOR_MODE_ENTRY_TYPE = 'po-minor-modes';\n\n/**\n * The custom session entry the Po runtime journals when the agent's model\n * changes without a client having asked for it. The shape mirrors\n * AgentModelProjection in po-core.\n *\n * Pi reports a thinking-level switch on the wire, so that field follows from\n * the frame alone. It has no wire event for the model, so plan mode applying\n * its configured planning model would otherwise leave the chip naming the\n * model the session left behind.\n */\nexport const AGENT_MODEL_ENTRY_TYPE = 'po-agent-model';\n/**\n * The custom session entry Po journals describing what the session is\n * composed of: which mode admitted each tool and skill, and what each costs.\n *\n * Schemas are deliberately absent. Only names, kinds, owners and integer token\n * counts travel, so republishing the whole composition stays cheap.\n */\nexport const CONTEXT_ENTRY_TYPE = 'po-context';\n\n/**\n * The custom session entry po-profile journals naming the persona the\n * session speaks as. The shape mirrors ProfileIdentityProjection in\n * po-core.\n *\n * Unlike the entries above, this one is transcript rather than projection: it\n * stays in journal order and is never collapsed to the latest record, because a\n * message keeps the persona it was written under. Adding it to\n * PROJECTION_ENTRY_TYPES would repaint the whole transcript on every switch.\n */\nexport const PROFILE_IDENTITY_ENTRY_TYPE = 'po-profile-identity';\n/**\n * The custom session entry po-domain journals once Pi has rebuilt its\n * resource catalog for a reload; it mirrors PO_RESOURCE_CATALOG_ENTRY_TYPE in\n * po-core.\n *\n * A reload is what changes the skills the composer offers under `$`, and Pi\n * reports nothing else for one, so this entry is the cockpit's only notice that\n * the command list it cached belongs to the previous selection.\n */\nexport const RESOURCE_CATALOG_ENTRY_TYPE = 'po-resource-catalog';\nexport interface MinorModeActionProjection {\n id: string;\n label: string;\n description: string;\n enabled: boolean;\n disabledReason?: string;\n needsInput: boolean;\n}\n\nexport interface MinorModeRecordProjection {\n id: string;\n label: string;\n description: string;\n order: number;\n activation: 'inactive' | 'activating' | 'active' | 'deactivating';\n condition: string;\n detail?: string;\n actions: MinorModeActionProjection[];\n}\n\nexport interface MinorModeProjection {\n version: 1;\n revision: number;\n modes: MinorModeRecordProjection[];\n}\n\nexport type ContextGroupKind = 'major' | 'minor' | 'domain' | 'core';\nexport type ContextItemSource = 'extension' | 'mcp' | 'plugin' | 'core';\n\nexport interface ContextItemProjection {\n name: string;\n itemKind: 'tool' | 'skill';\n source: ContextItemSource;\n owner: string;\n tokens: number;\n active: boolean;\n}\n\nexport interface ContextGroupProjection {\n id: string;\n label: string;\n kind: ContextGroupKind;\n items: ContextItemProjection[];\n /** What the group costs now: active items only. */\n tokens: number;\n /** What its gated items would add if switched on. */\n inactiveTokens: number;\n}\n\nexport interface ContextProjection {\n version: 1;\n revision: number;\n selection?: { majorMode: string; domains: string[]; profile?: string };\n groups: ContextGroupProjection[];\n totalTokens: number;\n inactiveTokens: number;\n /**\n * What the assembled system prompt costs, deliberately outside the groups.\n *\n * Every tool's prose and every skill's listing already count inside\n * `totalTokens`, and those are slices of this same text, so the two figures\n * overlap and must not be added. `stage` is `base` when the session has sent\n * nothing yet and the prompt shown is the one before packages patch it.\n */\n systemPrompt?: { tokens: number; stage: 'base' | 'effective' };\n /** Names the tokenizer, because the figures are indicative, not billed. */\n estimator: string;\n}\nexport const SUBSCRIBE_TYPE = 'subscribe';\nexport const UNSUBSCRIBE_TYPE = 'unsubscribe';\nexport const SESSION_COMMAND_TYPE = 'session_command';\n/** A page follows one thread of a session: a journal a plugin's hub source names, such as a subagent run. */\nexport const SUBSCRIBE_THREAD_TYPE = 'subscribe_thread';\nexport const UNSUBSCRIBE_THREAD_TYPE = 'unsubscribe_thread';\nexport const THREAD_BACKLOG_TYPE = 'thread_backlog';\nexport const THREAD_FRAME_TYPE = 'thread_frame';\n\n/** A page asks for the transcript before what it already holds. */\nexport const HISTORY_REQUEST_TYPE = 'history_request';\n/** One older window, oldest first, answering a history_request. */\nexport const HISTORY_PAGE_TYPE = 'history_page';\n\n/**\n * How many journalled messages one page carries. Small enough that prepending\n * a window never blocks the reader's scroll, large enough that a flick through\n * a long transcript does not turn into a hundred round trips.\n */\nexport const HISTORY_PAGE_SIZE = 100;\n\nexport interface HistoryRequestFrame {\n type: typeof HISTORY_REQUEST_TYPE;\n sessionId: string;\n /** Journal id of the oldest entry the page holds; absent asks for the newest window. */\n before?: string;\n limit?: number;\n}\n\nexport interface HistoryPageFrame {\n type: typeof HISTORY_PAGE_TYPE;\n sessionId: string;\n /** Entry frames, oldest first, to prepend above what the page holds. */\n frames: Record<string, unknown>[];\n /** The cursor for the next older window; null when the transcript starts here. */\n cursor: string | null;\n /** Whether anything older than this window exists. */\n hasMore: boolean;\n /** Echoed so a page can drop an answer to a question it has since abandoned. */\n before?: string;\n}\n\n/** First frame on every page socket, before the snapshot. */\nexport interface HubHelloFrame {\n type: typeof HUB_HELLO_TYPE;\n protocol: number;\n /** Frame types of the hub's loaded data channels; lets a panel tell \"plugin server not installed\" from \"no data\". */\n channels: string[];\n}\n\nexport interface WorkspacesSnapshotFrame {\n type: typeof WORKSPACES_SNAPSHOT_TYPE;\n workspaces: WorkspaceSummary[];\n}\n\nexport interface WorkspaceUpsertFrame {\n type: typeof WORKSPACE_UPSERT_TYPE;\n workspace: WorkspaceSummary;\n}\n\nexport interface WorkspaceRemovedFrame {\n type: typeof WORKSPACE_REMOVED_TYPE;\n workspaceId: string;\n}\n\nexport interface SessionsSnapshotFrame {\n type: typeof SESSIONS_SNAPSHOT_TYPE;\n sessions: SessionSummary[];\n}\n\nexport interface SessionUpsertFrame {\n type: typeof SESSION_UPSERT_TYPE;\n session: SessionSummary;\n}\n\nexport interface SessionRemovedFrame {\n type: typeof SESSION_REMOVED_TYPE;\n sessionId: string;\n}\n\n/**\n * Reply to subscribe: this session's latest status and widget projections first,\n * then its bounded transient history. Live frames follow.\n */\nexport interface SessionBacklogFrame {\n type: typeof SESSION_BACKLOG_TYPE;\n sessionId: string;\n frames: SessionFrame[];\n /** Transient frames the bounded ring discarded; projections do not contribute. */\n dropped: number;\n}\n\n/** One live agent frame, addressed to subscribers of its session. */\nexport interface SessionFrameEnvelope {\n type: typeof SESSION_FRAME_TYPE;\n sessionId: string;\n frame: SessionFrame;\n}\n\nexport interface SubscribeFrame {\n type: typeof SUBSCRIBE_TYPE;\n sessionId: string;\n}\n\nexport interface UnsubscribeFrame {\n type: typeof UNSUBSCRIBE_TYPE;\n sessionId: string;\n}\n\n/** One command frame from the page, addressed to a session's agent. */\nexport interface SessionCommandFrame {\n type: typeof SESSION_COMMAND_TYPE;\n sessionId: string;\n frame: SessionFrame;\n}\n\nexport function hubHello(channels: string[]): HubHelloFrame {\n return { type: HUB_HELLO_TYPE, protocol: HUB_PROTOCOL_VERSION, channels };\n}\n\nexport function sessionFrameEnvelope(sessionId: string, frame: SessionFrame): SessionFrameEnvelope {\n return { type: SESSION_FRAME_TYPE, sessionId, frame };\n}\n\nexport function sessionCommand(sessionId: string, frame: SessionFrame): SessionCommandFrame {\n return { type: SESSION_COMMAND_TYPE, sessionId, frame };\n}\n\nexport function subscribeFrame(sessionId: string): SubscribeFrame {\n return { type: SUBSCRIBE_TYPE, sessionId };\n}\n\nexport function unsubscribeFrame(sessionId: string): UnsubscribeFrame {\n return { type: UNSUBSCRIBE_TYPE, sessionId };\n}\n\nexport interface SubscribeThreadFrame {\n type: typeof SUBSCRIBE_THREAD_TYPE;\n sessionId: string;\n threadId: string;\n}\n\nexport interface UnsubscribeThreadFrame {\n type: typeof UNSUBSCRIBE_THREAD_TYPE;\n sessionId: string;\n threadId: string;\n}\n\n/** Reply to subscribe_thread: the journal's newest entries as entry_appended frames, then live ones follow. */\nexport interface ThreadBacklogFrame {\n type: typeof THREAD_BACKLOG_TYPE;\n sessionId: string;\n threadId: string;\n frames: SessionFrame[];\n}\n\n/** One journal entry a followed thread gained, addressed to the pages following it. */\nexport interface ThreadFrameEnvelope {\n type: typeof THREAD_FRAME_TYPE;\n sessionId: string;\n threadId: string;\n frame: SessionFrame;\n}\n\nexport function subscribeThreadFrame(sessionId: string, threadId: string): SubscribeThreadFrame {\n return { type: SUBSCRIBE_THREAD_TYPE, sessionId, threadId };\n}\n\nexport function unsubscribeThreadFrame(sessionId: string, threadId: string): UnsubscribeThreadFrame {\n return { type: UNSUBSCRIBE_THREAD_TYPE, sessionId, threadId };\n}\n\nexport function threadBacklog(sessionId: string, threadId: string, frames: SessionFrame[]): ThreadBacklogFrame {\n return { type: THREAD_BACKLOG_TYPE, sessionId, threadId, frames };\n}\n\nexport function threadFrameEnvelope(sessionId: string, threadId: string, frame: SessionFrame): ThreadFrameEnvelope {\n return { type: THREAD_FRAME_TYPE, sessionId, threadId, frame };\n}\n"],"mappings":";;;;;;;;;AAUA,MAAa,uBAAuB;;AAGpC,MAAa,WAAW;;AAGxB,MAAa,uBAAuB;;AAGpC,MAAa,qBAAqB;;;;;;AA4BlC,MAAa,wBAAwB;;AAGrC,MAAa,+BAA+B;;;;;AAa5C,MAAa,0BAA0B;AAkIvC,MAAa,iBAAiB;AAC9B,MAAa,2BAA2B;AACxC,MAAa,wBAAwB;AACrC,MAAa,yBAAyB;AACtC,MAAa,yBAAyB;AACtC,MAAa,sBAAsB;AACnC,MAAa,uBAAuB;AACpC,MAAa,uBAAuB;AACpC,MAAa,qBAAqB;;AAElC,MAAa,uBAAuB;;;;;;;;AAQpC,MAAa,oBAAoB;;;;;;AAOjC,MAAa,wBAAwB;;;;;;;;;;;AAYrC,MAAa,yBAAyB;;;;;;;;AAQtC,MAAa,qBAAqB;;;;;;;;;;;AAYlC,MAAa,8BAA8B;;;;;;;;;;AAU3C,MAAa,8BAA8B;AAqE3C,MAAa,iBAAiB;AAC9B,MAAa,mBAAmB;AAChC,MAAa,uBAAuB;;AAEpC,MAAa,wBAAwB;AACrC,MAAa,0BAA0B;AACvC,MAAa,sBAAsB;AACnC,MAAa,oBAAoB;;AAGjC,MAAa,uBAAuB;;AAEpC,MAAa,oBAAoB;;;;;;AAOjC,MAAa,oBAAoB;AAiGjC,SAAgB,SAAS,UAAmC;CAC1D,OAAO;EAAE,MAAM;EAAgB,UAAA;EAAgC;CAAS;AAC1E;AAEA,SAAgB,qBAAqB,WAAmB,OAA2C;CACjG,OAAO;EAAE,MAAM;EAAoB;EAAW;CAAM;AACtD;AAEA,SAAgB,eAAe,WAAmB,OAA0C;CAC1F,OAAO;EAAE,MAAM;EAAsB;EAAW;CAAM;AACxD;AAEA,SAAgB,eAAe,WAAmC;CAChE,OAAO;EAAE,MAAM;EAAgB;CAAU;AAC3C;AAEA,SAAgB,iBAAiB,WAAqC;CACpE,OAAO;EAAE,MAAM;EAAkB;CAAU;AAC7C;AA8BA,SAAgB,qBAAqB,WAAmB,UAAwC;CAC9F,OAAO;EAAE,MAAM;EAAuB;EAAW;CAAS;AAC5D;AAEA,SAAgB,uBAAuB,WAAmB,UAA0C;CAClG,OAAO;EAAE,MAAM;EAAyB;EAAW;CAAS;AAC9D;AAEA,SAAgB,cAAc,WAAmB,UAAkB,QAA4C;CAC7G,OAAO;EAAE,MAAM;EAAqB;EAAW;EAAU;CAAO;AAClE;AAEA,SAAgB,oBAAoB,WAAmB,UAAkB,OAA0C;CACjH,OAAO;EAAE,MAAM;EAAmB;EAAW;EAAU;CAAM;AAC/D"}
@@ -3,17 +3,17 @@ let _agimon_ai_po_core_notification = require("@agimon-ai/po-core/notification")
3
3
  function isRecord(value) {
4
4
  return typeof value === "object" && value !== null && !Array.isArray(value);
5
5
  }
6
- /** Reads only a direct, validated Doom notification custom-entry frame. */
7
- function parseDoomNotificationEntry(frame) {
6
+ /** Reads only a direct, validated Po notification custom-entry frame. */
7
+ function parsePoNotificationEntry(frame) {
8
8
  if (!isRecord(frame) || frame.type !== "entry_appended" || !isRecord(frame.entry)) return void 0;
9
9
  const entry = frame.entry;
10
- if (entry.type !== "custom" || entry.customType !== _agimon_ai_po_core_notification.DOOM_NOTIFICATION_ENTRY_TYPE || typeof entry.id !== "string" || entry.id.trim().length === 0 || !(0, _agimon_ai_po_core_notification.isDoomNotificationEntryData)(entry.data)) return;
10
+ if (entry.type !== "custom" || entry.customType !== _agimon_ai_po_core_notification.PO_NOTIFICATION_ENTRY_TYPE || typeof entry.id !== "string" || entry.id.trim().length === 0 || !(0, _agimon_ai_po_core_notification.isPoNotificationEntryData)(entry.data)) return;
11
11
  return {
12
12
  entryId: entry.id,
13
13
  data: entry.data
14
14
  };
15
15
  }
16
16
  //#endregion
17
- exports.parseDoomNotificationEntry = parseDoomNotificationEntry;
17
+ exports.parsePoNotificationEntry = parsePoNotificationEntry;
18
18
 
19
19
  //# sourceMappingURL=notification.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"notification.cjs","names":["DOOM_NOTIFICATION_ENTRY_TYPE","isDoomNotificationEntryData"],"sources":["../../src/types/notification.ts"],"sourcesContent":["import {\n DOOM_NOTIFICATION_ENTRY_TYPE,\n type DoomNotificationEntryData,\n isDoomNotificationEntryData,\n} from '@agimon-ai/po-core/notification';\n\nexport interface DoomNotificationEntry {\n entryId: string;\n data: DoomNotificationEntryData;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/** Reads only a direct, validated Doom notification custom-entry frame. */\nexport function parseDoomNotificationEntry(frame: unknown): DoomNotificationEntry | undefined {\n if (!isRecord(frame) || frame.type !== 'entry_appended' || !isRecord(frame.entry)) return undefined;\n const entry = frame.entry;\n if (\n entry.type !== 'custom' ||\n entry.customType !== DOOM_NOTIFICATION_ENTRY_TYPE ||\n typeof entry.id !== 'string' ||\n entry.id.trim().length === 0 ||\n !isDoomNotificationEntryData(entry.data)\n ) {\n return undefined;\n }\n return { entryId: entry.id, data: entry.data };\n}\n"],"mappings":";;AAWA,SAAS,SAAS,OAAkD;CAClE,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E;;AAGA,SAAgB,2BAA2B,OAAmD;CAC5F,IAAI,CAAC,SAAS,KAAK,KAAK,MAAM,SAAS,oBAAoB,CAAC,SAAS,MAAM,KAAK,GAAG,OAAO,KAAA;CAC1F,MAAM,QAAQ,MAAM;CACpB,IACE,MAAM,SAAS,YACf,MAAM,eAAeA,gCAAAA,gCACrB,OAAO,MAAM,OAAO,YACpB,MAAM,GAAG,KAAK,CAAC,CAAC,WAAW,KAC3B,EAAA,GAACC,gCAAAA,4BAAAA,CAA4B,MAAM,IAAI,GAEvC;CAEF,OAAO;EAAE,SAAS,MAAM;EAAI,MAAM,MAAM;CAAK;AAC/C"}
1
+ {"version":3,"file":"notification.cjs","names":["PO_NOTIFICATION_ENTRY_TYPE","isPoNotificationEntryData"],"sources":["../../src/types/notification.ts"],"sourcesContent":["import {\n PO_NOTIFICATION_ENTRY_TYPE,\n type PoNotificationEntryData,\n isPoNotificationEntryData,\n} from '@agimon-ai/po-core/notification';\n\nexport interface PoNotificationEntry {\n entryId: string;\n data: PoNotificationEntryData;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/** Reads only a direct, validated Po notification custom-entry frame. */\nexport function parsePoNotificationEntry(frame: unknown): PoNotificationEntry | undefined {\n if (!isRecord(frame) || frame.type !== 'entry_appended' || !isRecord(frame.entry)) return undefined;\n const entry = frame.entry;\n if (\n entry.type !== 'custom' ||\n entry.customType !== PO_NOTIFICATION_ENTRY_TYPE ||\n typeof entry.id !== 'string' ||\n entry.id.trim().length === 0 ||\n !isPoNotificationEntryData(entry.data)\n ) {\n return undefined;\n }\n return { entryId: entry.id, data: entry.data };\n}\n"],"mappings":";;AAWA,SAAS,SAAS,OAAkD;CAClE,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E;;AAGA,SAAgB,yBAAyB,OAAiD;CACxF,IAAI,CAAC,SAAS,KAAK,KAAK,MAAM,SAAS,oBAAoB,CAAC,SAAS,MAAM,KAAK,GAAG,OAAO,KAAA;CAC1F,MAAM,QAAQ,MAAM;CACpB,IACE,MAAM,SAAS,YACf,MAAM,eAAeA,gCAAAA,8BACrB,OAAO,MAAM,OAAO,YACpB,MAAM,GAAG,KAAK,CAAC,CAAC,WAAW,KAC3B,EAAA,GAACC,gCAAAA,0BAAAA,CAA0B,MAAM,IAAI,GAErC;CAEF,OAAO;EAAE,SAAS,MAAM;EAAI,MAAM,MAAM;CAAK;AAC/C"}
@@ -1,10 +1,10 @@
1
- import { DoomNotificationEntryData } from "@agimon-ai/po-core/notification";
1
+ import { PoNotificationEntryData } from "@agimon-ai/po-core/notification";
2
2
  //#region src/types/notification.d.ts
3
- export interface DoomNotificationEntry {
3
+ export interface PoNotificationEntry {
4
4
  entryId: string;
5
- data: DoomNotificationEntryData;
5
+ data: PoNotificationEntryData;
6
6
  }
7
- /** Reads only a direct, validated Doom notification custom-entry frame. */
8
- export declare function parseDoomNotificationEntry(frame: unknown): DoomNotificationEntry | undefined;
7
+ /** Reads only a direct, validated Po notification custom-entry frame. */
8
+ export declare function parsePoNotificationEntry(frame: unknown): PoNotificationEntry | undefined;
9
9
  //#endregion
10
10
  //# sourceMappingURL=notification.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"notification.d.mts","names":[],"sources":["../../src/types/notification.ts"],"mappings":";;iBAMiB;EACf;EACA,MAAM;;;wBAQQ,2BAA2B,iBAAiB"}
1
+ {"version":3,"file":"notification.d.mts","names":[],"sources":["../../src/types/notification.ts"],"mappings":";;iBAMiB;EACf;EACA,MAAM;;;wBAQQ,yBAAyB,iBAAiB"}
@@ -1,19 +1,19 @@
1
- import { DOOM_NOTIFICATION_ENTRY_TYPE, isDoomNotificationEntryData } from "@agimon-ai/po-core/notification";
1
+ import { PO_NOTIFICATION_ENTRY_TYPE, isPoNotificationEntryData } from "@agimon-ai/po-core/notification";
2
2
  //#region src/types/notification.ts
3
3
  function isRecord(value) {
4
4
  return typeof value === "object" && value !== null && !Array.isArray(value);
5
5
  }
6
- /** Reads only a direct, validated Doom notification custom-entry frame. */
7
- function parseDoomNotificationEntry(frame) {
6
+ /** Reads only a direct, validated Po notification custom-entry frame. */
7
+ function parsePoNotificationEntry(frame) {
8
8
  if (!isRecord(frame) || frame.type !== "entry_appended" || !isRecord(frame.entry)) return void 0;
9
9
  const entry = frame.entry;
10
- if (entry.type !== "custom" || entry.customType !== DOOM_NOTIFICATION_ENTRY_TYPE || typeof entry.id !== "string" || entry.id.trim().length === 0 || !isDoomNotificationEntryData(entry.data)) return;
10
+ if (entry.type !== "custom" || entry.customType !== PO_NOTIFICATION_ENTRY_TYPE || typeof entry.id !== "string" || entry.id.trim().length === 0 || !isPoNotificationEntryData(entry.data)) return;
11
11
  return {
12
12
  entryId: entry.id,
13
13
  data: entry.data
14
14
  };
15
15
  }
16
16
  //#endregion
17
- export { parseDoomNotificationEntry };
17
+ export { parsePoNotificationEntry };
18
18
 
19
19
  //# sourceMappingURL=notification.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"notification.mjs","names":[],"sources":["../../src/types/notification.ts"],"sourcesContent":["import {\n DOOM_NOTIFICATION_ENTRY_TYPE,\n type DoomNotificationEntryData,\n isDoomNotificationEntryData,\n} from '@agimon-ai/po-core/notification';\n\nexport interface DoomNotificationEntry {\n entryId: string;\n data: DoomNotificationEntryData;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/** Reads only a direct, validated Doom notification custom-entry frame. */\nexport function parseDoomNotificationEntry(frame: unknown): DoomNotificationEntry | undefined {\n if (!isRecord(frame) || frame.type !== 'entry_appended' || !isRecord(frame.entry)) return undefined;\n const entry = frame.entry;\n if (\n entry.type !== 'custom' ||\n entry.customType !== DOOM_NOTIFICATION_ENTRY_TYPE ||\n typeof entry.id !== 'string' ||\n entry.id.trim().length === 0 ||\n !isDoomNotificationEntryData(entry.data)\n ) {\n return undefined;\n }\n return { entryId: entry.id, data: entry.data };\n}\n"],"mappings":";;AAWA,SAAS,SAAS,OAAkD;CAClE,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E;;AAGA,SAAgB,2BAA2B,OAAmD;CAC5F,IAAI,CAAC,SAAS,KAAK,KAAK,MAAM,SAAS,oBAAoB,CAAC,SAAS,MAAM,KAAK,GAAG,OAAO,KAAA;CAC1F,MAAM,QAAQ,MAAM;CACpB,IACE,MAAM,SAAS,YACf,MAAM,eAAe,gCACrB,OAAO,MAAM,OAAO,YACpB,MAAM,GAAG,KAAK,CAAC,CAAC,WAAW,KAC3B,CAAC,4BAA4B,MAAM,IAAI,GAEvC;CAEF,OAAO;EAAE,SAAS,MAAM;EAAI,MAAM,MAAM;CAAK;AAC/C"}
1
+ {"version":3,"file":"notification.mjs","names":[],"sources":["../../src/types/notification.ts"],"sourcesContent":["import {\n PO_NOTIFICATION_ENTRY_TYPE,\n type PoNotificationEntryData,\n isPoNotificationEntryData,\n} from '@agimon-ai/po-core/notification';\n\nexport interface PoNotificationEntry {\n entryId: string;\n data: PoNotificationEntryData;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/** Reads only a direct, validated Po notification custom-entry frame. */\nexport function parsePoNotificationEntry(frame: unknown): PoNotificationEntry | undefined {\n if (!isRecord(frame) || frame.type !== 'entry_appended' || !isRecord(frame.entry)) return undefined;\n const entry = frame.entry;\n if (\n entry.type !== 'custom' ||\n entry.customType !== PO_NOTIFICATION_ENTRY_TYPE ||\n typeof entry.id !== 'string' ||\n entry.id.trim().length === 0 ||\n !isPoNotificationEntryData(entry.data)\n ) {\n return undefined;\n }\n return { entryId: entry.id, data: entry.data };\n}\n"],"mappings":";;AAWA,SAAS,SAAS,OAAkD;CAClE,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E;;AAGA,SAAgB,yBAAyB,OAAiD;CACxF,IAAI,CAAC,SAAS,KAAK,KAAK,MAAM,SAAS,oBAAoB,CAAC,SAAS,MAAM,KAAK,GAAG,OAAO,KAAA;CAC1F,MAAM,QAAQ,MAAM;CACpB,IACE,MAAM,SAAS,YACf,MAAM,eAAe,8BACrB,OAAO,MAAM,OAAO,YACpB,MAAM,GAAG,KAAK,CAAC,CAAC,WAAW,KAC3B,CAAC,0BAA0B,MAAM,IAAI,GAErC;CAEF,OAAO;EAAE,SAAS,MAAM;EAAI,MAAM,MAAM;CAAK;AAC/C"}
@@ -1 +1 @@
1
- {"version":3,"file":"settings.cjs","names":[],"sources":["../../src/types/settings.ts"],"sourcesContent":["/**\n * The settings REST surface, as both halves see it.\n *\n * Settings are host routes rather than a package API because the page is not\n * scoped to a session: it names a repository instead, and a plugin's browser\n * code may not reach the hub's own client helpers. The host reads and writes\n * the config file on everyone's behalf and hands each contributed field the\n * result through props.\n */\nimport type { RepositorySettingsRepository } from '@agimon-ai/po-core/web';\n\nexport const SETTINGS_CONFIG_API_ROUTE = '/api/settings';\nexport const SETTINGS_VALUE_API_ROUTE = '/api/settings/value';\nexport const SETTINGS_REPOSITORIES_API_ROUTE = '/api/settings/repositories';\nexport const SETTINGS_MODELS_API_ROUTE = '/api/plugins/po/models';\nexport const SETTINGS_REPOSITORY_API_ROUTE = '/api/settings/repository';\nexport const SETTINGS_REPOSITORY_SELECTION_API_ROUTE = '/api/settings/repository/selection';\nexport const SETTINGS_IMAGES_API_ROUTE = '/api/settings/images';\n\n/**\n * The image limits, which live in Pi's settings.json rather than the Doom\n * config, so they have their own route instead of a key path: Pi's own toggle\n * writes that file, and a machine should not end up with two answers to how\n * large an image reaches a model.\n */\nexport interface SettingsImagesView {\n /** Off leaves every image at the size it arrived. */\n autoResize: boolean;\n /** Longest edge an image keeps once resizing is on. */\n maxDimension: number;\n /** The range the hub accepts; a value outside it is clamped rather than refused. */\n minDimension: number;\n maxAllowedDimension: number;\n}\n\nexport interface SettingsImagesWriteRequest {\n autoResize?: boolean;\n maxDimension?: number;\n}\n/** Which of the two config files a read or write is about. */\nexport type SettingsScope = 'global' | 'repository';\n\n/** Where the effective value came from, or that no file set it. */\nexport type SettingsOrigin = 'global' | 'repository' | 'default';\n\n/** Which scopes a key may be written at, as the merge policy decides. */\nexport type SettingsKeyScope = 'global' | 'repository' | 'both';\n\n/** One repository the picker offers. */\nexport type SettingsRepository = RepositorySettingsRepository;\n\n/** One model the machine can actually use, for a field declaring optionsFrom: 'models'. */\nexport interface SettingsModel {\n /** `provider/model-id`, which is what the config file holds. */\n value: string;\n label: string;\n group: string;\n}\n\n/** One key's current state, keyed by its dotted path. */\nexport interface SettingsValueView {\n /** The effective value, stringified for display; absent when nothing set it. */\n value?: string;\n origin: SettingsOrigin;\n /** Which scopes may hold this key. A field outside the chosen scope is read-only. */\n scope: SettingsKeyScope;\n}\n\n/** What the read route answers with. */\nexport interface SettingsConfigView {\n /** Empty when the page has no repository in view; the global half still applies. */\n repoRoot: string;\n /** Keyed by dotted key path, for every key the page asked about. */\n values: Record<string, SettingsValueView>;\n /** Per-scope file identity, so a write can prove which bytes it read. */\n hashes: Record<SettingsScope, string>;\n}\n\n/** What the write route takes. `value: null` clears the key at that scope. */\nexport interface SettingsWriteRequest {\n /** Required for a repository write; ignored, and may be empty, for a global one. */\n repoRoot: string;\n scope: SettingsScope;\n keyPath: readonly string[];\n value: string | number | null;\n /** The hash of the target file when the page read it. */\n expectedHash: string;\n}\n\n/** One atomic save, validated as a whole before replacing the configuration file. */\nexport interface SettingsBatchWriteRequest {\n repoRoot: string;\n scope: SettingsScope;\n edits: readonly Pick<SettingsWriteRequest, 'keyPath' | 'value'>[];\n expectedHash: string;\n}\n\n/** A named option from one effective repository catalog. */\nexport interface RepositoryCatalogOption {\n name: string;\n description?: string;\n /** Present for a domain alias, naming the entries it expands to. */\n expandsTo?: readonly string[];\n /** Present for a major mode, naming its ordered layers. */\n layers?: readonly string[];\n}\n\n/** One selection axis, keeping an inherited effective value apart from this repository's override. */\nexport interface RepositorySelectionValue<T> {\n effective?: T;\n repository?: T;\n origin: SettingsOrigin;\n}\n\n/** The repository control plane's safe, non-secret catalog and selection view. */\nexport interface RepositorySettingsView {\n repository: SettingsRepository;\n hash: string;\n catalogs: {\n majorModes: readonly RepositoryCatalogOption[];\n domains: readonly RepositoryCatalogOption[];\n profiles: readonly RepositoryCatalogOption[];\n };\n selection: {\n majorMode: RepositorySelectionValue<string>;\n domains: RepositorySelectionValue<readonly string[]>;\n profile: RepositorySelectionValue<string>;\n };\n}\n\nexport interface RepositorySelectionChanges {\n majorMode?: string | null;\n domains?: readonly string[] | null;\n profile?: string | null;\n}\n\n/** An optimistic, atomic write into one repository's selection defaults. */\nexport interface RepositorySelectionWriteRequest {\n repositoryId: string;\n expectedHash: string;\n changes: RepositorySelectionChanges;\n}\n\n/** What a route reports when it refuses; the page shows `error` verbatim. */\nexport interface SettingsErrorView {\n error: string;\n /** On a stale write, the hash the target file actually holds now. */\n hash?: string;\n}\n"],"mappings":";AAWA,MAAa,4BAA4B;AACzC,MAAa,2BAA2B;AACxC,MAAa,kCAAkC;AAC/C,MAAa,4BAA4B;AACzC,MAAa,gCAAgC;AAC7C,MAAa,0CAA0C;AACvD,MAAa,4BAA4B"}
1
+ {"version":3,"file":"settings.cjs","names":[],"sources":["../../src/types/settings.ts"],"sourcesContent":["/**\n * The settings REST surface, as both halves see it.\n *\n * Settings are host routes rather than a package API because the page is not\n * scoped to a session: it names a repository instead, and a plugin's browser\n * code may not reach the hub's own client helpers. The host reads and writes\n * the config file on everyone's behalf and hands each contributed field the\n * result through props.\n */\nimport type { RepositorySettingsRepository } from '@agimon-ai/po-core/web';\n\nexport const SETTINGS_CONFIG_API_ROUTE = '/api/settings';\nexport const SETTINGS_VALUE_API_ROUTE = '/api/settings/value';\nexport const SETTINGS_REPOSITORIES_API_ROUTE = '/api/settings/repositories';\nexport const SETTINGS_MODELS_API_ROUTE = '/api/plugins/po/models';\nexport const SETTINGS_REPOSITORY_API_ROUTE = '/api/settings/repository';\nexport const SETTINGS_REPOSITORY_SELECTION_API_ROUTE = '/api/settings/repository/selection';\nexport const SETTINGS_IMAGES_API_ROUTE = '/api/settings/images';\n\n/**\n * The image limits, which live in Pi's settings.json rather than the Po\n * config, so they have their own route instead of a key path: Pi's own toggle\n * writes that file, and a machine should not end up with two answers to how\n * large an image reaches a model.\n */\nexport interface SettingsImagesView {\n /** Off leaves every image at the size it arrived. */\n autoResize: boolean;\n /** Longest edge an image keeps once resizing is on. */\n maxDimension: number;\n /** The range the hub accepts; a value outside it is clamped rather than refused. */\n minDimension: number;\n maxAllowedDimension: number;\n}\n\nexport interface SettingsImagesWriteRequest {\n autoResize?: boolean;\n maxDimension?: number;\n}\n/** Which of the two config files a read or write is about. */\nexport type SettingsScope = 'global' | 'repository';\n\n/** Where the effective value came from, or that no file set it. */\nexport type SettingsOrigin = 'global' | 'repository' | 'default';\n\n/** Which scopes a key may be written at, as the merge policy decides. */\nexport type SettingsKeyScope = 'global' | 'repository' | 'both';\n\n/** One repository the picker offers. */\nexport type SettingsRepository = RepositorySettingsRepository;\n\n/** One model the machine can actually use, for a field declaring optionsFrom: 'models'. */\nexport interface SettingsModel {\n /** `provider/model-id`, which is what the config file holds. */\n value: string;\n label: string;\n group: string;\n}\n\n/** One key's current state, keyed by its dotted path. */\nexport interface SettingsValueView {\n /** The effective value, stringified for display; absent when nothing set it. */\n value?: string;\n origin: SettingsOrigin;\n /** Which scopes may hold this key. A field outside the chosen scope is read-only. */\n scope: SettingsKeyScope;\n}\n\n/** What the read route answers with. */\nexport interface SettingsConfigView {\n /** Empty when the page has no repository in view; the global half still applies. */\n repoRoot: string;\n /** Keyed by dotted key path, for every key the page asked about. */\n values: Record<string, SettingsValueView>;\n /** Per-scope file identity, so a write can prove which bytes it read. */\n hashes: Record<SettingsScope, string>;\n}\n\n/** What the write route takes. `value: null` clears the key at that scope. */\nexport interface SettingsWriteRequest {\n /** Required for a repository write; ignored, and may be empty, for a global one. */\n repoRoot: string;\n scope: SettingsScope;\n keyPath: readonly string[];\n value: string | number | null;\n /** The hash of the target file when the page read it. */\n expectedHash: string;\n}\n\n/** One atomic save, validated as a whole before replacing the configuration file. */\nexport interface SettingsBatchWriteRequest {\n repoRoot: string;\n scope: SettingsScope;\n edits: readonly Pick<SettingsWriteRequest, 'keyPath' | 'value'>[];\n expectedHash: string;\n}\n\n/** A named option from one effective repository catalog. */\nexport interface RepositoryCatalogOption {\n name: string;\n description?: string;\n /** Present for a domain alias, naming the entries it expands to. */\n expandsTo?: readonly string[];\n /** Present for a major mode, naming its ordered layers. */\n layers?: readonly string[];\n}\n\n/** One selection axis, keeping an inherited effective value apart from this repository's override. */\nexport interface RepositorySelectionValue<T> {\n effective?: T;\n repository?: T;\n origin: SettingsOrigin;\n}\n\n/** The repository control plane's safe, non-secret catalog and selection view. */\nexport interface RepositorySettingsView {\n repository: SettingsRepository;\n hash: string;\n catalogs: {\n majorModes: readonly RepositoryCatalogOption[];\n domains: readonly RepositoryCatalogOption[];\n profiles: readonly RepositoryCatalogOption[];\n };\n selection: {\n majorMode: RepositorySelectionValue<string>;\n domains: RepositorySelectionValue<readonly string[]>;\n profile: RepositorySelectionValue<string>;\n };\n}\n\nexport interface RepositorySelectionChanges {\n majorMode?: string | null;\n domains?: readonly string[] | null;\n profile?: string | null;\n}\n\n/** An optimistic, atomic write into one repository's selection defaults. */\nexport interface RepositorySelectionWriteRequest {\n repositoryId: string;\n expectedHash: string;\n changes: RepositorySelectionChanges;\n}\n\n/** What a route reports when it refuses; the page shows `error` verbatim. */\nexport interface SettingsErrorView {\n error: string;\n /** On a stale write, the hash the target file actually holds now. */\n hash?: string;\n}\n"],"mappings":";AAWA,MAAa,4BAA4B;AACzC,MAAa,2BAA2B;AACxC,MAAa,kCAAkC;AAC/C,MAAa,4BAA4B;AACzC,MAAa,gCAAgC;AAC7C,MAAa,0CAA0C;AACvD,MAAa,4BAA4B"}
@@ -8,7 +8,7 @@ export declare const SETTINGS_REPOSITORY_API_ROUTE = "/api/settings/repository";
8
8
  export declare const SETTINGS_REPOSITORY_SELECTION_API_ROUTE = "/api/settings/repository/selection";
9
9
  export declare const SETTINGS_IMAGES_API_ROUTE = "/api/settings/images";
10
10
  /**
11
- * The image limits, which live in Pi's settings.json rather than the Doom
11
+ * The image limits, which live in Pi's settings.json rather than the Po
12
12
  * config, so they have their own route instead of a key path: Pi's own toggle
13
13
  * writes that file, and a machine should not end up with two answers to how
14
14
  * large an image reaches a model.
@@ -1 +1 @@
1
- {"version":3,"file":"settings.mjs","names":[],"sources":["../../src/types/settings.ts"],"sourcesContent":["/**\n * The settings REST surface, as both halves see it.\n *\n * Settings are host routes rather than a package API because the page is not\n * scoped to a session: it names a repository instead, and a plugin's browser\n * code may not reach the hub's own client helpers. The host reads and writes\n * the config file on everyone's behalf and hands each contributed field the\n * result through props.\n */\nimport type { RepositorySettingsRepository } from '@agimon-ai/po-core/web';\n\nexport const SETTINGS_CONFIG_API_ROUTE = '/api/settings';\nexport const SETTINGS_VALUE_API_ROUTE = '/api/settings/value';\nexport const SETTINGS_REPOSITORIES_API_ROUTE = '/api/settings/repositories';\nexport const SETTINGS_MODELS_API_ROUTE = '/api/plugins/po/models';\nexport const SETTINGS_REPOSITORY_API_ROUTE = '/api/settings/repository';\nexport const SETTINGS_REPOSITORY_SELECTION_API_ROUTE = '/api/settings/repository/selection';\nexport const SETTINGS_IMAGES_API_ROUTE = '/api/settings/images';\n\n/**\n * The image limits, which live in Pi's settings.json rather than the Doom\n * config, so they have their own route instead of a key path: Pi's own toggle\n * writes that file, and a machine should not end up with two answers to how\n * large an image reaches a model.\n */\nexport interface SettingsImagesView {\n /** Off leaves every image at the size it arrived. */\n autoResize: boolean;\n /** Longest edge an image keeps once resizing is on. */\n maxDimension: number;\n /** The range the hub accepts; a value outside it is clamped rather than refused. */\n minDimension: number;\n maxAllowedDimension: number;\n}\n\nexport interface SettingsImagesWriteRequest {\n autoResize?: boolean;\n maxDimension?: number;\n}\n/** Which of the two config files a read or write is about. */\nexport type SettingsScope = 'global' | 'repository';\n\n/** Where the effective value came from, or that no file set it. */\nexport type SettingsOrigin = 'global' | 'repository' | 'default';\n\n/** Which scopes a key may be written at, as the merge policy decides. */\nexport type SettingsKeyScope = 'global' | 'repository' | 'both';\n\n/** One repository the picker offers. */\nexport type SettingsRepository = RepositorySettingsRepository;\n\n/** One model the machine can actually use, for a field declaring optionsFrom: 'models'. */\nexport interface SettingsModel {\n /** `provider/model-id`, which is what the config file holds. */\n value: string;\n label: string;\n group: string;\n}\n\n/** One key's current state, keyed by its dotted path. */\nexport interface SettingsValueView {\n /** The effective value, stringified for display; absent when nothing set it. */\n value?: string;\n origin: SettingsOrigin;\n /** Which scopes may hold this key. A field outside the chosen scope is read-only. */\n scope: SettingsKeyScope;\n}\n\n/** What the read route answers with. */\nexport interface SettingsConfigView {\n /** Empty when the page has no repository in view; the global half still applies. */\n repoRoot: string;\n /** Keyed by dotted key path, for every key the page asked about. */\n values: Record<string, SettingsValueView>;\n /** Per-scope file identity, so a write can prove which bytes it read. */\n hashes: Record<SettingsScope, string>;\n}\n\n/** What the write route takes. `value: null` clears the key at that scope. */\nexport interface SettingsWriteRequest {\n /** Required for a repository write; ignored, and may be empty, for a global one. */\n repoRoot: string;\n scope: SettingsScope;\n keyPath: readonly string[];\n value: string | number | null;\n /** The hash of the target file when the page read it. */\n expectedHash: string;\n}\n\n/** One atomic save, validated as a whole before replacing the configuration file. */\nexport interface SettingsBatchWriteRequest {\n repoRoot: string;\n scope: SettingsScope;\n edits: readonly Pick<SettingsWriteRequest, 'keyPath' | 'value'>[];\n expectedHash: string;\n}\n\n/** A named option from one effective repository catalog. */\nexport interface RepositoryCatalogOption {\n name: string;\n description?: string;\n /** Present for a domain alias, naming the entries it expands to. */\n expandsTo?: readonly string[];\n /** Present for a major mode, naming its ordered layers. */\n layers?: readonly string[];\n}\n\n/** One selection axis, keeping an inherited effective value apart from this repository's override. */\nexport interface RepositorySelectionValue<T> {\n effective?: T;\n repository?: T;\n origin: SettingsOrigin;\n}\n\n/** The repository control plane's safe, non-secret catalog and selection view. */\nexport interface RepositorySettingsView {\n repository: SettingsRepository;\n hash: string;\n catalogs: {\n majorModes: readonly RepositoryCatalogOption[];\n domains: readonly RepositoryCatalogOption[];\n profiles: readonly RepositoryCatalogOption[];\n };\n selection: {\n majorMode: RepositorySelectionValue<string>;\n domains: RepositorySelectionValue<readonly string[]>;\n profile: RepositorySelectionValue<string>;\n };\n}\n\nexport interface RepositorySelectionChanges {\n majorMode?: string | null;\n domains?: readonly string[] | null;\n profile?: string | null;\n}\n\n/** An optimistic, atomic write into one repository's selection defaults. */\nexport interface RepositorySelectionWriteRequest {\n repositoryId: string;\n expectedHash: string;\n changes: RepositorySelectionChanges;\n}\n\n/** What a route reports when it refuses; the page shows `error` verbatim. */\nexport interface SettingsErrorView {\n error: string;\n /** On a stale write, the hash the target file actually holds now. */\n hash?: string;\n}\n"],"mappings":";AAWA,MAAa,4BAA4B;AACzC,MAAa,2BAA2B;AACxC,MAAa,kCAAkC;AAC/C,MAAa,4BAA4B;AACzC,MAAa,gCAAgC;AAC7C,MAAa,0CAA0C;AACvD,MAAa,4BAA4B"}
1
+ {"version":3,"file":"settings.mjs","names":[],"sources":["../../src/types/settings.ts"],"sourcesContent":["/**\n * The settings REST surface, as both halves see it.\n *\n * Settings are host routes rather than a package API because the page is not\n * scoped to a session: it names a repository instead, and a plugin's browser\n * code may not reach the hub's own client helpers. The host reads and writes\n * the config file on everyone's behalf and hands each contributed field the\n * result through props.\n */\nimport type { RepositorySettingsRepository } from '@agimon-ai/po-core/web';\n\nexport const SETTINGS_CONFIG_API_ROUTE = '/api/settings';\nexport const SETTINGS_VALUE_API_ROUTE = '/api/settings/value';\nexport const SETTINGS_REPOSITORIES_API_ROUTE = '/api/settings/repositories';\nexport const SETTINGS_MODELS_API_ROUTE = '/api/plugins/po/models';\nexport const SETTINGS_REPOSITORY_API_ROUTE = '/api/settings/repository';\nexport const SETTINGS_REPOSITORY_SELECTION_API_ROUTE = '/api/settings/repository/selection';\nexport const SETTINGS_IMAGES_API_ROUTE = '/api/settings/images';\n\n/**\n * The image limits, which live in Pi's settings.json rather than the Po\n * config, so they have their own route instead of a key path: Pi's own toggle\n * writes that file, and a machine should not end up with two answers to how\n * large an image reaches a model.\n */\nexport interface SettingsImagesView {\n /** Off leaves every image at the size it arrived. */\n autoResize: boolean;\n /** Longest edge an image keeps once resizing is on. */\n maxDimension: number;\n /** The range the hub accepts; a value outside it is clamped rather than refused. */\n minDimension: number;\n maxAllowedDimension: number;\n}\n\nexport interface SettingsImagesWriteRequest {\n autoResize?: boolean;\n maxDimension?: number;\n}\n/** Which of the two config files a read or write is about. */\nexport type SettingsScope = 'global' | 'repository';\n\n/** Where the effective value came from, or that no file set it. */\nexport type SettingsOrigin = 'global' | 'repository' | 'default';\n\n/** Which scopes a key may be written at, as the merge policy decides. */\nexport type SettingsKeyScope = 'global' | 'repository' | 'both';\n\n/** One repository the picker offers. */\nexport type SettingsRepository = RepositorySettingsRepository;\n\n/** One model the machine can actually use, for a field declaring optionsFrom: 'models'. */\nexport interface SettingsModel {\n /** `provider/model-id`, which is what the config file holds. */\n value: string;\n label: string;\n group: string;\n}\n\n/** One key's current state, keyed by its dotted path. */\nexport interface SettingsValueView {\n /** The effective value, stringified for display; absent when nothing set it. */\n value?: string;\n origin: SettingsOrigin;\n /** Which scopes may hold this key. A field outside the chosen scope is read-only. */\n scope: SettingsKeyScope;\n}\n\n/** What the read route answers with. */\nexport interface SettingsConfigView {\n /** Empty when the page has no repository in view; the global half still applies. */\n repoRoot: string;\n /** Keyed by dotted key path, for every key the page asked about. */\n values: Record<string, SettingsValueView>;\n /** Per-scope file identity, so a write can prove which bytes it read. */\n hashes: Record<SettingsScope, string>;\n}\n\n/** What the write route takes. `value: null` clears the key at that scope. */\nexport interface SettingsWriteRequest {\n /** Required for a repository write; ignored, and may be empty, for a global one. */\n repoRoot: string;\n scope: SettingsScope;\n keyPath: readonly string[];\n value: string | number | null;\n /** The hash of the target file when the page read it. */\n expectedHash: string;\n}\n\n/** One atomic save, validated as a whole before replacing the configuration file. */\nexport interface SettingsBatchWriteRequest {\n repoRoot: string;\n scope: SettingsScope;\n edits: readonly Pick<SettingsWriteRequest, 'keyPath' | 'value'>[];\n expectedHash: string;\n}\n\n/** A named option from one effective repository catalog. */\nexport interface RepositoryCatalogOption {\n name: string;\n description?: string;\n /** Present for a domain alias, naming the entries it expands to. */\n expandsTo?: readonly string[];\n /** Present for a major mode, naming its ordered layers. */\n layers?: readonly string[];\n}\n\n/** One selection axis, keeping an inherited effective value apart from this repository's override. */\nexport interface RepositorySelectionValue<T> {\n effective?: T;\n repository?: T;\n origin: SettingsOrigin;\n}\n\n/** The repository control plane's safe, non-secret catalog and selection view. */\nexport interface RepositorySettingsView {\n repository: SettingsRepository;\n hash: string;\n catalogs: {\n majorModes: readonly RepositoryCatalogOption[];\n domains: readonly RepositoryCatalogOption[];\n profiles: readonly RepositoryCatalogOption[];\n };\n selection: {\n majorMode: RepositorySelectionValue<string>;\n domains: RepositorySelectionValue<readonly string[]>;\n profile: RepositorySelectionValue<string>;\n };\n}\n\nexport interface RepositorySelectionChanges {\n majorMode?: string | null;\n domains?: readonly string[] | null;\n profile?: string | null;\n}\n\n/** An optimistic, atomic write into one repository's selection defaults. */\nexport interface RepositorySelectionWriteRequest {\n repositoryId: string;\n expectedHash: string;\n changes: RepositorySelectionChanges;\n}\n\n/** What a route reports when it refuses; the page shows `error` verbatim. */\nexport interface SettingsErrorView {\n error: string;\n /** On a stale write, the hash the target file actually holds now. */\n hash?: string;\n}\n"],"mappings":";AAWA,MAAa,4BAA4B;AACzC,MAAa,2BAA2B;AACxC,MAAa,kCAAkC;AAC/C,MAAa,4BAA4B;AACzC,MAAa,gCAAgC;AAC7C,MAAa,0CAA0C;AACvD,MAAa,4BAA4B"}
package/dist/types.cjs CHANGED
@@ -89,7 +89,7 @@ exports.WORKSPACE_REMOVED_TYPE = require_hub.WORKSPACE_REMOVED_TYPE;
89
89
  exports.WORKSPACE_UPSERT_TYPE = require_hub.WORKSPACE_UPSERT_TYPE;
90
90
  exports.bridgeStatus = require_session.bridgeStatus;
91
91
  exports.hubHello = require_hub.hubHello;
92
- exports.parseDoomNotificationEntry = require_notification.parseDoomNotificationEntry;
92
+ exports.parsePoNotificationEntry = require_notification.parsePoNotificationEntry;
93
93
  exports.sessionCommand = require_hub.sessionCommand;
94
94
  exports.sessionFileUrl = require_media.sessionFileUrl;
95
95
  exports.sessionFrameEnvelope = require_hub.sessionFrameEnvelope;
package/dist/types.d.mts CHANGED
@@ -7,5 +7,5 @@ import { BUNDLE_MINIMUM_REVISION_PARAM, BUNDLE_SIGNING_KEY_PARAM, BundlePairingT
7
7
  import { CreateSessionMcpClientInput, CreatedSessionMcpClient, SessionMcpClient, SessionMcpConfig, SessionMcpRouting, SessionMcpScope, SessionMcpSkill, SessionMcpTool } from "./types/sessionMcp.mjs";
8
8
  import { RepositoryCatalogOption, RepositorySelectionChanges, RepositorySelectionValue, RepositorySelectionWriteRequest, RepositorySettingsView, SETTINGS_CONFIG_API_ROUTE, SETTINGS_IMAGES_API_ROUTE, SETTINGS_MODELS_API_ROUTE, SETTINGS_REPOSITORIES_API_ROUTE, SETTINGS_REPOSITORY_API_ROUTE, SETTINGS_REPOSITORY_SELECTION_API_ROUTE, SETTINGS_VALUE_API_ROUTE, SettingsBatchWriteRequest, SettingsConfigView, SettingsErrorView, SettingsImagesView, SettingsImagesWriteRequest, SettingsKeyScope, SettingsModel, SettingsOrigin, SettingsRepository, SettingsScope, SettingsValueView, SettingsWriteRequest } from "./types/settings.mjs";
9
9
  import { WebServer, WebServerOptions } from "./types/bridge.mjs";
10
- import { DoomNotificationEntry, parseDoomNotificationEntry } from "./types/notification.mjs";
11
- export { AGENT_MODEL_ENTRY_TYPE, API_SESSION_QUERY_PARAM, ATTACHED_TYPE, ATTACH_ERROR_TYPE, ATTACH_TYPE, AUTH_LOGINS_API_ROUTE, AUTH_PROVIDERS_API_ROUTE, AuthMethodType, AuthRuntime, AuthRuntimeProvider, BRIDGE_STATUS_TYPE, BUNDLE_MINIMUM_REVISION_PARAM, BUNDLE_SIGNING_KEY_PARAM, BridgeState, BridgeStatusFrame, BundlePairingTrust, CONTEXT_ENTRY_TYPE, COOKIE_CEILING_SECONDS, ContextGroupKind, ContextGroupProjection, ContextItemProjection, ContextItemSource, ContextProjection, CreateSessionMcpClientInput, CreatedSessionMcpClient, DEVICE_COOKIE, DEV_PROXY_API_ROUTE, DEV_PROXY_PREFIX, DEV_PROXY_TARGETS_ROUTE, DIALOG_ANSWERED_TYPE, DIRECTORIES_API_ROUTE, DIRECTORY_CHILDREN_API_ROUTE, DevProxyStateView, DevProxyTarget, DirectoryListing, DoomNotificationEntry, HISTORY_PAGE_SIZE, HISTORY_PAGE_TYPE, HISTORY_REQUEST_TYPE, HUB_HELLO_TYPE, HUB_PROTOCOL_VERSION, HUB_RESYNCED_TYPE, HUB_ROLE, HistoryPageFrame, HistoryRequestFrame, HubHelloFrame, LoginEvent, LoginFlowSnapshot, LoginFlowStatus, LoginInteraction, LoginPrompt, LoginPromptView, LoginSelectOption, MAX_SESSION_FILE_BYTES, MEDIA_TYPES, MINOR_MODE_ENTRY_TYPE, MediaKind, MediaType, MigratingSession, MinorModeActionProjection, MinorModeProjection, MinorModeRecordProjection, PAIRING_CLAIM_ROUTE, PAIRING_CODE_TTL_MS, PAIRING_PAGE_ROUTE, PAIRING_REQUEST_TTL_MS, PAIRING_STATUS_QUERY, PAIRING_STATUS_ROUTE, PASSKEY_AUTH_BEGIN_ROUTE, PASSKEY_AUTH_FINISH_ROUTE, PASSKEY_REGISTER_BEGIN_ROUTE, PASSKEY_REGISTER_FINISH_ROUTE, PROFILE_IDENTITY_ENTRY_TYPE, PROTOCOL_SOCKET_ROUTE, PairedDeviceView, PairingRequestView, PairingStatus, PiSessionHistoryItem, ProviderAuthMethod, ProviderAuthSummary, REMOTE_API_ROUTE, REMOTE_CHANNEL_ROUTE, REMOTE_HTTP_ROUTE, REMOTE_PAIRING_REQUEST_TYPE, REMOTE_PUSH_KEY_ROUTE, REMOTE_PUSH_ROUTE, REMOTE_STATE_TYPE, REPLAY_TYPE, RESOURCE_CATALOG_ENTRY_TYPE, RemoteAccessSettings, RemoteAccessStateView, RemoteAccessStatus, RemoteChannelScope, RepositoryCatalogOption, RepositorySelectionChanges, RepositorySelectionValue, RepositorySelectionWriteRequest, RepositorySettingsView, SESSIONS_API_ROUTE, SESSIONS_SNAPSHOT_TYPE, SESSION_BACKLOG_TYPE, SESSION_COMMAND_TYPE, SESSION_FILE_EXPECTED_SHA256_HEADER, SESSION_FILE_ROUTE, SESSION_FILE_SHA256_HEADER, SESSION_FRAME_TYPE, SESSION_REMOVED_TYPE, SESSION_UPSERT_TYPE, SETTINGS_CONFIG_API_ROUTE, SETTINGS_IMAGES_API_ROUTE, SETTINGS_MODELS_API_ROUTE, SETTINGS_REPOSITORIES_API_ROUTE, SETTINGS_REPOSITORY_API_ROUTE, SETTINGS_REPOSITORY_SELECTION_API_ROUTE, SETTINGS_VALUE_API_ROUTE, STEP_UP_HEADER, SUBSCRIBE_THREAD_TYPE, SUBSCRIBE_TYPE, SandboxSettings, SessionBacklogFrame, SessionCommandFrame, SessionFrame, SessionFrameEnvelope, SessionGitStatus, SessionMcpClient, SessionMcpConfig, SessionMcpRouting, SessionMcpScope, SessionMcpSkill, SessionMcpTool, SessionNativeComposition, SessionPhase, SessionProfile, SessionRemovedFrame, SessionSummary, SessionUpsertFrame, SessionWebComposition, SessionsSnapshotFrame, SettingsBatchWriteRequest, SettingsConfigView, SettingsErrorView, SettingsImagesView, SettingsImagesWriteRequest, SettingsKeyScope, SettingsModel, SettingsOrigin, SettingsRepository, SettingsScope, SettingsValueView, SettingsWriteRequest, SubscribeFrame, SubscribeThreadFrame, THREAD_BACKLOG_TYPE, THREAD_FRAME_TYPE, TRUSTED_DEVICES_ROUTE, ThreadBacklogFrame, ThreadFrameEnvelope, TrustedDevicePlatform, TrustedDeviceView, TunnelConfig, TunnelFailure, TunnelKind, TunnelLauncher, TunnelStartInput, TunnelStartResult, UNSUBSCRIBE_THREAD_TYPE, UNSUBSCRIBE_TYPE, UnsubscribeFrame, UnsubscribeThreadFrame, WEB_DEV_SERVER_PORT, WORKSPACES_API_ROUTE, WORKSPACES_SNAPSHOT_TYPE, WORKSPACE_REMOVED_TYPE, WORKSPACE_UPSERT_TYPE, WebServer, WebServerOptions, WorkspaceRemovedFrame, WorkspaceSummary, WorkspaceUpsertFrame, WorkspacesSnapshotFrame, bridgeStatus, hubHello, parseDoomNotificationEntry, sessionCommand, sessionFileUrl, sessionFrameEnvelope, subscribeFrame, subscribeThreadFrame, threadBacklog, threadFrameEnvelope, unsubscribeFrame, unsubscribeThreadFrame };
10
+ import { PoNotificationEntry, parsePoNotificationEntry } from "./types/notification.mjs";
11
+ export { AGENT_MODEL_ENTRY_TYPE, API_SESSION_QUERY_PARAM, ATTACHED_TYPE, ATTACH_ERROR_TYPE, ATTACH_TYPE, AUTH_LOGINS_API_ROUTE, AUTH_PROVIDERS_API_ROUTE, AuthMethodType, AuthRuntime, AuthRuntimeProvider, BRIDGE_STATUS_TYPE, BUNDLE_MINIMUM_REVISION_PARAM, BUNDLE_SIGNING_KEY_PARAM, BridgeState, BridgeStatusFrame, BundlePairingTrust, CONTEXT_ENTRY_TYPE, COOKIE_CEILING_SECONDS, ContextGroupKind, ContextGroupProjection, ContextItemProjection, ContextItemSource, ContextProjection, CreateSessionMcpClientInput, CreatedSessionMcpClient, DEVICE_COOKIE, DEV_PROXY_API_ROUTE, DEV_PROXY_PREFIX, DEV_PROXY_TARGETS_ROUTE, DIALOG_ANSWERED_TYPE, DIRECTORIES_API_ROUTE, DIRECTORY_CHILDREN_API_ROUTE, DevProxyStateView, DevProxyTarget, DirectoryListing, HISTORY_PAGE_SIZE, HISTORY_PAGE_TYPE, HISTORY_REQUEST_TYPE, HUB_HELLO_TYPE, HUB_PROTOCOL_VERSION, HUB_RESYNCED_TYPE, HUB_ROLE, HistoryPageFrame, HistoryRequestFrame, HubHelloFrame, LoginEvent, LoginFlowSnapshot, LoginFlowStatus, LoginInteraction, LoginPrompt, LoginPromptView, LoginSelectOption, MAX_SESSION_FILE_BYTES, MEDIA_TYPES, MINOR_MODE_ENTRY_TYPE, MediaKind, MediaType, MigratingSession, MinorModeActionProjection, MinorModeProjection, MinorModeRecordProjection, PAIRING_CLAIM_ROUTE, PAIRING_CODE_TTL_MS, PAIRING_PAGE_ROUTE, PAIRING_REQUEST_TTL_MS, PAIRING_STATUS_QUERY, PAIRING_STATUS_ROUTE, PASSKEY_AUTH_BEGIN_ROUTE, PASSKEY_AUTH_FINISH_ROUTE, PASSKEY_REGISTER_BEGIN_ROUTE, PASSKEY_REGISTER_FINISH_ROUTE, PROFILE_IDENTITY_ENTRY_TYPE, PROTOCOL_SOCKET_ROUTE, PairedDeviceView, PairingRequestView, PairingStatus, PiSessionHistoryItem, PoNotificationEntry, ProviderAuthMethod, ProviderAuthSummary, REMOTE_API_ROUTE, REMOTE_CHANNEL_ROUTE, REMOTE_HTTP_ROUTE, REMOTE_PAIRING_REQUEST_TYPE, REMOTE_PUSH_KEY_ROUTE, REMOTE_PUSH_ROUTE, REMOTE_STATE_TYPE, REPLAY_TYPE, RESOURCE_CATALOG_ENTRY_TYPE, RemoteAccessSettings, RemoteAccessStateView, RemoteAccessStatus, RemoteChannelScope, RepositoryCatalogOption, RepositorySelectionChanges, RepositorySelectionValue, RepositorySelectionWriteRequest, RepositorySettingsView, SESSIONS_API_ROUTE, SESSIONS_SNAPSHOT_TYPE, SESSION_BACKLOG_TYPE, SESSION_COMMAND_TYPE, SESSION_FILE_EXPECTED_SHA256_HEADER, SESSION_FILE_ROUTE, SESSION_FILE_SHA256_HEADER, SESSION_FRAME_TYPE, SESSION_REMOVED_TYPE, SESSION_UPSERT_TYPE, SETTINGS_CONFIG_API_ROUTE, SETTINGS_IMAGES_API_ROUTE, SETTINGS_MODELS_API_ROUTE, SETTINGS_REPOSITORIES_API_ROUTE, SETTINGS_REPOSITORY_API_ROUTE, SETTINGS_REPOSITORY_SELECTION_API_ROUTE, SETTINGS_VALUE_API_ROUTE, STEP_UP_HEADER, SUBSCRIBE_THREAD_TYPE, SUBSCRIBE_TYPE, SandboxSettings, SessionBacklogFrame, SessionCommandFrame, SessionFrame, SessionFrameEnvelope, SessionGitStatus, SessionMcpClient, SessionMcpConfig, SessionMcpRouting, SessionMcpScope, SessionMcpSkill, SessionMcpTool, SessionNativeComposition, SessionPhase, SessionProfile, SessionRemovedFrame, SessionSummary, SessionUpsertFrame, SessionWebComposition, SessionsSnapshotFrame, SettingsBatchWriteRequest, SettingsConfigView, SettingsErrorView, SettingsImagesView, SettingsImagesWriteRequest, SettingsKeyScope, SettingsModel, SettingsOrigin, SettingsRepository, SettingsScope, SettingsValueView, SettingsWriteRequest, SubscribeFrame, SubscribeThreadFrame, THREAD_BACKLOG_TYPE, THREAD_FRAME_TYPE, TRUSTED_DEVICES_ROUTE, ThreadBacklogFrame, ThreadFrameEnvelope, TrustedDevicePlatform, TrustedDeviceView, TunnelConfig, TunnelFailure, TunnelKind, TunnelLauncher, TunnelStartInput, TunnelStartResult, UNSUBSCRIBE_THREAD_TYPE, UNSUBSCRIBE_TYPE, UnsubscribeFrame, UnsubscribeThreadFrame, WEB_DEV_SERVER_PORT, WORKSPACES_API_ROUTE, WORKSPACES_SNAPSHOT_TYPE, WORKSPACE_REMOVED_TYPE, WORKSPACE_UPSERT_TYPE, WebServer, WebServerOptions, WorkspaceRemovedFrame, WorkspaceSummary, WorkspaceUpsertFrame, WorkspacesSnapshotFrame, bridgeStatus, hubHello, parsePoNotificationEntry, sessionCommand, sessionFileUrl, sessionFrameEnvelope, subscribeFrame, subscribeThreadFrame, threadBacklog, threadFrameEnvelope, unsubscribeFrame, unsubscribeThreadFrame };
package/dist/types.mjs CHANGED
@@ -3,7 +3,7 @@ import { BUNDLE_MINIMUM_REVISION_PARAM, BUNDLE_SIGNING_KEY_PARAM, COOKIE_CEILING
3
3
  import { DEV_PROXY_API_ROUTE, DEV_PROXY_PREFIX, DEV_PROXY_TARGETS_ROUTE } from "./types/devProxy.mjs";
4
4
  import { MAX_SESSION_FILE_BYTES, MEDIA_TYPES, SESSION_FILE_EXPECTED_SHA256_HEADER, SESSION_FILE_ROUTE, SESSION_FILE_SHA256_HEADER, sessionFileUrl } from "./types/media.mjs";
5
5
  import { AGENT_MODEL_ENTRY_TYPE, API_SESSION_QUERY_PARAM, CONTEXT_ENTRY_TYPE, DIALOG_ANSWERED_TYPE, DIRECTORIES_API_ROUTE, DIRECTORY_CHILDREN_API_ROUTE, HISTORY_PAGE_SIZE, HISTORY_PAGE_TYPE, HISTORY_REQUEST_TYPE, HUB_HELLO_TYPE, HUB_PROTOCOL_VERSION, HUB_RESYNCED_TYPE, HUB_ROLE, MINOR_MODE_ENTRY_TYPE, PROFILE_IDENTITY_ENTRY_TYPE, RESOURCE_CATALOG_ENTRY_TYPE, SESSIONS_API_ROUTE, SESSIONS_SNAPSHOT_TYPE, SESSION_BACKLOG_TYPE, SESSION_COMMAND_TYPE, SESSION_FRAME_TYPE, SESSION_REMOVED_TYPE, SESSION_UPSERT_TYPE, SUBSCRIBE_THREAD_TYPE, SUBSCRIBE_TYPE, THREAD_BACKLOG_TYPE, THREAD_FRAME_TYPE, UNSUBSCRIBE_THREAD_TYPE, UNSUBSCRIBE_TYPE, WORKSPACES_API_ROUTE, WORKSPACES_SNAPSHOT_TYPE, WORKSPACE_REMOVED_TYPE, WORKSPACE_UPSERT_TYPE, hubHello, sessionCommand, sessionFrameEnvelope, subscribeFrame, subscribeThreadFrame, threadBacklog, threadFrameEnvelope, unsubscribeFrame, unsubscribeThreadFrame } from "./types/hub.mjs";
6
- import { parseDoomNotificationEntry } from "./types/notification.mjs";
6
+ import { parsePoNotificationEntry } from "./types/notification.mjs";
7
7
  import { SETTINGS_CONFIG_API_ROUTE, SETTINGS_IMAGES_API_ROUTE, SETTINGS_MODELS_API_ROUTE, SETTINGS_REPOSITORIES_API_ROUTE, SETTINGS_REPOSITORY_API_ROUTE, SETTINGS_REPOSITORY_SELECTION_API_ROUTE, SETTINGS_VALUE_API_ROUTE } from "./types/settings.mjs";
8
8
  import { ATTACHED_TYPE, ATTACH_ERROR_TYPE, ATTACH_TYPE, BRIDGE_STATUS_TYPE, REPLAY_TYPE, bridgeStatus } from "./types/session.mjs";
9
- export { AGENT_MODEL_ENTRY_TYPE, API_SESSION_QUERY_PARAM, ATTACHED_TYPE, ATTACH_ERROR_TYPE, ATTACH_TYPE, AUTH_LOGINS_API_ROUTE, AUTH_PROVIDERS_API_ROUTE, BRIDGE_STATUS_TYPE, BUNDLE_MINIMUM_REVISION_PARAM, BUNDLE_SIGNING_KEY_PARAM, CONTEXT_ENTRY_TYPE, COOKIE_CEILING_SECONDS, DEVICE_COOKIE, DEV_PROXY_API_ROUTE, DEV_PROXY_PREFIX, DEV_PROXY_TARGETS_ROUTE, DIALOG_ANSWERED_TYPE, DIRECTORIES_API_ROUTE, DIRECTORY_CHILDREN_API_ROUTE, HISTORY_PAGE_SIZE, HISTORY_PAGE_TYPE, HISTORY_REQUEST_TYPE, HUB_HELLO_TYPE, HUB_PROTOCOL_VERSION, HUB_RESYNCED_TYPE, HUB_ROLE, MAX_SESSION_FILE_BYTES, MEDIA_TYPES, MINOR_MODE_ENTRY_TYPE, PAIRING_CLAIM_ROUTE, PAIRING_CODE_TTL_MS, PAIRING_PAGE_ROUTE, PAIRING_REQUEST_TTL_MS, PAIRING_STATUS_QUERY, PAIRING_STATUS_ROUTE, PASSKEY_AUTH_BEGIN_ROUTE, PASSKEY_AUTH_FINISH_ROUTE, PASSKEY_REGISTER_BEGIN_ROUTE, PASSKEY_REGISTER_FINISH_ROUTE, PROFILE_IDENTITY_ENTRY_TYPE, PROTOCOL_SOCKET_ROUTE, REMOTE_API_ROUTE, REMOTE_CHANNEL_ROUTE, REMOTE_HTTP_ROUTE, REMOTE_PAIRING_REQUEST_TYPE, REMOTE_PUSH_KEY_ROUTE, REMOTE_PUSH_ROUTE, REMOTE_STATE_TYPE, REPLAY_TYPE, RESOURCE_CATALOG_ENTRY_TYPE, SESSIONS_API_ROUTE, SESSIONS_SNAPSHOT_TYPE, SESSION_BACKLOG_TYPE, SESSION_COMMAND_TYPE, SESSION_FILE_EXPECTED_SHA256_HEADER, SESSION_FILE_ROUTE, SESSION_FILE_SHA256_HEADER, SESSION_FRAME_TYPE, SESSION_REMOVED_TYPE, SESSION_UPSERT_TYPE, SETTINGS_CONFIG_API_ROUTE, SETTINGS_IMAGES_API_ROUTE, SETTINGS_MODELS_API_ROUTE, SETTINGS_REPOSITORIES_API_ROUTE, SETTINGS_REPOSITORY_API_ROUTE, SETTINGS_REPOSITORY_SELECTION_API_ROUTE, SETTINGS_VALUE_API_ROUTE, STEP_UP_HEADER, SUBSCRIBE_THREAD_TYPE, SUBSCRIBE_TYPE, THREAD_BACKLOG_TYPE, THREAD_FRAME_TYPE, TRUSTED_DEVICES_ROUTE, UNSUBSCRIBE_THREAD_TYPE, UNSUBSCRIBE_TYPE, WEB_DEV_SERVER_PORT, WORKSPACES_API_ROUTE, WORKSPACES_SNAPSHOT_TYPE, WORKSPACE_REMOVED_TYPE, WORKSPACE_UPSERT_TYPE, bridgeStatus, hubHello, parseDoomNotificationEntry, sessionCommand, sessionFileUrl, sessionFrameEnvelope, subscribeFrame, subscribeThreadFrame, threadBacklog, threadFrameEnvelope, unsubscribeFrame, unsubscribeThreadFrame };
9
+ export { AGENT_MODEL_ENTRY_TYPE, API_SESSION_QUERY_PARAM, ATTACHED_TYPE, ATTACH_ERROR_TYPE, ATTACH_TYPE, AUTH_LOGINS_API_ROUTE, AUTH_PROVIDERS_API_ROUTE, BRIDGE_STATUS_TYPE, BUNDLE_MINIMUM_REVISION_PARAM, BUNDLE_SIGNING_KEY_PARAM, CONTEXT_ENTRY_TYPE, COOKIE_CEILING_SECONDS, DEVICE_COOKIE, DEV_PROXY_API_ROUTE, DEV_PROXY_PREFIX, DEV_PROXY_TARGETS_ROUTE, DIALOG_ANSWERED_TYPE, DIRECTORIES_API_ROUTE, DIRECTORY_CHILDREN_API_ROUTE, HISTORY_PAGE_SIZE, HISTORY_PAGE_TYPE, HISTORY_REQUEST_TYPE, HUB_HELLO_TYPE, HUB_PROTOCOL_VERSION, HUB_RESYNCED_TYPE, HUB_ROLE, MAX_SESSION_FILE_BYTES, MEDIA_TYPES, MINOR_MODE_ENTRY_TYPE, PAIRING_CLAIM_ROUTE, PAIRING_CODE_TTL_MS, PAIRING_PAGE_ROUTE, PAIRING_REQUEST_TTL_MS, PAIRING_STATUS_QUERY, PAIRING_STATUS_ROUTE, PASSKEY_AUTH_BEGIN_ROUTE, PASSKEY_AUTH_FINISH_ROUTE, PASSKEY_REGISTER_BEGIN_ROUTE, PASSKEY_REGISTER_FINISH_ROUTE, PROFILE_IDENTITY_ENTRY_TYPE, PROTOCOL_SOCKET_ROUTE, REMOTE_API_ROUTE, REMOTE_CHANNEL_ROUTE, REMOTE_HTTP_ROUTE, REMOTE_PAIRING_REQUEST_TYPE, REMOTE_PUSH_KEY_ROUTE, REMOTE_PUSH_ROUTE, REMOTE_STATE_TYPE, REPLAY_TYPE, RESOURCE_CATALOG_ENTRY_TYPE, SESSIONS_API_ROUTE, SESSIONS_SNAPSHOT_TYPE, SESSION_BACKLOG_TYPE, SESSION_COMMAND_TYPE, SESSION_FILE_EXPECTED_SHA256_HEADER, SESSION_FILE_ROUTE, SESSION_FILE_SHA256_HEADER, SESSION_FRAME_TYPE, SESSION_REMOVED_TYPE, SESSION_UPSERT_TYPE, SETTINGS_CONFIG_API_ROUTE, SETTINGS_IMAGES_API_ROUTE, SETTINGS_MODELS_API_ROUTE, SETTINGS_REPOSITORIES_API_ROUTE, SETTINGS_REPOSITORY_API_ROUTE, SETTINGS_REPOSITORY_SELECTION_API_ROUTE, SETTINGS_VALUE_API_ROUTE, STEP_UP_HEADER, SUBSCRIBE_THREAD_TYPE, SUBSCRIBE_TYPE, THREAD_BACKLOG_TYPE, THREAD_FRAME_TYPE, TRUSTED_DEVICES_ROUTE, UNSUBSCRIBE_THREAD_TYPE, UNSUBSCRIBE_TYPE, WEB_DEV_SERVER_PORT, WORKSPACES_API_ROUTE, WORKSPACES_SNAPSHOT_TYPE, WORKSPACE_REMOVED_TYPE, WORKSPACE_UPSERT_TYPE, bridgeStatus, hubHello, parsePoNotificationEntry, sessionCommand, sessionFileUrl, sessionFrameEnvelope, subscribeFrame, subscribeThreadFrame, threadBacklog, threadFrameEnvelope, unsubscribeFrame, unsubscribeThreadFrame };