aimeat 1.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/dist/.env.example +300 -0
- package/dist/bin/aimeat.d.ts +3 -0
- package/dist/bin/aimeat.d.ts.map +1 -0
- package/dist/bin/aimeat.js +22 -0
- package/dist/bin/aimeat.js.map +1 -0
- package/dist/locales/en.json +4566 -0
- package/dist/locales/fi.json +4566 -0
- package/dist/public/BingSiteAuth.xml +4 -0
- package/dist/public/agent-consent.html +521 -0
- package/dist/public/aimeat-developers.html +679 -0
- package/dist/public/assets/mcp_1_add_custom_connector.png +0 -0
- package/dist/public/assets/mcp_2_connect_disconnect_connector.png +0 -0
- package/dist/public/components/Alert.js +18 -0
- package/dist/public/components/Card.js +19 -0
- package/dist/public/components/CopyButton.js +24 -0
- package/dist/public/components/FormField.js +16 -0
- package/dist/public/components/Modal.js +121 -0
- package/dist/public/components/Spinner.js +11 -0
- package/dist/public/components/Toast.js +26 -0
- package/dist/public/components/index.js +8 -0
- package/dist/public/components/useViewCSS.js +12 -0
- package/dist/public/cortex-bundled/aimeat-canvas.js +1408 -0
- package/dist/public/cortex-bundled/aimeat-canvas.yaml +241 -0
- package/dist/public/cortex-bundled/aimeat-charts.js +455 -0
- package/dist/public/cortex-bundled/aimeat-charts.yaml +178 -0
- package/dist/public/cortex-bundled/aimeat-ui-dialogs.js +667 -0
- package/dist/public/cortex-bundled/aimeat-ui-dialogs.yaml +66 -0
- package/dist/public/cortex-bundled/aimeat-ui-forms.js +1106 -0
- package/dist/public/cortex-bundled/aimeat-ui-forms.yaml +90 -0
- package/dist/public/cortex-bundled/aimeat-ui-layout.js +436 -0
- package/dist/public/cortex-bundled/aimeat-ui-layout.yaml +87 -0
- package/dist/public/cortex-bundled/aimeat-ui-nav.js +722 -0
- package/dist/public/cortex-bundled/aimeat-ui-nav.yaml +73 -0
- package/dist/public/cortex-bundled/aimeat-ui-viewers.js +602 -0
- package/dist/public/cortex-bundled/aimeat-ui-viewers.yaml +73 -0
- package/dist/public/css/components/tags.css +67 -0
- package/dist/public/css/theme.css +716 -0
- package/dist/public/css/views/admin.css +576 -0
- package/dist/public/css/views/aimeat-os.css +153 -0
- package/dist/public/css/views/calibrator.css +480 -0
- package/dist/public/css/views/foundry.css +1334 -0
- package/dist/public/css/views/help.css +136 -0
- package/dist/public/css/views/hobbies.css +73 -0
- package/dist/public/css/views/marketplace.css +134 -0
- package/dist/public/css/views/openclaw.css +33 -0
- package/dist/public/css/views/portal-classic.css +484 -0
- package/dist/public/css/views/portal-dev.css +139 -0
- package/dist/public/css/views/portal.css +365 -0
- package/dist/public/css/views/portfolio.css +322 -0
- package/dist/public/css/views/profile.css +1799 -0
- package/dist/public/echat.html +442 -0
- package/dist/public/img/genesis-001-badge.png +0 -0
- package/dist/public/img/platforms/chatgpt.png +0 -0
- package/dist/public/img/platforms/claude.png +0 -0
- package/dist/public/img/platforms/copilot.png +0 -0
- package/dist/public/img/platforms/deepseek.png +0 -0
- package/dist/public/img/platforms/gemini.png +0 -0
- package/dist/public/img/platforms/grok.png +0 -0
- package/dist/public/img/platforms/lmstudio.png +0 -0
- package/dist/public/img/platforms/m365copilot.png +0 -0
- package/dist/public/img/platforms/openclaw.png +0 -0
- package/dist/public/img/platforms/other.png +0 -0
- package/dist/public/js/api.js +123 -0
- package/dist/public/js/components/auth-image.js +59 -0
- package/dist/public/js/components/tag-cloud.js +31 -0
- package/dist/public/js/components/tag-editor.js +46 -0
- package/dist/public/js/hooks.js +63 -0
- package/dist/public/js/i18n.js +76 -0
- package/dist/public/js/services/admin.js +239 -0
- package/dist/public/js/services/agents.js +57 -0
- package/dist/public/js/services/apps.js +35 -0
- package/dist/public/js/services/auth.js +40 -0
- package/dist/public/js/services/boards.js +79 -0
- package/dist/public/js/services/calibrator.js +97 -0
- package/dist/public/js/services/catalogue.js +39 -0
- package/dist/public/js/services/consent.js +57 -0
- package/dist/public/js/services/cortex.js +95 -0
- package/dist/public/js/services/extensions.js +61 -0
- package/dist/public/js/services/federation.js +11 -0
- package/dist/public/js/services/foundry-context-bundle.js +128 -0
- package/dist/public/js/services/foundry-contract.js +117 -0
- package/dist/public/js/services/foundry-packaging.js +762 -0
- package/dist/public/js/services/foundry-probe-reconcile.js +52 -0
- package/dist/public/js/services/foundry-prompts-base.js +1886 -0
- package/dist/public/js/services/foundry-prompts-build.js +2187 -0
- package/dist/public/js/services/foundry-prompts-cortex-app.js +154 -0
- package/dist/public/js/services/foundry-prompts-cortex-data.js +241 -0
- package/dist/public/js/services/foundry-prompts-cortex-feature.js +281 -0
- package/dist/public/js/services/foundry-prompts-fix.js +408 -0
- package/dist/public/js/services/foundry-prompts-test.js +520 -0
- package/dist/public/js/services/foundry-prompts.js +31 -0
- package/dist/public/js/services/foundry-smoke.js +65 -0
- package/dist/public/js/services/foundry-testing.js +64 -0
- package/dist/public/js/services/foundry-validate.js +1082 -0
- package/dist/public/js/services/foundry.js +1194 -0
- package/dist/public/js/services/generator-context-bundle.js +134 -0
- package/dist/public/js/services/generator-contract.js +117 -0
- package/dist/public/js/services/generator-packaging.js +762 -0
- package/dist/public/js/services/generator-probe-reconcile.js +52 -0
- package/dist/public/js/services/generator-prompts-base.js +1890 -0
- package/dist/public/js/services/generator-prompts-build.js +1126 -0
- package/dist/public/js/services/generator-prompts-cortex-app.js +155 -0
- package/dist/public/js/services/generator-prompts-cortex-data.js +199 -0
- package/dist/public/js/services/generator-prompts-cortex-feature.js +276 -0
- package/dist/public/js/services/generator-prompts-fix.js +316 -0
- package/dist/public/js/services/generator-prompts-test.js +402 -0
- package/dist/public/js/services/generator-prompts.js +31 -0
- package/dist/public/js/services/generator-smoke.js +65 -0
- package/dist/public/js/services/generator-spec-tests.js +280 -0
- package/dist/public/js/services/generator-spec-validate.js +192 -0
- package/dist/public/js/services/generator-specs.js +369 -0
- package/dist/public/js/services/generator-testing.js +64 -0
- package/dist/public/js/services/generator-validate.js +916 -0
- package/dist/public/js/services/generator.js +952 -0
- package/dist/public/js/services/knowledge.js +120 -0
- package/dist/public/js/services/memory.js +112 -0
- package/dist/public/js/services/nodes.js +55 -0
- package/dist/public/js/services/organisms.js +74 -0
- package/dist/public/js/services/packages.js +97 -0
- package/dist/public/js/services/security.js +67 -0
- package/dist/public/js/services/stats.js +11 -0
- package/dist/public/js/services/wallet.js +24 -0
- package/dist/public/js/services/work.js +51 -0
- package/dist/public/js/utils.js +184 -0
- package/dist/public/lib/htm.mjs +4 -0
- package/dist/public/lib/live-updates.js +89 -0
- package/dist/public/lib/minidenticons.min.js +1 -0
- package/dist/public/lib/preact-hooks.mjs +3 -0
- package/dist/public/lib/preact.mjs +3 -0
- package/dist/public/lib/realtime.js +549 -0
- package/dist/public/lib/three.min.js +6 -0
- package/dist/public/lib/yaml.mjs +141 -0
- package/dist/public/llms-template.txt +1043 -0
- package/dist/public/oauth-consent.html +388 -0
- package/dist/public/og-image.png +0 -0
- package/dist/public/robots.txt +52 -0
- package/dist/public/spa.html +533 -0
- package/dist/public/sw.js +34 -0
- package/dist/public/tmp-paste.txt +223 -0
- package/dist/public/views/_template.js +85 -0
- package/dist/public/views/admin/actions-tab.js +41 -0
- package/dist/public/views/admin/agents-tab.js +84 -0
- package/dist/public/views/admin/boards-tab.js +154 -0
- package/dist/public/views/admin/chat-instances-tab.js +207 -0
- package/dist/public/views/admin/config-tab.js +151 -0
- package/dist/public/views/admin/consul-tab.js +77 -0
- package/dist/public/views/admin/cors-tab.js +240 -0
- package/dist/public/views/admin/cortex-tab.js +171 -0
- package/dist/public/views/admin/csm-tab.js +261 -0
- package/dist/public/views/admin/directory-tab.js +44 -0
- package/dist/public/views/admin/economy-tab.js +80 -0
- package/dist/public/views/admin/email-tab.js +460 -0
- package/dist/public/views/admin/federation-tab.js +412 -0
- package/dist/public/views/admin/generator-debug-tab.js +238 -0
- package/dist/public/views/admin/genesis-tab.js +70 -0
- package/dist/public/views/admin/ghii-tab.js +101 -0
- package/dist/public/views/admin/hooks-tab.js +69 -0
- package/dist/public/views/admin/knowledge-tab.js +297 -0
- package/dist/public/views/admin/maintenance-tab.js +98 -0
- package/dist/public/views/admin/matching-tab.js +44 -0
- package/dist/public/views/admin/memory-tab.js +222 -0
- package/dist/public/views/admin/msm-tab.js +342 -0
- package/dist/public/views/admin/overview-tab.js +90 -0
- package/dist/public/views/admin/owners-tab.js +55 -0
- package/dist/public/views/admin/packages-tab.js +510 -0
- package/dist/public/views/admin/portal-tab.js +211 -0
- package/dist/public/views/admin/prompts-tab.js +287 -0
- package/dist/public/views/admin/push-tab.js +291 -0
- package/dist/public/views/admin/realtime-tab.js +68 -0
- package/dist/public/views/admin/scheduler-tab.js +156 -0
- package/dist/public/views/admin/services-tab.js +981 -0
- package/dist/public/views/admin/shared.js +148 -0
- package/dist/public/views/admin/stats-tab.js +187 -0
- package/dist/public/views/admin/work-tab.js +45 -0
- package/dist/public/views/admin.js +400 -0
- package/dist/public/views/aimeat-os.js +259 -0
- package/dist/public/views/guides.js +402 -0
- package/dist/public/views/help.js +79 -0
- package/dist/public/views/hobbies.js +697 -0
- package/dist/public/views/marketplace.js +647 -0
- package/dist/public/views/openclaw.js +223 -0
- package/dist/public/views/portal-classic.js +519 -0
- package/dist/public/views/portal-dev.js +816 -0
- package/dist/public/views/portal.js +1354 -0
- package/dist/public/views/portfolio.js +795 -0
- package/dist/public/views/profile/access-tab.js +58 -0
- package/dist/public/views/profile/agents-tab.js +689 -0
- package/dist/public/views/profile/apps-tab.js +197 -0
- package/dist/public/views/profile/boards-tab.js +323 -0
- package/dist/public/views/profile/calibrator-batch.js +926 -0
- package/dist/public/views/profile/calibrator-chart.js +135 -0
- package/dist/public/views/profile/calibrator-llm-editor.js +205 -0
- package/dist/public/views/profile/calibrator-tab.js +535 -0
- package/dist/public/views/profile/chat-sessions-tab.js +184 -0
- package/dist/public/views/profile/data-wallet-tab.js +313 -0
- package/dist/public/views/profile/email-tab.js +157 -0
- package/dist/public/views/profile/extensions-tab.js +711 -0
- package/dist/public/views/profile/federation-tab.js +63 -0
- package/dist/public/views/profile/foundry-dashboard/DebugPanel.js +193 -0
- package/dist/public/views/profile/foundry-dashboard/DiagnosticsPanel.js +69 -0
- package/dist/public/views/profile/foundry-dashboard/EditModePanel.js +141 -0
- package/dist/public/views/profile/foundry-dashboard/PackageDialog.js +96 -0
- package/dist/public/views/profile/foundry-dashboard/RemovePanel.js +53 -0
- package/dist/public/views/profile/foundry-dashboard/use-autopilot-state.js +53 -0
- package/dist/public/views/profile/foundry-dashboard/use-autopilot.js +1016 -0
- package/dist/public/views/profile/foundry-dashboard/use-dashboard-core.js +154 -0
- package/dist/public/views/profile/foundry-dashboard/use-edit-mode.js +294 -0
- package/dist/public/views/profile/foundry-dashboard/use-lifecycle.js +101 -0
- package/dist/public/views/profile/foundry-dashboard/use-packaging.js +97 -0
- package/dist/public/views/profile/foundry-dashboard/use-test-execution.js +275 -0
- package/dist/public/views/profile/foundry-dashboard.js +395 -0
- package/dist/public/views/profile/foundry-detail.js +1178 -0
- package/dist/public/views/profile/foundry-settings.js +377 -0
- package/dist/public/views/profile/foundry-tab.js +546 -0
- package/dist/public/views/profile/generator-dashboard/DebugPanel.js +193 -0
- package/dist/public/views/profile/generator-dashboard/DiagnosticsPanel.js +69 -0
- package/dist/public/views/profile/generator-dashboard/EditModePanel.js +141 -0
- package/dist/public/views/profile/generator-dashboard/PackageDialog.js +96 -0
- package/dist/public/views/profile/generator-dashboard/RemovePanel.js +53 -0
- package/dist/public/views/profile/generator-dashboard/use-autopilot-state.js +53 -0
- package/dist/public/views/profile/generator-dashboard/use-autopilot.js +136 -0
- package/dist/public/views/profile/generator-dashboard/use-dashboard-core.js +143 -0
- package/dist/public/views/profile/generator-dashboard/use-edit-mode.js +296 -0
- package/dist/public/views/profile/generator-dashboard/use-lifecycle.js +101 -0
- package/dist/public/views/profile/generator-dashboard/use-packaging.js +97 -0
- package/dist/public/views/profile/generator-dashboard/use-test-execution.js +275 -0
- package/dist/public/views/profile/generator-dashboard.js +377 -0
- package/dist/public/views/profile/generator-detail.js +1007 -0
- package/dist/public/views/profile/generator-settings.js +417 -0
- package/dist/public/views/profile/generator-tab.js +544 -0
- package/dist/public/views/profile/inline-panels.js +277 -0
- package/dist/public/views/profile/knowledge-tab.js +735 -0
- package/dist/public/views/profile/landing-page.js +539 -0
- package/dist/public/views/profile/mcp-tab.js +140 -0
- package/dist/public/views/profile/memory-tab.js +599 -0
- package/dist/public/views/profile/node-stats-tab.js +132 -0
- package/dist/public/views/profile/nodes-tab.js +195 -0
- package/dist/public/views/profile/notifications-tab.js +274 -0
- package/dist/public/views/profile/organisms-tab.js +402 -0
- package/dist/public/views/profile/packages-tab.js +393 -0
- package/dist/public/views/profile/portfolio-tab.js +31 -0
- package/dist/public/views/profile/security-tab.js +219 -0
- package/dist/public/views/profile/services-tab.js +281 -0
- package/dist/public/views/profile/shared.js +58 -0
- package/dist/public/views/profile/wallet-tab.js +272 -0
- package/dist/public/views/profile/work-tab.js +220 -0
- package/dist/public/views/profile.js +271 -0
- package/dist/public/wizard.html +1320 -0
- package/dist/scripts/db-init.d.ts +19 -0
- package/dist/scripts/db-init.d.ts.map +1 -0
- package/dist/scripts/db-init.js +168 -0
- package/dist/scripts/db-init.js.map +1 -0
- package/dist/scripts/db-reset.d.ts +15 -0
- package/dist/scripts/db-reset.d.ts.map +1 -0
- package/dist/scripts/db-reset.js +162 -0
- package/dist/scripts/db-reset.js.map +1 -0
- package/dist/scripts/indexnow.d.ts +18 -0
- package/dist/scripts/indexnow.d.ts.map +1 -0
- package/dist/scripts/indexnow.js +104 -0
- package/dist/scripts/indexnow.js.map +1 -0
- package/dist/scripts/kill-port.d.ts +3 -0
- package/dist/scripts/kill-port.d.ts.map +1 -0
- package/dist/scripts/kill-port.js +89 -0
- package/dist/scripts/kill-port.js.map +1 -0
- package/dist/scripts/seed-digital-signage.d.ts +13 -0
- package/dist/scripts/seed-digital-signage.d.ts.map +1 -0
- package/dist/scripts/seed-digital-signage.js +85 -0
- package/dist/scripts/seed-digital-signage.js.map +1 -0
- package/dist/src/auth/jwt.d.ts +40 -0
- package/dist/src/auth/jwt.d.ts.map +1 -0
- package/dist/src/auth/jwt.js +139 -0
- package/dist/src/auth/jwt.js.map +1 -0
- package/dist/src/auth/keypair.d.ts +8 -0
- package/dist/src/auth/keypair.d.ts.map +1 -0
- package/dist/src/auth/keypair.js +35 -0
- package/dist/src/auth/keypair.js.map +1 -0
- package/dist/src/auth/middleware.d.ts +50 -0
- package/dist/src/auth/middleware.d.ts.map +1 -0
- package/dist/src/auth/middleware.js +241 -0
- package/dist/src/auth/middleware.js.map +1 -0
- package/dist/src/auth/node-keys.d.ts +7 -0
- package/dist/src/auth/node-keys.d.ts.map +1 -0
- package/dist/src/auth/node-keys.js +116 -0
- package/dist/src/auth/node-keys.js.map +1 -0
- package/dist/src/cli/config-export.d.ts +9 -0
- package/dist/src/cli/config-export.d.ts.map +1 -0
- package/dist/src/cli/config-export.js +90 -0
- package/dist/src/cli/config-export.js.map +1 -0
- package/dist/src/cli/config-import.d.ts +10 -0
- package/dist/src/cli/config-import.d.ts.map +1 -0
- package/dist/src/cli/config-import.js +124 -0
- package/dist/src/cli/config-import.js.map +1 -0
- package/dist/src/cli/federation-join.d.ts +13 -0
- package/dist/src/cli/federation-join.d.ts.map +1 -0
- package/dist/src/cli/federation-join.js +395 -0
- package/dist/src/cli/federation-join.js.map +1 -0
- package/dist/src/cli/init-wizard.d.ts +8 -0
- package/dist/src/cli/init-wizard.d.ts.map +1 -0
- package/dist/src/cli/init-wizard.js +1489 -0
- package/dist/src/cli/init-wizard.js.map +1 -0
- package/dist/src/cli/scaffold.d.ts +33 -0
- package/dist/src/cli/scaffold.d.ts.map +1 -0
- package/dist/src/cli/scaffold.js +142 -0
- package/dist/src/cli/scaffold.js.map +1 -0
- package/dist/src/config.d.ts +272 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/config.js +362 -0
- package/dist/src/config.js.map +1 -0
- package/dist/src/data/example-packages.d.ts +49 -0
- package/dist/src/data/example-packages.d.ts.map +1 -0
- package/dist/src/data/example-packages.js +814 -0
- package/dist/src/data/example-packages.js.map +1 -0
- package/dist/src/i18n.d.ts +19 -0
- package/dist/src/i18n.d.ts.map +1 -0
- package/dist/src/i18n.js +126 -0
- package/dist/src/i18n.js.map +1 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +608 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/mcp/boards.d.ts +18 -0
- package/dist/src/mcp/boards.d.ts.map +1 -0
- package/dist/src/mcp/boards.js +279 -0
- package/dist/src/mcp/boards.js.map +1 -0
- package/dist/src/mcp/catalogue.d.ts +17 -0
- package/dist/src/mcp/catalogue.d.ts.map +1 -0
- package/dist/src/mcp/catalogue.js +114 -0
- package/dist/src/mcp/catalogue.js.map +1 -0
- package/dist/src/mcp/chat-instances.d.ts +18 -0
- package/dist/src/mcp/chat-instances.d.ts.map +1 -0
- package/dist/src/mcp/chat-instances.js +161 -0
- package/dist/src/mcp/chat-instances.js.map +1 -0
- package/dist/src/mcp/consent.d.ts +18 -0
- package/dist/src/mcp/consent.d.ts.map +1 -0
- package/dist/src/mcp/consent.js +158 -0
- package/dist/src/mcp/consent.js.map +1 -0
- package/dist/src/mcp/core.d.ts +18 -0
- package/dist/src/mcp/core.d.ts.map +1 -0
- package/dist/src/mcp/core.js +489 -0
- package/dist/src/mcp/core.js.map +1 -0
- package/dist/src/mcp/extensions.d.ts +18 -0
- package/dist/src/mcp/extensions.d.ts.map +1 -0
- package/dist/src/mcp/extensions.js +299 -0
- package/dist/src/mcp/extensions.js.map +1 -0
- package/dist/src/mcp/flags.d.ts +18 -0
- package/dist/src/mcp/flags.d.ts.map +1 -0
- package/dist/src/mcp/flags.js +59 -0
- package/dist/src/mcp/flags.js.map +1 -0
- package/dist/src/mcp/index.d.ts +31 -0
- package/dist/src/mcp/index.d.ts.map +1 -0
- package/dist/src/mcp/index.js +694 -0
- package/dist/src/mcp/index.js.map +1 -0
- package/dist/src/mcp/knowledge.d.ts +18 -0
- package/dist/src/mcp/knowledge.d.ts.map +1 -0
- package/dist/src/mcp/knowledge.js +214 -0
- package/dist/src/mcp/knowledge.js.map +1 -0
- package/dist/src/mcp/memory-extended.d.ts +18 -0
- package/dist/src/mcp/memory-extended.d.ts.map +1 -0
- package/dist/src/mcp/memory-extended.js +73 -0
- package/dist/src/mcp/memory-extended.js.map +1 -0
- package/dist/src/mcp/organisms.d.ts +18 -0
- package/dist/src/mcp/organisms.d.ts.map +1 -0
- package/dist/src/mcp/organisms.js +291 -0
- package/dist/src/mcp/organisms.js.map +1 -0
- package/dist/src/mcp/prompts.d.ts +17 -0
- package/dist/src/mcp/prompts.d.ts.map +1 -0
- package/dist/src/mcp/prompts.js +65 -0
- package/dist/src/mcp/prompts.js.map +1 -0
- package/dist/src/mcp/wallet-extended.d.ts +17 -0
- package/dist/src/mcp/wallet-extended.d.ts.map +1 -0
- package/dist/src/mcp/wallet-extended.js +42 -0
- package/dist/src/mcp/wallet-extended.js.map +1 -0
- package/dist/src/middleware/__tests__/cookie-consent.test.d.ts +2 -0
- package/dist/src/middleware/__tests__/cookie-consent.test.d.ts.map +1 -0
- package/dist/src/middleware/__tests__/cookie-consent.test.js +432 -0
- package/dist/src/middleware/__tests__/cookie-consent.test.js.map +1 -0
- package/dist/src/middleware/cookie-consent.d.ts +19 -0
- package/dist/src/middleware/cookie-consent.d.ts.map +1 -0
- package/dist/src/middleware/cookie-consent.js +127 -0
- package/dist/src/middleware/cookie-consent.js.map +1 -0
- package/dist/src/middleware/cors.d.ts +12 -0
- package/dist/src/middleware/cors.d.ts.map +1 -0
- package/dist/src/middleware/cors.js +112 -0
- package/dist/src/middleware/cors.js.map +1 -0
- package/dist/src/middleware/envelope.d.ts +33 -0
- package/dist/src/middleware/envelope.d.ts.map +1 -0
- package/dist/src/middleware/envelope.js +32 -0
- package/dist/src/middleware/envelope.js.map +1 -0
- package/dist/src/middleware/idempotency.d.ts +3 -0
- package/dist/src/middleware/idempotency.d.ts.map +1 -0
- package/dist/src/middleware/idempotency.js +64 -0
- package/dist/src/middleware/idempotency.js.map +1 -0
- package/dist/src/middleware/metrics.d.ts +8 -0
- package/dist/src/middleware/metrics.d.ts.map +1 -0
- package/dist/src/middleware/metrics.js +25 -0
- package/dist/src/middleware/metrics.js.map +1 -0
- package/dist/src/middleware/rate-limit.d.ts +4 -0
- package/dist/src/middleware/rate-limit.d.ts.map +1 -0
- package/dist/src/middleware/rate-limit.js +73 -0
- package/dist/src/middleware/rate-limit.js.map +1 -0
- package/dist/src/middleware/request-id.d.ts +18 -0
- package/dist/src/middleware/request-id.d.ts.map +1 -0
- package/dist/src/middleware/request-id.js +23 -0
- package/dist/src/middleware/request-id.js.map +1 -0
- package/dist/src/middleware/stats.d.ts +4 -0
- package/dist/src/middleware/stats.d.ts.map +1 -0
- package/dist/src/middleware/stats.js +11 -0
- package/dist/src/middleware/stats.js.map +1 -0
- package/dist/src/middleware/workspace-access.d.ts +16 -0
- package/dist/src/middleware/workspace-access.d.ts.map +1 -0
- package/dist/src/middleware/workspace-access.js +115 -0
- package/dist/src/middleware/workspace-access.js.map +1 -0
- package/dist/src/models/schemas.d.ts +311 -0
- package/dist/src/models/schemas.d.ts.map +1 -0
- package/dist/src/models/schemas.js +281 -0
- package/dist/src/models/schemas.js.map +1 -0
- package/dist/src/routes/actions.d.ts +5 -0
- package/dist/src/routes/actions.d.ts.map +1 -0
- package/dist/src/routes/actions.js +199 -0
- package/dist/src/routes/actions.js.map +1 -0
- package/dist/src/routes/admin-agents.d.ts +5 -0
- package/dist/src/routes/admin-agents.d.ts.map +1 -0
- package/dist/src/routes/admin-agents.js +60 -0
- package/dist/src/routes/admin-agents.js.map +1 -0
- package/dist/src/routes/admin-config.d.ts +7 -0
- package/dist/src/routes/admin-config.d.ts.map +1 -0
- package/dist/src/routes/admin-config.js +209 -0
- package/dist/src/routes/admin-config.js.map +1 -0
- package/dist/src/routes/admin-economy.d.ts +5 -0
- package/dist/src/routes/admin-economy.d.ts.map +1 -0
- package/dist/src/routes/admin-economy.js +57 -0
- package/dist/src/routes/admin-economy.js.map +1 -0
- package/dist/src/routes/admin-extensions.d.ts +6 -0
- package/dist/src/routes/admin-extensions.d.ts.map +1 -0
- package/dist/src/routes/admin-extensions.js +619 -0
- package/dist/src/routes/admin-extensions.js.map +1 -0
- package/dist/src/routes/admin-features.d.ts +16 -0
- package/dist/src/routes/admin-features.d.ts.map +1 -0
- package/dist/src/routes/admin-features.js +672 -0
- package/dist/src/routes/admin-features.js.map +1 -0
- package/dist/src/routes/admin-maintenance.d.ts +8 -0
- package/dist/src/routes/admin-maintenance.d.ts.map +1 -0
- package/dist/src/routes/admin-maintenance.js +86 -0
- package/dist/src/routes/admin-maintenance.js.map +1 -0
- package/dist/src/routes/admin-memory.d.ts +12 -0
- package/dist/src/routes/admin-memory.d.ts.map +1 -0
- package/dist/src/routes/admin-memory.js +64 -0
- package/dist/src/routes/admin-memory.js.map +1 -0
- package/dist/src/routes/admin-monitoring.d.ts +5 -0
- package/dist/src/routes/admin-monitoring.d.ts.map +1 -0
- package/dist/src/routes/admin-monitoring.js +343 -0
- package/dist/src/routes/admin-monitoring.js.map +1 -0
- package/dist/src/routes/admin-prompts.d.ts +5 -0
- package/dist/src/routes/admin-prompts.d.ts.map +1 -0
- package/dist/src/routes/admin-prompts.js +198 -0
- package/dist/src/routes/admin-prompts.js.map +1 -0
- package/dist/src/routes/admin-scheduler.d.ts +6 -0
- package/dist/src/routes/admin-scheduler.d.ts.map +1 -0
- package/dist/src/routes/admin-scheduler.js +153 -0
- package/dist/src/routes/admin-scheduler.js.map +1 -0
- package/dist/src/routes/admin.d.ts +10 -0
- package/dist/src/routes/admin.d.ts.map +1 -0
- package/dist/src/routes/admin.js +847 -0
- package/dist/src/routes/admin.js.map +1 -0
- package/dist/src/routes/agents.d.ts +5 -0
- package/dist/src/routes/agents.d.ts.map +1 -0
- package/dist/src/routes/agents.js +946 -0
- package/dist/src/routes/agents.js.map +1 -0
- package/dist/src/routes/app-store.d.ts +25 -0
- package/dist/src/routes/app-store.d.ts.map +1 -0
- package/dist/src/routes/app-store.js +269 -0
- package/dist/src/routes/app-store.js.map +1 -0
- package/dist/src/routes/appeals.d.ts +5 -0
- package/dist/src/routes/appeals.d.ts.map +1 -0
- package/dist/src/routes/appeals.js +241 -0
- package/dist/src/routes/appeals.js.map +1 -0
- package/dist/src/routes/apps.d.ts +14 -0
- package/dist/src/routes/apps.d.ts.map +1 -0
- package/dist/src/routes/apps.js +395 -0
- package/dist/src/routes/apps.js.map +1 -0
- package/dist/src/routes/auth.d.ts +13 -0
- package/dist/src/routes/auth.d.ts.map +1 -0
- package/dist/src/routes/auth.js +517 -0
- package/dist/src/routes/auth.js.map +1 -0
- package/dist/src/routes/boards.d.ts +5 -0
- package/dist/src/routes/boards.d.ts.map +1 -0
- package/dist/src/routes/boards.js +614 -0
- package/dist/src/routes/boards.js.map +1 -0
- package/dist/src/routes/bootstrap.d.ts +6 -0
- package/dist/src/routes/bootstrap.d.ts.map +1 -0
- package/dist/src/routes/bootstrap.js +360 -0
- package/dist/src/routes/bootstrap.js.map +1 -0
- package/dist/src/routes/calibrator.d.ts +28 -0
- package/dist/src/routes/calibrator.d.ts.map +1 -0
- package/dist/src/routes/calibrator.js +556 -0
- package/dist/src/routes/calibrator.js.map +1 -0
- package/dist/src/routes/catalogue.d.ts +7 -0
- package/dist/src/routes/catalogue.d.ts.map +1 -0
- package/dist/src/routes/catalogue.js +377 -0
- package/dist/src/routes/catalogue.js.map +1 -0
- package/dist/src/routes/chat-instances.d.ts +5 -0
- package/dist/src/routes/chat-instances.d.ts.map +1 -0
- package/dist/src/routes/chat-instances.js +131 -0
- package/dist/src/routes/chat-instances.js.map +1 -0
- package/dist/src/routes/consent.d.ts +6 -0
- package/dist/src/routes/consent.d.ts.map +1 -0
- package/dist/src/routes/consent.js +188 -0
- package/dist/src/routes/consent.js.map +1 -0
- package/dist/src/routes/cortex.d.ts +5 -0
- package/dist/src/routes/cortex.d.ts.map +1 -0
- package/dist/src/routes/cortex.js +617 -0
- package/dist/src/routes/cortex.js.map +1 -0
- package/dist/src/routes/csm.d.ts +5 -0
- package/dist/src/routes/csm.d.ts.map +1 -0
- package/dist/src/routes/csm.js +258 -0
- package/dist/src/routes/csm.js.map +1 -0
- package/dist/src/routes/disputes.d.ts +5 -0
- package/dist/src/routes/disputes.d.ts.map +1 -0
- package/dist/src/routes/disputes.js +528 -0
- package/dist/src/routes/disputes.js.map +1 -0
- package/dist/src/routes/extensions.d.ts +6 -0
- package/dist/src/routes/extensions.d.ts.map +1 -0
- package/dist/src/routes/extensions.js +1149 -0
- package/dist/src/routes/extensions.js.map +1 -0
- package/dist/src/routes/federation-genesis.d.ts +11 -0
- package/dist/src/routes/federation-genesis.d.ts.map +1 -0
- package/dist/src/routes/federation-genesis.js +638 -0
- package/dist/src/routes/federation-genesis.js.map +1 -0
- package/dist/src/routes/federation-peer.d.ts +10 -0
- package/dist/src/routes/federation-peer.d.ts.map +1 -0
- package/dist/src/routes/federation-peer.js +613 -0
- package/dist/src/routes/federation-peer.js.map +1 -0
- package/dist/src/routes/federation-settlements.d.ts +10 -0
- package/dist/src/routes/federation-settlements.d.ts.map +1 -0
- package/dist/src/routes/federation-settlements.js +231 -0
- package/dist/src/routes/federation-settlements.js.map +1 -0
- package/dist/src/routes/federation-sync.d.ts +15 -0
- package/dist/src/routes/federation-sync.d.ts.map +1 -0
- package/dist/src/routes/federation-sync.js +629 -0
- package/dist/src/routes/federation-sync.js.map +1 -0
- package/dist/src/routes/federation.d.ts +15 -0
- package/dist/src/routes/federation.d.ts.map +1 -0
- package/dist/src/routes/federation.js +23 -0
- package/dist/src/routes/federation.js.map +1 -0
- package/dist/src/routes/flags.d.ts +5 -0
- package/dist/src/routes/flags.d.ts.map +1 -0
- package/dist/src/routes/flags.js +194 -0
- package/dist/src/routes/flags.js.map +1 -0
- package/dist/src/routes/foundry.d.ts +5 -0
- package/dist/src/routes/foundry.d.ts.map +1 -0
- package/dist/src/routes/foundry.js +955 -0
- package/dist/src/routes/foundry.js.map +1 -0
- package/dist/src/routes/generator-autopilot.d.ts +12 -0
- package/dist/src/routes/generator-autopilot.d.ts.map +1 -0
- package/dist/src/routes/generator-autopilot.js +71 -0
- package/dist/src/routes/generator-autopilot.js.map +1 -0
- package/dist/src/routes/generator.d.ts +5 -0
- package/dist/src/routes/generator.d.ts.map +1 -0
- package/dist/src/routes/generator.js +1313 -0
- package/dist/src/routes/generator.js.map +1 -0
- package/dist/src/routes/ghii.d.ts +16 -0
- package/dist/src/routes/ghii.d.ts.map +1 -0
- package/dist/src/routes/ghii.js +1115 -0
- package/dist/src/routes/ghii.js.map +1 -0
- package/dist/src/routes/instances.d.ts +31 -0
- package/dist/src/routes/instances.d.ts.map +1 -0
- package/dist/src/routes/instances.js +722 -0
- package/dist/src/routes/instances.js.map +1 -0
- package/dist/src/routes/knowledge.d.ts +33 -0
- package/dist/src/routes/knowledge.d.ts.map +1 -0
- package/dist/src/routes/knowledge.js +1108 -0
- package/dist/src/routes/knowledge.js.map +1 -0
- package/dist/src/routes/lib-data.d.ts +7 -0
- package/dist/src/routes/lib-data.d.ts.map +1 -0
- package/dist/src/routes/lib-data.js +189 -0
- package/dist/src/routes/lib-data.js.map +1 -0
- package/dist/src/routes/lib-social.d.ts +7 -0
- package/dist/src/routes/lib-social.d.ts.map +1 -0
- package/dist/src/routes/lib-social.js +159 -0
- package/dist/src/routes/lib-social.js.map +1 -0
- package/dist/src/routes/lib-storage.d.ts +7 -0
- package/dist/src/routes/lib-storage.d.ts.map +1 -0
- package/dist/src/routes/lib-storage.js +202 -0
- package/dist/src/routes/lib-storage.js.map +1 -0
- package/dist/src/routes/lib-tunnel.d.ts +8 -0
- package/dist/src/routes/lib-tunnel.d.ts.map +1 -0
- package/dist/src/routes/lib-tunnel.js +442 -0
- package/dist/src/routes/lib-tunnel.js.map +1 -0
- package/dist/src/routes/lib-wallet.d.ts +7 -0
- package/dist/src/routes/lib-wallet.d.ts.map +1 -0
- package/dist/src/routes/lib-wallet.js +129 -0
- package/dist/src/routes/lib-wallet.js.map +1 -0
- package/dist/src/routes/lib-work.d.ts +7 -0
- package/dist/src/routes/lib-work.d.ts.map +1 -0
- package/dist/src/routes/lib-work.js +210 -0
- package/dist/src/routes/lib-work.js.map +1 -0
- package/dist/src/routes/libs.d.ts +10 -0
- package/dist/src/routes/libs.d.ts.map +1 -0
- package/dist/src/routes/libs.js +989 -0
- package/dist/src/routes/libs.js.map +1 -0
- package/dist/src/routes/matches.d.ts +10 -0
- package/dist/src/routes/matches.d.ts.map +1 -0
- package/dist/src/routes/matches.js +218 -0
- package/dist/src/routes/matches.js.map +1 -0
- package/dist/src/routes/memory.d.ts +6 -0
- package/dist/src/routes/memory.d.ts.map +1 -0
- package/dist/src/routes/memory.js +796 -0
- package/dist/src/routes/memory.js.map +1 -0
- package/dist/src/routes/micro-memory.d.ts +5 -0
- package/dist/src/routes/micro-memory.d.ts.map +1 -0
- package/dist/src/routes/micro-memory.js +488 -0
- package/dist/src/routes/micro-memory.js.map +1 -0
- package/dist/src/routes/msm.d.ts +5 -0
- package/dist/src/routes/msm.d.ts.map +1 -0
- package/dist/src/routes/msm.js +242 -0
- package/dist/src/routes/msm.js.map +1 -0
- package/dist/src/routes/openrouter.d.ts +23 -0
- package/dist/src/routes/openrouter.d.ts.map +1 -0
- package/dist/src/routes/openrouter.js +337 -0
- package/dist/src/routes/openrouter.js.map +1 -0
- package/dist/src/routes/organisms.d.ts +5 -0
- package/dist/src/routes/organisms.d.ts.map +1 -0
- package/dist/src/routes/organisms.js +415 -0
- package/dist/src/routes/organisms.js.map +1 -0
- package/dist/src/routes/owners.d.ts +5 -0
- package/dist/src/routes/owners.d.ts.map +1 -0
- package/dist/src/routes/owners.js +637 -0
- package/dist/src/routes/owners.js.map +1 -0
- package/dist/src/routes/packages.d.ts +35 -0
- package/dist/src/routes/packages.d.ts.map +1 -0
- package/dist/src/routes/packages.js +600 -0
- package/dist/src/routes/packages.js.map +1 -0
- package/dist/src/routes/permissions.d.ts +5 -0
- package/dist/src/routes/permissions.d.ts.map +1 -0
- package/dist/src/routes/permissions.js +85 -0
- package/dist/src/routes/permissions.js.map +1 -0
- package/dist/src/routes/personal.d.ts +7 -0
- package/dist/src/routes/personal.d.ts.map +1 -0
- package/dist/src/routes/personal.js +594 -0
- package/dist/src/routes/personal.js.map +1 -0
- package/dist/src/routes/portal-api.d.ts +9 -0
- package/dist/src/routes/portal-api.d.ts.map +1 -0
- package/dist/src/routes/portal-api.js +49 -0
- package/dist/src/routes/portal-api.js.map +1 -0
- package/dist/src/routes/portal-human.d.ts +12 -0
- package/dist/src/routes/portal-human.d.ts.map +1 -0
- package/dist/src/routes/portal-human.js +2652 -0
- package/dist/src/routes/portal-human.js.map +1 -0
- package/dist/src/routes/portal.d.ts +24 -0
- package/dist/src/routes/portal.d.ts.map +1 -0
- package/dist/src/routes/portal.js +372 -0
- package/dist/src/routes/portal.js.map +1 -0
- package/dist/src/routes/portfolio.d.ts +5 -0
- package/dist/src/routes/portfolio.d.ts.map +1 -0
- package/dist/src/routes/portfolio.js +231 -0
- package/dist/src/routes/portfolio.js.map +1 -0
- package/dist/src/routes/profile.d.ts +5 -0
- package/dist/src/routes/profile.d.ts.map +1 -0
- package/dist/src/routes/profile.js +2042 -0
- package/dist/src/routes/profile.js.map +1 -0
- package/dist/src/routes/prompts.d.ts +5 -0
- package/dist/src/routes/prompts.d.ts.map +1 -0
- package/dist/src/routes/prompts.js +318 -0
- package/dist/src/routes/prompts.js.map +1 -0
- package/dist/src/routes/push.d.ts +6 -0
- package/dist/src/routes/push.d.ts.map +1 -0
- package/dist/src/routes/push.js +75 -0
- package/dist/src/routes/push.js.map +1 -0
- package/dist/src/routes/realtime.d.ts +7 -0
- package/dist/src/routes/realtime.d.ts.map +1 -0
- package/dist/src/routes/realtime.js +289 -0
- package/dist/src/routes/realtime.js.map +1 -0
- package/dist/src/routes/schemas.d.ts +5 -0
- package/dist/src/routes/schemas.d.ts.map +1 -0
- package/dist/src/routes/schemas.js +130 -0
- package/dist/src/routes/schemas.js.map +1 -0
- package/dist/src/routes/setup.d.ts +7 -0
- package/dist/src/routes/setup.d.ts.map +1 -0
- package/dist/src/routes/setup.js +243 -0
- package/dist/src/routes/setup.js.map +1 -0
- package/dist/src/routes/site.d.ts +6 -0
- package/dist/src/routes/site.d.ts.map +1 -0
- package/dist/src/routes/site.js +201 -0
- package/dist/src/routes/site.js.map +1 -0
- package/dist/src/routes/spec.d.ts +3 -0
- package/dist/src/routes/spec.d.ts.map +1 -0
- package/dist/src/routes/spec.js +47 -0
- package/dist/src/routes/spec.js.map +1 -0
- package/dist/src/routes/sse.d.ts +5 -0
- package/dist/src/routes/sse.d.ts.map +1 -0
- package/dist/src/routes/sse.js +66 -0
- package/dist/src/routes/sse.js.map +1 -0
- package/dist/src/routes/stats.d.ts +7 -0
- package/dist/src/routes/stats.d.ts.map +1 -0
- package/dist/src/routes/stats.js +98 -0
- package/dist/src/routes/stats.js.map +1 -0
- package/dist/src/routes/storage-files.d.ts +5 -0
- package/dist/src/routes/storage-files.d.ts.map +1 -0
- package/dist/src/routes/storage-files.js +460 -0
- package/dist/src/routes/storage-files.js.map +1 -0
- package/dist/src/routes/templates.d.ts +30 -0
- package/dist/src/routes/templates.d.ts.map +1 -0
- package/dist/src/routes/templates.js +511 -0
- package/dist/src/routes/templates.js.map +1 -0
- package/dist/src/routes/totp.d.ts +5 -0
- package/dist/src/routes/totp.d.ts.map +1 -0
- package/dist/src/routes/totp.js +166 -0
- package/dist/src/routes/totp.js.map +1 -0
- package/dist/src/routes/validate.d.ts +4 -0
- package/dist/src/routes/validate.d.ts.map +1 -0
- package/dist/src/routes/validate.js +71 -0
- package/dist/src/routes/validate.js.map +1 -0
- package/dist/src/routes/verification.d.ts +8 -0
- package/dist/src/routes/verification.d.ts.map +1 -0
- package/dist/src/routes/verification.js +259 -0
- package/dist/src/routes/verification.js.map +1 -0
- package/dist/src/routes/wallet.d.ts +18 -0
- package/dist/src/routes/wallet.d.ts.map +1 -0
- package/dist/src/routes/wallet.js +164 -0
- package/dist/src/routes/wallet.js.map +1 -0
- package/dist/src/routes/wellknown.d.ts +5 -0
- package/dist/src/routes/wellknown.d.ts.map +1 -0
- package/dist/src/routes/wellknown.js +57 -0
- package/dist/src/routes/wellknown.js.map +1 -0
- package/dist/src/routes/work.d.ts +21 -0
- package/dist/src/routes/work.d.ts.map +1 -0
- package/dist/src/routes/work.js +654 -0
- package/dist/src/routes/work.js.map +1 -0
- package/dist/src/schemas/knowledge-package.d.ts +203 -0
- package/dist/src/schemas/knowledge-package.d.ts.map +1 -0
- package/dist/src/schemas/knowledge-package.js +233 -0
- package/dist/src/schemas/knowledge-package.js.map +1 -0
- package/dist/src/server-bootstrap/config-init.d.ts +16 -0
- package/dist/src/server-bootstrap/config-init.d.ts.map +1 -0
- package/dist/src/server-bootstrap/config-init.js +113 -0
- package/dist/src/server-bootstrap/config-init.js.map +1 -0
- package/dist/src/server-bootstrap/middleware-guards.d.ts +15 -0
- package/dist/src/server-bootstrap/middleware-guards.d.ts.map +1 -0
- package/dist/src/server-bootstrap/middleware-guards.js +244 -0
- package/dist/src/server-bootstrap/middleware-guards.js.map +1 -0
- package/dist/src/server-bootstrap/routes-loader.d.ts +35 -0
- package/dist/src/server-bootstrap/routes-loader.d.ts.map +1 -0
- package/dist/src/server-bootstrap/routes-loader.js +290 -0
- package/dist/src/server-bootstrap/routes-loader.js.map +1 -0
- package/dist/src/server-bootstrap/service-init.d.ts +24 -0
- package/dist/src/server-bootstrap/service-init.d.ts.map +1 -0
- package/dist/src/server-bootstrap/service-init.js +195 -0
- package/dist/src/server-bootstrap/service-init.js.map +1 -0
- package/dist/src/server-bootstrap/static-files.d.ts +7 -0
- package/dist/src/server-bootstrap/static-files.d.ts.map +1 -0
- package/dist/src/server-bootstrap/static-files.js +119 -0
- package/dist/src/server-bootstrap/static-files.js.map +1 -0
- package/dist/src/server.d.ts +22 -0
- package/dist/src/server.d.ts.map +1 -0
- package/dist/src/server.js +133 -0
- package/dist/src/server.js.map +1 -0
- package/dist/src/services/cache-cleanup.d.ts +31 -0
- package/dist/src/services/cache-cleanup.d.ts.map +1 -0
- package/dist/src/services/cache-cleanup.js +123 -0
- package/dist/src/services/cache-cleanup.js.map +1 -0
- package/dist/src/services/catalogue-sync.d.ts +45 -0
- package/dist/src/services/catalogue-sync.d.ts.map +1 -0
- package/dist/src/services/catalogue-sync.js +196 -0
- package/dist/src/services/catalogue-sync.js.map +1 -0
- package/dist/src/services/component-registrar.d.ts +46 -0
- package/dist/src/services/component-registrar.d.ts.map +1 -0
- package/dist/src/services/component-registrar.js +389 -0
- package/dist/src/services/component-registrar.js.map +1 -0
- package/dist/src/services/config-loader.d.ts +42 -0
- package/dist/src/services/config-loader.d.ts.map +1 -0
- package/dist/src/services/config-loader.js +187 -0
- package/dist/src/services/config-loader.js.map +1 -0
- package/dist/src/services/config-provenance.d.ts +32 -0
- package/dist/src/services/config-provenance.d.ts.map +1 -0
- package/dist/src/services/config-provenance.js +59 -0
- package/dist/src/services/config-provenance.js.map +1 -0
- package/dist/src/services/config-schema.d.ts +52 -0
- package/dist/src/services/config-schema.d.ts.map +1 -0
- package/dist/src/services/config-schema.js +288 -0
- package/dist/src/services/config-schema.js.map +1 -0
- package/dist/src/services/consent.d.ts +43 -0
- package/dist/src/services/consent.d.ts.map +1 -0
- package/dist/src/services/consent.js +137 -0
- package/dist/src/services/consent.js.map +1 -0
- package/dist/src/services/consul-config.d.ts +30 -0
- package/dist/src/services/consul-config.d.ts.map +1 -0
- package/dist/src/services/consul-config.js +110 -0
- package/dist/src/services/consul-config.js.map +1 -0
- package/dist/src/services/core-jobs.d.ts +8 -0
- package/dist/src/services/core-jobs.d.ts.map +1 -0
- package/dist/src/services/core-jobs.js +161 -0
- package/dist/src/services/core-jobs.js.map +1 -0
- package/dist/src/services/cortex-manifest.d.ts +17 -0
- package/dist/src/services/cortex-manifest.d.ts.map +1 -0
- package/dist/src/services/cortex-manifest.js +343 -0
- package/dist/src/services/cortex-manifest.js.map +1 -0
- package/dist/src/services/cortex-seeder.d.ts +18 -0
- package/dist/src/services/cortex-seeder.d.ts.map +1 -0
- package/dist/src/services/cortex-seeder.js +86 -0
- package/dist/src/services/cortex-seeder.js.map +1 -0
- package/dist/src/services/cross-node-matching.d.ts +23 -0
- package/dist/src/services/cross-node-matching.d.ts.map +1 -0
- package/dist/src/services/cross-node-matching.js +62 -0
- package/dist/src/services/cross-node-matching.js.map +1 -0
- package/dist/src/services/csm-parser.d.ts +57 -0
- package/dist/src/services/csm-parser.d.ts.map +1 -0
- package/dist/src/services/csm-parser.js +161 -0
- package/dist/src/services/csm-parser.js.map +1 -0
- package/dist/src/services/csm-seed.d.ts +15 -0
- package/dist/src/services/csm-seed.d.ts.map +1 -0
- package/dist/src/services/csm-seed.js +89 -0
- package/dist/src/services/csm-seed.js.map +1 -0
- package/dist/src/services/directory.d.ts +86 -0
- package/dist/src/services/directory.d.ts.map +1 -0
- package/dist/src/services/directory.js +307 -0
- package/dist/src/services/directory.js.map +1 -0
- package/dist/src/services/email-templates.d.ts +29 -0
- package/dist/src/services/email-templates.d.ts.map +1 -0
- package/dist/src/services/email-templates.js +204 -0
- package/dist/src/services/email-templates.js.map +1 -0
- package/dist/src/services/email.d.ts +18 -0
- package/dist/src/services/email.d.ts.map +1 -0
- package/dist/src/services/email.js +102 -0
- package/dist/src/services/email.js.map +1 -0
- package/dist/src/services/encryption.d.ts +31 -0
- package/dist/src/services/encryption.d.ts.map +1 -0
- package/dist/src/services/encryption.js +51 -0
- package/dist/src/services/encryption.js.map +1 -0
- package/dist/src/services/eudiw.d.ts +15 -0
- package/dist/src/services/eudiw.d.ts.map +1 -0
- package/dist/src/services/eudiw.js +89 -0
- package/dist/src/services/eudiw.js.map +1 -0
- package/dist/src/services/event-bus.d.ts +8 -0
- package/dist/src/services/event-bus.d.ts.map +1 -0
- package/dist/src/services/event-bus.js +13 -0
- package/dist/src/services/event-bus.js.map +1 -0
- package/dist/src/services/extension-runtime.d.ts +72 -0
- package/dist/src/services/extension-runtime.d.ts.map +1 -0
- package/dist/src/services/extension-runtime.js +282 -0
- package/dist/src/services/extension-runtime.js.map +1 -0
- package/dist/src/services/federation-helpers.d.ts +37 -0
- package/dist/src/services/federation-helpers.d.ts.map +1 -0
- package/dist/src/services/federation-helpers.js +100 -0
- package/dist/src/services/federation-helpers.js.map +1 -0
- package/dist/src/services/federation.d.ts +32 -0
- package/dist/src/services/federation.d.ts.map +1 -0
- package/dist/src/services/federation.js +201 -0
- package/dist/src/services/federation.js.map +1 -0
- package/dist/src/services/foundry-debug.d.ts +77 -0
- package/dist/src/services/foundry-debug.d.ts.map +1 -0
- package/dist/src/services/foundry-debug.js +214 -0
- package/dist/src/services/foundry-debug.js.map +1 -0
- package/dist/src/services/foundry-registration.d.ts +42 -0
- package/dist/src/services/foundry-registration.d.ts.map +1 -0
- package/dist/src/services/foundry-registration.js +330 -0
- package/dist/src/services/foundry-registration.js.map +1 -0
- package/dist/src/services/foundry-testing.d.ts +90 -0
- package/dist/src/services/foundry-testing.d.ts.map +1 -0
- package/dist/src/services/foundry-testing.js +253 -0
- package/dist/src/services/foundry-testing.js.map +1 -0
- package/dist/src/services/foundry-validate.d.ts +115 -0
- package/dist/src/services/foundry-validate.d.ts.map +1 -0
- package/dist/src/services/foundry-validate.js +781 -0
- package/dist/src/services/foundry-validate.js.map +1 -0
- package/dist/src/services/generator-autopilot.d.ts +37 -0
- package/dist/src/services/generator-autopilot.d.ts.map +1 -0
- package/dist/src/services/generator-autopilot.js +1076 -0
- package/dist/src/services/generator-autopilot.js.map +1 -0
- package/dist/src/services/generator-debug.d.ts +79 -0
- package/dist/src/services/generator-debug.d.ts.map +1 -0
- package/dist/src/services/generator-debug.js +218 -0
- package/dist/src/services/generator-debug.js.map +1 -0
- package/dist/src/services/generator-prompt-seeds.d.ts +13 -0
- package/dist/src/services/generator-prompt-seeds.d.ts.map +1 -0
- package/dist/src/services/generator-prompt-seeds.js +2694 -0
- package/dist/src/services/generator-prompt-seeds.js.map +1 -0
- package/dist/src/services/generator-prompts/bundle.d.ts +17 -0
- package/dist/src/services/generator-prompts/bundle.d.ts.map +1 -0
- package/dist/src/services/generator-prompts/bundle.js +95 -0
- package/dist/src/services/generator-prompts/bundle.js.map +1 -0
- package/dist/src/services/generator-prompts/index.d.ts +48 -0
- package/dist/src/services/generator-prompts/index.d.ts.map +1 -0
- package/dist/src/services/generator-prompts/index.js +97 -0
- package/dist/src/services/generator-prompts/index.js.map +1 -0
- package/dist/src/services/generator-prompts/resolvers.d.ts +21 -0
- package/dist/src/services/generator-prompts/resolvers.d.ts.map +1 -0
- package/dist/src/services/generator-prompts/resolvers.js +1553 -0
- package/dist/src/services/generator-prompts/resolvers.js.map +1 -0
- package/dist/src/services/generator-prompts/spec-validate.d.ts +29 -0
- package/dist/src/services/generator-prompts/spec-validate.d.ts.map +1 -0
- package/dist/src/services/generator-prompts/spec-validate.js +190 -0
- package/dist/src/services/generator-prompts/spec-validate.js.map +1 -0
- package/dist/src/services/generator-prompts/strip.d.ts +13 -0
- package/dist/src/services/generator-prompts/strip.d.ts.map +1 -0
- package/dist/src/services/generator-prompts/strip.js +60 -0
- package/dist/src/services/generator-prompts/strip.js.map +1 -0
- package/dist/src/services/generator-prompts/types.d.ts +229 -0
- package/dist/src/services/generator-prompts/types.d.ts.map +1 -0
- package/dist/src/services/generator-prompts/types.js +8 -0
- package/dist/src/services/generator-prompts/types.js.map +1 -0
- package/dist/src/services/generator-prompts/validate.d.ts +48 -0
- package/dist/src/services/generator-prompts/validate.d.ts.map +1 -0
- package/dist/src/services/generator-prompts/validate.js +927 -0
- package/dist/src/services/generator-prompts/validate.js.map +1 -0
- package/dist/src/services/generator-registration.d.ts +43 -0
- package/dist/src/services/generator-registration.d.ts.map +1 -0
- package/dist/src/services/generator-registration.js +343 -0
- package/dist/src/services/generator-registration.js.map +1 -0
- package/dist/src/services/generator-testing.d.ts +93 -0
- package/dist/src/services/generator-testing.d.ts.map +1 -0
- package/dist/src/services/generator-testing.js +300 -0
- package/dist/src/services/generator-testing.js.map +1 -0
- package/dist/src/services/generator-validate.d.ts +117 -0
- package/dist/src/services/generator-validate.d.ts.map +1 -0
- package/dist/src/services/generator-validate.js +790 -0
- package/dist/src/services/generator-validate.js.map +1 -0
- package/dist/src/services/genesis-peering.d.ts +12 -0
- package/dist/src/services/genesis-peering.d.ts.map +1 -0
- package/dist/src/services/genesis-peering.js +91 -0
- package/dist/src/services/genesis-peering.js.map +1 -0
- package/dist/src/services/genesis-sync.d.ts +29 -0
- package/dist/src/services/genesis-sync.d.ts.map +1 -0
- package/dist/src/services/genesis-sync.js +370 -0
- package/dist/src/services/genesis-sync.js.map +1 -0
- package/dist/src/services/hooks.d.ts +21 -0
- package/dist/src/services/hooks.d.ts.map +1 -0
- package/dist/src/services/hooks.js +85 -0
- package/dist/src/services/hooks.js.map +1 -0
- package/dist/src/services/job-seeding.d.ts +7 -0
- package/dist/src/services/job-seeding.d.ts.map +1 -0
- package/dist/src/services/job-seeding.js +39 -0
- package/dist/src/services/job-seeding.js.map +1 -0
- package/dist/src/services/knowledge.d.ts +13 -0
- package/dist/src/services/knowledge.d.ts.map +1 -0
- package/dist/src/services/knowledge.js +15 -0
- package/dist/src/services/knowledge.js.map +1 -0
- package/dist/src/services/mailbox-notification.d.ts +37 -0
- package/dist/src/services/mailbox-notification.d.ts.map +1 -0
- package/dist/src/services/mailbox-notification.js +249 -0
- package/dist/src/services/mailbox-notification.js.map +1 -0
- package/dist/src/services/mailbox.d.ts +16 -0
- package/dist/src/services/mailbox.d.ts.map +1 -0
- package/dist/src/services/mailbox.js +77 -0
- package/dist/src/services/mailbox.js.map +1 -0
- package/dist/src/services/match-notification.d.ts +12 -0
- package/dist/src/services/match-notification.d.ts.map +1 -0
- package/dist/src/services/match-notification.js +121 -0
- package/dist/src/services/match-notification.js.map +1 -0
- package/dist/src/services/matching.d.ts +54 -0
- package/dist/src/services/matching.d.ts.map +1 -0
- package/dist/src/services/matching.js +293 -0
- package/dist/src/services/matching.js.map +1 -0
- package/dist/src/services/memory-replication.d.ts +43 -0
- package/dist/src/services/memory-replication.d.ts.map +1 -0
- package/dist/src/services/memory-replication.js +213 -0
- package/dist/src/services/memory-replication.js.map +1 -0
- package/dist/src/services/morsel.d.ts +49 -0
- package/dist/src/services/morsel.d.ts.map +1 -0
- package/dist/src/services/morsel.js +174 -0
- package/dist/src/services/morsel.js.map +1 -0
- package/dist/src/services/msm-parser.d.ts +55 -0
- package/dist/src/services/msm-parser.d.ts.map +1 -0
- package/dist/src/services/msm-parser.js +186 -0
- package/dist/src/services/msm-parser.js.map +1 -0
- package/dist/src/services/mydata-receipt.d.ts +29 -0
- package/dist/src/services/mydata-receipt.d.ts.map +1 -0
- package/dist/src/services/mydata-receipt.js +31 -0
- package/dist/src/services/mydata-receipt.js.map +1 -0
- package/dist/src/services/notification-templates.d.ts +40 -0
- package/dist/src/services/notification-templates.d.ts.map +1 -0
- package/dist/src/services/notification-templates.js +109 -0
- package/dist/src/services/notification-templates.js.map +1 -0
- package/dist/src/services/openrouter.d.ts +30 -0
- package/dist/src/services/openrouter.d.ts.map +1 -0
- package/dist/src/services/openrouter.js +95 -0
- package/dist/src/services/openrouter.js.map +1 -0
- package/dist/src/services/organism-reputation.d.ts +7 -0
- package/dist/src/services/organism-reputation.d.ts.map +1 -0
- package/dist/src/services/organism-reputation.js +107 -0
- package/dist/src/services/organism-reputation.js.map +1 -0
- package/dist/src/services/package-hash.d.ts +19 -0
- package/dist/src/services/package-hash.d.ts.map +1 -0
- package/dist/src/services/package-hash.js +22 -0
- package/dist/src/services/package-hash.js.map +1 -0
- package/dist/src/services/package-zip.d.ts +60 -0
- package/dist/src/services/package-zip.d.ts.map +1 -0
- package/dist/src/services/package-zip.js +267 -0
- package/dist/src/services/package-zip.js.map +1 -0
- package/dist/src/services/password.d.ts +9 -0
- package/dist/src/services/password.d.ts.map +1 -0
- package/dist/src/services/password.js +32 -0
- package/dist/src/services/password.js.map +1 -0
- package/dist/src/services/personal-routing.d.ts +21 -0
- package/dist/src/services/personal-routing.d.ts.map +1 -0
- package/dist/src/services/personal-routing.js +77 -0
- package/dist/src/services/personal-routing.js.map +1 -0
- package/dist/src/services/personal-tunnel.d.ts +39 -0
- package/dist/src/services/personal-tunnel.d.ts.map +1 -0
- package/dist/src/services/personal-tunnel.js +371 -0
- package/dist/src/services/personal-tunnel.js.map +1 -0
- package/dist/src/services/profile-schemas.d.ts +12 -0
- package/dist/src/services/profile-schemas.d.ts.map +1 -0
- package/dist/src/services/profile-schemas.js +100 -0
- package/dist/src/services/profile-schemas.js.map +1 -0
- package/dist/src/services/prometheus.d.ts +32 -0
- package/dist/src/services/prometheus.d.ts.map +1 -0
- package/dist/src/services/prometheus.js +162 -0
- package/dist/src/services/prometheus.js.map +1 -0
- package/dist/src/services/prompt-defaults.d.ts +33 -0
- package/dist/src/services/prompt-defaults.d.ts.map +1 -0
- package/dist/src/services/prompt-defaults.js +1675 -0
- package/dist/src/services/prompt-defaults.js.map +1 -0
- package/dist/src/services/prompt-seeder.d.ts +8 -0
- package/dist/src/services/prompt-seeder.d.ts.map +1 -0
- package/dist/src/services/prompt-seeder.js +65 -0
- package/dist/src/services/prompt-seeder.js.map +1 -0
- package/dist/src/services/prompt-variables.d.ts +15 -0
- package/dist/src/services/prompt-variables.d.ts.map +1 -0
- package/dist/src/services/prompt-variables.js +34 -0
- package/dist/src/services/prompt-variables.js.map +1 -0
- package/dist/src/services/push.d.ts +26 -0
- package/dist/src/services/push.d.ts.map +1 -0
- package/dist/src/services/push.js +70 -0
- package/dist/src/services/push.js.map +1 -0
- package/dist/src/services/quota.d.ts +45 -0
- package/dist/src/services/quota.d.ts.map +1 -0
- package/dist/src/services/quota.js +129 -0
- package/dist/src/services/quota.js.map +1 -0
- package/dist/src/services/realtime-manager.d.ts +144 -0
- package/dist/src/services/realtime-manager.d.ts.map +1 -0
- package/dist/src/services/realtime-manager.js +640 -0
- package/dist/src/services/realtime-manager.js.map +1 -0
- package/dist/src/services/scheduler.d.ts +55 -0
- package/dist/src/services/scheduler.d.ts.map +1 -0
- package/dist/src/services/scheduler.js +420 -0
- package/dist/src/services/scheduler.js.map +1 -0
- package/dist/src/services/schema-validator.d.ts +20 -0
- package/dist/src/services/schema-validator.d.ts.map +1 -0
- package/dist/src/services/schema-validator.js +68 -0
- package/dist/src/services/schema-validator.js.map +1 -0
- package/dist/src/services/site-sync.d.ts +15 -0
- package/dist/src/services/site-sync.d.ts.map +1 -0
- package/dist/src/services/site-sync.js +99 -0
- package/dist/src/services/site-sync.js.map +1 -0
- package/dist/src/services/site.d.ts +65 -0
- package/dist/src/services/site.d.ts.map +1 -0
- package/dist/src/services/site.js +378 -0
- package/dist/src/services/site.js.map +1 -0
- package/dist/src/services/stats.d.ts +75 -0
- package/dist/src/services/stats.d.ts.map +1 -0
- package/dist/src/services/stats.js +124 -0
- package/dist/src/services/stats.js.map +1 -0
- package/dist/src/services/sync-health.d.ts +53 -0
- package/dist/src/services/sync-health.d.ts.map +1 -0
- package/dist/src/services/sync-health.js +122 -0
- package/dist/src/services/sync-health.js.map +1 -0
- package/dist/src/services/sync-scheduler.d.ts +25 -0
- package/dist/src/services/sync-scheduler.d.ts.map +1 -0
- package/dist/src/services/sync-scheduler.js +211 -0
- package/dist/src/services/sync-scheduler.js.map +1 -0
- package/dist/src/services/totp.d.ts +31 -0
- package/dist/src/services/totp.d.ts.map +1 -0
- package/dist/src/services/totp.js +96 -0
- package/dist/src/services/totp.js.map +1 -0
- package/dist/src/services/trust-broadcast.d.ts +37 -0
- package/dist/src/services/trust-broadcast.d.ts.map +1 -0
- package/dist/src/services/trust-broadcast.js +107 -0
- package/dist/src/services/trust-broadcast.js.map +1 -0
- package/dist/src/services/trust.d.ts +16 -0
- package/dist/src/services/trust.d.ts.map +1 -0
- package/dist/src/services/trust.js +109 -0
- package/dist/src/services/trust.js.map +1 -0
- package/dist/src/services/vc-issuer.d.ts +14 -0
- package/dist/src/services/vc-issuer.d.ts.map +1 -0
- package/dist/src/services/vc-issuer.js +24 -0
- package/dist/src/services/vc-issuer.js.map +1 -0
- package/dist/src/storage/interface.d.ts +1161 -0
- package/dist/src/storage/interface.d.ts.map +1 -0
- package/dist/src/storage/interface.js +2 -0
- package/dist/src/storage/interface.js.map +1 -0
- package/dist/src/storage/pattern-utils.d.ts +20 -0
- package/dist/src/storage/pattern-utils.d.ts.map +1 -0
- package/dist/src/storage/pattern-utils.js +57 -0
- package/dist/src/storage/pattern-utils.js.map +1 -0
- package/dist/src/storage/providers/mongodb/index.d.ts +608 -0
- package/dist/src/storage/providers/mongodb/index.d.ts.map +1 -0
- package/dist/src/storage/providers/mongodb/index.js +4931 -0
- package/dist/src/storage/providers/mongodb/index.js.map +1 -0
- package/dist/src/storage/providers/sqlite/index.d.ts +602 -0
- package/dist/src/storage/providers/sqlite/index.d.ts.map +1 -0
- package/dist/src/storage/providers/sqlite/index.js +4156 -0
- package/dist/src/storage/providers/sqlite/index.js.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/action.d.ts +13 -0
- package/dist/src/storage/providers/sqlite/repos/action.d.ts.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/action.js +79 -0
- package/dist/src/storage/providers/sqlite/repos/action.js.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/agent.d.ts +13 -0
- package/dist/src/storage/providers/sqlite/repos/agent.d.ts.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/agent.js +103 -0
- package/dist/src/storage/providers/sqlite/repos/agent.js.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/auth.d.ts +56 -0
- package/dist/src/storage/providers/sqlite/repos/auth.d.ts.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/auth.js +282 -0
- package/dist/src/storage/providers/sqlite/repos/auth.js.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/board.d.ts +24 -0
- package/dist/src/storage/providers/sqlite/repos/board.d.ts.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/board.js +154 -0
- package/dist/src/storage/providers/sqlite/repos/board.js.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/community.d.ts +33 -0
- package/dist/src/storage/providers/sqlite/repos/community.d.ts.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/community.js +202 -0
- package/dist/src/storage/providers/sqlite/repos/community.js.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/consent.d.ts +23 -0
- package/dist/src/storage/providers/sqlite/repos/consent.d.ts.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/consent.js +187 -0
- package/dist/src/storage/providers/sqlite/repos/consent.js.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/dispute.d.ts +20 -0
- package/dist/src/storage/providers/sqlite/repos/dispute.d.ts.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/dispute.js +118 -0
- package/dist/src/storage/providers/sqlite/repos/dispute.js.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/flag.d.ts +26 -0
- package/dist/src/storage/providers/sqlite/repos/flag.d.ts.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/flag.js +147 -0
- package/dist/src/storage/providers/sqlite/repos/flag.js.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/identity.d.ts +36 -0
- package/dist/src/storage/providers/sqlite/repos/identity.d.ts.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/identity.js +297 -0
- package/dist/src/storage/providers/sqlite/repos/identity.js.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/mailbox.d.ts +18 -0
- package/dist/src/storage/providers/sqlite/repos/mailbox.d.ts.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/mailbox.js +91 -0
- package/dist/src/storage/providers/sqlite/repos/mailbox.js.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/memory.d.ts +28 -0
- package/dist/src/storage/providers/sqlite/repos/memory.d.ts.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/memory.js +152 -0
- package/dist/src/storage/providers/sqlite/repos/memory.js.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/owner.d.ts +14 -0
- package/dist/src/storage/providers/sqlite/repos/owner.d.ts.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/owner.js +124 -0
- package/dist/src/storage/providers/sqlite/repos/owner.js.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/service-manifest.d.ts +17 -0
- package/dist/src/storage/providers/sqlite/repos/service-manifest.d.ts.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/service-manifest.js +114 -0
- package/dist/src/storage/providers/sqlite/repos/service-manifest.js.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/storage-file.d.ts +19 -0
- package/dist/src/storage/providers/sqlite/repos/storage-file.d.ts.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/storage-file.js +128 -0
- package/dist/src/storage/providers/sqlite/repos/storage-file.js.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/work.d.ts +13 -0
- package/dist/src/storage/providers/sqlite/repos/work.d.ts.map +1 -0
- package/dist/src/storage/providers/sqlite/repos/work.js +86 -0
- package/dist/src/storage/providers/sqlite/repos/work.js.map +1 -0
- package/dist/src/storage/providers/sqlite/schema.d.ts +7 -0
- package/dist/src/storage/providers/sqlite/schema.d.ts.map +1 -0
- package/dist/src/storage/providers/sqlite/schema.js +1090 -0
- package/dist/src/storage/providers/sqlite/schema.js.map +1 -0
- package/dist/src/storage/repositories/action.repository.d.ts +14 -0
- package/dist/src/storage/repositories/action.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/action.repository.js +2 -0
- package/dist/src/storage/repositories/action.repository.js.map +1 -0
- package/dist/src/storage/repositories/agent.repository.d.ts +18 -0
- package/dist/src/storage/repositories/agent.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/agent.repository.js +2 -0
- package/dist/src/storage/repositories/agent.repository.js.map +1 -0
- package/dist/src/storage/repositories/app-marketplace.repository.d.ts +9 -0
- package/dist/src/storage/repositories/app-marketplace.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/app-marketplace.repository.js +2 -0
- package/dist/src/storage/repositories/app-marketplace.repository.js.map +1 -0
- package/dist/src/storage/repositories/app.repository.d.ts +17 -0
- package/dist/src/storage/repositories/app.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/app.repository.js +2 -0
- package/dist/src/storage/repositories/app.repository.js.map +1 -0
- package/dist/src/storage/repositories/auth.repository.d.ts +6 -0
- package/dist/src/storage/repositories/auth.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/auth.repository.js +2 -0
- package/dist/src/storage/repositories/auth.repository.js.map +1 -0
- package/dist/src/storage/repositories/board.repository.d.ts +27 -0
- package/dist/src/storage/repositories/board.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/board.repository.js +2 -0
- package/dist/src/storage/repositories/board.repository.js.map +1 -0
- package/dist/src/storage/repositories/catalogue.repository.d.ts +18 -0
- package/dist/src/storage/repositories/catalogue.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/catalogue.repository.js +2 -0
- package/dist/src/storage/repositories/catalogue.repository.js.map +1 -0
- package/dist/src/storage/repositories/config.repository.d.ts +17 -0
- package/dist/src/storage/repositories/config.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/config.repository.js +2 -0
- package/dist/src/storage/repositories/config.repository.js.map +1 -0
- package/dist/src/storage/repositories/consent.repository.d.ts +19 -0
- package/dist/src/storage/repositories/consent.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/consent.repository.js +2 -0
- package/dist/src/storage/repositories/consent.repository.js.map +1 -0
- package/dist/src/storage/repositories/device-auth.repository.d.ts +11 -0
- package/dist/src/storage/repositories/device-auth.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/device-auth.repository.js +2 -0
- package/dist/src/storage/repositories/device-auth.repository.js.map +1 -0
- package/dist/src/storage/repositories/dispute.repository.d.ts +12 -0
- package/dist/src/storage/repositories/dispute.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/dispute.repository.js +2 -0
- package/dist/src/storage/repositories/dispute.repository.js.map +1 -0
- package/dist/src/storage/repositories/extension-instance.repository.d.ts +9 -0
- package/dist/src/storage/repositories/extension-instance.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/extension-instance.repository.js +2 -0
- package/dist/src/storage/repositories/extension-instance.repository.js.map +1 -0
- package/dist/src/storage/repositories/federation.repository.d.ts +37 -0
- package/dist/src/storage/repositories/federation.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/federation.repository.js +2 -0
- package/dist/src/storage/repositories/federation.repository.js.map +1 -0
- package/dist/src/storage/repositories/file.repository.d.ts +14 -0
- package/dist/src/storage/repositories/file.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/file.repository.js +2 -0
- package/dist/src/storage/repositories/file.repository.js.map +1 -0
- package/dist/src/storage/repositories/identity.repository.d.ts +29 -0
- package/dist/src/storage/repositories/identity.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/identity.repository.js +2 -0
- package/dist/src/storage/repositories/identity.repository.js.map +1 -0
- package/dist/src/storage/repositories/index.d.ts +34 -0
- package/dist/src/storage/repositories/index.d.ts.map +1 -0
- package/dist/src/storage/repositories/index.js +2 -0
- package/dist/src/storage/repositories/index.js.map +1 -0
- package/dist/src/storage/repositories/knowledge.repository.d.ts +18 -0
- package/dist/src/storage/repositories/knowledge.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/knowledge.repository.js +2 -0
- package/dist/src/storage/repositories/knowledge.repository.js.map +1 -0
- package/dist/src/storage/repositories/marketplace.repository.d.ts +23 -0
- package/dist/src/storage/repositories/marketplace.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/marketplace.repository.js +2 -0
- package/dist/src/storage/repositories/marketplace.repository.js.map +1 -0
- package/dist/src/storage/repositories/memory.repository.d.ts +32 -0
- package/dist/src/storage/repositories/memory.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/memory.repository.js +2 -0
- package/dist/src/storage/repositories/memory.repository.js.map +1 -0
- package/dist/src/storage/repositories/micro-memory.repository.d.ts +10 -0
- package/dist/src/storage/repositories/micro-memory.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/micro-memory.repository.js +2 -0
- package/dist/src/storage/repositories/micro-memory.repository.js.map +1 -0
- package/dist/src/storage/repositories/moderation.repository.d.ts +36 -0
- package/dist/src/storage/repositories/moderation.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/moderation.repository.js +2 -0
- package/dist/src/storage/repositories/moderation.repository.js.map +1 -0
- package/dist/src/storage/repositories/node.repository.d.ts +59 -0
- package/dist/src/storage/repositories/node.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/node.repository.js +2 -0
- package/dist/src/storage/repositories/node.repository.js.map +1 -0
- package/dist/src/storage/repositories/notification-template.repository.d.ts +8 -0
- package/dist/src/storage/repositories/notification-template.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/notification-template.repository.js +2 -0
- package/dist/src/storage/repositories/notification-template.repository.js.map +1 -0
- package/dist/src/storage/repositories/notification.repository.d.ts +14 -0
- package/dist/src/storage/repositories/notification.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/notification.repository.js +2 -0
- package/dist/src/storage/repositories/notification.repository.js.map +1 -0
- package/dist/src/storage/repositories/oauth.repository.d.ts +19 -0
- package/dist/src/storage/repositories/oauth.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/oauth.repository.js +2 -0
- package/dist/src/storage/repositories/oauth.repository.js.map +1 -0
- package/dist/src/storage/repositories/organism.repository.d.ts +34 -0
- package/dist/src/storage/repositories/organism.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/organism.repository.js +2 -0
- package/dist/src/storage/repositories/organism.repository.js.map +1 -0
- package/dist/src/storage/repositories/otk.repository.d.ts +9 -0
- package/dist/src/storage/repositories/otk.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/otk.repository.js +2 -0
- package/dist/src/storage/repositories/otk.repository.js.map +1 -0
- package/dist/src/storage/repositories/owner.repository.d.ts +9 -0
- package/dist/src/storage/repositories/owner.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/owner.repository.js +2 -0
- package/dist/src/storage/repositories/owner.repository.js.map +1 -0
- package/dist/src/storage/repositories/package-instance.repository.d.ts +26 -0
- package/dist/src/storage/repositories/package-instance.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/package-instance.repository.js +12 -0
- package/dist/src/storage/repositories/package-instance.repository.js.map +1 -0
- package/dist/src/storage/repositories/package.repository.d.ts +28 -0
- package/dist/src/storage/repositories/package.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/package.repository.js +12 -0
- package/dist/src/storage/repositories/package.repository.js.map +1 -0
- package/dist/src/storage/repositories/replication-queue.repository.d.ts +10 -0
- package/dist/src/storage/repositories/replication-queue.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/replication-queue.repository.js +2 -0
- package/dist/src/storage/repositories/replication-queue.repository.js.map +1 -0
- package/dist/src/storage/repositories/scheduler.repository.d.ts +30 -0
- package/dist/src/storage/repositories/scheduler.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/scheduler.repository.js +2 -0
- package/dist/src/storage/repositories/scheduler.repository.js.map +1 -0
- package/dist/src/storage/repositories/schema.repository.d.ts +9 -0
- package/dist/src/storage/repositories/schema.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/schema.repository.js +2 -0
- package/dist/src/storage/repositories/schema.repository.js.map +1 -0
- package/dist/src/storage/repositories/session.repository.d.ts +22 -0
- package/dist/src/storage/repositories/session.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/session.repository.js +2 -0
- package/dist/src/storage/repositories/session.repository.js.map +1 -0
- package/dist/src/storage/repositories/system-prompt.repository.d.ts +14 -0
- package/dist/src/storage/repositories/system-prompt.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/system-prompt.repository.js +2 -0
- package/dist/src/storage/repositories/system-prompt.repository.js.map +1 -0
- package/dist/src/storage/repositories/template-listing.repository.d.ts +44 -0
- package/dist/src/storage/repositories/template-listing.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/template-listing.repository.js +13 -0
- package/dist/src/storage/repositories/template-listing.repository.js.map +1 -0
- package/dist/src/storage/repositories/wallet.repository.d.ts +8 -0
- package/dist/src/storage/repositories/wallet.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/wallet.repository.js +2 -0
- package/dist/src/storage/repositories/wallet.repository.js.map +1 -0
- package/dist/src/storage/repositories/work.repository.d.ts +10 -0
- package/dist/src/storage/repositories/work.repository.d.ts.map +1 -0
- package/dist/src/storage/repositories/work.repository.js +2 -0
- package/dist/src/storage/repositories/work.repository.js.map +1 -0
- package/dist/src/storage/storage-factory.d.ts +9 -0
- package/dist/src/storage/storage-factory.d.ts.map +1 -0
- package/dist/src/storage/storage-factory.js +20 -0
- package/dist/src/storage/storage-factory.js.map +1 -0
- package/dist/src/types/route-manifest.d.ts +53 -0
- package/dist/src/types/route-manifest.d.ts.map +1 -0
- package/dist/src/types/route-manifest.js +44 -0
- package/dist/src/types/route-manifest.js.map +1 -0
- package/dist/src/utils/catalogue-hash.d.ts +10 -0
- package/dist/src/utils/catalogue-hash.d.ts.map +1 -0
- package/dist/src/utils/catalogue-hash.js +23 -0
- package/dist/src/utils/catalogue-hash.js.map +1 -0
- package/dist/src/utils/env-config.d.ts +8 -0
- package/dist/src/utils/env-config.d.ts.map +1 -0
- package/dist/src/utils/env-config.js +1264 -0
- package/dist/src/utils/env-config.js.map +1 -0
- package/dist/src/utils/env-validator.d.ts +14 -0
- package/dist/src/utils/env-validator.d.ts.map +1 -0
- package/dist/src/utils/env-validator.js +338 -0
- package/dist/src/utils/env-validator.js.map +1 -0
- package/dist/src/utils/fire-hook.d.ts +9 -0
- package/dist/src/utils/fire-hook.d.ts.map +1 -0
- package/dist/src/utils/fire-hook.js +12 -0
- package/dist/src/utils/fire-hook.js.map +1 -0
- package/dist/src/utils/gaii.d.ts +57 -0
- package/dist/src/utils/gaii.d.ts.map +1 -0
- package/dist/src/utils/gaii.js +148 -0
- package/dist/src/utils/gaii.js.map +1 -0
- package/dist/src/utils/ghii-resolver.d.ts +14 -0
- package/dist/src/utils/ghii-resolver.d.ts.map +1 -0
- package/dist/src/utils/ghii-resolver.js +21 -0
- package/dist/src/utils/ghii-resolver.js.map +1 -0
- package/dist/src/utils/logger.d.ts +9 -0
- package/dist/src/utils/logger.d.ts.map +1 -0
- package/dist/src/utils/logger.js +36 -0
- package/dist/src/utils/logger.js.map +1 -0
- package/dist/src/utils/otk.d.ts +2 -0
- package/dist/src/utils/otk.d.ts.map +1 -0
- package/dist/src/utils/otk.js +5 -0
- package/dist/src/utils/otk.js.map +1 -0
- package/dist/src/utils/tracking-code.d.ts +9 -0
- package/dist/src/utils/tracking-code.d.ts.map +1 -0
- package/dist/src/utils/tracking-code.js +16 -0
- package/dist/src/utils/tracking-code.js.map +1 -0
- package/dist/src/utils/url-validator.d.ts +5 -0
- package/dist/src/utils/url-validator.d.ts.map +1 -0
- package/dist/src/utils/url-validator.js +56 -0
- package/dist/src/utils/url-validator.js.map +1 -0
- package/dist/static/app-catalog.html +4401 -0
- package/dist/static/cookieconsent.css +1 -0
- package/dist/static/cookieconsent.umd.js +7 -0
- package/dist/static/icons/icon-maskable.svg +27 -0
- package/dist/static/icons/icon.svg +27 -0
- package/dist/static/manifest.json +17 -0
- package/dist/static/offline.html +167 -0
- package/dist/static/sw.js +260 -0
- package/package.json +182 -0
- package/prisma/schema.prisma +1086 -0
|
@@ -0,0 +1,1126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file generator-prompts-build.js
|
|
3
|
+
* @description DEPRECATED — kept as backup/reference only.
|
|
4
|
+
* Prompts are now served from the database via GET /v1/generator/:projectId/prompts/:componentId.
|
|
5
|
+
* The database seeds (generator-prompt-seeds.ts) are the single source of truth.
|
|
6
|
+
* This file is no longer called by the generator UI for code/spec prompts.
|
|
7
|
+
* Blueprint and interview prompts may still use this file until they are migrated.
|
|
8
|
+
*
|
|
9
|
+
* @structure
|
|
10
|
+
* - buildBlueprintPrompt: produces blueprint generation prompt
|
|
11
|
+
* - buildInterviewPrompt: produces requirements interview conductor prompt
|
|
12
|
+
* - buildComponentPrompt: per-type component generation prompt dispatcher (DEPRECATED — use API)
|
|
13
|
+
* @usage
|
|
14
|
+
* // OLD (deprecated): import { buildComponentPrompt } from '/js/services/generator-prompts-build.js';
|
|
15
|
+
* // NEW: session.fetch('/v1/generator/${projectId}/prompts/${componentId}')
|
|
16
|
+
* @version-history
|
|
17
|
+
* v1.0.0 — 2026-03-22 — Extracted from generator-prompts.js
|
|
18
|
+
* v1.1.0 — 2026-03-24 — Add API URL usage rules + notes to extension data source details
|
|
19
|
+
* v2.0.0 — 2026-04-02 — DEPRECATED: prompts now served from database. File kept as backup.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import { AIMEAT_CONTEXT, INSTRUCTION_DISCLAIMER, COMPONENT_TEMPLATES, EXTENSION_CONSUMPTION_RULES, summarizeExtensionApi, summarizeCortexApi } from './generator-prompts-base.js';
|
|
23
|
+
import { formatSpecForPrompt } from './generator-specs.js';
|
|
24
|
+
|
|
25
|
+
// Cortex prompt modules — eagerly loaded in browser, injected by server.
|
|
26
|
+
// The modules are cached after first dynamic import.
|
|
27
|
+
let _cortexModules = null;
|
|
28
|
+
let _cortexModulesPromise = null;
|
|
29
|
+
|
|
30
|
+
/** Server-side injection point for cortex modules (called by generator-autopilot.ts) */
|
|
31
|
+
export function _setCortexModules(modules) {
|
|
32
|
+
_cortexModules = modules;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Pre-load cortex modules in background — awaited in buildComponentPrompt if needed
|
|
36
|
+
if (typeof window !== 'undefined') {
|
|
37
|
+
_cortexModulesPromise = Promise.all([
|
|
38
|
+
import('./generator-prompts-cortex-data.js'),
|
|
39
|
+
import('./generator-prompts-cortex-feature.js'),
|
|
40
|
+
import('./generator-prompts-cortex-app.js'),
|
|
41
|
+
import('./generator-context-bundle.js'),
|
|
42
|
+
]).then(([data, feature, app, bundle]) => {
|
|
43
|
+
_cortexModules = {
|
|
44
|
+
buildDataCortexPrompt: data.buildDataCortexPrompt,
|
|
45
|
+
buildFeatureCortexPrompt: feature.buildFeatureCortexPrompt,
|
|
46
|
+
buildAppDomainCortexPrompt: app.buildAppDomainCortexPrompt,
|
|
47
|
+
createBundle: bundle.createBundle,
|
|
48
|
+
formatBundlesForPrompt: bundle.formatBundlesForPrompt,
|
|
49
|
+
};
|
|
50
|
+
return _cortexModules;
|
|
51
|
+
}).catch(() => { /* server-side or import failure — cortex prompts unavailable */ });
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function buildBlueprintPrompt(description, interviewSpec = null, availableCortexLibs = null) {
|
|
55
|
+
const specContext = interviewSpec ? `
|
|
56
|
+
## Refined Specification (from requirements interview)
|
|
57
|
+
\`\`\`json
|
|
58
|
+
${JSON.stringify(interviewSpec, null, 2)}
|
|
59
|
+
\`\`\`
|
|
60
|
+
|
|
61
|
+
Use the specification above to determine the exact components needed. The data sources, entities, views, and constraints have been validated with the user.
|
|
62
|
+
` : '';
|
|
63
|
+
|
|
64
|
+
// Build cortex catalog if available
|
|
65
|
+
let cortexCatalog = '';
|
|
66
|
+
if (availableCortexLibs && availableCortexLibs.length > 0) {
|
|
67
|
+
cortexCatalog = `
|
|
68
|
+
## Available Cortex Libraries (reuse these — do NOT recreate)
|
|
69
|
+
|
|
70
|
+
The following cortex libraries are already installed on this node. If the project needs their capabilities, reference them in the cortex component's "uses" field instead of reimplementing.
|
|
71
|
+
|
|
72
|
+
${availableCortexLibs.map(lib => {
|
|
73
|
+
const libComps = (lib.components || []).filter(c => c.type === 'lib');
|
|
74
|
+
const exports = libComps.map(c => c.exports || []).flat();
|
|
75
|
+
const apiSurface = libComps.map(c => c.api_surface || '').filter(Boolean).join('\n');
|
|
76
|
+
return `### ${lib.name} — ${lib.description || 'no description'}
|
|
77
|
+
- **Exports:** ${exports.join(', ') || 'none'}
|
|
78
|
+
${apiSurface ? `- **API:**\n\`\`\`\n${apiSurface.trim()}\n\`\`\`` : ''}
|
|
79
|
+
- **Load:** \`<script src="/v1/cortex/${lib.name}/libs/${libComps[0]?.filename || lib.name + '.js'}"></script>\``;
|
|
80
|
+
}).join('\n\n')}
|
|
81
|
+
|
|
82
|
+
When the blueprint's cortex component needs an existing library, add a "uses" field listing the library names:
|
|
83
|
+
{ "id": "cortex-1", "type": "cortex", "label": "...", "produces": [...], "consumes": [...], "uses": ["aimeat-charts"] }
|
|
84
|
+
|
|
85
|
+
The generated cortex should load the used library via <script> and call its API (e.g., AIMEAT.charts.ChartBuilder) — NOT reimplement chart rendering.
|
|
86
|
+
`;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Thread language from interview spec to blueprint prompt
|
|
90
|
+
const specLocale = interviewSpec?.locale;
|
|
91
|
+
const langNote = specLocale && specLocale !== 'en'
|
|
92
|
+
? `\n## LANGUAGE\n\nThe user's language is "${specLocale}". Write all human-readable labels and descriptions in that language.\nJSON keys and technical identifiers stay in English.\n`
|
|
93
|
+
: '';
|
|
94
|
+
|
|
95
|
+
return `${INSTRUCTION_DISCLAIMER}${AIMEAT_CONTEXT}
|
|
96
|
+
|
|
97
|
+
The user wants to create this service:
|
|
98
|
+
---
|
|
99
|
+
${description}
|
|
100
|
+
---
|
|
101
|
+
${specContext}${langNote}${cortexCatalog}
|
|
102
|
+
Analyze this request and produce a JSON blueprint listing ALL components needed.
|
|
103
|
+
|
|
104
|
+
CRITICAL: Return ONLY a JSON object with "architecture", "components", "phases", "dataModel", and optionally "settings" and "testScenarios". Nothing else.
|
|
105
|
+
Each component has these fields: "id", "type", "label", "produces", "consumes". Extension components may also have "schedules".
|
|
106
|
+
Do NOT include manifest content, code, HTML, translations, or any implementation details.
|
|
107
|
+
The blueprint is a lightweight plan — actual content is generated later per component.
|
|
108
|
+
|
|
109
|
+
Format:
|
|
110
|
+
{
|
|
111
|
+
"architecture": "cortex-modular",
|
|
112
|
+
"components": [
|
|
113
|
+
{ "id": "csm-1", "type": "csm", "label": "Human-readable name", "produces": ["memory:service.schema"], "consumes": [] },
|
|
114
|
+
{ "id": "memory-1", "type": "memory", "label": "Human-readable name", "produces": ["memory:settings.config"], "consumes": [] },
|
|
115
|
+
{ "id": "translation-1", "type": "translation", "label": "Human-readable name (fi)", "produces": ["memory:i18n.fi"], "consumes": [] },
|
|
116
|
+
{ "id": "translation-2", "type": "translation", "label": "Human-readable name (en)", "produces": ["memory:i18n.en"], "consumes": [] },
|
|
117
|
+
{ "id": "ext-1", "type": "extension", "label": "Human-readable name", "produces": ["memory:items.*"], "consumes": ["memory:settings.config"], "schedules": [{"action":"init","cron":"@activate"},{"action":"collect","cron":"0 2 * * *"}] },
|
|
118
|
+
{ "id": "cortex-data", "type": "cortex", "subtype": "data", "label": "Data layer", "produces": ["api:getData", "api:search", "api:addItem", "api:removeItem"], "consumes": ["memory:items.*", "memory:settings.config"], "uses": [] },
|
|
119
|
+
{ "id": "component-item-card", "type": "cortex", "subtype": "component", "label": "Item Card", "produces": ["ui:item-card"], "consumes": ["api:getData"], "uses": ["aimeat-ui-viewers"] },
|
|
120
|
+
{ "id": "component-search-input", "type": "cortex", "subtype": "component", "label": "Search Input", "produces": ["ui:search-input"], "consumes": ["api:search"], "uses": ["aimeat-ui-forms"] },
|
|
121
|
+
{ "id": "cortex-app", "type": "cortex", "subtype": "app-domain", "label": "App domain", "produces": ["api:init", "api:render"], "consumes": ["ui:item-card", "ui:search-input"], "uses": ["aimeat-ui-nav"] },
|
|
122
|
+
{ "id": "app-1", "type": "app", "label": "Human-readable name", "produces": [], "consumes": ["api:init", "api:render"] }
|
|
123
|
+
],
|
|
124
|
+
"phases": [
|
|
125
|
+
{ "id": "define", "label": "Define Service", "componentIds": ["csm-1"] },
|
|
126
|
+
{ "id": "seed", "label": "Seed Data", "componentIds": ["memory-1", "translation-1", "translation-2"] },
|
|
127
|
+
{ "id": "logic", "label": "Capabilities", "componentIds": ["ext-1"] },
|
|
128
|
+
{ "id": "cortex-data", "label": "Data Layer", "componentIds": ["cortex-data"] },
|
|
129
|
+
{ "id": "components", "label": "UI Components", "componentIds": ["component-item-card", "component-search-input"] },
|
|
130
|
+
{ "id": "cortex-app", "label": "App Domain", "componentIds": ["cortex-app"] },
|
|
131
|
+
{ "id": "ui", "label": "Application", "componentIds": ["app-1"] }
|
|
132
|
+
],
|
|
133
|
+
"dataModel": {
|
|
134
|
+
"structures": {
|
|
135
|
+
"Item": {
|
|
136
|
+
"type": "object",
|
|
137
|
+
"properties": {
|
|
138
|
+
"id": { "type": "string" },
|
|
139
|
+
"title": { "type": "string" },
|
|
140
|
+
"status": { "type": "string" },
|
|
141
|
+
"createdAt": { "type": "string", "description": "ISO 8601" }
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"SearchResult": {
|
|
145
|
+
"type": "object",
|
|
146
|
+
"properties": {
|
|
147
|
+
"totalResults": { "type": "number" },
|
|
148
|
+
"items": { "type": "array", "items": { "$ref": "Item" } }
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"memoryKeys": {
|
|
153
|
+
"settings.config": {
|
|
154
|
+
"type": "object",
|
|
155
|
+
"properties": { "locale": { "type": "string" }, "refreshHours": { "type": "number" } },
|
|
156
|
+
"source": "config",
|
|
157
|
+
"producedBy": "memory-1",
|
|
158
|
+
"consumedBy": ["ext-1", "cortex-data"]
|
|
159
|
+
},
|
|
160
|
+
"items.data": {
|
|
161
|
+
"type": "array",
|
|
162
|
+
"items": { "$ref": "Item" },
|
|
163
|
+
"source": "external",
|
|
164
|
+
"producedBy": "ext-1",
|
|
165
|
+
"consumedBy": ["cortex-data"]
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"actions": {
|
|
169
|
+
"ext:search": { "input": { "query": { "type": "string" } }, "output": { "$ref": "SearchResult" } },
|
|
170
|
+
"ext:getItem": { "input": { "id": { "type": "string" } }, "output": { "$ref": "Item" } },
|
|
171
|
+
"ext:addItem": { "input": { "id": { "type": "string" }, "name": { "type": "string" } }, "output": { "$ref": "Item" } },
|
|
172
|
+
"ext:removeItem": { "input": { "id": { "type": "string" } }, "output": { "type": "boolean" } },
|
|
173
|
+
"cortex:search": { "input": { "query": { "type": "string" } }, "output": { "$ref": "SearchResult" } },
|
|
174
|
+
"cortex:getItem": { "input": { "id": { "type": "string" } }, "output": { "$ref": "Item" } },
|
|
175
|
+
"cortex:addItem": { "input": { "id": { "type": "string" }, "name": { "type": "string" } }, "output": { "$ref": "Item" } },
|
|
176
|
+
"cortex:removeItem": { "input": { "id": { "type": "string" } }, "output": { "type": "boolean" } }
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
CRITICAL RULES for the data model:
|
|
182
|
+
- Build "structures" from the interview's sampleEntry data — these are the REAL shapes from the verified API response.
|
|
183
|
+
- Every memory key and every action input/output MUST use "$ref" to reference a structure. This prevents data shape drift between components.
|
|
184
|
+
- Every "$ref" value MUST match a key in the "structures" object.
|
|
185
|
+
- Extension actions and cortex actions that pass through the same data MUST reference the SAME structure.
|
|
186
|
+
|
|
187
|
+
NOTE: The example above uses GENERIC placeholder names. Replace with domain-specific names from YOUR project. Do NOT copy these placeholder names.
|
|
188
|
+
|
|
189
|
+
Rules:
|
|
190
|
+
- Component types: csm, msm, extension, app, memory, translation, cortex
|
|
191
|
+
- IDs use format: {type}-{number} (e.g., csm-1, ext-1, app-1). ID prefixes can be short (ext-1) but the "type" field MUST be the full name: "extension" (not "ext").
|
|
192
|
+
- Each component object has these fields: "id", "type", "label", "produces", "consumes"
|
|
193
|
+
- Extension components may also have "schedules": array of { "action": "actionId", "cron": "cron-expression" }
|
|
194
|
+
- Valid cron values: standard 5-field cron syntax OR the special value "@activate"
|
|
195
|
+
- CRITICAL: cron expressions MUST have exactly 5 fields separated by spaces.
|
|
196
|
+
CORRECT examples (copy these exactly):
|
|
197
|
+
"0 2 * * *" ← every day at 02:00
|
|
198
|
+
"*/15 * * * *" ← every 15 minutes (note: ASTERISK-SLASH-15, not just /15)
|
|
199
|
+
"10 2 * * *" ← every day at 02:10
|
|
200
|
+
WRONG: "/15 * * * *" (missing leading asterisk), "0 2 * *" (only 4 fields)
|
|
201
|
+
Every asterisk character (*) is REQUIRED — do NOT omit them.
|
|
202
|
+
- "@activate" means: runs on extension activation AND on every server restart. Use for init/bootstrap jobs that populate initial data, verify data integrity, or recover from missed scheduled runs. These MUST be idempotent (safe to run repeatedly).
|
|
203
|
+
- Use "schedules" for any work that must happen automatically without a browser (data collection, nightly aggregation, periodic computation)
|
|
204
|
+
- If an extension collects or computes data, it SHOULD have an "@activate" init job that checks for stale/missing data and populates it — this solves the cold-start problem (empty data after first install or server restart)
|
|
205
|
+
- If an extension has NO scheduled actions, omit the "schedules" field entirely
|
|
206
|
+
- "produces": array of data outputs (format: "memory:namespace.*" for memory, "api:methodName" for cortex/app)
|
|
207
|
+
- "consumes": array of data inputs this component reads from
|
|
208
|
+
- Group components into logical phases
|
|
209
|
+
- Include ALL components needed for a complete, working service
|
|
210
|
+
- Cortex components are layered: data cortex phase → feature cortex phase → app-domain cortex phase → app phase
|
|
211
|
+
- Data cortex: ALL data operations (reads AND writes), wraps extension + AIMEAT platform libraries. Every extension action must have a corresponding cortex api: method — the data cortex is the ONLY gateway, UI components never call the extension directly
|
|
212
|
+
- Feature cortex: self-contained data+UI per use case, uses data cortex + platform UI cortex libraries
|
|
213
|
+
- App-domain cortex: composes all features + auth + translations, entry point for app
|
|
214
|
+
- ALWAYS create at least 3 cortex components: one data, one or more feature, one app-domain
|
|
215
|
+
- Only include what's actually needed — don't pad with unnecessary components
|
|
216
|
+
- TRANSLATIONS: Create ONE translation component PER locale. If the spec has locales ["fi", "en"], create translation-1 for fi AND translation-2 for en. NEVER combine multiple locales into one component.
|
|
217
|
+
- MSM: Only create an MSM if the external API requires authentication, API keys, or complex endpoint configuration. Public URLs (RSS feeds, open APIs, open data) do NOT need an MSM — extensions fetch them directly with ctx.fetch().
|
|
218
|
+
- MEMORY: Create memory components for (a) static/seed data provided by the user (lookup tables, reference datasets) and (b) default settings/configuration that the service needs on first run. Pre-populating defaults in memory means the app works immediately without hardcoded fallbacks.
|
|
219
|
+
- MEMORY KEY NAMING: Use consistent namespace prefixes. Standard conventions: "settings.config" for config, "i18n.{locale}" for translations, descriptive namespace for domain data (e.g., "orders.by-date.*", "stats.daily.*", "scores.by-date.*"). Use dot-separated namespaces, not nested objects.
|
|
220
|
+
- CORTEX: Cortex is the application's brain. It handles data access, UI rendering, business logic, and composition. It can use AIMEAT platform libraries (data, storage, social, wallet) directly. It can render UI components (like aimeat-charts renders charts). Apps use cortex for everything.
|
|
221
|
+
|
|
222
|
+
## dataModel — Domain Data Model (REQUIRED)
|
|
223
|
+
|
|
224
|
+
The dataModel is a JSON Schema based map of EVERY memory key in the project. It is the single source of truth — all components reference it to know exact data shapes.
|
|
225
|
+
|
|
226
|
+
Rules for dataModel:
|
|
227
|
+
- One entry per memory key pattern (use YYYY-MM-DD for date-bucketed keys)
|
|
228
|
+
- Each entry uses JSON Schema (draft 2020-12): type, properties, items, enum, description
|
|
229
|
+
- "source": one of "static" (user-provided data), "external" (fetched from API/feed), "computed" (calculated by extension), "config" (default settings)
|
|
230
|
+
- "producedBy": exactly ONE component ID that writes this key
|
|
231
|
+
- "consumedBy": array of component IDs that read this key
|
|
232
|
+
- Every memory key referenced in produces/consumes MUST have a dataModel entry
|
|
233
|
+
- Prefer fewer, larger keys. A lookup table or dataset should be ONE key (array/object), not split per entry.
|
|
234
|
+
- Include i18n keys (i18n.fi, i18n.en) with source "static" and translation component as producer
|
|
235
|
+
- CRITICAL: If the interview provides static data in a specific format (e.g., array of {key, value} pairs), the dataModel schema MUST match that exact format. Do NOT redesign the data shape — the memory component will store it as-is.
|
|
236
|
+
- Enum values: use consistent naming across all components. For computed enums (trends, levels, statuses), use lowercase English: "rising"/"falling"/"steady" for trends, "low"/"medium"/"high"/"critical" for levels. If source data uses locale-specific values, keep those as-is in storage — do NOT translate them. Store what the source provides.
|
|
237
|
+
- Field names inside stored objects MUST use English camelCase (e.g., "itemCount", "categoryBreakdown", "statusSplit"). This applies even if the source data uses different naming.
|
|
238
|
+
|
|
239
|
+
## Data Pipeline Verification (do this BEFORE listing components)
|
|
240
|
+
|
|
241
|
+
### Step 1: Trace RENDER paths (what data does each view display?)
|
|
242
|
+
For each VIEW in the spec:
|
|
243
|
+
1. What fields does this view need to render?
|
|
244
|
+
2. Where does each field come from? (external source, computed, user input)
|
|
245
|
+
3. Does the source provide this field directly, or does a component need to transform/enrich it?
|
|
246
|
+
4. If a field has no clear path from source to view, add a component that produces it.
|
|
247
|
+
|
|
248
|
+
### Step 2: Trace USER ACTION paths (what can the user DO?)
|
|
249
|
+
For each USE CASE in the spec:
|
|
250
|
+
1. What actions can the user take? (add, remove, save, update, delete, submit)
|
|
251
|
+
2. For each action, trace the full path: UI component → cortex-data → extension action
|
|
252
|
+
3. Does cortex-data produce an api: method for this action? If not, add it.
|
|
253
|
+
4. Does the UI component consume that api: method? If not, add it to consumes.
|
|
254
|
+
5. If an extension has a write action but no cortex api: method exposes it, the user cannot reach it — this is a gap.
|
|
255
|
+
|
|
256
|
+
Both reads AND writes must have complete paths from UI to extension. If a use case says "add item to list", there must be an api:addItem in cortex-data AND the relevant UI component must consume it.
|
|
257
|
+
|
|
258
|
+
## Component Dependencies
|
|
259
|
+
|
|
260
|
+
Each component MUST declare what it produces and consumes:
|
|
261
|
+
- Extensions produce memory keys (e.g., "memory:items.by-date.*")
|
|
262
|
+
- Cortex libraries produce API methods (e.g., "api:getItems") and consume memory keys
|
|
263
|
+
- Apps consume API methods or memory keys
|
|
264
|
+
- Every "consumes" entry must be matched by a "produces" entry in another component
|
|
265
|
+
|
|
266
|
+
## CRITICAL: Extension vs Cortex vs App — Decision Framework
|
|
267
|
+
|
|
268
|
+
### The One Rule: EXTENSION = SERVER-ONLY WORK
|
|
269
|
+
An extension MUST do something that a browser CANNOT do. If a browser can do it, it MUST NOT be an extension.
|
|
270
|
+
|
|
271
|
+
**Use extension when ALL of these are true:**
|
|
272
|
+
1. The work REQUIRES the server (external API behind CORS/auth, scheduled cron, server-to-server calls)
|
|
273
|
+
2. The work must happen even when NO browser is open
|
|
274
|
+
3. There is no way to achieve it with client-side JS + AIMEAT.data API
|
|
275
|
+
|
|
276
|
+
**Scheduled work ALWAYS belongs to the extension** — the extension manifest declares \`schedules\` entries and AIMEAT's built-in scheduler runs them automatically. The cortex and app NEVER schedule or trigger recurring background work.
|
|
277
|
+
|
|
278
|
+
**Everything else is cortex or app:**
|
|
279
|
+
- Reading/filtering/transforming data already in memory → cortex
|
|
280
|
+
- User preferences, settings, i18n → cortex (wraps memory reads/writes into clean methods)
|
|
281
|
+
- Computed/derived values (math, sorting, grouping, statistics) → cortex
|
|
282
|
+
- Export/download generation (CSV, JSON, PDF) → app (browser generates the file)
|
|
283
|
+
- Display formatting, UI logic → app (calls cortex methods, never reads memory directly)
|
|
284
|
+
|
|
285
|
+
### Quick Test (apply to EVERY proposed extension)
|
|
286
|
+
Ask: "Does this action fetch from an external server or run on a schedule?"
|
|
287
|
+
- YES → extension ✓
|
|
288
|
+
- NO → it should be cortex (data logic) or app (UI/interaction) ✗
|
|
289
|
+
|
|
290
|
+
### Static Data → Memory Component
|
|
291
|
+
If a dataSource has type "user-input" with a "staticData" array, you MUST create a memory component for it.
|
|
292
|
+
This memory component will pre-load the static data into memory so extensions and cortex can read it.
|
|
293
|
+
The memory component's "produces" should reflect the memory key pattern (e.g., "memory:catalog.data").
|
|
294
|
+
Place it in an early phase (before extensions that consume it).
|
|
295
|
+
|
|
296
|
+
### Common Mistakes to Avoid
|
|
297
|
+
- Do NOT create an "export" extension — apps generate files client-side
|
|
298
|
+
- Do NOT create a "settings" extension — settings go in a memory component (defaults) and cortex (read/write methods)
|
|
299
|
+
- Do NOT create a "query" or "filter" extension — cortex reads memory directly
|
|
300
|
+
- Do NOT create a "compute" extension for math/stats — cortex/app does client-side math
|
|
301
|
+
|
|
302
|
+
### How They Work Together
|
|
303
|
+
- Extension: fetches external data → stores in memory (scheduled, server-side)
|
|
304
|
+
- Cortex: reads extension memory → transforms → exposes clean domain API (client-side library)
|
|
305
|
+
- App: calls cortex methods → renders UI → handles user interaction (client-side HTML/JS)
|
|
306
|
+
|
|
307
|
+
## Cortex-Modular Architecture
|
|
308
|
+
|
|
309
|
+
Structure the service using layered cortex components:
|
|
310
|
+
|
|
311
|
+
1. **Extensions** at the bottom — external API calls, scheduled background jobs. Project-agnostic platform capabilities.
|
|
312
|
+
2. **Data Cortex** (subtype: "data") — wraps extension actions + AIMEAT platform data into clean async methods. ALWAYS create when there are extensions. Pure data access — no UI.
|
|
313
|
+
3. **Components** (subtype: "component") — REUSABLE UI PIECES. Each component renders ONE thing well: a card, a badge, a timeline, a search input. Components are composed by the app-domain cortex into views. They are NOT monolithic feature views.
|
|
314
|
+
4. **App-Domain Cortex** (subtype: "app-domain") — composes components into views, manages navigation, auth, translations, and business logic. Single entry point for the app. ALWAYS the last cortex component.
|
|
315
|
+
5. **App** — loads app-domain cortex, calls init() and render(). Thin shell.
|
|
316
|
+
|
|
317
|
+
## Component Decomposition (CRITICAL — read this carefully)
|
|
318
|
+
|
|
319
|
+
Instead of creating ONE cortex per view (monolithic "feature cortex"), identify REUSABLE UI COMPONENTS:
|
|
320
|
+
|
|
321
|
+
WRONG — monolithic feature cortexes that each reinvent common patterns:
|
|
322
|
+
{ "id": "cortex-search", "type": "cortex", "subtype": "feature", "label": "Search Feature Cortex" }
|
|
323
|
+
{ "id": "cortex-watchlist", "type": "cortex", "subtype": "feature", "label": "Watchlist Feature Cortex" }
|
|
324
|
+
|
|
325
|
+
CORRECT — reusable components composed by app-domain cortex:
|
|
326
|
+
{ "id": "cortex-data", "type": "cortex", "subtype": "data", "label": "Data Cortex" }
|
|
327
|
+
{ "id": "component-company-card", "type": "cortex", "subtype": "component", "label": "Company Card" }
|
|
328
|
+
{ "id": "component-search-input", "type": "cortex", "subtype": "component", "label": "Search Input" }
|
|
329
|
+
{ "id": "component-watchlist-badge", "type": "cortex", "subtype": "component", "label": "Watchlist Badge" }
|
|
330
|
+
{ "id": "component-change-timeline", "type": "cortex", "subtype": "component", "label": "Change Timeline" }
|
|
331
|
+
{ "id": "cortex-app-domain", "type": "cortex", "subtype": "app-domain", "label": "App Domain" }
|
|
332
|
+
|
|
333
|
+
Each component renders ONE thing well. The app-domain cortex composes them into views and pages.
|
|
334
|
+
Ask: "Would this UI piece be useful in a different view or a different app?" If yes → component.
|
|
335
|
+
|
|
336
|
+
Cortex components have a "subtype" field: "data", "component", or "app-domain".
|
|
337
|
+
Cortex phases are ordered: data first, then all components, then app-domain last.
|
|
338
|
+
Component "uses" field lists platform cortex libraries it needs (aimeat-ui-viewers, aimeat-charts, etc.).
|
|
339
|
+
|
|
340
|
+
## Settings
|
|
341
|
+
|
|
342
|
+
Inherit settings from the InterviewSpec (if provided):
|
|
343
|
+
|
|
344
|
+
"settings": {
|
|
345
|
+
"service": [/* from interviewSpec.externalServices[].requiredSettings — add "sharing" ("shared" or "per-user") from the parent externalService's sharingModel, and "required": true/false based on whether the service can function without it */],
|
|
346
|
+
"user": [/* from interviewSpec.userSettings — carry over key, type, label, default */]
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
Each service setting gets a "sharing" field ("shared" or "per-user") from the InterviewSpec's externalServices.
|
|
350
|
+
Add "required": true/false based on whether the service can function without it.
|
|
351
|
+
The blueprint may refine defaults but must not invent new settings not in the InterviewSpec.
|
|
352
|
+
If no InterviewSpec is provided or it has no settings, omit the "settings" field.
|
|
353
|
+
|
|
354
|
+
## Test Scenarios
|
|
355
|
+
|
|
356
|
+
For each component that produces data, generate test scenarios:
|
|
357
|
+
|
|
358
|
+
"testScenarios": [
|
|
359
|
+
{
|
|
360
|
+
"component": "component-id",
|
|
361
|
+
"scenarios": [
|
|
362
|
+
{
|
|
363
|
+
"action": "actionName",
|
|
364
|
+
"input": { "key": "value" },
|
|
365
|
+
"expect": "natural language description of expected result",
|
|
366
|
+
"type": "memory | external-api"
|
|
367
|
+
}
|
|
368
|
+
]
|
|
369
|
+
}
|
|
370
|
+
]
|
|
371
|
+
|
|
372
|
+
IMPORTANT — classify each scenario's "type":
|
|
373
|
+
- "memory": action uses ONLY ctx.memory (no ctx.fetch to external URLs). Tests MUST assert specific return values.
|
|
374
|
+
- "external-api": action calls ctx.fetch to a third-party API. Tests check response SHAPE only (has data OR error message), because the external API may be down or rate-limited. Graceful error handling is correct behavior.
|
|
375
|
+
|
|
376
|
+
Examples:
|
|
377
|
+
{ "action": "init", "input": {}, "expect": "Initializes data structures", "type": "memory" }
|
|
378
|
+
{ "action": "search", "input": { "query": "test" }, "expect": "Returns matching items from external API", "type": "external-api" }
|
|
379
|
+
{ "action": "removeItem", "input": { "id": "abc-123" }, "expect": "Removes entry from memory", "type": "memory" }
|
|
380
|
+
|
|
381
|
+
Be concrete: use real-world example values (e.g., symbol "AAPL" for stock data, city "Helsinki" for weather).
|
|
382
|
+
Test the happy path — the test system handles error paths.
|
|
383
|
+
Include testScenarios at the top level of the output JSON (alongside "components", "phases", "dataModel").`;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/* ── Interview Prompt ──────────────────────────────────── */
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Build an interview prompt that the user copies to AI Chat.
|
|
390
|
+
* AI Chat interviews the user and produces a structured JSON spec.
|
|
391
|
+
*/
|
|
392
|
+
export function buildInterviewPrompt(description, locale = 'en') {
|
|
393
|
+
const langMap = { fi: 'Finnish (suomi)', en: 'English', sv: 'Swedish (svenska)', de: 'German (Deutsch)', fr: 'French (français)', es: 'Spanish (español)', ja: 'Japanese (日本語)', zh: 'Chinese (中文)' };
|
|
394
|
+
const langName = langMap[locale] || locale;
|
|
395
|
+
const langInstruction = locale !== 'en'
|
|
396
|
+
? `\n## LANGUAGE\n\nCONDUCT THIS ENTIRE INTERVIEW IN ${langName.toUpperCase()}.\nAll your questions, summaries, options, and explanations must be in ${langName}.\nThe final JSON specification field values (descriptions, titles, notes) should also be in ${langName}.\nJSON keys and technical identifiers (field names, type values) stay in English.\nInclude "locale": "${locale}" in the output JSON root so downstream prompts continue in the same language.\n`
|
|
397
|
+
: '';
|
|
398
|
+
|
|
399
|
+
return `${INSTRUCTION_DISCLAIMER}You are a requirements analyst for the AIMEAT service generator.
|
|
400
|
+
The user wants to build a service. Your job is to interview them to produce a clear, structured specification.
|
|
401
|
+
${langInstruction}
|
|
402
|
+
## User's Initial Description
|
|
403
|
+
---
|
|
404
|
+
${description}
|
|
405
|
+
---
|
|
406
|
+
|
|
407
|
+
## CRITICAL — Interview Discipline
|
|
408
|
+
|
|
409
|
+
QUESTION BUDGET: You have a maximum of 20 questions total across all sections.
|
|
410
|
+
Use cases get the most (up to 8), other sections 2-3 each. Batch related questions together.
|
|
411
|
+
Do NOT split every detail into a separate numbered question.
|
|
412
|
+
|
|
413
|
+
YOU DECIDE (never ask the user about these — the generator handles them):
|
|
414
|
+
- Implementation details: file formats, data serialization, error handling, API design, caching
|
|
415
|
+
- Technical methods: how to fetch data, how to parse it, how to store it, how to compute derived values
|
|
416
|
+
- UI component details: which chart library, marker clustering, column ordering, widget placement
|
|
417
|
+
- Infrastructure: scheduler times, retention periods, timeout values, rate limits, job scheduling
|
|
418
|
+
- Data schema internals: field names, ID generation, deduplication strategy, index design
|
|
419
|
+
- Code-level choices: typography/font specifics, animation libraries, export format implementation
|
|
420
|
+
- Auth, login, user management, access control, user counts, audience size — AIMEAT handles all of these
|
|
421
|
+
|
|
422
|
+
The user describes WHAT they want and WHY. The generator decides HOW.
|
|
423
|
+
|
|
424
|
+
## Interview Rules
|
|
425
|
+
|
|
426
|
+
1. ADAPT TO THE USER'S LEVEL:
|
|
427
|
+
- Start by asking: "Are you a technical person who'd prefer detailed technical questions, or would you like me to keep things simple and explain as we go?"
|
|
428
|
+
- If non-technical: ask simple questions with examples
|
|
429
|
+
- If technical: ask direct questions to speed things up
|
|
430
|
+
|
|
431
|
+
2. COVER THESE AREAS (in order):
|
|
432
|
+
a) USE CASES — What will people actually do with this? (up to 8 questions)
|
|
433
|
+
This is the MOST IMPORTANT section. Spend time here.
|
|
434
|
+
- Propose 3-5 concrete use cases based on the description as selectable options (A, B, C, D)
|
|
435
|
+
- For each use case, include a one-sentence description of what it means in practice
|
|
436
|
+
- Let the user add their own use cases
|
|
437
|
+
- For must-have use cases, ask 1-2 clarifying questions about scope and defaults
|
|
438
|
+
- IMPORTANT: Do NOT move to the next section until the user confirms all use cases
|
|
439
|
+
- Ask: "Any other use cases, or shall we move on?"
|
|
440
|
+
|
|
441
|
+
b) DATA SOURCES — Where does the data come from? (2-3 questions)
|
|
442
|
+
- What external feeds/APIs/URLs does it use?
|
|
443
|
+
- Is any data user-generated or computed from other data?
|
|
444
|
+
|
|
445
|
+
URL VALIDATION PROTOCOL (MANDATORY for every external data source):
|
|
446
|
+
For EVERY URL the user mentions, follow this escalation path:
|
|
447
|
+
|
|
448
|
+
Step 1: YOU test it
|
|
449
|
+
- Try to fetch the URL and describe what you see
|
|
450
|
+
- If it works: capture one raw entry verbatim (RSS <item>, JSON object, etc.)
|
|
451
|
+
- Note encoding, content type, response structure, any auth requirements
|
|
452
|
+
|
|
453
|
+
Step 2: If YOU cannot access it, help the USER test it
|
|
454
|
+
- Say honestly: "I can't access this URL. Can you test it?"
|
|
455
|
+
- Give the user a concrete test command they can run:
|
|
456
|
+
curl -s "https://example.com/api/endpoint" | head -50
|
|
457
|
+
Or: "Open this URL in your browser and paste what you see"
|
|
458
|
+
- Ask the user to paste the response (or a representative sample)
|
|
459
|
+
- When they paste it, analyze the format and confirm you understand the structure
|
|
460
|
+
|
|
461
|
+
Step 3: If NEITHER can access it, decide TOGETHER what to do
|
|
462
|
+
- Present these options clearly:
|
|
463
|
+
A) SKIP this data source — remove use cases and features that depend on it
|
|
464
|
+
B) USE DEMO DATA — generate realistic mock data that gets loaded as static
|
|
465
|
+
data on first install. The app works immediately but shows example data.
|
|
466
|
+
Mark the data source as "demo" in the spec so extensions skip the fetch.
|
|
467
|
+
C) DEFER — keep the data source in the spec but mark it "unverified".
|
|
468
|
+
The extension will try to fetch it, but the app must handle gracefully
|
|
469
|
+
when no data is available (empty states, "data source unavailable" message)
|
|
470
|
+
- Let the user choose. If they pick B, help them define what realistic demo
|
|
471
|
+
data looks like (5-10 sample entries with realistic field values).
|
|
472
|
+
- If they pick A, immediately review use cases and remove any that fully
|
|
473
|
+
depend on the removed source. Confirm removals with the user.
|
|
474
|
+
|
|
475
|
+
HARD RULE: Never generate extension code that calls an unverified external URL.
|
|
476
|
+
Every URL in the final spec must have "verified": true (tested by AI or user)
|
|
477
|
+
or "verified": false with a "fallback" strategy ("demo", "defer", or "skip").
|
|
478
|
+
|
|
479
|
+
For VERIFIED sources:
|
|
480
|
+
- Capture at least ONE real sample entry in the spec
|
|
481
|
+
- CRITICAL: Also capture the response ENVELOPE — the top-level JSON structure that wraps the entries.
|
|
482
|
+
Example: if the API returns {"totalResults": 1, "companies": [...]}, the envelope is:
|
|
483
|
+
{"totalResults": "number", "companies": "array of company objects"}
|
|
484
|
+
Put this in the "responseEnvelope" field. This prevents the extension generator from guessing
|
|
485
|
+
wrong field names (e.g., using "results" when the API returns "companies").
|
|
486
|
+
- Note non-obvious characteristics: encoding declaration, nested structures,
|
|
487
|
+
timestamps with ambiguous formats, mixed-language content
|
|
488
|
+
- NEVER generate parsing code based on assumed format — you need real evidence
|
|
489
|
+
|
|
490
|
+
STATIC / USER-PROVIDED DATA (type: "user-input"):
|
|
491
|
+
- If the user provides a complete dataset (coordinate lists, lookup tables, category mappings, etc.),
|
|
492
|
+
you MUST capture the ENTIRE dataset in the "staticData" field as a JSON array of {key, value} objects.
|
|
493
|
+
- Do NOT truncate, summarize, or put only one sample row — include EVERY row the user provides.
|
|
494
|
+
- Parse the user's format (TSV, CSV, pasted table, etc.) into clean JSON objects.
|
|
495
|
+
Example: "Item A\\t42.5\\tactive" → { "key": "Item A", "value": { "score": 42.5, "status": "active" } }
|
|
496
|
+
- The staticData will be written directly to memory as initial data when the service is installed.
|
|
497
|
+
- "sampleEntry" still holds ONE example for documentation; "staticData" holds the FULL dataset.
|
|
498
|
+
|
|
499
|
+
c) DATA MODEL — What are the key entities? (1-2 questions)
|
|
500
|
+
- Propose entities based on use cases (just name + one-line description each)
|
|
501
|
+
- Ask: "Does this cover your data, or is anything missing?"
|
|
502
|
+
- Do NOT ask about individual fields, ID formats, or storage details — the generator decides those
|
|
503
|
+
|
|
504
|
+
d) VIEWS & INTERACTIONS — What should it look like? (2-3 questions)
|
|
505
|
+
- Propose views based on use cases (map, list, dashboard, cards, timeline, etc.)
|
|
506
|
+
- Ask which views are essential vs optional
|
|
507
|
+
- Ask about key interactions (filter, search, create, export)
|
|
508
|
+
- Do NOT ask about individual UI controls, column orders, or widget placement
|
|
509
|
+
|
|
510
|
+
e) STYLE & LOOK — How should it feel? (2-3 questions)
|
|
511
|
+
Ask in ONE batch:
|
|
512
|
+
- Mood: clean/minimal, playful, data-dense/professional?
|
|
513
|
+
- Color feel: suggest a palette based on the domain (e.g., "warm earth tones for food", "clean blues for data")
|
|
514
|
+
- Layout preference: tabs, single page, split panels?
|
|
515
|
+
- Any apps or websites whose look they admire?
|
|
516
|
+
|
|
517
|
+
f) SETTINGS & EXTERNAL SERVICES — What configuration does this need? (1-2 questions)
|
|
518
|
+
As you interview the user, identify external services and settings needs:
|
|
519
|
+
|
|
520
|
+
1. When the user describes data sources, recognize external API dependencies. For each:
|
|
521
|
+
- Name the service (e.g., "Finnhub", "OpenWeatherMap")
|
|
522
|
+
- Identify required settings (API key, base URL, refresh interval, etc.)
|
|
523
|
+
- Suggest whether settings should be shared (one key for all users) or per-user
|
|
524
|
+
|
|
525
|
+
2. Ask ONE simple question: "Will you share this service with other users or use it only yourself?"
|
|
526
|
+
This drives the architecture — personal use means simpler settings, shared means admin capabilities may be needed.
|
|
527
|
+
|
|
528
|
+
3. Identify user-configurable preferences (default values, display options, limits).
|
|
529
|
+
|
|
530
|
+
4. If the service is complex with shared sensitive settings, recommend a separate admin app.
|
|
531
|
+
If simple or personal-use, a single app is fine. Do NOT create an admin app unless clearly justified.
|
|
532
|
+
|
|
533
|
+
g) CONSTRAINTS & PREFERENCES (1-2 questions)
|
|
534
|
+
Ask in ONE batch:
|
|
535
|
+
- How often should data refresh?
|
|
536
|
+
- What languages does the UI need?
|
|
537
|
+
- Any domain-specific rules the generator should know?
|
|
538
|
+
|
|
539
|
+
3. STAY IN SCOPE — This is an AIMEAT service:
|
|
540
|
+
- The AIMEAT platform handles: storage, scheduling, auth, login, user management, access control, serving, i18n
|
|
541
|
+
- Do NOT ask about authentication, login systems, user registration, user counts, audience size, or access control — AIMEAT provides all of these automatically
|
|
542
|
+
- Do NOT ask about frameworks, runtimes, databases, Docker, deployment, hosting, CI/CD
|
|
543
|
+
- Do NOT ask about file formats, build tools, API design, error handling, data serialization
|
|
544
|
+
- Do NOT ask about retention periods, scheduler times, geolocation methods, caching
|
|
545
|
+
- Focus ONLY on WHAT the service does — the generator handles architecture and implementation
|
|
546
|
+
|
|
547
|
+
4. SECTION RULES:
|
|
548
|
+
- Each section stays open until the user confirms
|
|
549
|
+
- After each section, give a brief summary (2-3 bullet points) and ask for confirmation
|
|
550
|
+
- Do NOT repeat the full accumulated summary after every section — just the current one
|
|
551
|
+
- If the user brings up something from a previous section, go back to it
|
|
552
|
+
|
|
553
|
+
5. HONESTY RULES:
|
|
554
|
+
- If you don't know something, say so
|
|
555
|
+
- If you can't access a URL, say so explicitly
|
|
556
|
+
- Don't make assumptions about external APIs — ask the user
|
|
557
|
+
- If a use case seems infeasible, explain why and suggest alternatives
|
|
558
|
+
|
|
559
|
+
6. WHEN THE INTERVIEW IS COMPLETE:
|
|
560
|
+
- Give a BRIEF final summary (one paragraph, not a section-by-section repetition)
|
|
561
|
+
- Ask the user to confirm
|
|
562
|
+
- Then output the structured specification in this EXACT JSON format:
|
|
563
|
+
|
|
564
|
+
\\\`\\\`\\\`json
|
|
565
|
+
{
|
|
566
|
+
"version": "1.0",
|
|
567
|
+
"locale": "${locale}",
|
|
568
|
+
"projectName": "Human-readable project name",
|
|
569
|
+
"description": "Enhanced description incorporating all interview findings",
|
|
570
|
+
"technicalLevel": "beginner|intermediate|advanced",
|
|
571
|
+
"useCases": [
|
|
572
|
+
{
|
|
573
|
+
"id": "uc-1",
|
|
574
|
+
"title": "Use case title",
|
|
575
|
+
"description": "What the user does and why",
|
|
576
|
+
"priority": "must-have|nice-to-have"
|
|
577
|
+
}
|
|
578
|
+
],
|
|
579
|
+
"dataSources": [
|
|
580
|
+
{
|
|
581
|
+
"id": "ds-1",
|
|
582
|
+
"name": "Source name",
|
|
583
|
+
"type": "rss|api|websocket|user-input|computed",
|
|
584
|
+
"url": "https://... or null",
|
|
585
|
+
"format": "xml|json|html|csv|unknown",
|
|
586
|
+
"encoding": "utf-8|iso-8859-1|auto",
|
|
587
|
+
"sampleEntry": "One raw entry from the source, copy-pasted exactly as-is",
|
|
588
|
+
"responseEnvelope": "For API/RSS sources: describe the top-level response structure that WRAPS the entries. Example for REST API: { \"totalResults\": \"number\", \"companies\": \"array of company objects\" }. Example for RSS: { \"channel\": { \"item\": \"array of items\" } }. This tells the extension generator which field name to use when accessing the results array (e.g., response.companies, not response.results). CRITICAL for correct parsing.",
|
|
589
|
+
"staticData": "For type 'user-input' ONLY: the COMPLETE dataset as an array of {key, value} objects. Include EVERY row the user provided, parsed into clean JSON. Example: [{ \"key\": \"Item A\", \"value\": { \"score\": 42.5, \"status\": \"active\" } }]. Omit this field for non-user-input sources.",
|
|
590
|
+
"updateFrequency": "realtime|minutes|hourly|daily|on-demand",
|
|
591
|
+
"sampleFields": ["field1", "field2"],
|
|
592
|
+
"notes": "Any observations from fetching/analyzing the source",
|
|
593
|
+
"verified": true,
|
|
594
|
+
"verifiedBy": "ai|user",
|
|
595
|
+
"fallback": "Only if verified=false: 'demo' (use generated mock data), 'defer' (try at runtime, handle failure), or 'skip' (remove this source). Omit if verified=true.",
|
|
596
|
+
"demoData": "Only if fallback='demo': array of 5-10 realistic sample entries that will be loaded as static data on install. Omit otherwise."
|
|
597
|
+
}
|
|
598
|
+
],
|
|
599
|
+
"dataModel": {
|
|
600
|
+
"entities": [
|
|
601
|
+
{
|
|
602
|
+
"name": "entity-name",
|
|
603
|
+
"description": "What this entity represents",
|
|
604
|
+
"fields": [
|
|
605
|
+
{ "name": "fieldName", "type": "string|number|boolean|date|coordinates|array|object", "required": true, "description": "What this field holds" }
|
|
606
|
+
],
|
|
607
|
+
"relationships": ["related-to entity-name-2 via fieldName"]
|
|
608
|
+
}
|
|
609
|
+
]
|
|
610
|
+
},
|
|
611
|
+
"views": [
|
|
612
|
+
{
|
|
613
|
+
"id": "view-1",
|
|
614
|
+
"type": "map|list|dashboard|cards|timeline|form|detail|settings",
|
|
615
|
+
"title": "View title",
|
|
616
|
+
"description": "What this view shows",
|
|
617
|
+
"dataEntities": ["entity-name"],
|
|
618
|
+
"interactions": ["filter", "search", "create", "export"],
|
|
619
|
+
"visualizations": ["bar-chart", "pie-chart", "heatmap"]
|
|
620
|
+
}
|
|
621
|
+
],
|
|
622
|
+
"style": {
|
|
623
|
+
"mood": "minimal|playful|professional|data-dense",
|
|
624
|
+
"colorPalette": "Description or hex values",
|
|
625
|
+
"typography": "standard|compact|large-display",
|
|
626
|
+
"layout": "single-page|tabbed|split-panel|fullscreen",
|
|
627
|
+
"animations": "none|subtle|rich",
|
|
628
|
+
"displayContext": "desktop|mobile|kiosk|embedded",
|
|
629
|
+
"references": "Any reference apps or styles the user mentioned"
|
|
630
|
+
},
|
|
631
|
+
"externalServices": [
|
|
632
|
+
{
|
|
633
|
+
"name": "ServiceName",
|
|
634
|
+
"purpose": "what it provides",
|
|
635
|
+
"requiredSettings": [{ "key": "api_key_name", "type": "secret|string|url|number", "label": "Human-readable Label" }],
|
|
636
|
+
"sharingModel": "shared|per-user",
|
|
637
|
+
"suggestedBy": "ai"
|
|
638
|
+
}
|
|
639
|
+
],
|
|
640
|
+
"sharedService": true,
|
|
641
|
+
"adminAppRecommended": false,
|
|
642
|
+
"adminAppReason": "reason string or null — only set if adminAppRecommended is true",
|
|
643
|
+
"userSettings": [
|
|
644
|
+
{ "key": "setting_name", "type": "string|number|boolean|select", "label": "Human-readable Label", "default": "default value" }
|
|
645
|
+
],
|
|
646
|
+
"constraints": {
|
|
647
|
+
"updateMode": "realtime|scheduled|on-demand",
|
|
648
|
+
"scheduleInterval": "15m|1h|daily|null",
|
|
649
|
+
"locales": ["fi", "en"],
|
|
650
|
+
"domainRules": "Any domain-specific rules or edge cases",
|
|
651
|
+
"notes": "Any additional context that doesn't fit above"
|
|
652
|
+
},
|
|
653
|
+
"interviewNotes": "Any important context from the conversation that doesn't fit above"
|
|
654
|
+
}
|
|
655
|
+
\\\`\\\`\\\`
|
|
656
|
+
|
|
657
|
+
IMPORTANT: The JSON must be inside a \\\`\\\`\\\`json code fence so the user can easily copy it.
|
|
658
|
+
|
|
659
|
+
Begin the interview now. Start by greeting the user and asking about their technical level.`;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
export async function buildComponentPrompt(type, label, projectDescription, blueprint, completedComponents, interviewSpec) {
|
|
663
|
+
const template = COMPONENT_TEMPLATES[type];
|
|
664
|
+
if (!template) throw new Error(`No template for type: ${type}`);
|
|
665
|
+
|
|
666
|
+
// Extensions are PROJECT-AGNOSTIC when they have a spec — they describe a platform capability,
|
|
667
|
+
// not a component of a specific project. Other component types still get the project context.
|
|
668
|
+
let context = '';
|
|
669
|
+
if (type === 'extension') {
|
|
670
|
+
// Extension context is minimal — spec provides the contract, data sources provide the details
|
|
671
|
+
context += `Generate an AIMEAT platform extension.\n`;
|
|
672
|
+
} else {
|
|
673
|
+
context += `Project: ${projectDescription}\n`;
|
|
674
|
+
}
|
|
675
|
+
if (blueprint && type !== 'extension') {
|
|
676
|
+
context += `\nBlueprint components: ${blueprint.components.map(c => `${c.id} (${c.type}: ${c.label})`).join(', ')}\n`;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
// Inject interview spec context for app and cortex — use cases, views, style
|
|
680
|
+
if (interviewSpec && (type === 'app' || type === 'cortex')) {
|
|
681
|
+
if (interviewSpec.useCases && interviewSpec.useCases.length > 0) {
|
|
682
|
+
context += '\n## USE CASES (from user interview — the app MUST support ALL of these)\n';
|
|
683
|
+
for (const uc of interviewSpec.useCases) {
|
|
684
|
+
context += `- **${uc.title || uc.id}** [${uc.priority || 'must-have'}]: ${uc.description}\n`;
|
|
685
|
+
}
|
|
686
|
+
context += '\n';
|
|
687
|
+
}
|
|
688
|
+
if (interviewSpec.views && interviewSpec.views.length > 0) {
|
|
689
|
+
context += '## VIEWS (from user interview — implement these as tabs/pages)\n';
|
|
690
|
+
for (const v of interviewSpec.views) {
|
|
691
|
+
context += `- **${v.title}** (${v.type}): ${v.description}`;
|
|
692
|
+
if (v.interactions?.length) context += ` — interactions: ${v.interactions.join(', ')}`;
|
|
693
|
+
context += '\n';
|
|
694
|
+
}
|
|
695
|
+
context += '\n';
|
|
696
|
+
}
|
|
697
|
+
if (interviewSpec.style) {
|
|
698
|
+
const s = interviewSpec.style;
|
|
699
|
+
context += `## STYLE: mood=${s.mood || 'professional'}, layout=${s.layout || 'tabbed'}, typography=${s.typography || 'standard'}\n\n`;
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
// Inject relevant dataModel entries — the centralized data contract
|
|
704
|
+
if (blueprint?.dataModel) {
|
|
705
|
+
const componentId = blueprint.components?.find(c => c.label === label)?.id;
|
|
706
|
+
const relevant = {};
|
|
707
|
+
for (const [key, schema] of Object.entries(blueprint.dataModel)) {
|
|
708
|
+
// CSM: show all data model keys (CSM defines the service schema)
|
|
709
|
+
if (type === 'csm') {
|
|
710
|
+
relevant[key] = schema;
|
|
711
|
+
}
|
|
712
|
+
// Memory component: show keys it produces
|
|
713
|
+
if (type === 'memory' && schema.producedBy === componentId) {
|
|
714
|
+
relevant[key] = schema;
|
|
715
|
+
}
|
|
716
|
+
// Extension: show keys it produces AND consumes
|
|
717
|
+
if (type === 'extension' && (schema.producedBy === componentId || schema.consumedBy?.includes(componentId))) {
|
|
718
|
+
relevant[key] = schema;
|
|
719
|
+
}
|
|
720
|
+
// Cortex: show all keys it consumes
|
|
721
|
+
if (type === 'cortex' && schema.consumedBy?.includes(componentId)) {
|
|
722
|
+
relevant[key] = schema;
|
|
723
|
+
}
|
|
724
|
+
// App: show all keys it consumes (via cortex)
|
|
725
|
+
if (type === 'app' && schema.consumedBy?.includes(componentId)) {
|
|
726
|
+
relevant[key] = schema;
|
|
727
|
+
}
|
|
728
|
+
// Translation: show i18n keys it produces
|
|
729
|
+
if (type === 'translation' && schema.producedBy === componentId) {
|
|
730
|
+
relevant[key] = schema;
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
if (Object.keys(relevant).length > 0) {
|
|
734
|
+
// Strip pipeline metadata (source, producedBy, consumedBy) — these are NOT part of the data shape
|
|
735
|
+
// and AI copies them into the actual values if they're present
|
|
736
|
+
const cleaned = {};
|
|
737
|
+
for (const [key, schema] of Object.entries(relevant)) {
|
|
738
|
+
const { source, producedBy, consumedBy, ...dataSchema } = schema;
|
|
739
|
+
cleaned[key] = dataSchema;
|
|
740
|
+
}
|
|
741
|
+
context += '\n## Domain Data Model (EXACT schemas — follow these precisely)\n';
|
|
742
|
+
context += 'These are the memory key schemas for this component. Use these exact key names and data shapes.\n\n';
|
|
743
|
+
context += '```json\n' + JSON.stringify(cleaned, null, 2) + '\n```\n\n';
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
if (completedComponents && completedComponents.length > 0) {
|
|
748
|
+
// ── SPEC-DRIVEN: prefer specs over regex-extracted summaries ──
|
|
749
|
+
// Specs are formal JSON contracts with exact types and examples.
|
|
750
|
+
// They replace summarizeExtensionApi() / summarizeCortexApi() which use lossy regex extraction.
|
|
751
|
+
const withSpecs = completedComponents.filter(c => c.spec);
|
|
752
|
+
const withoutSpecs = completedComponents.filter(c => !c.spec);
|
|
753
|
+
|
|
754
|
+
// Inject specs from upstream completed components
|
|
755
|
+
for (const c of withSpecs) {
|
|
756
|
+
if (c.type === 'extension') {
|
|
757
|
+
context += formatSpecForPrompt(c.spec, `Extension Spec: ${c.spec.name}`);
|
|
758
|
+
} else if (c.type === 'cortex' && (c.subtype === 'data' || c.spec?.wrapsExtension)) {
|
|
759
|
+
context += formatSpecForPrompt(c.spec, `Data API Spec: ${c.spec.name}`);
|
|
760
|
+
} else if (c.type === 'cortex' && (c.subtype === 'component' || c.spec?.render)) {
|
|
761
|
+
context += formatSpecForPrompt(c.spec, `Component Spec: ${c.spec.name}`);
|
|
762
|
+
} else if (c.type === 'cortex' && (c.subtype === 'app-domain' || c.spec?.viewComposition)) {
|
|
763
|
+
context += formatSpecForPrompt(c.spec, `App-Domain Spec: ${c.spec.name}`);
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
// Fallback: for components without specs, use existing bundle/summary approach
|
|
768
|
+
// This covers CSM, memory, translation, and any legacy components
|
|
769
|
+
if (withoutSpecs.length > 0) {
|
|
770
|
+
const bundled = withoutSpecs.filter(c => c.contextBundle);
|
|
771
|
+
const unbundled = withoutSpecs.filter(c => !c.contextBundle);
|
|
772
|
+
|
|
773
|
+
if (bundled.length > 0) {
|
|
774
|
+
const { formatBundlesForPrompt } = _cortexModules || {};
|
|
775
|
+
if (formatBundlesForPrompt) {
|
|
776
|
+
context += formatBundlesForPrompt(bundled.map(c => c.contextBundle));
|
|
777
|
+
} else {
|
|
778
|
+
context += '\nAlready completed:\n';
|
|
779
|
+
for (const c of bundled) {
|
|
780
|
+
const b = c.contextBundle;
|
|
781
|
+
context += `- ${c.id} (${c.type}: ${c.label}): registered as "${b.registeredAs}"`;
|
|
782
|
+
if (b.actions) context += ` — actions: ${b.actions.join(', ')}`;
|
|
783
|
+
if (b.exports) context += ` — exports: ${b.exports.join(', ')}`;
|
|
784
|
+
context += '\n';
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
if (unbundled.length > 0) {
|
|
790
|
+
context += '\nAlready completed:\n';
|
|
791
|
+
for (const c of unbundled) {
|
|
792
|
+
context += `- ${c.id} (${c.type}: ${c.label}): registered as "${c.registeredAs}"\n`;
|
|
793
|
+
// Fallback to regex summaries for components without specs (legacy path)
|
|
794
|
+
if (c.result && c.type === 'extension') {
|
|
795
|
+
context += ` API summary:\n${summarizeExtensionApi(c.result)}\n`;
|
|
796
|
+
if (c.probeResults && Array.isArray(c.probeResults) && c.probeResults.length > 0 && (type === 'cortex' || type === 'app' || type === 'extension')) {
|
|
797
|
+
context += `\n ## ACTUAL API RESPONSES (captured from live execution of ${c.registeredAs})\n`;
|
|
798
|
+
context += ` Study these carefully — your code MUST handle these exact data shapes.\n\n`;
|
|
799
|
+
for (const probe of c.probeResults) {
|
|
800
|
+
if (probe.status === 200 && probe.response) {
|
|
801
|
+
context += ` POST /v1/ext/${c.registeredAs}/${probe.action} ${JSON.stringify(probe.input)}\n`;
|
|
802
|
+
context += ` → ${JSON.stringify(probe.response)}\n\n`;
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
} else if (c.result && c.type === 'cortex') {
|
|
807
|
+
context += ` API summary:\n${summarizeCortexApi(c.result)}\n`;
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
// For memory components with static data: only include if this component's dataModel has source:"static"
|
|
815
|
+
if (type === 'memory' && interviewSpec?.dataSources && blueprint?.dataModel) {
|
|
816
|
+
const componentId = blueprint.components?.find(c => c.label === label)?.id;
|
|
817
|
+
const hasStaticKey = componentId && Object.values(blueprint.dataModel).some(
|
|
818
|
+
schema => schema.source === 'static' && schema.producedBy === componentId
|
|
819
|
+
);
|
|
820
|
+
if (hasStaticKey) {
|
|
821
|
+
const staticSources = interviewSpec.dataSources.filter(ds => ds.staticData && Array.isArray(ds.staticData));
|
|
822
|
+
if (staticSources.length > 0) {
|
|
823
|
+
context += '\n## Static Data from Interview\n';
|
|
824
|
+
context += 'The user provided complete datasets. Store each as a SINGLE memory key (one array value, not one key per entry).\n';
|
|
825
|
+
context += 'The dataModel above shows the exact schema. Include ALL entries in the value.\n\n';
|
|
826
|
+
for (const ds of staticSources) {
|
|
827
|
+
context += `### ${ds.name} (${ds.staticData.length} entries)\n`;
|
|
828
|
+
context += '```json\n' + JSON.stringify(ds.staticData, null, 2) + '\n```\n\n';
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
// Inject scheduled jobs from blueprint to extension prompts
|
|
835
|
+
if (type === 'extension' && blueprint?.components) {
|
|
836
|
+
const componentId = blueprint.components.find(c => c.label === label)?.id;
|
|
837
|
+
const comp = componentId && blueprint.components.find(c => c.id === componentId);
|
|
838
|
+
if (comp?.schedules && comp.schedules.length > 0) {
|
|
839
|
+
context += '\n## Scheduled Jobs (from blueprint — MUST include in manifest)\n';
|
|
840
|
+
context += 'This extension has recurring background jobs. Add a `schedules` section to the YAML manifest:\n\n';
|
|
841
|
+
context += '```yaml\nschedules:\n';
|
|
842
|
+
for (const s of comp.schedules) {
|
|
843
|
+
context += ` - id: ${s.action}-scheduled\n action: ${s.action}\n cron: "${s.cron}"\n description: "Scheduled: ${s.action}"\n instance_scope: false\n input: {}\n`;
|
|
844
|
+
}
|
|
845
|
+
context += '```\n\n';
|
|
846
|
+
context += 'The scheduler runs these automatically in the background — no browser needed.\n';
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
// Inject blueprint settings as extension config keys
|
|
851
|
+
// The user enters settings values BEFORE generation. These values are injected into ctx.config
|
|
852
|
+
// at runtime. The extension MUST use these EXACT key names in ctx.config.
|
|
853
|
+
if (type === 'extension' && blueprint?.settings) {
|
|
854
|
+
const allSettings = [...(blueprint.settings.service || []), ...(blueprint.settings.user || [])];
|
|
855
|
+
if (allSettings.length > 0) {
|
|
856
|
+
context += '\n## Extension Config Keys (from blueprint settings — use EXACTLY these)\n';
|
|
857
|
+
context += 'These settings are injected into `ctx.config` at runtime. Use these EXACT key names:\n\n';
|
|
858
|
+
context += '```yaml\nconfig:\n';
|
|
859
|
+
for (const s of allSettings) {
|
|
860
|
+
const yamlType = s.type === 'secret' ? 'string' : s.type === 'boolean' ? 'boolean' : s.type === 'number' ? 'number' : 'string';
|
|
861
|
+
context += ` ${s.key}:\n type: ${yamlType}\n description: "${s.label}"\n`;
|
|
862
|
+
if (s.required) context += ` required: true\n`;
|
|
863
|
+
}
|
|
864
|
+
context += '```\n\n';
|
|
865
|
+
context += 'In your action code, read these as: `ctx.config?.${allSettings[0].key}`\n';
|
|
866
|
+
context += 'Do NOT rename these keys. Do NOT use different key names like "apiKey" when the blueprint says "' + allSettings[0].key + '".\n\n';
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
// Inject required action/method names from blueprint testScenarios
|
|
871
|
+
// These are the EXACT names the component MUST implement — tests will call them by name
|
|
872
|
+
if ((type === 'extension' || type === 'cortex' || type === 'app') && blueprint?.testScenarios) {
|
|
873
|
+
const componentId = blueprint.components?.find(c => c.label === label)?.id;
|
|
874
|
+
const scenarios = (blueprint.testScenarios || [])
|
|
875
|
+
.filter(ts => ts.component === componentId)
|
|
876
|
+
.flatMap(ts => ts.scenarios || []);
|
|
877
|
+
if (scenarios.length > 0) {
|
|
878
|
+
const names = [...new Set(scenarios.map(s => s.action))];
|
|
879
|
+
if (type === 'extension') {
|
|
880
|
+
context += '\n## Required Action IDs (from blueprint — use EXACTLY these names)\n';
|
|
881
|
+
context += 'The blueprint specifies these EXACT action IDs. Your extension MUST use these names:\n\n';
|
|
882
|
+
for (const s of scenarios) {
|
|
883
|
+
context += `- **${s.action}** — ${s.expect.split('.')[0]}.\n`;
|
|
884
|
+
if (Object.keys(s.input).length > 0) context += ` Input: ${JSON.stringify(s.input)}\n`;
|
|
885
|
+
}
|
|
886
|
+
context += `\nDo NOT rename these actions. Use "${names.join('", "')}" as the action id values in your YAML manifest.\n`;
|
|
887
|
+
context += 'If you use different names (e.g., "getCandles" instead of "fetchCandles"), validation WILL fail.\n\n';
|
|
888
|
+
} else if (type === 'cortex') {
|
|
889
|
+
context += '\n## Required Method Names (from blueprint — use EXACTLY these)\n';
|
|
890
|
+
context += 'Tests will call these methods by name. Your cortex MUST export them:\n\n';
|
|
891
|
+
for (const s of scenarios) {
|
|
892
|
+
context += `- **${s.action}()** — ${s.expect.split('.')[0]}.\n`;
|
|
893
|
+
if (Object.keys(s.input).length > 0) context += ` Args: ${JSON.stringify(s.input)}\n`;
|
|
894
|
+
}
|
|
895
|
+
context += '\nDo NOT rename these methods. Validation WILL fail if names don\'t match.\n\n';
|
|
896
|
+
} else if (type === 'app') {
|
|
897
|
+
context += '\n## Required User Flows (from blueprint — the app MUST support these)\n';
|
|
898
|
+
context += 'Tests will verify these workflows exist and function in the UI:\n\n';
|
|
899
|
+
for (const s of scenarios) {
|
|
900
|
+
context += `- **${s.action}** — ${s.expect}\n`;
|
|
901
|
+
}
|
|
902
|
+
context += '\n';
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
// Cortex: inject EXTENSION_CONSUMPTION_RULES so cortex knows ALL actions are POST
|
|
908
|
+
if (type === 'cortex') {
|
|
909
|
+
context += '\n' + EXTENSION_CONSUMPTION_RULES + '\n';
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
// Cortex: if blueprint produces api:t, cortex MUST include translation helper methods
|
|
913
|
+
if (type === 'cortex' && blueprint?.components) {
|
|
914
|
+
const componentId = blueprint.components.find(c => c.label === label)?.id;
|
|
915
|
+
const comp = componentId && blueprint.components.find(c => c.id === componentId);
|
|
916
|
+
if (comp?.produces && comp.produces.some(p => p === 'api:t')) {
|
|
917
|
+
context += `\n## REQUIRED: Translation Helper Methods
|
|
918
|
+
|
|
919
|
+
Your cortex MUST include these translation methods (blueprint produces "api:t"):
|
|
920
|
+
|
|
921
|
+
\`\`\`javascript
|
|
922
|
+
// Translation helper — MUST be included
|
|
923
|
+
async function getTranslations(locale) {
|
|
924
|
+
const strings = await readExtMemory(EXT.name, 'i18n.' + (locale || 'fi'));
|
|
925
|
+
return strings || {};
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
function t(key, translations) {
|
|
929
|
+
if (!translations) return key;
|
|
930
|
+
const parts = key.split('.');
|
|
931
|
+
let val = translations;
|
|
932
|
+
for (const p of parts) {
|
|
933
|
+
val = val?.[p];
|
|
934
|
+
if (val === undefined) return key;
|
|
935
|
+
}
|
|
936
|
+
return val;
|
|
937
|
+
}
|
|
938
|
+
\`\`\`
|
|
939
|
+
|
|
940
|
+
Export both as public methods: getTranslations(locale) and t(key, translations).
|
|
941
|
+
The app calls getTranslations() during startup and t() for every UI string.
|
|
942
|
+
If these are missing, the app WILL crash with "getTranslations is not a function".\n`;
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
// Thread interview data source details to extension prompts
|
|
947
|
+
if (type === 'extension' && interviewSpec?.dataSources) {
|
|
948
|
+
context += '\n## Data Source Details (from interview — use these to write correct parsers)\n';
|
|
949
|
+
for (const ds of interviewSpec.dataSources) {
|
|
950
|
+
context += `- **${ds.name}** (${ds.type}): ${ds.url || 'user-input'}\n`;
|
|
951
|
+
if (ds.url) {
|
|
952
|
+
context += ` ⚠️ Use this EXACT URL as the base. Do NOT guess or modify the URL structure — read the notes below for how to construct requests.\n`;
|
|
953
|
+
}
|
|
954
|
+
if (ds.encoding) context += ` Encoding: ${ds.encoding}\n`;
|
|
955
|
+
if (ds.notes) context += ` Notes: ${ds.notes}\n`;
|
|
956
|
+
if (ds.responseEnvelope) {
|
|
957
|
+
context += ` Response envelope (top-level JSON structure): \`${typeof ds.responseEnvelope === 'string' ? ds.responseEnvelope : JSON.stringify(ds.responseEnvelope)}\`\n`;
|
|
958
|
+
context += ` ⚠️ Use the EXACT field names from this envelope to access the results array. Do NOT guess field names like "results" or "data" — use what the API actually returns.\n`;
|
|
959
|
+
}
|
|
960
|
+
if (ds.sampleEntry) context += ` Sample entry (ONE item from the results array — write your parser against this):\n \`\`\`\n ${typeof ds.sampleEntry === 'string' ? ds.sampleEntry : JSON.stringify(ds.sampleEntry, null, 2)}\n \`\`\`\n`;
|
|
961
|
+
if (ds.staticData && Array.isArray(ds.staticData)) {
|
|
962
|
+
context += ` **STATIC DATA (${ds.staticData.length} entries) — pre-loaded in OWNER memory. Read with ctx.memory.getPublic(ctx.caller.owner, key), do NOT re-create it.**\n`;
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
// Inject use cases from interview spec to app prompts — drives UI design
|
|
968
|
+
if (type === 'app' && interviewSpec?.useCases) {
|
|
969
|
+
const cases = interviewSpec.useCases.map(uc => {
|
|
970
|
+
if (typeof uc === 'string') return uc;
|
|
971
|
+
if (uc?.description) return uc.description;
|
|
972
|
+
if (uc?.title) return uc.title;
|
|
973
|
+
return JSON.stringify(uc);
|
|
974
|
+
}).filter(Boolean);
|
|
975
|
+
if (cases.length > 0) {
|
|
976
|
+
context += '\n## Use Cases (from interview — the app MUST support ALL of these)\n';
|
|
977
|
+
cases.forEach((c, i) => { context += `${i + 1}. ${c}\n`; });
|
|
978
|
+
context += '\nDesign the UI around these workflows. Every use case must be reachable.\n\n';
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
// Thread language preference from interview spec to all component prompts
|
|
983
|
+
const specLocale = interviewSpec?.locale;
|
|
984
|
+
if (specLocale && specLocale !== 'en') {
|
|
985
|
+
context += `\n## LANGUAGE\n\nThe user works in "${specLocale}". Write all human-readable text (labels, descriptions, comments, UI strings, variable names for display) in that language.\nCode identifiers, JSON keys, YAML keys, and API names stay in English.\n`;
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
// For translation components: if another locale is already done, inject its keys
|
|
989
|
+
// so AI generates matching keys for this locale
|
|
990
|
+
if (type === 'translation' && completedComponents?.length > 0) {
|
|
991
|
+
const otherTranslations = completedComponents.filter(c => c.type === 'translation' && c.result);
|
|
992
|
+
for (const t of otherTranslations) {
|
|
993
|
+
try {
|
|
994
|
+
const parsed = JSON.parse(typeof t.result === 'string' ? t.result : JSON.stringify(t.result));
|
|
995
|
+
const locale = Object.keys(parsed).find(k => typeof parsed[k] === 'object');
|
|
996
|
+
if (locale && parsed[locale]) {
|
|
997
|
+
const keys = Object.keys(parsed[locale]);
|
|
998
|
+
context += `\n## REQUIRED: Match these EXACT keys from the "${locale}" translation\n`;
|
|
999
|
+
context += `The other locale has these ${keys.length} keys. You MUST use the SAME keys:\n`;
|
|
1000
|
+
context += `\`\`\`\n${keys.join('\n')}\n\`\`\`\n`;
|
|
1001
|
+
context += `Do NOT add extra keys and do NOT omit any keys — the sets must be identical.\n`;
|
|
1002
|
+
}
|
|
1003
|
+
} catch { /* ignore parse errors */ }
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
// Inject MANDATORY API methods from blueprint produces list into cortex prompt
|
|
1008
|
+
// This is THE critical contract: cortex MUST implement exactly these methods
|
|
1009
|
+
if (type === 'cortex' && blueprint?.components) {
|
|
1010
|
+
const componentId = blueprint.components.find(c => c.label === label)?.id;
|
|
1011
|
+
const comp = componentId && blueprint.components.find(c => c.id === componentId);
|
|
1012
|
+
if (comp?.produces && comp.produces.length > 0) {
|
|
1013
|
+
const apiMethods = comp.produces
|
|
1014
|
+
.filter(p => p.startsWith('api:'))
|
|
1015
|
+
.map(p => p.replace('api:', ''));
|
|
1016
|
+
if (apiMethods.length > 0) {
|
|
1017
|
+
context += '\n## MANDATORY API METHODS (from blueprint — you MUST implement ALL of these)\n\n';
|
|
1018
|
+
context += '╔══════════════════════════════════════════════════════════════════════════╗\n';
|
|
1019
|
+
context += '║ Your cortex MUST export EXACTLY these methods. Do NOT rename them. ║\n';
|
|
1020
|
+
context += '║ Do NOT add extra public methods. Do NOT omit any method. ║\n';
|
|
1021
|
+
context += '║ The app component depends on these EXACT names. ║\n';
|
|
1022
|
+
context += '╚══════════════════════════════════════════════════════════════════════════╝\n\n';
|
|
1023
|
+
context += 'Required exports:\n';
|
|
1024
|
+
for (const m of apiMethods) {
|
|
1025
|
+
context += `- \`${m}()\` — MUST be in the exports object\n`;
|
|
1026
|
+
}
|
|
1027
|
+
context += '\nThe `exports` object at the bottom of your IIFE must include ALL of these:\n';
|
|
1028
|
+
context += '```javascript\nconst exports = { ' + apiMethods.join(', ') + ' };\n```\n\n';
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
// Also inject consumes so cortex knows which memory keys to read
|
|
1033
|
+
if (comp?.consumes && comp.consumes.length > 0) {
|
|
1034
|
+
const memoryKeys = comp.consumes
|
|
1035
|
+
.filter(c => c.startsWith('memory:'))
|
|
1036
|
+
.map(c => c.replace('memory:', ''));
|
|
1037
|
+
if (memoryKeys.length > 0) {
|
|
1038
|
+
context += '\n## CONSUMED DATA (memory keys this cortex reads)\n';
|
|
1039
|
+
for (const k of memoryKeys) {
|
|
1040
|
+
context += `- \`${k}\`\n`;
|
|
1041
|
+
}
|
|
1042
|
+
context += '\n';
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
// Inject "uses" cortex dependencies from blueprint
|
|
1048
|
+
if (type === 'cortex' && blueprint?.components) {
|
|
1049
|
+
const componentId = blueprint.components.find(c => c.label === label)?.id;
|
|
1050
|
+
const comp = componentId && blueprint.components.find(c => c.id === componentId);
|
|
1051
|
+
if (comp?.uses && comp.uses.length > 0) {
|
|
1052
|
+
context += '\n## Reusable Cortex Libraries (from blueprint — load and use these)\n';
|
|
1053
|
+
context += 'This cortex component should use the following existing cortex libraries.\n';
|
|
1054
|
+
context += 'Load them via `<script>` tags in the prompt component and call their API.\n';
|
|
1055
|
+
context += 'Do NOT reimplement their functionality.\n\n';
|
|
1056
|
+
// Platform cortex library API reference
|
|
1057
|
+
const platformApis = {
|
|
1058
|
+
'aimeat-ui-nav': 'Tabs(container, tabs, onSelect), Breadcrumbs(container, items), Sidebar(container, items, onSelect), BottomNav(container, items, onSelect), BurgerMenu(container, items, onSelect)',
|
|
1059
|
+
'aimeat-ui-layout': 'MainDetail(container, {main, detail}), DashboardGrid(container, cards), Split(container, {left, right}), Stacked(container, sections), Header(container, {title, actions}), Footer(container, content)',
|
|
1060
|
+
'aimeat-ui-viewers': 'DataTable(container, {columns, rows, onRowClick}), Timeline(container, events), Grid(container, items, renderItem), List(container, items, renderItem), Gallery(container, images), Carousel(container, slides)',
|
|
1061
|
+
'aimeat-ui-forms': 'Input(container, {label, value, onChange}), Select(container, {label, options, value, onChange}), Toggle(container, {label, checked, onChange}), Checkbox(container, {label, checked, onChange}), FormGroup(container, fields)',
|
|
1062
|
+
'aimeat-ui-dialogs': 'toast(message, type), Modal(container, {title, content, onClose}), Confirm({title, message, onConfirm}), Alert({title, message}), ContextMenu(container, items), Dropdown(container, items)',
|
|
1063
|
+
'aimeat-charts': 'ChartPanel(container, {type, data, options}), ChartBuilder(container, config), TYPES (bar, line, pie, doughnut, radar, scatter, bubble)',
|
|
1064
|
+
'aimeat-canvas': 'DrawingCanvas(container, {width, height, tools, onSave})',
|
|
1065
|
+
};
|
|
1066
|
+
for (const libName of comp.uses) {
|
|
1067
|
+
const camelName = libName.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
|
|
1068
|
+
context += `- **${libName}**: Load via \`<script src="/v1/cortex/${libName}/libs/${libName}.js"></script>\`\n`;
|
|
1069
|
+
context += ` Access via \`AIMEAT['${libName}'].*\`\n`;
|
|
1070
|
+
if (platformApis[libName]) {
|
|
1071
|
+
context += ` API: ${platformApis[libName]}\n`;
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
context += '\n';
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
// Cortex subtype dispatch — use specialized templates for new multi-cortex architecture
|
|
1079
|
+
if (type === 'cortex' && blueprint) {
|
|
1080
|
+
const componentId = blueprint.components?.find(c => c.label === label)?.id;
|
|
1081
|
+
const comp = componentId && blueprint.components.find(c => c.id === componentId);
|
|
1082
|
+
const subtype = comp?.subtype;
|
|
1083
|
+
|
|
1084
|
+
// Ensure cortex modules are loaded before dispatching
|
|
1085
|
+
if (subtype && !_cortexModules && _cortexModulesPromise) {
|
|
1086
|
+
await _cortexModulesPromise;
|
|
1087
|
+
}
|
|
1088
|
+
if (subtype && _cortexModules) {
|
|
1089
|
+
const { buildDataCortexPrompt, buildFeatureCortexPrompt, buildAppDomainCortexPrompt, createBundle } = _cortexModules;
|
|
1090
|
+
const bundles = (completedComponents || []).map(c => createBundle(c, c.probeResults));
|
|
1091
|
+
|
|
1092
|
+
if (subtype === 'data') {
|
|
1093
|
+
return buildDataCortexPrompt(label, projectDescription, blueprint, bundles);
|
|
1094
|
+
}
|
|
1095
|
+
if (subtype === 'feature' || subtype === 'component') {
|
|
1096
|
+
const useCase = interviewSpec?.useCases?.find(uc =>
|
|
1097
|
+
label.toLowerCase().includes(uc.title?.toLowerCase().split(' ')[0] || '___')
|
|
1098
|
+
) || interviewSpec?.useCases?.[0];
|
|
1099
|
+
const view = interviewSpec?.views?.find(v =>
|
|
1100
|
+
label.toLowerCase().includes(v.title?.toLowerCase().split(' ')[0] || '___')
|
|
1101
|
+
) || interviewSpec?.views?.[0];
|
|
1102
|
+
const dataCortexBundle = bundles.find(b => b.subtype === 'data');
|
|
1103
|
+
const structures = blueprint?.dataModel?.structures || {};
|
|
1104
|
+
const translationBundle = bundles.find(b => b.type === 'translation');
|
|
1105
|
+
const translationKeys = translationBundle?.keys || [];
|
|
1106
|
+
const usesLibs = comp?.uses || [];
|
|
1107
|
+
return buildFeatureCortexPrompt(label, useCase, view, dataCortexBundle, structures, translationKeys, usesLibs);
|
|
1108
|
+
}
|
|
1109
|
+
if (subtype === 'app-domain') {
|
|
1110
|
+
const featureBundles = bundles.filter(b => b.subtype === 'feature' || b.subtype === 'component');
|
|
1111
|
+
const dataCortexBundle = bundles.find(b => b.subtype === 'data');
|
|
1112
|
+
const translationBundle = bundles.find(b => b.type === 'translation');
|
|
1113
|
+
return buildAppDomainCortexPrompt(label, projectDescription, featureBundles, dataCortexBundle, translationBundle);
|
|
1114
|
+
}
|
|
1115
|
+
// Fallback for unknown subtype — use generic cortex template
|
|
1116
|
+
return INSTRUCTION_DISCLAIMER + template(label, context, completedComponents);
|
|
1117
|
+
} // end if (subtype && _cortexModules)
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
// App and cortex templates receive completedComponents for cross-referencing
|
|
1121
|
+
if (type === 'app' || type === 'cortex') {
|
|
1122
|
+
return INSTRUCTION_DISCLAIMER + template(label, context, completedComponents);
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
return INSTRUCTION_DISCLAIMER + template(label, context);
|
|
1126
|
+
}
|