@markmo/europacore-session-ui 0.0.0-stage → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/README.md +78 -2
  2. package/dist/BoardPage-DDcf5vup.js +691 -0
  3. package/dist/CardDetail-D0TLVhf7.js +264 -0
  4. package/dist/ComparePage-C32hPOqV.js +247 -0
  5. package/dist/OverviewPage-BkeuYg6d.js +364 -0
  6. package/dist/RegisterPage-Dawr26jh.js +383 -0
  7. package/dist/SessionPage-68nDek9w.js +881 -0
  8. package/dist/api/agentClient.d.ts +146 -0
  9. package/dist/api/agentErrors.d.ts +14 -0
  10. package/dist/api/chatStream.d.ts +34 -0
  11. package/dist/api/sse.d.ts +18 -0
  12. package/dist/api/types.d.ts +223 -0
  13. package/dist/api/wire.d.ts +858 -0
  14. package/dist/features/agents/agentsStore.d.ts +26 -0
  15. package/dist/features/board/BoardCard.d.ts +20 -0
  16. package/dist/features/board/BoardColumn.d.ts +11 -0
  17. package/dist/features/board/BoardPage.d.ts +17 -0
  18. package/dist/features/board/CardDetail.d.ts +16 -0
  19. package/dist/features/board/StageChips.d.ts +9 -0
  20. package/dist/features/board/actions.d.ts +3 -0
  21. package/dist/features/board/board.d.ts +48 -0
  22. package/dist/features/board/flipPlan.d.ts +72 -0
  23. package/dist/features/board/stageStyle.d.ts +10 -0
  24. package/dist/features/board/useBoardFlip.d.ts +19 -0
  25. package/dist/features/bootstrap.d.ts +2 -0
  26. package/dist/features/chat/ChatIntro.d.ts +3 -0
  27. package/dist/features/chat/MessageParts.d.ts +21 -0
  28. package/dist/features/chat/decisions/PauseDock.d.ts +26 -0
  29. package/dist/features/chat/decisions/cards.d.ts +88 -0
  30. package/dist/features/chat/extensions.d.ts +52 -0
  31. package/dist/features/chat/images.d.ts +6 -0
  32. package/dist/features/chat/markdown/CodeBlock.d.ts +4 -0
  33. package/dist/features/chat/markdown/CopyButton.d.ts +6 -0
  34. package/dist/features/chat/markdown/MarkdownContent.d.ts +7 -0
  35. package/dist/features/chat/markdown/MermaidBlock.d.ts +4 -0
  36. package/dist/features/chat/model/chrome.d.ts +12 -0
  37. package/dist/features/chat/model/collisions.d.ts +44 -0
  38. package/dist/features/chat/model/describeCall.d.ts +26 -0
  39. package/dist/features/chat/model/entries.d.ts +126 -0
  40. package/dist/features/chat/model/export.d.ts +3 -0
  41. package/dist/features/chat/model/fleet.d.ts +62 -0
  42. package/dist/features/chat/model/flow.d.ts +21 -0
  43. package/dist/features/chat/model/format.d.ts +11 -0
  44. package/dist/features/chat/model/inspect.d.ts +11 -0
  45. package/dist/features/chat/model/mcp.d.ts +14 -0
  46. package/dist/features/chat/model/memory.d.ts +115 -0
  47. package/dist/features/chat/model/pullRequests.d.ts +22 -0
  48. package/dist/features/chat/model/questions.d.ts +13 -0
  49. package/dist/features/chat/model/reducer.d.ts +5 -0
  50. package/dist/features/chat/model/register.d.ts +15 -0
  51. package/dist/features/chat/model/routing.d.ts +20 -0
  52. package/dist/features/chat/model/rowFilters.d.ts +10 -0
  53. package/dist/features/chat/model/sanitize.d.ts +12 -0
  54. package/dist/features/chat/model/sessions.d.ts +158 -0
  55. package/dist/features/chat/model/spec.d.ts +20 -0
  56. package/dist/features/chat/model/stages.d.ts +37 -0
  57. package/dist/features/chat/model/store.d.ts +99 -0
  58. package/dist/features/chat/model/subagents.d.ts +17 -0
  59. package/dist/features/chat/model/tasks.d.ts +21 -0
  60. package/dist/features/chat/model/variants.d.ts +39 -0
  61. package/dist/features/chat/notify.d.ts +1 -0
  62. package/dist/features/chat/panels/CorePanels.d.ts +16 -0
  63. package/dist/features/chat/panels/Inspector.d.ts +14 -0
  64. package/dist/features/chat/panels/registry.d.ts +23 -0
  65. package/dist/features/chat/session/ComposerHistory.d.ts +19 -0
  66. package/dist/features/chat/session/SessionBar.d.ts +11 -0
  67. package/dist/features/chat/session/SessionComposer.d.ts +24 -0
  68. package/dist/features/chat/session/SessionController.d.ts +255 -0
  69. package/dist/features/chat/session/SessionPage.d.ts +5 -0
  70. package/dist/features/chat/session/StatusLine.d.ts +5 -0
  71. package/dist/features/chat/session/describeError.d.ts +2 -0
  72. package/dist/features/chat/session/promptHistory.d.ts +35 -0
  73. package/dist/features/chat/session/sessionPageHooks.d.ts +8 -0
  74. package/dist/features/chat/session/useFileMentions.d.ts +7 -0
  75. package/dist/features/chat/session/useSession.d.ts +10 -0
  76. package/dist/features/chat/slashMatching.d.ts +11 -0
  77. package/dist/features/chat/transcript/Rows.d.ts +55 -0
  78. package/dist/features/chat/transcript/TranscriptView.d.ts +14 -0
  79. package/dist/features/chat/transcript/blocks.d.ts +46 -0
  80. package/dist/features/commands/AppDialogs.d.ts +1 -0
  81. package/dist/features/commands/CommandPalette.d.ts +11 -0
  82. package/dist/features/commands/InspectDialog.d.ts +3 -0
  83. package/dist/features/commands/core.d.ts +4 -0
  84. package/dist/features/commands/dialogs.d.ts +13 -0
  85. package/dist/features/commands/hotkeys.d.ts +13 -0
  86. package/dist/features/commands/registry.d.ts +59 -0
  87. package/dist/features/fleet/ComparePage.d.ts +16 -0
  88. package/dist/features/fleet/FleetPanel.d.ts +10 -0
  89. package/dist/features/fleet/fleetCommands.d.ts +61 -0
  90. package/dist/features/fleet/fleetEnv.d.ts +2 -0
  91. package/dist/features/memory/ExtractConfirmDialog.d.ts +10 -0
  92. package/dist/features/memory/MemoryDialog.d.ts +13 -0
  93. package/dist/features/memory/MemoryParts.d.ts +52 -0
  94. package/dist/features/memory/RegisterPage.d.ts +9 -0
  95. package/dist/features/memory/memoryCommands.d.ts +1 -0
  96. package/dist/features/memory/memoryService.d.ts +215 -0
  97. package/dist/features/memory/memoryStore.d.ts +95 -0
  98. package/dist/features/memory/useMemoryCapture.d.ts +33 -0
  99. package/dist/features/sessions/ContextGauge.d.ts +15 -0
  100. package/dist/features/sessions/DispatchLine.d.ts +15 -0
  101. package/dist/features/sessions/NewSessionDialog.d.ts +18 -0
  102. package/dist/features/sessions/OverviewPage.d.ts +6 -0
  103. package/dist/features/sessions/PeekPanel.d.ts +16 -0
  104. package/dist/features/sessions/RenameInput.d.ts +7 -0
  105. package/dist/features/sessions/SessionRow.d.ts +22 -0
  106. package/dist/features/sessions/SessionsPanel.d.ts +20 -0
  107. package/dist/features/sessions/hub.d.ts +128 -0
  108. package/dist/features/sessions/useAttention.d.ts +11 -0
  109. package/dist/features/workspace/AcceptDiscardBar.d.ts +9 -0
  110. package/dist/features/workspace/AddedDirsDialog.d.ts +6 -0
  111. package/dist/features/workspace/DiffDialog.d.ts +30 -0
  112. package/dist/features/workspace/DiffViewer.d.ts +39 -0
  113. package/dist/features/workspace/GitPanel.d.ts +7 -0
  114. package/dist/features/workspace/Highlight.d.ts +23 -0
  115. package/dist/features/workspace/PullRequestCard.d.ts +29 -0
  116. package/dist/features/workspace/SnapshotsDialog.d.ts +6 -0
  117. package/dist/features/workspace/UndoDialog.d.ts +6 -0
  118. package/dist/features/workspace/WorkspaceDialogs.d.ts +18 -0
  119. package/dist/features/workspace/WorkspaceLocation.d.ts +17 -0
  120. package/dist/features/workspace/collisionsWatcher.d.ts +78 -0
  121. package/dist/features/workspace/hooks.d.ts +10 -0
  122. package/dist/features/workspace/intraline.d.ts +41 -0
  123. package/dist/features/workspace/parsePatch.d.ts +60 -0
  124. package/dist/features/workspace/register.d.ts +1 -0
  125. package/dist/features/workspace/testController.d.ts +15 -0
  126. package/dist/features/workspace/undoCommands.d.ts +64 -0
  127. package/dist/features/workspace/useSessionPageHooks.d.ts +6 -0
  128. package/dist/features/workspace/workspaceActions.d.ts +44 -0
  129. package/dist/features/workspace/workspaceCommands.d.ts +83 -0
  130. package/dist/features/workspace/workspaceFormat.d.ts +31 -0
  131. package/dist/host.d.ts +66 -0
  132. package/dist/index-B0hmy2Cw.js +10218 -0
  133. package/dist/index.d.ts +32 -0
  134. package/dist/index.js +91 -0
  135. package/dist/lib/cx.d.ts +2 -0
  136. package/dist/lib/paths.d.ts +12 -0
  137. package/dist/lib/posixPath.d.ts +7 -0
  138. package/dist/lib/theme.d.ts +15 -0
  139. package/dist/lib/time.d.ts +10 -0
  140. package/dist/lib/uuid.d.ts +1 -0
  141. package/dist/promptHistory-DQyt2Br0.js +231 -0
  142. package/dist/ui/Avatar.d.ts +7 -0
  143. package/dist/ui/Badge.d.ts +7 -0
  144. package/dist/ui/Button.d.ts +19 -0
  145. package/dist/ui/Callout.d.ts +10 -0
  146. package/dist/ui/Dialog.d.ts +19 -0
  147. package/dist/ui/Disclosure.d.ts +8 -0
  148. package/dist/ui/EmptyState.d.ts +7 -0
  149. package/dist/ui/Field.d.ts +30 -0
  150. package/dist/ui/Menu.d.ts +20 -0
  151. package/dist/ui/PageHeader.d.ts +8 -0
  152. package/dist/ui/Spinner.d.ts +5 -0
  153. package/dist/ui/Toast.d.ts +16 -0
  154. package/dist/ui/index.d.ts +12 -0
  155. package/package.json +52 -4
  156. package/src/styles/session-ui.css +90 -0
  157. package/src/styles/tokens.css +80 -0
package/README.md CHANGED
@@ -1,3 +1,79 @@
1
- # Temporary Holding Version
1
+ # @markmo/europacore-session-ui
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ europacore's session UI for any React 18 or 19 app that reaches a europacore server (`europacore/docs/server-api.md`):
4
+
5
+ - sessions, with the live transcript, tool calls, approvals, steering and Stop;
6
+ - workspaces (git, diffs, accept and discard, snapshots, pull requests) and fleets;
7
+ - the overview, the live board and the decision register.
8
+
9
+ It is europacoreui's own frontend, kept in that repository as an npm workspace. devassistant (Codaflow) installs it.
10
+
11
+ ## Use it
12
+
13
+ ```ts
14
+ import { configureSessionUi, ThemeProvider, ToastProvider, SessionPage, OverviewPage, DialogHost } from '@markmo/europacore-session-ui';
15
+
16
+ configureSessionUi({
17
+ // where the server's /v1 is, and how calls to it are signed
18
+ transport: {
19
+ baseUrl: '/europacore/v1',
20
+ headers: async () => ({ Authorization: `Bearer ${await idToken()}`, 'X-Devassistant-Workspace': workspaceId() }),
21
+ onUnauthorized: () => signIn(),
22
+ },
23
+ basePath: '/coding', // pages at /coding/sessions/:id, /coding/board, ...
24
+ userName: () => currentUser()?.name ?? null,
25
+ // features: what the app allows (the coder, fleets, credentials); all off by default
26
+ // workspaces: the app's directories a coder can work in, when it has them
27
+ // disabledPermissionModes: modes users may not switch to here, e.g. ['bypassPermissions']
28
+ // approvalArmMs: how long an approval card ignores clicks after it appears (300 by default)
29
+ });
30
+ ```
31
+
32
+ Call it once before the first render, then:
33
+
34
+ - **Routes.** Mount the pages at the paths `lib/paths.ts` names, under `basePath`:
35
+ - `SessionPage` at `sessions/:sessionId` (`new` starts one);
36
+ - `OverviewPage` at `sessions`;
37
+ - `ComparePage` at `sessions/:sessionId/compare/:group`;
38
+ - `BoardPage` at `board`;
39
+ - `DecisionsPage` at `decisions`.
40
+ - **Shell.** Render `DialogHost` once, inside the router. Call `bootstrapFeatures()` once, and `loadAgents()` once signed in. `SessionsPanel`, `CommandPalette` and the hooks (`useAttention`, `useMemoryCapture`, `useSessionPageHooks`, `useHotkeys`) are optional.
41
+ - **Router.** The package uses React Router 7 (`react-router`), a peer dependency.
42
+ - **Theme.** `ThemeProvider` owns light and dark. Without it, the package follows the document's `dark` class.
43
+
44
+ ### Styles
45
+
46
+ The components use Tailwind utilities named after semantic tokens:
47
+
48
+ - `bg-surface`, `bg-surface-alt`, `bg-surface-sunken`, `bg-surface-hover`, `bg-bg`;
49
+ - `text-ink`, `text-muted`, `text-faint`;
50
+ - `border-line`, `border-line-soft`;
51
+ - `accent`, `accent-hover`, `accent-soft` and `on-accent`;
52
+ - the families `danger`, `warn` and `ok` (each with `-soft` and `-line`; `danger` also has `-ink`);
53
+ - `disabled`.
54
+
55
+ The app's Tailwind (v4) generates the utilities. Point it at the package, and give it the tokens:
56
+
57
+ ```css
58
+ @import 'tailwindcss';
59
+ @source '../node_modules/@markmo/europacore-session-ui/dist';
60
+ @import '@markmo/europacore-session-ui/tokens.css'; /* europacoreui's palette; or define the names yourself */
61
+ @import '@markmo/europacore-session-ui/styles.css'; /* markdown and the streaming caret */
62
+ ```
63
+
64
+ ## Develop
65
+
66
+ From `frontend/`:
67
+
68
+ - `npm test` runs the app's tests, then the package's.
69
+ - `npm run typecheck` checks both.
70
+ - `npm run build -w @markmo/europacore-session-ui` builds `dist/`: ES modules, one chunk per page, and `.d.ts` files.
71
+ - `npm pack -w @markmo/europacore-session-ui` makes a tarball, for trying a change in an app before it is published.
72
+
73
+ ## Publish
74
+
75
+ It is published to public npm, so an app installs it with no token: `npm install @markmo/europacore-session-ui`.
76
+
77
+ 1. Bump `version` and add to `CHANGELOG.md`.
78
+ 2. Once that is on `main`, push the tag `session-ui-v<version>`.
79
+ 3. `.github/workflows/publish-session-ui.yml` then checks, tests and publishes the package through npm trusted publishing: the workflow signs in as itself (OIDC), with no token. npmjs.com's package settings name this repository and workflow as its trusted publisher.