agentplane 0.3.12 → 0.3.14
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/assets/RUNNER.md +1 -1
- package/assets/agents/ORCHESTRATOR.json +1 -1
- package/assets/agents/SKILL_EXTRACTOR.json +31 -0
- package/assets/codex-plugin/assets/header.png +0 -0
- package/assets/codex-plugin/assets/icon.svg +1 -0
- package/assets/codex-plugin/assets/logo.svg +1 -0
- package/assets/codex-plugin/skills/agentplane/SKILL.md +35 -0
- package/assets/framework.manifest.json +7 -0
- package/assets/policy/governance.md +4 -2
- package/assets/policy/incidents.md +4 -19
- package/assets/policy/workflow.branch_pr.md +10 -5
- package/assets/policy/workflow.release.md +5 -2
- package/dist/.build-manifest.json +409 -219
- package/dist/cli/exit-codes.d.ts.map +1 -1
- package/dist/cli/exit-codes.js +1 -0
- package/dist/cli/output.d.ts +29 -0
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +33 -0
- package/dist/cli/reason-codes.d.ts +1 -1
- package/dist/cli/reason-codes.d.ts.map +1 -1
- package/dist/cli/reason-codes.js +12 -0
- package/dist/cli/run-cli/command-catalog/core.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog/core.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/core.js +36 -78
- package/dist/cli/run-cli/command-catalog/lifecycle.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/lifecycle.js +4 -12
- package/dist/cli/run-cli/command-catalog/project.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog/project.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/project.js +27 -31
- package/dist/cli/run-cli/command-catalog/shared.d.ts +9 -6
- package/dist/cli/run-cli/command-catalog/shared.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/shared.js +23 -6
- package/dist/cli/run-cli/command-catalog/task.d.ts.map +1 -1
- package/dist/cli/run-cli/command-catalog/task.js +6 -18
- package/dist/cli/run-cli/command-catalog.d.ts +1 -1
- package/dist/cli/run-cli/command-catalog.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/codex.d.ts +14 -0
- package/dist/cli/run-cli/commands/codex.d.ts.map +1 -0
- package/dist/cli/run-cli/commands/codex.js +100 -0
- package/dist/cli/run-cli/commands/core.d.ts +1 -0
- package/dist/cli/run-cli/commands/core.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/core.js +1 -0
- package/dist/cli/run-cli/commands/init/recipes.d.ts +9 -1
- package/dist/cli/run-cli/commands/init/recipes.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init/recipes.js +33 -22
- package/dist/cli/run-cli/commands/init.d.ts.map +1 -1
- package/dist/cli/run-cli/commands/init.js +26 -21
- package/dist/cli/run-cli/error-guidance.js +20 -0
- package/dist/cli/run-cli.js +1 -1
- package/dist/cli/run-cli.test-helpers.d.ts +1 -74
- package/dist/cli/run-cli.test-helpers.d.ts.map +1 -1
- package/dist/cli/run-cli.test-helpers.js +1 -766
- package/dist/commands/branch/cleanup-merged.d.ts.map +1 -1
- package/dist/commands/branch/cleanup-merged.js +5 -9
- package/dist/commands/branch/work-start.command.d.ts.map +1 -1
- package/dist/commands/branch/work-start.command.js +1 -0
- package/dist/commands/codex/plugin-install.d.ts +26 -0
- package/dist/commands/codex/plugin-install.d.ts.map +1 -0
- package/dist/commands/codex/plugin-install.js +209 -0
- package/dist/commands/commit.spec.d.ts.map +1 -1
- package/dist/commands/commit.spec.js +2 -0
- package/dist/commands/doctor/branch-pr.d.ts +1 -1
- package/dist/commands/doctor/branch-pr.d.ts.map +1 -1
- package/dist/commands/doctor/branch-pr.js +5 -2
- package/dist/commands/guard/impl/commands.d.ts.map +1 -1
- package/dist/commands/guard/impl/commands.js +4 -1
- package/dist/commands/guard/impl/comment-commit.d.ts.map +1 -1
- package/dist/commands/guard/impl/comment-commit.js +2 -1
- package/dist/commands/guard/impl/env.d.ts +6 -0
- package/dist/commands/guard/impl/env.d.ts.map +1 -1
- package/dist/commands/guard/impl/env.js +41 -0
- package/dist/commands/pr/integrate/cmd.d.ts.map +1 -1
- package/dist/commands/pr/integrate/cmd.js +81 -5
- package/dist/commands/pr/integrate/internal/prepare.d.ts.map +1 -1
- package/dist/commands/pr/integrate/internal/prepare.js +38 -7
- package/dist/commands/pr/internal/auto-commit.d.ts.map +1 -1
- package/dist/commands/pr/internal/auto-commit.js +13 -7
- package/dist/commands/pr/internal/sync-branch.d.ts +36 -0
- package/dist/commands/pr/internal/sync-branch.d.ts.map +1 -0
- package/dist/commands/pr/internal/sync-branch.js +113 -0
- package/dist/commands/pr/internal/sync-github.d.ts +28 -0
- package/dist/commands/pr/internal/sync-github.d.ts.map +1 -0
- package/dist/commands/pr/internal/sync-github.js +178 -0
- package/dist/commands/pr/internal/sync-model.d.ts +36 -0
- package/dist/commands/pr/internal/sync-model.d.ts.map +1 -0
- package/dist/commands/pr/internal/sync-model.js +1 -0
- package/dist/commands/pr/internal/sync-open-step.d.ts +10 -0
- package/dist/commands/pr/internal/sync-open-step.d.ts.map +1 -0
- package/dist/commands/pr/internal/sync-open-step.js +128 -0
- package/dist/commands/pr/internal/sync-support.d.ts +7 -0
- package/dist/commands/pr/internal/sync-support.d.ts.map +1 -0
- package/dist/commands/pr/internal/sync-support.js +29 -0
- package/dist/commands/pr/internal/sync-update-step.d.ts +6 -0
- package/dist/commands/pr/internal/sync-update-step.d.ts.map +1 -0
- package/dist/commands/pr/internal/sync-update-step.js +68 -0
- package/dist/commands/pr/internal/sync.d.ts +2 -6
- package/dist/commands/pr/internal/sync.d.ts.map +1 -1
- package/dist/commands/pr/internal/sync.js +83 -525
- package/dist/commands/pr/open.d.ts.map +1 -1
- package/dist/commands/pr/open.js +62 -7
- package/dist/commands/pr/pr.command.d.ts.map +1 -1
- package/dist/commands/pr/pr.command.js +7 -2
- package/dist/commands/recipes/active.command.d.ts +7 -0
- package/dist/commands/recipes/active.command.d.ts.map +1 -0
- package/dist/commands/recipes/active.command.js +12 -0
- package/dist/commands/recipes/add.command.d.ts +8 -0
- package/dist/commands/recipes/add.command.d.ts.map +1 -0
- package/dist/commands/recipes/add.command.js +33 -0
- package/dist/commands/recipes/detach.command.d.ts +7 -0
- package/dist/commands/recipes/detach.command.d.ts.map +1 -0
- package/dist/commands/recipes/detach.command.js +19 -0
- package/dist/commands/recipes/disable.command.d.ts +7 -0
- package/dist/commands/recipes/disable.command.d.ts.map +1 -0
- package/dist/commands/recipes/disable.command.js +10 -0
- package/dist/commands/recipes/enable.command.d.ts +7 -0
- package/dist/commands/recipes/enable.command.d.ts.map +1 -0
- package/dist/commands/recipes/enable.command.js +10 -0
- package/dist/commands/recipes/explain-active.command.d.ts +5 -0
- package/dist/commands/recipes/explain-active.command.d.ts.map +1 -0
- package/dist/commands/recipes/explain-active.command.js +11 -0
- package/dist/commands/recipes/explain.command.d.ts.map +1 -1
- package/dist/commands/recipes/explain.command.js +4 -2
- package/dist/commands/recipes/impl/apply.d.ts +1 -1
- package/dist/commands/recipes/impl/apply.d.ts.map +1 -1
- package/dist/commands/recipes/impl/apply.js +34 -16
- package/dist/commands/recipes/impl/commands/active.d.ts +6 -0
- package/dist/commands/recipes/impl/commands/active.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/active.js +47 -0
- package/dist/commands/recipes/impl/commands/add.d.ts +8 -0
- package/dist/commands/recipes/impl/commands/add.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/add.js +105 -0
- package/dist/commands/recipes/impl/commands/detach.d.ts +6 -0
- package/dist/commands/recipes/impl/commands/detach.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/detach.js +99 -0
- package/dist/commands/recipes/impl/commands/disable.d.ts +6 -0
- package/dist/commands/recipes/impl/commands/disable.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/disable.js +23 -0
- package/dist/commands/recipes/impl/commands/enable.d.ts +6 -0
- package/dist/commands/recipes/impl/commands/enable.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/enable.js +41 -0
- package/dist/commands/recipes/impl/commands/explain-active.d.ts +5 -0
- package/dist/commands/recipes/impl/commands/explain-active.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/explain-active.js +20 -0
- package/dist/commands/recipes/impl/commands/explain.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/explain.js +83 -36
- package/dist/commands/recipes/impl/commands/info.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/info.js +39 -22
- package/dist/commands/recipes/impl/commands/install.d.ts +1 -1
- package/dist/commands/recipes/impl/commands/install.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/install.js +35 -42
- package/dist/commands/recipes/impl/commands/list-remote.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/list-remote.js +2 -3
- package/dist/commands/recipes/impl/commands/list.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/list.js +13 -12
- package/dist/commands/recipes/impl/commands/remove.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands/remove.js +12 -2
- package/dist/commands/recipes/impl/commands/update.d.ts +7 -0
- package/dist/commands/recipes/impl/commands/update.d.ts.map +1 -0
- package/dist/commands/recipes/impl/commands/update.js +107 -0
- package/dist/commands/recipes/impl/commands.d.ts +7 -0
- package/dist/commands/recipes/impl/commands.d.ts.map +1 -1
- package/dist/commands/recipes/impl/commands.js +7 -0
- package/dist/commands/recipes/impl/constants.d.ts +1 -14
- package/dist/commands/recipes/impl/constants.d.ts.map +1 -1
- package/dist/commands/recipes/impl/constants.js +1 -18
- package/dist/commands/recipes/impl/index.d.ts +1 -1
- package/dist/commands/recipes/impl/index.d.ts.map +1 -1
- package/dist/commands/recipes/impl/installed-recipes.d.ts +1 -1
- package/dist/commands/recipes/impl/installed-recipes.d.ts.map +1 -1
- package/dist/commands/recipes/impl/installed-recipes.js +1 -2
- package/dist/commands/recipes/impl/mutation-transaction.d.ts +7 -0
- package/dist/commands/recipes/impl/mutation-transaction.d.ts.map +1 -0
- package/dist/commands/recipes/impl/mutation-transaction.js +47 -0
- package/dist/commands/recipes/impl/overlay-project.d.ts +48 -0
- package/dist/commands/recipes/impl/overlay-project.d.ts.map +1 -0
- package/dist/commands/recipes/impl/overlay-project.js +320 -0
- package/dist/commands/recipes/impl/paths.d.ts +17 -2
- package/dist/commands/recipes/impl/paths.d.ts.map +1 -1
- package/dist/commands/recipes/impl/paths.js +20 -5
- package/dist/commands/recipes/impl/project-installed-recipes.d.ts +5 -4
- package/dist/commands/recipes/impl/project-installed-recipes.d.ts.map +1 -1
- package/dist/commands/recipes/impl/project-installed-recipes.js +34 -76
- package/dist/commands/recipes/impl/project-recipe-state.d.ts +18 -0
- package/dist/commands/recipes/impl/project-recipe-state.d.ts.map +1 -0
- package/dist/commands/recipes/impl/project-recipe-state.js +94 -0
- package/dist/commands/recipes/impl/project-registry.d.ts +24 -0
- package/dist/commands/recipes/impl/project-registry.d.ts.map +1 -0
- package/dist/commands/recipes/impl/project-registry.js +124 -0
- package/dist/commands/recipes/impl/resolver.d.ts +1 -1
- package/dist/commands/recipes/impl/resolver.d.ts.map +1 -1
- package/dist/commands/recipes/impl/resolver.js +6 -4
- package/dist/commands/recipes/impl/types.d.ts +1 -240
- package/dist/commands/recipes/impl/types.d.ts.map +1 -1
- package/dist/commands/recipes/impl/version.d.ts +5 -0
- package/dist/commands/recipes/impl/version.d.ts.map +1 -0
- package/dist/commands/recipes/impl/version.js +9 -0
- package/dist/commands/recipes/info.command.js +2 -2
- package/dist/commands/recipes/install.spec.js +4 -4
- package/dist/commands/recipes/list.command.js +4 -4
- package/dist/commands/recipes/remove.command.js +2 -2
- package/dist/commands/recipes/update.command.d.ts +8 -0
- package/dist/commands/recipes/update.command.d.ts.map +1 -0
- package/dist/commands/recipes/update.command.js +35 -0
- package/dist/commands/recipes.d.ts +10 -6
- package/dist/commands/recipes.d.ts.map +1 -1
- package/dist/commands/recipes.js +8 -5
- package/dist/commands/recipes.test-helpers.d.ts +3 -3
- package/dist/commands/recipes.test-helpers.d.ts.map +1 -1
- package/dist/commands/recipes.test-helpers.js +105 -15
- package/dist/commands/release/apply.command.d.ts +1 -1
- package/dist/commands/release/apply.command.d.ts.map +1 -1
- package/dist/commands/release/apply.command.js +15 -379
- package/dist/commands/release/apply.mutation.d.ts +1 -0
- package/dist/commands/release/apply.mutation.d.ts.map +1 -1
- package/dist/commands/release/apply.mutation.js +24 -1
- package/dist/commands/release/apply.pipeline.d.ts +22 -0
- package/dist/commands/release/apply.pipeline.d.ts.map +1 -0
- package/dist/commands/release/apply.pipeline.js +371 -0
- package/dist/commands/release/apply.preflight.d.ts +2 -0
- package/dist/commands/release/apply.preflight.d.ts.map +1 -1
- package/dist/commands/release/apply.preflight.js +13 -4
- package/dist/commands/release/apply.types.d.ts +27 -0
- package/dist/commands/release/apply.types.d.ts.map +1 -1
- package/dist/commands/release.test-helpers.d.ts +4 -0
- package/dist/commands/release.test-helpers.d.ts.map +1 -1
- package/dist/commands/release.test-helpers.js +7 -0
- package/dist/commands/scenario/execute.command.js +4 -4
- package/dist/commands/scenario/impl/commands.js +4 -4
- package/dist/commands/scenario/info.command.js +4 -4
- package/dist/commands/scenario/list.command.js +3 -3
- package/dist/commands/scenario/run.command.js +5 -5
- package/dist/commands/scenario/scenario.command.js +7 -7
- package/dist/commands/shared/reconcile-check.d.ts.map +1 -1
- package/dist/commands/shared/reconcile-check.js +2 -2
- package/dist/commands/shared/task-backend.d.ts +6 -1
- package/dist/commands/shared/task-backend.d.ts.map +1 -1
- package/dist/commands/shared/task-backend.js +34 -2
- package/dist/commands/shared/task-handoff.d.ts +2 -1
- package/dist/commands/shared/task-handoff.d.ts.map +1 -1
- package/dist/commands/shared/task-handoff.js +15 -0
- package/dist/commands/shared/task-mutation.d.ts.map +1 -1
- package/dist/commands/shared/task-mutation.js +4 -4
- package/dist/commands/shared/task-store/intents.d.ts +34 -0
- package/dist/commands/shared/task-store/intents.d.ts.map +1 -0
- package/dist/commands/shared/task-store/intents.js +265 -0
- package/dist/commands/shared/task-store/readme.d.ts +28 -0
- package/dist/commands/shared/task-store/readme.d.ts.map +1 -0
- package/dist/commands/shared/task-store/readme.js +125 -0
- package/dist/commands/shared/task-store/store.d.ts +26 -0
- package/dist/commands/shared/task-store/store.d.ts.map +1 -0
- package/dist/commands/shared/task-store/store.js +105 -0
- package/dist/commands/shared/task-store/types.d.ts +94 -0
- package/dist/commands/shared/task-store/types.d.ts.map +1 -0
- package/dist/commands/shared/task-store/types.js +1 -0
- package/dist/commands/shared/task-store.d.ts +3 -109
- package/dist/commands/shared/task-store.d.ts.map +1 -1
- package/dist/commands/shared/task-store.js +2 -493
- package/dist/commands/task/block.d.ts.map +1 -1
- package/dist/commands/task/block.js +7 -2
- package/dist/commands/task/comment.d.ts.map +1 -1
- package/dist/commands/task/comment.js +7 -2
- package/dist/commands/task/finish-shared.d.ts.map +1 -1
- package/dist/commands/task/finish-shared.js +3 -3
- package/dist/commands/task/finish.d.ts.map +1 -1
- package/dist/commands/task/finish.js +102 -15
- package/dist/commands/task/handoff-show.command.d.ts.map +1 -1
- package/dist/commands/task/handoff-show.command.js +24 -0
- package/dist/commands/task/hosted-merge-sync.d.ts.map +1 -1
- package/dist/commands/task/hosted-merge-sync.js +9 -4
- package/dist/commands/task/list.run.d.ts.map +1 -1
- package/dist/commands/task/list.run.js +14 -4
- package/dist/commands/task/new.command.d.ts.map +1 -1
- package/dist/commands/task/new.command.js +16 -2
- package/dist/commands/task/new.js +2 -2
- package/dist/commands/task/show.d.ts.map +1 -1
- package/dist/commands/task/show.js +3 -3
- package/dist/commands/task/update.d.ts.map +1 -1
- package/dist/commands/task/update.js +11 -3
- package/dist/runner/adapters/codex.d.ts.map +1 -1
- package/dist/runner/adapters/codex.js +3 -33
- package/dist/runner/adapters/custom.d.ts.map +1 -1
- package/dist/runner/adapters/custom.js +3 -30
- package/dist/runner/adapters/runtime-shared.d.ts +14 -0
- package/dist/runner/adapters/runtime-shared.d.ts.map +1 -0
- package/dist/runner/adapters/runtime-shared.js +36 -0
- package/dist/runner/context/base-prompt-sources.d.ts +30 -0
- package/dist/runner/context/base-prompt-sources.d.ts.map +1 -0
- package/dist/runner/context/base-prompt-sources.js +144 -0
- package/dist/runner/context/base-prompts.d.ts +5 -23
- package/dist/runner/context/base-prompts.d.ts.map +1 -1
- package/dist/runner/context/base-prompts.js +10 -358
- package/dist/runner/context/overlay-prompt-blocks.d.ts +7 -0
- package/dist/runner/context/overlay-prompt-blocks.d.ts.map +1 -0
- package/dist/runner/context/overlay-prompt-blocks.js +72 -0
- package/dist/runner/context/prompt-block-shared.d.ts +54 -0
- package/dist/runner/context/prompt-block-shared.d.ts.map +1 -0
- package/dist/runner/context/prompt-block-shared.js +106 -0
- package/dist/runner/context/recipe-context.d.ts +2 -1
- package/dist/runner/context/recipe-context.d.ts.map +1 -1
- package/dist/runner/context/recipe-context.js +41 -8
- package/dist/runner/context/recipe-prompt-blocks.d.ts +6 -0
- package/dist/runner/context/recipe-prompt-blocks.d.ts.map +1 -0
- package/dist/runner/context/recipe-prompt-blocks.js +143 -0
- package/dist/runner/types.d.ts +4 -0
- package/dist/runner/types.d.ts.map +1 -1
- package/dist/runner/usecases/scenario-materialize-task.js +2 -2
- package/dist/runner/usecases/task-run-inspect.js +2 -2
- package/dist/runner/usecases/task-run-lifecycle-shared.js +2 -2
- package/dist/runner/usecases/task-run.d.ts.map +1 -1
- package/dist/runner/usecases/task-run.js +6 -3
- package/dist/runtime/behavior/resolve.d.ts +2 -1
- package/dist/runtime/behavior/resolve.d.ts.map +1 -1
- package/dist/runtime/behavior/resolve.js +25 -5
- package/dist/runtime/behavior/types.d.ts +1 -0
- package/dist/runtime/behavior/types.d.ts.map +1 -1
- package/dist/runtime/capabilities/recipe.d.ts +2 -1
- package/dist/runtime/capabilities/recipe.d.ts.map +1 -1
- package/dist/runtime/capabilities/recipe.js +88 -28
- package/dist/runtime/execution-context.d.ts +63 -0
- package/dist/runtime/execution-context.d.ts.map +1 -0
- package/dist/{usecases/context/resolve-context.js → runtime/execution-context.js} +23 -26
- package/dist/runtime/incidents/advice-strategy.d.ts +15 -0
- package/dist/runtime/incidents/advice-strategy.d.ts.map +1 -0
- package/dist/runtime/incidents/advice-strategy.js +54 -0
- package/dist/runtime/incidents/plan-strategy.d.ts +9 -0
- package/dist/runtime/incidents/plan-strategy.d.ts.map +1 -0
- package/dist/runtime/incidents/plan-strategy.js +205 -0
- package/dist/runtime/incidents/registry-strategy.d.ts +6 -0
- package/dist/runtime/incidents/registry-strategy.d.ts.map +1 -0
- package/dist/runtime/incidents/registry-strategy.js +280 -0
- package/dist/runtime/incidents/resolve.d.ts +3 -25
- package/dist/runtime/incidents/resolve.d.ts.map +1 -1
- package/dist/runtime/incidents/resolve.js +3 -683
- package/dist/runtime/incidents/shared.d.ts +34 -0
- package/dist/runtime/incidents/shared.d.ts.map +1 -0
- package/dist/runtime/incidents/shared.js +171 -0
- package/dist/shared/errors.d.ts +1 -1
- package/dist/shared/errors.d.ts.map +1 -1
- package/dist/shared/runtime-source.d.ts.map +1 -1
- package/dist/shared/runtime-source.js +8 -3
- package/dist/testing/cli-harness/recipe-archives.d.ts +28 -0
- package/dist/testing/cli-harness/recipe-archives.d.ts.map +1 -0
- package/dist/testing/cli-harness/recipe-archives.js +374 -0
- package/dist/testing/cli-harness/stdio.d.ts +26 -0
- package/dist/testing/cli-harness/stdio.d.ts.map +1 -0
- package/dist/testing/cli-harness/stdio.js +84 -0
- package/dist/testing/cli-harness.d.ts +25 -0
- package/dist/testing/cli-harness.d.ts.map +1 -0
- package/dist/testing/cli-harness.js +313 -0
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +1 -0
- package/package.json +7 -3
- package/dist/cli/recipes-bundled.d.ts +0 -10
- package/dist/cli/recipes-bundled.d.ts.map +0 -1
- package/dist/cli/recipes-bundled.js +0 -36
- package/dist/commands/recipes/impl/manifest.d.ts +0 -4
- package/dist/commands/recipes/impl/manifest.d.ts.map +0 -1
- package/dist/commands/recipes/impl/manifest.js +0 -229
- package/dist/commands/recipes/impl/normalize.d.ts +0 -8
- package/dist/commands/recipes/impl/normalize.d.ts.map +0 -1
- package/dist/commands/recipes/impl/normalize.js +0 -54
- package/dist/commands/recipes/impl/scenario.d.ts +0 -16
- package/dist/commands/recipes/impl/scenario.d.ts.map +0 -1
- package/dist/commands/recipes/impl/scenario.js +0 -262
- package/dist/recipes/bundled-recipes.d.ts +0 -17
- package/dist/recipes/bundled-recipes.d.ts.map +0 -1
- package/dist/recipes/bundled-recipes.js +0 -15
- package/dist/usecases/context/resolve-context.d.ts +0 -68
- package/dist/usecases/context/resolve-context.d.ts.map +0 -1
- package/dist/usecases/task/task-list-usecase.d.ts +0 -9
- package/dist/usecases/task/task-list-usecase.d.ts.map +0 -1
- package/dist/usecases/task/task-list-usecase.js +0 -17
- package/dist/usecases/task/task-new-usecase.d.ts +0 -9
- package/dist/usecases/task/task-new-usecase.d.ts.map +0 -1
- package/dist/usecases/task/task-new-usecase.js +0 -17
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { IncidentAdviceMatch, IncidentRegistry, IncidentRegistryEntry, IncidentRegistryEntryState } from "./types.js";
|
|
2
|
+
export declare const STRUCTURED_INCIDENTS_HEADER: string;
|
|
3
|
+
export declare const COMPACT_INCIDENTS_HEADER: string;
|
|
4
|
+
export declare function normalizeLines(text: string): string[];
|
|
5
|
+
export declare function normalizeKey(key: string): string;
|
|
6
|
+
export declare function normalizeSearchText(text: string): string;
|
|
7
|
+
export declare function tokenize(text: string): string[];
|
|
8
|
+
export declare function dedupeCaseInsensitive(values: readonly string[]): string[];
|
|
9
|
+
export declare function parseCsvList(value: string | null | undefined): string[];
|
|
10
|
+
export declare function incidentField(key: string, value: string): [string, string];
|
|
11
|
+
export declare function parseBoolean(value: string | null | undefined): boolean;
|
|
12
|
+
export declare function parseFixability(value: string | null | undefined): "external" | "repo-fixable" | null;
|
|
13
|
+
export declare function parseEntryState(value: string | null | undefined): IncidentRegistryEntryState;
|
|
14
|
+
export declare function appendFieldValue(record: Record<string, string>, key: string, value: string, joiner?: string): void;
|
|
15
|
+
export declare function deriveSourceTask(explicitSourceTask: string | null | undefined, evidence: string | null | undefined): string | null;
|
|
16
|
+
export declare function buildIncidentSignature(entry: Pick<IncidentRegistryEntry, "scope" | "failure" | "rule">): string;
|
|
17
|
+
export declare function buildIncidentFingerprint(entry: Pick<IncidentRegistryEntry, "sourceTask" | "scope" | "failure" | "rule">): string;
|
|
18
|
+
export declare function buildMatchTerms(opts: {
|
|
19
|
+
scope: string;
|
|
20
|
+
tags: readonly string[];
|
|
21
|
+
explicitMatch: readonly string[];
|
|
22
|
+
extraText?: readonly string[];
|
|
23
|
+
}): string[];
|
|
24
|
+
export declare function occursWithinDays(date: string, now: Date, days: number): boolean;
|
|
25
|
+
export declare function entryStateRank(state: IncidentRegistryEntryState): number;
|
|
26
|
+
export declare function compareIncidentAdviceMatch(left: IncidentAdviceMatch, right: IncidentAdviceMatch): number;
|
|
27
|
+
export declare function summarizeTaskScope(scope: string | null | undefined, title: string): string;
|
|
28
|
+
export declare function buildDerivedIncidentRule(scope: string): string;
|
|
29
|
+
export declare function resolveIncidentState(opts: {
|
|
30
|
+
registry: IncidentRegistry;
|
|
31
|
+
entry: Pick<IncidentRegistryEntry, "scope" | "failure" | "rule">;
|
|
32
|
+
now: Date;
|
|
33
|
+
}): IncidentRegistryEntryState;
|
|
34
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/runtime/incidents/shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,0BAA0B,EAC3B,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,2BAA2B,QAI5B,CAAC;AAEb,eAAO,MAAM,wBAAwB,QAGzB,CAAC;AAEb,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE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wB,CACtC,KAAK,EAAE,IAAI,CAAC,qBAAqB,EAAE,YAAY,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC,GAC9E,MAAM,CAER;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/B,GAAG,MAAM,EAAE,CASX;AAQD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAM/E;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,0BAA0B,GAAG,MAAM,CAIxE;AAED,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,mBAAmB,EACzB,KAAK,EAAE,mBAAmB,GACzB,MAAM,CAMR;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAW1F;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IACzC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,KAAK,EAAE,IAAI,CAAC,qBAAqB,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC,CAAC;IACjE,GAAG,EAAE,IAAI,CAAC;CACX,GAAG,0BAA0B,CAgB7B"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
export const STRUCTURED_INCIDENTS_HEADER = [
|
|
2
|
+
"# Policy Incidents Log",
|
|
3
|
+
"",
|
|
4
|
+
"This is the single file for incident-derived and situational policy rules.",
|
|
5
|
+
].join("\n");
|
|
6
|
+
export const COMPACT_INCIDENTS_HEADER = [
|
|
7
|
+
"# Policy Incidents Log",
|
|
8
|
+
"- Append-only. Required fields: `id`, `date`, `scope`, `failure`, `rule`, `evidence`, `enforcement`, `state`; optional: `tags`, `match`, `advice`, `source_task`, `fixability`.",
|
|
9
|
+
].join("\n");
|
|
10
|
+
export function normalizeLines(text) {
|
|
11
|
+
return text.replaceAll("\r\n", "\n").split("\n");
|
|
12
|
+
}
|
|
13
|
+
export function normalizeKey(key) {
|
|
14
|
+
return key
|
|
15
|
+
.trim()
|
|
16
|
+
.toLowerCase()
|
|
17
|
+
.replaceAll(/[\s_-]+/g, "");
|
|
18
|
+
}
|
|
19
|
+
export function normalizeSearchText(text) {
|
|
20
|
+
return text
|
|
21
|
+
.toLowerCase()
|
|
22
|
+
.replaceAll(/[^a-z0-9]+/gi, " ")
|
|
23
|
+
.trim();
|
|
24
|
+
}
|
|
25
|
+
export function tokenize(text) {
|
|
26
|
+
const normalized = normalizeSearchText(text);
|
|
27
|
+
if (!normalized)
|
|
28
|
+
return [];
|
|
29
|
+
return normalized
|
|
30
|
+
.split(/\s+/)
|
|
31
|
+
.map((token) => token.trim())
|
|
32
|
+
.filter((token) => token.length >= 3);
|
|
33
|
+
}
|
|
34
|
+
export function dedupeCaseInsensitive(values) {
|
|
35
|
+
const seen = new Set();
|
|
36
|
+
const out = [];
|
|
37
|
+
for (const value of values) {
|
|
38
|
+
const trimmed = String(value ?? "").trim();
|
|
39
|
+
if (!trimmed)
|
|
40
|
+
continue;
|
|
41
|
+
const key = trimmed.toLowerCase();
|
|
42
|
+
if (seen.has(key))
|
|
43
|
+
continue;
|
|
44
|
+
seen.add(key);
|
|
45
|
+
out.push(trimmed);
|
|
46
|
+
}
|
|
47
|
+
return out;
|
|
48
|
+
}
|
|
49
|
+
export function parseCsvList(value) {
|
|
50
|
+
if (!value)
|
|
51
|
+
return [];
|
|
52
|
+
return dedupeCaseInsensitive(value
|
|
53
|
+
.split(",")
|
|
54
|
+
.map((item) => item.trim())
|
|
55
|
+
.filter(Boolean));
|
|
56
|
+
}
|
|
57
|
+
export function incidentField(key, value) {
|
|
58
|
+
return [key, value];
|
|
59
|
+
}
|
|
60
|
+
export function parseBoolean(value) {
|
|
61
|
+
const normalized = String(value ?? "")
|
|
62
|
+
.trim()
|
|
63
|
+
.toLowerCase();
|
|
64
|
+
return normalized === "true" || normalized === "yes" || normalized === "y" || normalized === "1";
|
|
65
|
+
}
|
|
66
|
+
export function parseFixability(value) {
|
|
67
|
+
const normalized = String(value ?? "")
|
|
68
|
+
.trim()
|
|
69
|
+
.toLowerCase()
|
|
70
|
+
.replaceAll(/[\s_-]+/g, "");
|
|
71
|
+
if (normalized === "external")
|
|
72
|
+
return "external";
|
|
73
|
+
if (normalized === "repofixable" || normalized === "internal")
|
|
74
|
+
return "repo-fixable";
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
export function parseEntryState(value) {
|
|
78
|
+
return value === "open" || value === "promoted" ? value : "stabilized";
|
|
79
|
+
}
|
|
80
|
+
export function appendFieldValue(record, key, value, joiner = " ") {
|
|
81
|
+
if (!record[key]) {
|
|
82
|
+
record[key] = value.trim();
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
record[key] = `${record[key]}${joiner}${value.trim()}`.trim();
|
|
86
|
+
}
|
|
87
|
+
export function deriveSourceTask(explicitSourceTask, evidence) {
|
|
88
|
+
const direct = String(explicitSourceTask ?? "").trim();
|
|
89
|
+
if (direct)
|
|
90
|
+
return direct;
|
|
91
|
+
const match = /\btasks?\s+([A-Za-z0-9-]+)/iu.exec(String(evidence ?? ""));
|
|
92
|
+
return match?.[1]?.trim() ?? null;
|
|
93
|
+
}
|
|
94
|
+
export function buildIncidentSignature(entry) {
|
|
95
|
+
return [
|
|
96
|
+
normalizeSearchText(entry.scope),
|
|
97
|
+
normalizeSearchText(entry.failure),
|
|
98
|
+
normalizeSearchText(entry.rule),
|
|
99
|
+
].join("|");
|
|
100
|
+
}
|
|
101
|
+
export function buildIncidentFingerprint(entry) {
|
|
102
|
+
return [entry.sourceTask ?? "", buildIncidentSignature(entry)].join("|");
|
|
103
|
+
}
|
|
104
|
+
export function buildMatchTerms(opts) {
|
|
105
|
+
const scopeTokens = tokenize(opts.scope);
|
|
106
|
+
const extraTokens = (opts.extraText ?? []).flatMap((value) => tokenize(value));
|
|
107
|
+
return dedupeCaseInsensitive([
|
|
108
|
+
...opts.explicitMatch,
|
|
109
|
+
...opts.tags,
|
|
110
|
+
...scopeTokens,
|
|
111
|
+
...extraTokens,
|
|
112
|
+
]).slice(0, 16);
|
|
113
|
+
}
|
|
114
|
+
function parseDateOnly(value) {
|
|
115
|
+
if (!/^\d{4}-\d{2}-\d{2}$/.test(value))
|
|
116
|
+
return null;
|
|
117
|
+
const parsed = Date.parse(`${value}T00:00:00.000Z`);
|
|
118
|
+
return Number.isFinite(parsed) ? parsed : null;
|
|
119
|
+
}
|
|
120
|
+
export function occursWithinDays(date, now, days) {
|
|
121
|
+
const timestamp = parseDateOnly(date);
|
|
122
|
+
if (timestamp === null)
|
|
123
|
+
return false;
|
|
124
|
+
const delta = now.getTime() - timestamp;
|
|
125
|
+
if (delta < 0)
|
|
126
|
+
return false;
|
|
127
|
+
return delta <= days * 24 * 60 * 60 * 1000;
|
|
128
|
+
}
|
|
129
|
+
export function entryStateRank(state) {
|
|
130
|
+
if (state === "promoted")
|
|
131
|
+
return 2;
|
|
132
|
+
if (state === "stabilized")
|
|
133
|
+
return 1;
|
|
134
|
+
return 0;
|
|
135
|
+
}
|
|
136
|
+
export function compareIncidentAdviceMatch(left, right) {
|
|
137
|
+
if (right.score !== left.score)
|
|
138
|
+
return right.score - left.score;
|
|
139
|
+
const rightState = entryStateRank(right.entry.state);
|
|
140
|
+
const leftState = entryStateRank(left.entry.state);
|
|
141
|
+
if (rightState !== leftState)
|
|
142
|
+
return rightState - leftState;
|
|
143
|
+
return right.entry.date.localeCompare(left.entry.date);
|
|
144
|
+
}
|
|
145
|
+
export function summarizeTaskScope(scope, title) {
|
|
146
|
+
const lines = normalizeLines(scope ?? "");
|
|
147
|
+
for (const line of lines) {
|
|
148
|
+
const trimmed = line.trim();
|
|
149
|
+
if (!trimmed)
|
|
150
|
+
continue;
|
|
151
|
+
let candidate = trimmed.replace(/^-+\s*/, "");
|
|
152
|
+
candidate = candidate.replace(/^in scope:\s*/i, "").trim();
|
|
153
|
+
if (!candidate || /^out of scope:/i.test(candidate))
|
|
154
|
+
continue;
|
|
155
|
+
return candidate;
|
|
156
|
+
}
|
|
157
|
+
return title.trim();
|
|
158
|
+
}
|
|
159
|
+
export function buildDerivedIncidentRule(scope) {
|
|
160
|
+
return `Analogous ${scope} work MUST review and apply the recorded external incident advice before retrying.`;
|
|
161
|
+
}
|
|
162
|
+
export function resolveIncidentState(opts) {
|
|
163
|
+
const signature = buildIncidentSignature(opts.entry);
|
|
164
|
+
const similarEntries = opts.registry.entries.filter((candidate) => buildIncidentSignature(candidate) === signature);
|
|
165
|
+
if (similarEntries.some((candidate) => candidate.state === "promoted" ||
|
|
166
|
+
candidate.state === "stabilized" ||
|
|
167
|
+
occursWithinDays(candidate.date, opts.now, 30))) {
|
|
168
|
+
return "stabilized";
|
|
169
|
+
}
|
|
170
|
+
return "open";
|
|
171
|
+
}
|
package/dist/shared/errors.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ErrorCode = "E_USAGE" | "E_VALIDATION" | "E_IO" | "E_GIT" | "E_BACKEND" | "E_NETWORK" | "E_RUNTIME" | "E_INTERNAL";
|
|
1
|
+
export type ErrorCode = "E_USAGE" | "E_VALIDATION" | "E_IO" | "E_GIT" | "E_HANDOFF" | "E_BACKEND" | "E_NETWORK" | "E_RUNTIME" | "E_INTERNAL";
|
|
2
2
|
export declare class CliError extends Error {
|
|
3
3
|
readonly exitCode: number;
|
|
4
4
|
readonly code: ErrorCode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/shared/errors.ts"],"names":[],"mappings":"AAAA,M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b,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,sBAAsB,CAAC;IAClC,gBAAgB,EAAE;QAChB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;QACxB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;QAC9B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;KACzB,CAAC;IACF,UAAU,EAAE,mBAAmB,CAAC;IAChC,IAAI,EAAE,mBAAmB,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC,CAAC;AA6HF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAQ7D;AAED,wBAAgB,wBAAwB,CACtC,OAAO,GAAE,+BAAoC,GAC5C,iBAAiB,CAoCnB"}
|
|
@@ -73,10 +73,13 @@ function resolveAgentplanePackageInfo(options) {
|
|
|
73
73
|
}
|
|
74
74
|
return resolvePackageInfo(path.join(inferredRoot, "package.json"));
|
|
75
75
|
}
|
|
76
|
-
function resolveCorePackageInfo(options) {
|
|
76
|
+
function resolveCorePackageInfo(options, frameworkCoreRoot) {
|
|
77
77
|
if (options.corePackageJsonPath) {
|
|
78
78
|
return resolvePackageInfo(path.resolve(options.corePackageJsonPath));
|
|
79
79
|
}
|
|
80
|
+
if (frameworkCoreRoot) {
|
|
81
|
+
return resolvePackageInfo(path.join(frameworkCoreRoot, "package.json"));
|
|
82
|
+
}
|
|
80
83
|
try {
|
|
81
84
|
const req = createRequire(options.entryModuleUrl ?? import.meta.url);
|
|
82
85
|
const entryPath = req.resolve("@agentplaneorg/core");
|
|
@@ -127,7 +130,6 @@ export function resolveRuntimeSourceInfo(options = {}) {
|
|
|
127
130
|
const cwd = path.resolve(options.cwd ?? process.cwd());
|
|
128
131
|
const env = options.env ?? process.env;
|
|
129
132
|
const agentplane = resolveAgentplanePackageInfo(options);
|
|
130
|
-
const core = resolveCorePackageInfo(options);
|
|
131
133
|
const fallbackBin = agentplane.packageRoot === null
|
|
132
134
|
? null
|
|
133
135
|
: path.join(agentplane.packageRoot, "bin", "agentplane.js");
|
|
@@ -139,6 +141,9 @@ export function resolveRuntimeSourceInfo(options = {}) {
|
|
|
139
141
|
cwd,
|
|
140
142
|
thisBin: activeBinaryPath ?? fallbackBin ?? cwd,
|
|
141
143
|
});
|
|
144
|
+
const frameworkCoreRoot = resolveFrameworkCoreRoot(framework.checkout?.repoRoot ?? null);
|
|
145
|
+
const preferredFrameworkCoreRoot = framework.inFrameworkCheckout && framework.isRepoLocalRuntime ? frameworkCoreRoot : null;
|
|
146
|
+
const core = resolveCorePackageInfo(options, preferredFrameworkCoreRoot);
|
|
142
147
|
return {
|
|
143
148
|
cwd,
|
|
144
149
|
activeBinaryPath,
|
|
@@ -148,7 +153,7 @@ export function resolveRuntimeSourceInfo(options = {}) {
|
|
|
148
153
|
frameworkSources: {
|
|
149
154
|
repoRoot: framework.checkout?.repoRoot ?? null,
|
|
150
155
|
agentplaneRoot: framework.checkout?.packageRoot ?? agentplane.packageRoot,
|
|
151
|
-
coreRoot:
|
|
156
|
+
coreRoot: frameworkCoreRoot,
|
|
152
157
|
},
|
|
153
158
|
agentplane,
|
|
154
159
|
core,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare function createRecipeArchive(opts?: {
|
|
2
|
+
id?: string;
|
|
3
|
+
version?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
summary?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
tags?: string[];
|
|
8
|
+
format?: "tar" | "zip";
|
|
9
|
+
wrapDir?: boolean;
|
|
10
|
+
}): Promise<{
|
|
11
|
+
archivePath: string;
|
|
12
|
+
manifest: Record<string, unknown>;
|
|
13
|
+
}>;
|
|
14
|
+
export declare function createRecipeArchiveWithManifest(opts: {
|
|
15
|
+
manifest: Record<string, unknown>;
|
|
16
|
+
files?: Record<string, string>;
|
|
17
|
+
format?: "tar" | "zip";
|
|
18
|
+
wrapDir?: boolean;
|
|
19
|
+
}): Promise<string>;
|
|
20
|
+
export declare function createUnsafeRecipeArchive(opts: {
|
|
21
|
+
format: "tar" | "zip";
|
|
22
|
+
entryPath?: string;
|
|
23
|
+
}): Promise<string>;
|
|
24
|
+
export declare function createUpgradeBundle(files: Record<string, string>): Promise<{
|
|
25
|
+
bundlePath: string;
|
|
26
|
+
checksumPath: string;
|
|
27
|
+
}>;
|
|
28
|
+
//# sourceMappingURL=recipe-archives.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recipe-archives.d.ts","sourceRoot":"","sources":["../../../src/testing/cli-harness/recipe-archives.ts"],"names":[],"mappings":"AAgBA,wBAAsB,mBAAmB,CAAC,IAAI,CAAC,EAAE;IAC/C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,MAA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