aimeat 1.14.3 → 1.15.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 +4 -0
- package/dist/locales/en.json +60 -5
- package/dist/locales/fi.json +60 -5
- package/dist/public/components/Markdown.js +229 -0
- package/dist/public/css/views/admin.css +12 -0
- package/dist/public/css/views/agents-detail.css +411 -2
- package/dist/public/js/services/agent-messages.js +4 -1
- package/dist/public/js/services/agent-tasks.js +5 -0
- package/dist/public/js/services/memory.js +7 -2
- package/dist/public/spa.html +5 -1
- package/dist/public/views/admin/config-tab.js +34 -6
- package/dist/public/views/agent-solo.js +123 -0
- package/dist/public/views/profile/agents/agent-card.js +97 -22
- package/dist/public/views/profile/agents/tab-data-access.js +295 -31
- package/dist/public/views/profile/agents/tab-directives.js +25 -15
- package/dist/public/views/profile/agents/tab-messages.js +90 -7
- package/dist/public/views/profile/agents/tab-readme.js +37 -0
- package/dist/public/views/profile/agents-messages-subtab.js +119 -6
- package/dist/public/views/profile/agents-tab.js +105 -16
- package/dist/public/views/profile/agents-task-builder.js +45 -157
- package/dist/public/views/profile/agents-tasks-subtab.js +280 -23
- package/dist/scripts/audit-mcp-schemas.d.ts +2 -0
- package/dist/scripts/audit-mcp-schemas.d.ts.map +1 -0
- package/dist/scripts/audit-mcp-schemas.js +211 -0
- package/dist/scripts/audit-mcp-schemas.js.map +1 -0
- package/dist/src/auth/middleware.d.ts +25 -0
- package/dist/src/auth/middleware.d.ts.map +1 -1
- package/dist/src/auth/middleware.js +35 -0
- package/dist/src/auth/middleware.js.map +1 -1
- package/dist/src/auth/node-keys.d.ts.map +1 -1
- package/dist/src/auth/node-keys.js +2 -0
- package/dist/src/auth/node-keys.js.map +1 -1
- package/dist/src/cli/connect/mcp/server.d.ts +1 -1
- package/dist/src/cli/connect/mcp/server.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/server.js +32 -4
- package/dist/src/cli/connect/mcp/server.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/agent-caps.d.ts +3 -0
- package/dist/src/cli/connect/mcp/tools/agent-caps.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/agent-caps.js +13 -4
- package/dist/src/cli/connect/mcp/tools/agent-caps.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/agent-management.d.ts +1 -0
- package/dist/src/cli/connect/mcp/tools/agent-management.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/agent-management.js +3 -2
- package/dist/src/cli/connect/mcp/tools/agent-management.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/agent-messages.d.ts +4 -0
- package/dist/src/cli/connect/mcp/tools/agent-messages.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/agent-messages.js +30 -9
- package/dist/src/cli/connect/mcp/tools/agent-messages.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/agent-tasks.d.ts +4 -0
- package/dist/src/cli/connect/mcp/tools/agent-tasks.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/agent-tasks.js +48 -26
- package/dist/src/cli/connect/mcp/tools/agent-tasks.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/agent-telemetry.d.ts +1 -0
- package/dist/src/cli/connect/mcp/tools/agent-telemetry.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/agent-telemetry.js +2 -1
- package/dist/src/cli/connect/mcp/tools/agent-telemetry.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/apps.d.ts +1 -0
- package/dist/src/cli/connect/mcp/tools/apps.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/apps.js +6 -5
- package/dist/src/cli/connect/mcp/tools/apps.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/boards.d.ts +3 -0
- package/dist/src/cli/connect/mcp/tools/boards.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/boards.js +33 -13
- package/dist/src/cli/connect/mcp/tools/boards.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/capabilities.d.ts +5 -0
- package/dist/src/cli/connect/mcp/tools/capabilities.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/capabilities.js +87 -26
- package/dist/src/cli/connect/mcp/tools/capabilities.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/catalogue.d.ts +3 -0
- package/dist/src/cli/connect/mcp/tools/catalogue.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/catalogue.js +22 -9
- package/dist/src/cli/connect/mcp/tools/catalogue.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/consent.d.ts +4 -0
- package/dist/src/cli/connect/mcp/tools/consent.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/consent.js +16 -13
- package/dist/src/cli/connect/mcp/tools/consent.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/core.d.ts +6 -0
- package/dist/src/cli/connect/mcp/tools/core.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/core.js +106 -52
- package/dist/src/cli/connect/mcp/tools/core.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/cortex.d.ts +3 -0
- package/dist/src/cli/connect/mcp/tools/cortex.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/cortex.js +13 -9
- package/dist/src/cli/connect/mcp/tools/cortex.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/extensions.d.ts +4 -0
- package/dist/src/cli/connect/mcp/tools/extensions.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/extensions.js +23 -14
- package/dist/src/cli/connect/mcp/tools/extensions.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/flags.d.ts +3 -0
- package/dist/src/cli/connect/mcp/tools/flags.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/flags.js +9 -3
- package/dist/src/cli/connect/mcp/tools/flags.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/groups.d.ts +4 -0
- package/dist/src/cli/connect/mcp/tools/groups.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/groups.js +29 -19
- package/dist/src/cli/connect/mcp/tools/groups.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/handbook.d.ts +2 -0
- package/dist/src/cli/connect/mcp/tools/handbook.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/handbook.js +9 -5
- package/dist/src/cli/connect/mcp/tools/handbook.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/instances.d.ts +4 -0
- package/dist/src/cli/connect/mcp/tools/instances.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/instances.js +7 -6
- package/dist/src/cli/connect/mcp/tools/instances.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/knowledge.d.ts +3 -0
- package/dist/src/cli/connect/mcp/tools/knowledge.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/knowledge.js +16 -13
- package/dist/src/cli/connect/mcp/tools/knowledge.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/memory-ext.d.ts +1 -0
- package/dist/src/cli/connect/mcp/tools/memory-ext.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/memory-ext.js +2 -1
- package/dist/src/cli/connect/mcp/tools/memory-ext.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/onboarding.d.ts +1 -0
- package/dist/src/cli/connect/mcp/tools/onboarding.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/onboarding.js +6 -5
- package/dist/src/cli/connect/mcp/tools/onboarding.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/organisms.d.ts +3 -0
- package/dist/src/cli/connect/mcp/tools/organisms.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/organisms.js +30 -17
- package/dist/src/cli/connect/mcp/tools/organisms.js.map +1 -1
- package/dist/src/cli/connect/mcp/tools/wallet-ext.d.ts +1 -0
- package/dist/src/cli/connect/mcp/tools/wallet-ext.d.ts.map +1 -1
- package/dist/src/cli/connect/mcp/tools/wallet-ext.js +2 -1
- package/dist/src/cli/connect/mcp/tools/wallet-ext.js.map +1 -1
- package/dist/src/cli/connect/status.d.ts.map +1 -1
- package/dist/src/cli/connect/status.js +22 -2
- package/dist/src/cli/connect/status.js.map +1 -1
- package/dist/src/cli/connect/tool-call.d.ts.map +1 -1
- package/dist/src/cli/connect/tool-call.js +13 -2
- package/dist/src/cli/connect/tool-call.js.map +1 -1
- package/dist/src/config.d.ts +2 -0
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js +5 -0
- package/dist/src/config.js.map +1 -1
- package/dist/src/generated/api-types.d.ts +22571 -0
- package/dist/src/generated/api-types.d.ts.map +1 -0
- package/dist/src/generated/api-types.js +6 -0
- package/dist/src/generated/api-types.js.map +1 -0
- package/dist/src/index.js +27 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/mcp/agent-capabilities.d.ts +1 -0
- package/dist/src/mcp/agent-capabilities.d.ts.map +1 -1
- package/dist/src/mcp/agent-capabilities.js +4 -2
- package/dist/src/mcp/agent-capabilities.js.map +1 -1
- package/dist/src/mcp/agent-management.d.ts +1 -0
- package/dist/src/mcp/agent-management.d.ts.map +1 -1
- package/dist/src/mcp/agent-management.js +4 -2
- package/dist/src/mcp/agent-management.js.map +1 -1
- package/dist/src/mcp/agent-messages.d.ts +3 -0
- package/dist/src/mcp/agent-messages.d.ts.map +1 -1
- package/dist/src/mcp/agent-messages.js +37 -2
- package/dist/src/mcp/agent-messages.js.map +1 -1
- package/dist/src/mcp/agent-onboarding.d.ts +1 -0
- package/dist/src/mcp/agent-onboarding.d.ts.map +1 -1
- package/dist/src/mcp/agent-onboarding.js +23 -8
- package/dist/src/mcp/agent-onboarding.js.map +1 -1
- package/dist/src/mcp/agent-tasks.d.ts +1 -0
- package/dist/src/mcp/agent-tasks.d.ts.map +1 -1
- package/dist/src/mcp/agent-tasks.js +34 -19
- package/dist/src/mcp/agent-tasks.js.map +1 -1
- package/dist/src/mcp/agent-telemetry.d.ts +1 -0
- package/dist/src/mcp/agent-telemetry.d.ts.map +1 -1
- package/dist/src/mcp/agent-telemetry.js +3 -1
- package/dist/src/mcp/agent-telemetry.js.map +1 -1
- package/dist/src/mcp/annotations.d.ts.map +1 -1
- package/dist/src/mcp/annotations.js +2 -0
- package/dist/src/mcp/annotations.js.map +1 -1
- package/dist/src/mcp/apps.d.ts +1 -0
- package/dist/src/mcp/apps.d.ts.map +1 -1
- package/dist/src/mcp/apps.js +7 -7
- package/dist/src/mcp/apps.js.map +1 -1
- package/dist/src/mcp/boards.d.ts +1 -0
- package/dist/src/mcp/boards.d.ts.map +1 -1
- package/dist/src/mcp/boards.js +9 -7
- package/dist/src/mcp/boards.js.map +1 -1
- package/dist/src/mcp/capabilities.d.ts +1 -0
- package/dist/src/mcp/capabilities.d.ts.map +1 -1
- package/dist/src/mcp/capabilities.js +8 -7
- package/dist/src/mcp/capabilities.js.map +1 -1
- package/dist/src/mcp/catalog/definitions.d.ts +22 -0
- package/dist/src/mcp/catalog/definitions.d.ts.map +1 -1
- package/dist/src/mcp/catalog/definitions.js +285 -156
- package/dist/src/mcp/catalog/definitions.js.map +1 -1
- package/dist/src/mcp/catalog/output-schemas.d.ts +56 -0
- package/dist/src/mcp/catalog/output-schemas.d.ts.map +1 -0
- package/dist/src/mcp/catalog/output-schemas.js +58 -0
- package/dist/src/mcp/catalog/output-schemas.js.map +1 -0
- package/dist/src/mcp/catalog/scopes.d.ts +46 -0
- package/dist/src/mcp/catalog/scopes.d.ts.map +1 -0
- package/dist/src/mcp/catalog/scopes.js +96 -0
- package/dist/src/mcp/catalog/scopes.js.map +1 -0
- package/dist/src/mcp/catalog/shape.d.ts +88 -0
- package/dist/src/mcp/catalog/shape.d.ts.map +1 -0
- package/dist/src/mcp/catalog/shape.js +150 -0
- package/dist/src/mcp/catalog/shape.js.map +1 -0
- package/dist/src/mcp/catalog/surfaces.d.ts +23 -0
- package/dist/src/mcp/catalog/surfaces.d.ts.map +1 -0
- package/dist/src/mcp/catalog/surfaces.js +127 -0
- package/dist/src/mcp/catalog/surfaces.js.map +1 -0
- package/dist/src/mcp/catalogue.d.ts +1 -0
- package/dist/src/mcp/catalogue.d.ts.map +1 -1
- package/dist/src/mcp/catalogue.js +5 -3
- package/dist/src/mcp/catalogue.js.map +1 -1
- package/dist/src/mcp/chat-instances.d.ts +1 -0
- package/dist/src/mcp/chat-instances.d.ts.map +1 -1
- package/dist/src/mcp/chat-instances.js +5 -3
- package/dist/src/mcp/chat-instances.js.map +1 -1
- package/dist/src/mcp/consent.d.ts +1 -0
- package/dist/src/mcp/consent.d.ts.map +1 -1
- package/dist/src/mcp/consent.js +5 -3
- package/dist/src/mcp/consent.js.map +1 -1
- package/dist/src/mcp/core.d.ts +12 -0
- package/dist/src/mcp/core.d.ts.map +1 -1
- package/dist/src/mcp/core.js +179 -153
- package/dist/src/mcp/core.js.map +1 -1
- package/dist/src/mcp/cortex.d.ts +1 -0
- package/dist/src/mcp/cortex.d.ts.map +1 -1
- package/dist/src/mcp/cortex.js +7 -7
- package/dist/src/mcp/cortex.js.map +1 -1
- package/dist/src/mcp/extensions.d.ts +1 -0
- package/dist/src/mcp/extensions.d.ts.map +1 -1
- package/dist/src/mcp/extensions.js +9 -9
- package/dist/src/mcp/extensions.js.map +1 -1
- package/dist/src/mcp/flags.d.ts +1 -0
- package/dist/src/mcp/flags.d.ts.map +1 -1
- package/dist/src/mcp/flags.js +3 -1
- package/dist/src/mcp/flags.js.map +1 -1
- package/dist/src/mcp/index.d.ts +5 -0
- package/dist/src/mcp/index.d.ts.map +1 -1
- package/dist/src/mcp/index.js +77 -10
- package/dist/src/mcp/index.js.map +1 -1
- package/dist/src/mcp/knowledge.d.ts +1 -0
- package/dist/src/mcp/knowledge.d.ts.map +1 -1
- package/dist/src/mcp/knowledge.js +6 -4
- package/dist/src/mcp/knowledge.js.map +1 -1
- package/dist/src/mcp/memory-extended.d.ts +1 -0
- package/dist/src/mcp/memory-extended.d.ts.map +1 -1
- package/dist/src/mcp/memory-extended.js +4 -2
- package/dist/src/mcp/memory-extended.js.map +1 -1
- package/dist/src/mcp/organisms.d.ts +1 -0
- package/dist/src/mcp/organisms.d.ts.map +1 -1
- package/dist/src/mcp/organisms.js +7 -5
- package/dist/src/mcp/organisms.js.map +1 -1
- package/dist/src/mcp/prompts.d.ts +3 -0
- package/dist/src/mcp/prompts.d.ts.map +1 -1
- package/dist/src/mcp/prompts.js +17 -6
- package/dist/src/mcp/prompts.js.map +1 -1
- package/dist/src/mcp/sharing-groups.d.ts +1 -0
- package/dist/src/mcp/sharing-groups.d.ts.map +1 -1
- package/dist/src/mcp/sharing-groups.js +7 -5
- package/dist/src/mcp/sharing-groups.js.map +1 -1
- package/dist/src/mcp/wallet-extended.d.ts +1 -0
- package/dist/src/mcp/wallet-extended.d.ts.map +1 -1
- package/dist/src/mcp/wallet-extended.js +3 -1
- package/dist/src/mcp/wallet-extended.js.map +1 -1
- package/dist/src/models/agent-message-schemas.d.ts +25 -0
- package/dist/src/models/agent-message-schemas.d.ts.map +1 -1
- package/dist/src/models/agent-message-schemas.js +23 -0
- package/dist/src/models/agent-message-schemas.js.map +1 -1
- package/dist/src/models/agent-task-schemas.d.ts +9 -0
- package/dist/src/models/agent-task-schemas.d.ts.map +1 -1
- package/dist/src/models/agent-task-schemas.js +17 -6
- package/dist/src/models/agent-task-schemas.js.map +1 -1
- package/dist/src/models/schemas.d.ts +1 -0
- package/dist/src/models/schemas.d.ts.map +1 -1
- package/dist/src/models/schemas.js +3 -0
- package/dist/src/models/schemas.js.map +1 -1
- package/dist/src/routes/agent-directives.d.ts +5 -0
- package/dist/src/routes/agent-directives.d.ts.map +1 -1
- package/dist/src/routes/agent-directives.js +35 -16
- package/dist/src/routes/agent-directives.js.map +1 -1
- package/dist/src/routes/agent-messages.d.ts.map +1 -1
- package/dist/src/routes/agent-messages.js +12 -0
- package/dist/src/routes/agent-messages.js.map +1 -1
- package/dist/src/routes/agent-onboarding.d.ts.map +1 -1
- package/dist/src/routes/agent-onboarding.js +3 -2
- package/dist/src/routes/agent-onboarding.js.map +1 -1
- package/dist/src/routes/agent-tasks.d.ts.map +1 -1
- package/dist/src/routes/agent-tasks.js +264 -10
- package/dist/src/routes/agent-tasks.js.map +1 -1
- package/dist/src/routes/bootstrap.d.ts +2 -0
- package/dist/src/routes/bootstrap.d.ts.map +1 -1
- package/dist/src/routes/bootstrap.js +11 -3
- package/dist/src/routes/bootstrap.js.map +1 -1
- package/dist/src/routes/memory.d.ts.map +1 -1
- package/dist/src/routes/memory.js +41 -6
- package/dist/src/routes/memory.js.map +1 -1
- package/dist/src/routes/prompts.d.ts +1 -0
- package/dist/src/routes/prompts.d.ts.map +1 -1
- package/dist/src/routes/prompts.js +30 -2
- package/dist/src/routes/prompts.js.map +1 -1
- package/dist/src/routes/sse.d.ts +13 -0
- package/dist/src/routes/sse.d.ts.map +1 -1
- package/dist/src/routes/sse.js +20 -0
- package/dist/src/routes/sse.js.map +1 -1
- package/dist/src/routes/storage-files.d.ts +14 -0
- package/dist/src/routes/storage-files.d.ts.map +1 -1
- package/dist/src/routes/storage-files.js +88 -0
- package/dist/src/routes/storage-files.js.map +1 -1
- package/dist/src/server.d.ts.map +1 -1
- package/dist/src/server.js +14 -2
- package/dist/src/server.js.map +1 -1
- package/dist/src/services/download-token.d.ts +41 -0
- package/dist/src/services/download-token.d.ts.map +1 -0
- package/dist/src/services/download-token.js +74 -0
- package/dist/src/services/download-token.js.map +1 -0
- package/dist/src/services/handbooks/admin.d.ts +10 -0
- package/dist/src/services/handbooks/admin.d.ts.map +1 -0
- package/dist/src/services/handbooks/admin.js +45 -0
- package/dist/src/services/handbooks/admin.js.map +1 -0
- package/dist/src/services/handbooks/agent.d.ts +11 -0
- package/dist/src/services/handbooks/agent.d.ts.map +1 -0
- package/dist/src/services/handbooks/agent.js +66 -0
- package/dist/src/services/handbooks/agent.js.map +1 -0
- package/dist/src/services/handbooks/appdev.d.ts +9 -0
- package/dist/src/services/handbooks/appdev.d.ts.map +1 -0
- package/dist/src/services/handbooks/appdev.js +52 -0
- package/dist/src/services/handbooks/appdev.js.map +1 -0
- package/dist/src/services/handbooks/index.d.ts +14 -0
- package/dist/src/services/handbooks/index.d.ts.map +1 -0
- package/dist/src/services/handbooks/index.js +15 -0
- package/dist/src/services/handbooks/index.js.map +1 -0
- package/dist/src/services/handbooks/service.d.ts +9 -0
- package/dist/src/services/handbooks/service.d.ts.map +1 -0
- package/dist/src/services/handbooks/service.js +50 -0
- package/dist/src/services/handbooks/service.js.map +1 -0
- package/dist/src/services/prompt-defaults.d.ts.map +1 -1
- package/dist/src/services/prompt-defaults.js +10 -7
- package/dist/src/services/prompt-defaults.js.map +1 -1
- package/dist/src/services/skill-bundle/generic-adapter.d.ts.map +1 -1
- package/dist/src/services/skill-bundle/generic-adapter.js +17 -3
- package/dist/src/services/skill-bundle/generic-adapter.js.map +1 -1
- package/dist/src/services/skill-bundle/hermes-adapter.d.ts.map +1 -1
- package/dist/src/services/skill-bundle/hermes-adapter.js +7 -3
- package/dist/src/services/skill-bundle/hermes-adapter.js.map +1 -1
- package/dist/src/storage/interface.d.ts +15 -3
- package/dist/src/storage/interface.d.ts.map +1 -1
- package/dist/src/storage/providers/mongodb/index.d.ts.map +1 -1
- package/dist/src/storage/providers/mongodb/index.js +3 -0
- package/dist/src/storage/providers/mongodb/index.js.map +1 -1
- package/dist/src/storage/providers/sqlite/repos/agent-task.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/repos/agent-task.js +6 -4
- package/dist/src/storage/providers/sqlite/repos/agent-task.js.map +1 -1
- package/dist/src/storage/providers/sqlite/schema.d.ts.map +1 -1
- package/dist/src/storage/providers/sqlite/schema.js +4 -1
- package/dist/src/storage/providers/sqlite/schema.js.map +1 -1
- package/package.json +4 -2
- package/prisma/schema.prisma +1 -0
package/dist/.env.example
CHANGED
|
@@ -306,6 +306,10 @@ AIMEAT_STATS_ACCESS=public # public | authenticated | operator
|
|
|
306
306
|
# ── Scoped Agent Capabilities (REQ-006) ───────────────────────
|
|
307
307
|
# AIMEAT_DEFAULT_AGENT_SCOPES="memory:read,memory:write,catalogue:read"
|
|
308
308
|
# AIMEAT_MAX_AGENT_SCOPES="*"
|
|
309
|
+
# Enforce per-agent scopes on the /v1/mcp tool surface (mirrors REST requireScope gates).
|
|
310
|
+
# Default true. Set false for a warn-only rollout: all tools stay registered, but tools that
|
|
311
|
+
# WOULD be filtered are logged so you can measure impact before enforcing.
|
|
312
|
+
# AIMEAT_MCP_ENFORCE_SCOPES=true
|
|
309
313
|
|
|
310
314
|
# ── Prometheus Metrics ─────────────────────────────────────
|
|
311
315
|
# Prometheus metrics endpoint (GET /v1/metrics)
|
package/dist/locales/en.json
CHANGED
|
@@ -324,6 +324,7 @@
|
|
|
324
324
|
"domainAgent": "Agent",
|
|
325
325
|
"domainCatalogue": "Catalogue",
|
|
326
326
|
"domainGenerator": "Generator",
|
|
327
|
+
"domainTask": "Tasks",
|
|
327
328
|
"permExecute": "Execute",
|
|
328
329
|
"permRead": "Read",
|
|
329
330
|
"permWrite": "Write",
|
|
@@ -393,6 +394,11 @@
|
|
|
393
394
|
"untagged": "Untagged",
|
|
394
395
|
"noMatches": "No agents match the current filter."
|
|
395
396
|
},
|
|
397
|
+
"reorderHint": "Drag to reorder",
|
|
398
|
+
"solo": {
|
|
399
|
+
"notFound": "Agent not found.",
|
|
400
|
+
"loginRequired": "Please log in to view this agent."
|
|
401
|
+
},
|
|
396
402
|
"approval": {
|
|
397
403
|
"credentials_ready_title": "Agent approved",
|
|
398
404
|
"credentials_ready_desc": "Copy the credentials below and paste them to your agent.",
|
|
@@ -416,8 +422,11 @@
|
|
|
416
422
|
"newTask": "New Task",
|
|
417
423
|
"createTask": "Create Task",
|
|
418
424
|
"cancel": "Cancel",
|
|
419
|
-
"titleLabel": "Title",
|
|
420
|
-
"
|
|
425
|
+
"titleLabel": "Title (optional)",
|
|
426
|
+
"titlePlaceholder": "Short label — leave blank to use the first line",
|
|
427
|
+
"descLabel": "What should the agent do?",
|
|
428
|
+
"descRequired": "Describe what the agent should do",
|
|
429
|
+
"taskCreated": "Task created and queued",
|
|
421
430
|
"statusLabel": "Status",
|
|
422
431
|
"draft": "Draft",
|
|
423
432
|
"queued": "Queued",
|
|
@@ -433,7 +442,7 @@
|
|
|
433
442
|
"completed": "Completed",
|
|
434
443
|
"lastEvent": "Last Event",
|
|
435
444
|
"delete": "Delete",
|
|
436
|
-
"deleteConfirm": "Delete this task
|
|
445
|
+
"deleteConfirm": "Delete this task",
|
|
437
446
|
"taskStarted": "Task started",
|
|
438
447
|
"taskDeleted": "Task deleted",
|
|
439
448
|
"startError": "Failed to start task",
|
|
@@ -446,6 +455,20 @@
|
|
|
446
455
|
"starting": "Starting...",
|
|
447
456
|
"startThisTask": "Start this task",
|
|
448
457
|
"noEventsRecorded": "No events recorded",
|
|
458
|
+
"deliverable": "Deliverable",
|
|
459
|
+
"viewDeliverable": "View",
|
|
460
|
+
"deliverableGone": "The deliverable entry no longer exists.",
|
|
461
|
+
"revision_requested": "Revision requested",
|
|
462
|
+
"requestChanges": "Request changes",
|
|
463
|
+
"requestChangesTitle": "Ask the agent to revise the plan",
|
|
464
|
+
"requestChangesHelp": "Tell the agent how the proposed TODO list should change. The current plan will move to the history below; the agent will read your message and propose a revised plan.",
|
|
465
|
+
"requestChangesPlaceholder": "e.g. Skip the second step and add a verification step at the end. Use the EU price list for the comparison.",
|
|
466
|
+
"requestChangesSend": "Send to agent",
|
|
467
|
+
"requestChangesSending": "Sending...",
|
|
468
|
+
"requestChangesSent": "Change request sent. Waiting for the agent to revise.",
|
|
469
|
+
"requestChangesError": "Failed to send change request",
|
|
470
|
+
"revisionWaiting": "Waiting for the agent to propose a revised plan.",
|
|
471
|
+
"outdatedTodos": "Previously proposed (outdated)",
|
|
449
472
|
"builder": {
|
|
450
473
|
"title": "New Task",
|
|
451
474
|
"placeholder": "What should the agent do? Describe in plain language or technical detail.",
|
|
@@ -569,7 +592,10 @@
|
|
|
569
592
|
"sendError": "Failed to send message",
|
|
570
593
|
"inboxLabel": "inbox",
|
|
571
594
|
"deliveredLabel": "delivered",
|
|
572
|
-
"errorsLabel": "errors"
|
|
595
|
+
"errorsLabel": "errors",
|
|
596
|
+
"promptOther": "Other...",
|
|
597
|
+
"promptOtherHint": "Type your answer below and send it.",
|
|
598
|
+
"promptOtherPlaceholder": "Type your own answer..."
|
|
573
599
|
},
|
|
574
600
|
"webhook": {
|
|
575
601
|
"title": "Webhook",
|
|
@@ -615,6 +641,7 @@
|
|
|
615
641
|
},
|
|
616
642
|
"detail": {
|
|
617
643
|
"tabs": {
|
|
644
|
+
"readme": "README",
|
|
618
645
|
"integration": "Integration",
|
|
619
646
|
"tasks": "Tasks",
|
|
620
647
|
"messages": "Messages",
|
|
@@ -636,6 +663,7 @@
|
|
|
636
663
|
},
|
|
637
664
|
"sharedTags": "Shared tags",
|
|
638
665
|
"lastSeen": "Last seen",
|
|
666
|
+
"popOut": "Open in its own window",
|
|
639
667
|
"deliveryMcp": "MCP notifications",
|
|
640
668
|
"deliveryWebhook": "Webhook",
|
|
641
669
|
"deliveryPolling": "Polling",
|
|
@@ -761,7 +789,32 @@
|
|
|
761
789
|
"addAreaError": "Failed to add memory area",
|
|
762
790
|
"linkPackageError": "Failed to link knowledge package",
|
|
763
791
|
"packageNamePlaceholder": "Package name or URL",
|
|
764
|
-
"packageDescPlaceholder": "Description"
|
|
792
|
+
"packageDescPlaceholder": "Description",
|
|
793
|
+
"edit": "Edit",
|
|
794
|
+
"saving": "Saving...",
|
|
795
|
+
"valueSaved": "Value saved",
|
|
796
|
+
"saveValueError": "Failed to save value",
|
|
797
|
+
"confirmDeleteKey": "Delete memory key \"{key}\"? This cannot be undone.",
|
|
798
|
+
"keyDeleted": "Memory key deleted",
|
|
799
|
+
"deleteKeyError": "Failed to delete memory key",
|
|
800
|
+
"areaUpdated": "Memory area updated",
|
|
801
|
+
"updateAreaError": "Failed to update memory area",
|
|
802
|
+
"areaRemoved": "Memory area removed",
|
|
803
|
+
"removeAreaError": "Failed to remove memory area",
|
|
804
|
+
"confirmDeleteArea": "Remove this memory area from the agent?",
|
|
805
|
+
"addKey": "Add key",
|
|
806
|
+
"keyNamePlaceholder": "Key (e.g., agents.myagent.notes)",
|
|
807
|
+
"keyValuePlaceholder": "Value — plain text or JSON",
|
|
808
|
+
"noKeys": "No memory keys stored yet",
|
|
809
|
+
"keyCreated": "Memory key created",
|
|
810
|
+
"createKeyError": "Failed to create memory key",
|
|
811
|
+
"created": "Created",
|
|
812
|
+
"updated": "Updated",
|
|
813
|
+
"sortBy": "Sort",
|
|
814
|
+
"sortUpdated": "Last updated",
|
|
815
|
+
"sortCreated": "Created",
|
|
816
|
+
"sortNewestFirst": "Newest first",
|
|
817
|
+
"sortOldestFirst": "Oldest first"
|
|
765
818
|
},
|
|
766
819
|
"agent_config": {
|
|
767
820
|
"copy": "Copy",
|
|
@@ -820,6 +873,7 @@
|
|
|
820
873
|
"rules": "Rules"
|
|
821
874
|
},
|
|
822
875
|
"empty": {
|
|
876
|
+
"readme": "No README published",
|
|
823
877
|
"tasks": "No tasks yet. Create a task to give this agent work.",
|
|
824
878
|
"messages": "No messages yet. Send a message or use a command.",
|
|
825
879
|
"data_access": "No data access configured. Use the buttons below to add tags, memory areas, or knowledge packages.",
|
|
@@ -3100,6 +3154,7 @@
|
|
|
3100
3154
|
"cfgReadOnlyHelpDetail": "Config persistence requires a database (MongoDB or SQLite). In-memory nodes lose all changes on restart. Configure this node via .env file, aimeat.ini, aimeat.json, or CLI arguments (aimeat start --db sqlite).",
|
|
3101
3155
|
"cfgHelpTitle": "Help",
|
|
3102
3156
|
"cfgReset": "Reset",
|
|
3157
|
+
"cfgOnePerLine": "One entry per line",
|
|
3103
3158
|
"cfgResetDone": "Reset {path} — DB override removed.",
|
|
3104
3159
|
"cfgSource": "Source",
|
|
3105
3160
|
"consul": "Consul",
|
package/dist/locales/fi.json
CHANGED
|
@@ -324,6 +324,7 @@
|
|
|
324
324
|
"domainAgent": "Agentti",
|
|
325
325
|
"domainCatalogue": "Hakemisto",
|
|
326
326
|
"domainGenerator": "Generaattori",
|
|
327
|
+
"domainTask": "Tehtävät",
|
|
327
328
|
"permExecute": "Suoritus",
|
|
328
329
|
"permRead": "Luku",
|
|
329
330
|
"permWrite": "Kirjoitus",
|
|
@@ -393,6 +394,11 @@
|
|
|
393
394
|
"untagged": "Ei tageja",
|
|
394
395
|
"noMatches": "Yksikään agentti ei vastaa nykyistä suodatinta."
|
|
395
396
|
},
|
|
397
|
+
"reorderHint": "Raahaa järjestääksesi",
|
|
398
|
+
"solo": {
|
|
399
|
+
"notFound": "Agenttia ei löytynyt.",
|
|
400
|
+
"loginRequired": "Kirjaudu sisään nähdäksesi tämän agentin."
|
|
401
|
+
},
|
|
396
402
|
"approval": {
|
|
397
403
|
"credentials_ready_title": "Agentti hyväksytty",
|
|
398
404
|
"credentials_ready_desc": "Kopioi alla olevat tunnistetiedot ja liitä ne agentillesi.",
|
|
@@ -416,8 +422,11 @@
|
|
|
416
422
|
"newTask": "Uusi tehtävä",
|
|
417
423
|
"createTask": "Luo tehtävä",
|
|
418
424
|
"cancel": "Peruuta",
|
|
419
|
-
"titleLabel": "Otsikko",
|
|
420
|
-
"
|
|
425
|
+
"titleLabel": "Otsikko (valinnainen)",
|
|
426
|
+
"titlePlaceholder": "Lyhyt nimi — jätä tyhjäksi käyttääksesi ensimmäistä riviä",
|
|
427
|
+
"descLabel": "Mitä agentin pitäisi tehdä?",
|
|
428
|
+
"descRequired": "Kuvaile mitä agentin pitäisi tehdä",
|
|
429
|
+
"taskCreated": "Tehtävä luotu ja lisätty jonoon",
|
|
421
430
|
"statusLabel": "Tila",
|
|
422
431
|
"draft": "Luonnos",
|
|
423
432
|
"queued": "Jonossa",
|
|
@@ -433,7 +442,7 @@
|
|
|
433
442
|
"completed": "Valmistunut",
|
|
434
443
|
"lastEvent": "Viimeisin tapahtuma",
|
|
435
444
|
"delete": "Poista",
|
|
436
|
-
"deleteConfirm": "Poista tämä
|
|
445
|
+
"deleteConfirm": "Poista tämä tehtävä",
|
|
437
446
|
"taskStarted": "Tehtävä aloitettu",
|
|
438
447
|
"taskDeleted": "Tehtävä poistettu",
|
|
439
448
|
"startError": "Tehtävän aloitus epäonnistui",
|
|
@@ -446,6 +455,20 @@
|
|
|
446
455
|
"starting": "Käynnistetään...",
|
|
447
456
|
"startThisTask": "Käynnistä tehtävä",
|
|
448
457
|
"noEventsRecorded": "Ei tallennettuja tapahtumia",
|
|
458
|
+
"deliverable": "Tuotos",
|
|
459
|
+
"viewDeliverable": "Näytä",
|
|
460
|
+
"deliverableGone": "Tuotosmerkintää ei ole enää olemassa.",
|
|
461
|
+
"revision_requested": "Korjauspyyntö lähetetty",
|
|
462
|
+
"requestChanges": "Pyydä muutoksia",
|
|
463
|
+
"requestChangesTitle": "Pyydä agenttia muokkaamaan suunnitelmaa",
|
|
464
|
+
"requestChangesHelp": "Kerro agentille miten ehdotettua TODO-listaa pitäisi muuttaa. Nykyinen suunnitelma siirtyy historiaan alle; agentti lukee viestisi ja ehdottaa korjattua suunnitelmaa.",
|
|
465
|
+
"requestChangesPlaceholder": "esim. Ohita toinen vaihe ja lisää tarkistusvaihe loppuun. Käytä EU:n hintatietoja vertailussa.",
|
|
466
|
+
"requestChangesSend": "Lähetä agentille",
|
|
467
|
+
"requestChangesSending": "Lähetetään...",
|
|
468
|
+
"requestChangesSent": "Muutospyyntö lähetetty. Odotetaan agentin uutta ehdotusta.",
|
|
469
|
+
"requestChangesError": "Muutospyynnön lähetys epäonnistui",
|
|
470
|
+
"revisionWaiting": "Odotetaan agentin korjattua ehdotusta.",
|
|
471
|
+
"outdatedTodos": "Aiemmin ehdotetut (vanhentuneet)",
|
|
449
472
|
"builder": {
|
|
450
473
|
"title": "Uusi tehtävä",
|
|
451
474
|
"placeholder": "Mitä agentin pitäisi tehdä? Kuvaile selkokielellä tai teknisesti.",
|
|
@@ -569,7 +592,10 @@
|
|
|
569
592
|
"sendError": "Viestin lähetys epäonnistui",
|
|
570
593
|
"inboxLabel": "saapuneet",
|
|
571
594
|
"deliveredLabel": "toimitettu",
|
|
572
|
-
"errorsLabel": "virheet"
|
|
595
|
+
"errorsLabel": "virheet",
|
|
596
|
+
"promptOther": "Muu...",
|
|
597
|
+
"promptOtherHint": "Kirjoita vastauksesi alle ja lähetä se.",
|
|
598
|
+
"promptOtherPlaceholder": "Kirjoita oma vastauksesi..."
|
|
573
599
|
},
|
|
574
600
|
"webhook": {
|
|
575
601
|
"title": "Webhook",
|
|
@@ -615,6 +641,7 @@
|
|
|
615
641
|
},
|
|
616
642
|
"detail": {
|
|
617
643
|
"tabs": {
|
|
644
|
+
"readme": "README",
|
|
618
645
|
"integration": "Integraatio",
|
|
619
646
|
"tasks": "Tehtävät",
|
|
620
647
|
"messages": "Viestit",
|
|
@@ -636,6 +663,7 @@
|
|
|
636
663
|
},
|
|
637
664
|
"sharedTags": "Jaetut tunnisteet",
|
|
638
665
|
"lastSeen": "Viimeksi nähty",
|
|
666
|
+
"popOut": "Avaa omaan ikkunaan",
|
|
639
667
|
"deliveryMcp": "MCP-ilmoitukset",
|
|
640
668
|
"deliveryWebhook": "Webhook",
|
|
641
669
|
"deliveryPolling": "Pollaus",
|
|
@@ -761,7 +789,32 @@
|
|
|
761
789
|
"addAreaError": "Muistialueen lisäys epäonnistui",
|
|
762
790
|
"linkPackageError": "Tietopaketin linkitys epäonnistui",
|
|
763
791
|
"packageNamePlaceholder": "Paketin nimi tai URL",
|
|
764
|
-
"packageDescPlaceholder": "Kuvaus"
|
|
792
|
+
"packageDescPlaceholder": "Kuvaus",
|
|
793
|
+
"edit": "Muokkaa",
|
|
794
|
+
"saving": "Tallennetaan...",
|
|
795
|
+
"valueSaved": "Arvo tallennettu",
|
|
796
|
+
"saveValueError": "Arvon tallennus epäonnistui",
|
|
797
|
+
"confirmDeleteKey": "Poistetaanko muistiavain \"{key}\"? Tätä ei voi perua.",
|
|
798
|
+
"keyDeleted": "Muistiavain poistettu",
|
|
799
|
+
"deleteKeyError": "Muistiavaimen poisto epäonnistui",
|
|
800
|
+
"areaUpdated": "Muistialue päivitetty",
|
|
801
|
+
"updateAreaError": "Muistialueen päivitys epäonnistui",
|
|
802
|
+
"areaRemoved": "Muistialue poistettu",
|
|
803
|
+
"removeAreaError": "Muistialueen poisto epäonnistui",
|
|
804
|
+
"confirmDeleteArea": "Poistetaanko tämä muistialue agentilta?",
|
|
805
|
+
"addKey": "Lisää avain",
|
|
806
|
+
"keyNamePlaceholder": "Avain (esim. agents.myagent.notes)",
|
|
807
|
+
"keyValuePlaceholder": "Arvo — pelkkä teksti tai JSON",
|
|
808
|
+
"noKeys": "Ei tallennettuja muistiavaimia vielä",
|
|
809
|
+
"keyCreated": "Muistiavain luotu",
|
|
810
|
+
"createKeyError": "Muistiavaimen luonti epäonnistui",
|
|
811
|
+
"created": "Luotu",
|
|
812
|
+
"updated": "Päivitetty",
|
|
813
|
+
"sortBy": "Järjestä",
|
|
814
|
+
"sortUpdated": "Viimeksi päivitetty",
|
|
815
|
+
"sortCreated": "Luotu",
|
|
816
|
+
"sortNewestFirst": "Uusin ensin",
|
|
817
|
+
"sortOldestFirst": "Vanhin ensin"
|
|
765
818
|
},
|
|
766
819
|
"agent_config": {
|
|
767
820
|
"copy": "Kopioi",
|
|
@@ -820,6 +873,7 @@
|
|
|
820
873
|
"rules": "Säännöt"
|
|
821
874
|
},
|
|
822
875
|
"empty": {
|
|
876
|
+
"readme": "Ei README:tä julkaistu",
|
|
823
877
|
"tasks": "Ei tehtäviä. Luo tehtävä antaaksesi agentille työtä.",
|
|
824
878
|
"messages": "Ei viestejä. Lähetä viesti tai käytä komentoa.",
|
|
825
879
|
"data_access": "Ei datayhteyksien asetuksia. Lisää tunnisteita, muistialueita tai tietopaketteja alla olevilla painikkeilla.",
|
|
@@ -3100,6 +3154,7 @@
|
|
|
3100
3154
|
"cfgReadOnlyHelpDetail": "Asetusten tallennus vaatii tietokannan (MongoDB tai SQLite). Muistinsisäiset solmut menettävät kaikki muutokset uudelleenkäynnistyksessä. Määritä tämä solmu .env-tiedoston, aimeat.ini:n, aimeat.json:n tai CLI-argumenttien kautta.",
|
|
3101
3155
|
"cfgHelpTitle": "Ohje",
|
|
3102
3156
|
"cfgReset": "Palauta",
|
|
3157
|
+
"cfgOnePerLine": "Yksi kohta per rivi",
|
|
3103
3158
|
"cfgResetDone": "Palautettu {path} — tietokantaohitus poistettu.",
|
|
3104
3159
|
"cfgSource": "Lähde",
|
|
3105
3160
|
"consul": "Consul",
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Markdown.js
|
|
3
|
+
* @description Minimal, safe GitHub-flavored-Markdown renderer for untrusted,
|
|
4
|
+
* agent-authored (often LLM-generated) content. Renders to Preact vnodes via
|
|
5
|
+
* `h` — never innerHTML — so there is no raw-HTML / <script> / <iframe> XSS
|
|
6
|
+
* surface at all (any literal HTML in the source is shown as plain text).
|
|
7
|
+
* Link hrefs are scheme-sanitized (only http/https/mailto pass; javascript:,
|
|
8
|
+
* data:, etc. are dropped to a non-navigable anchor). Fenced code blocks
|
|
9
|
+
* preserve whitespace exactly so ASCII-art logos keep their alignment.
|
|
10
|
+
*
|
|
11
|
+
* Supported GFM subset: headings (#..######), fenced code blocks (```),
|
|
12
|
+
* unordered/ordered lists, tables (pipe), blockquotes, paragraphs, and inline
|
|
13
|
+
* spans (code, bold, italic, links). This is presentation-only — never use
|
|
14
|
+
* rendered content for any trust or routing decision.
|
|
15
|
+
* @structure
|
|
16
|
+
* - Markdown ({ text }) -> vnode tree wrapped in a div.md-body
|
|
17
|
+
* - sanitizeHref(url) -> safe href or null
|
|
18
|
+
* @usage
|
|
19
|
+
* import { Markdown } from '/components/Markdown.js';
|
|
20
|
+
* html`<${Markdown} text=${someMarkdownString} />`
|
|
21
|
+
* @version-history
|
|
22
|
+
* v1.0.0 -- 2026-05-31 -- Initial creation for the agent README tab
|
|
23
|
+
*/
|
|
24
|
+
import { h } from 'preact';
|
|
25
|
+
|
|
26
|
+
// Only these schemes may appear in a rendered link. Everything else (javascript:,
|
|
27
|
+
// data:, vbscript:, file:, etc.) is dropped — the anchor renders without href.
|
|
28
|
+
const SAFE_SCHEME = /^(https?:|mailto:)/i;
|
|
29
|
+
|
|
30
|
+
export function sanitizeHref(url) {
|
|
31
|
+
if (typeof url !== 'string') return null;
|
|
32
|
+
const trimmed = url.trim();
|
|
33
|
+
// Relative links (no scheme) and fragment/anchor links are safe.
|
|
34
|
+
if (!/^[a-z][a-z0-9+.-]*:/i.test(trimmed)) return trimmed;
|
|
35
|
+
return SAFE_SCHEME.test(trimmed) ? trimmed : null;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// ── Inline parsing: code, bold, italic, links. Returns an array of vnodes/strings.
|
|
39
|
+
// Order matters: inline code is extracted first so markup inside it is literal.
|
|
40
|
+
function parseInline(text) {
|
|
41
|
+
const out = [];
|
|
42
|
+
let i = 0;
|
|
43
|
+
let buf = '';
|
|
44
|
+
const flush = () => { if (buf) { out.push(buf); buf = ''; } };
|
|
45
|
+
|
|
46
|
+
while (i < text.length) {
|
|
47
|
+
const c = text[i];
|
|
48
|
+
|
|
49
|
+
// Inline code `...` — contents are literal (no further parsing).
|
|
50
|
+
if (c === '`') {
|
|
51
|
+
const end = text.indexOf('`', i + 1);
|
|
52
|
+
if (end > i) {
|
|
53
|
+
flush();
|
|
54
|
+
out.push(h('code', { class: 'md-code' }, text.slice(i + 1, end)));
|
|
55
|
+
i = end + 1;
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Link [label](url)
|
|
61
|
+
if (c === '[') {
|
|
62
|
+
const close = text.indexOf(']', i + 1);
|
|
63
|
+
if (close > i && text[close + 1] === '(') {
|
|
64
|
+
const paren = text.indexOf(')', close + 2);
|
|
65
|
+
if (paren > close) {
|
|
66
|
+
const label = text.slice(i + 1, close);
|
|
67
|
+
const url = text.slice(close + 2, paren);
|
|
68
|
+
const href = sanitizeHref(url);
|
|
69
|
+
flush();
|
|
70
|
+
out.push(
|
|
71
|
+
href
|
|
72
|
+
? h('a', { href, target: '_blank', rel: 'noopener noreferrer nofollow' }, parseInline(label))
|
|
73
|
+
: h('span', null, parseInline(label)),
|
|
74
|
+
);
|
|
75
|
+
i = paren + 1;
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Bold **...**
|
|
82
|
+
if (c === '*' && text[i + 1] === '*') {
|
|
83
|
+
const end = text.indexOf('**', i + 2);
|
|
84
|
+
if (end > i) {
|
|
85
|
+
flush();
|
|
86
|
+
out.push(h('strong', null, parseInline(text.slice(i + 2, end))));
|
|
87
|
+
i = end + 2;
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Italic *...* (single asterisk, not part of **)
|
|
93
|
+
if (c === '*') {
|
|
94
|
+
const end = text.indexOf('*', i + 1);
|
|
95
|
+
if (end > i) {
|
|
96
|
+
flush();
|
|
97
|
+
out.push(h('em', null, parseInline(text.slice(i + 1, end))));
|
|
98
|
+
i = end + 1;
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
buf += c;
|
|
104
|
+
i++;
|
|
105
|
+
}
|
|
106
|
+
flush();
|
|
107
|
+
return out;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function parseTableRow(line) {
|
|
111
|
+
// Split on unescaped pipes, dropping the leading/trailing empties.
|
|
112
|
+
let cells = line.trim().split('|');
|
|
113
|
+
if (cells.length && cells[0] === '') cells = cells.slice(1);
|
|
114
|
+
if (cells.length && cells[cells.length - 1] === '') cells = cells.slice(0, -1);
|
|
115
|
+
return cells.map(c => c.trim());
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function isTableDivider(line) {
|
|
119
|
+
// e.g. | --- | :--: | ---: |
|
|
120
|
+
return /^\s*\|?\s*:?-{3,}:?\s*(\|\s*:?-{3,}:?\s*)*\|?\s*$/.test(line);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// ── Block parsing. Walks lines, emits block-level vnodes.
|
|
124
|
+
function parseBlocks(src) {
|
|
125
|
+
const lines = src.replace(/\r\n?/g, '\n').split('\n');
|
|
126
|
+
const blocks = [];
|
|
127
|
+
let i = 0;
|
|
128
|
+
|
|
129
|
+
while (i < lines.length) {
|
|
130
|
+
const line = lines[i];
|
|
131
|
+
|
|
132
|
+
// Blank line — skip.
|
|
133
|
+
if (line.trim() === '') { i++; continue; }
|
|
134
|
+
|
|
135
|
+
// Fenced code block ``` (preserve whitespace EXACTLY; no inline parsing).
|
|
136
|
+
const fence = line.match(/^\s*(`{3,}|~{3,})(.*)$/);
|
|
137
|
+
if (fence) {
|
|
138
|
+
const marker = fence[1][0];
|
|
139
|
+
const codeLines = [];
|
|
140
|
+
i++;
|
|
141
|
+
while (i < lines.length && !new RegExp('^\\s*' + marker + '{3,}\\s*$').test(lines[i])) {
|
|
142
|
+
codeLines.push(lines[i]);
|
|
143
|
+
i++;
|
|
144
|
+
}
|
|
145
|
+
i++; // consume closing fence (or EOF)
|
|
146
|
+
blocks.push(h('pre', { class: 'md-pre' }, h('code', { class: 'md-code' }, codeLines.join('\n'))));
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Heading
|
|
151
|
+
const heading = line.match(/^(#{1,6})\s+(.*)$/);
|
|
152
|
+
if (heading) {
|
|
153
|
+
const level = heading[1].length;
|
|
154
|
+
blocks.push(h('h' + level, null, parseInline(heading[2].trim())));
|
|
155
|
+
i++;
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// Blockquote (collect consecutive > lines)
|
|
160
|
+
if (/^\s*>/.test(line)) {
|
|
161
|
+
const quoted = [];
|
|
162
|
+
while (i < lines.length && /^\s*>/.test(lines[i])) {
|
|
163
|
+
quoted.push(lines[i].replace(/^\s*>\s?/, ''));
|
|
164
|
+
i++;
|
|
165
|
+
}
|
|
166
|
+
blocks.push(h('blockquote', null, parseBlocks(quoted.join('\n'))));
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Table: a header row followed by a divider row.
|
|
171
|
+
if (line.includes('|') && i + 1 < lines.length && isTableDivider(lines[i + 1])) {
|
|
172
|
+
const header = parseTableRow(line);
|
|
173
|
+
i += 2; // skip header + divider
|
|
174
|
+
const rows = [];
|
|
175
|
+
while (i < lines.length && lines[i].includes('|') && lines[i].trim() !== '') {
|
|
176
|
+
rows.push(parseTableRow(lines[i]));
|
|
177
|
+
i++;
|
|
178
|
+
}
|
|
179
|
+
blocks.push(h('table', null, [
|
|
180
|
+
h('thead', null, h('tr', null, header.map((c, ci) => h('th', { key: ci }, parseInline(c))))),
|
|
181
|
+
h('tbody', null, rows.map((r, ri) =>
|
|
182
|
+
h('tr', { key: ri }, r.map((c, ci) => h('td', { key: ci }, parseInline(c)))))),
|
|
183
|
+
]));
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// Lists (unordered - / * / +, or ordered 1.)
|
|
188
|
+
const ulMatch = line.match(/^(\s*)([-*+])\s+(.*)$/);
|
|
189
|
+
const olMatch = line.match(/^(\s*)(\d+)\.\s+(.*)$/);
|
|
190
|
+
if (ulMatch || olMatch) {
|
|
191
|
+
const ordered = !!olMatch;
|
|
192
|
+
const items = [];
|
|
193
|
+
while (i < lines.length) {
|
|
194
|
+
const m = lines[i].match(ordered ? /^(\s*)(\d+)\.\s+(.*)$/ : /^(\s*)([-*+])\s+(.*)$/);
|
|
195
|
+
if (!m) break;
|
|
196
|
+
items.push(h('li', { key: items.length }, parseInline(m[3])));
|
|
197
|
+
i++;
|
|
198
|
+
}
|
|
199
|
+
blocks.push(h(ordered ? 'ol' : 'ul', null, items));
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// Paragraph: collect consecutive non-blank, non-block lines.
|
|
204
|
+
const para = [];
|
|
205
|
+
while (
|
|
206
|
+
i < lines.length &&
|
|
207
|
+
lines[i].trim() !== '' &&
|
|
208
|
+
!/^\s*(`{3,}|~{3,})/.test(lines[i]) &&
|
|
209
|
+
!/^#{1,6}\s/.test(lines[i]) &&
|
|
210
|
+
!/^\s*>/.test(lines[i]) &&
|
|
211
|
+
!/^(\s*)([-*+])\s+/.test(lines[i]) &&
|
|
212
|
+
!/^(\s*)(\d+)\.\s+/.test(lines[i])
|
|
213
|
+
) {
|
|
214
|
+
para.push(lines[i]);
|
|
215
|
+
i++;
|
|
216
|
+
}
|
|
217
|
+
// Join wrapped lines with a space (standard markdown paragraph behavior).
|
|
218
|
+
blocks.push(h('p', null, parseInline(para.join(' '))));
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
return blocks;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export function Markdown({ text }) {
|
|
225
|
+
const src = typeof text === 'string' ? text : '';
|
|
226
|
+
return h('div', { class: 'md-body' }, parseBlocks(src));
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export default Markdown;
|
|
@@ -333,6 +333,18 @@
|
|
|
333
333
|
border: 1px solid #FDE68A;
|
|
334
334
|
border-radius: 8px;
|
|
335
335
|
}
|
|
336
|
+
.adm-config-array-edit {
|
|
337
|
+
width: 360px;
|
|
338
|
+
max-width: 100%;
|
|
339
|
+
min-height: 4.5rem;
|
|
340
|
+
font-family: 'JetBrains Mono', monospace;
|
|
341
|
+
font-size: 0.8rem;
|
|
342
|
+
padding: 6px 8px;
|
|
343
|
+
border: 1px solid var(--border, #E5E7EB);
|
|
344
|
+
border-radius: 6px;
|
|
345
|
+
resize: vertical;
|
|
346
|
+
box-sizing: border-box;
|
|
347
|
+
}
|
|
336
348
|
.adm-config-readonly { opacity: 0.85; pointer-events: none; }
|
|
337
349
|
.adm-config-readonly input,
|
|
338
350
|
.adm-config-readonly select { background: #F3F4F6; cursor: not-allowed; }
|