@kosdev-code/kos-ddk-cli 0.1.0-dev.69 → 0.1.0-dev.73

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/README.md CHANGED
@@ -130,20 +130,22 @@ Its reference is extracted from DDK source at build time:
130
130
  and every token it reads with its value per theme.
131
131
  - `find_ddk_capability` maps a plain-language need to extension points, standard
132
132
  contributions and components.
133
- - `ddk://guide/storybook` and `ddk://guide/ddk-dev`, from [`guides/`](guides).
133
+ - `ddk://guide/*`, from [`guides/`](guides).
134
134
 
135
135
  `describe_ddk_plugin` and `validate_ddk_plugin` read a plugin project's `.kos.json`: its
136
136
  contributions, the standard ones they share a slot with, and checks of fields, ranks,
137
137
  experiences and tokens set in plugin code. The skills `build-ddk-plugin`,
138
- `ddk-content-component` and `ddk-storybook` give the workflow, and the
138
+ `ddk-config-page`, `ddk-content-component` and `ddk-storybook` give the workflow, and the
139
139
  `kos-ddk-plugin-planner` and `kos-ddk-plugin-reviewer` subagents plan and review
140
140
  read-only.
141
141
 
142
142
  ```sh
143
- kosui ddk:agent-install --client claude --scope user
143
+ kosui plugin install --client claude --scope user
144
144
  ```
145
145
 
146
- `--scope repo` installs it for the current checkout only.
146
+ `kosui plugin install` installs it beside the SDK's `kos-tools` plugin, from the
147
+ package's `agent-plugin/` folder. `kosui ddk:agent-install` installs it alone.
148
+ `--scope repo` installs for the current checkout only.
147
149
 
148
150
  ## Tests
149
151
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kos-ddk-tools",
3
- "version": "0.1.0-dev.69",
3
+ "version": "0.1.0-dev.73",
4
4
  "description": "KOS DDK plugin authoring (kos-ddk) MCP server: plugin projects, extension-point contributions and overrides of the standard ones.",
5
5
  "author": {
6
6
  "name": "kosdev-code"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "kos-ddk-tools",
4
- "version": "0.1.0-dev.69",
4
+ "version": "0.1.0-dev.73",
5
5
  "description": "KOS DDK plugin authoring (kos-ddk) MCP server: plugin projects, extension-point contributions and overrides of the standard ones.",
6
6
  "license": "MIT"
7
7
  }
@@ -19219,7 +19219,14 @@
19219
19219
  "name": "ddk-index",
19220
19220
  "title": "KOS DDK reference index",
19221
19221
  "description": "Start here: the DDK extension points, component libraries and design system, and which tool or resource covers each.",
19222
- "body": "# KOS DDK reference\n\nA DDK plugin contributes to extension points in its `.kos.json` and renders DDK components inside them. Plugins compose components; the design tokens belong to the DDK app and its themes.\n\n## Extension points\n\n- ddk://extension-point/ddk.cui — CUI (Consumer User Interface), `contributes.cui`\n- ddk://extension-point/ddk.dashboard.detail — Dashboard Detail, `contributes.dashboardDetail`\n- ddk://extension-point/ddk.dashboard.macro-summary — Dashboard Macro Summary, `contributes.dashboardMacroSummary`\n- ddk://extension-point/ddk.dashboard.pump-detail — Dashboard Pump Detail, `contributes.dashboardPumpDetail`\n- ddk://extension-point/ddk.dashboard.pump-summary — Dashboard Pump Summary, `contributes.dashboardPumpSummary`\n- ddk://extension-point/ddk.dashboard.summary — Dashboard Summary, `contributes.dashboardSummary`\n- ddk://extension-point/ddk.nav.view — Navigation Views, `contributes.navViews`\n- ddk://extension-point/ddk.ncui.utilities — Utilities, `contributes.utilities`\n- ddk://extension-point/ddk.setup — Setup Steps, `contributes.setupStep`\n- ddk://extension-point/ddk.trouble.action — Trouble Actions, `contributes.troubleActions`\n\n## Components\n\n- `@kosdev-code/kos-ddk-components`: 161 components and styled parts\n- `@kosdev-code/kos-ddk-model-components`: 89 components and styled parts\n\nlist_ddk_components finds them; describe_ddk_component gives one's props, the components and hooks it uses, and every token it reads.\n\n## Design system\n\n- ddk://design/base — DDK DESIGN.md\n- ddk://design/flex-eu — DDK Flex EU DESIGN.md\n- ddk://design/compact — DDK Compact DESIGN.md\n\nChange tokens only to create a new component (component tokens) or a theme (semantic tokens).\n\n## Guides\n\n- ddk://guide/ddk-dev — Testing plugins against a running DDK\n- ddk://guide/getting-started — Getting started with the DDK CLI\n- ddk://guide/storybook — Developing DDK contributions in Storybook\n- ddk://guide/descriptor-project — NCUI descriptor projects\n\nfind_ddk_capability maps a need to the extension point, the component and the tool."
19222
+ "body": "# KOS DDK reference\n\nA DDK plugin contributes to extension points in its `.kos.json` and renders DDK components inside them. Plugins compose components; the design tokens belong to the DDK app and its themes.\n\n## Extension points\n\n- ddk://extension-point/ddk.cui — CUI (Consumer User Interface), `contributes.cui`\n- ddk://extension-point/ddk.dashboard.detail — Dashboard Detail, `contributes.dashboardDetail`\n- ddk://extension-point/ddk.dashboard.macro-summary — Dashboard Macro Summary, `contributes.dashboardMacroSummary`\n- ddk://extension-point/ddk.dashboard.pump-detail — Dashboard Pump Detail, `contributes.dashboardPumpDetail`\n- ddk://extension-point/ddk.dashboard.pump-summary — Dashboard Pump Summary, `contributes.dashboardPumpSummary`\n- ddk://extension-point/ddk.dashboard.summary — Dashboard Summary, `contributes.dashboardSummary`\n- ddk://extension-point/ddk.nav.view — Navigation Views, `contributes.navViews`\n- ddk://extension-point/ddk.ncui.utilities — Utilities, `contributes.utilities`\n- ddk://extension-point/ddk.setup — Setup Steps, `contributes.setupStep`\n- ddk://extension-point/ddk.trouble.action — Trouble Actions, `contributes.troubleActions`\n\n## Components\n\n- `@kosdev-code/kos-ddk-components`: 161 components and styled parts\n- `@kosdev-code/kos-ddk-model-components`: 89 components and styled parts\n\nlist_ddk_components finds them; describe_ddk_component gives one's props, the components and hooks it uses, and every token it reads.\n\n## Design system\n\n- ddk://design/base — DDK DESIGN.md\n- ddk://design/flex-eu — DDK Flex EU DESIGN.md\n- ddk://design/compact — DDK Compact DESIGN.md\n\nChange tokens only to create a new component (component tokens) or a theme (semantic tokens).\n\n## Guides\n\n- ddk://guide/config-property-cards — Configuration property cards\n- ddk://guide/ddk-dev — Testing plugins against a running DDK\n- ddk://guide/getting-started — Getting started with the DDK CLI\n- ddk://guide/storybook — Developing DDK contributions in Storybook\n- ddk://guide/descriptor-project — NCUI descriptor projects\n\nfind_ddk_capability maps a need to the extension point, the component and the tool."
19223
+ },
19224
+ {
19225
+ "uri": "ddk://guide/config-property-cards",
19226
+ "name": "ddk-guide-config-property-cards",
19227
+ "title": "Configuration property cards",
19228
+ "description": "The ConfigProp* cards in kos-ddk-model-components that show and edit a KosConfigProperty, ConfigPropertyInput choosing a card from the schema type, and when cards write (immediately, or batched with StagedChangesProvider).",
19229
+ "body": "# Configuration property cards\n\n`@kosdev-code/kos-ddk-model-components` has one card per kind of configuration value.\nEach takes a `configProperty` (a `KosConfigProperty`), reads its value with\n`useConfigProperty`, and writes it back with `configProperty.updateProperty`.\n\n| Card | Property | Renders |\n| ---- | -------- | ------- |\n| `ConfigPropToggleCard` | boolean | a toggle, Enabled / Disabled |\n| `ConfigPropSwitchCard` | string | a segmented switch (`SwitchCard`) over the `options` you pass |\n| `ConfigPropPickerCard` | enum, or a property with options | a picker (`PickerCard`) of the property's options |\n| `ConfigPropInputCard` | string or number | a text input with the property's unit; `displayOptions` `min`/`max` validate it |\n| `ConfigPropInputRangeCard` | int or double | a number input within its range |\n| `ConfigPropTimePickerCard` | a time of day, in seconds | a time picker |\n| `ConfigPropInfoCard` | string | the value, read-only |\n| `ConfigPropSingleInputEnableCard` | any, plus a boolean | one input that a toggle (`enabledConfigProperty`) enables |\n| `ConfigPropMultiInputEnableCard` | several, plus a boolean | several inputs behind one enabling toggle |\n\nThe cards take the props of the DDK card they wrap (`label`, `float`, `collapse` and so\non). Lay them out in a `TabContainer`, with a `SettingsSubheading` per group.\n\n## Letting the schema choose: ConfigPropertyInput\n\n`ConfigPropertyInput` renders the card for the property's `schemaType`: boolean → toggle,\nint and double → input range, String → input, enum → picker. Without a `label` it\ntranslates the property id in the `config-properties` namespace. In compact mode the input\nand picker cards take the compact style. Pass `factory` to map types to other cards.\n\n## When a card writes\n\nEach card writes its property as soon as it changes.\n\nFor an interaction whose edits must be applied together, wrap the page in\n`StagedChangesProvider` (or `withStagedChanges`). Cards that support staging then keep\nthe new value instead of writing it; `useStagedChanges()` gives `saveChanges()` to write\nevery staged value and `clearStagedChanges()` to drop them. `ConfigPropToggleCard` and\n`ConfigPropTimePickerCard` stage; the other cards write straight away even inside the\nprovider."
19223
19230
  },
19224
19231
  {
19225
19232
  "uri": "ddk://guide/ddk-dev",
@@ -19233,7 +19240,7 @@
19233
19240
  "name": "ddk-guide-getting-started",
19234
19241
  "title": "Getting started with the DDK CLI",
19235
19242
  "description": "Installing kos-ddk-cli in a workspace or globally, checking kosui loads it, working from a repo root, and installing the kos-ddk agent plugin and MCP server.",
19236
- "body": "# Getting started with the DDK CLI\n\n`@kosdev-code/kos-ddk-cli` is a `kosui` extension: it adds the `ddk:*` commands to the\n`kosui` CLI and ships the `kos-ddk-tools` agent plugin. It has no CLI of its own.\n\n## 1. kosui\n\n`kosui` (`@kosdev-code/kos-ui-cli`) is installed globally, at 3.0.31 or later.\n\n```sh\nnpm install -g @kosdev-code/kos-ui-cli\nkosui cli:update\n```\n\n## 2. Install the extension\n\nEither in the workspace, which pins the version with the project:\n\n```sh\ncd <repo>/ui\nnpm install -D @kosdev-code/kos-ddk-cli\n```\n\nor globally, beside `kosui`, which adds the commands in every workspace:\n\n```sh\nnpm install -g @kosdev-code/kos-ddk-cli\n```\n\n`kosui` looks in the workspace's `package.json` dependencies first, then beside its own\nglobal install. When both have it, the workspace copy is used.\n\n`latest` is the released version. `@dev` is the build of the DDK's `main` branch, published\non every push:\n\n```sh\nnpm install -D @kosdev-code/kos-ddk-cli@dev\n```\n\nThe DDK libraries' dev builds depend on each other at one exact version, so install them\ntogether; `--no-save` keeps `package.json` and the lockfile on the release ranges:\n\n```sh\nnpm install --no-save @kosdev-code/kos-ddk@dev @kosdev-code/kos-ddk-components@dev \\\n @kosdev-code/kos-ddk-model-components@dev @kosdev-code/kos-ddk-models@dev \\\n @kosdev-code/kos-ddk-story-containers@dev @kosdev-code/kos-ddk-styles@dev\n```\n\n## 3. Check kosui loads it\n\n```sh\nkosui extensions\nkosui help\n```\n\n`kosui extensions` names the package, its version, where it came from (`[workspace]` or\n`[global]`), its status and the commands it adds. `kosui help` lists them under `ddk:`.\n\nA workspace can turn it off in its `.kos.json`:\n\n```json\n{ \"cli\": { \"disabledExtensions\": [\"@kosdev-code/kos-ddk-cli\"] } }\n```\n\n## 4. Repo root or ui workspace\n\nEvery command and the MCP server work from the ui workspace (the directory with\n`nx.json`) and from a polyglot repo root: when the repo root's `.kos.json` (written by\n`kosui repo`) names a ui workspace in `workspaces.ui`, `kosui` and the server use that\nworkspace. An agent started at the repo root, to work across the backend and the UI,\ngets the same commands and tools.\n\n## 5. Agent plugin and MCP server\n\n```sh\nkosui ddk:agent-install --client claude --scope user\n```\n\nThis registers the package's `kos-ddk-tools` plugin with the agent client and installs\nit; the plugin runs the `kos-ddk` MCP server. `--scope user` installs it for every repo,\n`--scope repo` for the current checkout only. Without `--client` it detects the client.\n\nThe server is one self-contained file inside the package, so it does not depend on the\nworkspace's `node_modules`. It is registered from wherever the package is installed, in\nthe workspace or globally.\n\nRun `ddk:agent-install` again after upgrading or reinstalling the package: the client\nkeeps its copy of the plugin until the registration is refreshed.\n\n## 6. Next\n\n- `kosui ddk:plugin-project --name my-plugin` creates a DDK plugin project under\n `plugins/` (`--directory` changes the folder). It tests against the `kosdev.ddk`\n plugin context and registers with the workspace host serving that context, or with\n `--host`; a workspace without a DDK host registers it with none. The contribution\n commands in the README add to it.\n- `kosui ddk:descriptor-project --name my-ncui --layout standard --ice true` (or `compact`) creates the\n NCUI descriptor project a new utility, setup step or navigation view is listed in;\n pass `--descriptorProject my-ncui` to `ddk:utility`, `ddk:setup` and `ddk:nav`. `ddk://guide/descriptor-project` lists what each layout and option writes.\n- `ddk://guide/storybook` for developing contributions in Storybook.\n- `ddk://guide/ddk-dev` for loading plugins into a running DDK.\n\n## Upgrading\n\n```sh\nkosui cli:update # kosui\nnpm install -D @kosdev-code/kos-ddk-cli@latest # workspace install\nnpm install -g @kosdev-code/kos-ddk-cli@latest # global install\nkosui ddk:agent-install --client claude --scope user\n```\n\n## When the ddk commands are missing\n\n- `kosui extensions` does not list the package: it is in neither the workspace's\n `package.json` nor the global install beside the `kosui` on your `PATH`\n (`npm ls -g @kosdev-code/kos-ddk-cli`).\n- It is listed as `incompatible`: `kosui` is older than the extension needs; update it.\n- It is listed as `disabled`: the workspace `.kos.json` names it in\n `cli.disabledExtensions`."
19243
+ "body": "# Getting started with the DDK CLI\n\n`@kosdev-code/kos-ddk-cli` is a `kosui` extension: it adds the `ddk:*` commands to the\n`kosui` CLI and ships the `kos-ddk-tools` agent plugin. It has no CLI of its own.\n\n## 1. kosui\n\n`kosui` (`@kosdev-code/kos-ui-cli`) is installed globally, at 3.0.31 or later.\n\n```sh\nnpm install -g @kosdev-code/kos-ui-cli\nkosui cli:update\n```\n\n## 2. Install the extension\n\nEither in the workspace, which pins the version with the project:\n\n```sh\ncd <repo>/ui\nnpm install -D @kosdev-code/kos-ddk-cli\n```\n\nor globally, beside `kosui`, which adds the commands in every workspace:\n\n```sh\nnpm install -g @kosdev-code/kos-ddk-cli\n```\n\n`kosui` looks in the workspace's `package.json` dependencies first, then beside its own\nglobal install. When both have it, the workspace copy is used.\n\n`latest` is the released version. `@dev` is the build of the DDK's `main` branch, published\non every push:\n\n```sh\nnpm install -D @kosdev-code/kos-ddk-cli@dev\n```\n\nThe DDK libraries' dev builds depend on each other at one exact version, so install them\ntogether; `--no-save` keeps `package.json` and the lockfile on the release ranges:\n\n```sh\nnpm install --no-save @kosdev-code/kos-ddk@dev @kosdev-code/kos-ddk-components@dev \\\n @kosdev-code/kos-ddk-model-components@dev @kosdev-code/kos-ddk-models@dev \\\n @kosdev-code/kos-ddk-story-containers@dev @kosdev-code/kos-ddk-styles@dev\n```\n\n## 3. Check kosui loads it\n\n```sh\nkosui extensions\nkosui help\n```\n\n`kosui extensions` names the package, its version, where it came from (`[workspace]` or\n`[global]`), its status and the commands it adds. `kosui help` lists them under `ddk:`.\n\nA workspace can turn it off in its `.kos.json`:\n\n```json\n{ \"cli\": { \"disabledExtensions\": [\"@kosdev-code/kos-ddk-cli\"] } }\n```\n\n## 4. Repo root or ui workspace\n\nEvery command and the MCP server work from the ui workspace (the directory with\n`nx.json`) and from a polyglot repo root: when the repo root's `.kos.json` (written by\n`kosui repo`) names a ui workspace in `workspaces.ui`, `kosui` and the server use that\nworkspace. An agent started at the repo root, to work across the backend and the UI,\ngets the same commands and tools.\n\n## 5. Agent plugin and MCP server\n\n```sh\nkosui plugin install --client claude --scope user\n```\n\nThis installs the SDK's `kos-tools` plugin and, beside it, the package's `kos-ddk-tools`\nplugin, which runs the `kos-ddk` MCP server. `--scope user` installs them for every repo,\n`--scope repo` for the current checkout only. Without `--client` it detects the client.\n`kosui ddk:agent-install` installs `kos-ddk-tools` alone, with the same flags.\n\nThe server is one self-contained file inside the package, so it does not depend on the\nworkspace's `node_modules`. It is registered from wherever the package is installed, in\nthe workspace or globally.\n\nRun `kosui plugin install` again after upgrading the CLIs (`kosui cli:update`): the\nclient keeps its copy of each plugin until the registration is refreshed.\n\n## 6. Next\n\n- `kosui ddk:plugin-project --name my-plugin` creates a DDK plugin project under\n `plugins/` (`--directory` changes the folder). It tests against the `kosdev.ddk`\n plugin context and registers with the workspace host serving that context, or with\n `--host`; a workspace without a DDK host registers it with none. The contribution\n commands in the README add to it.\n- `kosui ddk:descriptor-project --name my-ncui --layout standard --ice true` (or `compact`) creates the\n NCUI descriptor project a new utility, setup step or navigation view is listed in;\n pass `--descriptorProject my-ncui` to `ddk:utility`, `ddk:setup` and `ddk:nav`. `ddk://guide/descriptor-project` lists what each layout and option writes.\n- `ddk://guide/storybook` for developing contributions in Storybook.\n- `ddk://guide/ddk-dev` for loading plugins into a running DDK.\n\n## Upgrading\n\n```sh\nkosui cli:update # kosui, and a global kos-ddk-cli\nnpm install -D @kosdev-code/kos-ddk-cli@latest # a workspace install\nkosui plugin install --client claude --scope user # both agent plugins\n```\n\n## When the ddk commands are missing\n\n- `kosui extensions` does not list the package: it is in neither the workspace's\n `package.json` nor the global install beside the `kosui` on your `PATH`\n (`npm ls -g @kosdev-code/kos-ddk-cli`).\n- It is listed as `incompatible`: `kosui` is older than the extension needs; update it.\n- It is listed as `disabled`: the workspace `.kos.json` names it in\n `cli.disabledExtensions`."
19237
19244
  },
19238
19245
  {
19239
19246
  "uri": "ddk://guide/storybook",
@@ -27,7 +27,8 @@ component content. Never hand-edit the contributions or experiences the tools wr
27
27
 
28
28
  3. **The extension point.** Read `ddk://extension-point/{id}`: its contribution fields,
29
29
  the props your component receives and the standard contributions. A Settings tab
30
- is a navigation view: `add_nav_view` with a `settings.<name>` descriptor.
30
+ is a navigation view: `add_nav_view` with a `settings.<name>` descriptor. A page that
31
+ edits device configuration (most Settings tabs) follows the `ddk-config-page` skill.
31
32
 
32
33
  4. **Replacing a standard contribution.** `list_ddk_contributions` lists the ones an
33
34
  override can replace. Pass the id as `override`: the tool takes its slot and gives
@@ -59,7 +60,17 @@ component content. Never hand-edit the contributions or experiences the tools wr
59
60
 
60
61
  8. **Develop it.** In Storybook with the `ddk-storybook` skill. Against a running device
61
62
  or simulator with `kosui ddk:dev` (`ddk://guide/ddk-dev`); that is where an override
62
- is seen replacing the standard contribution.
63
+ is seen replacing the standard contribution. In `ddk:dev`:
64
+ - Serve the descriptor project before opening the URL, unless its KAB is installed:
65
+ `kosui fixtures serve` in the workspace, and add
66
+ `&kosMock=on&kosFixtureServer=&kosSetup=<descriptor-project>` to the printed URL.
67
+ A new slot shows only once the descriptor lists it, and so does an override of a
68
+ slot only the descriptor project adds (`carbTank` with `carb`).
69
+ - Log in with a role the slot lists: Utilities and Settings are technician-only in
70
+ the standard descriptor.
71
+ - Show pump cards and pump details on a holder with no active troubles; a holder's
72
+ troubles take the place of its card body and detail. Storybook's container picks a
73
+ holder with the `dashboardKey`.
63
74
 
64
75
  9. **Validate.** `validate_ddk_plugin` checks the fields against each point's schema,
65
76
  ranks, experiences and their component files, overrides that do not win and tokens
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: ddk-config-page
3
+ description: >-
4
+ Build a DDK Settings tab or any DDK page that shows or edits device configuration:
5
+ model the configuration (SettingsModel, the plugin's own @kosConfigProperty fields,
6
+ one model per repeated entry such as cup sizes with prop keys, or a whole
7
+ @kosConfigBean for batched edits), hand the model to the page, and render the
8
+ ConfigProp* cards. Use when asked about DDK configuration input components, config
9
+ property cards, cup sizes, or a page that changes dispenser settings.
10
+ ---
11
+
12
+ # Build a DDK page on configuration properties
13
+
14
+ The page renders configuration that lives on a model; the model binds it to the device.
15
+ The cards are described in `ddk://guide/config-property-cards`.
16
+
17
+ ## Steps
18
+
19
+ 1. **Contribute the page.** A Settings tab is a navigation view: `add_nav_view` with a
20
+ `settings.<name>` descriptor (build-ddk-plugin skill).
21
+
22
+ 2. **Choose the mode.**
23
+ - **Config properties** (the usual case): the model has one `@kosConfigProperty` per
24
+ value. Each is a typed `KosConfigProperty` with unit conversion, formatting and
25
+ `options`, and each card writes its own property.
26
+ - **A config bean**: the model holds the whole bean at a path with `@kosConfigBean`
27
+ (`kos://decorator/kosConfigBean`): `values`, the schema, and `updateProperty(key,
28
+ value)`, which posts the whole bean. Use it when the page edits a set of values and
29
+ applies them together, or walks the schema. No unit conversion.
30
+
31
+ 3. **Model the configuration.**
32
+ - DDK settings (date and time formats, water and beverage visibility) are already on
33
+ `SettingsModel`.
34
+ - Your own values: find the config path and attribute on a live device with the
35
+ kos-device tools, then add each with `add_config_property` (build-kos-model skill).
36
+ Never hand-write the decorator.
37
+ - **Repeated entries** (cup sizes and the like: `cups.0.*` … `cups.4.*` in one bean):
38
+ one model type whose attributes carry a prop key, and a container that creates an
39
+ instance per entry (`kos://guide/prop-keys`):
40
+
41
+ ```typescript
42
+ const PROP_INDEX = createPropKey<CupModel>("index");
43
+
44
+ @kosConfigProperty({ path: PATH, attribute: `cups.${PROP_INDEX}.volume` })
45
+ volume!: KosConfigProperty<number>;
46
+
47
+ constructor(modelId: string, options: CupOptions) {
48
+ this.id = modelId;
49
+ this.index = options.index.toString(); // set before the properties resolve
50
+ }
51
+ ```
52
+
53
+ The container (`add_container_support`, singleton) builds the instances in `init`
54
+ (`Cup.instance(id).options({ index }).build()`, then `addModel`), registers `Cup`
55
+ with `addRelatedModel`, and adds the views the UI needs (enabled cups sorted by
56
+ volume, the largest cup).
57
+ - A bean: add `@kosConfigBean` by hand; no codegen tool writes it.
58
+
59
+ 4. **Give the page the model.** Wrap it in a `with…` higher-order component or call a
60
+ `use…` hook that loads the model: `withSettings` from kos-ddk-model-components for
61
+ `SettingsModel`, and the same pair for your own model (`withCupContainer` /
62
+ `useCupContainer`).
63
+
64
+ 5. **Render it.** One card per property (`ddk://guide/config-property-cards`), or
65
+ `ConfigPropertyInput` to let the schema choose. For repeated entries, one card group
66
+ per instance:
67
+
68
+ ```tsx
69
+ const { model: cupContainer } = useCupContainer();
70
+ return cupContainer?.allCups.map((cup) => (
71
+ <Card key={cup.id}>
72
+ <ConfigPropInputCard configProperty={cup.name} label={t("portion")} />
73
+ <ConfigPropInputCard configProperty={cup.volume} label={t("portion-size")} />
74
+ <ConfigPropToggleCard configProperty={cup.enabled} />
75
+ </Card>
76
+ ));
77
+ ```
78
+
79
+ For a bean, build the form from `values` and `getSchemaForProperty(key)`, keep the
80
+ edits in the page until Save, then write them with `updateProperty`.
81
+
82
+ 6. **Decide when edits are written.** Cards write as each value changes. To apply a
83
+ page's edits together, wrap it in `StagedChangesProvider` and call `saveChanges()`
84
+ from its Save action; only the toggle and time-picker cards stage
85
+ (`ddk://guide/config-property-cards`).
86
+
87
+ 7. **Develop and check it.** In Storybook the page reads and writes the simulator's real
88
+ configuration (ddk-storybook skill). In `kosui ddk:dev`, log in as technician: Settings
89
+ is technician-only in the standard descriptor.
@@ -1,6 +1,6 @@
1
1
  import styled from '@emotion/styled';
2
2
  import {
3
- <% if (layout !== "fullscreen") { -%>
3
+ <% if (locals.layout !== "fullscreen") { -%>
4
4
  Button,
5
5
  Content,
6
6
  Footer,
@@ -29,7 +29,7 @@ const <%= namePascalCase %>Container = styled.section`
29
29
  width: 100%;
30
30
  `;
31
31
 
32
- <% if (layout === "fullscreen") { -%>
32
+ <% if (locals.layout === "fullscreen") { -%>
33
33
  /** A fullscreen utility: it covers the display and closes from its header. */
34
34
  export const <%= namePascalCase %>: Experience = kosComponent(({ onComplete }) => {
35
35
  const { t } = useKosTranslation('<%= appProject %>');
@@ -0,0 +1,45 @@
1
+ ---
2
+ uri: ddk://guide/config-property-cards
3
+ name: ddk-guide-config-property-cards
4
+ title: Configuration property cards
5
+ description: The ConfigProp* cards in kos-ddk-model-components that show and edit a KosConfigProperty, ConfigPropertyInput choosing a card from the schema type, and when cards write (immediately, or batched with StagedChangesProvider).
6
+ ---
7
+
8
+ # Configuration property cards
9
+
10
+ `@kosdev-code/kos-ddk-model-components` has one card per kind of configuration value.
11
+ Each takes a `configProperty` (a `KosConfigProperty`), reads its value with
12
+ `useConfigProperty`, and writes it back with `configProperty.updateProperty`.
13
+
14
+ | Card | Property | Renders |
15
+ | ---- | -------- | ------- |
16
+ | `ConfigPropToggleCard` | boolean | a toggle, Enabled / Disabled |
17
+ | `ConfigPropSwitchCard` | string | a segmented switch (`SwitchCard`) over the `options` you pass |
18
+ | `ConfigPropPickerCard` | enum, or a property with options | a picker (`PickerCard`) of the property's options |
19
+ | `ConfigPropInputCard` | string or number | a text input with the property's unit; `displayOptions` `min`/`max` validate it |
20
+ | `ConfigPropInputRangeCard` | int or double | a number input within its range |
21
+ | `ConfigPropTimePickerCard` | a time of day, in seconds | a time picker |
22
+ | `ConfigPropInfoCard` | string | the value, read-only |
23
+ | `ConfigPropSingleInputEnableCard` | any, plus a boolean | one input that a toggle (`enabledConfigProperty`) enables |
24
+ | `ConfigPropMultiInputEnableCard` | several, plus a boolean | several inputs behind one enabling toggle |
25
+
26
+ The cards take the props of the DDK card they wrap (`label`, `float`, `collapse` and so
27
+ on). Lay them out in a `TabContainer`, with a `SettingsSubheading` per group.
28
+
29
+ ## Letting the schema choose: ConfigPropertyInput
30
+
31
+ `ConfigPropertyInput` renders the card for the property's `schemaType`: boolean → toggle,
32
+ int and double → input range, String → input, enum → picker. Without a `label` it
33
+ translates the property id in the `config-properties` namespace. In compact mode the input
34
+ and picker cards take the compact style. Pass `factory` to map types to other cards.
35
+
36
+ ## When a card writes
37
+
38
+ Each card writes its property as soon as it changes.
39
+
40
+ For an interaction whose edits must be applied together, wrap the page in
41
+ `StagedChangesProvider` (or `withStagedChanges`). Cards that support staging then keep
42
+ the new value instead of writing it; `useStagedChanges()` gives `saveChanges()` to write
43
+ every staged value and `clearStagedChanges()` to drop them. `ConfigPropToggleCard` and
44
+ `ConfigPropTimePickerCard` stage; the other cards write straight away even inside the
45
+ provider.
@@ -80,19 +80,20 @@ gets the same commands and tools.
80
80
  ## 5. Agent plugin and MCP server
81
81
 
82
82
  ```sh
83
- kosui ddk:agent-install --client claude --scope user
83
+ kosui plugin install --client claude --scope user
84
84
  ```
85
85
 
86
- This registers the package's `kos-ddk-tools` plugin with the agent client and installs
87
- it; the plugin runs the `kos-ddk` MCP server. `--scope user` installs it for every repo,
86
+ This installs the SDK's `kos-tools` plugin and, beside it, the package's `kos-ddk-tools`
87
+ plugin, which runs the `kos-ddk` MCP server. `--scope user` installs them for every repo,
88
88
  `--scope repo` for the current checkout only. Without `--client` it detects the client.
89
+ `kosui ddk:agent-install` installs `kos-ddk-tools` alone, with the same flags.
89
90
 
90
91
  The server is one self-contained file inside the package, so it does not depend on the
91
92
  workspace's `node_modules`. It is registered from wherever the package is installed, in
92
93
  the workspace or globally.
93
94
 
94
- Run `ddk:agent-install` again after upgrading or reinstalling the package: the client
95
- keeps its copy of the plugin until the registration is refreshed.
95
+ Run `kosui plugin install` again after upgrading the CLIs (`kosui cli:update`): the
96
+ client keeps its copy of each plugin until the registration is refreshed.
96
97
 
97
98
  ## 6. Next
98
99
 
@@ -110,10 +111,9 @@ keeps its copy of the plugin until the registration is refreshed.
110
111
  ## Upgrading
111
112
 
112
113
  ```sh
113
- kosui cli:update # kosui
114
- npm install -D @kosdev-code/kos-ddk-cli@latest # workspace install
115
- npm install -g @kosdev-code/kos-ddk-cli@latest # global install
116
- kosui ddk:agent-install --client claude --scope user
114
+ kosui cli:update # kosui, and a global kos-ddk-cli
115
+ npm install -D @kosdev-code/kos-ddk-cli@latest # a workspace install
116
+ kosui plugin install --client claude --scope user # both agent plugins
117
117
  ```
118
118
 
119
119
  ## When the ddk commands are missing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kosdev-code/kos-ddk-cli",
3
- "version": "0.1.0-dev.69",
3
+ "version": "0.1.0-dev.73",
4
4
  "description": "DDK commands for kosui: plugin projects and DDK extension-point contributions.",
5
5
  "type": "module",
6
6
  "kosui": {
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "kos": {
29
29
  "build": {
30
- "gitHash": "e4be4b5b919ad4e33d184bab6290440c3af5f239"
30
+ "gitHash": "0facd07837af2eef325abefa65b082d9d94fb8cc"
31
31
  }
32
32
  },
33
33
  "publishConfig": {
@@ -19219,7 +19219,14 @@
19219
19219
  "name": "ddk-index",
19220
19220
  "title": "KOS DDK reference index",
19221
19221
  "description": "Start here: the DDK extension points, component libraries and design system, and which tool or resource covers each.",
19222
- "body": "# KOS DDK reference\n\nA DDK plugin contributes to extension points in its `.kos.json` and renders DDK components inside them. Plugins compose components; the design tokens belong to the DDK app and its themes.\n\n## Extension points\n\n- ddk://extension-point/ddk.cui — CUI (Consumer User Interface), `contributes.cui`\n- ddk://extension-point/ddk.dashboard.detail — Dashboard Detail, `contributes.dashboardDetail`\n- ddk://extension-point/ddk.dashboard.macro-summary — Dashboard Macro Summary, `contributes.dashboardMacroSummary`\n- ddk://extension-point/ddk.dashboard.pump-detail — Dashboard Pump Detail, `contributes.dashboardPumpDetail`\n- ddk://extension-point/ddk.dashboard.pump-summary — Dashboard Pump Summary, `contributes.dashboardPumpSummary`\n- ddk://extension-point/ddk.dashboard.summary — Dashboard Summary, `contributes.dashboardSummary`\n- ddk://extension-point/ddk.nav.view — Navigation Views, `contributes.navViews`\n- ddk://extension-point/ddk.ncui.utilities — Utilities, `contributes.utilities`\n- ddk://extension-point/ddk.setup — Setup Steps, `contributes.setupStep`\n- ddk://extension-point/ddk.trouble.action — Trouble Actions, `contributes.troubleActions`\n\n## Components\n\n- `@kosdev-code/kos-ddk-components`: 161 components and styled parts\n- `@kosdev-code/kos-ddk-model-components`: 89 components and styled parts\n\nlist_ddk_components finds them; describe_ddk_component gives one's props, the components and hooks it uses, and every token it reads.\n\n## Design system\n\n- ddk://design/base — DDK DESIGN.md\n- ddk://design/flex-eu — DDK Flex EU DESIGN.md\n- ddk://design/compact — DDK Compact DESIGN.md\n\nChange tokens only to create a new component (component tokens) or a theme (semantic tokens).\n\n## Guides\n\n- ddk://guide/ddk-dev — Testing plugins against a running DDK\n- ddk://guide/getting-started — Getting started with the DDK CLI\n- ddk://guide/storybook — Developing DDK contributions in Storybook\n- ddk://guide/descriptor-project — NCUI descriptor projects\n\nfind_ddk_capability maps a need to the extension point, the component and the tool."
19222
+ "body": "# KOS DDK reference\n\nA DDK plugin contributes to extension points in its `.kos.json` and renders DDK components inside them. Plugins compose components; the design tokens belong to the DDK app and its themes.\n\n## Extension points\n\n- ddk://extension-point/ddk.cui — CUI (Consumer User Interface), `contributes.cui`\n- ddk://extension-point/ddk.dashboard.detail — Dashboard Detail, `contributes.dashboardDetail`\n- ddk://extension-point/ddk.dashboard.macro-summary — Dashboard Macro Summary, `contributes.dashboardMacroSummary`\n- ddk://extension-point/ddk.dashboard.pump-detail — Dashboard Pump Detail, `contributes.dashboardPumpDetail`\n- ddk://extension-point/ddk.dashboard.pump-summary — Dashboard Pump Summary, `contributes.dashboardPumpSummary`\n- ddk://extension-point/ddk.dashboard.summary — Dashboard Summary, `contributes.dashboardSummary`\n- ddk://extension-point/ddk.nav.view — Navigation Views, `contributes.navViews`\n- ddk://extension-point/ddk.ncui.utilities — Utilities, `contributes.utilities`\n- ddk://extension-point/ddk.setup — Setup Steps, `contributes.setupStep`\n- ddk://extension-point/ddk.trouble.action — Trouble Actions, `contributes.troubleActions`\n\n## Components\n\n- `@kosdev-code/kos-ddk-components`: 161 components and styled parts\n- `@kosdev-code/kos-ddk-model-components`: 89 components and styled parts\n\nlist_ddk_components finds them; describe_ddk_component gives one's props, the components and hooks it uses, and every token it reads.\n\n## Design system\n\n- ddk://design/base — DDK DESIGN.md\n- ddk://design/flex-eu — DDK Flex EU DESIGN.md\n- ddk://design/compact — DDK Compact DESIGN.md\n\nChange tokens only to create a new component (component tokens) or a theme (semantic tokens).\n\n## Guides\n\n- ddk://guide/config-property-cards — Configuration property cards\n- ddk://guide/ddk-dev — Testing plugins against a running DDK\n- ddk://guide/getting-started — Getting started with the DDK CLI\n- ddk://guide/storybook — Developing DDK contributions in Storybook\n- ddk://guide/descriptor-project — NCUI descriptor projects\n\nfind_ddk_capability maps a need to the extension point, the component and the tool."
19223
+ },
19224
+ {
19225
+ "uri": "ddk://guide/config-property-cards",
19226
+ "name": "ddk-guide-config-property-cards",
19227
+ "title": "Configuration property cards",
19228
+ "description": "The ConfigProp* cards in kos-ddk-model-components that show and edit a KosConfigProperty, ConfigPropertyInput choosing a card from the schema type, and when cards write (immediately, or batched with StagedChangesProvider).",
19229
+ "body": "# Configuration property cards\n\n`@kosdev-code/kos-ddk-model-components` has one card per kind of configuration value.\nEach takes a `configProperty` (a `KosConfigProperty`), reads its value with\n`useConfigProperty`, and writes it back with `configProperty.updateProperty`.\n\n| Card | Property | Renders |\n| ---- | -------- | ------- |\n| `ConfigPropToggleCard` | boolean | a toggle, Enabled / Disabled |\n| `ConfigPropSwitchCard` | string | a segmented switch (`SwitchCard`) over the `options` you pass |\n| `ConfigPropPickerCard` | enum, or a property with options | a picker (`PickerCard`) of the property's options |\n| `ConfigPropInputCard` | string or number | a text input with the property's unit; `displayOptions` `min`/`max` validate it |\n| `ConfigPropInputRangeCard` | int or double | a number input within its range |\n| `ConfigPropTimePickerCard` | a time of day, in seconds | a time picker |\n| `ConfigPropInfoCard` | string | the value, read-only |\n| `ConfigPropSingleInputEnableCard` | any, plus a boolean | one input that a toggle (`enabledConfigProperty`) enables |\n| `ConfigPropMultiInputEnableCard` | several, plus a boolean | several inputs behind one enabling toggle |\n\nThe cards take the props of the DDK card they wrap (`label`, `float`, `collapse` and so\non). Lay them out in a `TabContainer`, with a `SettingsSubheading` per group.\n\n## Letting the schema choose: ConfigPropertyInput\n\n`ConfigPropertyInput` renders the card for the property's `schemaType`: boolean → toggle,\nint and double → input range, String → input, enum → picker. Without a `label` it\ntranslates the property id in the `config-properties` namespace. In compact mode the input\nand picker cards take the compact style. Pass `factory` to map types to other cards.\n\n## When a card writes\n\nEach card writes its property as soon as it changes.\n\nFor an interaction whose edits must be applied together, wrap the page in\n`StagedChangesProvider` (or `withStagedChanges`). Cards that support staging then keep\nthe new value instead of writing it; `useStagedChanges()` gives `saveChanges()` to write\nevery staged value and `clearStagedChanges()` to drop them. `ConfigPropToggleCard` and\n`ConfigPropTimePickerCard` stage; the other cards write straight away even inside the\nprovider."
19223
19230
  },
19224
19231
  {
19225
19232
  "uri": "ddk://guide/ddk-dev",
@@ -19233,7 +19240,7 @@
19233
19240
  "name": "ddk-guide-getting-started",
19234
19241
  "title": "Getting started with the DDK CLI",
19235
19242
  "description": "Installing kos-ddk-cli in a workspace or globally, checking kosui loads it, working from a repo root, and installing the kos-ddk agent plugin and MCP server.",
19236
- "body": "# Getting started with the DDK CLI\n\n`@kosdev-code/kos-ddk-cli` is a `kosui` extension: it adds the `ddk:*` commands to the\n`kosui` CLI and ships the `kos-ddk-tools` agent plugin. It has no CLI of its own.\n\n## 1. kosui\n\n`kosui` (`@kosdev-code/kos-ui-cli`) is installed globally, at 3.0.31 or later.\n\n```sh\nnpm install -g @kosdev-code/kos-ui-cli\nkosui cli:update\n```\n\n## 2. Install the extension\n\nEither in the workspace, which pins the version with the project:\n\n```sh\ncd <repo>/ui\nnpm install -D @kosdev-code/kos-ddk-cli\n```\n\nor globally, beside `kosui`, which adds the commands in every workspace:\n\n```sh\nnpm install -g @kosdev-code/kos-ddk-cli\n```\n\n`kosui` looks in the workspace's `package.json` dependencies first, then beside its own\nglobal install. When both have it, the workspace copy is used.\n\n`latest` is the released version. `@dev` is the build of the DDK's `main` branch, published\non every push:\n\n```sh\nnpm install -D @kosdev-code/kos-ddk-cli@dev\n```\n\nThe DDK libraries' dev builds depend on each other at one exact version, so install them\ntogether; `--no-save` keeps `package.json` and the lockfile on the release ranges:\n\n```sh\nnpm install --no-save @kosdev-code/kos-ddk@dev @kosdev-code/kos-ddk-components@dev \\\n @kosdev-code/kos-ddk-model-components@dev @kosdev-code/kos-ddk-models@dev \\\n @kosdev-code/kos-ddk-story-containers@dev @kosdev-code/kos-ddk-styles@dev\n```\n\n## 3. Check kosui loads it\n\n```sh\nkosui extensions\nkosui help\n```\n\n`kosui extensions` names the package, its version, where it came from (`[workspace]` or\n`[global]`), its status and the commands it adds. `kosui help` lists them under `ddk:`.\n\nA workspace can turn it off in its `.kos.json`:\n\n```json\n{ \"cli\": { \"disabledExtensions\": [\"@kosdev-code/kos-ddk-cli\"] } }\n```\n\n## 4. Repo root or ui workspace\n\nEvery command and the MCP server work from the ui workspace (the directory with\n`nx.json`) and from a polyglot repo root: when the repo root's `.kos.json` (written by\n`kosui repo`) names a ui workspace in `workspaces.ui`, `kosui` and the server use that\nworkspace. An agent started at the repo root, to work across the backend and the UI,\ngets the same commands and tools.\n\n## 5. Agent plugin and MCP server\n\n```sh\nkosui ddk:agent-install --client claude --scope user\n```\n\nThis registers the package's `kos-ddk-tools` plugin with the agent client and installs\nit; the plugin runs the `kos-ddk` MCP server. `--scope user` installs it for every repo,\n`--scope repo` for the current checkout only. Without `--client` it detects the client.\n\nThe server is one self-contained file inside the package, so it does not depend on the\nworkspace's `node_modules`. It is registered from wherever the package is installed, in\nthe workspace or globally.\n\nRun `ddk:agent-install` again after upgrading or reinstalling the package: the client\nkeeps its copy of the plugin until the registration is refreshed.\n\n## 6. Next\n\n- `kosui ddk:plugin-project --name my-plugin` creates a DDK plugin project under\n `plugins/` (`--directory` changes the folder). It tests against the `kosdev.ddk`\n plugin context and registers with the workspace host serving that context, or with\n `--host`; a workspace without a DDK host registers it with none. The contribution\n commands in the README add to it.\n- `kosui ddk:descriptor-project --name my-ncui --layout standard --ice true` (or `compact`) creates the\n NCUI descriptor project a new utility, setup step or navigation view is listed in;\n pass `--descriptorProject my-ncui` to `ddk:utility`, `ddk:setup` and `ddk:nav`. `ddk://guide/descriptor-project` lists what each layout and option writes.\n- `ddk://guide/storybook` for developing contributions in Storybook.\n- `ddk://guide/ddk-dev` for loading plugins into a running DDK.\n\n## Upgrading\n\n```sh\nkosui cli:update # kosui\nnpm install -D @kosdev-code/kos-ddk-cli@latest # workspace install\nnpm install -g @kosdev-code/kos-ddk-cli@latest # global install\nkosui ddk:agent-install --client claude --scope user\n```\n\n## When the ddk commands are missing\n\n- `kosui extensions` does not list the package: it is in neither the workspace's\n `package.json` nor the global install beside the `kosui` on your `PATH`\n (`npm ls -g @kosdev-code/kos-ddk-cli`).\n- It is listed as `incompatible`: `kosui` is older than the extension needs; update it.\n- It is listed as `disabled`: the workspace `.kos.json` names it in\n `cli.disabledExtensions`."
19243
+ "body": "# Getting started with the DDK CLI\n\n`@kosdev-code/kos-ddk-cli` is a `kosui` extension: it adds the `ddk:*` commands to the\n`kosui` CLI and ships the `kos-ddk-tools` agent plugin. It has no CLI of its own.\n\n## 1. kosui\n\n`kosui` (`@kosdev-code/kos-ui-cli`) is installed globally, at 3.0.31 or later.\n\n```sh\nnpm install -g @kosdev-code/kos-ui-cli\nkosui cli:update\n```\n\n## 2. Install the extension\n\nEither in the workspace, which pins the version with the project:\n\n```sh\ncd <repo>/ui\nnpm install -D @kosdev-code/kos-ddk-cli\n```\n\nor globally, beside `kosui`, which adds the commands in every workspace:\n\n```sh\nnpm install -g @kosdev-code/kos-ddk-cli\n```\n\n`kosui` looks in the workspace's `package.json` dependencies first, then beside its own\nglobal install. When both have it, the workspace copy is used.\n\n`latest` is the released version. `@dev` is the build of the DDK's `main` branch, published\non every push:\n\n```sh\nnpm install -D @kosdev-code/kos-ddk-cli@dev\n```\n\nThe DDK libraries' dev builds depend on each other at one exact version, so install them\ntogether; `--no-save` keeps `package.json` and the lockfile on the release ranges:\n\n```sh\nnpm install --no-save @kosdev-code/kos-ddk@dev @kosdev-code/kos-ddk-components@dev \\\n @kosdev-code/kos-ddk-model-components@dev @kosdev-code/kos-ddk-models@dev \\\n @kosdev-code/kos-ddk-story-containers@dev @kosdev-code/kos-ddk-styles@dev\n```\n\n## 3. Check kosui loads it\n\n```sh\nkosui extensions\nkosui help\n```\n\n`kosui extensions` names the package, its version, where it came from (`[workspace]` or\n`[global]`), its status and the commands it adds. `kosui help` lists them under `ddk:`.\n\nA workspace can turn it off in its `.kos.json`:\n\n```json\n{ \"cli\": { \"disabledExtensions\": [\"@kosdev-code/kos-ddk-cli\"] } }\n```\n\n## 4. Repo root or ui workspace\n\nEvery command and the MCP server work from the ui workspace (the directory with\n`nx.json`) and from a polyglot repo root: when the repo root's `.kos.json` (written by\n`kosui repo`) names a ui workspace in `workspaces.ui`, `kosui` and the server use that\nworkspace. An agent started at the repo root, to work across the backend and the UI,\ngets the same commands and tools.\n\n## 5. Agent plugin and MCP server\n\n```sh\nkosui plugin install --client claude --scope user\n```\n\nThis installs the SDK's `kos-tools` plugin and, beside it, the package's `kos-ddk-tools`\nplugin, which runs the `kos-ddk` MCP server. `--scope user` installs them for every repo,\n`--scope repo` for the current checkout only. Without `--client` it detects the client.\n`kosui ddk:agent-install` installs `kos-ddk-tools` alone, with the same flags.\n\nThe server is one self-contained file inside the package, so it does not depend on the\nworkspace's `node_modules`. It is registered from wherever the package is installed, in\nthe workspace or globally.\n\nRun `kosui plugin install` again after upgrading the CLIs (`kosui cli:update`): the\nclient keeps its copy of each plugin until the registration is refreshed.\n\n## 6. Next\n\n- `kosui ddk:plugin-project --name my-plugin` creates a DDK plugin project under\n `plugins/` (`--directory` changes the folder). It tests against the `kosdev.ddk`\n plugin context and registers with the workspace host serving that context, or with\n `--host`; a workspace without a DDK host registers it with none. The contribution\n commands in the README add to it.\n- `kosui ddk:descriptor-project --name my-ncui --layout standard --ice true` (or `compact`) creates the\n NCUI descriptor project a new utility, setup step or navigation view is listed in;\n pass `--descriptorProject my-ncui` to `ddk:utility`, `ddk:setup` and `ddk:nav`. `ddk://guide/descriptor-project` lists what each layout and option writes.\n- `ddk://guide/storybook` for developing contributions in Storybook.\n- `ddk://guide/ddk-dev` for loading plugins into a running DDK.\n\n## Upgrading\n\n```sh\nkosui cli:update # kosui, and a global kos-ddk-cli\nnpm install -D @kosdev-code/kos-ddk-cli@latest # a workspace install\nkosui plugin install --client claude --scope user # both agent plugins\n```\n\n## When the ddk commands are missing\n\n- `kosui extensions` does not list the package: it is in neither the workspace's\n `package.json` nor the global install beside the `kosui` on your `PATH`\n (`npm ls -g @kosdev-code/kos-ddk-cli`).\n- It is listed as `incompatible`: `kosui` is older than the extension needs; update it.\n- It is listed as `disabled`: the workspace `.kos.json` names it in\n `cli.disabledExtensions`."
19237
19244
  },
19238
19245
  {
19239
19246
  "uri": "ddk://guide/storybook",
@@ -1,6 +1,6 @@
1
1
  import styled from '@emotion/styled';
2
2
  import {
3
- <% if (layout !== "fullscreen") { -%>
3
+ <% if (locals.layout !== "fullscreen") { -%>
4
4
  Button,
5
5
  Content,
6
6
  Footer,
@@ -29,7 +29,7 @@ const <%= namePascalCase %>Container = styled.section`
29
29
  width: 100%;
30
30
  `;
31
31
 
32
- <% if (layout === "fullscreen") { -%>
32
+ <% if (locals.layout === "fullscreen") { -%>
33
33
  /** A fullscreen utility: it covers the display and closes from its header. */
34
34
  export const <%= namePascalCase %>: Experience = kosComponent(({ onComplete }) => {
35
35
  const { t } = useKosTranslation('<%= appProject %>');