@fitlab-ai/agent-infra 0.9.1 → 0.9.3
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 +24 -11
- package/README.zh-CN.md +24 -11
- package/bin/cli.ts +12 -0
- package/dist/bin/cli.js +14 -0
- package/dist/bin/internal-cli.js +30 -0
- package/dist/lib/agent-client.js +163 -0
- package/dist/lib/agent-clients/adapter.js +337 -0
- package/dist/lib/agent-clients/adapters/antigravity-cli.js +64 -0
- package/dist/lib/agent-clients/adapters/claude-code.js +71 -0
- package/dist/lib/agent-clients/adapters/codex-sandbox.js +210 -0
- package/dist/lib/agent-clients/adapters/codex.js +63 -0
- package/dist/lib/agent-clients/adapters/index.js +20 -0
- package/dist/lib/agent-clients/adapters/opencode.js +73 -0
- package/dist/lib/agent-clients/config.js +215 -0
- package/dist/lib/agent-clients/custom-tuis.js +99 -0
- package/dist/lib/agent-clients/invocation.js +9 -0
- package/dist/lib/agent-clients/next-steps.js +47 -0
- package/dist/lib/agent-clients/project-assets.js +45 -0
- package/dist/lib/agent-clients/reconcile.js +236 -0
- package/dist/lib/agent-clients/registry.js +78 -0
- package/dist/lib/agent-clients/schema.js +75 -0
- package/dist/lib/agent-clients/tokens.js +49 -0
- package/dist/lib/agent-clients/types.js +29 -0
- package/dist/lib/builtin-tuis.js +9 -14
- package/dist/lib/defaults.json +85 -73
- package/dist/lib/git/review-snapshot.js +25 -10
- package/dist/lib/git/reviewed-commit-equivalence.js +110 -0
- package/dist/lib/git/workflow.js +54 -1
- package/dist/lib/init.js +47 -91
- package/dist/lib/internal/agent-client.js +174 -0
- package/dist/lib/internal/git-workflow.js +7 -2
- package/dist/lib/internal/platform-checks.js +3 -3
- package/dist/lib/internal/platform-comment.js +29 -2
- package/dist/lib/internal/platform-issue.js +7 -0
- package/dist/lib/internal/platform-pr-review.js +132 -0
- package/dist/lib/internal/platform-pr.js +20 -2
- package/dist/lib/internal/platform-release-notes.js +52 -16
- package/dist/lib/internal/pr-review-grade.js +140 -0
- package/dist/lib/internal/release-workflow.js +82 -20
- package/dist/lib/internal/task-activity.js +73 -0
- package/dist/lib/internal/task-event.js +17 -1
- package/dist/lib/internal/task-lifecycle.js +7 -0
- package/dist/lib/internal/task-orchestration.js +196 -0
- package/dist/lib/internal/task-review.js +70 -0
- package/dist/lib/merge.js +2 -1
- package/dist/lib/platform/adapters.js +45 -1
- package/dist/lib/platform/change-request-git-evidence.js +113 -0
- package/dist/lib/platform/completion-backfill.js +122 -0
- package/dist/lib/platform/issue-comments.js +3 -2
- package/dist/lib/platform/merged-pr-equivalence.js +156 -16
- package/dist/lib/platform/pr-checks.js +101 -50
- package/dist/lib/platform/pr-review.js +166 -0
- package/dist/lib/platform/pull-requests.js +432 -7
- package/dist/lib/platform/release-notes.js +85 -3
- package/dist/lib/platform/releases.js +1 -1
- package/dist/lib/platform/verification-required.js +8 -10
- package/dist/lib/pr-review/evidence-grading.js +229 -0
- package/dist/lib/prompt.js +15 -3
- package/dist/lib/release/channels.js +4 -1
- package/dist/lib/release/workflow.js +4 -2
- package/dist/lib/remove-dir.js +25 -0
- package/dist/lib/run/tui.js +11 -7
- package/dist/lib/sandbox/agent-client-reconciler.js +234 -0
- package/dist/lib/sandbox/clipboard/linux.js +2 -1
- package/dist/lib/sandbox/commands/create.js +76 -200
- package/dist/lib/sandbox/commands/enter.js +17 -1
- package/dist/lib/sandbox/commands/prune.js +2 -2
- package/dist/lib/sandbox/commands/rm.js +3 -2
- package/dist/lib/sandbox/commands/show.js +1 -1
- package/dist/lib/sandbox/config.js +21 -4
- package/dist/lib/sandbox/constants.js +3 -0
- package/dist/lib/sandbox/dockerfile.js +2 -1
- package/dist/lib/sandbox/managed-fs.js +10 -5
- package/dist/lib/sandbox/recovery.js +52 -36
- package/dist/lib/sandbox/shell.js +1 -1
- package/dist/lib/sandbox/tool-types.js +8 -0
- package/dist/lib/sandbox/tools.js +2 -126
- package/dist/lib/task/activity-intent.js +101 -0
- package/dist/lib/task/artifact-lifecycle.js +3 -50
- package/dist/lib/task/commands/decisions.js +50 -20
- package/dist/lib/task/commands/log.js +15 -14
- package/dist/lib/task/delegation-receipts.js +128 -0
- package/dist/lib/task/events.js +146 -8
- package/dist/lib/task/finalization-artifacts.js +35 -0
- package/dist/lib/task/lifecycle-execution.js +46 -0
- package/dist/lib/task/orchestration.js +784 -0
- package/dist/lib/task/review-artifacts.js +143 -59
- package/dist/lib/task/review-finalization.js +186 -0
- package/dist/lib/task/review-fingerprint.js +4 -0
- package/dist/lib/task/task-execution-lock.js +231 -0
- package/dist/lib/task/verification-checks.js +2 -1
- package/dist/lib/task/verification-engine.js +372 -28
- package/dist/lib/task/verification-review.js +1 -1
- package/dist/lib/task/verification.js +5 -2
- package/dist/lib/task/workspace-snapshot.js +46 -0
- package/dist/lib/update.js +42 -161
- package/lib/agent-client.ts +214 -0
- package/lib/agent-clients/adapter.ts +534 -0
- package/lib/agent-clients/adapters/antigravity-cli.ts +65 -0
- package/lib/agent-clients/adapters/claude-code.ts +79 -0
- package/lib/agent-clients/adapters/codex-sandbox.ts +245 -0
- package/lib/agent-clients/adapters/codex.ts +67 -0
- package/lib/agent-clients/adapters/index.ts +27 -0
- package/lib/agent-clients/adapters/opencode.ts +75 -0
- package/lib/agent-clients/config.ts +323 -0
- package/lib/agent-clients/custom-tuis.ts +149 -0
- package/lib/agent-clients/invocation.ts +19 -0
- package/lib/agent-clients/next-steps.ts +85 -0
- package/lib/agent-clients/project-assets.ts +96 -0
- package/lib/agent-clients/reconcile.ts +325 -0
- package/lib/agent-clients/registry.ts +154 -0
- package/lib/agent-clients/schema.ts +80 -0
- package/lib/agent-clients/tokens.ts +53 -0
- package/lib/agent-clients/types.ts +92 -0
- package/lib/benchmark/schemas/v1.0.0/case-manifest.schema.json +120 -0
- package/lib/benchmark/schemas/v1.0.0/common.schema.json +109 -0
- package/lib/benchmark/schemas/v1.0.0/grader-result.schema.json +160 -0
- package/lib/benchmark/schemas/v1.0.0/run-manifest.schema.json +122 -0
- package/lib/benchmark/schemas/v1.0.0/subject.schema.json +227 -0
- package/lib/builtin-tuis.ts +16 -15
- package/lib/defaults.json +24 -12
- package/lib/git/review-snapshot.ts +39 -9
- package/lib/git/reviewed-commit-equivalence.ts +135 -0
- package/lib/git/workflow.ts +66 -2
- package/lib/init.ts +53 -121
- package/lib/internal/agent-client.ts +186 -0
- package/lib/internal/git-workflow.ts +6 -2
- package/lib/internal/platform-checks.ts +4 -4
- package/lib/internal/platform-comment.ts +17 -2
- package/lib/internal/platform-issue.ts +4 -0
- package/lib/internal/platform-pr-review.ts +104 -0
- package/lib/internal/platform-pr.ts +14 -1
- package/lib/internal/platform-release-notes.ts +59 -16
- package/lib/internal/pr-review-grade.ts +130 -0
- package/lib/internal/release-workflow.ts +79 -20
- package/lib/internal/task-activity.ts +55 -0
- package/lib/internal/task-event.ts +9 -1
- package/lib/internal/task-lifecycle.ts +4 -0
- package/lib/internal/task-orchestration.ts +171 -0
- package/lib/internal/task-review.ts +70 -0
- package/lib/merge.ts +2 -1
- package/lib/platform/adapters.ts +169 -3
- package/lib/platform/change-request-git-evidence.ts +159 -0
- package/lib/platform/completion-backfill.ts +134 -0
- package/lib/platform/issue-comments.ts +3 -2
- package/lib/platform/merged-pr-equivalence.ts +178 -19
- package/lib/platform/pr-checks.ts +121 -66
- package/lib/platform/pr-review.ts +201 -0
- package/lib/platform/pull-requests.ts +529 -27
- package/lib/platform/release-notes.ts +100 -4
- package/lib/platform/releases.ts +1 -1
- package/lib/platform/verification-required.ts +12 -10
- package/lib/pr-review/evidence-grading.ts +318 -0
- package/lib/prompt.ts +16 -3
- package/lib/release/channels.ts +4 -1
- package/lib/release/workflow.ts +4 -3
- package/lib/remove-dir.ts +28 -0
- package/lib/run/tui.ts +12 -5
- package/lib/sandbox/agent-client-reconciler.ts +378 -0
- package/lib/sandbox/clipboard/linux.ts +2 -1
- package/lib/sandbox/commands/create.ts +111 -212
- package/lib/sandbox/commands/enter.ts +23 -1
- package/lib/sandbox/commands/prune.ts +2 -2
- package/lib/sandbox/commands/rm.ts +3 -2
- package/lib/sandbox/commands/show.ts +1 -1
- package/lib/sandbox/config.ts +31 -4
- package/lib/sandbox/constants.ts +6 -0
- package/lib/sandbox/dockerfile.ts +2 -1
- package/lib/sandbox/managed-fs.ts +18 -5
- package/lib/sandbox/recovery.ts +98 -67
- package/lib/sandbox/shell.ts +1 -1
- package/lib/sandbox/tool-types.ts +143 -0
- package/lib/sandbox/tools.ts +5 -157
- package/lib/server/server.schema.json +2 -2
- package/lib/task/activity-intent.ts +128 -0
- package/lib/task/artifact-lifecycle.ts +3 -39
- package/lib/task/commands/decisions.ts +53 -20
- package/lib/task/commands/log.ts +15 -14
- package/lib/task/delegation-receipts.ts +199 -0
- package/lib/task/events.ts +164 -11
- package/lib/task/finalization-artifacts.ts +58 -0
- package/lib/task/lifecycle-execution.ts +106 -0
- package/lib/task/orchestration.ts +1022 -0
- package/lib/task/review-artifacts.ts +201 -69
- package/lib/task/review-finalization.ts +306 -0
- package/lib/task/review-fingerprint.ts +5 -0
- package/lib/task/task-execution-lock.ts +296 -0
- package/lib/task/verification-checks.ts +2 -1
- package/lib/task/verification-engine.ts +424 -28
- package/lib/task/verification-review.ts +1 -0
- package/lib/task/verification.ts +8 -3
- package/lib/task/workspace-snapshot.ts +57 -0
- package/lib/update.ts +48 -184
- package/package.json +4 -4
- package/templates/.agents/QUICKSTART.en.md +25 -8
- package/templates/.agents/QUICKSTART.zh-CN.md +25 -8
- package/templates/.agents/README.en.md +29 -25
- package/templates/.agents/README.zh-CN.md +29 -25
- package/templates/.agents/hooks/lifecycle-delegation.js +75 -0
- package/templates/.agents/rules/README.en.md +2 -0
- package/templates/.agents/rules/README.zh-CN.md +2 -0
- package/templates/.agents/rules/commit-and-pr.en.md +1 -0
- package/templates/.agents/rules/commit-and-pr.zh-CN.md +1 -0
- package/templates/.agents/rules/create-issue.github.en.md +4 -2
- package/templates/.agents/rules/create-issue.github.zh-CN.md +4 -2
- package/templates/.agents/rules/human-decision-context.en.md +14 -12
- package/templates/.agents/rules/human-decision-context.zh-CN.md +14 -12
- package/templates/.agents/rules/issue-fields.github.en.md +3 -1
- package/templates/.agents/rules/issue-fields.github.zh-CN.md +3 -1
- package/templates/.agents/rules/issue-pr-commands.en.md +5 -3
- package/templates/.agents/rules/issue-pr-commands.github.en.md +5 -3
- package/templates/.agents/rules/issue-pr-commands.github.zh-CN.md +5 -3
- package/templates/.agents/rules/issue-pr-commands.zh-CN.md +5 -3
- package/templates/.agents/rules/issue-sync.github.en.md +7 -3
- package/templates/.agents/rules/issue-sync.github.zh-CN.md +8 -4
- package/templates/.agents/rules/lifecycle-orchestration.en.md +24 -0
- package/templates/.agents/rules/lifecycle-orchestration.zh-CN.md +24 -0
- package/templates/.agents/rules/milestone-inference.github.en.md +4 -2
- package/templates/.agents/rules/milestone-inference.github.zh-CN.md +4 -2
- package/templates/.agents/rules/next-step-output.en.md +18 -0
- package/templates/.agents/rules/next-step-output.zh-CN.md +18 -0
- package/templates/.agents/rules/no-mid-flow-questions.en.md +19 -0
- package/templates/.agents/rules/no-mid-flow-questions.zh-CN.md +19 -0
- package/templates/.agents/rules/pr-checks-commands.en.md +3 -3
- package/templates/.agents/rules/pr-checks-commands.github.en.md +2 -2
- package/templates/.agents/rules/pr-checks-commands.github.zh-CN.md +2 -2
- package/templates/.agents/rules/pr-checks-commands.zh-CN.md +3 -3
- package/templates/.agents/rules/pr-sync.en.md +3 -1
- package/templates/.agents/rules/pr-sync.github.en.md +11 -1
- package/templates/.agents/rules/pr-sync.github.zh-CN.md +11 -1
- package/templates/.agents/rules/pr-sync.zh-CN.md +3 -1
- package/templates/.agents/rules/release-commands.en.md +1 -1
- package/templates/.agents/rules/release-commands.github.en.md +21 -5
- package/templates/.agents/rules/release-commands.github.zh-CN.md +21 -5
- package/templates/.agents/rules/release-commands.zh-CN.md +1 -1
- package/templates/.agents/rules/review-handshake.en.md +4 -4
- package/templates/.agents/rules/review-handshake.zh-CN.md +4 -4
- package/templates/.agents/rules/review-method.en.md +113 -0
- package/templates/.agents/rules/review-method.zh-CN.md +98 -0
- package/templates/.agents/rules/task-management.en.md +11 -0
- package/templates/.agents/rules/task-management.zh-CN.md +11 -0
- package/templates/.agents/skills/analyze-task/SKILL.en.md +15 -12
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +15 -12
- package/templates/.agents/skills/block-task/SKILL.en.md +11 -9
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +11 -9
- package/templates/.agents/skills/cancel-task/SKILL.en.md +10 -8
- package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +11 -9
- package/templates/.agents/skills/check-task/SKILL.en.md +16 -16
- package/templates/.agents/skills/check-task/SKILL.zh-CN.md +16 -16
- package/templates/.agents/skills/close-codescan/SKILL.en.md +7 -5
- package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +7 -5
- package/templates/.agents/skills/close-dependabot/SKILL.en.md +7 -5
- package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +7 -5
- package/templates/.agents/skills/code-task/SKILL.en.md +10 -7
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +13 -10
- package/templates/.agents/skills/code-task/reference/fix-mode.en.md +14 -16
- package/templates/.agents/skills/code-task/reference/fix-mode.zh-CN.md +14 -16
- package/templates/.agents/skills/code-task/reference/output-template.en.md +3 -3
- package/templates/.agents/skills/code-task/reference/output-template.zh-CN.md +3 -3
- package/templates/.agents/skills/commit/SKILL.en.md +13 -1
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +13 -1
- package/templates/.agents/skills/commit/reference/commit-message.en.md +1 -1
- package/templates/.agents/skills/commit/reference/commit-message.zh-CN.md +1 -1
- package/templates/.agents/skills/commit/reference/issue-metadata-sync.en.md +1 -1
- package/templates/.agents/skills/commit/reference/issue-metadata-sync.zh-CN.md +1 -1
- package/templates/.agents/skills/commit/reference/pr-summary-sync.en.md +1 -1
- package/templates/.agents/skills/commit/reference/pr-summary-sync.zh-CN.md +1 -1
- package/templates/.agents/skills/commit/reference/task-status-update.en.md +24 -28
- package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +24 -28
- package/templates/.agents/skills/complete-manual-validation/SKILL.en.md +6 -4
- package/templates/.agents/skills/complete-manual-validation/SKILL.zh-CN.md +6 -4
- package/templates/.agents/skills/complete-manual-validation/reference/summary-update.en.md +1 -1
- package/templates/.agents/skills/complete-manual-validation/reference/summary-update.zh-CN.md +1 -1
- package/templates/.agents/skills/complete-task/SKILL.en.md +23 -8
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +23 -8
- package/templates/.agents/skills/complete-task/config/verify.en.json +1 -0
- package/templates/.agents/skills/complete-task/config/verify.zh-CN.json +1 -0
- package/templates/.agents/skills/complete-task/reference/external-delivery.en.md +17 -0
- package/templates/.agents/skills/complete-task/reference/external-delivery.zh-CN.md +17 -0
- package/templates/.agents/skills/create-pr/SKILL.en.md +13 -11
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +13 -11
- package/templates/.agents/skills/create-pr/reference/comment-publish.en.md +1 -1
- package/templates/.agents/skills/create-pr/reference/comment-publish.zh-CN.md +1 -1
- package/templates/.agents/skills/create-pr/reference/pr-body-template.en.md +3 -3
- package/templates/.agents/skills/create-pr/reference/pr-body-template.zh-CN.md +3 -3
- package/templates/.agents/skills/create-release-note/SKILL.en.md +17 -16
- package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +17 -16
- package/templates/.agents/skills/create-task/SKILL.en.md +16 -14
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +16 -14
- package/templates/.agents/skills/import-codescan/SKILL.en.md +5 -5
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +5 -5
- package/templates/.agents/skills/import-dependabot/SKILL.en.md +5 -5
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +5 -5
- package/templates/.agents/skills/import-issue/SKILL.en.md +10 -8
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +10 -8
- package/templates/.agents/skills/init-labels/SKILL.en.md +4 -4
- package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/init-milestones/SKILL.en.md +4 -4
- package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/plan-task/SKILL.en.md +13 -10
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +13 -10
- package/templates/.agents/skills/post-release/SKILL.en.md +2 -0
- package/templates/.agents/skills/post-release/SKILL.zh-CN.md +2 -0
- package/templates/.agents/skills/refine-title/SKILL.en.md +1 -1
- package/templates/.agents/skills/refine-title/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/release/SKILL.en.md +16 -10
- package/templates/.agents/skills/release/SKILL.zh-CN.md +16 -10
- package/templates/.agents/skills/restore-task/SKILL.en.md +4 -1
- package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +4 -1
- package/templates/.agents/skills/review-analysis/SKILL.en.md +18 -4
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +19 -5
- package/templates/.agents/skills/review-analysis/config/verify.en.json +6 -0
- package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +6 -0
- package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +13 -15
- package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +13 -15
- package/templates/.agents/skills/review-analysis/reference/report-template.en.md +51 -5
- package/templates/.agents/skills/review-analysis/reference/report-template.zh-CN.md +52 -6
- package/templates/.agents/skills/review-analysis/reference/review-criteria.en.md +25 -22
- package/templates/.agents/skills/review-analysis/reference/review-criteria.zh-CN.md +25 -22
- package/templates/.agents/skills/review-code/SKILL.en.md +35 -12
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +35 -12
- package/templates/.agents/skills/review-code/config/verify.en.json +7 -0
- package/templates/.agents/skills/review-code/config/verify.zh-CN.json +7 -0
- package/templates/.agents/skills/review-code/reference/concurrency-risks.en.md +25 -0
- package/templates/.agents/skills/review-code/reference/concurrency-risks.zh-CN.md +25 -0
- package/templates/.agents/skills/review-code/reference/cross-platform-risks.en.md +27 -0
- package/templates/.agents/skills/review-code/reference/cross-platform-risks.zh-CN.md +27 -0
- package/templates/.agents/skills/review-code/reference/documentation-antipatterns.en.md +13 -0
- package/templates/.agents/skills/review-code/reference/documentation-antipatterns.zh-CN.md +13 -0
- package/templates/.agents/skills/review-code/reference/migration-risks.en.md +25 -0
- package/templates/.agents/skills/review-code/reference/migration-risks.zh-CN.md +25 -0
- package/templates/.agents/skills/review-code/reference/output-templates.en.md +22 -24
- package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +22 -24
- package/templates/.agents/skills/review-code/reference/report-template.en.md +54 -7
- package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +54 -7
- package/templates/.agents/skills/review-code/reference/review-criteria.en.md +29 -24
- package/templates/.agents/skills/review-code/reference/review-criteria.zh-CN.md +29 -24
- package/templates/.agents/skills/review-code/reference/security-risks.en.md +25 -0
- package/templates/.agents/skills/review-code/reference/security-risks.zh-CN.md +25 -0
- package/templates/.agents/skills/review-plan/SKILL.en.md +18 -4
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +19 -5
- package/templates/.agents/skills/review-plan/config/verify.en.json +6 -0
- package/templates/.agents/skills/review-plan/config/verify.zh-CN.json +6 -0
- package/templates/.agents/skills/review-plan/reference/output-templates.en.md +13 -15
- package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +13 -15
- package/templates/.agents/skills/review-plan/reference/report-template.en.md +61 -5
- package/templates/.agents/skills/review-plan/reference/report-template.zh-CN.md +61 -5
- package/templates/.agents/skills/review-plan/reference/review-criteria.en.md +21 -24
- package/templates/.agents/skills/review-plan/reference/review-criteria.zh-CN.md +21 -24
- package/templates/.agents/skills/review-pr/SKILL.en.md +158 -0
- package/templates/.agents/skills/review-pr/SKILL.zh-CN.md +158 -0
- package/templates/.agents/skills/review-pr/config/verify.en.json +37 -0
- package/templates/.agents/skills/review-pr/config/verify.zh-CN.json +37 -0
- package/templates/.agents/skills/review-pr/reference/evidence-grading.en.md +65 -0
- package/templates/.agents/skills/review-pr/reference/evidence-grading.zh-CN.md +65 -0
- package/templates/.agents/skills/review-pr/reference/output-guidance.en.md +18 -0
- package/templates/.agents/skills/review-pr/reference/output-guidance.zh-CN.md +18 -0
- package/templates/.agents/skills/review-pr/reference/report-template.en.md +85 -0
- package/templates/.agents/skills/review-pr/reference/report-template.zh-CN.md +85 -0
- package/templates/.agents/skills/run-task/SKILL.en.md +22 -0
- package/templates/.agents/skills/run-task/SKILL.zh-CN.md +22 -0
- package/templates/.agents/skills/run-task/config/verify.en.json +10 -0
- package/templates/.agents/skills/run-task/config/verify.zh-CN.json +10 -0
- package/templates/.agents/skills/run-task/reference/host-validation.en.md +20 -0
- package/templates/.agents/skills/run-task/reference/host-validation.zh-CN.md +20 -0
- package/templates/.agents/skills/test/SKILL.en.md +4 -4
- package/templates/.agents/skills/test/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/test-integration/SKILL.en.md +4 -4
- package/templates/.agents/skills/test-integration/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/update-agent-infra/SKILL.en.md +5 -5
- package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +5 -5
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +664 -246
- package/templates/.agents/skills/upgrade-dependency/SKILL.en.md +4 -4
- package/templates/.agents/skills/upgrade-dependency/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/watch-pr/SKILL.en.md +21 -21
- package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +21 -21
- package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.en.md +27 -6
- package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.zh-CN.md +26 -5
- package/templates/.agents/templates/task.en.md +1 -1
- package/templates/.agents/templates/task.zh-CN.md +1 -1
- package/templates/.agents/workflows/bug-fix.en.yaml +3 -3
- package/templates/.agents/workflows/bug-fix.zh-CN.yaml +3 -3
- package/templates/.agents/workflows/code-review.en.yaml +1 -1
- package/templates/.agents/workflows/code-review.zh-CN.yaml +1 -1
- package/templates/.agents/workflows/feature-development.en.yaml +4 -4
- package/templates/.agents/workflows/feature-development.zh-CN.yaml +4 -4
- package/templates/.agents/workflows/refactoring.en.yaml +3 -3
- package/templates/.agents/workflows/refactoring.zh-CN.yaml +3 -3
- package/templates/.claude/agents/agent-infra-lifecycle-executor.en.md +6 -0
- package/templates/.claude/agents/agent-infra-lifecycle-executor.zh-CN.md +6 -0
- package/templates/.claude/agents/agent-infra-lifecycle-reviewer.en.md +6 -0
- package/templates/.claude/agents/agent-infra-lifecycle-reviewer.zh-CN.md +6 -0
- package/templates/.claude/commands/post-release.en.md +1 -0
- package/templates/.claude/commands/post-release.zh-CN.md +1 -0
- package/templates/.claude/commands/review-pr.en.md +8 -0
- package/templates/.claude/commands/review-pr.zh-CN.md +8 -0
- package/templates/.claude/commands/run-task.en.md +8 -0
- package/templates/.claude/commands/run-task.zh-CN.md +8 -0
- package/templates/.claude/settings.json +24 -0
- package/templates/.codex/agents/agent-infra-lifecycle-executor.en.toml +3 -0
- package/templates/.codex/agents/agent-infra-lifecycle-executor.zh-CN.toml +3 -0
- package/templates/.codex/agents/agent-infra-lifecycle-reviewer.en.toml +3 -0
- package/templates/.codex/agents/agent-infra-lifecycle-reviewer.zh-CN.toml +3 -0
- package/templates/.gemini/commands/_project_/review-pr.en.toml +10 -0
- package/templates/.gemini/commands/_project_/review-pr.zh-CN.toml +10 -0
- package/templates/.opencode/commands/post-release.en.md +2 -0
- package/templates/.opencode/commands/post-release.zh-CN.md +2 -0
- package/templates/.opencode/commands/review-pr.en.md +11 -0
- package/templates/.opencode/commands/review-pr.zh-CN.md +11 -0
- package/templates/.opencode/commands/run-task.en.md +11 -0
- package/templates/.opencode/commands/run-task.zh-CN.md +11 -0
- package/templates/.gemini/commands/_project_/analyze-task.en.toml +0 -10
- package/templates/.gemini/commands/_project_/analyze-task.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/archive-tasks.en.toml +0 -10
- package/templates/.gemini/commands/_project_/archive-tasks.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/block-task.en.toml +0 -10
- package/templates/.gemini/commands/_project_/block-task.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/cancel-task.en.toml +0 -10
- package/templates/.gemini/commands/_project_/cancel-task.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/check-task.en.toml +0 -10
- package/templates/.gemini/commands/_project_/check-task.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/close-codescan.en.toml +0 -8
- package/templates/.gemini/commands/_project_/close-codescan.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/close-dependabot.en.toml +0 -8
- package/templates/.gemini/commands/_project_/close-dependabot.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/code-task.en.toml +0 -10
- package/templates/.gemini/commands/_project_/code-task.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/commit.en.toml +0 -10
- package/templates/.gemini/commands/_project_/commit.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/complete-manual-validation.en.toml +0 -10
- package/templates/.gemini/commands/_project_/complete-manual-validation.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/complete-task.en.toml +0 -10
- package/templates/.gemini/commands/_project_/complete-task.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/create-pr.en.toml +0 -10
- package/templates/.gemini/commands/_project_/create-pr.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/create-release-note.en.toml +0 -8
- package/templates/.gemini/commands/_project_/create-release-note.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/create-task.en.toml +0 -8
- package/templates/.gemini/commands/_project_/create-task.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/import-codescan.en.toml +0 -8
- package/templates/.gemini/commands/_project_/import-codescan.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/import-dependabot.en.toml +0 -8
- package/templates/.gemini/commands/_project_/import-dependabot.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/import-issue.en.toml +0 -8
- package/templates/.gemini/commands/_project_/import-issue.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/init-labels.en.toml +0 -8
- package/templates/.gemini/commands/_project_/init-labels.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/init-milestones.en.toml +0 -10
- package/templates/.gemini/commands/_project_/init-milestones.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/plan-task.en.toml +0 -10
- package/templates/.gemini/commands/_project_/plan-task.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/post-release.en.toml +0 -6
- package/templates/.gemini/commands/_project_/post-release.zh-CN.toml +0 -6
- package/templates/.gemini/commands/_project_/refine-title.en.toml +0 -8
- package/templates/.gemini/commands/_project_/refine-title.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/release.en.toml +0 -8
- package/templates/.gemini/commands/_project_/release.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/restore-task.en.toml +0 -8
- package/templates/.gemini/commands/_project_/restore-task.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/review-analysis.en.toml +0 -10
- package/templates/.gemini/commands/_project_/review-analysis.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/review-code.en.toml +0 -10
- package/templates/.gemini/commands/_project_/review-code.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/review-plan.en.toml +0 -10
- package/templates/.gemini/commands/_project_/review-plan.zh-CN.toml +0 -10
- package/templates/.gemini/commands/_project_/test-integration.en.toml +0 -6
- package/templates/.gemini/commands/_project_/test-integration.zh-CN.toml +0 -6
- package/templates/.gemini/commands/_project_/test.en.toml +0 -6
- package/templates/.gemini/commands/_project_/test.zh-CN.toml +0 -6
- package/templates/.gemini/commands/_project_/update-agent-infra.en.toml +0 -6
- package/templates/.gemini/commands/_project_/update-agent-infra.zh-CN.toml +0 -6
- package/templates/.gemini/commands/_project_/upgrade-dependency.en.toml +0 -8
- package/templates/.gemini/commands/_project_/upgrade-dependency.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/watch-pr.en.toml +0 -10
- package/templates/.gemini/commands/_project_/watch-pr.zh-CN.toml +0 -10
- package/templates/.gemini/settings.json +0 -3
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
|
|
4
|
+
import { resolveTaskRef } from './resolve-ref.ts';
|
|
5
|
+
import { locateActivityLog, appendActivityEntry } from './activity-log.ts';
|
|
6
|
+
import { buildArtifactLinkSection, parseArtifactName } from './artifact-lifecycle.ts';
|
|
7
|
+
import { captureTaskWriteMetadata, writeTask } from './write.ts';
|
|
8
|
+
import type { TaskMutation, TaskOperationSummary, TaskWriteOptions } from './write.ts';
|
|
9
|
+
|
|
10
|
+
export type ActivityAppendIntent = {
|
|
11
|
+
kind: 'append';
|
|
12
|
+
taskRef: string;
|
|
13
|
+
step: string;
|
|
14
|
+
agent: string;
|
|
15
|
+
note: string;
|
|
16
|
+
artifact?: string;
|
|
17
|
+
dryRun?: boolean;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type ActivityIntentResult = {
|
|
21
|
+
status: 'planned' | 'applied' | 'no-op' | 'failed';
|
|
22
|
+
changed: boolean;
|
|
23
|
+
intent: 'append';
|
|
24
|
+
taskId: string | null;
|
|
25
|
+
artifact: string | null;
|
|
26
|
+
operations: readonly TaskOperationSummary[];
|
|
27
|
+
error: { code: string; message: string } | null;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
function failed(intent: ActivityAppendIntent, code: string, message: string, taskId: string | null = null): ActivityIntentResult {
|
|
31
|
+
return {
|
|
32
|
+
status: 'failed', changed: false, intent: 'append', taskId,
|
|
33
|
+
artifact: intent.artifact ?? null, operations: [], error: { code, message }
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function oneLine(value: string): string {
|
|
38
|
+
return value.replace(/\s*\r?\n\s*/g, ' ').trim();
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Append an Activity Log entry (and, optionally, a `## 审查反馈` artifact link)
|
|
43
|
+
* to an active task via the atomic `writeTask` path. `current_step` is never
|
|
44
|
+
* touched (PL-2): review-pr does not join the standard stage chain.
|
|
45
|
+
*/
|
|
46
|
+
export function applyActivityAppendIntent(intent: ActivityAppendIntent, options: TaskWriteOptions = {}): ActivityIntentResult {
|
|
47
|
+
if (intent.kind !== 'append') return failed(intent, 'ACTIVITY_INTENT_INVALID', 'intent kind must be append');
|
|
48
|
+
const resolved = resolveTaskRef(intent.taskRef, { repoRoot: options.repoRoot });
|
|
49
|
+
if (!resolved.ok) return failed(intent, resolved.code, resolved.message, resolved.taskId);
|
|
50
|
+
if (resolved.state !== 'active') {
|
|
51
|
+
return failed(intent, 'TASK_STATE_MISMATCH', `task ${resolved.taskId} is ${resolved.state}, expected active`, resolved.taskId);
|
|
52
|
+
}
|
|
53
|
+
const step = oneLine(intent.step);
|
|
54
|
+
const agent = oneLine(intent.agent);
|
|
55
|
+
const note = oneLine(intent.note);
|
|
56
|
+
if (!step || !agent || !note || /[\r\n]/.test(intent.step) || /[\r\n]/.test(intent.agent) || /[\r\n]/.test(intent.note)) {
|
|
57
|
+
return failed(intent, 'ACTIVITY_INTENT_INVALID', 'step, agent and note must be non-empty single-line values', resolved.taskId);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
let artifact: ReturnType<typeof parseArtifactName> | null = null;
|
|
61
|
+
if (intent.artifact !== undefined) {
|
|
62
|
+
artifact = parseArtifactName(intent.artifact);
|
|
63
|
+
if (!artifact || artifact.family !== 'pr-review') {
|
|
64
|
+
return failed(intent, 'ACTIVITY_ARTIFACT_INVALID', `artifact '${intent.artifact}' is not a canonical pr-review artifact`, resolved.taskId);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
let content: string;
|
|
69
|
+
try {
|
|
70
|
+
content = fs.readFileSync(resolved.taskMdPath, 'utf8');
|
|
71
|
+
} catch (error) {
|
|
72
|
+
return failed(intent, 'TASK_READ_FAILED', error instanceof Error ? error.message : String(error), resolved.taskId);
|
|
73
|
+
}
|
|
74
|
+
const section = locateActivityLog(content);
|
|
75
|
+
if (!section) {
|
|
76
|
+
return failed(intent, 'ACTIVITY_SECTION_MISSING', 'task has no unique Activity Log section', resolved.taskId);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
let metadata;
|
|
80
|
+
try {
|
|
81
|
+
metadata = (options.metadataProvider ?? captureTaskWriteMetadata)();
|
|
82
|
+
} catch (error) {
|
|
83
|
+
return failed(intent, 'METADATA_CAPTURE_FAILED', error instanceof Error ? error.message : String(error), resolved.taskId);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const mutations: TaskMutation[] = [];
|
|
87
|
+
const activityBody = appendActivityEntry(section, { time: metadata.timestamp, step, agent, note });
|
|
88
|
+
mutations.push({ kind: 'section', aliases: ['活动日志', 'Activity Log'], heading: section.heading, body: activityBody });
|
|
89
|
+
if (artifact) {
|
|
90
|
+
const link = buildArtifactLinkSection(content, {
|
|
91
|
+
...artifact,
|
|
92
|
+
path: path.join(resolved.taskDir, artifact.name),
|
|
93
|
+
size: 0,
|
|
94
|
+
mtimeMs: 0
|
|
95
|
+
});
|
|
96
|
+
mutations.push({ kind: 'section', aliases: link.aliases, heading: link.heading, body: link.body });
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const writeResult = writeTask({
|
|
100
|
+
taskRef: intent.taskRef,
|
|
101
|
+
expectedState: 'active',
|
|
102
|
+
mutations,
|
|
103
|
+
dryRun: intent.dryRun
|
|
104
|
+
}, {
|
|
105
|
+
...options,
|
|
106
|
+
taskLocation: {
|
|
107
|
+
repoRoot: resolved.repoRoot,
|
|
108
|
+
taskId: resolved.taskId,
|
|
109
|
+
taskMdPath: resolved.taskMdPath,
|
|
110
|
+
state: resolved.state
|
|
111
|
+
},
|
|
112
|
+
metadataProvider: () => metadata
|
|
113
|
+
});
|
|
114
|
+
if (writeResult.status === 'failed') {
|
|
115
|
+
return failed(intent, writeResult.error.code, writeResult.error.message, writeResult.taskId);
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
118
|
+
status: writeResult.status,
|
|
119
|
+
changed: writeResult.changed,
|
|
120
|
+
intent: 'append',
|
|
121
|
+
taskId: writeResult.taskId,
|
|
122
|
+
artifact: intent.artifact ?? null,
|
|
123
|
+
operations: writeResult.operations,
|
|
124
|
+
error: null
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export type { TaskWriteOptions } from './write.ts';
|
|
@@ -5,6 +5,7 @@ import { resolveTaskRef } from './resolve-ref.ts';
|
|
|
5
5
|
import type { ResolveTaskRefErrorCode, TaskWorkspaceState } from './resolve-ref.ts';
|
|
6
6
|
import { locateActivityLog } from './activity-log.ts';
|
|
7
7
|
import { parseImplementationInputs, selectPendingImplementationInput } from './implementation-inputs.ts';
|
|
8
|
+
import { parseVerdict } from './review-artifacts.ts';
|
|
8
9
|
import { extractSection, findSectionHeading } from './sections.ts';
|
|
9
10
|
|
|
10
11
|
const artifactFamilyCatalog = [
|
|
@@ -14,7 +15,8 @@ const artifactFamilyCatalog = [
|
|
|
14
15
|
{ family: 'review-plan', sectionAliases: ['审查反馈', 'Review Feedback'], heading: '审查反馈', labels: ['技术方案审查', 'Plan Review'] },
|
|
15
16
|
{ family: 'code', sectionAliases: ['实现备注', 'Implementation Notes'], heading: '实现备注', labels: ['实现报告', 'Implementation Report'] },
|
|
16
17
|
{ family: 'review-code', sectionAliases: ['审查反馈', 'Review Feedback'], heading: '审查反馈', labels: ['代码审查', 'Code Review'] },
|
|
17
|
-
{ family: 'manual-validation', sectionAliases: ['实现备注', 'Implementation Notes'], heading: '实现备注', labels: ['人工验证', 'Manual Validation'] }
|
|
18
|
+
{ family: 'manual-validation', sectionAliases: ['实现备注', 'Implementation Notes'], heading: '实现备注', labels: ['人工验证', 'Manual Validation'] },
|
|
19
|
+
{ family: 'pr-review', sectionAliases: ['审查反馈', 'Review Feedback'], heading: '审查反馈', labels: ['PR 审查报告', 'PR Review Report'] }
|
|
18
20
|
] as const;
|
|
19
21
|
|
|
20
22
|
type ArtifactFamily = (typeof artifactFamilyCatalog)[number]['family'];
|
|
@@ -239,21 +241,6 @@ function resolveReviewedInput(
|
|
|
239
241
|
}
|
|
240
242
|
}
|
|
241
243
|
|
|
242
|
-
function extractMarkdownSection(content: string, names: readonly string[]): string {
|
|
243
|
-
const lines = content.split(/\r?\n/);
|
|
244
|
-
const allowed = new Set(names);
|
|
245
|
-
const start = lines.findIndex((line) => {
|
|
246
|
-
const match = /^##\s+(.+?)\s*$/.exec(line.trim());
|
|
247
|
-
return Boolean(match?.[1] && allowed.has(match[1]));
|
|
248
|
-
});
|
|
249
|
-
if (start === -1) return '';
|
|
250
|
-
let end = lines.length;
|
|
251
|
-
for (let index = start + 1; index < lines.length; index += 1) {
|
|
252
|
-
if (/^##\s+/.test(lines[index]!)) { end = index; break; }
|
|
253
|
-
}
|
|
254
|
-
return lines.slice(start + 1, end).join('\n');
|
|
255
|
-
}
|
|
256
|
-
|
|
257
244
|
function assertWritableInventory(inventory: ArtifactInventoryResult): ArtifactError | null {
|
|
258
245
|
if (inventory.status === 'failed') return inventory.error;
|
|
259
246
|
const blockers = inventory.diagnostics.filter((item) => BLOCKING_DIAGNOSTICS.has(item.code));
|
|
@@ -398,29 +385,6 @@ function resolveDecisionImplementationInput(
|
|
|
398
385
|
catch (error) { return { error: error instanceof Error ? error.message : String(error) }; }
|
|
399
386
|
}
|
|
400
387
|
|
|
401
|
-
function normalizeVerdict(value: string): 'Approved' | 'Changes Requested' | 'Rejected' | null {
|
|
402
|
-
const normalized = value.trim().toLowerCase();
|
|
403
|
-
if (normalized === '通过' || normalized === 'approved') return 'Approved';
|
|
404
|
-
if (normalized === '需要修改' || normalized === 'changes requested') return 'Changes Requested';
|
|
405
|
-
if (normalized === '拒绝' || normalized === 'rejected') return 'Rejected';
|
|
406
|
-
return null;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
function parseVerdict(file: string): { ok: true; verdict: string } | { ok: false; message: string } {
|
|
410
|
-
let content: string;
|
|
411
|
-
try { content = fs.readFileSync(file, 'utf8'); }
|
|
412
|
-
catch (error) { return { ok: false, message: String(error) }; }
|
|
413
|
-
const summary = extractMarkdownSection(content, ['审查摘要', 'Review Summary']);
|
|
414
|
-
const verdictMatch = /^[-*]?\s*\*\*(?:总体结论|Overall Verdict)\*\*[::]\s*(.+?)\s*$/im.exec(summary);
|
|
415
|
-
const verdict = verdictMatch?.[1] ? normalizeVerdict(verdictMatch[1]) : null;
|
|
416
|
-
if (!verdict) return { ok: false, message: `cannot parse verdict in ${path.basename(file)}` };
|
|
417
|
-
if (verdict !== 'Approved') return { ok: true, verdict };
|
|
418
|
-
const findings = /^[-*]?\s*\*\*(?:发现(AI 可处理)|Findings \(AI-actionable\))\*\*[::]\s*(.+?)\s*$/im.exec(summary)?.[1];
|
|
419
|
-
const counts = findings?.match(/(\d+)\s*(?:阻塞项|blockers?).*?(\d+)\s*(?:主要|majors?).*?(\d+)\s*(?:次要|minors?)/i);
|
|
420
|
-
if (!counts) return { ok: false, message: `cannot parse findings count in ${path.basename(file)}` };
|
|
421
|
-
return { ok: true, verdict: counts.slice(1).some((value) => Number(value) > 0) ? 'Approved-with-issues' : 'Approved' };
|
|
422
|
-
}
|
|
423
|
-
|
|
424
388
|
function validateCompletedArtifact(taskDir: string, family: ArtifactFamily, name: string, round?: number): { ok: true; artifact: ArtifactIdentity } | { ok: false; error: ArtifactError } {
|
|
425
389
|
if (path.basename(name) !== name) return { ok: false, error: { code: 'ARTIFACT_PATH_INVALID', message: 'artifact must be a top-level basename' } };
|
|
426
390
|
const parsed = parseArtifactName(name);
|
|
@@ -10,8 +10,9 @@ import { extractSubSection } from '../sections.ts';
|
|
|
10
10
|
const USAGE = `Usage: ai task decisions [--task <ref> | -t <ref>] [--item <selector> | -i <selector>] [options]
|
|
11
11
|
ai task decisions <ref> [selector] [options]
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
Shows what still needs a maintainer's decision. Without a selector, it lists
|
|
14
|
+
the choices. With a selector, it shows the explanation and how to respond.
|
|
15
|
+
Read-only.
|
|
15
16
|
|
|
16
17
|
Omit <ref> Resolve the unique active task for the current branch.
|
|
17
18
|
<ref> Legacy positional task ref.
|
|
@@ -150,29 +151,31 @@ function findDecisionRecord(id: string, content: string): string[] {
|
|
|
150
151
|
function titleOf(row: LedgerRow, taskDir: string): string {
|
|
151
152
|
const block = findDetailBlock(row, taskDir);
|
|
152
153
|
if (block) {
|
|
153
|
-
|
|
154
|
+
const title = block
|
|
154
155
|
.split('\n')[0]!
|
|
155
156
|
.replace(/^###\s+/, '')
|
|
156
157
|
.replace(/\s*\[needs-human-decision\]\s*$/, '')
|
|
157
158
|
.trim();
|
|
159
|
+
return title.replace(new RegExp(`^${row.id}\\s*[::]\\s*`, 'i'), '').trim();
|
|
158
160
|
}
|
|
159
|
-
return
|
|
161
|
+
return '(explanation unavailable)';
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function trackingOf(row: LedgerRow): string {
|
|
165
|
+
return `stage=${row.stage} · severity=${row.severity} · status=${row.status} · evidence=${row.evidence}`;
|
|
160
166
|
}
|
|
161
167
|
|
|
162
168
|
function renderList(rows: LedgerRow[], format: string, taskDir: string): void {
|
|
163
169
|
if (rows.length === 0) {
|
|
164
|
-
process.stdout.write('
|
|
170
|
+
process.stdout.write('No pending decisions.\n');
|
|
165
171
|
return;
|
|
166
172
|
}
|
|
167
|
-
const headers = ['#', '
|
|
173
|
+
const headers = ['#', 'CHOICE', 'WHAT NEEDS A DECISION', 'TRACKING'];
|
|
168
174
|
const data = rows.map((r, i) => [
|
|
169
175
|
String(i + 1),
|
|
170
176
|
r.id,
|
|
171
|
-
r
|
|
172
|
-
r
|
|
173
|
-
r.status,
|
|
174
|
-
r.evidence,
|
|
175
|
-
titleOf(r, taskDir)
|
|
177
|
+
titleOf(r, taskDir),
|
|
178
|
+
trackingOf(r)
|
|
176
179
|
]);
|
|
177
180
|
if (format === 'markdown') {
|
|
178
181
|
const sep = headers.map(() => '---');
|
|
@@ -181,10 +184,29 @@ function renderList(rows: LedgerRow[], format: string, taskDir: string): void {
|
|
|
181
184
|
`| ${sep.join(' | ')} |`,
|
|
182
185
|
...data.map((row) => `| ${row.join(' | ')} |`)
|
|
183
186
|
];
|
|
184
|
-
process.stdout.write(`${md.join('\n')}\n`);
|
|
187
|
+
process.stdout.write(`${md.join('\n')}\n\nView one item: ai task decisions <task-ref> <ordinal|ledger-id>\n`);
|
|
185
188
|
return;
|
|
186
189
|
}
|
|
187
|
-
process.stdout.write(`${formatTable(headers, data).join('\n')}\n`);
|
|
190
|
+
process.stdout.write(`${formatTable(headers, data).join('\n')}\n\nView one item: ai task decisions <task-ref> <ordinal|ledger-id>\n`);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
function renderTracking(row: LedgerRow, format: string): string[] {
|
|
194
|
+
if (format === 'markdown') {
|
|
195
|
+
return [
|
|
196
|
+
'**Tracking**',
|
|
197
|
+
`- stage: \`${row.stage}\``,
|
|
198
|
+
`- severity: \`${row.severity}\``,
|
|
199
|
+
`- status: \`${row.status}\``,
|
|
200
|
+
`- evidence: \`${row.evidence}\``
|
|
201
|
+
];
|
|
202
|
+
}
|
|
203
|
+
return [
|
|
204
|
+
'Tracking:',
|
|
205
|
+
`stage: ${row.stage}`,
|
|
206
|
+
`severity: ${row.severity}`,
|
|
207
|
+
`status: ${row.status}`,
|
|
208
|
+
`evidence: ${row.evidence}`
|
|
209
|
+
];
|
|
188
210
|
}
|
|
189
211
|
|
|
190
212
|
function renderDetail(
|
|
@@ -201,25 +223,36 @@ function renderDetail(
|
|
|
201
223
|
}
|
|
202
224
|
const r = selected.row;
|
|
203
225
|
const block = findDetailBlock(r, taskDir);
|
|
226
|
+
const title = titleOf(r, taskDir);
|
|
204
227
|
const lines: string[] = [];
|
|
228
|
+
const decided = r.status === 'human-decided';
|
|
205
229
|
if (format === 'markdown') {
|
|
206
|
-
lines.push(
|
|
230
|
+
lines.push(`## ${decided ? 'Decision already recorded' : 'Decision needed'}: ${title}`, '');
|
|
231
|
+
if (!decided) {
|
|
232
|
+
lines.push('**How to record your choice**', `\`ai decide <task-ref> ${r.id} <your choice and rationale>\``, '');
|
|
233
|
+
}
|
|
234
|
+
lines.push('**Original context**', '');
|
|
207
235
|
} else {
|
|
208
|
-
lines.push(`${
|
|
236
|
+
lines.push(`${decided ? 'Decision already recorded' : 'Decision needed'}: ${title}`, '');
|
|
237
|
+
if (!decided) {
|
|
238
|
+
lines.push('How to record your choice:', `ai decide <task-ref> ${r.id} <your choice and rationale>`, '');
|
|
239
|
+
}
|
|
240
|
+
lines.push('Original context:');
|
|
209
241
|
}
|
|
210
242
|
if (block) {
|
|
211
243
|
lines.push(block);
|
|
212
244
|
} else {
|
|
213
245
|
lines.push(
|
|
214
|
-
|
|
246
|
+
`This older task does not include a full explanation for ${r.id}.`,
|
|
247
|
+
'Use the tracking reference below to find the original context.'
|
|
215
248
|
);
|
|
216
249
|
}
|
|
217
|
-
if (
|
|
250
|
+
if (decided) {
|
|
218
251
|
const record = findDecisionRecord(r.id, content);
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
}
|
|
252
|
+
lines.push('', format === 'markdown' ? '**Recorded choice**' : 'Recorded choice:');
|
|
253
|
+
lines.push(...(record.length ? record : ['No separate ruling record was found.']));
|
|
222
254
|
}
|
|
255
|
+
lines.push('', ...renderTracking(r, format));
|
|
223
256
|
process.stdout.write(`${lines.join('\n')}\n`);
|
|
224
257
|
}
|
|
225
258
|
|
package/lib/task/commands/log.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
|
+
import { classifyAgent } from '../../agent-clients/tokens.ts';
|
|
2
3
|
import { formatTable } from '../../table.ts';
|
|
3
4
|
import { parseTaskScope } from '../command-options.ts';
|
|
4
5
|
import { resolveTaskContext } from '../resolve-ref.ts';
|
|
@@ -34,11 +35,11 @@ const TABLE_HEADERS = ['#', 'STEP', 'AGENT', 'STARTED', 'DONE', 'NOTE'] as const
|
|
|
34
35
|
// with ` [started]`; the matching done entry carries the identical base action
|
|
35
36
|
// without the suffix. Pairing therefore keys on the base action (including any
|
|
36
37
|
// `(Round N)`), so every round and every repeated execution pairs on its own.
|
|
37
|
-
//
|
|
38
|
-
//
|
|
39
|
-
//
|
|
40
|
-
//
|
|
41
|
-
|
|
38
|
+
// Known AI tokens, long-name mapping, and loose rendering classification live
|
|
39
|
+
// in lib/agent-clients/tokens.ts (single source of truth shared with the
|
|
40
|
+
// write-side internal commands). Any other executor token (a human name,
|
|
41
|
+
// possibly CJK, or an unknown value) is rendered as human with a visible
|
|
42
|
+
// `(unknown)` marker.
|
|
42
43
|
const REVIEW_STAGE_PREFIXES: { prefix: string; stage: ReviewStage }[] = [
|
|
43
44
|
{ prefix: 'Review Analysis', stage: 'analysis' },
|
|
44
45
|
{ prefix: 'Review Plan', stage: 'plan' },
|
|
@@ -90,12 +91,11 @@ function isHumanCountField(field: string): boolean {
|
|
|
90
91
|
return fieldNumber(field, 'manual-validation') !== undefined || fieldNumber(field, 'human-decision') !== undefined;
|
|
91
92
|
}
|
|
92
93
|
|
|
93
|
-
// A step is human-executed when its agent token is not a known AI token.
|
|
94
|
-
//
|
|
95
|
-
//
|
|
96
|
-
function isHumanAgent(agent: string): boolean {
|
|
97
|
-
|
|
98
|
-
return token !== '' && !KNOWN_AI_AGENTS.has(token);
|
|
94
|
+
// A step is human-executed when its agent token is not a known AI token.
|
|
95
|
+
// Known long names (claude-code -> claude, gemini-cli -> gemini) classify as
|
|
96
|
+
// AI; empty or unknown tokens classify as non-AI (human).
|
|
97
|
+
export function isHumanAgent(agent: string): boolean {
|
|
98
|
+
return classifyAgent(agent).status !== 'ai';
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
// Fold the two human counts into a review row's verdict NOTE: comma-joined, right
|
|
@@ -152,8 +152,9 @@ function log(args: string[] = []): void {
|
|
|
152
152
|
const note = stage
|
|
153
153
|
? foldHumanCounts(s.note, humanDecisionCounts.get(stage) ?? 0, humanValidationCount(s.note))
|
|
154
154
|
: s.note;
|
|
155
|
-
const
|
|
156
|
-
const
|
|
155
|
+
const { status, display } = classifyAgent(s.agent);
|
|
156
|
+
const human = status !== 'ai';
|
|
157
|
+
const agent = status === 'unknown' ? `${display} (unknown)` : display;
|
|
157
158
|
const started = s.started || (human ? '-' : '');
|
|
158
159
|
return [String(idx + 1), s.step, agent, started, s.done || (s.started ? '(in progress)' : ''), note];
|
|
159
160
|
});
|
|
@@ -163,4 +164,4 @@ function log(args: string[] = []): void {
|
|
|
163
164
|
process.stdout.write(`Total: ${steps.length} steps\n`);
|
|
164
165
|
}
|
|
165
166
|
|
|
166
|
-
export { log
|
|
167
|
+
export { log };
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
2
|
+
|
|
3
|
+
import type { AgentClientId } from '../agent-clients/types.ts';
|
|
4
|
+
|
|
5
|
+
type DelegationRole = 'executor' | 'reviewer';
|
|
6
|
+
type DelegationStage = 'analysis' | 'review-analysis' | 'plan' | 'review-plan' | 'code' | 'review-code' | 'commit';
|
|
7
|
+
type DelegationStatus = 'prepared' | 'activated' | 'stage-completed' | 'sealed' | 'consumed' | 'aborted' | 'expired';
|
|
8
|
+
|
|
9
|
+
type DelegationReceipt = Readonly<{
|
|
10
|
+
id: string;
|
|
11
|
+
taskId: string;
|
|
12
|
+
runId: string;
|
|
13
|
+
role: DelegationRole;
|
|
14
|
+
stage: DelegationStage;
|
|
15
|
+
round: number;
|
|
16
|
+
artifact: string;
|
|
17
|
+
client: AgentClientId;
|
|
18
|
+
requestedModel: string | null;
|
|
19
|
+
requestedReasoningEffort: string | null;
|
|
20
|
+
actualModel: string | null;
|
|
21
|
+
actualReasoningEffort: string | null;
|
|
22
|
+
modelFallbackReason: string | null;
|
|
23
|
+
reasoningEffortFallbackReason: string | null;
|
|
24
|
+
parentId: string | null;
|
|
25
|
+
childId: string | null;
|
|
26
|
+
spawnMode: string | null;
|
|
27
|
+
agent: string | null;
|
|
28
|
+
status: DelegationStatus;
|
|
29
|
+
workspaceSnapshotScope?: 'task';
|
|
30
|
+
beforeFingerprint: string;
|
|
31
|
+
afterFingerprint: string | null;
|
|
32
|
+
changedPaths: readonly string[];
|
|
33
|
+
createdAt: string;
|
|
34
|
+
activatedAt: string | null;
|
|
35
|
+
sealedAt: string | null;
|
|
36
|
+
consumedAt: string | null;
|
|
37
|
+
}>;
|
|
38
|
+
|
|
39
|
+
type ReceiptFailure = Readonly<{ ok: false; code: string; message: string; receipt?: never }>;
|
|
40
|
+
type ReceiptSuccess = Readonly<{ ok: true; receipt: DelegationReceipt; code?: never; message?: never }>;
|
|
41
|
+
type ReceiptResult = ReceiptSuccess | ReceiptFailure;
|
|
42
|
+
|
|
43
|
+
const MANAGED_AGENTS = {
|
|
44
|
+
'agent-infra-lifecycle-executor': 'executor',
|
|
45
|
+
'agent-infra-lifecycle-reviewer': 'reviewer'
|
|
46
|
+
} as const;
|
|
47
|
+
|
|
48
|
+
function managedDelegationRole(nativeAgent: string): DelegationRole | null {
|
|
49
|
+
return MANAGED_AGENTS[nativeAgent as keyof typeof MANAGED_AGENTS] ?? null;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function fail(code: string, message: string): ReceiptFailure {
|
|
53
|
+
return { ok: false, code, message };
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function prepareDelegation(
|
|
57
|
+
input: Omit<DelegationReceipt, 'id' | 'requestedModel' | 'requestedReasoningEffort' | 'actualModel' | 'actualReasoningEffort' | 'modelFallbackReason' | 'reasoningEffortFallbackReason' | 'parentId' | 'childId' | 'spawnMode' | 'agent' | 'status' | 'afterFingerprint' | 'changedPaths' | 'createdAt' | 'activatedAt' | 'sealedAt' | 'consumedAt'> & Readonly<{ requestedModel: string; requestedReasoningEffort: string }>,
|
|
58
|
+
options: { id?: () => string; now?: () => string } = {}
|
|
59
|
+
): DelegationReceipt {
|
|
60
|
+
return Object.freeze({
|
|
61
|
+
...input,
|
|
62
|
+
id: (options.id ?? randomUUID)(),
|
|
63
|
+
actualModel: null,
|
|
64
|
+
actualReasoningEffort: null,
|
|
65
|
+
modelFallbackReason: null,
|
|
66
|
+
reasoningEffortFallbackReason: null,
|
|
67
|
+
parentId: null,
|
|
68
|
+
childId: null,
|
|
69
|
+
spawnMode: null,
|
|
70
|
+
agent: null,
|
|
71
|
+
status: 'prepared' as const,
|
|
72
|
+
afterFingerprint: null,
|
|
73
|
+
changedPaths: Object.freeze([]),
|
|
74
|
+
createdAt: (options.now ?? (() => new Date().toISOString()))(),
|
|
75
|
+
activatedAt: null,
|
|
76
|
+
sealedAt: null,
|
|
77
|
+
consumedAt: null
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function activateDelegation(
|
|
82
|
+
receipt: DelegationReceipt,
|
|
83
|
+
event: Readonly<{
|
|
84
|
+
nativeAgent: string;
|
|
85
|
+
childId: string;
|
|
86
|
+
parentId: string;
|
|
87
|
+
spawnMode: string;
|
|
88
|
+
actualModel?: string;
|
|
89
|
+
actualReasoningEffort?: string;
|
|
90
|
+
modelFallbackReason?: string;
|
|
91
|
+
reasoningEffortFallbackReason?: string;
|
|
92
|
+
}>,
|
|
93
|
+
options: { now?: () => string } = {}
|
|
94
|
+
): ReceiptResult {
|
|
95
|
+
const managedRole = managedDelegationRole(event.nativeAgent);
|
|
96
|
+
if (!managedRole) return fail('DELEGATION_IGNORED', `subagent '${event.nativeAgent}' is not lifecycle-managed`);
|
|
97
|
+
if (receipt.status !== 'prepared') return fail('DELEGATION_STATE_INVALID', `delegation ${receipt.id} is ${receipt.status}, expected prepared`);
|
|
98
|
+
if (managedRole !== receipt.role) return fail('DELEGATION_ROLE_MISMATCH', `managed role ${managedRole} does not match ${receipt.role}`);
|
|
99
|
+
if (!event.parentId || (receipt.parentId !== null && event.parentId !== receipt.parentId) || !event.childId || event.childId === event.parentId) {
|
|
100
|
+
return fail('DELEGATION_IDENTITY_INVALID', 'native parent/child identity does not match the prepared delegation');
|
|
101
|
+
}
|
|
102
|
+
if (event.spawnMode !== 'fresh') return fail('DELEGATION_FORK_FORBIDDEN', `spawn mode '${event.spawnMode}' is not fresh`);
|
|
103
|
+
const actualModel = event.actualModel;
|
|
104
|
+
if (!actualModel || actualModel.trim() !== actualModel) {
|
|
105
|
+
return fail('DELEGATION_MODEL_IDENTITY_MISSING', 'native start event must provide a non-empty actual model identity');
|
|
106
|
+
}
|
|
107
|
+
if (actualModel !== receipt.requestedModel && (!event.modelFallbackReason || event.modelFallbackReason.trim() === '')) {
|
|
108
|
+
return fail('DELEGATION_MODEL_FALLBACK_UNRECORDED', 'actual model differs from requested model without a fallback reason');
|
|
109
|
+
}
|
|
110
|
+
const actualReasoningEffort = event.actualReasoningEffort;
|
|
111
|
+
if (!actualReasoningEffort || actualReasoningEffort.trim() !== actualReasoningEffort) {
|
|
112
|
+
return fail('DELEGATION_REASONING_EFFORT_MISSING', 'native start event must provide a non-empty actual reasoning effort');
|
|
113
|
+
}
|
|
114
|
+
if (
|
|
115
|
+
actualReasoningEffort !== receipt.requestedReasoningEffort
|
|
116
|
+
&& (!event.reasoningEffortFallbackReason || event.reasoningEffortFallbackReason.trim() === '')
|
|
117
|
+
) {
|
|
118
|
+
return fail('DELEGATION_REASONING_EFFORT_FALLBACK_UNRECORDED', 'actual reasoning effort differs from requested effort without a fallback reason');
|
|
119
|
+
}
|
|
120
|
+
if (actualModel === receipt.requestedModel && event.modelFallbackReason) {
|
|
121
|
+
return fail('DELEGATION_MODEL_FALLBACK_INVALID', 'model fallback reason is only valid when actual model differs');
|
|
122
|
+
}
|
|
123
|
+
if (actualReasoningEffort === receipt.requestedReasoningEffort && event.reasoningEffortFallbackReason) {
|
|
124
|
+
return fail('DELEGATION_REASONING_EFFORT_FALLBACK_INVALID', 'reasoning-effort fallback reason is only valid when actual effort differs');
|
|
125
|
+
}
|
|
126
|
+
return { ok: true, receipt: Object.freeze({
|
|
127
|
+
...receipt,
|
|
128
|
+
status: 'activated',
|
|
129
|
+
parentId: event.parentId,
|
|
130
|
+
childId: event.childId,
|
|
131
|
+
spawnMode: event.spawnMode,
|
|
132
|
+
actualModel,
|
|
133
|
+
actualReasoningEffort,
|
|
134
|
+
modelFallbackReason: event.modelFallbackReason ?? null,
|
|
135
|
+
reasoningEffortFallbackReason: event.reasoningEffortFallbackReason ?? null,
|
|
136
|
+
activatedAt: (options.now ?? (() => new Date().toISOString()))()
|
|
137
|
+
}) };
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function completeDelegationStage(
|
|
141
|
+
receipt: DelegationReceipt,
|
|
142
|
+
event: Readonly<{ stage: DelegationStage; round: number; artifact: string; agent: string }>
|
|
143
|
+
): ReceiptResult {
|
|
144
|
+
if (receipt.status !== 'activated') return fail('DELEGATION_STATE_INVALID', `delegation ${receipt.id} is ${receipt.status}, expected activated`);
|
|
145
|
+
if (event.stage !== receipt.stage || event.round !== receipt.round || event.artifact !== receipt.artifact) {
|
|
146
|
+
return fail('DELEGATION_STAGE_MISMATCH', 'stage completion identity does not match the active delegation');
|
|
147
|
+
}
|
|
148
|
+
const acceptedAgents = receipt.client === 'claude-code' ? ['claude', 'claude-code'] : [receipt.client];
|
|
149
|
+
if (!acceptedAgents.includes(event.agent)) {
|
|
150
|
+
return fail('DELEGATION_AGENT_MISMATCH', `stage agent '${event.agent}' does not match client '${receipt.client}'`);
|
|
151
|
+
}
|
|
152
|
+
return { ok: true, receipt: Object.freeze({ ...receipt, status: 'stage-completed', agent: event.agent }) };
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function sealDelegation(
|
|
156
|
+
receipt: DelegationReceipt,
|
|
157
|
+
event: Readonly<{ childId: string; exitCode: number; afterFingerprint: string; changedPaths: readonly string[] }>,
|
|
158
|
+
options: { now?: () => string } = {}
|
|
159
|
+
): ReceiptResult {
|
|
160
|
+
if (receipt.status !== 'stage-completed') return fail('DELEGATION_STATE_INVALID', `delegation ${receipt.id} is ${receipt.status}, expected stage-completed`);
|
|
161
|
+
if (event.childId !== receipt.childId || event.exitCode !== 0) return fail('DELEGATION_STOP_INVALID', 'native stop identity or exit status is invalid');
|
|
162
|
+
if (receipt.role === 'reviewer') {
|
|
163
|
+
const taskRoot = `.agents/workspace/active/${receipt.taskId}/`;
|
|
164
|
+
const allowed = new Set([
|
|
165
|
+
`${taskRoot}${receipt.artifact}`,
|
|
166
|
+
`${taskRoot}task.md`,
|
|
167
|
+
`${taskRoot}orchestration.json`
|
|
168
|
+
]);
|
|
169
|
+
const disallowed = event.changedPaths.find((entry) => !allowed.has(entry));
|
|
170
|
+
if (disallowed) return fail('DELEGATION_REVIEWER_WRITE_FORBIDDEN', `reviewer changed forbidden path '${disallowed}'`);
|
|
171
|
+
}
|
|
172
|
+
return { ok: true, receipt: Object.freeze({
|
|
173
|
+
...receipt,
|
|
174
|
+
status: 'sealed',
|
|
175
|
+
afterFingerprint: event.afterFingerprint,
|
|
176
|
+
changedPaths: Object.freeze([...event.changedPaths]),
|
|
177
|
+
sealedAt: (options.now ?? (() => new Date().toISOString()))()
|
|
178
|
+
}) };
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function consumeDelegation(receipt: DelegationReceipt, options: { now?: () => string } = {}): ReceiptResult {
|
|
182
|
+
if (receipt.status === 'consumed') return fail('DELEGATION_REPLAY', `delegation ${receipt.id} was already consumed`);
|
|
183
|
+
if (receipt.status !== 'sealed') return fail('DELEGATION_STATE_INVALID', `delegation ${receipt.id} is ${receipt.status}, expected sealed`);
|
|
184
|
+
return { ok: true, receipt: Object.freeze({
|
|
185
|
+
...receipt,
|
|
186
|
+
status: 'consumed',
|
|
187
|
+
consumedAt: (options.now ?? (() => new Date().toISOString()))()
|
|
188
|
+
}) };
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export {
|
|
192
|
+
activateDelegation,
|
|
193
|
+
completeDelegationStage,
|
|
194
|
+
consumeDelegation,
|
|
195
|
+
managedDelegationRole,
|
|
196
|
+
prepareDelegation,
|
|
197
|
+
sealDelegation
|
|
198
|
+
};
|
|
199
|
+
export type { DelegationReceipt, DelegationRole, DelegationStage, DelegationStatus, ReceiptResult };
|