@nimiplatform/app-tools 0.6.2 → 0.7.5
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 +106 -10
- package/bin/nimi-app.mjs +6 -12
- package/lib/app-dependency-combinations.mjs +62 -0
- package/lib/app-doctor-update.mjs +18 -16
- package/lib/app-info.mjs +25 -2
- package/lib/app-lifecycle-guidance.mjs +4 -2
- package/lib/app-pack.mjs +5 -2
- package/lib/app-project-lifecycle.mjs +208 -50
- package/lib/app-safety-profile.mjs +204 -0
- package/lib/app-scaffold-capabilities.mjs +8 -0
- package/lib/app-scaffold-profiles.mjs +44 -4
- package/lib/app-scaffold.mjs +2 -1
- package/lib/canonical-capability-ids.generated.mjs +21 -0
- package/lib/index.mjs +0 -4
- package/package.json +7 -12
- package/scripts/dev-shell.mjs +20 -2
- package/skills/nimi-app-lifecycle/SKILL.md +7 -3
- package/skills/nimi-app-lifecycle/references/acceptance.md +6 -0
- package/skills/nimi-app-lifecycle/references/adapt.md +46 -1
- package/skills/nimi-app-lifecycle/references/audit.md +55 -0
- package/skills/nimi-app-lifecycle/references/platform-gaps.md +15 -0
- package/skills/nimi-app-lifecycle/references/release.md +3 -1
- package/skills/nimi-app-lifecycle/references/safety-declaration.md +37 -0
- package/skills/nimi-app-lifecycle/references/upgrade-platform.md +2 -2
- package/templates/app-source/src/studio-modules/studio-voice/parameters.ts +8 -10
- package/templates/default-starter/AGENTS.md +4 -2
- package/templates/default-starter/README.md +1 -1
- package/lib/simulator-conformance-ast.mjs +0 -498
- package/lib/simulator-conformance-css.mjs +0 -116
- package/lib/simulator-conformance-graph.mjs +0 -757
- package/lib/simulator-conformance.d.mts +0 -14
- package/lib/simulator-conformance.mjs +0 -203
- package/lib/simulator-css-profile.d.mts +0 -27
- package/lib/simulator-css-profile.mjs +0 -531
- package/lib/simulator-kit-export-resolution.mjs +0 -70
- package/lib/simulator-manifest.mjs +0 -334
|
@@ -1,19 +1,58 @@
|
|
|
1
1
|
# Existing project
|
|
2
2
|
|
|
3
|
+
When starting from an earlier assessment, apply [Audit handoff](audit.md#handoff-to-implementation): reuse confirmed user decisions and sufficient evidence, and check the assumptions relevant to the next consequential change. An audit recommendation does not become a platform contract or a reason to preserve a disproved design.
|
|
4
|
+
|
|
3
5
|
Before changing code, identify the upstream URL and baseline commit, license, user journeys, actual AI/auth/storage entry points, business services, helper processes and active instruction loaders. Record a short upstream/range note in the existing App README or product document; do not create another integration state file.
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
For a complete App adaptation, account for the original product entry, business settings, input/output formats, recovery and editing handoffs. Restore the required original journeys on the Nimi integration. A capability demo or generated workbench is not a replacement for the existing product, and passing its sample task does not complete the App adaptation.
|
|
8
|
+
|
|
9
|
+
Match the core journeys' required inputs and outputs against the selected SDK/Kit public contracts before substantial conversion. A request option or scaffold feature name does not prove that a usable result is supported. Consult the SDK README's support boundaries and the selected resource's capabilities; distinguish missing configuration, unclear documentation, an existing-contract defect, and a required new platform capability. Use a small real protected call only where it can resolve the remaining question. If the task excludes new platform capabilities, a required missing capability makes the candidate unsuitable; report it without shrinking the product or continuing with a private inference bypass. Code-level absence of a required operation does not need a running Desktop to be reported, while an unavailable Desktop is only a launch prerequisite failure.
|
|
10
|
+
|
|
11
|
+
If the task includes Nimi expansion or repair and a required gap is found, follow [Platform gaps](platform-gaps.md), then return to the original App workflow with the delivered shared fix. Existing authorization covers that work; a missing capability is not automatically the end of adaptation.
|
|
12
|
+
|
|
13
|
+
Install a selected app-tools package and read this package skill before init. For local SDK/Kit/app-tools iteration, use the complete tarball override workflow in its README; do not wait for publication or link to the source workspace. Install its matching SDK/Kit and exact nimi-coding. Follow the package's manifest version matrix and use the lockfile to pin actual resolutions.
|
|
14
|
+
|
|
15
|
+
When adopting Kit UI, compile `@nimiplatform/kit/ui/styles.css` in the same
|
|
16
|
+
Tailwind 4 CSS entry as `@import 'tailwindcss'`, and include the appropriate
|
|
17
|
+
Kit foundation theme. A separate JavaScript CSS import can leave Kit utilities
|
|
18
|
+
uncompiled. Verify a long model list and its confirmation button in the real
|
|
19
|
+
App before treating an overflow or transparent dialog as a missing primitive;
|
|
20
|
+
follow the Kit README rather than adding App-local overlay overrides.
|
|
21
|
+
|
|
22
|
+
Before writing Nimi foundation wiring, use that same app-tools package to generate a minimal reference App with its own identity under `.nimi/local/`. Choose the smallest admitted feature closure that exposes the needed session, App Access, AIConfig and AI call surfaces; use `nimi-app --help` for the actual features and create options. Install the same SDK/Kit/native package combination in the reference, then run its generated setup and Desktop-supervised path. Start from its working Host, preload, renderer bridge and public client calls when integrating the existing App. Align or reuse that code; do not reconstruct these foundation pieces freely from API prose. SDK/Kit documentation defines the contracts and fills gaps in the generated implementation.
|
|
23
|
+
|
|
24
|
+
When installation and launch are in scope, establish the reference's local installed Access baseline using the acceptance guide before attributing an installed failure to App wiring. A reference failure under the same conditions points to the toolchain or environment; a passing reference makes its wiring differences with the App the next inspection target. Direct evidence of a platform defect remains actionable. Reuse current passing reference results; repeat this baseline for first integration or affected foundation changes, not ordinary business edits. Record only the necessary result in existing project notes, with no extra proof files or state ledger. Missing prerequisites pause the dependent wiring checks, not independent product restoration.
|
|
25
|
+
|
|
26
|
+
Prepare the existing App's actual pnpm/Electron Host, renderer and test/production-build commands from that integration. Preserve its framework and business code where they fit; do not make init manufacture a test success or convert a server deployment implicitly.
|
|
27
|
+
|
|
28
|
+
Prepare the actual Electron binary as well as its npm wrapper. The matched Electron 42 package exposes `install-electron` and has no package lifecycle script, so `pnpm rebuild electron` does not install its binary. Run `pnpm exec install-electron --no` from the App. The official fresh scaffold uses `postinstall: "install-electron --no"`; an adopted App owns its existing installation hooks, so add that step to the App's normal setup without discarding other postinstall work. Do not use the installer's `--help` as a read-only probe: this version does not parse that flag.
|
|
6
29
|
|
|
7
30
|
For a Next.js or other existing renderer, declare the framework-neutral `electron-pnpm` build profile and a real `dev:renderer` package script serving the manifest's loopback origin. Init/sync preserve that command and the App's build owners. The official `dev` launcher still asks Desktop to supervise the Host; `build:electron` must produce `dist-electron/main.js`. Keep any required local backend under App lifecycle management. A Desktop that still requires the old exact Vite command must be upgraded before this project's real launch; do not add an empty Vite server or lose server routes to pass checks.
|
|
8
31
|
|
|
32
|
+
For a helper process's text/JSON pipes, make UTF-8 explicit for the initial request, callback replies and output. A frozen Python worker should decode and encode the byte streams strictly; interpreter environment settings alone may not govern its text streams. Verify non-ASCII data in the actual packaged worker and at its business consumer, such as saved configuration: a matching wire round trip can hide reciprocal decoding and encoding errors.
|
|
33
|
+
|
|
9
34
|
If Host sources live outside the scaffold's `src-electron`, declare the actual project-relative directory in `nimi.app.yaml` as `local_development.electron.host_source_directory` (for example `electron`). The directory must exist inside the project. Desktop validates it before launch and watches it for Host rebuilds; init/sync retain it. Keep the upstream source layout instead of adding a placeholder directory.
|
|
10
35
|
|
|
11
36
|
Use `pnpm exec nimi-app init --adopt --dry-run --json`, then apply without `--dry-run` once the changes fit the authorized scope. Existing nimi.app.yaml and `.nimi/config/build-profile.yaml` are the inputs. If either is absent, supply `--input <json-path>` with only `manifest` and/or `build_profile`, using their existing schemas from the app-tools README. A file under `.nimi/local/` is sufficient. Input supplied alongside an existing file must agree with it. Target paths are declarations at init; build/pack later verify real artifacts.
|
|
12
37
|
|
|
13
38
|
Review the exact dependency, dev/renderer/pack script and workflow changes. Existing Host and business code, README and license remain App-owned; no fresh intent/lock is created. An unknown same-name skill/workflow or broken managed block requires a bounded cleanup, not forced takeover. Install normalized dependencies, sync/check, then run affected tests and the official App journey.
|
|
14
39
|
|
|
40
|
+
Preserve the Electron `--user-data-dir` supplied by Desktop during supervised development. Do not replace it with an App's fixed `app.setPath('userData', ...)`: Desktop discovers the ephemeral CDP port from that profile's `DevToolsActivePort` file. Keep business databases and media in their declared App-owned storage, separately from the Electron profile. A `local-development-cdp-port-unavailable` error can mean that the Host exited early or moved that profile; a DevTools listening line alone does not establish successful supervision. Inspect the actual Host startup error and retry the normal launcher after fixing it. Also verify icons, preload and business-process resource paths from the built Host entry, since bundling can change their directory base.
|
|
41
|
+
|
|
42
|
+
Browser localStorage and IndexedDB are Host-profile data, not the SDK's Nimi-mediated JSON/asset partition. The installed launch does not supply the development profile, so do not promise automatic transfer of browser drafts from development to installation. For `app-owned-os-storage`, disclose the actual stable OS roots used by the packaged Host. It may explicitly place its packaged Electron profile beneath an already disclosed App-owned root, while preserving Desktop's development override. Alternatively, verify and disclose its actual default profile location; an App display name alone is not evidence of that path. Do not put Nimi's private development-profile layout in an App manifest. Keep important projects in the App's declared durable storage and use its normal project export/open workflow across those separate profiles; verify restart retention before promising it.
|
|
43
|
+
|
|
15
44
|
## Map only the capabilities the product uses
|
|
16
45
|
|
|
46
|
+
For an existing Electron custom renderer protocol, compose its privileged scheme
|
|
47
|
+
with Kit's public `NIMI_ELECTRON_APP_ASSET_PROTOCOL_REGISTRATION` in one
|
|
48
|
+
`protocol.registerSchemesAsPrivileged` call before `app.ready`. Electron permits
|
|
49
|
+
that registration only once; do not first register the App scheme and then call
|
|
50
|
+
`registerNimiElectronAppAssetProtocolScheme`. The helper is for a Host without
|
|
51
|
+
other privileged schemes. Follow the Kit Electron README's composition example,
|
|
52
|
+
retain the App's exact renderer URL, and verify its installed renderer can fetch
|
|
53
|
+
the business API as well as use Nimi IPC. A listening worker or a passing file-URL
|
|
54
|
+
reference does not cover this custom-protocol path.
|
|
55
|
+
|
|
17
56
|
- Renderer code can use `createNimiClient` with Kit's `createNimiLocalAppStandardShellSurface`. Node business work uses `registerNimiElectronAppBridge(...).services` from the same protected Host, fixed app commands and session invalidation callbacks. Consult the installed SDK/Kit public types for exact inputs.
|
|
18
57
|
- Keep the App's tool loop, IDs, ordered tool results and any opaque continuity needed in subsequent turns. An SDK model step does not run business callbacks.
|
|
19
58
|
- For an existing Vercel AI SDK 6 App, use the matching independent `@nimiplatform/sdk-adapter-vercel-ai` package and its Host-bound Local App factory. Read its README for image upload and complete UI message metadata; keep `useChat`/`streamText` and App-owned tools instead of rebuilding their wire protocol inside the App.
|
|
@@ -25,5 +64,11 @@ For an existing App, a generic `/api/...` route or provider `/v1/...` URL alone
|
|
|
25
64
|
does not prove a Nimi Realm/Runtime bypass. The checker retains explicit
|
|
26
65
|
protected-custody/private-import checks; review actual product call paths to
|
|
27
66
|
establish Nimi AI routing. Do not edit vendor code just to remove a keyword.
|
|
67
|
+
App-owned login and refresh route literals are not Realm identity evidence.
|
|
68
|
+
Python virtual environments identified by `pyvenv.cfg` are installed dependency
|
|
69
|
+
trees, not App source; their bundled web clients do not establish App custody.
|
|
70
|
+
Custom `.next-*` output trees with Next build/routes manifests and server/static
|
|
71
|
+
directories (including the `dev` layout) are also excluded. A similarly named
|
|
72
|
+
App source directory without those output markers remains checked.
|
|
28
73
|
|
|
29
74
|
Separate development instructions from product-operation guides, including other host entry files actually used by the repository. Upstream supplier examples may remain as knowledge; check the active product/agent route instead of deleting by keyword. Keep unimplemented original workflows explicit rather than counting a visible menu or retained source as completion.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Adaptation feasibility and cost audit
|
|
2
|
+
|
|
3
|
+
Use this guide when the user wants to decide whether to adapt an App, assess Nimi capability fit, or obtain a costed implementation plan. The output is decision evidence. A future desire to adapt does not authorize current product/spec edits, init/sync, installation or release. Source retrieval and bounded checks may support the audit; use the user's actual scope and resources. If implementation is explicitly included, continue it after the necessary decisions rather than asking for the same authorization again.
|
|
4
|
+
|
|
5
|
+
## Establish scope and the existing route
|
|
6
|
+
|
|
7
|
+
For an unspecified Nimi ecosystem adaptation, assess preserving the core product tasks and connecting them through the formal SDK/Kit App carrier. State this working scope and proceed. Respect an explicit model-only, server or other target. Ask only about a material unresolved choice; do not introduce backend removal or a full rewrite as a default option.
|
|
8
|
+
|
|
9
|
+
Pin the upstream revision and the Nimi source/package combination available to this audit. Note only local uncommitted changes relevant to a conclusion. Distinguish current source capability from what the selected installed or published packages expose.
|
|
10
|
+
|
|
11
|
+
Read the target's nearest instructions, package manifests and actual product entry to identify its core tasks. Then establish Nimi's existing public consumption route from the selected lifecycle guidance, SDK public types/support notes, and the implicated Kit Host entry before estimating integration work. Host business services and existing framework adapters are reusable inputs, not discoveries to defer until after a broad platform search. This reading does not require installing a package or initializing the target App.
|
|
12
|
+
|
|
13
|
+
Trace the App's actual task and AI call paths: required inputs/outputs, tool and structured-output behavior, retrieval and persisted results, cancellation/recovery, and any helper-process or hosting boundaries that the task uses. For each material need, identify whether it is essential to the requested user task, an explicitly selected option, conditional on a provider/backend, or an implementation detail of the old foundation. Use actual consumers, defaults and activation conditions as evidence. Defaults alone do not define importance: an optional feature is required when the user's requested workflow depends on it. Do not turn every reachable code path into mandatory adaptation scope, or silently remove a selected feature to make the assessment easier.
|
|
14
|
+
|
|
15
|
+
Follow the unresolved dependency into its exact Nimi owner. Start with bounded files and symbols; do not enumerate unrelated Apps, read the whole authority corpus or repeatedly dump broad source slices. Existing adaptation history is useful only when it resolves a specific reuse or failure question. Read direct package manifests before choosing runnable checks.
|
|
16
|
+
|
|
17
|
+
## Classify fit before proposing work
|
|
18
|
+
|
|
19
|
+
For each behavior in scope, connect the App consumer and expected result to the Nimi public contract, actual execution/carrier support and applicable conditions. A blocker must name the workflow, option or delivery stage it blocks. Separate preserving a user capability from reproducing an old provider/configuration control; a difference in controls does not by itself establish that Nimi's configuration ownership must expand. Distinguish:
|
|
20
|
+
|
|
21
|
+
- Existing support and the configuration or documented usage needed to use it.
|
|
22
|
+
- An existing-contract implementation defect, or a missing SDK/Kit/native/framework carrier.
|
|
23
|
+
- A missing exact Driver/adapter behavior, a contract-local feature/result extension, or an independent new CapabilityContract.
|
|
24
|
+
- App-owned business work, deployment prerequisites, and model-content quality.
|
|
25
|
+
- An unresolved question whose evidence is not yet sufficient.
|
|
26
|
+
|
|
27
|
+
Check a proposed public call through its admission, allowed execution mode and dispatch to the required result. A request union or projection branch may still describe a path rejected by the owner. An available alternative mode is usable only if it satisfies the workflow's required interaction and lifetime. Catalog membership, a method name or a previous success alone does not prove the combination; unread code, missing setup or an unrun platform does not prove absence. A code-confirmed missing operation does not require Desktop startup to report.
|
|
28
|
+
|
|
29
|
+
Use current Nimi authority for semantic ownership and source/tests for actual implementation. For example, distinguish the App's tool loop from Runtime model execution, a framework adapter from a provider Driver, and task data from canonical long-term Memory/Knowledge. Do not preassign every backend subsystem to Runtime or count shared SDK/Kit behavior as new App-specific work.
|
|
30
|
+
|
|
31
|
+
Estimate residual work after reuse for the stated scope. Keep App integration, shared Nimi changes and environment/acceptance costs distinct. When options materially change effort, separate the viable core journey, selected extensions and conditional coverage increments rather than summing every upstream option into one headline. A full-coverage estimate is useful when clearly labeled; it is not automatically the entry cost or an accepted scope. State the effort basis, assumptions and confidence, using comparable work where available; do not equate human person-weeks with AI-assisted elapsed time. If the basis is weak, give difficulty and decisive uncertainties instead of a precise schedule. A bounded prototype is useful only when its answer could change the decision, not as another mandatory audit gate.
|
|
32
|
+
|
|
33
|
+
## Use proportionate evidence
|
|
34
|
+
|
|
35
|
+
Run a bounded check only to resolve an uncertainty that affects the decision. Do not create a reference App, install models, execute the whole product/release journey or run broad suites just to begin an audit. If a real protected call is necessary and within scope, use the supported owner path; otherwise state the dependent limitation and continue the rest of the assessment.
|
|
36
|
+
|
|
37
|
+
For material conclusions, identify the evidence kind: declared contract, inspected implementation, actual execution, applicable prior evidence, or hypothesis. Cite the relevant revision and code/rule or run where useful. Keep unexecuted paths NOT-VERIFIED and make unknowns local to the affected claim. Existing successful evidence is not erased merely because this auditor did not rerun it.
|
|
38
|
+
|
|
39
|
+
## Deliver a decision-ready report
|
|
40
|
+
|
|
41
|
+
Scale detail to the requested audit depth. Lead with whether the App is a good candidate now, conditional on specific extensions, unsuitable under the stated constraints, or awaiting a named decisive fact. Explain the core tasks and architecture needed to understand that conclusion.
|
|
42
|
+
|
|
43
|
+
Include a requirement-to-Nimi mapping with the consumer, necessity/activation condition, required result, usable route and mode, gap classification, proposed owner/change and evidence. Separate confirmed blockers from assumptions and recommendations, including in interim updates. Tie costs and the implementation sequence to the same scope and actual dependencies; optional platform work need not block an independent core journey. Include stage-specific acceptance and likely reusable platform gains. Compare alternatives only for real unresolved decisions.
|
|
44
|
+
|
|
45
|
+
Preserve the user's product scope. Do not make a candidate appear feasible by dropping a core workflow, changing an explicitly required deployment or assuming an unsupported model behavior. Do not promise whole-product acceptance from protocol tests. Keep the report in the requested deliverable or existing project notes, not a new approval or evidence system.
|
|
46
|
+
|
|
47
|
+
## Handoff to implementation
|
|
48
|
+
|
|
49
|
+
An audit is a revision-scoped assessment, not canonical product authority. The user's confirmed goals, constraints and selected direction persist; report recommendations, inferred gaps and estimates remain evidence-dependent. Authorizing work from an audit does not make every assertion in it true or override current owner contracts.
|
|
50
|
+
|
|
51
|
+
Before a consequential implementation choice, check the particular assumptions it depends on against the current contract, implementation and confirmed scope. Reuse sufficient evidence where those inputs still match. Revisit a claim when they changed, a contradiction appears, or the original basis was hypothetical or did not cover the decision. Preserve conditions such as a selected optional feature or full-coverage target; neither a broad estimate nor a recommendation turns every listed extension into a prerequisite. Do not restart the whole audit or seek blanket reapproval.
|
|
52
|
+
|
|
53
|
+
When current evidence disproves a claim, correct the plan and estimate within the authorized scope, explain the changed basis, and clearly supersede that claim in the existing current summary. Ask only if resolving the contradiction would materially change the user's confirmed outcome or scope. Never implement an obsolete or false claim merely because the audit used definitive wording or the user said to proceed with its plan.
|
|
54
|
+
|
|
55
|
+
Carry these distinctions through task handoffs and context summaries: user decision versus recommendation, observed fact versus hypothesis, and applicable revision/conditions versus broader unknowns. Do not shorten 'possibly missing' to 'missing', 'recommended' to 'required', or 'not run' to 'unsupported'. Link to the evidence instead of repeating a conclusion until it appears authoritative. Implementation continues through [Adapt](adapt.md) and, when needed, [Platform gaps](platform-gaps.md).
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Platform gaps during App work
|
|
2
|
+
|
|
3
|
+
For a request limited to feasibility, capability fit or cost, use [Audit](audit.md) and report the gap and proposal. The implementation loop below requires implementation authorization. When continuing from an assessment, use [Audit handoff](audit.md#handoff-to-implementation).
|
|
4
|
+
|
|
5
|
+
Start with the original user task, the condition that requires the behavior, and the selected public SDK/Kit inputs and outputs. Distinguish configuration, documentation, an existing-contract defect, a missing carrier or implementation behavior, and a required new capability. State which selected workflow the gap blocks; an optional backend or old configuration control is not automatically a platform requirement, while an explicitly required feature cannot be dropped. Keep model-content quality separate from a broken contract or App regression. A generated sample succeeding does not establish that the App's required result is available.
|
|
6
|
+
|
|
7
|
+
When the user has authorized adapting the App and extending or fixing Nimi as needed, continue the platform work under that authorization. Enter the Nimi repository through its AGENTS.md and `nimi-app-runtime-evolution` skill, or give the platform owner the bounded gap when source work is outside this task's resources. App Tools does not create or own a cross-repository task workflow. If new platform capabilities are excluded, report the unmet requirement without silently removing the workflow or introducing App-owned inference.
|
|
8
|
+
|
|
9
|
+
Supply the affected public call and package combination, the actual required input/output or a minimal representative input, expected and observed behavior, and available typed failure/trace. Preserve the original input for the return check. Reuse existing project notes; avoid secrets and unnecessary user data in shared diagnostics. Missing Desktop is a launch prerequisite, not a reason to withhold a code-confirmed missing operation. A same-package reference can isolate foundation differences but cannot rule out a platform defect.
|
|
10
|
+
|
|
11
|
+
The platform owner decides whether the gap belongs to Runtime execution, SDK/Kit/native projection, a framework adapter, or App Tools. App workflows, tool callbacks, subtitle/media composition and project recovery remain App-owned. Do not copy Runtime internals or install a private forwarding API while waiting for the shared fix.
|
|
12
|
+
|
|
13
|
+
Consume the returned complete package combination using [Platform upgrade](upgrade-platform.md). Package consumption does not require a Nimi source dependency or public publication; authorized platform development can still inspect and change its own source. Keep the existing tarball, lock and native-profile boundaries. Reuse unaffected tests and baseline results, then return to the original App task and verify the actual downstream result through [Acceptance](acceptance.md).
|
|
14
|
+
|
|
15
|
+
Close the bounded platform issue with the shared fix or clarified usage, its regression, the tested combination and the App return result. Distinguish evidence obtained now, reusable prior evidence, and remaining NOT-VERIFIED paths. Keep the current delivery summary separate from historical notes; completing one platform gap does not declare the ongoing App adaptation finished.
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# Release and Registry
|
|
2
2
|
|
|
3
|
-
Before
|
|
3
|
+
Before public release, use public dependencies and frozen locks, complete portable App information and existing notices, and build/pack on the declared OS/architecture. Reuse `nimi-app check --production`, `test`, `build --target <target> --production`, and `pack --target <target> --production`. Local check does not establish GitHub settings or a release. Local installed-App acceptance can precede this with complete local npm tarballs and `pack --production`; follow the acceptance guide without requiring publication first.
|
|
4
4
|
|
|
5
5
|
The packaged root `LICENSE` must match the reviewed source file byte for byte. New scaffolds include `LICENSE -text` in `.gitattributes`; for an existing repository, retain its other attributes and add that rule before tagging. It preserves the Git blob's original bytes when Windows would otherwise convert LF to CRLF. Registry checks the exact published package against the tagged source.
|
|
6
6
|
|
|
7
|
+
Electron packages must unpack native add-ons and their companion shared libraries with their relative layout intact. The scaffold uses `asar: { unpack: '**/*.{node,dylib,dll}' }` for the supported Mac/Windows targets. Existing App-owned packagers need the equivalent rule: unpacking only `.node` leaves libraries such as Sharp's libvips inside ASAR, where the OS loader cannot find them. Verify native loading from the packaged layout; a successful source launch or build alone does not prove that layout works.
|
|
8
|
+
|
|
7
9
|
Follow the [publisher setup guide](https://github.com/nimiplatform/nimi/blob/main/app-tools/README.md#publishing-on-github) before the first tag. Its `NIMI_REPOSITORY_ADMIN_TOKEN` needs only **Administration: Read-only** to check tag protection and Release immutability; actual Release uploads use GitHub's built-in token, which lacks that administration permission. A secret configured in another App repository is not inherited. Check real settings when publication is in scope. Keep App package/manifest versions equal and the annotated `v<version>` tag on a commit in the actual canonical default-branch history. Publish only with the user's existing authorization; fixing a local check does not authorize a new release.
|
|
8
10
|
|
|
9
11
|
The managed tag workflow owns production tests, target artifacts, attestations and immutable Release execution. Manual dispatch is a development build. Reuse its final Release/asset verification; a code change needs a new version, not a moved tag. Do not add local publish or another App production workflow.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Safety declaration
|
|
2
|
+
|
|
3
|
+
`nimi.app.yaml` `safety_profile` is the only author input for the App's safety declaration. It states, for the exact version being released, what the App actually provides: intended audience, content descriptors, AI interaction and output facts with the current presence of notices and markings, bounded data/sharing/account/commercial practices, and high-impact decision uses. App Tools projects it one way into `app-info.json`, the archive declaration, the exact sidecar and the candidate; do not maintain a second copy in `.nimi/admission/submission.yaml` — sync regenerates that copy and check rejects a hand-edited one.
|
|
4
|
+
|
|
5
|
+
Omit the field entirely while it is not yet declared. Absence means undeclared; it is never an empty risk list or a platform safety default. Local dev, test, build and pack, private packages and local import stay usable without it. New public Registry admission requires the complete declaration, so declare it before preparing a public submission.
|
|
6
|
+
|
|
7
|
+
Declare facts, not proofs. `absent` is a legitimate value for a notice or marking, and `present` means the supported paths uniformly provide it (declare `absent` when only some do). Audience is publisher positioning, not legal age verification. Descriptors cover provided functionality, default content and reasonably foreseeable ordinary use, not every possible model output. Capability names never imply declaration values: a `voice.create` reference does not require an `audio` output entry or a voice-replication risk feature. Do not add marking code, scanners, age checks or business SDK calls to satisfy the declaration.
|
|
8
|
+
|
|
9
|
+
Shape (every field is required when the block is present; lists may be empty; unknown keys are rejected):
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
safety_profile:
|
|
13
|
+
intended_audience: general # children | general | teen | adult
|
|
14
|
+
content_descriptors: [] # sexual-content, violence, self-harm, drugs-alcohol, gambling, hate-harassment, frightening-content, strong-language, unmoderated-shared-content
|
|
15
|
+
ai:
|
|
16
|
+
direct_interaction: true # interaction_notice is present|absent when true, not-applicable when false
|
|
17
|
+
interaction_notice: absent
|
|
18
|
+
risk_features: [] # realistic-face-manipulation, realistic-voice-replication, emotion-recognition, biometric-categorization
|
|
19
|
+
subject_notice: not-applicable # present|absent only with emotion-recognition or biometric-categorization
|
|
20
|
+
outputs: # at most one entry per modality; empty when the App produces no AI output
|
|
21
|
+
- modality: text # text | image | audio | video | virtual-scene
|
|
22
|
+
exposure: exportable # in-app-only | exportable | publishable
|
|
23
|
+
publication_control: not-applicable # user-confirmed|automatic only for publishable
|
|
24
|
+
in_product_notice: absent # present | absent
|
|
25
|
+
export_visible_marking: absent # present | absent; not-applicable only for in-app-only
|
|
26
|
+
machine_readable_marking: absent
|
|
27
|
+
data_practices:
|
|
28
|
+
publisher_direct_external_network: false # publisher-controlled network outside Nimi-owned carriers
|
|
29
|
+
telemetry: [] # crash-diagnostics, usage-analytics
|
|
30
|
+
third_party_account: none # none | optional | required
|
|
31
|
+
user_content_sharing: none # none | private | public
|
|
32
|
+
commercial_features: [] # purchase, subscription, advertising
|
|
33
|
+
sensitive_data_categories: [] # precise-location, contacts, health, financial, biometric, government-identifier
|
|
34
|
+
high_impact_decision_uses: [] # medical-diagnosis-treatment, legal-decision-support, employment-decision, education-admission-decision, credit-insurance-decision, biometric-identification, public-safety-decision
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Cross-target differences merge into one declaration: union the lists, choose the more open exposure, prefer `automatic` over `user-confirmed`, and use the conservative `absent` for notices and markings. Update only the fields whose facts changed; unchanged facts need no new material. Structure and version consistency are checked by tools; the truth of the declaration is the publisher's responsibility and is reviewed against concrete evidence, not proven exhaustively.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Platform upgrade
|
|
2
2
|
|
|
3
|
-
Read the current and selected target app-tools version matrix plus SDK/Kit migration notes.
|
|
3
|
+
Read the current and selected target app-tools version matrix plus SDK/Kit migration notes. App-side package consumption uses complete npm tarballs through explicit pnpm-workspace overrides, without depending on the Nimi source checkout or requiring publication. For an authorized platform repair or extension, follow [Platform gaps](platform-gaps.md). Sync preserves package selections; check validates installed identities/versions and lock resolutions. Use normal dev/test/build/pack during iteration. Public release preflight is a later step using registry resolutions, after development acceptance.
|
|
4
4
|
|
|
5
5
|
Install the target app-tools and its exact nimi-coding first. The App-local nimi-coding executable performs its own projections, so running an old installed executable is not a target-version sync. Use the target tool for `nimi-app sync --dry-run --json`; this previews app-tools files and lists the separate owner step without pretending to preview nimi-coding's internals.
|
|
6
6
|
|
|
7
7
|
Review App-owned instructions outside managed blocks when the upgrade changes an ownership boundary or command. Correct obsolete routing against the current owner; adding another conflicting paragraph is not a migration of those instructions.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Upgrading app-tools does not by itself move an existing App's SDK/Kit combination: sync preserves a supported combination and check rejects an unlisted SDK x Kit pairing rather than normalizing it. Selecting a new SDK/Kit combination is a deliberate App decision. When it is made, migrate the affected App-owned API uses, run sync, then install the full normalized dependency set and regenerate the package-manager lockfile. Run check and the relevant tests/build and real journey. Fresh scaffold identity and direct features remain fixed; the tool updates derived version/matrix projections. Existing Apps continue without a fresh lock.
|
|
10
10
|
|
|
11
11
|
For existing Apps, sync preserves the exact `package.json` text when its managed values are already current. A project formatter's whitespace or key ordering alone is not drift; actual managed value changes are still synchronized.
|
|
12
12
|
|
|
@@ -49,29 +49,27 @@ export type StudioVoiceCreateParameters = {
|
|
|
49
49
|
export const MAX_STUDIO_AUDIO_UPLOAD_BYTES = 32 * 1024 * 1024;
|
|
50
50
|
export const MAX_STUDIO_VOICE_REFERENCE_AUDIO_BYTES = 20 * 1024 * 1024;
|
|
51
51
|
|
|
52
|
-
const LOCAL_PRESET_CLOUD_CONFIGURABLE = Object.freeze({
|
|
53
|
-
local: { kind: 'fixed', value: 'preset' } as const,
|
|
54
|
-
cloud: SUPPORTED_STUDIO_PARAMETER,
|
|
55
|
-
});
|
|
56
52
|
const LOCAL_TEXT_CLOUD_CONFIGURABLE = Object.freeze({
|
|
57
53
|
local: { kind: 'fixed', value: 'text' } as const,
|
|
58
54
|
cloud: SUPPORTED_STUDIO_PARAMETER,
|
|
59
55
|
});
|
|
60
56
|
|
|
57
|
+
// Route-level availability does not promise support from every selected model.
|
|
58
|
+
// Runtime validates the exact voice, format, language and timing request.
|
|
61
59
|
export const studioSpeechSynthesizeParameters = defineStudioParameters<StudioSpeechSynthesizeParameters>({
|
|
62
60
|
initial: () => ({}),
|
|
63
61
|
routeMatrix: {
|
|
64
|
-
voiceKind:
|
|
62
|
+
voiceKind: LOCAL_AND_CLOUD_STUDIO_PARAMETER,
|
|
65
63
|
voicePreset: LOCAL_AND_CLOUD_STUDIO_PARAMETER,
|
|
66
|
-
voiceAssetId:
|
|
67
|
-
language:
|
|
68
|
-
audioFormat:
|
|
64
|
+
voiceAssetId: LOCAL_AND_CLOUD_STUDIO_PARAMETER,
|
|
65
|
+
language: LOCAL_AND_CLOUD_STUDIO_PARAMETER,
|
|
66
|
+
audioFormat: LOCAL_AND_CLOUD_STUDIO_PARAMETER,
|
|
69
67
|
sampleRateHz: CLOUD_ONLY_STUDIO_PARAMETER,
|
|
70
68
|
speed: CLOUD_ONLY_STUDIO_PARAMETER,
|
|
71
69
|
pitch: CLOUD_ONLY_STUDIO_PARAMETER,
|
|
72
70
|
volume: CLOUD_ONLY_STUDIO_PARAMETER,
|
|
73
71
|
emotion: CLOUD_ONLY_STUDIO_PARAMETER,
|
|
74
|
-
timingMode:
|
|
72
|
+
timingMode: LOCAL_AND_CLOUD_STUDIO_PARAMETER,
|
|
75
73
|
},
|
|
76
74
|
});
|
|
77
75
|
|
|
@@ -81,7 +79,7 @@ export const studioSpeechTranscribeParameters = defineStudioParameters<StudioSpe
|
|
|
81
79
|
audioFile: LOCAL_AND_CLOUD_STUDIO_PARAMETER,
|
|
82
80
|
mimeType: LOCAL_AND_CLOUD_STUDIO_PARAMETER,
|
|
83
81
|
language: LOCAL_AND_CLOUD_STUDIO_PARAMETER,
|
|
84
|
-
timestamps:
|
|
82
|
+
timestamps: LOCAL_AND_CLOUD_STUDIO_PARAMETER,
|
|
85
83
|
diarization: CLOUD_ONLY_STUDIO_PARAMETER,
|
|
86
84
|
speakerCount: CLOUD_ONLY_STUDIO_PARAMETER,
|
|
87
85
|
prompt: CLOUD_ONLY_STUDIO_PARAMETER,
|
|
@@ -11,19 +11,21 @@
|
|
|
11
11
|
|
|
12
12
|
## Hard Boundaries
|
|
13
13
|
- Follow `Runtime / Realm truth -> @nimiplatform/sdk interface -> app consumer`.
|
|
14
|
-
- Runtime owns
|
|
14
|
+
- Runtime owns AI execution and its exact configuration/admission; Cognition owns canonical long-term Memory and Knowledge. Realm owns ecosystem identity, relationships and shared entities; App business state follows its declared storage boundary.
|
|
15
15
|
- Use SDK typed projections for Runtime and Realm; do not call private endpoints or mirror their canonical truth locally.
|
|
16
16
|
- Use `@nimiplatform/kit` for reusable controls, layout, accessibility, tokens, and interaction patterns; keep app CSS and composition product-specific.
|
|
17
17
|
- Keep the base free of Lab-only product behavior. Feature implementations enter generated output only through the app-tools module registry and public admitted `--features` selection. Internal modules such as `ai-studio-core` enter only through dependency closure and are never selected directly.
|
|
18
18
|
- Keep Lab-only Settings/account, App Access diagnostics, Realm/Agent probes, World Tour, and native or diagnostic surfaces outside generated product composition.
|
|
19
19
|
- Preserve ownership: `sync` may refresh scaffold-managed files but must not overwrite app-owned workbench or module code; `check` is non-mutating. Identity and direct feature selection are immutable; create a fresh scaffold to change them.
|
|
20
20
|
- Preserve lifecycle order: `create -> dependency install -> init -> sync -> check -> dev/test/build -> pack`. Never run lifecycle commands after `create` before dependencies are installed. Local publish remains unavailable; production publication is owned by the managed protected-tag GitHub workflow, while registry admission and installation remain separate later owners.
|
|
21
|
-
-
|
|
21
|
+
- Keep public dependency version declarations and the selected package matrix. Development may resolve complete local npm tarballs through the explicit overrides supported by the selected app-tools README; source-workspace and directory links remain invalid. Public-release preflight requires registry resolutions. A private workspace-validation result is not standalone evidence.
|
|
22
|
+
- Use generated Host, preload, renderer and SDK/Kit wiring as the foundation for session, App Access, AIConfig and AI calls. An existing App adaptation starts with a same-package generated reference and preserves the original product's workflows and business settings; do not substitute a reference workbench for the complete App.
|
|
22
23
|
- Use the scaffold-managed Kit Electron app-host bridge for supervised local development. Treat `nimi-shell-tauri` glue, where present, as bounded independent OS integration only, never a second local-development carrier, authority, App registration, admission, model-routing, or token-custody surface.
|
|
23
24
|
- Do not add provider/model hardcoding, compatibility dual-writes, pseudo-success, Runtime internals, generated private clients, or Desktop product source.
|
|
24
25
|
- Before durable storage, native commands, private calls, or registries, inspect the nearest contract and current consumer; ask only if multiple semantic owners remain plausible.
|
|
25
26
|
|
|
26
27
|
## Retrieval Defaults
|
|
28
|
+
- Feasibility, capability-fit and cost requests use the lifecycle skill's audit guide before implementation setup. When following an audit, preserve confirmed user decisions and verify consequential assumptions against current owner contracts rather than treating the report as authority.
|
|
27
29
|
- Start with the requested product route, its direct SDK/Kit surface, and the relevant scaffold-managed glue.
|
|
28
30
|
- Read platform authority only when ownership or semantics remain ambiguous; skip unrelated platform packages and generated files.
|
|
29
31
|
|
|
@@ -30,7 +30,7 @@ Before production, the public GitHub repository must enable a protected `v*` tag
|
|
|
30
30
|
|
|
31
31
|
`pnpm dev` selects the official Desktop-supervised Electron development Host. Direct renderer, Electron or Tauri launch does not create protected Nimi access.
|
|
32
32
|
|
|
33
|
-
The default `windows-x86_64` build creates a fresh non-installer Electron directory at `dist-electron-package/acme-widget-shell-win32-x64/`, with the App-specific `acme-widget-shell.exe`,
|
|
33
|
+
The default `windows-x86_64` build creates a fresh non-installer Electron directory at `dist-electron-package/acme-widget-shell-win32-x64/`, with the App-specific `acme-widget-shell.exe`, ASAR-packaged JavaScript and renderer assets, and unpacked native add-ons plus shared libraries (`**/*.{node,dylib,dll}`). Their relative layout is preserved for the OS loader. Its production bundle rejects `--nimi-dev-renderer-url`. The protected native binding arrives only through Kit's optional dependency; do not add it directly to this App.
|
|
34
34
|
|
|
35
35
|
`pnpm run build:tauri:production` remains an explicit alternative for a deliberately selected Tauri build profile; it is not the default production carrier.
|
|
36
36
|
|