Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions command-center-ai/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## Unreleased

Compatibility axes: remove the unreleased `ui/design-agent-icons-and-motion` skill and its
local guide and routing from this package. The skill and worked MetaTables example belong to
`ms-tau-sdk`. No npm public API, stylesheet class, browser storage key or value, installer
behavior, SDK peer range, or platform route or payload changes. No backend rollout or storage
migration is needed; existing agent icons and rendering defaults are unchanged.

## 0.0.17

Compatibility axes: additive npm API (`normalizeCommandCenterAgentIcon`, `primeAgentIcon`, the
Expand Down
4 changes: 2 additions & 2 deletions command-center-ai/tests/cli/agent-skills.node.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ test("the command installs into --path, -p, and --path=, previews with --dry-run
const args = form[0] === "--path=" ? [`--path=${project}`] : [form[0], project];
const install = spawnSync(process.execPath, [cliPath, "skills", "install", ...args], { encoding: "utf8" });
assert.equal(install.status, 0, install.stderr);
assert.match(install.stdout, /Installed 8 Command Center AI skill\(s\)/u);
assert.ok(install.stdout.includes(`Installed ${expectedSkills.length} Command Center AI skill(s)`));
assert.match(install.stdout, /Provenance: .*PINNED_FROM\.txt/u);
}

Expand Down Expand Up @@ -336,7 +336,7 @@ test("concurrent postinstalls into one repository both succeed and leave one int
);
for (const run of runs) {
assert.equal(run.status, 0, run.stderr);
assert.match(run.stdout, /Installed 8 agent skill\(s\)/u);
assert.ok(run.stdout.includes(`Installed ${expectedSkills.length} agent skill(s)`));
}

assert.deepEqual(await readdir(join(application, ".agents", "skills")), ["command-center-ai"]);
Expand Down
11 changes: 11 additions & 0 deletions command-center-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 0.5.19

- Add optional validated locale to v1 iframe initialization and live context. Older
hosts default to English; locale updates preserve authorization and child state.
- Add public `/localization` and `/localization/react` message adapters, English
defaults and live localization of resource controls and accessibility messages.
- Keep existing schema IDs, protocol versions and component overrides. External
strict validators receive the legacy payload unless their child advertises
`locale-context-v1`; locale-aware validators adopt the updated schema. No SDK-owned
language persistence or backend routes are added.

## 0.5.18

Compatibility axes: additive optional `titleLead` prop on `EntitySummaryProps` and the stylesheet
Expand Down
6 changes: 6 additions & 0 deletions command-center-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,3 +306,9 @@ example release workflow, and the installed `general/maintain-command-center-cod
- Major modules require a nearest README.
- Persisted contract, theme-ID, or protocol changes require an explicit compatibility and
backend/storage assessment.

## Localization

SDK 0.5.19 adds `/localization` and `/localization/react` for application-owned
translation adapters and English defaults across shared resource controls, plus
initial/live iframe locale. See [the localization guide](./docs/localization.md).
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,13 @@ disabled field, one dark and one light preset, 375×812 with a coarse pointer, a
- Do not attach handlers to a `Badge`.
- Do not style an anchor with button classes; links keep native semantics.
- Do not override SDK control variables or geometry and still claim conformance.

## Localize SDK messages (0.5.19+)

Wrap the application in `CommandCenterLocalizationProvider` from the public
`@dev-mainsequence/command-center-sdk/localization/react` entrypoint. Supply the
effective `locale` and a `TranslateSdkMessage` callback from `/localization`, backed
by the application catalog. Return undefined for missing keys to keep English
defaults; forward interpolation values and numeric `count` for whole-message plurals.
Explicit labels/renderers override the provider and remain application-owned.
The SDK creates no i18next instance or preference storage. See `docs/localization.md`.
Original file line number Diff line number Diff line change
Expand Up @@ -314,3 +314,18 @@ For platform requests, test the host's allow-list (`not_allowed` for other paths
JSON and binary responses, cancellation reaching the host's fetch, a user change, an older host's
`unsupported`, and that the platform receives only the host's origin and credential while no
platform credential reaches the child.

## Follow locale updates (SDK 0.5.19+)

Apply every `context.locale` update to the child translation instance. Use
`resolveCommandCenterLocale` from `/localization` for exact/base/English fallback
and update document language/direction. Hosts pass `locale` to `StaticSiteIframe`;
locale-only updates must preserve iframe, launch and authorization state. Use
`CommandCenterLocalizationProvider` from `/localization/react` to translate SDK
controls through the app's catalog; return undefined for missing messages to keep
English defaults. Read `docs/localization.md` for typed keys, interpolation/plurals,
and explicit component overrides. No SDK-owned persistence or i18next singleton.

Locale is negotiated by the SDK's ready capability `locale-context-v1`. Keep the
SDK-generated readiness message; raw legacy ready messages deliberately receive
legacy context without locale, preserving old strict schemas.
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,13 @@ npx command-center-sdk theme audit --path src

The React progress model is not a serialized SDK contract. Do not add backend fields, schemas, or
fixtures unless a separate contract-evolution task establishes a language-neutral wire format.

## Localize SDK messages (0.5.19+)

Wrap the application in `CommandCenterLocalizationProvider` from the public
`@dev-mainsequence/command-center-sdk/localization/react` entrypoint. Supply the
effective `locale` and a `TranslateSdkMessage` callback from `/localization`, backed
by the application catalog. Return undefined for missing keys to keep English
defaults; forward interpolation values and numeric `count` for whole-message plurals.
Explicit labels/renderers override the provider and remain application-owned.
The SDK creates no i18next instance or preference storage. See `docs/localization.md`.
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,13 @@ rerun `command-center-sdk skills sync --path . --json` so authentication, catalo
filesystem ownership errors remain explicit. For themed consumers, run `command-center-sdk theme
audit` and treat unknown tokens, literal fallbacks, and hardcoded semantic visual values as failed
verification.

## Localize SDK-owned messages

SDK 0.5.19 adds `/localization` (framework-neutral message keys/defaults and locale
helpers) and `/localization/react` (`CommandCenterLocalizationProvider` and
`useSdkTranslation`). Supply an application-owned translator and effective locale.
Forward numeric `count` for plurals; translate complete messages and accessibility
labels. Explicit component overrides win; absent translations fall back to English.
For embeds, apply every validated `onContext` locale without remounting the iframe
or providers. See `docs/localization.md`; persistence remains host/backend-owned.
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,13 @@ existing implementation.
Read [the application-shell standard](references/application-shell-standard.md) when migrating an
existing application or resolving ambiguous information architecture. Keep API clients, router,
permissions, readiness policy, and persistence in the consuming application.

## Localize SDK messages (0.5.19+)

Wrap the application in `CommandCenterLocalizationProvider` from the public
`@dev-mainsequence/command-center-sdk/localization/react` entrypoint. Supply the
effective `locale` and a `TranslateSdkMessage` callback from `/localization`, backed
by the application catalog. Return undefined for missing keys to keep English
defaults; forward interpolation values and numeric `count` for whole-message plurals.
Explicit labels/renderers override the provider and remain application-owned.
The SDK creates no i18next instance or preference storage. See `docs/localization.md`.
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,13 @@ statuses, charts, contrast, and nested-surface hierarchy.
Do not treat the theme audit as proof of page spacing or responsive geometry. When the application
uses `/layout`, run its public browser verifier through `$compose-command-center-page` as a separate
required check.

## Localize SDK-owned messages

SDK 0.5.19 adds `/localization` (framework-neutral message keys/defaults and locale
helpers) and `/localization/react` (`CommandCenterLocalizationProvider` and
`useSdkTranslation`). Supply an application-owned translator and effective locale.
Forward numeric `count` for plurals; translate complete messages and accessibility
labels. Explicit component overrides win; absent translations fall back to English.
For embeds, apply every validated `onContext` locale without remounting the iframe
or providers. See `docs/localization.md`; persistence remains host/backend-owned.
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,13 @@ outside this frontend view skill.
Test list action placement, disabled and pending state, detail action placement, every bulk
selection mode, defaults, confirmation text, allowed and blocked preflight, stale-request
cancellation, rediscovery, retry, transport failure, successful refresh, and selection cleanup.

## Localize SDK-owned messages

SDK 0.5.19 adds `/localization` (framework-neutral message keys/defaults and locale
helpers) and `/localization/react` (`CommandCenterLocalizationProvider` and
`useSdkTranslation`). Supply an application-owned translator and effective locale.
Forward numeric `count` for plurals; translate complete messages and accessibility
labels. Explicit component overrides win; absent translations fall back to English.
For embeds, apply every validated `onContext` locale without remounting the iframe
or providers. See `docs/localization.md`; persistence remains host/backend-owned.
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,13 @@ Enter selects, that each strip is one Tab stop, that a disabled tab is focusable
that a deep link to a hidden tab shows the first enabled tab without changing the URL, and that a
tab picked from More receives focus. Find tabs by their tab role or `data-cc-tab-id`. Confirm
unknown domain tab content does not take ownership of surrounding SDK chrome.

## Localize SDK messages (0.5.19+)

Wrap the application in `CommandCenterLocalizationProvider` from the public
`@dev-mainsequence/command-center-sdk/localization/react` entrypoint. Supply the
effective `locale` and a `TranslateSdkMessage` callback from `/localization`, backed
by the application catalog. Return undefined for missing keys to keep English
defaults; forward interpolation values and numeric `count` for whole-message plurals.
Explicit labels/renderers override the provider and remain application-owned.
The SDK creates no i18next instance or preference storage. See `docs/localization.md`.
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,13 @@ refresh. Verify backend column order preserves matching local renderers, generic
safe `value_path` plus `data_type`, stale discovery is cancelled, and pagination alone does not
refetch discovery. Confirm the screen is a thin resource definition and controller around
`ResourceListPage`.

## Localize SDK messages (0.5.19+)

Wrap the application in `CommandCenterLocalizationProvider` from the public
`@dev-mainsequence/command-center-sdk/localization/react` entrypoint. Supply the
effective `locale` and a `TranslateSdkMessage` callback from `/localization`, backed
by the application catalog. Return undefined for missing keys to keep English
defaults; forward interpolation values and numeric `count` for whole-message plurals.
Explicit labels/renderers override the provider and remain application-owned.
The SDK creates no i18next instance or preference storage. See `docs/localization.md`.
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,13 @@ Test keyboard navigation, focus return, search, loading, empty options, disabled
single/multiple updates, action invocation, portal placement, and narrow container behavior. For a
transfer list, test marking and moving by keyboard and pointer, "all shown" with a search, locked
choices, the `change` your application saves, and the stacked form at 375×812.

## Localize SDK messages (0.5.19+)

Wrap the application in `CommandCenterLocalizationProvider` from the public
`@dev-mainsequence/command-center-sdk/localization/react` entrypoint. Supply the
effective `locale` and a `TranslateSdkMessage` callback from `/localization`, backed
by the application catalog. Return undefined for missing keys to keep English
defaults; forward interpolation values and numeric `count` for whole-message plurals.
Explicit labels/renderers override the provider and remain application-owned.
The SDK creates no i18next instance or preference storage. See `docs/localization.md`.
10 changes: 10 additions & 0 deletions command-center-sdk/contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,13 @@ bounds characters, and enforce correlation, cancellation, in-flight limits, and
Schema filenames and contract IDs are immutable after release. Additive changes require fixtures;
breaking semantics require a new versioned schema, a migration plan, mixed-version tests, and a
coordinated frontend/backend rollout and rollback.

The iframe v1 initialize payload accepts optional `locale` (SDK 0.5.19). The
`initialize-locale` and `invalid-locale` fixtures cover the additive field; omitted
locale retains old-host compatibility and normalizes to English in the client.

Locale negotiation preserves strict legacy validators: new clients advertise
`ready.payload.capabilities: ["locale-context-v1"]`. The host includes locale only
for that capability. Missing/unknown capabilities retain the frozen legacy payload;
malformed declarations are rejected. The normalized new-client context still
defaults to English when an old host omits locale. See SDK ADR 019.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"channel": "mainsequence.portfolio-dashboard",
"version": 1,
"type": "initialize",
"payload": {
"theme": "dark",
"themeId": "main-sequence-space",
"user": {
"id": "user-public-uid",
"uid": "user-public-uid",
"user_uid": "user-public-uid"
},
"locale": "de_AT"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"channel": "mainsequence.portfolio-dashboard",
"version": 1,
"type": "ready",
"payload": {
"capabilities": "locale-context-v1"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"channel": "mainsequence.portfolio-dashboard",
"version": 1,
"type": "initialize",
"payload": {
"theme": "dark",
"themeId": "main-sequence-space",
"user": {
"id": "user-public-uid",
"uid": "user-public-uid",
"user_uid": "user-public-uid"
},
"locale": "de-AT"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"channel": "mainsequence.portfolio-dashboard",
"version": 1,
"type": "ready",
"payload": {
"capabilities": [
"locale-context-v1"
]
}
}
8 changes: 6 additions & 2 deletions command-center-sdk/contracts/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
"fixtures/valid/static-site-iframe-v1.platform-error-not-allowed.json",
"fixtures/valid/static-site-iframe-v1.platform-error-temporarily-unavailable.json",
"fixtures/valid/static-site-iframe-v1.platform-error-unsupported.json",
"fixtures/valid/static-site-iframe-v1.platform-cancel.json"
"fixtures/valid/static-site-iframe-v1.platform-cancel.json",
"fixtures/valid/static-site-iframe-v1.initialize-locale.json",
"fixtures/valid/static-site-iframe-v1.ready-locale-capability.json"
],
"invalid": [
"fixtures/invalid/static-site-iframe-v1.wrong-version.json",
Expand All @@ -66,7 +68,9 @@
"fixtures/invalid/static-site-iframe-v1.platform-response-extra-header.json",
"fixtures/invalid/static-site-iframe-v1.platform-response-invalid-status.json",
"fixtures/invalid/static-site-iframe-v1.platform-response-invalid-base64.json",
"fixtures/invalid/static-site-iframe-v1.platform-error-unknown-code.json"
"fixtures/invalid/static-site-iframe-v1.platform-error-unknown-code.json",
"fixtures/invalid/static-site-iframe-v1.invalid-locale.json",
"fixtures/invalid/static-site-iframe-v1.malformed-capabilities.json"
]
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
{
"properties": {
"type": { "const": "ready" },
"payload": { "type": "object" }
"payload": { "type": "object", "properties": { "capabilities": { "type": "array", "items": { "type": "string", "pattern": "\\S" } } } }
}
}
],
Expand All @@ -92,6 +92,7 @@
"properties": {
"theme": { "enum": ["dark", "light"] },
"themeId": { "type": "string", "minLength": 1 },
"locale": { "type": "string", "minLength": 2, "maxLength": 128, "pattern": "^[A-Za-z]{2,3}(?:-[A-Za-z]{4})?(?:-(?:[A-Za-z]{2}|[0-9]{3}))?$" },
"user": {
"oneOf": [
{ "type": "null" },
Expand Down
4 changes: 4 additions & 0 deletions command-center-sdk/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ view.
| Resource model | `/resource`, `/resource/react`, `/views` |
| Application chrome | `/navigation`, `/navigation/testing`, `/layout`, `/layout/testing`, `/feedback`, `/controls` |
| Visual language | `/theme`, `/theme/presets`, `/theme/data-viz`, theme CSS exports |
| Localization | `/localization`, `/localization/react` |
| Static-site integration | `/embed`, `/embed/react`, `/vite` |
| Language-neutral contracts | `/contracts`, `/contracts/manifest.json`, schemas and fixtures |

Expand Down Expand Up @@ -152,6 +153,7 @@ specific consuming-application task.
| Implement resource collections | [Backend contracts](./backend-contracts.md) | `contracts/implement-resource-collection-contract` |
| Implement bulk actions | [Backend contracts](./backend-contracts.md) | `contracts/implement-bulk-actions-contract` |
| Theme an application | [Themes](./themes.md) | `theme/theme-command-center-app` |
| Localize SDK controls and follow host language | [Localization](./localization.md) | `embed/integrate-static-site-iframe`, `controls/compose-command-center-controls` |
| Integrate a static site locally or as a hosted iframe | [Static-site embeds](./static-site-embeds.md) | `embed/integrate-static-site-iframe` |

Refresh packaged guidance after an upgrade or when lifecycle scripts were disabled:
Expand All @@ -169,3 +171,5 @@ These guides describe exports in the current package unless a section explicitly
ADRs explain decisions and may be marked `Proposed`. Do not treat a proposed identifier, message,
or code sample as a released capability. For the version actually installed in an application,
inspect its `package.json` exports, declarations, README, contract manifest, and changelog.

- [Localization](./localization.md): translate SDK messages and follow live host locale.
1 change: 1 addition & 0 deletions command-center-sdk/docs/adr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ owning application repositories; backend implementation decisions are out of sco
- [SDK ADR 015: Detail Tabs Own Their Keyboard, Panel, and Overflow](./adr-sdk-015-detail-tabs.md) — Accepted
- [SDK ADR 016: A Side-by-Side Transfer List for Choosing Many Items](./adr-sdk-016-transfer-list.md) — Accepted
- [SDK ADR 017: One Machine Session for Local Development](./adr-sdk-017-machine-session-for-local-development.md) — Accepted
- [SDK ADR 019: Locale Transport and Localization of SDK Controls](./adr-sdk-019-locale-transport-and-control-localization.md) — Accepted

## Rules

Expand Down
Loading
Loading