@agentxm/client-core 0.2.0 → 0.3.2
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/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/extensions/operations.d.ts +1 -1
- package/dist/src/unstable/extensions/operations.d.ts.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/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/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/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/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/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/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/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/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/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.map +1 -1
- package/dist/src/unstable/workspace/index.d.ts +0 -5
- package/dist/src/unstable/workspace/index.d.ts.map +1 -1
- package/dist/src/unstable/workspace/index.js +3 -7
- package/dist/src/unstable/workspace/index.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/paths.d.ts +0 -18
- package/dist/src/unstable/workspace/paths.d.ts.map +1 -1
- package/dist/src/unstable/workspace/paths.js +12 -2
- 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/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/settings-validation/types.d.ts +11 -1
- package/dist/src/unstable/workspace/settings-validation/types.d.ts.map +1 -1
- package/package.json +10 -2
- package/site-content/__generated__/schemas/axm-lock.schema.json +727 -1124
- package/site-content/__generated__/schemas/axm-package-meta.schema.json +3 -16
- package/site-content/__generated__/schemas/command.schema.json +29 -130
- package/site-content/__generated__/schemas/extension-pack.schema.json +36 -154
- package/site-content/__generated__/schemas/mcp-server.schema.json +21 -134
- package/site-content/__generated__/schemas/settings.schema.json +111 -291
- package/site-content/__generated__/schemas/skill.schema.json +23 -143
- 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-active.d.ts +0 -4
- package/dist/src/unstable/workspace/doctor/checks/extensions-active.d.ts.map +0 -1
- package/dist/src/unstable/workspace/doctor/checks/extensions-active.js +0 -238
- package/dist/src/unstable/workspace/doctor/checks/extensions-active.js.map +0 -1
- package/dist/src/unstable/workspace/doctor/checks/extensions-current.d.ts +0 -18
- package/dist/src/unstable/workspace/doctor/checks/extensions-current.d.ts.map +0 -1
- package/dist/src/unstable/workspace/doctor/checks/extensions-current.js +0 -92
- package/dist/src/unstable/workspace/doctor/checks/extensions-current.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 -78
- 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 -127
- package/dist/src/unstable/workspace/doctor/types.d.ts.map +0 -1
- package/dist/src/unstable/workspace/doctor/types.js +0 -60
- 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,201 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform-backed `WorkspaceLintAccessor`.
|
|
3
|
+
*
|
|
4
|
+
* Reads `.axm/settings.json`, `.axm/axm-lock.yaml`, and workspace-relative
|
|
5
|
+
* filesystem probes from a caller-supplied workspace root. Surfaces ONLY the
|
|
6
|
+
* nine documented methods (task 3c.2):
|
|
7
|
+
*
|
|
8
|
+
* `settings`, `lockfile`, `installedSkills`, `installedPacks`,
|
|
9
|
+
* `knownAgents`, `detectAgents`, `exists`, `isWritable`, `list`.
|
|
10
|
+
*
|
|
11
|
+
* No Layer wiring at rule-evaluation time — the factory captures
|
|
12
|
+
* `FileSystem.FileSystem` + `Path.Path` plus the provided `WorkspaceIndex`.
|
|
13
|
+
*
|
|
14
|
+
* Agent-detection derives probes from the existing `AgentDescriptor`
|
|
15
|
+
* catalog (`packages/core/src/unstable/agents/types.ts`); the rule does not
|
|
16
|
+
* re-invent probe derivation.
|
|
17
|
+
*
|
|
18
|
+
* @experimental This API is unstable and may change without notice.
|
|
19
|
+
* @packageDocumentation
|
|
20
|
+
*/
|
|
21
|
+
import * as Effect from "effect/Effect";
|
|
22
|
+
import * as Option from "effect/Option";
|
|
23
|
+
import YAML from "yaml";
|
|
24
|
+
import { getAllAgents } from "../../../agents/registry.js";
|
|
25
|
+
const SETTINGS_REL_PATH = ".axm/settings.json";
|
|
26
|
+
const LOCKFILE_REL_PATH = ".axm/axm-lock.yaml";
|
|
27
|
+
/**
|
|
28
|
+
* Build a platform-backed `WorkspaceLintAccessor` rooted at `workspaceRoot`.
|
|
29
|
+
*
|
|
30
|
+
* @experimental This API is unstable and may change without notice.
|
|
31
|
+
*/
|
|
32
|
+
export const makePlatformWorkspaceLintAccessor = (args) => {
|
|
33
|
+
const { platform, workspaceRoot, index, scope } = args;
|
|
34
|
+
const { fs, path } = platform;
|
|
35
|
+
const root = path.resolve(workspaceRoot);
|
|
36
|
+
const resolveWithinRoot = (input) => {
|
|
37
|
+
if (input === "" || input === "." || input === "./") {
|
|
38
|
+
return { kind: "ok", absolute: root };
|
|
39
|
+
}
|
|
40
|
+
if (/^[a-z]:[\\/]/i.test(input) || input.startsWith("/") || input.startsWith("\\")) {
|
|
41
|
+
return { kind: "escape" };
|
|
42
|
+
}
|
|
43
|
+
const normalized = input.replace(/\\/g, "/").replace(/^\.\//, "");
|
|
44
|
+
for (const segment of normalized.split("/")) {
|
|
45
|
+
if (segment === "..") {
|
|
46
|
+
return { kind: "escape" };
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const absolute = path.resolve(root, normalized);
|
|
50
|
+
if (absolute !== root && !absolute.startsWith(`${root}${path.sep}`)) {
|
|
51
|
+
return { kind: "escape" };
|
|
52
|
+
}
|
|
53
|
+
return { kind: "ok", absolute };
|
|
54
|
+
};
|
|
55
|
+
const makeAccessError = (p, reason, message) => ({
|
|
56
|
+
_tag: "FileAccessError",
|
|
57
|
+
path: p,
|
|
58
|
+
reason,
|
|
59
|
+
message,
|
|
60
|
+
});
|
|
61
|
+
const exists = (relative) => {
|
|
62
|
+
const resolved = resolveWithinRoot(relative);
|
|
63
|
+
if (resolved.kind !== "ok") {
|
|
64
|
+
return Effect.succeed(false);
|
|
65
|
+
}
|
|
66
|
+
return fs.exists(resolved.absolute).pipe(Effect.catch(() => Effect.succeed(false)));
|
|
67
|
+
};
|
|
68
|
+
const isWritable = (relative) => {
|
|
69
|
+
const resolved = resolveWithinRoot(relative);
|
|
70
|
+
if (resolved.kind !== "ok") {
|
|
71
|
+
return Effect.succeed(false);
|
|
72
|
+
}
|
|
73
|
+
return fs.access(resolved.absolute, { writable: true }).pipe(Effect.map(() => true), Effect.catch(() => Effect.succeed(false)));
|
|
74
|
+
};
|
|
75
|
+
const list = (relative) => {
|
|
76
|
+
const resolved = resolveWithinRoot(relative);
|
|
77
|
+
if (resolved.kind === "escape") {
|
|
78
|
+
return Effect.fail(makeAccessError(relative, "path-escape", `path escapes the accessor root: ${relative}`));
|
|
79
|
+
}
|
|
80
|
+
return fs
|
|
81
|
+
.readDirectory(resolved.absolute)
|
|
82
|
+
.pipe(Effect.mapError((cause) => makeAccessError(relative, "read-error", `directory list failed at ${relative}: ${String(cause)}`)));
|
|
83
|
+
};
|
|
84
|
+
const parseSettingsRaw = (raw) => Effect.try({
|
|
85
|
+
try: () => JSON.parse(raw),
|
|
86
|
+
catch: (cause) => ({
|
|
87
|
+
_tag: "SettingsReadError",
|
|
88
|
+
message: `JSON parse failed: ${String(cause)}`,
|
|
89
|
+
}),
|
|
90
|
+
});
|
|
91
|
+
const settings = Effect.gen(function* () {
|
|
92
|
+
const resolved = resolveWithinRoot(SETTINGS_REL_PATH);
|
|
93
|
+
if (resolved.kind !== "ok") {
|
|
94
|
+
return yield* Effect.fail({
|
|
95
|
+
_tag: "SettingsReadError",
|
|
96
|
+
message: "settings.json path is outside the workspace root",
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
const raw = yield* fs.readFileString(resolved.absolute).pipe(Effect.mapError((cause) => ({
|
|
100
|
+
_tag: "SettingsReadError",
|
|
101
|
+
message: `read failed: ${String(cause)}`,
|
|
102
|
+
})));
|
|
103
|
+
return yield* parseSettingsRaw(raw);
|
|
104
|
+
});
|
|
105
|
+
const parseLockfileRaw = (raw) => Effect.try({
|
|
106
|
+
try: () => Option.some(YAML.parse(raw)),
|
|
107
|
+
catch: (cause) => ({
|
|
108
|
+
_tag: "LockfileReadError",
|
|
109
|
+
message: `YAML parse failed: ${String(cause)}`,
|
|
110
|
+
}),
|
|
111
|
+
});
|
|
112
|
+
const lockfile = Effect.gen(function* () {
|
|
113
|
+
const resolved = resolveWithinRoot(LOCKFILE_REL_PATH);
|
|
114
|
+
if (resolved.kind !== "ok") {
|
|
115
|
+
return yield* Effect.fail({
|
|
116
|
+
_tag: "LockfileReadError",
|
|
117
|
+
message: "axm-lock.yaml path is outside the workspace root",
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
const lockExists = yield* fs
|
|
121
|
+
.exists(resolved.absolute)
|
|
122
|
+
.pipe(Effect.catch(() => Effect.succeed(false)));
|
|
123
|
+
if (!lockExists) {
|
|
124
|
+
return Option.none();
|
|
125
|
+
}
|
|
126
|
+
const raw = yield* fs.readFileString(resolved.absolute).pipe(Effect.mapError((cause) => ({
|
|
127
|
+
_tag: "LockfileReadError",
|
|
128
|
+
message: `read failed: ${String(cause)}`,
|
|
129
|
+
})));
|
|
130
|
+
return yield* parseLockfileRaw(raw);
|
|
131
|
+
});
|
|
132
|
+
const knownAgents = Effect.sync(() => getAllAgents());
|
|
133
|
+
const detectAgents = (detectScope) => {
|
|
134
|
+
if (detectScope !== scope) {
|
|
135
|
+
// Honor the caller's requested scope even when the accessor was
|
|
136
|
+
// bound to a different one — this is informational only.
|
|
137
|
+
return Effect.succeed([]);
|
|
138
|
+
}
|
|
139
|
+
const agents = getAllAgents();
|
|
140
|
+
return Effect.all(agents.map((agent) => detectOne(agent).pipe(Effect.map((detection) => detection === undefined ? [] : [detection]))), { concurrency: "unbounded" }).pipe(Effect.map((results) => results.flat()));
|
|
141
|
+
};
|
|
142
|
+
const detectOne = (agent) => Effect.gen(function* () {
|
|
143
|
+
for (const segment of detectionProbes(agent)) {
|
|
144
|
+
const probeAbs = path.resolve(root, segment);
|
|
145
|
+
const present = yield* fs.exists(probeAbs).pipe(Effect.catch(() => Effect.succeed(false)));
|
|
146
|
+
if (present) {
|
|
147
|
+
return { id: agent.id, markerPath: segment };
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return undefined;
|
|
151
|
+
});
|
|
152
|
+
return {
|
|
153
|
+
settings,
|
|
154
|
+
lockfile,
|
|
155
|
+
installedSkills: index.installedSkills,
|
|
156
|
+
installedPacks: index.installedPacks,
|
|
157
|
+
knownAgents,
|
|
158
|
+
detectAgents,
|
|
159
|
+
exists,
|
|
160
|
+
isWritable,
|
|
161
|
+
list,
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
// -----------------------------------------------------------------------------
|
|
165
|
+
// Probe derivation
|
|
166
|
+
// -----------------------------------------------------------------------------
|
|
167
|
+
const firstPathSegment = (dir) => {
|
|
168
|
+
if (dir === undefined || dir === "") {
|
|
169
|
+
return undefined;
|
|
170
|
+
}
|
|
171
|
+
const segment = dir.split("/")[0];
|
|
172
|
+
return segment === undefined || segment.length === 0 ? undefined : segment;
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* Derive detection probes for an agent by taking the first path segment of
|
|
176
|
+
* its `skills.dir` / `commands.dir` / `subagents.dir`, plus the single-file
|
|
177
|
+
* probe when `subagents.isFile === true`.
|
|
178
|
+
*
|
|
179
|
+
* Mirrors axm `agents/detection.ts:35-44` — staying in lockstep with the
|
|
180
|
+
* canonical detection so the rule and the CLI detector agree.
|
|
181
|
+
*/
|
|
182
|
+
const detectionProbes = (agent) => {
|
|
183
|
+
const segments = new Set();
|
|
184
|
+
const skills = firstPathSegment(agent.skills.dir);
|
|
185
|
+
if (skills !== undefined) {
|
|
186
|
+
segments.add(skills);
|
|
187
|
+
}
|
|
188
|
+
const commands = firstPathSegment(agent.commands?.dir);
|
|
189
|
+
if (commands !== undefined) {
|
|
190
|
+
segments.add(commands);
|
|
191
|
+
}
|
|
192
|
+
const subagents = firstPathSegment(agent.subagents?.dir);
|
|
193
|
+
if (subagents !== undefined) {
|
|
194
|
+
segments.add(subagents);
|
|
195
|
+
}
|
|
196
|
+
if (agent.subagents?.isFile === true && agent.subagents.dir !== undefined) {
|
|
197
|
+
segments.add(agent.subagents.dir);
|
|
198
|
+
}
|
|
199
|
+
return Array.from(segments);
|
|
200
|
+
};
|
|
201
|
+
//# sourceMappingURL=platform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../../../../../../src/unstable/lint/catalog/workspace-accessor/platform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,IAAI,MAAM,MAAM,CAAC;AAaxB,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AA8C3D,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;AAC/C,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;AAE/C;;;;GAIG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAC/C,IAAuC,EAChB,EAAE;IACzB,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IACvD,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC;IAC9B,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,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AC;QACzB,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IACD,MAAM,QAAQ,GAAG,gBAAgB,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IACvD,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACzB,CAAC;IACD,MAAM,SAAS,GAAG,gBAAgB,CAAC,KAAK,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;IACzD,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC5B,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC1B,CAAC;IACD,IAAI,KAAK,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,IAAI,KAAK,CAAC,SAAS,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;QAC1E,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IACpC,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC9B,CAAC,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In-memory `WorkspaceState` + accessor, used by fixture tests and the
|
|
3
|
+
* determinism harness (task 3c.19).
|
|
4
|
+
*
|
|
5
|
+
* Autofix `fix` methods return per-extension `Operation` intents (see
|
|
6
|
+
* `workspace/helpers/install-ops.ts`). The determinism harness applies those
|
|
7
|
+
* intents to a mutable `WorkspaceState` and re-runs the rule's `check` against
|
|
8
|
+
* a fresh `WorkspaceLintAccessor` backed by the updated state. The harness
|
|
9
|
+
* asserts zero findings from that rule post-apply — establishing the
|
|
10
|
+
* "apply(fix) + re-run(rule) === [] from that rule" determinism contract.
|
|
11
|
+
*
|
|
12
|
+
* The state model is intentionally minimal: just enough to satisfy the v1
|
|
13
|
+
* rule-body probes (settings, lockfile, exists, list, knownAgents,
|
|
14
|
+
* detectAgents, installedSkills, installedPacks). Fixtures declare their
|
|
15
|
+
* state in JSON; the harness applies `Operation` intents via a pure
|
|
16
|
+
* reducer.
|
|
17
|
+
*
|
|
18
|
+
* @experimental This API is unstable and may change without notice.
|
|
19
|
+
* @packageDocumentation
|
|
20
|
+
*/
|
|
21
|
+
import type { LockfileDocument, PackRuleContext, SettingsDocument, SkillRuleContext, WorkspaceLintAccessor } from "../../context.js";
|
|
22
|
+
import type { AgentId } from "../../../agents/types.js";
|
|
23
|
+
/**
|
|
24
|
+
* Mutable workspace state exercised by fixtures and the determinism harness.
|
|
25
|
+
*
|
|
26
|
+
* All fields start empty. Tests populate only what their rule needs; the
|
|
27
|
+
* harness applies per-extension Operations through `applyIntent`.
|
|
28
|
+
*
|
|
29
|
+
* @experimental This API is unstable and may change without notice.
|
|
30
|
+
*/
|
|
31
|
+
export interface WorkspaceState {
|
|
32
|
+
/** Raw parsed `.axm/settings.json` (or `undefined` for missing file). */
|
|
33
|
+
settings: SettingsDocument | undefined;
|
|
34
|
+
/** Raw parsed `.axm/axm-lock.yaml` (or `undefined` for missing file). */
|
|
35
|
+
lockfile: LockfileDocument | undefined;
|
|
36
|
+
/** Workspace-relative posix paths the accessor treats as existing. */
|
|
37
|
+
existingPaths: Set<string>;
|
|
38
|
+
/** Writable paths (subset of existingPaths). */
|
|
39
|
+
writablePaths: Set<string>;
|
|
40
|
+
/** Map of parent-directory-relative posix path → immediate child names. */
|
|
41
|
+
listings: Map<string, Array<string>>;
|
|
42
|
+
/** Detected agent ids for `detectAgents("project")` at the current moment. */
|
|
43
|
+
detectedProjectAgents: Set<AgentId>;
|
|
44
|
+
/** Installed skills (project scope). */
|
|
45
|
+
installedSkills: ReadonlyArray<SkillRuleContext>;
|
|
46
|
+
/** Installed packs (project scope). */
|
|
47
|
+
installedPacks: ReadonlyArray<PackRuleContext>;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Factory returning an empty `WorkspaceState`.
|
|
51
|
+
*
|
|
52
|
+
* @experimental This API is unstable and may change without notice.
|
|
53
|
+
*/
|
|
54
|
+
export declare const emptyWorkspaceState: () => WorkspaceState;
|
|
55
|
+
/**
|
|
56
|
+
* Build a `WorkspaceLintAccessor` backed by a mutable `WorkspaceState`.
|
|
57
|
+
*
|
|
58
|
+
* Reads are immediate — no concurrency. Calls return whatever the state
|
|
59
|
+
* currently holds, so the determinism harness can mutate state between
|
|
60
|
+
* `check` + `fix` + `check` without rebuilding the accessor.
|
|
61
|
+
*
|
|
62
|
+
* @experimental This API is unstable and may change without notice.
|
|
63
|
+
*/
|
|
64
|
+
export declare const makeStateBackedWorkspaceLintAccessor: (state: WorkspaceState) => WorkspaceLintAccessor;
|
|
65
|
+
//# sourceMappingURL=test-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-state.d.ts","sourceRoot":"","sources":["../../../../../../src/unstable/lint/catalog/workspace-accessor/test-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,KAAK,EAGV,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAmB,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAOzE;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B,yEAAyE;IACzE,QAAQ,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACvC,yEAAyE;IACzE,QAAQ,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACvC,sEAAsE;IACtE,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,gDAAgD;IAChD,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,2EAA2E;IAC3E,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACrC,8EAA8E;IAC9E,qBAAqB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACpC,wCAAwC;IACxC,eAAe,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;IACjD,uCAAuC;IACvC,cAAc,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;CAChD;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,QAAO,cASrC,CAAC;AAMH;;;;;;;;GAQG;AACH,eAAO,MAAM,oCAAoC,GAC/C,OAAO,cAAc,KACpB,qBA6CD,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In-memory `WorkspaceState` + accessor, used by fixture tests and the
|
|
3
|
+
* determinism harness (task 3c.19).
|
|
4
|
+
*
|
|
5
|
+
* Autofix `fix` methods return per-extension `Operation` intents (see
|
|
6
|
+
* `workspace/helpers/install-ops.ts`). The determinism harness applies those
|
|
7
|
+
* intents to a mutable `WorkspaceState` and re-runs the rule's `check` against
|
|
8
|
+
* a fresh `WorkspaceLintAccessor` backed by the updated state. The harness
|
|
9
|
+
* asserts zero findings from that rule post-apply — establishing the
|
|
10
|
+
* "apply(fix) + re-run(rule) === [] from that rule" determinism contract.
|
|
11
|
+
*
|
|
12
|
+
* The state model is intentionally minimal: just enough to satisfy the v1
|
|
13
|
+
* rule-body probes (settings, lockfile, exists, list, knownAgents,
|
|
14
|
+
* detectAgents, installedSkills, installedPacks). Fixtures declare their
|
|
15
|
+
* state in JSON; the harness applies `Operation` intents via a pure
|
|
16
|
+
* reducer.
|
|
17
|
+
*
|
|
18
|
+
* @experimental This API is unstable and may change without notice.
|
|
19
|
+
* @packageDocumentation
|
|
20
|
+
*/
|
|
21
|
+
import * as Effect from "effect/Effect";
|
|
22
|
+
import * as Option from "effect/Option";
|
|
23
|
+
import { getAllAgents } from "../../../agents/registry.js";
|
|
24
|
+
/**
|
|
25
|
+
* Factory returning an empty `WorkspaceState`.
|
|
26
|
+
*
|
|
27
|
+
* @experimental This API is unstable and may change without notice.
|
|
28
|
+
*/
|
|
29
|
+
export const emptyWorkspaceState = () => ({
|
|
30
|
+
settings: undefined,
|
|
31
|
+
lockfile: undefined,
|
|
32
|
+
existingPaths: new Set(),
|
|
33
|
+
writablePaths: new Set(),
|
|
34
|
+
listings: new Map(),
|
|
35
|
+
detectedProjectAgents: new Set(),
|
|
36
|
+
installedSkills: [],
|
|
37
|
+
installedPacks: [],
|
|
38
|
+
});
|
|
39
|
+
// -----------------------------------------------------------------------------
|
|
40
|
+
// Test accessor
|
|
41
|
+
// -----------------------------------------------------------------------------
|
|
42
|
+
/**
|
|
43
|
+
* Build a `WorkspaceLintAccessor` backed by a mutable `WorkspaceState`.
|
|
44
|
+
*
|
|
45
|
+
* Reads are immediate — no concurrency. Calls return whatever the state
|
|
46
|
+
* currently holds, so the determinism harness can mutate state between
|
|
47
|
+
* `check` + `fix` + `check` without rebuilding the accessor.
|
|
48
|
+
*
|
|
49
|
+
* @experimental This API is unstable and may change without notice.
|
|
50
|
+
*/
|
|
51
|
+
export const makeStateBackedWorkspaceLintAccessor = (state) => ({
|
|
52
|
+
settings: Effect.suspend(() => state.settings === undefined
|
|
53
|
+
? Effect.fail({
|
|
54
|
+
_tag: "SettingsReadError",
|
|
55
|
+
message: "settings.json is missing",
|
|
56
|
+
})
|
|
57
|
+
: Effect.succeed(state.settings)),
|
|
58
|
+
lockfile: Effect.suspend(() => Effect.succeed(state.lockfile === undefined ? Option.none() : Option.some(state.lockfile))),
|
|
59
|
+
installedSkills: Effect.suspend(() => Effect.succeed(state.installedSkills)),
|
|
60
|
+
installedPacks: Effect.suspend(() => Effect.succeed(state.installedPacks)),
|
|
61
|
+
knownAgents: Effect.sync(() => getAllAgents()),
|
|
62
|
+
detectAgents: (scope) => Effect.suspend(() => {
|
|
63
|
+
if (scope !== "project") {
|
|
64
|
+
const empty = [];
|
|
65
|
+
return Effect.succeed(empty);
|
|
66
|
+
}
|
|
67
|
+
const detections = [];
|
|
68
|
+
for (const id of state.detectedProjectAgents) {
|
|
69
|
+
detections.push({ id, markerPath: `detected:${id}` });
|
|
70
|
+
}
|
|
71
|
+
return Effect.succeed(detections);
|
|
72
|
+
}),
|
|
73
|
+
exists: (path) => Effect.suspend(() => Effect.succeed(state.existingPaths.has(normalizePath(path)))),
|
|
74
|
+
isWritable: (path) => Effect.suspend(() => Effect.succeed(state.writablePaths.has(normalizePath(path)))),
|
|
75
|
+
list: (path) => Effect.suspend(() => {
|
|
76
|
+
const normalized = normalizePath(path);
|
|
77
|
+
const listing = state.listings.get(normalized);
|
|
78
|
+
if (listing === undefined) {
|
|
79
|
+
return Effect.fail({
|
|
80
|
+
_tag: "FileAccessError",
|
|
81
|
+
path,
|
|
82
|
+
reason: "read-error",
|
|
83
|
+
message: `no listing for path ${path}`,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
return Effect.succeed([...listing]);
|
|
87
|
+
}),
|
|
88
|
+
});
|
|
89
|
+
const normalizePath = (input) => {
|
|
90
|
+
if (input === "" || input === "." || input === "./") {
|
|
91
|
+
return "";
|
|
92
|
+
}
|
|
93
|
+
return input.replace(/\\/g, "/").replace(/^\.\//, "");
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=test-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-state.js","sourceRoot":"","sources":["../../../../../../src/unstable/lint/catalog/workspace-accessor/test-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAWxC,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAiC3D;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAmB,EAAE,CAAC,CAAC;IACxD,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,aAAa,EAAE,IAAI,GAAG,EAAE;IACxB,aAAa,EAAE,IAAI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M,CAAC,OAAO,CAAwB,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAC7D,CAAC,CAAC;CACL,CAAC,CAAC;AAEH,MAAM,aAAa,GAAG,CAAC,KAAa,EAAU,EAAE;IAC9C,IAAI,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,GAAG,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACpD,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;AACxD,CAAC,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `workspace/*` rule catalog — the v1 thirteen-rule set.
|
|
3
|
+
*
|
|
4
|
+
* Per `docs/design/lint-engine.md §10.workspace`, `axm lint` (locally only —
|
|
5
|
+
* never publish) runs exactly these rules against each workspace context:
|
|
6
|
+
*
|
|
7
|
+
* | ID | Severity | Autofix |
|
|
8
|
+
* | --------------------------------------- | -------- | ----------- |
|
|
9
|
+
* | `workspace/initialized` | error | — |
|
|
10
|
+
* | `workspace/settings-schema-valid` | error | — |
|
|
11
|
+
* | `workspace/lockfile-valid` | error | autofixing |
|
|
12
|
+
* | `workspace/agents-recognized` | error | — |
|
|
13
|
+
* | `workspace/agents-detected-declared` | warning | — |
|
|
14
|
+
* | `workspace/skills-declarations-valid` | error | — |
|
|
15
|
+
* | `workspace/skills-lockfile-aligned` | error | autofixing |
|
|
16
|
+
* | `workspace/skills-integrity-valid` | error | autofixing |
|
|
17
|
+
* | `workspace/skills-artifacts-correct` | error | autofixing |
|
|
18
|
+
* | `workspace/skills-artifacts-clean` | error | mixed |
|
|
19
|
+
* | `workspace/packs-declarations-valid` | error | — |
|
|
20
|
+
* | `workspace/packs-dependencies-resolved` | error | — |
|
|
21
|
+
* | `workspace/packs-members-retained` | warning | — |
|
|
22
|
+
*
|
|
23
|
+
* Autofix rides per-extension Operations only (§6). No `editFile`,
|
|
24
|
+
* `writeFile`, or `syncWorkspace()` reference — arms whose remediation can't
|
|
25
|
+
* be expressed in the 14-operation vocabulary ship as `AdvisoryFinding` with a
|
|
26
|
+
* CLI suggestion instead.
|
|
27
|
+
*
|
|
28
|
+
* Rule ids are **registered with the lint config allowlist at module-load
|
|
29
|
+
* time**, so importing this catalog extends the set of accepted
|
|
30
|
+
* `.axm/settings.json` `lint.rules` keys.
|
|
31
|
+
*
|
|
32
|
+
* @experimental This API is unstable and may change without notice.
|
|
33
|
+
* @packageDocumentation
|
|
34
|
+
*/
|
|
35
|
+
import type { LintRule } from "../rule.js";
|
|
36
|
+
import type { WorkspaceRuleContext } from "../context.js";
|
|
37
|
+
/**
|
|
38
|
+
* Ordered v1 `workspace/*` rule catalog. Declaration order is the evaluation
|
|
39
|
+
* order within a single `evaluateContexts` call (deterministic ordering is
|
|
40
|
+
* test-observable; see `evaluate.ts`). The catalog groups foundation rules
|
|
41
|
+
* first, then the skills install family, then the packs install family — the
|
|
42
|
+
* same order the design doc tables list them in.
|
|
43
|
+
*
|
|
44
|
+
* @experimental This API is unstable and may change without notice.
|
|
45
|
+
*/
|
|
46
|
+
export declare const workspaceRules: ReadonlyArray<LintRule<WorkspaceRuleContext>>;
|
|
47
|
+
//# sourceMappingURL=workspace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../../../../src/unstable/lint/catalog/workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAe1D;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,EAAE,aAAa,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAiBxE,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `workspace/*` rule catalog — the v1 thirteen-rule set.
|
|
3
|
+
*
|
|
4
|
+
* Per `docs/design/lint-engine.md §10.workspace`, `axm lint` (locally only —
|
|
5
|
+
* never publish) runs exactly these rules against each workspace context:
|
|
6
|
+
*
|
|
7
|
+
* | ID | Severity | Autofix |
|
|
8
|
+
* | --------------------------------------- | -------- | ----------- |
|
|
9
|
+
* | `workspace/initialized` | error | — |
|
|
10
|
+
* | `workspace/settings-schema-valid` | error | — |
|
|
11
|
+
* | `workspace/lockfile-valid` | error | autofixing |
|
|
12
|
+
* | `workspace/agents-recognized` | error | — |
|
|
13
|
+
* | `workspace/agents-detected-declared` | warning | — |
|
|
14
|
+
* | `workspace/skills-declarations-valid` | error | — |
|
|
15
|
+
* | `workspace/skills-lockfile-aligned` | error | autofixing |
|
|
16
|
+
* | `workspace/skills-integrity-valid` | error | autofixing |
|
|
17
|
+
* | `workspace/skills-artifacts-correct` | error | autofixing |
|
|
18
|
+
* | `workspace/skills-artifacts-clean` | error | mixed |
|
|
19
|
+
* | `workspace/packs-declarations-valid` | error | — |
|
|
20
|
+
* | `workspace/packs-dependencies-resolved` | error | — |
|
|
21
|
+
* | `workspace/packs-members-retained` | warning | — |
|
|
22
|
+
*
|
|
23
|
+
* Autofix rides per-extension Operations only (§6). No `editFile`,
|
|
24
|
+
* `writeFile`, or `syncWorkspace()` reference — arms whose remediation can't
|
|
25
|
+
* be expressed in the 14-operation vocabulary ship as `AdvisoryFinding` with a
|
|
26
|
+
* CLI suggestion instead.
|
|
27
|
+
*
|
|
28
|
+
* Rule ids are **registered with the lint config allowlist at module-load
|
|
29
|
+
* time**, so importing this catalog extends the set of accepted
|
|
30
|
+
* `.axm/settings.json` `lint.rules` keys.
|
|
31
|
+
*
|
|
32
|
+
* @experimental This API is unstable and may change without notice.
|
|
33
|
+
* @packageDocumentation
|
|
34
|
+
*/
|
|
35
|
+
import { registerLintRuleIds } from "../config.js";
|
|
36
|
+
import { initializedRule } from "./workspace/initialized.js";
|
|
37
|
+
import { settingsSchemaValidRule } from "./workspace/settings-schema-valid.js";
|
|
38
|
+
import { lockfileValidRule } from "./workspace/lockfile-valid.js";
|
|
39
|
+
import { agentsRecognizedRule } from "./workspace/agents-recognized.js";
|
|
40
|
+
import { agentsDetectedDeclaredRule } from "./workspace/agents-detected-declared.js";
|
|
41
|
+
import { skillsDeclarationsValidRule } from "./workspace/skills-declarations-valid.js";
|
|
42
|
+
import { skillsLockfileAlignedRule } from "./workspace/skills-lockfile-aligned.js";
|
|
43
|
+
import { skillsIntegrityValidRule } from "./workspace/skills-integrity-valid.js";
|
|
44
|
+
import { skillsArtifactsCorrectRule } from "./workspace/skills-artifacts-correct.js";
|
|
45
|
+
import { skillsArtifactsCleanRule } from "./workspace/skills-artifacts-clean.js";
|
|
46
|
+
import { packsDeclarationsValidRule } from "./workspace/packs-declarations-valid.js";
|
|
47
|
+
import { packsDependenciesResolvedRule } from "./workspace/packs-dependencies-resolved.js";
|
|
48
|
+
import { packsMembersRetainedRule } from "./workspace/packs-members-retained.js";
|
|
49
|
+
/**
|
|
50
|
+
* Ordered v1 `workspace/*` rule catalog. Declaration order is the evaluation
|
|
51
|
+
* order within a single `evaluateContexts` call (deterministic ordering is
|
|
52
|
+
* test-observable; see `evaluate.ts`). The catalog groups foundation rules
|
|
53
|
+
* first, then the skills install family, then the packs install family — the
|
|
54
|
+
* same order the design doc tables list them in.
|
|
55
|
+
*
|
|
56
|
+
* @experimental This API is unstable and may change without notice.
|
|
57
|
+
*/
|
|
58
|
+
export const workspaceRules = [
|
|
59
|
+
// Foundation (type-agnostic workspace well-formedness).
|
|
60
|
+
initializedRule,
|
|
61
|
+
settingsSchemaValidRule,
|
|
62
|
+
lockfileValidRule,
|
|
63
|
+
agentsRecognizedRule,
|
|
64
|
+
agentsDetectedDeclaredRule,
|
|
65
|
+
// Skills install family (Settings ↔ Lockfile ↔ Disk).
|
|
66
|
+
skillsDeclarationsValidRule,
|
|
67
|
+
skillsLockfileAlignedRule,
|
|
68
|
+
skillsIntegrityValidRule,
|
|
69
|
+
skillsArtifactsCorrectRule,
|
|
70
|
+
skillsArtifactsCleanRule,
|
|
71
|
+
// Packs install family (Settings ↔ Lockfile).
|
|
72
|
+
packsDeclarationsValidRule,
|
|
73
|
+
packsDependenciesResolvedRule,
|
|
74
|
+
packsMembersRetainedRule,
|
|
75
|
+
];
|
|
76
|
+
// Register ids into the `LintConfig.rules` allowlist. Module-load side effect:
|
|
77
|
+
// a consumer that imports this catalog (or the `catalog/index` barrel) enables
|
|
78
|
+
// `.axm/settings.json` `lint.rules` to reference any of the above rule ids.
|
|
79
|
+
registerLintRuleIds(workspaceRules.map((r) => r.id));
|
|
80
|
+
//# sourceMappingURL=workspace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../../../../../src/unstable/lint/catalog/workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGnD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AACvF,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAA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