@markmo/europacore-session-ui 0.2.0 → 0.4.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 (63) hide show
  1. package/README.md +1 -1
  2. package/dist/ArtifactsPage-BxaqShTv.js +1178 -0
  3. package/dist/{BoardPage-BAQrGP7G.js → BoardPage-DH7p5o99.js} +274 -265
  4. package/dist/{CardDetail-CCgP8R61.js → CardDetail-LfDCJQhS.js} +42 -33
  5. package/dist/{ComparePage-FcLLhKzC.js → ComparePage-CrbCyu4u.js} +33 -33
  6. package/dist/MemoriesPage-BRA53Hlb.js +679 -0
  7. package/dist/{OverviewPage-CbfbyGNT.js → OverviewPage-BSBqY83_.js} +50 -49
  8. package/dist/{RegisterPage-3-hJNQEV.js → RegisterPage-64yGl9E-.js} +76 -76
  9. package/dist/SessionPage-C4hSlxWQ.js +906 -0
  10. package/dist/api/agentClient.d.ts +66 -1
  11. package/dist/api/wire.d.ts +540 -4
  12. package/dist/features/artifacts/ArtifactDetail.d.ts +15 -0
  13. package/dist/features/artifacts/ArtifactDialogs.d.ts +29 -0
  14. package/dist/features/artifacts/ArtifactLedger.d.ts +11 -0
  15. package/dist/features/artifacts/ArtifactStats.d.ts +9 -0
  16. package/dist/features/artifacts/ArtifactsPage.d.ts +1 -0
  17. package/dist/features/artifacts/artifactsCommands.d.ts +3 -0
  18. package/dist/features/artifacts/artifactsStore.d.ts +27 -0
  19. package/dist/features/artifacts/artifactsUi.d.ts +33 -0
  20. package/dist/features/bootstrap.d.ts +1 -0
  21. package/dist/features/chat/model/artifactAccess.d.ts +50 -0
  22. package/dist/features/chat/model/artifactCsv.d.ts +11 -0
  23. package/dist/features/chat/model/artifactExport.d.ts +45 -0
  24. package/dist/features/chat/model/artifactStats.d.ts +79 -0
  25. package/dist/features/chat/model/artifacts.d.ts +151 -0
  26. package/dist/features/chat/model/claims.d.ts +102 -0
  27. package/dist/features/chat/model/contextSources.d.ts +41 -0
  28. package/dist/features/chat/model/entries.d.ts +37 -2
  29. package/dist/features/chat/model/fleet.d.ts +11 -0
  30. package/dist/features/chat/model/format.d.ts +6 -0
  31. package/dist/features/chat/model/inspect.d.ts +11 -0
  32. package/dist/features/chat/model/memory.d.ts +3 -3
  33. package/dist/features/chat/model/memoryRecords.d.ts +79 -0
  34. package/dist/features/chat/model/monitors.d.ts +11 -0
  35. package/dist/features/chat/model/progress.d.ts +73 -0
  36. package/dist/features/chat/model/routing.d.ts +20 -0
  37. package/dist/features/chat/model/store.d.ts +5 -0
  38. package/dist/features/chat/model/tasks.d.ts +1 -1
  39. package/dist/features/chat/panels/ProgressPanel.d.ts +8 -0
  40. package/dist/features/chat/session/ComposerHistory.d.ts +1 -1
  41. package/dist/features/chat/session/SessionController.d.ts +3 -2
  42. package/dist/features/chat/session/useFileMentions.d.ts +18 -5
  43. package/dist/features/chat/transcript/ArtifactCard.d.ts +8 -0
  44. package/dist/features/chat/transcript/Rows.d.ts +12 -1
  45. package/dist/features/commands/InspectDialog.d.ts +3 -0
  46. package/dist/features/commands/dialogs.d.ts +1 -1
  47. package/dist/features/commands/registry.d.ts +1 -1
  48. package/dist/features/memories/MemoriesPage.d.ts +1 -0
  49. package/dist/features/memories/memoriesCommands.d.ts +3 -0
  50. package/dist/features/memories/memoriesController.d.ts +81 -0
  51. package/dist/features/memory/MemoryDialog.d.ts +1 -1
  52. package/dist/features/memory/memoryService.d.ts +10 -10
  53. package/dist/features/workspace/claimsCommands.d.ts +26 -0
  54. package/dist/features/workspace/collisionsWatcher.d.ts +7 -0
  55. package/dist/features/workspace/useSessionPageHooks.d.ts +1 -1
  56. package/dist/{index-NjGO7Jg1.js → index-CMPf-3JZ.js} +4821 -3447
  57. package/dist/index.d.ts +2 -0
  58. package/dist/index.js +86 -82
  59. package/dist/lib/paths.d.ts +12 -0
  60. package/dist/lib/zip.d.ts +14 -0
  61. package/dist/{promptHistory-DjSCHmEk.js → promptHistory-BR0NpLCI.js} +14 -14
  62. package/package.json +1 -1
  63. package/dist/SessionPage-CA9hAakW.js +0 -865
package/dist/index.d.ts CHANGED
@@ -4,6 +4,8 @@ export declare const SessionPage: import("react").LazyExoticComponent<typeof imp
4
4
  export declare const OverviewPage: import("react").LazyExoticComponent<typeof import("./features/sessions/OverviewPage").default>;
5
5
  export declare const BoardPage: import("react").LazyExoticComponent<typeof import("./features/board/BoardPage").default>;
6
6
  export declare const DecisionsPage: import("react").LazyExoticComponent<typeof import("./features/memory/RegisterPage").default>;
7
+ export declare const ArtifactsPage: import("react").LazyExoticComponent<typeof import("./features/artifacts/ArtifactsPage").default>;
8
+ export declare const MemoriesPage: import("react").LazyExoticComponent<typeof import("./features/memories/MemoriesPage").default>;
7
9
  export declare const ComparePage: import("react").LazyExoticComponent<typeof import("./features/fleet/ComparePage").default>;
8
10
  export { agentClient, EuropacoreClient, type StreamHandlers, type ServerCommand } from './api/agentClient';
9
11
  export { ApiError, describeError } from './api/agentErrors';
package/dist/index.js CHANGED
@@ -1,91 +1,95 @@
1
1
  import "react";
2
- import { b5 as t, b6 as o, B as r, b7 as n, H as i, aB as b, b8 as u, b9 as m, f as l, ba as g, bb as P, ah as S, bc as c, bd as d, _ as p, F as C, be as h, bf as A, bg as E, G as T, I as f, bh as x, av as B, ax as D, au as F, aw as v, bi as H, a0 as M, bj as w, bk as k, a4 as y, bl as N, bm as O, bn as I, aA as U, bo as _, bp as q, bq as G, br as K, $ as R, Q as z, bs as J, bt as L, bu as Q, c as W, ak as j, bv as V, bw as $, bx as X, by as Y, a as Z, bz as aa, bA as sa, bB as ea, bC as ta, ae as oa, bD as ra, bE as na, q as ia, ad as ba, y as ua, bF as ma, bG as la, bH as ga, bI as Pa, J as Sa, bJ as ca, bK as da, r as pa, bL as Ca, bM as ha, z as Aa, s as Ea, O as Ta, x as fa, w as xa, bN as Ba, bO as Da, v as Fa, bP as va, bQ as Ha, bR as Ma, bS as wa, g as ka } from "./index-NjGO7Jg1.js";
3
- import { Menu as Na, MenuButton as Oa } from "@headlessui/react";
2
+ import { b8 as t, bT as o, bU as r, B as n, bV as i, Y as c, aK as u, bW as m, bX as g, f as l, bY as P, bZ as b, aq as S, b_ as d, b$ as p, a7 as C, V as h, c0 as f, c1 as A, c2 as T, X as E, I as D, bK as F, c3 as B, aE as M, aG as x, aD as H, aF as v, c4 as k, a9 as w, c5 as y, c6 as K, ad as N, c7 as O, c8 as U, c9 as _, aJ as q, ca as G, cb as I, cc as V, cd as W, a8 as J, a2 as R, g as X, ce as Y, cf as Z, cg as j, c as z, at as L, ch as $, ci as Q, cj as aa, ck as sa, a as ea, cl as ta, cm as oa, bi as ra, cn as na, an as ia, co as ca, cp as ua, F as ma, am as ga, K as la, cq as Pa, bh as ba, cr as Sa, cs as da, ct as pa, Z as Ca, cu as ha, cv as fa, r as Aa, cw as Ta, cx as Ea, O as Da, s as Fa, a0 as Ba, J as Ma, H as xa, cy as Ha, cz as va, G as ka, cA as wa, cB as ya, cC as Ka, cD as Na, n as Oa } from "./index-CMPf-3JZ.js";
3
+ import { Menu as _a, MenuButton as qa } from "@headlessui/react";
4
4
  export {
5
5
  t as ApiError,
6
- o as Avatar,
7
- r as Badge,
8
- n as BoardPage,
9
- i as Button,
10
- b as Callout,
11
- u as CommandPalette,
12
- m as ComparePage,
6
+ o as ArtifactsPage,
7
+ r as Avatar,
8
+ n as Badge,
9
+ i as BoardPage,
10
+ c as Button,
11
+ u as Callout,
12
+ m as CommandPalette,
13
+ g as ComparePage,
13
14
  l as CopyButton,
14
- g as DATE_BUCKETS,
15
- P as DecisionsPage,
15
+ P as DATE_BUCKETS,
16
+ b as DecisionsPage,
16
17
  S as Dialog,
17
- c as DialogHost,
18
- d as Disclosure,
19
- p as Drawer,
20
- C as EmptyState,
21
- h as EuropacoreClient,
18
+ d as DialogHost,
19
+ p as Disclosure,
20
+ C as Drawer,
21
+ h as EmptyState,
22
+ f as EuropacoreClient,
22
23
  A as FormField,
23
- E as FormSection,
24
- T as FullPageSpinner,
25
- f as IconButton,
26
- x as MarkdownContent,
27
- Na as Menu,
28
- Oa as MenuButton,
29
- B as MenuItem,
30
- D as MenuLabel,
31
- F as MenuPanel,
24
+ T as FormSection,
25
+ E as FullPageSpinner,
26
+ D as IconButton,
27
+ F as MarkdownContent,
28
+ B as MemoriesPage,
29
+ _a as Menu,
30
+ qa as MenuButton,
31
+ M as MenuItem,
32
+ x as MenuLabel,
33
+ H as MenuPanel,
32
34
  v as MenuSeparator,
33
- H as NO_FEATURES,
34
- M as NativeSelect,
35
- w as NewSessionDialog,
36
- k as OverviewPage,
37
- y as PageHeader,
38
- N as SectionHeading,
39
- O as SessionPage,
40
- I as SessionsPanel,
41
- U as Spinner,
42
- _ as TextAreaField,
43
- q as TextField,
44
- G as ThemeProvider,
45
- K as ToastProvider,
46
- R as WORKSPACE_AGENTS,
47
- z as agentClient,
48
- J as agentsState,
49
- L as boardPath,
50
- Q as bootstrapFeatures,
51
- W as chatExtensions,
52
- j as comparePath,
53
- V as configureSessionUi,
54
- $ as consumeSseStream,
55
- X as contextWindowOf,
56
- Y as controlChrome,
57
- Z as cx,
58
- aa as dateBucket,
59
- sa as decisionsPath,
60
- ea as describeError,
61
- ta as errorMessage,
62
- oa as formatCost,
63
- ra as formatDate,
64
- na as formatDateTime,
65
- ia as formatDuration,
66
- ba as formatTokens,
67
- ua as hub,
68
- ma as initialsFor,
69
- la as inputClass,
70
- ga as inputClassSm,
71
- Pa as loadAgents,
72
- Sa as newSessionPath,
73
- ca as registerChatExtensions,
74
- da as registerCommands,
75
- pa as relativeTime,
76
- Ca as requestNotificationPermission,
77
- ha as resetAgents,
78
- Aa as sessionPath,
79
- Ea as sessionUiHost,
80
- Ta as sessionsPath,
81
- fa as startableAgents,
35
+ k as NO_FEATURES,
36
+ w as NativeSelect,
37
+ y as NewSessionDialog,
38
+ K as OverviewPage,
39
+ N as PageHeader,
40
+ O as SectionHeading,
41
+ U as SessionPage,
42
+ _ as SessionsPanel,
43
+ q as Spinner,
44
+ G as TextAreaField,
45
+ I as TextField,
46
+ V as ThemeProvider,
47
+ W as ToastProvider,
48
+ J as WORKSPACE_AGENTS,
49
+ R as agentClient,
50
+ X as agentsState,
51
+ Y as artifactsPath,
52
+ Z as boardPath,
53
+ j as bootstrapFeatures,
54
+ z as chatExtensions,
55
+ L as comparePath,
56
+ $ as configureSessionUi,
57
+ Q as consumeSseStream,
58
+ aa as contextWindowOf,
59
+ sa as controlChrome,
60
+ ea as cx,
61
+ ta as dateBucket,
62
+ oa as decisionsPath,
63
+ ra as describeError,
64
+ na as errorMessage,
65
+ ia as formatCost,
66
+ ca as formatDate,
67
+ ua as formatDateTime,
68
+ ma as formatDuration,
69
+ ga as formatTokens,
70
+ la as hub,
71
+ Pa as initialsFor,
72
+ ba as inputClass,
73
+ Sa as inputClassSm,
74
+ da as loadAgents,
75
+ pa as memoriesPath,
76
+ Ca as newSessionPath,
77
+ ha as registerChatExtensions,
78
+ fa as registerCommands,
79
+ Aa as relativeTime,
80
+ Ta as requestNotificationPermission,
81
+ Ea as resetAgents,
82
+ Da as sessionPath,
83
+ Fa as sessionUiHost,
84
+ Ba as sessionsPath,
85
+ Ma as startableAgents,
82
86
  xa as useAgents,
83
- Ba as useAttention,
84
- Da as useHotkeys,
85
- Fa as useHubVersion,
86
- va as useMemoryCapture,
87
- Ha as usePaletteHotkey,
88
- Ma as useSessionPageHooks,
89
- wa as useTheme,
90
- ka as useToast
87
+ Ha as useAttention,
88
+ va as useHotkeys,
89
+ ka as useHubVersion,
90
+ wa as useMemoryCapture,
91
+ ya as usePaletteHotkey,
92
+ Ka as useSessionPageHooks,
93
+ Na as useTheme,
94
+ Oa as useToast
91
95
  };
@@ -10,3 +10,15 @@ export declare function comparePath(sessionId: string, group: string): string;
10
10
  export declare function boardPath(): string;
11
11
  /** The decision register. */
12
12
  export declare function decisionsPath(): string;
13
+ /** The artifacts page: `view` (table|stats), an artifact's `id`, a search `q`, the `session` it was opened from. */
14
+ export declare function artifactsPath(query?: {
15
+ view?: 'list' | 'table' | 'stats';
16
+ id?: string;
17
+ q?: string;
18
+ session?: string | null;
19
+ }): string;
20
+ /** The long-term memories page: `view` (context), and the `session` it was opened from. */
21
+ export declare function memoriesPath(query?: {
22
+ view?: 'browse' | 'context';
23
+ session?: string | null;
24
+ }): string;
@@ -0,0 +1,14 @@
1
+ /** A file to put in a ZIP: its path inside, with forward slashes, and its bytes. */
2
+ export interface ZipEntry {
3
+ path: string;
4
+ data: Uint8Array;
5
+ /** When it was last changed; now when absent. */
6
+ modified?: Date;
7
+ }
8
+ /** The CRC-32 a ZIP entry carries. */
9
+ export declare function crc32(data: Uint8Array): number;
10
+ /**
11
+ * The entries as a ZIP archive: each deflated when that makes it smaller, else stored, with UTF-8 names. Enough
12
+ * for an artifact's pages and assets; there is no ZIP64, so the whole must stay under 4 GiB.
13
+ */
14
+ export declare function zip(entries: ZipEntry[]): Promise<Uint8Array>;
@@ -1,20 +1,20 @@
1
1
  import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
2
  import { useState as C } from "react";
3
3
  import { Link as N } from "react-router";
4
- import { Hourglass as P, Columns3 as w, ChevronLeft as D, ChevronRight as S } from "lucide-react";
5
- import { u as A, L as B, C as m, H as v, c as E, aj as L, ak as j, al as z, am as R, an as q, ao as F, ap as x, aq as H, ar as I, as as K, at as O } from "./index-NjGO7Jg1.js";
4
+ import { Hourglass as P, Columns3 as w, ChevronLeft as D, ChevronRight as A } from "lucide-react";
5
+ import { u as S, L as B, C as m, Y as v, c as E, as as z, at as L, au as R, av as j, aw as q, ax as F, ay as x, az as I, aA as H, aB as K, aC as O } from "./index-CMPf-3JZ.js";
6
6
  function W(t) {
7
7
  return t.kind === "flow_input" && t.input_kind !== "form" && !t.quick_replies?.length;
8
8
  }
9
9
  function T(t) {
10
- return I(t) ?? K(t) ?? "waiting for your decision";
10
+ return H(t) ?? K(t) ?? "waiting for your decision";
11
11
  }
12
12
  function J(t) {
13
13
  const { pause: s, run: n } = t.store.state;
14
14
  return !!(s && !n && s.kind !== "fork_seed" && !s.kind.startsWith("temporal") && !W(s));
15
15
  }
16
16
  function ee({ controller: t, collisions: s }) {
17
- A(t, m.pause, m.run, m.session, m.reset, B.deferred);
17
+ S(t, m.pause, m.run, m.session, m.reset, B.deferred);
18
18
  const [n, d] = C(!1), { pause: e, pauses: i } = t.store.state;
19
19
  if (!e || !J(t)) return null;
20
20
  const f = t.agent, o = async (a) => {
@@ -59,21 +59,21 @@ function ee({ controller: t, collisions: s }) {
59
59
  }
60
60
  );
61
61
  else if (e.group)
62
- u = /* @__PURE__ */ l(L, { tone: "accent", icon: w, title: "Pick the variant to keep", impact: "Best of N", label: "Pick a variant", children: [
62
+ u = /* @__PURE__ */ l(z, { tone: "accent", icon: w, title: "Pick the variant to keep", impact: "Best of N", label: "Pick a variant", children: [
63
63
  /* @__PURE__ */ l("p", { className: "mt-2 text-[13px] text-muted", children: [
64
64
  "The variants of ",
65
65
  e.group,
66
66
  " are done. Compare their changes side by side, then pick one to merge."
67
67
  ] }),
68
68
  /* @__PURE__ */ l("div", { className: "mt-3 flex flex-wrap gap-2", children: [
69
- /* @__PURE__ */ r(N, { to: j(t.id, e.group), children: /* @__PURE__ */ r(v, { variant: "primary", size: "sm", icon: /* @__PURE__ */ r(w, { size: 14 }), children: "Compare variants" }) }),
69
+ /* @__PURE__ */ r(N, { to: L(t.id, e.group), children: /* @__PURE__ */ r(v, { variant: "primary", size: "sm", icon: /* @__PURE__ */ r(w, { size: 14 }), children: "Compare variants" }) }),
70
70
  /* @__PURE__ */ r(v, { variant: "ghost", size: "sm", className: "ml-auto", onClick: c, children: "Later" })
71
71
  ] })
72
72
  ] });
73
73
  else if (e.kind === "question" && e.questions?.length) {
74
74
  const a = t.questionDraft?.id === e.pending_tool_call_id ? t.questionDraft.answers : void 0;
75
75
  u = /* @__PURE__ */ r(
76
- z,
76
+ R,
77
77
  {
78
78
  pause: e,
79
79
  busy: n,
@@ -87,7 +87,7 @@ function ee({ controller: t, collisions: s }) {
87
87
  },
88
88
  e.pending_tool_call_id
89
89
  );
90
- } else if (R(e)) {
90
+ } else if (j(e)) {
91
91
  const a = t.permissionModes();
92
92
  u = /* @__PURE__ */ r(
93
93
  q,
@@ -122,7 +122,7 @@ function ee({ controller: t, collisions: s }) {
122
122
  else {
123
123
  const a = x(e), p = s?.notes(t) ?? [];
124
124
  u = /* @__PURE__ */ r(
125
- H,
125
+ I,
126
126
  {
127
127
  pause: e,
128
128
  busy: n,
@@ -155,23 +155,23 @@ function ee({ controller: t, collisions: s }) {
155
155
  ] }),
156
156
  /* @__PURE__ */ l("span", { className: "ml-auto flex items-center", children: [
157
157
  /* @__PURE__ */ r("button", { type: "button", "aria-label": "Previous wait", onClick: () => t.cyclePause(-1), className: "rounded p-1 hover:bg-surface-hover hover:text-ink", children: /* @__PURE__ */ r(D, { size: 15 }) }),
158
- /* @__PURE__ */ r("button", { type: "button", "aria-label": "Next wait", onClick: () => t.cyclePause(1), className: "rounded p-1 hover:bg-surface-hover hover:text-ink", children: /* @__PURE__ */ r(S, { size: 15 }) })
158
+ /* @__PURE__ */ r("button", { type: "button", "aria-label": "Next wait", onClick: () => t.cyclePause(1), className: "rounded p-1 hover:bg-surface-hover hover:text-ink", children: /* @__PURE__ */ r(A, { size: 15 }) })
159
159
  ] })
160
160
  ] }),
161
161
  u
162
162
  ] });
163
163
  }
164
164
  const M = (t) => t.charAt(0).toUpperCase() + t.slice(1), _ = "ecui.history", b = 2e3, Q = 100;
165
- function G() {
165
+ function Y() {
166
166
  try {
167
167
  return typeof localStorage > "u" ? null : localStorage;
168
168
  } catch {
169
169
  return null;
170
170
  }
171
171
  }
172
- class U {
172
+ class G {
173
173
  /** `storage` null keeps the history in memory only. */
174
- constructor(s = G()) {
174
+ constructor(s = Y()) {
175
175
  this.storage = s;
176
176
  }
177
177
  storage;
@@ -222,7 +222,7 @@ class U {
222
222
  return [...i, ...f];
223
223
  }
224
224
  }
225
- const te = new U();
225
+ const te = new G();
226
226
  export {
227
227
  ee as P,
228
228
  J as d,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markmo/europacore-session-ui",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "europacore session UI: sessions, the live transcript, approvals, workspaces, fleets, the board and the decision register, for any React app that reaches a europacore server.",
5
5
  "license": "MIT",
6
6
  "type": "module",