@azure-id/orc 0.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2017 -0
- package/README-id.md +521 -0
- package/README.md +485 -0
- package/bin/build-agents.js +86 -0
- package/bin/cli.js +29050 -0
- package/bin/mockrun-catalog.js +267 -0
- package/bin/onboarding-content.js +172 -0
- package/bin/pricing.json +200 -0
- package/bin/providers.json +437 -0
- package/bin/ui.js +95 -0
- package/bin/verify-contracts.js +3277 -0
- package/bin/verify-package.js +498 -0
- package/bin/webui/api.js +1163 -0
- package/bin/webui/app.html +198 -0
- package/bin/webui/css/00-tokens.css +92 -0
- package/bin/webui/css/01-base.css +42 -0
- package/bin/webui/css/02-shell.css +103 -0
- package/bin/webui/css/03-components.css +462 -0
- package/bin/webui/css/04-motion.css +91 -0
- package/bin/webui/css/05-tour.css +100 -0
- package/bin/webui/css/06-responsive.css +108 -0
- package/bin/webui/css/panels/boundary.css +26 -0
- package/bin/webui/css/panels/challenge.css +151 -0
- package/bin/webui/css/panels/crosslink.css +194 -0
- package/bin/webui/css/panels/docs.css +254 -0
- package/bin/webui/css/panels/experiment.css +23 -0
- package/bin/webui/css/panels/extra.css +536 -0
- package/bin/webui/css/panels/flow.css +177 -0
- package/bin/webui/css/panels/handoff.css +67 -0
- package/bin/webui/css/panels/knowledge.css +86 -0
- package/bin/webui/css/panels/learn.css +154 -0
- package/bin/webui/css/panels/maintenance.css +55 -0
- package/bin/webui/css/panels/mockrun.css +268 -0
- package/bin/webui/css/panels/overview.css +100 -0
- package/bin/webui/css/panels/pact.css +43 -0
- package/bin/webui/css/panels/runs.css +105 -0
- package/bin/webui/css/panels/settings.css +227 -0
- package/bin/webui/css/panels/stats.css +87 -0
- package/bin/webui/fixtures/boundary.js +92 -0
- package/bin/webui/fixtures/challenge.js +825 -0
- package/bin/webui/fixtures/crosslink.js +31 -0
- package/bin/webui/fixtures/docs.js +982 -0
- package/bin/webui/fixtures/extra.js +1934 -0
- package/bin/webui/fixtures/flow.js +81 -0
- package/bin/webui/fixtures/handoff.js +35 -0
- package/bin/webui/fixtures/index.js +486 -0
- package/bin/webui/fixtures/knowledge.js +291 -0
- package/bin/webui/fixtures/maintenance.js +42 -0
- package/bin/webui/fixtures/mockrun.js +36 -0
- package/bin/webui/fixtures/pact.js +111 -0
- package/bin/webui/fixtures/runs.js +109 -0
- package/bin/webui/fixtures/settings.js +78 -0
- package/bin/webui/fixtures/shell.js +48 -0
- package/bin/webui/fixtures/stats.js +104 -0
- package/bin/webui/i18n/TERMS.md +134 -0
- package/bin/webui/i18n/en/banner.json +29 -0
- package/bin/webui/i18n/en/boundary.json +20 -0
- package/bin/webui/i18n/en/challenge.json +106 -0
- package/bin/webui/i18n/en/common.json +69 -0
- package/bin/webui/i18n/en/crosslink.json +69 -0
- package/bin/webui/i18n/en/docs.json +175 -0
- package/bin/webui/i18n/en/experiment.json +17 -0
- package/bin/webui/i18n/en/extra.json +313 -0
- package/bin/webui/i18n/en/flow.json +30 -0
- package/bin/webui/i18n/en/handoff.json +37 -0
- package/bin/webui/i18n/en/knowledge.json +141 -0
- package/bin/webui/i18n/en/learn.json +16 -0
- package/bin/webui/i18n/en/maintenance.json +52 -0
- package/bin/webui/i18n/en/mockrun.json +19 -0
- package/bin/webui/i18n/en/nav.json +19 -0
- package/bin/webui/i18n/en/overview.json +89 -0
- package/bin/webui/i18n/en/pact.json +36 -0
- package/bin/webui/i18n/en/runs.json +51 -0
- package/bin/webui/i18n/en/settings.json +49 -0
- package/bin/webui/i18n/en/stats.json +69 -0
- package/bin/webui/i18n/en/tour.json +33 -0
- package/bin/webui/i18n/id/banner.json +29 -0
- package/bin/webui/i18n/id/boundary.json +20 -0
- package/bin/webui/i18n/id/challenge.json +106 -0
- package/bin/webui/i18n/id/common.json +70 -0
- package/bin/webui/i18n/id/crosslink.json +69 -0
- package/bin/webui/i18n/id/docs.json +175 -0
- package/bin/webui/i18n/id/experiment.json +17 -0
- package/bin/webui/i18n/id/extra.json +313 -0
- package/bin/webui/i18n/id/flow.json +30 -0
- package/bin/webui/i18n/id/handoff.json +37 -0
- package/bin/webui/i18n/id/knowledge.json +141 -0
- package/bin/webui/i18n/id/learn.json +16 -0
- package/bin/webui/i18n/id/maintenance.json +52 -0
- package/bin/webui/i18n/id/mockrun.json +19 -0
- package/bin/webui/i18n/id/nav.json +19 -0
- package/bin/webui/i18n/id/overview.json +89 -0
- package/bin/webui/i18n/id/pact.json +36 -0
- package/bin/webui/i18n/id/runs.json +51 -0
- package/bin/webui/i18n/id/settings.json +49 -0
- package/bin/webui/i18n/id/stats.json +69 -0
- package/bin/webui/i18n/id/tour.json +33 -0
- package/bin/webui/js/00-core.js +115 -0
- package/bin/webui/js/01-i18n.js +149 -0
- package/bin/webui/js/02-ui.js +211 -0
- package/bin/webui/js/03-md.js +286 -0
- package/bin/webui/js/04-router.js +51 -0
- package/bin/webui/js/05-banners.js +172 -0
- package/bin/webui/js/06-edit.js +183 -0
- package/bin/webui/js/90-tour.js +488 -0
- package/bin/webui/js/91-shortcuts.js +126 -0
- package/bin/webui/js/99-boot.js +118 -0
- package/bin/webui/js/panels/boundary.js +104 -0
- package/bin/webui/js/panels/challenge.js +781 -0
- package/bin/webui/js/panels/crosslink.js +654 -0
- package/bin/webui/js/panels/docs.js +1338 -0
- package/bin/webui/js/panels/experiment.js +98 -0
- package/bin/webui/js/panels/extra.js +3011 -0
- package/bin/webui/js/panels/flow.js +297 -0
- package/bin/webui/js/panels/handoff.js +169 -0
- package/bin/webui/js/panels/knowledge.js +890 -0
- package/bin/webui/js/panels/learn.js +220 -0
- package/bin/webui/js/panels/maintenance.js +235 -0
- package/bin/webui/js/panels/mockrun.js +227 -0
- package/bin/webui/js/panels/overview.js +447 -0
- package/bin/webui/js/panels/pact.js +189 -0
- package/bin/webui/js/panels/runs.js +416 -0
- package/bin/webui/js/panels/settings.js +573 -0
- package/bin/webui/js/panels/stats.js +378 -0
- package/bin/webui/serve.js +557 -0
- package/mock-run/INDEX.md +106 -0
- package/mock-run/a-normal-day.md +587 -0
- package/mock-run/context-combiner.md +100 -0
- package/mock-run/extra-recovery.md +330 -0
- package/mock-run/extra-slots.md +177 -0
- package/mock-run/media/README.md +43 -0
- package/mock-run/orc-aftermath.md +392 -0
- package/mock-run/orc-boundary.md +356 -0
- package/mock-run/orc-brainstorm.md +177 -0
- package/mock-run/orc-budget.md +534 -0
- package/mock-run/orc-challenge-council.md +262 -0
- package/mock-run/orc-challenge.md +416 -0
- package/mock-run/orc-cli.md +200 -0
- package/mock-run/orc-diy.md +129 -0
- package/mock-run/orc-doc.md +448 -0
- package/mock-run/orc-explain.md +86 -0
- package/mock-run/orc-export.md +423 -0
- package/mock-run/orc-extra.md +392 -0
- package/mock-run/orc-fast.md +106 -0
- package/mock-run/orc-grill.md +151 -0
- package/mock-run/orc-handoff.md +480 -0
- package/mock-run/orc-pact.md +421 -0
- package/mock-run/orc-pattern.md +112 -0
- package/mock-run/orc-plan.md +108 -0
- package/mock-run/orc-pr-setup.md +126 -0
- package/mock-run/orc-quick.md +113 -0
- package/mock-run/orc-route.md +93 -0
- package/mock-run/orc-ui.md +125 -0
- package/mock-run/orc-ultra.md +103 -0
- package/mock-run/orc.md +157 -0
- package/mock-run/the-example-project.md +55 -0
- package/package.json +39 -0
- package/templates/agents/MODEL-MAPPING.md +168 -0
- package/templates/agents/orc-advisor-fable-5.md +50 -0
- package/templates/agents/orc-advisor-opus-5-xhigh.md +56 -0
- package/templates/agents/orc-analyst-fable-5.md +115 -0
- package/templates/agents/orc-analyze-mini-opus-5-med.md +60 -0
- package/templates/agents/orc-analyze-mini-sonnet-5-high.md +58 -0
- package/templates/agents/orc-challenge-advisor-opus-5-med.md +75 -0
- package/templates/agents/orc-challenge-contrarian-opus-5-high.md +110 -0
- package/templates/agents/orc-challenge-executor-opus-5-med.md +114 -0
- package/templates/agents/orc-challenge-expansionist-opus-5-med.md +112 -0
- package/templates/agents/orc-challenge-judge-opus-5-high.md +132 -0
- package/templates/agents/orc-challenge-outsider-opus-5-low.md +109 -0
- package/templates/agents/orc-challenge-principles-opus-5-high.md +109 -0
- package/templates/agents/orc-challenge-reader-opus-5-low.md +90 -0
- package/templates/agents/orc-claude-writer-opus-4-8-high.md +53 -0
- package/templates/agents/orc-claude-writer-opus-5-med.md +55 -0
- package/templates/agents/orc-context-combiner-opus-5-high.md +88 -0
- package/templates/agents/orc-doc-checker-opus-5-low.md +108 -0
- package/templates/agents/orc-doc-writer-opus-5-med.md +134 -0
- package/templates/agents/orc-executor-haiku-4-5.md +113 -0
- package/templates/agents/orc-executor-opus-4-7-high.md +114 -0
- package/templates/agents/orc-executor-opus-4-7-med.md +114 -0
- package/templates/agents/orc-executor-opus-4-8-high.md +114 -0
- package/templates/agents/orc-executor-opus-5-high.md +114 -0
- package/templates/agents/orc-executor-opus-5-low.md +114 -0
- package/templates/agents/orc-executor-opus-5-med.md +114 -0
- package/templates/agents/orc-executor-sonnet-4-6-high.md +114 -0
- package/templates/agents/orc-executor-sonnet-4-6-med.md +114 -0
- package/templates/agents/orc-executor-sonnet-5-high.md +114 -0
- package/templates/agents/orc-judge-fable-5.md +79 -0
- package/templates/agents/orc-judge-opus-5-xhigh.md +85 -0
- package/templates/agents/orc-learn-writer-opus-5-low.md +73 -0
- package/templates/agents/orc-pattern-codifier-opus-5-med.md +65 -0
- package/templates/agents/orc-pattern-codifier-sonnet-5-high.md +63 -0
- package/templates/agents/orc-planner-fable-5.md +152 -0
- package/templates/agents/orc-planner-mini-opus-5-med.md +69 -0
- package/templates/agents/orc-planner-mini-sonnet-5-high.md +67 -0
- package/templates/agents/orc-planner-opus-5-med.md +160 -0
- package/templates/agents/orc-retro-opus-5-med.md +73 -0
- package/templates/agents/orc-retro-sonnet-5-high.md +72 -0
- package/templates/agents/orc-reviewer-fable-5.md +57 -0
- package/templates/agents/orc-reviewer-opus-5-med.md +60 -0
- package/templates/agents/orc-scout-opus-5-low.md +40 -0
- package/templates/agents/orc-scout-sonnet-4-6-high.md +39 -0
- package/templates/agents/orc-system-analyst-opus-5-high.md +120 -0
- package/templates/agents/orc-test-author-opus-5-med.md +71 -0
- package/templates/agents/orc-trace-writer-haiku-4-5.md +107 -0
- package/templates/agents/orc-verifier-opus-5-med.md +69 -0
- package/templates/agents/orc-wiki-scanner-opus-4-8-high.md +79 -0
- package/templates/agents/orc-wiki-scanner-opus-5-med.md +81 -0
- package/templates/agents/orc-wiki-scanner-sonnet-5-high.md +106 -0
- package/templates/commands/orc-aftermath.md +49 -0
- package/templates/commands/orc-analyze.md +21 -0
- package/templates/commands/orc-boundary.md +46 -0
- package/templates/commands/orc-brainstorm.md +51 -0
- package/templates/commands/orc-budget.md +54 -0
- package/templates/commands/orc-challenge.md +58 -0
- package/templates/commands/orc-claude.md +14 -0
- package/templates/commands/orc-diy.md +13 -0
- package/templates/commands/orc-doc.md +128 -0
- package/templates/commands/orc-explain.md +20 -0
- package/templates/commands/orc-export.md +46 -0
- package/templates/commands/orc-fast.md +15 -0
- package/templates/commands/orc-grill.md +40 -0
- package/templates/commands/orc-handoff.md +52 -0
- package/templates/commands/orc-learn.md +17 -0
- package/templates/commands/orc-mini.md +12 -0
- package/templates/commands/orc-pact.md +44 -0
- package/templates/commands/orc-pattern.md +15 -0
- package/templates/commands/orc-plan.md +22 -0
- package/templates/commands/orc-poly.md +21 -0
- package/templates/commands/orc-pr-driver.md +30 -0
- package/templates/commands/orc-pr-setup.md +31 -0
- package/templates/commands/orc-quick.md +33 -0
- package/templates/commands/orc-retro.md +17 -0
- package/templates/commands/orc-route.md +41 -0
- package/templates/commands/orc-ultra.md +17 -0
- package/templates/commands/orc-verify.md +11 -0
- package/templates/commands/orc-wiki.md +42 -0
- package/templates/commands/orc.md +16 -0
- package/templates/hooks/orc-effort-guard.js +178 -0
- package/templates/hooks/orc-statusline.js +305 -0
- package/templates/hooks/orc-trace.js +471 -0
- package/templates/hooks/orc-update-lib.js +125 -0
- package/templates/skills/_shared/README.md +50 -0
- package/templates/skills/_shared/detecting-artifacts.md +90 -0
- package/templates/skills/_shared/drift-recovery.md +98 -0
- package/templates/skills/_shared/extra-dispatch.md +1051 -0
- package/templates/skills/_shared/fable5-override.md +56 -0
- package/templates/skills/_shared/fallback-handoff.md +42 -0
- package/templates/skills/_shared/gh-stack-commands.md +65 -0
- package/templates/skills/_shared/gotchas.md +177 -0
- package/templates/skills/_shared/interview.md +144 -0
- package/templates/skills/_shared/lane-suspend.md +82 -0
- package/templates/skills/_shared/opus5-only.md +131 -0
- package/templates/skills/_shared/pr-templates.md +106 -0
- package/templates/skills/_shared/read-ladder.md +54 -0
- package/templates/skills/_shared/return-validation.md +145 -0
- package/templates/skills/_shared/smoke-gate.md +28 -0
- package/templates/skills/_shared/stack-plan.md +135 -0
- package/templates/skills/_shared/untrusted-input.md +63 -0
- package/templates/skills/context-combiner/SKILL.md +187 -0
- package/templates/skills/context-combiner/schemas/combined-report.md +78 -0
- package/templates/skills/context-combiner/schemas/combined-requirement-spec.md +87 -0
- package/templates/skills/orc/README.md +150 -0
- package/templates/skills/orc/SKILL.md +526 -0
- package/templates/skills/orc/config.md +389 -0
- package/templates/skills/orc/examples/full-run-mock.md +73 -0
- package/templates/skills/orc/references/analyst-gates.md +124 -0
- package/templates/skills/orc/references/effort-and-mode.md +224 -0
- package/templates/skills/orc/references/house-rules.md +20 -0
- package/templates/skills/orc/references/intake.md +120 -0
- package/templates/skills/orc/references/log-protocol.md +39 -0
- package/templates/skills/orc/references/pattern-gate.md +89 -0
- package/templates/skills/orc/references/plan-handoff.md +84 -0
- package/templates/skills/orc/references/preflight-report.md +220 -0
- package/templates/skills/orc/references/security-checklist.md +39 -0
- package/templates/skills/orc/references/stop-and-resume.md +160 -0
- package/templates/skills/orc/references/trace-protocol.md +314 -0
- package/templates/skills/orc/references/ultra-mode.md +123 -0
- package/templates/skills/orc/references/wave-grouping.md +121 -0
- package/templates/skills/orc/references/wiki-consult.md +177 -0
- package/templates/skills/orc/schemas/checkpoint.md +122 -0
- package/templates/skills/orc/schemas/intent-spec.md +42 -0
- package/templates/skills/orc/schemas/planning-output.md +279 -0
- package/templates/skills/orc/subskills/orc-checkpoint/SKILL.md +55 -0
- package/templates/skills/orc/subskills/orc-execution/SKILL.md +72 -0
- package/templates/skills/orc/subskills/orc-execution/core.md +151 -0
- package/templates/skills/orc/subskills/orc-execution/subagent.md +13 -0
- package/templates/skills/orc/subskills/orc-planner/SKILL.md +264 -0
- package/templates/skills/orc/subskills/orc-planner-mini/SKILL.md +121 -0
- package/templates/skills/orc/subskills/orc-pr/SKILL.md +51 -0
- package/templates/skills/orc/subskills/orc-pr/pr.md +22 -0
- package/templates/skills/orc/subskills/orc-pr/stack-gate.md +108 -0
- package/templates/skills/orc/subskills/orc-review-verify/SKILL.md +76 -0
- package/templates/skills/orc/subskills/orc-review-verify/core.md +135 -0
- package/templates/skills/orc/subskills/orc-review-verify/subagent.md +7 -0
- package/templates/skills/orc/subskills/orc-testgen/SKILL.md +45 -0
- package/templates/skills/orc/subskills/orc-testgen/core.md +59 -0
- package/templates/skills/orc/subskills/orc-testgen/subagent.md +7 -0
- package/templates/skills/orc-advisor/SKILL.md +60 -0
- package/templates/skills/orc-aftermath/SKILL.md +136 -0
- package/templates/skills/orc-aftermath/references/report.md +95 -0
- package/templates/skills/orc-analyze/SKILL.md +220 -0
- package/templates/skills/orc-analyze/examples/analyze-mock.md +42 -0
- package/templates/skills/orc-analyze/references/branching.md +51 -0
- package/templates/skills/orc-analyze/references/deep-mode.md +27 -0
- package/templates/skills/orc-analyze/references/thin-input.md +77 -0
- package/templates/skills/orc-analyze/schemas/report-audit.md +83 -0
- package/templates/skills/orc-analyze/schemas/report-prose.md +63 -0
- package/templates/skills/orc-analyze/schemas/report-requirement.md +78 -0
- package/templates/skills/orc-analyze/schemas/requirement-spec.md +77 -0
- package/templates/skills/orc-analyze-mini/SKILL.md +112 -0
- package/templates/skills/orc-analyze-mini/examples/quick-analysis-mock.md +31 -0
- package/templates/skills/orc-boundary/SKILL.md +208 -0
- package/templates/skills/orc-boundary/references/card.md +78 -0
- package/templates/skills/orc-boundary/references/gate.md +113 -0
- package/templates/skills/orc-brainstorm/SKILL.md +339 -0
- package/templates/skills/orc-brainstorm/references/brainstorm-doc.md +133 -0
- package/templates/skills/orc-brainstorm/references/lenses.md +152 -0
- package/templates/skills/orc-budget/SKILL.md +225 -0
- package/templates/skills/orc-budget/references/corpus.md +87 -0
- package/templates/skills/orc-challenge/README.md +142 -0
- package/templates/skills/orc-challenge/SKILL.md +255 -0
- package/templates/skills/orc-challenge/examples/code-module.md +110 -0
- package/templates/skills/orc-challenge/examples/council-full-roster.md +273 -0
- package/templates/skills/orc-challenge/examples/tsd-two-iterations.md +213 -0
- package/templates/skills/orc-challenge/references/conservation.md +107 -0
- package/templates/skills/orc-challenge/references/council.md +315 -0
- package/templates/skills/orc-challenge/references/cycle-state.md +185 -0
- package/templates/skills/orc-challenge/references/dimensions.md +121 -0
- package/templates/skills/orc-challenge/references/fix-brief.md +130 -0
- package/templates/skills/orc-challenge/references/intake.md +171 -0
- package/templates/skills/orc-challenge/references/kinds.md +44 -0
- package/templates/skills/orc-challenge/references/plain-english.md +98 -0
- package/templates/skills/orc-challenge/references/rubric.md +109 -0
- package/templates/skills/orc-challenge/references/sealed-slice.md +97 -0
- package/templates/skills/orc-challenge/references/verdict-doc.md +154 -0
- package/templates/skills/orc-claude/SKILL.md +199 -0
- package/templates/skills/orc-claude/examples/claude-run-mock.md +65 -0
- package/templates/skills/orc-claude/references/refresh.md +76 -0
- package/templates/skills/orc-claude/references/template.md +109 -0
- package/templates/skills/orc-diy/README.md +142 -0
- package/templates/skills/orc-diy/SKILL.md +70 -0
- package/templates/skills/orc-diy/references/blocks/analyze.md +24 -0
- package/templates/skills/orc-diy/references/blocks/execution.md +42 -0
- package/templates/skills/orc-diy/references/blocks/extra.md +55 -0
- package/templates/skills/orc-diy/references/blocks/header.md +55 -0
- package/templates/skills/orc-diy/references/blocks/mock-example.md +22 -0
- package/templates/skills/orc-diy/references/blocks/pattern.md +18 -0
- package/templates/skills/orc-diy/references/blocks/planning.md +34 -0
- package/templates/skills/orc-diy/references/blocks/review.md +18 -0
- package/templates/skills/orc-diy/references/blocks/scoring.md +16 -0
- package/templates/skills/orc-diy/references/blocks/security.md +25 -0
- package/templates/skills/orc-diy/references/blocks/ship.md +25 -0
- package/templates/skills/orc-diy/references/blocks/summary.md +18 -0
- package/templates/skills/orc-diy/references/blocks/testgen.md +17 -0
- package/templates/skills/orc-diy/references/blocks/trace.md +28 -0
- package/templates/skills/orc-diy/references/blocks/verify.md +25 -0
- package/templates/skills/orc-diy/references/blocks/wiki.md +26 -0
- package/templates/skills/orc-diy/references/compile.md +59 -0
- package/templates/skills/orc-diy/references/flow-schema.md +100 -0
- package/templates/skills/orc-diy/references/locked-blocks.md +37 -0
- package/templates/skills/orc-doc/README.md +229 -0
- package/templates/skills/orc-doc/SKILL.md +444 -0
- package/templates/skills/orc-doc/examples/orc-doc-prd-run.md +325 -0
- package/templates/skills/orc-doc/references/chunking.md +527 -0
- package/templates/skills/orc-doc/references/gates.md +311 -0
- package/templates/skills/orc-doc/references/generation-rules.md +122 -0
- package/templates/skills/orc-doc/references/house-rules.md +170 -0
- package/templates/skills/orc-doc/references/import-targets.md +40 -0
- package/templates/skills/orc-doc/references/plain-language.md +66 -0
- package/templates/skills/orc-doc/references/portable-markdown.md +74 -0
- package/templates/skills/orc-doc/references/resume-protocol.md +228 -0
- package/templates/skills/orc-doc/references/templates/collaboration.md +118 -0
- package/templates/skills/orc-doc/references/templates/prd.md +133 -0
- package/templates/skills/orc-doc/references/templates/report.md +102 -0
- package/templates/skills/orc-doc/references/templates/tsd.md +122 -0
- package/templates/skills/orc-doc/references/templates/workflow.md +112 -0
- package/templates/skills/orc-explain/SKILL.md +57 -0
- package/templates/skills/orc-export/SKILL.md +154 -0
- package/templates/skills/orc-fast/SKILL.md +188 -0
- package/templates/skills/orc-grill/SKILL.md +207 -0
- package/templates/skills/orc-grill/references/grill-doc.md +105 -0
- package/templates/skills/orc-handoff/SKILL.md +204 -0
- package/templates/skills/orc-handoff/references/handoff-log.md +67 -0
- package/templates/skills/orc-handoff/references/surfaces.md +88 -0
- package/templates/skills/orc-judge/SKILL.md +82 -0
- package/templates/skills/orc-learn/SKILL.md +156 -0
- package/templates/skills/orc-learn/examples/learn-run-mock.md +61 -0
- package/templates/skills/orc-learn/references/deepen.md +70 -0
- package/templates/skills/orc-learn/references/refresh.md +65 -0
- package/templates/skills/orc-learn/references/template-knowledge.md +83 -0
- package/templates/skills/orc-learn/references/template-learning.md +67 -0
- package/templates/skills/orc-mini/SKILL.md +226 -0
- package/templates/skills/orc-mini/examples/mini-run-mock.md +50 -0
- package/templates/skills/orc-pact/SKILL.md +218 -0
- package/templates/skills/orc-pact/references/gate.md +70 -0
- package/templates/skills/orc-pact/references/ledger.md +99 -0
- package/templates/skills/orc-pattern/SKILL.md +124 -0
- package/templates/skills/orc-pattern/references/INDEX.md +73 -0
- package/templates/skills/orc-pattern/references/be-django.md +80 -0
- package/templates/skills/orc-pattern/references/be-express.md +82 -0
- package/templates/skills/orc-pattern/references/be-fastapi.md +107 -0
- package/templates/skills/orc-pattern/references/be-go.md +96 -0
- package/templates/skills/orc-pattern/references/be-nestjs.md +86 -0
- package/templates/skills/orc-pattern/references/be-postgres.md +98 -0
- package/templates/skills/orc-pattern/references/fe-a11y.md +36 -0
- package/templates/skills/orc-pattern/references/fe-angular.md +87 -0
- package/templates/skills/orc-pattern/references/fe-nextjs.md +65 -0
- package/templates/skills/orc-pattern/references/fe-perf.md +39 -0
- package/templates/skills/orc-pattern/references/fe-react.md +83 -0
- package/templates/skills/orc-pattern/references/fe-vue.md +75 -0
- package/templates/skills/orc-pattern/schemas/pattern-doc.md +62 -0
- package/templates/skills/orc-poly/SKILL.md +216 -0
- package/templates/skills/orc-poly/examples/poly-run-mock.md +51 -0
- package/templates/skills/orc-poly/references/gather.md +70 -0
- package/templates/skills/orc-poly/references/poly-spec.md +84 -0
- package/templates/skills/orc-pr-driver/README.md +349 -0
- package/templates/skills/orc-pr-driver/SKILL.md +167 -0
- package/templates/skills/orc-pr-driver/references/conflict-playbook.md +78 -0
- package/templates/skills/orc-pr-driver/references/green-gate.md +105 -0
- package/templates/skills/orc-pr-driver/references/orc-run-split.md +99 -0
- package/templates/skills/orc-pr-setup/README.md +436 -0
- package/templates/skills/orc-pr-setup/SKILL.md +184 -0
- package/templates/skills/orc-pr-setup/references/certainty-gate.md +66 -0
- package/templates/skills/orc-pr-setup/references/layer-taxonomy.md +67 -0
- package/templates/skills/orc-quick/README.md +423 -0
- package/templates/skills/orc-quick/SKILL.md +306 -0
- package/templates/skills/orc-quick/references/context-doc.md +114 -0
- package/templates/skills/orc-quick/references/dispatch-gate.md +163 -0
- package/templates/skills/orc-quick/references/gh-mode.md +127 -0
- package/templates/skills/orc-retro/SKILL.md +222 -0
- package/templates/skills/orc-retro/examples/retro-mock.md +171 -0
- package/templates/skills/orc-route/SKILL.md +165 -0
- package/templates/skills/orc-verify/SKILL.md +86 -0
- package/templates/skills/orc-verify/examples/verify-mock.md +33 -0
- package/templates/skills/orc-wiki/README.md +325 -0
- package/templates/skills/orc-wiki/SKILL.md +322 -0
- package/templates/skills/orc-wiki/examples/wiki-run-mock.md +37 -0
- package/templates/skills/orc-wiki/references/claude-md-injection.md +61 -0
- package/templates/skills/orc-wiki/references/crosslink-compile.md +39 -0
- package/templates/skills/orc-wiki/references/crosslink-kinds.md +57 -0
- package/templates/skills/orc-wiki/references/crosslink.md +284 -0
- package/templates/skills/orc-wiki/references/extra.md +79 -0
- package/templates/skills/orc-wiki/references/integrity-check.md +86 -0
- package/templates/skills/orc-wiki/references/orientation.md +51 -0
- package/templates/skills/orc-wiki/references/partial-refresh.md +203 -0
- package/templates/skills/orc-wiki/references/pattern-prewarm.md +19 -0
- package/templates/skills/orc-wiki/references/staleness.md +288 -0
- package/templates/skills/orc-wiki/schemas/crosslink-tag.md +166 -0
- package/templates/skills/orc-wiki/schemas/wiki-doc.md +120 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* 05-banners.js — orc ui client
|
|
3
|
+
The shared version promise, the update banner, the changelog modal, and
|
|
4
|
+
renderBanners — including the global-install warning that must be visible on
|
|
5
|
+
EVERY panel (config does not merge, so a global install can win skill
|
|
6
|
+
resolution while this panel edits a project file nothing reads).
|
|
7
|
+
|
|
8
|
+
Loaded by app.html in the order its numeric prefix names. Classic
|
|
9
|
+
script, no import/export: an ES module import carries no query string,
|
|
10
|
+
and every static request here needs the per-launch session token. */
|
|
11
|
+
|
|
12
|
+
/* --------------------------------------------------------------- version -- */
|
|
13
|
+
// `orc version --json` performs a REAL bounded network check against the
|
|
14
|
+
// install source and reports {version, latest, update_available}. Three places
|
|
15
|
+
// want that answer — the Overview tile, the rail badge and the Maintenance
|
|
16
|
+
// upgrade row — so the promise is shared: one check per page load, not three.
|
|
17
|
+
// `refresh()` is the only way to force a second one, and it is a button the
|
|
18
|
+
// user presses; nothing here polls for a new release on its own.
|
|
19
|
+
let versionPromise = null;
|
|
20
|
+
const versionInfo = () => (versionPromise = versionPromise || read("/api/version").then((r) => r.data));
|
|
21
|
+
function refreshVersion() {
|
|
22
|
+
versionPromise = null;
|
|
23
|
+
return versionInfo();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// The one place that decides what a version payload MEANS, so the tile, the rail
|
|
27
|
+
// and the upgrade row can never disagree about it. `latest: null` is not "up to
|
|
28
|
+
// date" — it is "we could not tell", which is a different thing to show.
|
|
29
|
+
function versionState(v) {
|
|
30
|
+
if (!v) return { kind: "", label: t("version.unknown.label"), note: t("version.unknown.note") };
|
|
31
|
+
if (v.check_disabled) return { kind: "", label: t("version.off.label"), note: t("version.off.note") };
|
|
32
|
+
if (!v.latest) return { kind: "warn", label: t("version.offline.label"), note: t("version.offline.note") };
|
|
33
|
+
if (v.update_available)
|
|
34
|
+
return {
|
|
35
|
+
kind: "warn",
|
|
36
|
+
label: t("version.available.label", { latest: v.latest }),
|
|
37
|
+
note: t("version.available.note", { version: v.version }),
|
|
38
|
+
};
|
|
39
|
+
return {
|
|
40
|
+
kind: "ok",
|
|
41
|
+
label: t("version.current.label"),
|
|
42
|
+
// `install_spec` is CLI data (a package spec), so it is interpolated, never
|
|
43
|
+
// translated — only the sentence around it is ours.
|
|
44
|
+
note: t("version.current.note", { version: v.version, source: v.install_spec || "the install source" }),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* ---------------------------------------------------------------- banners -- */
|
|
49
|
+
|
|
50
|
+
// The ONE thing that must be visible on every panel: config does NOT merge, so
|
|
51
|
+
// a global install can win skill resolution while this panel edits a project
|
|
52
|
+
// file nothing reads. Reported here, never fixed here — this UI never edits
|
|
53
|
+
// global config, by design.
|
|
54
|
+
// The update banner. It is a BUTTON, not a notice: the useful question is
|
|
55
|
+
// "what changed", and the answer is one click away rather than on GitHub.
|
|
56
|
+
async function renderUpdateBanner(host) {
|
|
57
|
+
let v;
|
|
58
|
+
try {
|
|
59
|
+
v = await versionInfo();
|
|
60
|
+
} catch (_) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
if (!v || !v.update_available) return;
|
|
64
|
+
|
|
65
|
+
const b = el("button", "banner banner-update");
|
|
66
|
+
b.type = "button";
|
|
67
|
+
const inner = el("div");
|
|
68
|
+
inner.append(el("strong", null, t("banner.update.title", { latest: v.latest, version: v.version })));
|
|
69
|
+
inner.append(el("div", "note", t("banner.update.note")));
|
|
70
|
+
b.append(el("span", "banner-badge", "NEW"), inner, el("span", "banner-more", t("banner.update.cta")));
|
|
71
|
+
b.addEventListener("click", () => showChangelog(v));
|
|
72
|
+
host.append(b);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Fetched lazily — the modal is what needs the changelog, and paying for that
|
|
76
|
+
// request on every page load to fill a box nobody opened is waste.
|
|
77
|
+
async function showChangelog(v) {
|
|
78
|
+
const body = el("div", "stack stack-sm");
|
|
79
|
+
const slot = el("div", "stack stack-sm");
|
|
80
|
+
slot.append(skeleton(4));
|
|
81
|
+
body.append(slot);
|
|
82
|
+
|
|
83
|
+
const close = modal({
|
|
84
|
+
title: t("changelog.title", { version: v.latest }),
|
|
85
|
+
body,
|
|
86
|
+
actions: [
|
|
87
|
+
{ label: t("common.later"), onClick: (c) => c() },
|
|
88
|
+
{
|
|
89
|
+
label: t("changelog.goUpgrade"),
|
|
90
|
+
cls: "btn-primary",
|
|
91
|
+
onClick: (c) => {
|
|
92
|
+
c();
|
|
93
|
+
location.hash = "#/maintenance";
|
|
94
|
+
// The spotlight is armed here and lands after the panel renders — a
|
|
95
|
+
// highlight fired now would point at a node that does not exist yet.
|
|
96
|
+
startUpgradeSpotlight();
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
try {
|
|
103
|
+
const d = (await read("/api/changelog")).data;
|
|
104
|
+
slot.replaceChildren();
|
|
105
|
+
if (d.check_disabled) {
|
|
106
|
+
slot.append(el("div", "note", t("changelog.disabled")));
|
|
107
|
+
} else if (!d.fetched) {
|
|
108
|
+
slot.append(el("div", "note", t("changelog.offline")));
|
|
109
|
+
slot.append(el("div", "note", t("changelog.offlineNote")));
|
|
110
|
+
} else if (!d.entries.length) {
|
|
111
|
+
slot.append(el("div", "note", t("changelog.empty")));
|
|
112
|
+
} else {
|
|
113
|
+
for (const e of d.entries) {
|
|
114
|
+
const sec = el("div", "cl-entry");
|
|
115
|
+
const h = el("div", "cl-head");
|
|
116
|
+
h.append(el("span", "cl-version", "v" + e.version));
|
|
117
|
+
if (e.date) h.append(el("span", "cl-date", e.date));
|
|
118
|
+
sec.append(h);
|
|
119
|
+
if (e.title) sec.append(el("div", "cl-title", stripMd(e.title)));
|
|
120
|
+
if (e.body) sec.append(el("div", "cl-body", reflowMd(stripMd(e.body))));
|
|
121
|
+
slot.append(sec);
|
|
122
|
+
}
|
|
123
|
+
slot.append(el("div", "note", t("changelog.source", { src: d.source })));
|
|
124
|
+
}
|
|
125
|
+
} catch (e) {
|
|
126
|
+
slot.replaceChildren(el("div", "note", t("changelog.loadFail", { err: e.message })));
|
|
127
|
+
}
|
|
128
|
+
return close;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
async function renderBanners() {
|
|
132
|
+
const host = $("#banners");
|
|
133
|
+
host.replaceChildren();
|
|
134
|
+
renderUpdateBanner(host);
|
|
135
|
+
let doctor;
|
|
136
|
+
try {
|
|
137
|
+
doctor = (await read("/api/doctor")).data;
|
|
138
|
+
} catch (_) {
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
if (!doctor) return;
|
|
142
|
+
const g = doctor.global_install || {};
|
|
143
|
+
if (g.present && g.shadows) {
|
|
144
|
+
const finding = (doctor.findings || []).find((f) => f.id === "global-skew" || f.id === "global-retired-agents");
|
|
145
|
+
const b = el("div", "banner");
|
|
146
|
+
// Prose inside the banner flex row, not a panel container: its lines are
|
|
147
|
+
// meant to read tight, so it is deliberately not a `stack`.
|
|
148
|
+
const bannerBody = el("div");
|
|
149
|
+
bannerBody.append(el("strong", null, t("banner.global.title")));
|
|
150
|
+
bannerBody.append(el("div", null, t("banner.global.body")));
|
|
151
|
+
// The finding's own text is the CLI speaking. It is shown verbatim in every
|
|
152
|
+
// language — a doctor message names files and commands.
|
|
153
|
+
if (finding) bannerBody.append(el("div", "note", finding.message));
|
|
154
|
+
// The command that actually clears the finding, copyable. This panel is
|
|
155
|
+
// project-scoped and never writes global config, so handing over the exact
|
|
156
|
+
// line to paste is the whole of what it can do — and a wrong line here is
|
|
157
|
+
// why the warning felt permanent.
|
|
158
|
+
const fixCmd = (doctor.findings || []).map((f) => f.fix_command).find(Boolean);
|
|
159
|
+
if (fixCmd) {
|
|
160
|
+
const row = el("div", "banner-fix");
|
|
161
|
+
row.append(el("code", "action-cmd", fixCmd));
|
|
162
|
+
const cp = el("button", "btn btn-ghost btn-sm", t("common.copy"));
|
|
163
|
+
cp.type = "button";
|
|
164
|
+
cp.addEventListener("click", () => copy(fixCmd, t("common.copied")));
|
|
165
|
+
row.append(cp);
|
|
166
|
+
bannerBody.append(row);
|
|
167
|
+
}
|
|
168
|
+
bannerBody.append(el("div", "note", t("banner.global.check")));
|
|
169
|
+
b.append(bannerBody);
|
|
170
|
+
host.append(b);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* 06-edit.js — orc ui client
|
|
3
|
+
editSet, editBar, applyEdits — the staged-write machinery Settings AND Flow
|
|
4
|
+
both use. Nothing is written until Apply; the CLI is still the only writer and
|
|
5
|
+
the only validator.
|
|
6
|
+
|
|
7
|
+
Loaded by app.html in the order its numeric prefix names. Classic
|
|
8
|
+
script, no import/export: an ES module import carries no query string,
|
|
9
|
+
and every static request here needs the per-launch session token. */
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
/* ============================================================ staged edits == */
|
|
13
|
+
//
|
|
14
|
+
// WRITES ARE BATCHED (v0.44.1). Every control used to commit on the spot: one
|
|
15
|
+
// click, one `orc config set`, one full re-render of the panel. Changing four
|
|
16
|
+
// keys meant four subprocesses and four re-renders, and each one scrolled the
|
|
17
|
+
// list out from under you — so a routine "set these five things" was a fight.
|
|
18
|
+
//
|
|
19
|
+
// Nothing is written until Apply now. Edits accumulate here, the affected rows
|
|
20
|
+
// mark themselves, and an edit bar at the bottom says how many are pending.
|
|
21
|
+
// The CLI is still the only writer and still the only validator; what changed
|
|
22
|
+
// is WHEN it is called, never by whom.
|
|
23
|
+
//
|
|
24
|
+
// An entry is `{kind: "set", value}` or `{kind: "reset"}` — a per-key reset is
|
|
25
|
+
// `orc config reset <key>` (it REMOVES the key from the file), which is not the
|
|
26
|
+
// same write as setting it to its default value, so it cannot be flattened into
|
|
27
|
+
// one.
|
|
28
|
+
function editSet(onChange) {
|
|
29
|
+
const map = new Map();
|
|
30
|
+
const api = {
|
|
31
|
+
map,
|
|
32
|
+
get size() {
|
|
33
|
+
return map.size;
|
|
34
|
+
},
|
|
35
|
+
// Staging a value back to what it already was CLEARS the edit rather than
|
|
36
|
+
// recording a no-op — otherwise "cancel" and "set it back by hand" would
|
|
37
|
+
// leave the bar claiming an unsaved change that would write nothing.
|
|
38
|
+
set(key, value, original) {
|
|
39
|
+
if (String(value) === String(original)) map.delete(key);
|
|
40
|
+
else map.set(key, { kind: "set", value: String(value), original: String(original) });
|
|
41
|
+
onChange(api);
|
|
42
|
+
},
|
|
43
|
+
reset(key) {
|
|
44
|
+
map.set(key, { kind: "reset" });
|
|
45
|
+
onChange(api);
|
|
46
|
+
},
|
|
47
|
+
// An ACTION entry (v0.49.2): a route and a body, staged like any other
|
|
48
|
+
// edit, applied by `applyActions`. `label` is what the pending list names —
|
|
49
|
+
// a count is not a change list.
|
|
50
|
+
action(key, route, body, label) {
|
|
51
|
+
map.set(key, { kind: "action", route, body, value: label });
|
|
52
|
+
onChange(api);
|
|
53
|
+
},
|
|
54
|
+
drop(key) {
|
|
55
|
+
map.delete(key);
|
|
56
|
+
onChange(api);
|
|
57
|
+
},
|
|
58
|
+
clear() {
|
|
59
|
+
map.clear();
|
|
60
|
+
onChange(api);
|
|
61
|
+
},
|
|
62
|
+
entries() {
|
|
63
|
+
return [...map.entries()];
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
return api;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// The bar. Apply is disabled with nothing pending; Reset is always offered
|
|
70
|
+
// (it is a write in its own right, not an undo); **Cancel appears only when
|
|
71
|
+
// there is something to cancel** — a permanently visible Cancel next to a
|
|
72
|
+
// disabled Apply reads as though the panel is broken.
|
|
73
|
+
function editBar(edits, { onApply, onReset, onCancel, resetLabel }) {
|
|
74
|
+
const bar = el("div", "edit-bar");
|
|
75
|
+
const summary = el("div", "edit-summary");
|
|
76
|
+
const actions = el("div", "edit-actions");
|
|
77
|
+
|
|
78
|
+
const apply = el("button", "btn btn-sm btn-primary", t("edits.apply"));
|
|
79
|
+
apply.type = "button";
|
|
80
|
+
apply.addEventListener("click", () => onApply(apply));
|
|
81
|
+
|
|
82
|
+
const reset = el("button", "btn btn-sm btn-ghost", resetLabel || t("edits.reset"));
|
|
83
|
+
reset.type = "button";
|
|
84
|
+
reset.addEventListener("click", onReset);
|
|
85
|
+
|
|
86
|
+
const cancel = el("button", "btn btn-sm btn-ghost", t("edits.cancel"));
|
|
87
|
+
cancel.type = "button";
|
|
88
|
+
cancel.addEventListener("click", onCancel);
|
|
89
|
+
|
|
90
|
+
bar.paint = () => {
|
|
91
|
+
const n = edits.size;
|
|
92
|
+
bar.classList.toggle("edit-bar-dirty", n > 0);
|
|
93
|
+
apply.disabled = n === 0;
|
|
94
|
+
apply.textContent = n ? t("edits.applyN", { n }) : t("edits.apply");
|
|
95
|
+
// The pending list is named, never counted: "3 changes" is not consent for
|
|
96
|
+
// three writes you can no longer see.
|
|
97
|
+
summary.replaceChildren();
|
|
98
|
+
if (!n) {
|
|
99
|
+
summary.append(el("span", "note", t("edits.none")));
|
|
100
|
+
} else {
|
|
101
|
+
summary.append(el("span", "note", t("edits.pending")));
|
|
102
|
+
const list = el("div", "edit-list");
|
|
103
|
+
for (const [key, e] of edits.entries()) {
|
|
104
|
+
const item = el("span", "edit-chip");
|
|
105
|
+
// Key names and values are CLI data — never translated.
|
|
106
|
+
item.append(el("span", "edit-key", key));
|
|
107
|
+
item.append(document.createTextNode(e.kind === "reset" ? " → " + t("edits.toDefault") : " → " + e.value));
|
|
108
|
+
list.append(item);
|
|
109
|
+
}
|
|
110
|
+
summary.append(list);
|
|
111
|
+
}
|
|
112
|
+
actions.replaceChildren();
|
|
113
|
+
actions.append(apply, reset);
|
|
114
|
+
if (n) actions.append(cancel);
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
bar.append(summary, actions);
|
|
118
|
+
bar.paint();
|
|
119
|
+
return bar;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Apply runs the staged writes ONE AT A TIME, in the order they were staged —
|
|
123
|
+
// the same sequence a terminal user would type, which matters because settings
|
|
124
|
+
// can shadow each other. A failure does not abort the rest: the remaining
|
|
125
|
+
// writes are independent, and stopping halfway would leave a state nobody
|
|
126
|
+
// chose. Every failure is reported by key.
|
|
127
|
+
async function applyEdits(edits, routes, button) {
|
|
128
|
+
const list = edits.entries();
|
|
129
|
+
if (!list.length) return { ok: true, failed: [] };
|
|
130
|
+
const label = button && button.textContent;
|
|
131
|
+
if (button) {
|
|
132
|
+
button.disabled = true;
|
|
133
|
+
button.textContent = t("edits.applying");
|
|
134
|
+
}
|
|
135
|
+
const failed = [];
|
|
136
|
+
for (const [key, e] of list) {
|
|
137
|
+
try {
|
|
138
|
+
const r = e.kind === "reset" ? await post(routes.reset, { key }) : await post(routes.set, { key, value: e.value });
|
|
139
|
+
if (!r.ok) failed.push(`${key}: ${(r.output || r.command || "").trim().split("\n")[0]}`);
|
|
140
|
+
} catch (err) {
|
|
141
|
+
failed.push(`${key}: ${err.message}`);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
if (button) {
|
|
145
|
+
button.disabled = false;
|
|
146
|
+
if (label) button.textContent = label;
|
|
147
|
+
}
|
|
148
|
+
if (failed.length) toast(t("edits.someFailed", { n: failed.length }), "bad", failed.join("\n"));
|
|
149
|
+
else toast(t("edits.applied", { n: list.length }), "ok");
|
|
150
|
+
return { ok: !failed.length, failed };
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// The same batching, for a panel whose edits are not key/value pairs (v0.49.2).
|
|
154
|
+
// The house-rule ledger stages ADDs, REMOVEs, TOGGLEs and MOVEs — four routes,
|
|
155
|
+
// four body shapes — so the entry carries its own `route` and `body` and this
|
|
156
|
+
// runs them one at a time in staged order. Every other rule of `applyEdits`
|
|
157
|
+
// holds exactly: a refused write NEVER aborts the rest, and every failure is
|
|
158
|
+
// reported by the key it was staged under.
|
|
159
|
+
async function applyActions(edits, button) {
|
|
160
|
+
const list = edits.entries();
|
|
161
|
+
if (!list.length) return { ok: true, failed: [] };
|
|
162
|
+
const label = button && button.textContent;
|
|
163
|
+
if (button) {
|
|
164
|
+
button.disabled = true;
|
|
165
|
+
button.textContent = t("edits.applying");
|
|
166
|
+
}
|
|
167
|
+
const failed = [];
|
|
168
|
+
for (const [key, e] of list) {
|
|
169
|
+
try {
|
|
170
|
+
const r = await post(e.route, e.body);
|
|
171
|
+
if (!r.ok) failed.push(`${key}: ${(r.output || r.command || "").trim().split("\n")[0]}`);
|
|
172
|
+
} catch (err) {
|
|
173
|
+
failed.push(`${key}: ${err.message}`);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
if (button) {
|
|
177
|
+
button.disabled = false;
|
|
178
|
+
if (label) button.textContent = label;
|
|
179
|
+
}
|
|
180
|
+
if (failed.length) toast(t("edits.someFailed", { n: failed.length }), "bad", failed.join("\n"));
|
|
181
|
+
else toast(t("edits.applied", { n: list.length }), "ok");
|
|
182
|
+
return { ok: !failed.length, failed };
|
|
183
|
+
}
|