@ouro.bot/cli 0.1.0-alpha.1469 → 0.1.0-alpha.1470
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/changelog.json +6 -2
- package/deploy/unraid/sanctuary.ouro/bundle-meta.json +1 -1
- package/deploy/unraid/sanctuary.xml +1 -1
- package/desk.lock.json +8 -0
- package/dist/heart/identity.js +27 -1
- package/dist/mind/desk-section.js +33 -43
- package/dist/repertoire/desk-mcp.js +140 -0
- package/dist/repertoire/mcp-manager.js +22 -0
- package/dist/repertoire/mcp-tools.js +11 -7
- package/npm-shrinkwrap.json +2 -2
- package/package.json +4 -1
- package/vendor/desk/.claude-plugin/plugin.json +35 -0
- package/vendor/desk/.mcp.claude-codex.json +28 -0
- package/vendor/desk/.mcp.copilot.json +16 -0
- package/vendor/desk/.ouro-desk.json +6 -0
- package/vendor/desk/CHANGELOG.md +7004 -0
- package/vendor/desk/README.md +195 -0
- package/vendor/desk/activation/README.md +98 -0
- package/vendor/desk/activation/copilot-root.flattened-bundle.json +38 -0
- package/vendor/desk/activation/desk.activation.json +251 -0
- package/vendor/desk/activation/host-capability-evidence.md +46 -0
- package/vendor/desk/activation/support-matrix.json +84 -0
- package/vendor/desk/agency.json +20 -0
- package/vendor/desk/agents/observer.agent.md +26 -0
- package/vendor/desk/agents/observer.md +29 -0
- package/vendor/desk/agents/worker.agent.md +32 -0
- package/vendor/desk/agents/worker.md +40 -0
- package/vendor/desk/artifacts/tombstones/tombstone.schema.json +53 -0
- package/vendor/desk/artifacts/tombstones/tombstones.jsonl +1 -0
- package/vendor/desk/changelog.d/README.md +12 -0
- package/vendor/desk/docs/agent-files.md +104 -0
- package/vendor/desk/docs/agentic-engineering-v2-rfc.md +206 -0
- package/vendor/desk/docs/agentic-engineering-v3-rfc.md +109 -0
- package/vendor/desk/docs/browser-remote-desktops.md +69 -0
- package/vendor/desk/docs/dependency-activation-stories-and-criteria.md +500 -0
- package/vendor/desk/docs/evaluation-packet.md +363 -0
- package/vendor/desk/docs/factory-local-capture.md +651 -0
- package/vendor/desk/docs/factory-store-playbook.md +927 -0
- package/vendor/desk/docs/images/factory-site.png +0 -0
- package/vendor/desk/docs/issue-drains.md +79 -0
- package/vendor/desk/docs/lfs-inspection.md +55 -0
- package/vendor/desk/docs/preview-diagnostics.md +11 -0
- package/vendor/desk/docs/relays.md +88 -0
- package/vendor/desk/docs/schedules.md +69 -0
- package/vendor/desk/docs/search-recovery.md +22 -0
- package/vendor/desk/docs/session-labels.md +157 -0
- package/vendor/desk/docs/session-retention.md +125 -0
- package/vendor/desk/docs/sessions.md +17 -0
- package/vendor/desk/docs/stalled-nudges.md +54 -0
- package/vendor/desk/docs/webhooks.md +80 -0
- package/vendor/desk/docs/workspace-tidy.md +74 -0
- package/vendor/desk/hooks/boot-checks.cjs +7 -0
- package/vendor/desk/hooks/claude-session-start.cjs +123 -0
- package/vendor/desk/hooks/compatible-node.cjs +97 -0
- package/vendor/desk/hooks/copilot-boot-prompt.cjs +69 -0
- package/vendor/desk/hooks/copilot-durable-files.cjs +8 -0
- package/vendor/desk/hooks/copilot-hooks.json +61 -0
- package/vendor/desk/hooks/copilot-intake-context.cjs +5 -0
- package/vendor/desk/hooks/copilot-lane-model.cjs +8 -0
- package/vendor/desk/hooks/copilot-session-start.cjs +264 -0
- package/vendor/desk/hooks/copilot-skill-current.cjs +28 -0
- package/vendor/desk/hooks/factory-end.cjs +5 -0
- package/vendor/desk/hooks/factory-start.cjs +27 -0
- package/vendor/desk/hooks/hooks.json +40 -0
- package/vendor/desk/hooks/lib/boot-checks.cjs +643 -0
- package/vendor/desk/hooks/lib/child-agent.cjs +14 -0
- package/vendor/desk/hooks/lib/copilot-intake-context.cjs +73 -0
- package/vendor/desk/hooks/lib/current-release.cjs +162 -0
- package/vendor/desk/hooks/lib/delivery-stop.cjs +326 -0
- package/vendor/desk/hooks/lib/detach-worker.cjs +43 -0
- package/vendor/desk/hooks/lib/durable-files.cjs +102 -0
- package/vendor/desk/hooks/lib/factory-end.cjs +327 -0
- package/vendor/desk/hooks/lib/lane-model.cjs +82 -0
- package/vendor/desk/hooks/lib/node-required.cjs +56 -0
- package/vendor/desk/hooks/lib/orca-session-title.cjs +60 -0
- package/vendor/desk/hooks/lib/session-end.cjs +30 -0
- package/vendor/desk/hooks/lib/sync-end.cjs +89 -0
- package/vendor/desk/hooks/loop-start.cjs +105 -0
- package/vendor/desk/hooks/node-missing.sh +78 -0
- package/vendor/desk/hooks/orca-session-title.cjs +8 -0
- package/vendor/desk/hooks/session-end.cjs +8 -0
- package/vendor/desk/mcp/README.md +269 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/darwin-arm64-node-127/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/darwin-arm64-node-127/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/darwin-arm64-node-127/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/darwin-arm64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/darwin-arm64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/darwin-arm64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-127/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-127/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-127/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-147/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-147/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/linux-x64-node-147/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/support-matrix.json +72 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/win32-x64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/win32-x64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/win32-x64-node-137/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/win32-x64-node-147/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.manifest.json +881 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/win32-x64-node-147/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.sha256 +1 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/1.4.0-alpha.6/win32-x64-node-147/3b0cb8b1e7dd77a982b38375fe88a5278bd77974213e18be025d7dc8deea800f/runtime-deps.tgz +0 -0
- package/vendor/desk/mcp/artifacts/runtime-deps/README.md +25 -0
- package/vendor/desk/mcp/bootstrap.cjs +761 -0
- package/vendor/desk/mcp/docs/private-feedback.md +13 -0
- package/vendor/desk/mcp/idle-proxy.cjs +423 -0
- package/vendor/desk/mcp/index.js +813 -0
- package/vendor/desk/mcp/package-lock.json +3717 -0
- package/vendor/desk/mcp/package.json +44 -0
- package/vendor/desk/mcp/scripts/agency-desk-channel.js +7 -0
- package/vendor/desk/mcp/scripts/build-runtime-deps-pack.js +5 -0
- package/vendor/desk/mcp/scripts/crew.js +89 -0
- package/vendor/desk/mcp/scripts/drains-launcher.mjs +329 -0
- package/vendor/desk/mcp/scripts/drains.js +5 -0
- package/vendor/desk/mcp/scripts/factory.js +657 -0
- package/vendor/desk/mcp/scripts/file-desk-problem.js +9 -0
- package/vendor/desk/mcp/scripts/finish-commit.js +7 -0
- package/vendor/desk/mcp/scripts/lfs.js +37 -0
- package/vendor/desk/mcp/scripts/local-recovery.js +363 -0
- package/vendor/desk/mcp/scripts/migrations.js +11 -0
- package/vendor/desk/mcp/scripts/private-view.js +177 -0
- package/vendor/desk/mcp/scripts/resolve-desk-root.js +106 -0
- package/vendor/desk/mcp/scripts/session-boot.js +22 -0
- package/vendor/desk/mcp/scripts/session-retention.js +5 -0
- package/vendor/desk/mcp/scripts/session-sync.js +10 -0
- package/vendor/desk/mcp/scripts/sessions.js +5 -0
- package/vendor/desk/mcp/scripts/sync-push.js +13 -0
- package/vendor/desk/mcp/scripts/tidy-status.js +8 -0
- package/vendor/desk/mcp/scripts/verify-runtime-deps-pack.js +5 -0
- package/vendor/desk/mcp/src/actions/desk-read.actions.mts +73 -0
- package/vendor/desk/mcp/src/actions/desk-session.actions.mts +42 -0
- package/vendor/desk/mcp/src/actions/desk-web.actions.mts +52 -0
- package/vendor/desk/mcp/src/actions/desk.actions.mts +5 -0
- package/vendor/desk/mcp/src/actions/generated/desk/OuroActions.swift +649 -0
- package/vendor/desk/mcp/src/actions/generated/desk/OuroActionsReins.swift +61 -0
- package/vendor/desk/mcp/src/actions/generated/desk/actions.json +280 -0
- package/vendor/desk/mcp/src/actions/generated/desk/commands.json +145 -0
- package/vendor/desk/mcp/src/actions/generated/desk/mcp.json +256 -0
- package/vendor/desk/mcp/src/actions/generated/desk/web.ts +59 -0
- package/vendor/desk/mcp/src/actions/generated/desk/webmcp.json +250 -0
- package/vendor/desk/mcp/src/actions/generated/desk-web/OuroActions.swift +241 -0
- package/vendor/desk/mcp/src/actions/generated/desk-web/OuroActionsReins.swift +25 -0
- package/vendor/desk/mcp/src/actions/generated/desk-web/actions.json +73 -0
- package/vendor/desk/mcp/src/actions/generated/desk-web/commands.json +53 -0
- package/vendor/desk/mcp/src/actions/generated/desk-web/mcp.json +83 -0
- package/vendor/desk/mcp/src/actions/generated/desk-web/web.ts +47 -0
- package/vendor/desk/mcp/src/actions/generated/desk-web/webmcp.json +81 -0
- package/vendor/desk/mcp/src/actions/served.js +5 -0
- package/vendor/desk/mcp/src/activation/admit.js +77 -0
- package/vendor/desk/mcp/src/activation/failures.js +65 -0
- package/vendor/desk/mcp/src/activation/readiness-policy.js +102 -0
- package/vendor/desk/mcp/src/activation/schema.js +17 -0
- package/vendor/desk/mcp/src/activation/superpowers-context.js +265 -0
- package/vendor/desk/mcp/src/activation/validate.js +540 -0
- package/vendor/desk/mcp/src/artifacts/tombstones.js +61 -0
- package/vendor/desk/mcp/src/crew/initiative.js +287 -0
- package/vendor/desk/mcp/src/crew/workspace.js +1259 -0
- package/vendor/desk/mcp/src/db/init.js +75 -0
- package/vendor/desk/mcp/src/db/schema.sql +83 -0
- package/vendor/desk/mcp/src/desk/active-tasks.js +408 -0
- package/vendor/desk/mcp/src/desk/card-commit-guard.js +281 -0
- package/vendor/desk/mcp/src/desk/cleanup-index.js +53 -0
- package/vendor/desk/mcp/src/desk/content-home.js +246 -0
- package/vendor/desk/mcp/src/desk/crew-config.js +102 -0
- package/vendor/desk/mcp/src/desk/crew-member.js +196 -0
- package/vendor/desk/mcp/src/desk/crew-roster.js +151 -0
- package/vendor/desk/mcp/src/desk/frontmatter-lite.js +228 -0
- package/vendor/desk/mcp/src/desk/gh-logins.js +109 -0
- package/vendor/desk/mcp/src/desk/handles.js +123 -0
- package/vendor/desk/mcp/src/desk/handoff-reference.js +35 -0
- package/vendor/desk/mcp/src/desk/improvement-authority.js +3 -0
- package/vendor/desk/mcp/src/desk/improvement-cards.js +704 -0
- package/vendor/desk/mcp/src/desk/improvement-person.js +51 -0
- package/vendor/desk/mcp/src/desk/lifecycle.js +16 -0
- package/vendor/desk/mcp/src/desk/machine-desks.js +119 -0
- package/vendor/desk/mcp/src/desk/naming.js +333 -0
- package/vendor/desk/mcp/src/desk/organization.js +592 -0
- package/vendor/desk/mcp/src/desk/resources.js +274 -0
- package/vendor/desk/mcp/src/desk/runtime-resolver.js +30 -0
- package/vendor/desk/mcp/src/desk/scratch-paths.js +44 -0
- package/vendor/desk/mcp/src/desk/step-delivery.js +140 -0
- package/vendor/desk/mcp/src/desk/steps.js +263 -0
- package/vendor/desk/mcp/src/desk/tidy.js +930 -0
- package/vendor/desk/mcp/src/desk/unsigned-deliveries.js +359 -0
- package/vendor/desk/mcp/src/factory/agent-types.js +45 -0
- package/vendor/desk/mcp/src/factory/andon-watch.js +109 -0
- package/vendor/desk/mcp/src/factory/binding.js +612 -0
- package/vendor/desk/mcp/src/factory/boot-check.js +645 -0
- package/vendor/desk/mcp/src/factory/capture-classify.js +158 -0
- package/vendor/desk/mcp/src/factory/capture-count.js +183 -0
- package/vendor/desk/mcp/src/factory/capture-flush.js +268 -0
- package/vendor/desk/mcp/src/factory/capture-publish.js +141 -0
- package/vendor/desk/mcp/src/factory/capture-schema.js +193 -0
- package/vendor/desk/mcp/src/factory/capture-sweep.js +239 -0
- package/vendor/desk/mcp/src/factory/catch-point.js +60 -0
- package/vendor/desk/mcp/src/factory/commit-resolve.js +94 -0
- package/vendor/desk/mcp/src/factory/consent-answer.js +37 -0
- package/vendor/desk/mcp/src/factory/context-capability.js +15 -0
- package/vendor/desk/mcp/src/factory/context-outbox.js +885 -0
- package/vendor/desk/mcp/src/factory/context-run.js +386 -0
- package/vendor/desk/mcp/src/factory/context-schema.js +249 -0
- package/vendor/desk/mcp/src/factory/copilot-turn-index.js +93 -0
- package/vendor/desk/mcp/src/factory/copilot-usage.js +148 -0
- package/vendor/desk/mcp/src/factory/credential.js +45 -0
- package/vendor/desk/mcp/src/factory/derive-claude.js +960 -0
- package/vendor/desk/mcp/src/factory/derive-codex.js +734 -0
- package/vendor/desk/mcp/src/factory/derive-common.js +279 -0
- package/vendor/desk/mcp/src/factory/derive-copilot.js +1057 -0
- package/vendor/desk/mcp/src/factory/derive-run.js +807 -0
- package/vendor/desk/mcp/src/factory/desk-problem-file.js +310 -0
- package/vendor/desk/mcp/src/factory/desk-problem-fingerprint.js +70 -0
- package/vendor/desk/mcp/src/factory/desk-problem-known.js +246 -0
- package/vendor/desk/mcp/src/factory/desk-problem-template.js +107 -0
- package/vendor/desk/mcp/src/factory/desk-repo.js +1223 -0
- package/vendor/desk/mcp/src/factory/desk-task-line.js +28 -0
- package/vendor/desk/mcp/src/factory/desk-visibility.js +48 -0
- package/vendor/desk/mcp/src/factory/end-hook.js +14 -0
- package/vendor/desk/mcp/src/factory/evaluate-kick.js +164 -0
- package/vendor/desk/mcp/src/factory/evaluate-run.js +678 -0
- package/vendor/desk/mcp/src/factory/evaluator-step.js +484 -0
- package/vendor/desk/mcp/src/factory/filer-launch.js +79 -0
- package/vendor/desk/mcp/src/factory/flush-health.js +26 -0
- package/vendor/desk/mcp/src/factory/flush.js +1758 -0
- package/vendor/desk/mcp/src/factory/focus.js +326 -0
- package/vendor/desk/mcp/src/factory/headless-flag.cjs +32 -0
- package/vendor/desk/mcp/src/factory/headless-flag.js +25 -0
- package/vendor/desk/mcp/src/factory/headless-ledger.js +743 -0
- package/vendor/desk/mcp/src/factory/headless.js +567 -0
- package/vendor/desk/mcp/src/factory/held-route.js +93 -0
- package/vendor/desk/mcp/src/factory/host-flags.js +36 -0
- package/vendor/desk/mcp/src/factory/improvement-verify.js +429 -0
- package/vendor/desk/mcp/src/factory/kaizen-file.js +231 -0
- package/vendor/desk/mcp/src/factory/label-binding.js +90 -0
- package/vendor/desk/mcp/src/factory/label-schema.js +426 -0
- package/vendor/desk/mcp/src/factory/local-status.js +368 -0
- package/vendor/desk/mcp/src/factory/loop-conditions.js +121 -0
- package/vendor/desk/mcp/src/factory/loop-health.js +500 -0
- package/vendor/desk/mcp/src/factory/loop-slot.js +90 -0
- package/vendor/desk/mcp/src/factory/loop-status.js +100 -0
- package/vendor/desk/mcp/src/factory/loop-switch.cjs +14 -0
- package/vendor/desk/mcp/src/factory/loop-worker-state.js +96 -0
- package/vendor/desk/mcp/src/factory/loop-worker.js +290 -0
- package/vendor/desk/mcp/src/factory/marker.js +61 -0
- package/vendor/desk/mcp/src/factory/mirror-step.js +145 -0
- package/vendor/desk/mcp/src/factory/os-protect.js +243 -0
- package/vendor/desk/mcp/src/factory/outbox.js +2231 -0
- package/vendor/desk/mcp/src/factory/outcome.js +431 -0
- package/vendor/desk/mcp/src/factory/pipeline/andon.js +319 -0
- package/vendor/desk/mcp/src/factory/pipeline/attention-rollup.js +158 -0
- package/vendor/desk/mcp/src/factory/pipeline/attention.js +146 -0
- package/vendor/desk/mcp/src/factory/pipeline/build.js +299 -0
- package/vendor/desk/mcp/src/factory/pipeline/compare.js +148 -0
- package/vendor/desk/mcp/src/factory/pipeline/formulas.js +652 -0
- package/vendor/desk/mcp/src/factory/pipeline/kaizen.js +387 -0
- package/vendor/desk/mcp/src/factory/pipeline/lifecycle-clocks.js +345 -0
- package/vendor/desk/mcp/src/factory/pipeline/normalize.js +73 -0
- package/vendor/desk/mcp/src/factory/pipeline/number-states.js +154 -0
- package/vendor/desk/mcp/src/factory/pipeline/outcomes.js +268 -0
- package/vendor/desk/mcp/src/factory/pipeline/report.js +737 -0
- package/vendor/desk/mcp/src/factory/pipeline/rollups.js +883 -0
- package/vendor/desk/mcp/src/factory/pipeline/stretches.js +523 -0
- package/vendor/desk/mcp/src/factory/pipeline/timeline.js +199 -0
- package/vendor/desk/mcp/src/factory/pipeline/validate-pr.js +238 -0
- package/vendor/desk/mcp/src/factory/pipeline/versions.js +42 -0
- package/vendor/desk/mcp/src/factory/pipeline/walk.js +1177 -0
- package/vendor/desk/mcp/src/factory/plugin-registry.js +72 -0
- package/vendor/desk/mcp/src/factory/plugin-sources.cjs +249 -0
- package/vendor/desk/mcp/src/factory/pr-green.js +77 -0
- package/vendor/desk/mcp/src/factory/process-lock.js +142 -0
- package/vendor/desk/mcp/src/factory/proof-session.js +75 -0
- package/vendor/desk/mcp/src/factory/publish.js +637 -0
- package/vendor/desk/mcp/src/factory/published-schema.js +648 -0
- package/vendor/desk/mcp/src/factory/reconcile-reasons.js +22 -0
- package/vendor/desk/mcp/src/factory/reconcile-step.js +251 -0
- package/vendor/desk/mcp/src/factory/reconcile.js +808 -0
- package/vendor/desk/mcp/src/factory/release-version.js +134 -0
- package/vendor/desk/mcp/src/factory/repo-name.js +13 -0
- package/vendor/desk/mcp/src/factory/retention.js +60 -0
- package/vendor/desk/mcp/src/factory/route-desk.js +40 -0
- package/vendor/desk/mcp/src/factory/route-issues.js +251 -0
- package/vendor/desk/mcp/src/factory/route-local.js +264 -0
- package/vendor/desk/mcp/src/factory/schema.js +957 -0
- package/vendor/desk/mcp/src/factory/session-kind.js +16 -0
- package/vendor/desk/mcp/src/factory/session-lifetime.js +56 -0
- package/vendor/desk/mcp/src/factory/session-route.js +183 -0
- package/vendor/desk/mcp/src/factory/shell-git.js +500 -0
- package/vendor/desk/mcp/src/factory/store-issues.js +143 -0
- package/vendor/desk/mcp/src/factory/store-route.js +208 -0
- package/vendor/desk/mcp/src/factory/test-state-guard.js +103 -0
- package/vendor/desk/mcp/src/factory/time.js +36 -0
- package/vendor/desk/mcp/src/factory/tool-issue-file.js +84 -0
- package/vendor/desk/mcp/src/factory/tool-kinds.js +87 -0
- package/vendor/desk/mcp/src/factory/triage-schema.js +233 -0
- package/vendor/desk/mcp/src/factory/windows-acl.js +679 -0
- package/vendor/desk/mcp/src/indexer/chunk.js +232 -0
- package/vendor/desk/mcp/src/indexer/discover.js +434 -0
- package/vendor/desk/mcp/src/indexer/exclusions.js +247 -0
- package/vendor/desk/mcp/src/indexer/index.js +167 -0
- package/vendor/desk/mcp/src/indexer/refs.js +0 -0
- package/vendor/desk/mcp/src/indexer/text-hash.js +18 -0
- package/vendor/desk/mcp/src/lib/ouro-actions/actions.claims.json +75 -0
- package/vendor/desk/mcp/src/lib/ouro-actions/dist-manifest.json +70 -0
- package/vendor/desk/mcp/src/lib/ouro-actions/ouro-actions.mts +1416 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/LICENSE +21 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/ax-claims.ts +190 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/ax-command.ts +1020 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/checks.ts +343 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/cli.ts +240 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/component.ts +430 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/dev-commands.ts +204 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/doctor.ts +126 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/effects.ts +68 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/exit-codes.ts +75 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/help.ts +220 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/mcp.ts +268 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/outcome.ts +265 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/output.ts +67 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/precise-copy.ts +235 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/problem.ts +124 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/surfaces.kit.mts +8 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/surfaces.ts +568 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/terminal.ts +245 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/voice.ts +136 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/wait.ts +226 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/work-event.ts +181 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/xray.kit.mts +18 -0
- package/vendor/desk/mcp/src/lib/ouro-ui/registry/ouro/ax/xray.ts +2072 -0
- package/vendor/desk/mcp/src/package-metadata.js +20 -0
- package/vendor/desk/mcp/src/protected/legacy-ledger.js +55 -0
- package/vendor/desk/mcp/src/readiness/leftovers.js +75 -0
- package/vendor/desk/mcp/src/readiness/process-start.js +149 -0
- package/vendor/desk/mcp/src/runtime/admission-worker.js +194 -0
- package/vendor/desk/mcp/src/runtime/admission.js +177 -0
- package/vendor/desk/mcp/src/runtime/agency-desk-channel.js +342 -0
- package/vendor/desk/mcp/src/runtime/agents-md.js +62 -0
- package/vendor/desk/mcp/src/runtime/append-lane.js +68 -0
- package/vendor/desk/mcp/src/runtime/argv-safe-reason.js +55 -0
- package/vendor/desk/mcp/src/runtime/boot-dependencies.js +75 -0
- package/vendor/desk/mcp/src/runtime/boot-text.js +504 -0
- package/vendor/desk/mcp/src/runtime/boot.js +1677 -0
- package/vendor/desk/mcp/src/runtime/bootstrap.js +1455 -0
- package/vendor/desk/mcp/src/runtime/chunked-import.js +102 -0
- package/vendor/desk/mcp/src/runtime/copilot-commit-trailer.js +133 -0
- package/vendor/desk/mcp/src/runtime/copilot-session.js +155 -0
- package/vendor/desk/mcp/src/runtime/deliver.js +469 -0
- package/vendor/desk/mcp/src/runtime/desk-channel.js +86 -0
- package/vendor/desk/mcp/src/runtime/desk-failure.js +26 -0
- package/vendor/desk/mcp/src/runtime/desk-health.js +168 -0
- package/vendor/desk/mcp/src/runtime/desk-session.js +1451 -0
- package/vendor/desk/mcp/src/runtime/diagnostic-server.js +72 -0
- package/vendor/desk/mcp/src/runtime/diagnostics.js +241 -0
- package/vendor/desk/mcp/src/runtime/drains-cli.js +187 -0
- package/vendor/desk/mcp/src/runtime/drains.js +781 -0
- package/vendor/desk/mcp/src/runtime/elsewhere-note.js +9 -0
- package/vendor/desk/mcp/src/runtime/failure-evidence.js +21 -0
- package/vendor/desk/mcp/src/runtime/fast-refs.js +209 -0
- package/vendor/desk/mcp/src/runtime/filer-throttle.js +66 -0
- package/vendor/desk/mcp/src/runtime/focused-card.js +147 -0
- package/vendor/desk/mcp/src/runtime/front-door.js +204 -0
- package/vendor/desk/mcp/src/runtime/gate-wait.js +2 -0
- package/vendor/desk/mcp/src/runtime/git-inspection.js +201 -0
- package/vendor/desk/mcp/src/runtime/git-read-worker.js +157 -0
- package/vendor/desk/mcp/src/runtime/health.js +50 -0
- package/vendor/desk/mcp/src/runtime/hooks.js +353 -0
- package/vendor/desk/mcp/src/runtime/hosted.js +163 -0
- package/vendor/desk/mcp/src/runtime/inbox.js +102 -0
- package/vendor/desk/mcp/src/runtime/index-drift.js +118 -0
- package/vendor/desk/mcp/src/runtime/last-start.js +133 -0
- package/vendor/desk/mcp/src/runtime/lesson-section.js +92 -0
- package/vendor/desk/mcp/src/runtime/lessons-shelf.js +100 -0
- package/vendor/desk/mcp/src/runtime/lfs.js +319 -0
- package/vendor/desk/mcp/src/runtime/native-path.js +12 -0
- package/vendor/desk/mcp/src/runtime/newest-release.js +197 -0
- package/vendor/desk/mcp/src/runtime/node-selection.js +233 -0
- package/vendor/desk/mcp/src/runtime/orca-session-title.js +225 -0
- package/vendor/desk/mcp/src/runtime/other-sessions.js +183 -0
- package/vendor/desk/mcp/src/runtime/pending-migrations.js +653 -0
- package/vendor/desk/mcp/src/runtime/plugin-update.js +215 -0
- package/vendor/desk/mcp/src/runtime/pluginless-runtimes.js +34 -0
- package/vendor/desk/mcp/src/runtime/pr-publication.js +226 -0
- package/vendor/desk/mcp/src/runtime/preview-snapshot.js +23 -0
- package/vendor/desk/mcp/src/runtime/publication-mode.js +19 -0
- package/vendor/desk/mcp/src/runtime/relays.js +974 -0
- package/vendor/desk/mcp/src/runtime/release-alert.js +148 -0
- package/vendor/desk/mcp/src/runtime/remote-identity.js +140 -0
- package/vendor/desk/mcp/src/runtime/resolve-here.js +4 -0
- package/vendor/desk/mcp/src/runtime/runtime-deps-cli.js +65 -0
- package/vendor/desk/mcp/src/runtime/runtime-deps.js +1109 -0
- package/vendor/desk/mcp/src/runtime/runtime-identity.js +22 -0
- package/vendor/desk/mcp/src/runtime/runtime-swap.js +101 -0
- package/vendor/desk/mcp/src/runtime/schedules.js +235 -0
- package/vendor/desk/mcp/src/runtime/session-activity.js +190 -0
- package/vendor/desk/mcp/src/runtime/session-label.js +30 -0
- package/vendor/desk/mcp/src/runtime/session-retention.js +662 -0
- package/vendor/desk/mcp/src/runtime/session-sync.js +333 -0
- package/vendor/desk/mcp/src/runtime/session-trailer.js +126 -0
- package/vendor/desk/mcp/src/runtime/sessions-cli.js +301 -0
- package/vendor/desk/mcp/src/runtime/signoff-listed.js +81 -0
- package/vendor/desk/mcp/src/runtime/skills.js +76 -0
- package/vendor/desk/mcp/src/runtime/stale-card-lead.js +52 -0
- package/vendor/desk/mcp/src/runtime/stale-desk-refresh.js +198 -0
- package/vendor/desk/mcp/src/runtime/stale-desk.js +219 -0
- package/vendor/desk/mcp/src/runtime/stalled.js +255 -0
- package/vendor/desk/mcp/src/runtime/standing-authority.js +79 -0
- package/vendor/desk/mcp/src/runtime/startup-boot.js +341 -0
- package/vendor/desk/mcp/src/runtime/startup-resolve.js +140 -0
- package/vendor/desk/mcp/src/runtime/state-branch.js +203 -0
- package/vendor/desk/mcp/src/runtime/status-compact.js +165 -0
- package/vendor/desk/mcp/src/runtime/status-inspection-child.js +26 -0
- package/vendor/desk/mcp/src/runtime/status-inspection.js +147 -0
- package/vendor/desk/mcp/src/runtime/status-root.js +39 -0
- package/vendor/desk/mcp/src/runtime/sync-worker.js +911 -0
- package/vendor/desk/mcp/src/runtime/test-state-guard.js +107 -0
- package/vendor/desk/mcp/src/runtime/unmerged-saves.js +247 -0
- package/vendor/desk/mcp/src/runtime/workspace-claim.js +53 -0
- package/vendor/desk/mcp/src/runtime/workspace-evidence.js +96 -0
- package/vendor/desk/mcp/src/runtime/workspace-tidy.js +509 -0
- package/vendor/desk/mcp/src/search/direct-lexical.js +54 -0
- package/vendor/desk/mcp/src/search/embedder.js +108 -0
- package/vendor/desk/mcp/src/search/engine.js +406 -0
- package/vendor/desk/mcp/src/search/files-router.js +22 -0
- package/vendor/desk/mcp/src/search/old-index.js +46 -0
- package/vendor/desk/mcp/src/search/vectors.js +60 -0
- package/vendor/desk/mcp/src/server.js +389 -0
- package/vendor/desk/mcp/src/tool-names.js +73 -0
- package/vendor/desk/mcp/src/tool-refusal.cjs +35 -0
- package/vendor/desk/mcp/src/tool-schema-parts.js +12 -0
- package/vendor/desk/mcp/src/tool-schemas.js +325 -0
- package/vendor/desk/mcp/src/tools/_card-commit.js +148 -0
- package/vendor/desk/mcp/src/tools/archive-links.js +185 -0
- package/vendor/desk/mcp/src/tools/archive-move.js +18 -0
- package/vendor/desk/mcp/src/tools/archive-native-session.js +728 -0
- package/vendor/desk/mcp/src/tools/archive-state.js +513 -0
- package/vendor/desk/mcp/src/tools/delivery-gate.js +251 -0
- package/vendor/desk/mcp/src/tools/desk-save.js +444 -0
- package/vendor/desk/mcp/src/tools/doctor.js +122 -0
- package/vendor/desk/mcp/src/tools/done-evidence.js +260 -0
- package/vendor/desk/mcp/src/tools/factory-context.js +204 -0
- package/vendor/desk/mcp/src/tools/friction.js +332 -0
- package/vendor/desk/mcp/src/tools/improvement.js +156 -0
- package/vendor/desk/mcp/src/tools/lesson-lines.js +22 -0
- package/vendor/desk/mcp/src/tools/lesson-owners.js +137 -0
- package/vendor/desk/mcp/src/tools/lesson-team.js +169 -0
- package/vendor/desk/mcp/src/tools/lesson.js +254 -0
- package/vendor/desk/mcp/src/tools/local-only.js +151 -0
- package/vendor/desk/mcp/src/tools/move.js +794 -0
- package/vendor/desk/mcp/src/tools/native-stage-context.js +32 -0
- package/vendor/desk/mcp/src/tools/note.js +267 -0
- package/vendor/desk/mcp/src/tools/search.js +634 -0
- package/vendor/desk/mcp/src/tools/shared-write.js +196 -0
- package/vendor/desk/mcp/src/tools/sibling-desk.js +37 -0
- package/vendor/desk/mcp/src/tools/status.js +233 -0
- package/vendor/desk/mcp/src/tools/task-archive-due.js +9 -0
- package/vendor/desk/mcp/src/tools/task-archived-resource.js +53 -0
- package/vendor/desk/mcp/src/tools/task-body.js +141 -0
- package/vendor/desk/mcp/src/tools/task-focus.js +164 -0
- package/vendor/desk/mcp/src/tools/task-log.js +76 -0
- package/vendor/desk/mcp/src/tools/task-signoff.js +155 -0
- package/vendor/desk/mcp/src/tools/task.js +1768 -0
- package/vendor/desk/mcp/src/tools/track-row.js +89 -0
- package/vendor/desk/mcp/src/tools/track.js +240 -0
- package/vendor/desk/mcp/src/util/agency-session.cjs +29 -0
- package/vendor/desk/mcp/src/util/archive-links.js +105 -0
- package/vendor/desk/mcp/src/util/bash.js +36 -0
- package/vendor/desk/mcp/src/util/capture-record.js +73 -0
- package/vendor/desk/mcp/src/util/cas-commit.js +252 -0
- package/vendor/desk/mcp/src/util/created-dirs.js +71 -0
- package/vendor/desk/mcp/src/util/deferred-tools.js +51 -0
- package/vendor/desk/mcp/src/util/desk-owner.js +99 -0
- package/vendor/desk/mcp/src/util/env-value.js +13 -0
- package/vendor/desk/mcp/src/util/file-identity.js +40 -0
- package/vendor/desk/mcp/src/util/finish-commit.js +145 -0
- package/vendor/desk/mcp/src/util/fm.js +410 -0
- package/vendor/desk/mcp/src/util/git-config-file.js +85 -0
- package/vendor/desk/mcp/src/util/git-stage.js +440 -0
- package/vendor/desk/mcp/src/util/main-publish.js +240 -0
- package/vendor/desk/mcp/src/util/markdown-links.cjs +555 -0
- package/vendor/desk/mcp/src/util/object-input.js +59 -0
- package/vendor/desk/mcp/src/util/paths.js +647 -0
- package/vendor/desk/mcp/src/util/rank.js +189 -0
- package/vendor/desk/mcp/src/util/redact.js +92 -0
- package/vendor/desk/mcp/src/util/remove-retry.js +35 -0
- package/vendor/desk/mcp/src/util/rename-retry.js +73 -0
- package/vendor/desk/mcp/src/util/route-around.js +265 -0
- package/vendor/desk/mcp/src/util/shell-quote.js +18 -0
- package/vendor/desk/mcp/src/util/startup-direction.js +124 -0
- package/vendor/desk/mcp/src/util/state-ignore.js +33 -0
- package/vendor/desk/mcp/src/util/tool-commits.js +64 -0
- package/vendor/desk/mcp/src/util/unicode-16/LICENSE-MIT.txt +7 -0
- package/vendor/desk/mcp/src/util/unicode-16/README.md +9 -0
- package/vendor/desk/mcp/src/util/unicode-16/letter.cjs +1 -0
- package/vendor/desk/mcp/src/util/unicode-16/mark.cjs +1 -0
- package/vendor/desk/mcp/src/util/unicode-16/number.cjs +1 -0
- package/vendor/desk/mcp/web-auth.cjs +1897 -0
- package/vendor/desk/mcp/web-browser-discovery.cjs +53 -0
- package/vendor/desk/mcp/web-catalog.json +34 -0
- package/vendor/desk/mcp/web-launch.cjs +101 -0
- package/vendor/desk/mcp/web.cjs +1239 -0
- package/vendor/desk/migrations/01-move-to-ourostack-desk.md +188 -0
- package/vendor/desk/migrations/02-tidy-desk.md +87 -0
- package/vendor/desk/migrations/03-desk-release-channel.md +38 -0
- package/vendor/desk/optional/session-label/consumer.mjs +237 -0
- package/vendor/desk/optional/session-label/extension.mjs +32 -0
- package/vendor/desk/plugin.json +54 -0
- package/vendor/desk/settings.json +3 -0
- package/vendor/desk/skills/add-workspace-mcp/SKILL.md +180 -0
- package/vendor/desk/skills/adopt-inflight-work/SKILL.md +212 -0
- package/vendor/desk/skills/archive-workflow/SKILL.md +132 -0
- package/vendor/desk/skills/content-routing/SKILL.md +95 -0
- package/vendor/desk/skills/core-meeting-capture/SKILL.md +47 -0
- package/vendor/desk/skills/core-meeting-capture/references/capture-contract.md +175 -0
- package/vendor/desk/skills/curator/SKILL.md +103 -0
- package/vendor/desk/skills/delightful-decks/SKILL.md +67 -0
- package/vendor/desk/skills/desk-problem/SKILL.md +87 -0
- package/vendor/desk/skills/directory-structure/SKILL.md +169 -0
- package/vendor/desk/skills/doc-review-rigor/SKILL.md +63 -0
- package/vendor/desk/skills/draining-issues/SKILL.md +62 -0
- package/vendor/desk/skills/evaluate-release/SKILL.md +96 -0
- package/vendor/desk/skills/evidence-discipline/SKILL.md +150 -0
- package/vendor/desk/skills/factory-evaluator/SKILL.md +122 -0
- package/vendor/desk/skills/factory-task-context/SKILL.md +116 -0
- package/vendor/desk/skills/factory-work/SKILL.md +16 -0
- package/vendor/desk/skills/fast-honest-ci/SKILL.md +70 -0
- package/vendor/desk/skills/fast-honest-ci/examples.md +49 -0
- package/vendor/desk/skills/first-run-bootstrap/SKILL.md +95 -0
- package/vendor/desk/skills/friction-management/SKILL.md +98 -0
- package/vendor/desk/skills/git-hygiene/SKILL.md +253 -0
- package/vendor/desk/skills/independent-review/SKILL.md +34 -0
- package/vendor/desk/skills/interaction-style/SKILL.md +239 -0
- package/vendor/desk/skills/lesson-capture/SKILL.md +85 -0
- package/vendor/desk/skills/lesson-capture/agents-md-budget.mjs +61 -0
- package/vendor/desk/skills/online-evaluation/SKILL.md +81 -0
- package/vendor/desk/skills/operator-voice-comments/LICENSE-humanize +21 -0
- package/vendor/desk/skills/operator-voice-comments/SKILL.md +90 -0
- package/vendor/desk/skills/operator-voice-comments/human-voice.md +43 -0
- package/vendor/desk/skills/peer-pr-review/SKILL.md +104 -0
- package/vendor/desk/skills/pr-feedback-on-own-pr/SKILL.md +145 -0
- package/vendor/desk/skills/pr-review-interrogation/SKILL.md +121 -0
- package/vendor/desk/skills/pr-reviewer-audit/SKILL.md +68 -0
- package/vendor/desk/skills/pr-reviewer-audit/helpers/audit.py +335 -0
- package/vendor/desk/skills/pr-reviewer-audit/helpers/test_audit.py +486 -0
- package/vendor/desk/skills/pr-self-review/SKILL.md +86 -0
- package/vendor/desk/skills/pr-surface-hygiene/SKILL.md +105 -0
- package/vendor/desk/skills/pr-surface-hygiene/check-visual-proof.cjs +99 -0
- package/vendor/desk/skills/pr-surface-hygiene/repository-setup.md +19 -0
- package/vendor/desk/skills/pr-surface-hygiene/resources/pr-visual-proof.yml +29 -0
- package/vendor/desk/skills/pr-surface-hygiene/resources/pull-request-template.md +5 -0
- package/vendor/desk/skills/preflight-actions/SKILL.md +60 -0
- package/vendor/desk/skills/preview-feedback/SKILL.md +70 -0
- package/vendor/desk/skills/repo-handling/SKILL.md +67 -0
- package/vendor/desk/skills/rnd-lab/SKILL.md +52 -0
- package/vendor/desk/skills/runtime-symptom-investigation/SKILL.md +106 -0
- package/vendor/desk/skills/session-resumption/SKILL.md +126 -0
- package/vendor/desk/skills/session-start/SKILL.md +54 -0
- package/vendor/desk/skills/session-start/details.md +150 -0
- package/vendor/desk/skills/session-start-migrations/README.md +71 -0
- package/vendor/desk/skills/session-start-migrations/SKILL.md +108 -0
- package/vendor/desk/skills/start-task/SKILL.md +88 -0
- package/vendor/desk/skills/task-card-format/SKILL.md +198 -0
- package/vendor/desk/skills/task-lifecycle/SKILL.md +217 -0
- package/vendor/desk/skills/track-card-format/SKILL.md +90 -0
- package/vendor/desk/skills/using-desk/SKILL.md +58 -0
- package/vendor/desk/skills/using-superpowers-with-desk/SKILL.md +156 -0
- package/vendor/desk/skills/work-orchestration/SKILL.md +162 -0
|
@@ -0,0 +1,649 @@
|
|
|
1
|
+
// Generated by ouro-actions 1.12.0 from the "desk" action set. Don't edit; run generate.
|
|
2
|
+
//
|
|
3
|
+
// Each action has an Input and an Output, a handler the app sets once at launch (`<Action>Action.perform`), and a
|
|
4
|
+
// SwiftUI button. An agent door gets an App Intent whose perform() calls the same handler, and the button is
|
|
5
|
+
// Button(_:intent:), so a press, Siri, Shortcuts and Reins all take one path. A person-only action gets no App
|
|
6
|
+
// Intent, so no agent can reach it, and OuroActions.refusal(for:) answers a bridge that asks for it.
|
|
7
|
+
import AppIntents
|
|
8
|
+
import SwiftUI
|
|
9
|
+
|
|
10
|
+
public enum OuroActionConsent: String, Sendable {
|
|
11
|
+
case read, write, consequential, personOnly = "person-only"
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/// The typed refusal of a person-only action: the error fields of web's refused outcome (code, exit, thing,
|
|
15
|
+
/// problem, message), plus the declaration's reason and how the person does it.
|
|
16
|
+
public struct OuroActionRefusal: Error, Sendable, Equatable {
|
|
17
|
+
public let code = "person-only"
|
|
18
|
+
public let exit = 2
|
|
19
|
+
public let thing: String
|
|
20
|
+
public let problem: String
|
|
21
|
+
public let message: String
|
|
22
|
+
public let reason: String
|
|
23
|
+
public let how: String
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/// An action ran before the app set its handler.
|
|
27
|
+
public struct OuroActionNotBound: Error, Sendable, Equatable {
|
|
28
|
+
public let action: String
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/// The "desk" action set.
|
|
32
|
+
public enum OuroActions {
|
|
33
|
+
public static let consent: [String: OuroActionConsent] = [
|
|
34
|
+
"desk_search": .read,
|
|
35
|
+
"desk_recall": .read,
|
|
36
|
+
"desk_skill": .read,
|
|
37
|
+
"desk_status": .write,
|
|
38
|
+
"desk_doctor": .write,
|
|
39
|
+
"improvement_next": .write,
|
|
40
|
+
]
|
|
41
|
+
|
|
42
|
+
/// The refusal for a person-only action, by its id, kebab or camel name; nil for any other action.
|
|
43
|
+
public static func refusal(for action: String) -> OuroActionRefusal? {
|
|
44
|
+
switch action {
|
|
45
|
+
default:
|
|
46
|
+
return nil
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// MARK: desk_search (read)
|
|
52
|
+
|
|
53
|
+
public enum DeskSearchScopeValue: String, Codable, Sendable, Hashable, CaseIterable, AppEnum {
|
|
54
|
+
case active = "active"
|
|
55
|
+
case archived = "archived"
|
|
56
|
+
case all = "all"
|
|
57
|
+
public static let typeDisplayRepresentation: TypeDisplayRepresentation = "Scope"
|
|
58
|
+
public static let caseDisplayRepresentations: [DeskSearchScopeValue: DisplayRepresentation] = [
|
|
59
|
+
.active: "active",
|
|
60
|
+
.archived: "archived",
|
|
61
|
+
.all: "all",
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
public struct DeskSearchInput: Codable, Sendable, Hashable {
|
|
66
|
+
public var query: String?
|
|
67
|
+
public var newest: Bool?
|
|
68
|
+
public var limit: Int?
|
|
69
|
+
public var scope: DeskSearchScopeValue?
|
|
70
|
+
public init(query: String? = nil, newest: Bool? = nil, limit: Int? = nil, scope: DeskSearchScopeValue? = nil) {
|
|
71
|
+
self.query = query
|
|
72
|
+
self.newest = newest
|
|
73
|
+
self.limit = limit
|
|
74
|
+
self.scope = scope
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
public struct DeskSearchOutput: Codable, Sendable, Hashable {
|
|
79
|
+
public init() {
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/// Search the desk: Find documents on the desk by their exact words.
|
|
84
|
+
@MainActor
|
|
85
|
+
public enum DeskSearchAction {
|
|
86
|
+
public static let id = "desk_search"
|
|
87
|
+
/// The app's handler; every door calls it.
|
|
88
|
+
public static var perform: (@MainActor @Sendable (DeskSearchInput) async throws -> DeskSearchOutput)?
|
|
89
|
+
/// What Siri and Shortcuts say when the App Intent finishes or fails: the result in words, or an error turned into
|
|
90
|
+
/// words (rethrow to let the system show it). Unset, the intent says "Done." and a failure throws.
|
|
91
|
+
public static var dialog: (@MainActor @Sendable (DeskSearchInput, Result<DeskSearchOutput, any Error>) async throws -> IntentDialog)?
|
|
92
|
+
|
|
93
|
+
public static func run(_ input: DeskSearchInput) async throws -> DeskSearchOutput {
|
|
94
|
+
guard let perform else { throw OuroActionNotBound(action: id) }
|
|
95
|
+
return try await perform(input)
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
public struct DeskSearchIntent: AppIntent {
|
|
100
|
+
public static let title: LocalizedStringResource = "Search the desk"
|
|
101
|
+
public static let description = IntentDescription("Find documents on the desk by their exact words.")
|
|
102
|
+
|
|
103
|
+
@Parameter(title: "Query", description: "The search query. Omit it to list documents by update time.")
|
|
104
|
+
public var query: String?
|
|
105
|
+
@Parameter(title: "Newest first", description: "Pass true to order by update time, newest first, instead of by match.")
|
|
106
|
+
public var newest: Bool?
|
|
107
|
+
@Parameter(title: "Limit", description: "Maximum number of results.")
|
|
108
|
+
public var limit: Int?
|
|
109
|
+
@Parameter(title: "Scope", description: "Which documents to search: live work, archived work, or both.")
|
|
110
|
+
public var scope: DeskSearchScopeValue?
|
|
111
|
+
|
|
112
|
+
public init() {}
|
|
113
|
+
|
|
114
|
+
public init(_ input: DeskSearchInput) {
|
|
115
|
+
self.init()
|
|
116
|
+
self.query = input.query
|
|
117
|
+
self.newest = input.newest
|
|
118
|
+
self.limit = input.limit
|
|
119
|
+
self.scope = input.scope
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
public var input: DeskSearchInput {
|
|
123
|
+
DeskSearchInput(query: query, newest: newest, limit: limit, scope: scope)
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@MainActor
|
|
127
|
+
public func perform() async throws -> some IntentResult & ProvidesDialog {
|
|
128
|
+
let input = self.input
|
|
129
|
+
let result: Result<DeskSearchOutput, any Error>
|
|
130
|
+
do { result = .success(try await DeskSearchAction.run(input)) } catch { result = .failure(error) }
|
|
131
|
+
if let dialog = DeskSearchAction.dialog { return .result(dialog: try await dialog(input, result)) }
|
|
132
|
+
_ = try result.get()
|
|
133
|
+
return .result(dialog: "Done.")
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/// The control for desk_search: Button(_:intent:), the same intent Siri and Shortcuts run.
|
|
138
|
+
@available(iOS 17.0, macOS 14.0, watchOS 10.0, tvOS 17.0, *)
|
|
139
|
+
public struct DeskSearchButton<Label: View>: View {
|
|
140
|
+
public let input: DeskSearchInput
|
|
141
|
+
let label: Label
|
|
142
|
+
|
|
143
|
+
public init(_ input: DeskSearchInput, @ViewBuilder label: () -> Label) {
|
|
144
|
+
self.input = input
|
|
145
|
+
self.label = label()
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
public var body: some View {
|
|
149
|
+
Button(intent: DeskSearchIntent(input)) { label }
|
|
150
|
+
.accessibilityHint(Text(verbatim: "Find documents on the desk by their exact words."))
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
@available(iOS 17.0, macOS 14.0, watchOS 10.0, tvOS 17.0, *)
|
|
155
|
+
extension DeskSearchButton where Label == Text {
|
|
156
|
+
public init(_ input: DeskSearchInput) {
|
|
157
|
+
self.init(input) { Text(verbatim: "Search the desk") }
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// MARK: desk_recall (read)
|
|
162
|
+
|
|
163
|
+
public enum DeskRecallScopeValue: String, Codable, Sendable, Hashable, CaseIterable, AppEnum {
|
|
164
|
+
case active = "active"
|
|
165
|
+
case archived = "archived"
|
|
166
|
+
case all = "all"
|
|
167
|
+
public static let typeDisplayRepresentation: TypeDisplayRepresentation = "Scope"
|
|
168
|
+
public static let caseDisplayRepresentations: [DeskRecallScopeValue: DisplayRepresentation] = [
|
|
169
|
+
.active: "active",
|
|
170
|
+
.archived: "archived",
|
|
171
|
+
.all: "all",
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
public struct DeskRecallInput: Codable, Sendable, Hashable {
|
|
176
|
+
public var topic: String
|
|
177
|
+
public var limit: Int?
|
|
178
|
+
public var scope: DeskRecallScopeValue?
|
|
179
|
+
public init(topic: String, limit: Int? = nil, scope: DeskRecallScopeValue? = nil) {
|
|
180
|
+
self.topic = topic
|
|
181
|
+
self.limit = limit
|
|
182
|
+
self.scope = scope
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
public struct DeskRecallOutput: Codable, Sendable, Hashable {
|
|
187
|
+
public init() {
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/// Recall: Recall what the desk says about a topic.
|
|
192
|
+
@MainActor
|
|
193
|
+
public enum DeskRecallAction {
|
|
194
|
+
public static let id = "desk_recall"
|
|
195
|
+
/// The app's handler; every door calls it.
|
|
196
|
+
public static var perform: (@MainActor @Sendable (DeskRecallInput) async throws -> DeskRecallOutput)?
|
|
197
|
+
/// What Siri and Shortcuts say when the App Intent finishes or fails: the result in words, or an error turned into
|
|
198
|
+
/// words (rethrow to let the system show it). Unset, the intent says "Done." and a failure throws.
|
|
199
|
+
public static var dialog: (@MainActor @Sendable (DeskRecallInput, Result<DeskRecallOutput, any Error>) async throws -> IntentDialog)?
|
|
200
|
+
|
|
201
|
+
public static func run(_ input: DeskRecallInput) async throws -> DeskRecallOutput {
|
|
202
|
+
guard let perform else { throw OuroActionNotBound(action: id) }
|
|
203
|
+
return try await perform(input)
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
public struct DeskRecallIntent: AppIntent {
|
|
208
|
+
public static let title: LocalizedStringResource = "Recall"
|
|
209
|
+
public static let description = IntentDescription("Recall what the desk says about a topic.")
|
|
210
|
+
|
|
211
|
+
@Parameter(title: "Topic", description: "What to recall.")
|
|
212
|
+
public var topic: String
|
|
213
|
+
@Parameter(title: "Limit", description: "Maximum number of results.")
|
|
214
|
+
public var limit: Int?
|
|
215
|
+
@Parameter(title: "Scope", description: "Which documents to search: live work, archived work, or both.")
|
|
216
|
+
public var scope: DeskRecallScopeValue?
|
|
217
|
+
|
|
218
|
+
public init() {}
|
|
219
|
+
|
|
220
|
+
public init(_ input: DeskRecallInput) {
|
|
221
|
+
self.init()
|
|
222
|
+
self.topic = input.topic
|
|
223
|
+
self.limit = input.limit
|
|
224
|
+
self.scope = input.scope
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
public var input: DeskRecallInput {
|
|
228
|
+
DeskRecallInput(topic: topic, limit: limit, scope: scope)
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
@MainActor
|
|
232
|
+
public func perform() async throws -> some IntentResult & ProvidesDialog {
|
|
233
|
+
let input = self.input
|
|
234
|
+
let result: Result<DeskRecallOutput, any Error>
|
|
235
|
+
do { result = .success(try await DeskRecallAction.run(input)) } catch { result = .failure(error) }
|
|
236
|
+
if let dialog = DeskRecallAction.dialog { return .result(dialog: try await dialog(input, result)) }
|
|
237
|
+
_ = try result.get()
|
|
238
|
+
return .result(dialog: "Done.")
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/// The control for desk_recall: Button(_:intent:), the same intent Siri and Shortcuts run.
|
|
243
|
+
@available(iOS 17.0, macOS 14.0, watchOS 10.0, tvOS 17.0, *)
|
|
244
|
+
public struct DeskRecallButton<Label: View>: View {
|
|
245
|
+
public let input: DeskRecallInput
|
|
246
|
+
let label: Label
|
|
247
|
+
|
|
248
|
+
public init(_ input: DeskRecallInput, @ViewBuilder label: () -> Label) {
|
|
249
|
+
self.input = input
|
|
250
|
+
self.label = label()
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
public var body: some View {
|
|
254
|
+
Button(intent: DeskRecallIntent(input)) { label }
|
|
255
|
+
.accessibilityHint(Text(verbatim: "Recall what the desk says about a topic."))
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
@available(iOS 17.0, macOS 14.0, watchOS 10.0, tvOS 17.0, *)
|
|
260
|
+
extension DeskRecallButton where Label == Text {
|
|
261
|
+
public init(_ input: DeskRecallInput) {
|
|
262
|
+
self.init(input) { Text(verbatim: "Recall") }
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// MARK: desk_skill (read)
|
|
267
|
+
|
|
268
|
+
public struct DeskSkillInput: Codable, Sendable, Hashable {
|
|
269
|
+
public var name: String?
|
|
270
|
+
public init(name: String? = nil) {
|
|
271
|
+
self.name = name
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
public struct DeskSkillOutput: Codable, Sendable, Hashable {
|
|
276
|
+
public init() {
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/// Read a skill: Read one of Desk's skills, or list them.
|
|
281
|
+
@MainActor
|
|
282
|
+
public enum DeskSkillAction {
|
|
283
|
+
public static let id = "desk_skill"
|
|
284
|
+
/// The app's handler; every door calls it.
|
|
285
|
+
public static var perform: (@MainActor @Sendable (DeskSkillInput) async throws -> DeskSkillOutput)?
|
|
286
|
+
/// What Siri and Shortcuts say when the App Intent finishes or fails: the result in words, or an error turned into
|
|
287
|
+
/// words (rethrow to let the system show it). Unset, the intent says "Done." and a failure throws.
|
|
288
|
+
public static var dialog: (@MainActor @Sendable (DeskSkillInput, Result<DeskSkillOutput, any Error>) async throws -> IntentDialog)?
|
|
289
|
+
|
|
290
|
+
public static func run(_ input: DeskSkillInput) async throws -> DeskSkillOutput {
|
|
291
|
+
guard let perform else { throw OuroActionNotBound(action: id) }
|
|
292
|
+
return try await perform(input)
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
public struct DeskSkillIntent: AppIntent {
|
|
297
|
+
public static let title: LocalizedStringResource = "Read a skill"
|
|
298
|
+
public static let description = IntentDescription("Read one of Desk's skills, or list them.")
|
|
299
|
+
|
|
300
|
+
@Parameter(title: "Skill", description: "The skill to read, such as task-lifecycle; omit it to list every skill.")
|
|
301
|
+
public var name: String?
|
|
302
|
+
|
|
303
|
+
public init() {}
|
|
304
|
+
|
|
305
|
+
public init(_ input: DeskSkillInput) {
|
|
306
|
+
self.init()
|
|
307
|
+
self.name = input.name
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
public var input: DeskSkillInput {
|
|
311
|
+
DeskSkillInput(name: name)
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
@MainActor
|
|
315
|
+
public func perform() async throws -> some IntentResult & ProvidesDialog {
|
|
316
|
+
let input = self.input
|
|
317
|
+
let result: Result<DeskSkillOutput, any Error>
|
|
318
|
+
do { result = .success(try await DeskSkillAction.run(input)) } catch { result = .failure(error) }
|
|
319
|
+
if let dialog = DeskSkillAction.dialog { return .result(dialog: try await dialog(input, result)) }
|
|
320
|
+
_ = try result.get()
|
|
321
|
+
return .result(dialog: "Done.")
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/// The control for desk_skill: Button(_:intent:), the same intent Siri and Shortcuts run.
|
|
326
|
+
@available(iOS 17.0, macOS 14.0, watchOS 10.0, tvOS 17.0, *)
|
|
327
|
+
public struct DeskSkillButton<Label: View>: View {
|
|
328
|
+
public let input: DeskSkillInput
|
|
329
|
+
let label: Label
|
|
330
|
+
|
|
331
|
+
public init(_ input: DeskSkillInput, @ViewBuilder label: () -> Label) {
|
|
332
|
+
self.input = input
|
|
333
|
+
self.label = label()
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
public var body: some View {
|
|
337
|
+
Button(intent: DeskSkillIntent(input)) { label }
|
|
338
|
+
.accessibilityHint(Text(verbatim: "Read one of Desk's skills, or list them."))
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
@available(iOS 17.0, macOS 14.0, watchOS 10.0, tvOS 17.0, *)
|
|
343
|
+
extension DeskSkillButton where Label == Text {
|
|
344
|
+
public init(_ input: DeskSkillInput) {
|
|
345
|
+
self.init(input) { Text(verbatim: "Read a skill") }
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
// MARK: desk_status (write)
|
|
350
|
+
|
|
351
|
+
public struct DeskStatusInput: Codable, Sendable, Hashable {
|
|
352
|
+
public var detail: Bool?
|
|
353
|
+
public var desk: String?
|
|
354
|
+
public var hasInstructions: Bool?
|
|
355
|
+
public init(detail: Bool? = nil, desk: String? = nil, hasInstructions: Bool? = nil) {
|
|
356
|
+
self.detail = detail
|
|
357
|
+
self.desk = desk
|
|
358
|
+
self.hasInstructions = hasInstructions
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
public struct DeskStatusOutput: Codable, Sendable, Hashable {
|
|
363
|
+
public init() {
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/// Desk status: Check that Desk is ready for this session.
|
|
368
|
+
@MainActor
|
|
369
|
+
public enum DeskStatusAction {
|
|
370
|
+
public static let id = "desk_status"
|
|
371
|
+
/// The app's handler; every door calls it.
|
|
372
|
+
public static var perform: (@MainActor @Sendable (DeskStatusInput) async throws -> DeskStatusOutput)?
|
|
373
|
+
/// What Siri and Shortcuts say when the App Intent finishes or fails: the result in words, or an error turned into
|
|
374
|
+
/// words (rethrow to let the system show it). Unset, the intent says "Done." and a failure throws.
|
|
375
|
+
public static var dialog: (@MainActor @Sendable (DeskStatusInput, Result<DeskStatusOutput, any Error>) async throws -> IntentDialog)?
|
|
376
|
+
|
|
377
|
+
public static func run(_ input: DeskStatusInput) async throws -> DeskStatusOutput {
|
|
378
|
+
guard let perform else { throw OuroActionNotBound(action: id) }
|
|
379
|
+
return try await perform(input)
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
public struct DeskStatusIntent: AppIntent {
|
|
384
|
+
public static let title: LocalizedStringResource = "Desk status"
|
|
385
|
+
public static let description = IntentDescription("Check that Desk is ready for this session.")
|
|
386
|
+
|
|
387
|
+
@Parameter(title: "Full payload", description: "Pass true for the full payload (tens of KB). Omit it for the compact answer.")
|
|
388
|
+
public var detail: Bool?
|
|
389
|
+
@Parameter(title: "Other desk", description: "Name, repo or owner of another desk on this machine (for example personal): the answer's `machine_desk` has its local path, or says what to do when it is not here. Never clone a registered desk.")
|
|
390
|
+
public var desk: String?
|
|
391
|
+
@Parameter(title: "Has instructions", description: "Hosted Desk only: pass true when an earlier desk_status answer in this conversation already gave you Desk's instructions.")
|
|
392
|
+
public var hasInstructions: Bool?
|
|
393
|
+
|
|
394
|
+
public init() {}
|
|
395
|
+
|
|
396
|
+
public init(_ input: DeskStatusInput) {
|
|
397
|
+
self.init()
|
|
398
|
+
self.detail = input.detail
|
|
399
|
+
self.desk = input.desk
|
|
400
|
+
self.hasInstructions = input.hasInstructions
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
public var input: DeskStatusInput {
|
|
404
|
+
DeskStatusInput(detail: detail, desk: desk, hasInstructions: hasInstructions)
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
@MainActor
|
|
408
|
+
public func perform() async throws -> some IntentResult & ProvidesDialog {
|
|
409
|
+
let input = self.input
|
|
410
|
+
let result: Result<DeskStatusOutput, any Error>
|
|
411
|
+
do { result = .success(try await DeskStatusAction.run(input)) } catch { result = .failure(error) }
|
|
412
|
+
if let dialog = DeskStatusAction.dialog { return .result(dialog: try await dialog(input, result)) }
|
|
413
|
+
_ = try result.get()
|
|
414
|
+
return .result(dialog: "Done.")
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
/// The control for desk_status: Button(_:intent:), the same intent Siri and Shortcuts run.
|
|
419
|
+
@available(iOS 17.0, macOS 14.0, watchOS 10.0, tvOS 17.0, *)
|
|
420
|
+
public struct DeskStatusButton<Label: View>: View {
|
|
421
|
+
public let input: DeskStatusInput
|
|
422
|
+
let label: Label
|
|
423
|
+
|
|
424
|
+
public init(_ input: DeskStatusInput, @ViewBuilder label: () -> Label) {
|
|
425
|
+
self.input = input
|
|
426
|
+
self.label = label()
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
public var body: some View {
|
|
430
|
+
Button(intent: DeskStatusIntent(input)) { label }
|
|
431
|
+
.accessibilityHint(Text(verbatim: "Check that Desk is ready for this session."))
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
@available(iOS 17.0, macOS 14.0, watchOS 10.0, tvOS 17.0, *)
|
|
436
|
+
extension DeskStatusButton where Label == Text {
|
|
437
|
+
public init(_ input: DeskStatusInput) {
|
|
438
|
+
self.init(input) { Text(verbatim: "Desk status") }
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
// MARK: desk_doctor (write)
|
|
443
|
+
|
|
444
|
+
public enum DeskDoctorFormatValue: String, Codable, Sendable, Hashable, CaseIterable, AppEnum {
|
|
445
|
+
case full = "full"
|
|
446
|
+
case preview = "preview"
|
|
447
|
+
public static let typeDisplayRepresentation: TypeDisplayRepresentation = "Format"
|
|
448
|
+
public static let caseDisplayRepresentations: [DeskDoctorFormatValue: DisplayRepresentation] = [
|
|
449
|
+
.full: "full",
|
|
450
|
+
.preview: "preview",
|
|
451
|
+
]
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
public enum DeskDoctorRepairValue: String, Codable, Sendable, Hashable, CaseIterable, AppEnum {
|
|
455
|
+
case switchStateBranch = "switch_state_branch"
|
|
456
|
+
public static let typeDisplayRepresentation: TypeDisplayRepresentation = "Repair"
|
|
457
|
+
public static let caseDisplayRepresentations: [DeskDoctorRepairValue: DisplayRepresentation] = [
|
|
458
|
+
.switchStateBranch: "switch_state_branch",
|
|
459
|
+
]
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
public enum DeskDoctorFactoryConsentValue: String, Codable, Sendable, Hashable, CaseIterable, AppEnum {
|
|
463
|
+
case yes = "yes"
|
|
464
|
+
case no = "no"
|
|
465
|
+
public static let typeDisplayRepresentation: TypeDisplayRepresentation = "Factory consent"
|
|
466
|
+
public static let caseDisplayRepresentations: [DeskDoctorFactoryConsentValue: DisplayRepresentation] = [
|
|
467
|
+
.yes: "yes",
|
|
468
|
+
.no: "no",
|
|
469
|
+
]
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
public struct DeskDoctorInput: Codable, Sendable, Hashable {
|
|
473
|
+
public var format: DeskDoctorFormatValue?
|
|
474
|
+
public var repair: DeskDoctorRepairValue?
|
|
475
|
+
public var reindex: Bool?
|
|
476
|
+
public var factoryConsent: DeskDoctorFactoryConsentValue?
|
|
477
|
+
public init(format: DeskDoctorFormatValue? = nil, repair: DeskDoctorRepairValue? = nil, reindex: Bool? = nil, factoryConsent: DeskDoctorFactoryConsentValue? = nil) {
|
|
478
|
+
self.format = format
|
|
479
|
+
self.repair = repair
|
|
480
|
+
self.reindex = reindex
|
|
481
|
+
self.factoryConsent = factoryConsent
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
public struct DeskDoctorOutput: Codable, Sendable, Hashable {
|
|
486
|
+
public init() {
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/// Desk doctor: Check Desk's runtime, and repair or reindex it when asked.
|
|
491
|
+
@MainActor
|
|
492
|
+
public enum DeskDoctorAction {
|
|
493
|
+
public static let id = "desk_doctor"
|
|
494
|
+
/// The app's handler; every door calls it.
|
|
495
|
+
public static var perform: (@MainActor @Sendable (DeskDoctorInput) async throws -> DeskDoctorOutput)?
|
|
496
|
+
/// What Siri and Shortcuts say when the App Intent finishes or fails: the result in words, or an error turned into
|
|
497
|
+
/// words (rethrow to let the system show it). Unset, the intent says "Done." and a failure throws.
|
|
498
|
+
public static var dialog: (@MainActor @Sendable (DeskDoctorInput, Result<DeskDoctorOutput, any Error>) async throws -> IntentDialog)?
|
|
499
|
+
|
|
500
|
+
public static func run(_ input: DeskDoctorInput) async throws -> DeskDoctorOutput {
|
|
501
|
+
guard let perform else { throw OuroActionNotBound(action: id) }
|
|
502
|
+
return try await perform(input)
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
public struct DeskDoctorIntent: AppIntent {
|
|
507
|
+
public static let title: LocalizedStringResource = "Desk doctor"
|
|
508
|
+
public static let description = IntentDescription("Check Desk's runtime, and repair or reindex it when asked.")
|
|
509
|
+
|
|
510
|
+
@Parameter(title: "Format", description: "preview returns only the local package/process snapshot.")
|
|
511
|
+
public var format: DeskDoctorFormatValue?
|
|
512
|
+
@Parameter(title: "Repair", description: "A named repair to run.")
|
|
513
|
+
public var repair: DeskDoctorRepairValue?
|
|
514
|
+
@Parameter(title: "Reindex", description: "Pass true to re-read the desk into this session's search engine and wait until exact-word search is current.")
|
|
515
|
+
public var reindex: Bool?
|
|
516
|
+
@Parameter(title: "Factory consent", description: "The operator's answer to the factory contribution question; Desk resolves the store and, for yes, the GitHub account.")
|
|
517
|
+
public var factoryConsent: DeskDoctorFactoryConsentValue?
|
|
518
|
+
|
|
519
|
+
public init() {}
|
|
520
|
+
|
|
521
|
+
public init(_ input: DeskDoctorInput) {
|
|
522
|
+
self.init()
|
|
523
|
+
self.format = input.format
|
|
524
|
+
self.repair = input.repair
|
|
525
|
+
self.reindex = input.reindex
|
|
526
|
+
self.factoryConsent = input.factoryConsent
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
public var input: DeskDoctorInput {
|
|
530
|
+
DeskDoctorInput(format: format, repair: repair, reindex: reindex, factoryConsent: factoryConsent)
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
@MainActor
|
|
534
|
+
public func perform() async throws -> some IntentResult & ProvidesDialog {
|
|
535
|
+
let input = self.input
|
|
536
|
+
let result: Result<DeskDoctorOutput, any Error>
|
|
537
|
+
do { result = .success(try await DeskDoctorAction.run(input)) } catch { result = .failure(error) }
|
|
538
|
+
if let dialog = DeskDoctorAction.dialog { return .result(dialog: try await dialog(input, result)) }
|
|
539
|
+
_ = try result.get()
|
|
540
|
+
return .result(dialog: "Done.")
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
/// The control for desk_doctor: Button(_:intent:), the same intent Siri and Shortcuts run.
|
|
545
|
+
@available(iOS 17.0, macOS 14.0, watchOS 10.0, tvOS 17.0, *)
|
|
546
|
+
public struct DeskDoctorButton<Label: View>: View {
|
|
547
|
+
public let input: DeskDoctorInput
|
|
548
|
+
let label: Label
|
|
549
|
+
|
|
550
|
+
public init(_ input: DeskDoctorInput, @ViewBuilder label: () -> Label) {
|
|
551
|
+
self.input = input
|
|
552
|
+
self.label = label()
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
public var body: some View {
|
|
556
|
+
Button(intent: DeskDoctorIntent(input)) { label }
|
|
557
|
+
.accessibilityHint(Text(verbatim: "Check Desk's runtime, and repair or reindex it when asked."))
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
@available(iOS 17.0, macOS 14.0, watchOS 10.0, tvOS 17.0, *)
|
|
562
|
+
extension DeskDoctorButton where Label == Text {
|
|
563
|
+
public init(_ input: DeskDoctorInput) {
|
|
564
|
+
self.init(input) { Text(verbatim: "Desk doctor") }
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
// MARK: improvement_next (write)
|
|
569
|
+
|
|
570
|
+
public struct ImprovementNextInput: Codable, Sendable, Hashable {
|
|
571
|
+
public var session: String?
|
|
572
|
+
public init(session: String? = nil) {
|
|
573
|
+
self.session = session
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
public struct ImprovementNextOutput: Codable, Sendable, Hashable {
|
|
578
|
+
public init() {
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
/// Next improvement: Take the next improvement card to work on.
|
|
583
|
+
@MainActor
|
|
584
|
+
public enum ImprovementNextAction {
|
|
585
|
+
public static let id = "improvement_next"
|
|
586
|
+
/// The app's handler; every door calls it.
|
|
587
|
+
public static var perform: (@MainActor @Sendable (ImprovementNextInput) async throws -> ImprovementNextOutput)?
|
|
588
|
+
/// What Siri and Shortcuts say when the App Intent finishes or fails: the result in words, or an error turned into
|
|
589
|
+
/// words (rethrow to let the system show it). Unset, the intent says "Done." and a failure throws.
|
|
590
|
+
public static var dialog: (@MainActor @Sendable (ImprovementNextInput, Result<ImprovementNextOutput, any Error>) async throws -> IntentDialog)?
|
|
591
|
+
|
|
592
|
+
public static func run(_ input: ImprovementNextInput) async throws -> ImprovementNextOutput {
|
|
593
|
+
guard let perform else { throw OuroActionNotBound(action: id) }
|
|
594
|
+
return try await perform(input)
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
public struct ImprovementNextIntent: AppIntent {
|
|
599
|
+
public static let title: LocalizedStringResource = "Next improvement"
|
|
600
|
+
public static let description = IntentDescription("Take the next improvement card to work on.")
|
|
601
|
+
|
|
602
|
+
@Parameter(title: "Session", description: "The session's UUID, when known.")
|
|
603
|
+
public var session: String?
|
|
604
|
+
|
|
605
|
+
public init() {}
|
|
606
|
+
|
|
607
|
+
public init(_ input: ImprovementNextInput) {
|
|
608
|
+
self.init()
|
|
609
|
+
self.session = input.session
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
public var input: ImprovementNextInput {
|
|
613
|
+
ImprovementNextInput(session: session)
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
@MainActor
|
|
617
|
+
public func perform() async throws -> some IntentResult & ProvidesDialog {
|
|
618
|
+
let input = self.input
|
|
619
|
+
let result: Result<ImprovementNextOutput, any Error>
|
|
620
|
+
do { result = .success(try await ImprovementNextAction.run(input)) } catch { result = .failure(error) }
|
|
621
|
+
if let dialog = ImprovementNextAction.dialog { return .result(dialog: try await dialog(input, result)) }
|
|
622
|
+
_ = try result.get()
|
|
623
|
+
return .result(dialog: "Done.")
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
/// The control for improvement_next: Button(_:intent:), the same intent Siri and Shortcuts run.
|
|
628
|
+
@available(iOS 17.0, macOS 14.0, watchOS 10.0, tvOS 17.0, *)
|
|
629
|
+
public struct ImprovementNextButton<Label: View>: View {
|
|
630
|
+
public let input: ImprovementNextInput
|
|
631
|
+
let label: Label
|
|
632
|
+
|
|
633
|
+
public init(_ input: ImprovementNextInput, @ViewBuilder label: () -> Label) {
|
|
634
|
+
self.input = input
|
|
635
|
+
self.label = label()
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
public var body: some View {
|
|
639
|
+
Button(intent: ImprovementNextIntent(input)) { label }
|
|
640
|
+
.accessibilityHint(Text(verbatim: "Take the next improvement card to work on."))
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
@available(iOS 17.0, macOS 14.0, watchOS 10.0, tvOS 17.0, *)
|
|
645
|
+
extension ImprovementNextButton where Label == Text {
|
|
646
|
+
public init(_ input: ImprovementNextInput) {
|
|
647
|
+
self.init(input) { Text(verbatim: "Next improvement") }
|
|
648
|
+
}
|
|
649
|
+
}
|