@fantasticit/sumi 0.0.0-stage → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +81 -2
- package/dist/adapters.d.ts +86 -0
- package/dist/adapters.js +469 -0
- package/dist/adapters.js.map +1 -0
- package/dist/agent-hooks.d.ts +15 -0
- package/dist/agent-hooks.js +63 -0
- package/dist/agent-hooks.js.map +1 -0
- package/dist/agents.d.ts +1 -0
- package/dist/agents.js +139 -0
- package/dist/agents.js.map +1 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +21 -0
- package/dist/bin.js.map +1 -0
- package/dist/build-identity.d.ts +7 -0
- package/dist/build-identity.js +55 -0
- package/dist/build-identity.js.map +1 -0
- package/dist/cli.d.ts +19 -0
- package/dist/cli.js +150 -0
- package/dist/cli.js.map +1 -0
- package/dist/context.d.ts +1 -0
- package/dist/context.js +117 -0
- package/dist/context.js.map +1 -0
- package/dist/fix.d.ts +1 -0
- package/dist/fix.js +51 -0
- package/dist/fix.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/instructions.d.ts +31 -0
- package/dist/instructions.js +150 -0
- package/dist/instructions.js.map +1 -0
- package/dist/launcher-entry.d.ts +1 -0
- package/dist/launcher-entry.js +8 -0
- package/dist/launcher-entry.js.map +1 -0
- package/dist/launcher.cjs +10606 -0
- package/dist/launcher.d.ts +3 -0
- package/dist/launcher.js +117 -0
- package/dist/launcher.js.map +1 -0
- package/dist/runtime-manifest.d.ts +29 -0
- package/dist/runtime-manifest.js +75 -0
- package/dist/runtime-manifest.js.map +1 -0
- package/dist/runtime-package.d.ts +10 -0
- package/dist/runtime-package.js +66 -0
- package/dist/runtime-package.js.map +1 -0
- package/dist/scaffold-commands.d.ts +3 -0
- package/dist/scaffold-commands.js +214 -0
- package/dist/scaffold-commands.js.map +1 -0
- package/dist/vendor.d.ts +1 -0
- package/dist/vendor.js +260 -0
- package/dist/vendor.js.map +1 -0
- package/node_modules/@isaacs/fs-minipass/LICENSE +15 -0
- package/node_modules/@isaacs/fs-minipass/README.md +71 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts +118 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js +430 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js.map +1 -0
- package/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json +3 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts +118 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.js +420 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/index.js.map +1 -0
- package/node_modules/@isaacs/fs-minipass/dist/esm/package.json +3 -0
- package/node_modules/@isaacs/fs-minipass/package.json +72 -0
- package/node_modules/@sumi/create/README.md +77 -0
- package/node_modules/@sumi/create/dist/index.d.ts +1 -0
- package/node_modules/@sumi/create/dist/index.js +2 -0
- package/node_modules/@sumi/create/dist/index.js.map +1 -0
- package/node_modules/@sumi/create/dist/scaffold.d.ts +29 -0
- package/node_modules/@sumi/create/dist/scaffold.js +134 -0
- package/node_modules/@sumi/create/dist/scaffold.js.map +1 -0
- package/node_modules/@sumi/create/package.json +22 -0
- package/node_modules/@sumi/create/template/.gitattributes +1 -0
- package/node_modules/@sumi/create/template/.prettierignore +5 -0
- package/node_modules/@sumi/create/template/.prettierrc +1 -0
- package/node_modules/@sumi/create/template/AGENTS.md +28 -0
- package/node_modules/@sumi/create/template/control/baselines/.gitkeep +0 -0
- package/node_modules/@sumi/create/template/control/config.yaml +59 -0
- package/node_modules/@sumi/create/template/control/decisions/0001-config-module.md +15 -0
- package/node_modules/@sumi/create/template/control/flows/change.flow.yaml +14 -0
- package/node_modules/@sumi/create/template/control/flows/check.flow.yaml +25 -0
- package/node_modules/@sumi/create/template/control/plugins/.gitkeep +0 -0
- package/node_modules/@sumi/create/template/control/rubrics/architecture.yaml +14 -0
- package/node_modules/@sumi/create/template/eslint.config.mjs +9 -0
- package/node_modules/@sumi/create/template/gitignore +4 -0
- package/node_modules/@sumi/create/template/init/AGENTS.md +27 -0
- package/node_modules/@sumi/create/template/init/control/baselines/.gitkeep +0 -0
- package/node_modules/@sumi/create/template/init/control/flows/check.flow.yaml +20 -0
- package/node_modules/@sumi/create/template/init/control/plugins/.gitkeep +0 -0
- package/node_modules/@sumi/create/template/init/control/rubrics/architecture.yaml +14 -0
- package/node_modules/@sumi/create/template/init/openspec/changes/archive/.gitkeep +0 -0
- package/node_modules/@sumi/create/template/init/openspec/config.yaml +1 -0
- package/node_modules/@sumi/create/template/init/openspec/specs/.gitkeep +0 -0
- package/node_modules/@sumi/create/template/init/precedents/registry.yaml +1 -0
- package/node_modules/@sumi/create/template/openspec/changes/archive/.gitkeep +0 -0
- package/node_modules/@sumi/create/template/openspec/config.yaml +1 -0
- package/node_modules/@sumi/create/template/openspec/specs/.gitkeep +0 -0
- package/node_modules/@sumi/create/template/package.json +21 -0
- package/node_modules/@sumi/create/template/precedents/no-env-in-business/check.mjs +36 -0
- package/node_modules/@sumi/create/template/precedents/no-env-in-business/fixtures/compliant/src/a.ts +3 -0
- package/node_modules/@sumi/create/template/precedents/no-env-in-business/fixtures/violating/src/a.ts +1 -0
- package/node_modules/@sumi/create/template/precedents/no-env-in-business/precedent.yaml +9 -0
- package/node_modules/@sumi/create/template/precedents/registry.yaml +3 -0
- package/node_modules/@sumi/create/template/src/config.ts +4 -0
- package/node_modules/@sumi/create/template/src/index.test.ts +6 -0
- package/node_modules/@sumi/create/template/src/index.ts +5 -0
- package/node_modules/@sumi/create/template/tsconfig.json +12 -0
- package/node_modules/@sumi/kernel/README.md +128 -0
- package/node_modules/@sumi/kernel/dist/brief.d.ts +41 -0
- package/node_modules/@sumi/kernel/dist/brief.js +82 -0
- package/node_modules/@sumi/kernel/dist/brief.js.map +1 -0
- package/node_modules/@sumi/kernel/dist/config.d.ts +40 -0
- package/node_modules/@sumi/kernel/dist/config.js +94 -0
- package/node_modules/@sumi/kernel/dist/config.js.map +1 -0
- package/node_modules/@sumi/kernel/dist/engine.d.ts +33 -0
- package/node_modules/@sumi/kernel/dist/engine.js +242 -0
- package/node_modules/@sumi/kernel/dist/engine.js.map +1 -0
- package/node_modules/@sumi/kernel/dist/errors.d.ts +5 -0
- package/node_modules/@sumi/kernel/dist/errors.js +9 -0
- package/node_modules/@sumi/kernel/dist/errors.js.map +1 -0
- package/node_modules/@sumi/kernel/dist/flow.d.ts +37 -0
- package/node_modules/@sumi/kernel/dist/flow.js +132 -0
- package/node_modules/@sumi/kernel/dist/flow.js.map +1 -0
- package/node_modules/@sumi/kernel/dist/index.d.ts +10 -0
- package/node_modules/@sumi/kernel/dist/index.js +11 -0
- package/node_modules/@sumi/kernel/dist/index.js.map +1 -0
- package/node_modules/@sumi/kernel/dist/plan.d.ts +21 -0
- package/node_modules/@sumi/kernel/dist/plan.js +68 -0
- package/node_modules/@sumi/kernel/dist/plan.js.map +1 -0
- package/node_modules/@sumi/kernel/dist/record.d.ts +31 -0
- package/node_modules/@sumi/kernel/dist/record.js +54 -0
- package/node_modules/@sumi/kernel/dist/record.js.map +1 -0
- package/node_modules/@sumi/kernel/dist/registry.d.ts +32 -0
- package/node_modules/@sumi/kernel/dist/registry.js +126 -0
- package/node_modules/@sumi/kernel/dist/registry.js.map +1 -0
- package/node_modules/@sumi/kernel/dist/runner.d.ts +15 -0
- package/node_modules/@sumi/kernel/dist/runner.js +101 -0
- package/node_modules/@sumi/kernel/dist/runner.js.map +1 -0
- package/node_modules/@sumi/kernel/dist/scope.d.ts +29 -0
- package/node_modules/@sumi/kernel/dist/scope.js +132 -0
- package/node_modules/@sumi/kernel/dist/scope.js.map +1 -0
- package/node_modules/@sumi/kernel/dist/testing.d.ts +7 -0
- package/node_modules/@sumi/kernel/dist/testing.js +32 -0
- package/node_modules/@sumi/kernel/dist/testing.js.map +1 -0
- package/node_modules/@sumi/kernel/dist/windows-process.d.ts +1 -0
- package/node_modules/@sumi/kernel/dist/windows-process.js +90 -0
- package/node_modules/@sumi/kernel/dist/windows-process.js.map +1 -0
- package/node_modules/@sumi/kernel/package.json +20 -0
- package/node_modules/@sumi/kernel/test/fixtures/fake-plugin.mjs +44 -0
- package/node_modules/@sumi/kernel/test/fixtures/py-plugin.py +3 -0
- package/node_modules/@sumi/plugin-sdk/README.md +144 -0
- package/node_modules/@sumi/plugin-sdk/dist/env.d.ts +5 -0
- package/node_modules/@sumi/plugin-sdk/dist/env.js +30 -0
- package/node_modules/@sumi/plugin-sdk/dist/env.js.map +1 -0
- package/node_modules/@sumi/plugin-sdk/dist/git.d.ts +7 -0
- package/node_modules/@sumi/plugin-sdk/dist/git.js +19 -0
- package/node_modules/@sumi/plugin-sdk/dist/git.js.map +1 -0
- package/node_modules/@sumi/plugin-sdk/dist/index.d.ts +9 -0
- package/node_modules/@sumi/plugin-sdk/dist/index.js +10 -0
- package/node_modules/@sumi/plugin-sdk/dist/index.js.map +1 -0
- package/node_modules/@sumi/plugin-sdk/dist/process.d.ts +7 -0
- package/node_modules/@sumi/plugin-sdk/dist/process.js +13 -0
- package/node_modules/@sumi/plugin-sdk/dist/process.js.map +1 -0
- package/node_modules/@sumi/plugin-sdk/dist/project.d.ts +9 -0
- package/node_modules/@sumi/plugin-sdk/dist/project.js +55 -0
- package/node_modules/@sumi/plugin-sdk/dist/project.js.map +1 -0
- package/node_modules/@sumi/plugin-sdk/dist/protocol.d.ts +200 -0
- package/node_modules/@sumi/plugin-sdk/dist/protocol.js +36 -0
- package/node_modules/@sumi/plugin-sdk/dist/protocol.js.map +1 -0
- package/node_modules/@sumi/plugin-sdk/dist/rules.d.ts +17 -0
- package/node_modules/@sumi/plugin-sdk/dist/rules.js +16 -0
- package/node_modules/@sumi/plugin-sdk/dist/rules.js.map +1 -0
- package/node_modules/@sumi/plugin-sdk/dist/sdk.d.ts +12 -0
- package/node_modules/@sumi/plugin-sdk/dist/sdk.js +51 -0
- package/node_modules/@sumi/plugin-sdk/dist/sdk.js.map +1 -0
- package/node_modules/@sumi/plugin-sdk/dist/tool-batches.d.ts +11 -0
- package/node_modules/@sumi/plugin-sdk/dist/tool-batches.js +41 -0
- package/node_modules/@sumi/plugin-sdk/dist/tool-batches.js.map +1 -0
- package/node_modules/@sumi/plugin-sdk/dist/validate.d.ts +8 -0
- package/node_modules/@sumi/plugin-sdk/dist/validate.js +221 -0
- package/node_modules/@sumi/plugin-sdk/dist/validate.js.map +1 -0
- package/node_modules/@sumi/plugin-sdk/package.json +18 -0
- package/node_modules/@sumi/plugins-core/README.md +105 -0
- package/node_modules/@sumi/plugins-core/dist/baseline.d.ts +34 -0
- package/node_modules/@sumi/plugins-core/dist/baseline.js +54 -0
- package/node_modules/@sumi/plugins-core/dist/baseline.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/commands/adopt.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/commands/adopt.js +182 -0
- package/node_modules/@sumi/plugins-core/dist/commands/adopt.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/commands/baseline.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/commands/baseline.js +56 -0
- package/node_modules/@sumi/plugins-core/dist/commands/baseline.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/fix/format.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/fix/format.js +4 -0
- package/node_modules/@sumi/plugins-core/dist/fix/format.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/fix/lint.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/fix/lint.js +4 -0
- package/node_modules/@sumi/plugins-core/dist/fix/lint.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/index.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/index.js +2 -0
- package/node_modules/@sumi/plugins-core/dist/index.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/lib.d.ts +34 -0
- package/node_modules/@sumi/plugins-core/dist/lib.js +113 -0
- package/node_modules/@sumi/plugins-core/dist/lib.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/agent-drift.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/agent-drift.js +32 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/agent-drift.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/control-docs.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/control-docs.js +109 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/control-docs.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/coverage.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/coverage.js +107 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/coverage.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/exec.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/exec.js +69 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/exec.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/format.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/format.js +41 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/format.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/layer-boundary.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/layer-boundary.js +87 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/layer-boundary.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/lint.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/lint.js +91 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/lint.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/ratchet.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/ratchet.js +83 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/ratchet.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/test-affected.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/test-affected.js +82 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/test-affected.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/typecheck.d.ts +1 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/typecheck.js +31 -0
- package/node_modules/@sumi/plugins-core/dist/plugins/typecheck.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/testing.d.ts +13 -0
- package/node_modules/@sumi/plugins-core/dist/testing.js +47 -0
- package/node_modules/@sumi/plugins-core/dist/testing.js.map +1 -0
- package/node_modules/@sumi/plugins-core/dist/tool-batches.d.ts +11 -0
- package/node_modules/@sumi/plugins-core/dist/tool-batches.js +41 -0
- package/node_modules/@sumi/plugins-core/dist/tool-batches.js.map +1 -0
- package/node_modules/@sumi/plugins-core/instructions/adopt.md +37 -0
- package/node_modules/@sumi/plugins-core/package.json +25 -0
- package/node_modules/@sumi/plugins-core/sumi-plugins.yaml +80 -0
- package/node_modules/@sumi/plugins-governance/README.md +159 -0
- package/node_modules/@sumi/plugins-governance/dist/checkout.d.ts +45 -0
- package/node_modules/@sumi/plugins-governance/dist/checkout.js +138 -0
- package/node_modules/@sumi/plugins-governance/dist/checkout.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/approve.d.ts +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/approve.js +27 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/approve.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/gate.d.ts +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/gate.js +167 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/gate.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/guard.d.ts +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/guard.js +27 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/guard.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/pr-report-check.d.ts +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/pr-report-check.js +8 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/pr-report-check.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/pr-report.d.ts +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/pr-report.js +128 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/pr-report.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/unlock.d.ts +1 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/unlock.js +21 -0
- package/node_modules/@sumi/plugins-governance/dist/commands/unlock.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/guard.d.ts +19 -0
- package/node_modules/@sumi/plugins-governance/dist/guard.js +173 -0
- package/node_modules/@sumi/plugins-governance/dist/guard.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/index.d.ts +4 -0
- package/node_modules/@sumi/plugins-governance/dist/index.js +5 -0
- package/node_modules/@sumi/plugins-governance/dist/index.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/plugins/protected-paths.d.ts +1 -0
- package/node_modules/@sumi/plugins-governance/dist/plugins/protected-paths.js +31 -0
- package/node_modules/@sumi/plugins-governance/dist/plugins/protected-paths.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/pr-base.d.ts +19 -0
- package/node_modules/@sumi/plugins-governance/dist/pr-base.js +49 -0
- package/node_modules/@sumi/plugins-governance/dist/pr-base.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/pr-report-markers.d.ts +4 -0
- package/node_modules/@sumi/plugins-governance/dist/pr-report-markers.js +11 -0
- package/node_modules/@sumi/plugins-governance/dist/pr-report-markers.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/pr-report-status.d.ts +14 -0
- package/node_modules/@sumi/plugins-governance/dist/pr-report-status.js +97 -0
- package/node_modules/@sumi/plugins-governance/dist/pr-report-status.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/protected.d.ts +22 -0
- package/node_modules/@sumi/plugins-governance/dist/protected.js +65 -0
- package/node_modules/@sumi/plugins-governance/dist/protected.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/push-base.d.ts +9 -0
- package/node_modules/@sumi/plugins-governance/dist/push-base.js +42 -0
- package/node_modules/@sumi/plugins-governance/dist/push-base.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/semantic.d.ts +5 -0
- package/node_modules/@sumi/plugins-governance/dist/semantic.js +105 -0
- package/node_modules/@sumi/plugins-governance/dist/semantic.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/dist/state.d.ts +48 -0
- package/node_modules/@sumi/plugins-governance/dist/state.js +155 -0
- package/node_modules/@sumi/plugins-governance/dist/state.js.map +1 -0
- package/node_modules/@sumi/plugins-governance/instructions/push.md +20 -0
- package/node_modules/@sumi/plugins-governance/package.json +25 -0
- package/node_modules/@sumi/plugins-governance/sumi-plugins.yaml +23 -0
- package/node_modules/@sumi/plugins-openspec/README.md +80 -0
- package/node_modules/@sumi/plugins-openspec/dist/index.d.ts +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/index.js +2 -0
- package/node_modules/@sumi/plugins-openspec/dist/index.js.map +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/openspec.d.ts +21 -0
- package/node_modules/@sumi/plugins-openspec/dist/openspec.js +59 -0
- package/node_modules/@sumi/plugins-openspec/dist/openspec.js.map +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/plugins/change-tasks.d.ts +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/plugins/change-tasks.js +85 -0
- package/node_modules/@sumi/plugins-openspec/dist/plugins/change-tasks.js.map +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/plugins/planner.d.ts +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/plugins/planner.js +16 -0
- package/node_modules/@sumi/plugins-openspec/dist/plugins/planner.js.map +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/plugins/validate.d.ts +1 -0
- package/node_modules/@sumi/plugins-openspec/dist/plugins/validate.js +45 -0
- package/node_modules/@sumi/plugins-openspec/dist/plugins/validate.js.map +1 -0
- package/node_modules/@sumi/plugins-openspec/package.json +22 -0
- package/node_modules/@sumi/plugins-openspec/sumi-plugins.yaml +20 -0
- package/node_modules/@sumi/plugins-precedent/README.md +162 -0
- package/node_modules/@sumi/plugins-precedent/dist/candidates.d.ts +17 -0
- package/node_modules/@sumi/plugins-precedent/dist/candidates.js +18 -0
- package/node_modules/@sumi/plugins-precedent/dist/candidates.js.map +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/commands/context.d.ts +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/commands/context.js +23 -0
- package/node_modules/@sumi/plugins-precedent/dist/commands/context.js.map +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/commands/promote.d.ts +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/commands/promote.js +89 -0
- package/node_modules/@sumi/plugins-precedent/dist/commands/promote.js.map +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/index.d.ts +2 -0
- package/node_modules/@sumi/plugins-precedent/dist/index.js +3 -0
- package/node_modules/@sumi/plugins-precedent/dist/index.js.map +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/model.d.ts +65 -0
- package/node_modules/@sumi/plugins-precedent/dist/model.js +150 -0
- package/node_modules/@sumi/plugins-precedent/dist/model.js.map +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/plugins/checker.d.ts +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/plugins/checker.js +32 -0
- package/node_modules/@sumi/plugins-precedent/dist/plugins/checker.js.map +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/plugins/harvest.d.ts +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/plugins/harvest.js +174 -0
- package/node_modules/@sumi/plugins-precedent/dist/plugins/harvest.js.map +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/plugins/planner.d.ts +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/plugins/planner.js +103 -0
- package/node_modules/@sumi/plugins-precedent/dist/plugins/planner.js.map +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/plugins/selftest.d.ts +1 -0
- package/node_modules/@sumi/plugins-precedent/dist/plugins/selftest.js +220 -0
- package/node_modules/@sumi/plugins-precedent/dist/plugins/selftest.js.map +1 -0
- package/node_modules/@sumi/plugins-precedent/instructions/distill.md +12 -0
- package/node_modules/@sumi/plugins-precedent/package.json +26 -0
- package/node_modules/@sumi/plugins-precedent/sumi-plugins.yaml +33 -0
- package/node_modules/@sumi/plugins-review/README.md +131 -0
- package/node_modules/@sumi/plugins-review/dist/commands/context.d.ts +1 -0
- package/node_modules/@sumi/plugins-review/dist/commands/context.js +32 -0
- package/node_modules/@sumi/plugins-review/dist/commands/context.js.map +1 -0
- package/node_modules/@sumi/plugins-review/dist/commands/submit.d.ts +1 -0
- package/node_modules/@sumi/plugins-review/dist/commands/submit.js +46 -0
- package/node_modules/@sumi/plugins-review/dist/commands/submit.js.map +1 -0
- package/node_modules/@sumi/plugins-review/dist/index.d.ts +1 -0
- package/node_modules/@sumi/plugins-review/dist/index.js +2 -0
- package/node_modules/@sumi/plugins-review/dist/index.js.map +1 -0
- package/node_modules/@sumi/plugins-review/dist/plugins/rubric.d.ts +1 -0
- package/node_modules/@sumi/plugins-review/dist/plugins/rubric.js +116 -0
- package/node_modules/@sumi/plugins-review/dist/plugins/rubric.js.map +1 -0
- package/node_modules/@sumi/plugins-review/dist/review.d.ts +64 -0
- package/node_modules/@sumi/plugins-review/dist/review.js +104 -0
- package/node_modules/@sumi/plugins-review/dist/review.js.map +1 -0
- package/node_modules/@sumi/plugins-review/package.json +25 -0
- package/node_modules/@sumi/plugins-review/sumi-plugins.yaml +13 -0
- package/node_modules/chownr/LICENSE.md +63 -0
- package/node_modules/chownr/README.md +3 -0
- package/node_modules/chownr/dist/commonjs/index.d.ts +3 -0
- package/node_modules/chownr/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/chownr/dist/commonjs/index.js +93 -0
- package/node_modules/chownr/dist/commonjs/index.js.map +1 -0
- package/node_modules/chownr/dist/commonjs/package.json +3 -0
- package/node_modules/chownr/dist/esm/index.d.ts +3 -0
- package/node_modules/chownr/dist/esm/index.d.ts.map +1 -0
- package/node_modules/chownr/dist/esm/index.js +85 -0
- package/node_modules/chownr/dist/esm/index.js.map +1 -0
- package/node_modules/chownr/dist/esm/package.json +3 -0
- package/node_modules/chownr/package.json +69 -0
- package/node_modules/cross-spawn/LICENSE +21 -0
- package/node_modules/cross-spawn/README.md +89 -0
- package/node_modules/cross-spawn/index.js +39 -0
- package/node_modules/cross-spawn/lib/enoent.js +59 -0
- package/node_modules/cross-spawn/lib/parse.js +91 -0
- package/node_modules/cross-spawn/lib/util/escape.js +47 -0
- package/node_modules/cross-spawn/lib/util/readShebang.js +23 -0
- package/node_modules/cross-spawn/lib/util/resolveCommand.js +52 -0
- package/node_modules/cross-spawn/package.json +73 -0
- package/node_modules/isexe/.npmignore +2 -0
- package/node_modules/isexe/LICENSE +15 -0
- package/node_modules/isexe/README.md +51 -0
- package/node_modules/isexe/index.js +57 -0
- package/node_modules/isexe/mode.js +41 -0
- package/node_modules/isexe/package.json +31 -0
- package/node_modules/isexe/test/basic.js +221 -0
- package/node_modules/isexe/windows.js +42 -0
- package/node_modules/minipass/LICENSE.md +55 -0
- package/node_modules/minipass/README.md +825 -0
- package/node_modules/minipass/dist/commonjs/index.d.ts +545 -0
- package/node_modules/minipass/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/minipass/dist/commonjs/index.js +1038 -0
- package/node_modules/minipass/dist/commonjs/index.js.map +1 -0
- package/node_modules/minipass/dist/commonjs/package.json +3 -0
- package/node_modules/minipass/dist/esm/index.d.ts +545 -0
- package/node_modules/minipass/dist/esm/index.d.ts.map +1 -0
- package/node_modules/minipass/dist/esm/index.js +1020 -0
- package/node_modules/minipass/dist/esm/index.js.map +1 -0
- package/node_modules/minipass/dist/esm/package.json +3 -0
- package/node_modules/minipass/package.json +77 -0
- package/node_modules/minizlib/LICENSE +26 -0
- package/node_modules/minizlib/README.md +64 -0
- package/node_modules/minizlib/dist/commonjs/constants.d.ts +2 -0
- package/node_modules/minizlib/dist/commonjs/constants.d.ts.map +1 -0
- package/node_modules/minizlib/dist/commonjs/constants.js +123 -0
- package/node_modules/minizlib/dist/commonjs/constants.js.map +1 -0
- package/node_modules/minizlib/dist/commonjs/index.d.ts +99 -0
- package/node_modules/minizlib/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/minizlib/dist/commonjs/index.js +416 -0
- package/node_modules/minizlib/dist/commonjs/index.js.map +1 -0
- package/node_modules/minizlib/dist/commonjs/package.json +3 -0
- package/node_modules/minizlib/dist/esm/constants.d.ts +2 -0
- package/node_modules/minizlib/dist/esm/constants.d.ts.map +1 -0
- package/node_modules/minizlib/dist/esm/constants.js +117 -0
- package/node_modules/minizlib/dist/esm/constants.js.map +1 -0
- package/node_modules/minizlib/dist/esm/index.d.ts +99 -0
- package/node_modules/minizlib/dist/esm/index.d.ts.map +1 -0
- package/node_modules/minizlib/dist/esm/index.js +363 -0
- package/node_modules/minizlib/dist/esm/index.js.map +1 -0
- package/node_modules/minizlib/dist/esm/package.json +3 -0
- package/node_modules/minizlib/package.json +80 -0
- package/node_modules/path-key/index.d.ts +40 -0
- package/node_modules/path-key/index.js +16 -0
- package/node_modules/path-key/license +9 -0
- package/node_modules/path-key/package.json +39 -0
- package/node_modules/path-key/readme.md +61 -0
- package/node_modules/picomatch/LICENSE +21 -0
- package/node_modules/picomatch/README.md +743 -0
- package/node_modules/picomatch/index.js +17 -0
- package/node_modules/picomatch/lib/constants.js +184 -0
- package/node_modules/picomatch/lib/parse.js +1425 -0
- package/node_modules/picomatch/lib/picomatch.js +361 -0
- package/node_modules/picomatch/lib/scan.js +403 -0
- package/node_modules/picomatch/lib/utils.js +72 -0
- package/node_modules/picomatch/package.json +83 -0
- package/node_modules/picomatch/posix.js +3 -0
- package/node_modules/shebang-command/index.js +19 -0
- package/node_modules/shebang-command/license +9 -0
- package/node_modules/shebang-command/package.json +34 -0
- package/node_modules/shebang-command/readme.md +34 -0
- package/node_modules/shebang-regex/index.d.ts +22 -0
- package/node_modules/shebang-regex/index.js +2 -0
- package/node_modules/shebang-regex/license +9 -0
- package/node_modules/shebang-regex/package.json +35 -0
- package/node_modules/shebang-regex/readme.md +33 -0
- package/node_modules/tar/LICENSE.md +55 -0
- package/node_modules/tar/README.md +1233 -0
- package/node_modules/tar/dist/commonjs/create.d.ts +3 -0
- package/node_modules/tar/dist/commonjs/create.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/create.js +82 -0
- package/node_modules/tar/dist/commonjs/create.js.map +1 -0
- package/node_modules/tar/dist/commonjs/cwd-error.d.ts +8 -0
- package/node_modules/tar/dist/commonjs/cwd-error.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/cwd-error.js +18 -0
- package/node_modules/tar/dist/commonjs/cwd-error.js.map +1 -0
- package/node_modules/tar/dist/commonjs/extract.d.ts +3 -0
- package/node_modules/tar/dist/commonjs/extract.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/extract.js +88 -0
- package/node_modules/tar/dist/commonjs/extract.js.map +1 -0
- package/node_modules/tar/dist/commonjs/get-write-flag.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/get-write-flag.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/get-write-flag.js +32 -0
- package/node_modules/tar/dist/commonjs/get-write-flag.js.map +1 -0
- package/node_modules/tar/dist/commonjs/header.d.ts +53 -0
- package/node_modules/tar/dist/commonjs/header.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/header.js +348 -0
- package/node_modules/tar/dist/commonjs/header.js.map +1 -0
- package/node_modules/tar/dist/commonjs/index.d.ts +20 -0
- package/node_modules/tar/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/index.js +64 -0
- package/node_modules/tar/dist/commonjs/index.js.map +1 -0
- package/node_modules/tar/dist/commonjs/index.min.js +4 -0
- package/node_modules/tar/dist/commonjs/index.min.js.map +7 -0
- package/node_modules/tar/dist/commonjs/large-numbers.d.ts +3 -0
- package/node_modules/tar/dist/commonjs/large-numbers.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/large-numbers.js +99 -0
- package/node_modules/tar/dist/commonjs/large-numbers.js.map +1 -0
- package/node_modules/tar/dist/commonjs/list.d.ts +7 -0
- package/node_modules/tar/dist/commonjs/list.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/list.js +153 -0
- package/node_modules/tar/dist/commonjs/list.js.map +1 -0
- package/node_modules/tar/dist/commonjs/make-command.d.ts +49 -0
- package/node_modules/tar/dist/commonjs/make-command.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/make-command.js +52 -0
- package/node_modules/tar/dist/commonjs/make-command.js.map +1 -0
- package/node_modules/tar/dist/commonjs/mkdir.d.ts +25 -0
- package/node_modules/tar/dist/commonjs/mkdir.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/mkdir.js +187 -0
- package/node_modules/tar/dist/commonjs/mkdir.js.map +1 -0
- package/node_modules/tar/dist/commonjs/mode-fix.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/mode-fix.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/mode-fix.js +29 -0
- package/node_modules/tar/dist/commonjs/mode-fix.js.map +1 -0
- package/node_modules/tar/dist/commonjs/normalize-unicode.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/normalize-unicode.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/normalize-unicode.js +38 -0
- package/node_modules/tar/dist/commonjs/normalize-unicode.js.map +1 -0
- package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/normalize-windows-path.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/normalize-windows-path.js +12 -0
- package/node_modules/tar/dist/commonjs/normalize-windows-path.js.map +1 -0
- package/node_modules/tar/dist/commonjs/options.d.ts +604 -0
- package/node_modules/tar/dist/commonjs/options.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/options.js +66 -0
- package/node_modules/tar/dist/commonjs/options.js.map +1 -0
- package/node_modules/tar/dist/commonjs/pack.d.ts +105 -0
- package/node_modules/tar/dist/commonjs/pack.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/pack.js +544 -0
- package/node_modules/tar/dist/commonjs/pack.js.map +1 -0
- package/node_modules/tar/dist/commonjs/package.json +3 -0
- package/node_modules/tar/dist/commonjs/parse.d.ts +92 -0
- package/node_modules/tar/dist/commonjs/parse.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/parse.js +655 -0
- package/node_modules/tar/dist/commonjs/parse.js.map +1 -0
- package/node_modules/tar/dist/commonjs/path-reservations.d.ts +11 -0
- package/node_modules/tar/dist/commonjs/path-reservations.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/path-reservations.js +170 -0
- package/node_modules/tar/dist/commonjs/path-reservations.js.map +1 -0
- package/node_modules/tar/dist/commonjs/pax.d.ts +26 -0
- package/node_modules/tar/dist/commonjs/pax.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/pax.js +182 -0
- package/node_modules/tar/dist/commonjs/pax.js.map +1 -0
- package/node_modules/tar/dist/commonjs/process-umask.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/process-umask.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/process-umask.js +7 -0
- package/node_modules/tar/dist/commonjs/process-umask.js.map +1 -0
- package/node_modules/tar/dist/commonjs/read-entry.d.ts +36 -0
- package/node_modules/tar/dist/commonjs/read-entry.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/read-entry.js +136 -0
- package/node_modules/tar/dist/commonjs/read-entry.js.map +1 -0
- package/node_modules/tar/dist/commonjs/replace.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/replace.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/replace.js +227 -0
- package/node_modules/tar/dist/commonjs/replace.js.map +1 -0
- package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/strip-absolute-path.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/strip-absolute-path.js +29 -0
- package/node_modules/tar/dist/commonjs/strip-absolute-path.js.map +1 -0
- package/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/strip-trailing-slashes.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/strip-trailing-slashes.js +18 -0
- package/node_modules/tar/dist/commonjs/strip-trailing-slashes.js.map +1 -0
- package/node_modules/tar/dist/commonjs/symlink-error.d.ts +9 -0
- package/node_modules/tar/dist/commonjs/symlink-error.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/symlink-error.js +19 -0
- package/node_modules/tar/dist/commonjs/symlink-error.js.map +1 -0
- package/node_modules/tar/dist/commonjs/types.d.ts +16 -0
- package/node_modules/tar/dist/commonjs/types.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/types.js +70 -0
- package/node_modules/tar/dist/commonjs/types.js.map +1 -0
- package/node_modules/tar/dist/commonjs/unpack.d.ts +101 -0
- package/node_modules/tar/dist/commonjs/unpack.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/unpack.js +932 -0
- package/node_modules/tar/dist/commonjs/unpack.js.map +1 -0
- package/node_modules/tar/dist/commonjs/update.d.ts +2 -0
- package/node_modules/tar/dist/commonjs/update.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/update.js +33 -0
- package/node_modules/tar/dist/commonjs/update.js.map +1 -0
- package/node_modules/tar/dist/commonjs/warn-method.d.ts +24 -0
- package/node_modules/tar/dist/commonjs/warn-method.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/warn-method.js +31 -0
- package/node_modules/tar/dist/commonjs/warn-method.js.map +1 -0
- package/node_modules/tar/dist/commonjs/winchars.d.ts +3 -0
- package/node_modules/tar/dist/commonjs/winchars.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/winchars.js +14 -0
- package/node_modules/tar/dist/commonjs/winchars.js.map +1 -0
- package/node_modules/tar/dist/commonjs/write-entry.d.ts +129 -0
- package/node_modules/tar/dist/commonjs/write-entry.d.ts.map +1 -0
- package/node_modules/tar/dist/commonjs/write-entry.js +698 -0
- package/node_modules/tar/dist/commonjs/write-entry.js.map +1 -0
- package/node_modules/tar/dist/esm/create.d.ts +3 -0
- package/node_modules/tar/dist/esm/create.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/create.js +76 -0
- package/node_modules/tar/dist/esm/create.js.map +1 -0
- package/node_modules/tar/dist/esm/cwd-error.d.ts +8 -0
- package/node_modules/tar/dist/esm/cwd-error.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/cwd-error.js +14 -0
- package/node_modules/tar/dist/esm/cwd-error.js.map +1 -0
- package/node_modules/tar/dist/esm/extract.d.ts +3 -0
- package/node_modules/tar/dist/esm/extract.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/extract.js +49 -0
- package/node_modules/tar/dist/esm/extract.js.map +1 -0
- package/node_modules/tar/dist/esm/get-write-flag.d.ts +2 -0
- package/node_modules/tar/dist/esm/get-write-flag.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/get-write-flag.js +26 -0
- package/node_modules/tar/dist/esm/get-write-flag.js.map +1 -0
- package/node_modules/tar/dist/esm/header.d.ts +53 -0
- package/node_modules/tar/dist/esm/header.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/header.js +311 -0
- package/node_modules/tar/dist/esm/header.js.map +1 -0
- package/node_modules/tar/dist/esm/index.d.ts +20 -0
- package/node_modules/tar/dist/esm/index.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/index.js +20 -0
- package/node_modules/tar/dist/esm/index.js.map +1 -0
- package/node_modules/tar/dist/esm/index.min.js +4 -0
- package/node_modules/tar/dist/esm/index.min.js.map +7 -0
- package/node_modules/tar/dist/esm/large-numbers.d.ts +3 -0
- package/node_modules/tar/dist/esm/large-numbers.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/large-numbers.js +94 -0
- package/node_modules/tar/dist/esm/large-numbers.js.map +1 -0
- package/node_modules/tar/dist/esm/list.d.ts +7 -0
- package/node_modules/tar/dist/esm/list.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/list.js +113 -0
- package/node_modules/tar/dist/esm/list.js.map +1 -0
- package/node_modules/tar/dist/esm/make-command.d.ts +49 -0
- package/node_modules/tar/dist/esm/make-command.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/make-command.js +48 -0
- package/node_modules/tar/dist/esm/make-command.js.map +1 -0
- package/node_modules/tar/dist/esm/mkdir.d.ts +25 -0
- package/node_modules/tar/dist/esm/mkdir.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/mkdir.js +179 -0
- package/node_modules/tar/dist/esm/mkdir.js.map +1 -0
- package/node_modules/tar/dist/esm/mode-fix.d.ts +2 -0
- package/node_modules/tar/dist/esm/mode-fix.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/mode-fix.js +25 -0
- package/node_modules/tar/dist/esm/mode-fix.js.map +1 -0
- package/node_modules/tar/dist/esm/normalize-unicode.d.ts +2 -0
- package/node_modules/tar/dist/esm/normalize-unicode.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/normalize-unicode.js +34 -0
- package/node_modules/tar/dist/esm/normalize-unicode.js.map +1 -0
- package/node_modules/tar/dist/esm/normalize-windows-path.d.ts +2 -0
- package/node_modules/tar/dist/esm/normalize-windows-path.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/normalize-windows-path.js +9 -0
- package/node_modules/tar/dist/esm/normalize-windows-path.js.map +1 -0
- package/node_modules/tar/dist/esm/options.d.ts +604 -0
- package/node_modules/tar/dist/esm/options.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/options.js +54 -0
- package/node_modules/tar/dist/esm/options.js.map +1 -0
- package/node_modules/tar/dist/esm/pack.d.ts +105 -0
- package/node_modules/tar/dist/esm/pack.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/pack.js +502 -0
- package/node_modules/tar/dist/esm/pack.js.map +1 -0
- package/node_modules/tar/dist/esm/package.json +3 -0
- package/node_modules/tar/dist/esm/parse.d.ts +92 -0
- package/node_modules/tar/dist/esm/parse.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/parse.js +651 -0
- package/node_modules/tar/dist/esm/parse.js.map +1 -0
- package/node_modules/tar/dist/esm/path-reservations.d.ts +11 -0
- package/node_modules/tar/dist/esm/path-reservations.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/path-reservations.js +166 -0
- package/node_modules/tar/dist/esm/path-reservations.js.map +1 -0
- package/node_modules/tar/dist/esm/pax.d.ts +26 -0
- package/node_modules/tar/dist/esm/pax.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/pax.js +178 -0
- package/node_modules/tar/dist/esm/pax.js.map +1 -0
- package/node_modules/tar/dist/esm/process-umask.d.ts +2 -0
- package/node_modules/tar/dist/esm/process-umask.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/process-umask.js +3 -0
- package/node_modules/tar/dist/esm/process-umask.js.map +1 -0
- package/node_modules/tar/dist/esm/read-entry.d.ts +36 -0
- package/node_modules/tar/dist/esm/read-entry.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/read-entry.js +132 -0
- package/node_modules/tar/dist/esm/read-entry.js.map +1 -0
- package/node_modules/tar/dist/esm/replace.d.ts +2 -0
- package/node_modules/tar/dist/esm/replace.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/replace.js +221 -0
- package/node_modules/tar/dist/esm/replace.js.map +1 -0
- package/node_modules/tar/dist/esm/strip-absolute-path.d.ts +2 -0
- package/node_modules/tar/dist/esm/strip-absolute-path.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/strip-absolute-path.js +25 -0
- package/node_modules/tar/dist/esm/strip-absolute-path.js.map +1 -0
- package/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts +2 -0
- package/node_modules/tar/dist/esm/strip-trailing-slashes.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/strip-trailing-slashes.js +14 -0
- package/node_modules/tar/dist/esm/strip-trailing-slashes.js.map +1 -0
- package/node_modules/tar/dist/esm/symlink-error.d.ts +9 -0
- package/node_modules/tar/dist/esm/symlink-error.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/symlink-error.js +15 -0
- package/node_modules/tar/dist/esm/symlink-error.js.map +1 -0
- package/node_modules/tar/dist/esm/types.d.ts +16 -0
- package/node_modules/tar/dist/esm/types.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/types.js +65 -0
- package/node_modules/tar/dist/esm/types.js.map +1 -0
- package/node_modules/tar/dist/esm/unpack.d.ts +101 -0
- package/node_modules/tar/dist/esm/unpack.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/unpack.js +891 -0
- package/node_modules/tar/dist/esm/unpack.js.map +1 -0
- package/node_modules/tar/dist/esm/update.d.ts +2 -0
- package/node_modules/tar/dist/esm/update.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/update.js +30 -0
- package/node_modules/tar/dist/esm/update.js.map +1 -0
- package/node_modules/tar/dist/esm/warn-method.d.ts +24 -0
- package/node_modules/tar/dist/esm/warn-method.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/warn-method.js +27 -0
- package/node_modules/tar/dist/esm/warn-method.js.map +1 -0
- package/node_modules/tar/dist/esm/winchars.d.ts +3 -0
- package/node_modules/tar/dist/esm/winchars.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/winchars.js +9 -0
- package/node_modules/tar/dist/esm/winchars.js.map +1 -0
- package/node_modules/tar/dist/esm/write-entry.d.ts +129 -0
- package/node_modules/tar/dist/esm/write-entry.d.ts.map +1 -0
- package/node_modules/tar/dist/esm/write-entry.js +656 -0
- package/node_modules/tar/dist/esm/write-entry.js.map +1 -0
- package/node_modules/tar/package.json +298 -0
- package/node_modules/which/LICENSE +15 -0
- package/node_modules/which/README.md +54 -0
- package/node_modules/which/bin/node-which +52 -0
- package/node_modules/which/package.json +43 -0
- package/node_modules/which/which.js +125 -0
- package/node_modules/yallist/LICENSE.md +63 -0
- package/node_modules/yallist/README.md +205 -0
- package/node_modules/yallist/dist/commonjs/index.d.ts +39 -0
- package/node_modules/yallist/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/yallist/dist/commonjs/index.js +384 -0
- package/node_modules/yallist/dist/commonjs/index.js.map +1 -0
- package/node_modules/yallist/dist/commonjs/package.json +3 -0
- package/node_modules/yallist/dist/esm/index.d.ts +39 -0
- package/node_modules/yallist/dist/esm/index.d.ts.map +1 -0
- package/node_modules/yallist/dist/esm/index.js +379 -0
- package/node_modules/yallist/dist/esm/index.js.map +1 -0
- package/node_modules/yallist/dist/esm/package.json +3 -0
- package/node_modules/yallist/package.json +68 -0
- package/node_modules/yaml/LICENSE +13 -0
- package/node_modules/yaml/README.md +172 -0
- package/node_modules/yaml/bin.mjs +11 -0
- package/node_modules/yaml/browser/dist/compose/compose-collection.js +88 -0
- package/node_modules/yaml/browser/dist/compose/compose-doc.js +43 -0
- package/node_modules/yaml/browser/dist/compose/compose-node.js +109 -0
- package/node_modules/yaml/browser/dist/compose/compose-scalar.js +86 -0
- package/node_modules/yaml/browser/dist/compose/composer.js +219 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-map.js +115 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +198 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +49 -0
- package/node_modules/yaml/browser/dist/compose/resolve-end.js +37 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +207 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +226 -0
- package/node_modules/yaml/browser/dist/compose/resolve-props.js +146 -0
- package/node_modules/yaml/browser/dist/compose/util-contains-newline.js +34 -0
- package/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +26 -0
- package/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +15 -0
- package/node_modules/yaml/browser/dist/compose/util-map-includes.js +13 -0
- package/node_modules/yaml/browser/dist/doc/Document.js +335 -0
- package/node_modules/yaml/browser/dist/doc/anchors.js +71 -0
- package/node_modules/yaml/browser/dist/doc/applyReviver.js +55 -0
- package/node_modules/yaml/browser/dist/doc/createNode.js +88 -0
- package/node_modules/yaml/browser/dist/doc/directives.js +176 -0
- package/node_modules/yaml/browser/dist/errors.js +57 -0
- package/node_modules/yaml/browser/dist/index.js +17 -0
- package/node_modules/yaml/browser/dist/log.js +11 -0
- package/node_modules/yaml/browser/dist/nodes/Alias.js +118 -0
- package/node_modules/yaml/browser/dist/nodes/Collection.js +147 -0
- package/node_modules/yaml/browser/dist/nodes/Node.js +38 -0
- package/node_modules/yaml/browser/dist/nodes/Pair.js +36 -0
- package/node_modules/yaml/browser/dist/nodes/Scalar.js +24 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLMap.js +144 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +113 -0
- package/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +63 -0
- package/node_modules/yaml/browser/dist/nodes/identity.js +36 -0
- package/node_modules/yaml/browser/dist/nodes/toJS.js +37 -0
- package/node_modules/yaml/browser/dist/parse/cst-scalar.js +214 -0
- package/node_modules/yaml/browser/dist/parse/cst-stringify.js +61 -0
- package/node_modules/yaml/browser/dist/parse/cst-visit.js +97 -0
- package/node_modules/yaml/browser/dist/parse/cst.js +98 -0
- package/node_modules/yaml/browser/dist/parse/lexer.js +721 -0
- package/node_modules/yaml/browser/dist/parse/line-counter.js +39 -0
- package/node_modules/yaml/browser/dist/parse/parser.js +975 -0
- package/node_modules/yaml/browser/dist/public-api.js +102 -0
- package/node_modules/yaml/browser/dist/schema/Schema.js +37 -0
- package/node_modules/yaml/browser/dist/schema/common/map.js +17 -0
- package/node_modules/yaml/browser/dist/schema/common/null.js +15 -0
- package/node_modules/yaml/browser/dist/schema/common/seq.js +17 -0
- package/node_modules/yaml/browser/dist/schema/common/string.js +14 -0
- package/node_modules/yaml/browser/dist/schema/core/bool.js +19 -0
- package/node_modules/yaml/browser/dist/schema/core/float.js +43 -0
- package/node_modules/yaml/browser/dist/schema/core/int.js +38 -0
- package/node_modules/yaml/browser/dist/schema/core/schema.js +23 -0
- package/node_modules/yaml/browser/dist/schema/json/schema.js +62 -0
- package/node_modules/yaml/browser/dist/schema/tags.js +96 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +58 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +26 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +46 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +71 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +67 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +74 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +78 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +39 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +93 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +101 -0
- package/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +146 -0
- package/node_modules/yaml/browser/dist/stringify/stringify.js +129 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +153 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyComment.js +20 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +85 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +25 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyPair.js +150 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyString.js +336 -0
- package/node_modules/yaml/browser/dist/util.js +11 -0
- package/node_modules/yaml/browser/dist/visit.js +233 -0
- package/node_modules/yaml/browser/index.js +5 -0
- package/node_modules/yaml/browser/package.json +3 -0
- package/node_modules/yaml/dist/cli.d.ts +8 -0
- package/node_modules/yaml/dist/cli.mjs +201 -0
- package/node_modules/yaml/dist/compose/compose-collection.d.ts +11 -0
- package/node_modules/yaml/dist/compose/compose-collection.js +90 -0
- package/node_modules/yaml/dist/compose/compose-doc.d.ts +7 -0
- package/node_modules/yaml/dist/compose/compose-doc.js +45 -0
- package/node_modules/yaml/dist/compose/compose-node.d.ts +29 -0
- package/node_modules/yaml/dist/compose/compose-node.js +112 -0
- package/node_modules/yaml/dist/compose/compose-scalar.d.ts +5 -0
- package/node_modules/yaml/dist/compose/compose-scalar.js +88 -0
- package/node_modules/yaml/dist/compose/composer.d.ts +63 -0
- package/node_modules/yaml/dist/compose/composer.js +224 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.js +117 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +11 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.js +200 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.js +51 -0
- package/node_modules/yaml/dist/compose/resolve-end.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-end.js +39 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.js +209 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +10 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +228 -0
- package/node_modules/yaml/dist/compose/resolve-props.d.ts +23 -0
- package/node_modules/yaml/dist/compose/resolve-props.js +148 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.js +28 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +3 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
- package/node_modules/yaml/dist/compose/util-map-includes.d.ts +4 -0
- package/node_modules/yaml/dist/compose/util-map-includes.js +15 -0
- package/node_modules/yaml/dist/doc/Document.d.ts +141 -0
- package/node_modules/yaml/dist/doc/Document.js +337 -0
- package/node_modules/yaml/dist/doc/anchors.d.ts +24 -0
- package/node_modules/yaml/dist/doc/anchors.js +76 -0
- package/node_modules/yaml/dist/doc/applyReviver.d.ts +9 -0
- package/node_modules/yaml/dist/doc/applyReviver.js +57 -0
- package/node_modules/yaml/dist/doc/createNode.d.ts +17 -0
- package/node_modules/yaml/dist/doc/createNode.js +90 -0
- package/node_modules/yaml/dist/doc/directives.d.ts +49 -0
- package/node_modules/yaml/dist/doc/directives.js +178 -0
- package/node_modules/yaml/dist/errors.d.ts +21 -0
- package/node_modules/yaml/dist/errors.js +62 -0
- package/node_modules/yaml/dist/index.d.ts +25 -0
- package/node_modules/yaml/dist/index.js +50 -0
- package/node_modules/yaml/dist/log.d.ts +3 -0
- package/node_modules/yaml/dist/log.js +19 -0
- package/node_modules/yaml/dist/nodes/Alias.d.ts +29 -0
- package/node_modules/yaml/dist/nodes/Alias.js +120 -0
- package/node_modules/yaml/dist/nodes/Collection.d.ts +73 -0
- package/node_modules/yaml/dist/nodes/Collection.js +151 -0
- package/node_modules/yaml/dist/nodes/Node.d.ts +53 -0
- package/node_modules/yaml/dist/nodes/Node.js +40 -0
- package/node_modules/yaml/dist/nodes/Pair.d.ts +22 -0
- package/node_modules/yaml/dist/nodes/Pair.js +39 -0
- package/node_modules/yaml/dist/nodes/Scalar.d.ts +47 -0
- package/node_modules/yaml/dist/nodes/Scalar.js +27 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.d.ts +53 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.js +147 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +60 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.js +115 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +4 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.js +65 -0
- package/node_modules/yaml/dist/nodes/identity.d.ts +23 -0
- package/node_modules/yaml/dist/nodes/identity.js +53 -0
- package/node_modules/yaml/dist/nodes/toJS.d.ts +29 -0
- package/node_modules/yaml/dist/nodes/toJS.js +39 -0
- package/node_modules/yaml/dist/options.d.ts +350 -0
- package/node_modules/yaml/dist/parse/cst-scalar.d.ts +64 -0
- package/node_modules/yaml/dist/parse/cst-scalar.js +218 -0
- package/node_modules/yaml/dist/parse/cst-stringify.d.ts +8 -0
- package/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
- package/node_modules/yaml/dist/parse/cst-visit.d.ts +39 -0
- package/node_modules/yaml/dist/parse/cst-visit.js +99 -0
- package/node_modules/yaml/dist/parse/cst.d.ts +109 -0
- package/node_modules/yaml/dist/parse/cst.js +112 -0
- package/node_modules/yaml/dist/parse/lexer.d.ts +87 -0
- package/node_modules/yaml/dist/parse/lexer.js +723 -0
- package/node_modules/yaml/dist/parse/line-counter.d.ts +22 -0
- package/node_modules/yaml/dist/parse/line-counter.js +41 -0
- package/node_modules/yaml/dist/parse/parser.d.ts +84 -0
- package/node_modules/yaml/dist/parse/parser.js +980 -0
- package/node_modules/yaml/dist/public-api.d.ts +44 -0
- package/node_modules/yaml/dist/public-api.js +107 -0
- package/node_modules/yaml/dist/schema/Schema.d.ts +17 -0
- package/node_modules/yaml/dist/schema/Schema.js +39 -0
- package/node_modules/yaml/dist/schema/common/map.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/map.js +19 -0
- package/node_modules/yaml/dist/schema/common/null.d.ts +4 -0
- package/node_modules/yaml/dist/schema/common/null.js +17 -0
- package/node_modules/yaml/dist/schema/common/seq.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/seq.js +19 -0
- package/node_modules/yaml/dist/schema/common/string.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/string.js +16 -0
- package/node_modules/yaml/dist/schema/core/bool.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/bool.js +21 -0
- package/node_modules/yaml/dist/schema/core/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/float.js +47 -0
- package/node_modules/yaml/dist/schema/core/int.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/int.js +42 -0
- package/node_modules/yaml/dist/schema/core/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/core/schema.js +25 -0
- package/node_modules/yaml/dist/schema/json/schema.d.ts +2 -0
- package/node_modules/yaml/dist/schema/json/schema.js +64 -0
- package/node_modules/yaml/dist/schema/json-schema.d.ts +69 -0
- package/node_modules/yaml/dist/schema/tags.d.ts +48 -0
- package/node_modules/yaml/dist/schema/tags.js +99 -0
- package/node_modules/yaml/dist/schema/types.d.ts +92 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +2 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.js +70 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +7 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +5 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +9 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.js +71 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +22 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.js +77 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +10 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.js +41 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +28 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.js +96 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +6 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +34 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.js +151 -0
- package/node_modules/yaml/dist/stringify/stringify.d.ts +21 -0
- package/node_modules/yaml/dist/stringify/stringify.js +132 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +17 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.js +155 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.d.ts +10 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.js +24 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +4 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.js +87 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +2 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.js +27 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.d.ts +3 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.js +152 -0
- package/node_modules/yaml/dist/stringify/stringifyString.d.ts +9 -0
- package/node_modules/yaml/dist/stringify/stringifyString.js +338 -0
- package/node_modules/yaml/dist/test-events.d.ts +4 -0
- package/node_modules/yaml/dist/test-events.js +134 -0
- package/node_modules/yaml/dist/util.d.ts +16 -0
- package/node_modules/yaml/dist/util.js +28 -0
- package/node_modules/yaml/dist/visit.d.ts +102 -0
- package/node_modules/yaml/dist/visit.js +236 -0
- package/node_modules/yaml/package.json +97 -0
- package/node_modules/yaml/util.js +2 -0
- package/package.json +44 -4
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# @sumi/plugins-review
|
|
2
|
+
|
|
3
|
+
评审插件:按 `control/rubrics/` 下的结构化准则确定适用条目,派发给全新上下文的代理逐条评审,经 `sumi submit` 校验后接受结果,并在内容不变时复用。
|
|
4
|
+
|
|
5
|
+
依赖 `@sumi/plugins-governance`(共享状态目录与人工确认)。
|
|
6
|
+
|
|
7
|
+
## 插件
|
|
8
|
+
|
|
9
|
+
| id | kind | 作用 | 触发条件 / 档位 | `with` 配置项 |
|
|
10
|
+
| --------------- | ----- | ------------------------------------ | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
11
|
+
| `review/rubric` | check | 按一个准则集合评审本次改动涉及的文件 | 插件本身不声明触发条件;在哪个档位运行由流程步骤的 `when` 决定(例如 `when: tier >= runtime`) | `rubric`:准则集合 id(对应 `control/rubrics/<rubric>.yaml`);`mode`:`advisory`(默认)或 `human-confirmed` |
|
|
12
|
+
|
|
13
|
+
每个准则集合在流程中作为一个 `review/rubric` 步骤实例:
|
|
14
|
+
|
|
15
|
+
```yaml
|
|
16
|
+
steps:
|
|
17
|
+
- id: review/architecture
|
|
18
|
+
use: review/rubric
|
|
19
|
+
with: { rubric: architecture, mode: advisory }
|
|
20
|
+
when: tier >= runtime
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`advisory` 评审的步骤若在流程中声明 `required: false`,评审待完成(pending)不影响运行结论。
|
|
24
|
+
|
|
25
|
+
## 命令
|
|
26
|
+
|
|
27
|
+
| 命令 | 作用 |
|
|
28
|
+
| -------------------------------------------------- | ------------------------------------------------------ |
|
|
29
|
+
| `sumi submit <run-id> <step-id> --ticket <ticket>` | 校验并接受评审结果;参数由派发动作给出,不需要手工拼写 |
|
|
30
|
+
| `context-rubrics` | 约束查询命令,供 `sumi context` 调用(见下文) |
|
|
31
|
+
|
|
32
|
+
## 准则文件
|
|
33
|
+
|
|
34
|
+
路径:`control/rubrics/<集合 id>.yaml`。解析代码读取的字段:
|
|
35
|
+
|
|
36
|
+
```yaml
|
|
37
|
+
id: architecture
|
|
38
|
+
items:
|
|
39
|
+
- id: R1 # 条目 id,在集合内唯一
|
|
40
|
+
question: 内核是否只做编排? # 评审问题
|
|
41
|
+
pass: 无策略代码 # 通过标准
|
|
42
|
+
scope: ['src/kernel/**'] # 可选,路径 glob
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
条目适用规则:
|
|
46
|
+
|
|
47
|
+
- 有 `scope` 的条目,在改动文件命中 `scope` 时适用,评审范围是命中的文件。
|
|
48
|
+
- 没有 `scope` 的条目,只要本次有改动就适用,评审范围是全部改动文件。
|
|
49
|
+
- 判例等插件通过 `rubric-item` 类型的执行义务强制纳入某个条目时,该条目必定适用,评审范围加入义务给出的目标文件,不受条目自身 `scope` 限制。义务引用了集合中不存在的条目时,步骤为 `blocked`。
|
|
50
|
+
|
|
51
|
+
没有适用条目时步骤直接 `pass`。
|
|
52
|
+
|
|
53
|
+
## 评审流程
|
|
54
|
+
|
|
55
|
+
1. **生成请求**:插件计算请求键(见下文)。没有可复用的已接受结果时,在步骤的证据目录写入 `review-request.json`,在共享状态目录写入一次性 ticket,步骤返回 `pending`,`next` 中给出一个 `dispatch-review` 动作:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
sumi submit <run-id> <step-id> --ticket <8 位十六进制>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
动作说明中写明请求文件路径、结果文件路径与结果格式。
|
|
62
|
+
|
|
63
|
+
2. **派发评审**:由全新上下文的代理读取请求文件,逐条评审,把结果写到指定的 `review-result.json`。
|
|
64
|
+
|
|
65
|
+
3. **提交**:执行 `sumi submit`。以下任一情况会拒绝提交(退出码 1):
|
|
66
|
+
- ticket 不存在、与运行或步骤不匹配,或已使用过;
|
|
67
|
+
- 结果文件不在派发时指定的路径,或不是合法 JSON;
|
|
68
|
+
- 被评审文件的内容与请求时不一致(需要重新运行流程);
|
|
69
|
+
- 结果没有覆盖全部适用条目、`verdict` 不是 `pass`/`fail`、缺少 `reason`,或 `fail` 条目没有 `file`。
|
|
70
|
+
|
|
71
|
+
通过后结果被接受,ticket 标记为已使用。
|
|
72
|
+
|
|
73
|
+
4. **重跑流程**:插件读到已接受的结果并据此给出结论。
|
|
74
|
+
|
|
75
|
+
### 请求文件(`review-request.json`)
|
|
76
|
+
|
|
77
|
+
| 字段 | 含义 |
|
|
78
|
+
| --------------- | -------------------------------------------------------- |
|
|
79
|
+
| `key` | 请求键 |
|
|
80
|
+
| `rubric` | 准则集合 id |
|
|
81
|
+
| `rubricDigest` | 准则文件内容的 sha256 |
|
|
82
|
+
| `base` | 本次运行的比较基准(可为 `null`) |
|
|
83
|
+
| `contentDigest` | 被评审文件的内容摘要(按路径排序的路径与 git blob id) |
|
|
84
|
+
| `repoRoot` | 仓库根目录 |
|
|
85
|
+
| `items` | 适用条目:准则条目的全部字段,加上本次的评审范围 `files` |
|
|
86
|
+
|
|
87
|
+
### 结果文件(`review-result.json`)
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"verdicts": [
|
|
92
|
+
{ "item": "R1", "verdict": "pass", "reason": "只做编排" },
|
|
93
|
+
{ "item": "R2", "verdict": "fail", "reason": "直接修改了状态字段", "file": "src/order/refund.js", "line": 42 }
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
`file` 与 `line` 可选,但 `verdict` 为 `fail` 时必须给出 `file`。
|
|
99
|
+
|
|
100
|
+
## 结果复用
|
|
101
|
+
|
|
102
|
+
请求键是以下内容的 sha256:准则文件摘要、被评审文件的内容摘要、每个适用条目的 id 及其文件列表。比较基准不进键,因此推送门禁可以复用在工作区完成的评审。准则文件或被评审内容任一变化,都需要重新评审。内容摘要取 git blob id(经 clean 过滤),准则摘要按 LF 计算,因此同一提交在 LF 与 CRLF 检出(如 Windows 的 `core.autocrlf=true`)中得到相同的键。
|
|
103
|
+
|
|
104
|
+
已接受的结果保存在共享状态目录(`git rev-parse --git-common-dir` 下的 `sumi/`)中:
|
|
105
|
+
|
|
106
|
+
| 路径 | 内容 |
|
|
107
|
+
| ---------------------------- | -------------------- |
|
|
108
|
+
| `sumi/reviews/<key>.json` | 已接受的评审结果 |
|
|
109
|
+
| `sumi/tickets/<ticket>.json` | 派发记录与是否已使用 |
|
|
110
|
+
|
|
111
|
+
该目录由所有 worktree 共用,不在工作树中,也不随提交传播。
|
|
112
|
+
|
|
113
|
+
## 结论与报告
|
|
114
|
+
|
|
115
|
+
- 有 `fail` 条目:步骤 `fail`,每个不通过的条目产生一条 `error` 级 finding,规则名为 `<集合>#<条目>`,带文件与行号定位。
|
|
116
|
+
- 全部通过:步骤 `pass`;`human-confirmed` 模式见下一节。
|
|
117
|
+
- 对 `rubric-item` 义务给出回执:条目通过为 `passed`,不通过为 `failed`,结果中没有该条目为 `not-executed`。
|
|
118
|
+
- 已有结果时附条目级报告段落(`#### 评审:<集合>`),表格列出每个条目的问题、结论(通过 / 不通过 / 未评审)与理由,不通过的条目附定位。
|
|
119
|
+
|
|
120
|
+
## 人工确认
|
|
121
|
+
|
|
122
|
+
`mode: human-confirmed` 时,结果全部通过后步骤仍为 `pending`,并发起一个 `review-result` 类型的确认请求(绑定请求键与结果摘要),`next` 中给出 `ask-human` 动作 `sumi approve <请求 id>`。人在自己的终端确认后,重跑流程步骤才为 `pass`。
|
|
123
|
+
|
|
124
|
+
## 约束查询(`context-rubrics`)
|
|
125
|
+
|
|
126
|
+
`sumi context <路径...>` 调用该命令,列出 `control/rubrics/` 下所有准则中范围命中给定路径的条目(没有 `scope` 的条目对所有路径生效)。每个条目包含:
|
|
127
|
+
|
|
128
|
+
- `ref`:`rubric:<集合>#<条目>`,别名 `rubric:<集合>`;
|
|
129
|
+
- `text`:`<问题> 通过标准:<pass>`;
|
|
130
|
+
- `source`:准则文件路径;
|
|
131
|
+
- `global`:条目没有 `scope` 或 `scope` 包含 `**` 时为真。
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { existsSync, readdirSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { readContextInput } from '@sumi/plugin-sdk';
|
|
4
|
+
import picomatch from 'picomatch';
|
|
5
|
+
import { loadRubric } from '../review.js';
|
|
6
|
+
/** 约束查询:范围命中给定路径的评审条目(没有范围的条目对所有路径生效)。 */
|
|
7
|
+
const { repoRoot, paths } = await readContextInput();
|
|
8
|
+
const dir = join(repoRoot, 'control', 'rubrics');
|
|
9
|
+
const items = [];
|
|
10
|
+
for (const file of existsSync(dir)
|
|
11
|
+
? readdirSync(dir)
|
|
12
|
+
.filter((f) => f.endsWith('.yaml'))
|
|
13
|
+
.sort()
|
|
14
|
+
: []) {
|
|
15
|
+
const id = file.replace(/\.yaml$/, '');
|
|
16
|
+
const { rubric } = loadRubric(repoRoot, id);
|
|
17
|
+
for (const item of rubric.items) {
|
|
18
|
+
const hit = item.scope?.length ? paths.some((f) => picomatch(item.scope, { dot: true })(f)) : true;
|
|
19
|
+
if (!hit)
|
|
20
|
+
continue;
|
|
21
|
+
const global = !item.scope?.length || item.scope.includes('**');
|
|
22
|
+
items.push({
|
|
23
|
+
ref: `rubric:${id}#${item.id}`,
|
|
24
|
+
aliases: [`rubric:${id}`],
|
|
25
|
+
text: `${item.question} 通过标准:${item.pass}`,
|
|
26
|
+
source: `control/rubrics/${file}`,
|
|
27
|
+
global,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
process.stdout.write(JSON.stringify({ items }));
|
|
32
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/commands/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAsB,MAAM,kBAAkB,CAAC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,CAAC,EAAE,EAAE;YAC9B,OAAO,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC;YACzB,IAAI,EAAE,GAAG,IAAI,CAAC,QAAQ,SAAS,IAAI,CAAC,IAAI,EAAE;YAC1C,MAAM,EAAE,mBAAmB,IAAI,EAAE;YACjC,MAAM;SACP,CAAC,CAAC;IACL,CAAC;AACH,CAAC;AACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAA0B,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { filesDigest, ticketsDir, validateReviewResult, writeAccepted } from '../review.js';
|
|
4
|
+
/**
|
|
5
|
+
* sumi submit <run-id> <step-id> --ticket <t>:校验并接受评审结果。
|
|
6
|
+
* ticket 必须匹配且未使用,结果文件必须在派发时指定的路径,覆盖全部适用条目,被评审内容未变化。
|
|
7
|
+
*/
|
|
8
|
+
const root = process.env.SUMI_ROOT ?? process.cwd();
|
|
9
|
+
const args = process.argv.slice(2);
|
|
10
|
+
const ti = args.indexOf('--ticket');
|
|
11
|
+
const ticketId = ti >= 0 ? args[ti + 1] : undefined;
|
|
12
|
+
const [runId, stepId] = args.filter((_, i) => i !== ti && i !== ti + 1);
|
|
13
|
+
function reject(message) {
|
|
14
|
+
process.stderr.write(`提交被拒绝:${message}\n`);
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|
|
17
|
+
if (!runId || !stepId || !ticketId)
|
|
18
|
+
reject('用法:sumi submit <run-id> <step-id> --ticket <ticket>');
|
|
19
|
+
const ticketPath = join(ticketsDir(root), `${ticketId}.json`);
|
|
20
|
+
if (!existsSync(ticketPath))
|
|
21
|
+
reject(`ticket ${ticketId} 不存在`);
|
|
22
|
+
const ticket = JSON.parse(readFileSync(ticketPath, 'utf8'));
|
|
23
|
+
if (ticket.runId !== runId || ticket.stepId !== stepId)
|
|
24
|
+
reject('ticket 与运行或步骤不匹配');
|
|
25
|
+
if (ticket.used)
|
|
26
|
+
reject('ticket 已使用');
|
|
27
|
+
if (!existsSync(ticket.resultPath))
|
|
28
|
+
reject(`结果文件不在指定路径:${ticket.resultPath}`);
|
|
29
|
+
const request = JSON.parse(readFileSync(ticket.requestPath, 'utf8'));
|
|
30
|
+
const reviewed = [...new Set(request.items.flatMap((i) => i.files))];
|
|
31
|
+
if (filesDigest(request.repoRoot, reviewed) !== request.contentDigest)
|
|
32
|
+
reject('被评审的内容已变化,请重新运行流程');
|
|
33
|
+
let value;
|
|
34
|
+
try {
|
|
35
|
+
value = JSON.parse(readFileSync(ticket.resultPath, 'utf8'));
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
reject('结果文件不是合法 JSON');
|
|
39
|
+
}
|
|
40
|
+
const errors = validateReviewResult(request, value);
|
|
41
|
+
if (errors.length)
|
|
42
|
+
reject(errors.join(';'));
|
|
43
|
+
writeAccepted(root, request.key, value);
|
|
44
|
+
writeFileSync(ticketPath, JSON.stringify({ ...ticket, used: true }, null, 2));
|
|
45
|
+
process.stdout.write('评审结果已接受,请重新运行流程\n');
|
|
46
|
+
//# sourceMappingURL=submit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submit.js","sourceRoot":"","sources":["../../src/commands/submit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,oBAAoB,EAAE,aAAa,EAAmC,MAAM,cAAc,CAAC;AAE7H;;;GAGG;AACH,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,OAAO,CAAC,GAAG,EA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
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { randomBytes } from 'node:crypto';
|
|
2
|
+
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { definePlugin, result } from '@sumi/plugin-sdk';
|
|
5
|
+
import { requireApproval } from '@sumi/plugins-governance';
|
|
6
|
+
import { applicableItems, filesDigest, loadRubric, readAccepted, requestKey, resultDigest, ticketsDir, } from '../review.js';
|
|
7
|
+
/** 表格单元:去掉换行并转义竖线。 */
|
|
8
|
+
const cell = (text) => text.replace(/\s*\n\s*/g, ' ').replace(/\|/g, '\\|');
|
|
9
|
+
/** 条目级报告段落:准则、每个条目的问题、结论与理由,不通过的条目附定位。 */
|
|
10
|
+
function reportOf(rubricId, items, verdicts) {
|
|
11
|
+
const rows = items.map((item) => {
|
|
12
|
+
const v = verdicts.find((x) => x.item === item.id);
|
|
13
|
+
const verdict = !v ? '未评审' : v.verdict === 'pass' ? '✅ 通过' : '❌ 不通过';
|
|
14
|
+
const where = v?.file ? `(${v.file}${v.line ? `:${v.line}` : ''})` : '';
|
|
15
|
+
return `| ${item.id} | ${cell(item.question)} | ${verdict} | ${cell(v?.reason ?? '')}${where} |`;
|
|
16
|
+
});
|
|
17
|
+
return [`#### 评审:${rubricId}`, '', '| 条目 | 问题 | 结论 | 理由 |', '| --- | --- | --- | --- |', ...rows].join('\n');
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 评审:按结构化准则确定适用条目;有可复用的已接受结果则直接采用,否则返回 pending,
|
|
21
|
+
* 派发给全新上下文的代理完成评审,再由 sumi submit 提交。内核不理解评审,只看到 pending。
|
|
22
|
+
*/
|
|
23
|
+
await definePlugin((ctx) => {
|
|
24
|
+
const rubricId = String(ctx.config.rubric ?? '');
|
|
25
|
+
const mode = ctx.config.mode === 'human-confirmed' ? 'human-confirmed' : 'advisory';
|
|
26
|
+
const { rubric, digest } = loadRubric(ctx.repoRoot, rubricId);
|
|
27
|
+
const forced = new Map();
|
|
28
|
+
for (const o of ctx.obligations.filter((x) => x.type === 'rubric-item')) {
|
|
29
|
+
const item = String(o.target.item);
|
|
30
|
+
if (!rubric.items.some((i) => i.id === item)) {
|
|
31
|
+
return result({ status: 'blocked', summary: `义务 ${o.id} 引用了准则中不存在的条目 ${rubricId}#${item}` });
|
|
32
|
+
}
|
|
33
|
+
forced.set(item, [...(forced.get(item) ?? []), ...(o.target.files ?? [])]);
|
|
34
|
+
}
|
|
35
|
+
const items = applicableItems(rubric, ctx.files, forced);
|
|
36
|
+
if (items.length === 0)
|
|
37
|
+
return result({ status: 'pass', summary: '没有适用的评审条目', checked: ctx.files });
|
|
38
|
+
const reviewed = [...new Set(items.flatMap((i) => i.files))];
|
|
39
|
+
const parts = { rubric: rubricId, rubricDigest: digest, base: ctx.base, contentDigest: filesDigest(ctx.repoRoot, reviewed), items };
|
|
40
|
+
const key = requestKey(parts);
|
|
41
|
+
const accepted = readAccepted(ctx.repoRoot, key);
|
|
42
|
+
if (accepted) {
|
|
43
|
+
const report = reportOf(rubricId, items, accepted.verdicts);
|
|
44
|
+
const findings = accepted.verdicts
|
|
45
|
+
.filter((v) => v.verdict === 'fail')
|
|
46
|
+
.map((v, i) => ({
|
|
47
|
+
id: `F${i + 1}`,
|
|
48
|
+
rule: `${rubricId}#${v.item}`,
|
|
49
|
+
severity: 'error',
|
|
50
|
+
message: v.reason,
|
|
51
|
+
file: v.file,
|
|
52
|
+
line: v.line,
|
|
53
|
+
}));
|
|
54
|
+
const receipts = ctx.obligations
|
|
55
|
+
.filter((o) => o.type === 'rubric-item')
|
|
56
|
+
.map((o) => {
|
|
57
|
+
const v = accepted.verdicts.find((x) => x.item === String(o.target.item));
|
|
58
|
+
return { id: o.id, outcome: v ? (v.verdict === 'pass' ? 'passed' : 'failed') : 'not-executed' };
|
|
59
|
+
});
|
|
60
|
+
if (findings.length) {
|
|
61
|
+
return result({
|
|
62
|
+
status: 'fail',
|
|
63
|
+
summary: `评审未通过:${findings.length} 个条目`,
|
|
64
|
+
findings,
|
|
65
|
+
checked: reviewed,
|
|
66
|
+
obligations: receipts,
|
|
67
|
+
report,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
if (mode === 'human-confirmed') {
|
|
71
|
+
const id = requireApproval(ctx.repoRoot, 'review-result', { key, result: resultDigest(accepted) }, [
|
|
72
|
+
`评审准则 ${rubricId} 的结果全部通过,需要人确认`,
|
|
73
|
+
...accepted.verdicts.map((v) => `${v.item}:${v.reason}`),
|
|
74
|
+
]);
|
|
75
|
+
if (id) {
|
|
76
|
+
return result({
|
|
77
|
+
status: 'pending',
|
|
78
|
+
summary: '评审已通过,等待人工确认',
|
|
79
|
+
checked: reviewed,
|
|
80
|
+
next: [
|
|
81
|
+
{
|
|
82
|
+
type: 'ask-human',
|
|
83
|
+
question: `请确认 ${rubricId} 的评审结果`,
|
|
84
|
+
argv: ['sumi', 'approve', id],
|
|
85
|
+
why: '有放行效力的评审需要人确认',
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return result({ status: 'pass', summary: `评审通过(${items.length} 个条目)`, checked: reviewed, obligations: receipts, report });
|
|
92
|
+
}
|
|
93
|
+
const request = { key, repoRoot: ctx.repoRoot, ...parts };
|
|
94
|
+
mkdirSync(ctx.evidenceDir, { recursive: true });
|
|
95
|
+
const requestPath = join(ctx.evidenceDir, 'review-request.json');
|
|
96
|
+
const resultPath = join(ctx.evidenceDir, 'review-result.json');
|
|
97
|
+
writeFileSync(requestPath, JSON.stringify(request, null, 2));
|
|
98
|
+
const ticket = randomBytes(4).toString('hex');
|
|
99
|
+
const record = { ticket, key, runId: ctx.runId, stepId: ctx.stepId, requestPath, resultPath, used: false };
|
|
100
|
+
writeFileSync(join(ticketsDir(ctx.repoRoot), `${ticket}.json`), JSON.stringify(record, null, 2));
|
|
101
|
+
return result({
|
|
102
|
+
status: 'pending',
|
|
103
|
+
summary: `需要按准则 ${rubricId} 评审 ${items.length} 个条目`,
|
|
104
|
+
checked: reviewed,
|
|
105
|
+
next: [
|
|
106
|
+
{
|
|
107
|
+
type: 'run',
|
|
108
|
+
kind: 'dispatch-review',
|
|
109
|
+
argv: ['sumi', 'submit', ctx.runId, ctx.stepId, '--ticket', ticket],
|
|
110
|
+
effects: ['none'],
|
|
111
|
+
why: `用全新上下文的代理按 ${requestPath} 逐条评审,结果写入 ${resultPath}(格式:{"verdicts":[{"item","verdict":"pass|fail","reason","file?","line?"}]}),然后执行该命令`,
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
//# sourceMappingURL=rubric.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rubric.js","sourceRoot":"","sources":["../../src/plugins/rubric.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,EAA8B,MAAM,kBAAkB,CAAC;AACpF,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EACL,eAAe,EACf,WAAW,EACX,UAAU,EACV,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,UAAU,GAGX,MAAM,cAAc,CAAC;AAEtB,sBAAsB;AACtB,MAAM,IAAI,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAEpF,0CAA0C;AAC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,CAAC;QACZ,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,SAAS,QAAQ,OAAO,KAAK,CAAC,MAAM,MAAM;QACnD,OAAO,EAAE,QAAQ;QACjB,IAAI,EAAE;YACJ;gBACE,IAAI,EAAE,KAAK;gBACX,IAAI,EAAE,iBAAiB;gBACvB,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC;gBACnE,OAAO,EAAE,CAAC,MAAM,CAAC;gBACjB,GAAG,EAAE,cAAc,WAAW,cAAc,UAAU,qFAAqF;aAC5I;SACF;KACF,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export interface RubricItem {
|
|
2
|
+
id: string;
|
|
3
|
+
question: string;
|
|
4
|
+
pass: string;
|
|
5
|
+
scope?: string[];
|
|
6
|
+
}
|
|
7
|
+
export interface Rubric {
|
|
8
|
+
id: string;
|
|
9
|
+
items: RubricItem[];
|
|
10
|
+
}
|
|
11
|
+
export interface RequestItem extends RubricItem {
|
|
12
|
+
/** 本次评审该条目的文件范围。 */
|
|
13
|
+
files: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface ReviewRequest {
|
|
16
|
+
key: string;
|
|
17
|
+
rubric: string;
|
|
18
|
+
rubricDigest: string;
|
|
19
|
+
base: string | null;
|
|
20
|
+
contentDigest: string;
|
|
21
|
+
repoRoot: string;
|
|
22
|
+
items: RequestItem[];
|
|
23
|
+
}
|
|
24
|
+
export interface Verdict {
|
|
25
|
+
item: string;
|
|
26
|
+
verdict: 'pass' | 'fail';
|
|
27
|
+
reason: string;
|
|
28
|
+
file?: string;
|
|
29
|
+
line?: number;
|
|
30
|
+
}
|
|
31
|
+
export interface ReviewResult {
|
|
32
|
+
verdicts: Verdict[];
|
|
33
|
+
}
|
|
34
|
+
export interface Ticket {
|
|
35
|
+
ticket: string;
|
|
36
|
+
key: string;
|
|
37
|
+
runId: string;
|
|
38
|
+
stepId: string;
|
|
39
|
+
requestPath: string;
|
|
40
|
+
resultPath: string;
|
|
41
|
+
used: boolean;
|
|
42
|
+
}
|
|
43
|
+
export declare function loadRubric(root: string, id: string): {
|
|
44
|
+
rubric: Rubric;
|
|
45
|
+
digest: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* 被评审文件的内容摘要:路径与 git blob id,按路径排序;与运行在哪个 worktree、哪个平台无关。
|
|
49
|
+
* blob id 经过 git 的 clean 过滤(core.autocrlf、.gitattributes),工作区的 LF 文件与门禁检出的 CRLF 文件得到同一个值。
|
|
50
|
+
*/
|
|
51
|
+
export declare function filesDigest(root: string, files: string[]): string;
|
|
52
|
+
/**
|
|
53
|
+
* 适用条目:条目范围命中改动文件即适用(无范围的条目在有改动时适用);
|
|
54
|
+
* 条目义务强制纳入,评审范围取义务目标文件,不受条目自身范围限制。
|
|
55
|
+
*/
|
|
56
|
+
export declare function applicableItems(rubric: Rubric, files: string[], forced: Map<string, string[]>): RequestItem[];
|
|
57
|
+
export declare function requestKey(parts: Omit<ReviewRequest, 'key' | 'repoRoot'>): string;
|
|
58
|
+
export declare function reviewsDir(root: string): string;
|
|
59
|
+
export declare function readAccepted(root: string, key: string): ReviewResult | null;
|
|
60
|
+
export declare function writeAccepted(root: string, key: string, result: ReviewResult): void;
|
|
61
|
+
export declare function resultDigest(result: ReviewResult): string;
|
|
62
|
+
export declare function ticketsDir(root: string): string;
|
|
63
|
+
/** 校验评审结果:覆盖全部适用条目,verdict 合法,fail 条目带文件定位。返回错误列表。 */
|
|
64
|
+
export declare function validateReviewResult(request: ReviewRequest, value: unknown): string[];
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { execFileSync } from 'node:child_process';
|
|
2
|
+
import { createHash } from 'node:crypto';
|
|
3
|
+
import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from 'node:fs';
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
import { GIT_MAX_BUFFER } from '@sumi/plugin-sdk';
|
|
6
|
+
import { stateDir } from '@sumi/plugins-governance';
|
|
7
|
+
import picomatch from 'picomatch';
|
|
8
|
+
import { parse } from 'yaml';
|
|
9
|
+
const sha256 = (text) => createHash('sha256').update(text).digest('hex');
|
|
10
|
+
export function loadRubric(root, id) {
|
|
11
|
+
const path = join(root, 'control', 'rubrics', `${id}.yaml`);
|
|
12
|
+
if (!existsSync(path))
|
|
13
|
+
throw new Error(`找不到评审准则 ${path}`);
|
|
14
|
+
const text = readFileSync(path, 'utf8');
|
|
15
|
+
// 摘要按 LF 计算:同一准则在 CRLF 检出(Windows 的 core.autocrlf)与 LF 检出中得到相同摘要。
|
|
16
|
+
return { rubric: parse(text), digest: sha256(text.replace(/\r\n/g, '\n')) };
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 被评审文件的内容摘要:路径与 git blob id,按路径排序;与运行在哪个 worktree、哪个平台无关。
|
|
20
|
+
* blob id 经过 git 的 clean 过滤(core.autocrlf、.gitattributes),工作区的 LF 文件与门禁检出的 CRLF 文件得到同一个值。
|
|
21
|
+
*/
|
|
22
|
+
export function filesDigest(root, files) {
|
|
23
|
+
const sorted = [...files].sort();
|
|
24
|
+
// 子模块在工作区中是目录,与内核的内容摘要一致不纳入
|
|
25
|
+
const present = sorted.filter((f) => existsSync(join(root, f)) && !statSync(join(root, f)).isDirectory());
|
|
26
|
+
const blobs = present.length
|
|
27
|
+
? execFileSync('git', ['hash-object', '--stdin-paths'], {
|
|
28
|
+
cwd: root,
|
|
29
|
+
// 以 " 开头的路径会被 git 当作 C 风格转义串,按转义写法传入
|
|
30
|
+
input: `${present.map((f) => (f.startsWith('"') ? `"${f.replace(/["\\]/g, '\\$&')}"` : f)).join('\n')}\n`,
|
|
31
|
+
encoding: 'utf8',
|
|
32
|
+
windowsHide: true,
|
|
33
|
+
maxBuffer: GIT_MAX_BUFFER,
|
|
34
|
+
})
|
|
35
|
+
.trim()
|
|
36
|
+
.split('\n')
|
|
37
|
+
: [];
|
|
38
|
+
const blobOf = new Map(present.map((f, i) => [f, blobs[i]]));
|
|
39
|
+
return sha256(sorted.map((f) => `${f}\0${blobOf.get(f) ?? '-'}`).join('\n'));
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* 适用条目:条目范围命中改动文件即适用(无范围的条目在有改动时适用);
|
|
43
|
+
* 条目义务强制纳入,评审范围取义务目标文件,不受条目自身范围限制。
|
|
44
|
+
*/
|
|
45
|
+
export function applicableItems(rubric, files, forced) {
|
|
46
|
+
const out = [];
|
|
47
|
+
for (const item of rubric.items) {
|
|
48
|
+
const matched = item.scope?.length ? files.filter((f) => picomatch(item.scope, { dot: true })(f)) : files;
|
|
49
|
+
const forcedFiles = forced.get(item.id);
|
|
50
|
+
const scope = [...new Set([...(matched.length ? matched : []), ...(forcedFiles ?? [])])].sort();
|
|
51
|
+
if (scope.length)
|
|
52
|
+
out.push({ ...item, files: scope });
|
|
53
|
+
}
|
|
54
|
+
return out;
|
|
55
|
+
}
|
|
56
|
+
export function requestKey(parts) {
|
|
57
|
+
return sha256(JSON.stringify({
|
|
58
|
+
// 内容摘要覆盖被评审文件的内容;基准只影响"评审哪些文件",已由 items 的文件列表体现,因此不进键,
|
|
59
|
+
// 这样推送门禁(基准可能是空树或远端旧 OID)能复用工作区完成的评审。
|
|
60
|
+
rubricDigest: parts.rubricDigest,
|
|
61
|
+
contentDigest: parts.contentDigest,
|
|
62
|
+
items: parts.items.map((i) => ({ id: i.id, files: i.files })),
|
|
63
|
+
}));
|
|
64
|
+
}
|
|
65
|
+
export function reviewsDir(root) {
|
|
66
|
+
const dir = join(stateDir(root), 'reviews');
|
|
67
|
+
mkdirSync(dir, { recursive: true });
|
|
68
|
+
return dir;
|
|
69
|
+
}
|
|
70
|
+
export function readAccepted(root, key) {
|
|
71
|
+
const path = join(reviewsDir(root), `${key}.json`);
|
|
72
|
+
return existsSync(path) ? JSON.parse(readFileSync(path, 'utf8')) : null;
|
|
73
|
+
}
|
|
74
|
+
export function writeAccepted(root, key, result) {
|
|
75
|
+
writeFileSync(join(reviewsDir(root), `${key}.json`), JSON.stringify(result, null, 2));
|
|
76
|
+
}
|
|
77
|
+
export function resultDigest(result) {
|
|
78
|
+
return sha256(JSON.stringify(result));
|
|
79
|
+
}
|
|
80
|
+
export function ticketsDir(root) {
|
|
81
|
+
const dir = join(stateDir(root), 'tickets');
|
|
82
|
+
mkdirSync(dir, { recursive: true });
|
|
83
|
+
return dir;
|
|
84
|
+
}
|
|
85
|
+
/** 校验评审结果:覆盖全部适用条目,verdict 合法,fail 条目带文件定位。返回错误列表。 */
|
|
86
|
+
export function validateReviewResult(request, value) {
|
|
87
|
+
const errors = [];
|
|
88
|
+
const verdicts = value?.verdicts;
|
|
89
|
+
if (!Array.isArray(verdicts))
|
|
90
|
+
return ['结果必须包含 verdicts 数组'];
|
|
91
|
+
for (const item of request.items) {
|
|
92
|
+
const v = verdicts.find((x) => x?.item === item.id);
|
|
93
|
+
if (!v)
|
|
94
|
+
errors.push(`缺少条目 ${item.id}`);
|
|
95
|
+
else if (v.verdict !== 'pass' && v.verdict !== 'fail')
|
|
96
|
+
errors.push(`条目 ${item.id} 的 verdict 必须为 pass 或 fail`);
|
|
97
|
+
else if (typeof v.reason !== 'string' || !v.reason)
|
|
98
|
+
errors.push(`条目 ${item.id} 缺少理由`);
|
|
99
|
+
else if (v.verdict === 'fail' && !v.file)
|
|
100
|
+
errors.push(`条目 ${item.id} 判为 fail 时必须给出文件定位`);
|
|
101
|
+
}
|
|
102
|
+
return errors;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=review.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review.js","sourceRoot":"","sources":["../src/review.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC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,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC;QAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC5D,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QACjC,MAAM,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC,CAAC;QACpD,IAAI,CAAC,CAAC;YAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;aAClC,IAAI,CAAC,CAAC,OAAO,KAAK,MAAM,IAAI,CAAC,CAAC,OAAO,KAAK,MAAM;YAAE,MAAM,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,EAAE,4BAA4B,CAAC,CAAC;aACzG,IAAI,OAAO,CAAC,CAAC,MAAM,KAAK,QAAQ,IAAI,CAAC,CAAC,CAAC,MAAM;YAAE,MAAM,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;aACjF,IAAI,CAAC,CAAC,OAAO,KAAK,MAAM,IAAI,CAAC,CAAC,CAAC,IAAI;YAAE,MAAM,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,EAAE,oBAAoB,CAAC,CAAC;IAC3F,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sumi/plugins-review",
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "评审插件",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@sumi/plugin-sdk": "0.5.0",
|
|
17
|
+
"yaml": "2.9.1",
|
|
18
|
+
"picomatch": "4.0.7",
|
|
19
|
+
"@sumi/plugins-governance": "0.5.0"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"sumi-plugins.yaml"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# 评审插件:按结构化准则派发独立代理评审。每个准则在流程中作为一个 review/rubric 步骤实例(with.rubric)。
|
|
2
|
+
plugins:
|
|
3
|
+
- id: review/rubric
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
kind: check
|
|
6
|
+
command: [node, ./dist/plugins/rubric.js]
|
|
7
|
+
timeout: 60
|
|
8
|
+
requires: ['@sumi/plugins-governance']
|
|
9
|
+
description: 按结构化准则派发独立代理评审
|
|
10
|
+
context: context-rubrics
|
|
11
|
+
commands:
|
|
12
|
+
- { name: submit, argv: [node, ./dist/commands/submit.js], description: 提交评审结果 }
|
|
13
|
+
- { name: context-rubrics, argv: [node, ./dist/commands/context.js], description: 列出给定路径上适用的评审条目 }
|