@squadrules/mcp 4.8.6 → 5.0.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/README.md +37 -32
- package/dist/.tsbuildinfo +1 -1
- package/dist/bootstrap.d.ts +1 -1
- package/dist/bootstrap.js +3 -3
- package/dist/bootstrap.js.map +1 -1
- package/dist/cli/api-client.d.ts +1 -1
- package/dist/cli/api-client.js +3 -3
- package/dist/cli/api-client.js.map +1 -1
- package/dist/cli/auth-error.js +1 -1
- package/dist/cli/auth-error.js.map +1 -1
- package/dist/cli/client-factory.js +2 -2
- package/dist/cli/client-factory.js.map +1 -1
- package/dist/cli/commands/attest.js +2 -2
- package/dist/cli/commands/attest.js.map +1 -1
- package/dist/cli/commands/begin.js +2 -2
- package/dist/cli/commands/begin.js.map +1 -1
- package/dist/cli/commands/cli-train.js +4 -4
- package/dist/cli/commands/cli-train.js.map +1 -1
- package/dist/cli/commands/delete-metadata.d.ts +2 -2
- package/dist/cli/commands/delete-metadata.d.ts.map +1 -1
- package/dist/cli/commands/delete-metadata.js +2 -2
- package/dist/cli/commands/delete-metadata.js.map +1 -1
- package/dist/cli/commands/export.js +2 -2
- package/dist/cli/commands/export.js.map +1 -1
- package/dist/cli/commands/login.d.ts +1 -1
- package/dist/cli/commands/login.js +13 -13
- package/dist/cli/commands/login.js.map +1 -1
- package/dist/cli/commands/logout.d.ts +1 -1
- package/dist/cli/commands/logout.js +1 -1
- package/dist/cli/commands/search.js +1 -1
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/serve.d.ts +3 -3
- package/dist/cli/commands/serve.js +9 -9
- package/dist/cli/commands/serve.js.map +1 -1
- package/dist/cli/commands/token.d.ts +1 -1
- package/dist/cli/commands/token.js +3 -3
- package/dist/cli/commands/token.js.map +1 -1
- package/dist/cli/commands/update.js +3 -3
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/config-file-internals.d.ts +1 -1
- package/dist/cli/config-file-internals.d.ts.map +1 -1
- package/dist/cli/config-file-internals.js +3 -3
- package/dist/cli/config-file-internals.js.map +1 -1
- package/dist/cli/config-file-write.js +1 -1
- package/dist/cli/config-file-write.js.map +1 -1
- package/dist/cli/config-file.d.ts +2 -2
- package/dist/cli/config-file.js +6 -6
- package/dist/cli/config-file.js.map +1 -1
- package/dist/cli/config.d.ts +2 -2
- package/dist/cli/config.js +3 -3
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/fetch-error.js +1 -1
- package/dist/cli/fetch-error.js.map +1 -1
- package/dist/cli/format-next-call.js +3 -3
- package/dist/cli/format-next-call.js.map +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/keyring.d.ts +5 -12
- package/dist/cli/keyring.d.ts.map +1 -1
- package/dist/cli/keyring.js +18 -64
- package/dist/cli/keyring.js.map +1 -1
- package/dist/cli/oauth-refresh.d.ts +2 -2
- package/dist/cli/oauth-refresh.d.ts.map +1 -1
- package/dist/cli/oauth-refresh.js +3 -3
- package/dist/cli/oauth-refresh.js.map +1 -1
- package/dist/cli/program.js +4 -4
- package/dist/cli/program.js.map +1 -1
- package/dist/cli/resolve-api-base.d.ts +1 -1
- package/dist/cli/resolve-api-base.js +2 -2
- package/dist/cli/resolve-api-base.js.map +1 -1
- package/dist/cli/skill-zip-local-write.js +2 -2
- package/dist/cli/skill-zip-local-write.js.map +1 -1
- package/dist/cli/upload-guards.js +3 -3
- package/dist/cli/upload-guards.js.map +1 -1
- package/dist/config/adapter-markdown-size-limits.d.ts +2 -5
- package/dist/config/adapter-markdown-size-limits.d.ts.map +1 -1
- package/dist/config/adapter-markdown-size-limits.js +19 -10
- package/dist/config/adapter-markdown-size-limits.js.map +1 -1
- package/dist/config/embedding-fastembed.d.ts +9 -0
- package/dist/config/embedding-fastembed.d.ts.map +1 -0
- package/dist/config/embedding-fastembed.js +20 -0
- package/dist/config/embedding-fastembed.js.map +1 -0
- package/dist/config/export-download-settings.d.ts +2 -2
- package/dist/config/export-download-settings.d.ts.map +1 -1
- package/dist/config/export-download-settings.js +3 -23
- package/dist/config/export-download-settings.js.map +1 -1
- package/dist/config/export-zip-settings.d.ts +2 -3
- package/dist/config/export-zip-settings.d.ts.map +1 -1
- package/dist/config/export-zip-settings.js +3 -6
- package/dist/config/export-zip-settings.js.map +1 -1
- package/dist/config.d.ts +35 -31
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +50 -47
- package/dist/config.js.map +1 -1
- package/dist/constants/builtin-search-meta.d.ts +5 -5
- package/dist/constants/builtin-search-meta.d.ts.map +1 -1
- package/dist/constants/builtin-search-meta.js +6 -6
- package/dist/constants/builtin-search-meta.js.map +1 -1
- package/dist/embed-docs/mem/README.md +9 -9
- package/dist/embed-docs/mem/adapter-migration.md +2 -2
- package/dist/embed-docs/mem/bulk-insert-adapters-via-cli.md +20 -20
- package/dist/embed-docs/mem/challenge-type-guide.md +10 -10
- package/dist/embed-docs/mem/create-new-protocol.md +16 -16
- package/dist/embed-docs/mem/phase-critic-guide.md +2 -2
- package/dist/embed-docs/mem/phase-critic.md +2 -2
- package/dist/embed-docs/mem/protocol-linking-guide.md +6 -6
- package/dist/embed-docs/mem/refine-search.md +3 -3
- package/dist/embed-docs/mem/skill-format-guide.md +24 -24
- package/dist/http/bearer-validate.d.ts +1 -1
- package/dist/http/bearer-validate.d.ts.map +1 -1
- package/dist/http/export-skill-zip-http.js +3 -3
- package/dist/http/export-skill-zip-http.js.map +1 -1
- package/dist/http/http-api-snapshot.d.ts.map +1 -1
- package/dist/http/http-api-snapshot.js +13 -1
- package/dist/http/http-api-snapshot.js.map +1 -1
- package/dist/http/http-api-train-json.js +8 -8
- package/dist/http/http-api-train-json.js.map +1 -1
- package/dist/http/http-api-train-raw.js +8 -8
- package/dist/http/http-api-train-raw.js.map +1 -1
- package/dist/http/http-auth-callback.js +1 -1
- package/dist/http/http-auth-middleware.d.ts +1 -1
- package/dist/http/http-auth-middleware.d.ts.map +1 -1
- package/dist/http/http-auth-middleware.js +7 -15
- package/dist/http/http-auth-middleware.js.map +1 -1
- package/dist/http/http-export-artifact-download-routes.js +1 -1
- package/dist/http/http-export-artifact-download-routes.js.map +1 -1
- package/dist/http/http-health-routes.d.ts.map +1 -1
- package/dist/http/http-health-routes.js +6 -3
- package/dist/http/http-health-routes.js.map +1 -1
- package/dist/http/http-mcp-handler.js +2 -2
- package/dist/http/http-mcp-handler.js.map +1 -1
- package/dist/http/http-route-errors.js +4 -4
- package/dist/http/http-route-errors.js.map +1 -1
- package/dist/http/http-ui-static.js +8 -8
- package/dist/http/http-ui-static.js.map +1 -1
- package/dist/http/http-well-known.js +1 -1
- package/dist/http/http-well-known.js.map +1 -1
- package/dist/http/oidc-profile-claims.d.ts +5 -5
- package/dist/http/oidc-profile-claims.d.ts.map +1 -1
- package/dist/http/oidc-profile-claims.js +5 -5
- package/dist/http/oidc-profile-claims.js.map +1 -1
- package/dist/http/oidc-scopes.js +2 -2
- package/dist/http/oidc-scopes.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -11
- package/dist/index.js.map +1 -1
- package/dist/mcp-apps/activate-widget-html.js +4 -4
- package/dist/mcp-apps/activate-widget-html.js.map +1 -1
- package/dist/mcp-apps/activate-widget-inline-css.js +1 -1
- package/dist/mcp-apps/activate-widget-inline-script.js +9 -9
- package/dist/mcp-apps/forward-widget-html.js +4 -4
- package/dist/mcp-apps/forward-widget-html.js.map +1 -1
- package/dist/mcp-apps/forward-widget-inline-script.d.ts.map +1 -1
- package/dist/mcp-apps/forward-widget-inline-script.js +8 -8
- package/dist/mcp-apps/forward-widget-inline-script.js.map +1 -1
- package/dist/mcp-apps/list-offerings-for-ui.d.ts.map +1 -1
- package/dist/mcp-apps/list-offerings-for-ui.js +16 -16
- package/dist/mcp-apps/list-offerings-for-ui.js.map +1 -1
- package/dist/mcp-apps/mcp-widget-presentation-inject.d.ts +2 -2
- package/dist/mcp-apps/mcp-widget-presentation-inject.d.ts.map +1 -1
- package/dist/mcp-apps/mcp-widget-presentation-inject.js +4 -4
- package/dist/mcp-apps/mcp-widget-presentation-inject.js.map +1 -1
- package/dist/mcp-apps/register-activate-ui-resources.d.ts +1 -1
- package/dist/mcp-apps/register-activate-ui-resources.d.ts.map +1 -1
- package/dist/mcp-apps/register-activate-ui-resources.js +2 -13
- package/dist/mcp-apps/register-activate-ui-resources.js.map +1 -1
- package/dist/mcp-apps/register-forward-ui-resources.d.ts +1 -1
- package/dist/mcp-apps/register-forward-ui-resources.d.ts.map +1 -1
- package/dist/mcp-apps/register-forward-ui-resources.js +3 -14
- package/dist/mcp-apps/register-forward-ui-resources.js.map +1 -1
- package/dist/mcp-apps/register-spaces-ui-resources.d.ts +1 -1
- package/dist/mcp-apps/register-spaces-ui-resources.d.ts.map +1 -1
- package/dist/mcp-apps/register-spaces-ui-resources.js +2 -13
- package/dist/mcp-apps/register-spaces-ui-resources.js.map +1 -1
- package/dist/mcp-apps/spaces-mcp-app-widget-html.js +8 -8
- package/dist/mcp-apps/spaces-mcp-app-widget-html.js.map +1 -1
- package/dist/mcp-apps/spaces-widget-html.js +1 -1
- package/dist/mcp-apps/squadrules-logo-embedded.d.ts +3 -0
- package/dist/mcp-apps/squadrules-logo-embedded.d.ts.map +1 -0
- package/dist/mcp-apps/squadrules-logo-embedded.js +3 -0
- package/dist/mcp-apps/squadrules-logo-embedded.js.map +1 -0
- package/dist/mcp-apps/{kairos-server-ui-capability.d.ts → squadrules-server-ui-capability.d.ts} +2 -2
- package/dist/mcp-apps/squadrules-server-ui-capability.d.ts.map +1 -0
- package/dist/mcp-apps/{kairos-server-ui-capability.js → squadrules-server-ui-capability.js} +3 -3
- package/dist/mcp-apps/squadrules-server-ui-capability.js.map +1 -0
- package/dist/mcp-apps/{kairos-ui-constants.d.ts → squadrules-ui-constants.d.ts} +14 -52
- package/dist/mcp-apps/squadrules-ui-constants.d.ts.map +1 -0
- package/dist/mcp-apps/squadrules-ui-constants.js +59 -0
- package/dist/mcp-apps/squadrules-ui-constants.js.map +1 -0
- package/dist/resources/docs-resources.js +2 -2
- package/dist/resources/docs-resources.js.map +1 -1
- package/dist/resources/embedded-mcp-resources.js +17 -17
- package/dist/resources/embedded-mcp-resources.js.map +1 -1
- package/dist/resources/mem-resources-boot.d.ts.map +1 -1
- package/dist/resources/mem-resources-boot.js +5 -31
- package/dist/resources/mem-resources-boot.js.map +1 -1
- package/dist/resources/mem-uuid-mapper.d.ts.map +1 -1
- package/dist/resources/mem-uuid-mapper.js +8 -23
- package/dist/resources/mem-uuid-mapper.js.map +1 -1
- package/dist/resources/resource-bootstrap.js +4 -4
- package/dist/resources/resource-bootstrap.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +16 -14
- package/dist/server.js.map +1 -1
- package/dist/services/adapter-navigation.js +1 -1
- package/dist/services/adapter-navigation.js.map +1 -1
- package/dist/services/embedding/fastembed-provider.d.ts +2 -0
- package/dist/services/embedding/fastembed-provider.d.ts.map +1 -0
- package/dist/services/embedding/fastembed-provider.js +78 -0
- package/dist/services/embedding/fastembed-provider.js.map +1 -0
- package/dist/services/embedding/health.d.ts.map +1 -1
- package/dist/services/embedding/health.js +99 -96
- package/dist/services/embedding/health.js.map +1 -1
- package/dist/services/embedding/provider-audit.d.ts +15 -0
- package/dist/services/embedding/provider-audit.d.ts.map +1 -0
- package/dist/services/embedding/provider-audit.js +28 -0
- package/dist/services/embedding/provider-audit.js.map +1 -0
- package/dist/services/embedding/providers.d.ts +2 -1
- package/dist/services/embedding/providers.d.ts.map +1 -1
- package/dist/services/embedding/providers.js +21 -23
- package/dist/services/embedding/providers.js.map +1 -1
- package/dist/services/embedding/service.d.ts +2 -2
- package/dist/services/embedding/service.d.ts.map +1 -1
- package/dist/services/embedding/service.js +13 -16
- package/dist/services/embedding/service.js.map +1 -1
- package/dist/services/execution-trace-store.d.ts +5 -29
- package/dist/services/execution-trace-store.d.ts.map +1 -1
- package/dist/services/execution-trace-store.js +10 -2
- package/dist/services/execution-trace-store.js.map +1 -1
- package/dist/services/export-artifact-download-capability.js +4 -4
- package/dist/services/export-artifact-download-capability.js.map +1 -1
- package/dist/services/export-download-capability.js +4 -4
- package/dist/services/export-download-capability.js.map +1 -1
- package/dist/services/id-generator.d.ts +11 -11
- package/dist/services/id-generator.d.ts.map +1 -1
- package/dist/services/id-generator.js +20 -30
- package/dist/services/id-generator.js.map +1 -1
- package/dist/services/memory/artifact-metadata.js +1 -1
- package/dist/services/memory/artifact-metadata.js.map +1 -1
- package/dist/services/memory/qdrant-point-to-memory.js +2 -2
- package/dist/services/memory/qdrant-point-to-memory.js.map +1 -1
- package/dist/services/memory/store-adapter-default-handler.js +2 -2
- package/dist/services/memory/store-adapter-default-handler.js.map +1 -1
- package/dist/services/memory/store-adapter-helpers.js +7 -7
- package/dist/services/memory/store-adapter-helpers.js.map +1 -1
- package/dist/services/memory/store-adapter.js +2 -2
- package/dist/services/memory/store-adapter.js.map +1 -1
- package/dist/services/memory/store-artifact.js +4 -4
- package/dist/services/memory/store-artifact.js.map +1 -1
- package/dist/services/memory/store-methods.js +7 -7
- package/dist/services/memory/store-methods.js.map +1 -1
- package/dist/services/memory/store-title-similarity-search.js +2 -2
- package/dist/services/memory/store-title-similarity-search.js.map +1 -1
- package/dist/services/memory/store.d.ts +23 -0
- package/dist/services/memory/store.d.ts.map +1 -1
- package/dist/services/memory/store.js +111 -4
- package/dist/services/memory/store.js.map +1 -1
- package/dist/services/memory/validate-protocol-structure.d.ts +1 -1
- package/dist/services/memory/validate-protocol-structure.d.ts.map +1 -1
- package/dist/services/memory/validate-protocol-structure.js +1 -1
- package/dist/services/memory/validate-protocol-structure.js.map +1 -1
- package/dist/services/memory-store.d.ts +5 -0
- package/dist/services/memory-store.d.ts.map +1 -1
- package/dist/services/memory-store.js +8 -3
- package/dist/services/memory-store.js.map +1 -1
- package/dist/services/metrics/agent-metrics.js +4 -4
- package/dist/services/metrics/agent-metrics.js.map +1 -1
- package/dist/services/metrics/anomaly-metrics.js +1 -1
- package/dist/services/metrics/anomaly-metrics.js.map +1 -1
- package/dist/services/metrics/embedding-metrics.js +5 -5
- package/dist/services/metrics/embedding-metrics.js.map +1 -1
- package/dist/services/metrics/export-metrics.js +4 -4
- package/dist/services/metrics/export-metrics.js.map +1 -1
- package/dist/services/metrics/http-metrics.js +5 -5
- package/dist/services/metrics/http-metrics.js.map +1 -1
- package/dist/services/metrics/mcp-metrics.d.ts +3 -3
- package/dist/services/metrics/mcp-metrics.d.ts.map +1 -1
- package/dist/services/metrics/mcp-metrics.js +10 -10
- package/dist/services/metrics/mcp-metrics.js.map +1 -1
- package/dist/services/metrics/memory-metrics.js +3 -3
- package/dist/services/metrics/memory-metrics.js.map +1 -1
- package/dist/services/metrics/qdrant-metrics.js +4 -4
- package/dist/services/metrics/qdrant-metrics.js.map +1 -1
- package/dist/services/metrics/registry.d.ts +1 -1
- package/dist/services/metrics/registry.js +3 -3
- package/dist/services/metrics/registry.js.map +1 -1
- package/dist/services/metrics/system-metrics.js +3 -3
- package/dist/services/metrics/system-metrics.js.map +1 -1
- package/dist/services/qdrant/connection.d.ts.map +1 -1
- package/dist/services/qdrant/connection.js +6 -6
- package/dist/services/qdrant/connection.js.map +1 -1
- package/dist/services/qdrant/initialization.d.ts +1 -1
- package/dist/services/qdrant/initialization.js +4 -4
- package/dist/services/qdrant/initialization.js.map +1 -1
- package/dist/services/qdrant/memory-retrieval.js +6 -6
- package/dist/services/qdrant/memory-retrieval.js.map +1 -1
- package/dist/services/qdrant/memory-updates.js +4 -4
- package/dist/services/qdrant/memory-updates.js.map +1 -1
- package/dist/services/qdrant/quality.js +4 -4
- package/dist/services/qdrant/quality.js.map +1 -1
- package/dist/services/qdrant/resources.js +2 -2
- package/dist/services/qdrant/resources.js.map +1 -1
- package/dist/services/qdrant/service.d.ts.map +1 -1
- package/dist/services/qdrant/service.js +11 -2
- package/dist/services/qdrant/service.js.map +1 -1
- package/dist/services/qdrant/snapshots.js +1 -1
- package/dist/services/qdrant/snapshots.js.map +1 -1
- package/dist/services/qdrant/utils.js +13 -13
- package/dist/services/qdrant/utils.js.map +1 -1
- package/dist/services/redis-cache.js +4 -4
- package/dist/services/redis-cache.js.map +1 -1
- package/dist/services/redis.d.ts +2 -2
- package/dist/services/redis.js +5 -5
- package/dist/services/redis.js.map +1 -1
- package/dist/services/reward-metrics.js +2 -2
- package/dist/services/reward-metrics.js.map +1 -1
- package/dist/services/vector-store/IExecutionTraceStore.d.ts +25 -0
- package/dist/services/vector-store/IExecutionTraceStore.d.ts.map +1 -0
- package/dist/services/vector-store/IExecutionTraceStore.js +2 -0
- package/dist/services/vector-store/IExecutionTraceStore.js.map +1 -0
- package/dist/services/vector-store/IVectorRecordStore.d.ts +58 -0
- package/dist/services/vector-store/IVectorRecordStore.d.ts.map +1 -0
- package/dist/services/vector-store/IVectorRecordStore.js +2 -0
- package/dist/services/vector-store/IVectorRecordStore.js.map +1 -0
- package/dist/services/vector-store/commit-retry.d.ts +21 -0
- package/dist/services/vector-store/commit-retry.d.ts.map +1 -0
- package/dist/services/vector-store/commit-retry.js +58 -0
- package/dist/services/vector-store/commit-retry.js.map +1 -0
- package/dist/services/vector-store/embedded-store-singleton.d.ts +12 -0
- package/dist/services/vector-store/embedded-store-singleton.d.ts.map +1 -0
- package/dist/services/vector-store/embedded-store-singleton.js +17 -0
- package/dist/services/vector-store/embedded-store-singleton.js.map +1 -0
- package/dist/services/vector-store/lancedb/LanceExecutionTraceStore.d.ts +28 -0
- package/dist/services/vector-store/lancedb/LanceExecutionTraceStore.d.ts.map +1 -0
- package/dist/services/vector-store/lancedb/LanceExecutionTraceStore.js +222 -0
- package/dist/services/vector-store/lancedb/LanceExecutionTraceStore.js.map +1 -0
- package/dist/services/vector-store/lancedb/LanceVectorRecordStore.d.ts +77 -0
- package/dist/services/vector-store/lancedb/LanceVectorRecordStore.d.ts.map +1 -0
- package/dist/services/vector-store/lancedb/LanceVectorRecordStore.js +136 -0
- package/dist/services/vector-store/lancedb/LanceVectorRecordStore.js.map +1 -0
- package/dist/services/vector-store/lancedb/lance-records-engine.d.ts +41 -0
- package/dist/services/vector-store/lancedb/lance-records-engine.d.ts.map +1 -0
- package/dist/services/vector-store/lancedb/lance-records-engine.js +102 -0
- package/dist/services/vector-store/lancedb/lance-records-engine.js.map +1 -0
- package/dist/services/vector-store/lancedb/lance-records-mutations.d.ts +22 -0
- package/dist/services/vector-store/lancedb/lance-records-mutations.d.ts.map +1 -0
- package/dist/services/vector-store/lancedb/lance-records-mutations.js +211 -0
- package/dist/services/vector-store/lancedb/lance-records-mutations.js.map +1 -0
- package/dist/services/vector-store/lancedb/lance-records-reads.d.ts +64 -0
- package/dist/services/vector-store/lancedb/lance-records-reads.d.ts.map +1 -0
- package/dist/services/vector-store/lancedb/lance-records-reads.js +237 -0
- package/dist/services/vector-store/lancedb/lance-records-reads.js.map +1 -0
- package/dist/services/vector-store/lancedb/lance-records-schema.d.ts +48 -0
- package/dist/services/vector-store/lancedb/lance-records-schema.d.ts.map +1 -0
- package/dist/services/vector-store/lancedb/lance-records-schema.js +159 -0
- package/dist/services/vector-store/lancedb/lance-records-schema.js.map +1 -0
- package/dist/services/vector-store/lancedb/lance-records-search.d.ts +30 -0
- package/dist/services/vector-store/lancedb/lance-records-search.d.ts.map +1 -0
- package/dist/services/vector-store/lancedb/lance-records-search.js +112 -0
- package/dist/services/vector-store/lancedb/lance-records-search.js.map +1 -0
- package/dist/services/vector-store/lancedb/lance-records-write-artifact.d.ts +11 -0
- package/dist/services/vector-store/lancedb/lance-records-write-artifact.d.ts.map +1 -0
- package/dist/services/vector-store/lancedb/lance-records-write-artifact.js +121 -0
- package/dist/services/vector-store/lancedb/lance-records-write-artifact.js.map +1 -0
- package/dist/services/vector-store/lancedb/lance-records-write-helpers.d.ts +52 -0
- package/dist/services/vector-store/lancedb/lance-records-write-helpers.d.ts.map +1 -0
- package/dist/services/vector-store/lancedb/lance-records-write-helpers.js +216 -0
- package/dist/services/vector-store/lancedb/lance-records-write-helpers.js.map +1 -0
- package/dist/services/vector-store/lancedb/lance-records-writes.d.ts +21 -0
- package/dist/services/vector-store/lancedb/lance-records-writes.d.ts.map +1 -0
- package/dist/services/vector-store/lancedb/lance-records-writes.js +294 -0
- package/dist/services/vector-store/lancedb/lance-records-writes.js.map +1 -0
- package/dist/services/vector-store/lancedb-connection.d.ts +12 -0
- package/dist/services/vector-store/lancedb-connection.d.ts.map +1 -0
- package/dist/services/vector-store/lancedb-connection.js +28 -0
- package/dist/services/vector-store/lancedb-connection.js.map +1 -0
- package/dist/services/vector-store/types.d.ts +85 -0
- package/dist/services/vector-store/types.d.ts.map +1 -0
- package/dist/services/vector-store/types.js +2 -0
- package/dist/services/vector-store/types.js.map +1 -0
- package/dist/stdio/stdio-server.js +1 -1
- package/dist/stdio/stdio-server.js.map +1 -1
- package/dist/tools/activate.js +11 -11
- package/dist/tools/activate.js.map +1 -1
- package/dist/tools/activate_schema.d.ts +0 -1
- package/dist/tools/activate_schema.d.ts.map +1 -1
- package/dist/tools/activate_schema.js +8 -10
- package/dist/tools/activate_schema.js.map +1 -1
- package/dist/tools/artifact-catalog.d.ts.map +1 -1
- package/dist/tools/artifact-catalog.js +6 -33
- package/dist/tools/artifact-catalog.js.map +1 -1
- package/dist/tools/delete.js +4 -4
- package/dist/tools/delete.js.map +1 -1
- package/dist/tools/delete_schema.js +3 -3
- package/dist/tools/delete_schema.js.map +1 -1
- package/dist/tools/dump.d.ts.map +1 -1
- package/dist/tools/dump.js +4 -13
- package/dist/tools/dump.js.map +1 -1
- package/dist/tools/export-resolve-adapter.js +2 -2
- package/dist/tools/export-resolve-adapter.js.map +1 -1
- package/dist/tools/export-reward-jsonl.js +3 -3
- package/dist/tools/export-reward-jsonl.js.map +1 -1
- package/dist/tools/export-selection.js +4 -4
- package/dist/tools/export-selection.js.map +1 -1
- package/dist/tools/export-source.js +5 -5
- package/dist/tools/export-source.js.map +1 -1
- package/dist/tools/export.js +5 -5
- package/dist/tools/export.js.map +1 -1
- package/dist/tools/export_schema.js +4 -4
- package/dist/tools/export_schema.js.map +1 -1
- package/dist/tools/forward-register.js +4 -4
- package/dist/tools/forward-register.js.map +1 -1
- package/dist/tools/forward-tool-error.d.ts +2 -2
- package/dist/tools/forward-tool-error.d.ts.map +1 -1
- package/dist/tools/forward-tool-error.js.map +1 -1
- package/dist/tools/forward-trace.js +1 -1
- package/dist/tools/forward-trace.js.map +1 -1
- package/dist/tools/forward-view.d.ts +2 -2
- package/dist/tools/forward-view.d.ts.map +1 -1
- package/dist/tools/forward-view.js +3 -3
- package/dist/tools/forward-view.js.map +1 -1
- package/dist/tools/forward.js +5 -5
- package/dist/tools/forward.js.map +1 -1
- package/dist/tools/forward_schema.d.ts +1 -2
- package/dist/tools/forward_schema.d.ts.map +1 -1
- package/dist/tools/forward_schema.js +5 -7
- package/dist/tools/forward_schema.js.map +1 -1
- package/dist/tools/local-artifact-dir-contract.d.ts +2 -8
- package/dist/tools/local-artifact-dir-contract.d.ts.map +1 -1
- package/dist/tools/local-artifact-dir-contract.js +2 -9
- package/dist/tools/local-artifact-dir-contract.js.map +1 -1
- package/dist/tools/mcp-tool-input-teaching.d.ts +3 -3
- package/dist/tools/mcp-tool-input-teaching.d.ts.map +1 -1
- package/dist/tools/mcp-tool-input-teaching.js +22 -22
- package/dist/tools/mcp-tool-input-teaching.js.map +1 -1
- package/dist/tools/next-missing-proof-payload.js +1 -1
- package/dist/tools/next-missing-proof-payload.js.map +1 -1
- package/dist/tools/next-pow-challenge-shape.js +1 -1
- package/dist/tools/next-pow-challenge-shape.js.map +1 -1
- package/dist/tools/next-pow-helpers.d.ts +1 -1
- package/dist/tools/next-pow-helpers.d.ts.map +1 -1
- package/dist/tools/next-pow-helpers.js +4 -4
- package/dist/tools/next-pow-helpers.js.map +1 -1
- package/dist/tools/next-previous-step.js +1 -1
- package/dist/tools/next-previous-step.js.map +1 -1
- package/dist/tools/next.js +8 -8
- package/dist/tools/next.js.map +1 -1
- package/dist/tools/next_schema.d.ts +0 -1
- package/dist/tools/next_schema.d.ts.map +1 -1
- package/dist/tools/next_schema.js +3 -5
- package/dist/tools/next_schema.js.map +1 -1
- package/dist/tools/review-evidence-check.js +1 -1
- package/dist/tools/review-evidence-check.js.map +1 -1
- package/dist/tools/reward.js +6 -6
- package/dist/tools/reward.js.map +1 -1
- package/dist/tools/reward_schema.js +1 -1
- package/dist/tools/reward_schema.js.map +1 -1
- package/dist/tools/search.d.ts.map +1 -1
- package/dist/tools/search.js +20 -34
- package/dist/tools/search.js.map +1 -1
- package/dist/tools/search_output.js +11 -11
- package/dist/tools/search_output.js.map +1 -1
- package/dist/tools/search_schema.d.ts +1 -1
- package/dist/tools/search_schema.js +7 -7
- package/dist/tools/search_schema.js.map +1 -1
- package/dist/tools/skill-export/assemble-skill-item.d.ts.map +1 -1
- package/dist/tools/skill-export/assemble-skill-item.js +11 -15
- package/dist/tools/skill-export/assemble-skill-item.js.map +1 -1
- package/dist/tools/skill-export/derive-metadata.d.ts +1 -1
- package/dist/tools/skill-export/derive-metadata.d.ts.map +1 -1
- package/dist/tools/skill-export/enumerate-space-adapters.d.ts +2 -2
- package/dist/tools/skill-export/enumerate-space-adapters.d.ts.map +1 -1
- package/dist/tools/skill-export/enumerate-space-adapters.js +12 -28
- package/dist/tools/skill-export/enumerate-space-adapters.js.map +1 -1
- package/dist/tools/skill-export/types.d.ts +1 -1
- package/dist/tools/skill-export/types.d.ts.map +1 -1
- package/dist/tools/spaces.d.ts.map +1 -1
- package/dist/tools/spaces.js +9 -22
- package/dist/tools/spaces.js.map +1 -1
- package/dist/tools/spaces_schema.js +1 -1
- package/dist/tools/spaces_schema.js.map +1 -1
- package/dist/tools/{kairos-challenge-display.d.ts → squadrules-challenge-display.d.ts} +1 -1
- package/dist/tools/squadrules-challenge-display.d.ts.map +1 -0
- package/dist/tools/{kairos-challenge-display.js → squadrules-challenge-display.js} +3 -3
- package/dist/tools/squadrules-challenge-display.js.map +1 -0
- package/dist/tools/{kairos-genesis-proof-hash.d.ts → squadrules-genesis-proof-hash.d.ts} +1 -1
- package/dist/tools/squadrules-genesis-proof-hash.d.ts.map +1 -0
- package/dist/tools/{kairos-genesis-proof-hash.js → squadrules-genesis-proof-hash.js} +1 -1
- package/dist/tools/squadrules-genesis-proof-hash.js.map +1 -0
- package/dist/tools/{kairos-uri.d.ts → squadrules-uri.d.ts} +4 -4
- package/dist/tools/squadrules-uri.d.ts.map +1 -0
- package/dist/tools/{kairos-uri.js → squadrules-uri.js} +18 -29
- package/dist/tools/squadrules-uri.js.map +1 -0
- package/dist/tools/tool-registry.d.ts +11 -13
- package/dist/tools/tool-registry.d.ts.map +1 -1
- package/dist/tools/tool-registry.js +8 -8
- package/dist/tools/tool-registry.js.map +1 -1
- package/dist/tools/train-artifact-adapter-uri.js +3 -3
- package/dist/tools/train-artifact-adapter-uri.js.map +1 -1
- package/dist/tools/train-output-adapter-uri.js +2 -2
- package/dist/tools/train-output-adapter-uri.js.map +1 -1
- package/dist/tools/train-store.js +4 -4
- package/dist/tools/train-store.js.map +1 -1
- package/dist/tools/train.js +11 -11
- package/dist/tools/train.js.map +1 -1
- package/dist/tools/train_schema.js +4 -4
- package/dist/tools/train_schema.js.map +1 -1
- package/dist/tools/tune-execute.d.ts.map +1 -1
- package/dist/tools/tune-execute.js +5 -5
- package/dist/tools/tune-execute.js.map +1 -1
- package/dist/tools/tune-messages.js +2 -2
- package/dist/tools/tune-messages.js.map +1 -1
- package/dist/tools/tune_schema.js +3 -3
- package/dist/tools/tune_schema.js.map +1 -1
- package/dist/tools/update.js +2 -2
- package/dist/tools/update.js.map +1 -1
- package/dist/tools/update_schema.d.ts.map +1 -1
- package/dist/tools/update_schema.js +3 -5
- package/dist/tools/update_schema.js.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +4 -4
- package/dist/types/index.js.map +1 -1
- package/dist/ui/assets/{AccountPage-DBrqe8KI.js → AccountPage-BJm56sur.js} +1 -1
- package/dist/ui/assets/HomePage-B06u5RCw.js +1 -0
- package/dist/ui/assets/{ProtocolDetailPage-C20Yd3q6.js → ProtocolDetailPage-DCw5D34S.js} +1 -1
- package/dist/ui/assets/ProtocolEditPage-mChBe3JY.js +5 -0
- package/dist/ui/assets/{RichTextEditor-uun0UIVc.js → RichTextEditor-Bj6JxHM5.js} +1 -1
- package/dist/ui/assets/{RunGuidedPage-BbyHZjPU.js → RunGuidedPage-Bd1bUTBH.js} +1 -1
- package/dist/ui/assets/{RunsPage-BijmxS6f.js → RunsPage-4kDF_Ylg.js} +1 -1
- package/dist/ui/assets/{SkillBundlePage-BsndXJaC.js → SkillBundlePage-D1OPKJzA.js} +1 -1
- package/dist/ui/assets/SquadrulesPage-D84vIaBc.js +1 -0
- package/dist/ui/assets/{export-skill-zip-CIyOWxuI.js → export-skill-zip-C1bRyhE2.js} +1 -1
- package/dist/ui/assets/index-PouLvU1c.js +8 -0
- package/dist/ui/assets/{kairos-mcp-DNiKVgiO.svg → squadrules-mcp-Qc5pokoj.svg} +1 -1
- package/dist/ui/assets/useRunSession-BX2U9D53.js +1 -0
- package/dist/ui/favicon.svg +1 -1
- package/dist/ui/index.html +3 -3
- package/dist/ui/logo.svg +1 -1
- package/dist/utils/build-version.d.ts +1 -1
- package/dist/utils/build-version.js +1 -1
- package/dist/utils/global-error-handlers.d.ts +1 -1
- package/dist/utils/global-error-handlers.js +1 -1
- package/dist/utils/log-core.d.ts +1 -1
- package/dist/utils/log-core.js +1 -1
- package/dist/utils/mcp-tool-doc-runtime.d.ts +1 -1
- package/dist/utils/mcp-tool-doc-runtime.js +2 -2
- package/dist/utils/mcp-tool-doc-runtime.js.map +1 -1
- package/dist/utils/memory-body.d.ts +1 -1
- package/dist/utils/memory-body.js +2 -2
- package/dist/utils/memory-body.js.map +1 -1
- package/dist/utils/protected-space-write-guard.js +3 -3
- package/dist/utils/protected-space-write-guard.js.map +1 -1
- package/dist/utils/qdrant-vector-management.js +3 -3
- package/dist/utils/qdrant-vector-management.js.map +1 -1
- package/dist/utils/resolve-space-param.d.ts +1 -1
- package/dist/utils/resolve-space-param.js +8 -8
- package/dist/utils/resolve-space-param.js.map +1 -1
- package/dist/utils/space-display.d.ts +2 -2
- package/dist/utils/space-display.d.ts.map +1 -1
- package/dist/utils/space-display.js +6 -6
- package/dist/utils/space-display.js.map +1 -1
- package/dist/utils/squadrules-local-artifact-dirs.d.ts +12 -0
- package/dist/utils/squadrules-local-artifact-dirs.d.ts.map +1 -0
- package/dist/utils/squadrules-local-artifact-dirs.js +34 -0
- package/dist/utils/squadrules-local-artifact-dirs.js.map +1 -0
- package/dist/utils/squadrules-user-dirs.d.ts +26 -0
- package/dist/utils/squadrules-user-dirs.d.ts.map +1 -0
- package/dist/utils/squadrules-user-dirs.js +67 -0
- package/dist/utils/squadrules-user-dirs.js.map +1 -0
- package/dist/utils/structured-logger.d.ts +1 -1
- package/dist/utils/structured-logger.js +1 -1
- package/dist/utils/tenant-context.d.ts +3 -3
- package/dist/utils/tenant-context.d.ts.map +1 -1
- package/dist/utils/tenant-context.js +12 -12
- package/dist/utils/tenant-context.js.map +1 -1
- package/dist/utils/uri-builder.d.ts +12 -12
- package/dist/utils/uri-builder.js +14 -14
- package/dist/utils/uri-builder.js.map +1 -1
- package/package.json +21 -16
- package/dist/config/env-alias.d.ts +0 -56
- package/dist/config/env-alias.d.ts.map +0 -1
- package/dist/config/env-alias.js +0 -112
- package/dist/config/env-alias.js.map +0 -1
- package/dist/mcp-apps/kairos-logo-embedded.d.ts +0 -3
- package/dist/mcp-apps/kairos-logo-embedded.d.ts.map +0 -1
- package/dist/mcp-apps/kairos-logo-embedded.js +0 -3
- package/dist/mcp-apps/kairos-logo-embedded.js.map +0 -1
- package/dist/mcp-apps/kairos-server-ui-capability.d.ts.map +0 -1
- package/dist/mcp-apps/kairos-server-ui-capability.js.map +0 -1
- package/dist/mcp-apps/kairos-ui-constants.d.ts.map +0 -1
- package/dist/mcp-apps/kairos-ui-constants.js +0 -100
- package/dist/mcp-apps/kairos-ui-constants.js.map +0 -1
- package/dist/squadrules-mcp-4.8.6.tgz +0 -0
- package/dist/tools/kairos-challenge-display.d.ts.map +0 -1
- package/dist/tools/kairos-challenge-display.js.map +0 -1
- package/dist/tools/kairos-genesis-proof-hash.d.ts.map +0 -1
- package/dist/tools/kairos-genesis-proof-hash.js.map +0 -1
- package/dist/tools/kairos-uri.d.ts.map +0 -1
- package/dist/tools/kairos-uri.js.map +0 -1
- package/dist/ui/assets/HomePage-DIKsxKaH.js +0 -1
- package/dist/ui/assets/KairosPage-n5qbiyxb.js +0 -1
- package/dist/ui/assets/ProtocolEditPage-hc87ZsgM.js +0 -5
- package/dist/ui/assets/index-D7zMHqYN.js +0 -8
- package/dist/ui/assets/useRunSession-062hqhcN.js +0 -1
- package/dist/utils/kairos-local-artifact-dirs.d.ts +0 -13
- package/dist/utils/kairos-local-artifact-dirs.d.ts.map +0 -1
- package/dist/utils/kairos-local-artifact-dirs.js +0 -35
- package/dist/utils/kairos-local-artifact-dirs.js.map +0 -1
- package/dist/utils/kairos-user-dirs.d.ts +0 -62
- package/dist/utils/kairos-user-dirs.d.ts.map +0 -1
- package/dist/utils/kairos-user-dirs.js +0 -165
- package/dist/utils/kairos-user-dirs.js.map +0 -1
package/dist/config/env-alias.js
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Env-var alias infrastructure for the KAIROS → SquadRules rebrand.
|
|
3
|
-
*
|
|
4
|
-
* Every `KAIROS_*` environment variable gains a `SQUADRULES_*` alias. This
|
|
5
|
-
* module centralizes the resolution + precedence rules and the one-time
|
|
6
|
-
* deprecation warning so the semantics stay identical everywhere.
|
|
7
|
-
*
|
|
8
|
-
* ## Precedence (explicit, NOT `new || old || default`)
|
|
9
|
-
* The raw value is chosen by *definition*, not by truthiness:
|
|
10
|
-
* 1. If `process.env[newKey] !== undefined` (even when it is `''`), it wins.
|
|
11
|
-
* 2. Else if `process.env[oldKey] !== undefined`, the KAIROS_* value is used
|
|
12
|
-
* and that key is recorded for the deprecation notice.
|
|
13
|
-
* 3. Else the value is `undefined`.
|
|
14
|
-
*
|
|
15
|
-
* ## Empty-string handling
|
|
16
|
-
* The *parsing* step after resolution preserves each original helper's exact
|
|
17
|
-
* semantics, so behavior never changes silently:
|
|
18
|
-
* - String helper: `resolved || default` — an explicitly-empty value still
|
|
19
|
-
* falls through to the default, exactly like the original `getEnvString`.
|
|
20
|
-
* - Int / float / boolean helpers: `undefined` → default; a defined value is
|
|
21
|
-
* parsed with the same rules as before.
|
|
22
|
-
*
|
|
23
|
-
* Because precedence is decided by `!== undefined`, setting `SQUADRULES_X=''`
|
|
24
|
-
* intentionally shadows `KAIROS_X` (the KAIROS_* key is then ignored and NOT
|
|
25
|
-
* reported as used) even though the empty value still resolves to the default
|
|
26
|
-
* through the string helper's `||`.
|
|
27
|
-
*/
|
|
28
|
-
/** KAIROS_* keys that were actually consulted (their alias was unset). */
|
|
29
|
-
const oldKeysUsed = new Set();
|
|
30
|
-
/**
|
|
31
|
-
* Resolve the raw environment value for an aliased pair.
|
|
32
|
-
*
|
|
33
|
-
* @returns the value of `newKey` when it is defined (including `''`),
|
|
34
|
-
* otherwise the value of `oldKey` when defined, otherwise `undefined`.
|
|
35
|
-
* When the KAIROS_* key supplies the value, it is recorded for deprecation.
|
|
36
|
-
*/
|
|
37
|
-
export function resolveAliasedRaw(newKey, oldKey) {
|
|
38
|
-
const next = process.env[newKey];
|
|
39
|
-
if (next !== undefined)
|
|
40
|
-
return next;
|
|
41
|
-
const prior = process.env[oldKey];
|
|
42
|
-
if (prior !== undefined) {
|
|
43
|
-
oldKeysUsed.add(oldKey);
|
|
44
|
-
return prior;
|
|
45
|
-
}
|
|
46
|
-
return undefined;
|
|
47
|
-
}
|
|
48
|
-
/** String variant: mirrors the original `process.env[key] || defaultValue`. */
|
|
49
|
-
export function getEnvAliased(newKey, oldKey, defaultValue) {
|
|
50
|
-
const raw = resolveAliasedRaw(newKey, oldKey);
|
|
51
|
-
return raw || defaultValue;
|
|
52
|
-
}
|
|
53
|
-
/** Integer variant: `undefined` → default; otherwise `parseInt`, NaN → default. */
|
|
54
|
-
export function getEnvIntAliased(newKey, oldKey, defaultValue) {
|
|
55
|
-
const raw = resolveAliasedRaw(newKey, oldKey);
|
|
56
|
-
if (raw === undefined)
|
|
57
|
-
return defaultValue;
|
|
58
|
-
const parsed = parseInt(raw, 10);
|
|
59
|
-
return isNaN(parsed) ? defaultValue : parsed;
|
|
60
|
-
}
|
|
61
|
-
/** Float variant: `undefined` → default; otherwise `parseFloat`, NaN → default. */
|
|
62
|
-
export function getEnvFloatAliased(newKey, oldKey, defaultValue) {
|
|
63
|
-
const raw = resolveAliasedRaw(newKey, oldKey);
|
|
64
|
-
if (raw === undefined)
|
|
65
|
-
return defaultValue;
|
|
66
|
-
const parsed = parseFloat(raw);
|
|
67
|
-
return isNaN(parsed) ? defaultValue : parsed;
|
|
68
|
-
}
|
|
69
|
-
/** Boolean variant: same accepted tokens as the original `getEnvBoolean`. */
|
|
70
|
-
export function getEnvBooleanAliased(newKey, oldKey, defaultValue) {
|
|
71
|
-
const raw = resolveAliasedRaw(newKey, oldKey);
|
|
72
|
-
if (raw === undefined)
|
|
73
|
-
return defaultValue;
|
|
74
|
-
const low = String(raw).trim().toLowerCase();
|
|
75
|
-
if (low === 'false' || low === '0' || low === 'no' || low === 'n')
|
|
76
|
-
return false;
|
|
77
|
-
if (low === 'true' || low === '1' || low === 'yes' || low === 'y')
|
|
78
|
-
return true;
|
|
79
|
-
return defaultValue;
|
|
80
|
-
}
|
|
81
|
-
let deprecationLogged = false;
|
|
82
|
-
/**
|
|
83
|
-
* Emit a single consolidated deprecation notice listing every KAIROS_* variable
|
|
84
|
-
* that was actually used while its `SQUADRULES_*` alias was unset. Idempotent:
|
|
85
|
-
* safe to call from multiple modules / repeated reads; logs at most once per
|
|
86
|
-
* process.
|
|
87
|
-
*/
|
|
88
|
-
export function logDeprecations() {
|
|
89
|
-
if (deprecationLogged)
|
|
90
|
-
return;
|
|
91
|
-
deprecationLogged = true;
|
|
92
|
-
if (oldKeysUsed.size === 0)
|
|
93
|
-
return;
|
|
94
|
-
const keys = [...oldKeysUsed].sort();
|
|
95
|
-
const mapping = keys.map((k) => `${k} → ${k.replace(/^KAIROS_/, 'SQUADRULES_')}`).join(', ');
|
|
96
|
-
const message = `[SquadRules] DEPRECATION: older KAIROS_* environment variable(s) in use: ` +
|
|
97
|
-
`${keys.join(', ')}. Please migrate to the SQUADRULES_* equivalent(s): ${mapping}. ` +
|
|
98
|
-
`The KAIROS_* names keep working for now but will be removed in a future release.\n`;
|
|
99
|
-
// Written to stderr (never stdout) so the warning cannot corrupt the stdio
|
|
100
|
-
// MCP JSON-RPC channel. The structured logger imports config.js, so using it
|
|
101
|
-
// here would create a circular import; stderr keeps this module dependency-free.
|
|
102
|
-
process.stderr.write(message);
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Test/reset hook: clears recorded usage and the once-guard so the deprecation
|
|
106
|
-
* notice can be exercised again. Not used at runtime.
|
|
107
|
-
*/
|
|
108
|
-
export function __resetEnvAliasStateForTests() {
|
|
109
|
-
oldKeysUsed.clear();
|
|
110
|
-
deprecationLogged = false;
|
|
111
|
-
}
|
|
112
|
-
//# sourceMappingURL=env-alias.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"env-alias.js","sourceRoot":"","sources":["../../src/config/env-alias.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,0EAA0E;AAC1E,MAAM,WAAW,GAAG,IAAI,GAAG,EAAU,CAAC;AAEtC;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAc,EAAE,MAAc;IAC9D,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACjC,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACpC,MAAM,KA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A4B;IAC1C,WAAW,CAAC,KAAK,EAAE,CAAC;IACpB,iBAAiB,GAAG,KAAK,CAAC;AAC5B,CAAC"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/** Embedded KAIROS logo SVG (source asset: `logo/kairos-mcp.svg`). */
|
|
2
|
-
export declare const KAIROS_LOGO_SVG: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"512\" height=\"512\" viewBox=\"0 0 512 512\">\n <title>KAIROS MCP Logo</title>\n <defs>\n <linearGradient id=\"grad-a\" x1=\"64\" y1=\"64\" x2=\"448\" y2=\"448\" gradientUnits=\"userSpaceOnUse\">\n <stop offset=\"0\" stop-color=\"#7C3AED\"/>\n <stop offset=\"0.5\" stop-color=\"#06B6D4\"/>\n <stop offset=\"1\" stop-color=\"#22C55E\"/>\n </linearGradient>\n <linearGradient id=\"grad-b\" x1=\"96\" y1=\"416\" x2=\"416\" y2=\"96\" gradientUnits=\"userSpaceOnUse\">\n <stop offset=\"0\" stop-color=\"#F97316\"/>\n <stop offset=\"1\" stop-color=\"#FACC15\"/>\n </linearGradient>\n</defs>\n <rect width=\"512\" height=\"512\" rx=\"112\" fill=\"#08111F\"/>\n <path d=\"M118 336c48 0 48-160 96-160s48 160 96 160s48-160 96-160\" fill=\"none\" stroke=\"#223454\" stroke-width=\"24\" stroke-linecap=\"round\"/>\n <path d=\"M118 336c48 0 48-160 96-160s48 160 96 160s48-160 96-160\" fill=\"none\" stroke=\"url(#grad-a)\" stroke-width=\"12\" stroke-linecap=\"round\"/>\n <g>\n <circle cx=\"118\" cy=\"336\" r=\"20\" fill=\"#F8FAFC\"/>\n <circle cx=\"214\" cy=\"176\" r=\"20\" fill=\"#F97316\"/>\n <circle cx=\"310\" cy=\"336\" r=\"20\" fill=\"#06B6D4\"/>\n <circle cx=\"406\" cy=\"176\" r=\"20\" fill=\"#22C55E\"/>\n </g>\n</svg>\n";
|
|
3
|
-
//# sourceMappingURL=kairos-logo-embedded.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kairos-logo-embedded.d.ts","sourceRoot":"","sources":["../../src/mcp-apps/kairos-logo-embedded.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,eAAO,MAAM,eAAe,EAAG,y0CAAk1C,CAAC"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/** Embedded KAIROS logo SVG (source asset: `logo/kairos-mcp.svg`). */
|
|
2
|
-
export const KAIROS_LOGO_SVG = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"512\" height=\"512\" viewBox=\"0 0 512 512\">\n <title>KAIROS MCP Logo</title>\n <defs>\n <linearGradient id=\"grad-a\" x1=\"64\" y1=\"64\" x2=\"448\" y2=\"448\" gradientUnits=\"userSpaceOnUse\">\n <stop offset=\"0\" stop-color=\"#7C3AED\"/>\n <stop offset=\"0.5\" stop-color=\"#06B6D4\"/>\n <stop offset=\"1\" stop-color=\"#22C55E\"/>\n </linearGradient>\n <linearGradient id=\"grad-b\" x1=\"96\" y1=\"416\" x2=\"416\" y2=\"96\" gradientUnits=\"userSpaceOnUse\">\n <stop offset=\"0\" stop-color=\"#F97316\"/>\n <stop offset=\"1\" stop-color=\"#FACC15\"/>\n </linearGradient>\n</defs>\n <rect width=\"512\" height=\"512\" rx=\"112\" fill=\"#08111F\"/>\n <path d=\"M118 336c48 0 48-160 96-160s48 160 96 160s48-160 96-160\" fill=\"none\" stroke=\"#223454\" stroke-width=\"24\" stroke-linecap=\"round\"/>\n <path d=\"M118 336c48 0 48-160 96-160s48 160 96 160s48-160 96-160\" fill=\"none\" stroke=\"url(#grad-a)\" stroke-width=\"12\" stroke-linecap=\"round\"/>\n <g>\n <circle cx=\"118\" cy=\"336\" r=\"20\" fill=\"#F8FAFC\"/>\n <circle cx=\"214\" cy=\"176\" r=\"20\" fill=\"#F97316\"/>\n <circle cx=\"310\" cy=\"336\" r=\"20\" fill=\"#06B6D4\"/>\n <circle cx=\"406\" cy=\"176\" r=\"20\" fill=\"#22C55E\"/>\n </g>\n</svg>\n";
|
|
3
|
-
//# sourceMappingURL=kairos-logo-embedded.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kairos-logo-embedded.js","sourceRoot":"","sources":["../../src/mcp-apps/kairos-logo-embedded.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,MAAM,CAAC,MAAM,eAAe,GAAG,y0CAAk1C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kairos-server-ui-capability.d.ts","sourceRoot":"","sources":["../../src/mcp-apps/kairos-server-ui-capability.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,6BAA6B;;;;;;CAMhC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kairos-server-ui-capability.js","sourceRoot":"","sources":["../../src/mcp-apps/kairos-server-ui-capability.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEjH;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,UAAU,EAAE;QACV,CAAC,mBAAmB,CAAC,EAAE;YACrB,SAAS,EAAE,CAAC,sBAAsB,EAAE,wBAAwB,CAAC;SAC9D;KACF;CACO,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kairos-ui-constants.d.ts","sourceRoot":"","sources":["../../src/mcp-apps/kairos-ui-constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,EAAG,2BAAoC,CAAC;AAEzE,iEAAiE;AACjE,eAAO,MAAM,wBAAwB,EAAG,+BAAwC,CAAC;AAEjF;;;GAGG;AACH,eAAO,MAAM,8BAA8B,EAAG,mCA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|
-
/**
|
|
2
|
-
* MCP Apps (SEP-1865) identifiers for KAIROS / SquadRules.
|
|
3
|
-
*
|
|
4
|
-
* Host-owned chrome (tool row icon, connector tile) is outside MCP; branding
|
|
5
|
-
* here applies to server-delivered HTML inside the chat widget iframe only.
|
|
6
|
-
*
|
|
7
|
-
* Both `ui://kairos/*` (prior) and `ui://squadrules/*` (new) URIs are
|
|
8
|
-
* registered as available resources. The prior URIs remain the values used
|
|
9
|
-
* in tools/list `_meta.ui.resourceUri` for this release because hosts cache
|
|
10
|
-
* them aggressively.
|
|
11
|
-
*/
|
|
12
|
-
export const KAIROS_SPACES_UI_URI = 'ui://kairos/spaces-result';
|
|
13
|
-
/** SquadRules-branded alias for {@link KAIROS_SPACES_UI_URI}. */
|
|
14
|
-
export const SQUADRULES_SPACES_UI_URI = 'ui://squadrules/spaces-result';
|
|
15
|
-
/**
|
|
16
|
-
* Same spaces widget HTML as {@link KAIROS_SPACES_UI_URI} for hosts that expect
|
|
17
|
-
* the Skybridge-style HTML MIME profile (mirrors common `ui://open-ai/...` URIs).
|
|
18
|
-
*/
|
|
19
|
-
export const KAIROS_SPACES_UI_SKYBRIDGE_URI = 'ui://open-ai/kairos/spaces-result';
|
|
20
|
-
/** SquadRules-branded alias for {@link KAIROS_SPACES_UI_SKYBRIDGE_URI}. */
|
|
21
|
-
export const SQUADRULES_SPACES_UI_SKYBRIDGE_URI = 'ui://open-ai/squadrules/spaces-result';
|
|
22
|
-
/** MCP Apps HTML resource for inline `forward` tool results. */
|
|
23
|
-
export const KAIROS_FORWARD_UI_URI = 'ui://kairos/forward-result';
|
|
24
|
-
/** SquadRules-branded alias for {@link KAIROS_FORWARD_UI_URI}. */
|
|
25
|
-
export const SQUADRULES_FORWARD_UI_URI = 'ui://squadrules/forward-result';
|
|
26
|
-
/** Same forward widget with Skybridge HTML MIME profile. */
|
|
27
|
-
export const KAIROS_FORWARD_UI_SKYBRIDGE_URI = 'ui://open-ai/kairos/forward-result';
|
|
28
|
-
/** SquadRules-branded alias for {@link KAIROS_FORWARD_UI_SKYBRIDGE_URI}. */
|
|
29
|
-
export const SQUADRULES_FORWARD_UI_SKYBRIDGE_URI = 'ui://open-ai/squadrules/forward-result';
|
|
30
|
-
/** MCP Apps HTML resource for inline `activate` tool results (adapter choices). */
|
|
31
|
-
export const KAIROS_ACTIVATE_UI_URI = 'ui://kairos/activate-result';
|
|
32
|
-
/** SquadRules-branded alias for {@link KAIROS_ACTIVATE_UI_URI}. */
|
|
33
|
-
export const SQUADRULES_ACTIVATE_UI_URI = 'ui://squadrules/activate-result';
|
|
34
|
-
/** Same activate widget with Skybridge HTML MIME profile. */
|
|
35
|
-
export const KAIROS_ACTIVATE_UI_SKYBRIDGE_URI = 'ui://open-ai/kairos/activate-result';
|
|
36
|
-
/** SquadRules-branded alias for {@link KAIROS_ACTIVATE_UI_SKYBRIDGE_URI}. */
|
|
37
|
-
export const SQUADRULES_ACTIVATE_UI_SKYBRIDGE_URI = 'ui://open-ai/squadrules/activate-result';
|
|
38
|
-
/**
|
|
39
|
-
* Flat `resourceUri` metadata key mirrored beside `_meta.ui.resourceUri` for hosts
|
|
40
|
-
* that expect the shape normalized by `@modelcontextprotocol/ext-apps` `registerAppTool`.
|
|
41
|
-
*/
|
|
42
|
-
export const KAIROS_UI_RESOURCE_URI_FLAT_META_KEY = 'ui/resourceUri';
|
|
43
|
-
/** `forward` tool: MCP Apps widget binding (tools/list + registerTool). */
|
|
44
|
-
export const KAIROS_FORWARD_TOOL_UI_META = {
|
|
45
|
-
ui: {
|
|
46
|
-
resourceUri: KAIROS_FORWARD_UI_URI,
|
|
47
|
-
visibility: ['model', 'app']
|
|
48
|
-
},
|
|
49
|
-
[KAIROS_UI_RESOURCE_URI_FLAT_META_KEY]: KAIROS_FORWARD_UI_URI
|
|
50
|
-
};
|
|
51
|
-
/** `activate` tool: MCP Apps widget binding (tools/list + registerTool). */
|
|
52
|
-
export const KAIROS_ACTIVATE_TOOL_UI_META = {
|
|
53
|
-
ui: {
|
|
54
|
-
resourceUri: KAIROS_ACTIVATE_UI_URI,
|
|
55
|
-
visibility: ['model', 'app']
|
|
56
|
-
},
|
|
57
|
-
[KAIROS_UI_RESOURCE_URI_FLAT_META_KEY]: KAIROS_ACTIVATE_UI_URI
|
|
58
|
-
};
|
|
59
|
-
/** `spaces` tool: MCP Apps widget binding (tools/list + registerTool). */
|
|
60
|
-
export const KAIROS_SPACES_TOOL_UI_META = {
|
|
61
|
-
ui: {
|
|
62
|
-
resourceUri: KAIROS_SPACES_UI_URI,
|
|
63
|
-
visibility: ['model', 'app']
|
|
64
|
-
},
|
|
65
|
-
[KAIROS_UI_RESOURCE_URI_FLAT_META_KEY]: KAIROS_SPACES_UI_URI
|
|
66
|
-
};
|
|
67
|
-
/** SEP-1865 extension id (`io.modelcontextprotocol/ui`). */
|
|
68
|
-
export const MCP_UI_EXTENSION_ID = 'io.modelcontextprotocol/ui';
|
|
69
|
-
/** MVP MCP Apps HTML MIME type (matches `@modelcontextprotocol/ext-apps` RESOURCE_MIME_TYPE). */
|
|
70
|
-
export const MCP_APP_HTML_MIME_TYPE = 'text/html;profile=mcp-app';
|
|
71
|
-
/** Skybridge / OpenAI-style widget HTML MIME type (same document shape, different profile). */
|
|
72
|
-
export const SKYBRIDGE_HTML_MIME_TYPE = 'text/html+skybridge';
|
|
73
|
-
// ---------------------------------------------------------------------------
|
|
74
|
-
// SquadRules-branded tool _meta bindings (available for future switch-over)
|
|
75
|
-
// ---------------------------------------------------------------------------
|
|
76
|
-
/** `forward` tool: SquadRules-branded widget binding. */
|
|
77
|
-
export const SQUADRULES_FORWARD_TOOL_UI_META = {
|
|
78
|
-
ui: {
|
|
79
|
-
resourceUri: SQUADRULES_FORWARD_UI_URI,
|
|
80
|
-
visibility: ['model', 'app']
|
|
81
|
-
},
|
|
82
|
-
[KAIROS_UI_RESOURCE_URI_FLAT_META_KEY]: SQUADRULES_FORWARD_UI_URI
|
|
83
|
-
};
|
|
84
|
-
/** `activate` tool: SquadRules-branded widget binding. */
|
|
85
|
-
export const SQUADRULES_ACTIVATE_TOOL_UI_META = {
|
|
86
|
-
ui: {
|
|
87
|
-
resourceUri: SQUADRULES_ACTIVATE_UI_URI,
|
|
88
|
-
visibility: ['model', 'app']
|
|
89
|
-
},
|
|
90
|
-
[KAIROS_UI_RESOURCE_URI_FLAT_META_KEY]: SQUADRULES_ACTIVATE_UI_URI
|
|
91
|
-
};
|
|
92
|
-
/** `spaces` tool: SquadRules-branded widget binding. */
|
|
93
|
-
export const SQUADRULES_SPACES_TOOL_UI_META = {
|
|
94
|
-
ui: {
|
|
95
|
-
resourceUri: SQUADRULES_SPACES_UI_URI,
|
|
96
|
-
visibility: ['model', 'app']
|
|
97
|
-
},
|
|
98
|
-
[KAIROS_UI_RESOURCE_URI_FLAT_META_KEY]: SQUADRULES_SPACES_UI_URI
|
|
99
|
-
};
|
|
100
|
-
//# sourceMappingURL=kairos-ui-constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kairos-ui-constants.js","sourceRoot":"","sources":["../../src/mcp-apps/kairos-ui-constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,2BAAoC,CAAC;AAEzE,iEAAiE;AACjE,MAAM,CAAC,MAAM,wBAAwB,GAAG,+BAAwC,CAAC;AAEjF;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,mCAA4C,CAAC;AAE3F,2EAA2E;AAC3E,MAAM,CAAC,MAAM,kCAAkC,GAAG,uCAAgD,CAAC;AAEnG,gEAAgE;AAChE,MAAM,CAAC,MAAM,qBAAqB,GAAG,4BAAqC,CAAC;AAE3E,kEAAkE;AAClE,MAAM,CAAC,MAAM,yBAAyB,GAAG,gCAAyC,CAAC;AAEnF,4DAA4D;AAC5D,MAAM,CAAC,MAAM,+BAA+B,GAAG,oCAA6C,CAAC;AAE7F,4EAA4E;AAC5E,MAAM,CAAC,MAAM,mC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E;AAE9E,yDAAyD;AACzD,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,EAAE,EAAE;QACF,WAAW,EAAE,yBAAyB;QACtC,UAAU,EAAE,CAAC,OAAO,EAAE,KAAK,CAAU;KACtC;IACD,CAAC,oCAAoC,CAAC,EAAE,yBAAyB;CACzD,CAAC;AAEX,0DAA0D;AAC1D,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,EAAE,EAAE;QACF,WAAW,EAAE,0BAA0B;QACvC,UAAU,EAAE,CAAC,OAAO,EAAE,KAAK,CAAU;KACtC;IACD,CAAC,oCAAoC,CAAC,EAAE,0BAA0B;CAC1D,CAAC;AAEX,wDAAwD;AACxD,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,EAAE,EAAE;QACF,WAAW,EAAE,wBAAwB;QACrC,UAAU,EAAE,CAAC,OAAO,EAAE,KAAK,CAAU;KACtC;IACD,CAAC,oCAAoC,CAAC,EAAE,wBAAwB;CACxD,CAAC"}
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kairos-challenge-display.d.ts","sourceRoot":"","sources":["../../src/tools/kairos-challenge-display.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAmB,MAAM,oBAAoB,CAAC;AAkBjF,qGAAqG;AACrG,wBAAgB,6BAA6B,CAAC,KAAK,CAAC,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAqEpG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kairos-challenge-display.js","sourceRoot":"","sources":["../../src/tools/kairos-challenge-display.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EACL,uBAAuB,EACvB,+BAA+B,EAC/B,wBAAwB,EACzB,MAAM,iCAAiC,C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,EAAE,CAAC;YAClD,MAAM,CAAC,aAAa,CAAC,GAAG,2CAA2C,SAAS,iGAAiG,CAAC;YAC9K,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC;QAChD,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACL,IAAI,EAAE,SAA4B;QAClC,WAAW,EAAE,8HAA8H;KAC5I,CAAC;IACF,IAAI,CAAC,YAAY,CAAC,GAAG,YAAY,CAAC;IAClC,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kairos-genesis-proof-hash.d.ts","sourceRoot":"","sources":["../../src/tools/kairos-genesis-proof-hash.ts"],"names":[],"mappings":"AAEA,2DAA2D;AAC3D,eAAO,MAAM,YAAY,QAA8D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kairos-genesis-proof-hash.js","sourceRoot":"","sources":["../../src/tools/kairos-genesis-proof-hash.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,2DAA2D;AAC3D,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kairos-uri.d.ts","sourceRoot":"","sources":["../../src/tools/kairos-uri.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,4BAA4B,QAGxC,CAAC;AACF,eAAO,MAAM,wBAAwB,QAGpC,CAAC;AACF,eAAO,MAAM,qBAAqB,QAGjC,CAAC;AAEF,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG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import{a as e,p as t,y as n}from"./vendor-DGTQ2S8W.js";import{t as r}from"./react-CR5VJ85Q.js";import{n as i,r as a}from"./SpaceSelect-DDhPkDXU.js";import{t as o}from"./SurfaceCard-CRidnDLP.js";var s=r();function c(){let{t:r}=n(),c=t(),{data:l,isLoading:u,isError:d}=a(),f=e=>{e.preventDefault();let t=e.currentTarget.querySelector(`input[name="q"]`)?.value?.trim()??``;c(t?`/kairos?q=${encodeURIComponent(t)}`:`/kairos`)},p=l?.spaces??[],m=u||d||p.length===0;return(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`h1`,{className:`text-[var(--color-text-heading)] text-2xl font-semibold mb-1`,children:r(`home.title`)}),(0,s.jsx)(`p`,{className:`text-sm text-[var(--color-text-muted)] mb-6`,children:r(`home.tagline`)}),(0,s.jsx)(o,{title:r(`home.findCardTitle`),subtitle:r(`home.findCardSubtitle`),className:`mb-6`,children:(0,s.jsxs)(`form`,{onSubmit:f,className:`grid gap-3 md:grid-cols-[1fr_auto] md:items-end`,"aria-label":r(`home.searchLabel`),children:[(0,s.jsxs)(`div`,{children:[(0,s.jsx)(`label`,{htmlFor:`home-search-query`,className:`block font-medium text-[var(--color-text-heading)] mb-2`,children:r(`home.searchLabel`)}),(0,s.jsx)(`input`,{id:`home-search-query`,name:`q`,type:`search`,autoComplete:`off`,placeholder:r(`home.searchPlaceholder`),"aria-describedby":`home-search-hint`,className:`w-full min-h-[44px] px-4 py-2 border border-[var(--color-border)] rounded-[var(--radius-md)] text-[var(--color-text)] bg-[var(--color-surface)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`}),(0,s.jsx)(`p`,{id:`home-search-hint`,className:`text-sm text-[var(--color-text-muted)] mt-2`,children:r(`home.searchHint`)})]}),(0,s.jsxs)(`div`,{className:`flex flex-wrap gap-2 md:flex-col md:items-stretch`,children:[(0,s.jsx)(`button`,{type:`submit`,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center px-4 py-2 rounded-[var(--radius-md)] font-medium bg-[var(--color-primary)] text-white border-0 cursor-pointer hover:bg-[var(--color-primary-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:r(`kairos.search`)}),(0,s.jsx)(e,{to:`/kairos`,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center px-4 py-2 rounded-[var(--radius-md)] font-medium border border-[var(--color-border)] bg-[var(--color-surface)] text-[var(--color-text)] no-underline hover:bg-[var(--color-surface-elevated)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:r(`home.goToBrowse`)})]})]})}),(0,s.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-3 mb-6`,children:[(0,s.jsx)(o,{title:r(`home.cardBrowseTitle`),subtitle:r(`home.cardBrowseSubtitle`),children:(0,s.jsx)(e,{to:`/kairos`,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center px-4 py-2 rounded-[var(--radius-md)] font-medium bg-[var(--color-primary)] text-white no-underline hover:bg-[var(--color-primary-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:r(`home.cardBrowseCta`)})}),(0,s.jsx)(o,{title:r(`home.cardCreateTitle`),subtitle:r(`home.cardCreateSubtitle`),children:(0,s.jsx)(e,{to:`/protocols/new`,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center px-4 py-2 rounded-[var(--radius-md)] font-medium border border-[var(--color-border)] bg-[var(--color-surface)] text-[var(--color-text)] no-underline hover:bg-[var(--color-surface-elevated)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:r(`home.cardCreateCta`)})}),(0,s.jsx)(o,{title:r(`home.cardRunsTitle`),subtitle:r(`home.cardRunsSubtitle`),children:(0,s.jsx)(e,{to:`/runs`,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center px-4 py-2 rounded-[var(--radius-md)] font-medium border border-[var(--color-border)] bg-[var(--color-surface)] text-[var(--color-text)] no-underline hover:bg-[var(--color-surface-elevated)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:r(`home.cardRunsCta`)})})]}),(0,s.jsxs)(`section`,{"aria-labelledby":`home-stats-heading`,children:[(0,s.jsx)(`h2`,{id:`home-stats-heading`,className:`text-lg font-semibold text-[var(--color-text-heading)] mb-2`,children:r(`home.spacesHeading`)}),(0,s.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2 lg:grid-cols-3`,"aria-label":r(`home.statsLabel`),children:[m&&p.length===0?(0,s.jsxs)(`div`,{className:`rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface-elevated)] p-4`,children:[(0,s.jsx)(`span`,{className:`text-2xl font-semibold text-[var(--color-text-heading)]`,children:`—`}),(0,s.jsx)(`span`,{className:`block text-xs uppercase tracking-wide text-[var(--color-text-muted)] mt-1`,children:r(`home.stats.spacesLabel`)}),(0,s.jsx)(`span`,{className:`block text-sm text-[var(--color-text-muted)] mt-2`,children:r(`home.stats.protocolCount`,{count:0})})]}):null,p.map(e=>(0,s.jsxs)(`div`,{className:`rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface-elevated)] p-4`,children:[(0,s.jsx)(`div`,{className:`text-2xl font-semibold text-[var(--color-text-heading)]`,children:u?`—`:e.adapter_count}),(0,s.jsxs)(`div`,{className:`mt-1 flex flex-wrap items-center gap-2`,children:[(0,s.jsx)(`span`,{className:`text-xs uppercase tracking-wide text-[var(--color-text-muted)]`,children:e.name}),(0,s.jsx)(i,{type:e.type})]}),(0,s.jsx)(`div`,{className:`mt-2 text-sm text-[var(--color-text-muted)]`,children:u?`—`:r(`home.stats.protocolCount`,{count:e.adapter_count})})]},e.space_id))]})]})]})}export{c as HomePage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{a as t,g as n,s as r,y as i}from"./vendor-DGTQ2S8W.js";import{i as a,t as o}from"./react-CR5VJ85Q.js";import{t as s}from"./api-BgTb-tmJ.js";import{n as c,r as l,t as u}from"./SpaceSelect-DDhPkDXU.js";import{t as d}from"./ErrorAlert-BQMph5Nh.js";var f=e(a(),1);async function p(e,t){let n={query:e.trim()},r=t?.space?.trim();r&&(n.space=r),t?.max_choices!=null&&(n.max_choices=t.max_choices);let i=await s(`/api/activate`,{method:`POST`,body:JSON.stringify(n)});if(!i.ok){let e=await i.json().catch(()=>({}));throw Error(e.message??i.statusText)}return await i.json()}function m(e,t,n){let r=e.trim();return{queryKey:[`activate`,r,(n?.space?.trim()??``)||null,n?.max_choices??null],queryFn:()=>p(r,n),enabled:t&&r.length>0}}function h(e,t,r){return n(m(e,t,r))}var g=o();function _(){return(0,g.jsx)(`ul`,{className:`list-none p-0 m-0 space-y-2`,role:`list`,"aria-hidden":`true`,children:[1,2,3].map(e=>(0,g.jsxs)(`li`,{className:`rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface-elevated)] p-4 flex justify-between items-start gap-4`,children:[(0,g.jsxs)(`div`,{className:`flex-1 min-w-0 space-y-2`,children:[(0,g.jsx)(`div`,{className:`h-5 w-3/4 rounded bg-[var(--color-border)] animate-pulse`}),(0,g.jsx)(`div`,{className:`h-4 w-1/2 rounded bg-[var(--color-border)] animate-pulse`}),(0,g.jsx)(`div`,{className:`h-5 w-16 rounded bg-[var(--color-border)] animate-pulse`})]}),(0,g.jsx)(`div`,{className:`h-10 w-20 rounded-[var(--radius-md)] bg-[var(--color-border)] animate-pulse flex-shrink-0`})]},e))})}function v(e){return typeof e!=`number`||Number.isNaN(e)?0:Math.round(Math.max(0,Math.min(e,1))*100)}var y=`ABCDEFGHIJKLMNOPQRSTUVWXYZ`.split(``);function b(e){let t=[];for(let n of e??[])for(let e of n.adapters??[])t.push({adapter_id:e.adapter_id,title:e.title,layer_count:e.layer_count,slug:e.slug,uri:e.uri,space_name:n.name,space_type:n.type});let n=new Map,r=[];for(let e of t){let t=(e.adapter_id??``).trim();if(!t){r.push(e);continue}let i=n.get(t);i?(e.layer_count??0)>(i.layer_count??0)&&n.set(t,e):n.set(t,e)}let i=[...n.values(),...r],a={};for(let e of y)a[e]=0;for(let e of i){let t=(e.title??``).trim().charAt(0).toUpperCase();y.includes(t)&&(a[t]=(a[t]??0)+1)}return{browseAdapters:i,countsByLetter:a}}function x(e){let{t:n,spacesLoading:r,browseAdapters:i,countsByLetter:a}=e,[o,s]=(0,f.useState)(null),l=(0,f.useMemo)(()=>o?i.filter(e=>(e.title??``).trim().charAt(0).toUpperCase()===o).sort((e,t)=>(e.title??``).localeCompare(t.title??``,void 0,{sensitivity:`base`})):[],[i,o]),u=i.length>0;return(0,g.jsxs)(`section`,{"aria-labelledby":`browse-by-label-heading`,children:[(0,g.jsx)(`h2`,{id:`browse-by-label-heading`,className:`text-lg font-semibold text-[var(--color-text-heading)] mb-3`,children:n(`kairos.browseByLabel`)}),(0,g.jsx)(`p`,{className:`text-sm text-[var(--color-text-muted)] mb-4`,children:n(`kairos.browseByLetterHint`)}),!r&&!u?(0,g.jsx)(`p`,{className:`text-sm text-[var(--color-text-muted)]`,children:n(`kairos.browseEmpty`)}):null,!r&&u?(0,g.jsx)(`div`,{className:`flex flex-wrap gap-2 mb-4`,role:`group`,"aria-label":n(`kairos.browseByLabel`),children:y.map(e=>{let t=a[e]??0;return(0,g.jsxs)(`button`,{type:`button`,onClick:()=>s(t=>t===e?null:e),"aria-expanded":o===e,"aria-controls":`browse-letter-panel-${e}`,"aria-pressed":o===e,"aria-label":n(`kairos.letterCount`,{letter:e,count:t}),className:`min-h-[var(--layout-touch-target)] min-w-[var(--layout-touch-target)] inline-flex items-center justify-center rounded-[var(--radius-md)] border px-3 py-2 text-sm font-medium transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2 ${o===e?`border-[var(--color-primary)] bg-[var(--color-surface-elevated)] text-[var(--color-primary)]`:`border-[var(--color-border)] bg-[var(--color-surface)] text-[var(--color-text)] hover:bg-[var(--color-surface-elevated)]`}`,children:[e,`: `,t]},e)})}):null,o&&!r&&u?(0,g.jsxs)(`div`,{id:`browse-letter-panel-${o}`,role:`region`,"aria-labelledby":`browse-letter-panel-heading`,"aria-live":`polite`,className:`rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface-elevated)] p-5`,children:[(0,g.jsx)(`h3`,{id:`browse-letter-panel-heading`,className:`text-base font-semibold text-[var(--color-text-heading)] mb-3`,children:n(`kairos.labelsStartingWith`,{letter:o})}),l.length===0?(0,g.jsx)(`p`,{className:`text-sm text-[var(--color-text-muted)]`,children:n(`kairos.noLabelsForLetter`)}):(0,g.jsx)(`ul`,{className:`m-0 list-none space-y-2 p-0`,role:`list`,"aria-label":n(`kairos.labelsStartingWith`,{letter:o}),children:l.map(e=>(0,g.jsxs)(`li`,{className:`flex flex-col gap-3 rounded-[var(--radius-sm)] border border-[var(--color-border)] bg-[var(--color-surface)] p-3 sm:flex-row sm:items-center sm:justify-between`,children:[(0,g.jsxs)(`div`,{className:`min-w-0 flex flex-col gap-1`,children:[(0,g.jsx)(`span`,{className:`font-medium text-[var(--color-text-heading)]`,children:e.title}),(0,g.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,g.jsx)(c,{type:e.space_type}),(0,g.jsx)(`span`,{className:`text-xs text-[var(--color-text-muted)]`,children:e.space_name})]})]}),(0,g.jsx)(`div`,{className:`flex-shrink-0`,children:(0,g.jsx)(t,{to:`/protocols/${encodeURIComponent(e.uri)}`,"aria-label":n(`kairos.viewProtocol`,{title:e.title}),className:`min-h-[var(--layout-touch-target)] min-w-[var(--layout-touch-target)] inline-flex items-center justify-center px-4 py-2 rounded-[var(--radius-md)] font-medium bg-[var(--color-primary)] text-white no-underline hover:bg-[var(--color-primary-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:n(`kairos.view`)})})]},e.adapter_id))})]}):null]})}function S(e){let{t:n,choices:r,topScore:i,roleBadgeClass:a}=e;return(0,g.jsxs)(g.Fragment,{children:[r.length>0&&(0,g.jsx)(`p`,{id:`kairos-results-summary`,className:`text-sm text-[var(--color-text-muted)] mb-4`,"aria-live":`polite`,role:`status`,children:n(`kairos.foundMatches`,{count:r.length,top:i==null?0:Math.round(i)})}),(0,g.jsx)(`ul`,{className:`list-none p-0 m-0 space-y-2`,role:`list`,"aria-label":n(`kairos.resultsLabel`),children:r.map(e=>(0,g.jsxs)(`li`,{className:`rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface-elevated)] p-5 flex justify-between items-start gap-4`,children:[(0,g.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,g.jsx)(`span`,{className:`font-medium text-[var(--color-text-heading)] block`,children:e.label}),(0,g.jsxs)(`div`,{className:`text-sm text-[var(--color-text-muted)] mt-1`,children:[e.adapter_name??(e.role===`refine`?n(`kairos.refineMeta`):e.role===`create`?n(`kairos.createMeta`):``),e.role===`match`&&e.space_name!=null&&e.space_name.length>0&&(0,g.jsxs)(g.Fragment,{children:[` `,`· `,n(`kairos.spaceLabel`),`: `,e.space_name]}),e.activation_score!=null&&` · ${n(`kairos.score`)}: ${v(e.activation_score)}%`,e.adapter_version&&` · ${n(`kairos.version`)}: ${e.adapter_version}`]}),(0,g.jsx)(`span`,{className:`inline-block mt-1 text-xs uppercase tracking-wide px-2 py-0.5 rounded ${a[e.role]??`bg-[var(--color-surface)] text-[var(--color-text-muted)]`}`,"aria-label":`Role: ${e.role}`,children:e.role}),e.tags?.length>0&&(0,g.jsx)(`div`,{className:`flex flex-wrap gap-1 mt-2`,"aria-label":n(`kairos.tagsLabel`),children:e.tags.slice(0,8).map(e=>(0,g.jsx)(`span`,{className:`inline-block text-xs px-2 py-0.5 rounded bg-[var(--color-surface)] border border-[var(--color-border)] text-[var(--color-text-muted)]`,children:e},e))})]}),(0,g.jsxs)(`div`,{className:`flex-shrink-0`,children:[e.role===`match`&&(0,g.jsx)(t,{to:`/protocols/${encodeURIComponent(e.uri)}`,"aria-label":n(`kairos.viewProtocol`,{title:e.label}),className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center px-4 py-2 rounded-[var(--radius-md)] font-medium bg-[var(--color-primary)] text-white no-underline hover:bg-[var(--color-primary-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:n(`kairos.view`)}),e.role===`refine`&&(0,g.jsx)(t,{to:`/protocols/${encodeURIComponent(e.uri)}`,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center px-4 py-2 rounded-[var(--radius-md)] font-medium bg-[var(--color-primary)] text-white no-underline hover:bg-[var(--color-primary-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:n(`kairos.refineSearch`)}),e.role===`create`&&(0,g.jsx)(t,{to:`/protocols/new`,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center px-4 py-2 rounded-[var(--radius-md)] font-medium bg-[var(--color-primary)] text-white no-underline hover:bg-[var(--color-primary-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:n(`kairos.createNew`)})]})]},e.uri))})]})}var C={match:`bg-[var(--badge-match-bg)] text-[var(--badge-match-fg)]`,refine:`bg-[var(--badge-refine-bg)] text-[var(--badge-refine-fg)]`,create:`bg-[var(--badge-create-bg)] text-[var(--badge-create-fg)]`};function w(){let{t:e}=i(),[n,a]=r(),o=n.get(`q`)??``,s=n.get(`space`)??``,[c,p]=(0,f.useState)(o),[m,y]=(0,f.useState)(o),[w,T]=(0,f.useState)(s),[E,D]=(0,f.useState)(s),O=E.trim(),{data:k,isLoading:A,isError:j,error:M,refetch:N}=h(m,!!m,{...O?{space:O}:{}}),P=!m,{data:F,isLoading:I,isError:L,error:R,refetch:z}=l(!0,{includeAdapterTitles:P});(0,f.useEffect)(()=>{let e=n.get(`q`)??``,t=n.get(`space`)??``;p(e),y(e),T(t),D(t)},[n]);let B=e=>{e.preventDefault(),y(c),D(w);let t={};c.trim()&&(t.q=c.trim()),w.trim()&&(t.space=w.trim()),a(t,{replace:!0})},V=k?.choices??[],H={match:0,refine:1,create:2},U=V.slice().sort((e,t)=>{let n=(H[e.role]??99)-(H[t.role]??99);if(n!==0)return n;let r=e.activation_score??-1;return(t.activation_score??-1)-r}),W=U.length>0?Math.max(...U.map(e=>v(e.activation_score))):null,{browseAdapters:G,countsByLetter:K}=(0,f.useMemo)(()=>b(F?.spaces),[F?.spaces]);return(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`h1`,{className:`text-[var(--color-text-heading)] text-2xl font-semibold mb-1`,children:e(`kairos.title`)}),(0,g.jsx)(`p`,{className:`text-sm text-[var(--color-text-muted)] mb-6`,children:e(`kairos.searchHint`)}),(0,g.jsxs)(`section`,{className:`mb-8`,"aria-labelledby":`browse-search-label`,children:[(0,g.jsx)(`h2`,{id:`browse-search-label`,className:`sr-only`,children:e(`kairos.searchLabel`)}),(0,g.jsxs)(`form`,{onSubmit:B,"aria-label":e(`kairos.searchLabel`),children:[(0,g.jsx)(`label`,{htmlFor:`kairos-search-query`,className:`block font-medium text-[var(--color-text-heading)] mb-2`,children:e(`kairos.searchLabel`)}),(0,g.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-[1fr_auto] md:items-end mb-4`,children:[(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`input`,{id:`kairos-search-query`,type:`search`,value:c,onChange:e=>p(e.target.value),placeholder:e(`kairos.searchPlaceholder`),"aria-describedby":`kairos-search-hint`,className:`w-full min-h-[44px] px-4 py-2 border border-[var(--color-border)] rounded-[var(--radius-md)] text-[var(--color-text)] bg-[var(--color-surface)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`}),(0,g.jsx)(`p`,{id:`kairos-search-hint`,className:`text-sm text-[var(--color-text-muted)] mt-2`,children:e(`kairos.searchHintShort`)})]}),(0,g.jsx)(`div`,{className:`flex md:pb-0 pb-0`,children:(0,g.jsx)(`button`,{type:`submit`,className:`min-h-[44px] min-w-[44px] px-4 py-2 rounded-[var(--radius-md)] font-medium bg-[var(--color-primary)] text-white border-0 cursor-pointer hover:bg-[var(--color-primary-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`kairos.search`)})})]}),(0,g.jsxs)(`div`,{className:`max-w-md mb-6`,children:[(0,g.jsx)(`label`,{htmlFor:`kairos-activate-space`,className:`block text-sm font-medium text-[var(--color-text-heading)] mb-2`,children:e(`kairos.scopeSpaceLabel`)}),(0,g.jsx)(u,{id:`kairos-activate-space`,spaces:F?.spaces,value:w,onChange:T,includeAllOption:!0,disabled:I,"aria-describedby":`kairos-search-hint`})]})]})]}),j&&(0,g.jsx)(d,{message:M instanceof Error?M.message:String(M),onRetry:()=>N(),showGoBack:!0}),P&&L&&(0,g.jsx)(d,{message:R instanceof Error?R.message:String(R),onRetry:()=>z(),showGoBack:!0}),A&&m&&(0,g.jsxs)(`div`,{className:`mb-4`,"aria-live":`polite`,"aria-busy":`true`,children:[(0,g.jsx)(`p`,{className:`sr-only`,children:e(`kairos.loading`)}),(0,g.jsx)(_,{})]}),P&&I&&(0,g.jsxs)(`div`,{className:`mb-4`,"aria-live":`polite`,"aria-busy":`true`,children:[(0,g.jsx)(`p`,{className:`sr-only`,children:e(`kairos.loading`)}),(0,g.jsx)(_,{})]}),!A&&!j&&!(P&&L)&&(0,g.jsx)(g.Fragment,{children:m?U.length===0?(0,g.jsxs)(`div`,{className:`rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface-elevated)] p-6`,role:`status`,"aria-live":`polite`,children:[(0,g.jsx)(`p`,{className:`text-[var(--color-text-muted)] mb-4`,children:e(`kairos.empty`)}),(0,g.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,g.jsx)(t,{to:`/kairos`,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center px-4 py-2 rounded-[var(--radius-md)] font-medium border border-[var(--color-border)] text-[var(--color-text)] no-underline hover:bg-[var(--color-surface-elevated)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`kairos.refineSearch`)}),(0,g.jsx)(t,{to:`/protocols/new`,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center px-4 py-2 rounded-[var(--radius-md)] font-medium bg-[var(--color-primary)] text-white border-0 no-underline hover:bg-[var(--color-primary-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`kairos.createNew`)})]})]}):m?(0,g.jsx)(S,{t:e,choices:U,topScore:W,roleBadgeClass:C}):null:(0,g.jsx)(x,{t:e,spacesLoading:I,browseAdapters:G,countsByLetter:K})})]})}export{w as KairosPage};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{a as t,m as n,p as r,t as i,y as a}from"./vendor-DGTQ2S8W.js";import{i as o,t as s}from"./react-CR5VJ85Q.js";import{t as c}from"./api-BgTb-tmJ.js";import{r as l,t as u}from"./SpaceSelect-DDhPkDXU.js";import{t as d}from"./SurfaceCard-CRidnDLP.js";import{a as f,i as p,n as m,o as h,r as g,s as _,t as v}from"./export-skill-zip-CIyOWxuI.js";import{t as y}from"./ChallengeCard-gY-n7rwI.js";import{t as b}from"./RichTextEditor-uun0UIVc.js";var x=e(o(),1),S=i().min(1,`Protocol content is required`).refine(e=>e.includes(`# `),`Protocol must have an H1 title`).refine(e=>/(^|\n)##\s+Activation Patterns\b/i.test(e),`Include an "Activation Patterns" section (H2)`).refine(e=>/(^|\n)##\s+Reward Signal\b/i.test(e),`Include a "Reward Signal" section (H2)`),C={label:`Step`,bodyMarkdown:`What the user or agent does in this step.`,type:`comment`,comment:{min_length:10}},w=[`shell`,`mcp`,`user_input`,`comment`],T=/^(?:kairos|squadrules):\/\/adapter\/[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,E=s();function D({t:e,fileInputRef:n,onUpload:r,isNew:i,decodedUri:a}){return(0,E.jsx)(d,{className:`mb-8`,title:e(`protocolEdit.importCardTitle`),subtitle:e(`protocolEdit.uploadHint`),children:(0,E.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,E.jsx)(`input`,{ref:n,type:`file`,accept:`.md,text/markdown`,onChange:r,className:`sr-only`,id:`protocol-upload`,"aria-label":e(`protocolEdit.upload`)}),(0,E.jsx)(`button`,{type:`button`,onClick:()=>n.current?.click(),className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-2 text-sm font-medium text-[var(--color-text)] hover:bg-[var(--color-surface-elevated)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`protocolEdit.upload`)}),!i&&a&&(0,E.jsx)(t,{to:`/protocols/${encodeURIComponent(a)}/skill`,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-2 text-sm font-medium text-[var(--color-text)] no-underline hover:bg-[var(--color-surface-elevated)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`protocol.editAsSkill`)})]})})}function O({t:e,preview:n,skillFolderSlug:r,isNew:i,decodedUri:a}){let[o,s]=(0,x.useState)(!1),[c,l]=(0,x.useState)(null);return(0,E.jsxs)(`div`,{className:`space-y-4`,"aria-label":e(`protocolEdit.previewLabel`),children:[(0,E.jsxs)(d,{title:e(`protocolEdit.previewRenderedTitle`),subtitle:e(`protocolEdit.previewRenderedSubtitle`),children:[(0,E.jsx)(`div`,{className:`text-lg font-semibold text-[var(--color-text-heading)]`,children:n.title}),(0,E.jsx)(`div`,{className:`mt-3 space-y-3`,children:n.steps.length===0?(0,E.jsx)(`div`,{className:`text-sm text-[var(--color-text-muted)]`,children:e(`protocolEdit.previewNoSteps`)}):n.steps.slice(0,20).map((t,n)=>(0,E.jsxs)(`div`,{className:`rounded-[var(--radius-sm)] border border-[var(--color-border)] bg-[var(--color-surface)] p-3`,children:[(0,E.jsx)(`div`,{className:`font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.previewStepLine`,{n:n+1,label:t.label})}),(0,E.jsx)(`div`,{className:`mt-1 text-sm text-[var(--color-text-muted)]`,children:y[t.type]??t.type})]},`${t.label}:${n}`))}),(0,E.jsxs)(`div`,{className:`mt-4 border-t border-[var(--color-border)] pt-4 text-sm text-[var(--color-text-muted)]`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsxs)(`strong`,{className:`text-[var(--color-text-heading)]`,children:[e(`protocol.triggers`),`:`]}),` `,n.triggers?e(`protocolEdit.present`):e(`protocolEdit.missing`)]}),(0,E.jsxs)(`div`,{className:`mt-1`,children:[(0,E.jsxs)(`strong`,{className:`text-[var(--color-text-heading)]`,children:[e(`protocol.completion`),`:`]}),` `,n.completion?e(`protocolEdit.present`):e(`protocolEdit.missing`)]})]})]}),!i&&a?(0,E.jsxs)(d,{title:e(`protocolEdit.skillShortcutTitle`),subtitle:e(`protocolEdit.skillShortcutSubtitle`),children:[(0,E.jsxs)(`div`,{className:`rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] p-3`,children:[(0,E.jsxs)(`div`,{className:`font-medium text-[var(--color-text-heading)]`,children:[r,`-skill/`]}),(0,E.jsxs)(`div`,{className:`mt-2 font-mono text-sm text-[var(--color-text-muted)]`,children:[`Skill.md`,(0,E.jsx)(`br`,{}),`references/`,(0,E.jsx)(`br`,{}),`\xA0\xA0KAIROS.md`]})]}),(0,E.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[(0,E.jsx)(t,{to:`/protocols/${encodeURIComponent(a)}/skill`,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-2 text-sm font-medium text-[var(--color-text)] no-underline hover:bg-[var(--color-surface-elevated)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`protocol.editAsSkill`)}),(0,E.jsx)(`button`,{type:`button`,disabled:o,onClick:()=>{(async()=>{if(a){l(null),s(!0);try{let{blob:e,skill_bundle_manifest:t}=await v(a),n=m(t,r);g(e,n)}catch(e){l(e instanceof Error?e.message:String(e))}finally{s(!1)}}})()},className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center rounded-[var(--radius-md)] bg-[var(--color-primary)] px-4 py-2 text-sm font-medium text-white hover:bg-[var(--color-primary-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2 disabled:opacity-60`,children:e(`protocol.downloadAsSkill`)}),c?(0,E.jsx)(`p`,{className:`mt-2 m-0 text-xs text-[var(--color-error)]`,role:`alert`,children:c}):null]})]}):null]})}function k({t:e,isNew:t,spaces:n,spacesLoading:r,targetSpace:i,setTargetSpace:a,forkSourceUri:o,setForkSourceUri:s,moveSpace:c,setMoveSpace:l}){return(0,E.jsx)(`section`,{className:`mb-8 space-y-5 rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface-elevated)] p-5`,children:t?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{htmlFor:`protocol-target-space`,className:`mb-2 block font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.targetSpaceLabel`)}),(0,E.jsx)(u,{id:`protocol-target-space`,spaces:n,value:i,onChange:a,disabled:r}),(0,E.jsx)(`p`,{className:`mt-2 text-sm text-[var(--color-text-muted)]`,children:e(`protocolEdit.targetSpaceHint`)})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{htmlFor:`protocol-fork-source`,className:`mb-2 block font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.forkSourceLabel`)}),(0,E.jsx)(`input`,{id:`protocol-fork-source`,type:`text`,value:o,onChange:e=>s(e.target.value),placeholder:e(`protocolEdit.forkSourcePlaceholder`),autoComplete:`off`,className:`min-h-[44px] w-full max-w-2xl rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-3 text-sm text-[var(--color-text)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`}),(0,E.jsx)(`p`,{className:`mt-2 text-sm text-[var(--color-text-muted)]`,children:e(`protocolEdit.forkSourceHint`)})]})]}):(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{htmlFor:`protocol-move-space`,className:`mb-2 block font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.moveSpaceLabel`)}),(0,E.jsx)(u,{id:`protocol-move-space`,spaces:n,value:c,onChange:l,disabled:r}),(0,E.jsx)(`p`,{className:`mt-2 text-sm text-[var(--color-text-muted)]`,children:e(`protocolEdit.moveSpaceHint`)})]})})}var A=`min-h-[44px] w-full rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-3 text-sm text-[var(--color-text)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,j=`min-h-[44px] w-full rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface-elevated)] px-4 py-3 text-sm text-[var(--color-text)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`;function M({t:e,step:t,index:n,stepsLength:r,uploadKey:i,challengeTypeLabel:a,setStep:o,removeStep:s}){return(0,E.jsxs)(`div`,{className:`rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface-elevated)] p-5 space-y-5`,children:[(0,E.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center justify-between gap-2`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`div`,{className:`text-sm font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.stepHeading`,{n:n+1})}),(0,E.jsx)(`div`,{className:`text-sm text-[var(--color-text-muted)]`,children:e(`protocolEdit.stepEditorHint`)})]}),(0,E.jsx)(`button`,{type:`button`,onClick:()=>s(n),disabled:r<=1,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-2 text-sm font-medium text-[var(--color-text)] hover:bg-[var(--color-surface-elevated)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2 disabled:opacity-50`,children:e(`protocolEdit.removeStep`)})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{className:`mb-2 block font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.stepLabel`)}),(0,E.jsx)(`input`,{type:`text`,value:t.label,onChange:e=>o(n,{label:e.target.value}),className:A})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`div`,{className:`mb-2 font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.challengeType`)}),(0,E.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:w.map(e=>(0,E.jsx)(`button`,{type:`button`,"aria-pressed":t.type===e,onClick:()=>o(n,{type:e,shell:e===`shell`?{cmd:t.shell?.cmd??``,timeout_seconds:t.shell?.timeout_seconds??30,interpreter:t.shell?.interpreter,workdir:t.shell?.workdir,flags:t.shell?.flags??[],args:t.shell?.args??[]}:void 0,mcp:e===`mcp`?{tool_name:t.mcp?.tool_name??``}:void 0,user_input:e===`user_input`?{prompt:t.user_input?.prompt??``}:void 0,comment:e===`comment`?{min_length:t.comment?.min_length??10}:void 0}),className:`min-h-[44px] rounded-[var(--radius-md)] px-4 text-sm font-medium ${t.type===e?`bg-[var(--color-primary)] text-white`:`border border-[var(--color-border)] bg-[var(--color-surface)] text-[var(--color-text)]`}`,children:a[e]},e))})]}),(0,E.jsx)(`div`,{children:(0,E.jsx)(b,{label:e(`protocolEdit.stepContent`),value:t.bodyMarkdown,onChange:e=>o(n,{bodyMarkdown:e}),contentKey:i})}),(0,E.jsxs)(`div`,{className:`rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] p-4`,children:[(0,E.jsx)(`div`,{className:`mb-3 text-sm font-medium text-[var(--color-text-heading)]`,children:`Challenge fields`}),(0,E.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2`,children:[t.type===`shell`&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{className:`mb-2 block text-sm font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.shellCmd`)}),(0,E.jsx)(`input`,{type:`text`,value:t.shell?.cmd??``,onChange:e=>o(n,{shell:{cmd:e.target.value,timeout_seconds:t.shell?.timeout_seconds??30,interpreter:t.shell?.interpreter,workdir:t.shell?.workdir,flags:t.shell?.flags??[],args:t.shell?.args??[]}}),className:j})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{className:`mb-2 block text-sm font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.shellTimeout`)}),(0,E.jsx)(`input`,{type:`number`,min:1,value:t.shell?.timeout_seconds??30,onChange:e=>o(n,{shell:{cmd:t.shell?.cmd??``,timeout_seconds:Math.max(1,Number(e.target.value)||30),interpreter:t.shell?.interpreter,workdir:t.shell?.workdir,flags:t.shell?.flags??[],args:t.shell?.args??[]}}),className:j})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{className:`mb-2 block text-sm font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.shellInterpreter`)}),(0,E.jsx)(`input`,{type:`text`,value:t.shell?.interpreter??``,onChange:e=>o(n,{shell:{cmd:t.shell?.cmd??``,timeout_seconds:t.shell?.timeout_seconds??30,interpreter:e.target.value||void 0,workdir:t.shell?.workdir,flags:t.shell?.flags??[],args:t.shell?.args??[]}}),className:j})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{className:`mb-2 block text-sm font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.shellWorkdir`)}),(0,E.jsx)(`input`,{type:`text`,value:t.shell?.workdir??``,onChange:e=>o(n,{shell:{cmd:t.shell?.cmd??``,timeout_seconds:t.shell?.timeout_seconds??30,interpreter:t.shell?.interpreter,workdir:e.target.value||void 0,flags:t.shell?.flags??[],args:t.shell?.args??[]}}),className:j})]}),(0,E.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,E.jsx)(`label`,{className:`mb-2 block text-sm font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.shellFlags`)}),(0,E.jsx)(`textarea`,{rows:3,value:(t.shell?.flags??[]).join(`
|
|
2
|
-
`),onChange:e=>o(n,{shell:{cmd:t.shell?.cmd??``,timeout_seconds:t.shell?.timeout_seconds??30,interpreter:t.shell?.interpreter,workdir:t.shell?.workdir,flags:e.target.value.split(`
|
|
3
|
-
`).map(e=>e.trim()).filter(Boolean),args:t.shell?.args??[]}}),className:`w-full rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface-elevated)] px-4 py-3 text-sm text-[var(--color-text)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`})]}),(0,E.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,E.jsx)(`label`,{className:`mb-2 block text-sm font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.shellArgs`)}),(0,E.jsx)(`textarea`,{rows:3,value:(t.shell?.args??[]).join(`
|
|
4
|
-
`),onChange:e=>o(n,{shell:{cmd:t.shell?.cmd??``,timeout_seconds:t.shell?.timeout_seconds??30,interpreter:t.shell?.interpreter,workdir:t.shell?.workdir,flags:t.shell?.flags??[],args:e.target.value.split(`
|
|
5
|
-
`).map(e=>e.trim()).filter(Boolean)}}),className:`w-full rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface-elevated)] px-4 py-3 text-sm text-[var(--color-text)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`})]})]}),t.type===`mcp`&&(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{className:`mb-2 block text-sm font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.mcpToolName`)}),(0,E.jsx)(`input`,{type:`text`,value:t.mcp?.tool_name??``,onChange:e=>o(n,{mcp:{tool_name:e.target.value}}),className:j})]}),t.type===`user_input`&&(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{className:`mb-2 block text-sm font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.userInputPrompt`)}),(0,E.jsx)(`input`,{type:`text`,value:t.user_input?.prompt??``,onChange:e=>o(n,{user_input:{prompt:e.target.value}}),className:j})]}),t.type===`comment`&&(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{className:`mb-2 block text-sm font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.commentMinLength`)}),(0,E.jsx)(`input`,{type:`number`,min:1,value:t.comment?.min_length??10,onChange:e=>o(n,{comment:{min_length:Math.max(1,parseInt(e.target.value,10)||10)}}),className:j})]})]})]})]})}function N(){let{t:e}=a(),{uri:i}=n(),o=r(),s=i?decodeURIComponent(i):void 0,u=!s,{data:d,isLoading:m}=_(s,!u),[g,v]=(0,x.useState)({protocolLabel:``,triggersMarkdown:``,steps:[{...C}],completionMarkdown:``}),[y,w]=(0,x.useState)(()=>String(Date.now())),[A,j]=(0,x.useState)(!1),[N,P]=(0,x.useState)(null),[F,I]=(0,x.useState)(null),L=(0,x.useRef)(null),R=(0,x.useRef)(``),[z,B]=(0,x.useState)(``),[V,H]=(0,x.useState)(``),[U,W]=(0,x.useState)(``),{data:G,isLoading:K}=l(!0,{});(0,x.useEffect)(()=>{u&&(B(``),W(``))},[u]),(0,x.useEffect)(()=>{if(!u)return;let e=G?.spaces?.find(e=>e.type===`personal`);B(t=>t===``&&e?e.space_id:t)},[u,G?.spaces]),(0,x.useEffect)(()=>{if(u||!d)return;let e=typeof d.space_id==`string`?d.space_id.trim():``;R.current=e,H(e)},[u,d]),(0,x.useEffect)(()=>{if(d?.content)try{v(h(d.content)),w(String(Date.now()))}catch{v({protocolLabel:d.label||`Protocol`,triggersMarkdown:``,steps:[{...C}],completionMarkdown:``})}},[d]);let q=e=>{let t=e.target.files?.[0];if(!t)return;let n=new FileReader;n.onload=()=>{let e=typeof n.result==`string`?n.result:``;try{v(h(e)),w(String(Date.now())),I(null),P(null)}catch{P(`Could not parse the uploaded file. Use valid protocol markdown.`)}},n.readAsText(t,`UTF-8`),e.target.value=``},J=(e,t)=>{v(n=>({...n,[e]:t}))},Y=(e,t)=>{v(n=>({...n,steps:n.steps.map((n,r)=>r===e?typeof t==`function`?t(n):{...n,...t}:n)}))},X=()=>{v(e=>({...e,steps:[...e.steps,{...C,label:`Step ${e.steps.length+1}`}]}))},Z=e=>{v(t=>({...t,steps:t.steps.filter((t,n)=>n!==e)}))},Q=async t=>{t.preventDefault(),P(null),I(null);let n=p(g),r=S.safeParse(n);if(!r.success){I(r.error.issues[0]?.message??`Invalid`);return}let i=U.trim();if(i&&!T.test(i)){I(e(`protocolEdit.forkUriInvalid`));return}j(!0);try{if(u){let e=z.trim()||`personal`,t=await c(`/api/train`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({content:n,llm_model_id:`kairos-ui`,force_update:!1,space:e,...i?{source_adapter_uri:i}:{}})});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.message??t.statusText)}let r=await t.json(),a=r.items?.[0]?.adapter_uri,s=r.items?.[0]?.uri;o(a?`/protocols/${encodeURIComponent(a)}`:s?`/protocols/${encodeURIComponent(s)}`:`/`)}else{let e=R.current.trim(),t=V.trim(),r={uris:[s],content:[n]};t&&t!==e&&(r.space=t);let i=await c(`/api/tune`,{method:`POST`,body:JSON.stringify(r)});if(!i.ok){let e=await i.json().catch(()=>({}));throw Error(e.message??i.statusText)}o(`/protocols/${encodeURIComponent(s)}`)}}catch(e){P(e instanceof Error?e.message:String(e))}finally{j(!1)}},$=(()=>{try{return f(p(g))}catch{return{title:g.protocolLabel||`Protocol`,steps:[],triggers:``,completion:``}}})();if(!u&&m&&!d)return(0,E.jsx)(`p`,{className:`text-[var(--color-text-muted)]`,children:e(`protocol.loading`)});let ee={shell:e(`protocolEdit.challengeShell`),mcp:e(`protocolEdit.challengeMcp`),user_input:e(`protocolEdit.challengeUserInput`),comment:e(`protocolEdit.challengeComment`)},te=(g.protocolLabel.trim()||$.title||`skill`).replace(/[^a-zA-Z0-9]+/g,`-`).replace(/^-|-$/g,``).toLowerCase()||`skill`;return(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h1`,{className:`mb-1 text-2xl font-semibold text-[var(--color-text-heading)]`,children:e(u?`protocolEdit.newTitle`:`protocolEdit.editTitle`)}),(0,E.jsx)(`p`,{className:`mb-6 text-sm text-[var(--color-text-muted)]`,children:e(`protocolEdit.hint`)}),(0,E.jsx)(k,{t:e,isNew:u,spaces:G?.spaces,spacesLoading:K,targetSpace:z,setTargetSpace:B,forkSourceUri:U,setForkSourceUri:W,moveSpace:V,setMoveSpace:H}),(0,E.jsx)(D,{t:e,fileInputRef:L,onUpload:q,isNew:u,decodedUri:s}),(0,E.jsx)(`form`,{onSubmit:Q,"aria-label":e(`protocolEdit.formLabel`),children:(0,E.jsxs)(`div`,{className:`mb-6 grid gap-6 xl:grid-cols-[1.45fr_1fr]`,children:[(0,E.jsxs)(`div`,{className:`space-y-6`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`label`,{htmlFor:`protocol-label`,className:`mb-2 block font-medium text-[var(--color-text-heading)]`,children:e(`protocolEdit.protocolLabel`)}),(0,E.jsx)(`input`,{id:`protocol-label`,type:`text`,value:g.protocolLabel,onChange:e=>J(`protocolLabel`,e.target.value),className:`min-h-[44px] w-full rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-3 text-sm text-[var(--color-text)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`})]}),(0,E.jsx)(b,{label:e(`protocolEdit.triggersLabel`),hint:e(`protocolEdit.triggersEditorHint`),value:g.triggersMarkdown,onChange:e=>J(`triggersMarkdown`,e),contentKey:y}),g.steps.map((t,n)=>(0,E.jsx)(M,{t:e,step:t,index:n,stepsLength:g.steps.length,uploadKey:y,challengeTypeLabel:ee,setStep:Y,removeStep:Z},n)),(0,E.jsx)(`button`,{type:`button`,onClick:X,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-2 text-sm font-medium text-[var(--color-text)] hover:bg-[var(--color-surface-elevated)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`protocolEdit.addStep`)}),(0,E.jsx)(b,{label:e(`protocolEdit.completionLabel`),value:g.completionMarkdown,onChange:e=>J(`completionMarkdown`,e),contentKey:y}),F&&(0,E.jsx)(`p`,{className:`text-sm text-[var(--color-error)]`,role:`alert`,children:F}),N&&(0,E.jsx)(`div`,{className:`rounded-[var(--radius-md)] bg-[var(--color-error-bg)] p-4 text-[var(--color-error)]`,role:`alert`,children:N}),(0,E.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,E.jsx)(`button`,{type:`submit`,disabled:A,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center rounded-[var(--radius-md)] bg-[var(--color-primary)] px-4 py-2 font-medium text-white hover:bg-[var(--color-primary-hover)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2 disabled:opacity-60`,children:e(A?`protocolEdit.saving`:`protocolEdit.save`)}),(0,E.jsx)(t,{to:u?`/`:`/protocols/${encodeURIComponent(s)}`,className:`min-h-[44px] min-w-[44px] inline-flex items-center justify-center rounded-[var(--radius-md)] border border-[var(--color-border)] bg-[var(--color-surface)] px-4 py-2 font-medium text-[var(--color-text)] no-underline hover:bg-[var(--color-surface-elevated)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] focus-visible:outline-offset-2`,children:e(`protocolEdit.cancel`)})]})]}),(0,E.jsx)(O,{t:e,preview:$,skillFolderSlug:te,isNew:u,decodedUri:s})]})})]})}export{N as ProtocolEditPage};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomePage-DIKsxKaH.js","assets/vendor-DGTQ2S8W.js","assets/rolldown-runtime-hePW80VL.js","assets/react-CR5VJ85Q.js","assets/tiptap-74Cp-fci.js","assets/SpaceSelect-DDhPkDXU.js","assets/api-BgTb-tmJ.js","assets/SurfaceCard-CRidnDLP.js","assets/KairosPage-n5qbiyxb.js","assets/ErrorAlert-BQMph5Nh.js","assets/RunsPage-BijmxS6f.js","assets/useRunSession-062hqhcN.js","assets/ProtocolEditPage-hc87ZsgM.js","assets/export-skill-zip-CIyOWxuI.js","assets/ChallengeCard-gY-n7rwI.js","assets/RichTextEditor-uun0UIVc.js","assets/RunGuidedPage-BbyHZjPU.js","assets/StepFlowGraph-DsL5lsIq.js","assets/SkillBundlePage-BsndXJaC.js","assets/ProtocolDetailPage-C20Yd3q6.js","assets/AccountPage-DBrqe8KI.js","assets/NotFoundPage-Dz-PKC4R.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{_ as t,b as n,c as r,d as i,f as a,i as o,l as s,o as c,u as l,v as u,x as d,y as f}from"./vendor-DGTQ2S8W.js";import{i as p,n as m,t as h}from"./react-CR5VJ85Q.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),d.use(n).init({lng:`en`,fallbackLng:`en`,ns:[`translation`],defaultNS:`translation`,resources:{en:{translation:{"nav.home":`Home`,"nav.kairos":`Browse`,"nav.create":`Create`,"nav.runs":`Test Run`,"nav.account":`Account`,"layout.kairosVersion":`KAIROS v{{version}}`,skipToMain:`Skip to main content`,"home.title":`Home`,"home.tagline":`Start from a clear task: browse protocols, create a new workflow, or continue protocol testing.`,"home.findCardTitle":`Find the right protocol`,"home.findCardSubtitle":`Home stays lightweight. Search and deeper discovery live in Browse.`,"home.goToBrowse":`Go to Browse`,"home.cardBrowseTitle":`Browse protocols`,"home.cardBrowseSubtitle":`Search or browse by label.`,"home.cardBrowseCta":`Open Browse`,"home.cardCreateTitle":`Create protocol`,"home.cardCreateSubtitle":`Use the rendered editor to draft a new workflow.`,"home.cardCreateCta":`Create new`,"home.cardRunsTitle":`Test Run`,"home.cardRunsSubtitle":`Resume a saved test run from this device.`,"home.cardRunsCta":`Open Test Run`,"home.spacesHeading":`Spaces`,"home.searchLabel":`Search protocols`,"home.searchPlaceholder":`e.g. deploy and test`,"home.searchHint":`Enter a query to find the best matching protocol. Results open in Browse.`,"home.statsLabel":`Space and protocol counts`,"home.stats.personalProtocols":`—`,"home.stats.personalProtocolsLabel":`Personal protocols`,"home.stats.kairosApp":`—`,"home.stats.kairosAppLabel":`Kairos app`,"home.stats.spaces":`—`,"home.stats.spacesLabel":`Spaces`,"home.stats.protocolCount":`{{count}} protocol`,"home.stats.protocolCount_plural":`{{count}} protocols`,"home.ctaPre":`Search and manage protocols in`,"home.ctaSuffix":`.`,"kairos.title":`Browse`,"kairos.searchLabel":`Activation query`,"kairos.searchPlaceholder":`e.g. deploy and test`,"kairos.searchHint":`Search or browse by label. The default view lists protocols by their label.`,"kairos.searchHintShort":`Run an activation query to rank the best matches, or browse the list below.`,"kairos.browseByLabel":`Browse by label`,"kairos.browseByLetterHint":`Click a letter to list protocols whose title starts with that letter (A–Z).`,"kairos.letterCount":`Letter {{letter}}, {{count}} protocols`,"kairos.labelsStartingWith":`Labels starting with {{letter}}`,"kairos.noLabelsForLetter":`No protocols starting with this letter.`,"kairos.browseFlatListHint":`Protocols listed by label. This is the default view when you open Browse.`,"kairos.browseEmpty":`No protocols found in your spaces yet.`,"kairos.enterQueryHint":`Enter an activation query above to find the best matching protocol. Results appear below.`,"spaces.filterAll":`All spaces`,"spaces.type.personal":`Personal`,"spaces.type.group":`Group`,"spaces.type.app":`App`,"spaces.type.other":`Other`,"kairos.scopeSpaceLabel":`Limit search to a space`,"kairos.spaceLabel":`Space`,"kairos.search":`Activate`,"kairos.loading":`Activating…`,"kairos.empty":`No matching protocols found`,"kairos.foundMatches":`Found {{count}} activation choices (top confidence: {{top}}%). View one, refine the query, or create a new protocol.`,"kairos.resultsLabel":`Activation results`,"kairos.score":`Score`,"kairos.version":`Version`,"kairos.tagsLabel":`Tags`,"kairos.refineMeta":`Refine query`,"kairos.createMeta":`Start from scratch`,"kairos.view":`View`,"kairos.viewProtocol":`View {{title}}`,"kairos.refineSearch":`Refine query`,"kairos.createNew":`Create new`,"protocol.loading":`Loading protocol…`,"protocol.notFound":`Protocol not found`,"protocol.uri":`URI`,"protocol.spaceLabel":`Space`,"protocol.readOnly":`Read-only`,"protocol.copyUri":`Copy URI`,"protocol.download":`Download`,"protocol.downloadAsMarkdown":`Download as Markdown`,"protocol.downloadAsSkill":`Download as Skill`,"protocol.editAsSkill":`Edit as Skill`,"protocol.expand":`Expand`,"protocol.collapse":`Collapse`,"protocol.edit":`Edit`,"protocol.duplicate":`Duplicate`,"protocol.runGuided":`Test Run`,"protocol.steps":`Steps`,"protocol.stepFlow":`Step flow`,"protocol.exportCardTitle":`Export`,"protocol.exportCardSubtitle":`Clear language replaces internal dump terminology.`,"protocol.exportFooter":`Skill export prepares a portable bundle for external AI tools.`,"protocol.triggers":`Activation patterns`,"protocol.completion":`Reward signal`,"protocol.howToUse":`How to use this protocol`,"protocol.howToUseInProduct":`The public UI helps people read, edit, export, and manually test protocol steps. Live AI execution still happens through MCP or CLI tooling.`,"protocol.howToUseCopy":`Use Test Run from the button above to step through this protocol in the browser. For agents or CLI, use Cursor (MCP) or the command line. See`,"protocol.docsLink":`documentation`,"runs.title":`Test Run`,"runs.subtitle":`Continue a test run you started earlier on this device.`,"runs.empty":`No runs yet.`,"runs.listLabel":`Test Run list`,"runs.status":`Status`,"runs.updated":`Updated`,"runs.stepsDone":`{{count}} steps completed`,"runs.resume":`Resume`,"runs.remove":`Remove`,"run.title":`Test Run`,"run.guidedIntro":`Step through the saved run in the browser and submit the same data the current run flow expects.`,"run.progressHeading":`Progress`,"run.currentStepHeading":`Current step`,"run.challengeHeading":`Challenge`,"run.stepProgress":`Step {{current}} of {{total}}`,"run.sessionBadge":`Active manual test session`,"run.flowStepN":`{{n}}`,"run.copyShellCommand":`Copy command`,"run.adapterUri":`Adapter URI`,"run.backToProtocol":`Back to adapter`,"run.start":`Start run`,"run.starting":`Starting…`,"run.safety.title":`Safe by default`,"run.safety.copy":`This guided run never executes shell commands in your browser. For shell challenges, run the command yourself and paste the real results.`,"run.serverMessage":`Server message`,"run.currentLayer":`Current layer`,"run.layerUri":`Layer URI`,"run.noLayerContent":`(No layer content)`,"run.contract":`Contract`,"run.contractType":`Type`,"run.advanced":`Advanced`,"run.nonce":`Nonce`,"run.proofHash":`Challenge proof_hash`,"run.previousProofHash":`Previous proof_hash`,"run.copy":`Copy`,"run.copied":`Copied`,"run.solution":`Solution`,"run.solutionFormLabel":`Submit solution`,"run.submitStep":`Submit step`,"run.shell.command":`Command`,"run.shell.invocation":`Invocation`,"run.shell.exitCode":`Exit code`,"run.shell.stdout":`Stdout`,"run.shell.stderr":`Stderr`,"run.mcp.toolName":`Tool`,"run.mcp.toolMissing":`(Missing tool name)`,"run.mcp.success":`Success`,"run.mcp.arguments":`Arguments (JSON)`,"run.mcp.result":`Result (JSON)`,"run.userInput.prompt":`Prompt`,"run.userInput.promptMissing":`(Missing prompt)`,"run.userInput.confirmation":`User confirmation`,"run.comment.minLength":`Minimum {{count}} characters`,"run.comment.count":`{{count}} typed`,"run.comment.text":`Comment`,"run.reward.title":`Reward completion`,"run.reward.subtitle":`Finalize the run outcome for reward and export quality.`,"run.reward.outcomeLabel":`Outcome`,"run.reward.success":`Success`,"run.reward.failure":`Failure`,"run.reward.feedback":`Feedback`,"run.reward.submit":`Submit reward`,"run.reward.submitting":`Submitting…`,"run.reward.defaultFeedback":`Completed guided run.`,"run.stepperProgress":`{{completed}} step(s) completed`,"run.history":`History`,"run.historyLabel":`Run history`,"run.completed":`Run completed`,"run.missingUri":`Missing adapter URI.`,"protocolEdit.newTitle":`New protocol`,"protocolEdit.editTitle":`Edit protocol`,"protocolEdit.hint":`Write as a human. The editor renders text on input and output while keeping the saved format compatible with generic Markdown.`,"protocolEdit.stepHeading":`Step {{n}}`,"protocolEdit.stepEditorHint":`Human-friendly editor with Markdown-safe formatting.`,"protocolEdit.triggersEditorHint":`Shown to humans as rendered text and serialized as Markdown-compatible content.`,"protocolEdit.previewRenderedTitle":`Rendered preview`,"protocolEdit.previewRenderedSubtitle":`Reading flow is fully rendered. Editing keeps a Markdown-safe rich text surface and this card previews section structure.`,"protocolEdit.previewStepLine":`Step {{n}}: {{label}}`,"protocolEdit.skillShortcutTitle":`Skill bundle shortcut`,"protocolEdit.skillShortcutSubtitle":`Authors can turn a protocol into a reusable skill bundle without learning repo-internal file names.`,"protocolEdit.formLabel":`Protocol form`,"protocolEdit.protocolLabel":`Protocol label`,"protocolEdit.triggersLabel":`Activation patterns`,"protocolEdit.triggersHint":`Describe when this protocol should run (e.g. deploy and test).`,"protocolEdit.stepLabel":`Step label`,"protocolEdit.stepContent":`Step content`,"protocolEdit.challengeType":`Challenge type`,"protocolEdit.addStep":`Add step`,"protocolEdit.removeStep":`Remove step`,"protocolEdit.completionLabel":`Reward signal`,"protocolEdit.challengeShell":`Shell command`,"protocolEdit.challengeMcp":`MCP tool call`,"protocolEdit.challengeUserInput":`User input`,"protocolEdit.challengeComment":`Comment`,"protocolEdit.shellCmd":`Command`,"protocolEdit.shellTimeout":`Timeout (seconds)`,"protocolEdit.shellInterpreter":`Interpreter (optional)`,"protocolEdit.shellFlags":`Flags (one per line, optional)`,"protocolEdit.shellArgs":`Args (one per line, optional)`,"protocolEdit.shellWorkdir":`Workdir (optional)`,"protocolEdit.mcpToolName":`Tool name`,"protocolEdit.userInputPrompt":`Prompt`,"protocolEdit.commentMinLength":`Minimum length (characters)`,"protocolEdit.importCardTitle":`Import existing content`,"protocolEdit.uploadHint":"Uploading a `.md` file fills this editor form. It does not publish or overwrite anything until you save.","protocolEdit.contentLabel":`Protocol content (markdown)`,"protocolEdit.previewLabel":`Protocol preview`,"protocolEdit.previewTitle":`Live preview`,"protocolEdit.previewSteps":`Steps`,"protocolEdit.previewNoSteps":`No steps yet.`,"protocolEdit.previewSections":`Key sections`,"protocolEdit.present":`present`,"protocolEdit.missing":`missing`,"protocolEdit.insertTemplate":`Insert template`,"protocolEdit.upload":`Upload .md file`,"skill.title":`Edit as Skill`,"skill.subtitle":`Prepare a skill bundle for external AI tools before downloading the zip. Protocol content stays connected to the original workflow.`,"skill.bundleContentsTitle":`Bundle contents`,"skill.bundleContentsSubtitle":`Optional protocol references can be included in a dedicated folder.`,"skill.chipReadme":`Include README snippet`,"skill.chipPrompts":`Include example prompts`,"skill.comingSoon":`Coming soon`,"skill.bundlePreviewTitle":`Bundle preview`,"skill.bundlePreviewSubtitle":`Zip root contains the skill folder so users can upload it directly.`,"skill.whyExportTitle":`Why this export exists`,"skill.whyExportSubtitle":`The bundle is for human-friendly reuse, not an internal raw dump.`,"skill.whyExportBody":`Authors can package a protocol as a portable skill with polished naming and usage guidance, then download the final zip in one step.`,"skill.skillName":`Skill name`,"skill.description":`Skill description`,"skill.descriptionHint":`Describe what the skill does and when an AI assistant should use it.`,"skill.whenToUse":`When to use it`,"skill.includeReferences":`Include references folder`,"skill.downloadAsSkill":`Download as Skill`,"skill.backToProtocol":`Back to protocol`,"protocolEdit.placeholder":`# Protocol title
|
|
3
|
-
|
|
4
|
-
## Activation Patterns
|
|
5
|
-
...
|
|
6
|
-
|
|
7
|
-
## Step 1
|
|
8
|
-
...`,"protocolEdit.contentHint":`Include: Activation Patterns (first H2), steps (H2 + optional challenge block), Reward Signal (last H2).`,"protocolEdit.targetSpaceLabel":`Save to space`,"protocolEdit.targetSpaceHint":`New protocols are stored in the space you pick (default: Personal).`,"protocolEdit.forkSourceLabel":`Fork from adapter (optional)`,"protocolEdit.forkSourcePlaceholder":`kairos://adapter/{slug}`,"protocolEdit.forkSourceHint":`Leave empty for a brand-new protocol, or paste an adapter URI to copy its markdown into the target space as a new adapter.`,"protocolEdit.forkUriInvalid":`Fork source must be a kairos://adapter/{slug} URI.`,"protocolEdit.moveSpaceLabel":`Space for this protocol`,"protocolEdit.moveSpaceHint":`Change the space and save to move every layer to the selected space (same as tune with a space parameter).`,"protocolEdit.save":`Save`,"protocolEdit.saving":`Saving…`,"protocolEdit.cancel":`Cancel`,"account.title":`Account`,"account.intro":`You are signed in. Sign out below or use the options to manage your profile.`,"account.loading":`Loading…`,"account.notSignedIn":`You are not signed in.`,"account.signIn":`Sign in`,"account.name":`Name`,"account.username":`Username`,"account.email":`Email`,"account.emailVerified":`verified`,"account.accountType":`Account type`,"account.realm":`Realm`,"account.identityProvider":`Login provider`,"account.groups":`Groups`,"account.themeTitle":`Theme`,"account.themeDescription":`Choose how KAIROS UI appearance should be rendered.`,"account.themePreferenceLabel":`Theme preference`,"account.themeOptionLight":`Light`,"account.themeOptionDark":`Dark`,"account.themeOptionSystem":`Match system`,"account.logOut":`Log out`,"notFound.title":`Page not found`,"notFound.message":`The page you requested could not be found.`,"notFound.goHome":`Go to Home`,"error.title":`Something went wrong`,"error.retry":`Retry`,"error.goBack":`Go to Home`,"error.support":`Support`}}},interpolation:{escapeValue:!1}});var g=e(p(),1),_=m(),v=`/ui/assets/kairos-mcp-DNiKVgiO.svg`,y=h(),b=e=>e.startsWith(`/protocols`)||e.startsWith(`/runs`);function x(){let{t:e}=f(),t=a().pathname,n=({isActive:e})=>`min-h-[var(--layout-touch-target)] flex items-center px-4 py-3 text-[var(--color-text)] no-underline border-l-[3px] border-transparent outline-offset-2 focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)] hover:bg-[var(--color-surface)] hover:text-[var(--color-text-heading)] ${e?`font-semibold text-[var(--color-primary)] border-l-[var(--color-primary)] bg-[var(--color-surface)]`:``}`,r=b(t)?`min(100%, var(--layout-main-max), var(--layout-main-wide))`:`min(100%, var(--layout-main-max), var(--layout-main-narrow))`;return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(`a`,{href:`#main`,className:`skip-link`,children:e(`skipToMain`)}),(0,y.jsxs)(`div`,{className:`flex min-h-screen`,children:[(0,y.jsxs)(`aside`,{className:`flex min-h-screen w-[var(--layout-sidebar-width)] flex-shrink-0 flex-col border-r border-[var(--color-border)] bg-[var(--color-surface-elevated)] py-4`,"aria-label":`Main navigation`,children:[(0,y.jsx)(`div`,{className:`px-4 pb-4`,children:(0,y.jsxs)(c,{to:`/`,end:!0,className:`flex min-h-[var(--layout-touch-target)] min-w-[var(--layout-touch-target)] items-center gap-3 rounded-md outline-offset-2 focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--color-focus-ring)]`,children:[(0,y.jsx)(`img`,{src:v,alt:``,className:`h-10 w-10 flex-shrink-0 rounded-lg object-contain`,width:`40`,height:`40`}),(0,y.jsxs)(`span`,{className:`flex flex-col leading-tight`,children:[(0,y.jsx)(`span`,{className:`font-bold text-[var(--color-text-heading)] text-lg`,children:`Kairos`}),(0,y.jsx)(`span`,{className:`font-bold text-[var(--color-text-muted)] text-xs uppercase tracking-wide`,children:`MCP`})]})]})}),(0,y.jsxs)(`nav`,{className:`flex min-h-0 flex-1 flex-col gap-0.5`,children:[(0,y.jsx)(c,{to:`/`,end:!0,"aria-current":t===`/`?`page`:void 0,className:n,children:e(`nav.home`)}),(0,y.jsx)(c,{to:`/kairos`,"aria-current":t===`/kairos`?`page`:void 0,className:n,children:e(`nav.kairos`)}),(0,y.jsx)(c,{to:`/protocols/new`,"aria-current":t===`/protocols/new`?`page`:void 0,className:n,children:e(`nav.create`)}),(0,y.jsx)(c,{to:`/runs`,"aria-current":t===`/runs`?`page`:void 0,className:n,children:e(`nav.runs`)}),(0,y.jsx)(c,{to:`/account`,"aria-current":t===`/account`?`page`:void 0,className:n,children:e(`nav.account`)})]}),(0,y.jsx)(`div`,{className:`mt-auto border-t border-[var(--color-border)] px-4 pt-3`,children:(0,y.jsx)(`p`,{className:`m-0 text-xs text-[var(--color-text-muted)]`,children:e(`layout.kairosVersion`,{version:`4.8.6`})})})]}),(0,y.jsx)(`main`,{id:`main`,className:`flex-1 mx-auto w-full py-[var(--layout-main-padding-y)] px-[var(--layout-main-padding-x)]`,style:{maxWidth:r},tabIndex:-1,children:(0,y.jsx)(s,{})})]})]})}var S=(0,g.lazy)(()=>r(()=>import(`./HomePage-DIKsxKaH.js`).then(e=>({default:e.HomePage})),__vite__mapDeps([0,1,2,3,4,5,6,7]))),C=(0,g.lazy)(()=>r(()=>import(`./KairosPage-n5qbiyxb.js`).then(e=>({default:e.KairosPage})),__vite__mapDeps([8,2,1,3,4,6,5,9]))),w=(0,g.lazy)(()=>r(()=>import(`./RunsPage-BijmxS6f.js`).then(e=>({default:e.RunsPage})),__vite__mapDeps([10,1,2,3,4,11]))),T=(0,g.lazy)(()=>r(()=>import(`./ProtocolEditPage-hc87ZsgM.js`).then(e=>({default:e.ProtocolEditPage})),__vite__mapDeps([12,2,1,3,4,6,5,7,13,14,15]))),E=(0,g.lazy)(()=>r(()=>import(`./RunGuidedPage-BbyHZjPU.js`).then(e=>({default:e.RunGuidedPage})),__vite__mapDeps([16,2,1,3,4,6,7,9,14,17,11]))),D=(0,g.lazy)(()=>r(()=>import(`./SkillBundlePage-BsndXJaC.js`).then(e=>({default:e.SkillBundlePage})),__vite__mapDeps([18,2,1,3,4,7,13,6,15]))),O=(0,g.lazy)(()=>r(()=>import(`./ProtocolDetailPage-C20Yd3q6.js`).then(e=>({default:e.ProtocolDetailPage})),__vite__mapDeps([19,2,1,3,4,7,13,6,14,17]))),k=(0,g.lazy)(()=>r(()=>import(`./AccountPage-DBrqe8KI.js`).then(e=>({default:e.AccountPage})),__vite__mapDeps([20,1,2,3,4,6]))),A=(0,g.lazy)(()=>r(()=>import(`./NotFoundPage-Dz-PKC4R.js`).then(e=>({default:e.NotFoundPage})),__vite__mapDeps([21,1,2,3,4,9])));function j(){return(0,y.jsx)(`div`,{className:`flex min-h-[12rem] items-center justify-center text-[var(--color-text-muted)]`,"aria-busy":`true`,children:`Loading…`})}function M(){return(0,y.jsx)(i,{children:(0,y.jsxs)(l,{path:`/`,element:(0,y.jsx)(x,{}),children:[(0,y.jsx)(l,{index:!0,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(S,{})})}),(0,y.jsx)(l,{path:`kairos`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(C,{})})}),(0,y.jsx)(l,{path:`runs`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(w,{})})}),(0,y.jsx)(l,{path:`protocols/new`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(T,{})})}),(0,y.jsx)(l,{path:`protocols/:uri/edit`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(T,{})})}),(0,y.jsx)(l,{path:`protocols/:uri/run`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(E,{})})}),(0,y.jsx)(l,{path:`protocols/:uri/skill`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(D,{})})}),(0,y.jsx)(l,{path:`protocols/:uri`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(O,{})})}),(0,y.jsx)(l,{path:`account`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(k,{})})}),(0,y.jsx)(l,{path:`*`,element:(0,y.jsx)(g.Suspense,{fallback:(0,y.jsx)(j,{}),children:(0,y.jsx)(A,{})})})]})})}function N(){return(0,y.jsx)(o,{basename:`/ui`,children:(0,y.jsx)(M,{})})}var P=[`light`,`dark`],F=`kairos:ui:theme-preference`,I=`(prefers-color-scheme: dark)`,L=`system`;function R(e){return e===null?!1:e===`system`||P.includes(e)}function z(e,t){return e===`system`?t?`dark`:`light`:e}function B(){if(typeof window>`u`)return L;try{let e=window.localStorage.getItem(F);return R(e)?e:L}catch{return L}}function V(){return typeof window>`u`||typeof window.matchMedia!=`function`?!1:window.matchMedia(I).matches}function H(e){if(typeof document>`u`)return;let t=document.documentElement;t.setAttribute(`data-theme`,e),t.style.colorScheme=e===`light`?`light`:`dark`}function U(){let[e,t]=(0,g.useState)(()=>B()),[n,r]=(0,g.useState)(()=>V()),i=(0,g.useMemo)(()=>z(e,n),[e,n]);return(0,g.useEffect)(()=>{H(i)},[i]),(0,g.useEffect)(()=>{if(typeof window>`u`||e!==`system`||typeof window.matchMedia!=`function`)return;let t=window.matchMedia(I);r(t.matches);let n=e=>{r(e.matches)};return typeof t.addEventListener==`function`?(t.addEventListener(`change`,n),()=>t.removeEventListener(`change`,n)):(t.addListener(n),()=>t.removeListener(n))},[e]),(0,g.useEffect)(()=>{if(typeof window>`u`)return;let e=e=>{e.key===`kairos:ui:theme-preference`&&t(R(e.newValue)?e.newValue:L)};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[]),{preference:e,effectiveTheme:i,setPreference:(0,g.useCallback)(e=>{if(t(e),typeof window<`u`)try{window.localStorage.setItem(F,e)}catch{}},[])}}var W=(0,g.createContext)(null);function G({children:e}){let t=U();return(0,y.jsx)(W.Provider,{value:t,children:e})}function K(){let e=(0,g.useContext)(W);if(!e)throw Error(`useThemePreferenceContext must be used within ThemeProvider`);return e}var q=new t;(0,_.createRoot)(document.getElementById(`root`)).render((0,y.jsx)(g.StrictMode,{children:(0,y.jsx)(u,{client:q,children:(0,y.jsx)(G,{children:(0,y.jsx)(N,{})})})}));export{R as n,K as r,P as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t}from"./react-CR5VJ85Q.js";var n=e(t(),1),r=`kairos.runSessions.v1`;function i(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function a(e){if(!e||typeof e!=`object`)return null;let t=e,n=typeof t.adapter_uri==`string`?t.adapter_uri:typeof t.protocol_uri==`string`?t.protocol_uri:null,r=t.current_layer&&typeof t.current_layer==`object`?t.current_layer:t.current_step&&typeof t.current_step==`object`?t.current_step:null,i=t.contract&&typeof t.contract==`object`?t.contract:t.challenge&&typeof t.challenge==`object`?t.challenge:null,a=Array.isArray(t.history)?t.history.map(e=>{if(!e||typeof e!=`object`)return null;let t=e,n=t.layer&&typeof t.layer==`object`?t.layer:t.step&&typeof t.step==`object`?t.step:null,r=t.contract&&typeof t.contract==`object`?t.contract:t.challenge&&typeof t.challenge==`object`?t.challenge:null,i=t.solution&&typeof t.solution==`object`?t.solution:null,a=typeof t.submitted_at==`string`?t.submitted_at:null;return!n||!r||!i||!a?null:{layer:n,contract:r,solution:i,submitted_at:a,...typeof t.proof_hash==`string`?{proof_hash:t.proof_hash}:{},...typeof t.server_message==`string`?{server_message:t.server_message}:{}}}).filter(e=>e!==null):[],o=t.status===`ready_to_attest`?`ready_to_reward`:t.status===`running`||t.status===`ready_to_reward`||t.status===`completed`||t.status===`error`?t.status:null;return!n||typeof t.id!=`string`||typeof t.started_at!=`string`||typeof t.updated_at!=`string`||!o||!i?null:{id:t.id,adapter_uri:n,started_at:t.started_at,updated_at:t.updated_at,status:o,current_layer:r,contract:i,...typeof t.next_action==`string`?{next_action:t.next_action}:{},...typeof t.last_message==`string`?{last_message:t.last_message}:{},...typeof t.previous_proof_hash==`string`?{previous_proof_hash:t.previous_proof_hash}:{},...typeof t.reward_uri==`string`?{reward_uri:t.reward_uri}:typeof t.attest_uri==`string`?{reward_uri:t.attest_uri}:{},history:a}}function o(){let e=i(typeof window<`u`?window.localStorage.getItem(r):null);return Array.isArray(e)?e.map(e=>a(e)).filter(e=>e!==null):[]}function s(e){window.localStorage.setItem(r,JSON.stringify(e))}function c(){let[e,t]=(0,n.useState)([]);return(0,n.useEffect)(()=>{typeof window<`u`&&t(o())},[]),{sessions:e,refresh:(0,n.useCallback)(()=>{t(o())},[]),upsert:(0,n.useCallback)(e=>{let n=o(),r=n.findIndex(t=>t.id===e.id),i=r>=0?[...n.slice(0,r),e,...n.slice(r+1)]:[e,...n];s(i),t(i)},[]),remove:(0,n.useCallback)(e=>{let n=o().filter(t=>t.id!==e);s(n),t(n)},[])}}function l(e){let{sessions:t,upsert:r}=c();return{session:(0,n.useMemo)(()=>t.find(t=>t.id===e)??null,[t,e]),update:(0,n.useCallback)(e=>{r(e)},[r])}}export{c as n,l as t};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Parser for the comma-separated env `KAIROS_LOCAL_ARTIFACT_DIRS` that defines
|
|
3
|
-
* the ordered URI hints emitted as `kairos_local_artifact_dir` in tool
|
|
4
|
-
* responses. The server never resolves these to absolute paths; the client
|
|
5
|
-
* picks one and resolves on its own filesystem (see `src/embed-docs/tools/`).
|
|
6
|
-
*
|
|
7
|
-
* Rebrand: the default hints prefer `squadrules` paths and retain the prior
|
|
8
|
-
* `kairos` paths as fallbacks so existing installations keep working. The env
|
|
9
|
-
* var name (`KAIROS_LOCAL_ARTIFACT_DIRS`) is unchanged.
|
|
10
|
-
*/
|
|
11
|
-
export declare const KAIROS_LOCAL_ARTIFACT_DIRS_DEFAULT = "project://.local/squadrules/work,user://.config/squadrules/work,project://.local/kairos/work,user://.config/kairos/work";
|
|
12
|
-
export declare function parseLocalArtifactDirHints(raw: string): readonly string[];
|
|
13
|
-
//# sourceMappingURL=kairos-local-artifact-dirs.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kairos-local-artifact-dirs.d.ts","sourceRoot":"","sources":["../../src/utils/kairos-local-artifact-dirs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,eAAO,MAAM,kCAAkC,4HAC4E,CAAC;AAE5H,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CA8BzE"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Parser for the comma-separated env `KAIROS_LOCAL_ARTIFACT_DIRS` that defines
|
|
3
|
-
* the ordered URI hints emitted as `kairos_local_artifact_dir` in tool
|
|
4
|
-
* responses. The server never resolves these to absolute paths; the client
|
|
5
|
-
* picks one and resolves on its own filesystem (see `src/embed-docs/tools/`).
|
|
6
|
-
*
|
|
7
|
-
* Rebrand: the default hints prefer `squadrules` paths and retain the prior
|
|
8
|
-
* `kairos` paths as fallbacks so existing installations keep working. The env
|
|
9
|
-
* var name (`KAIROS_LOCAL_ARTIFACT_DIRS`) is unchanged.
|
|
10
|
-
*/
|
|
11
|
-
export const KAIROS_LOCAL_ARTIFACT_DIRS_DEFAULT = 'project://.local/squadrules/work,user://.config/squadrules/work,project://.local/kairos/work,user://.config/kairos/work';
|
|
12
|
-
export function parseLocalArtifactDirHints(raw) {
|
|
13
|
-
const items = raw
|
|
14
|
-
.split(',')
|
|
15
|
-
.map((s) => s.trim())
|
|
16
|
-
.filter(Boolean);
|
|
17
|
-
if (items.length === 0) {
|
|
18
|
-
throw new Error('KAIROS_LOCAL_ARTIFACT_DIRS must list at least one hint (e.g. project://.local/squadrules/work)');
|
|
19
|
-
}
|
|
20
|
-
for (const hint of items) {
|
|
21
|
-
const match = /^(project|user):\/\/(.+)$/.exec(hint);
|
|
22
|
-
if (!match) {
|
|
23
|
-
throw new Error(`Invalid scheme in KAIROS_LOCAL_ARTIFACT_DIRS entry "${hint}". Use project://<rel> or user://<rel>.`);
|
|
24
|
-
}
|
|
25
|
-
const rel = match[2];
|
|
26
|
-
if (rel.startsWith('/')) {
|
|
27
|
-
throw new Error(`KAIROS_LOCAL_ARTIFACT_DIRS entry "${hint}" must use a safe relative path; absolute paths are not allowed.`);
|
|
28
|
-
}
|
|
29
|
-
if (rel.split('/').includes('..')) {
|
|
30
|
-
throw new Error(`KAIROS_LOCAL_ARTIFACT_DIRS entry "${hint}" must not contain ".." segments.`);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return Object.freeze(items);
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=kairos-local-artifact-dirs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kairos-local-artifact-dirs.js","sourceRoot":"","sources":["../../src/utils/kairos-local-artifact-dirs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAC7C,yHAAyH,CAAC;AAE5H,MAAM,UAAU,0BAA0B,CAAC,GAAW;IACpD,MAAM,KAAK,GAAG,GAAG;SACd,KAAK,CAAC,GAAG,CAAC;SACV,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SACpB,MAAM,CAAC,OAAO,CAAC,CAAC;IACnB,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CACb,gGAAgG,CACjG,CAAC;IACJ,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,KAAK,GAAG,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CACb,uDAAuD,IAAI,yCAAyC,CACrG,CAAC;QACJ,CAAC;QACD,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAE,CAAC;QACtB,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CACb,qCAAqC,IAAI,kEAAkE,CAC5G,CAAC;QACJ,CAAC;QACD,IAAI,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CACb,qCAAqC,IAAI,mCAAmC,CAC7E,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC"}
|