@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 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { definePlugin, gitPaths, result } from '@sumi/plugin-sdk';
|
|
2
|
+
import { configAt, protectedMatcher } from '../protected.js';
|
|
3
|
+
/** 受保护路径:列出本次改动中的 control 变更(按基准与当前两边声明的并集),提醒推送前需要人工确认。 */
|
|
4
|
+
await definePlugin((ctx) => {
|
|
5
|
+
const isProtected = protectedMatcher(configAt(ctx.repoRoot, ctx.base), configAt(ctx.repoRoot, null));
|
|
6
|
+
// 全量运行时 ctx.files 是全仓文件,这里只关心相对基准真正变化的文件。
|
|
7
|
+
const files = ctx.all && ctx.base
|
|
8
|
+
? [
|
|
9
|
+
...new Set([
|
|
10
|
+
...gitPaths(ctx.repoRoot, ['diff', '--name-only', ctx.base]),
|
|
11
|
+
...gitPaths(ctx.repoRoot, ['ls-files', '--others', '--exclude-standard']),
|
|
12
|
+
]),
|
|
13
|
+
].filter(Boolean)
|
|
14
|
+
: ctx.files;
|
|
15
|
+
const changed = files.filter((f) => isProtected(f));
|
|
16
|
+
// 只列出前几个文件,避免简报被大量 info 淹没;完整列表见 checked。
|
|
17
|
+
const findings = changed.slice(0, 5).map((file, i) => ({
|
|
18
|
+
id: `F${i + 1}`,
|
|
19
|
+
rule: 'control-change',
|
|
20
|
+
severity: 'info',
|
|
21
|
+
message: 'control 变更,推送前需要人工确认',
|
|
22
|
+
file,
|
|
23
|
+
}));
|
|
24
|
+
return result({
|
|
25
|
+
status: 'pass',
|
|
26
|
+
summary: changed.length ? `control 变更 ${changed.length} 个文件,推送前需要人工确认` : '没有 control 变更',
|
|
27
|
+
findings,
|
|
28
|
+
checked: files,
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
//# s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,CAAC,GAAG,CAAC,EAAE;QACf,IAAI,EAAE,gBAAgB;QACtB,QAAQ,EAAE,MAAM;QAChB,OAAO,EAAE,sBAAsB;QAC/B,IAAI;KACL,CAAC,CAAC,CAAC;IACJ,OAAO,MAAM,CAAC;QACZ,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,cAAc,OAAO,CAAC,MAAM,gBAAgB,CAAC,CAAC,CAAC,eAAe;QACxF,QAAQ;QACR,OAAO,EAAE,KAAK;KACf,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface PrBaseView {
|
|
2
|
+
headRefOid: string;
|
|
3
|
+
baseRefOid: string;
|
|
4
|
+
baseRefName: string;
|
|
5
|
+
url: string;
|
|
6
|
+
}
|
|
7
|
+
export interface GitResult {
|
|
8
|
+
status: number | null;
|
|
9
|
+
stdout: string;
|
|
10
|
+
stderr: string;
|
|
11
|
+
}
|
|
12
|
+
export type GitRunner = (args: string[]) => GitResult;
|
|
13
|
+
/** PR URL 指向 base repository;从中构造无需依赖本地 remote 名称的 Git URL。 */
|
|
14
|
+
export declare function baseRepositoryGitUrl(prUrl: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* 以 GitHub PR 返回的精确 base head 计算合并基础。缺对象时只补取 PR 基仓库的目标分支,
|
|
17
|
+
* 不读取或更新 origin/<base>,避免 fork remote 与陈旧 tracking ref 扭曲检查范围。
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolvePrBase(view: PrBaseView, run: GitRunner): string;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
const oid = (value, label) => {
|
|
2
|
+
if (!/^[0-9a-f]{40,64}$/.test(value))
|
|
3
|
+
throw new Error(`GitHub 返回的 ${label} OID 无效:${value || '(空)'}`);
|
|
4
|
+
return value;
|
|
5
|
+
};
|
|
6
|
+
/** PR URL 指向 base repository;从中构造无需依赖本地 remote 名称的 Git URL。 */
|
|
7
|
+
export function baseRepositoryGitUrl(prUrl) {
|
|
8
|
+
let parsed;
|
|
9
|
+
try {
|
|
10
|
+
parsed = new URL(prUrl);
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
throw new Error(`无法从 PR 地址确定基仓库:${prUrl}`);
|
|
14
|
+
}
|
|
15
|
+
const match = /^\/([^/]+)\/([^/]+)\/pull\/\d+\/?$/.exec(parsed.pathname);
|
|
16
|
+
if (!match)
|
|
17
|
+
throw new Error(`无法从 PR 地址确定基仓库:${prUrl}`);
|
|
18
|
+
const owner = encodeURIComponent(decodeURIComponent(match[1]));
|
|
19
|
+
const repo = encodeURIComponent(decodeURIComponent(match[2].replace(/\.git$/, '')));
|
|
20
|
+
return `${parsed.origin}/${owner}/${repo}.git`;
|
|
21
|
+
}
|
|
22
|
+
const hasCommit = (run, value) => run(['cat-file', '-e', `${value}^{commit}`]).status === 0;
|
|
23
|
+
/**
|
|
24
|
+
* 以 GitHub PR 返回的精确 base head 计算合并基础。缺对象时只补取 PR 基仓库的目标分支,
|
|
25
|
+
* 不读取或更新 origin/<base>,避免 fork remote 与陈旧 tracking ref 扭曲检查范围。
|
|
26
|
+
*/
|
|
27
|
+
export function resolvePrBase(view, run) {
|
|
28
|
+
const head = oid(view.headRefOid, 'PR head');
|
|
29
|
+
const target = oid(view.baseRefOid, 'PR base head');
|
|
30
|
+
if (!view.baseRefName || view.baseRefName.startsWith('-'))
|
|
31
|
+
throw new Error(`GitHub 返回的目标分支名称无效:${view.baseRefName || '(空)'}`);
|
|
32
|
+
if (!hasCommit(run, target)) {
|
|
33
|
+
const repository = baseRepositoryGitUrl(view.url);
|
|
34
|
+
const fetched = run(['fetch', '--no-tags', repository, `refs/heads/${view.baseRefName}`]);
|
|
35
|
+
if (fetched.status !== 0) {
|
|
36
|
+
const detail = fetched.stderr.trim().split('\n')[0];
|
|
37
|
+
throw new Error(`无法从 PR 基仓库补取 ${view.baseRefName}${detail ? `:${detail}` : ''}`);
|
|
38
|
+
}
|
|
39
|
+
if (!hasCommit(run, target)) {
|
|
40
|
+
throw new Error(`补取后仍缺少 GitHub 返回的目标提交 ${target.slice(0, 8)};目标分支可能已变化,请重新运行`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
const merged = run(['merge-base', target, head]);
|
|
44
|
+
const base = merged.status === 0 ? merged.stdout.trim() : '';
|
|
45
|
+
if (!base)
|
|
46
|
+
throw new Error(`PR 头提交与 GitHub 目标分支 ${view.baseRefName}(${target.slice(0, 8)})没有共同祖先`);
|
|
47
|
+
return base;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=pr-base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pr-base.js","sourceRoot":"","sources":["../src/pr-base.ts"],"names":[],"mappings":"AAeA,MAAM,GAAG,GAAG,CAAC,KAAa,EAAE,KAAa,EAAU,EAAE;IACnD,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,cAAc,KAAK,WAAW,KAAK,IAAI,KAAK,EAAE,CAAC,CAAC;IACtG,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,+DAA+D;AAC/D,MAAM,UAAU,oBAAoB,CAAC,KAAa;IAChD,IAAI,MAAW,CAAC;IAChB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,kBAAkB,KAAK,EAAE,CAAC,CAAC;IAC7C,CAAC;IACD,MAAM,KAAK,GAAG,oCAAoC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACzE,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,kBAAkB,KAAK,EAAE,CAAC,CAAC;IACvD,MAAM,KAAK,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,KAAK,CA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AC,CAAC,CAAC,CAAC;YACpD,MAAM,IAAI,KAAK,CAAC,gBAAgB,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACnF,CAAC;QACD,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,KAAK,CAAC,yBAAyB,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,kBAAkB,CAAC,CAAC;QACjF,CAAC;IACH,CAAC;IAED,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,YAAY,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;IACjD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7D,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,IAAI,CAAC,WAAW,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC;IACnG,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const PR_REPORT_MARKER = '<!-- sumi-pr-report -->';
|
|
2
|
+
export function prReportHeadMarker(oid) {
|
|
3
|
+
return `<!-- sumi-pr-report-head:${oid} -->`;
|
|
4
|
+
}
|
|
5
|
+
export function prReportHead(body) {
|
|
6
|
+
return /<!-- sumi-pr-report-head:([0-9a-f]{40}) -->/i.exec(body)?.[1]?.toLowerCase() ?? null;
|
|
7
|
+
}
|
|
8
|
+
export function isPrReport(body) {
|
|
9
|
+
return body.startsWith(PR_REPORT_MARKER);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=pr-report-markers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pr-report-markers.js","sourceRoot":"","sources":["../src/pr-report-markers.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,yBAAyB,CAAC;AAE1D,MAAM,UAAU,kBAAkB,CAAC,GAAW;IAC5C,OAAO,4BAA4B,GAAG,MAAM,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,OAAO,8CAA8C,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,IAAI,CAAC;AAC/F,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,OAAO,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface CommandResult {
|
|
2
|
+
status: number | null;
|
|
3
|
+
stdout: string;
|
|
4
|
+
stderr: string;
|
|
5
|
+
error?: Error;
|
|
6
|
+
}
|
|
7
|
+
export type CommandRunner = (command: string, args: string[], cwd: string) => CommandResult;
|
|
8
|
+
export interface PrReportStatus {
|
|
9
|
+
pass: boolean;
|
|
10
|
+
message?: string;
|
|
11
|
+
pr?: number;
|
|
12
|
+
}
|
|
13
|
+
/** 只读核验当前分支开放 PR 的 Sumi 报告是否绑定当前 head。 */
|
|
14
|
+
export declare function checkPrReportStatus(root: string, run?: CommandRunner): PrReportStatus;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { PROJECT_SUMI, spawnCommandSync } from '@sumi/plugin-sdk';
|
|
2
|
+
import { isPrReport, prReportHead } from './pr-report-markers.js';
|
|
3
|
+
const defaultRunner = (command, args, cwd) => {
|
|
4
|
+
const result = spawnCommandSync(command, args, { cwd, encoding: 'utf8', windowsHide: true });
|
|
5
|
+
return {
|
|
6
|
+
status: result.status,
|
|
7
|
+
stdout: result.stdout ?? '',
|
|
8
|
+
stderr: result.stderr ?? '',
|
|
9
|
+
error: result.error,
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
function detail(result) {
|
|
13
|
+
return result.error?.message ?? (`${result.stderr}${result.stdout}`.trim() || `退出码 ${result.status ?? '未知'}`);
|
|
14
|
+
}
|
|
15
|
+
function json(result, action) {
|
|
16
|
+
try {
|
|
17
|
+
return JSON.parse(result.stdout);
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
throw new Error(`${action} 返回了无效 JSON`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function block(message, pr) {
|
|
24
|
+
return { pass: false, message, ...(pr === undefined ? {} : { pr }) };
|
|
25
|
+
}
|
|
26
|
+
/** 只读核验当前分支开放 PR 的 Sumi 报告是否绑定当前 head。 */
|
|
27
|
+
export function checkPrReportStatus(root, run = defaultRunner) {
|
|
28
|
+
const headResult = run('git', ['rev-parse', '--verify', 'HEAD'], root);
|
|
29
|
+
if (headResult.status !== 0)
|
|
30
|
+
return block(`无法读取本地 HEAD:${detail(headResult)}`);
|
|
31
|
+
const head = headResult.stdout.trim().toLowerCase();
|
|
32
|
+
const branchResult = run('git', ['symbolic-ref', '--quiet', '--short', 'HEAD'], root);
|
|
33
|
+
if (branchResult.status !== 0)
|
|
34
|
+
return block('当前检出处于 detached HEAD,无法可靠判断对应的开放 PR');
|
|
35
|
+
const branch = branchResult.stdout.trim();
|
|
36
|
+
const auth = run('gh', ['auth', 'status'], root);
|
|
37
|
+
if (auth.status !== 0)
|
|
38
|
+
return block(`无法验证 GitHub 登录状态:${detail(auth)}。请先运行 gh auth login`);
|
|
39
|
+
const fields = 'number,headRefOid,url,comments,state';
|
|
40
|
+
let view = run('gh', ['pr', 'view', '--json', fields], root);
|
|
41
|
+
let pr = null;
|
|
42
|
+
if (view.status === 0) {
|
|
43
|
+
try {
|
|
44
|
+
const candidate = json(view, 'gh pr view');
|
|
45
|
+
if (candidate.state && candidate.state !== 'OPEN')
|
|
46
|
+
return { pass: true };
|
|
47
|
+
pr = candidate;
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
return block(error.message);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
const listed = run('gh', ['pr', 'list', '--state', 'open', '--head', branch, '--json', 'number,headRefOid,url'], root);
|
|
55
|
+
if (listed.status !== 0)
|
|
56
|
+
return block(`无法查询当前分支的开放 PR:${detail(listed)}`);
|
|
57
|
+
let candidates;
|
|
58
|
+
try {
|
|
59
|
+
candidates = json(listed, 'gh pr list');
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
return block(error.message);
|
|
63
|
+
}
|
|
64
|
+
if (candidates.length === 0)
|
|
65
|
+
return { pass: true };
|
|
66
|
+
if (candidates.length > 1)
|
|
67
|
+
return block(`分支 ${branch} 对应 ${candidates.length} 个开放 PR,无法唯一判断报告状态`);
|
|
68
|
+
const candidate = candidates[0];
|
|
69
|
+
view = run('gh', ['pr', 'view', String(candidate.number), '--json', fields], root);
|
|
70
|
+
if (view.status !== 0)
|
|
71
|
+
return block(`无法读取 PR #${candidate.number}:${detail(view)}`, candidate.number);
|
|
72
|
+
try {
|
|
73
|
+
pr = json(view, `gh pr view ${candidate.number}`);
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
return block(error.message, candidate.number);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
if (!pr || !Number.isInteger(pr.number) || !/^[0-9a-f]{40}$/i.test(pr.headRefOid ?? '')) {
|
|
80
|
+
return block('GitHub 返回的 PR 信息不完整,无法可靠判断报告状态');
|
|
81
|
+
}
|
|
82
|
+
const prHead = pr.headRefOid.toLowerCase();
|
|
83
|
+
if (head !== prHead) {
|
|
84
|
+
return block(`PR #${pr.number} 的头提交是 ${prHead.slice(0, 8)},本地 HEAD 是 ${head.slice(0, 8)}。请先推送当前提交或切回 PR 头提交`, pr.number);
|
|
85
|
+
}
|
|
86
|
+
const report = (pr.comments ?? []).map((comment) => comment.body ?? '').find(isPrReport);
|
|
87
|
+
if (!report)
|
|
88
|
+
return block(`PR #${pr.number} 缺少 Sumi 审查报告。请运行:${PROJECT_SUMI} pr-report ${pr.number}`, pr.number);
|
|
89
|
+
const reportHead = prReportHead(report);
|
|
90
|
+
if (!reportHead)
|
|
91
|
+
return block(`PR #${pr.number} 的 Sumi 报告没有完整 head OID,已过期。请运行:${PROJECT_SUMI} pr-report ${pr.number}`, pr.number);
|
|
92
|
+
if (reportHead !== prHead) {
|
|
93
|
+
return block(`PR #${pr.number} 的 Sumi 报告绑定 ${reportHead.slice(0, 8)},当前 head 为 ${prHead.slice(0, 8)},报告已过期。请运行:${PROJECT_SUMI} pr-report ${pr.number}`, pr.number);
|
|
94
|
+
}
|
|
95
|
+
return { pass: true, pr: pr.number };
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=pr-report-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pr-report-status.js","sourceRoot":"","sources":["../src/pr-report-status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAwBlE,MAAM,aAAa,GAAkB,CAAC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;IAC1D,MAAM,MAAM,GAAG,gBAAgB,CAAC,OAAO,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7F,OAAO;QACL,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,EAAE;QAC3B,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,EAAE;QAC3B,KAAK,EAAE,MAAM,CAAC,KAAK;KACpB,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,MAAM,CAAC,M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EAAE,EAAE,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** 默认受保护路径:control 层、判例层、配置、入口文档、AI 工具适配、工具配置、包清单与锁文件。 */
|
|
2
|
+
export declare const DEFAULT_PROTECTED: string[];
|
|
3
|
+
export interface GovernanceConfig {
|
|
4
|
+
protected?: string[];
|
|
5
|
+
zones?: {
|
|
6
|
+
control?: string[];
|
|
7
|
+
};
|
|
8
|
+
gate?: {
|
|
9
|
+
flow?: string;
|
|
10
|
+
tier?: string;
|
|
11
|
+
prepare?: string[];
|
|
12
|
+
defaultBranch?: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare function parseConfig(text: string | null): GovernanceConfig | null;
|
|
16
|
+
/** 读取某个提交(或工作区,ref 为 null)中的项目配置;不存在时返回 null。 */
|
|
17
|
+
export declare function configAt(root: string, ref: string | null): GovernanceConfig | null;
|
|
18
|
+
export declare function protectedGlobs(config: GovernanceConfig | null): string[];
|
|
19
|
+
/** 受保护路径集合按两边声明的并集计算,缩小保护范围本身也会被当作 control 变更。 */
|
|
20
|
+
export declare function protectedMatcher(...configs: (GovernanceConfig | null)[]): (file: string) => boolean;
|
|
21
|
+
/** 文件系统路径用的受保护判断:Windows 与 macOS 默认不区分大小写,`Control/config.yaml` 指向的就是 control 区。 */
|
|
22
|
+
export declare function protectedPathMatcher(configs: (GovernanceConfig | null)[], platform?: NodeJS.Platform): (file: string) => boolean;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { execFileSync } from 'node:child_process';
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { CONFIG_FILES, configFile } from '@sumi/plugin-sdk';
|
|
5
|
+
import picomatch from 'picomatch';
|
|
6
|
+
import { parse } from 'yaml';
|
|
7
|
+
/** 默认受保护路径:control 层、判例层、配置、入口文档、AI 工具适配、工具配置、包清单与锁文件。 */
|
|
8
|
+
export const DEFAULT_PROTECTED = [
|
|
9
|
+
'control/**',
|
|
10
|
+
'precedents/**',
|
|
11
|
+
'sumi.config.yaml',
|
|
12
|
+
'AGENTS.md',
|
|
13
|
+
'CLAUDE.md',
|
|
14
|
+
'.claude/**',
|
|
15
|
+
'.agents/**',
|
|
16
|
+
'.cursor/**',
|
|
17
|
+
'eslint.config.*',
|
|
18
|
+
'.prettierrc*',
|
|
19
|
+
'tsconfig*.json',
|
|
20
|
+
'vitest.config.*',
|
|
21
|
+
'package.json',
|
|
22
|
+
'**/package.json',
|
|
23
|
+
'pnpm-lock.yaml',
|
|
24
|
+
'package-lock.json',
|
|
25
|
+
'yarn.lock',
|
|
26
|
+
];
|
|
27
|
+
export function parseConfig(text) {
|
|
28
|
+
if (text === null)
|
|
29
|
+
return null;
|
|
30
|
+
return (parse(text) ?? {});
|
|
31
|
+
}
|
|
32
|
+
/** 读取某个提交(或工作区,ref 为 null)中的项目配置;不存在时返回 null。 */
|
|
33
|
+
export function configAt(root, ref) {
|
|
34
|
+
if (ref === null) {
|
|
35
|
+
const rel = configFile(root);
|
|
36
|
+
return rel ? parseConfig(readFileSync(join(root, rel), 'utf8')) : null;
|
|
37
|
+
}
|
|
38
|
+
for (const rel of CONFIG_FILES) {
|
|
39
|
+
try {
|
|
40
|
+
return parseConfig(execFileSync('git', ['show', `${ref}:${rel}`], {
|
|
41
|
+
cwd: root,
|
|
42
|
+
encoding: 'utf8',
|
|
43
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
44
|
+
windowsHide: true,
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
// 该提交中没有这个位置的配置,尝试下一个。
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
export function protectedGlobs(config) {
|
|
54
|
+
// 配置登记的 control 区一律受保护:纳管时登记进来的规则目录无需另行声明。
|
|
55
|
+
return [...DEFAULT_PROTECTED, ...(config?.zones?.control ?? []), ...(config?.protected ?? [])];
|
|
56
|
+
}
|
|
57
|
+
/** 受保护路径集合按两边声明的并集计算,缩小保护范围本身也会被当作 control 变更。 */
|
|
58
|
+
export function protectedMatcher(...configs) {
|
|
59
|
+
return picomatch([...new Set(configs.flatMap(protectedGlobs))], { dot: true });
|
|
60
|
+
}
|
|
61
|
+
/** 文件系统路径用的受保护判断:Windows 与 macOS 默认不区分大小写,`Control/config.yaml` 指向的就是 control 区。 */
|
|
62
|
+
export function protectedPathMatcher(configs, platform = process.platform) {
|
|
63
|
+
return picomatch([...new Set(configs.flatMap(protectedGlobs))], { dot: true, nocase: platform === 'win32' || platform === 'darwin' });
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=protected.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protected.js","sourceRoot":"","sources":["../src/protected.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAE7B,0DAA0D;AAC1D,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,YAAY;IACZ,eAAe;IACf,kBAAkB;IAClB,WAAW;IACX,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,iBAAiB;IACjB,cAAc;IACd,gBAAgB;IAChB,iBAAiB;IACjB,cAAc;IACd,iBAAiB;IACjB,gBAAgB;IAChB,mBAAmB;IACnB,WAAW;CACZ,CAAC;AAQF,MAAM,UAAU,WAAW,CAAC,IAAmB;IAC7C,IAAI,IAAI,KAAK,IAAI;QAAE,OAA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AC,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;AACjF,CAAC;AAED,oFAAoF;AACpF,MAAM,UAAU,oBAAoB,CAClC,OAAoC,EACpC,WAA4B,OAAO,CAAC,QAAQ;IAE5C,OAAO,SAAS,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,KAAK,OAAO,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC,CAAC;AACxI,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface PushUpstream {
|
|
2
|
+
name: string;
|
|
3
|
+
oid: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* 解析被推送本地分支的 Git upstream,并证明它位于安全的祖先链上。
|
|
7
|
+
* existingRemoteOid 为 null 表示新建远端 ref;已有 ref 还要求 upstream 覆盖远端旧历史。
|
|
8
|
+
*/
|
|
9
|
+
export declare function resolvePushUpstream(root: string, localRef: string, candidateOid: string, existingRemoteOid: string | null): PushUpstream | null;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { execFileSync, spawnSync } from 'node:child_process';
|
|
2
|
+
function tryGit(root, args) {
|
|
3
|
+
try {
|
|
4
|
+
return execFileSync('git', args, {
|
|
5
|
+
cwd: root,
|
|
6
|
+
encoding: 'utf8',
|
|
7
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
8
|
+
windowsHide: true,
|
|
9
|
+
}).trim();
|
|
10
|
+
}
|
|
11
|
+
catch {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function isAncestor(root, ancestor, descendant) {
|
|
16
|
+
return (spawnSync('git', ['merge-base', '--is-ancestor', ancestor, descendant], {
|
|
17
|
+
cwd: root,
|
|
18
|
+
windowsHide: true,
|
|
19
|
+
}).status === 0);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 解析被推送本地分支的 Git upstream,并证明它位于安全的祖先链上。
|
|
23
|
+
* existingRemoteOid 为 null 表示新建远端 ref;已有 ref 还要求 upstream 覆盖远端旧历史。
|
|
24
|
+
*/
|
|
25
|
+
export function resolvePushUpstream(root, localRef, candidateOid, existingRemoteOid) {
|
|
26
|
+
if (!localRef.startsWith('refs/heads/')) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
const ref = tryGit(root, ['for-each-ref', '--format=%(upstream)', '--count=1', localRef]);
|
|
30
|
+
if (!ref) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
const oid = tryGit(root, ['rev-parse', '--verify', '--quiet', `${ref}^{commit}`]);
|
|
34
|
+
if (!oid || !isAncestor(root, oid, candidateOid)) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
if (existingRemoteOid && !isAncestor(root, existingRemoteOid, oid)) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
return { name: ref.replace(/^refs\/remotes\//, ''), oid };
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=push-base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"push-base.js","sourceRoot":"","sources":["../src/push-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAO7D,SAAS,MAAM,CAAC,IAAY,EAAE,IAAc;IAC1C,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,KAAK,EAAE,IAAI,EAAE;YAC/B,GAAG,EAAE,IAAI;YACT,QAAQ,EAAE,MAAM;YAChB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;YACjC,WAAW,EAAE,IAAI;SAClB,CAAC,CAAC,IAAI,EAAE,CAAC;IACZ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,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in-sdk';
|
|
2
|
+
import { execFileSync } from 'node:child_process';
|
|
3
|
+
import { parse } from 'yaml';
|
|
4
|
+
import { configAt, protectedGlobs } from './protected.js';
|
|
5
|
+
function show(root, ref, path) {
|
|
6
|
+
if (ref === null)
|
|
7
|
+
return null;
|
|
8
|
+
try {
|
|
9
|
+
return execFileSync('git', ['show', `${ref}:${path}`], {
|
|
10
|
+
cwd: root,
|
|
11
|
+
encoding: 'utf8',
|
|
12
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
13
|
+
windowsHide: true,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function flowSteps(text) {
|
|
21
|
+
const steps = new Map();
|
|
22
|
+
if (!text)
|
|
23
|
+
return steps;
|
|
24
|
+
const raw = parse(text)?.steps ?? [];
|
|
25
|
+
for (const s of raw) {
|
|
26
|
+
const use = String(s.use);
|
|
27
|
+
const id = typeof s.id === 'string' ? s.id : use;
|
|
28
|
+
steps.set(id, { id, use, required: s.required !== false, when: typeof s.when === 'string' ? s.when : '' });
|
|
29
|
+
}
|
|
30
|
+
return steps;
|
|
31
|
+
}
|
|
32
|
+
function dependencies(text) {
|
|
33
|
+
if (!text)
|
|
34
|
+
return new Map();
|
|
35
|
+
const pkg = JSON.parse(text);
|
|
36
|
+
return new Map(Object.entries({ ...pkg.dependencies, ...pkg.devDependencies }));
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* control 变更的语义摘要:步骤增删、必需性与条件变化、保护范围增减、基线变化、依赖版本变化,
|
|
40
|
+
* 以及其余受保护文件的变化。展示给确认的人看,帮助识别"弱化"。
|
|
41
|
+
*/
|
|
42
|
+
export function semanticChanges(root, base, candidate, files) {
|
|
43
|
+
const out = [];
|
|
44
|
+
const handled = new Set();
|
|
45
|
+
for (const file of files.filter((f) => /^control\/flows\/.+\.flow\.yaml$/.test(f))) {
|
|
46
|
+
handled.add(file);
|
|
47
|
+
const before = flowSteps(show(root, base, file));
|
|
48
|
+
const after = flowSteps(show(root, candidate, file));
|
|
49
|
+
for (const id of before.keys())
|
|
50
|
+
if (!after.has(id))
|
|
51
|
+
out.push(`删除步骤 ${id}(${file})`);
|
|
52
|
+
for (const [id, s] of after) {
|
|
53
|
+
const old = before.get(id);
|
|
54
|
+
if (!old)
|
|
55
|
+
out.push(`新增步骤 ${id}(${file})`);
|
|
56
|
+
else {
|
|
57
|
+
if (old.required && !s.required)
|
|
58
|
+
out.push(`步骤 ${id} 改为非必需`);
|
|
59
|
+
if (!old.required && s.required)
|
|
60
|
+
out.push(`步骤 ${id} 改为必需`);
|
|
61
|
+
if (old.when !== s.when)
|
|
62
|
+
out.push(`步骤 ${id} 的条件由 "${old.when}" 改为 "${s.when}"`);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
const configChanged = CONFIG_FILES.filter((f) => files.includes(f));
|
|
67
|
+
if (configChanged.length) {
|
|
68
|
+
for (const f of configChanged)
|
|
69
|
+
handled.add(f);
|
|
70
|
+
const before = new Set(protectedGlobs(configAt(root, base)));
|
|
71
|
+
const after = new Set(protectedGlobs(configAt(root, candidate)));
|
|
72
|
+
for (const g of before)
|
|
73
|
+
if (!after.has(g))
|
|
74
|
+
out.push(`缩小保护范围:移除 ${g}`);
|
|
75
|
+
for (const g of after)
|
|
76
|
+
if (!before.has(g))
|
|
77
|
+
out.push(`扩大保护范围:加入 ${g}`);
|
|
78
|
+
out.push(`项目配置有变化(${configChanged.join('、')})`);
|
|
79
|
+
}
|
|
80
|
+
for (const file of files.filter((f) => f.startsWith('control/baselines/') && f.endsWith('metrics.yaml'))) {
|
|
81
|
+
handled.add(file);
|
|
82
|
+
const before = parse(show(root, base, file) ?? '') ?? {};
|
|
83
|
+
const after = parse(show(root, candidate, file) ?? '') ?? {};
|
|
84
|
+
for (const key of new Set([...Object.keys(before), ...Object.keys(after)])) {
|
|
85
|
+
if (before[key] !== after[key])
|
|
86
|
+
out.push(`基线 ${key}:${before[key] ?? '无'} → ${after[key] ?? '删除'}`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
for (const file of files.filter((f) => f.endsWith('package.json'))) {
|
|
90
|
+
handled.add(file);
|
|
91
|
+
const before = dependencies(show(root, base, file));
|
|
92
|
+
const after = dependencies(show(root, candidate, file));
|
|
93
|
+
for (const [name, v] of after)
|
|
94
|
+
if (before.get(name) !== v)
|
|
95
|
+
out.push(`依赖 ${name}:${before.get(name) ?? '无'} → ${v}(${file})`);
|
|
96
|
+
for (const name of before.keys())
|
|
97
|
+
if (!after.has(name))
|
|
98
|
+
out.push(`移除依赖 ${name}(${file})`);
|
|
99
|
+
}
|
|
100
|
+
const rest = files.filter((f) => !handled.has(f));
|
|
101
|
+
if (rest.length)
|
|
102
|
+
out.push(`其他受保护文件变化:${rest.slice(0, 10).join('、')}${rest.length > 10 ? ` 等 ${rest.length} 个` : ''}`);
|
|
103
|
+
return out;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=semantic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semantic.js","sourceRoot":"","sources":["../src/semantic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE1D,SAAS,IAAI,CAAC,IAAY,EAAE,GAAkB,EAAE,IAAY;IAC1D,IAAI,GAAG,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC9B,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,EAAE;YACrD,GAAG,EAAE,IAAI;YACT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C,IAAI,CAAC,KAAK,CAAC;gBAAE,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC;QAC7H,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,EAAE;YAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;gBAAE,GAAG,CAAC,IAAI,CAAC,QAAQ,IAAI,IAAI,IAAI,GAAG,CAAC,CAAC;IAC5F,CAAC;IAED,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAClD,IAAI,IAAI,CAAC,MAAM;QAAE,GAAG,CAAC,IAAI,CAAC,aAAa,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACtH,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/** 共享状态目录:由 git 公共目录定位,所有 worktree 共用,不在工作树中、不随提交传播。 */
|
|
2
|
+
export declare function stateDir(root: string): string;
|
|
3
|
+
export interface ApprovalRequest {
|
|
4
|
+
id: string;
|
|
5
|
+
kind: string;
|
|
6
|
+
binding: Record<string, unknown>;
|
|
7
|
+
/** 给人看的说明,确认时展示。 */
|
|
8
|
+
summary: string[];
|
|
9
|
+
createdAt: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function bindingKey(kind: string, binding: Record<string, unknown>): string;
|
|
12
|
+
export declare function isApproved(root: string, kind: string, binding: Record<string, unknown>): boolean;
|
|
13
|
+
/** 登记待确认请求(同一对象重复登记得到同一 id),返回请求 id。 */
|
|
14
|
+
export declare function registerRequest(root: string, kind: string, binding: Record<string, unknown>, summary: string[]): string;
|
|
15
|
+
export declare function readRequest(root: string, id: string): ApprovalRequest | null;
|
|
16
|
+
export declare function recordApproval(root: string, request: ApprovalRequest): void;
|
|
17
|
+
/**
|
|
18
|
+
* 需要人工确认时的统一入口:已确认返回 null;否则登记请求并返回 ask-human 所需的请求 id。
|
|
19
|
+
* 评审与判例插件也通过它请求确认。
|
|
20
|
+
*/
|
|
21
|
+
export declare function requireApproval(root: string, kind: string, binding: Record<string, unknown>, summary: string[]): string | null;
|
|
22
|
+
export interface UnlockWindow {
|
|
23
|
+
until: string;
|
|
24
|
+
}
|
|
25
|
+
export declare function unlockActive(root: string, now?: number): boolean;
|
|
26
|
+
export declare function writeUnlock(root: string, minutes: number): string;
|
|
27
|
+
export interface ControlTerminalPaths {
|
|
28
|
+
input: string;
|
|
29
|
+
output: string;
|
|
30
|
+
}
|
|
31
|
+
export interface ControlTerminal {
|
|
32
|
+
readFd: number;
|
|
33
|
+
writeFd: number;
|
|
34
|
+
write: (text: string) => Promise<void>;
|
|
35
|
+
close: () => void;
|
|
36
|
+
}
|
|
37
|
+
type OpenControlFile = (path: string, flags: 'r' | 'r+' | 'w') => number;
|
|
38
|
+
type CloseControlFile = (fd: number) => void;
|
|
39
|
+
/** Windows 控制台输入、输出是两个设备;POSIX 的 /dev/tty 可双向复用。 */
|
|
40
|
+
export declare function controlTerminalPaths(platform?: NodeJS.Platform): ControlTerminalPaths;
|
|
41
|
+
/** 打开当前进程所属的控制终端;调用者必须执行返回值的 close。 */
|
|
42
|
+
export declare function openControlTerminal(platform?: NodeJS.Platform, open?: OpenControlFile, close?: CloseControlFile): ControlTerminal;
|
|
43
|
+
/**
|
|
44
|
+
* 在控制终端上与人交互:展示内容和随机短码,从控制台输入设备读取输入。
|
|
45
|
+
* 无法打开控制终端或读写失败时抛错。确认只表达交互意图,不作为身份认证。
|
|
46
|
+
*/
|
|
47
|
+
export declare function confirmOnTty(lines: string[]): Promise<boolean>;
|
|
48
|
+
export {};
|