@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.
- package/CHANGELOG.md +66 -0
- package/README.md +80 -31
- package/dist/chief/ChiefDrawer.d.ts +34 -2
- package/dist/chief/ChiefDrawer.d.ts.map +1 -1
- package/dist/chief/ChiefDrawer.js +43 -30
- package/dist/chief/ChiefDrawer.js.map +1 -1
- package/dist/chief/ChiefHeaderBar.d.ts +19 -0
- package/dist/chief/ChiefHeaderBar.d.ts.map +1 -0
- package/dist/chief/ChiefHeaderBar.js +7 -0
- package/dist/chief/ChiefHeaderBar.js.map +1 -0
- package/dist/chief/ChiefMarkdown.d.ts +12 -0
- package/dist/chief/ChiefMarkdown.d.ts.map +1 -0
- package/dist/chief/ChiefMarkdown.js +95 -0
- package/dist/chief/ChiefMarkdown.js.map +1 -0
- package/dist/chief/ChiefPanel.d.ts +44 -1
- package/dist/chief/ChiefPanel.d.ts.map +1 -1
- package/dist/chief/ChiefPanel.js +79 -29
- package/dist/chief/ChiefPanel.js.map +1 -1
- package/dist/chief/ChiefRegion.d.ts +44 -1
- package/dist/chief/ChiefRegion.d.ts.map +1 -1
- package/dist/chief/ChiefRegion.js +63 -27
- package/dist/chief/ChiefRegion.js.map +1 -1
- package/dist/chief/ChiefSession.d.ts +46 -10
- package/dist/chief/ChiefSession.d.ts.map +1 -1
- package/dist/chief/ChiefSession.js +252 -6
- package/dist/chief/ChiefSession.js.map +1 -1
- package/dist/chief/ChiefTrigger.d.ts +26 -0
- package/dist/chief/ChiefTrigger.d.ts.map +1 -0
- package/dist/chief/ChiefTrigger.js +21 -0
- package/dist/chief/ChiefTrigger.js.map +1 -0
- package/dist/chief/conversation-adapter.d.ts +70 -0
- package/dist/chief/conversation-adapter.d.ts.map +1 -0
- package/dist/chief/conversation-adapter.js +26 -0
- package/dist/chief/conversation-adapter.js.map +1 -0
- package/dist/chief/conversation-identity.d.ts +48 -0
- package/dist/chief/conversation-identity.d.ts.map +1 -0
- package/dist/chief/conversation-identity.js +100 -0
- package/dist/chief/conversation-identity.js.map +1 -0
- package/dist/chief/personality-display.d.ts +56 -0
- package/dist/chief/personality-display.d.ts.map +1 -0
- package/dist/chief/personality-display.js +52 -0
- package/dist/chief/personality-display.js.map +1 -0
- package/dist/chief/turn-adapter.d.ts +45 -0
- package/dist/chief/turn-adapter.d.ts.map +1 -1
- package/dist/chief/use-chief-turn.d.ts +127 -14
- package/dist/chief/use-chief-turn.d.ts.map +1 -1
- package/dist/chief/use-chief-turn.js +284 -28
- package/dist/chief/use-chief-turn.js.map +1 -1
- package/dist/chief/use-controlled-open.d.ts +2 -0
- package/dist/chief/use-controlled-open.d.ts.map +1 -0
- package/dist/chief/use-controlled-open.js +27 -0
- package/dist/chief/use-controlled-open.js.map +1 -0
- package/dist/chief/use-smooth-stream.d.ts +8 -0
- package/dist/chief/use-smooth-stream.d.ts.map +1 -0
- package/dist/chief/use-smooth-stream.js +128 -0
- package/dist/chief/use-smooth-stream.js.map +1 -0
- package/dist/flavor/types.d.ts +36 -21
- package/dist/flavor/types.d.ts.map +1 -1
- package/dist/frame/ComposedWorkspace.d.ts +39 -0
- package/dist/frame/ComposedWorkspace.d.ts.map +1 -0
- package/dist/frame/ComposedWorkspace.js +94 -0
- package/dist/frame/ComposedWorkspace.js.map +1 -0
- package/dist/frame/OperatorShell.d.ts +115 -13
- package/dist/frame/OperatorShell.d.ts.map +1 -1
- package/dist/frame/OperatorShell.js +200 -12
- package/dist/frame/OperatorShell.js.map +1 -1
- package/dist/guard/permissions.d.ts +2 -2
- package/dist/guard/permissions.js +2 -2
- package/dist/header/OperatorHeader.d.ts +15 -2
- package/dist/header/OperatorHeader.d.ts.map +1 -1
- package/dist/header/OperatorHeader.js +3 -3
- package/dist/header/OperatorHeader.js.map +1 -1
- package/dist/icons/registry.d.ts +7 -1
- package/dist/icons/registry.d.ts.map +1 -1
- package/dist/icons/registry.js +31 -2
- package/dist/icons/registry.js.map +1 -1
- package/dist/index.d.ts +24 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +43 -17
- package/dist/index.js.map +1 -1
- package/dist/sidebar/OperatorSidebar.d.ts +16 -1
- package/dist/sidebar/OperatorSidebar.d.ts.map +1 -1
- package/dist/sidebar/OperatorSidebar.js +13 -10
- package/dist/sidebar/OperatorSidebar.js.map +1 -1
- package/dist/workspace/FormWorkspace.d.ts +2 -3
- package/dist/workspace/FormWorkspace.d.ts.map +1 -1
- package/dist/workspace/FormWorkspace.js.map +1 -1
- package/dist/workspace/session-adapter.d.ts +95 -0
- package/dist/workspace/session-adapter.d.ts.map +1 -0
- package/dist/workspace/session-adapter.js +29 -0
- package/dist/workspace/session-adapter.js.map +1 -0
- package/package.json +10 -5
- package/styles/source.css +9 -0
package/dist/index.js
CHANGED
|
@@ -13,8 +13,15 @@
|
|
|
13
13
|
* permission resolver. See docs/design/operator-platform-contracts.md and
|
|
14
14
|
* docs/design/frontend-platform-doctrine.md.
|
|
15
15
|
*/
|
|
16
|
-
// The frame
|
|
16
|
+
// The frame. `chrome` is the layout-philosophy config (DEFAULTS-AND-
|
|
17
|
+
// OVERRIDES: sensible defaults — push Chief + framed workspace — overridable
|
|
18
|
+
// at the consuming app's composition root; a composition concern,
|
|
19
|
+
// deliberately NOT Flavor data). `personalityDisplay` is the D-Q2 seam (see
|
|
20
|
+
// the Chief exports below).
|
|
17
21
|
export { OperatorShell } from "./frame/OperatorShell.js";
|
|
22
|
+
// The compose→center binder's center mount (M2 precondition 1) — the shell-owned
|
|
23
|
+
// surface that paints a workspace Chief composed, through WorkspaceHost/CanvasRenderer.
|
|
24
|
+
export { ComposedWorkspace } from "./frame/ComposedWorkspace.js";
|
|
18
25
|
// Header chrome (exported for composition; the frame mounts them by default)
|
|
19
26
|
export { OperatorHeader } from "./header/OperatorHeader.js";
|
|
20
27
|
export { OperatorProfileMenu } from "./header/OperatorProfileMenu.js";
|
|
@@ -62,22 +69,41 @@ export { useSearchResults } from "./palette/use-search-results.js";
|
|
|
62
69
|
// the views (`inspectorViews` shell prop), pages open it via `useInspector`.
|
|
63
70
|
// Undeclared or view-less kinds fail closed — no panel, no crash
|
|
64
71
|
// (resolveInspectorView is the pure, provable gate).
|
|
65
|
-
export { InspectorProvider, useInspector } from "./inspector/InspectorProvider.js";
|
|
72
|
+
export { InspectorProvider, useInspector, } from "./inspector/InspectorProvider.js";
|
|
66
73
|
export { resolveInspectorView } from "./inspector/types.js";
|
|
67
|
-
// The AI Region — Chief's home in the shell. ChiefRegion resolves
|
|
68
|
-
// `flavor.chief.placement`
|
|
69
|
-
//
|
|
70
|
-
//
|
|
71
|
-
//
|
|
72
|
-
//
|
|
73
|
-
//
|
|
74
|
-
//
|
|
75
|
-
//
|
|
76
|
-
|
|
74
|
+
// The AI Region — Chief's home in the shell. ChiefRegion resolves a layout
|
|
75
|
+
// BEHAVIOR (the chrome config; the legacy `flavor.chief.placement` is
|
|
76
|
+
// honored as a hint — resolveChiefBehavior is the pure rule) to a
|
|
77
|
+
// presentation; EVERY behavior runs the identical turn flow (useChiefTurn
|
|
78
|
+
// over the injected TurnAdapter — P1-1 — with the conductor event
|
|
79
|
+
// vocabulary and the routed-directive guard) and renders the identical body
|
|
80
|
+
// (ChiefSession: hint card + suggestion chips from inert
|
|
81
|
+
// `flavor.chief.suggestions`, streamed MARKDOWN answers — sanitized, no raw
|
|
82
|
+
// HTML — the color-coded metadata bar, and the pill composer).
|
|
83
|
+
// - push (default): the responsive hybrid — overlay drawer below lg,
|
|
84
|
+
// in-flow push panel (w-0 → w-(--chief-width), the workspace reflows)
|
|
85
|
+
// at lg+; closed by default, summoned by the header ChiefTrigger or ⌘J;
|
|
86
|
+
// dismissible (Esc + outside-click + scrim), non-modal, composer
|
|
87
|
+
// focused on open, focus returned to the trigger on close.
|
|
88
|
+
// - overlay: the floating drawer at every width.
|
|
89
|
+
// - rail: the always-visible inflow rail at xl+ (the overlay below it).
|
|
90
|
+
// PersonalityDisplay is the D-Q2 display-identity seam (the Factory
|
|
91
|
+
// personality record will feed it): displayName literal (precedence:
|
|
92
|
+
// personalityDisplay.displayName > flavor.chief.title > "Chief" —
|
|
93
|
+
// resolveChiefTitle is the pure rule); icon/accent as REFERENCES
|
|
94
|
+
// (icon-registry name / token role name), resolved fail-closed — never raw
|
|
95
|
+
// assets or hex values.
|
|
96
|
+
export { ChiefRegion, resolveChiefBehavior } from "./chief/ChiefRegion.js";
|
|
77
97
|
export { ChiefPanel } from "./chief/ChiefPanel.js";
|
|
78
98
|
export { ChiefDrawer } from "./chief/ChiefDrawer.js";
|
|
79
99
|
export { ChiefSession } from "./chief/ChiefSession.js";
|
|
100
|
+
export { ChiefTrigger } from "./chief/ChiefTrigger.js";
|
|
101
|
+
export { ChiefMarkdown } from "./chief/ChiefMarkdown.js";
|
|
102
|
+
export { resolveChiefTitle, resolvePersonalityAccent, resolvePersonalityIcon, } from "./chief/personality-display.js";
|
|
80
103
|
export { useChiefTurn } from "./chief/use-chief-turn.js";
|
|
104
|
+
// Conversation identity (Session Binder slice 2a) — the shell's mint-or-adopt
|
|
105
|
+
// seam, exported so a product adapter/BFF can read (never invent) the active id.
|
|
106
|
+
export { adoptConversationId, conversationStorageKey, getOrMintConversationId, subscribeConversationId, } from "./chief/conversation-identity.js";
|
|
81
107
|
// Chief invocation parity — the shell-owned Chief keybinding (⌘J / Ctrl+J),
|
|
82
108
|
// the AI Region's ⌘K twin: rail focuses the composer, drawer (declared or the
|
|
83
109
|
// below-xl fallback) toggles through assistant-surface's open/close
|
|
@@ -89,14 +115,14 @@ export { directiveToHref } from "./chief/directive.js";
|
|
|
89
115
|
// Workspace Framework — the main-region seam (frame-free subtree; a typed
|
|
90
116
|
// workspace-type contract + immutable registry + host that fails closed on
|
|
91
117
|
// unknown types). The nine V1 type ids are declared in WORKSPACE_TYPE_IDS.
|
|
92
|
-
export { WorkspaceHost, WorkspaceUnavailable } from "./workspace/WorkspaceHost.js";
|
|
118
|
+
export { WorkspaceHost, WorkspaceUnavailable, } from "./workspace/WorkspaceHost.js";
|
|
93
119
|
export { createWorkspaceRegistry } from "./workspace/registry.js";
|
|
94
120
|
export { WORKSPACE_TYPE_IDS, isWorkspaceTypeId } from "./workspace/types.js";
|
|
95
121
|
// Canvas workspace type — the first-class canvas workspace: hosting state
|
|
96
122
|
// machine (error → loading → empty → ready) over the published
|
|
97
123
|
// @consciousclouds/canvas-runtime CanvasRenderer (consumed, never rebuilt);
|
|
98
124
|
// the product injects the ComponentMap + loading/error/empty slot content.
|
|
99
|
-
export { CanvasWorkspace, canvasWorkspaceType } from "./workspace/CanvasWorkspace.js";
|
|
125
|
+
export { CanvasWorkspace, canvasWorkspaceType, } from "./workspace/CanvasWorkspace.js";
|
|
100
126
|
// Dashboard workspace type — stat/overview widget-slot composition of the
|
|
101
127
|
// graduated workspace components (StatCard grid + titled ReactNode widget
|
|
102
128
|
// sections); same fail-closed state machine, every value product-supplied.
|
|
@@ -104,16 +130,16 @@ export { DashboardWorkspace, dashboardWorkspaceType, } from "./workspace/Dashboa
|
|
|
104
130
|
// Table workspace type — tabular exploration hosting the graduated
|
|
105
131
|
// InteractiveDataTable composite (sorting · pagination · loading · empty),
|
|
106
132
|
// with a fail-closed error state layered above it.
|
|
107
|
-
export { TableWorkspace, tableWorkspaceType } from "./workspace/TableWorkspace.js";
|
|
133
|
+
export { TableWorkspace, tableWorkspaceType, } from "./workspace/TableWorkspace.js";
|
|
108
134
|
// Form workspace type — structured input over the presentational forms set
|
|
109
135
|
// (Field vocabulary); controls, validation judgment, and submission
|
|
110
|
-
// transport stay product-owned. Ships as mechanism
|
|
136
|
+
// transport stay product-owned. Ships as mechanism, meaning-free.
|
|
111
137
|
export { FormWorkspace, formWorkspaceType } from "./workspace/FormWorkspace.js";
|
|
112
138
|
// Graph workspace type — entity-relationship exploration over a typed
|
|
113
139
|
// nodes/edges contract, rendered as adjacency-style traversal composed from
|
|
114
140
|
// registry primitives (no visualization dependency — react-flow/d3 sit
|
|
115
141
|
// outside the license allowlist). Dangling edge endpoints fail closed.
|
|
116
|
-
export { GraphWorkspace, graphWorkspaceType } from "./workspace/GraphWorkspace.js";
|
|
142
|
+
export { GraphWorkspace, graphWorkspaceType, } from "./workspace/GraphWorkspace.js";
|
|
117
143
|
// Permission-guard seam (§5) — the shell owns the fail-closed gating
|
|
118
144
|
// BEHAVIOR (loading / denied / redirect states), the product injects the
|
|
119
145
|
// RESOLUTION (sync or async: `PermissionResolver` may return a
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,qEAAqE;AACrE,6EAA6E;AAC7E,kEAAkE;AAClE,4EAA4E;AAC5E,4BAA4B;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAMzD,iFAAiF;AACjF,wFAAwF;AACxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAoBjE,6EAA6E;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,0DAA0D;AAC1D,0EAA0E;AAC1E,8EAA8E;AAC9E,0EAA0E;AAC1E,qEAAqE;AACrE,uEAAuE;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAGtE,uBAAuB;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,eAAe,EACf,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAGzB,4EAA4E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B,MAAM,mCAAmC,CAAC;AAQ3C,mEAAmE;AACnE,2EAA2E;AAC3E,mDAAmD;AACnD,OAAO,EACL,cAAc,EACd,kBAAkB,GACnB,MAAM,+BAA+B,CAAC;AAMvC,2EAA2E;AAC3E,oEAAoE;AACpE,kEAAkE;AAClE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAQhF,sEAAsE;AACtE,4EAA4E;AAC5E,uEAAuE;AACvE,uEAAuE;AACvE,OAAO,EACL,cAAc,EACd,kBAAkB,GACnB,MAAM,+BAA+B,CAAC;AAUvC,qEAAqE;AACrE,yEAAyE;AACzE,+DAA+D;AAC/D,0EAA0E;AAC1E,0EAA0E;AAC1E,2EAA2E;AAC3E,6EAA6E;AAC7E,6EAA6E;AAC7E,+BAA+B;AAC/B,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,UAAU,EACV,WAAW,EACX,YAAY,EACZ,kBAAkB,GACnB,MAAM,wBAAwB,CAAC;AAQhC,OAAO,EACL,kBAAkB,EAClB,aAAa,EACb,sBAAsB,GACvB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -39,6 +39,21 @@ export interface OperatorSidebarProps {
|
|
|
39
39
|
* static product block below stays the whole context chrome.
|
|
40
40
|
*/
|
|
41
41
|
workspaceSwitcher?: React.ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* The shell-owned Workspace-Sessions region (Workspace Session v1, slice 5 —
|
|
44
|
+
* Canvas OS: the sidebar becomes resumable sessions): the kept compositions
|
|
45
|
+
* the injected SessionAdapter lists, each row reopening a fresh re-projected
|
|
46
|
+
* render via `onOpen`. Fed by the frame from the adapter — absent adapter or
|
|
47
|
+
* empty list ⇒ nothing renders (fail-closed slot, like the switcher above).
|
|
48
|
+
*/
|
|
49
|
+
workspaceSessions?: {
|
|
50
|
+
items: ReadonlyArray<{
|
|
51
|
+
workspaceId: string;
|
|
52
|
+
name: string;
|
|
53
|
+
}>;
|
|
54
|
+
activeId?: string;
|
|
55
|
+
onOpen: (workspaceId: string) => void;
|
|
56
|
+
};
|
|
42
57
|
}
|
|
43
|
-
export declare function OperatorSidebar({ flavor, resolvePermission, icons, iconFamily, workspaceSwitcher, }: OperatorSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
export declare function OperatorSidebar({ flavor, resolvePermission, icons, iconFamily, workspaceSwitcher, workspaceSessions, }: OperatorSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
44
59
|
//# sourceMappingURL=OperatorSidebar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperatorSidebar.d.ts","sourceRoot":"","sources":["../../src/sidebar/OperatorSidebar.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAkBpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAGlE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAIzD,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,cAAc,CAAC;IACvB,uFAAuF;IACvF,iBAAiB,EAAE,kBAAkB,CAAC;IACtC,2DAA2D;IAC3D,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"OperatorSidebar.d.ts","sourceRoot":"","sources":["../../src/sidebar/OperatorSidebar.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAkBpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAGlE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAIzD,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,cAAc,CAAC;IACvB,uFAAuF;IACvF,iBAAiB,EAAE,kBAAkB,CAAC;IACtC,2DAA2D;IAC3D,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACpC;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE;QAClB,KAAK,EAAE,aAAa,CAAC;YAAE,WAAW,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QAC5D,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;KACvC,CAAC;CACH;AAED,wBAAgB,eAAe,CAAC,EAC9B,MAAM,EACN,iBAAiB,EACjB,KAAK,EACL,UAAU,EACV,iBAAiB,EACjB,iBAAiB,GAClB,EAAE,oBAAoB,2CAiHtB"}
|
|
@@ -7,9 +7,12 @@ import { collectPermissionRefs } from "../guard/permissions.js";
|
|
|
7
7
|
import { usePermissionDecisions } from "../guard/PermissionProvider.js";
|
|
8
8
|
import { resolveIcon } from "../icons/registry.js";
|
|
9
9
|
import { deriveGatedNavGroups, isNavItemActive } from "../nav/routes.js";
|
|
10
|
-
export function OperatorSidebar({ flavor, resolvePermission, icons, iconFamily, workspaceSwitcher, }) {
|
|
10
|
+
export function OperatorSidebar({ flavor, resolvePermission, icons, iconFamily, workspaceSwitcher, workspaceSessions, }) {
|
|
11
11
|
const pathname = usePathname();
|
|
12
12
|
const { product } = flavor;
|
|
13
|
+
// Every session row wears the same registry icon (icons are cosmetic; the
|
|
14
|
+
// built-in "layers" reads as a kept composition — same resolution path as nav).
|
|
15
|
+
const SessionIcon = resolveIcon("layers", icons, iconFamily);
|
|
13
16
|
// One batch resolution for the whole tree — each reference resolved once,
|
|
14
17
|
// sync decisions on the first render, async ones settling from `loading`.
|
|
15
18
|
const permissionRefs = collectPermissionRefs(flavor.nav.flatMap((group) => group.items));
|
|
@@ -17,14 +20,14 @@ export function OperatorSidebar({ flavor, resolvePermission, icons, iconFamily,
|
|
|
17
20
|
// The pure derivation (nav/routes.ts): denied items don't exist, loading
|
|
18
21
|
// items keep a slot, emptied groups vanish.
|
|
19
22
|
const groups = deriveGatedNavGroups(flavor.nav, decisions);
|
|
20
|
-
return (_jsxs(Sidebar, { collapsible: "icon", className: "top-(--header-height) h-[calc(100svh-var(--header-height))]!", children: [_jsxs(SidebarHeader, { className: "border-b border-sidebar-border px-4 py-3 group-data-[collapsible=icon]:hidden", children: [workspaceSwitcher, product
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
return (_jsxs(Sidebar, { collapsible: "icon", className: "top-(--header-height) h-[calc(100svh-var(--header-height))]!", children: [(product || workspaceSwitcher) && (_jsxs(SidebarHeader, { className: "border-b border-sidebar-border px-4 py-3 group-data-[collapsible=icon]:hidden", children: [workspaceSwitcher, product?.label && (_jsx("div", { className: "text-[10px] font-semibold tracking-wider text-primary uppercase", children: product.label })), product && (_jsx("div", { className: "truncate text-sm font-semibold text-sidebar-foreground", children: product.name })), product?.note && (_jsx("div", { className: "text-[11px] leading-snug text-muted-foreground", children: product.note }))] })), _jsxs(SidebarContent, { children: [groups.map(({ group, items }) => (_jsxs(SidebarGroup, { children: [_jsx(SidebarGroupLabel, { children: group.label }), _jsx(SidebarGroupContent, { children: _jsx(SidebarMenu, { children: items.map(({ item, status }) => {
|
|
24
|
+
if (status === "loading") {
|
|
25
|
+
// The decision is in flight: hold the slot, never flash
|
|
26
|
+
// a destination the resolver may take away.
|
|
27
|
+
return (_jsx(SidebarMenuItem, { "data-slot": "nav-permission-loading", children: _jsx(SidebarMenuSkeleton, { showIcon: true }) }, item.id));
|
|
28
|
+
}
|
|
29
|
+
const Icon = resolveIcon(item.icon, icons, iconFamily);
|
|
30
|
+
return (_jsx(SidebarMenuItem, { children: _jsx(SidebarMenuButton, { asChild: true, isActive: isNavItemActive(item.href, pathname), tooltip: item.label, children: _jsxs(Link, { href: item.href, children: [_jsx(Icon, {}), _jsx("span", { children: item.label })] }) }) }, item.id));
|
|
31
|
+
}) }) })] }, group.id))), workspaceSessions && workspaceSessions.items.length > 0 && (_jsxs(SidebarGroup, { children: [_jsx(SidebarGroupLabel, { children: "Workspaces" }), _jsx(SidebarGroupContent, { children: _jsx(SidebarMenu, { children: workspaceSessions.items.map((session) => (_jsx(SidebarMenuItem, { children: _jsxs(SidebarMenuButton, { isActive: session.workspaceId === workspaceSessions.activeId, tooltip: session.name, onClick: () => workspaceSessions.onOpen(session.workspaceId), children: [_jsx(SessionIcon, {}), _jsx("span", { children: session.name })] }) }, session.workspaceId))) }) })] }))] }), _jsx(SidebarRail, {})] }));
|
|
29
32
|
}
|
|
30
33
|
//# sourceMappingURL=OperatorSidebar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OperatorSidebar.js","sourceRoot":"","sources":["../../src/sidebar/OperatorSidebar.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAsBb,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EACL,OAAO,EACP,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,WAAW,GACZ,MAAM,qBAAqB,CAAC;AA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(`onSubmit` is a seam; the product owns the wire).
|
|
16
16
|
*
|
|
17
|
-
* Ships as mechanism:
|
|
18
|
-
*
|
|
19
|
-
* registered, fail-closed, and ready for the first real write surface.
|
|
17
|
+
* Ships as mechanism: registered, fail-closed, and ready for a product's
|
|
18
|
+
* first real write surface (a read-only console simply never mounts it).
|
|
20
19
|
*
|
|
21
20
|
* Frame-free by design (Separation Law): imports only React and the UI
|
|
22
21
|
* primitives — never the shell frame.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormWorkspace.d.ts","sourceRoot":"","sources":["../../src/workspace/FormWorkspace.tsx"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"FormWorkspace.d.ts","sourceRoot":"","sources":["../../src/workspace/FormWorkspace.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAepC,OAAO,KAAK,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEzE,qFAAqF;AACrF,MAAM,WAAW,kBAAkB;IACjC,gCAAgC;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B;;;;OAIG;IACH,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,2EAA2E;IAC3E,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,GAAG,YAAY,CAAC;CACxD;AAED,wEAAwE;AACxE,MAAM,WAAW,oBAAoB;IACnC,kCAAkC;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,gCAAgC;IAChC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,MAAM,EAAE,kBAAkB,EAAE,CAAC;CAC9B;AAED,8EAA8E;AAC9E,MAAM,WAAW,kBAAkB;IACjC,4DAA4D;IAC5D,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,gEAAgE;IAChE,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IAC7C,sDAAsD;IACtD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+BAA+B;IAC/B,QAAQ,EAAE,oBAAoB,EAAE,CAAC;IACjC;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;IAC7D,kEAAkE;IAClE,KAAK,CAAC,EAAE,kBAAkB,CAAC;CAC5B;AAcD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,GACN,EAAE,uBAAuB,CAAC,kBAAkB,CAAC,2CAwE7C;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,aAAa,CAAC,kBAAkB,CAM/D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormWorkspace.js","sourceRoot":"","sources":["../../src/workspace/FormWorkspace.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;
|
|
1
|
+
{"version":3,"file":"FormWorkspace.js","sourceRoot":"","sources":["../../src/workspace/FormWorkspace.tsx"],"names":[],"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ACZ,CAAC,EACD,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,KAAC,KAAK,IAAC,WAAW,EAAC,YAAY,YAAE,OAAO,GAAS,CAAC,CAAC,CAAC,IAAI,IAChE,GACR,CACR,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAsC;IAClE,EAAE,EAAE,MAAM;IACV,WAAW,EAAE,MAAM;IACnB,WAAW,EACT,kKAAkK;IACpK,SAAS,EAAE,aAAa;CACzB,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SessionAdapter — the Workspace Session transport seam (Workspace Session v1,
|
|
3
|
+
* slices 4 + 5).
|
|
4
|
+
*
|
|
5
|
+
* THE SHELL OWNS THE GESTURE; THE PRODUCT OWNS THE WIRE — the same injection
|
|
6
|
+
* contract as TurnAdapter (P1-1). The shell ships the "Keep composition" gesture
|
|
7
|
+
* (the human-intent moment the Canvas OS autonomy boundary requires: naming is the
|
|
8
|
+
* human's gesture, never the composer's), the composed-workspace handle, and the
|
|
9
|
+
* reopen/restore behavior (the Workspace-Sessions region); it does NOT ship
|
|
10
|
+
* transport. The product implements and injects this adapter; its BFF route,
|
|
11
|
+
* gateway URL, and credentials posture stay in the product.
|
|
12
|
+
*
|
|
13
|
+
* The keep payload is SOURCE STATE ONLY — the composition's provenance (which
|
|
14
|
+
* composer, which intent, which turn), never the rendered CanvasDefinition. The
|
|
15
|
+
* platform persists source state and re-projects a fresh render on open (the
|
|
16
|
+
* render-vs-record split); a product adapter that ships render output will be
|
|
17
|
+
* rejected server-side.
|
|
18
|
+
*
|
|
19
|
+
* RESTORE IS MEANING, NOT PIXELS (slice 5): `openComposition` re-derives the
|
|
20
|
+
* render — the adapter's wire re-invokes the composer named by the stored intent
|
|
21
|
+
* (the deterministic composer read) and returns a FRESH CanvasDefinition. Nothing
|
|
22
|
+
* ever reads a persisted render back, because none exists.
|
|
23
|
+
*
|
|
24
|
+
* Vocabulary (Canvas OS §4.5): the WORKSPACE survives and will later hold multiple
|
|
25
|
+
* compositions; the COMPOSITION is what becomes durable here. Hence keepComposition,
|
|
26
|
+
* not "save workspace".
|
|
27
|
+
*/
|
|
28
|
+
import type { CanvasDefinition } from "@consciousclouds/canvas-sdk";
|
|
29
|
+
/** The provenance of a composed canvas — WHERE the composition came from. */
|
|
30
|
+
export interface CompositionSource {
|
|
31
|
+
/** The composer that produced it (the tool name, e.g. `compose_workspace`). */
|
|
32
|
+
composer: string;
|
|
33
|
+
/** The composition intent key (the emitter's correlation id, e.g. `factory`). */
|
|
34
|
+
intent: string;
|
|
35
|
+
/** The turn that composed it, when known. */
|
|
36
|
+
turnId?: string;
|
|
37
|
+
/** The tool call that carried it, when distinct from `composer`. */
|
|
38
|
+
tool?: string;
|
|
39
|
+
}
|
|
40
|
+
/** What the shell hands the adapter when the human keeps a composition. */
|
|
41
|
+
export interface KeepCompositionRequest {
|
|
42
|
+
/** The human's name for the kept composition — the naming gesture itself. */
|
|
43
|
+
name: string;
|
|
44
|
+
/** The conversation that owns the workspace (shell-minted correlation id). */
|
|
45
|
+
conversationId: string;
|
|
46
|
+
/** Source state only — never a rendered CanvasDefinition. */
|
|
47
|
+
source: CompositionSource;
|
|
48
|
+
}
|
|
49
|
+
/** The durable result: the platform-minted workspace identity. */
|
|
50
|
+
export interface KeptComposition {
|
|
51
|
+
/** The workspace id minted by the platform (canvas-service record id). */
|
|
52
|
+
workspaceId: string;
|
|
53
|
+
/** The record's revision (0 on first keep; bumps when the same conversation re-keeps). */
|
|
54
|
+
revision: number;
|
|
55
|
+
}
|
|
56
|
+
/** A kept composition, listed for the Workspace-Sessions region. */
|
|
57
|
+
export interface KeptCompositionSummary {
|
|
58
|
+
workspaceId: string;
|
|
59
|
+
name: string;
|
|
60
|
+
/** ISO timestamp for recency ordering, when the wire provides it. */
|
|
61
|
+
updatedAt?: string;
|
|
62
|
+
/**
|
|
63
|
+
* The conversation that owns this workspace ("a conversation owns a
|
|
64
|
+
* workspace", Canvas OS §4), when the record carries it. Lets the shell's
|
|
65
|
+
* hard-refresh restore prefer a workspace of the ACTIVE conversation, so the
|
|
66
|
+
* restored center and the continuing thread stay one coherent pair.
|
|
67
|
+
*/
|
|
68
|
+
conversationId?: string;
|
|
69
|
+
}
|
|
70
|
+
/** A kept composition, reopened: its source state + a FRESH re-projected render. */
|
|
71
|
+
export interface OpenedComposition {
|
|
72
|
+
workspaceId: string;
|
|
73
|
+
name: string;
|
|
74
|
+
conversationId?: string;
|
|
75
|
+
source: CompositionSource;
|
|
76
|
+
/** Re-projected by the adapter's wire (the deterministic composer read) — never stored pixels. */
|
|
77
|
+
canvas: CanvasDefinition;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* The injected transport seam. In words: the human keeps a composition → the
|
|
81
|
+
* product's wire persists its source state through the Operator Plane → the
|
|
82
|
+
* durable workspace identity comes back. Rejection = the keep failed (the shell
|
|
83
|
+
* surfaces it visibly; it never fails silently).
|
|
84
|
+
*
|
|
85
|
+
* The read half (slice 5): `listCompositions` feeds the shell's Workspace-Sessions
|
|
86
|
+
* region (recency-ordered); `openComposition` reopens one — the wire re-invokes
|
|
87
|
+
* the composer named by the stored intent and returns a fresh render alongside
|
|
88
|
+
* the source state (restore = meaning re-derived, never persisted pixels).
|
|
89
|
+
*/
|
|
90
|
+
export interface SessionAdapter {
|
|
91
|
+
keepComposition(request: KeepCompositionRequest): Promise<KeptComposition>;
|
|
92
|
+
listCompositions(): Promise<KeptCompositionSummary[]>;
|
|
93
|
+
openComposition(workspaceId: string): Promise<OpenedComposition>;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=session-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-adapter.d.ts","sourceRoot":"","sources":["../../src/workspace/session-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,gBAAgB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MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;CAClE"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SessionAdapter — the Workspace Session transport seam (Workspace Session v1,
|
|
3
|
+
* slices 4 + 5).
|
|
4
|
+
*
|
|
5
|
+
* THE SHELL OWNS THE GESTURE; THE PRODUCT OWNS THE WIRE — the same injection
|
|
6
|
+
* contract as TurnAdapter (P1-1). The shell ships the "Keep composition" gesture
|
|
7
|
+
* (the human-intent moment the Canvas OS autonomy boundary requires: naming is the
|
|
8
|
+
* human's gesture, never the composer's), the composed-workspace handle, and the
|
|
9
|
+
* reopen/restore behavior (the Workspace-Sessions region); it does NOT ship
|
|
10
|
+
* transport. The product implements and injects this adapter; its BFF route,
|
|
11
|
+
* gateway URL, and credentials posture stay in the product.
|
|
12
|
+
*
|
|
13
|
+
* The keep payload is SOURCE STATE ONLY — the composition's provenance (which
|
|
14
|
+
* composer, which intent, which turn), never the rendered CanvasDefinition. The
|
|
15
|
+
* platform persists source state and re-projects a fresh render on open (the
|
|
16
|
+
* render-vs-record split); a product adapter that ships render output will be
|
|
17
|
+
* rejected server-side.
|
|
18
|
+
*
|
|
19
|
+
* RESTORE IS MEANING, NOT PIXELS (slice 5): `openComposition` re-derives the
|
|
20
|
+
* render — the adapter's wire re-invokes the composer named by the stored intent
|
|
21
|
+
* (the deterministic composer read) and returns a FRESH CanvasDefinition. Nothing
|
|
22
|
+
* ever reads a persisted render back, because none exists.
|
|
23
|
+
*
|
|
24
|
+
* Vocabulary (Canvas OS §4.5): the WORKSPACE survives and will later hold multiple
|
|
25
|
+
* compositions; the COMPOSITION is what becomes durable here. Hence keepComposition,
|
|
26
|
+
* not "save workspace".
|
|
27
|
+
*/
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=session-adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-adapter.js","sourceRoot":"","sources":["../../src/workspace/session-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@consciousclouds/operator-shell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "ConsciousClouds Operator Shell — the operator-console shell archetype: frame, header, sidebar, nav engine, icon registry, OperatorFlavor types, permission-guard slot, and the Chief region (panel chrome over assistant-surface; transport injected via TurnAdapter — the product owns the wire). Layer 4 of the Frontend Platform.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -28,15 +28,20 @@
|
|
|
28
28
|
"prepublishOnly": "bun run clean && bun run build && bun run type-check"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@consciousclouds/
|
|
31
|
+
"@consciousclouds/ai-client": "0.1.0",
|
|
32
|
+
"@consciousclouds/assistant-surface": "^0.2.1",
|
|
32
33
|
"@consciousclouds/brand": "0.1.0",
|
|
33
|
-
"@consciousclouds/canvas-runtime": "0.2.
|
|
34
|
-
"@consciousclouds/canvas-sdk": "0.2.
|
|
34
|
+
"@consciousclouds/canvas-runtime": "^0.2.1",
|
|
35
|
+
"@consciousclouds/canvas-sdk": "^0.2.1",
|
|
35
36
|
"@consciousclouds/conductor-react": "0.1.0",
|
|
36
37
|
"@consciousclouds/conductor-sdk": "0.1.0",
|
|
37
38
|
"@consciousclouds/frontend-runtime": "0.2.0",
|
|
39
|
+
"@consciousclouds/shell-primitive": "0.1.0",
|
|
38
40
|
"@consciousclouds/ui": "0.1.0",
|
|
39
|
-
"lucide-react": "^1.7.0"
|
|
41
|
+
"lucide-react": "^1.7.0",
|
|
42
|
+
"motion": "^12.38.0",
|
|
43
|
+
"react-markdown": "^10.1.0",
|
|
44
|
+
"remark-gfm": "^4.0.1"
|
|
40
45
|
},
|
|
41
46
|
"peerDependencies": {
|
|
42
47
|
"@consciousclouds/tokens": "0.1.0",
|
package/styles/source.css
CHANGED
|
@@ -11,6 +11,15 @@
|
|
|
11
11
|
*
|
|
12
12
|
* The path is relative to THIS file, so it resolves inside the installed
|
|
13
13
|
* package regardless of where the consuming app lives.
|
|
14
|
+
*
|
|
15
|
+
* NOTE: the frame now delegates its layout skeleton + reflow to
|
|
16
|
+
* @consciousclouds/shell-primitive. A nested cross-package CSS `@import` here
|
|
17
|
+
* does NOT resolve under Turbopack, so the consuming app registers the
|
|
18
|
+
* shell-primitive source DIRECTLY in its own Tailwind entry (the established
|
|
19
|
+
* pattern — the app already imports tokens/ui/operator-shell the same way):
|
|
20
|
+
*
|
|
21
|
+
* @import "@consciousclouds/shell-primitive/styles/source.css";
|
|
22
|
+
* @import "@consciousclouds/operator-shell/styles/source.css";
|
|
14
23
|
*/
|
|
15
24
|
|
|
16
25
|
@source "../dist";
|