@squadrules/mcp 4.8.6 → 5.0.0-beta.1
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 +14 -12
- 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/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 +27 -27
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +40 -43
- 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-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-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 +7 -7
- 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.js +4 -4
- package/dist/resources/mem-resources-boot.js.map +1 -1
- package/dist/resources/mem-uuid-mapper.js +3 -3
- 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.js +8 -8
- 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/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.js +1 -1
- 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.map +1 -1
- package/dist/services/memory-store.js +3 -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/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/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/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.js +17 -17
- 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.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 +1 -1
- package/dist/tools/skill-export/enumerate-space-adapters.js +2 -2
- 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.js +7 -7
- 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-B0ali9jz.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-DIySo-F_.js +5 -0
- 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-DtOlpupj.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-BlCipoHI.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 +16 -0
- package/dist/utils/squadrules-user-dirs.d.ts.map +1 -0
- package/dist/utils/squadrules-user-dirs.js +55 -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 +4 -6
- 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
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
slug: bulk-insert-adapters-via-cli
|
|
3
|
-
version: "
|
|
4
|
-
title: Bulk Insert Adapters via
|
|
3
|
+
version: "5.0.0-beta.1"
|
|
4
|
+
title: Bulk Insert Adapters via SQUADRULES CLI
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Bulk Insert Adapters via
|
|
7
|
+
# Bulk Insert Adapters via SQUADRULES CLI
|
|
8
8
|
|
|
9
9
|
## Activation Patterns
|
|
10
10
|
|
|
11
|
-
Batch-register multiple
|
|
12
|
-
`
|
|
11
|
+
Batch-register multiple SQUADRULES adapters from a local directory tree using the
|
|
12
|
+
`squadrules train` CLI. Handles directory scanning, validation, space targeting,
|
|
13
13
|
and error recovery for bulk operations.
|
|
14
14
|
|
|
15
15
|
**Run this protocol when the user says ANY of:**
|
|
@@ -17,8 +17,8 @@ and error recovery for bulk operations.
|
|
|
17
17
|
- "bulk insert adapters" / "bulk train adapters"
|
|
18
18
|
- "train all protocols in a directory"
|
|
19
19
|
- "batch register adapters from folder"
|
|
20
|
-
- "upload all .md files to
|
|
21
|
-
- "sync local protocols to
|
|
20
|
+
- "upload all .md files to SQUADRULES"
|
|
21
|
+
- "sync local protocols to SQUADRULES" / "push protocols to SQUADRULES"
|
|
22
22
|
- "train directory recursively" / "train --recursive"
|
|
23
23
|
|
|
24
24
|
**Trigger pattern:** **bulk** / **batch** / **all** / **directory** / **recursive** +
|
|
@@ -40,29 +40,29 @@ and error recovery for bulk operations.
|
|
|
40
40
|
|
|
41
41
|
**Good trigger examples:**
|
|
42
42
|
|
|
43
|
-
- "Train all adapters in
|
|
43
|
+
- "Train all adapters in squadrules-v4/_personal/" → run this protocol
|
|
44
44
|
- "Bulk insert the protocols from my export folder" → run this protocol
|
|
45
45
|
- "Push all .md files in this directory to my personal space" → run this protocol
|
|
46
46
|
|
|
47
47
|
**Bad trigger examples:**
|
|
48
48
|
|
|
49
|
-
- "Train this one protocol" → use `
|
|
49
|
+
- "Train this one protocol" → use `squadrules train <file>` directly
|
|
50
50
|
- "Create a new protocol" → use `create-new-protocol`
|
|
51
|
-
- "Export my adapters" → use `
|
|
51
|
+
- "Export my adapters" → use `squadrules export`
|
|
52
52
|
|
|
53
53
|
## Preflight Dependencies
|
|
54
54
|
|
|
55
55
|
Verify before execution:
|
|
56
56
|
|
|
57
|
-
1. `
|
|
58
|
-
2. Authentication is valid (`
|
|
57
|
+
1. `squadrules` CLI is installed and callable (`squadrules --version`).
|
|
58
|
+
2. Authentication is valid (`squadrules token` returns a token without error).
|
|
59
59
|
3. Target directory path exists and contains at least one `.md` file.
|
|
60
|
-
4. If a space is specified, confirm it exists via `
|
|
60
|
+
4. If a space is specified, confirm it exists via `squadrules spaces`.
|
|
61
61
|
|
|
62
62
|
If any check fails, stop and report the issue with remediation guidance.
|
|
63
63
|
|
|
64
64
|
```json
|
|
65
|
-
{"contract":{"type":"shell","shell":{"cmd":"
|
|
65
|
+
{"contract":{"type":"shell","shell":{"cmd":"squadrules --version && squadrules token > /dev/null 2>&1 && echo 'auth: ok'","timeout_seconds":15},"required":true}}
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
## Confirm Scope
|
|
@@ -83,7 +83,7 @@ List the files that will be trained and ask for confirmation.
|
|
|
83
83
|
|
|
84
84
|
## Validate Structure
|
|
85
85
|
|
|
86
|
-
Before training, validate each `.md` file against
|
|
86
|
+
Before training, validate each `.md` file against SQUADRULES adapter requirements:
|
|
87
87
|
|
|
88
88
|
- Has an H1 title.
|
|
89
89
|
- First H2 is "Activation Patterns".
|
|
@@ -101,10 +101,10 @@ Report any files that fail validation. Ask user whether to:
|
|
|
101
101
|
|
|
102
102
|
## Execute Bulk Train
|
|
103
103
|
|
|
104
|
-
Run the batch train operation using the
|
|
104
|
+
Run the batch train operation using the SQUADRULES CLI:
|
|
105
105
|
|
|
106
106
|
```
|
|
107
|
-
|
|
107
|
+
squadrules train <directory> --recursive --model <model> --space <space> [--force]
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
If the directory contains files that should NOT be trained (README, reference
|
|
@@ -115,7 +115,7 @@ docs), either:
|
|
|
115
115
|
Capture stdout and stderr. The CLI reports per-file status.
|
|
116
116
|
|
|
117
117
|
```json
|
|
118
|
-
{"contract":{"type":"shell","shell":{"cmd":"
|
|
118
|
+
{"contract":{"type":"shell","shell":{"cmd":"squadrules train <directory> --recursive --model <model_id> --space <space>","timeout_seconds":120},"required":true}}
|
|
119
119
|
```
|
|
120
120
|
|
|
121
121
|
## Report Results
|
|
@@ -134,7 +134,7 @@ For each failure, report:
|
|
|
134
134
|
- Error message
|
|
135
135
|
- Suggested fix
|
|
136
136
|
|
|
137
|
-
If all succeeded, confirm adapter URIs are accessible via `
|
|
137
|
+
If all succeeded, confirm adapter URIs are accessible via `squadrules spaces`.
|
|
138
138
|
|
|
139
139
|
```json
|
|
140
140
|
{"contract":{"type":"comment","comment":{"min_length":80},"required":true}}
|
|
@@ -149,4 +149,4 @@ Protocol complete when:
|
|
|
149
149
|
- Any failures have been documented with remediation guidance.
|
|
150
150
|
|
|
151
151
|
A successful bulk insert means the user's local protocol library is now
|
|
152
|
-
registered in
|
|
152
|
+
registered in SQUADRULES and available for activation by AI agents.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
version: "
|
|
2
|
+
version: "5.0.0-beta.1"
|
|
3
3
|
slug: challenge-type-guide
|
|
4
4
|
title: Challenge Type Selection Guide
|
|
5
5
|
---
|
|
@@ -9,7 +9,7 @@ title: Challenge Type Selection Guide
|
|
|
9
9
|
# Challenge Type Selection Guide
|
|
10
10
|
|
|
11
11
|
Decision rules, JSON formats, interpreter selection, and anti-patterns for
|
|
12
|
-
choosing
|
|
12
|
+
choosing SQUADRULES challenge types. Loaded by protocol-authoring agents during
|
|
13
13
|
drafting and review.
|
|
14
14
|
|
|
15
15
|
## Activation Patterns
|
|
@@ -49,7 +49,7 @@ code — use `shell` or `mcp` instead.
|
|
|
49
49
|
|
|
50
50
|
**Mode before challenge type:**
|
|
51
51
|
- **clarify / approve** → `user_input`
|
|
52
|
-
- **call a
|
|
52
|
+
- **call a SQUADRULES / MCP tool** → `mcp`
|
|
53
53
|
- **execute or verify local state** → `shell`
|
|
54
54
|
- **pure reasoning with no observable artifact** → `comment`
|
|
55
55
|
|
|
@@ -81,7 +81,7 @@ Does the step call an MCP tool?
|
|
|
81
81
|
|
|
82
82
|
**mcp with arguments (chain link)**
|
|
83
83
|
```json
|
|
84
|
-
{"contract":{"type":"mcp","mcp":{"tool_name":"forward","arguments":{"uri":"
|
|
84
|
+
{"contract":{"type":"mcp","mcp":{"tool_name":"forward","arguments":{"uri":"squadrules://adapter/<slug>"}},"required":true}}
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
Use the `arguments` form when the step's purpose is to invoke a specific
|
|
@@ -190,7 +190,7 @@ escaping, rewrite in Perl. If you need imports for data formats, use Python.
|
|
|
190
190
|
|
|
191
191
|
## Security and Working Directory Rules
|
|
192
192
|
|
|
193
|
-
Use `$
|
|
193
|
+
Use `$SQUADRULES_LOCAL_ARTIFACT_DIR` as the base directory for local handoff
|
|
194
194
|
artifacts. File paths within it are provided as variables by the invoking agent
|
|
195
195
|
to avoid collisions between parallel sessions.
|
|
196
196
|
|
|
@@ -198,10 +198,10 @@ to avoid collisions between parallel sessions.
|
|
|
198
198
|
- all file paths in shell challenges reference variables (e.g., `$DRAFT_FILE`,
|
|
199
199
|
`$VERDICT_FILE`) set by the parent agent — never hardcode filenames
|
|
200
200
|
- the parent agent constructs collision-free paths under
|
|
201
|
-
`$
|
|
202
|
-
- when using
|
|
201
|
+
`$SQUADRULES_LOCAL_ARTIFACT_DIR` (e.g., with a session ID or random suffix)
|
|
202
|
+
- when using SQUADRULES MCP, the latest `activate` / `forward` / `next` response field `squadrules_local_artifact_dir` is an ordered array of URI hints (`project://<rel>`, `user://<rel>`); pick one (`project://` when you have exactly one project context, otherwise `user://`), resolve on your machine, and `export SQUADRULES_LOCAL_ARTIFACT_DIR="<absolute>"` if your shell does not already define it
|
|
203
203
|
- if the server-returned path is not usable on your local filesystem, resolve
|
|
204
|
-
locally to `$PROJECT_DIR/.local/
|
|
204
|
+
locally to `$PROJECT_DIR/.local/squadrules/work` and keep it stable for the run
|
|
205
205
|
- prerequisites create the directory
|
|
206
206
|
- Reward Signal cleans it up
|
|
207
207
|
- never write credentials or secrets to files
|
|
@@ -224,7 +224,7 @@ to avoid collisions between parallel sessions.
|
|
|
224
224
|
- print the final status marker to stderr when stdout is machine-readable
|
|
225
225
|
- preserve the original status exactly:
|
|
226
226
|
```bash
|
|
227
|
-
( set -o pipefail; <command> ); rc=$?; printf '\
|
|
227
|
+
( set -o pipefail; <command> ); rc=$?; printf '\nSQUADRULES_SHELL_EXIT=%s\n' "$rc" >&2; exit "$rc"
|
|
228
228
|
```
|
|
229
229
|
- keep `&&` inside `<command>` for ordered checks; use the final
|
|
230
230
|
`; rc=$?; ...` trailer only to capture, print, and return the process status
|
|
@@ -258,7 +258,7 @@ to avoid collisions between parallel sessions.
|
|
|
258
258
|
- NOT a replacement for layers — layers remain the primary unit of work
|
|
259
259
|
- example contract:
|
|
260
260
|
```json
|
|
261
|
-
{"contract":{"type":"mcp","mcp":{"tool_name":"forward","arguments":{"uri":"
|
|
261
|
+
{"contract":{"type":"mcp","mcp":{"tool_name":"forward","arguments":{"uri":"squadrules://adapter/implement-plan"}},"required":true}}
|
|
262
262
|
```
|
|
263
263
|
|
|
264
264
|
```json
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
slug: create-new-protocol
|
|
3
|
-
version: "
|
|
4
|
-
title: Create / Review / Refactor
|
|
3
|
+
version: "5.0.0-beta.1"
|
|
4
|
+
title: Create / Review / Refactor SQUADRULES Protocol
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
# Create / Review / Refactor
|
|
9
|
+
# Create / Review / Refactor SQUADRULES Protocol
|
|
10
10
|
|
|
11
|
-
> **Note to the agent:**
|
|
11
|
+
> **Note to the agent:** SQUADRULES protocols are interfaces for AI agents — you
|
|
12
12
|
> are the primary user. When you author a protocol, you design behaviour for
|
|
13
13
|
> yourself and others. Write for them: single source of truth (never duplicate
|
|
14
14
|
> rules), explicit over implicit (agents fill ambiguity with hallucination),
|
|
@@ -18,7 +18,7 @@ title: Create / Review / Refactor KAIROS Protocol
|
|
|
18
18
|
|
|
19
19
|
## Activation Patterns
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
SQUADRULES authoring lifecycle — create, review, or update adapters / protocols / workflows.
|
|
22
22
|
In this context, those words refer to the same stored artifact and can be treated
|
|
23
23
|
as synonyms. Supports three operations:
|
|
24
24
|
|
|
@@ -31,8 +31,8 @@ as synonyms. Supports three operations:
|
|
|
31
31
|
|
|
32
32
|
**Run this protocol when the user says ANY of:**
|
|
33
33
|
|
|
34
|
-
- "create a new
|
|
35
|
-
- "register personal
|
|
34
|
+
- "create a new SQUADRULES protocol" / "create new protocol adapter"
|
|
35
|
+
- "register personal SQUADRULES adapter" / "register a personal adapter"
|
|
36
36
|
- "train adapter into personal" / "train protocol into personal"
|
|
37
37
|
- "train a workflow" / "register a new adapter" / "create a new workflow"
|
|
38
38
|
- "review protocol" / "audit adapters" / "check protocol families for gaps"
|
|
@@ -63,7 +63,7 @@ as synonyms. Supports three operations:
|
|
|
63
63
|
- Enforce the 350-line limit per file.
|
|
64
64
|
|
|
65
65
|
**Good trigger examples:**
|
|
66
|
-
- "Create a new
|
|
66
|
+
- "Create a new SQUADRULES protocol for code review" → run this protocol (create)
|
|
67
67
|
- "No match found; I want to create a new protocol" → run this protocol (create)
|
|
68
68
|
- "Review all v4 protocol families for missing cross-references" → run this protocol (review)
|
|
69
69
|
- "Update the MR adapter to include a review step" → run this protocol (update)
|
|
@@ -146,7 +146,7 @@ For `update`: ask which adapter to update and what the issue is.
|
|
|
146
146
|
and which parts stay in the router vs extensions.
|
|
147
147
|
|
|
148
148
|
**4. If Chain pattern:** Load `protocol-linking-guide` for full rules
|
|
149
|
-
(`forward` with `
|
|
149
|
+
(`forward` with `squadrules://adapter/protocol-linking-guide`). Collect: chain
|
|
150
150
|
links and concerns, minimum number of links, entry point (matched by
|
|
151
151
|
`activate`), and artifacts flowing between links.
|
|
152
152
|
|
|
@@ -202,7 +202,7 @@ Draft the full markdown for `train`.
|
|
|
202
202
|
|
|
203
203
|
Write a structured gap report to `$REVIEW_FINDINGS_FILE` (an absolute path
|
|
204
204
|
provided by the invoking agent or chosen by you under
|
|
205
|
-
`$
|
|
205
|
+
`$SQUADRULES_LOCAL_ARTIFACT_DIR` with a session-unique segment). For each finding
|
|
206
206
|
include:
|
|
207
207
|
|
|
208
208
|
- adapter title
|
|
@@ -217,7 +217,7 @@ Apply the identified change and show a diff-style summary of what changed.
|
|
|
217
217
|
|
|
218
218
|
### Shared drafting rules (all operations)
|
|
219
219
|
|
|
220
|
-
**Core
|
|
220
|
+
**Core SQUADRULES rule — right mode at the right time:**
|
|
221
221
|
|
|
222
222
|
Every protocol must help the agent recognise whether the current step is for
|
|
223
223
|
exploration, clarification, ideation, planning, execution, validation, review,
|
|
@@ -257,7 +257,7 @@ Every protocol gets a short, unique, lowercase-hyphenated `slug`.
|
|
|
257
257
|
|
|
258
258
|
Store scripts or config blobs as artifacts via `train` (set `mime`,
|
|
259
259
|
`artifact_name`, `adapter_uri`). Retrieve with `export` using
|
|
260
|
-
`
|
|
260
|
+
`squadrules://artifact/{uuid}`.
|
|
261
261
|
|
|
262
262
|
**Protocol structure:** H1 title, first H2 Activation Patterns, second H2
|
|
263
263
|
Preflight Dependencies, middle H2s one per step with JSON contract block, last
|
|
@@ -265,10 +265,10 @@ H2 Reward Signal. Frontmatter: `slug` (required), `version` (optional),
|
|
|
265
265
|
`chain_root` (required for mid-chain adapters).
|
|
266
266
|
|
|
267
267
|
**Challenge types:** Load `challenge-type-guide` for decision rules and JSON
|
|
268
|
-
formats (`forward` with `
|
|
268
|
+
formats (`forward` with `squadrules://adapter/challenge-type-guide`).
|
|
269
269
|
|
|
270
270
|
**Phase-critic and mutation gates:** Load `phase-critic-guide` for placement,
|
|
271
|
-
FAIL gate, and solution check rules (`forward` with `
|
|
271
|
+
FAIL gate, and solution check rules (`forward` with `squadrules://adapter/phase-critic-guide`).
|
|
272
272
|
|
|
273
273
|
**If Router pattern:** draft the router and each extension as separate files.
|
|
274
274
|
|
|
@@ -284,7 +284,7 @@ For `create` and `update`: run phase-critic against the drafted markdown before
|
|
|
284
284
|
presenting to the user. This is the quality gate — the agent owns content, the
|
|
285
285
|
critic owns quality.
|
|
286
286
|
|
|
287
|
-
1. Invoke phase-critic via `forward` with `
|
|
287
|
+
1. Invoke phase-critic via `forward` with `squadrules://adapter/phase-critic`.
|
|
288
288
|
Provide the drafted markdown as `input_file`, the slug as
|
|
289
289
|
`calling_protocol_slug`, and "structural compliance and agent behaviour"
|
|
290
290
|
as `verification_target`.
|
|
@@ -342,5 +342,5 @@ Protocol complete when:
|
|
|
342
342
|
- `review` — findings report delivered and acknowledged
|
|
343
343
|
- `update` — corrected adapter trained with `force_update: true` + review_evidence, repo file updated
|
|
344
344
|
|
|
345
|
-
A successful result means the resulting
|
|
345
|
+
A successful result means the resulting SQUADRULES adapter is more truthful,
|
|
346
346
|
phase-aware, agent-readable, and aligned with human–AI harmony.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
version: "
|
|
2
|
+
version: "5.0.0-beta.1"
|
|
3
3
|
slug: phase-critic-guide
|
|
4
4
|
title: Phase Critic Integration and Mutation Gate Guide
|
|
5
5
|
---
|
|
@@ -87,7 +87,7 @@ pattern is a `mcp` contract that requires calling `forward` with the
|
|
|
87
87
|
### After a planning phase
|
|
88
88
|
|
|
89
89
|
```json
|
|
90
|
-
{"contract":{"type":"mcp","mcp":{"tool_name":"forward","arguments":{"uri":"
|
|
90
|
+
{"contract":{"type":"mcp","mcp":{"tool_name":"forward","arguments":{"uri":"squadrules://adapter/phase-critic"}},"required":true}}
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
### After an implementation phase
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
version: "
|
|
2
|
+
version: "5.0.0-beta.1"
|
|
3
3
|
slug: phase-critic
|
|
4
4
|
title: Phase Critic
|
|
5
5
|
---
|
|
@@ -17,7 +17,7 @@ for contradictions.
|
|
|
17
17
|
|
|
18
18
|
**Typically invoked by:** another protocol at the end of a plan, implement,
|
|
19
19
|
validation, or review phase via `forward` with the stored adapter URI
|
|
20
|
-
`
|
|
20
|
+
`squadrules://adapter/phase-critic`.
|
|
21
21
|
|
|
22
22
|
**Can be invoked directly when agent needs:**
|
|
23
23
|
- "review phase output" / "verify plan" / "audit implementation"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
version: "
|
|
2
|
+
version: "5.0.0-beta.1"
|
|
3
3
|
slug: protocol-linking-guide
|
|
4
4
|
title: Protocol Linking Guide
|
|
5
5
|
---
|
|
@@ -122,12 +122,12 @@ When you are executing **`forward`** inside a **multi-layer** adapter (for examp
|
|
|
122
122
|
a root conductor), each continuation follows **`next_call`** for the **same**
|
|
123
123
|
`execution_id` until the last layer directs **`reward`**. A layer that mentions
|
|
124
124
|
another adapter URI only as routing guidance — for example
|
|
125
|
-
`
|
|
125
|
+
`squadrules://adapter/e2e-coding-pr-delivery` — does **not** cause the server to
|
|
126
126
|
switch executions: the next **`forward`** in that run still advances the
|
|
127
127
|
**current** adapter’s next layer.
|
|
128
128
|
|
|
129
129
|
To run an extension adapter, call **`forward`** with
|
|
130
|
-
`
|
|
130
|
+
`squadrules://adapter/<slug>` as a **new** first call (adapter URI; omit
|
|
131
131
|
`solution`). That starts a **separate** execution with its own layers. Common
|
|
132
132
|
pattern: complete the conductor with **`reward`**, then **`forward`** to the
|
|
133
133
|
extension slug when coding or PR-shaped work should run under that adapter’s
|
|
@@ -142,8 +142,8 @@ contracts.
|
|
|
142
142
|
Both system and user-authored adapters chain using slugs in `next_action`:
|
|
143
143
|
|
|
144
144
|
```text
|
|
145
|
-
call forward with
|
|
146
|
-
call forward with
|
|
145
|
+
call forward with squadrules://adapter/phase-critic ...
|
|
146
|
+
call forward with squadrules://adapter/implement-terraform ...
|
|
147
147
|
```
|
|
148
148
|
|
|
149
149
|
Slugs are globally unique (enforced by `train`), so resolution is
|
|
@@ -164,7 +164,7 @@ A bare `mcp` contract checks only the tool name:
|
|
|
164
164
|
An `mcp` contract **with `arguments`** verifies the exact target:
|
|
165
165
|
|
|
166
166
|
```json
|
|
167
|
-
{"contract":{"type":"mcp","mcp":{"tool_name":"forward","arguments":{"uri":"
|
|
167
|
+
{"contract":{"type":"mcp","mcp":{"tool_name":"forward","arguments":{"uri":"squadrules://adapter/code-review-policy"}},"required":true}}
|
|
168
168
|
```
|
|
169
169
|
|
|
170
170
|
The server validates that `solution.mcp.arguments` is a superset of the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
version: "
|
|
2
|
+
version: "5.0.0-beta.1"
|
|
3
3
|
slug: refine-search
|
|
4
4
|
title: Get help refining your search
|
|
5
5
|
---
|
|
@@ -12,7 +12,7 @@ title: Get help refining your search
|
|
|
12
12
|
/ ambiguous matches. This adapter helps you turn a vague request into a better
|
|
13
13
|
query so the next `activate` can find the right adapter.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
SQUADRULES principle: before acting, understand the user better. The goal is not to
|
|
16
16
|
repeat the failed phrase with minor edits. The goal is to recover the user's
|
|
17
17
|
real intent.
|
|
18
18
|
|
|
@@ -49,7 +49,7 @@ From the user's original message, identify:
|
|
|
49
49
|
- the real goal
|
|
50
50
|
- relevant context
|
|
51
51
|
- missing constraints
|
|
52
|
-
- likely wording that would help
|
|
52
|
+
- likely wording that would help SQUADRULES find the right adapter
|
|
53
53
|
|
|
54
54
|
Write your analysis as the solution.
|
|
55
55
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
version: "
|
|
2
|
+
version: "5.0.0-beta.1"
|
|
3
3
|
slug: skill-format-guide
|
|
4
4
|
title: Skill Format and Local Authoring Guide
|
|
5
5
|
---
|
|
@@ -9,9 +9,9 @@ title: Skill Format and Local Authoring Guide
|
|
|
9
9
|
# Skill Format and Local Authoring Guide
|
|
10
10
|
|
|
11
11
|
Decision rules for authoring SKILL.md files, choosing between local (git) and
|
|
12
|
-
server (
|
|
12
|
+
server (SQUADRULES) storage, and quality gates for skill content. Fetches the
|
|
13
13
|
current Agent Skills format spec (Context7 or agentskills.io) as the
|
|
14
|
-
authoritative generic format, then layers
|
|
14
|
+
authoritative generic format, then layers SQUADRULES customizations on top. Loaded
|
|
15
15
|
by protocol-authoring agents during drafting and review when the output format
|
|
16
16
|
is `skill`.
|
|
17
17
|
|
|
@@ -23,7 +23,7 @@ is `skill`.
|
|
|
23
23
|
**Can be invoked directly when agent needs:**
|
|
24
24
|
- "SKILL.md format reference" / "how to write a skill"
|
|
25
25
|
- "latest SKILL.md spec" / "current agentskills format"
|
|
26
|
-
- "skill vs adapter" / "local skill or
|
|
26
|
+
- "skill vs adapter" / "local skill or SQUADRULES adapter"
|
|
27
27
|
- "skill quality gates" / "SKILL.md structure"
|
|
28
28
|
- "project-level skill" / "where to put a skill"
|
|
29
29
|
|
|
@@ -31,7 +31,7 @@ is `skill`.
|
|
|
31
31
|
|
|
32
32
|
**Must Never:**
|
|
33
33
|
- Be used as an execution protocol.
|
|
34
|
-
- Recommend storing a skill in both git AND
|
|
34
|
+
- Recommend storing a skill in both git AND SQUADRULES server simultaneously.
|
|
35
35
|
- Confuse SKILL.md (agent instruction file) with protocol markdown (adapter).
|
|
36
36
|
- Hardcode the generic SKILL.md format from memory when the current spec is
|
|
37
37
|
reachable via Context7 or agentskills.io.
|
|
@@ -39,7 +39,7 @@ is `skill`.
|
|
|
39
39
|
**Must Always:**
|
|
40
40
|
- Be consulted before writing any SKILL.md file.
|
|
41
41
|
- Fetch the current Agent Skills spec before authoring or reviewing generic
|
|
42
|
-
format, and apply
|
|
42
|
+
format, and apply SQUADRULES customizations after it.
|
|
43
43
|
- Enforce single source of truth: each skill lives in exactly one place.
|
|
44
44
|
- Match storage location to the skill's scope and discoverability needs.
|
|
45
45
|
|
|
@@ -59,8 +59,8 @@ Every skill has ONE home. Choose at authoring time. Never both.
|
|
|
59
59
|
| Scope | Storage | Discovery | Source of Truth |
|
|
60
60
|
|---|---|---|---|
|
|
61
61
|
| Project-specific (deploy, test, release) | Git: `.agents/skills/{name}/` or `.cursor/skills/{name}/` | IDE host scans description field | Git repo |
|
|
62
|
-
| Personal cross-project (universal) |
|
|
63
|
-
| Team/group shared |
|
|
62
|
+
| Personal cross-project (universal) | SQUADRULES server via `train` | `activate` embedding search | SQUADRULES server |
|
|
63
|
+
| Team/group shared | SQUADRULES server (group space) | `activate` | SQUADRULES server |
|
|
64
64
|
|
|
65
65
|
### Decision Tree
|
|
66
66
|
|
|
@@ -69,9 +69,9 @@ Is this skill specific to ONE project's codebase?
|
|
|
69
69
|
├─ YES → Does it reference repo files, paths, or project-specific tools?
|
|
70
70
|
│ ├─ YES → LOCAL (git)
|
|
71
71
|
│ └─ NO → Could it help in other projects?
|
|
72
|
-
│ ├─ YES → SERVER (
|
|
72
|
+
│ ├─ YES → SERVER (SQUADRULES)
|
|
73
73
|
│ └─ NO → LOCAL (git)
|
|
74
|
-
└─ NO → SERVER (
|
|
74
|
+
└─ NO → SERVER (SQUADRULES)
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
### Local Storage Paths
|
|
@@ -90,7 +90,7 @@ Is this skill specific to ONE project's codebase?
|
|
|
90
90
|
**Local → Server (skill graduates to universal):**
|
|
91
91
|
1. Read existing SKILL.md
|
|
92
92
|
2. Optionally wrap in protocol structure (Activation Patterns, contracts)
|
|
93
|
-
3. `train` to
|
|
93
|
+
3. `train` to SQUADRULES server
|
|
94
94
|
4. Delete local copy or mark deprecated
|
|
95
95
|
5. Git commit the deletion
|
|
96
96
|
|
|
@@ -108,7 +108,7 @@ Is this skill specific to ONE project's codebase?
|
|
|
108
108
|
Do NOT rely on a frozen copy of the SKILL.md format. The Agent Skills format
|
|
109
109
|
evolves (new frontmatter fields, directory conventions, size guidance). Before
|
|
110
110
|
authoring or reviewing a SKILL.md, fetch the **current** specification and treat
|
|
111
|
-
it as authoritative for the generic format. The
|
|
111
|
+
it as authoritative for the generic format. The SQUADRULES customizations in the
|
|
112
112
|
sections *after* this one layer on top of that generic spec.
|
|
113
113
|
|
|
114
114
|
**Authoritative source (fetch fresh — do not guess):**
|
|
@@ -145,19 +145,19 @@ sections *after* this one layer on top of that generic spec.
|
|
|
145
145
|
{"contract":{"type":"comment","comment":{"min_length":30},"required":true}}
|
|
146
146
|
```
|
|
147
147
|
|
|
148
|
-
##
|
|
148
|
+
## SQUADRULES Customizations (apply after the generic spec)
|
|
149
149
|
|
|
150
|
-
Everything below is
|
|
150
|
+
Everything below is SQUADRULES-specific and layers on top of the fetched Agent
|
|
151
151
|
Skills spec. When the generic spec and these rules disagree on generic format,
|
|
152
|
-
follow the spec; these rules add
|
|
152
|
+
follow the spec; these rules add SQUADRULES storage, integrity, and routing
|
|
153
153
|
behavior the generic spec does not cover.
|
|
154
154
|
|
|
155
|
-
###
|
|
155
|
+
### SQUADRULES additions to structure
|
|
156
156
|
|
|
157
|
-
- **`SHA256SUMS`** — required for
|
|
158
|
-
`sha256sum` format, paths relative to the skill dir). This is a
|
|
157
|
+
- **`SHA256SUMS`** — required for SQUADRULES-exported skill bundles (GNU
|
|
158
|
+
`sha256sum` format, paths relative to the skill dir). This is a SQUADRULES
|
|
159
159
|
integrity requirement, not part of the generic Agent Skills spec.
|
|
160
|
-
- **`disable-model-invocation`** — when the host supports it,
|
|
160
|
+
- **`disable-model-invocation`** — when the host supports it, SQUADRULES-authored
|
|
161
161
|
skills default this to `true` (explicit load only) unless the skill is meant
|
|
162
162
|
to auto-trigger. Only add fields the fetched spec actually recognizes.
|
|
163
163
|
- **Reference depth** — keep references one level deep (SKILL.md → reference
|
|
@@ -236,7 +236,7 @@ When `{target}=local`:
|
|
|
236
236
|
|
|
237
237
|
Do NOT call `train`. The skill lives only in git.
|
|
238
238
|
|
|
239
|
-
### Path B: Server Train (
|
|
239
|
+
### Path B: Server Train (SQUADRULES-routable adapter)
|
|
240
240
|
|
|
241
241
|
When `{target}=server`:
|
|
242
242
|
|
|
@@ -248,17 +248,17 @@ When `{target}=server`:
|
|
|
248
248
|
3. Verify adapter URI returned
|
|
249
249
|
4. Report URI and slug to user
|
|
250
250
|
|
|
251
|
-
Do NOT write to local disk. The adapter lives only in
|
|
251
|
+
Do NOT write to local disk. The adapter lives only in SQUADRULES.
|
|
252
252
|
|
|
253
253
|
### Path C: Hybrid Authoring (skill that is also an adapter)
|
|
254
254
|
|
|
255
255
|
When `{target}=hybrid` (rare — use only when explicitly requested):
|
|
256
256
|
|
|
257
|
-
1. Author as a
|
|
257
|
+
1. Author as a SQUADRULES protocol (Activation Patterns, contracts, Reward Signal)
|
|
258
258
|
2. `train` to server
|
|
259
259
|
3. `export` with `format: skill_zip` to produce local SKILL.md bundle
|
|
260
260
|
4. The exported SKILL.md is a **read-only derived artifact**, not a source of truth
|
|
261
|
-
5. Document in the SKILL.md header that it was exported from
|
|
261
|
+
5. Document in the SKILL.md header that it was exported from SQUADRULES
|
|
262
262
|
|
|
263
263
|
```json
|
|
264
264
|
{"contract":{"type":"comment","comment":{"min_length":30},"required":true}}
|
|
@@ -271,7 +271,7 @@ Only reachable after all prior steps are solved.
|
|
|
271
271
|
The agent can now:
|
|
272
272
|
1. Fetch the current Agent Skills spec (Context7 or agentskills.io) instead of
|
|
273
273
|
relying on a frozen copy, and apply it as the authoritative generic format
|
|
274
|
-
2. Layer the
|
|
274
|
+
2. Layer the SQUADRULES customizations (storage, `SHA256SUMS`, routing) on top of
|
|
275
275
|
that fetched spec
|
|
276
276
|
3. Choose the correct storage location for a skill
|
|
277
277
|
4. Author SKILL.md with valid frontmatter and structure per the current spec
|
|
@@ -4,7 +4,7 @@ export interface AuthPayload {
|
|
|
4
4
|
groups: string[];
|
|
5
5
|
/** Raw issuer retained for deterministic space-id derivation across Keycloak hosts. */
|
|
6
6
|
iss: string;
|
|
7
|
-
/** Realm from token issuer (e.g.
|
|
7
|
+
/** Realm from token issuer (e.g. the deployment realm) for space isolation. */
|
|
8
8
|
realm: string;
|
|
9
9
|
preferred_username?: string;
|
|
10
10
|
name?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bearer-validate.d.ts","sourceRoot":"","sources":["../../src/http/bearer-validate.ts"],"names":[],"mappings":"AAaA,OAAO,EAKL,KAAK,WAAW,EACjB,MAAM,0BAA0B,CAAC;AAElC,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,uFAAuF;IACvF,GAAG,EAAE,MAAM,CAAC;IACZ
|
|
1
|
+
{"version":3,"file":"bearer-validate.d.ts","sourceRoot":"","sources":["../../src/http/bearer-validate.ts"],"names":[],"mappings":"AAaA,OAAO,EAKL,KAAK,WAAW,EACjB,MAAM,0BAA0B,CAAC;AAElC,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,uFAAuF;IACvF,GAAG,EAAE,MAAM,CAAC;IACZ,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAC;IACd,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iGAAiG;IACjG,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AA6ED;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,MAAM,EACb,cAAc,EAAE,MAAM,EAAE,EACxB,gBAAgB,EAAE,MAAM,EAAE,GACzB,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAoF7B"}
|
|
@@ -9,9 +9,9 @@ export async function streamSkillZipHttpResponse(res, memoryStore, qdrantService
|
|
|
9
9
|
const flat = flattenSkillItemsToZipPaths(items.map((it) => ({ slug: it.slug, files: it.files })));
|
|
10
10
|
res.setHeader('Content-Type', 'application/zip');
|
|
11
11
|
res.setHeader('Content-Disposition', `attachment; filename="${DEFAULT_EXPORT_SKILL_ZIP_FILENAME}"`);
|
|
12
|
-
res.setHeader('X-
|
|
13
|
-
res.setHeader('X-
|
|
14
|
-
res.setHeader('X-
|
|
12
|
+
res.setHeader('X-SQUADRULES-Primary-Export-Uri', primaryUri);
|
|
13
|
+
res.setHeader('X-SQUADRULES-Export-Adapter-Count', String(items.length));
|
|
14
|
+
res.setHeader('X-SQUADRULES-Export-Binary', '1');
|
|
15
15
|
// Dual headers for SquadRules migration: both sets emitted so clients reading either name work.
|
|
16
16
|
res.setHeader('X-SquadRules-Primary-Export-Uri', primaryUri);
|
|
17
17
|
res.setHeader('X-SquadRules-Export-Adapter-Count', String(items.length));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export-skill-zip-http.js","sourceRoot":"","sources":["../../src/http/export-skill-zip-http.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhD,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,2BAA2B,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC1G,OAAO,EAAE,iCAAiC,EAAE,MAAM,kCAAkC,CAAC;AAErF,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,GAAa,EACb,WAA8B,EAC9B,aAAwC,EACxC,WAAqB;IAErB,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,MAAM,6BAA6B,CAAC,WAAW,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC;IAC3G,MAAM,IAAI,GAAG,2BAA2B,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;IAElG,GAAG,CAAC,SAAS,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;IACjD,GAAG,CAAC,SAAS,CAAC,qBAAqB,EAAE,yBAAyB,iCAAiC,GAAG,CAAC,CAAC;IACpG,GAAG,CAAC,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"export-skill-zip-http.js","sourceRoot":"","sources":["../../src/http/export-skill-zip-http.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhD,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,2BAA2B,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC1G,OAAO,EAAE,iCAAiC,EAAE,MAAM,kCAAkC,CAAC;AAErF,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,GAAa,EACb,WAA8B,EAC9B,aAAwC,EACxC,WAAqB;IAErB,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,MAAM,6BAA6B,CAAC,WAAW,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC;IAC3G,MAAM,IAAI,GAAG,2BAA2B,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;IAElG,GAAG,CAAC,SAAS,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC;IACjD,GAAG,CAAC,SAAS,CAAC,qBAAqB,EAAE,yBAAyB,iCAAiC,GAAG,CAAC,CAAC;IACpG,GAAG,CAAC,SAAS,CAAC,iCAAiC,EAAE,UAAU,CAAC,CAAC;IAC7D,GAAG,CAAC,SAAS,CAAC,mCAAmC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACzE,GAAG,CAAC,SAAS,CAAC,4BAA4B,EAAE,GAAG,CAAC,CAAC;IACjD,gGAAgG;IAChG,GAAG,CAAC,SAAS,CAAC,iCAAiC,EAAE,UAAU,CAAC,CAAC;IAC7D,GAAG,CAAC,SAAS,CAAC,mCAAmC,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACzE,GAAG,CAAC,SAAS,CAAC,4BAA4B,EAAE,GAAG,CAAC,CAAC;IAEjD,IAAI,eAAe,GAAG,CAAC,CAAC;IACxB,MAAM,IAAI,GAAG,IAAI,WAAW,EAAE,CAAC;IAC/B,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAa,EAAE,EAAE;QAChC,eAAe,IAAI,KAAK,CAAC,MAAM,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACf,MAAM,sBAAsB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACzC,MAAM,QAAQ,CAAC,GAAG,CAAC,CAAC;IACpB,uBAAuB,CAAC,eAAe,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { squadrulesTrainSimilarAdapterFound } from '../services/metrics/mcp-metrics.js';
|
|
2
2
|
import { structuredLogger } from '../utils/structured-logger.js';
|
|
3
3
|
import { TrainError } from '../tools/train-store.js';
|
|
4
4
|
import { executeTrain } from '../tools/train.js';
|
|
5
5
|
import { trainInputSchema } from '../tools/train_schema.js';
|
|
6
|
-
import { buildAdapterUri } from '../tools/
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { buildAdapterUri } from '../tools/squadrules-uri.js';
|
|
7
|
+
import { SQUADRULES_CREATION_PROTOCOL_SLUG } from '../constants/builtin-search-meta.js';
|
|
8
|
+
import { SquadrulesError } from '../types/index.js';
|
|
9
9
|
import { getSpaceContext, runWithSpaceContextAsync } from '../utils/tenant-context.js';
|
|
10
10
|
import { listWritableSpaceDisplayNames, resolveSpaceParamForContext } from '../utils/resolve-space-param.js';
|
|
11
11
|
const SAFE_TRAIN_DETAIL_KEYS = new Set([
|
|
@@ -33,7 +33,7 @@ function sanitizeTrainDetails(details) {
|
|
|
33
33
|
return output;
|
|
34
34
|
}
|
|
35
35
|
function creationAdapterUri() {
|
|
36
|
-
return buildAdapterUri(
|
|
36
|
+
return buildAdapterUri(SQUADRULES_CREATION_PROTOCOL_SLUG);
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* JSON body train (space, source_adapter_uri, etc.). Raw markdown remains POST /api/train/raw.
|
|
@@ -105,9 +105,9 @@ export function setupTrainJsonRoute(app, memoryStore, qdrantService) {
|
|
|
105
105
|
});
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
108
|
-
if (error instanceof
|
|
108
|
+
if (error instanceof SquadrulesError) {
|
|
109
109
|
const status = error.statusCode >= 400 && error.statusCode < 600 ? error.statusCode : 500;
|
|
110
|
-
structuredLogger.warn(`✗ Train JSON
|
|
110
|
+
structuredLogger.warn(`✗ Train JSON SquadrulesError ${error.code}: ${error.message}`);
|
|
111
111
|
res.status(status).json({
|
|
112
112
|
error: error.code,
|
|
113
113
|
message: error.message,
|
|
@@ -125,7 +125,7 @@ export function setupTrainJsonRoute(app, memoryStore, qdrantService) {
|
|
|
125
125
|
return;
|
|
126
126
|
}
|
|
127
127
|
if (err?.code === 'SIMILAR_MEMORY_FOUND') {
|
|
128
|
-
|
|
128
|
+
squadrulesTrainSimilarAdapterFound.inc({ transport: 'http', tenant_id: 'http' });
|
|
129
129
|
structuredLogger.warn(`✗ Similar memory found: ${err.message}`);
|
|
130
130
|
const d = err.details || {};
|
|
131
131
|
res.status(409).json({
|