@camstack/develop 0.1.48 → 0.1.49

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 CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.1.49] - 2026-11-07
11
+
12
+ ### Changed
13
+
14
+ - The addon scaffold teaches the scoped settings declaration instead of naming the retired global settings hook
15
+
10
16
  ## [0.1.48] - 2026-11-06
11
17
 
12
18
  ### Changed
@@ -1,4 +1,5 @@
1
1
  import type { ScaffoldAddonOptions, ScaffoldAddonResult } from '../types.js';
2
+ export declare const INTEGRATION_NOTES: readonly string[];
2
3
  /**
3
4
  * Scaffold a new addon package under `packages/addon-<name>/`.
4
5
  * Aligned with `@camstack/nx-plugin:addon` templates, plus a vite.config.ts
@@ -1 +1 @@
1
- {"version":3,"file":"addon.d.ts","sourceRoot":"","sources":["../../src/scaffold/addon.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAkH5E;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,mBAAmB,CA6GhF"}
1
+ {"version":3,"file":"addon.d.ts","sourceRoot":"","sources":["../../src/scaffold/addon.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAwB5E,eAAO,MAAM,iBAAiB,EAAE,SAAS,MAAM,EAU9C,CAAA;AAgFD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,mBAAmB,CA6GhF"}
@@ -18,12 +18,12 @@ const KIND_EXAMPLE = {
18
18
  'service-integration': 'integration-service',
19
19
  exporter: 'ha-export',
20
20
  };
21
- const INTEGRATION_NOTES = [
21
+ export const INTEGRATION_NOTES = [
22
22
  'Public examples: `camstack/addon-examples` (`example-device-integration`, `example-service-integration`, `example-exporter`).',
23
23
  '',
24
24
  'Integration rules (D1007, D996, D1009):',
25
25
  '- The integration is a typed instance record served through `integration-instances`; a secret is a `password` field (`.meta({ secret: true })` on the kind).',
26
- '- No `globalSettingsSchema()`, no `integration_settings`, no `integrations.getSettings` / `setSettings` (retired).',
26
+ '- Addon-wide settings are scoped (D986): declare `scopedSettingsCapabilities()` plus `clusterSettingsSchema(cap)` / `nodeSettingsSchema(cap)` / `deviceDefaultsSchema(cap)`, and read or write them through `this.clusterSettings(cap, schema)` / `this.nodeSettings(cap, schema)` / `this.deviceDefaults(cap, schema)`. Callers go through `addonSettings.getScopedSettings` / `updateScopedSettings` / `readScopedValues`. No `integration_settings`, no `integrations.getSettings` / `setSettings` (retired).',
27
27
  '- Data changes go through a D987 migration with read-back, never a dual read path.',
28
28
  '- The Gateway is a SIBLING of the devices it brings, never their parent.',
29
29
  '- An exporter provides `integration-instances` and is multi-instance: minted ids, exposure keyed by instance id.',
@@ -324,8 +324,12 @@ import { BaseAddon, type ProviderRegistration } from '@camstack/types'
324
324
  // An addon has no settings page of its own (D1007). What an operator
325
325
  // configures is an integration INSTANCE (scaffold kind device-integration,
326
326
  // service-integration or exporter); a per-device setting lives in
327
- // ctx.settings.*DeviceStore. No on/off switch: the capability toggle is an
328
- // addon's ONE enable (D777).
327
+ // ctx.settings.*DeviceStore. A setting that belongs to a capability this
328
+ // addon provides is SCOPED (D986): list the capability in
329
+ // scopedSettingsCapabilities(), return its form from clusterSettingsSchema(cap)
330
+ // or nodeSettingsSchema(cap), and read/write it through this.clusterSettings(cap,
331
+ // schema) / this.nodeSettings(cap, schema). No on/off switch: the capability
332
+ // toggle is an addon's ONE enable (D777).
329
333
  type <%= className %>Config = Readonly<Record<string, never>>
330
334
 
331
335
  const DEFAULTS: <%= className %>Config = {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/develop",
3
- "version": "0.1.48",
3
+ "version": "0.1.49",
4
4
  "description": "CamStack developer tooling — catalogue, scaffold, validate, and example lookup shared by the CLI and MCP server.",
5
5
  "keywords": [
6
6
  "camstack",