@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,220 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* panels/learn.js — orc ui client
|
|
3
|
+
The onboarding walkthrough: a contents rail plus one section.
|
|
4
|
+
|
|
5
|
+
Loaded by app.html in the order its numeric prefix names. Classic
|
|
6
|
+
script, no import/export: an ES module import carries no query string,
|
|
7
|
+
and every static request here needs the per-launch session token. */
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
const LEARN_POS_KEY = "orc-ui-learn-pos";
|
|
11
|
+
|
|
12
|
+
PANELS.learn = function (host) {
|
|
13
|
+
head(host, t("learn.title"), t("learn.sub"));
|
|
14
|
+
const body = el("div", "stack");
|
|
15
|
+
host.append(body);
|
|
16
|
+
renderLearn(body);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
async function renderLearn(body) {
|
|
20
|
+
body.replaceChildren(skeleton(6));
|
|
21
|
+
let d;
|
|
22
|
+
try {
|
|
23
|
+
d = (await read("/api/learn")).data;
|
|
24
|
+
} catch (e) {
|
|
25
|
+
body.replaceChildren(failBox(e));
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const sections = d.sections || [];
|
|
29
|
+
if (!sections.length) {
|
|
30
|
+
body.replaceChildren(empty(t("common.loadFail")));
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
let idx = 0;
|
|
35
|
+
try {
|
|
36
|
+
const saved = Number(localStorage.getItem(LEARN_POS_KEY));
|
|
37
|
+
if (Number.isInteger(saved) && saved >= 0 && saved < sections.length) idx = saved;
|
|
38
|
+
} catch (_) {}
|
|
39
|
+
|
|
40
|
+
const wrap = el("div", "learn");
|
|
41
|
+
|
|
42
|
+
/* --- the contents rail ---------------------------------------------- */
|
|
43
|
+
const side = el("aside", "learn-side");
|
|
44
|
+
const sideHead = el("div", "learn-side-head", t("learn.contents"));
|
|
45
|
+
const search = el("input", "text-input");
|
|
46
|
+
search.type = "search";
|
|
47
|
+
search.placeholder = t("learn.search");
|
|
48
|
+
const navList = el("div", "learn-nav");
|
|
49
|
+
const searchResult = el("div", "learn-result");
|
|
50
|
+
side.append(sideHead, search, navList, searchResult);
|
|
51
|
+
|
|
52
|
+
const navItems = sections.map((s, i) => {
|
|
53
|
+
const b = el("button", "learn-nav-item");
|
|
54
|
+
b.type = "button";
|
|
55
|
+
b.append(el("span", "learn-num", String(i + 1)));
|
|
56
|
+
// The section title is content, shipped in onboarding-content.js — the same
|
|
57
|
+
// text the terminal prints. Never translated here.
|
|
58
|
+
b.append(el("span", "learn-nav-title", stripLeadingGlyph(s.title)));
|
|
59
|
+
b.addEventListener("click", () => goTo(i));
|
|
60
|
+
navList.append(b);
|
|
61
|
+
return b;
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
/* --- the reading pane ------------------------------------------------ */
|
|
65
|
+
const pane = el("div", "learn-pane");
|
|
66
|
+
const progress = el("div", "learn-progress");
|
|
67
|
+
const bar = el("div", "learn-progress-fill");
|
|
68
|
+
progress.append(bar);
|
|
69
|
+
const meta = el("div", "learn-meta");
|
|
70
|
+
const title = el("h2", "learn-title");
|
|
71
|
+
const article = el("div", "learn-article");
|
|
72
|
+
const foot = el("div", "learn-foot");
|
|
73
|
+
|
|
74
|
+
const prev = el("button", "btn btn-sm", t("learn.prev"));
|
|
75
|
+
prev.type = "button";
|
|
76
|
+
prev.addEventListener("click", () => goTo(idx - 1));
|
|
77
|
+
// Next is wired through `onclick` ONLY, and re-assigned by paint(): on the
|
|
78
|
+
// last section it wraps to the start instead of advancing. An addEventListener
|
|
79
|
+
// here as well would leave two live handlers, and both read the same mutable
|
|
80
|
+
// `idx` — so one click would advance twice.
|
|
81
|
+
const next = el("button", "btn btn-sm btn-primary", t("learn.next"));
|
|
82
|
+
next.type = "button";
|
|
83
|
+
const copyBtn = el("button", "btn btn-ghost btn-sm", t("learn.copySection"));
|
|
84
|
+
copyBtn.type = "button";
|
|
85
|
+
copyBtn.addEventListener("click", () => copy(sections[idx].lines.join("\n"), t("learn.copied")));
|
|
86
|
+
|
|
87
|
+
foot.append(prev, next, copyBtn);
|
|
88
|
+
pane.append(progress, meta, title, article, foot);
|
|
89
|
+
wrap.append(side, pane);
|
|
90
|
+
body.replaceChildren(wrap);
|
|
91
|
+
|
|
92
|
+
function goTo(i) {
|
|
93
|
+
if (i < 0 || i >= sections.length) return;
|
|
94
|
+
idx = i;
|
|
95
|
+
try {
|
|
96
|
+
localStorage.setItem(LEARN_POS_KEY, String(idx));
|
|
97
|
+
} catch (_) {}
|
|
98
|
+
paint();
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function paint() {
|
|
102
|
+
const s = sections[idx];
|
|
103
|
+
navItems.forEach((b, i) => {
|
|
104
|
+
b.setAttribute("aria-current", i === idx ? "true" : "false");
|
|
105
|
+
b.classList.toggle("learn-seen", i < idx);
|
|
106
|
+
});
|
|
107
|
+
bar.style.width = ((idx + 1) / sections.length) * 100 + "%";
|
|
108
|
+
meta.textContent = t("learn.progress", { n: idx + 1, total: sections.length });
|
|
109
|
+
title.textContent = stripLeadingGlyph(s.title);
|
|
110
|
+
article.replaceChildren(renderLearnBody(s.lines));
|
|
111
|
+
// Re-trigger the section-swap animation on every move.
|
|
112
|
+
article.style.animation = "none";
|
|
113
|
+
void article.offsetHeight;
|
|
114
|
+
article.style.animation = "";
|
|
115
|
+
prev.disabled = idx === 0;
|
|
116
|
+
next.textContent = idx === sections.length - 1 ? t("learn.restart") : t("learn.next");
|
|
117
|
+
next.onclick = () => goTo(idx === sections.length - 1 ? 0 : idx + 1);
|
|
118
|
+
// The rail scrolls itself so the current item is always visible, which
|
|
119
|
+
// matters once the rail is taller than the viewport.
|
|
120
|
+
navItems[idx].scrollIntoView({ block: "nearest" });
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
search.addEventListener("input", () => {
|
|
124
|
+
const q = search.value.trim().toLowerCase();
|
|
125
|
+
let hits = 0;
|
|
126
|
+
sections.forEach((s, i) => {
|
|
127
|
+
const hit = !q || (s.title + " " + s.lines.join(" ")).toLowerCase().includes(q);
|
|
128
|
+
navItems[i].classList.toggle("hidden", !hit);
|
|
129
|
+
if (hit) hits++;
|
|
130
|
+
});
|
|
131
|
+
searchResult.textContent = q ? (hits ? tn(hits, "learn.matches") : t("learn.noMatch")) : "";
|
|
132
|
+
searchResult.classList.toggle("toolbar-result-none", !!q && !hits);
|
|
133
|
+
// A search with exactly one hit jumps to it — the obvious next click.
|
|
134
|
+
if (q && hits === 1) {
|
|
135
|
+
const only = sections.findIndex((s) => (s.title + " " + s.lines.join(" ")).toLowerCase().includes(q));
|
|
136
|
+
if (only >= 0 && only !== idx) goTo(only);
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
search.addEventListener("keydown", (e) => {
|
|
140
|
+
if (e.key === "Escape" && search.value) {
|
|
141
|
+
e.stopPropagation();
|
|
142
|
+
search.value = "";
|
|
143
|
+
search.dispatchEvent(new Event("input"));
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
paint();
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* The walkthrough is plain text written for a terminal, and it stays plain
|
|
151
|
+
text — nothing here is parsed as markup. What the panel adds is TYPOGRAPHY:
|
|
152
|
+
an indented line that starts with `orc ` or `/orc` is a command, so it is
|
|
153
|
+
rendered as a click-to-copy chip; a blank line becomes a paragraph break; a
|
|
154
|
+
line that is a bullet keeps its shape. Everything else is prose. */
|
|
155
|
+
function renderLearnBody(lines) {
|
|
156
|
+
const out = frag();
|
|
157
|
+
let para = null;
|
|
158
|
+
const flush = () => {
|
|
159
|
+
if (para && para.childNodes.length) out.append(para);
|
|
160
|
+
para = null;
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
for (const raw of lines) {
|
|
164
|
+
const line = String(raw);
|
|
165
|
+
if (!line.trim()) {
|
|
166
|
+
flush();
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
169
|
+
const cmd = line.match(/^\s{2,}((?:orc|claude)\s+\S.*?|\/orc[\w-]*)(?:\s{2,}(.*))?$/);
|
|
170
|
+
if (cmd) {
|
|
171
|
+
flush();
|
|
172
|
+
const row = el("div", "learn-cmd-row");
|
|
173
|
+
const chipBtn = el("button", "learn-cmd", cmd[1].trim());
|
|
174
|
+
chipBtn.type = "button";
|
|
175
|
+
chipBtn.title = t("common.copy");
|
|
176
|
+
chipBtn.addEventListener("click", () => copy(cmd[1].trim(), cmd[1].trim()));
|
|
177
|
+
row.append(chipBtn);
|
|
178
|
+
if (cmd[2]) row.append(el("span", "learn-cmd-what", cmd[2].trim()));
|
|
179
|
+
out.append(row);
|
|
180
|
+
continue;
|
|
181
|
+
}
|
|
182
|
+
if (/^\s*[•·]/.test(line)) {
|
|
183
|
+
flush();
|
|
184
|
+
out.append(el("div", "learn-bullet", line.replace(/^\s*[•·]\s*/, "")));
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
187
|
+
// A pipeline / diagram line is centred monospace, not prose.
|
|
188
|
+
if (/[→←]/.test(line) && line.trim().length < 100) {
|
|
189
|
+
flush();
|
|
190
|
+
out.append(el("div", "learn-flowline", line.trim()));
|
|
191
|
+
continue;
|
|
192
|
+
}
|
|
193
|
+
if (!para) para = el("p", "learn-para");
|
|
194
|
+
if (para.childNodes.length) para.append(document.createTextNode(" "));
|
|
195
|
+
para.append(document.createTextNode(line.trim()));
|
|
196
|
+
}
|
|
197
|
+
flush();
|
|
198
|
+
const hint = el("div", "note learn-hint", t("learn.cmdHint"));
|
|
199
|
+
out.append(hint);
|
|
200
|
+
return out;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* ======================================================= MOCKED SKILL USE == */
|
|
204
|
+
/*
|
|
205
|
+
Every lane, written out as a run you can read before you pay for one: what
|
|
206
|
+
you type, what ORC prints back, what lands on disk. The whole point is that
|
|
207
|
+
nobody should have to spend tokens to find out what a command looks like.
|
|
208
|
+
|
|
209
|
+
THE SAME RULE AS THE FLOW STEPPER: the catalogue is DERIVED by
|
|
210
|
+
`bin/mockrun-catalog.js` — groups, reading order, lane names, summaries — and
|
|
211
|
+
this panel renders it and decides none of it. A second idea of the order (or
|
|
212
|
+
of which doc belongs to which lane) is exactly the drift the panel exists to
|
|
213
|
+
make impossible. Everything that arrives in the payload is CLI-side data, so
|
|
214
|
+
nothing in it is ever passed through `t()`.
|
|
215
|
+
|
|
216
|
+
Markdown is rendered to real DOM nodes, never assigned as HTML: `renderMd`
|
|
217
|
+
builds elements and every piece of text goes in through `textContent`. These
|
|
218
|
+
files ship inside the package, but "it is our own file" is not a reason to
|
|
219
|
+
parse it as markup.
|
|
220
|
+
*/
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* panels/maintenance.js — orc ui client
|
|
3
|
+
Preview-then-apply. The apply button stays disabled until a preview was
|
|
4
|
+
fetched, the exact command is always visible, and a prune names EVERY file.
|
|
5
|
+
|
|
6
|
+
Loaded by app.html in the order its numeric prefix names. Classic
|
|
7
|
+
script, no import/export: an ES module import carries no query string,
|
|
8
|
+
and every static request here needs the per-launch session token. */
|
|
9
|
+
|
|
10
|
+
PANELS.maintenance = function (host) {
|
|
11
|
+
head(host, t("maintenance.title"), t("maintenance.sub"));
|
|
12
|
+
const body = el("div", "stack");
|
|
13
|
+
host.append(body);
|
|
14
|
+
renderMaintenance(body);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
async function renderMaintenance(body) {
|
|
18
|
+
body.replaceChildren(skeleton(5));
|
|
19
|
+
const d = (await read("/api/maintenance")).data;
|
|
20
|
+
const out = frag();
|
|
21
|
+
|
|
22
|
+
out.append(el("div", "banner", t("maintenance.banner")));
|
|
23
|
+
|
|
24
|
+
// ADVANCED is a section, not a disclaimer (v0.44.0). Everything above targets
|
|
25
|
+
// THIS project; everything in the box below reaches outside it. The global
|
|
26
|
+
// update lives there because a stale global install is a failure this panel
|
|
27
|
+
// already reports and, until now, could only tell you to fix in a terminal.
|
|
28
|
+
const advanced = card(t("maintenance.advanced"));
|
|
29
|
+
advanced.id = "maintenance-advanced";
|
|
30
|
+
advanced.append(el("div", "note", t("maintenance.advancedNote")));
|
|
31
|
+
let anyAdvanced = false;
|
|
32
|
+
|
|
33
|
+
for (const a of d.actions) {
|
|
34
|
+
const row = el("div", "action");
|
|
35
|
+
row.dataset.action = a.id; // the upgrade spotlight anchors on this
|
|
36
|
+
const left = el("div");
|
|
37
|
+
// Action id, label and command are the server's catalog — the label
|
|
38
|
+
// describes an exact CLI invocation, so it is shown as written.
|
|
39
|
+
left.append(el("div", "setting-name", a.id));
|
|
40
|
+
left.append(el("div", "setting-desc", a.label));
|
|
41
|
+
left.append(el("div", "action-cmd", a.command));
|
|
42
|
+
if (a.network) left.append(el("div", "note", t("maintenance.network")));
|
|
43
|
+
|
|
44
|
+
// `upgrade` is the one action whose whole point is a comparison, so it says
|
|
45
|
+
// what it would actually do BEFORE you preview it — and offers to check
|
|
46
|
+
// again, because "up to date" is only as old as the last check.
|
|
47
|
+
if (a.id === "upgrade") {
|
|
48
|
+
const status = el("div", "action-status");
|
|
49
|
+
status.append(el("span", "note", t("maintenance.checking")));
|
|
50
|
+
left.append(status);
|
|
51
|
+
const paint = (v) => {
|
|
52
|
+
const s = versionState(v);
|
|
53
|
+
status.replaceChildren();
|
|
54
|
+
status.append(chip(s.label, s.kind), el("span", "note", s.note));
|
|
55
|
+
const again = el("button", "btn btn-ghost btn-sm btn-allow-busy", t("maintenance.checkAgain"));
|
|
56
|
+
again.type = "button";
|
|
57
|
+
again.addEventListener("click", () => {
|
|
58
|
+
status.replaceChildren(el("span", "note", t("common.checking")));
|
|
59
|
+
refreshVersion().then(paint).catch(() => status.replaceChildren(el("span", "note", t("maintenance.checkFailed"))));
|
|
60
|
+
});
|
|
61
|
+
status.append(again);
|
|
62
|
+
};
|
|
63
|
+
versionInfo().then(paint).catch(() => status.replaceChildren(el("span", "note", t("maintenance.couldNotCheck"))));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (a.advanced) left.append(el("div", "note", t("maintenance.globalNote")));
|
|
67
|
+
|
|
68
|
+
const btn = el("button", "btn btn-sm", t("maintenance.preview"));
|
|
69
|
+
btn.type = "button";
|
|
70
|
+
btn.addEventListener("click", () => previewAction(a.id, body));
|
|
71
|
+
row.append(left, btn);
|
|
72
|
+
if (a.advanced) {
|
|
73
|
+
anyAdvanced = true;
|
|
74
|
+
advanced.append(row);
|
|
75
|
+
} else {
|
|
76
|
+
out.append(row);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (anyAdvanced) out.append(advanced);
|
|
81
|
+
|
|
82
|
+
const job = card(t("maintenance.lastRun"));
|
|
83
|
+
job.id = "job-card";
|
|
84
|
+
out.append(job);
|
|
85
|
+
body.replaceChildren(out);
|
|
86
|
+
refreshJob();
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
async function previewAction(action, body) {
|
|
90
|
+
const d = (await read("/api/maintenance/preview?action=" + encodeURIComponent(action))).data;
|
|
91
|
+
const b = el("div");
|
|
92
|
+
|
|
93
|
+
b.append(el("div", null, d.label));
|
|
94
|
+
b.append(el("div", "action-cmd", d.command));
|
|
95
|
+
b.append(el("div", "note", t("maintenance.previewFrom", { command: d.preview_command })));
|
|
96
|
+
|
|
97
|
+
// Said BEFORE the apply, not discovered after it. A panel that reloads itself
|
|
98
|
+
// with no warning reads as a crash, and the whole point of this note is that
|
|
99
|
+
// the reload is the thing the user wanted.
|
|
100
|
+
if (d.restarts_ui) b.append(el("div", "note", t("maintenance.willRestart")));
|
|
101
|
+
|
|
102
|
+
// The one action that writes outside this project says so before it runs, and
|
|
103
|
+
// the preview it is showing came from the SAME target — `orc doctor --global`,
|
|
104
|
+
// not the project doctor.
|
|
105
|
+
if (d.advanced) {
|
|
106
|
+
const g = el("div", "banner");
|
|
107
|
+
g.append(el("div", null, t("maintenance.globalWarn")));
|
|
108
|
+
b.append(g);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Guard 1 — a run is mid-flight. Updating changes the skills that run will
|
|
112
|
+
// resume into. The CLI has no idea you are mid-run; this panel does.
|
|
113
|
+
let ackWaiting = !d.waiting_runs.length;
|
|
114
|
+
if (d.waiting_runs.length) {
|
|
115
|
+
const warn = el("div", "banner banner-bad");
|
|
116
|
+
const inner = el("div");
|
|
117
|
+
inner.append(el("strong", null, t("maintenance.waitingRuns", { n: d.waiting_runs.length })));
|
|
118
|
+
inner.append(el("div", null, t("maintenance.waitingBody", { slugs: d.waiting_runs.join(", ") })));
|
|
119
|
+
const lbl = el("label", "note");
|
|
120
|
+
const cb = el("input");
|
|
121
|
+
cb.type = "checkbox";
|
|
122
|
+
cb.addEventListener("change", () => {
|
|
123
|
+
ackWaiting = cb.checked;
|
|
124
|
+
syncApply();
|
|
125
|
+
});
|
|
126
|
+
lbl.append(cb, document.createTextNode(" " + t("maintenance.waitingAck")));
|
|
127
|
+
inner.append(lbl);
|
|
128
|
+
warn.append(inner);
|
|
129
|
+
b.append(warn);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Guard 2 — a dirty working tree before an upgrade is worth a warning
|
|
133
|
+
// BEFORE, not a surprise after.
|
|
134
|
+
if (d.dirty_tree) {
|
|
135
|
+
const warn = el("div", "banner");
|
|
136
|
+
warn.append(el("div", null, t("maintenance.dirtyTree")));
|
|
137
|
+
b.append(warn);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
const pv = d.preview || {};
|
|
141
|
+
if (action === "upgrade") {
|
|
142
|
+
b.append(
|
|
143
|
+
kvList([
|
|
144
|
+
[t("maintenance.installed"), pv.version],
|
|
145
|
+
[t("maintenance.available"), pv.latest || t("maintenance.availableUnknown")],
|
|
146
|
+
[t("maintenance.source"), pv.install_spec],
|
|
147
|
+
// The install URL and the URL the version number was read from are two
|
|
148
|
+
// different things. Showing only the first is how "up to date" becomes
|
|
149
|
+
// unfalsifiable from this panel.
|
|
150
|
+
[t("maintenance.checkedAt"), pv.checked_ref || pv.checked_source || t("maintenance.availableUnknown")],
|
|
151
|
+
[t("maintenance.updateAvailable"), pv.update_available ? t("maintenance.yes") : t("maintenance.no")],
|
|
152
|
+
])
|
|
153
|
+
);
|
|
154
|
+
b.append(el("div", "note", t("maintenance.upgradeNote")));
|
|
155
|
+
} else {
|
|
156
|
+
const findings = pv.findings || [];
|
|
157
|
+
b.append(
|
|
158
|
+
kvList([
|
|
159
|
+
[t("maintenance.installedPayload"), pv.installed_version],
|
|
160
|
+
[t("maintenance.thisCli"), pv.package_version],
|
|
161
|
+
[t("maintenance.findings"), String(findings.length)],
|
|
162
|
+
])
|
|
163
|
+
);
|
|
164
|
+
if (!findings.length) b.append(el("div", "note", t("maintenance.healthy")));
|
|
165
|
+
for (const f of findings) {
|
|
166
|
+
const line = el("div", "note");
|
|
167
|
+
line.append(
|
|
168
|
+
chip(f.fixable ? t("overview.doctor.fixable") : t("overview.doctor.manual"), f.fixable ? "info" : "warn"),
|
|
169
|
+
document.createTextNode(" " + f.message)
|
|
170
|
+
);
|
|
171
|
+
b.append(line);
|
|
172
|
+
}
|
|
173
|
+
// A count is NOT consent for a deletion — name every file.
|
|
174
|
+
if (d.names_files) {
|
|
175
|
+
const paths = findings.filter((f) => f.id === "orphan" || f.id === "orphan-candidates").flatMap((f) => f.paths || []);
|
|
176
|
+
const c = el("div");
|
|
177
|
+
c.append(el("div", "note", paths.length ? t("maintenance.wouldDelete", { n: paths.length }) : t("maintenance.wouldDeleteNone")));
|
|
178
|
+
if (paths.length) {
|
|
179
|
+
const fl = el("div", "file-list");
|
|
180
|
+
for (const p of paths) fl.append(el("div", null, p));
|
|
181
|
+
c.append(fl);
|
|
182
|
+
}
|
|
183
|
+
b.append(c);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
let applyBtn = null;
|
|
188
|
+
const syncApply = () => {
|
|
189
|
+
if (applyBtn) applyBtn.disabled = !ackWaiting;
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
const actions = [{ label: t("common.cancel"), onClick: (c) => c() }];
|
|
193
|
+
if (action === "upgrade")
|
|
194
|
+
actions.push({
|
|
195
|
+
label: t("maintenance.checkOnly"),
|
|
196
|
+
onClick: () => toast(t("maintenance.checkOnlyDone"), "ok"),
|
|
197
|
+
});
|
|
198
|
+
actions.push({
|
|
199
|
+
label: action === "prune" ? t("maintenance.applyPrune") : action === "upgrade" ? t("maintenance.applyUpgrade") : t("maintenance.apply"),
|
|
200
|
+
cls: action === "prune" || action === "upgrade" ? "btn-danger" : "btn-primary",
|
|
201
|
+
id: "apply-btn",
|
|
202
|
+
disabled: !ackWaiting,
|
|
203
|
+
onClick: async (close) => {
|
|
204
|
+
try {
|
|
205
|
+
await post("/api/maintenance/apply", { action });
|
|
206
|
+
close();
|
|
207
|
+
toast(t("maintenance.started", { command: d.command }), "ok");
|
|
208
|
+
setBusy(true);
|
|
209
|
+
refreshJob();
|
|
210
|
+
} catch (e) {
|
|
211
|
+
toast(t("maintenance.startFail"), "bad", String(e.message));
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
modal({ title: t("maintenance.previewTitle", { command: d.command }), body: b, actions });
|
|
217
|
+
applyBtn = document.getElementById("apply-btn");
|
|
218
|
+
syncApply();
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/* ============================================== PROMISES · BOUNDARY · SELF-SERVE
|
|
222
|
+
(v0.46.0)
|
|
223
|
+
|
|
224
|
+
THE LINE, restated because these three panels sit right on it: a FREE action
|
|
225
|
+
gets a button, a PAID action gets a copy-able command. `orc pact check` runs
|
|
226
|
+
the ledger's own cheap proofs and `orc handoff set` edits one graded surface —
|
|
227
|
+
both deterministic, both a button. `/orc-pact`'s reconcile conversation and
|
|
228
|
+
`/orc-boundary`'s evidence pass cost model tokens, so they are commands with
|
|
229
|
+
the reason printed next to them.
|
|
230
|
+
|
|
231
|
+
And the second rule, which these panels are the first real test of: the CLI's
|
|
232
|
+
state words are the ONLY state words. HOLDING/DRIFTED/UNCHECKABLE/BROKEN and
|
|
233
|
+
EXECUTE/ESCALATE/REFUSE are rendered verbatim, never softened into a friendlier
|
|
234
|
+
synonym — a second vocabulary is drift no lint can see. test/webui.test.js
|
|
235
|
+
greps this file for the literals that must come from the CLI instead. */
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* panels/mockrun.js — orc ui client
|
|
3
|
+
The mocked-run gallery and document pane. The catalogue is DERIVED by
|
|
4
|
+
bin/mockrun-catalog.js; this panel decides nothing about it.
|
|
5
|
+
|
|
6
|
+
Loaded by app.html in the order its numeric prefix names. Classic
|
|
7
|
+
script, no import/export: an ES module import carries no query string,
|
|
8
|
+
and every static request here needs the per-launch session token. */
|
|
9
|
+
|
|
10
|
+
const MOCKRUN_KEY = "orc-ui-mockrun-doc";
|
|
11
|
+
|
|
12
|
+
PANELS.mockrun = function (host) {
|
|
13
|
+
head(host, t("mockrun.title"), t("mockrun.sub"));
|
|
14
|
+
const body = el("div", "stack");
|
|
15
|
+
host.append(body);
|
|
16
|
+
renderMockrun(body);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
async function renderMockrun(body) {
|
|
20
|
+
body.replaceChildren(skeleton(5));
|
|
21
|
+
let d;
|
|
22
|
+
try {
|
|
23
|
+
d = (await read("/api/mockruns")).data;
|
|
24
|
+
} catch (e) {
|
|
25
|
+
body.replaceChildren(failBox(e));
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const groups = (d && d.groups) || [];
|
|
29
|
+
const docs = (d && d.docs) || [];
|
|
30
|
+
if (!docs.length) {
|
|
31
|
+
body.replaceChildren(empty(t("mockrun.none"), t("mockrun.noneHint")));
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// `open` is a slug or null (null = the gallery). Remembered per browser so
|
|
36
|
+
// coming back to the panel returns you to what you were reading.
|
|
37
|
+
let open = null;
|
|
38
|
+
try {
|
|
39
|
+
const saved = localStorage.getItem(MOCKRUN_KEY);
|
|
40
|
+
if (saved && docs.some((x) => x.slug === saved)) open = saved;
|
|
41
|
+
} catch (_) {}
|
|
42
|
+
|
|
43
|
+
const wrap = el("div", "mock");
|
|
44
|
+
|
|
45
|
+
/* --- the contents rail ------------------------------------------------ */
|
|
46
|
+
const side = el("aside", "mock-side");
|
|
47
|
+
const sideHead = el("div", "mock-side-head", t("mockrun.contents"));
|
|
48
|
+
const search = el("input", "text-input");
|
|
49
|
+
search.type = "search";
|
|
50
|
+
search.placeholder = t("mockrun.search");
|
|
51
|
+
const navList = el("div", "mock-nav");
|
|
52
|
+
const searchResult = el("div", "learn-result");
|
|
53
|
+
side.append(sideHead, search, navList, searchResult);
|
|
54
|
+
|
|
55
|
+
const navItems = new Map();
|
|
56
|
+
for (const g of groups) {
|
|
57
|
+
// Group titles come from the CLI. They are content, not panel prose.
|
|
58
|
+
navList.append(el("div", "mock-nav-group", g.title));
|
|
59
|
+
for (const doc of g.docs) {
|
|
60
|
+
const b = el("button", "mock-nav-item");
|
|
61
|
+
b.type = "button";
|
|
62
|
+
b.append(el("span", "mock-nav-title", doc.lane || doc.title));
|
|
63
|
+
if (doc.kind === "annotated") b.append(el("span", "mock-nav-tag", t("mockrun.kindAnnotated")));
|
|
64
|
+
b.addEventListener("click", () => show(doc.slug));
|
|
65
|
+
navList.append(b);
|
|
66
|
+
navItems.set(doc.slug, b);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* --- the pane --------------------------------------------------------- */
|
|
71
|
+
const pane = el("div", "mock-pane");
|
|
72
|
+
wrap.append(side, pane);
|
|
73
|
+
body.replaceChildren(wrap);
|
|
74
|
+
|
|
75
|
+
function mark() {
|
|
76
|
+
for (const [slug, b] of navItems) b.setAttribute("aria-current", slug === open ? "true" : "false");
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Re-run the pane's entrance animation on every swap, the same way the Learn
|
|
80
|
+
// panel does — without it, switching document reads as a content flicker.
|
|
81
|
+
function replay() {
|
|
82
|
+
pane.style.animation = "none";
|
|
83
|
+
void pane.offsetHeight;
|
|
84
|
+
pane.style.animation = "";
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function gallery() {
|
|
88
|
+
open = null;
|
|
89
|
+
try {
|
|
90
|
+
localStorage.removeItem(MOCKRUN_KEY);
|
|
91
|
+
} catch (_) {}
|
|
92
|
+
mark();
|
|
93
|
+
const out = frag();
|
|
94
|
+
|
|
95
|
+
const intro = el("div", "note mock-intro");
|
|
96
|
+
intro.append(document.createTextNode(t("mockrun.intro", { n: docs.length })));
|
|
97
|
+
out.append(intro);
|
|
98
|
+
|
|
99
|
+
for (const g of groups) {
|
|
100
|
+
const sec = el("section", "mock-group");
|
|
101
|
+
sec.append(el("h2", "mock-group-head", g.title));
|
|
102
|
+
const grid = el("div", "mock-grid");
|
|
103
|
+
g.docs.forEach((doc, i) => {
|
|
104
|
+
const c = el("button", "mock-card");
|
|
105
|
+
c.type = "button";
|
|
106
|
+
// The stagger is a CSS custom property so reduced motion's blanket
|
|
107
|
+
// `animation-delay: 0ms !important` still wins over it.
|
|
108
|
+
c.style.setProperty("--i", String(Math.min(i, 8)));
|
|
109
|
+
const top = el("div", "mock-card-top");
|
|
110
|
+
top.append(el("span", "mock-card-lane", doc.lane || doc.title));
|
|
111
|
+
if (doc.kind === "annotated") top.append(chip(t("mockrun.kindAnnotated")));
|
|
112
|
+
c.append(top);
|
|
113
|
+
c.append(el("div", "mock-card-sum", doc.summary));
|
|
114
|
+
c.append(el("div", "mock-card-foot", tn(doc.lines, "mockrun.lines")));
|
|
115
|
+
c.addEventListener("click", () => show(doc.slug));
|
|
116
|
+
grid.append(c);
|
|
117
|
+
});
|
|
118
|
+
sec.append(grid);
|
|
119
|
+
out.append(sec);
|
|
120
|
+
}
|
|
121
|
+
pane.replaceChildren(out);
|
|
122
|
+
replay();
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
async function show(slug) {
|
|
126
|
+
open = slug;
|
|
127
|
+
try {
|
|
128
|
+
localStorage.setItem(MOCKRUN_KEY, slug);
|
|
129
|
+
} catch (_) {}
|
|
130
|
+
mark();
|
|
131
|
+
pane.replaceChildren(skeleton(6));
|
|
132
|
+
let doc;
|
|
133
|
+
try {
|
|
134
|
+
doc = (await read("/api/mockrun?slug=" + encodeURIComponent(slug))).data;
|
|
135
|
+
} catch (e) {
|
|
136
|
+
pane.replaceChildren(failBox(e));
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
if (!doc || !doc.found) {
|
|
140
|
+
pane.replaceChildren(empty(t("mockrun.missing", { slug })));
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const out = frag();
|
|
145
|
+
|
|
146
|
+
const back = el("button", "btn btn-ghost btn-sm mock-back", t("mockrun.back"));
|
|
147
|
+
back.type = "button";
|
|
148
|
+
back.addEventListener("click", gallery);
|
|
149
|
+
out.append(back);
|
|
150
|
+
|
|
151
|
+
const h = el("div", "mock-doc-head");
|
|
152
|
+
h.append(el("h2", "mock-doc-title", doc.title));
|
|
153
|
+
const meta = el("div", "mock-doc-meta");
|
|
154
|
+
// The lane is a command you type, so it is printed as one — a chip would
|
|
155
|
+
// uppercase it, and `/ORC-GRILL` is not a command that exists.
|
|
156
|
+
if (doc.lane) meta.append(el("span", "mock-doc-lane", doc.lane));
|
|
157
|
+
meta.append(el("span", "mock-doc-path", doc.path));
|
|
158
|
+
meta.append(el("span", "mock-doc-lines", tn(doc.lines, "mockrun.lines")));
|
|
159
|
+
h.append(meta);
|
|
160
|
+
out.append(h);
|
|
161
|
+
|
|
162
|
+
const article = el("article", "mock-article");
|
|
163
|
+
article.append(renderMd(doc.body, { title: doc.title, docs, open: show }));
|
|
164
|
+
out.append(article);
|
|
165
|
+
|
|
166
|
+
// Reading order is the catalogue's order, so "next" means the next thing
|
|
167
|
+
// the index would have you read — not the next file alphabetically.
|
|
168
|
+
const idx = docs.findIndex((x) => x.slug === doc.slug);
|
|
169
|
+
const foot = el("div", "mock-doc-foot");
|
|
170
|
+
const prev = docs[idx - 1];
|
|
171
|
+
const next = docs[idx + 1];
|
|
172
|
+
if (prev) {
|
|
173
|
+
const b = el("button", "btn btn-sm", "← " + (prev.lane || prev.title));
|
|
174
|
+
b.type = "button";
|
|
175
|
+
b.addEventListener("click", () => show(prev.slug));
|
|
176
|
+
foot.append(b);
|
|
177
|
+
}
|
|
178
|
+
const cmd = el("button", "btn btn-ghost btn-sm", t("mockrun.copyCmd"));
|
|
179
|
+
cmd.type = "button";
|
|
180
|
+
cmd.addEventListener("click", () => copy("orc mock-run show " + doc.slug, "orc mock-run"));
|
|
181
|
+
foot.append(cmd);
|
|
182
|
+
if (next) {
|
|
183
|
+
const b = el("button", "btn btn-sm btn-primary", (next.lane || next.title) + " →");
|
|
184
|
+
b.type = "button";
|
|
185
|
+
b.addEventListener("click", () => show(next.slug));
|
|
186
|
+
foot.append(b);
|
|
187
|
+
}
|
|
188
|
+
out.append(foot);
|
|
189
|
+
|
|
190
|
+
pane.replaceChildren(out);
|
|
191
|
+
replay();
|
|
192
|
+
pane.scrollTop = 0;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
search.addEventListener("input", () => {
|
|
196
|
+
const q = search.value.trim().toLowerCase();
|
|
197
|
+
let hits = 0;
|
|
198
|
+
for (const doc of docs) {
|
|
199
|
+
const hay = (doc.slug + " " + doc.title + " " + (doc.lane || "") + " " + doc.summary).toLowerCase();
|
|
200
|
+
const hit = !q || hay.includes(q);
|
|
201
|
+
navItems.get(doc.slug).classList.toggle("hidden", !hit);
|
|
202
|
+
if (hit) hits++;
|
|
203
|
+
}
|
|
204
|
+
// A group whose every item is filtered out keeps an orphan heading.
|
|
205
|
+
for (const gh of navList.querySelectorAll(".mock-nav-group")) {
|
|
206
|
+
let n = gh.nextElementSibling;
|
|
207
|
+
let any = false;
|
|
208
|
+
while (n && !n.classList.contains("mock-nav-group")) {
|
|
209
|
+
if (!n.classList.contains("hidden")) any = true;
|
|
210
|
+
n = n.nextElementSibling;
|
|
211
|
+
}
|
|
212
|
+
gh.classList.toggle("hidden", !!q && !any);
|
|
213
|
+
}
|
|
214
|
+
searchResult.textContent = q ? (hits ? tn(hits, "mockrun.matches") : t("mockrun.noMatch")) : "";
|
|
215
|
+
searchResult.classList.toggle("toolbar-result-none", !!q && !hits);
|
|
216
|
+
});
|
|
217
|
+
search.addEventListener("keydown", (e) => {
|
|
218
|
+
if (e.key === "Escape" && search.value) {
|
|
219
|
+
e.stopPropagation();
|
|
220
|
+
search.value = "";
|
|
221
|
+
search.dispatchEvent(new Event("input"));
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
if (open) show(open);
|
|
226
|
+
else gallery();
|
|
227
|
+
}
|