@nimiplatform/app-tools 0.1.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +198 -6
- package/README.md +83 -27
- package/bin/nimi-app.mjs +328 -45
- package/lib/app-access-declaration.mjs +49 -0
- package/lib/app-doctor-update.mjs +411 -149
- package/lib/app-pack.mjs +401 -0
- package/lib/app-project-lifecycle.mjs +1141 -0
- package/lib/app-scaffold-capabilities.mjs +769 -0
- package/lib/app-scaffold-default-source.mjs +21 -0
- package/lib/app-scaffold-profiles.mjs +1093 -0
- package/lib/app-scaffold.mjs +1266 -813
- package/lib/index.mjs +194 -42
- package/lib/simulator-conformance-ast.mjs +498 -0
- package/lib/simulator-conformance-css.mjs +116 -0
- package/lib/simulator-conformance-graph.mjs +757 -0
- package/lib/simulator-conformance.d.mts +14 -0
- package/lib/simulator-conformance.mjs +203 -0
- package/lib/simulator-css-profile.d.mts +27 -0
- package/lib/simulator-css-profile.mjs +531 -0
- package/lib/simulator-kit-export-resolution.mjs +70 -0
- package/lib/simulator-manifest.mjs +334 -0
- package/package.json +66 -3
- package/scripts/dev-shell.mjs +465 -0
- package/scripts/sync-app-source.mjs +300 -0
- package/scripts/sync-scaffold-versions.mjs +91 -0
- package/templates/app-source/LICENSE +21 -0
- package/templates/app-source/src/ai-studio-core/ai-config.ts +100 -0
- package/templates/app-source/src/ai-studio-core/ai-studio-core.css +338 -0
- package/templates/app-source/src/ai-studio-core/contexts.tsx +61 -0
- package/templates/app-source/src/ai-studio-core/history-policy.ts +447 -0
- package/templates/app-source/src/ai-studio-core/history.ts +824 -0
- package/templates/app-source/src/ai-studio-core/host-context.tsx +79 -0
- package/templates/app-source/src/ai-studio-core/index.ts +214 -0
- package/templates/app-source/src/ai-studio-core/messages/en.json +310 -0
- package/templates/app-source/src/ai-studio-core/messages/index.ts +47 -0
- package/templates/app-source/src/ai-studio-core/messages/zh.json +310 -0
- package/templates/app-source/src/ai-studio-core/module-registration.ts +109 -0
- package/templates/app-source/src/ai-studio-core/non-success-presentation.ts +65 -0
- package/templates/app-source/src/ai-studio-core/parameter-fields.tsx +247 -0
- package/templates/app-source/src/ai-studio-core/parameters.ts +110 -0
- package/templates/app-source/src/ai-studio-core/prompt-drafts.ts +69 -0
- package/templates/app-source/src/ai-studio-core/run-target.ts +123 -0
- package/templates/app-source/src/ai-studio-core/runtime-dispatcher.ts +35 -0
- package/templates/app-source/src/ai-studio-core/runtime-types.ts +86 -0
- package/templates/app-source/src/ai-studio-core/runtime.ts +306 -0
- package/templates/app-source/src/ai-studio-core/section-ai-testing-admission.ts +38 -0
- package/templates/app-source/src/ai-studio-core/section-ai-testing-ai-config.tsx +30 -0
- package/templates/app-source/src/ai-studio-core/section-ai-testing-artifact-preview.ts +40 -0
- package/templates/app-source/src/ai-studio-core/section-ai-testing-composer.tsx +257 -0
- package/templates/app-source/src/ai-studio-core/section-ai-testing-history.tsx +676 -0
- package/templates/app-source/src/ai-studio-core/section-ai-testing-input.ts +19 -0
- package/templates/app-source/src/ai-studio-core/section-ai-testing-output.tsx +291 -0
- package/templates/app-source/src/ai-studio-core/section-ai-testing-result.tsx +413 -0
- package/templates/app-source/src/ai-studio-core/section-ai-testing-run.ts +174 -0
- package/templates/app-source/src/ai-studio-core/section-ai-testing-studio-result.tsx +449 -0
- package/templates/app-source/src/ai-studio-core/section-ai-testing-surface.tsx +45 -0
- package/templates/app-source/src/ai-studio-core/section-ai-testing.tsx +494 -0
- package/templates/app-source/src/ai-studio-core/studio-directives.ts +33 -0
- package/templates/app-source/src/ai-studio-core/workspace.tsx +381 -0
- package/templates/app-source/src/product-modules/agent-center/index.tsx +27 -0
- package/templates/app-source/src/product-modules/agent-conversation/index.tsx +19 -0
- package/templates/app-source/src/product-modules/agent-realtime/index.tsx +29 -0
- package/templates/app-source/src/product-modules/kit-recipes/gallery.tsx +142 -0
- package/templates/app-source/src/product-modules/kit-recipes/index.tsx +19 -0
- package/templates/app-source/src/product-modules/kit-recipes/kit-component-gallery-data-recipes.tsx +336 -0
- package/templates/app-source/src/product-modules/kit-recipes/kit-component-gallery-demos.tsx +165 -0
- package/templates/app-source/src/product-modules/kit-recipes/kit-component-gallery-recipes.tsx +682 -0
- package/templates/app-source/src/product-modules/kit-recipes/kit-component-gallery-surface.tsx +341 -0
- package/templates/app-source/src/studio-modules/studio-create/descriptors.ts +26 -0
- package/templates/app-source/src/studio-modules/studio-create/index.ts +14 -0
- package/templates/app-source/src/studio-modules/studio-create/messages/en.json +67 -0
- package/templates/app-source/src/studio-modules/studio-create/messages/index.ts +5 -0
- package/templates/app-source/src/studio-modules/studio-create/messages/zh.json +67 -0
- package/templates/app-source/src/studio-modules/studio-create/parameter-panel.tsx +153 -0
- package/templates/app-source/src/studio-modules/studio-create/parameters.ts +70 -0
- package/templates/app-source/src/studio-modules/studio-create/registration.ts +46 -0
- package/templates/app-source/src/studio-modules/studio-create/runtime.ts +339 -0
- package/templates/app-source/src/studio-modules/studio-media/descriptors.ts +22 -0
- package/templates/app-source/src/studio-modules/studio-media/index.ts +12 -0
- package/templates/app-source/src/studio-modules/studio-media/messages/en.json +82 -0
- package/templates/app-source/src/studio-modules/studio-media/messages/index.ts +5 -0
- package/templates/app-source/src/studio-modules/studio-media/messages/zh.json +82 -0
- package/templates/app-source/src/studio-modules/studio-media/parameter-panel.tsx +283 -0
- package/templates/app-source/src/studio-modules/studio-media/parameters.ts +94 -0
- package/templates/app-source/src/studio-modules/studio-media/registration.ts +44 -0
- package/templates/app-source/src/studio-modules/studio-media/runtime.ts +113 -0
- package/templates/app-source/src/studio-modules/studio-voice/descriptors.ts +28 -0
- package/templates/app-source/src/studio-modules/studio-voice/index.ts +16 -0
- package/templates/app-source/src/studio-modules/studio-voice/messages/en.json +99 -0
- package/templates/app-source/src/studio-modules/studio-voice/messages/index.ts +5 -0
- package/templates/app-source/src/studio-modules/studio-voice/messages/zh.json +99 -0
- package/templates/app-source/src/studio-modules/studio-voice/parameter-panel.tsx +284 -0
- package/templates/app-source/src/studio-modules/studio-voice/parameters.ts +116 -0
- package/templates/app-source/src/studio-modules/studio-voice/registration.ts +59 -0
- package/templates/app-source/src/studio-modules/studio-voice/runtime.ts +347 -0
- package/templates/app-source/src/workbench-core/empty-state.tsx +31 -0
- package/templates/app-source/src/workbench-core/index.ts +17 -0
- package/templates/app-source/src/workbench-core/runtime-gate.tsx +131 -0
- package/templates/app-source/src/workbench-core/workbench-core.css +255 -0
- package/templates/app-source/src/workbench-core/workbench-core.tsx +140 -0
- package/templates/app-source.manifest.json +333 -0
- package/templates/default-starter/AGENTS.md +33 -0
- package/templates/default-starter/LICENSE +21 -0
- package/templates/default-starter/README.md +41 -0
- package/templates/default-starter/SECURITY.md +5 -0
- package/templates/default-starter/index.html +12 -0
- package/templates/default-starter/scripts/validate.mjs +26 -0
- package/templates/default-starter/src/shell/App.tsx +27 -0
- package/templates/default-starter/src/shell/auth/app-identity.ts +3 -0
- package/templates/default-starter/src/shell/auth/local-app-client.ts +18 -0
- package/templates/default-starter/src/shell/auth/runtime-platform.ts +110 -0
- package/templates/default-starter/src/shell/authenticated-shell.tsx +20 -0
- package/templates/default-starter/src/shell/workbench-target-adapter.ts +40 -0
- package/templates/default-starter/src/styles.css +26 -0
- package/templates/default-starter/src-tauri/Cargo.toml +17 -0
- package/templates/default-starter/src-tauri/build.rs +5 -0
- package/templates/default-starter/src-tauri/capabilities/default.json +7 -0
- package/templates/default-starter/src-tauri/tauri.conf.json +26 -0
- package/templates/default-starter/tsconfig.json +18 -0
- package/templates/default-starter.manifest.json +99 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
|
|
4
|
+
const DEFAULT_STARTER_DIR = path.resolve(import.meta.dirname, '../templates/default-starter');
|
|
5
|
+
const DEFAULT_STARTER_MANIFEST_PATH = path.resolve(import.meta.dirname, '../templates/default-starter.manifest.json');
|
|
6
|
+
|
|
7
|
+
let defaultStarterSourceCache = null;
|
|
8
|
+
|
|
9
|
+
export function loadDefaultStarterSource() {
|
|
10
|
+
if (!defaultStarterSourceCache) {
|
|
11
|
+
defaultStarterSourceCache = {
|
|
12
|
+
baseDir: DEFAULT_STARTER_DIR,
|
|
13
|
+
manifest: JSON.parse(readFileSync(DEFAULT_STARTER_MANIFEST_PATH, 'utf8')),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
return defaultStarterSourceCache;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function readDefaultStarterSourceFile(baseDir, relativePath) {
|
|
20
|
+
return readFileSync(path.join(baseDir, relativePath), 'utf8');
|
|
21
|
+
}
|