@konitif/workbench-runtime 0.284.1 → 0.284.2

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/LICENSE.md CHANGED
File without changes
package/README.md CHANGED
@@ -1,60 +1,63 @@
1
1
  # @konitif/workbench-runtime
2
2
 
3
- Public runtime orchestration for a KONITIF Workbench. It connects Workbench contracts to reactive application state without owning product semantics.
3
+ Reactive Svelte host adapter for assembling public KONITIF Workbench contracts
4
+ with explicit runtime ports.
4
5
 
5
- Products compose this runtime and provide their own tools, widgets, persistence adapters and policies.
6
+ ## Installation
6
7
 
7
- ## Autonomous distribution
8
+ ```sh
9
+ npm install @konitif/workbench-runtime
10
+ ```
11
+
12
+ ## What it provides
13
+
14
+ - Reactive Workbench stores and shell actions.
15
+ - Workspace history and synchronization controllers.
16
+ - Explicit ports for persistence, host events and detached windows.
17
+ - A runtime assembly entry that selects no browser providers by default.
8
18
 
9
- Run `npm run build`, `npm test` and `npm run verify:package` from this
10
- repository. The build emits ESM and declarations into `dist`; the verifier
11
- packs that compiled allowlist, checks its exact contents and consumes both
12
- public entries outside the source tree. No lifecycle script performs an
13
- installation or publication.
19
+ ## Authority boundary
14
20
 
15
- The package depends on the published Workbench authority rather than a workspace
16
- locator. Only the archive retained by the release verifier may be published.
21
+ This package adapts Workbench authorities; it does not redefine workspace
22
+ semantics or own product tools, widgets, Viewers or policies. Supplied providers
23
+ remain owned by their hosts. Runtime disposal removes subscriptions but does not
24
+ implicitly flush persistence or close shared native resources.
17
25
 
18
- ## Explicit runtime entry
26
+ ## Quick start
19
27
 
20
28
  ```ts
21
- import {
22
- createWorkbenchStoreRuntime,
23
- type CreateWorkbenchStoreRuntimeOptions,
24
- } from '@konitif/workbench-runtime/runtime';
25
- ```
29
+ import { createWorkbenchStore } from '@konitif/workbench-runtime';
26
30
 
27
- This entry requires all six host ports: `workspacePersistence`,
28
- `shellPersistence`, `focusPersistence`, `workspaceSync`, `hostEvents` and
29
- `detachedWindows`. Only the last two accept `null`, explicitly disabling those
30
- capabilities. Missing ports are rejected before providers are read.
31
+ const emptyCatalog = { getDefinition: () => undefined };
32
+ const runtime = createWorkbenchStore({
33
+ initialToolId: 'home',
34
+ persistenceKey: 'example-workbench',
35
+ toolCatalog: emptyCatalog,
36
+ shellWidgetCatalog: emptyCatalog,
37
+ });
31
38
 
32
- Port types are exported from the same entry. Workspace contracts remain owned
33
- by `@konitif/workbench/workspace-contracts`. The runtime owns its subscriptions,
34
- not the supplied shared providers; call `flushPersistence()` before `dispose()`
35
- if pending state must be saved. Disposal does not close native windows.
39
+ runtime.dispose();
40
+ ```
36
41
 
37
- The root entry retains `createWorkbenchStore` and its browser defaults for
38
- compatibility. The explicit entry selects no browser defaults, but still uses
39
- Svelte stores, global debounce timers and the existing identity generator.
42
+ The root entry supplies browser-oriented defaults. Import
43
+ `@konitif/workbench-runtime/runtime` when persistence, synchronization, host
44
+ events and detached-window providers must all be supplied explicitly. Call
45
+ `flushPersistence()` before `dispose()` when pending state must be saved.
40
46
 
41
- The npm distribution exposes compiled Node-compatible ESM and NodeNext
42
- declarations. Repository sources remain TypeScript and are not included in the
43
- archive.
47
+ ## Public entry points
44
48
 
45
- ## Host notifications
49
+ | Entry | Purpose |
50
+ | --- | --- |
51
+ | `@konitif/workbench-runtime` | Existing store API and compatibility defaults. |
52
+ | `@konitif/workbench-runtime/runtime` | Explicit six-port runtime assembly. |
46
53
 
47
- `createWorkbenchStore` accepts an optional `hostEvents` provider:
54
+ ## Reference
48
55
 
49
- - Omitted: browser `pagehide`, `beforeunload`, hidden visibility and `storage` notifications.
50
- - `null`: no subscriptions to those host events, even in a browser.
51
- - `WorkbenchHostEvents`: explicit provider returning an unsubscribe function for each subscription.
56
+ See [`reference/`](reference/) for the machine-readable capability catalog and
57
+ authority diagrams. The catalogs document the adapter and are not persisted
58
+ workspace state.
52
59
 
53
- The provider calls `onPersistenceBoundary()` or `onStorageChange({ key, newValue })`.
54
- It does not own workspace state or perform persistence. The coordinator filters
55
- storage notifications, reloads through its persistence ports and validates the
56
- workspace. Disposal unsubscribes without destroying a shared provider; it does
57
- not implicitly flush pending saves. Call `flushPersistence()` first when needed.
60
+ ## License
58
61
 
59
- This option does not disable `workspaceSync`, detached-window controls or default
60
- storage adapters. Supply those ports separately for a non-browser host.
62
+ Source-available under [PolyForm Noncommercial 1.0.0](LICENSE.md), not OSI open
63
+ source. Commercial use requires separate written authorization.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@konitif/workbench-runtime",
3
3
  "license": "PolyForm-Noncommercial-1.0.0",
4
- "version": "0.284.1",
4
+ "version": "0.284.2",
5
5
  "description": "Reactive Svelte host adapter for KONITIF Workbench contracts with explicit runtime ports.",
6
6
  "repository": {
7
7
  "type": "git",
@@ -32,7 +32,8 @@
32
32
  "dist",
33
33
  "LICENSE.md",
34
34
  "README.md",
35
- "package.json"
35
+ "package.json",
36
+ "reference"
36
37
  ],
37
38
  "scripts": {
38
39
  "build": "node scripts/build.mjs",
@@ -0,0 +1,10 @@
1
+ # Workbench Runtime reference
2
+
3
+ This directory contains authored, machine-readable documentation for
4
+ `@konitif/workbench-runtime`.
5
+
6
+ - [`catalog.json`](catalog.json) groups store coordination and explicit host ports.
7
+ - [`diagrams.json`](diagrams.json) describes runtime assembly and observation flow.
8
+
9
+ These files support documentation tooling. They are not persisted workspace
10
+ state, host configuration or proof that an external effect occurred.
@@ -0,0 +1,77 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "package": "@konitif/workbench-runtime",
4
+ "intent": "Assemble the Workbench runtime and coordinate its controllers without owning the hosted domains.",
5
+ "clusters": [
6
+ {
7
+ "id": "store-and-modes",
8
+ "title": "Store and modes",
9
+ "summary": "Composite Workbench state and workspace manipulation modes.",
10
+ "authority": "Local application coordination.",
11
+ "owns": [
12
+ "store",
13
+ "current mode"
14
+ ],
15
+ "doesNotOwn": [
16
+ "tool domains"
17
+ ],
18
+ "workflow": [
19
+ "Create",
20
+ "Configure",
21
+ "Reduce"
22
+ ],
23
+ "sources": [
24
+ "createWorkbenchStore.ts",
25
+ "createWorkspaceModeController.ts"
26
+ ]
27
+ },
28
+ {
29
+ "id": "shell-runtime-actions",
30
+ "title": "Shell and tool actions",
31
+ "summary": "Application commands connecting the shell, panels, and tools.",
32
+ "authority": "Orchestration of admitted intents.",
33
+ "owns": [
34
+ "shell actions",
35
+ "tool runtime actions"
36
+ ],
37
+ "doesNotOwn": [
38
+ "business meaning"
39
+ ],
40
+ "workflow": [
41
+ "Receive",
42
+ "Route",
43
+ "Apply"
44
+ ],
45
+ "sources": [
46
+ "workbenchShellActions.ts",
47
+ "workbenchToolRuntimeActions.ts"
48
+ ]
49
+ },
50
+ {
51
+ "id": "persistence-and-sync",
52
+ "title": "Persistence and synchronization",
53
+ "summary": "Restoration of layout, focus, and history.",
54
+ "authority": "Persistent workspace state.",
55
+ "owns": [
56
+ "persisted shell",
57
+ "focus",
58
+ "history",
59
+ "synchronization"
60
+ ],
61
+ "doesNotOwn": [
62
+ "domain artifacts"
63
+ ],
64
+ "workflow": [
65
+ "Capture",
66
+ "Persist",
67
+ "Rehydrate"
68
+ ],
69
+ "sources": [
70
+ "workbenchShellPersistence.ts",
71
+ "workbenchFocusPersistence.ts",
72
+ "workspaceHistoryController.ts",
73
+ "workspaceSyncController.ts"
74
+ ]
75
+ }
76
+ ]
77
+ }
@@ -0,0 +1,69 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "package": "@konitif/workbench-runtime",
4
+ "diagrams": [
5
+ {
6
+ "id": "runtime-session-lifecycle",
7
+ "title": "Workbench session lifecycle",
8
+ "kind": "lifecycle",
9
+ "summary": "The runtime initializes the store, coordinates actions, and preserves idempotent recovery.",
10
+ "nodes": [
11
+ {
12
+ "id": "boot",
13
+ "label": "Boot",
14
+ "description": "Configuration, registries, and dependencies are prepared."
15
+ },
16
+ {
17
+ "id": "store",
18
+ "label": "Workbench store",
19
+ "description": "The composite session state is created."
20
+ },
21
+ {
22
+ "id": "action",
23
+ "label": "Admitted action",
24
+ "description": "The shell, a mode, or a tool receives an intent."
25
+ },
26
+ {
27
+ "id": "runtime",
28
+ "label": "Coordination",
29
+ "description": "Controllers apply the transition.",
30
+ "tone": "runtime"
31
+ },
32
+ {
33
+ "id": "persist",
34
+ "label": "Persistence and synchronization",
35
+ "description": "Layout, focus, and history are captured."
36
+ },
37
+ {
38
+ "id": "resume",
39
+ "label": "Recovery",
40
+ "description": "The session is rehydrated without duplication.",
41
+ "tone": "observation"
42
+ }
43
+ ],
44
+ "edges": [
45
+ {
46
+ "from": "boot",
47
+ "to": "store"
48
+ },
49
+ {
50
+ "from": "store",
51
+ "to": "action"
52
+ },
53
+ {
54
+ "from": "action",
55
+ "to": "runtime"
56
+ },
57
+ {
58
+ "from": "runtime",
59
+ "to": "persist"
60
+ },
61
+ {
62
+ "from": "persist",
63
+ "to": "resume"
64
+ }
65
+ ],
66
+ "caption": "The Workbench runtime coordinates hosted domains without inventing their product meaning."
67
+ }
68
+ ]
69
+ }