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,1489 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interactive `aimeat init` wizard using @clack/prompts.
|
|
3
|
+
* Guides users through node configuration with use-case-based defaults.
|
|
4
|
+
* Reads existing .env / config values so users see their current settings.
|
|
5
|
+
*/
|
|
6
|
+
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
7
|
+
import { dirname, join } from 'node:path';
|
|
8
|
+
import { fileURLToPath } from 'node:url';
|
|
9
|
+
import * as p from '@clack/prompts';
|
|
10
|
+
import ini from 'ini';
|
|
11
|
+
import { createT } from '../i18n.js';
|
|
12
|
+
import { ENV_TO_DOT_PATH } from '../services/config-schema.js';
|
|
13
|
+
// Package root: from dist/src/cli/init-wizard.js -> go up 3 levels to aimeat/
|
|
14
|
+
const __pkgRoot = join(dirname(fileURLToPath(import.meta.url)), '..', '..', '..');
|
|
15
|
+
function buildPresets(cfg) {
|
|
16
|
+
return {
|
|
17
|
+
public: {
|
|
18
|
+
nodeId: cfg.nodeId !== 'aimeat-local-001-dev' ? cfg.nodeId : 'my-node-001',
|
|
19
|
+
port: cfg.port,
|
|
20
|
+
baseUrl: cfg.baseUrl.startsWith('http://localhost') ? '' : cfg.baseUrl,
|
|
21
|
+
dbUrl: cfg.dbUrl ?? '',
|
|
22
|
+
adminPassword: '',
|
|
23
|
+
anonymousMode: cfg.anonymousMode,
|
|
24
|
+
devMode: false,
|
|
25
|
+
extendedFeatures: cfg.extendedFeaturesEnabled,
|
|
26
|
+
},
|
|
27
|
+
personal: {
|
|
28
|
+
nodeId: cfg.nodeId !== 'aimeat-local-001-dev' ? cfg.nodeId : 'personal-home',
|
|
29
|
+
port: cfg.port,
|
|
30
|
+
baseUrl: `http://localhost:${cfg.port}`,
|
|
31
|
+
dbUrl: cfg.dbUrl ?? '',
|
|
32
|
+
adminPassword: '',
|
|
33
|
+
anonymousMode: true,
|
|
34
|
+
devMode: false,
|
|
35
|
+
extendedFeatures: cfg.extendedFeaturesEnabled,
|
|
36
|
+
},
|
|
37
|
+
dev: {
|
|
38
|
+
nodeId: cfg.nodeId !== 'aimeat-local-001-dev' ? cfg.nodeId : 'dev-local',
|
|
39
|
+
port: cfg.port,
|
|
40
|
+
baseUrl: `http://localhost:${cfg.port}`,
|
|
41
|
+
dbUrl: cfg.dbUrl ?? '',
|
|
42
|
+
adminPassword: '',
|
|
43
|
+
anonymousMode: true,
|
|
44
|
+
devMode: true,
|
|
45
|
+
extendedFeatures: cfg.extendedFeaturesEnabled,
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
// Defaults from config.ts for summary comparison
|
|
50
|
+
const CONFIG_DEFAULTS = {
|
|
51
|
+
AIMEAT_NODE_ID: 'aimeat-local-001-dev',
|
|
52
|
+
AIMEAT_PORT: '40050',
|
|
53
|
+
AIMEAT_NODE_TYPE: 'full',
|
|
54
|
+
AIMEAT_BASE_URL: '',
|
|
55
|
+
AIMEAT_STORAGE: 'memory',
|
|
56
|
+
AIMEAT_SQLITE_PATH: './data/aimeat.db',
|
|
57
|
+
DATABASE_URL: '',
|
|
58
|
+
AIMEAT_ADMIN_PASSWORD: '',
|
|
59
|
+
AIMEAT_DEV_MODE: 'false',
|
|
60
|
+
AIMEAT_ANONYMOUS: 'false',
|
|
61
|
+
AIMEAT_EXTENDED_FEATURES: 'true',
|
|
62
|
+
AIMEAT_KEYED_BROWSE: 'true',
|
|
63
|
+
AIMEAT_JWT_TTL: '3600',
|
|
64
|
+
AIMEAT_WELCOME_BONUS: '100',
|
|
65
|
+
AIMEAT_DAILY_ALLOWANCE: '50',
|
|
66
|
+
AIMEAT_DAILY_ALLOWANCE_CAP: '500',
|
|
67
|
+
AIMEAT_BURN_RATE: '0.10',
|
|
68
|
+
AIMEAT_MAX_OPERATOR_MINT_PER_DAY: '10000',
|
|
69
|
+
AIMEAT_BOARD_POST_BASE_COST: '5',
|
|
70
|
+
AIMEAT_BOARD_POST_COST_PER_KB: '2',
|
|
71
|
+
AIMEAT_MEMORY_QUOTA_MB: '10',
|
|
72
|
+
AIMEAT_MEMORY_MAX_VALUE_SIZE_KB: '1024',
|
|
73
|
+
AIMEAT_MEMORY_MAX_KEYS: '1000',
|
|
74
|
+
AIMEAT_STORAGE_QUOTA_MB: '100',
|
|
75
|
+
AIMEAT_STORAGE_MAX_FILE_SIZE_MB: '10',
|
|
76
|
+
AIMEAT_MICRO_MEMORY_MAX_SETS: '50',
|
|
77
|
+
AIMEAT_MICRO_MEMORY_MAX_KEYS_PER_SET: '100',
|
|
78
|
+
AIMEAT_MICRO_MEMORY_MAX_VALUE_SIZE: '16384',
|
|
79
|
+
AIMEAT_MAX_ACTIONS_PER_AGENT: '20',
|
|
80
|
+
AIMEAT_APP_MAX_SIZE_MB: '5',
|
|
81
|
+
AIMEAT_AGENT_PORTING_FEE: '50',
|
|
82
|
+
AIMEAT_MAX_RELAY_HOPS: '3',
|
|
83
|
+
AIMEAT_FEDERATION_ROLE: 'standalone',
|
|
84
|
+
AIMEAT_GENESIS_URL: '',
|
|
85
|
+
AIMEAT_CROSS_FEDERATION_ENABLED: 'true',
|
|
86
|
+
AIMEAT_MAX_GENESIS_PEERS: '10',
|
|
87
|
+
AIMEAT_GENESIS_SYNC_INTERVAL_HOURS: '6',
|
|
88
|
+
AIMEAT_INDEXNOW_KEY: '',
|
|
89
|
+
AIMEAT_CONSENT_ENABLED: 'true',
|
|
90
|
+
AIMEAT_CONSENT_MAX_PER_USER: '100',
|
|
91
|
+
AIMEAT_CONSENT_AUDIT_RETENTION_DAYS: '365',
|
|
92
|
+
AIMEAT_COOKIE_CONSENT_ENABLED: 'false',
|
|
93
|
+
AIMEAT_COOKIE_CONSENT_CATEGORIES: 'necessary',
|
|
94
|
+
AIMEAT_COOKIE_CONSENT_POLICY_URL: '',
|
|
95
|
+
AIMEAT_SITE_ENABLED: 'true',
|
|
96
|
+
AIMEAT_SITE_MAX_TEMPLATE_SIZE_KB: '512',
|
|
97
|
+
AIMEAT_SITE_CACHE_TTL_SECONDS: '60',
|
|
98
|
+
AIMEAT_PUSH_ENABLED: 'false',
|
|
99
|
+
AIMEAT_VAPID_PUBLIC_KEY: '',
|
|
100
|
+
AIMEAT_VAPID_PRIVATE_KEY: '',
|
|
101
|
+
AIMEAT_VAPID_SUBJECT: 'mailto:admin@aimeat.example.com',
|
|
102
|
+
AIMEAT_PUSH_NOTIFY_TYPES: 'work_assignment,action_request',
|
|
103
|
+
AIMEAT_PUSH_COOLDOWN_MIN: '5',
|
|
104
|
+
AIMEAT_PUSH_MAX_SUBSCRIPTIONS_PER_NODE: '5',
|
|
105
|
+
AIMEAT_PUSH_MAX_FAILURES: '3',
|
|
106
|
+
AIMEAT_SMTP_HOST: '',
|
|
107
|
+
AIMEAT_SMTP_PORT: '587',
|
|
108
|
+
AIMEAT_SMTP_USER: '',
|
|
109
|
+
AIMEAT_SMTP_PASS: '',
|
|
110
|
+
AIMEAT_SMTP_FROM: 'AIMEAT <noreply@localhost>',
|
|
111
|
+
AIMEAT_SMTP_SECURE: 'false',
|
|
112
|
+
AIMEAT_EMAIL_RATE_LIMIT_MIN: '30',
|
|
113
|
+
AIMEAT_METRICS_ENABLED: 'false',
|
|
114
|
+
AIMEAT_METRICS_ACCESS: 'operator',
|
|
115
|
+
AIMEAT_CORS_ALLOWED_ORIGINS: '*',
|
|
116
|
+
AIMEAT_TOTP_ENABLED: 'true',
|
|
117
|
+
AIMEAT_TOTP_ISSUER: 'AIMEAT',
|
|
118
|
+
AIMEAT_TOTP_MAX_FAILED: '5',
|
|
119
|
+
AIMEAT_TOTP_LOCKOUT_SECONDS: '300',
|
|
120
|
+
AIMEAT_MATCHING_ENABLED: 'true',
|
|
121
|
+
AIMEAT_MATCH_INTERVAL_HOURS: '24',
|
|
122
|
+
AIMEAT_MATCH_THRESHOLD: '0.5',
|
|
123
|
+
AIMEAT_MATCH_MAX_SUGGESTIONS: '5',
|
|
124
|
+
AIMEAT_MATCH_MAX_DISTANCE_KM: '100',
|
|
125
|
+
AIMEAT_MARKETPLACE_ENABLED: 'true',
|
|
126
|
+
AIMEAT_MARKETPLACE_LISTING_FEE: '2',
|
|
127
|
+
AIMEAT_MARKETPLACE_TX_FEE_PERCENT: '5',
|
|
128
|
+
AIMEAT_MARKETPLACE_ESCROW: 'true',
|
|
129
|
+
AIMEAT_REALTIME_ENABLED: 'true',
|
|
130
|
+
AIMEAT_REALTIME_MAX_ROOMS: '100',
|
|
131
|
+
AIMEAT_REALTIME_MAX_PEERS_PER_ROOM: '20',
|
|
132
|
+
AIMEAT_EXTENSIONS_ENABLED: 'false',
|
|
133
|
+
AIMEAT_EXT_MAX_MEMORY_MB: '64',
|
|
134
|
+
AIMEAT_EXT_TIMEOUT_MS: '5000',
|
|
135
|
+
AIMEAT_EXT_INSTALL_ROLE: 'operator',
|
|
136
|
+
AIMEAT_MAX_EXTENSIONS_PER_OWNER: '10',
|
|
137
|
+
AIMEAT_GENERATOR_ENABLED: 'true',
|
|
138
|
+
};
|
|
139
|
+
// ── Helpers ─────────────────────────────────────────────────────────
|
|
140
|
+
/** Parse a .env file into key-value pairs (ignores comments, handles quotes). */
|
|
141
|
+
function parseEnvFile(path) {
|
|
142
|
+
const result = {};
|
|
143
|
+
if (!existsSync(path))
|
|
144
|
+
return result;
|
|
145
|
+
for (const line of readFileSync(path, 'utf-8').split('\n')) {
|
|
146
|
+
const trimmed = line.trim();
|
|
147
|
+
if (!trimmed || trimmed.startsWith('#'))
|
|
148
|
+
continue;
|
|
149
|
+
const eqIdx = trimmed.indexOf('=');
|
|
150
|
+
if (eqIdx < 0)
|
|
151
|
+
continue;
|
|
152
|
+
const key = trimmed.slice(0, eqIdx).trim();
|
|
153
|
+
let val = trimmed.slice(eqIdx + 1).trim();
|
|
154
|
+
// Handle quoted values: extract content between first pair of quotes
|
|
155
|
+
if (val.startsWith('"')) {
|
|
156
|
+
const closeIdx = val.indexOf('"', 1);
|
|
157
|
+
val = closeIdx > 0 ? val.slice(1, closeIdx) : val.slice(1);
|
|
158
|
+
}
|
|
159
|
+
else if (val.startsWith("'")) {
|
|
160
|
+
const closeIdx = val.indexOf("'", 1);
|
|
161
|
+
val = closeIdx > 0 ? val.slice(1, closeIdx) : val.slice(1);
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
// Unquoted: strip inline comments
|
|
165
|
+
const hashIdx = val.indexOf('#');
|
|
166
|
+
if (hashIdx >= 0)
|
|
167
|
+
val = val.slice(0, hashIdx).trim();
|
|
168
|
+
}
|
|
169
|
+
result[key] = val;
|
|
170
|
+
}
|
|
171
|
+
return result;
|
|
172
|
+
}
|
|
173
|
+
function bail(t) {
|
|
174
|
+
p.cancel(t('init.cancelled'));
|
|
175
|
+
process.exit(0);
|
|
176
|
+
}
|
|
177
|
+
function checkCancel(value, t) {
|
|
178
|
+
if (p.isCancel(value))
|
|
179
|
+
bail(t);
|
|
180
|
+
return value;
|
|
181
|
+
}
|
|
182
|
+
// Note: @clack/prompts calls validate() with undefined when input is empty,
|
|
183
|
+
// BEFORE applying defaultValue. So all validators must allow empty/undefined
|
|
184
|
+
// when a defaultValue is set (the prompt handles it).
|
|
185
|
+
function validatePort(val, t) {
|
|
186
|
+
if (!val)
|
|
187
|
+
return; // empty = will use defaultValue
|
|
188
|
+
const n = parseInt(val, 10);
|
|
189
|
+
if (isNaN(n) || n < 1 || n > 65535)
|
|
190
|
+
return t('init.portInvalid');
|
|
191
|
+
}
|
|
192
|
+
function validateUrl(val, t) {
|
|
193
|
+
if (!val)
|
|
194
|
+
return;
|
|
195
|
+
if (!val.startsWith('http://') && !val.startsWith('https://')) {
|
|
196
|
+
return t('init.baseUrlInvalid');
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
function validateDbUrl(val, t) {
|
|
200
|
+
if (!val)
|
|
201
|
+
return;
|
|
202
|
+
if (!val.startsWith('mongodb://') && !val.startsWith('mongodb+srv://')) {
|
|
203
|
+
return t('init.dbUrlInvalid');
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
function validatePositiveNum(val, t) {
|
|
207
|
+
if (!val)
|
|
208
|
+
return;
|
|
209
|
+
const n = Number(val);
|
|
210
|
+
if (isNaN(n) || n < 0)
|
|
211
|
+
return t('init.numInvalid');
|
|
212
|
+
}
|
|
213
|
+
function validateBurnRate(val, t) {
|
|
214
|
+
if (!val)
|
|
215
|
+
return;
|
|
216
|
+
const n = parseFloat(val);
|
|
217
|
+
if (isNaN(n) || n < 0 || n > 1)
|
|
218
|
+
return t('init.burnRateInvalid');
|
|
219
|
+
}
|
|
220
|
+
// ── .env generation ─────────────────────────────────────────────────
|
|
221
|
+
function generateEnvContent(settings) {
|
|
222
|
+
const lines = [
|
|
223
|
+
'# AIMEAT Node Configuration',
|
|
224
|
+
'# Generated by: aimeat init',
|
|
225
|
+
'',
|
|
226
|
+
];
|
|
227
|
+
const sections = [
|
|
228
|
+
{
|
|
229
|
+
title: 'Node Identity',
|
|
230
|
+
vars: [
|
|
231
|
+
{ key: 'AIMEAT_NODE_ID' },
|
|
232
|
+
{ key: 'AIMEAT_PORT' },
|
|
233
|
+
{ key: 'AIMEAT_NODE_TYPE' },
|
|
234
|
+
{ key: 'AIMEAT_BASE_URL', comment: 'Public URL (default: http://localhost:$PORT)' },
|
|
235
|
+
],
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
title: 'Storage Backend',
|
|
239
|
+
vars: [
|
|
240
|
+
{ key: 'AIMEAT_STORAGE', comment: 'Storage backend: memory (default), sqlite (file-based), mongodb (production)' },
|
|
241
|
+
{ key: 'AIMEAT_SQLITE_PATH', comment: 'SQLite database file path (when AIMEAT_STORAGE=sqlite)' },
|
|
242
|
+
{ key: 'DATABASE_URL', comment: 'MongoDB connection URL (when AIMEAT_STORAGE=mongodb)' },
|
|
243
|
+
],
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
title: 'Operator / Admin',
|
|
247
|
+
vars: [
|
|
248
|
+
{ key: 'AIMEAT_ADMIN_PASSWORD', comment: 'Auto-generated on startup if not set' },
|
|
249
|
+
],
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
title: 'Modes',
|
|
253
|
+
vars: [
|
|
254
|
+
{ key: 'AIMEAT_DEV_MODE' },
|
|
255
|
+
{ key: 'AIMEAT_ANONYMOUS' },
|
|
256
|
+
],
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
title: 'Auth & Tokens',
|
|
260
|
+
vars: [
|
|
261
|
+
{ key: 'AIMEAT_JWT_TTL', comment: 'JWT lifetime in seconds (default: 1h)' },
|
|
262
|
+
],
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
title: 'Morsel Economy',
|
|
266
|
+
vars: [
|
|
267
|
+
{ key: 'AIMEAT_WELCOME_BONUS' },
|
|
268
|
+
{ key: 'AIMEAT_DAILY_ALLOWANCE' },
|
|
269
|
+
{ key: 'AIMEAT_DAILY_ALLOWANCE_CAP' },
|
|
270
|
+
{ key: 'AIMEAT_BURN_RATE' },
|
|
271
|
+
{ key: 'AIMEAT_MAX_OPERATOR_MINT_PER_DAY' },
|
|
272
|
+
{ key: 'AIMEAT_BOARD_POST_BASE_COST' },
|
|
273
|
+
{ key: 'AIMEAT_BOARD_POST_COST_PER_KB' },
|
|
274
|
+
],
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
title: 'Features',
|
|
278
|
+
vars: [
|
|
279
|
+
{ key: 'AIMEAT_KEYED_BROWSE' },
|
|
280
|
+
{ key: 'AIMEAT_EXTENDED_FEATURES' },
|
|
281
|
+
],
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
title: 'Quotas',
|
|
285
|
+
vars: [
|
|
286
|
+
{ key: 'AIMEAT_MEMORY_QUOTA_MB' },
|
|
287
|
+
{ key: 'AIMEAT_MEMORY_MAX_VALUE_SIZE_KB', comment: 'Max size of a single memory value (KB)' },
|
|
288
|
+
{ key: 'AIMEAT_MEMORY_MAX_KEYS', comment: 'Max memory keys per agent' },
|
|
289
|
+
{ key: 'AIMEAT_STORAGE_QUOTA_MB' },
|
|
290
|
+
{ key: 'AIMEAT_STORAGE_MAX_FILE_SIZE_MB', comment: 'Max single file upload size (MB)' },
|
|
291
|
+
{ key: 'AIMEAT_MICRO_MEMORY_MAX_SETS', comment: 'Max micro-memory sets per agent' },
|
|
292
|
+
{ key: 'AIMEAT_MICRO_MEMORY_MAX_KEYS_PER_SET', comment: 'Max keys per micro-memory set' },
|
|
293
|
+
{ key: 'AIMEAT_MICRO_MEMORY_MAX_VALUE_SIZE', comment: 'Max micro-memory value size (bytes)' },
|
|
294
|
+
{ key: 'AIMEAT_MAX_ACTIONS_PER_AGENT', comment: 'Max action definitions per agent' },
|
|
295
|
+
{ key: 'AIMEAT_APP_MAX_SIZE_MB', comment: 'Max app file size (MB)' },
|
|
296
|
+
{ key: 'AIMEAT_AGENT_PORTING_FEE', comment: 'Morsels charged for agent porting' },
|
|
297
|
+
],
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
title: 'Federation',
|
|
301
|
+
vars: [
|
|
302
|
+
{ key: 'AIMEAT_FEDERATION_ROLE', comment: 'operator = genesis directory | contributor = join genesis | standalone = independent' },
|
|
303
|
+
{ key: 'AIMEAT_GENESIS_URL', comment: 'Genesis node URL (for contributor role)' },
|
|
304
|
+
{ key: 'AIMEAT_MAX_RELAY_HOPS' },
|
|
305
|
+
{ key: 'AIMEAT_CROSS_FEDERATION_ENABLED', comment: 'Enable cross-federation genesis peering (connects independent nodes/clusters)' },
|
|
306
|
+
{ key: 'AIMEAT_MAX_GENESIS_PEERS', comment: 'Max genesis peer connections (1-100)' },
|
|
307
|
+
{ key: 'AIMEAT_GENESIS_SYNC_INTERVAL_HOURS', comment: 'Hours between catalogue sync with genesis peers (1-168)' },
|
|
308
|
+
],
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
title: 'IndexNow (Bing/Yandex search indexing)',
|
|
312
|
+
vars: [
|
|
313
|
+
{ key: 'AIMEAT_INDEXNOW_KEY', comment: 'Hex key for IndexNow. Generate: openssl rand -hex 16. After setting, run: pnpm indexnow' },
|
|
314
|
+
],
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
title: 'Node Portal (Site)',
|
|
318
|
+
vars: [
|
|
319
|
+
{ key: 'AIMEAT_SITE_ENABLED', comment: 'Enable custom HTML template portal at GET /' },
|
|
320
|
+
{ key: 'AIMEAT_SITE_MAX_TEMPLATE_SIZE_KB', comment: 'Max template size in KB' },
|
|
321
|
+
{ key: 'AIMEAT_SITE_CACHE_TTL_SECONDS', comment: 'Resolved template cache TTL (0 = no cache)' },
|
|
322
|
+
],
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
title: 'Push Notifications (REQ-007)',
|
|
326
|
+
vars: [
|
|
327
|
+
{ key: 'AIMEAT_PUSH_ENABLED' },
|
|
328
|
+
{ key: 'AIMEAT_VAPID_PUBLIC_KEY', comment: 'Generate: npx web-push generate-vapid-keys' },
|
|
329
|
+
{ key: 'AIMEAT_VAPID_PRIVATE_KEY' },
|
|
330
|
+
{ key: 'AIMEAT_VAPID_SUBJECT' },
|
|
331
|
+
{ key: 'AIMEAT_PUSH_NOTIFY_TYPES', comment: 'Comma-separated message types that trigger push' },
|
|
332
|
+
{ key: 'AIMEAT_PUSH_COOLDOWN_MIN' },
|
|
333
|
+
{ key: 'AIMEAT_PUSH_MAX_SUBSCRIPTIONS_PER_NODE' },
|
|
334
|
+
{ key: 'AIMEAT_PUSH_MAX_FAILURES' },
|
|
335
|
+
{ key: 'AIMEAT_EMAIL_RATE_LIMIT_MIN' },
|
|
336
|
+
],
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
title: 'Email / SMTP',
|
|
340
|
+
vars: [
|
|
341
|
+
{ key: 'AIMEAT_SMTP_HOST' },
|
|
342
|
+
{ key: 'AIMEAT_SMTP_PORT' },
|
|
343
|
+
{ key: 'AIMEAT_SMTP_USER' },
|
|
344
|
+
{ key: 'AIMEAT_SMTP_PASS' },
|
|
345
|
+
{ key: 'AIMEAT_SMTP_FROM' },
|
|
346
|
+
{ key: 'AIMEAT_SMTP_SECURE' },
|
|
347
|
+
],
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
title: 'Metrics & Observability (REQ-008)',
|
|
351
|
+
vars: [
|
|
352
|
+
{ key: 'AIMEAT_METRICS_ENABLED', comment: 'Enable Prometheus metrics at GET /v1/metrics' },
|
|
353
|
+
{ key: 'AIMEAT_METRICS_ACCESS', comment: 'public | authenticated | operator' },
|
|
354
|
+
],
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
title: 'CORS',
|
|
358
|
+
vars: [
|
|
359
|
+
{ key: 'AIMEAT_CORS_ALLOWED_ORIGINS', comment: 'Comma-separated origins, or * for all' },
|
|
360
|
+
],
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
title: 'TOTP / 2FA',
|
|
364
|
+
vars: [
|
|
365
|
+
{ key: 'AIMEAT_TOTP_ENABLED', comment: 'Enable TOTP two-factor authentication' },
|
|
366
|
+
{ key: 'AIMEAT_TOTP_ISSUER', comment: 'Issuer name shown in authenticator apps' },
|
|
367
|
+
{ key: 'AIMEAT_TOTP_MAX_FAILED', comment: 'Max failed attempts before lockout' },
|
|
368
|
+
{ key: 'AIMEAT_TOTP_LOCKOUT_SECONDS', comment: 'Lockout duration (seconds)' },
|
|
369
|
+
],
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
title: 'AI Matching',
|
|
373
|
+
vars: [
|
|
374
|
+
{ key: 'AIMEAT_MATCHING_ENABLED', comment: 'Enable AI-powered interest matching' },
|
|
375
|
+
{ key: 'AIMEAT_MATCH_INTERVAL_HOURS', comment: 'Hours between matching runs' },
|
|
376
|
+
{ key: 'AIMEAT_MATCH_THRESHOLD', comment: 'Min similarity score (0-1)' },
|
|
377
|
+
{ key: 'AIMEAT_MATCH_MAX_SUGGESTIONS', comment: 'Max match suggestions per user' },
|
|
378
|
+
{ key: 'AIMEAT_MATCH_MAX_DISTANCE_KM', comment: 'Max distance for location matching (km)' },
|
|
379
|
+
],
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
title: 'Marketplace',
|
|
383
|
+
vars: [
|
|
384
|
+
{ key: 'AIMEAT_MARKETPLACE_ENABLED', comment: 'Enable marketplace features' },
|
|
385
|
+
{ key: 'AIMEAT_MARKETPLACE_LISTING_FEE', comment: 'Morsels charged to list an item' },
|
|
386
|
+
{ key: 'AIMEAT_MARKETPLACE_TX_FEE_PERCENT', comment: 'Transaction fee percentage' },
|
|
387
|
+
{ key: 'AIMEAT_MARKETPLACE_ESCROW', comment: 'Enable escrow for transactions' },
|
|
388
|
+
],
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
title: 'Realtime P2P',
|
|
392
|
+
vars: [
|
|
393
|
+
{ key: 'AIMEAT_REALTIME_ENABLED', comment: 'Enable realtime P2P signaling (WebRTC)' },
|
|
394
|
+
{ key: 'AIMEAT_REALTIME_MAX_ROOMS', comment: 'Max concurrent rooms' },
|
|
395
|
+
{ key: 'AIMEAT_REALTIME_MAX_PEERS_PER_ROOM', comment: 'Max peers per room' },
|
|
396
|
+
],
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
title: 'Node Extensions (Sandboxed)',
|
|
400
|
+
vars: [
|
|
401
|
+
{ key: 'AIMEAT_EXTENSIONS_ENABLED', comment: 'Enable sandboxed extension system' },
|
|
402
|
+
{ key: 'AIMEAT_EXT_MAX_MEMORY_MB', comment: 'Max memory per extension sandbox (MB)' },
|
|
403
|
+
{ key: 'AIMEAT_EXT_TIMEOUT_MS', comment: 'Extension execution timeout (ms)' },
|
|
404
|
+
],
|
|
405
|
+
},
|
|
406
|
+
];
|
|
407
|
+
for (const section of sections) {
|
|
408
|
+
const hasValues = section.vars.some(v => v.key in settings);
|
|
409
|
+
if (!hasValues)
|
|
410
|
+
continue;
|
|
411
|
+
lines.push(`# ${'─'.repeat(2)} ${section.title} ${'─'.repeat(Math.max(0, 55 - section.title.length))}`);
|
|
412
|
+
for (const v of section.vars) {
|
|
413
|
+
if (v.comment)
|
|
414
|
+
lines.push(`# ${v.comment}`);
|
|
415
|
+
if (v.key in settings) {
|
|
416
|
+
const val = settings[v.key];
|
|
417
|
+
const isNumOrBool = /^(\d+(\.\d+)?|true|false)$/.test(val);
|
|
418
|
+
lines.push(`${v.key}=${isNumOrBool ? val : `"${val}"`}`);
|
|
419
|
+
}
|
|
420
|
+
else {
|
|
421
|
+
lines.push(`# ${v.key}=`);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
lines.push('');
|
|
425
|
+
}
|
|
426
|
+
return lines.join('\n');
|
|
427
|
+
}
|
|
428
|
+
function generateJsonContent(settings) {
|
|
429
|
+
const keyMap = {
|
|
430
|
+
AIMEAT_NODE_ID: 'nodeId',
|
|
431
|
+
AIMEAT_PORT: 'port',
|
|
432
|
+
AIMEAT_NODE_TYPE: 'nodeType',
|
|
433
|
+
AIMEAT_BASE_URL: 'baseUrl',
|
|
434
|
+
AIMEAT_STORAGE: 'storageProvider',
|
|
435
|
+
AIMEAT_SQLITE_PATH: 'sqlitePath',
|
|
436
|
+
DATABASE_URL: 'db',
|
|
437
|
+
AIMEAT_ADMIN_PASSWORD: 'adminPassword',
|
|
438
|
+
AIMEAT_DEV_MODE: 'devMode',
|
|
439
|
+
AIMEAT_ANONYMOUS: 'anonymousMode',
|
|
440
|
+
AIMEAT_JWT_TTL: 'jwtTtlSeconds',
|
|
441
|
+
AIMEAT_WELCOME_BONUS: 'welcomeBonus',
|
|
442
|
+
AIMEAT_DAILY_ALLOWANCE: 'dailyAllowance',
|
|
443
|
+
AIMEAT_DAILY_ALLOWANCE_CAP: 'dailyAllowanceCap',
|
|
444
|
+
AIMEAT_BURN_RATE: 'burnRate',
|
|
445
|
+
AIMEAT_MAX_OPERATOR_MINT_PER_DAY: 'maxOperatorMintPerDay',
|
|
446
|
+
AIMEAT_BOARD_POST_BASE_COST: 'boardPostBaseCost',
|
|
447
|
+
AIMEAT_BOARD_POST_COST_PER_KB: 'boardPostCostPerKb',
|
|
448
|
+
AIMEAT_EXTENDED_FEATURES: 'extendedFeaturesEnabled',
|
|
449
|
+
AIMEAT_KEYED_BROWSE: 'keyedBrowseEnabled',
|
|
450
|
+
AIMEAT_MEMORY_QUOTA_MB: 'memoryQuotaMb',
|
|
451
|
+
AIMEAT_MEMORY_MAX_VALUE_SIZE_KB: 'memoryMaxValueSizeKb',
|
|
452
|
+
AIMEAT_MEMORY_MAX_KEYS: 'memoryMaxKeysPerAgent',
|
|
453
|
+
AIMEAT_STORAGE_QUOTA_MB: 'storageQuotaMb',
|
|
454
|
+
AIMEAT_STORAGE_MAX_FILE_SIZE_MB: 'storageMaxFileSizeMb',
|
|
455
|
+
AIMEAT_MICRO_MEMORY_MAX_SETS: 'microMemoryMaxSetsPerAgent',
|
|
456
|
+
AIMEAT_MICRO_MEMORY_MAX_KEYS_PER_SET: 'microMemoryMaxKeysPerSet',
|
|
457
|
+
AIMEAT_MICRO_MEMORY_MAX_VALUE_SIZE: 'microMemoryMaxValueSizeBytes',
|
|
458
|
+
AIMEAT_MAX_ACTIONS_PER_AGENT: 'maxActionsPerAgent',
|
|
459
|
+
AIMEAT_APP_MAX_SIZE_MB: 'appMaxSizeMb',
|
|
460
|
+
AIMEAT_AGENT_PORTING_FEE: 'agentPortingFeeMorsels',
|
|
461
|
+
AIMEAT_MAX_RELAY_HOPS: 'maxRelayHops',
|
|
462
|
+
AIMEAT_FEDERATION_ROLE: 'federationRole',
|
|
463
|
+
AIMEAT_GENESIS_URL: 'genesisUrl',
|
|
464
|
+
AIMEAT_INDEXNOW_KEY: 'indexNowKey',
|
|
465
|
+
AIMEAT_SITE_ENABLED: 'siteEnabled',
|
|
466
|
+
AIMEAT_SITE_MAX_TEMPLATE_SIZE_KB: 'siteMaxTemplateSizeKb',
|
|
467
|
+
AIMEAT_SITE_CACHE_TTL_SECONDS: 'siteCacheTtlSeconds',
|
|
468
|
+
};
|
|
469
|
+
const cfg = {};
|
|
470
|
+
for (const [envKey, val] of Object.entries(settings)) {
|
|
471
|
+
const jsonKey = keyMap[envKey] ?? envKey;
|
|
472
|
+
if (/^\d+$/.test(val))
|
|
473
|
+
cfg[jsonKey] = parseInt(val, 10);
|
|
474
|
+
else if (/^\d+\.\d+$/.test(val))
|
|
475
|
+
cfg[jsonKey] = parseFloat(val);
|
|
476
|
+
else if (val === 'true')
|
|
477
|
+
cfg[jsonKey] = true;
|
|
478
|
+
else if (val === 'false')
|
|
479
|
+
cfg[jsonKey] = false;
|
|
480
|
+
else
|
|
481
|
+
cfg[jsonKey] = val;
|
|
482
|
+
}
|
|
483
|
+
return JSON.stringify(cfg, null, 2) + '\n';
|
|
484
|
+
}
|
|
485
|
+
function generateIniContent(settings) {
|
|
486
|
+
// Build INI structure using dot-path sections from ENV_TO_DOT_PATH
|
|
487
|
+
const sections = {};
|
|
488
|
+
for (const [envKey, val] of Object.entries(settings)) {
|
|
489
|
+
const dotPath = ENV_TO_DOT_PATH[envKey];
|
|
490
|
+
if (!dotPath)
|
|
491
|
+
continue;
|
|
492
|
+
const parts = dotPath.split('.');
|
|
493
|
+
const section = parts.length > 1 ? parts.slice(0, -1).join('.') : 'node';
|
|
494
|
+
const key = parts[parts.length - 1];
|
|
495
|
+
if (!sections[section])
|
|
496
|
+
sections[section] = {};
|
|
497
|
+
sections[section][key] = val;
|
|
498
|
+
}
|
|
499
|
+
// Add a comment header
|
|
500
|
+
const header = '; AIMEAT Node Configuration (INI format)\n; Generated by aimeat init\n\n';
|
|
501
|
+
return header + ini.stringify(sections);
|
|
502
|
+
}
|
|
503
|
+
// ── Wizard steps ────────────────────────────────────────────────────
|
|
504
|
+
async function askCoreSettings(t, preset, useCase, env) {
|
|
505
|
+
const settings = {};
|
|
506
|
+
// Node ID — prefer existing env value, then preset
|
|
507
|
+
const nodeIdDefault = env.AIMEAT_NODE_ID || preset.nodeId;
|
|
508
|
+
const nodeId = checkCancel(await p.text({
|
|
509
|
+
message: t('init.nodeId'),
|
|
510
|
+
placeholder: nodeIdDefault,
|
|
511
|
+
defaultValue: nodeIdDefault,
|
|
512
|
+
}), t);
|
|
513
|
+
settings.AIMEAT_NODE_ID = nodeId;
|
|
514
|
+
// Port — prefer existing env value
|
|
515
|
+
const portDefault = env.AIMEAT_PORT || String(preset.port);
|
|
516
|
+
const port = checkCancel(await p.text({
|
|
517
|
+
message: t('init.port'),
|
|
518
|
+
placeholder: portDefault,
|
|
519
|
+
defaultValue: portDefault,
|
|
520
|
+
validate: val => validatePort(val, t),
|
|
521
|
+
}), t);
|
|
522
|
+
settings.AIMEAT_PORT = port;
|
|
523
|
+
// Public URL — required for public nodes
|
|
524
|
+
if (useCase === 'public') {
|
|
525
|
+
const urlDefault = env.AIMEAT_BASE_URL || preset.baseUrl || '';
|
|
526
|
+
const baseUrl = checkCancel(await p.text({
|
|
527
|
+
message: t('init.baseUrl'),
|
|
528
|
+
placeholder: urlDefault || 'https://mynode.example.com',
|
|
529
|
+
...(urlDefault ? { defaultValue: urlDefault } : {}),
|
|
530
|
+
validate: val => {
|
|
531
|
+
if (!val)
|
|
532
|
+
return urlDefault ? undefined : t('init.baseUrlInvalid');
|
|
533
|
+
return validateUrl(val, t);
|
|
534
|
+
},
|
|
535
|
+
}), t);
|
|
536
|
+
settings.AIMEAT_BASE_URL = baseUrl;
|
|
537
|
+
}
|
|
538
|
+
else if (useCase === 'custom') {
|
|
539
|
+
const urlDefault = env.AIMEAT_BASE_URL || `http://localhost:${port}`;
|
|
540
|
+
const baseUrl = checkCancel(await p.text({
|
|
541
|
+
message: t('init.baseUrl'),
|
|
542
|
+
placeholder: urlDefault,
|
|
543
|
+
defaultValue: urlDefault,
|
|
544
|
+
validate: val => validateUrl(val, t),
|
|
545
|
+
}), t);
|
|
546
|
+
if (baseUrl && baseUrl !== `http://localhost:${port}`) {
|
|
547
|
+
settings.AIMEAT_BASE_URL = baseUrl;
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
// Storage backend selection
|
|
551
|
+
const storageBackend = checkCancel(await p.select({
|
|
552
|
+
message: t('init.storage_label'),
|
|
553
|
+
options: [
|
|
554
|
+
{ value: 'memory', label: t('init.storage_memory') },
|
|
555
|
+
{ value: 'sqlite', label: t('init.storage_sqlite') },
|
|
556
|
+
{ value: 'mongodb', label: t('init.storage_mongodb') },
|
|
557
|
+
],
|
|
558
|
+
initialValue: useCase === 'dev' ? 'memory' : useCase === 'personal' ? 'sqlite' : 'mongodb',
|
|
559
|
+
}), t);
|
|
560
|
+
settings.AIMEAT_STORAGE = storageBackend;
|
|
561
|
+
// If sqlite, ask for path
|
|
562
|
+
if (storageBackend === 'sqlite') {
|
|
563
|
+
const sqlitePath = checkCancel(await p.text({
|
|
564
|
+
message: t('init.sqlite_path_label'),
|
|
565
|
+
placeholder: './data/aimeat.db',
|
|
566
|
+
defaultValue: './data/aimeat.db',
|
|
567
|
+
}), t);
|
|
568
|
+
settings.AIMEAT_SQLITE_PATH = sqlitePath;
|
|
569
|
+
}
|
|
570
|
+
// MongoDB URL — only when mongodb storage is selected
|
|
571
|
+
if (storageBackend === 'mongodb') {
|
|
572
|
+
if (useCase === 'public') {
|
|
573
|
+
const dbDefault = env.DATABASE_URL || preset.dbUrl || '';
|
|
574
|
+
const dbUrl = checkCancel(await p.text({
|
|
575
|
+
message: t('init.dbUrl'),
|
|
576
|
+
placeholder: dbDefault || 'mongodb://user:pass@localhost:27017/aimeat',
|
|
577
|
+
...(dbDefault ? { defaultValue: dbDefault } : {}),
|
|
578
|
+
validate: val => {
|
|
579
|
+
if (!val)
|
|
580
|
+
return undefined;
|
|
581
|
+
return validateDbUrl(val, t);
|
|
582
|
+
},
|
|
583
|
+
}), t);
|
|
584
|
+
if (dbUrl)
|
|
585
|
+
settings.DATABASE_URL = dbUrl;
|
|
586
|
+
}
|
|
587
|
+
else {
|
|
588
|
+
const dbDefault = env.DATABASE_URL || preset.dbUrl || '';
|
|
589
|
+
const dbUrl = checkCancel(await p.text({
|
|
590
|
+
message: t('init.dbUrl'),
|
|
591
|
+
placeholder: dbDefault || t('init.dbUrlHint'),
|
|
592
|
+
defaultValue: dbDefault,
|
|
593
|
+
validate: val => validateDbUrl(val, t),
|
|
594
|
+
}), t);
|
|
595
|
+
if (dbUrl)
|
|
596
|
+
settings.DATABASE_URL = dbUrl;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
// Admin password — required for public, optional for others
|
|
600
|
+
if (useCase === 'public') {
|
|
601
|
+
const pw = checkCancel(await p.password({
|
|
602
|
+
message: t('init.adminPassword'),
|
|
603
|
+
validate: val => {
|
|
604
|
+
if (!val || val.length < 8)
|
|
605
|
+
return t('init.adminPasswordWeak');
|
|
606
|
+
},
|
|
607
|
+
}), t);
|
|
608
|
+
settings.AIMEAT_ADMIN_PASSWORD = pw;
|
|
609
|
+
}
|
|
610
|
+
else if (useCase === 'personal' || useCase === 'custom') {
|
|
611
|
+
const pw = checkCancel(await p.password({
|
|
612
|
+
message: `${t('init.adminPassword')} (${t('init.adminPasswordSkip')})`,
|
|
613
|
+
validate: val => {
|
|
614
|
+
if (val && val.length < 8)
|
|
615
|
+
return t('init.adminPasswordWeak');
|
|
616
|
+
},
|
|
617
|
+
}), t);
|
|
618
|
+
if (pw)
|
|
619
|
+
settings.AIMEAT_ADMIN_PASSWORD = pw;
|
|
620
|
+
}
|
|
621
|
+
// Anonymous mode
|
|
622
|
+
if (useCase === 'public') {
|
|
623
|
+
const anonDefault = env.AIMEAT_ANONYMOUS === 'true' || preset.anonymousMode;
|
|
624
|
+
const anon = checkCancel(await p.confirm({
|
|
625
|
+
message: t('init.anonymous'),
|
|
626
|
+
initialValue: anonDefault,
|
|
627
|
+
}), t);
|
|
628
|
+
if (anon)
|
|
629
|
+
settings.AIMEAT_ANONYMOUS = 'true';
|
|
630
|
+
}
|
|
631
|
+
else if (preset.anonymousMode) {
|
|
632
|
+
settings.AIMEAT_ANONYMOUS = 'true';
|
|
633
|
+
}
|
|
634
|
+
// Dev mode
|
|
635
|
+
if (preset.devMode) {
|
|
636
|
+
settings.AIMEAT_DEV_MODE = 'true';
|
|
637
|
+
}
|
|
638
|
+
// Extended features — ask for public
|
|
639
|
+
if (useCase === 'public') {
|
|
640
|
+
const extDefault = env.AIMEAT_EXTENDED_FEATURES !== 'false';
|
|
641
|
+
const ext = checkCancel(await p.confirm({
|
|
642
|
+
message: t('init.extended'),
|
|
643
|
+
initialValue: extDefault,
|
|
644
|
+
}), t);
|
|
645
|
+
if (!ext)
|
|
646
|
+
settings.AIMEAT_EXTENDED_FEATURES = 'false';
|
|
647
|
+
}
|
|
648
|
+
// Network role — ask for public and custom
|
|
649
|
+
if (useCase === 'public' || useCase === 'custom') {
|
|
650
|
+
const currentRole = env.AIMEAT_FEDERATION_ROLE || 'standalone';
|
|
651
|
+
const role = checkCancel(await p.select({
|
|
652
|
+
message: t('init.networkRole'),
|
|
653
|
+
initialValue: currentRole,
|
|
654
|
+
options: [
|
|
655
|
+
{ value: 'operator', label: t('init.networkRoleOperator'), hint: t('init.networkRoleOperatorDesc') },
|
|
656
|
+
{ value: 'contributor', label: t('init.networkRoleContributor'), hint: t('init.networkRoleContributorDesc') },
|
|
657
|
+
{ value: 'standalone', label: t('init.networkRoleStandalone'), hint: t('init.networkRoleStandaloneDesc') },
|
|
658
|
+
],
|
|
659
|
+
}), t);
|
|
660
|
+
settings.AIMEAT_FEDERATION_ROLE = role;
|
|
661
|
+
// Contributor needs genesis URL
|
|
662
|
+
if (role === 'contributor') {
|
|
663
|
+
const genesisDefault = env.AIMEAT_GENESIS_URL || '';
|
|
664
|
+
const genesisUrl = checkCancel(await p.text({
|
|
665
|
+
message: t('init.genesisUrl'),
|
|
666
|
+
placeholder: genesisDefault || 'https://aimeat.io',
|
|
667
|
+
...(genesisDefault ? { defaultValue: genesisDefault } : {}),
|
|
668
|
+
validate: val => {
|
|
669
|
+
if (!val)
|
|
670
|
+
return genesisDefault ? undefined : t('init.genesisUrlInvalid');
|
|
671
|
+
return validateUrl(val, t);
|
|
672
|
+
},
|
|
673
|
+
}), t);
|
|
674
|
+
settings.AIMEAT_GENESIS_URL = genesisUrl;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
// IndexNow key — ask for public nodes (enables Bing/Yandex search indexing)
|
|
678
|
+
if (useCase === 'public') {
|
|
679
|
+
const indexNowDefault = env.AIMEAT_INDEXNOW_KEY || '';
|
|
680
|
+
const indexNow = checkCancel(await p.text({
|
|
681
|
+
message: t('init.indexNowKey'),
|
|
682
|
+
placeholder: indexNowDefault || t('init.indexNowKeyHint'),
|
|
683
|
+
defaultValue: indexNowDefault,
|
|
684
|
+
}), t);
|
|
685
|
+
if (indexNow)
|
|
686
|
+
settings.AIMEAT_INDEXNOW_KEY = indexNow;
|
|
687
|
+
}
|
|
688
|
+
// Cookie consent banner — ask for public and custom (service builders)
|
|
689
|
+
if (useCase === 'public' || useCase === 'custom') {
|
|
690
|
+
const ccDefault = env.AIMEAT_COOKIE_CONSENT_ENABLED === 'true';
|
|
691
|
+
const ccEnabled = checkCancel(await p.confirm({
|
|
692
|
+
message: t('init.cookieConsent'),
|
|
693
|
+
initialValue: ccDefault,
|
|
694
|
+
}), t);
|
|
695
|
+
if (ccEnabled) {
|
|
696
|
+
settings.AIMEAT_COOKIE_CONSENT_ENABLED = 'true';
|
|
697
|
+
// Categories
|
|
698
|
+
const catDefault = env.AIMEAT_COOKIE_CONSENT_CATEGORIES || 'necessary,analytics,marketing';
|
|
699
|
+
const categories = checkCancel(await p.text({
|
|
700
|
+
message: t('init.cookieConsentCategories'),
|
|
701
|
+
placeholder: catDefault,
|
|
702
|
+
defaultValue: catDefault,
|
|
703
|
+
}), t);
|
|
704
|
+
if (categories && categories !== 'necessary') {
|
|
705
|
+
settings.AIMEAT_COOKIE_CONSENT_CATEGORIES = categories;
|
|
706
|
+
}
|
|
707
|
+
// Privacy policy URL
|
|
708
|
+
const policyDefault = env.AIMEAT_COOKIE_CONSENT_POLICY_URL || '';
|
|
709
|
+
const policyUrl = checkCancel(await p.text({
|
|
710
|
+
message: t('init.cookieConsentPolicyUrl'),
|
|
711
|
+
placeholder: policyDefault || 'https://example.com/privacy',
|
|
712
|
+
...(policyDefault ? { defaultValue: policyDefault } : {}),
|
|
713
|
+
validate: val => {
|
|
714
|
+
if (!val)
|
|
715
|
+
return undefined; // optional
|
|
716
|
+
return validateUrl(val, t);
|
|
717
|
+
},
|
|
718
|
+
}), t);
|
|
719
|
+
if (policyUrl)
|
|
720
|
+
settings.AIMEAT_COOKIE_CONSENT_POLICY_URL = policyUrl;
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
// ── Push Notifications ──
|
|
724
|
+
if (useCase === 'public' || useCase === 'custom') {
|
|
725
|
+
const pushDefault = env.AIMEAT_PUSH_ENABLED === 'true';
|
|
726
|
+
const pushEnabled = checkCancel(await p.confirm({
|
|
727
|
+
message: t('init.pushEnabled'),
|
|
728
|
+
initialValue: pushDefault,
|
|
729
|
+
}), t);
|
|
730
|
+
if (pushEnabled) {
|
|
731
|
+
settings.AIMEAT_PUSH_ENABLED = 'true';
|
|
732
|
+
const pubKeyDefault = env.AIMEAT_VAPID_PUBLIC_KEY || '';
|
|
733
|
+
const pubKey = checkCancel(await p.text({
|
|
734
|
+
message: t('init.vapidPublicKey'),
|
|
735
|
+
placeholder: pubKeyDefault || t('init.vapidPublicKeyHint'),
|
|
736
|
+
...(pubKeyDefault ? { defaultValue: pubKeyDefault } : {}),
|
|
737
|
+
}), t);
|
|
738
|
+
if (pubKey)
|
|
739
|
+
settings.AIMEAT_VAPID_PUBLIC_KEY = pubKey;
|
|
740
|
+
const privKeyDefault = env.AIMEAT_VAPID_PRIVATE_KEY || '';
|
|
741
|
+
const privKey = checkCancel(await p.text({
|
|
742
|
+
message: t('init.vapidPrivateKey'),
|
|
743
|
+
placeholder: privKeyDefault ? '••••••••' : t('init.vapidPrivateKeyHint'),
|
|
744
|
+
...(privKeyDefault ? { defaultValue: privKeyDefault } : {}),
|
|
745
|
+
}), t);
|
|
746
|
+
if (privKey)
|
|
747
|
+
settings.AIMEAT_VAPID_PRIVATE_KEY = privKey;
|
|
748
|
+
const subjectDefault = env.AIMEAT_VAPID_SUBJECT || 'mailto:admin@aimeat.example.com';
|
|
749
|
+
const subject = checkCancel(await p.text({
|
|
750
|
+
message: t('init.vapidSubject'),
|
|
751
|
+
placeholder: t('init.vapidSubjectHint'),
|
|
752
|
+
defaultValue: subjectDefault,
|
|
753
|
+
validate: (val) => {
|
|
754
|
+
if (val && !val.startsWith('mailto:') && !val.startsWith('https://')) {
|
|
755
|
+
return t('init.vapidSubjectInvalid');
|
|
756
|
+
}
|
|
757
|
+
},
|
|
758
|
+
}), t);
|
|
759
|
+
settings.AIMEAT_VAPID_SUBJECT = subject;
|
|
760
|
+
}
|
|
761
|
+
// ── Email / SMTP ──
|
|
762
|
+
const smtpDefault = !!env.AIMEAT_SMTP_HOST;
|
|
763
|
+
const smtpEnabled = checkCancel(await p.confirm({
|
|
764
|
+
message: t('init.smtpEnabled'),
|
|
765
|
+
initialValue: smtpDefault,
|
|
766
|
+
}), t);
|
|
767
|
+
if (smtpEnabled) {
|
|
768
|
+
const hostDefault = env.AIMEAT_SMTP_HOST || '';
|
|
769
|
+
const smtpHost = checkCancel(await p.text({
|
|
770
|
+
message: t('init.smtpHost'),
|
|
771
|
+
placeholder: hostDefault || t('init.smtpHostHint'),
|
|
772
|
+
...(hostDefault ? { defaultValue: hostDefault } : {}),
|
|
773
|
+
}), t);
|
|
774
|
+
if (smtpHost)
|
|
775
|
+
settings.AIMEAT_SMTP_HOST = smtpHost;
|
|
776
|
+
const portDefault = env.AIMEAT_SMTP_PORT || '587';
|
|
777
|
+
const smtpPort = checkCancel(await p.text({
|
|
778
|
+
message: t('init.smtpPort'),
|
|
779
|
+
placeholder: t('init.smtpPortHint'),
|
|
780
|
+
defaultValue: portDefault,
|
|
781
|
+
validate: (val) => validatePort(val, t),
|
|
782
|
+
}), t);
|
|
783
|
+
settings.AIMEAT_SMTP_PORT = smtpPort;
|
|
784
|
+
const userDefault = env.AIMEAT_SMTP_USER || '';
|
|
785
|
+
const smtpUser = checkCancel(await p.text({
|
|
786
|
+
message: t('init.smtpUser'),
|
|
787
|
+
placeholder: userDefault || t('init.smtpUserHint'),
|
|
788
|
+
...(userDefault ? { defaultValue: userDefault } : {}),
|
|
789
|
+
}), t);
|
|
790
|
+
if (smtpUser)
|
|
791
|
+
settings.AIMEAT_SMTP_USER = smtpUser;
|
|
792
|
+
const smtpPass = checkCancel(await p.text({
|
|
793
|
+
message: t('init.smtpPass'),
|
|
794
|
+
placeholder: '••••••••',
|
|
795
|
+
}), t);
|
|
796
|
+
if (smtpPass)
|
|
797
|
+
settings.AIMEAT_SMTP_PASS = smtpPass;
|
|
798
|
+
const fromDefault = env.AIMEAT_SMTP_FROM || 'AIMEAT <noreply@localhost>';
|
|
799
|
+
const smtpFrom = checkCancel(await p.text({
|
|
800
|
+
message: t('init.smtpFrom'),
|
|
801
|
+
placeholder: t('init.smtpFromHint'),
|
|
802
|
+
defaultValue: fromDefault,
|
|
803
|
+
}), t);
|
|
804
|
+
settings.AIMEAT_SMTP_FROM = smtpFrom;
|
|
805
|
+
const secureDefault = env.AIMEAT_SMTP_SECURE === 'true';
|
|
806
|
+
const smtpSecure = checkCancel(await p.confirm({
|
|
807
|
+
message: t('init.smtpSecure'),
|
|
808
|
+
initialValue: secureDefault,
|
|
809
|
+
}), t);
|
|
810
|
+
if (smtpSecure)
|
|
811
|
+
settings.AIMEAT_SMTP_SECURE = 'true';
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
// ── Metrics & Observability ──
|
|
815
|
+
if (useCase === 'public' || useCase === 'custom') {
|
|
816
|
+
const metricsDefault = env.AIMEAT_METRICS_ENABLED === 'true';
|
|
817
|
+
const metricsEnabled = checkCancel(await p.confirm({
|
|
818
|
+
message: t('init.metricsEnabled'),
|
|
819
|
+
initialValue: metricsDefault,
|
|
820
|
+
}), t);
|
|
821
|
+
if (metricsEnabled) {
|
|
822
|
+
settings.AIMEAT_METRICS_ENABLED = 'true';
|
|
823
|
+
const accessDefault = env.AIMEAT_METRICS_ACCESS || 'operator';
|
|
824
|
+
const metricsAccess = checkCancel(await p.select({
|
|
825
|
+
message: t('init.metricsAccess'),
|
|
826
|
+
initialValue: accessDefault,
|
|
827
|
+
options: [
|
|
828
|
+
{ value: 'public', label: t('init.metricsAccessPublic') },
|
|
829
|
+
{ value: 'authenticated', label: t('init.metricsAccessAuthenticated') },
|
|
830
|
+
{ value: 'operator', label: t('init.metricsAccessOperator') },
|
|
831
|
+
],
|
|
832
|
+
}), t);
|
|
833
|
+
settings.AIMEAT_METRICS_ACCESS = metricsAccess;
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
// Node Portal (Site) — ask for public and custom
|
|
837
|
+
if (useCase === 'public' || useCase === 'custom') {
|
|
838
|
+
const siteDefault = env.AIMEAT_SITE_ENABLED !== 'false';
|
|
839
|
+
const siteEnabled = checkCancel(await p.confirm({
|
|
840
|
+
message: t('init.siteEnabled'),
|
|
841
|
+
initialValue: siteDefault,
|
|
842
|
+
}), t);
|
|
843
|
+
if (!siteEnabled) {
|
|
844
|
+
settings.AIMEAT_SITE_ENABLED = 'false';
|
|
845
|
+
}
|
|
846
|
+
else {
|
|
847
|
+
const tmplSizeDefault = env.AIMEAT_SITE_MAX_TEMPLATE_SIZE_KB || '512';
|
|
848
|
+
const tmplSize = checkCancel(await p.text({
|
|
849
|
+
message: t('init.siteMaxTemplateSizeKb'),
|
|
850
|
+
defaultValue: tmplSizeDefault,
|
|
851
|
+
validate: val => validatePositiveNum(val, t),
|
|
852
|
+
}), t);
|
|
853
|
+
if (tmplSize !== '512')
|
|
854
|
+
settings.AIMEAT_SITE_MAX_TEMPLATE_SIZE_KB = tmplSize;
|
|
855
|
+
const cacheTtlDefault = env.AIMEAT_SITE_CACHE_TTL_SECONDS || '60';
|
|
856
|
+
const cacheTtl = checkCancel(await p.text({
|
|
857
|
+
message: t('init.siteCacheTtlSeconds'),
|
|
858
|
+
defaultValue: cacheTtlDefault,
|
|
859
|
+
validate: val => validatePositiveNum(val, t),
|
|
860
|
+
}), t);
|
|
861
|
+
if (cacheTtl !== '60')
|
|
862
|
+
settings.AIMEAT_SITE_CACHE_TTL_SECONDS = cacheTtl;
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
return settings;
|
|
866
|
+
}
|
|
867
|
+
async function askEconomySettings(t, cfg) {
|
|
868
|
+
const settings = {};
|
|
869
|
+
const bonus = checkCancel(await p.text({
|
|
870
|
+
message: t('init.welcomeBonus'),
|
|
871
|
+
defaultValue: String(cfg.welcomeBonus),
|
|
872
|
+
validate: val => validatePositiveNum(val, t),
|
|
873
|
+
}), t);
|
|
874
|
+
if (bonus !== '100')
|
|
875
|
+
settings.AIMEAT_WELCOME_BONUS = bonus;
|
|
876
|
+
const daily = checkCancel(await p.text({
|
|
877
|
+
message: t('init.dailyAllowance'),
|
|
878
|
+
defaultValue: String(cfg.dailyAllowance),
|
|
879
|
+
validate: val => validatePositiveNum(val, t),
|
|
880
|
+
}), t);
|
|
881
|
+
if (daily !== '50')
|
|
882
|
+
settings.AIMEAT_DAILY_ALLOWANCE = daily;
|
|
883
|
+
const cap = checkCancel(await p.text({
|
|
884
|
+
message: t('init.dailyAllowanceCap'),
|
|
885
|
+
defaultValue: String(cfg.dailyAllowanceCap),
|
|
886
|
+
validate: val => validatePositiveNum(val, t),
|
|
887
|
+
}), t);
|
|
888
|
+
if (cap !== '500')
|
|
889
|
+
settings.AIMEAT_DAILY_ALLOWANCE_CAP = cap;
|
|
890
|
+
const burn = checkCancel(await p.text({
|
|
891
|
+
message: t('init.burnRate'),
|
|
892
|
+
defaultValue: String(cfg.burnRate),
|
|
893
|
+
validate: val => validateBurnRate(val, t),
|
|
894
|
+
}), t);
|
|
895
|
+
if (burn !== '0.10')
|
|
896
|
+
settings.AIMEAT_BURN_RATE = burn;
|
|
897
|
+
const mint = checkCancel(await p.text({
|
|
898
|
+
message: t('init.maxMint'),
|
|
899
|
+
defaultValue: String(cfg.maxOperatorMintPerDay),
|
|
900
|
+
validate: val => validatePositiveNum(val, t),
|
|
901
|
+
}), t);
|
|
902
|
+
if (mint !== '10000')
|
|
903
|
+
settings.AIMEAT_MAX_OPERATOR_MINT_PER_DAY = mint;
|
|
904
|
+
const postCost = checkCancel(await p.text({
|
|
905
|
+
message: t('init.boardPostCost'),
|
|
906
|
+
defaultValue: String(cfg.boardPostBaseCost),
|
|
907
|
+
validate: val => validatePositiveNum(val, t),
|
|
908
|
+
}), t);
|
|
909
|
+
if (postCost !== '5')
|
|
910
|
+
settings.AIMEAT_BOARD_POST_BASE_COST = postCost;
|
|
911
|
+
const postCostKb = checkCancel(await p.text({
|
|
912
|
+
message: t('init.boardPostCostKb'),
|
|
913
|
+
defaultValue: String(cfg.boardPostCostPerKb),
|
|
914
|
+
validate: val => validatePositiveNum(val, t),
|
|
915
|
+
}), t);
|
|
916
|
+
if (postCostKb !== '2')
|
|
917
|
+
settings.AIMEAT_BOARD_POST_COST_PER_KB = postCostKb;
|
|
918
|
+
return settings;
|
|
919
|
+
}
|
|
920
|
+
async function askAllAdvancedSettings(t, cfg) {
|
|
921
|
+
const settings = await askEconomySettings(t, cfg);
|
|
922
|
+
const jwt = checkCancel(await p.text({
|
|
923
|
+
message: t('init.jwtTtl'),
|
|
924
|
+
defaultValue: String(cfg.jwtTtlSeconds),
|
|
925
|
+
validate: val => validatePositiveNum(val, t),
|
|
926
|
+
}), t);
|
|
927
|
+
if (jwt !== '3600')
|
|
928
|
+
settings.AIMEAT_JWT_TTL = jwt;
|
|
929
|
+
const memQuota = checkCancel(await p.text({
|
|
930
|
+
message: t('init.memoryQuota'),
|
|
931
|
+
defaultValue: String(cfg.memoryQuotaMb),
|
|
932
|
+
validate: val => validatePositiveNum(val, t),
|
|
933
|
+
}), t);
|
|
934
|
+
if (memQuota !== '10')
|
|
935
|
+
settings.AIMEAT_MEMORY_QUOTA_MB = memQuota;
|
|
936
|
+
const memValueSize = checkCancel(await p.text({
|
|
937
|
+
message: t('init.memoryMaxValueSizeKb'),
|
|
938
|
+
defaultValue: String(cfg.memoryMaxValueSizeKb),
|
|
939
|
+
validate: val => validatePositiveNum(val, t),
|
|
940
|
+
}), t);
|
|
941
|
+
if (memValueSize !== '1024')
|
|
942
|
+
settings.AIMEAT_MEMORY_MAX_VALUE_SIZE_KB = memValueSize;
|
|
943
|
+
const memKeys = checkCancel(await p.text({
|
|
944
|
+
message: t('init.memoryMaxKeys'),
|
|
945
|
+
defaultValue: String(cfg.memoryMaxKeysPerAgent),
|
|
946
|
+
validate: val => validatePositiveNum(val, t),
|
|
947
|
+
}), t);
|
|
948
|
+
if (memKeys !== '1000')
|
|
949
|
+
settings.AIMEAT_MEMORY_MAX_KEYS = memKeys;
|
|
950
|
+
const storQuota = checkCancel(await p.text({
|
|
951
|
+
message: t('init.storageQuota'),
|
|
952
|
+
defaultValue: String(cfg.storageQuotaMb),
|
|
953
|
+
validate: val => validatePositiveNum(val, t),
|
|
954
|
+
}), t);
|
|
955
|
+
if (storQuota !== '100')
|
|
956
|
+
settings.AIMEAT_STORAGE_QUOTA_MB = storQuota;
|
|
957
|
+
const storFileSize = checkCancel(await p.text({
|
|
958
|
+
message: t('init.storageMaxFileSize'),
|
|
959
|
+
defaultValue: String(cfg.storageMaxFileSizeMb),
|
|
960
|
+
validate: val => validatePositiveNum(val, t),
|
|
961
|
+
}), t);
|
|
962
|
+
if (storFileSize !== '10')
|
|
963
|
+
settings.AIMEAT_STORAGE_MAX_FILE_SIZE_MB = storFileSize;
|
|
964
|
+
const mmSets = checkCancel(await p.text({
|
|
965
|
+
message: t('init.microMemoryMaxSets'),
|
|
966
|
+
defaultValue: String(cfg.microMemoryMaxSetsPerAgent),
|
|
967
|
+
validate: val => validatePositiveNum(val, t),
|
|
968
|
+
}), t);
|
|
969
|
+
if (mmSets !== '50')
|
|
970
|
+
settings.AIMEAT_MICRO_MEMORY_MAX_SETS = mmSets;
|
|
971
|
+
const mmKeys = checkCancel(await p.text({
|
|
972
|
+
message: t('init.microMemoryMaxKeysPerSet'),
|
|
973
|
+
defaultValue: String(cfg.microMemoryMaxKeysPerSet),
|
|
974
|
+
validate: val => validatePositiveNum(val, t),
|
|
975
|
+
}), t);
|
|
976
|
+
if (mmKeys !== '100')
|
|
977
|
+
settings.AIMEAT_MICRO_MEMORY_MAX_KEYS_PER_SET = mmKeys;
|
|
978
|
+
const mmValueSize = checkCancel(await p.text({
|
|
979
|
+
message: t('init.microMemoryMaxValueSize'),
|
|
980
|
+
defaultValue: String(cfg.microMemoryMaxValueSizeBytes),
|
|
981
|
+
validate: val => validatePositiveNum(val, t),
|
|
982
|
+
}), t);
|
|
983
|
+
if (mmValueSize !== '16384')
|
|
984
|
+
settings.AIMEAT_MICRO_MEMORY_MAX_VALUE_SIZE = mmValueSize;
|
|
985
|
+
const maxActions = checkCancel(await p.text({
|
|
986
|
+
message: t('init.maxActionsPerAgent'),
|
|
987
|
+
defaultValue: String(cfg.maxActionsPerAgent),
|
|
988
|
+
validate: val => validatePositiveNum(val, t),
|
|
989
|
+
}), t);
|
|
990
|
+
if (maxActions !== '20')
|
|
991
|
+
settings.AIMEAT_MAX_ACTIONS_PER_AGENT = maxActions;
|
|
992
|
+
const appSize = checkCancel(await p.text({
|
|
993
|
+
message: t('init.appMaxSize'),
|
|
994
|
+
defaultValue: String(cfg.appMaxSizeMb),
|
|
995
|
+
validate: val => validatePositiveNum(val, t),
|
|
996
|
+
}), t);
|
|
997
|
+
if (appSize !== '5')
|
|
998
|
+
settings.AIMEAT_APP_MAX_SIZE_MB = appSize;
|
|
999
|
+
const portingFee = checkCancel(await p.text({
|
|
1000
|
+
message: t('init.agentPortingFee'),
|
|
1001
|
+
defaultValue: String(cfg.agentPortingFeeMorsels),
|
|
1002
|
+
validate: val => validatePositiveNum(val, t),
|
|
1003
|
+
}), t);
|
|
1004
|
+
if (portingFee !== '50')
|
|
1005
|
+
settings.AIMEAT_AGENT_PORTING_FEE = portingFee;
|
|
1006
|
+
const relayHops = checkCancel(await p.text({
|
|
1007
|
+
message: t('init.maxRelayHops'),
|
|
1008
|
+
defaultValue: String(cfg.maxRelayHops),
|
|
1009
|
+
validate: val => validatePositiveNum(val, t),
|
|
1010
|
+
}), t);
|
|
1011
|
+
if (relayHops !== '3')
|
|
1012
|
+
settings.AIMEAT_MAX_RELAY_HOPS = relayHops;
|
|
1013
|
+
// ── Cross-Federation (Genesis Peering) ──
|
|
1014
|
+
p.note(t('init.crossFedNote'));
|
|
1015
|
+
const crossFedEnabled = checkCancel(await p.confirm({
|
|
1016
|
+
message: t('init.crossFedEnabled'),
|
|
1017
|
+
initialValue: cfg.crossFederationEnabled,
|
|
1018
|
+
}), t);
|
|
1019
|
+
if (!crossFedEnabled)
|
|
1020
|
+
settings.AIMEAT_CROSS_FEDERATION_ENABLED = 'false';
|
|
1021
|
+
if (crossFedEnabled) {
|
|
1022
|
+
const maxPeers = checkCancel(await p.text({
|
|
1023
|
+
message: t('init.crossFedMaxPeers'),
|
|
1024
|
+
defaultValue: String(cfg.maxGenesisPeers),
|
|
1025
|
+
validate: (val) => {
|
|
1026
|
+
const n = parseInt(val ?? '', 10);
|
|
1027
|
+
if (isNaN(n) || n < 1 || n > 100)
|
|
1028
|
+
return t('init.crossFedMaxPeersInvalid');
|
|
1029
|
+
},
|
|
1030
|
+
}), t);
|
|
1031
|
+
if (maxPeers !== '10')
|
|
1032
|
+
settings.AIMEAT_MAX_GENESIS_PEERS = maxPeers;
|
|
1033
|
+
const syncInterval = checkCancel(await p.text({
|
|
1034
|
+
message: t('init.crossFedSyncInterval'),
|
|
1035
|
+
defaultValue: String(cfg.genesisSyncIntervalHours),
|
|
1036
|
+
validate: (val) => {
|
|
1037
|
+
const n = parseInt(val ?? '', 10);
|
|
1038
|
+
if (isNaN(n) || n < 1 || n > 168)
|
|
1039
|
+
return t('init.crossFedSyncIntervalInvalid');
|
|
1040
|
+
},
|
|
1041
|
+
}), t);
|
|
1042
|
+
if (syncInterval !== '6')
|
|
1043
|
+
settings.AIMEAT_GENESIS_SYNC_INTERVAL_HOURS = syncInterval;
|
|
1044
|
+
}
|
|
1045
|
+
const rateLimitGlobal = checkCancel(await p.text({
|
|
1046
|
+
message: t('init.rateLimitGlobal'),
|
|
1047
|
+
defaultValue: String(cfg.rlGlobal),
|
|
1048
|
+
validate: (val) => {
|
|
1049
|
+
const n = parseInt(val ?? '', 10);
|
|
1050
|
+
if (isNaN(n) || n < 1)
|
|
1051
|
+
return t('init.numInvalid');
|
|
1052
|
+
},
|
|
1053
|
+
}), t);
|
|
1054
|
+
if (rateLimitGlobal !== '300')
|
|
1055
|
+
settings.AIMEAT_RL_GLOBAL = rateLimitGlobal;
|
|
1056
|
+
// ── Consent Layer ──
|
|
1057
|
+
const consentEnabled = checkCancel(await p.confirm({
|
|
1058
|
+
message: t('init.consentEnabled'),
|
|
1059
|
+
initialValue: cfg.consentEnabled,
|
|
1060
|
+
}), t);
|
|
1061
|
+
if (!consentEnabled)
|
|
1062
|
+
settings.AIMEAT_CONSENT_ENABLED = 'false';
|
|
1063
|
+
if (consentEnabled) {
|
|
1064
|
+
const consentMaxPerUser = checkCancel(await p.text({
|
|
1065
|
+
message: t('init.consentMaxPerUser'),
|
|
1066
|
+
defaultValue: String(cfg.consentMaxPerUser),
|
|
1067
|
+
validate: val => validatePositiveNum(val, t),
|
|
1068
|
+
}), t);
|
|
1069
|
+
if (consentMaxPerUser !== '100')
|
|
1070
|
+
settings.AIMEAT_CONSENT_MAX_PER_USER = consentMaxPerUser;
|
|
1071
|
+
const consentAuditDays = checkCancel(await p.text({
|
|
1072
|
+
message: t('init.consentAuditDays'),
|
|
1073
|
+
defaultValue: String(cfg.consentAuditRetentionDays),
|
|
1074
|
+
validate: val => validatePositiveNum(val, t),
|
|
1075
|
+
}), t);
|
|
1076
|
+
if (consentAuditDays !== '365')
|
|
1077
|
+
settings.AIMEAT_CONSENT_AUDIT_RETENTION_DAYS = consentAuditDays;
|
|
1078
|
+
}
|
|
1079
|
+
// ── CORS ──
|
|
1080
|
+
const corsOrigins = checkCancel(await p.text({
|
|
1081
|
+
message: t('init.corsOrigins'),
|
|
1082
|
+
defaultValue: cfg.corsAllowedOrigins.join(', '),
|
|
1083
|
+
placeholder: '* or https://example.com, https://app.example.com',
|
|
1084
|
+
}), t);
|
|
1085
|
+
if (corsOrigins !== '*')
|
|
1086
|
+
settings.AIMEAT_CORS_ALLOWED_ORIGINS = corsOrigins;
|
|
1087
|
+
// ── TOTP / 2FA ──
|
|
1088
|
+
const totpEnabled = checkCancel(await p.confirm({
|
|
1089
|
+
message: t('init.totpEnabled'),
|
|
1090
|
+
initialValue: cfg.totpEnabled,
|
|
1091
|
+
}), t);
|
|
1092
|
+
if (!totpEnabled)
|
|
1093
|
+
settings.AIMEAT_TOTP_ENABLED = 'false';
|
|
1094
|
+
if (totpEnabled) {
|
|
1095
|
+
const totpIssuer = checkCancel(await p.text({
|
|
1096
|
+
message: t('init.totpIssuer'),
|
|
1097
|
+
defaultValue: cfg.totpIssuer,
|
|
1098
|
+
}), t);
|
|
1099
|
+
if (totpIssuer !== 'AIMEAT')
|
|
1100
|
+
settings.AIMEAT_TOTP_ISSUER = totpIssuer;
|
|
1101
|
+
const totpMaxFailed = checkCancel(await p.text({
|
|
1102
|
+
message: t('init.totpMaxFailed'),
|
|
1103
|
+
defaultValue: String(cfg.totpMaxFailedAttempts),
|
|
1104
|
+
validate: val => validatePositiveNum(val, t),
|
|
1105
|
+
}), t);
|
|
1106
|
+
if (totpMaxFailed !== '5')
|
|
1107
|
+
settings.AIMEAT_TOTP_MAX_FAILED = totpMaxFailed;
|
|
1108
|
+
const totpLockout = checkCancel(await p.text({
|
|
1109
|
+
message: t('init.totpLockoutSeconds'),
|
|
1110
|
+
defaultValue: String(cfg.totpLockoutSeconds),
|
|
1111
|
+
validate: val => validatePositiveNum(val, t),
|
|
1112
|
+
}), t);
|
|
1113
|
+
if (totpLockout !== '300')
|
|
1114
|
+
settings.AIMEAT_TOTP_LOCKOUT_SECONDS = totpLockout;
|
|
1115
|
+
}
|
|
1116
|
+
// ── AI Matching ──
|
|
1117
|
+
const matchingEnabled = checkCancel(await p.confirm({
|
|
1118
|
+
message: t('init.matchingEnabled'),
|
|
1119
|
+
initialValue: cfg.matchingEnabled,
|
|
1120
|
+
}), t);
|
|
1121
|
+
if (!matchingEnabled)
|
|
1122
|
+
settings.AIMEAT_MATCHING_ENABLED = 'false';
|
|
1123
|
+
if (matchingEnabled) {
|
|
1124
|
+
const matchInterval = checkCancel(await p.text({
|
|
1125
|
+
message: t('init.matchIntervalHours'),
|
|
1126
|
+
defaultValue: String(cfg.matchIntervalHours),
|
|
1127
|
+
validate: val => validatePositiveNum(val, t),
|
|
1128
|
+
}), t);
|
|
1129
|
+
if (matchInterval !== '24')
|
|
1130
|
+
settings.AIMEAT_MATCH_INTERVAL_HOURS = matchInterval;
|
|
1131
|
+
const matchThreshold = checkCancel(await p.text({
|
|
1132
|
+
message: t('init.matchThreshold'),
|
|
1133
|
+
defaultValue: String(cfg.matchThreshold),
|
|
1134
|
+
validate: val => validateBurnRate(val, t),
|
|
1135
|
+
}), t);
|
|
1136
|
+
if (matchThreshold !== '0.5')
|
|
1137
|
+
settings.AIMEAT_MATCH_THRESHOLD = matchThreshold;
|
|
1138
|
+
const matchMaxSuggestions = checkCancel(await p.text({
|
|
1139
|
+
message: t('init.matchMaxSuggestions'),
|
|
1140
|
+
defaultValue: String(cfg.matchMaxSuggestions),
|
|
1141
|
+
validate: val => validatePositiveNum(val, t),
|
|
1142
|
+
}), t);
|
|
1143
|
+
if (matchMaxSuggestions !== '5')
|
|
1144
|
+
settings.AIMEAT_MATCH_MAX_SUGGESTIONS = matchMaxSuggestions;
|
|
1145
|
+
const matchMaxDistance = checkCancel(await p.text({
|
|
1146
|
+
message: t('init.matchMaxDistanceKm'),
|
|
1147
|
+
defaultValue: String(cfg.matchMaxDistanceKm),
|
|
1148
|
+
validate: val => validatePositiveNum(val, t),
|
|
1149
|
+
}), t);
|
|
1150
|
+
if (matchMaxDistance !== '100')
|
|
1151
|
+
settings.AIMEAT_MATCH_MAX_DISTANCE_KM = matchMaxDistance;
|
|
1152
|
+
}
|
|
1153
|
+
// ── Marketplace ──
|
|
1154
|
+
const marketplaceEnabled = checkCancel(await p.confirm({
|
|
1155
|
+
message: t('init.marketplaceEnabled'),
|
|
1156
|
+
initialValue: cfg.marketplaceEnabled,
|
|
1157
|
+
}), t);
|
|
1158
|
+
if (!marketplaceEnabled)
|
|
1159
|
+
settings.AIMEAT_MARKETPLACE_ENABLED = 'false';
|
|
1160
|
+
if (marketplaceEnabled) {
|
|
1161
|
+
const listingFee = checkCancel(await p.text({
|
|
1162
|
+
message: t('init.marketplaceListingFee'),
|
|
1163
|
+
defaultValue: String(cfg.marketplaceListingFeeMorsels),
|
|
1164
|
+
validate: val => validatePositiveNum(val, t),
|
|
1165
|
+
}), t);
|
|
1166
|
+
if (listingFee !== '2')
|
|
1167
|
+
settings.AIMEAT_MARKETPLACE_LISTING_FEE = listingFee;
|
|
1168
|
+
const txFee = checkCancel(await p.text({
|
|
1169
|
+
message: t('init.marketplaceTxFeePercent'),
|
|
1170
|
+
defaultValue: String(cfg.marketplaceTransactionFeePercent),
|
|
1171
|
+
validate: val => validatePositiveNum(val, t),
|
|
1172
|
+
}), t);
|
|
1173
|
+
if (txFee !== '5')
|
|
1174
|
+
settings.AIMEAT_MARKETPLACE_TX_FEE_PERCENT = txFee;
|
|
1175
|
+
const escrow = checkCancel(await p.confirm({
|
|
1176
|
+
message: t('init.marketplaceEscrow'),
|
|
1177
|
+
initialValue: cfg.marketplaceEscrowEnabled,
|
|
1178
|
+
}), t);
|
|
1179
|
+
if (!escrow)
|
|
1180
|
+
settings.AIMEAT_MARKETPLACE_ESCROW = 'false';
|
|
1181
|
+
}
|
|
1182
|
+
// ── Realtime P2P ──
|
|
1183
|
+
const realtimeEnabled = checkCancel(await p.confirm({
|
|
1184
|
+
message: t('init.realtimeEnabled'),
|
|
1185
|
+
initialValue: cfg.realtimeEnabled,
|
|
1186
|
+
}), t);
|
|
1187
|
+
if (!realtimeEnabled)
|
|
1188
|
+
settings.AIMEAT_REALTIME_ENABLED = 'false';
|
|
1189
|
+
if (realtimeEnabled) {
|
|
1190
|
+
const maxRooms = checkCancel(await p.text({
|
|
1191
|
+
message: t('init.realtimeMaxRooms'),
|
|
1192
|
+
defaultValue: String(cfg.realtimeMaxRooms),
|
|
1193
|
+
validate: val => validatePositiveNum(val, t),
|
|
1194
|
+
}), t);
|
|
1195
|
+
if (maxRooms !== '100')
|
|
1196
|
+
settings.AIMEAT_REALTIME_MAX_ROOMS = maxRooms;
|
|
1197
|
+
const maxPeersRoom = checkCancel(await p.text({
|
|
1198
|
+
message: t('init.realtimeMaxPeersPerRoom'),
|
|
1199
|
+
defaultValue: String(cfg.realtimeMaxPeersPerRoom),
|
|
1200
|
+
validate: val => validatePositiveNum(val, t),
|
|
1201
|
+
}), t);
|
|
1202
|
+
if (maxPeersRoom !== '20')
|
|
1203
|
+
settings.AIMEAT_REALTIME_MAX_PEERS_PER_ROOM = maxPeersRoom;
|
|
1204
|
+
}
|
|
1205
|
+
// ── Extensions ──
|
|
1206
|
+
const extensionsEnabled = checkCancel(await p.confirm({
|
|
1207
|
+
message: t('init.extensionsEnabled'),
|
|
1208
|
+
initialValue: cfg.extensionsEnabled,
|
|
1209
|
+
}), t);
|
|
1210
|
+
if (extensionsEnabled) {
|
|
1211
|
+
settings.AIMEAT_EXTENSIONS_ENABLED = 'true';
|
|
1212
|
+
const extMemory = checkCancel(await p.text({
|
|
1213
|
+
message: t('init.extensionMaxMemoryMb'),
|
|
1214
|
+
defaultValue: String(cfg.extensionMaxMemoryMb),
|
|
1215
|
+
validate: val => validatePositiveNum(val, t),
|
|
1216
|
+
}), t);
|
|
1217
|
+
if (extMemory !== '64')
|
|
1218
|
+
settings.AIMEAT_EXT_MAX_MEMORY_MB = extMemory;
|
|
1219
|
+
const extTimeout = checkCancel(await p.text({
|
|
1220
|
+
message: t('init.extensionTimeoutMs'),
|
|
1221
|
+
defaultValue: String(cfg.extensionTimeoutMs),
|
|
1222
|
+
validate: val => validatePositiveNum(val, t),
|
|
1223
|
+
}), t);
|
|
1224
|
+
if (extTimeout !== '5000')
|
|
1225
|
+
settings.AIMEAT_EXT_TIMEOUT_MS = extTimeout;
|
|
1226
|
+
}
|
|
1227
|
+
return settings;
|
|
1228
|
+
}
|
|
1229
|
+
// ── Main wizard ─────────────────────────────────────────────────────
|
|
1230
|
+
/** Find .env: CWD first, then package root. */
|
|
1231
|
+
function findEnvFile() {
|
|
1232
|
+
if (existsSync('.env'))
|
|
1233
|
+
return '.env';
|
|
1234
|
+
const pkgEnv = join(__pkgRoot, '.env');
|
|
1235
|
+
if (existsSync(pkgEnv))
|
|
1236
|
+
return pkgEnv;
|
|
1237
|
+
return null;
|
|
1238
|
+
}
|
|
1239
|
+
export async function runInitWizard(config) {
|
|
1240
|
+
// Read existing .env for current values
|
|
1241
|
+
const envFilePath = findEnvFile();
|
|
1242
|
+
const env = envFilePath ? parseEnvFile(envFilePath) : {};
|
|
1243
|
+
// Step 1: Language selection (always bilingual)
|
|
1244
|
+
p.intro('AIMEAT Node Configuration Wizard');
|
|
1245
|
+
const lang = checkCancel(await p.select({
|
|
1246
|
+
message: 'Select language / Valitse kieli',
|
|
1247
|
+
options: [
|
|
1248
|
+
{ value: 'en', label: 'English' },
|
|
1249
|
+
{ value: 'fi', label: 'Suomi' },
|
|
1250
|
+
],
|
|
1251
|
+
}), createT('en'));
|
|
1252
|
+
const locale = lang;
|
|
1253
|
+
const t = createT(locale);
|
|
1254
|
+
// Step 2: Use case selection
|
|
1255
|
+
const useCase = checkCancel(await p.select({
|
|
1256
|
+
message: t('init.useCase'),
|
|
1257
|
+
options: [
|
|
1258
|
+
{ value: 'public', label: t('init.useCasePublic'), hint: t('init.useCasePublicDesc') },
|
|
1259
|
+
{ value: 'personal', label: t('init.useCasePersonal'), hint: t('init.useCasePersonalDesc') },
|
|
1260
|
+
{ value: 'dev', label: t('init.useCaseDev'), hint: t('init.useCaseDevDesc') },
|
|
1261
|
+
{ value: 'custom', label: t('init.useCaseCustom'), hint: t('init.useCaseCustomDesc') },
|
|
1262
|
+
],
|
|
1263
|
+
}), t);
|
|
1264
|
+
// Build presets from loaded config (which already has env var values)
|
|
1265
|
+
const presets = buildPresets(config);
|
|
1266
|
+
const preset = useCase === 'custom' ? presets.personal : presets[useCase];
|
|
1267
|
+
// Step 3: Gather core settings — pass env so prompts show existing values
|
|
1268
|
+
const settings = await askCoreSettings(t, preset, useCase, env);
|
|
1269
|
+
// Step 4: Advanced settings (skip for dev)
|
|
1270
|
+
if (useCase !== 'dev') {
|
|
1271
|
+
const advanced = checkCancel(await p.select({
|
|
1272
|
+
message: t('init.advancedPrompt'),
|
|
1273
|
+
options: [
|
|
1274
|
+
{ value: 'none', label: t('init.advancedNo') },
|
|
1275
|
+
{ value: 'economy', label: t('init.advancedEconomy'), hint: t('init.advancedEconomyDesc') },
|
|
1276
|
+
{ value: 'all', label: t('init.advancedAll'), hint: t('init.advancedAllDesc') },
|
|
1277
|
+
],
|
|
1278
|
+
}), t);
|
|
1279
|
+
if (advanced === 'economy') {
|
|
1280
|
+
Object.assign(settings, await askEconomySettings(t, config));
|
|
1281
|
+
}
|
|
1282
|
+
else if (advanced === 'all') {
|
|
1283
|
+
Object.assign(settings, await askAllAdvancedSettings(t, config));
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
// Step 5: Summary
|
|
1287
|
+
const changedEntries = Object.entries(settings).filter(([key, val]) => CONFIG_DEFAULTS[key] !== val);
|
|
1288
|
+
if (changedEntries.length > 0) {
|
|
1289
|
+
const summaryLines = changedEntries
|
|
1290
|
+
.map(([key, val]) => {
|
|
1291
|
+
const display = key === 'AIMEAT_ADMIN_PASSWORD'
|
|
1292
|
+
? val.slice(0, 2) + '*'.repeat(Math.max(0, val.length - 4)) + val.slice(-2)
|
|
1293
|
+
: val;
|
|
1294
|
+
return ` ${key} = ${display}`;
|
|
1295
|
+
})
|
|
1296
|
+
.join('\n');
|
|
1297
|
+
p.note(`${t('init.summaryChanged')}\n\n${summaryLines}\n\n${t('init.summaryDefault')}`, t('init.summaryTitle'));
|
|
1298
|
+
}
|
|
1299
|
+
// Step 6: Output format
|
|
1300
|
+
const outputFormat = checkCancel(await p.select({
|
|
1301
|
+
message: t('init.outputPrompt'),
|
|
1302
|
+
options: [
|
|
1303
|
+
{ value: 'env', label: t('init.outputEnv') },
|
|
1304
|
+
{ value: 'ini', label: t('init.outputIni') },
|
|
1305
|
+
{ value: 'json', label: t('init.outputJson') },
|
|
1306
|
+
{ value: 'cancel', label: t('init.outputCancel') },
|
|
1307
|
+
],
|
|
1308
|
+
}), t);
|
|
1309
|
+
if (outputFormat === 'cancel')
|
|
1310
|
+
bail(t);
|
|
1311
|
+
let fileName;
|
|
1312
|
+
if (outputFormat === 'env') {
|
|
1313
|
+
fileName = '.env';
|
|
1314
|
+
}
|
|
1315
|
+
else if (outputFormat === 'ini') {
|
|
1316
|
+
fileName = 'aimeat.ini';
|
|
1317
|
+
}
|
|
1318
|
+
else {
|
|
1319
|
+
// Build smart name suggestions from node ID
|
|
1320
|
+
const nodeId = settings.AIMEAT_NODE_ID || 'aimeat';
|
|
1321
|
+
const nameOptions = [
|
|
1322
|
+
{ value: `${nodeId}.production.json`, label: `${nodeId}.production.json` },
|
|
1323
|
+
{ value: `${nodeId}.staging.json`, label: `${nodeId}.staging.json` },
|
|
1324
|
+
{ value: `${nodeId}.development.json`, label: `${nodeId}.development.json` },
|
|
1325
|
+
{ value: 'custom', label: t('init.jsonNameCustom') },
|
|
1326
|
+
];
|
|
1327
|
+
const jsonName = checkCancel(await p.select({
|
|
1328
|
+
message: t('init.jsonNamePrompt'),
|
|
1329
|
+
options: nameOptions,
|
|
1330
|
+
}), t);
|
|
1331
|
+
if (jsonName === 'custom') {
|
|
1332
|
+
fileName = checkCancel(await p.text({
|
|
1333
|
+
message: t('init.jsonNamePrompt'),
|
|
1334
|
+
placeholder: 'aimeat.config.json',
|
|
1335
|
+
defaultValue: 'aimeat.config.json',
|
|
1336
|
+
validate: val => {
|
|
1337
|
+
if (!val)
|
|
1338
|
+
return;
|
|
1339
|
+
if (!val.endsWith('.json'))
|
|
1340
|
+
return 'Must end with .json';
|
|
1341
|
+
},
|
|
1342
|
+
}), t);
|
|
1343
|
+
}
|
|
1344
|
+
else {
|
|
1345
|
+
fileName = jsonName;
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
const content = outputFormat === 'env'
|
|
1349
|
+
? generateEnvContent(settings)
|
|
1350
|
+
: outputFormat === 'ini'
|
|
1351
|
+
? generateIniContent(settings)
|
|
1352
|
+
: generateJsonContent(settings);
|
|
1353
|
+
// Handle existing file
|
|
1354
|
+
if (existsSync(fileName)) {
|
|
1355
|
+
const action = checkCancel(await p.select({
|
|
1356
|
+
message: t('init.existingFile', { file: fileName }),
|
|
1357
|
+
options: [
|
|
1358
|
+
{ value: 'merge', label: t('init.existingMerge') },
|
|
1359
|
+
{ value: 'overwrite', label: t('init.existingOverwrite') },
|
|
1360
|
+
{ value: 'cancel', label: t('init.existingCancel') },
|
|
1361
|
+
],
|
|
1362
|
+
}), t);
|
|
1363
|
+
if (action === 'cancel')
|
|
1364
|
+
bail(t);
|
|
1365
|
+
// Backup existing file before any modification
|
|
1366
|
+
const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
|
|
1367
|
+
const backupName = `${fileName}.backup.${timestamp}`;
|
|
1368
|
+
writeFileSync(backupName, readFileSync(fileName, 'utf-8'));
|
|
1369
|
+
p.log.info(t('init.backupCreated', { file: backupName }));
|
|
1370
|
+
if (action === 'merge' && outputFormat === 'env') {
|
|
1371
|
+
const existing = readFileSync(fileName, 'utf-8');
|
|
1372
|
+
const existingKeys = new Set(existing
|
|
1373
|
+
.split('\n')
|
|
1374
|
+
.filter(line => line.match(/^[A-Z_]+=/))
|
|
1375
|
+
.map(line => line.split('=')[0]));
|
|
1376
|
+
const newLines = [];
|
|
1377
|
+
for (const line of content.split('\n')) {
|
|
1378
|
+
const keyMatch = line.match(/^([A-Z_]+)=/);
|
|
1379
|
+
if (keyMatch && existingKeys.has(keyMatch[1]))
|
|
1380
|
+
continue;
|
|
1381
|
+
newLines.push(line);
|
|
1382
|
+
}
|
|
1383
|
+
const merged = existing.trimEnd() + '\n\n' + newLines.join('\n');
|
|
1384
|
+
writeFileSync(fileName, merged);
|
|
1385
|
+
}
|
|
1386
|
+
else if (action === 'merge' && outputFormat === 'ini') {
|
|
1387
|
+
const existing = ini.parse(readFileSync(fileName, 'utf-8'));
|
|
1388
|
+
const newCfg = ini.parse(content);
|
|
1389
|
+
// Deep merge sections
|
|
1390
|
+
for (const [section, values] of Object.entries(newCfg)) {
|
|
1391
|
+
if (typeof values === 'object' && values !== null) {
|
|
1392
|
+
existing[section] = { ...(existing[section] || {}), ...values };
|
|
1393
|
+
}
|
|
1394
|
+
else {
|
|
1395
|
+
existing[section] = values;
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
writeFileSync(fileName, '; AIMEAT Node Configuration (INI format)\n; Merged by aimeat init\n\n' + ini.stringify(existing));
|
|
1399
|
+
}
|
|
1400
|
+
else if (action === 'merge' && outputFormat === 'json') {
|
|
1401
|
+
const existing = JSON.parse(readFileSync(fileName, 'utf-8'));
|
|
1402
|
+
const newCfg = JSON.parse(content);
|
|
1403
|
+
const merged = { ...existing, ...newCfg };
|
|
1404
|
+
writeFileSync(fileName, JSON.stringify(merged, null, 2) + '\n');
|
|
1405
|
+
}
|
|
1406
|
+
else {
|
|
1407
|
+
writeFileSync(fileName, content);
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
else {
|
|
1411
|
+
writeFileSync(fileName, content);
|
|
1412
|
+
}
|
|
1413
|
+
p.log.success(t('init.written', { file: fileName }));
|
|
1414
|
+
// ── Scaffold runtime files ──
|
|
1415
|
+
const shouldScaffold = checkCancel(await p.confirm({
|
|
1416
|
+
message: t('init.scaffoldPrompt'),
|
|
1417
|
+
initialValue: true,
|
|
1418
|
+
}), t);
|
|
1419
|
+
if (shouldScaffold) {
|
|
1420
|
+
const { scaffoldFiles: doScaffold, findPackageRoot } = await import('./scaffold.js');
|
|
1421
|
+
const pkgRoot = findPackageRoot(dirname(fileURLToPath(import.meta.url)));
|
|
1422
|
+
if (pkgRoot) {
|
|
1423
|
+
const pkgJsonPath = join(pkgRoot, 'package.json');
|
|
1424
|
+
const pkgVersion = existsSync(pkgJsonPath)
|
|
1425
|
+
? JSON.parse(readFileSync(pkgJsonPath, 'utf-8')).version
|
|
1426
|
+
: '0.0.0';
|
|
1427
|
+
const spinner = p.spinner();
|
|
1428
|
+
spinner.start(t('init.scaffoldCopying'));
|
|
1429
|
+
const scaffoldResult = doScaffold(pkgRoot, process.cwd(), pkgVersion);
|
|
1430
|
+
spinner.stop(t('init.scaffoldDone', {
|
|
1431
|
+
copied: String(scaffoldResult.copied),
|
|
1432
|
+
updated: String(scaffoldResult.updated),
|
|
1433
|
+
skipped: String(scaffoldResult.skippedModified),
|
|
1434
|
+
}));
|
|
1435
|
+
for (const file of scaffoldResult.modifiedFiles) {
|
|
1436
|
+
p.log.warn(t('init.scaffoldSkippedFile', { file }));
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
else {
|
|
1440
|
+
p.log.warn(t('init.scaffoldNoSource'));
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1443
|
+
// Offer to join federation if role is not standalone and genesis URL is set
|
|
1444
|
+
const fedRole = settings.AIMEAT_FEDERATION_ROLE;
|
|
1445
|
+
const genesisUrl = settings.AIMEAT_GENESIS_URL;
|
|
1446
|
+
if (fedRole && fedRole !== 'standalone' && genesisUrl) {
|
|
1447
|
+
const shouldJoin = checkCancel(await p.confirm({
|
|
1448
|
+
message: t('init.joinNow'),
|
|
1449
|
+
}), t);
|
|
1450
|
+
if (shouldJoin) {
|
|
1451
|
+
try {
|
|
1452
|
+
// Build a config reflecting the user's NEW settings (not the startup defaults)
|
|
1453
|
+
const port = settings.AIMEAT_PORT || String(config.port);
|
|
1454
|
+
const joinConfig = {
|
|
1455
|
+
...config,
|
|
1456
|
+
nodeId: settings.AIMEAT_NODE_ID || config.nodeId,
|
|
1457
|
+
baseUrl: settings.AIMEAT_BASE_URL || `http://localhost:${port}`,
|
|
1458
|
+
nodeType: settings.AIMEAT_NODE_TYPE || config.nodeType,
|
|
1459
|
+
federationRole: fedRole || config.federationRole,
|
|
1460
|
+
genesisUrl: genesisUrl || config.genesisUrl,
|
|
1461
|
+
};
|
|
1462
|
+
const { runFederationJoin } = await import('./federation-join.js');
|
|
1463
|
+
await runFederationJoin(joinConfig, genesisUrl, locale);
|
|
1464
|
+
}
|
|
1465
|
+
catch (e) {
|
|
1466
|
+
p.log.warn(t('init.joinFailed', {
|
|
1467
|
+
error: e instanceof Error ? e.message : String(e),
|
|
1468
|
+
}));
|
|
1469
|
+
p.log.info(t('init.joinRetryHint'));
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
const nextSteps = [
|
|
1474
|
+
t('init.nextStep1', { file: fileName }),
|
|
1475
|
+
];
|
|
1476
|
+
if (outputFormat === 'env') {
|
|
1477
|
+
nextSteps.push(t('init.nextStep2'));
|
|
1478
|
+
nextSteps.push(t('init.nextStep3'));
|
|
1479
|
+
}
|
|
1480
|
+
else if (outputFormat === 'ini') {
|
|
1481
|
+
nextSteps.push(t('init.nextStepIni', { file: fileName }));
|
|
1482
|
+
}
|
|
1483
|
+
else {
|
|
1484
|
+
nextSteps.push(t('init.nextStepJson', { file: fileName }));
|
|
1485
|
+
}
|
|
1486
|
+
p.note(nextSteps.join('\n'), t('init.nextSteps'));
|
|
1487
|
+
p.outro(t('init.done'));
|
|
1488
|
+
}
|
|
1489
|
+
//# sourceMappingURL=init-wizard.js.map
|