@fantasticit/sumi 0.0.0-stage → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +81 -2
- package/dist/adapters.d.ts +86 -0
- package/dist/adapters.js +469 -0
- package/dist/adapters.js.map +1 -0
- package/dist/agent-hooks.d.ts +15 -0
- package/dist/agent-hooks.js +63 -0
- package/dist/agent-hooks.js.map +1 -0
- package/dist/agents.d.ts +1 -0
- package/dist/agents.js +139 -0
- package/dist/agents.js.map +1 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +21 -0
- package/dist/bin.js.map +1 -0
- package/dist/build-identity.d.ts +7 -0
- package/dist/build-identity.js +55 -0
- package/dist/build-identity.js.map +1 -0
- package/dist/cli.d.ts +19 -0
- package/dist/cli.js +150 -0
- package/dist/cli.js.map +1 -0
- package/dist/context.d.ts +1 -0
- package/dist/context.js +117 -0
- package/dist/context.js.map +1 -0
- package/dist/fix.d.ts +1 -0
- package/dist/fix.js +51 -0
- package/dist/fix.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/instructions.d.ts +31 -0
- package/dist/instructions.js +150 -0
- package/dist/instructions.js.map +1 -0
- package/dist/launcher-entry.d.ts +1 -0
- package/dist/launcher-entry.js +8 -0
- package/dist/launcher-entry.js.map +1 -0
- package/dist/launcher.cjs +10606 -0
- package/dist/launcher.d.ts +3 -0
- package/dist/launcher.js +117 -0
- package/dist/launcher.js.map +1 -0
- package/dist/runtime-manifest.d.ts +29 -0
- package/dist/runtime-manifest.js +75 -0
- package/dist/runtime-manifest.js.map +1 -0
- package/dist/runtime-package.d.ts +10 -0
- package/dist/runtime-package.js +66 -0
- package/dist/runtime-package.js.map +1 -0
- package/dist/scaffold-commands.d.ts +3 -0
- package/dist/scaffold-commands.js +214 -0
- package/dist/scaffold-commands.js.map +1 -0
- package/dist/vendor.d.ts +1 -0
- package/dist/vendor.js +260 -0
- package/dist/vendor.js.map +1 -0
- package/node_modules/@isaacs/fs-minipass/LICENSE +15 -0
- package/node_modules/@isaacs/fs-minipass/README.md +71 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts +118 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js +430 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js.map +1 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json +3 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts +118 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.js +420 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.js.map +1 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/package.json +3 -0
- package/node_modules/@isaacs/fs-minipass/package.json +72 -0
- package/node_modules/@sumi/create/README.md +77 -0
- package/node_modules/@sumi/create/dist/index.d.ts +1 -0
- package/node_modules/@sumi/create/dist/index.js +2 -0
- package/node_modules/@sumi/create/dist/index.js.map +1 -0
- package/node_modules/@sumi/create/dist/scaffold.d.ts +29 -0
- package/node_modules/@sumi/create/dist/scaffold.js +134 -0
- package/node_modules/@sumi/create/dist/scaffold.js.map +1 -0
- package/node_modules/@sumi/create/package.json +22 -0
- package/node_modules/@sumi/create/template/.gitattributes +1 -0
- package/node_modules/@sumi/create/template/.prettierignore +5 -0
- package/node_modules/@sumi/create/template/.prettierrc +1 -0
- package/node_modules/@sumi/create/template/AGENTS.md +28 -0
- package/node_modules/@sumi/create/template/control/baselines/.gitkeep +0 -0
- package/node_modules/@sumi/create/template/control/config.yaml +59 -0
- package/node_modules/@sumi/create/template/control/decisions/0001-config-module.md +15 -0
- package/node_modules/@sumi/create/template/control/flows/change.flow.yaml +14 -0
- package/node_modules/@sumi/create/template/control/flows/check.flow.yaml +25 -0
- package/node_modules/@sumi/create/template/control/plugins/.gitkeep +0 -0
- package/node_modules/@sumi/create/template/control/rubrics/architecture.yaml +14 -0
- package/node_modules/@sumi/create/template/eslint.config.mjs +9 -0
- package/node_modules/@sumi/create/template/gitignore +4 -0
- package/node_modules/@sumi/create/template/init/AGENTS.md +27 -0
- package/node_modules/@sumi/create/template/init/control/baselines/.gitkeep +0 -0
- package/node_modules/@sumi/create/template/init/control/flows/check.flow.yaml +20 -0
- package/node_modules/@sumi/create/template/init/control/plugins/.gitkeep +0 -0
- package/node_modules/@sumi/create/template/init/control/rubrics/architecture.yaml +14 -0
- package/node_modules/@sumi/create/template/init/openspec/changes/archive/.gitkeep +0 -0
- package/node_modules/@sumi/create/template/init/openspec/config.yaml +1 -0
- package/node_modules/@sumi/create/template/init/openspec/specs/.gitkeep +0 -0
- package/node_modules/@sumi/create/template/init/precedents/registry.yaml +1 -0
- package/node_modules/@sumi/create/template/openspec/changes/archive/.gitkeep +0 -0
- package/node_modules/@sumi/create/template/openspec/config.yaml +1 -0
- package/node_modules/@sumi/create/template/openspec/specs/.gitkeep +0 -0
- package/node_modules/@sumi/create/template/package.json +21 -0
- package/node_modules/@sumi/create/template/precedents/no-env-in-business/check.mjs +36 -0
- package/node_modules/@sumi/create/template/precedents/no-env-in-business/fixtures/compliant/src/a.ts +3 -0
- package/node_modules/@sumi/create/template/precedents/no-env-in-business/fixtures/violating/src/a.ts +1 -0
- package/node_modules/@sumi/create/template/precedents/no-env-in-business/precedent.yaml +9 -0
- package/node_modules/@sumi/create/template/precedents/registry.yaml +3 -0
- package/node_modules/@sumi/create/template/src/config.ts +4 -0
- package/node_modules/@sumi/create/template/src/index.test.ts +6 -0
- package/node_modules/@sumi/create/template/src/index.ts +5 -0
- package/node_modules/@sumi/create/template/tsconfig.json +12 -0
- package/node_modules/@sumi/kernel/README.md +128 -0
- package/node_modules/@sumi/kernel/dist/brief.d.ts +41 -0
- package/node_modules/@sumi/kernel/dist/brief.js +82 -0
- package/node_modules/@sumi/kernel/dist/brief.js.map +1 -0
- package/node_modules/@sumi/kernel/dist/config.d.ts +40 -0
- package/node_modules/@sumi/kernel/dist/config.js +94 -0
- package/node_modules/@sumi/kernel/dist/config.js.map +1 -0
- package/node_modules/@sumi/kernel/dist/engine.d.ts +33 -0
- package/node_modules/@sumi/kernel/dist/engine.js +242 -0
- package/node_modules/@sumi/kernel/dist/engine.js.map +1 -0
- package/node_modules/@sumi/kernel/dist/errors.d.ts +5 -0
- package/node_modules/@sumi/kernel/dist/errors.js +9 -0
- package/node_modules/@sumi/kernel/dist/errors.js.map +1 -0
- package/node_modules/@sumi/kernel/dist/flow.d.ts +37 -0
- package/node_modules/@sumi/kernel/dist/flow.js +132 -0
- package/node_modules/@sumi/kernel/dist/flow.js.map +1 -0
- package/node_modules/@sumi/kernel/dist/index.d.ts +10 -0
- package/node_modules/@sumi/kernel/dist/index.js +11 -0
- package/node_modules/@sumi/kernel/dist/index.js.map +1 -0
- package/node_modules/@sumi/kernel/dist/plan.d.ts +21 -0
- package/node_modules/@sumi/kernel/dist/plan.js +68 -0
- package/node_modules/@sumi/kernel/dist/plan.js.map +1 -0
- package/node_modules/@sumi/kernel/dist/record.d.ts +31 -0
- package/node_modules/@sumi/kernel/dist/record.js +54 -0
- package/node_modules/@sumi/kernel/dist/record.js.map +1 -0
- package/node_modules/@sumi/kernel/dist/registry.d.ts +32 -0
- package/node_modules/@sumi/kernel/dist/registry.js +126 -0
- package/node_modules/@sumi/kernel/dist/registry.js.map +1 -0
- package/node_modules/@sumi/kernel/dist/runner.d.ts +15 -0
- package/node_modules/@sumi/kernel/dist/runner.js +101 -0
- package/node_modules/@sumi/kernel/dist/runner.js.map +1 -0
- package/node_modules/@sumi/kernel/dist/scope.d.ts +29 -0
- package/node_modules/@sumi/kernel/dist/scope.js +132 -0
- package/node_modules/@sumi/kernel/dist/scope.js.map +1 -0
- package/node_modules/@sumi/kernel/dist/testing.d.ts +7 -0
- package/node_modules/@sumi/kernel/dist/testing.js +32 -0
- package/node_modules/@sumi/kernel/dist/testing.js.map +1 -0
- package/node_modules/@sumi/kernel/dist/windows-process.d.ts +1 -0
- package/node_modules/@sumi/kernel/dist/windows-process.js +90 -0
- package/node_modules/@sumi/kernel/dist/windows-process.js.map +1 -0
- package/node_modules/@sumi/kernel/package.json +20 -0
- package/node_modules/@sumi/kernel/test/fixtures/fake-plugin.mjs +44 -0
- package/node_modules/@sumi/kernel/test/fixtures/py-plugin.py +3 -0
- package/node_modules/@sumi/plugin-sdk/README.md +144 -0
- package/node_modules/@sumi/plugin-sdk/dist/env.d.ts +5 -0
- package/node_modules/@sumi/plugin-sdk/dist/env.js +30 -0
- package/node_modules/@sumi/plugin-sdk/dist/env.js.map +1 -0
- package/node_modules/@sumi/plugin-sdk/dist/git.d.ts +7 -0
- package/node_modules/@sumi/plugin-sdk/dist/git.js +19 -0
- package/node_modules/@sumi/plugin-sdk/dist/git.js.map +1 -0
- package/node_modules/@sumi/plugin-sdk/dist/index.d.ts +9 -0
- package/node_modules/@sumi/plugin-sdk/dist/index.js +10 -0
- package/node_modules/@sumi/plugin-sdk/dist/index.js.map +1 -0
- package/node_modules/@sumi/plugin-sdk/dist/process.d.ts +7 -0
- package/node_modules/@sumi/plugin-sdk/dist/process.js +13 -0
- package/node_modules/@sumi/plugin-sdk/dist/process.js.map +1 -0
- package/node_modules/@sumi/plugin-sdk/dist/project.d.ts +9 -0
- package/node_modules/@sumi/plugin-sdk/dist/project.js +55 -0
- package/node_modules/@sumi/plugin-sdk/dist/project.js.map +1 -0
- package/node_modules/@sumi/plugin-sdk/dist/protocol.d.ts +200 -0
- package/node_modules/@sumi/plugin-sdk/dist/protocol.js +36 -0
- package/node_modules/@sumi/plugin-sdk/dist/protocol.js.map +1 -0
- package/node_modules/@sumi/plugin-sdk/dist/rules.d.ts +17 -0
- package/node_modules/@sumi/plugin-sdk/dist/rules.js +16 -0
- package/node_modules/@sumi/plugin-sdk/dist/rules.js.map +1 -0
- package/node_modules/@sumi/plugin-sdk/dist/sdk.d.ts +12 -0
- package/node_modules/@sumi/plugin-sdk/dist/sdk.js +51 -0
- package/node_modules/@sumi/plugin-sdk/dist/sdk.js.map +1 -0
- package/node_modules/@sumi/plugin-sdk/dist/tool-batches.d.ts +11 -0
- package/node_modules/@sumi/plugin-sdk/dist/tool-batches.js +41 -0
- package/node_modules/@sumi/plugin-sdk/dist/tool-batches.js.map +1 -0
- package/node_modules/@sumi/plugin-sdk/dist/validate.d.ts +8 -0
- package/node_modules/@sumi/plugin-sdk/dist/validate.js +221 -0
- package/node_modules/@sumi/plugin-sdk/dist/validate.js.map +1 -0
- package/node_modules/@sumi/plugin-sdk/package.json +18 -0
- package/node_modules/@sumi/plugins-core/README.md +105 -0
- package/node_modules/@sumi/plugins-core/dist/baseline.d.ts +34 -0
- package/node_modules/@sumi/plugins-core/dist/baseline.js +54 -0
- package/node_modules/@sumi/plugins-core/dist/baseline.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/commands/adopt.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/commands/adopt.js +182 -0
- package/node_modules/@sumi/plugins-core/dist/commands/adopt.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/commands/baseline.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/commands/baseline.js +56 -0
- package/node_modules/@sumi/plugins-core/dist/commands/baseline.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/fix/format.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/fix/format.js +4 -0
- package/node_modules/@sumi/plugins-core/dist/fix/format.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/fix/lint.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/fix/lint.js +4 -0
- package/node_modules/@sumi/plugins-core/dist/fix/lint.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/index.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/index.js +2 -0
- package/node_modules/@sumi/plugins-core/dist/index.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/lib.d.ts +34 -0
- package/node_modules/@sumi/plugins-core/dist/lib.js +113 -0
- package/node_modules/@sumi/plugins-core/dist/lib.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/agent-drift.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/agent-drift.js +32 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/agent-drift.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/control-docs.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/control-docs.js +109 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/control-docs.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/coverage.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/coverage.js +107 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/coverage.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/exec.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/exec.js +69 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/exec.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/format.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/format.js +41 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/format.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/layer-boundary.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/layer-boundary.js +87 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/layer-boundary.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/lint.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/lint.js +91 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/lint.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/ratchet.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/ratchet.js +83 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/ratchet.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/test-affected.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/test-affected.js +82 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/test-affected.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/typecheck.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/typecheck.js +31 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/typecheck.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/testing.d.ts +13 -0
- package/node_modules/@sumi/plugins-core/dist/testing.js +47 -0
- package/node_modules/@sumi/plugins-core/dist/testing.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/tool-batches.d.ts +11 -0
- package/node_modules/@sumi/plugins-core/dist/tool-batches.js +41 -0
- package/node_modules/@sumi/plugins-core/dist/tool-batches.js.map +1 -0
- package/node_modules/@sumi/plugins-core/instructions/adopt.md +37 -0
- package/node_modules/@sumi/plugins-core/package.json +25 -0
- package/node_modules/@sumi/plugins-core/sumi-plugins.yaml +80 -0
- package/node_modules/@sumi/plugins-governance/README.md +159 -0
- package/node_modules/@sumi/plugins-governance/dist/checkout.d.ts +45 -0
- package/node_modules/@sumi/plugins-governance/dist/checkout.js +138 -0
- package/node_modules/@sumi/plugins-governance/dist/checkout.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/approve.d.ts +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/approve.js +27 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/approve.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/gate.d.ts +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/gate.js +167 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/gate.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/guard.d.ts +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/guard.js +27 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/guard.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/pr-report-check.d.ts +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/pr-report-check.js +8 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/pr-report-check.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/pr-report.d.ts +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/pr-report.js +128 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/pr-report.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/unlock.d.ts +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/unlock.js +21 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/unlock.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/guard.d.ts +19 -0
- package/node_modules/@sumi/plugins-governance/dist/guard.js +173 -0
- package/node_modules/@sumi/plugins-governance/dist/guard.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/index.d.ts +4 -0
- package/node_modules/@sumi/plugins-governance/dist/index.js +5 -0
- package/node_modules/@sumi/plugins-governance/dist/index.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/plugins/protected-paths.d.ts +1 -0
- package/node_modules/@sumi/plugins-governance/dist/plugins/protected-paths.js +31 -0
- package/node_modules/@sumi/plugins-governance/dist/plugins/protected-paths.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/pr-base.d.ts +19 -0
- package/node_modules/@sumi/plugins-governance/dist/pr-base.js +49 -0
- package/node_modules/@sumi/plugins-governance/dist/pr-base.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/pr-report-markers.d.ts +4 -0
- package/node_modules/@sumi/plugins-governance/dist/pr-report-markers.js +11 -0
- package/node_modules/@sumi/plugins-governance/dist/pr-report-markers.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/pr-report-status.d.ts +14 -0
- package/node_modules/@sumi/plugins-governance/dist/pr-report-status.js +97 -0
- package/node_modules/@sumi/plugins-governance/dist/pr-report-status.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/protected.d.ts +22 -0
- package/node_modules/@sumi/plugins-governance/dist/protected.js +65 -0
- package/node_modules/@sumi/plugins-governance/dist/protected.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/push-base.d.ts +9 -0
- package/node_modules/@sumi/plugins-governance/dist/push-base.js +42 -0
- package/node_modules/@sumi/plugins-governance/dist/push-base.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/semantic.d.ts +5 -0
- package/node_modules/@sumi/plugins-governance/dist/semantic.js +105 -0
- package/node_modules/@sumi/plugins-governance/dist/semantic.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/state.d.ts +48 -0
- package/node_modules/@sumi/plugins-governance/dist/state.js +155 -0
- package/node_modules/@sumi/plugins-governance/dist/state.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/instructions/push.md +20 -0
- package/node_modules/@sumi/plugins-governance/package.json +25 -0
- package/node_modules/@sumi/plugins-governance/sumi-plugins.yaml +23 -0
- package/node_modules/@sumi/plugins-openspec/README.md +80 -0
- package/node_modules/@sumi/plugins-openspec/dist/index.d.ts +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/index.js +2 -0
- package/node_modules/@sumi/plugins-openspec/dist/index.js.map +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/openspec.d.ts +21 -0
- package/node_modules/@sumi/plugins-openspec/dist/openspec.js +59 -0
- package/node_modules/@sumi/plugins-openspec/dist/openspec.js.map +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/plugins/change-tasks.d.ts +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/plugins/change-tasks.js +85 -0
- package/node_modules/@sumi/plugins-openspec/dist/plugins/change-tasks.js.map +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/plugins/planner.d.ts +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/plugins/planner.js +16 -0
- package/node_modules/@sumi/plugins-openspec/dist/plugins/planner.js.map +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/plugins/validate.d.ts +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/plugins/validate.js +45 -0
- package/node_modules/@sumi/plugins-openspec/dist/plugins/validate.js.map +1 -0
- package/node_modules/@sumi/plugins-openspec/package.json +22 -0
- package/node_modules/@sumi/plugins-openspec/sumi-plugins.yaml +20 -0
- package/node_modules/@sumi/plugins-precedent/README.md +162 -0
- package/node_modules/@sumi/plugins-precedent/dist/candidates.d.ts +17 -0
- package/node_modules/@sumi/plugins-precedent/dist/candidates.js +18 -0
- package/node_modules/@sumi/plugins-precedent/dist/candidates.js.map +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/commands/context.d.ts +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/commands/context.js +23 -0
- package/node_modules/@sumi/plugins-precedent/dist/commands/context.js.map +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/commands/promote.d.ts +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/commands/promote.js +89 -0
- package/node_modules/@sumi/plugins-precedent/dist/commands/promote.js.map +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/index.d.ts +2 -0
- package/node_modules/@sumi/plugins-precedent/dist/index.js +3 -0
- package/node_modules/@sumi/plugins-precedent/dist/index.js.map +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/model.d.ts +65 -0
- package/node_modules/@sumi/plugins-precedent/dist/model.js +150 -0
- package/node_modules/@sumi/plugins-precedent/dist/model.js.map +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/plugins/checker.d.ts +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/plugins/checker.js +32 -0
- package/node_modules/@sumi/plugins-precedent/dist/plugins/checker.js.map +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/plugins/harvest.d.ts +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/plugins/harvest.js +174 -0
- package/node_modules/@sumi/plugins-precedent/dist/plugins/harvest.js.map +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/plugins/planner.d.ts +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/plugins/planner.js +103 -0
- package/node_modules/@sumi/plugins-precedent/dist/plugins/planner.js.map +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/plugins/selftest.d.ts +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/plugins/selftest.js +220 -0
- package/node_modules/@sumi/plugins-precedent/dist/plugins/selftest.js.map +1 -0
- package/node_modules/@sumi/plugins-precedent/instructions/distill.md +12 -0
- package/node_modules/@sumi/plugins-precedent/package.json +26 -0
- package/node_modules/@sumi/plugins-precedent/sumi-plugins.yaml +33 -0
- package/node_modules/@sumi/plugins-review/README.md +131 -0
- package/node_modules/@sumi/plugins-review/dist/commands/context.d.ts +1 -0
- package/node_modules/@sumi/plugins-review/dist/commands/context.js +32 -0
- package/node_modules/@sumi/plugins-review/dist/commands/context.js.map +1 -0
- package/node_modules/@sumi/plugins-review/dist/commands/submit.d.ts +1 -0
- package/node_modules/@sumi/plugins-review/dist/commands/submit.js +46 -0
- package/node_modules/@sumi/plugins-review/dist/commands/submit.js.map +1 -0
- package/node_modules/@sumi/plugins-review/dist/index.d.ts +1 -0
- package/node_modules/@sumi/plugins-review/dist/index.js +2 -0
- package/node_modules/@sumi/plugins-review/dist/index.js.map +1 -0
- package/node_modules/@sumi/plugins-review/dist/plugins/rubric.d.ts +1 -0
- package/node_modules/@sumi/plugins-review/dist/plugins/rubric.js +116 -0
- package/node_modules/@sumi/plugins-review/dist/plugins/rubric.js.map +1 -0
- package/node_modules/@sumi/plugins-review/dist/review.d.ts +64 -0
- package/node_modules/@sumi/plugins-review/dist/review.js +104 -0
- package/node_modules/@sumi/plugins-review/dist/review.js.map +1 -0
- package/node_modules/@sumi/plugins-review/package.json +25 -0
- package/node_modules/@sumi/plugins-review/sumi-plugins.yaml +13 -0
- package/node_modules/chownr/LICENSE.md +63 -0
- package/node_modules/chownr/README.md +3 -0
- package/node_modules/chownr/dist/commonjs/index.d.ts +3 -0
- package/node_modules/chownr/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/chownr/dist/commonjs/index.js +93 -0
- package/node_modules/chownr/dist/commonjs/index.js.map +1 -0
- package/node_modules/chownr/dist/commonjs/package.json +3 -0
- package/node_modules/chownr/dist/esm/index.d.ts +3 -0
- package/node_modules/chownr/dist/esm/index.d.ts.map +1 -0
- package/node_modules/chownr/dist/esm/index.js +85 -0
- package/node_modules/chownr/dist/esm/index.js.map +1 -0
- package/node_modules/chownr/dist/esm/package.json +3 -0
- package/node_modules/chownr/package.json +69 -0
- package/node_modules/cross-spawn/LICENSE +21 -0
- package/node_modules/cross-spawn/README.md +89 -0
- package/node_modules/cross-spawn/index.js +39 -0
- package/node_modules/cross-spawn/lib/enoent.js +59 -0
- package/node_modules/cross-spawn/lib/parse.js +91 -0
- package/node_modules/cross-spawn/lib/util/escape.js +47 -0
- package/node_modules/cross-spawn/lib/util/readShebang.js +23 -0
- package/node_modules/cross-spawn/lib/util/resolveCommand.js +52 -0
- package/node_modules/cross-spawn/package.json +73 -0
- package/node_modules/isexe/.npmignore +2 -0
- package/node_modules/isexe/LICENSE +15 -0
- package/node_modules/isexe/README.md +51 -0
- package/node_modules/isexe/index.js +57 -0
- package/node_modules/isexe/mode.js +41 -0
- package/node_modules/isexe/package.json +31 -0
- package/node_modules/isexe/test/basic.js +221 -0
- package/node_modules/isexe/windows.js +42 -0
- package/node_modules/minipass/LICENSE.md +55 -0
- package/node_modules/minipass/README.md +825 -0
- package/node_modules/minipass/dist/commonjs/index.d.ts +545 -0
- package/node_modules/minipass/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/minipass/dist/commonjs/index.js +1038 -0
- package/node_modules/minipass/dist/commonjs/index.js.map +1 -0
- package/node_modules/minipass/dist/commonjs/package.json +3 -0
- package/node_modules/minipass/dist/esm/index.d.ts +545 -0
- package/node_modules/minipass/dist/esm/index.d.ts.map +1 -0
- package/node_modules/minipass/dist/esm/index.js +1020 -0
- package/node_modules/minipass/dist/esm/index.js.map +1 -0
- package/node_modules/minipass/dist/esm/package.json +3 -0
- package/node_modules/minipass/package.json +77 -0
- package/node_modules/minizlib/LICENSE +26 -0
- package/node_modules/minizlib/README.md +64 -0
- package/node_modules/minizlib/dist/commonjs/constants.d.ts +2 -0
- package/node_modules/minizlib/dist/commonjs/constants.d.ts.map +1 -0
- package/node_modules/minizlib/dist/commonjs/constants.js +123 -0
- package/node_modules/minizlib/dist/commonjs/constants.js.map +1 -0
- package/node_modules/minizlib/dist/commonjs/index.d.ts +99 -0
- package/node_modules/minizlib/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/minizlib/dist/commonjs/index.js +416 -0
- package/node_modules/minizlib/dist/commonjs/index.js.map +1 -0
- package/node_modules/minizlib/dist/commonjs/package.json +3 -0
- package/node_modules/minizlib/dist/esm/constants.d.ts +2 -0
- package/node_modules/minizlib/dist/esm/constants.d.ts.map +1 -0
- package/node_modules/minizlib/dist/esm/constants.js +117 -0
- package/node_modules/minizlib/dist/esm/constants.js.map +1 -0
- package/node_modules/minizlib/dist/esm/index.d.ts +99 -0
- package/node_modules/minizlib/dist/esm/index.d.ts.map +1 -0
- package/node_modules/minizlib/dist/esm/index.js +363 -0
- package/node_modules/minizlib/dist/esm/index.js.map +1 -0
- package/node_modules/minizlib/dist/esm/package.json +3 -0
- package/node_modules/minizlib/package.json +80 -0
- package/node_modules/path-key/index.d.ts +40 -0
- package/node_modules/path-key/index.js +16 -0
- package/node_modules/path-key/license +9 -0
- package/node_modules/path-key/package.json +39 -0
- package/node_modules/path-key/readme.md +61 -0
- package/node_modules/picomatch/LICENSE +21 -0
- package/node_modules/picomatch/README.md +743 -0
- package/node_modules/picomatch/index.js +17 -0
- package/node_modules/picomatch/lib/constants.js +184 -0
- package/node_modules/picomatch/lib/parse.js +1425 -0
- package/node_modules/picomatch/lib/picomatch.js +361 -0
- package/node_modules/picomatch/lib/scan.js +403 -0
- package/node_modules/picomatch/lib/utils.js +72 -0
- package/node_modules/picomatch/package.json +83 -0
- package/node_modules/picomatch/posix.js +3 -0
- package/node_modules/shebang-command/index.js +19 -0
- package/node_modules/shebang-command/license +9 -0
- package/node_modules/shebang-command/package.json +34 -0
- package/node_modules/shebang-command/readme.md +34 -0
- package/node_modules/shebang-regex/index.d.ts +22 -0
- package/node_modules/shebang-regex/index.js +2 -0
- package/node_modules/shebang-regex/license +9 -0
- package/node_modules/shebang-regex/package.json +35 -0
- package/node_modules/shebang-regex/readme.md +33 -0
- package/node_modules/tar/LICENSE.md +55 -0
- package/node_modules/tar/README.md +1233 -0
- package/node_modules/tar/dist/commonjs/create.d.ts +3 -0
- package/node_modules/tar/dist/commonjs/create.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/create.js +82 -0
- package/node_modules/tar/dist/commonjs/create.js.map +1 -0
- package/node_modules/tar/dist/commonjs/cwd-error.d.ts +8 -0
- package/node_modules/tar/dist/commonjs/cwd-error.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/cwd-error.js +18 -0
- package/node_modules/tar/dist/commonjs/cwd-error.js.map +1 -0
- package/node_modules/tar/dist/commonjs/extract.d.ts +3 -0
- package/node_modules/tar/dist/commonjs/extract.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/extract.js +88 -0
- package/node_modules/tar/dist/commonjs/extract.js.map +1 -0
- package/node_modules/tar/dist/commonjs/get-write-flag.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/get-write-flag.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/get-write-flag.js +32 -0
- package/node_modules/tar/dist/commonjs/get-write-flag.js.map +1 -0
- package/node_modules/tar/dist/commonjs/header.d.ts +53 -0
- package/node_modules/tar/dist/commonjs/header.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/header.js +348 -0
- package/node_modules/tar/dist/commonjs/header.js.map +1 -0
- package/node_modules/tar/dist/commonjs/index.d.ts +20 -0
- package/node_modules/tar/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/index.js +64 -0
- package/node_modules/tar/dist/commonjs/index.js.map +1 -0
- package/node_modules/tar/dist/commonjs/index.min.js +4 -0
- package/node_modules/tar/dist/commonjs/index.min.js.map +7 -0
- package/node_modules/tar/dist/commonjs/large-numbers.d.ts +3 -0
- package/node_modules/tar/dist/commonjs/large-numbers.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/large-numbers.js +99 -0
- package/node_modules/tar/dist/commonjs/large-numbers.js.map +1 -0
- package/node_modules/tar/dist/commonjs/list.d.ts +7 -0
- package/node_modules/tar/dist/commonjs/list.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/list.js +153 -0
- package/node_modules/tar/dist/commonjs/list.js.map +1 -0
- package/node_modules/tar/dist/commonjs/make-command.d.ts +49 -0
- package/node_modules/tar/dist/commonjs/make-command.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/make-command.js +52 -0
- package/node_modules/tar/dist/commonjs/make-command.js.map +1 -0
- package/node_modules/tar/dist/commonjs/mkdir.d.ts +25 -0
- package/node_modules/tar/dist/commonjs/mkdir.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/mkdir.js +187 -0
- package/node_modules/tar/dist/commonjs/mkdir.js.map +1 -0
- package/node_modules/tar/dist/commonjs/mode-fix.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/mode-fix.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/mode-fix.js +29 -0
- package/node_modules/tar/dist/commonjs/mode-fix.js.map +1 -0
- package/node_modules/tar/dist/commonjs/normalize-unicode.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/normalize-unicode.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/normalize-unicode.js +38 -0
- package/node_modules/tar/dist/commonjs/normalize-unicode.js.map +1 -0
- package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/normalize-windows-path.js +12 -0
- package/node_modules/tar/dist/commonjs/normalize-windows-path.js.map +1 -0
- package/node_modules/tar/dist/commonjs/options.d.ts +604 -0
- package/node_modules/tar/dist/commonjs/options.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/options.js +66 -0
- package/node_modules/tar/dist/commonjs/options.js.map +1 -0
- package/node_modules/tar/dist/commonjs/pack.d.ts +105 -0
- package/node_modules/tar/dist/commonjs/pack.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/pack.js +544 -0
- package/node_modules/tar/dist/commonjs/pack.js.map +1 -0
- package/node_modules/tar/dist/commonjs/package.json +3 -0
- package/node_modules/tar/dist/commonjs/parse.d.ts +92 -0
- package/node_modules/tar/dist/commonjs/parse.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/parse.js +655 -0
- package/node_modules/tar/dist/commonjs/parse.js.map +1 -0
- package/node_modules/tar/dist/commonjs/path-reservations.d.ts +11 -0
- package/node_modules/tar/dist/commonjs/path-reservations.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/path-reservations.js +170 -0
- package/node_modules/tar/dist/commonjs/path-reservations.js.map +1 -0
- package/node_modules/tar/dist/commonjs/pax.d.ts +26 -0
- package/node_modules/tar/dist/commonjs/pax.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/pax.js +182 -0
- package/node_modules/tar/dist/commonjs/pax.js.map +1 -0
- package/node_modules/tar/dist/commonjs/process-umask.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/process-umask.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/process-umask.js +7 -0
- package/node_modules/tar/dist/commonjs/process-umask.js.map +1 -0
- package/node_modules/tar/dist/commonjs/read-entry.d.ts +36 -0
- package/node_modules/tar/dist/commonjs/read-entry.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/read-entry.js +136 -0
- package/node_modules/tar/dist/commonjs/read-entry.js.map +1 -0
- package/node_modules/tar/dist/commonjs/replace.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/replace.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/replace.js +227 -0
- package/node_modules/tar/dist/commonjs/replace.js.map +1 -0
- package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/strip-absolute-path.js +29 -0
- package/node_modules/tar/dist/commonjs/strip-absolute-path.js.map +1 -0
- package/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/strip-trailing-slashes.js +18 -0
- package/node_modules/tar/dist/commonjs/strip-trailing-slashes.js.map +1 -0
- package/node_modules/tar/dist/commonjs/symlink-error.d.ts +9 -0
- package/node_modules/tar/dist/commonjs/symlink-error.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/symlink-error.js +19 -0
- package/node_modules/tar/dist/commonjs/symlink-error.js.map +1 -0
- package/node_modules/tar/dist/commonjs/types.d.ts +16 -0
- package/node_modules/tar/dist/commonjs/types.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/types.js +70 -0
- package/node_modules/tar/dist/commonjs/types.js.map +1 -0
- package/node_modules/tar/dist/commonjs/unpack.d.ts +101 -0
- package/node_modules/tar/dist/commonjs/unpack.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/unpack.js +932 -0
- package/node_modules/tar/dist/commonjs/unpack.js.map +1 -0
- package/node_modules/tar/dist/commonjs/update.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/update.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/update.js +33 -0
- package/node_modules/tar/dist/commonjs/update.js.map +1 -0
- package/node_modules/tar/dist/commonjs/warn-method.d.ts +24 -0
- package/node_modules/tar/dist/commonjs/warn-method.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/warn-method.js +31 -0
- package/node_modules/tar/dist/commonjs/warn-method.js.map +1 -0
- package/node_modules/tar/dist/commonjs/winchars.d.ts +3 -0
- package/node_modules/tar/dist/commonjs/winchars.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/winchars.js +14 -0
- package/node_modules/tar/dist/commonjs/winchars.js.map +1 -0
- package/node_modules/tar/dist/commonjs/write-entry.d.ts +129 -0
- package/node_modules/tar/dist/commonjs/write-entry.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/write-entry.js +698 -0
- package/node_modules/tar/dist/commonjs/write-entry.js.map +1 -0
- package/node_modules/tar/dist/esm/create.d.ts +3 -0
- package/node_modules/tar/dist/esm/create.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/create.js +76 -0
- package/node_modules/tar/dist/esm/create.js.map +1 -0
- package/node_modules/tar/dist/esm/cwd-error.d.ts +8 -0
- package/node_modules/tar/dist/esm/cwd-error.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/cwd-error.js +14 -0
- package/node_modules/tar/dist/esm/cwd-error.js.map +1 -0
- package/node_modules/tar/dist/esm/extract.d.ts +3 -0
- package/node_modules/tar/dist/esm/extract.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/extract.js +49 -0
- package/node_modules/tar/dist/esm/extract.js.map +1 -0
- package/node_modules/tar/dist/esm/get-write-flag.d.ts +2 -0
- package/node_modules/tar/dist/esm/get-write-flag.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/get-write-flag.js +26 -0
- package/node_modules/tar/dist/esm/get-write-flag.js.map +1 -0
- package/node_modules/tar/dist/esm/header.d.ts +53 -0
- package/node_modules/tar/dist/esm/header.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/header.js +311 -0
- package/node_modules/tar/dist/esm/header.js.map +1 -0
- package/node_modules/tar/dist/esm/index.d.ts +20 -0
- package/node_modules/tar/dist/esm/index.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/index.js +20 -0
- package/node_modules/tar/dist/esm/index.js.map +1 -0
- package/node_modules/tar/dist/esm/index.min.js +4 -0
- package/node_modules/tar/dist/esm/index.min.js.map +7 -0
- package/node_modules/tar/dist/esm/large-numbers.d.ts +3 -0
- package/node_modules/tar/dist/esm/large-numbers.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/large-numbers.js +94 -0
- package/node_modules/tar/dist/esm/large-numbers.js.map +1 -0
- package/node_modules/tar/dist/esm/list.d.ts +7 -0
- package/node_modules/tar/dist/esm/list.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/list.js +113 -0
- package/node_modules/tar/dist/esm/list.js.map +1 -0
- package/node_modules/tar/dist/esm/make-command.d.ts +49 -0
- package/node_modules/tar/dist/esm/make-command.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/make-command.js +48 -0
- package/node_modules/tar/dist/esm/make-command.js.map +1 -0
- package/node_modules/tar/dist/esm/mkdir.d.ts +25 -0
- package/node_modules/tar/dist/esm/mkdir.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/mkdir.js +179 -0
- package/node_modules/tar/dist/esm/mkdir.js.map +1 -0
- package/node_modules/tar/dist/esm/mode-fix.d.ts +2 -0
- package/node_modules/tar/dist/esm/mode-fix.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/mode-fix.js +25 -0
- package/node_modules/tar/dist/esm/mode-fix.js.map +1 -0
- package/node_modules/tar/dist/esm/normalize-unicode.d.ts +2 -0
- package/node_modules/tar/dist/esm/normalize-unicode.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/normalize-unicode.js +34 -0
- package/node_modules/tar/dist/esm/normalize-unicode.js.map +1 -0
- package/node_modules/tar/dist/esm/normalize-windows-path.d.ts +2 -0
- package/node_modules/tar/dist/esm/normalize-windows-path.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/normalize-windows-path.js +9 -0
- package/node_modules/tar/dist/esm/normalize-windows-path.js.map +1 -0
- package/node_modules/tar/dist/esm/options.d.ts +604 -0
- package/node_modules/tar/dist/esm/options.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/options.js +54 -0
- package/node_modules/tar/dist/esm/options.js.map +1 -0
- package/node_modules/tar/dist/esm/pack.d.ts +105 -0
- package/node_modules/tar/dist/esm/pack.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/pack.js +502 -0
- package/node_modules/tar/dist/esm/pack.js.map +1 -0
- package/node_modules/tar/dist/esm/package.json +3 -0
- package/node_modules/tar/dist/esm/parse.d.ts +92 -0
- package/node_modules/tar/dist/esm/parse.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/parse.js +651 -0
- package/node_modules/tar/dist/esm/parse.js.map +1 -0
- package/node_modules/tar/dist/esm/path-reservations.d.ts +11 -0
- package/node_modules/tar/dist/esm/path-reservations.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/path-reservations.js +166 -0
- package/node_modules/tar/dist/esm/path-reservations.js.map +1 -0
- package/node_modules/tar/dist/esm/pax.d.ts +26 -0
- package/node_modules/tar/dist/esm/pax.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/pax.js +178 -0
- package/node_modules/tar/dist/esm/pax.js.map +1 -0
- package/node_modules/tar/dist/esm/process-umask.d.ts +2 -0
- package/node_modules/tar/dist/esm/process-umask.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/process-umask.js +3 -0
- package/node_modules/tar/dist/esm/process-umask.js.map +1 -0
- package/node_modules/tar/dist/esm/read-entry.d.ts +36 -0
- package/node_modules/tar/dist/esm/read-entry.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/read-entry.js +132 -0
- package/node_modules/tar/dist/esm/read-entry.js.map +1 -0
- package/node_modules/tar/dist/esm/replace.d.ts +2 -0
- package/node_modules/tar/dist/esm/replace.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/replace.js +221 -0
- package/node_modules/tar/dist/esm/replace.js.map +1 -0
- package/node_modules/tar/dist/esm/strip-absolute-path.d.ts +2 -0
- package/node_modules/tar/dist/esm/strip-absolute-path.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/strip-absolute-path.js +25 -0
- package/node_modules/tar/dist/esm/strip-absolute-path.js.map +1 -0
- package/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts +2 -0
- package/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/strip-trailing-slashes.js +14 -0
- package/node_modules/tar/dist/esm/strip-trailing-slashes.js.map +1 -0
- package/node_modules/tar/dist/esm/symlink-error.d.ts +9 -0
- package/node_modules/tar/dist/esm/symlink-error.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/symlink-error.js +15 -0
- package/node_modules/tar/dist/esm/symlink-error.js.map +1 -0
- package/node_modules/tar/dist/esm/types.d.ts +16 -0
- package/node_modules/tar/dist/esm/types.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/types.js +65 -0
- package/node_modules/tar/dist/esm/types.js.map +1 -0
- package/node_modules/tar/dist/esm/unpack.d.ts +101 -0
- package/node_modules/tar/dist/esm/unpack.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/unpack.js +891 -0
- package/node_modules/tar/dist/esm/unpack.js.map +1 -0
- package/node_modules/tar/dist/esm/update.d.ts +2 -0
- package/node_modules/tar/dist/esm/update.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/update.js +30 -0
- package/node_modules/tar/dist/esm/update.js.map +1 -0
- package/node_modules/tar/dist/esm/warn-method.d.ts +24 -0
- package/node_modules/tar/dist/esm/warn-method.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/warn-method.js +27 -0
- package/node_modules/tar/dist/esm/warn-method.js.map +1 -0
- package/node_modules/tar/dist/esm/winchars.d.ts +3 -0
- package/node_modules/tar/dist/esm/winchars.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/winchars.js +9 -0
- package/node_modules/tar/dist/esm/winchars.js.map +1 -0
- package/node_modules/tar/dist/esm/write-entry.d.ts +129 -0
- package/node_modules/tar/dist/esm/write-entry.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/write-entry.js +656 -0
- package/node_modules/tar/dist/esm/write-entry.js.map +1 -0
- package/node_modules/tar/package.json +298 -0
- package/node_modules/which/LICENSE +15 -0
- package/node_modules/which/README.md +54 -0
- package/node_modules/which/bin/node-which +52 -0
- package/node_modules/which/package.json +43 -0
- package/node_modules/which/which.js +125 -0
- package/node_modules/yallist/LICENSE.md +63 -0
- package/node_modules/yallist/README.md +205 -0
- package/node_modules/yallist/dist/commonjs/index.d.ts +39 -0
- package/node_modules/yallist/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/yallist/dist/commonjs/index.js +384 -0
- package/node_modules/yallist/dist/commonjs/index.js.map +1 -0
- package/node_modules/yallist/dist/commonjs/package.json +3 -0
- package/node_modules/yallist/dist/esm/index.d.ts +39 -0
- package/node_modules/yallist/dist/esm/index.d.ts.map +1 -0
- package/node_modules/yallist/dist/esm/index.js +379 -0
- package/node_modules/yallist/dist/esm/index.js.map +1 -0
- package/node_modules/yallist/dist/esm/package.json +3 -0
- package/node_modules/yallist/package.json +68 -0
- package/node_modules/yaml/LICENSE +13 -0
- package/node_modules/yaml/README.md +172 -0
- package/node_modules/yaml/bin.mjs +11 -0
- package/node_modules/yaml/browser/dist/compose/compose-collection.js +88 -0
- package/node_modules/yaml/browser/dist/compose/compose-doc.js +43 -0
- package/node_modules/yaml/browser/dist/compose/compose-node.js +109 -0
- package/node_modules/yaml/browser/dist/compose/compose-scalar.js +86 -0
- package/node_modules/yaml/browser/dist/compose/composer.js +219 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-map.js +115 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +198 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +49 -0
- package/node_modules/yaml/browser/dist/compose/resolve-end.js +37 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +207 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +226 -0
- package/node_modules/yaml/browser/dist/compose/resolve-props.js +146 -0
- package/node_modules/yaml/browser/dist/compose/util-contains-newline.js +34 -0
- package/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +26 -0
- package/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +15 -0
- package/node_modules/yaml/browser/dist/compose/util-map-includes.js +13 -0
- package/node_modules/yaml/browser/dist/doc/Document.js +335 -0
- package/node_modules/yaml/browser/dist/doc/anchors.js +71 -0
- package/node_modules/yaml/browser/dist/doc/applyReviver.js +55 -0
- package/node_modules/yaml/browser/dist/doc/createNode.js +88 -0
- package/node_modules/yaml/browser/dist/doc/directives.js +176 -0
- package/node_modules/yaml/browser/dist/errors.js +57 -0
- package/node_modules/yaml/browser/dist/index.js +17 -0
- package/node_modules/yaml/browser/dist/log.js +11 -0
- package/node_modules/yaml/browser/dist/nodes/Alias.js +118 -0
- package/node_modules/yaml/browser/dist/nodes/Collection.js +147 -0
- package/node_modules/yaml/browser/dist/nodes/Node.js +38 -0
- package/node_modules/yaml/browser/dist/nodes/Pair.js +36 -0
- package/node_modules/yaml/browser/dist/nodes/Scalar.js +24 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLMap.js +144 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +113 -0
- package/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +63 -0
- package/node_modules/yaml/browser/dist/nodes/identity.js +36 -0
- package/node_modules/yaml/browser/dist/nodes/toJS.js +37 -0
- package/node_modules/yaml/browser/dist/parse/cst-scalar.js +214 -0
- package/node_modules/yaml/browser/dist/parse/cst-stringify.js +61 -0
- package/node_modules/yaml/browser/dist/parse/cst-visit.js +97 -0
- package/node_modules/yaml/browser/dist/parse/cst.js +98 -0
- package/node_modules/yaml/browser/dist/parse/lexer.js +721 -0
- package/node_modules/yaml/browser/dist/parse/line-counter.js +39 -0
- package/node_modules/yaml/browser/dist/parse/parser.js +975 -0
- package/node_modules/yaml/browser/dist/public-api.js +102 -0
- package/node_modules/yaml/browser/dist/schema/Schema.js +37 -0
- package/node_modules/yaml/browser/dist/schema/common/map.js +17 -0
- package/node_modules/yaml/browser/dist/schema/common/null.js +15 -0
- package/node_modules/yaml/browser/dist/schema/common/seq.js +17 -0
- package/node_modules/yaml/browser/dist/schema/common/string.js +14 -0
- package/node_modules/yaml/browser/dist/schema/core/bool.js +19 -0
- package/node_modules/yaml/browser/dist/schema/core/float.js +43 -0
- package/node_modules/yaml/browser/dist/schema/core/int.js +38 -0
- package/node_modules/yaml/browser/dist/schema/core/schema.js +23 -0
- package/node_modules/yaml/browser/dist/schema/json/schema.js +62 -0
- package/node_modules/yaml/browser/dist/schema/tags.js +96 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +58 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +26 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +46 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +71 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +67 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +74 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +78 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +39 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +93 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +101 -0
- package/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +146 -0
- package/node_modules/yaml/browser/dist/stringify/stringify.js +129 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +153 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyComment.js +20 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +85 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +25 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyPair.js +150 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyString.js +336 -0
- package/node_modules/yaml/browser/dist/util.js +11 -0
- package/node_modules/yaml/browser/dist/visit.js +233 -0
- package/node_modules/yaml/browser/index.js +5 -0
- package/node_modules/yaml/browser/package.json +3 -0
- package/node_modules/yaml/dist/cli.d.ts +8 -0
- package/node_modules/yaml/dist/cli.mjs +201 -0
- package/node_modules/yaml/dist/compose/compose-collection.d.ts +11 -0
- package/node_modules/yaml/dist/compose/compose-collection.js +90 -0
- package/node_modules/yaml/dist/compose/compose-doc.d.ts +7 -0
- package/node_modules/yaml/dist/compose/compose-doc.js +45 -0
- package/node_modules/yaml/dist/compose/compose-node.d.ts +29 -0
- package/node_modules/yaml/dist/compose/compose-node.js +112 -0
- package/node_modules/yaml/dist/compose/compose-scalar.d.ts +5 -0
- package/node_modules/yaml/dist/compose/compose-scalar.js +88 -0
- package/node_modules/yaml/dist/compose/composer.d.ts +63 -0
- package/node_modules/yaml/dist/compose/composer.js +224 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.js +117 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +11 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.js +200 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.js +51 -0
- package/node_modules/yaml/dist/compose/resolve-end.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-end.js +39 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.js +209 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +10 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +228 -0
- package/node_modules/yaml/dist/compose/resolve-props.d.ts +23 -0
- package/node_modules/yaml/dist/compose/resolve-props.js +148 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.js +28 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +3 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
- package/node_modules/yaml/dist/compose/util-map-includes.d.ts +4 -0
- package/node_modules/yaml/dist/compose/util-map-includes.js +15 -0
- package/node_modules/yaml/dist/doc/Document.d.ts +141 -0
- package/node_modules/yaml/dist/doc/Document.js +337 -0
- package/node_modules/yaml/dist/doc/anchors.d.ts +24 -0
- package/node_modules/yaml/dist/doc/anchors.js +76 -0
- package/node_modules/yaml/dist/doc/applyReviver.d.ts +9 -0
- package/node_modules/yaml/dist/doc/applyReviver.js +57 -0
- package/node_modules/yaml/dist/doc/createNode.d.ts +17 -0
- package/node_modules/yaml/dist/doc/createNode.js +90 -0
- package/node_modules/yaml/dist/doc/directives.d.ts +49 -0
- package/node_modules/yaml/dist/doc/directives.js +178 -0
- package/node_modules/yaml/dist/errors.d.ts +21 -0
- package/node_modules/yaml/dist/errors.js +62 -0
- package/node_modules/yaml/dist/index.d.ts +25 -0
- package/node_modules/yaml/dist/index.js +50 -0
- package/node_modules/yaml/dist/log.d.ts +3 -0
- package/node_modules/yaml/dist/log.js +19 -0
- package/node_modules/yaml/dist/nodes/Alias.d.ts +29 -0
- package/node_modules/yaml/dist/nodes/Alias.js +120 -0
- package/node_modules/yaml/dist/nodes/Collection.d.ts +73 -0
- package/node_modules/yaml/dist/nodes/Collection.js +151 -0
- package/node_modules/yaml/dist/nodes/Node.d.ts +53 -0
- package/node_modules/yaml/dist/nodes/Node.js +40 -0
- package/node_modules/yaml/dist/nodes/Pair.d.ts +22 -0
- package/node_modules/yaml/dist/nodes/Pair.js +39 -0
- package/node_modules/yaml/dist/nodes/Scalar.d.ts +47 -0
- package/node_modules/yaml/dist/nodes/Scalar.js +27 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.d.ts +53 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.js +147 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +60 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.js +115 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +4 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.js +65 -0
- package/node_modules/yaml/dist/nodes/identity.d.ts +23 -0
- package/node_modules/yaml/dist/nodes/identity.js +53 -0
- package/node_modules/yaml/dist/nodes/toJS.d.ts +29 -0
- package/node_modules/yaml/dist/nodes/toJS.js +39 -0
- package/node_modules/yaml/dist/options.d.ts +350 -0
- package/node_modules/yaml/dist/parse/cst-scalar.d.ts +64 -0
- package/node_modules/yaml/dist/parse/cst-scalar.js +218 -0
- package/node_modules/yaml/dist/parse/cst-stringify.d.ts +8 -0
- package/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
- package/node_modules/yaml/dist/parse/cst-visit.d.ts +39 -0
- package/node_modules/yaml/dist/parse/cst-visit.js +99 -0
- package/node_modules/yaml/dist/parse/cst.d.ts +109 -0
- package/node_modules/yaml/dist/parse/cst.js +112 -0
- package/node_modules/yaml/dist/parse/lexer.d.ts +87 -0
- package/node_modules/yaml/dist/parse/lexer.js +723 -0
- package/node_modules/yaml/dist/parse/line-counter.d.ts +22 -0
- package/node_modules/yaml/dist/parse/line-counter.js +41 -0
- package/node_modules/yaml/dist/parse/parser.d.ts +84 -0
- package/node_modules/yaml/dist/parse/parser.js +980 -0
- package/node_modules/yaml/dist/public-api.d.ts +44 -0
- package/node_modules/yaml/dist/public-api.js +107 -0
- package/node_modules/yaml/dist/schema/Schema.d.ts +17 -0
- package/node_modules/yaml/dist/schema/Schema.js +39 -0
- package/node_modules/yaml/dist/schema/common/map.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/map.js +19 -0
- package/node_modules/yaml/dist/schema/common/null.d.ts +4 -0
- package/node_modules/yaml/dist/schema/common/null.js +17 -0
- package/node_modules/yaml/dist/schema/common/seq.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/seq.js +19 -0
- package/node_modules/yaml/dist/schema/common/string.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/string.js +16 -0
- package/node_modules/yaml/dist/schema/core/bool.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/bool.js +21 -0
- package/node_modules/yaml/dist/schema/core/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/float.js +47 -0
- package/node_modules/yaml/dist/schema/core/int.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/int.js +42 -0
- package/node_modules/yaml/dist/schema/core/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/core/schema.js +25 -0
- package/node_modules/yaml/dist/schema/json/schema.d.ts +2 -0
- package/node_modules/yaml/dist/schema/json/schema.js +64 -0
- package/node_modules/yaml/dist/schema/json-schema.d.ts +69 -0
- package/node_modules/yaml/dist/schema/tags.d.ts +48 -0
- package/node_modules/yaml/dist/schema/tags.js +99 -0
- package/node_modules/yaml/dist/schema/types.d.ts +92 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +2 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.js +70 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +7 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +5 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +9 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.js +71 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +22 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.js +77 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +10 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.js +41 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +28 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.js +96 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +6 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +34 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.js +151 -0
- package/node_modules/yaml/dist/stringify/stringify.d.ts +21 -0
- package/node_modules/yaml/dist/stringify/stringify.js +132 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +17 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.js +155 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.d.ts +10 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.js +24 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +4 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.js +87 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +2 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.js +27 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.d.ts +3 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.js +152 -0
- package/node_modules/yaml/dist/stringify/stringifyString.d.ts +9 -0
- package/node_modules/yaml/dist/stringify/stringifyString.js +338 -0
- package/node_modules/yaml/dist/test-events.d.ts +4 -0
- package/node_modules/yaml/dist/test-events.js +134 -0
- package/node_modules/yaml/dist/util.d.ts +16 -0
- package/node_modules/yaml/dist/util.js +28 -0
- package/node_modules/yaml/dist/visit.d.ts +102 -0
- package/node_modules/yaml/dist/visit.js +236 -0
- package/node_modules/yaml/package.json +97 -0
- package/node_modules/yaml/util.js +2 -0
- package/package.json +44 -4
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# OpenSpec 插件:change 标签、规格校验与 change 流程的阶段控制。
|
|
2
|
+
plugins:
|
|
3
|
+
- id: openspec/planner
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
description: 关联改动所属的 OpenSpec change
|
|
6
|
+
kind: planner
|
|
7
|
+
command: [node, ./dist/plugins/planner.js]
|
|
8
|
+
timeout: 30
|
|
9
|
+
- id: openspec/validate
|
|
10
|
+
version: 0.1.0
|
|
11
|
+
description: OpenSpec 规格严格校验
|
|
12
|
+
kind: check
|
|
13
|
+
command: [node, ./dist/plugins/validate.js]
|
|
14
|
+
timeout: 600
|
|
15
|
+
- id: openspec/change-tasks
|
|
16
|
+
version: 0.1.0
|
|
17
|
+
description: change 的任务完成情况与归档条件
|
|
18
|
+
kind: check
|
|
19
|
+
command: [node, ./dist/plugins/change-tasks.js]
|
|
20
|
+
timeout: 120
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# @sumi/plugins-precedent
|
|
2
|
+
|
|
3
|
+
判例插件:判例 = 一句约束 + 执行者 + 来源。规划器把触发条件命中改动的判例接线成执行义务,自检保证登记了就可执行,归档时收集判例候选。
|
|
4
|
+
|
|
5
|
+
依赖 `@sumi/plugins-governance`(人工确认与编辑窗口)。
|
|
6
|
+
|
|
7
|
+
## 插件
|
|
8
|
+
|
|
9
|
+
| id | kind | 作用 | 触发条件 / 档位 | `with` 配置项 |
|
|
10
|
+
| --------------- | ------- | ------------------------------------------------------ | --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
11
|
+
| `prec/planner` | planner | 校验 active 判例的引用,把命中改动的判例接线成执行义务 | 每次运行;按判例的 `triggers` 匹配改动文件 | `test`:测试步骤 id(默认取 `use: core/test-affected` 的步骤);`lint`:lint 步骤 id(默认取 `use: core/lint` 的步骤) |
|
|
12
|
+
| `prec/checker` | check | 运行判例目录中的检查器并透传结果 | 由 `prec/planner` 为 checker 类判例插入,一般不手工写进流程 | `precedent`:判例 id(规划器自动填写) |
|
|
13
|
+
| `prec/selftest` | check | 判例自检:登记表规则、陈述、来源与执行者可执行性 | 只检查改动涉及的 active 判例;全量运行(`all`)时检查全部 | 无 |
|
|
14
|
+
| `prec/harvest` | check | change 归档时收集判例候选并要求逐条处置 | 只在 `stage=archive` 标签下工作,其他阶段直接通过;需要 `change` 标签 | `ignore`:不从哪些插件的 finding 收集候选(插件 id 前缀列表,默认 `prec/`、`openspec/`、`gov/`、`review/`) |
|
|
15
|
+
|
|
16
|
+
## 命令与指令
|
|
17
|
+
|
|
18
|
+
| 命令 / 主题 | 作用 |
|
|
19
|
+
| ----------------------------------- | --------------------------------------------------- |
|
|
20
|
+
| `sumi promote <id> --type <类型> …` | 生成判例骨架并登记(参数见下文) |
|
|
21
|
+
| `sumi instructions distill` | 输出"沉淀判例"操作指令(`instructions/distill.md`) |
|
|
22
|
+
| `context-precedents` | 约束查询命令,供 `sumi context` 调用(见下文) |
|
|
23
|
+
|
|
24
|
+
## 判例文件结构
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
precedents/
|
|
28
|
+
registry.yaml
|
|
29
|
+
<判例 id>/
|
|
30
|
+
precedent.yaml
|
|
31
|
+
check.mjs # checker 类:检查器(可用 enforcer.command 指定其他命令)
|
|
32
|
+
fixtures/
|
|
33
|
+
violating/ # checker、lint-rule 类:违例样例
|
|
34
|
+
compliant/ # checker 类:合规样例
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`precedent.yaml`:
|
|
38
|
+
|
|
39
|
+
```yaml
|
|
40
|
+
id: no-env-in-business
|
|
41
|
+
statement: business 区不得直接读取 process.env,必须经配置模块 # 不超过 120 字符
|
|
42
|
+
severity: error # error | warning
|
|
43
|
+
triggers: ['src/**'] # 路径 glob
|
|
44
|
+
source: # spec 与 adr 至少一个
|
|
45
|
+
spec: billing#金额精度 # <能力>#<需求名>
|
|
46
|
+
change: add-billing # 可选:需求来自进行中的 change
|
|
47
|
+
adr: control/decisions/001-config.md
|
|
48
|
+
findings: ['<运行>#<步骤>/<规则>'] # 可选
|
|
49
|
+
enforcer:
|
|
50
|
+
type: checker # checker | test | lint-rule | rubric-item
|
|
51
|
+
command: ['node', './check.mjs'] # checker:默认 node ./check.mjs,./ 开头的参数相对判例目录
|
|
52
|
+
timeout: 60 # checker:秒,默认 60
|
|
53
|
+
ref: ... # test:<文件>#<测试名>;lint-rule:eslint 规则名;rubric-item:<准则>#<条目>
|
|
54
|
+
sha256: ... # test:引用的测试文件的 sha256(按 LF 行尾计算)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`registry.yaml`:
|
|
58
|
+
|
|
59
|
+
```yaml
|
|
60
|
+
precedents:
|
|
61
|
+
- { id: no-env-in-business, status: active }
|
|
62
|
+
- { id: old-rule, status: retired, reason: 业务下线 }
|
|
63
|
+
- { id: older-rule, status: superseded, supersededBy: no-env-in-business }
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
需求来源的解析:带 `change` 且该 change 仍在 `openspec/changes/` 中进行时,在正式规格加该 change 的 delta 规格中查找(delta 中 `REMOVED` 视为不存在);否则只在 `openspec/specs/<能力>/spec.md` 中查找。
|
|
67
|
+
|
|
68
|
+
## 执行者类型
|
|
69
|
+
|
|
70
|
+
| 类型 | 规划器的接线方式 | 自检如何证明可执行 |
|
|
71
|
+
| ------------- | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
|
|
72
|
+
| `checker` | 插入一个 `prec/checker` 步骤;流程中有 `core/ratchet` 步骤时排在它之前 | 在 `fixtures/violating` 上必须 `fail`,在 `fixtures/compliant` 上必须 `pass`,崩溃或输出不合法都算失败 |
|
|
73
|
+
| `test` | 向测试步骤注入测试文件与 `test` 义务(目标为文件与测试名) | 用 vitest 实际运行该测试并通过;测试文件的 sha256 与 `enforcer.sha256` 不一致时要求人确认后更新 |
|
|
74
|
+
| `lint-rule` | 向 lint 步骤注入命中的文件 | 用 eslint 检查违例样例,必须以 error 级报出 `ref` 指定的规则 |
|
|
75
|
+
| `rubric-item` | 向使用该准则(`with.rubric`)的 `review/rubric` 步骤注入 `rubric-item` 义务与命中的文件 | 只校验引用的准则条目存在 |
|
|
76
|
+
|
|
77
|
+
检查器遵循插件协议:标准输入读上下文 JSON,标准输出写结果 JSON,可以用任意语言实现。`prec/checker` 透传其结果,摘要前加判例陈述,finding 规则名改为 `prec/<id>:<规则>`。
|
|
78
|
+
|
|
79
|
+
## 规划器
|
|
80
|
+
|
|
81
|
+
每次运行,`prec/planner` 对 registry 中每个 active 判例:
|
|
82
|
+
|
|
83
|
+
1. 校验引用:缺少 `precedent.yaml`、缺少来源、来源需求或决策记录不存在、测试文件不存在、评审条目不存在,都报为 `broken-reference` finding,步骤 `fail`。
|
|
84
|
+
2. 用 `triggers` 匹配改动文件;没有 `triggers` 或没有命中的判例不接线。
|
|
85
|
+
3. 按执行者类型接线(见上表)。`severity: error` 的义务为必需,`warning` 为非必需。
|
|
86
|
+
4. 所需步骤不存在时:必需(error)义务报 `unwired` 并使步骤 `blocked`;非必需(warning)义务报 error 级的 `broken-reference`,步骤结果为 `fail`。`error` 级的 `rubric-item` 判例要求对应评审步骤为 `mode: human-confirmed`,否则 `blocked`。
|
|
87
|
+
|
|
88
|
+
只有步骤为 `pass` 时才输出接线计划。仓库中没有 `precedents/` 目录时直接通过。
|
|
89
|
+
|
|
90
|
+
## 自检(`prec/selftest`)
|
|
91
|
+
|
|
92
|
+
登记表规则(每次运行都检查):
|
|
93
|
+
|
|
94
|
+
- 判例目录都已登记;登记的非 retired 判例都有目录;
|
|
95
|
+
- `retired` 必须写 `reason`;`superseded` 的替代链不能悬空、成环或终止于已退役的判例;
|
|
96
|
+
- 与比较基准相比,登记条目只增不删(删除时 `next` 提示改为 retired 或 superseded),也不能从非 active 恢复为 active。
|
|
97
|
+
|
|
98
|
+
判例内容(只检查改动涉及的 active 判例:判例目录、测试文件或来源文件有改动;全量运行时检查全部):
|
|
99
|
+
|
|
100
|
+
- 陈述已补全(不含 `TODO`)且不超过 120 字符;
|
|
101
|
+
- 来源与执行者引用存在;
|
|
102
|
+
- 执行者确实可执行(见执行者类型表);执行者类型有效。
|
|
103
|
+
|
|
104
|
+
## 候选收集与提升
|
|
105
|
+
|
|
106
|
+
`prec/harvest` 在 change 流程的归档阶段运行:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
sumi run change --tier full --label change=<名称> --label stage=archive
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
候选来源(候选 id 前缀):
|
|
113
|
+
|
|
114
|
+
- `f-`:该 change 的工作区运行记录(`.sumi/runs/*/result.json`,标签 `change=<名称>`)中出现过、之后经同一步骤复验确认消失的 error 级 finding(`ignore` 中的插件除外);
|
|
115
|
+
- `r-`:该 change 的 delta 规格中 `ADDED` 或 `MODIFIED` 的需求;
|
|
116
|
+
- `a-`:相对基准新增的 `control/decisions/` 决策记录。
|
|
117
|
+
|
|
118
|
+
候选写入 `openspec/changes/<名称>/precedent-candidates.yaml`:
|
|
119
|
+
|
|
120
|
+
```yaml
|
|
121
|
+
candidates:
|
|
122
|
+
- id: r-1a2b3c4d
|
|
123
|
+
summary: 新增或修改的需求:billing#金额精度
|
|
124
|
+
source: { spec: billing#金额精度, change: add-billing }
|
|
125
|
+
decision: promoted # promoted | rejected,未处置时不写
|
|
126
|
+
precedent: money-in-cents # promoted 时指向 active 判例
|
|
127
|
+
reason: ... # rejected 时必填
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
未处置的候选、指向非 active 判例的 `promoted`、没有 `reason` 的 `rejected` 都是 error 级 finding。有未处置候选且没有开启编辑窗口时,`next` 提示请人运行 `sumi unlock`。没有候选时不发起确认;有候选且全部处置后,发起 `precedent-candidates` 确认请求(绑定 change 与候选文件摘要),人运行 `sumi approve <请求 id>` 后步骤才通过。
|
|
131
|
+
|
|
132
|
+
### `sumi promote`
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
sumi promote <id> --type <checker|test|lint-rule|rubric-item>
|
|
136
|
+
[--candidate <候选 id> --change <名称>] [--spec <能力#需求>] [--adr <路径>] [--from <运行#步骤/finding>]
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
| 参数 | 作用 |
|
|
140
|
+
| ------------- | ------------------------------------------------------------------ |
|
|
141
|
+
| `<id>` | 判例 id,kebab-case;已存在时报错 |
|
|
142
|
+
| `--type` | 执行者类型,默认 `test` |
|
|
143
|
+
| `--candidate` | 从候选复制来源,并把候选标记为 `promoted`;必须同时给出 `--change` |
|
|
144
|
+
| `--change` | 候选所在的 change;与 `--spec` 同用时写入 `source.change` |
|
|
145
|
+
| `--spec` | 来源需求 |
|
|
146
|
+
| `--adr` | 来源决策记录 |
|
|
147
|
+
| `--from` | 来源 finding,写入 `source.findings` |
|
|
148
|
+
|
|
149
|
+
命令生成 `precedents/<id>/precedent.yaml` 骨架(陈述、触发条件为 `TODO`,`severity: error`;test、lint-rule、rubric-item 类的执行者引用为 `TODO`,checker 类为 `command: [node, ./check.mjs]`)并在 registry 中登记为 active。checker 与 lint-rule 类生成 `fixtures/violating/`、`fixtures/compliant/`,checker 类另生成 `check.mjs` 模板。骨架补全前必定无法通过自检。
|
|
150
|
+
|
|
151
|
+
### `sumi instructions distill`
|
|
152
|
+
|
|
153
|
+
输出沉淀判例的操作步骤:运行归档阶段、逐条 `sumi promote` 或标记 `rejected`、重跑直到自检通过且候选全部处置、请人 `sumi unlock` 与 `sumi approve`。
|
|
154
|
+
|
|
155
|
+
## 约束查询(`context-precedents`)
|
|
156
|
+
|
|
157
|
+
`sumi context <路径...>` 调用该命令,列出触发条件命中给定路径的 active 判例(没有 `triggers` 的判例对所有路径生效)。每个条目包含:
|
|
158
|
+
|
|
159
|
+
- `ref`:`prec:<id>`;
|
|
160
|
+
- `text`:判例陈述,附"违反即拦截"(error)或"告警"(warning);
|
|
161
|
+
- `source`:决策记录路径,或 `openspec <能力#需求>`;
|
|
162
|
+
- `global`:没有 `triggers` 时为真。
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface Candidate {
|
|
2
|
+
id: string;
|
|
3
|
+
summary: string;
|
|
4
|
+
source: {
|
|
5
|
+
finding?: string;
|
|
6
|
+
spec?: string;
|
|
7
|
+
change?: string;
|
|
8
|
+
adr?: string;
|
|
9
|
+
};
|
|
10
|
+
decision?: 'promoted' | 'rejected';
|
|
11
|
+
precedent?: string;
|
|
12
|
+
reason?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function candidatesPath(change: string): string;
|
|
15
|
+
export declare function readCandidates(root: string, change: string): Candidate[];
|
|
16
|
+
export declare function writeCandidates(root: string, change: string, candidates: Candidate[]): void;
|
|
17
|
+
export declare const shortHash: (text: string) => string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
3
|
+
import { dirname, join } from 'node:path';
|
|
4
|
+
import { parse, stringify } from 'yaml';
|
|
5
|
+
export function candidatesPath(change) {
|
|
6
|
+
return `openspec/changes/${change}/precedent-candidates.yaml`;
|
|
7
|
+
}
|
|
8
|
+
export function readCandidates(root, change) {
|
|
9
|
+
const path = join(root, candidatesPath(change));
|
|
10
|
+
return existsSync(path) ? (parse(readFileSync(path, 'utf8'))?.candidates ?? []) : [];
|
|
11
|
+
}
|
|
12
|
+
export function writeCandidates(root, change, candidates) {
|
|
13
|
+
const path = join(root, candidatesPath(change));
|
|
14
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
15
|
+
writeFileSync(path, stringify({ candidates }));
|
|
16
|
+
}
|
|
17
|
+
export const shortHash = (text) => createHash('sha1').update(text).digest('hex').slice(0, 8);
|
|
18
|
+
//# sourceMappingURL=candidates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"candidates.js","sourceRoot":"","sources":["../src/candidates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAA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, readPrecedent, readRegistry } from '../model.js';
|
|
4
|
+
/** 约束查询:触发条件命中给定路径的 active 判例(没有触发条件的判例对所有路径生效)。 */
|
|
5
|
+
const { repoRoot, paths } = await readContextInput();
|
|
6
|
+
const items = [];
|
|
7
|
+
for (const id of activeIds(readRegistry(repoRoot))) {
|
|
8
|
+
const p = readPrecedent(repoRoot, id);
|
|
9
|
+
if (!p)
|
|
10
|
+
continue;
|
|
11
|
+
const hit = p.triggers?.length ? paths.some((f) => picomatch(p.triggers, { dot: true })(f)) : true;
|
|
12
|
+
if (!hit)
|
|
13
|
+
continue;
|
|
14
|
+
const source = p.source.adr ?? (p.source.spec ? `openspec ${p.source.spec}` : undefined);
|
|
15
|
+
items.push({
|
|
16
|
+
ref: `prec:${id}`,
|
|
17
|
+
text: `${p.statement}(${p.severity === 'error' ? '违反即拦截' : '告警'})`,
|
|
18
|
+
...(source ? { source } : {}),
|
|
19
|
+
global: !p.triggers?.length,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
process.stdout.write(JSON.stringify({ items }));
|
|
23
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/commands/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAsB,MAAM,kBAAkB,CAAC;AACxE,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAErE,oDAAoD;AACpD,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,MAAM,gBAAgB,EAAE,CAAC;AACrD,MAAM,KAAK,GAA2B,EAAE,CAAC;AACzC,KAAK,MAAM,EAAE,IAAI,SAAS,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;IACnD,MAAM,CAAC,GAAG,aAAa,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACtC,IAAI,CAAC,CAAC;QAAE,SAAS;IACjB,MAAM,GAAG,GAAG,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,QAAS,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACpG,IAAI,CAAC,GAAG;QAAE,SAAS;IACnB,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACzF,KAAK,CAAC,IAAI,CAAC;QACT,GAAG,EAAE,QAAQ,EAAE,EAAE;QACjB,IAAI,EAAE,GAAG,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,GAAG;QAClE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7B,MAAM,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,MAAM;KAC5B,CAAC,CAAC;AACL,CAAC;AACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAA0B,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { existsSync, mkdirSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { stringify } from 'yaml';
|
|
4
|
+
import { readCandidates, writeCandidates } from '../candidates.js';
|
|
5
|
+
import { readRegistry, REGISTRY_FILE } from '../model.js';
|
|
6
|
+
/**
|
|
7
|
+
* sumi promote <id> --type <checker|test|lint-rule|rubric-item>
|
|
8
|
+
* [--candidate <候选 id> --change <名称>] [--spec <cap#需求>] [--adr <路径>] [--from <运行#步骤/finding>]
|
|
9
|
+
* 生成判例骨架并登记;骨架在补全前必定无法通过判例自检。
|
|
10
|
+
*/
|
|
11
|
+
const root = process.env.SUMI_ROOT ?? process.cwd();
|
|
12
|
+
const args = process.argv.slice(2);
|
|
13
|
+
const flag = (name) => {
|
|
14
|
+
const i = args.indexOf(`--${name}`);
|
|
15
|
+
return i >= 0 ? args[i + 1] : undefined;
|
|
16
|
+
};
|
|
17
|
+
const id = args[0];
|
|
18
|
+
const type = (flag('type') ?? 'test');
|
|
19
|
+
function fail(message) {
|
|
20
|
+
process.stderr.write(`${message}\n`);
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
if (!id || id.startsWith('--') || !/^[a-z0-9][a-z0-9-]*$/.test(id))
|
|
24
|
+
fail('用法:sumi promote <kebab-case id> --type <checker|test|lint-rule|rubric-item> …');
|
|
25
|
+
if (!['checker', 'test', 'lint-rule', 'rubric-item'].includes(type))
|
|
26
|
+
fail(`未知的执行者类型 ${type}`);
|
|
27
|
+
const dir = join(root, 'precedents', id);
|
|
28
|
+
if (existsSync(dir))
|
|
29
|
+
fail(`判例 ${id} 已存在`);
|
|
30
|
+
const source = {};
|
|
31
|
+
const change = flag('change');
|
|
32
|
+
const candidateId = flag('candidate');
|
|
33
|
+
if (candidateId) {
|
|
34
|
+
if (!change)
|
|
35
|
+
fail('使用 --candidate 时必须同时给出 --change');
|
|
36
|
+
const candidates = readCandidates(root, change);
|
|
37
|
+
const candidate = candidates.find((c) => c.id === candidateId);
|
|
38
|
+
if (!candidate)
|
|
39
|
+
fail(`change ${change} 中没有候选 ${candidateId}`);
|
|
40
|
+
Object.assign(source, candidate.source);
|
|
41
|
+
candidate.decision = 'promoted';
|
|
42
|
+
candidate.precedent = id;
|
|
43
|
+
writeCandidates(root, change, candidates);
|
|
44
|
+
}
|
|
45
|
+
if (flag('spec'))
|
|
46
|
+
Object.assign(source, { spec: flag('spec'), ...(change ? { change } : {}) });
|
|
47
|
+
if (flag('adr'))
|
|
48
|
+
source.adr = flag('adr');
|
|
49
|
+
if (flag('from'))
|
|
50
|
+
source.findings = [flag('from')];
|
|
51
|
+
const enforcerRef = {
|
|
52
|
+
checker: '',
|
|
53
|
+
test: 'TODO:<测试文件>#<测试名>',
|
|
54
|
+
'lint-rule': 'TODO:<eslint 规则名>',
|
|
55
|
+
'rubric-item': 'TODO:<准则 id>#<条目 id>',
|
|
56
|
+
};
|
|
57
|
+
const precedent = {
|
|
58
|
+
id,
|
|
59
|
+
statement: 'TODO:一句话写出必须成立什么',
|
|
60
|
+
severity: 'error',
|
|
61
|
+
triggers: ['TODO:路径 glob'],
|
|
62
|
+
source,
|
|
63
|
+
enforcer: type === 'checker' ? { type, command: ['node', './check.mjs'] } : { type, ref: enforcerRef[type] },
|
|
64
|
+
};
|
|
65
|
+
mkdirSync(dir, { recursive: true });
|
|
66
|
+
writeFileSync(join(dir, 'precedent.yaml'), stringify(precedent));
|
|
67
|
+
if (type === 'checker' || type === 'lint-rule') {
|
|
68
|
+
for (const kind of ['violating', 'compliant']) {
|
|
69
|
+
mkdirSync(join(dir, 'fixtures', kind), { recursive: true });
|
|
70
|
+
writeFileSync(join(dir, 'fixtures', kind, '.gitkeep'), '');
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if (type === 'checker') {
|
|
74
|
+
writeFileSync(join(dir, 'check.mjs'), `// 判例 ${id} 的检查器:遵循插件协议,从标准输入读取上下文,输出结果。
|
|
75
|
+
let input = '';
|
|
76
|
+
for await (const chunk of process.stdin) input += chunk;
|
|
77
|
+
const ctx = JSON.parse(input);
|
|
78
|
+
const findings = []; // TODO:检查 ctx.files,违例时 push({ id, rule, severity: 'error', message, file, line })
|
|
79
|
+
const status = findings.length ? 'fail' : 'pass';
|
|
80
|
+
process.stdout.write(JSON.stringify({ status, summary: status, findings, checked: ctx.files, evidence: [] }));
|
|
81
|
+
process.exitCode = status === 'pass' ? 0 : 1;
|
|
82
|
+
`);
|
|
83
|
+
}
|
|
84
|
+
const registry = readRegistry(root);
|
|
85
|
+
registry.precedents.push({ id, status: 'active' });
|
|
86
|
+
mkdirSync(join(root, 'precedents'), { recursive: true });
|
|
87
|
+
writeFileSync(join(root, REGISTRY_FILE), stringify(registry));
|
|
88
|
+
process.stdout.write(`已生成判例骨架 precedents/${id}/,补全约束陈述、触发条件与执行者后运行 sumi run check\n`);
|
|
89
|
+
//# sourceMappingURL=promote.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promote.js","sourceRoot":"","sources":["../../src/commands/promote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAqC,MAAM,aAAa,CAAC;AAE7F;;;;GAIG;AACH,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;AACpD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACnC,MAAM,IAAI,GAAG,CAAC,IAAY,EAAE,EAAE;IAC5B,MAAM,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;IACpC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;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,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export declare const PRECEDENT_DIR = "precedents";
|
|
2
|
+
export declare const REGISTRY_FILE = "precedents/registry.yaml";
|
|
3
|
+
export type EnforcerType = 'checker' | 'test' | 'lint-rule' | 'rubric-item';
|
|
4
|
+
export interface Precedent {
|
|
5
|
+
id: string;
|
|
6
|
+
statement: string;
|
|
7
|
+
severity: 'error' | 'warning';
|
|
8
|
+
triggers?: string[];
|
|
9
|
+
source: {
|
|
10
|
+
spec?: string;
|
|
11
|
+
change?: string;
|
|
12
|
+
adr?: string;
|
|
13
|
+
findings?: string[];
|
|
14
|
+
};
|
|
15
|
+
enforcer: {
|
|
16
|
+
type: EnforcerType;
|
|
17
|
+
ref?: string;
|
|
18
|
+
command?: string[];
|
|
19
|
+
timeout?: number;
|
|
20
|
+
sha256?: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export interface RegistryEntry {
|
|
24
|
+
id: string;
|
|
25
|
+
status: 'active' | 'retired' | 'superseded';
|
|
26
|
+
reason?: string;
|
|
27
|
+
supersededBy?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface Registry {
|
|
30
|
+
precedents: RegistryEntry[];
|
|
31
|
+
}
|
|
32
|
+
export declare function readRegistryText(text: string | null): Registry;
|
|
33
|
+
export declare function readRegistry(root: string): Registry;
|
|
34
|
+
export declare function gitShow(root: string, ref: string | null, path: string): string | null;
|
|
35
|
+
export declare function precedentDirs(root: string): string[];
|
|
36
|
+
export declare function readPrecedent(root: string, id: string): Precedent | null;
|
|
37
|
+
export declare function activeIds(registry: Registry): string[];
|
|
38
|
+
/** test 执行者的引用:`<文件>#<测试名>`。 */
|
|
39
|
+
export declare function splitRef(ref: string | undefined): {
|
|
40
|
+
file: string;
|
|
41
|
+
name: string;
|
|
42
|
+
};
|
|
43
|
+
type Section = 'ADDED' | 'MODIFIED' | 'REMOVED' | 'RENAMED' | 'NONE';
|
|
44
|
+
/** 解析 spec 文件中各节的需求名称。 */
|
|
45
|
+
export declare function requirementsIn(text: string): Map<string, Section>;
|
|
46
|
+
export declare function changeInProgress(root: string, change: string | undefined): boolean;
|
|
47
|
+
/** 来源中涉及的文件,用于判断自检范围。 */
|
|
48
|
+
export declare function sourceFiles(p: Precedent): string[];
|
|
49
|
+
/**
|
|
50
|
+
* 需求来源解析:附 change 且该 change 进行中时,在"正式规格 + 该 change 的 delta"中解析
|
|
51
|
+
* (REMOVED 视为不存在);否则只在正式规格中解析。不会去其他 change 中查找。
|
|
52
|
+
*/
|
|
53
|
+
export declare function resolveSpec(root: string, ref: string, change?: string): boolean;
|
|
54
|
+
/** 校验来源与执行者引用是否存在,返回问题列表。 */
|
|
55
|
+
export declare function referenceProblems(root: string, p: Precedent): string[];
|
|
56
|
+
/** 查找项目工具(node_modules/.bin,自仓库根向上)。 */
|
|
57
|
+
export declare function findTool(root: string, name: string, platform?: NodeJS.Platform): string | null;
|
|
58
|
+
export declare function run(cmd: string, args: string[], cwd: string, input?: string, timeoutMs?: number): {
|
|
59
|
+
status: number | null;
|
|
60
|
+
signal: NodeJS.Signals | null;
|
|
61
|
+
stdout: string;
|
|
62
|
+
stderr: string;
|
|
63
|
+
error: Error | undefined;
|
|
64
|
+
};
|
|
65
|
+
export {};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { execFileSync } from 'node:child_process';
|
|
2
|
+
import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';
|
|
3
|
+
import { dirname, join } from 'node:path';
|
|
4
|
+
import { parse } from 'yaml';
|
|
5
|
+
import { commandFileNames, spawnCommandSync } from '@sumi/plugin-sdk';
|
|
6
|
+
export const PRECEDENT_DIR = 'precedents';
|
|
7
|
+
export const REGISTRY_FILE = 'precedents/registry.yaml';
|
|
8
|
+
export function readRegistryText(text) {
|
|
9
|
+
if (!text)
|
|
10
|
+
return { precedents: [] };
|
|
11
|
+
return { precedents: (parse(text)?.precedents ?? []) };
|
|
12
|
+
}
|
|
13
|
+
export function readRegistry(root) {
|
|
14
|
+
const path = join(root, REGISTRY_FILE);
|
|
15
|
+
return readRegistryText(existsSync(path) ? readFileSync(path, 'utf8') : null);
|
|
16
|
+
}
|
|
17
|
+
export function gitShow(root, ref, path) {
|
|
18
|
+
if (!ref)
|
|
19
|
+
return null;
|
|
20
|
+
try {
|
|
21
|
+
return execFileSync('git', ['show', `${ref}:${path}`], {
|
|
22
|
+
cwd: root,
|
|
23
|
+
encoding: 'utf8',
|
|
24
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
25
|
+
windowsHide: true,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
catch {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export function precedentDirs(root) {
|
|
33
|
+
const dir = join(root, PRECEDENT_DIR);
|
|
34
|
+
if (!existsSync(dir))
|
|
35
|
+
return [];
|
|
36
|
+
return readdirSync(dir).filter((name) => statSync(join(dir, name)).isDirectory());
|
|
37
|
+
}
|
|
38
|
+
export function readPrecedent(root, id) {
|
|
39
|
+
const path = join(root, PRECEDENT_DIR, id, 'precedent.yaml');
|
|
40
|
+
return existsSync(path) ? parse(readFileSync(path, 'utf8')) : null;
|
|
41
|
+
}
|
|
42
|
+
export function activeIds(registry) {
|
|
43
|
+
return registry.precedents.filter((p) => p.status === 'active').map((p) => p.id);
|
|
44
|
+
}
|
|
45
|
+
/** test 执行者的引用:`<文件>#<测试名>`。 */
|
|
46
|
+
export function splitRef(ref) {
|
|
47
|
+
const [file = '', ...rest] = (ref ?? '').split('#');
|
|
48
|
+
return { file, name: rest.join('#') };
|
|
49
|
+
}
|
|
50
|
+
/** 解析 spec 文件中各节的需求名称。 */
|
|
51
|
+
export function requirementsIn(text) {
|
|
52
|
+
const out = new Map();
|
|
53
|
+
let section = 'NONE';
|
|
54
|
+
for (const line of text.split('\n')) {
|
|
55
|
+
const h2 = /^##\s+(ADDED|MODIFIED|REMOVED|RENAMED)\s+Requirements/.exec(line);
|
|
56
|
+
if (h2)
|
|
57
|
+
section = h2[1];
|
|
58
|
+
else if (/^##\s/.test(line))
|
|
59
|
+
section = 'NONE';
|
|
60
|
+
const h3 = /^###\s+Requirement:\s*(.+?)\s*$/.exec(line);
|
|
61
|
+
if (h3)
|
|
62
|
+
out.set(h3[1], section);
|
|
63
|
+
}
|
|
64
|
+
return out;
|
|
65
|
+
}
|
|
66
|
+
export function changeInProgress(root, change) {
|
|
67
|
+
return !!change && change !== 'archive' && existsSync(join(root, 'openspec', 'changes', change));
|
|
68
|
+
}
|
|
69
|
+
/** 来源中涉及的文件,用于判断自检范围。 */
|
|
70
|
+
export function sourceFiles(p) {
|
|
71
|
+
const files = [];
|
|
72
|
+
if (p.source.spec) {
|
|
73
|
+
const [cap] = p.source.spec.split('#');
|
|
74
|
+
files.push(`openspec/specs/${cap}/spec.md`);
|
|
75
|
+
if (p.source.change)
|
|
76
|
+
files.push(`openspec/changes/${p.source.change}/specs/${cap}/spec.md`);
|
|
77
|
+
}
|
|
78
|
+
if (p.source.adr)
|
|
79
|
+
files.push(p.source.adr);
|
|
80
|
+
return files;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* 需求来源解析:附 change 且该 change 进行中时,在"正式规格 + 该 change 的 delta"中解析
|
|
84
|
+
* (REMOVED 视为不存在);否则只在正式规格中解析。不会去其他 change 中查找。
|
|
85
|
+
*/
|
|
86
|
+
export function resolveSpec(root, ref, change) {
|
|
87
|
+
const [cap, name] = ref.split('#');
|
|
88
|
+
if (!cap || !name)
|
|
89
|
+
return false;
|
|
90
|
+
if (changeInProgress(root, change)) {
|
|
91
|
+
const delta = join(root, 'openspec', 'changes', change, 'specs', cap, 'spec.md');
|
|
92
|
+
if (existsSync(delta)) {
|
|
93
|
+
const section = requirementsIn(readFileSync(delta, 'utf8')).get(name);
|
|
94
|
+
if (section === 'REMOVED')
|
|
95
|
+
return false;
|
|
96
|
+
if (section === 'ADDED' || section === 'MODIFIED')
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const canonical = join(root, 'openspec', 'specs', cap, 'spec.md');
|
|
101
|
+
return existsSync(canonical) && requirementsIn(readFileSync(canonical, 'utf8')).has(name);
|
|
102
|
+
}
|
|
103
|
+
/** 校验来源与执行者引用是否存在,返回问题列表。 */
|
|
104
|
+
export function referenceProblems(root, p) {
|
|
105
|
+
const problems = [];
|
|
106
|
+
if (!p.source?.spec && !p.source?.adr)
|
|
107
|
+
problems.push(`判例 ${p.id} 缺少来源(OpenSpec 需求或决策记录)`);
|
|
108
|
+
if (p.source?.spec && !resolveSpec(root, p.source.spec, p.source.change))
|
|
109
|
+
problems.push(`判例 ${p.id} 的来源需求不存在:${p.source.spec}`);
|
|
110
|
+
if (p.source?.adr && !existsSync(join(root, p.source.adr)))
|
|
111
|
+
problems.push(`判例 ${p.id} 的来源决策记录不存在:${p.source.adr}`);
|
|
112
|
+
const e = p.enforcer;
|
|
113
|
+
if (e?.type === 'test' && !existsSync(join(root, splitRef(e.ref).file)))
|
|
114
|
+
problems.push(`判例 ${p.id} 引用的测试文件不存在:${splitRef(e.ref).file}`);
|
|
115
|
+
if (e?.type === 'rubric-item') {
|
|
116
|
+
const [rubric, item] = (e.ref ?? '').split('#');
|
|
117
|
+
const path = join(root, 'control', 'rubrics', `${rubric}.yaml`);
|
|
118
|
+
const items = existsSync(path) ? (parse(readFileSync(path, 'utf8'))?.items ?? []) : [];
|
|
119
|
+
if (!items.some((i) => i.id === item))
|
|
120
|
+
problems.push(`判例 ${p.id} 引用的评审条目不存在:${e.ref}`);
|
|
121
|
+
}
|
|
122
|
+
return problems;
|
|
123
|
+
}
|
|
124
|
+
/** 查找项目工具(node_modules/.bin,自仓库根向上)。 */
|
|
125
|
+
export function findTool(root, name, platform = process.platform) {
|
|
126
|
+
let dir = root;
|
|
127
|
+
for (;;) {
|
|
128
|
+
for (const file of commandFileNames(name, platform)) {
|
|
129
|
+
const candidate = join(dir, 'node_modules', '.bin', file);
|
|
130
|
+
if (existsSync(candidate))
|
|
131
|
+
return candidate;
|
|
132
|
+
}
|
|
133
|
+
const parent = dirname(dir);
|
|
134
|
+
if (parent === dir)
|
|
135
|
+
return null;
|
|
136
|
+
dir = parent;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
export function run(cmd, args, cwd, input, timeoutMs = 120_000) {
|
|
140
|
+
const r = spawnCommandSync(cmd, args, {
|
|
141
|
+
cwd,
|
|
142
|
+
encoding: 'utf8',
|
|
143
|
+
input,
|
|
144
|
+
timeout: timeoutMs,
|
|
145
|
+
maxBuffer: 64 * 1024 * 1024,
|
|
146
|
+
windowsHide: true,
|
|
147
|
+
});
|
|
148
|
+
return { status: r.status, signal: r.signal, stdout: r.stdout ?? '', stderr: r.stderr ?? '', error: r.error };
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEtE,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC;AAC1C,MAAM,CAAC,MAAM,aAAa,GAAG,0BAA0B,CAAC;AAwBxD,MAAM,UAAU,gBAAgB,CAAC,IAAmB;IAClD,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC;IACrC,OAAO,EAAE,UAAU,EAAE,CAAE,KAAK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,0 +1,32 @@
|
|
|
1
|
+
import { join } from 'node:path';
|
|
2
|
+
import { definePlugin, result, validateResult } from '@sumi/plugin-sdk';
|
|
3
|
+
import { readPrecedent, run } from '../model.js';
|
|
4
|
+
/**
|
|
5
|
+
* 判例检查器代理:运行判例目录中的检查器(遵循同一插件协议,任意语言),透传其结果。
|
|
6
|
+
* 检查器的 finding 规则名加上判例 id 前缀,便于定位。
|
|
7
|
+
*/
|
|
8
|
+
await definePlugin((ctx) => {
|
|
9
|
+
const id = String(ctx.config.precedent ?? '');
|
|
10
|
+
const p = readPrecedent(ctx.repoRoot, id);
|
|
11
|
+
if (!p)
|
|
12
|
+
return result({ status: 'blocked', summary: `找不到判例 ${id}` });
|
|
13
|
+
const dir = join(ctx.repoRoot, 'precedents', id);
|
|
14
|
+
const [cmd, ...args] = (p.enforcer.command ?? ['node', './check.mjs']).map((a) => (a.startsWith('./') ? join(dir, a) : a));
|
|
15
|
+
const r = run(cmd, args, ctx.repoRoot, JSON.stringify(ctx), (p.enforcer.timeout ?? 60) * 1000);
|
|
16
|
+
let parsed;
|
|
17
|
+
try {
|
|
18
|
+
parsed = JSON.parse(r.stdout);
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return result({ status: 'blocked', summary: `判例 ${id} 的检查器没有输出合法结果:${r.stderr.split('\n')[0] ?? ''}` });
|
|
22
|
+
}
|
|
23
|
+
if (validateResult(parsed).length)
|
|
24
|
+
return result({ status: 'blocked', summary: `判例 ${id} 的检查器结果不合法` });
|
|
25
|
+
const out = parsed;
|
|
26
|
+
return {
|
|
27
|
+
...out,
|
|
28
|
+
summary: `${p.statement}:${out.summary}`,
|
|
29
|
+
findings: out.findings.map((f) => ({ ...f, rule: `prec/${id}:${f.rule}`, message: `${f.message}(判例 ${id}:${p.statement})` })),
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=checker.js.map
|