@consciousclouds/operator-shell 0.1.0 → 0.2.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 (93) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/README.md +80 -31
  3. package/dist/chief/ChiefDrawer.d.ts +34 -2
  4. package/dist/chief/ChiefDrawer.d.ts.map +1 -1
  5. package/dist/chief/ChiefDrawer.js +43 -30
  6. package/dist/chief/ChiefDrawer.js.map +1 -1
  7. package/dist/chief/ChiefHeaderBar.d.ts +19 -0
  8. package/dist/chief/ChiefHeaderBar.d.ts.map +1 -0
  9. package/dist/chief/ChiefHeaderBar.js +7 -0
  10. package/dist/chief/ChiefHeaderBar.js.map +1 -0
  11. package/dist/chief/ChiefMarkdown.d.ts +12 -0
  12. package/dist/chief/ChiefMarkdown.d.ts.map +1 -0
  13. package/dist/chief/ChiefMarkdown.js +95 -0
  14. package/dist/chief/ChiefMarkdown.js.map +1 -0
  15. package/dist/chief/ChiefPanel.d.ts +44 -1
  16. package/dist/chief/ChiefPanel.d.ts.map +1 -1
  17. package/dist/chief/ChiefPanel.js +79 -29
  18. package/dist/chief/ChiefPanel.js.map +1 -1
  19. package/dist/chief/ChiefRegion.d.ts +44 -1
  20. package/dist/chief/ChiefRegion.d.ts.map +1 -1
  21. package/dist/chief/ChiefRegion.js +63 -27
  22. package/dist/chief/ChiefRegion.js.map +1 -1
  23. package/dist/chief/ChiefSession.d.ts +46 -10
  24. package/dist/chief/ChiefSession.d.ts.map +1 -1
  25. package/dist/chief/ChiefSession.js +252 -6
  26. package/dist/chief/ChiefSession.js.map +1 -1
  27. package/dist/chief/ChiefTrigger.d.ts +26 -0
  28. package/dist/chief/ChiefTrigger.d.ts.map +1 -0
  29. package/dist/chief/ChiefTrigger.js +21 -0
  30. package/dist/chief/ChiefTrigger.js.map +1 -0
  31. package/dist/chief/conversation-adapter.d.ts +70 -0
  32. package/dist/chief/conversation-adapter.d.ts.map +1 -0
  33. package/dist/chief/conversation-adapter.js +26 -0
  34. package/dist/chief/conversation-adapter.js.map +1 -0
  35. package/dist/chief/conversation-identity.d.ts +48 -0
  36. package/dist/chief/conversation-identity.d.ts.map +1 -0
  37. package/dist/chief/conversation-identity.js +100 -0
  38. package/dist/chief/conversation-identity.js.map +1 -0
  39. package/dist/chief/personality-display.d.ts +56 -0
  40. package/dist/chief/personality-display.d.ts.map +1 -0
  41. package/dist/chief/personality-display.js +52 -0
  42. package/dist/chief/personality-display.js.map +1 -0
  43. package/dist/chief/turn-adapter.d.ts +45 -0
  44. package/dist/chief/turn-adapter.d.ts.map +1 -1
  45. package/dist/chief/use-chief-turn.d.ts +127 -14
  46. package/dist/chief/use-chief-turn.d.ts.map +1 -1
  47. package/dist/chief/use-chief-turn.js +284 -28
  48. package/dist/chief/use-chief-turn.js.map +1 -1
  49. package/dist/chief/use-controlled-open.d.ts +2 -0
  50. package/dist/chief/use-controlled-open.d.ts.map +1 -0
  51. package/dist/chief/use-controlled-open.js +27 -0
  52. package/dist/chief/use-controlled-open.js.map +1 -0
  53. package/dist/chief/use-smooth-stream.d.ts +8 -0
  54. package/dist/chief/use-smooth-stream.d.ts.map +1 -0
  55. package/dist/chief/use-smooth-stream.js +128 -0
  56. package/dist/chief/use-smooth-stream.js.map +1 -0
  57. package/dist/flavor/types.d.ts +36 -21
  58. package/dist/flavor/types.d.ts.map +1 -1
  59. package/dist/frame/ComposedWorkspace.d.ts +39 -0
  60. package/dist/frame/ComposedWorkspace.d.ts.map +1 -0
  61. package/dist/frame/ComposedWorkspace.js +94 -0
  62. package/dist/frame/ComposedWorkspace.js.map +1 -0
  63. package/dist/frame/OperatorShell.d.ts +115 -13
  64. package/dist/frame/OperatorShell.d.ts.map +1 -1
  65. package/dist/frame/OperatorShell.js +200 -12
  66. package/dist/frame/OperatorShell.js.map +1 -1
  67. package/dist/guard/permissions.d.ts +2 -2
  68. package/dist/guard/permissions.js +2 -2
  69. package/dist/header/OperatorHeader.d.ts +15 -2
  70. package/dist/header/OperatorHeader.d.ts.map +1 -1
  71. package/dist/header/OperatorHeader.js +3 -3
  72. package/dist/header/OperatorHeader.js.map +1 -1
  73. package/dist/icons/registry.d.ts +7 -1
  74. package/dist/icons/registry.d.ts.map +1 -1
  75. package/dist/icons/registry.js +31 -2
  76. package/dist/icons/registry.js.map +1 -1
  77. package/dist/index.d.ts +24 -11
  78. package/dist/index.d.ts.map +1 -1
  79. package/dist/index.js +43 -17
  80. package/dist/index.js.map +1 -1
  81. package/dist/sidebar/OperatorSidebar.d.ts +16 -1
  82. package/dist/sidebar/OperatorSidebar.d.ts.map +1 -1
  83. package/dist/sidebar/OperatorSidebar.js +13 -10
  84. package/dist/sidebar/OperatorSidebar.js.map +1 -1
  85. package/dist/workspace/FormWorkspace.d.ts +2 -3
  86. package/dist/workspace/FormWorkspace.d.ts.map +1 -1
  87. package/dist/workspace/FormWorkspace.js.map +1 -1
  88. package/dist/workspace/session-adapter.d.ts +95 -0
  89. package/dist/workspace/session-adapter.d.ts.map +1 -0
  90. package/dist/workspace/session-adapter.js +29 -0
  91. package/dist/workspace/session-adapter.js.map +1 -0
  92. package/package.json +10 -5
  93. package/styles/source.css +9 -0
@@ -15,9 +15,9 @@
15
15
  * declares it).
16
16
  */
17
17
  export interface OperatorFlavorProduct {
18
- /** Stable product/project id (e.g. `ccu-admin`). */
18
+ /** Stable product/project id (e.g. `acme-admin`). */
19
19
  id: string;
20
- /** Display name (e.g. `CCU Admin`). */
20
+ /** Display name (e.g. `Acme Admin`). */
21
21
  name: string;
22
22
  /** Small over-line label (e.g. `Project Zero`). */
23
23
  label?: string;
@@ -91,16 +91,21 @@ export interface OperatorCommandGroup {
91
91
  */
92
92
  export interface OperatorFlavorChief {
93
93
  /**
94
- * Where the AI Region mounts (defaults to `rail`). `rail`: the always-open
95
- * inflow right rail below the xl breakpoint (where the rail is hidden)
96
- * the shell falls back to the drawer so Chief stays reachable. `drawer`:
97
- * the same content behind the sheet primitive + a floating trigger, with
98
- * assistant-surface's open/close lifecycle. Placement moves the panel and
99
- * NOTHING else turn flow, TurnAdapter seam, and the routed-directive
100
- * guard are identical in every placement.
94
+ * @deprecated Layout philosophy is a COMPOSITION concern, not Flavor
95
+ * decorationdeclare it through `OperatorShellProps.chrome.chiefBehavior`
96
+ * instead (`push` | `overlay` | `rail`). Honored as a legacy hint only
97
+ * when the chrome config declares nothing: `rail` maps to the `rail`
98
+ * behavior (the always-visible mode), `drawer` maps to `overlay`. Whatever
99
+ * moves the panel, behavior is IDENTICAL in every placement — turn flow,
100
+ * TurnAdapter seam, and the routed-directive guard never fork.
101
101
  */
102
102
  placement?: "rail" | "drawer";
103
- /** Panel display title (defaults to `Chief`). */
103
+ /**
104
+ * Panel display title (defaults to `Chief`). Superseded by
105
+ * `OperatorShellProps.personalityDisplay.displayName` when the product
106
+ * provides one (the Factory personality-record seam) — precedence:
107
+ * `personalityDisplay.displayName` > `flavor.chief.title` > `Chief`.
108
+ */
104
109
  title?: string;
105
110
  /** Idle hint shown before the first turn (plain text — no JSX). */
106
111
  hint?: string;
@@ -108,6 +113,13 @@ export interface OperatorFlavorChief {
108
113
  hintExample?: string;
109
114
  /** Input placeholder (defaults to `Ask {title}…`). */
110
115
  placeholder?: string;
116
+ /**
117
+ * Suggestion chips for the empty state — inert prompt STRINGS
118
+ * (Declarative-Flavor law: plain text, no functions, no JSX). Clicking a
119
+ * chip submits its text as the prompt through the SAME turn flow as the
120
+ * composer — a suggestion is a canned question, never a new behavior.
121
+ */
122
+ suggestions?: string[];
111
123
  /**
112
124
  * Inert personality REFERENCE the product's TurnAdapter may read. Never an
113
125
  * endpoint, never a credential, never authority.
@@ -121,16 +133,16 @@ export interface OperatorFlavorChief {
121
133
  * law) — no URL, no credentials, no transport; the product's runtime maps a
122
134
  * workspace id to whatever it means.
123
135
  *
124
- * TYPED SEAM, INERT TODAY — GATED ON BACKEND PRE-1 (do not "activate" this
125
- * from the frontend): per-(project, environment) enrollment keying
126
- * (docs/design/ccu-control-plane.md §8) is the prerequisite for a second
127
- * workspace existing at all. Until PRE-1 lands, declaring entries here
136
+ * TYPED SEAM, INERT TODAY — GATED ON THE BACKEND (do not "activate" this
137
+ * from the frontend): per-(project, environment) enrollment keying in the
138
+ * platform's control plane is the prerequisite for a second
139
+ * workspace existing at all. Until that lands, declaring entries here
128
140
  * changes nothing and the shell renders NO switcher — the static `product`
129
141
  * block in the sidebar stays the whole context chrome. A missing switcher
130
142
  * beats a fake one.
131
143
  */
132
144
  export interface OperatorFlavorWorkspace {
133
- /** Stable workspace/project id (e.g. `ccu-admin`). */
145
+ /** Stable workspace/project id (e.g. `acme-admin`). */
134
146
  id: string;
135
147
  /** Display name. */
136
148
  name: string;
@@ -153,12 +165,15 @@ export interface OperatorFlavorInspector {
153
165
  * on this operator surface and how it is arranged, resolved by the shell.
154
166
  */
155
167
  export interface OperatorFlavor {
156
- /** Unique flavor id (e.g. `ccu-admin`). One Flavor per surface. */
168
+ /** Unique flavor id (e.g. `acme-admin`). One Flavor per surface. */
157
169
  id: string;
158
170
  /** Brand REFERENCE resolved by the Brand Platform — never an inline brand blob. */
159
171
  brandId: string;
160
- /** The product/project context block. */
161
- product: OperatorFlavorProduct;
172
+ /** The product/project context block shown at the top of the sidebar (label ·
173
+ * name · note, with a bottom divider). OPTIONAL — omit it and the sidebar
174
+ * renders no header and no divider (a cleaner nav when the brand already
175
+ * identifies the console in the header). */
176
+ product?: OperatorFlavorProduct;
162
177
  /** Groups → items; the shell's nav engine renders it. */
163
178
  nav: OperatorNavGroup[];
164
179
  /** Route string for the default surface. */
@@ -178,11 +193,11 @@ export interface OperatorFlavor {
178
193
  */
179
194
  inspector?: OperatorFlavorInspector;
180
195
  /**
181
- * Workspace-switcher REFERENCES (typed seam, INERT until backend PRE-1 —
182
- * see OperatorFlavorWorkspace for the gate). The shell ships the slot
196
+ * Workspace-switcher REFERENCES (typed seam, INERT today see
197
+ * OperatorFlavorWorkspace for the gate). The shell ships the slot
183
198
  * (OperatorShellProps.workspaceSwitcher); the product will one day inject
184
199
  * the switcher component that interprets these refs. Today: declare
185
- * nothing (CCU declares nothing), render nothing.
200
+ * nothing, render nothing.
186
201
  */
187
202
  workspaces?: OperatorFlavorWorkspace[];
188
203
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/flavor/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,oDAAoD;IACpD,EAAE,EAAE,MAAM,CAAC;IACX,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,gFAAgF;AAChF,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,2CAA2C;AAC3C,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,eAAe,EAAE,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,mFAAmF;IACnF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC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BAAuB,CAAC;IACpC;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,uBAAuB,EAAE,CAAC;CACxC"}
@@ -0,0 +1,39 @@
1
+ import type { ComponentMap } from "@consciousclouds/canvas-runtime";
2
+ import type { CanvasDefinition } from "@consciousclouds/canvas-sdk";
3
+ import type { ComposedMeta } from "../chief/use-chief-turn.js";
4
+ import type { KeptComposition, SessionAdapter } from "../workspace/session-adapter.js";
5
+ export interface ComposedWorkspaceProps {
6
+ /** The transient canvas Chief composed this turn. */
7
+ canvas: CanvasDefinition;
8
+ /** The product-injected node→component binding (typically canvas-ui's defaultComponentMap). */
9
+ componentMap: ComponentMap;
10
+ /** Return the center to the product's default page (the human's dismiss gesture — hides the view only). */
11
+ onDismiss: () => void;
12
+ /**
13
+ * The composition's provenance (from the binder) — the source state a keep
14
+ * persists. Absent (legacy caller) ⇒ the keep affordance cannot render.
15
+ */
16
+ meta?: ComposedMeta;
17
+ /**
18
+ * The product's Workspace Session wire (the TurnAdapter idiom: the shell owns
19
+ * the gesture, the product owns the wire). ABSENT ⇒ no keep affordance renders
20
+ * — products never implement "Keep"; they only inject transport.
21
+ */
22
+ sessionAdapter?: SessionAdapter;
23
+ /**
24
+ * The canvas arrived by REOPENING a kept composition (slice 5): mount already
25
+ * in the kept state under this identity — the naming gesture already happened.
26
+ */
27
+ kept?: {
28
+ workspaceId: string;
29
+ name: string;
30
+ };
31
+ /**
32
+ * Called after a successful keep (alongside the kept state) — the shell's
33
+ * Workspace-Sessions region refreshes so the new row appears.
34
+ */
35
+ onKept?: (kept: KeptComposition) => void;
36
+ className?: string;
37
+ }
38
+ export declare function ComposedWorkspace({ canvas, componentMap, onDismiss, meta, sessionAdapter, kept, onKept, className, }: ComposedWorkspaceProps): import("react/jsx-runtime").JSX.Element;
39
+ //# sourceMappingURL=ComposedWorkspace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComposedWorkspace.d.ts","sourceRoot":"","sources":["../../src/frame/ComposedWorkspace.tsx"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAGpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAG/D,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAcvF,MAAM,WAAW,sBAAsB;IACrC,qDAAqD;IACrD,MAAM,EAAE,gBAAgB,CAAC;IACzB,+FAA+F;IAC/F,YAAY,EAAE,YAAY,CAAC;IAC3B,2GAA2G;IAC3G,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB;;;OAGG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB;;;;OAIG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC;;;OAGG;IACH,IAAI,CAAC,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,YAAY,EACZ,SAAS,EACT,IAAI,EACJ,cAAc,EACd,IAAI,EACJ,MAAM,EACN,SAAS,GACV,EAAE,sBAAsB,2CAuGxB"}
@@ -0,0 +1,94 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ /**
4
+ * ComposedWorkspace — the CENTER mount for a workspace Chief composed this turn.
5
+ * The shell-owned half of the compose→center binder (M2 precondition 1): when a
6
+ * Chief turn emits a transient CanvasDefinition (surfaced by useChiefTurn through
7
+ * the ONE ai-client canvas-result parser), OperatorShell mounts it HERE, in the
8
+ * main region, superseding the product's default page until dismissed.
9
+ *
10
+ * It renders through the SAME platform path every workspace uses — WorkspaceHost
11
+ * (typeId="canvas") → canvas-runtime CanvasRenderer — never a bespoke renderer and
12
+ * never inside the Chief panel. The shell owns the STATE, the PLACEMENT, and the
13
+ * dismiss (the defining "a conversation owns a workspace" behavior), so every
14
+ * operator surface inherits compose→center rather than re-implementing it. The
15
+ * concrete componentMap is injected by the product — typically the shared
16
+ * @consciousclouds/canvas-ui `defaultComponentMap` (M2 precondition 2), which a
17
+ * product adopts as-is and overrides per node type. The shell owns the seam, not
18
+ * the pixels.
19
+ *
20
+ * KEEP COMPOSITION (Workspace Session v1, slice 4) — the first HUMAN lifecycle
21
+ * act in the Canvas OS: everything before this is AI-composed and transient; the
22
+ * naming gesture is the human saying "keep this", and naming is the human's
23
+ * gesture, never the composer's (the autonomy boundary). The SHELL owns the
24
+ * gesture; the product owns only the wire (the injected SessionAdapter — the
25
+ * TurnAdapter idiom). No adapter → the affordance does not render (fail-closed
26
+ * slot). What is kept is SOURCE STATE (the composition's provenance), never the
27
+ * rendered canvas — the platform re-projects a fresh render on open. Vocabulary:
28
+ * the WORKSPACE survives (and will later hold multiple compositions); the
29
+ * COMPOSITION is what becomes durable — hence "Keep composition".
30
+ *
31
+ * REOPENED-KEPT (Workspace Session v1, slice 5): a canvas that arrived by
32
+ * reopening a kept composition (the `kept` prop) mounts already in the kept
33
+ * state — its name shown, no naming form — because the human already made the
34
+ * naming gesture when it was kept. The canvas itself is a FRESH re-projection
35
+ * (the adapter's open re-derived it), never persisted pixels.
36
+ */
37
+ import * as React from "react";
38
+ import { Button, Input, cn } from "@consciousclouds/ui";
39
+ import { canvasWorkspaceType } from "../workspace/CanvasWorkspace.js";
40
+ import { createWorkspaceRegistry } from "../workspace/registry.js";
41
+ import { WorkspaceHost } from "../workspace/WorkspaceHost.js";
42
+ // A composed workspace only ever hosts a canvas — a minimal, module-const registry
43
+ // with just the canvas type (deterministic, no product input, built once).
44
+ const COMPOSED_REGISTRY = createWorkspaceRegistry([canvasWorkspaceType]);
45
+ export function ComposedWorkspace({ canvas, componentMap, onDismiss, meta, sessionAdapter, kept, onKept, className, }) {
46
+ const [name, setName] = React.useState(kept?.name ?? "");
47
+ const [keep, setKeep] = React.useState(() => kept
48
+ ? { phase: "kept", kept: { workspaceId: kept.workspaceId, revision: 0 } }
49
+ : { phase: "idle" });
50
+ // A new composition resets the gesture — a keep belongs to ONE composed canvas.
51
+ // A REOPENED composition (the `kept` prop) instead mounts already kept: the
52
+ // naming gesture happened when it was kept, so the label — not the form — shows.
53
+ React.useEffect(() => {
54
+ setKeep(kept
55
+ ? { phase: "kept", kept: { workspaceId: kept.workspaceId, revision: 0 } }
56
+ : { phase: "idle" });
57
+ setName(kept?.name ?? "");
58
+ // eslint-disable-next-line react-hooks/exhaustive-deps
59
+ }, [canvas, kept?.workspaceId]);
60
+ async function keepComposition(e) {
61
+ e.preventDefault();
62
+ if (!sessionAdapter || !meta)
63
+ return;
64
+ const trimmed = name.trim();
65
+ if (!trimmed || keep.phase === "keeping")
66
+ return;
67
+ setKeep({ phase: "keeping" });
68
+ try {
69
+ const result = await sessionAdapter.keepComposition({
70
+ name: trimmed,
71
+ conversationId: meta.conversationId,
72
+ source: {
73
+ composer: meta.composer,
74
+ intent: meta.intent,
75
+ tool: meta.composer,
76
+ // The workspace ANCHOR: the canonical conductor turn that composed it.
77
+ ...(meta.turnId ? { turnId: meta.turnId } : {}),
78
+ },
79
+ });
80
+ setKeep({ phase: "kept", kept: result });
81
+ // The sidebar's Workspace-Sessions region learns the new row.
82
+ onKept?.(result);
83
+ }
84
+ catch (err) {
85
+ // Fail VISIBLY — a keep that silently vanished would be worse than none.
86
+ setKeep({ phase: "error", message: err instanceof Error ? err.message : String(err) });
87
+ }
88
+ }
89
+ const canKeep = Boolean(sessionAdapter && meta);
90
+ return (_jsxs("div", { className: cn("flex h-full min-h-0 flex-col gap-3", className), children: [_jsxs("div", { className: "flex flex-wrap items-center justify-between gap-2", children: [_jsx("span", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: "Composed by Chief" }), _jsxs("div", { className: "flex items-center gap-2", children: [canKeep && keep.phase !== "kept" && (
91
+ // The naming gesture — the human's "keep this". Disabled while in flight.
92
+ _jsxs("form", { onSubmit: keepComposition, className: "flex items-center gap-2", children: [_jsx(Input, { value: name, onChange: (e) => setName(e.target.value), placeholder: "Name this composition\u2026", "aria-label": "Composition name", className: "h-8 w-52", disabled: keep.phase === "keeping" }), _jsx(Button, { type: "submit", size: "sm", variant: "secondary", disabled: keep.phase === "keeping" || name.trim() === "", children: keep.phase === "keeping" ? "Keeping…" : "Keep composition" })] })), keep.phase === "kept" && (_jsxs("span", { className: "text-xs text-muted-foreground", "data-kept-workspace": keep.kept.workspaceId, children: ["Kept \u2713 ", name.trim()] })), _jsx(Button, { variant: "ghost", size: "sm", onClick: onDismiss, children: "Dismiss" })] })] }), keep.phase === "error" && (_jsxs("p", { role: "alert", className: "text-xs text-destructive", children: ["Keep failed: ", keep.message] })), _jsx("div", { className: "min-h-0 flex-1", children: _jsx(WorkspaceHost, { registry: COMPOSED_REGISTRY, typeId: "canvas", title: "Workspace", input: { definition: canvas, componentMap } }) })] }));
93
+ }
94
+ //# sourceMappingURL=ComposedWorkspace.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComposedWorkspace.js","sourceRoot":"","sources":["../../src/frame/ComposedWorkspace.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,qBAAqB,CAAC;AAGxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,mFAAmF;AACnF,2EAA2E;AAC3E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AAE,GAC3C,GACE,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -1,10 +1,19 @@
1
1
  /**
2
2
  * OperatorShell — the operator-console frame (the one experience abstraction
3
- * of an operator surface): full-width header, icon-collapsible sidebar, main
4
- * content, and the AI Region (Chief — rail or drawer, resolved from
5
- * flavor.chief.placement). Composed from the open shadcn
6
- * registry's sidebar patterns (sidebar-16's header-above-sidebar geometry,
7
- * sidebar-07's icon-collapsible rail) over @consciousclouds/ui primitives.
3
+ * of an operator surface): full-width header, icon-collapsible sidebar, the
4
+ * workspace (framed or edge-to-edge), and the AI Region (Chief — push,
5
+ * overlay, or rail).
6
+ *
7
+ * The neutral FRAME (the sidebar/inset layout skeleton — sidebar-16's
8
+ * header-above-sidebar geometry, sidebar-07's icon-collapsible rail — plus the
9
+ * assistant-panel placement mechanics, the main-region reflow, and the
10
+ * workspace chrome) is now delegated to @consciousclouds/shell-primitive's
11
+ * ShellFrame (mechanism). This shell owns the MEANING: the operator header +
12
+ * sidebar + command palette, the permission/inspector context, and Chief as
13
+ * the assistant slot (the primitive knows nothing of Chief). Chief's OPTIONALITY
14
+ * lives at the primitive level — ShellFrame's assistant slot is optional, which
15
+ * is what the future Business / Consumer shells frame around; an operator
16
+ * surface always has Chief, so `turnAdapter` stays required here.
8
17
  *
9
18
  * The shell owns the experience; the product injects meaning:
10
19
  * - `flavor` — the declarative surface manifest (nav, product context,
@@ -16,21 +25,60 @@
16
25
  * - `inspectorViews` — the detail views for the Flavor's declared
17
26
  * inspector entity-kind references (the shell owns the
18
27
  * panel; the product owns the views),
19
- * - `icons` / `profile` — vocabulary and identity slot fillings.
28
+ * - `icons` / `profile` — vocabulary and identity slot fillings,
29
+ * - `personalityDisplay` — Chief display identity from the Factory
30
+ * personality record (D-Q2 seam: displayName literal;
31
+ * icon/accent as REFERENCES resolved through the icon
32
+ * registry and the Token System),
33
+ * - `chrome` — layout philosophy (DEFAULTS-AND-OVERRIDES: the SDK ships
34
+ * sensible defaults — push Chief + framed workspace — and
35
+ * the consuming app overrides at its composition root; a
36
+ * composition concern, deliberately NOT Flavor data).
20
37
  *
21
- * The frame owns the command palette's open state so the header's search
22
- * button and the ⌘K keybinding open the one shell-owned instance.
38
+ * The frame owns the command palette's open state (the header search button
39
+ * and ⌘K open the one instance) and the Chief panel's open state (the header
40
+ * ChiefTrigger, ⌘J, Esc, outside-click, and the scrim all drive the SAME
41
+ * value — one open state, whoever moves it).
23
42
  *
24
43
  * Brand and theme arrive from the layers below (BrandProvider /
25
44
  * ThemeProvider mounted by the app) — the shell only reads them.
26
45
  */
27
46
  import * as React from "react";
47
+ import type { ComponentMap } from "@consciousclouds/canvas-runtime";
48
+ import type { SessionAdapter } from "../workspace/session-adapter.js";
49
+ import { type ChiefBehavior } from "../chief/ChiefRegion.js";
50
+ import { type PersonalityDisplay } from "../chief/personality-display.js";
51
+ import type { ConversationAdapter } from "../chief/conversation-adapter.js";
28
52
  import type { TurnAdapter } from "../chief/turn-adapter.js";
29
53
  import type { OperatorFlavor } from "../flavor/types.js";
30
54
  import type { PermissionResolver } from "../guard/permissions.js";
31
55
  import type { IconRegistry } from "../icons/registry.js";
32
56
  import type { InspectorViewRegistry } from "../inspector/types.js";
33
57
  import type { SearchSource } from "../palette/search-sources.js";
58
+ /**
59
+ * The shell's chrome config — LAYOUT PHILOSOPHY, a composition/environment
60
+ * concern (deliberately a prop, never Flavor data): the SDK provides
61
+ * sensible defaults; the consuming app overrides layout characteristics at
62
+ * its composition root — no forking.
63
+ */
64
+ export interface OperatorShellChrome {
65
+ /**
66
+ * How the AI Region mounts (default `push`): `push` = the responsive
67
+ * hybrid — overlay drawer below lg, in-flow push panel (the workspace
68
+ * visibly reflows) at lg+, closed by default; `overlay` = the floating
69
+ * drawer at every width; `rail` = the always-visible inflow rail at xl+
70
+ * (the previous default posture, for apps that want it).
71
+ */
72
+ chiefBehavior?: ChiefBehavior;
73
+ /** Chief panel width in px (default 420). */
74
+ chiefWidth?: number;
75
+ /**
76
+ * The main region's chrome (default `framed`): `framed` = the workspace
77
+ * renders inside a rounded floating container (breathing room; a sibling
78
+ * card beside the Chief panel); `edge-to-edge` = the flat layout.
79
+ */
80
+ workspaceChrome?: "framed" | "edge-to-edge";
81
+ }
34
82
  export interface OperatorShellProps {
35
83
  /** The surface's declarative manifest (inert data — see flavor/types.ts). */
36
84
  flavor: OperatorFlavor;
@@ -72,20 +120,74 @@ export interface OperatorShellProps {
72
120
  icons?: IconRegistry;
73
121
  /** Product-injected profile dropdown; a neutral operator menu by default. */
74
122
  profile?: React.ReactNode;
123
+ /**
124
+ * Product-injected notifications affordance for the header (bell button,
125
+ * unread badge, dropdown — the product's notification model). A SLOT: the
126
+ * shell ships no notification source, so absent ⇒ nothing renders (a
127
+ * missing affordance beats a fake one).
128
+ */
129
+ notifications?: React.ReactNode;
75
130
  /** Header search-button copy (the button opens the ⌘K palette). */
76
131
  searchPlaceholder?: string;
77
132
  /**
78
- * Workspace-switcher SLOTtyped seam, INERT until backend PRE-1
79
- * (per-(project, environment) enrollment keying,
80
- * docs/design/ccu-control-plane.md §8: the prerequisite for a second
81
- * workspace existing at all). When PRE-1 lands, the product injects a
133
+ * Chief display identity the Factory personality-record seam (D-Q2):
134
+ * after the personality split, the product resolves its current
135
+ * personality record and feeds `{displayName, iconRef, accentRef}` here.
136
+ * `displayName` is literal and beats `flavor.chief.title`; `iconRef` /
137
+ * `accentRef` are REFERENCES (icon-registry name / token role name)
138
+ * resolved through the shell's registries — never raw assets or hex
139
+ * values (Brand stays the single owner of appearance). Absent ⇒ the
140
+ * Flavor's decoration (then `Chief`) stands.
141
+ */
142
+ personalityDisplay?: PersonalityDisplay;
143
+ /**
144
+ * Layout philosophy (defaults-and-overrides — see OperatorShellChrome):
145
+ * Chief behavior/width + workspace chrome. A composition concern, so it
146
+ * lives here, not in the Flavor.
147
+ */
148
+ chrome?: OperatorShellChrome;
149
+ /**
150
+ * Workspace-switcher SLOT — typed seam, INERT until the platform's control
151
+ * plane keys enrollment per (project, environment): the prerequisite for a
152
+ * second workspace existing at all. When that lands, the product injects a
82
153
  * switcher here that interprets the Flavor's `workspaces` references
83
154
  * (same injection pattern as icons / the resolver / inspectorViews).
84
155
  * Until then products pass nothing, the shell renders nothing, and the
85
156
  * sidebar's static product block stays the whole context chrome.
86
157
  */
87
158
  workspaceSwitcher?: React.ReactNode;
159
+ /**
160
+ * The compose→center seam (M2 precondition 1): the product-injected node→component
161
+ * binding used to paint a workspace Chief composes. When a Chief turn emits a
162
+ * transient CanvasDefinition, the SHELL (not the product page) mounts it in the
163
+ * CENTER through WorkspaceHost/CanvasRenderer, superseding `children` until
164
+ * dismissed — the "a conversation owns a workspace" behavior, inherited by every
165
+ * operator surface. Absent ⇒ the shell captures nothing to paint with and never
166
+ * morphs (fail-closed); it is INERT until a compose tool emits a canvas — the seam
167
+ * lights up when the compose_workspace tool lands. Products typically inject the
168
+ * shared @consciousclouds/canvas-ui `defaultComponentMap` (M2 precondition 2),
169
+ * adopting it as-is and overriding per node type; the shell stays UI-neutral.
170
+ */
171
+ canvasComponentMap?: ComponentMap;
172
+ /**
173
+ * The product's Workspace Session wire (Workspace Session v1, slices 4 + 5) —
174
+ * the TurnAdapter idiom: the SHELL owns the Keep-composition gesture, the
175
+ * composed-workspace handle, the Workspace-Sessions sidebar region, and the
176
+ * hard-refresh restore; the product owns ONLY the transport (its BFF →
177
+ * Operator Gateway). Absent ⇒ none of it renders (fail-closed slot); products
178
+ * never implement "Keep" or "Reopen". Opening a kept composition RE-PROJECTS
179
+ * a fresh render through the adapter (the deterministic composer read) —
180
+ * restore is meaning re-derived, never persisted pixels.
181
+ */
182
+ sessionAdapter?: SessionAdapter;
183
+ /**
184
+ * The conversation TRANSCRIPT transport (Session Binder consumption slice) —
185
+ * the read dual of `turnAdapter`, forwarded to the AI Region. With it, the
186
+ * drawer gains the Conversations tab and the thread hydrates from the
187
+ * durable transcript on restore/adoption. Fail-closed: absent ⇒ live-only.
188
+ */
189
+ conversationAdapter?: ConversationAdapter;
88
190
  children: React.ReactNode;
89
191
  }
90
- export declare function OperatorShell({ flavor, turnAdapter, resolvePermission, runCommand, inspectorViews, searchSources, icons, profile, searchPlaceholder, workspaceSwitcher, children, }: OperatorShellProps): import("react/jsx-runtime").JSX.Element;
192
+ export declare function OperatorShell({ flavor, turnAdapter, resolvePermission, runCommand, inspectorViews, searchSources, icons, profile, notifications, searchPlaceholder, personalityDisplay, chrome, workspaceSwitcher, canvasComponentMap, sessionAdapter, conversationAdapter, children, }: OperatorShellProps): import("react/jsx-runtime").JSX.Element;
91
193
  //# sourceMappingURL=OperatorShell.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OperatorShell.d.ts","sourceRoot":"","sources":["../../src/frame/OperatorShell.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAGlE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAGjE,MAAM,WAAW,kBAAkB;IACjC,6EAA6E;IAC7E,MAAM,EAAE,cAAc,CAAC;IACvB,wFAAwF;IACxF,WAAW,EAAE,WAAW,CAAC;IACzB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;IACvC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C;;;;;OAKG;IACH,cAAc,CAAC,EAAE,qBAAqB,CAAC;IACvC;;;;;;;;;O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