@fantasticit/sumi 0.0.0-stage → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +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 +31 -0
- package/node_modules/@sumi/kernel/dist/scope.js +136 -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 +148 -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 +283 -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/test-scope.d.ts +77 -0
- package/node_modules/@sumi/plugins-core/dist/test-scope.js +175 -0
- package/node_modules/@sumi/plugins-core/dist/test-scope.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/dist/vitest-runner.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/vitest-runner.js +126 -0
- package/node_modules/@sumi/plugins-core/dist/vitest-runner.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 +177 -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,200 @@
|
|
|
1
|
+
/** 插件协议:内核与插件之间唯一的契约。 */
|
|
2
|
+
export type Status = 'pass' | 'fail' | 'blocked' | 'skipped' | 'pending';
|
|
3
|
+
/** 步骤状态比插件状态多一个只能由内核设置的 not-applicable。 */
|
|
4
|
+
export type StepState = Status | 'not-applicable';
|
|
5
|
+
export type PluginKind = 'check' | 'planner';
|
|
6
|
+
export type Severity = 'error' | 'warning' | 'info';
|
|
7
|
+
export type Effect = 'none' | 'writes-worktree' | 'writes-control' | 'network' | 'publish';
|
|
8
|
+
export type ReceiptOutcome = 'passed' | 'failed' | 'skipped' | 'not-executed';
|
|
9
|
+
export declare const STATUSES: readonly Status[];
|
|
10
|
+
export declare const EFFECTS: readonly Effect[];
|
|
11
|
+
export declare const RECEIPT_OUTCOMES: readonly ReceiptOutcome[];
|
|
12
|
+
/** 约定退出码:pass 为 0,fail 为 1,其余为 2。 */
|
|
13
|
+
export declare function exitCodeFor(status: Status): number;
|
|
14
|
+
export interface MetricDeclaration {
|
|
15
|
+
name: string;
|
|
16
|
+
direction: 'lower-is-better' | 'higher-is-better';
|
|
17
|
+
/** 测量噪声的容差(绝对值):只有超出容差的变化才算变差或变好。缺省为 0。 */
|
|
18
|
+
tolerance?: number;
|
|
19
|
+
}
|
|
20
|
+
/** 按方向与容差比较指标:worse / better 都只在超出容差时成立。 */
|
|
21
|
+
export declare function compareMetric(decl: MetricDeclaration, value: number, base: number): {
|
|
22
|
+
worse: boolean;
|
|
23
|
+
better: boolean;
|
|
24
|
+
};
|
|
25
|
+
export interface CommandDeclaration {
|
|
26
|
+
name: string;
|
|
27
|
+
argv: string[];
|
|
28
|
+
description: string;
|
|
29
|
+
}
|
|
30
|
+
export interface PluginDeclaration {
|
|
31
|
+
id: string;
|
|
32
|
+
version: string;
|
|
33
|
+
kind: PluginKind;
|
|
34
|
+
/** argv 数组;以 ./ 或 ../ 开头的参数相对声明文件所在目录解析。派生插件与只提供命令的插件不声明。 */
|
|
35
|
+
command: string[];
|
|
36
|
+
/** 派生插件:沿用该插件的执行命令、kind 与超时,以 with 作为默认步骤配置(例如以一个运行任意命令的插件包装项目已有脚本)。 */
|
|
37
|
+
base?: string;
|
|
38
|
+
/** 默认步骤配置,流程步骤的 with 逐键覆盖。 */
|
|
39
|
+
with?: Record<string, unknown>;
|
|
40
|
+
/** 超时,单位秒。 */
|
|
41
|
+
timeout: number;
|
|
42
|
+
triggers?: string[];
|
|
43
|
+
minTier?: string;
|
|
44
|
+
fix?: string[];
|
|
45
|
+
metrics?: MetricDeclaration[];
|
|
46
|
+
commands?: CommandDeclaration[];
|
|
47
|
+
/** 依赖的插件包名称。 */
|
|
48
|
+
requires?: string[];
|
|
49
|
+
/** 运行前提:项目 node_modules/.bin 下的可执行文件与相对仓库根的文件;只供接入流程裁剪默认流程。 */
|
|
50
|
+
needs?: {
|
|
51
|
+
bin?: string[];
|
|
52
|
+
files?: string[];
|
|
53
|
+
};
|
|
54
|
+
/** 插件需要接入的 hook:值为本插件注册的命令名,由适配生成器统一接线。 */
|
|
55
|
+
hooks?: {
|
|
56
|
+
/** git hook 名称 → 命令名,例如 pre-push: verify。 */
|
|
57
|
+
git?: Record<string, string>;
|
|
58
|
+
/** AI 工具调用工具前、编辑文件后与准备结束回合时运行的命令。工具原始负载经标准输入传入。 */
|
|
59
|
+
agent?: {
|
|
60
|
+
beforeTool?: string;
|
|
61
|
+
afterEdit?: string;
|
|
62
|
+
stop?: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
/** 接入已有仓库后运行的 sumi 命令参数,例如 [snapshot, save]。 */
|
|
66
|
+
afterInit?: string[];
|
|
67
|
+
/** 本插件提供的动态指令:主题名 → 插件包内的指令文件(Markdown)。 */
|
|
68
|
+
instructions?: Record<string, string>;
|
|
69
|
+
/** 一句话说明,供 sumi context 与诊断展示。 */
|
|
70
|
+
description?: string;
|
|
71
|
+
/** 约束查询命令(本插件注册的命令名):标准输入为 { repoRoot, paths },标准输出为 ContextResult。 */
|
|
72
|
+
context?: string;
|
|
73
|
+
}
|
|
74
|
+
/** 约束查询命令输出的条目:ref 与规则引用的写法相同(如 <类型>:<目标>、<类型>:<集合>#<条目>)。 */
|
|
75
|
+
export interface ContextItem {
|
|
76
|
+
ref: string;
|
|
77
|
+
text: string;
|
|
78
|
+
source?: string;
|
|
79
|
+
/** 不限路径(没有触发条件或范围)的条目。 */
|
|
80
|
+
global?: boolean;
|
|
81
|
+
/** 同样指向本条目的其他引用写法(例如条目所属集合的引用),规则引用其中任一即视为关联。 */
|
|
82
|
+
aliases?: string[];
|
|
83
|
+
}
|
|
84
|
+
export interface ContextResult {
|
|
85
|
+
items: ContextItem[];
|
|
86
|
+
}
|
|
87
|
+
export declare const HOOK_BLOCK_START = "# >>> sumi\uFF1A\u7531 sumi update \u751F\u6210\uFF0C\u8BF7\u52FF\u624B\u6539 >>>";
|
|
88
|
+
export declare const HOOK_BLOCK_END = "# <<< sumi <<<";
|
|
89
|
+
export declare const PROJECT_SUMI = "node ./control/bin/sumi.cjs";
|
|
90
|
+
export declare const PROJECT_SUMI_ARGV: readonly ["node", "./control/bin/sumi.cjs"];
|
|
91
|
+
/** hook 中只调用仓库提交的 launcher,不再读取 PATH 上的全局 sumi。 */
|
|
92
|
+
export declare function hookBlock(command: string[], _legacyInstall?: string): string;
|
|
93
|
+
/** 由 sumi 独占的 git hook 文件(原生 git hook)。 */
|
|
94
|
+
export declare function gitHookScript(command: string[], legacyInstall?: string): string;
|
|
95
|
+
export interface Obligation {
|
|
96
|
+
id: string;
|
|
97
|
+
type: string;
|
|
98
|
+
target: Record<string, unknown>;
|
|
99
|
+
required: boolean;
|
|
100
|
+
}
|
|
101
|
+
export interface Receipt {
|
|
102
|
+
id: string;
|
|
103
|
+
outcome: ReceiptOutcome;
|
|
104
|
+
detail?: string;
|
|
105
|
+
}
|
|
106
|
+
export interface Finding {
|
|
107
|
+
id: string;
|
|
108
|
+
rule: string;
|
|
109
|
+
severity: Severity;
|
|
110
|
+
message: string;
|
|
111
|
+
file?: string;
|
|
112
|
+
line?: number;
|
|
113
|
+
subject?: string;
|
|
114
|
+
}
|
|
115
|
+
export interface Metric {
|
|
116
|
+
name: string;
|
|
117
|
+
/** 检查范围内的绝对值。 */
|
|
118
|
+
value: number;
|
|
119
|
+
/** 相对基准新增的量,改动范围运行时用于棘轮比较。 */
|
|
120
|
+
added?: number;
|
|
121
|
+
}
|
|
122
|
+
interface NextBase {
|
|
123
|
+
why: string;
|
|
124
|
+
/** 插件自定义的子类型标签,例如 dispatch-agent。 */
|
|
125
|
+
kind?: string;
|
|
126
|
+
}
|
|
127
|
+
export interface RunAction extends NextBase {
|
|
128
|
+
type: 'run';
|
|
129
|
+
argv: string[];
|
|
130
|
+
effects: Effect[];
|
|
131
|
+
}
|
|
132
|
+
export interface EditAction extends NextBase {
|
|
133
|
+
type: 'edit';
|
|
134
|
+
file: string;
|
|
135
|
+
line?: number;
|
|
136
|
+
intent: string;
|
|
137
|
+
}
|
|
138
|
+
export interface AskHumanAction extends NextBase {
|
|
139
|
+
type: 'ask-human';
|
|
140
|
+
question: string;
|
|
141
|
+
argv?: string[];
|
|
142
|
+
}
|
|
143
|
+
export interface StopAction extends NextBase {
|
|
144
|
+
type: 'stop';
|
|
145
|
+
reason: string;
|
|
146
|
+
}
|
|
147
|
+
export type NextAction = RunAction | EditAction | AskHumanAction | StopAction;
|
|
148
|
+
export interface PlannedStep {
|
|
149
|
+
id: string;
|
|
150
|
+
use: string;
|
|
151
|
+
with?: Record<string, unknown>;
|
|
152
|
+
required?: boolean;
|
|
153
|
+
/** 插入位置:在某步骤实例之前或之后;都未给出时追加到流程末尾。 */
|
|
154
|
+
before?: string;
|
|
155
|
+
after?: string;
|
|
156
|
+
}
|
|
157
|
+
export interface Injection {
|
|
158
|
+
step: string;
|
|
159
|
+
files?: string[];
|
|
160
|
+
obligations?: Obligation[];
|
|
161
|
+
required?: boolean;
|
|
162
|
+
}
|
|
163
|
+
export interface Plan {
|
|
164
|
+
steps?: PlannedStep[];
|
|
165
|
+
inject?: Injection[];
|
|
166
|
+
labels?: Record<string, string>;
|
|
167
|
+
}
|
|
168
|
+
export interface PluginResult {
|
|
169
|
+
status: Status;
|
|
170
|
+
summary: string;
|
|
171
|
+
findings: Finding[];
|
|
172
|
+
/** 实际检查范围。 */
|
|
173
|
+
checked: 'all' | string[];
|
|
174
|
+
evidence: string[];
|
|
175
|
+
metrics?: Metric[];
|
|
176
|
+
obligations?: Receipt[];
|
|
177
|
+
next?: NextAction[];
|
|
178
|
+
/** 报告段落(Markdown):内核原样记入运行记录,供 PR 报告等命令展示,不解释其内容。 */
|
|
179
|
+
report?: string;
|
|
180
|
+
/** 仅 planner 使用。 */
|
|
181
|
+
plan?: Plan;
|
|
182
|
+
}
|
|
183
|
+
export interface PluginContext {
|
|
184
|
+
repoRoot: string;
|
|
185
|
+
/** 基准提交 OID;null 表示空树。 */
|
|
186
|
+
base: string | null;
|
|
187
|
+
mode: 'worktree' | 'commit';
|
|
188
|
+
tier: string;
|
|
189
|
+
tiers: string[];
|
|
190
|
+
stepId: string;
|
|
191
|
+
config: Record<string, unknown>;
|
|
192
|
+
files: string[];
|
|
193
|
+
all: boolean;
|
|
194
|
+
obligations: Obligation[];
|
|
195
|
+
evidenceDir: string;
|
|
196
|
+
runDir: string;
|
|
197
|
+
runId: string;
|
|
198
|
+
labels: Record<string, string>;
|
|
199
|
+
}
|
|
200
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** 插件协议:内核与插件之间唯一的契约。 */
|
|
2
|
+
export const STATUSES = ['pass', 'fail', 'blocked', 'skipped', 'pending'];
|
|
3
|
+
export const EFFECTS = ['none', 'writes-worktree', 'writes-control', 'network', 'publish'];
|
|
4
|
+
export const RECEIPT_OUTCOMES = ['passed', 'failed', 'skipped', 'not-executed'];
|
|
5
|
+
/** 约定退出码:pass 为 0,fail 为 1,其余为 2。 */
|
|
6
|
+
export function exitCodeFor(status) {
|
|
7
|
+
if (status === 'pass')
|
|
8
|
+
return 0;
|
|
9
|
+
if (status === 'fail')
|
|
10
|
+
return 1;
|
|
11
|
+
return 2;
|
|
12
|
+
}
|
|
13
|
+
/** 按方向与容差比较指标:worse / better 都只在超出容差时成立。 */
|
|
14
|
+
export function compareMetric(decl, value, base) {
|
|
15
|
+
const tol = decl.tolerance ?? 0;
|
|
16
|
+
const delta = decl.direction === 'lower-is-better' ? base - value : value - base;
|
|
17
|
+
return { worse: delta < -tol, better: delta > tol };
|
|
18
|
+
}
|
|
19
|
+
export const HOOK_BLOCK_START = '# >>> sumi:由 sumi update 生成,请勿手改 >>>';
|
|
20
|
+
export const HOOK_BLOCK_END = '# <<< sumi <<<';
|
|
21
|
+
export const PROJECT_SUMI = 'node ./control/bin/sumi.cjs';
|
|
22
|
+
export const PROJECT_SUMI_ARGV = ['node', './control/bin/sumi.cjs'];
|
|
23
|
+
/** hook 中只调用仓库提交的 launcher,不再读取 PATH 上的全局 sumi。 */
|
|
24
|
+
export function hookBlock(command, _legacyInstall) {
|
|
25
|
+
return [
|
|
26
|
+
HOOK_BLOCK_START,
|
|
27
|
+
`test -f ./control/bin/sumi.cjs || { echo "缺少项目 Sumi launcher:请用 Sumi 0.4.0 临时 CLI 重新执行 vendor" >&2; exit 1; }`,
|
|
28
|
+
`${PROJECT_SUMI} ${command.join(' ')} "$@" || exit $?`,
|
|
29
|
+
HOOK_BLOCK_END,
|
|
30
|
+
].join('\n');
|
|
31
|
+
}
|
|
32
|
+
/** 由 sumi 独占的 git hook 文件(原生 git hook)。 */
|
|
33
|
+
export function gitHookScript(command, legacyInstall) {
|
|
34
|
+
return `#!/bin/sh\n${hookBlock(command, legacyInstall)}\n`;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA,yBAAyB;AAUzB,MAAM,CAAC,MAAM,QAAQ,GAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AAC7F,MAAM,CAAC,MAAM,OAAO,GAAsB,CAAC,MAAM,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AAC9G,MAAM,CAAC,MAAM,gBAAgB,GAA8B,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC;AAE3G,qCAAqC;AACrC,MAAM,UAAU,WAAW,CAAC,MAAc;IACxC,IAAI,MAAM,KAAK,MAAM;QAAE,OAAO,CAAC,CAAC;IAChC,IAAI,MAAM,KAAK,MAAM;QAAE,OAAO,CAAC,CAAC;IAChC,OAAO,CAAC,CAAC;AACX,CAAC;AASD,4CAA4C;AAC5C,MAAM,UAAU,aAAa,CAAC,IAAuB,EAAE,KAAa,EAAE,IAAY;IAChF,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC;IAChC,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,KAAK,iBAAiB,CAAC,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC;IACjF,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,GAAG,GAAG,EAAE,CAAC;AACtD,CAAC;AA6DD,MAAM,CAAC,MAAM,gBAAgB,GAAG,sCAAsC,CAAC;AACvE,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAC/C,MAAM,CAAC,MAAM,YAAY,GAAG,6BAA6B,CAAC;AAC1D,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,MAAM,EAAE,wBAAwB,CAAU,CAAC;AAE7E,mDAAmD;AACnD,MAAM,UAAU,SAAS,CAAC,OAAiB,EAAE,cAAuB;IAClE,OAAO;QACL,gBAAgB;QAChB,+GAA+G;QAC/G,GAAG,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,kBAAkB;QACtD,cAAc;KACf,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,2CAA2C;AAC3C,MAAM,UAAU,aAAa,CAAC,OAAiB,EAAE,aAAsB;IACrE,OAAO,cAAc,SAAS,CAAC,OAAO,EAAE,aAAa,CAAC,IAAI,CAAC;AAC7D,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 规则语句中的执行者引用:[<类型>:<目标>],例如 [plugin:core/lint]。SDK 只定义写法,
|
|
3
|
+
* 哪些类型算执行者、目标如何校验,由使用它的插件决定。
|
|
4
|
+
*/
|
|
5
|
+
export interface RuleRef {
|
|
6
|
+
kind: string;
|
|
7
|
+
target: string;
|
|
8
|
+
}
|
|
9
|
+
/** 每次返回新的全局正则,避免共享 lastIndex。 */
|
|
10
|
+
export declare function ruleRefPattern(): RegExp;
|
|
11
|
+
/** 一行文本中的全部执行者引用。 */
|
|
12
|
+
export declare function ruleRefs(text: string): RuleRef[];
|
|
13
|
+
/** 读取约束查询命令的输入:标准输入上的 { repoRoot, paths }。 */
|
|
14
|
+
export declare function readContextInput(): Promise<{
|
|
15
|
+
repoRoot: string;
|
|
16
|
+
paths: string[];
|
|
17
|
+
}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** 每次返回新的全局正则,避免共享 lastIndex。 */
|
|
2
|
+
export function ruleRefPattern() {
|
|
3
|
+
return /\[([a-z][a-z-]*):([^\]\s]+)\]/g;
|
|
4
|
+
}
|
|
5
|
+
/** 一行文本中的全部执行者引用。 */
|
|
6
|
+
export function ruleRefs(text) {
|
|
7
|
+
return [...text.matchAll(ruleRefPattern())].map((m) => ({ kind: m[1], target: m[2] }));
|
|
8
|
+
}
|
|
9
|
+
/** 读取约束查询命令的输入:标准输入上的 { repoRoot, paths }。 */
|
|
10
|
+
export async function readContextInput() {
|
|
11
|
+
let text = '';
|
|
12
|
+
for await (const chunk of process.stdin)
|
|
13
|
+
text += chunk;
|
|
14
|
+
return JSON.parse(text);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.js","sourceRoot":"","sources":["../src/rules.ts"],"names":[],"mappings":"AASA,iCAAiC;AACjC,MAAM,UAAU,cAAc;IAC5B,OAAO,gCAAgC,CAAC;AAC1C,CAAC;AAED,qBAAqB;AACrB,MAAM,UAAU,QAAQ,CAAC,IAAY;IACnC,OAAO,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAE,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CAAE,EAAE,CAAC,CAAC,CAAC;AAC3F,CAAC;AAED,8CAA8C;AAC9C,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,IAAI,IAAI,GAAG,EAAE,CAAC;IACd,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,OAAO,CAAC,KAAK;QAAE,IAAI,IAAI,KAAK,CAAC;IACvD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAA0C,CAAC;AACnE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type PluginContext, type PluginResult } from './protocol.js';
|
|
2
|
+
/** 结果中保留的 findings 上限。 */
|
|
3
|
+
export declare const MAX_FINDINGS = 500;
|
|
4
|
+
/** 结果的便捷构造:只需给出 status 与 summary,其余字段取空值。 */
|
|
5
|
+
export declare function result(partial: Partial<PluginResult> & Pick<PluginResult, 'status' | 'summary'>): PluginResult;
|
|
6
|
+
/** 把内容写入本步骤的证据目录,返回相对仓库根的路径。 */
|
|
7
|
+
export declare function writeEvidence(ctx: PluginContext, name: string, content: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* 插件入口:读取 stdin 上下文,调用处理函数,按约定写出结果并设置退出码。
|
|
10
|
+
* 处理函数抛出的异常转为 blocked 结果。
|
|
11
|
+
*/
|
|
12
|
+
export declare function definePlugin(handler: (ctx: PluginContext) => Promise<PluginResult> | PluginResult): Promise<void>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { exitCodeFor } from './protocol.js';
|
|
4
|
+
/** 结果中保留的 findings 上限。 */
|
|
5
|
+
export const MAX_FINDINGS = 500;
|
|
6
|
+
async function readStdin() {
|
|
7
|
+
const chunks = [];
|
|
8
|
+
for await (const chunk of process.stdin)
|
|
9
|
+
chunks.push(chunk);
|
|
10
|
+
return Buffer.concat(chunks).toString('utf8');
|
|
11
|
+
}
|
|
12
|
+
/** 结果的便捷构造:只需给出 status 与 summary,其余字段取空值。 */
|
|
13
|
+
export function result(partial) {
|
|
14
|
+
return { findings: [], checked: [], evidence: [], ...partial };
|
|
15
|
+
}
|
|
16
|
+
/** 把内容写入本步骤的证据目录,返回相对仓库根的路径。 */
|
|
17
|
+
export function writeEvidence(ctx, name, content) {
|
|
18
|
+
mkdirSync(ctx.evidenceDir, { recursive: true });
|
|
19
|
+
const path = join(ctx.evidenceDir, name);
|
|
20
|
+
writeFileSync(path, content);
|
|
21
|
+
return path;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* 插件入口:读取 stdin 上下文,调用处理函数,按约定写出结果并设置退出码。
|
|
25
|
+
* 处理函数抛出的异常转为 blocked 结果。
|
|
26
|
+
*/
|
|
27
|
+
export async function definePlugin(handler) {
|
|
28
|
+
let output;
|
|
29
|
+
let ctx;
|
|
30
|
+
try {
|
|
31
|
+
ctx = JSON.parse(await readStdin());
|
|
32
|
+
output = await handler(ctx);
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
output = result({ status: 'blocked', summary: `插件异常:${error.message}` });
|
|
36
|
+
}
|
|
37
|
+
// findings 过多时只在结果中保留前 MAX_FINDINGS 条,完整列表写入证据,避免结果超过内核的输出上限。
|
|
38
|
+
if (ctx && output.findings.length > MAX_FINDINGS) {
|
|
39
|
+
const all = output.findings;
|
|
40
|
+
const path = writeEvidence(ctx, 'findings.json', JSON.stringify(all, null, 2));
|
|
41
|
+
output = {
|
|
42
|
+
...output,
|
|
43
|
+
findings: all.slice(0, MAX_FINDINGS),
|
|
44
|
+
evidence: [...output.evidence, path],
|
|
45
|
+
summary: `${output.summary}(共 ${all.length} 条,结果中保留前 ${MAX_FINDINGS} 条)`,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
process.stdout.write(JSON.stringify(output));
|
|
49
|
+
process.exitCode = exitCodeFor(output.status);
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=sdk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,WAAW,EAAyC,MAAM,eAAe,CAAC;AAEnF,0BAA0B;AAC1B,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAC;AAEhC,KAAK,UAAU,SAAS;IACtB,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,OAAO,CAAC,KAAK;QAAE,MAAM,CAAC,IAAI,CAAC,KAAe,CAAC,CAAC;IACtE,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC;AAED,6CAA6C;AAC7C,MAAM,UAAU,MAAM,CAAC,OAAyE;IAC9F,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC;AACjE,CAAC;AAED,gCAAgC;AAChC,MAAM,UAAU,aAAa,CAAC,GAAkB,EAAE,IAAY,EAAE,OAAe;IAC7E,SAAS,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAChD,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;IACzC,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC7B,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,OAAqE;IACtG,IAAI,MAAoB,CAAC;IACzB,IAAI,GAA8B,CAAC;IACnC,IAAI,CAAC;QACH,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,SAAS,EAAE,CAAkB,CAAC;QACrD,MAAM,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,GAAG,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,QAAS,KAAe,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACtF,CAAC;IACD,8DAA8D;IAC9D,IAAI,GAAG,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAG,YAAY,EAAE,CAAC;QACjD,MAAM,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;QAC5B,MAAM,IAAI,GAAG,aAAa,CAAC,GAAG,EAAE,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/E,MAAM,GAAG;YACP,GAAG,MAAM;YACT,QAAQ,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,YAAY,CAAC;YACpC,QAAQ,EAAE,CAAC,GAAG,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC;YACpC,OAAO,EAAE,GAAG,MAAM,CAAC,OAAO,MAAM,GAAG,CAAC,MAAM,aAAa,YAAY,KAAK;SACzE,CAAC;IACJ,CAAC;IACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7C,OAAO,CAAC,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Windows 的 .cmd shim 会经过命令解释器;给引号、转义和 shim 前缀保留余量。
|
|
3
|
+
* 所有平台共用该预算,使长列表行为可重复测试。
|
|
4
|
+
*/
|
|
5
|
+
export declare const FILE_TOOL_COMMAND_BUDGET = 6000;
|
|
6
|
+
export declare function estimateCommandSize(command: string, args: string[]): number;
|
|
7
|
+
/**
|
|
8
|
+
* 保持原顺序把文件参数拆成可安全启动的批次。
|
|
9
|
+
* 固定参数或单个文件无法放入空批时直接拒绝,避免工具收到截断列表。
|
|
10
|
+
*/
|
|
11
|
+
export declare function splitFileArguments(command: string, fixedArgs: string[], files: string[], budget?: number): string[][];
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Windows 的 .cmd shim 会经过命令解释器;给引号、转义和 shim 前缀保留余量。
|
|
3
|
+
* 所有平台共用该预算,使长列表行为可重复测试。
|
|
4
|
+
*/
|
|
5
|
+
export const FILE_TOOL_COMMAND_BUDGET = 6_000;
|
|
6
|
+
const SHELL_OVERHEAD = 128;
|
|
7
|
+
/** 按 UTF-8 字节数的两倍保守估算参数经 shell 引号与转义后的占用。 */
|
|
8
|
+
function estimateArgumentSize(value) {
|
|
9
|
+
return Buffer.byteLength(value, 'utf8') * 2 + 8;
|
|
10
|
+
}
|
|
11
|
+
export function estimateCommandSize(command, args) {
|
|
12
|
+
return [command, ...args].reduce((size, value) => size + estimateArgumentSize(value), SHELL_OVERHEAD);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 保持原顺序把文件参数拆成可安全启动的批次。
|
|
16
|
+
* 固定参数或单个文件无法放入空批时直接拒绝,避免工具收到截断列表。
|
|
17
|
+
*/
|
|
18
|
+
export function splitFileArguments(command, fixedArgs, files, budget = FILE_TOOL_COMMAND_BUDGET) {
|
|
19
|
+
if (!Number.isSafeInteger(budget) || budget <= 0)
|
|
20
|
+
throw new Error(`无效的命令参数安全预算:${budget}`);
|
|
21
|
+
const fixedSize = estimateCommandSize(command, fixedArgs);
|
|
22
|
+
if (fixedSize > budget)
|
|
23
|
+
throw new Error(`工具固定参数超过安全预算:${command}`);
|
|
24
|
+
if (files.length === 0)
|
|
25
|
+
return [[]];
|
|
26
|
+
const batches = [];
|
|
27
|
+
let batch = [];
|
|
28
|
+
for (const file of files) {
|
|
29
|
+
if (estimateCommandSize(command, [...fixedArgs, file]) > budget) {
|
|
30
|
+
throw new Error(`单个文件参数超过安全预算:${file}`);
|
|
31
|
+
}
|
|
32
|
+
if (batch.length > 0 && estimateCommandSize(command, [...fixedArgs, ...batch, file]) > budget) {
|
|
33
|
+
batches.push(batch);
|
|
34
|
+
batch = [];
|
|
35
|
+
}
|
|
36
|
+
batch.push(file);
|
|
37
|
+
}
|
|
38
|
+
batches.push(batch);
|
|
39
|
+
return batches;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=tool-batches.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-batches.js","sourceRoot":"","sources":["../src/tool-batches.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,CAAC;AAE9C,MAAM,cAAc,GAAG,GAAG,CAAC;AAE3B,6CAA6C;AAC7C,SAAS,oBAAoB,CAAC,KAAa;IACzC,OAAO,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,OAAe,EAAE,IAAc;IACjE,OAAO,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,GAAG,oBAAoB,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC,CAAC;AACxG,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAAe,EAAE,SAAmB,EAAE,KAAe,EAAE,MAAM,GAAG,wBAAwB;IACzH,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,MAAM,IAAI,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,eAAe,MAAM,EAAE,CAAC,CAAC;IAC3F,MAAM,SAAS,GAAG,mBAAmB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAC1D,IAAI,SAAS,GAAG,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,gBAAgB,OAAO,EAAE,CAAC,CAAC;IACnE,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,CAAC,EAAE,CAAC,CAAC;IAEpC,MAAM,OAAO,GAAe,EAAE,CAAC;IAC/B,IAAI,KAAK,GAAa,EAAE,CAAC;IACzB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,mBAAmB,CAAC,OAAO,EAAE,CAAC,GAAG,SAAS,EAAE,IAAI,CAAC,CAAC,GAAG,MAAM,EAAE,CAAC;YAChE,MAAM,IAAI,KAAK,CAAC,gBAAgB,IAAI,EAAE,CAAC,CAAC;QAC1C,CAAC;QACD,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,mBAAmB,CAAC,OAAO,EAAE,CAAC,GAAG,SAAS,EAAE,GAAG,KAAK,EAAE,IAAI,CAAC,CAAC,GAAG,MAAM,EAAE,CAAC;YAC9F,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACpB,KAAK,GAAG,EAAE,CAAC;QACb,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnB,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACpB,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type PluginDeclaration, type PluginResult } from './protocol.js';
|
|
2
|
+
/** 校验函数只返回错误列表,空数组表示合法。 */
|
|
3
|
+
type Errors = string[];
|
|
4
|
+
export declare function validateDeclaration(value: unknown): Errors;
|
|
5
|
+
export declare function validateResult(value: unknown, kind?: 'check' | 'planner'): Errors;
|
|
6
|
+
export declare function assertDeclaration(value: unknown): PluginDeclaration;
|
|
7
|
+
export declare function assertResult(value: unknown): PluginResult;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { EFFECTS, RECEIPT_OUTCOMES, STATUSES } from './protocol.js';
|
|
2
|
+
const isObject = (v) => typeof v === 'object' && v !== null && !Array.isArray(v);
|
|
3
|
+
const isStringArray = (v) => Array.isArray(v) && v.every((x) => typeof x === 'string');
|
|
4
|
+
const nonEmptyString = (v) => typeof v === 'string' && v.length > 0;
|
|
5
|
+
export function validateDeclaration(value) {
|
|
6
|
+
const errors = [];
|
|
7
|
+
if (!isObject(value))
|
|
8
|
+
return ['声明必须是对象'];
|
|
9
|
+
for (const key of ['id', 'version']) {
|
|
10
|
+
if (!nonEmptyString(value[key]))
|
|
11
|
+
errors.push(`缺少字段 ${key}`);
|
|
12
|
+
}
|
|
13
|
+
// 三种形态:可执行插件(command)、派生插件(base,沿用其命令)、只提供命令与 hook 的插件。
|
|
14
|
+
const derived = value.base !== undefined;
|
|
15
|
+
const commandOnly = !derived && value.command === undefined && (value.commands !== undefined || value.hooks !== undefined);
|
|
16
|
+
if (derived) {
|
|
17
|
+
if (!nonEmptyString(value.base))
|
|
18
|
+
errors.push('base 必须是插件 id');
|
|
19
|
+
if (value.command !== undefined)
|
|
20
|
+
errors.push('派生插件不能声明 command');
|
|
21
|
+
if (value.kind !== undefined && value.kind !== 'check' && value.kind !== 'planner')
|
|
22
|
+
errors.push('kind 必须为 check 或 planner');
|
|
23
|
+
if (value.timeout !== undefined && (typeof value.timeout !== 'number' || value.timeout <= 0))
|
|
24
|
+
errors.push('timeout 必须是正数');
|
|
25
|
+
}
|
|
26
|
+
else if (!commandOnly) {
|
|
27
|
+
if (value.kind !== 'check' && value.kind !== 'planner')
|
|
28
|
+
errors.push('kind 必须为 check 或 planner');
|
|
29
|
+
if (!isStringArray(value.command) || value.command.length === 0)
|
|
30
|
+
errors.push('缺少字段 command');
|
|
31
|
+
if (typeof value.timeout !== 'number' || value.timeout <= 0)
|
|
32
|
+
errors.push('缺少字段 timeout');
|
|
33
|
+
}
|
|
34
|
+
if (value.with !== undefined && !isObject(value.with))
|
|
35
|
+
errors.push('with 必须是对象');
|
|
36
|
+
if (value.description !== undefined && !nonEmptyString(value.description))
|
|
37
|
+
errors.push('description 必须是字符串');
|
|
38
|
+
if (value.context !== undefined && !nonEmptyString(value.context))
|
|
39
|
+
errors.push('context 必须是命令名');
|
|
40
|
+
if (value.triggers !== undefined && !isStringArray(value.triggers))
|
|
41
|
+
errors.push('triggers 必须是字符串数组');
|
|
42
|
+
if (value.minTier !== undefined && !nonEmptyString(value.minTier))
|
|
43
|
+
errors.push('minTier 必须是字符串');
|
|
44
|
+
if (value.fix !== undefined && (!isStringArray(value.fix) || value.fix.length === 0)) {
|
|
45
|
+
errors.push('fix 必须是非空字符串数组');
|
|
46
|
+
}
|
|
47
|
+
if (value.requires !== undefined && !isStringArray(value.requires))
|
|
48
|
+
errors.push('requires 必须是字符串数组');
|
|
49
|
+
if (value.needs !== undefined) {
|
|
50
|
+
if (!isObject(value.needs))
|
|
51
|
+
errors.push('needs 必须是对象');
|
|
52
|
+
else
|
|
53
|
+
for (const key of ['bin', 'files']) {
|
|
54
|
+
if (value.needs[key] !== undefined && !isStringArray(value.needs[key]))
|
|
55
|
+
errors.push(`needs.${key} 必须是字符串数组`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (value.metrics !== undefined) {
|
|
59
|
+
if (!Array.isArray(value.metrics))
|
|
60
|
+
errors.push('metrics 必须是数组');
|
|
61
|
+
else
|
|
62
|
+
value.metrics.forEach((m, i) => {
|
|
63
|
+
if (!isObject(m) || !nonEmptyString(m.name))
|
|
64
|
+
errors.push(`metrics[${i}] 缺少 name`);
|
|
65
|
+
else if (m.direction !== 'lower-is-better' && m.direction !== 'higher-is-better') {
|
|
66
|
+
errors.push(`metrics[${i}] direction 非法`);
|
|
67
|
+
}
|
|
68
|
+
else if (m.tolerance !== undefined && (typeof m.tolerance !== 'number' || m.tolerance < 0)) {
|
|
69
|
+
errors.push(`metrics[${i}] tolerance 必须是非负数`);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
if (value.hooks !== undefined) {
|
|
74
|
+
const hooks = value.hooks;
|
|
75
|
+
const git = hooks?.git;
|
|
76
|
+
const agent = hooks?.agent;
|
|
77
|
+
if (!isObject(hooks))
|
|
78
|
+
errors.push('hooks 必须是对象');
|
|
79
|
+
else if (git !== undefined && (!isObject(git) || !Object.values(git).every(nonEmptyString)))
|
|
80
|
+
errors.push('hooks.git 必须是 hook 名称到命令名的映射');
|
|
81
|
+
else if (agent !== undefined && !isObject(agent))
|
|
82
|
+
errors.push('hooks.agent 必须是对象');
|
|
83
|
+
else {
|
|
84
|
+
for (const key of ['beforeTool', 'afterEdit', 'stop']) {
|
|
85
|
+
if (agent?.[key] !== undefined && !nonEmptyString(agent[key]))
|
|
86
|
+
errors.push(`hooks.agent.${key} 必须是命令名`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
// hook 与约束查询只能调用本插件注册的命令。
|
|
91
|
+
{
|
|
92
|
+
const hooks = (isObject(value.hooks) ? value.hooks : {});
|
|
93
|
+
const git = isObject(hooks.git) ? hooks.git : {};
|
|
94
|
+
const agent = (isObject(hooks.agent) ? hooks.agent : {});
|
|
95
|
+
const registered = new Set(Array.isArray(value.commands) ? value.commands.map((c) => c?.name) : []);
|
|
96
|
+
const referenced = [...Object.values(git), agent.beforeTool, agent.afterEdit, agent.stop, value.context].filter(nonEmptyString);
|
|
97
|
+
for (const name of referenced) {
|
|
98
|
+
if (!registered.has(name))
|
|
99
|
+
errors.push(`hook 或约束查询引用的命令 ${name} 未在 commands 中注册`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
if (value.instructions !== undefined && (!isObject(value.instructions) || !Object.values(value.instructions).every(nonEmptyString))) {
|
|
103
|
+
errors.push('instructions 必须是主题名到指令文件的映射');
|
|
104
|
+
}
|
|
105
|
+
if (value.afterInit !== undefined && (!isStringArray(value.afterInit) || value.afterInit.length === 0))
|
|
106
|
+
errors.push('afterInit 必须是非空字符串数组');
|
|
107
|
+
if (value.commands !== undefined) {
|
|
108
|
+
if (!Array.isArray(value.commands))
|
|
109
|
+
errors.push('commands 必须是数组');
|
|
110
|
+
else
|
|
111
|
+
value.commands.forEach((c, i) => {
|
|
112
|
+
if (!isObject(c) || !nonEmptyString(c.name) || !isStringArray(c.argv) || c.argv.length === 0) {
|
|
113
|
+
errors.push(`commands[${i}] 需要 name 与 argv`);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
return errors;
|
|
118
|
+
}
|
|
119
|
+
function validateNext(next, errors) {
|
|
120
|
+
if (!Array.isArray(next)) {
|
|
121
|
+
errors.push('next 必须是数组');
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
next.forEach((a, i) => {
|
|
125
|
+
const at = `next[${i}]`;
|
|
126
|
+
if (!isObject(a) || !nonEmptyString(a.why)) {
|
|
127
|
+
errors.push(`${at} 缺少 why`);
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
switch (a.type) {
|
|
131
|
+
case 'run':
|
|
132
|
+
if (!isStringArray(a.argv) || a.argv.length === 0)
|
|
133
|
+
errors.push(`${at} 缺少 argv`);
|
|
134
|
+
if (!isStringArray(a.effects) || a.effects.length === 0 || !a.effects.every((e) => EFFECTS.includes(e))) {
|
|
135
|
+
errors.push(`${at} effects 非法`);
|
|
136
|
+
}
|
|
137
|
+
break;
|
|
138
|
+
case 'edit':
|
|
139
|
+
if (!nonEmptyString(a.file) || !nonEmptyString(a.intent))
|
|
140
|
+
errors.push(`${at} 需要 file 与 intent`);
|
|
141
|
+
break;
|
|
142
|
+
case 'ask-human':
|
|
143
|
+
if (!nonEmptyString(a.question))
|
|
144
|
+
errors.push(`${at} 缺少 question`);
|
|
145
|
+
if (a.argv !== undefined && !isStringArray(a.argv))
|
|
146
|
+
errors.push(`${at} argv 非法`);
|
|
147
|
+
break;
|
|
148
|
+
case 'stop':
|
|
149
|
+
if (!nonEmptyString(a.reason))
|
|
150
|
+
errors.push(`${at} 缺少 reason`);
|
|
151
|
+
break;
|
|
152
|
+
default:
|
|
153
|
+
errors.push(`${at} type 非法`);
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
export function validateResult(value, kind = 'check') {
|
|
158
|
+
const errors = [];
|
|
159
|
+
if (!isObject(value))
|
|
160
|
+
return ['结果必须是对象'];
|
|
161
|
+
if (!STATUSES.includes(value.status))
|
|
162
|
+
errors.push('status 非法');
|
|
163
|
+
if (typeof value.summary !== 'string')
|
|
164
|
+
errors.push('缺少 summary');
|
|
165
|
+
if (!Array.isArray(value.findings))
|
|
166
|
+
errors.push('findings 必须是数组');
|
|
167
|
+
else
|
|
168
|
+
value.findings.forEach((f, i) => {
|
|
169
|
+
if (!isObject(f) || !nonEmptyString(f.id) || !nonEmptyString(f.rule) || typeof f.message !== 'string') {
|
|
170
|
+
errors.push(`findings[${i}] 需要 id、rule、message`);
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
if (f.severity !== 'error' && f.severity !== 'warning' && f.severity !== 'info') {
|
|
174
|
+
errors.push(`findings[${i}] severity 非法`);
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
if (value.checked !== 'all' && !isStringArray(value.checked))
|
|
178
|
+
errors.push('checked 必须为 all 或文件列表');
|
|
179
|
+
if (!isStringArray(value.evidence))
|
|
180
|
+
errors.push('evidence 必须是字符串数组');
|
|
181
|
+
if (value.metrics !== undefined) {
|
|
182
|
+
if (!Array.isArray(value.metrics))
|
|
183
|
+
errors.push('metrics 必须是数组');
|
|
184
|
+
else
|
|
185
|
+
value.metrics.forEach((m, i) => {
|
|
186
|
+
if (!isObject(m) || !nonEmptyString(m.name) || typeof m.value !== 'number') {
|
|
187
|
+
errors.push(`metrics[${i}] 需要 name 与数值 value`);
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
if (value.obligations !== undefined) {
|
|
192
|
+
if (!Array.isArray(value.obligations))
|
|
193
|
+
errors.push('obligations 必须是数组');
|
|
194
|
+
else
|
|
195
|
+
value.obligations.forEach((r, i) => {
|
|
196
|
+
if (!isObject(r) || !nonEmptyString(r.id) || !RECEIPT_OUTCOMES.includes(r.outcome)) {
|
|
197
|
+
errors.push(`obligations[${i}] 回执非法`);
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
if (value.next !== undefined)
|
|
202
|
+
validateNext(value.next, errors);
|
|
203
|
+
if (value.report !== undefined && typeof value.report !== 'string')
|
|
204
|
+
errors.push('report 必须是字符串');
|
|
205
|
+
if (value.plan !== undefined && kind !== 'planner')
|
|
206
|
+
errors.push('只有 planner 可以返回 plan');
|
|
207
|
+
return errors;
|
|
208
|
+
}
|
|
209
|
+
export function assertDeclaration(value) {
|
|
210
|
+
const errors = validateDeclaration(value);
|
|
211
|
+
if (errors.length)
|
|
212
|
+
throw new Error(errors.join(';'));
|
|
213
|
+
return value;
|
|
214
|
+
}
|
|
215
|
+
export function assertResult(value) {
|
|
216
|
+
const errors = validateResult(value);
|
|
217
|
+
if (errors.length)
|
|
218
|
+
throw new Error(errors.join(';'));
|
|
219
|
+
return value;
|
|
220
|
+
}
|
|
221
|
+
//# sourceMappingURL=validate.js.map
|