@agentxm/client-core 0.1.6 → 0.3.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/dist/src/unstable/agents/coding-agent.d.ts +1 -1
- package/dist/src/unstable/agents/coding-agent.d.ts.map +1 -1
- package/dist/src/unstable/agents/coding-agent.js +1 -1
- package/dist/src/unstable/agents/coding-agent.js.map +1 -1
- package/dist/src/unstable/auth/auth-client.d.ts +1 -1
- package/dist/src/unstable/auth/auth-client.d.ts.map +1 -1
- package/dist/src/unstable/auth/auth-client.js +1 -1
- package/dist/src/unstable/auth/auth-client.js.map +1 -1
- package/dist/src/unstable/auth/credential-store.d.ts +1 -1
- package/dist/src/unstable/auth/credential-store.d.ts.map +1 -1
- package/dist/src/unstable/auth/credential-store.js +1 -1
- package/dist/src/unstable/auth/credential-store.js.map +1 -1
- package/dist/src/unstable/auth/device-login.d.ts +1 -1
- package/dist/src/unstable/auth/device-login.d.ts.map +1 -1
- package/dist/src/unstable/auth/device-login.js +1 -1
- package/dist/src/unstable/auth/device-login.js.map +1 -1
- package/dist/src/unstable/auth/guard-interaction.d.ts +1 -1
- package/dist/src/unstable/auth/guard-interaction.d.ts.map +1 -1
- package/dist/src/unstable/auth/guard-interaction.js +1 -1
- package/dist/src/unstable/auth/guard-interaction.js.map +1 -1
- package/dist/src/unstable/auth/login-interaction.d.ts +1 -1
- package/dist/src/unstable/auth/login-interaction.d.ts.map +1 -1
- package/dist/src/unstable/auth/login-interaction.js +1 -1
- package/dist/src/unstable/auth/login-interaction.js.map +1 -1
- package/dist/src/unstable/auth/registry-url.d.ts +1 -1
- package/dist/src/unstable/auth/registry-url.d.ts.map +1 -1
- package/dist/src/unstable/auth/registry-url.js +1 -1
- package/dist/src/unstable/auth/registry-url.js.map +1 -1
- package/dist/src/unstable/auth/schema.d.ts +3 -3
- package/dist/src/unstable/cli-flags/verbosity.d.ts +1 -1
- package/dist/src/unstable/cli-flags/verbosity.d.ts.map +1 -1
- package/dist/src/unstable/cli-flags/verbosity.js +1 -1
- package/dist/src/unstable/cli-flags/verbosity.js.map +1 -1
- package/dist/src/unstable/cli-renderer/cli-renderer.d.ts +1 -1
- package/dist/src/unstable/cli-renderer/cli-renderer.d.ts.map +1 -1
- package/dist/src/unstable/cli-renderer/cli-renderer.js +1 -1
- package/dist/src/unstable/cli-renderer/cli-renderer.js.map +1 -1
- package/dist/src/unstable/cli-runtime/command-argv.d.ts +1 -1
- package/dist/src/unstable/cli-runtime/command-argv.d.ts.map +1 -1
- package/dist/src/unstable/cli-runtime/command-argv.js +1 -1
- package/dist/src/unstable/cli-runtime/command-argv.js.map +1 -1
- package/dist/src/unstable/cli-runtime/graceful-shutdown.js +1 -1
- package/dist/src/unstable/cli-runtime/graceful-shutdown.js.map +1 -1
- package/dist/src/unstable/cli-runtime/telemetry.d.ts +1 -1
- package/dist/src/unstable/cli-runtime/telemetry.d.ts.map +1 -1
- package/dist/src/unstable/cli-runtime/telemetry.js +1 -1
- package/dist/src/unstable/cli-runtime/telemetry.js.map +1 -1
- package/dist/src/unstable/commands/manager.d.ts +1 -1
- package/dist/src/unstable/commands/manager.d.ts.map +1 -1
- package/dist/src/unstable/commands/manager.js +1 -1
- package/dist/src/unstable/commands/manager.js.map +1 -1
- package/dist/src/unstable/commands/operations/disable.d.ts +2 -2
- package/dist/src/unstable/commands/operations/disable.d.ts.map +1 -1
- package/dist/src/unstable/commands/operations/enable.d.ts +2 -2
- package/dist/src/unstable/commands/operations/enable.d.ts.map +1 -1
- package/dist/src/unstable/commands/operations/install.d.ts +1 -1
- package/dist/src/unstable/commands/operations/install.d.ts.map +1 -1
- package/dist/src/unstable/commands/operations/new-command.d.ts +2 -2
- package/dist/src/unstable/commands/operations/new-command.d.ts.map +1 -1
- package/dist/src/unstable/commands/operations/publish.d.ts +1 -1
- package/dist/src/unstable/commands/operations/publish.d.ts.map +1 -1
- package/dist/src/unstable/commands/operations/uninstall.d.ts +1 -1
- package/dist/src/unstable/commands/operations/uninstall.d.ts.map +1 -1
- package/dist/src/unstable/date-time.d.ts +2 -2
- package/dist/src/unstable/date-time.d.ts.map +1 -1
- package/dist/src/unstable/extensions/operations.d.ts +1 -1
- package/dist/src/unstable/extensions/operations.d.ts.map +1 -1
- package/dist/src/unstable/install-meta/install-meta.d.ts +1 -1
- package/dist/src/unstable/install-meta/install-meta.d.ts.map +1 -1
- package/dist/src/unstable/install-meta/install-meta.js +1 -1
- package/dist/src/unstable/install-meta/install-meta.js.map +1 -1
- package/dist/src/unstable/install-method/install-method.d.ts +1 -1
- package/dist/src/unstable/install-method/install-method.d.ts.map +1 -1
- package/dist/src/unstable/install-method/install-method.js +1 -1
- package/dist/src/unstable/install-method/install-method.js.map +1 -1
- package/dist/src/unstable/lint/catalog/index.d.ts +39 -0
- package/dist/src/unstable/lint/catalog/index.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/index.js +49 -0
- package/dist/src/unstable/lint/catalog/index.js.map +1 -0
- package/dist/src/unstable/lint/catalog/pack/manifest-keys-recognized.d.ts +31 -0
- package/dist/src/unstable/lint/catalog/pack/manifest-keys-recognized.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/pack/manifest-keys-recognized.js +41 -0
- package/dist/src/unstable/lint/catalog/pack/manifest-keys-recognized.js.map +1 -0
- package/dist/src/unstable/lint/catalog/pack/manifest-present.d.ts +18 -0
- package/dist/src/unstable/lint/catalog/pack/manifest-present.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/pack/manifest-present.js +41 -0
- package/dist/src/unstable/lint/catalog/pack/manifest-present.js.map +1 -0
- package/dist/src/unstable/lint/catalog/pack/manifest-schema-valid.d.ts +26 -0
- package/dist/src/unstable/lint/catalog/pack/manifest-schema-valid.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/pack/manifest-schema-valid.js +34 -0
- package/dist/src/unstable/lint/catalog/pack/manifest-schema-valid.js.map +1 -0
- package/dist/src/unstable/lint/catalog/pack-accessor/contexts.d.ts +61 -0
- package/dist/src/unstable/lint/catalog/pack-accessor/contexts.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/pack-accessor/contexts.js +46 -0
- package/dist/src/unstable/lint/catalog/pack-accessor/contexts.js.map +1 -0
- package/dist/src/unstable/lint/catalog/pack-accessor/platform.d.ts +53 -0
- package/dist/src/unstable/lint/catalog/pack-accessor/platform.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/pack-accessor/platform.js +90 -0
- package/dist/src/unstable/lint/catalog/pack-accessor/platform.js.map +1 -0
- package/dist/src/unstable/lint/catalog/pack-accessor/vft.d.ts +60 -0
- package/dist/src/unstable/lint/catalog/pack-accessor/vft.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/pack-accessor/vft.js +85 -0
- package/dist/src/unstable/lint/catalog/pack-accessor/vft.js.map +1 -0
- package/dist/src/unstable/lint/catalog/pack.d.ts +37 -0
- package/dist/src/unstable/lint/catalog/pack.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/pack.js +47 -0
- package/dist/src/unstable/lint/catalog/pack.js.map +1 -0
- package/dist/src/unstable/lint/catalog/shared/schema-rule.d.ts +59 -0
- package/dist/src/unstable/lint/catalog/shared/schema-rule.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/shared/schema-rule.js +99 -0
- package/dist/src/unstable/lint/catalog/shared/schema-rule.js.map +1 -0
- package/dist/src/unstable/lint/catalog/skill/frontmatter-parseable.d.ts +31 -0
- package/dist/src/unstable/lint/catalog/skill/frontmatter-parseable.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/skill/frontmatter-parseable.js +151 -0
- package/dist/src/unstable/lint/catalog/skill/frontmatter-parseable.js.map +1 -0
- package/dist/src/unstable/lint/catalog/skill/manifest-keys-recognized.d.ts +26 -0
- package/dist/src/unstable/lint/catalog/skill/manifest-keys-recognized.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/skill/manifest-keys-recognized.js +41 -0
- package/dist/src/unstable/lint/catalog/skill/manifest-keys-recognized.js.map +1 -0
- package/dist/src/unstable/lint/catalog/skill/manifest-present.d.ts +18 -0
- package/dist/src/unstable/lint/catalog/skill/manifest-present.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/skill/manifest-present.js +46 -0
- package/dist/src/unstable/lint/catalog/skill/manifest-present.js.map +1 -0
- package/dist/src/unstable/lint/catalog/skill/manifest-schema-valid.d.ts +22 -0
- package/dist/src/unstable/lint/catalog/skill/manifest-schema-valid.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/skill/manifest-schema-valid.js +37 -0
- package/dist/src/unstable/lint/catalog/skill/manifest-schema-valid.js.map +1 -0
- package/dist/src/unstable/lint/catalog/skill/skill-md-present.d.ts +17 -0
- package/dist/src/unstable/lint/catalog/skill/skill-md-present.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/skill/skill-md-present.js +38 -0
- package/dist/src/unstable/lint/catalog/skill/skill-md-present.js.map +1 -0
- package/dist/src/unstable/lint/catalog/skill-accessor/contexts.d.ts +65 -0
- package/dist/src/unstable/lint/catalog/skill-accessor/contexts.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/skill-accessor/contexts.js +50 -0
- package/dist/src/unstable/lint/catalog/skill-accessor/contexts.js.map +1 -0
- package/dist/src/unstable/lint/catalog/skill-accessor/platform.d.ts +52 -0
- package/dist/src/unstable/lint/catalog/skill-accessor/platform.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/skill-accessor/platform.js +89 -0
- package/dist/src/unstable/lint/catalog/skill-accessor/platform.js.map +1 -0
- package/dist/src/unstable/lint/catalog/skill-accessor/vft.d.ts +58 -0
- package/dist/src/unstable/lint/catalog/skill-accessor/vft.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/skill-accessor/vft.js +83 -0
- package/dist/src/unstable/lint/catalog/skill-accessor/vft.js.map +1 -0
- package/dist/src/unstable/lint/catalog/skill.d.ts +38 -0
- package/dist/src/unstable/lint/catalog/skill.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/skill.js +52 -0
- package/dist/src/unstable/lint/catalog/skill.js.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/agents-detected-declared.d.ts +23 -0
- package/dist/src/unstable/lint/catalog/workspace/agents-detected-declared.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/agents-detected-declared.js +75 -0
- package/dist/src/unstable/lint/catalog/workspace/agents-detected-declared.js.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/agents-recognized.d.ts +23 -0
- package/dist/src/unstable/lint/catalog/workspace/agents-recognized.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/agents-recognized.js +76 -0
- package/dist/src/unstable/lint/catalog/workspace/agents-recognized.js.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/helpers/empty.d.ts +18 -0
- package/dist/src/unstable/lint/catalog/workspace/helpers/empty.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/helpers/empty.js +16 -0
- package/dist/src/unstable/lint/catalog/workspace/helpers/empty.js.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/helpers/install-ops.d.ts +133 -0
- package/dist/src/unstable/lint/catalog/workspace/helpers/install-ops.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/helpers/install-ops.js +149 -0
- package/dist/src/unstable/lint/catalog/workspace/helpers/install-ops.js.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/helpers/registry-source.d.ts +25 -0
- package/dist/src/unstable/lint/catalog/workspace/helpers/registry-source.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/helpers/registry-source.js +30 -0
- package/dist/src/unstable/lint/catalog/workspace/helpers/registry-source.js.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/initialized.d.ts +22 -0
- package/dist/src/unstable/lint/catalog/workspace/initialized.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/initialized.js +55 -0
- package/dist/src/unstable/lint/catalog/workspace/initialized.js.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/lockfile-valid.d.ts +33 -0
- package/dist/src/unstable/lint/catalog/workspace/lockfile-valid.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/lockfile-valid.js +125 -0
- package/dist/src/unstable/lint/catalog/workspace/lockfile-valid.js.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/packs-declarations-valid.d.ts +19 -0
- package/dist/src/unstable/lint/catalog/workspace/packs-declarations-valid.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/packs-declarations-valid.js +145 -0
- package/dist/src/unstable/lint/catalog/workspace/packs-declarations-valid.js.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/packs-dependencies-resolved.d.ts +17 -0
- package/dist/src/unstable/lint/catalog/workspace/packs-dependencies-resolved.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/packs-dependencies-resolved.js +107 -0
- package/dist/src/unstable/lint/catalog/workspace/packs-dependencies-resolved.js.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/packs-members-retained.d.ts +22 -0
- package/dist/src/unstable/lint/catalog/workspace/packs-members-retained.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/packs-members-retained.js +163 -0
- package/dist/src/unstable/lint/catalog/workspace/packs-members-retained.js.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/settings-schema-valid.d.ts +28 -0
- package/dist/src/unstable/lint/catalog/workspace/settings-schema-valid.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/settings-schema-valid.js +67 -0
- package/dist/src/unstable/lint/catalog/workspace/settings-schema-valid.js.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/skills-artifacts-clean.d.ts +30 -0
- package/dist/src/unstable/lint/catalog/workspace/skills-artifacts-clean.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/skills-artifacts-clean.js +232 -0
- package/dist/src/unstable/lint/catalog/workspace/skills-artifacts-clean.js.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/skills-artifacts-correct.d.ts +26 -0
- package/dist/src/unstable/lint/catalog/workspace/skills-artifacts-correct.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/skills-artifacts-correct.js +129 -0
- package/dist/src/unstable/lint/catalog/workspace/skills-artifacts-correct.js.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/skills-declarations-valid.d.ts +26 -0
- package/dist/src/unstable/lint/catalog/workspace/skills-declarations-valid.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/skills-declarations-valid.js +151 -0
- package/dist/src/unstable/lint/catalog/workspace/skills-declarations-valid.js.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/skills-integrity-valid.d.ts +29 -0
- package/dist/src/unstable/lint/catalog/workspace/skills-integrity-valid.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/skills-integrity-valid.js +149 -0
- package/dist/src/unstable/lint/catalog/workspace/skills-integrity-valid.js.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/skills-lockfile-aligned.d.ts +29 -0
- package/dist/src/unstable/lint/catalog/workspace/skills-lockfile-aligned.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/skills-lockfile-aligned.js +242 -0
- package/dist/src/unstable/lint/catalog/workspace/skills-lockfile-aligned.js.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace-accessor/contexts.d.ts +141 -0
- package/dist/src/unstable/lint/catalog/workspace-accessor/contexts.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace-accessor/contexts.js +123 -0
- package/dist/src/unstable/lint/catalog/workspace-accessor/contexts.js.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace-accessor/interpret-ops.d.ts +38 -0
- package/dist/src/unstable/lint/catalog/workspace-accessor/interpret-ops.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace-accessor/interpret-ops.js +311 -0
- package/dist/src/unstable/lint/catalog/workspace-accessor/interpret-ops.js.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace-accessor/platform.d.ts +60 -0
- package/dist/src/unstable/lint/catalog/workspace-accessor/platform.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace-accessor/platform.js +201 -0
- package/dist/src/unstable/lint/catalog/workspace-accessor/platform.js.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace-accessor/test-state.d.ts +65 -0
- package/dist/src/unstable/lint/catalog/workspace-accessor/test-state.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace-accessor/test-state.js +95 -0
- package/dist/src/unstable/lint/catalog/workspace-accessor/test-state.js.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace.d.ts +47 -0
- package/dist/src/unstable/lint/catalog/workspace.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace.js +80 -0
- package/dist/src/unstable/lint/catalog/workspace.js.map +1 -0
- package/dist/src/unstable/lint/cli.d.ts +297 -0
- package/dist/src/unstable/lint/cli.d.ts.map +1 -0
- package/dist/src/unstable/lint/cli.js +388 -0
- package/dist/src/unstable/lint/cli.js.map +1 -0
- package/dist/src/unstable/lint/compose-path.d.ts +27 -0
- package/dist/src/unstable/lint/compose-path.d.ts.map +1 -0
- package/dist/src/unstable/lint/compose-path.js +61 -0
- package/dist/src/unstable/lint/compose-path.js.map +1 -0
- package/dist/src/unstable/lint/config.d.ts +103 -0
- package/dist/src/unstable/lint/config.d.ts.map +1 -0
- package/dist/src/unstable/lint/config.js +137 -0
- package/dist/src/unstable/lint/config.js.map +1 -0
- package/dist/src/unstable/lint/context.d.ts +265 -0
- package/dist/src/unstable/lint/context.d.ts.map +1 -0
- package/dist/src/unstable/lint/context.js +21 -0
- package/dist/src/unstable/lint/context.js.map +1 -0
- package/dist/src/unstable/lint/evaluate.d.ts +68 -0
- package/dist/src/unstable/lint/evaluate.d.ts.map +1 -0
- package/dist/src/unstable/lint/evaluate.js +147 -0
- package/dist/src/unstable/lint/evaluate.js.map +1 -0
- package/dist/src/unstable/lint/index.d.ts +28 -0
- package/dist/src/unstable/lint/index.d.ts.map +1 -0
- package/dist/src/unstable/lint/index.js +35 -0
- package/dist/src/unstable/lint/index.js.map +1 -0
- package/dist/src/unstable/lint/issues-to-findings.d.ts +35 -0
- package/dist/src/unstable/lint/issues-to-findings.d.ts.map +1 -0
- package/dist/src/unstable/lint/issues-to-findings.js +97 -0
- package/dist/src/unstable/lint/issues-to-findings.js.map +1 -0
- package/dist/src/unstable/lint/rule.d.ts +139 -0
- package/dist/src/unstable/lint/rule.d.ts.map +1 -0
- package/dist/src/unstable/lint/rule.js +25 -0
- package/dist/src/unstable/lint/rule.js.map +1 -0
- package/dist/src/unstable/lockfile/schema.d.ts +404 -404
- package/dist/src/unstable/mcp-servers/manager.d.ts +1 -1
- package/dist/src/unstable/mcp-servers/manager.d.ts.map +1 -1
- package/dist/src/unstable/mcp-servers/manager.js +1 -1
- package/dist/src/unstable/mcp-servers/manager.js.map +1 -1
- package/dist/src/unstable/mcp-servers/operations/install.d.ts +1 -1
- package/dist/src/unstable/mcp-servers/operations/install.d.ts.map +1 -1
- package/dist/src/unstable/mcp-servers/operations/publish.d.ts +1 -1
- package/dist/src/unstable/mcp-servers/operations/publish.d.ts.map +1 -1
- package/dist/src/unstable/mcp-servers/operations/uninstall.d.ts +1 -1
- package/dist/src/unstable/mcp-servers/operations/uninstall.d.ts.map +1 -1
- package/dist/src/unstable/packs/manager.d.ts +1 -1
- package/dist/src/unstable/packs/manager.d.ts.map +1 -1
- package/dist/src/unstable/packs/manager.js +1 -1
- package/dist/src/unstable/packs/manager.js.map +1 -1
- package/dist/src/unstable/packs/operations/add-to-pack.d.ts +2 -2
- package/dist/src/unstable/packs/operations/add-to-pack.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/install.d.ts +2 -2
- package/dist/src/unstable/packs/operations/install.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/install.js +41 -0
- package/dist/src/unstable/packs/operations/install.js.map +1 -1
- package/dist/src/unstable/packs/operations/new-pack.d.ts +2 -2
- package/dist/src/unstable/packs/operations/new-pack.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/publish.d.ts +2 -2
- package/dist/src/unstable/packs/operations/publish.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/publish.js +1 -0
- package/dist/src/unstable/packs/operations/publish.js.map +1 -1
- package/dist/src/unstable/packs/operations/remove-from-pack.d.ts +2 -2
- package/dist/src/unstable/packs/operations/remove-from-pack.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/uninstall.d.ts +2 -2
- package/dist/src/unstable/packs/operations/uninstall.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/unpack.d.ts +2 -2
- package/dist/src/unstable/packs/operations/unpack.d.ts.map +1 -1
- package/dist/src/unstable/{workspace → plan}/apply-plan.d.ts +9 -0
- package/dist/src/unstable/plan/apply-plan.d.ts.map +1 -0
- package/dist/src/unstable/{workspace → plan}/apply-plan.js +10 -1
- package/dist/src/unstable/plan/apply-plan.js.map +1 -0
- package/dist/src/unstable/plan/index.d.ts +24 -0
- package/dist/src/unstable/plan/index.d.ts.map +1 -0
- package/dist/src/unstable/plan/index.js +28 -0
- package/dist/src/unstable/plan/index.js.map +1 -0
- package/dist/src/unstable/{workspace → plan}/plan.d.ts +6 -0
- package/dist/src/unstable/plan/plan.d.ts.map +1 -0
- package/dist/src/unstable/{workspace → plan}/plan.js +6 -0
- package/dist/src/unstable/plan/plan.js.map +1 -0
- package/dist/src/unstable/{workspace → plan}/resolve-plan.d.ts +30 -2
- package/dist/src/unstable/plan/resolve-plan.d.ts.map +1 -0
- package/dist/src/unstable/{workspace → plan}/resolve-plan.js +37 -6
- package/dist/src/unstable/plan/resolve-plan.js.map +1 -0
- package/dist/src/unstable/publish/manifest-policy.d.ts +8 -8
- package/dist/src/unstable/registry/__generated__/registry-client.d.ts +675 -518
- package/dist/src/unstable/registry/__generated__/registry-client.d.ts.map +1 -1
- package/dist/src/unstable/registry/__generated__/registry-client.js +546 -396
- package/dist/src/unstable/registry/__generated__/registry-client.js.map +1 -1
- package/dist/src/unstable/registry/remote-client.d.ts.map +1 -1
- package/dist/src/unstable/registry/remote-client.js +123 -18
- package/dist/src/unstable/registry/remote-client.js.map +1 -1
- package/dist/src/unstable/registry/schema.d.ts +2 -2
- package/dist/src/unstable/settings/index.d.ts +2 -0
- package/dist/src/unstable/settings/index.d.ts.map +1 -1
- package/dist/src/unstable/settings/index.js +1 -0
- package/dist/src/unstable/settings/index.js.map +1 -1
- package/dist/src/unstable/settings/schema.d.ts +3 -0
- package/dist/src/unstable/settings/schema.d.ts.map +1 -1
- package/dist/src/unstable/settings/schema.js +3 -0
- package/dist/src/unstable/settings/schema.js.map +1 -1
- package/dist/src/unstable/settings/settings.d.ts +10 -0
- package/dist/src/unstable/settings/settings.d.ts.map +1 -1
- package/dist/src/unstable/skills/manager.d.ts +1 -1
- package/dist/src/unstable/skills/manager.d.ts.map +1 -1
- package/dist/src/unstable/skills/manager.js +2 -2
- package/dist/src/unstable/skills/manager.js.map +1 -1
- package/dist/src/unstable/skills/materialization.js +1 -1
- package/dist/src/unstable/skills/materialization.js.map +1 -1
- package/dist/src/unstable/skills/operations/copy.d.ts +2 -2
- package/dist/src/unstable/skills/operations/copy.d.ts.map +1 -1
- package/dist/src/unstable/skills/operations/disable.d.ts +2 -2
- package/dist/src/unstable/skills/operations/disable.d.ts.map +1 -1
- package/dist/src/unstable/skills/operations/enable.d.ts +2 -2
- package/dist/src/unstable/skills/operations/enable.d.ts.map +1 -1
- package/dist/src/unstable/skills/operations/install.d.ts +2 -2
- package/dist/src/unstable/skills/operations/install.d.ts.map +1 -1
- package/dist/src/unstable/skills/operations/install.js +1 -1
- package/dist/src/unstable/skills/operations/install.js.map +1 -1
- package/dist/src/unstable/skills/operations/new-skill.d.ts +2 -2
- package/dist/src/unstable/skills/operations/new-skill.d.ts.map +1 -1
- package/dist/src/unstable/skills/operations/publish.d.ts +2 -2
- package/dist/src/unstable/skills/operations/publish.d.ts.map +1 -1
- package/dist/src/unstable/skills/operations/rename.d.ts +2 -2
- package/dist/src/unstable/skills/operations/rename.d.ts.map +1 -1
- package/dist/src/unstable/skills/operations/uninstall.d.ts +2 -2
- package/dist/src/unstable/skills/operations/uninstall.d.ts.map +1 -1
- package/dist/src/unstable/skills/operations/uninstall.js +1 -1
- package/dist/src/unstable/skills/operations/uninstall.js.map +1 -1
- package/dist/src/unstable/source-resolution/service.d.ts +1 -1
- package/dist/src/unstable/source-resolution/service.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/service.js +1 -1
- package/dist/src/unstable/source-resolution/service.js.map +1 -1
- package/dist/src/unstable/sources/types.d.ts +29 -29
- package/dist/src/unstable/sources/types.d.ts.map +1 -1
- package/dist/src/unstable/subagents/manager.d.ts +1 -1
- package/dist/src/unstable/subagents/manager.d.ts.map +1 -1
- package/dist/src/unstable/subagents/manager.js +4 -4
- package/dist/src/unstable/subagents/manager.js.map +1 -1
- package/dist/src/unstable/subagents/manifest-schema.js +2 -2
- package/dist/src/unstable/subagents/manifest-schema.js.map +1 -1
- package/dist/src/unstable/subagents/operations/disable.d.ts +2 -2
- package/dist/src/unstable/subagents/operations/disable.d.ts.map +1 -1
- package/dist/src/unstable/subagents/operations/enable.d.ts +2 -2
- package/dist/src/unstable/subagents/operations/enable.d.ts.map +1 -1
- package/dist/src/unstable/subagents/operations/publish.d.ts +2 -2
- package/dist/src/unstable/subagents/operations/publish.d.ts.map +1 -1
- package/dist/src/unstable/telemetry/__generated__/telemetry-client.d.ts +20 -12
- package/dist/src/unstable/telemetry/__generated__/telemetry-client.d.ts.map +1 -1
- package/dist/src/unstable/telemetry/__generated__/telemetry-client.js +11 -3
- package/dist/src/unstable/telemetry/__generated__/telemetry-client.js.map +1 -1
- package/dist/src/unstable/telemetry/client.d.ts +1 -1
- package/dist/src/unstable/telemetry/client.d.ts.map +1 -1
- package/dist/src/unstable/telemetry/client.js +1 -1
- package/dist/src/unstable/telemetry/client.js.map +1 -1
- package/dist/src/unstable/update-check/update-check.d.ts +1 -1
- package/dist/src/unstable/update-check/update-check.d.ts.map +1 -1
- package/dist/src/unstable/update-check/update-check.js +1 -1
- package/dist/src/unstable/update-check/update-check.js.map +1 -1
- package/dist/src/unstable/utils/fs-helpers.d.ts +7 -6
- package/dist/src/unstable/utils/fs-helpers.d.ts.map +1 -1
- package/dist/src/unstable/utils/fs-helpers.js +9 -9
- package/dist/src/unstable/utils/fs-helpers.js.map +1 -1
- package/dist/src/unstable/workflows/install-command/workflow.d.ts +1 -1
- package/dist/src/unstable/workflows/install-command/workflow.d.ts.map +1 -1
- package/dist/src/unstable/workflows/install-command/workflow.js +1 -1
- package/dist/src/unstable/workflows/install-command/workflow.js.map +1 -1
- package/dist/src/unstable/workflows/uninstall-command/workflow.d.ts +1 -1
- package/dist/src/unstable/workflows/uninstall-command/workflow.d.ts.map +1 -1
- package/dist/src/unstable/workflows/uninstall-command/workflow.js +1 -1
- package/dist/src/unstable/workflows/uninstall-command/workflow.js.map +1 -1
- package/dist/src/unstable/workspace/augment-plan.d.ts +1 -1
- package/dist/src/unstable/workspace/augment-plan.d.ts.map +1 -1
- package/dist/src/unstable/workspace/display-plan.d.ts +1 -1
- package/dist/src/unstable/workspace/display-plan.d.ts.map +1 -1
- package/dist/src/unstable/workspace/display-plan.js +1 -1
- package/dist/src/unstable/workspace/display-plan.js.map +1 -1
- package/dist/src/unstable/workspace/index.d.ts +1 -5
- package/dist/src/unstable/workspace/index.d.ts.map +1 -1
- package/dist/src/unstable/workspace/index.js +5 -7
- package/dist/src/unstable/workspace/index.js.map +1 -1
- package/dist/src/unstable/workspace/initialization-interaction.d.ts +1 -1
- package/dist/src/unstable/workspace/initialization-interaction.d.ts.map +1 -1
- package/dist/src/unstable/workspace/initialization-interaction.js +1 -1
- package/dist/src/unstable/workspace/initialization-interaction.js.map +1 -1
- package/dist/src/unstable/workspace/initialization.d.ts +15 -0
- package/dist/src/unstable/workspace/initialization.d.ts.map +1 -1
- package/dist/src/unstable/workspace/initialization.js +2 -2
- package/dist/src/unstable/workspace/initialization.js.map +1 -1
- package/dist/src/unstable/workspace/paths.d.ts +4 -21
- package/dist/src/unstable/workspace/paths.d.ts.map +1 -1
- package/dist/src/unstable/workspace/paths.js +19 -8
- package/dist/src/unstable/workspace/paths.js.map +1 -1
- package/dist/src/unstable/workspace/reconciliation.d.ts +1 -1
- package/dist/src/unstable/workspace/reconciliation.d.ts.map +1 -1
- package/dist/src/unstable/workspace/resolve-plan-interaction.d.ts +1 -1
- package/dist/src/unstable/workspace/resolve-plan-interaction.d.ts.map +1 -1
- package/dist/src/unstable/workspace/resolve-plan-interaction.js +1 -1
- package/dist/src/unstable/workspace/resolve-plan-interaction.js.map +1 -1
- package/dist/src/unstable/workspace/scan-plan-readiness.d.ts +1 -1
- package/dist/src/unstable/workspace/scan-plan-readiness.d.ts.map +1 -1
- package/dist/src/unstable/workspace/service-interface.d.ts +3 -1
- package/dist/src/unstable/workspace/service-interface.d.ts.map +1 -1
- package/dist/src/unstable/workspace/service-interface.js +1 -1
- package/dist/src/unstable/workspace/service-interface.js.map +1 -1
- package/dist/src/unstable/workspace/service.js +1 -1
- package/dist/src/unstable/workspace/service.js.map +1 -1
- package/dist/src/unstable/workspace/settings-validation/types.d.ts +11 -1
- package/dist/src/unstable/workspace/settings-validation/types.d.ts.map +1 -1
- package/dist/src/unstable/workspace/version-currency/check-currency.d.ts +41 -0
- package/dist/src/unstable/workspace/version-currency/check-currency.d.ts.map +1 -0
- package/dist/src/unstable/workspace/version-currency/check-currency.js +50 -0
- package/dist/src/unstable/workspace/version-currency/check-currency.js.map +1 -0
- package/dist/src/unstable/workspace/version-currency/collectors.d.ts +55 -0
- package/dist/src/unstable/workspace/version-currency/collectors.d.ts.map +1 -0
- package/dist/src/unstable/workspace/version-currency/collectors.js +127 -0
- package/dist/src/unstable/workspace/version-currency/collectors.js.map +1 -0
- package/dist/src/unstable/workspace/version-currency/index.d.ts +11 -0
- package/dist/src/unstable/workspace/version-currency/index.d.ts.map +1 -0
- package/dist/src/unstable/workspace/version-currency/index.js +11 -0
- package/dist/src/unstable/workspace/version-currency/index.js.map +1 -0
- package/dist/src/unstable/workspace/version-currency/test-stubs.d.ts +5 -0
- package/dist/src/unstable/workspace/version-currency/test-stubs.d.ts.map +1 -0
- package/dist/src/unstable/workspace/version-currency/test-stubs.js +31 -0
- package/dist/src/unstable/workspace/version-currency/test-stubs.js.map +1 -0
- package/package.json +14 -6
- package/dist/src/unstable/workspace/apply-plan.d.ts.map +0 -1
- package/dist/src/unstable/workspace/apply-plan.js.map +0 -1
- package/dist/src/unstable/workspace/doctor/check-def.d.ts +0 -29
- package/dist/src/unstable/workspace/doctor/check-def.d.ts.map +0 -1
- package/dist/src/unstable/workspace/doctor/check-def.js +0 -17
- package/dist/src/unstable/workspace/doctor/check-def.js.map +0 -1
- package/dist/src/unstable/workspace/doctor/checks/agents-configured.d.ts +0 -5
- package/dist/src/unstable/workspace/doctor/checks/agents-configured.d.ts.map +0 -1
- package/dist/src/unstable/workspace/doctor/checks/agents-configured.js +0 -170
- package/dist/src/unstable/workspace/doctor/checks/agents-configured.js.map +0 -1
- package/dist/src/unstable/workspace/doctor/checks/extensions-installed.d.ts +0 -5
- package/dist/src/unstable/workspace/doctor/checks/extensions-installed.d.ts.map +0 -1
- package/dist/src/unstable/workspace/doctor/checks/extensions-installed.js +0 -472
- package/dist/src/unstable/workspace/doctor/checks/extensions-installed.js.map +0 -1
- package/dist/src/unstable/workspace/doctor/checks/workspace-ready.d.ts +0 -5
- package/dist/src/unstable/workspace/doctor/checks/workspace-ready.d.ts.map +0 -1
- package/dist/src/unstable/workspace/doctor/checks/workspace-ready.js +0 -201
- package/dist/src/unstable/workspace/doctor/checks/workspace-ready.js.map +0 -1
- package/dist/src/unstable/workspace/doctor/diagnose.d.ts +0 -49
- package/dist/src/unstable/workspace/doctor/diagnose.d.ts.map +0 -1
- package/dist/src/unstable/workspace/doctor/diagnose.js +0 -65
- package/dist/src/unstable/workspace/doctor/diagnose.js.map +0 -1
- package/dist/src/unstable/workspace/doctor/index.d.ts +0 -8
- package/dist/src/unstable/workspace/doctor/index.d.ts.map +0 -1
- package/dist/src/unstable/workspace/doctor/index.js +0 -6
- package/dist/src/unstable/workspace/doctor/index.js.map +0 -1
- package/dist/src/unstable/workspace/doctor/rollup.d.ts +0 -4
- package/dist/src/unstable/workspace/doctor/rollup.d.ts.map +0 -1
- package/dist/src/unstable/workspace/doctor/rollup.js +0 -28
- package/dist/src/unstable/workspace/doctor/rollup.js.map +0 -1
- package/dist/src/unstable/workspace/doctor/runner.d.ts +0 -6
- package/dist/src/unstable/workspace/doctor/runner.d.ts.map +0 -1
- package/dist/src/unstable/workspace/doctor/runner.js +0 -179
- package/dist/src/unstable/workspace/doctor/runner.js.map +0 -1
- package/dist/src/unstable/workspace/doctor/types.d.ts +0 -125
- package/dist/src/unstable/workspace/doctor/types.d.ts.map +0 -1
- package/dist/src/unstable/workspace/doctor/types.js +0 -58
- package/dist/src/unstable/workspace/doctor/types.js.map +0 -1
- package/dist/src/unstable/workspace/plan.d.ts.map +0 -1
- package/dist/src/unstable/workspace/plan.js.map +0 -1
- package/dist/src/unstable/workspace/resolve-plan.d.ts.map +0 -1
- package/dist/src/unstable/workspace/resolve-plan.js.map +0 -1
- package/dist/src/unstable/workspace/sync.d.ts +0 -17
- package/dist/src/unstable/workspace/sync.d.ts.map +0 -1
- package/dist/src/unstable/workspace/sync.js +0 -142
- package/dist/src/unstable/workspace/sync.js.map +0 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `workspace/initialized` — `.axm/` and `.axm/settings.json` both exist.
|
|
3
|
+
*
|
|
4
|
+
* Per `docs/design/lint-engine.md §10.workspace` "Foundation" row:
|
|
5
|
+
*
|
|
6
|
+
* Workspace bootstrap invariant. Absorbs doctor `workspace-ready.*` checks.
|
|
7
|
+
*
|
|
8
|
+
* Applies to every workspace context (both scopes). Owns the presence arm;
|
|
9
|
+
* `workspace/settings-schema-valid` owns the contents arm and early-returns
|
|
10
|
+
* when `settings.json` is missing, so a fresh workspace surfaces exactly one
|
|
11
|
+
* finding from this rule.
|
|
12
|
+
*
|
|
13
|
+
* Advisory-only — scaffolding a workspace is a multi-step `axm init` command;
|
|
14
|
+
* keeping it a suggestion scopes autofix to Operation-expressible mutations.
|
|
15
|
+
*
|
|
16
|
+
* @experimental This API is unstable and may change without notice.
|
|
17
|
+
* @packageDocumentation
|
|
18
|
+
*/
|
|
19
|
+
import type { WorkspaceRuleContext } from "../../context.js";
|
|
20
|
+
import type { AdvisoryRule } from "../../rule.js";
|
|
21
|
+
export declare const initializedRule: AdvisoryRule<WorkspaceRuleContext>;
|
|
22
|
+
//# sourceMappingURL=initialized.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initialized.d.ts","sourceRoot":"","sources":["../../../../../../src/unstable/lint/catalog/workspace/initialized.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAAmB,YAAY,EAAE,MAAM,eAAe,CAAC;AAMnE,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,oBAAoB,CAmC9D,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `workspace/initialized` — `.axm/` and `.axm/settings.json` both exist.
|
|
3
|
+
*
|
|
4
|
+
* Per `docs/design/lint-engine.md §10.workspace` "Foundation" row:
|
|
5
|
+
*
|
|
6
|
+
* Workspace bootstrap invariant. Absorbs doctor `workspace-ready.*` checks.
|
|
7
|
+
*
|
|
8
|
+
* Applies to every workspace context (both scopes). Owns the presence arm;
|
|
9
|
+
* `workspace/settings-schema-valid` owns the contents arm and early-returns
|
|
10
|
+
* when `settings.json` is missing, so a fresh workspace surfaces exactly one
|
|
11
|
+
* finding from this rule.
|
|
12
|
+
*
|
|
13
|
+
* Advisory-only — scaffolding a workspace is a multi-step `axm init` command;
|
|
14
|
+
* keeping it a suggestion scopes autofix to Operation-expressible mutations.
|
|
15
|
+
*
|
|
16
|
+
* @experimental This API is unstable and may change without notice.
|
|
17
|
+
* @packageDocumentation
|
|
18
|
+
*/
|
|
19
|
+
import * as Effect from "effect/Effect";
|
|
20
|
+
const RULE_ID = "workspace/initialized";
|
|
21
|
+
const AXM_DIR = ".axm";
|
|
22
|
+
const SETTINGS_REL = ".axm/settings.json";
|
|
23
|
+
export const initializedRule = {
|
|
24
|
+
id: RULE_ID,
|
|
25
|
+
description: "Workspace is initialized (.axm directory and settings.json present).",
|
|
26
|
+
kind: "advisory",
|
|
27
|
+
severity: "error",
|
|
28
|
+
check: (context) => Effect.gen(function* () {
|
|
29
|
+
const [axmExists, settingsExists] = yield* Effect.all([context.workspace.exists(AXM_DIR), context.workspace.exists(SETTINGS_REL)], { concurrency: "unbounded" });
|
|
30
|
+
const findings = [];
|
|
31
|
+
if (!axmExists) {
|
|
32
|
+
findings.push({
|
|
33
|
+
kind: "advisory",
|
|
34
|
+
ruleId: RULE_ID,
|
|
35
|
+
severity: "error",
|
|
36
|
+
message: "Workspace is not initialized; .axm directory is missing.",
|
|
37
|
+
suggestions: ["Run `axm init` to scaffold the workspace."],
|
|
38
|
+
location: { file: AXM_DIR },
|
|
39
|
+
});
|
|
40
|
+
return findings;
|
|
41
|
+
}
|
|
42
|
+
if (!settingsExists) {
|
|
43
|
+
findings.push({
|
|
44
|
+
kind: "advisory",
|
|
45
|
+
ruleId: RULE_ID,
|
|
46
|
+
severity: "error",
|
|
47
|
+
message: "Workspace is missing .axm/settings.json.",
|
|
48
|
+
suggestions: ["Run `axm init` to scaffold settings.json."],
|
|
49
|
+
location: { file: SETTINGS_REL },
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
return findings;
|
|
53
|
+
}),
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=initialized.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initialized.js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BACjB,OAAO,EAAE,0CAA0C;gBACnD,WAAW,EAAE,CAAC,2CAA2C,CAAC;gBAC1D,QAAQ,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE;aACjC,CAAC,CAAC;QACL,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAC;CACL,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `workspace/lockfile-valid` — `.axm/axm-lock.yaml` parses and conforms to
|
|
3
|
+
* `LockfileSchema`.
|
|
4
|
+
*
|
|
5
|
+
* Cascade per `docs/design/lint-engine.md §10.workspace`:
|
|
6
|
+
*
|
|
7
|
+
* 1. `.axm/axm-lock.yaml` exists when settings declares any extension
|
|
8
|
+
* (skills, packs, commands, subagents, mcp-servers). **Missing arm is
|
|
9
|
+
* autofixing** — `fix` returns `install-{type}` Operations for every
|
|
10
|
+
* declared extension; each handler writes its lockfile entry as a side
|
|
11
|
+
* effect, recreating the lockfile.
|
|
12
|
+
* 2. Lockfile bytes parse as YAML (the accessor surfaces parse failures via
|
|
13
|
+
* `LockfileReadError`; we emit one advisory finding per read failure).
|
|
14
|
+
* 3. `Schema.decodeUnknownResult(LockfileSchema)` succeeds; `ParseResult`
|
|
15
|
+
* issues map 1:1 to advisory findings via `schemaDecodeFindings`.
|
|
16
|
+
*
|
|
17
|
+
* Arms 2 and 3 are advisory (no autofix) because repairing them requires
|
|
18
|
+
* editing a file that axm does not own through the per-extension Operation
|
|
19
|
+
* vocabulary. Arm 1 is autofixing because every install handler writes a
|
|
20
|
+
* fresh lockfile entry as a side effect, and chained install-Operations
|
|
21
|
+
* recreate the file deterministically.
|
|
22
|
+
*
|
|
23
|
+
* Early-return: workspaces with no declared extensions (no skills, no
|
|
24
|
+
* packs, no commands, no subagents, no mcp-servers) don't require a
|
|
25
|
+
* lockfile — this rule emits zero findings.
|
|
26
|
+
*
|
|
27
|
+
* @experimental This API is unstable and may change without notice.
|
|
28
|
+
* @packageDocumentation
|
|
29
|
+
*/
|
|
30
|
+
import type { WorkspaceRuleContext } from "../../context.js";
|
|
31
|
+
import type { AutofixingRule } from "../../rule.js";
|
|
32
|
+
export declare const lockfileValidRule: AutofixingRule<WorkspaceRuleContext>;
|
|
33
|
+
//# sourceMappingURL=lockfile-valid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lockfile-valid.d.ts","sourceRoot":"","sources":["../../../../../../src/unstable/lint/catalog/workspace/lockfile-valid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAMH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAGV,cAAc,EAEf,MAAM,eAAe,CAAC;AAwCvB,eAAO,MAAM,iBAAiB,EAAE,cAAc,CAAC,oBAAoB,CAuElE,CAAC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `workspace/lockfile-valid` — `.axm/axm-lock.yaml` parses and conforms to
|
|
3
|
+
* `LockfileSchema`.
|
|
4
|
+
*
|
|
5
|
+
* Cascade per `docs/design/lint-engine.md §10.workspace`:
|
|
6
|
+
*
|
|
7
|
+
* 1. `.axm/axm-lock.yaml` exists when settings declares any extension
|
|
8
|
+
* (skills, packs, commands, subagents, mcp-servers). **Missing arm is
|
|
9
|
+
* autofixing** — `fix` returns `install-{type}` Operations for every
|
|
10
|
+
* declared extension; each handler writes its lockfile entry as a side
|
|
11
|
+
* effect, recreating the lockfile.
|
|
12
|
+
* 2. Lockfile bytes parse as YAML (the accessor surfaces parse failures via
|
|
13
|
+
* `LockfileReadError`; we emit one advisory finding per read failure).
|
|
14
|
+
* 3. `Schema.decodeUnknownResult(LockfileSchema)` succeeds; `ParseResult`
|
|
15
|
+
* issues map 1:1 to advisory findings via `schemaDecodeFindings`.
|
|
16
|
+
*
|
|
17
|
+
* Arms 2 and 3 are advisory (no autofix) because repairing them requires
|
|
18
|
+
* editing a file that axm does not own through the per-extension Operation
|
|
19
|
+
* vocabulary. Arm 1 is autofixing because every install handler writes a
|
|
20
|
+
* fresh lockfile entry as a side effect, and chained install-Operations
|
|
21
|
+
* recreate the file deterministically.
|
|
22
|
+
*
|
|
23
|
+
* Early-return: workspaces with no declared extensions (no skills, no
|
|
24
|
+
* packs, no commands, no subagents, no mcp-servers) don't require a
|
|
25
|
+
* lockfile — this rule emits zero findings.
|
|
26
|
+
*
|
|
27
|
+
* @experimental This API is unstable and may change without notice.
|
|
28
|
+
* @packageDocumentation
|
|
29
|
+
*/
|
|
30
|
+
import * as Effect from "effect/Effect";
|
|
31
|
+
import * as Option from "effect/Option";
|
|
32
|
+
import * as Result from "effect/Result";
|
|
33
|
+
import * as Schema from "effect/Schema";
|
|
34
|
+
import { LockfileSchema } from "../../../lockfile/schema.js";
|
|
35
|
+
import { SettingsSchema } from "../../../settings/schema.js";
|
|
36
|
+
import { schemaDecodeFindings } from "../shared/schema-rule.js";
|
|
37
|
+
import { collectMissingLockfileInstallOps } from "./helpers/install-ops.js";
|
|
38
|
+
import { EMPTY_LINT_FINDINGS, EMPTY_OPERATIONS } from "./helpers/empty.js";
|
|
39
|
+
const RULE_ID = "workspace/lockfile-valid";
|
|
40
|
+
const LOCKFILE_REL = ".axm/axm-lock.yaml";
|
|
41
|
+
const MISSING_LOCKFILE_MISSING_SUGGESTION = "Reinstall every declared extension to rewrite the lockfile.";
|
|
42
|
+
const hasAnyDeclaration = (settings) => {
|
|
43
|
+
const skills = Object.keys(settings.skills ?? {}).length;
|
|
44
|
+
const packs = Object.keys(settings.packs ?? {}).length;
|
|
45
|
+
const commands = Object.keys(settings.commands ?? {}).length;
|
|
46
|
+
const subagents = Object.keys(settings.subagents ?? {}).length;
|
|
47
|
+
const mcpServers = Object.keys(settings.mcpServers ?? {}).length;
|
|
48
|
+
return skills + packs + commands + subagents + mcpServers > 0;
|
|
49
|
+
};
|
|
50
|
+
const decodeSettings = (input) => {
|
|
51
|
+
const result = Schema.decodeUnknownResult(SettingsSchema)(input, {
|
|
52
|
+
onExcessProperty: "ignore",
|
|
53
|
+
errors: "all",
|
|
54
|
+
});
|
|
55
|
+
return Result.isSuccess(result) ? Option.some(result.success) : Option.none();
|
|
56
|
+
};
|
|
57
|
+
const makeMissingFinding = () => ({
|
|
58
|
+
kind: "autofixable",
|
|
59
|
+
ruleId: RULE_ID,
|
|
60
|
+
severity: "error",
|
|
61
|
+
message: "Lockfile is missing while settings declare installed extensions; reinstall to regenerate it.",
|
|
62
|
+
suggestions: [MISSING_LOCKFILE_MISSING_SUGGESTION],
|
|
63
|
+
location: { file: LOCKFILE_REL },
|
|
64
|
+
});
|
|
65
|
+
export const lockfileValidRule = {
|
|
66
|
+
id: RULE_ID,
|
|
67
|
+
description: "axm-lock.yaml is present and conforms to LockfileSchema.",
|
|
68
|
+
kind: "autofixing",
|
|
69
|
+
severity: "error",
|
|
70
|
+
check: (context) => Effect.gen(function* () {
|
|
71
|
+
// Cascade arm 1: lockfile presence when declarations exist.
|
|
72
|
+
const settingsResult = yield* Effect.result(context.workspace.settings);
|
|
73
|
+
if (Result.isFailure(settingsResult)) {
|
|
74
|
+
return EMPTY_LINT_FINDINGS;
|
|
75
|
+
}
|
|
76
|
+
const settings = decodeSettings(settingsResult.success);
|
|
77
|
+
if (Option.isNone(settings)) {
|
|
78
|
+
// workspace/settings-schema-valid owns the decode arm; nothing to
|
|
79
|
+
// do here until settings decode.
|
|
80
|
+
return EMPTY_LINT_FINDINGS;
|
|
81
|
+
}
|
|
82
|
+
const declared = hasAnyDeclaration(settings.value);
|
|
83
|
+
const lockfileResult = yield* Effect.result(context.workspace.lockfile);
|
|
84
|
+
if (Result.isFailure(lockfileResult)) {
|
|
85
|
+
// Read failure surfaces as advisory finding naming the IO problem.
|
|
86
|
+
const advisory = {
|
|
87
|
+
kind: "advisory",
|
|
88
|
+
ruleId: RULE_ID,
|
|
89
|
+
severity: "error",
|
|
90
|
+
message: `Could not read axm-lock.yaml: ${lockfileResult.failure.message}`,
|
|
91
|
+
suggestions: ["Fix YAML syntax at the referenced location."],
|
|
92
|
+
location: { file: LOCKFILE_REL },
|
|
93
|
+
};
|
|
94
|
+
const readFailure = [advisory];
|
|
95
|
+
return readFailure;
|
|
96
|
+
}
|
|
97
|
+
const option = lockfileResult.success;
|
|
98
|
+
if (Option.isNone(option)) {
|
|
99
|
+
if (!declared) {
|
|
100
|
+
return EMPTY_LINT_FINDINGS;
|
|
101
|
+
}
|
|
102
|
+
return [makeMissingFinding()];
|
|
103
|
+
}
|
|
104
|
+
// Cascade arm 3: schema decode of the parsed YAML.
|
|
105
|
+
const decodedFindings = yield* schemaDecodeFindings(RULE_ID, "error", LOCKFILE_REL, LockfileSchema, option.value);
|
|
106
|
+
return decodedFindings;
|
|
107
|
+
}),
|
|
108
|
+
fix: (context, finding) => Effect.gen(function* () {
|
|
109
|
+
// Autofix only applies to the missing arm; the advisory arms above
|
|
110
|
+
// never produce `AutofixableFinding`s.
|
|
111
|
+
if (finding.suggestions[0] !== MISSING_LOCKFILE_MISSING_SUGGESTION) {
|
|
112
|
+
return EMPTY_OPERATIONS;
|
|
113
|
+
}
|
|
114
|
+
const settingsResult = yield* Effect.result(context.workspace.settings);
|
|
115
|
+
if (Result.isFailure(settingsResult)) {
|
|
116
|
+
return EMPTY_OPERATIONS;
|
|
117
|
+
}
|
|
118
|
+
const settings = decodeSettings(settingsResult.success);
|
|
119
|
+
if (Option.isNone(settings)) {
|
|
120
|
+
return EMPTY_OPERATIONS;
|
|
121
|
+
}
|
|
122
|
+
return collectMissingLockfileInstallOps(settings.value);
|
|
123
|
+
}),
|
|
124
|
+
};
|
|
125
|
+
//# sourceMappingURL=lockfile-valid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lockfile-valid.js","sourceRoot":"","sources":["../../../../../../src/unstable/lint/catalog/workspace/lockfile-valid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;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E,uCAAuC;QACvC,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,mCAAmC,EAAE,CAAC;YACnE,OAAO,gBAAgB,CAAC;QAC1B,CAAC;QAED,MAAM,cAAc,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QACxE,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,CAAC;YACrC,OAAO,gBAAgB,CAAC;QAC1B,CAAC;QACD,MAAM,QAAQ,GAAG,cAAc,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACxD,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC5B,OAAO,gBAAgB,CAAC;QAC1B,CAAC;QACD,OAAO,gCAAgC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC1D,CAAC,CAAC;CACL,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `workspace/packs-declarations-valid` — declared packs name a resolvable,
|
|
3
|
+
* owner-qualified, unique source.
|
|
4
|
+
*
|
|
5
|
+
* Mirrors `workspace/skills-declarations-valid` against the packs map:
|
|
6
|
+
*
|
|
7
|
+
* 1. Source resolvability — pack source is not a bare name.
|
|
8
|
+
* 2. Owner qualification — registry-shaped pack sources carry `@owner/`.
|
|
9
|
+
* 3. Duplicate FQNs — two settings entries normalize to the same FQN.
|
|
10
|
+
*
|
|
11
|
+
* One finding per affected entity. Advisory.
|
|
12
|
+
*
|
|
13
|
+
* @experimental This API is unstable and may change without notice.
|
|
14
|
+
* @packageDocumentation
|
|
15
|
+
*/
|
|
16
|
+
import type { WorkspaceRuleContext } from "../../context.js";
|
|
17
|
+
import type { AdvisoryRule } from "../../rule.js";
|
|
18
|
+
export declare const packsDeclarationsValidRule: AdvisoryRule<WorkspaceRuleContext>;
|
|
19
|
+
//# sourceMappingURL=packs-declarations-valid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packs-declarations-valid.d.ts","sourceRoot":"","sources":["../../../../../../src/unstable/lint/catalog/workspace/packs-declarations-valid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAAmB,YAAY,EAAE,MAAM,eAAe,CAAC;AA+FnE,eAAO,MAAM,0BAA0B,EAAE,YAAY,CAAC,oBAAoB,CAuDzE,CAAC"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `workspace/packs-declarations-valid` — declared packs name a resolvable,
|
|
3
|
+
* owner-qualified, unique source.
|
|
4
|
+
*
|
|
5
|
+
* Mirrors `workspace/skills-declarations-valid` against the packs map:
|
|
6
|
+
*
|
|
7
|
+
* 1. Source resolvability — pack source is not a bare name.
|
|
8
|
+
* 2. Owner qualification — registry-shaped pack sources carry `@owner/`.
|
|
9
|
+
* 3. Duplicate FQNs — two settings entries normalize to the same FQN.
|
|
10
|
+
*
|
|
11
|
+
* One finding per affected entity. Advisory.
|
|
12
|
+
*
|
|
13
|
+
* @experimental This API is unstable and may change without notice.
|
|
14
|
+
* @packageDocumentation
|
|
15
|
+
*/
|
|
16
|
+
import * as Effect from "effect/Effect";
|
|
17
|
+
import * as Option from "effect/Option";
|
|
18
|
+
import * as Result from "effect/Result";
|
|
19
|
+
import * as Schema from "effect/Schema";
|
|
20
|
+
import { SettingsSchema } from "../../../settings/schema.js";
|
|
21
|
+
import { parseRegistrySource } from "./helpers/registry-source.js";
|
|
22
|
+
import { EMPTY_ADVISORY_FINDINGS } from "./helpers/empty.js";
|
|
23
|
+
const RULE_ID = "workspace/packs-declarations-valid";
|
|
24
|
+
const SETTINGS_REL = ".axm/settings.json";
|
|
25
|
+
const BARE_NAME_RE = /^[a-z0-9][a-z0-9-]*(?:@[^\s/:]+)?$/i;
|
|
26
|
+
const NON_REGISTRY_MARKERS = [
|
|
27
|
+
/^\.\//,
|
|
28
|
+
/^\.\.\//,
|
|
29
|
+
/^\//,
|
|
30
|
+
/^file:\/\//,
|
|
31
|
+
/:\/\//,
|
|
32
|
+
/^[a-z][a-z0-9+.-]*:/i,
|
|
33
|
+
];
|
|
34
|
+
const isClearlyNonRegistrySource = (source) => NON_REGISTRY_MARKERS.some((pattern) => pattern.test(source));
|
|
35
|
+
const decodeSettings = (input) => {
|
|
36
|
+
const result = Schema.decodeUnknownResult(SettingsSchema)(input, {
|
|
37
|
+
onExcessProperty: "ignore",
|
|
38
|
+
errors: "all",
|
|
39
|
+
});
|
|
40
|
+
return Result.isSuccess(result) ? Option.some(result.success) : Option.none();
|
|
41
|
+
};
|
|
42
|
+
const categorizeEntry = (name, source) => {
|
|
43
|
+
const parsed = parseRegistrySource(source);
|
|
44
|
+
if (parsed !== undefined) {
|
|
45
|
+
return {
|
|
46
|
+
name,
|
|
47
|
+
source,
|
|
48
|
+
kind: "registry",
|
|
49
|
+
registryFqn: `${parsed.owner}/${parsed.type}/${parsed.name}`,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
if (isClearlyNonRegistrySource(source)) {
|
|
53
|
+
// Packs must use registry sources per the extensions-installed doctor
|
|
54
|
+
// rule; an unqualified non-registry source surfaces as an error.
|
|
55
|
+
return { name, source, kind: "non-registry" };
|
|
56
|
+
}
|
|
57
|
+
if (BARE_NAME_RE.test(source)) {
|
|
58
|
+
return { name, source, kind: "bare" };
|
|
59
|
+
}
|
|
60
|
+
return { name, source, kind: "registry-no-owner" };
|
|
61
|
+
};
|
|
62
|
+
const bareNameFinding = (entry) => ({
|
|
63
|
+
kind: "advisory",
|
|
64
|
+
ruleId: RULE_ID,
|
|
65
|
+
severity: "error",
|
|
66
|
+
message: `Pack '${entry.name}' has a bare-name source '${entry.source}'.`,
|
|
67
|
+
suggestions: [`Rewrite the source as @owner/packs/${entry.name}.`],
|
|
68
|
+
location: { file: SETTINGS_REL },
|
|
69
|
+
});
|
|
70
|
+
const nonRegistryFinding = (entry) => ({
|
|
71
|
+
kind: "advisory",
|
|
72
|
+
ruleId: RULE_ID,
|
|
73
|
+
severity: "error",
|
|
74
|
+
message: `Pack '${entry.name}' must use a registry source; got '${entry.source}'.`,
|
|
75
|
+
suggestions: [`Rewrite the source as @owner/packs/${entry.name} pointing to a known registry.`],
|
|
76
|
+
location: { file: SETTINGS_REL },
|
|
77
|
+
});
|
|
78
|
+
const missingOwnerFinding = (entry) => ({
|
|
79
|
+
kind: "advisory",
|
|
80
|
+
ruleId: RULE_ID,
|
|
81
|
+
severity: "error",
|
|
82
|
+
message: `Pack '${entry.name}' has a registry-shaped source '${entry.source}' missing the @owner prefix.`,
|
|
83
|
+
suggestions: [`Rewrite the source as @owner/packs/${entry.name}.`],
|
|
84
|
+
location: { file: SETTINGS_REL },
|
|
85
|
+
});
|
|
86
|
+
const duplicateFinding = (entry, duplicates) => ({
|
|
87
|
+
kind: "advisory",
|
|
88
|
+
ruleId: RULE_ID,
|
|
89
|
+
severity: "error",
|
|
90
|
+
message: `Pack '${entry.name}' resolves to a registry FQN declared more than once: ${duplicates.join(", ")}.`,
|
|
91
|
+
suggestions: [`Remove duplicate entries and keep one per FQN.`],
|
|
92
|
+
location: { file: SETTINGS_REL },
|
|
93
|
+
});
|
|
94
|
+
export const packsDeclarationsValidRule = {
|
|
95
|
+
id: RULE_ID,
|
|
96
|
+
description: "Declared packs name a resolvable, owner-qualified, unique source.",
|
|
97
|
+
kind: "advisory",
|
|
98
|
+
severity: "error",
|
|
99
|
+
check: (context) => Effect.gen(function* () {
|
|
100
|
+
const settingsResult = yield* Effect.result(context.workspace.settings);
|
|
101
|
+
if (Result.isFailure(settingsResult)) {
|
|
102
|
+
return EMPTY_ADVISORY_FINDINGS;
|
|
103
|
+
}
|
|
104
|
+
const decoded = decodeSettings(settingsResult.success);
|
|
105
|
+
if (Option.isNone(decoded)) {
|
|
106
|
+
return EMPTY_ADVISORY_FINDINGS;
|
|
107
|
+
}
|
|
108
|
+
const packs = decoded.value.packs ?? {};
|
|
109
|
+
const entries = Object.entries(packs).map(([name, entry]) => categorizeEntry(name, entry.source));
|
|
110
|
+
const byFqn = new Map();
|
|
111
|
+
for (const entry of entries) {
|
|
112
|
+
if (entry.kind === "registry" && entry.registryFqn !== undefined) {
|
|
113
|
+
const group = byFqn.get(entry.registryFqn) ?? [];
|
|
114
|
+
group.push(entry);
|
|
115
|
+
byFqn.set(entry.registryFqn, group);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
const findings = [];
|
|
119
|
+
for (const entry of entries) {
|
|
120
|
+
switch (entry.kind) {
|
|
121
|
+
case "bare":
|
|
122
|
+
findings.push(bareNameFinding(entry));
|
|
123
|
+
break;
|
|
124
|
+
case "non-registry":
|
|
125
|
+
findings.push(nonRegistryFinding(entry));
|
|
126
|
+
break;
|
|
127
|
+
case "registry-no-owner":
|
|
128
|
+
findings.push(missingOwnerFinding(entry));
|
|
129
|
+
break;
|
|
130
|
+
case "registry": {
|
|
131
|
+
if (entry.registryFqn === undefined) {
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
const group = byFqn.get(entry.registryFqn) ?? [];
|
|
135
|
+
if (group.length > 1) {
|
|
136
|
+
findings.push(duplicateFinding(entry, group.map((g) => g.name).sort()));
|
|
137
|
+
}
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return findings;
|
|
143
|
+
}),
|
|
144
|
+
};
|
|
145
|
+
//# sourceMappingURL=packs-declarations-valid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packs-declarations-valid.js","sourceRoot":"","sources":["../../../../../../src/unstable/lint/catalog/workspace/packs-declarations-valid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM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AAK,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;wBACpC,MAAM;oBACR,CAAC;oBACD,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;oBACjD,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;wBACrB,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;oBAC1E,CAAC;oBACD,MAAM;gBACR,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAC;CACL,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `workspace/packs-dependencies-resolved` — every pack-declared dependency
|
|
3
|
+
* FQN is installed.
|
|
4
|
+
*
|
|
5
|
+
* For each `RegistryExtensionPackLockEntry`, every FQN appearing in
|
|
6
|
+
* `resolvedSkills`, `resolvedCommands`, `resolvedMcpServers`, or
|
|
7
|
+
* `resolvedSubagents` has a matching installed member lock entry.
|
|
8
|
+
*
|
|
9
|
+
* One finding per missing dependency (per-entity cascade). Advisory.
|
|
10
|
+
*
|
|
11
|
+
* @experimental This API is unstable and may change without notice.
|
|
12
|
+
* @packageDocumentation
|
|
13
|
+
*/
|
|
14
|
+
import type { WorkspaceRuleContext } from "../../context.js";
|
|
15
|
+
import type { AdvisoryRule } from "../../rule.js";
|
|
16
|
+
export declare const packsDependenciesResolvedRule: AdvisoryRule<WorkspaceRuleContext>;
|
|
17
|
+
//# sourceMappingURL=packs-dependencies-resolved.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packs-dependencies-resolved.d.ts","sourceRoot":"","sources":["../../../../../../src/unstable/lint/catalog/workspace/packs-dependencies-resolved.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAAmB,YAAY,EAAE,MAAM,eAAe,CAAC;AA2FnE,eAAO,MAAM,6BAA6B,EAAE,YAAY,CAAC,oBAAoB,CAkC5E,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `workspace/packs-dependencies-resolved` — every pack-declared dependency
|
|
3
|
+
* FQN is installed.
|
|
4
|
+
*
|
|
5
|
+
* For each `RegistryExtensionPackLockEntry`, every FQN appearing in
|
|
6
|
+
* `resolvedSkills`, `resolvedCommands`, `resolvedMcpServers`, or
|
|
7
|
+
* `resolvedSubagents` has a matching installed member lock entry.
|
|
8
|
+
*
|
|
9
|
+
* One finding per missing dependency (per-entity cascade). Advisory.
|
|
10
|
+
*
|
|
11
|
+
* @experimental This API is unstable and may change without notice.
|
|
12
|
+
* @packageDocumentation
|
|
13
|
+
*/
|
|
14
|
+
import * as Effect from "effect/Effect";
|
|
15
|
+
import * as Option from "effect/Option";
|
|
16
|
+
import * as Result from "effect/Result";
|
|
17
|
+
import * as Schema from "effect/Schema";
|
|
18
|
+
import { LockfileSchema, } from "../../../lockfile/schema.js";
|
|
19
|
+
import { EMPTY_ADVISORY_FINDINGS } from "./helpers/empty.js";
|
|
20
|
+
const RULE_ID = "workspace/packs-dependencies-resolved";
|
|
21
|
+
const LOCKFILE_REL = ".axm/axm-lock.yaml";
|
|
22
|
+
const decodeLockfile = (input) => {
|
|
23
|
+
const result = Schema.decodeUnknownResult(LockfileSchema)(input, {
|
|
24
|
+
onExcessProperty: "ignore",
|
|
25
|
+
errors: "all",
|
|
26
|
+
});
|
|
27
|
+
return Result.isSuccess(result) ? Option.some(result.success) : Option.none();
|
|
28
|
+
};
|
|
29
|
+
const isRecord = (entry) => typeof entry === "object" && entry !== null;
|
|
30
|
+
const isRegistryFragment = (entry) => {
|
|
31
|
+
if (!isRecord(entry)) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
return (entry["type"] === "registry" &&
|
|
35
|
+
typeof entry["owner"] === "string" &&
|
|
36
|
+
typeof entry["name"] === "string");
|
|
37
|
+
};
|
|
38
|
+
const buildInstalledFqnIndex = (lockfile) => {
|
|
39
|
+
const set = new Set();
|
|
40
|
+
const absorb = (typeSegment, map) => {
|
|
41
|
+
if (map === undefined) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
for (const entry of Object.values(map)) {
|
|
45
|
+
if (isRegistryFragment(entry)) {
|
|
46
|
+
set.add(`${entry.owner}/${typeSegment}/${entry.name}`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
absorb("skills", lockfile.skills);
|
|
51
|
+
absorb("commands", lockfile.commands);
|
|
52
|
+
absorb("subagents", lockfile.subagents);
|
|
53
|
+
absorb("mcp-servers", lockfile.mcpServers);
|
|
54
|
+
return set;
|
|
55
|
+
};
|
|
56
|
+
const missingDependencyFinding = (packName, dependencyFqn, dependencyType) => ({
|
|
57
|
+
kind: "advisory",
|
|
58
|
+
ruleId: RULE_ID,
|
|
59
|
+
severity: "error",
|
|
60
|
+
message: `Pack '${packName}' declares ${dependencyType} dependency '${dependencyFqn}' which is not installed.`,
|
|
61
|
+
suggestions: [
|
|
62
|
+
`Install the missing ${dependencyType} '${dependencyFqn}'.`,
|
|
63
|
+
`Remove the pack declaration that introduces '${dependencyFqn}'.`,
|
|
64
|
+
],
|
|
65
|
+
location: { file: LOCKFILE_REL },
|
|
66
|
+
});
|
|
67
|
+
const collectResolved = (entry) => [
|
|
68
|
+
...Object.keys(entry.resolvedSkills).map((fqn) => ({ fqn, typeSegment: "skills" })),
|
|
69
|
+
...Object.keys(entry.resolvedCommands).map((fqn) => ({ fqn, typeSegment: "commands" })),
|
|
70
|
+
...Object.keys(entry.resolvedSubagents).map((fqn) => ({ fqn, typeSegment: "subagents" })),
|
|
71
|
+
...Object.keys(entry.resolvedMcpServers).map((fqn) => ({ fqn, typeSegment: "mcp-servers" })),
|
|
72
|
+
];
|
|
73
|
+
export const packsDependenciesResolvedRule = {
|
|
74
|
+
id: RULE_ID,
|
|
75
|
+
description: "Every pack-declared dependency FQN is installed.",
|
|
76
|
+
kind: "advisory",
|
|
77
|
+
severity: "error",
|
|
78
|
+
check: (context) => Effect.gen(function* () {
|
|
79
|
+
const lockfileResult = yield* Effect.result(context.workspace.lockfile);
|
|
80
|
+
if (Result.isFailure(lockfileResult)) {
|
|
81
|
+
return EMPTY_ADVISORY_FINDINGS;
|
|
82
|
+
}
|
|
83
|
+
const lockOption = lockfileResult.success;
|
|
84
|
+
if (Option.isNone(lockOption)) {
|
|
85
|
+
return EMPTY_ADVISORY_FINDINGS;
|
|
86
|
+
}
|
|
87
|
+
const decoded = decodeLockfile(lockOption.value);
|
|
88
|
+
if (Option.isNone(decoded)) {
|
|
89
|
+
return EMPTY_ADVISORY_FINDINGS;
|
|
90
|
+
}
|
|
91
|
+
const packLock = decoded.value.packs ?? {};
|
|
92
|
+
if (Object.keys(packLock).length === 0) {
|
|
93
|
+
return EMPTY_ADVISORY_FINDINGS;
|
|
94
|
+
}
|
|
95
|
+
const installed = buildInstalledFqnIndex(decoded.value);
|
|
96
|
+
const findings = [];
|
|
97
|
+
for (const [packName, packEntry] of Object.entries(packLock)) {
|
|
98
|
+
for (const { fqn, typeSegment } of collectResolved(packEntry)) {
|
|
99
|
+
if (!installed.has(fqn)) {
|
|
100
|
+
findings.push(missingDependencyFinding(packName, fqn, typeSegment));
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return findings;
|
|
105
|
+
}),
|
|
106
|
+
};
|
|
107
|
+
//# sourceMappingURL=packs-dependencies-resolved.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packs-dependencies-resolved.js","sourceRoot":"","sources":["../../../../../../src/unstable/lint/catalog/worksp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AAE,CAAC;YAC9B,OAAO,uBAAuB,CAAC;QACjC,CAAC;QACD,MAAM,OAAO,GAAG,cAAc,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACjD,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;YAC3B,OAAO,uBAAuB,CAAC;QACjC,CAAC;QACD,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC;QAC3C,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvC,OAAO,uBAAuB,CAAC;QACjC,CAAC;QACD,MAAM,SAAS,GAAG,sBAAsB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACxD,MAAM,QAAQ,GAA2B,EAAE,CAAC;QAC5C,KAAK,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC7D,KAAK,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,eAAe,CAAC,SAAS,CAAC,EAAE,CAAC;gBAC9D,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;oBACxB,QAAQ,CAAC,IAAI,CAAC,wBAAwB,CAAC,QAAQ,EAAE,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC;gBACtE,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAC;CACL,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `workspace/packs-members-retained` — every member lock entry with
|
|
3
|
+
* `retainedByPack: true` is declared by an installed pack.
|
|
4
|
+
*
|
|
5
|
+
* For each member lock entry (skill, command, subagent, mcp-server) where
|
|
6
|
+
* `retainedByPack === true` AND the member is not directly declared in
|
|
7
|
+
* settings, at least one installed pack's lock entry lists the member's
|
|
8
|
+
* FQN in the appropriate resolved map. Entries directly declared in
|
|
9
|
+
* settings are exempt (covered by per-type declarations rules).
|
|
10
|
+
*
|
|
11
|
+
* Rule body walks every member lock entry type — not just skills — so
|
|
12
|
+
* adding non-skill install families in v1.5+ is test-surface-only.
|
|
13
|
+
*
|
|
14
|
+
* One finding per affected entity. Advisory, warning.
|
|
15
|
+
*
|
|
16
|
+
* @experimental This API is unstable and may change without notice.
|
|
17
|
+
* @packageDocumentation
|
|
18
|
+
*/
|
|
19
|
+
import type { WorkspaceRuleContext } from "../../context.js";
|
|
20
|
+
import type { AdvisoryRule } from "../../rule.js";
|
|
21
|
+
export declare const packsMembersRetainedRule: AdvisoryRule<WorkspaceRuleContext>;
|
|
22
|
+
//# sourceMappingURL=packs-members-retained.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packs-members-retained.d.ts","sourceRoot":"","sources":["../../../../../../src/unstable/lint/catalog/workspace/packs-members-retained.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAAmB,YAAY,EAAE,MAAM,eAAe,CAAC;AAkInE,eAAO,MAAM,wBAAwB,EAAE,YAAY,CAAC,oBAAoB,CA0CvE,CAAC"}
|