gentle-pi 4.7.0 → 4.9.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/README.md +115 -44
- package/assets/agents/gentle-ai-explore.md +3 -3
- package/assets/agents/gentle-ai-verify.md +20 -6
- package/assets/agents/gentle-ai-worker.md +14 -13
- package/assets/agents/jd-judge-a.md +1 -3
- package/assets/agents/jd-judge-b.md +1 -3
- package/assets/agents/review-readability.md +1 -5
- package/assets/agents/review-reliability.md +1 -5
- package/assets/agents/review-resilience.md +1 -5
- package/assets/agents/review-risk.md +1 -5
- package/assets/design-canvas/canvas-api.js +45 -0
- package/assets/design-canvas/canvas-boards.js +476 -0
- package/assets/design-canvas/canvas-boot.js +219 -0
- package/assets/design-canvas/canvas-checks.js +491 -0
- package/assets/design-canvas/canvas-comments.js +315 -0
- package/assets/design-canvas/canvas-compare.js +159 -0
- package/assets/design-canvas/canvas-events.js +75 -0
- package/assets/design-canvas/canvas-export.js +393 -0
- package/assets/design-canvas/canvas-focus.js +203 -0
- package/assets/design-canvas/canvas-handoffs.js +150 -0
- package/assets/design-canvas/canvas-i18n-es.js +397 -0
- package/assets/design-canvas/canvas-i18n.js +108 -0
- package/assets/design-canvas/canvas-layout.js +526 -0
- package/assets/design-canvas/canvas-menu.js +219 -0
- package/assets/design-canvas/canvas-messages.js +86 -0
- package/assets/design-canvas/canvas-minimap.js +163 -0
- package/assets/design-canvas/canvas-parts.js +401 -0
- package/assets/design-canvas/canvas-popover.js +234 -0
- package/assets/design-canvas/canvas-rail.js +351 -0
- package/assets/design-canvas/canvas-sizes.js +524 -0
- package/assets/design-canvas/canvas-store.js +167 -0
- package/assets/design-canvas/canvas-theme.js +69 -0
- package/assets/design-canvas/canvas-tokens.js +674 -0
- package/assets/design-canvas/canvas-ui.js +24 -0
- package/assets/design-canvas/canvas-view.js +184 -0
- package/assets/design-canvas/canvas.css +773 -17
- package/assets/design-canvas/canvas.js +2 -1506
- package/assets/design-canvas/index.html +120 -36
- package/assets/design-canvas/inspector.js +574 -21
- package/assets/design-canvas/theme-early.js +10 -0
- package/assets/install-wizard/wizard.js +5 -1
- package/assets/migrations/agent-body-history.json +30 -0
- package/assets/orchestrator-delegation-reference.md +8 -14
- package/assets/orchestrator-delegation.md +5 -9
- package/assets/orchestrator-full-delegation-card.md +11 -16
- package/assets/orchestrator-full-delegation.md +9 -9
- package/assets/orchestrator-memory.md +4 -4
- package/assets/orchestrator-prompts.md +3 -31
- package/assets/orchestrator-quota-recovery.md +5 -0
- package/assets/orchestrator-skills.md +13 -12
- package/assets/orchestrator-tracking.md +13 -17
- package/assets/orchestrator-verification.md +12 -10
- package/assets/orchestrator-writer.md +13 -13
- package/assets/orchestrator.md +20 -24
- package/bin/gentle-shell.mjs +205 -10
- package/contracts/review-provider-contract-mirror/provider-contract.lock.json +8 -9
- package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.6.0}/bundle/manifest.json +3 -3
- package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.6.0}/bundle/orchestration/pi.md +2 -1
- package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.6.0}/bundle/routing/pi.md +16 -16
- package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.6.0}/generated/provider-capabilities.baseline.json +3 -3
- package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.6.0}/generated/provider-roles.baseline.json +1 -1
- package/docs/assets/brand/sponsor-banner.svg +60 -0
- package/docs/assets/features/gentle-tower.png +0 -0
- package/docs/auto-permission-answers.md +1 -1
- package/docs/bundled-install.md +14 -6
- package/docs/delegated-verification.md +23 -5
- package/docs/desktop-feed.md +303 -0
- package/docs/desktop-rpc.md +1931 -0
- package/docs/fast-mode.md +2 -2
- package/docs/gentle-agents-activity.md +26 -0
- package/docs/gentle-shell-desktop.md +465 -0
- package/docs/gentle-shell.md +102 -17
- package/docs/images/desktop/chat.png +0 -0
- package/docs/images/desktop/palette.png +0 -0
- package/docs/images/desktop/todo.png +0 -0
- package/docs/install-wizard.md +30 -21
- package/docs/odd-preparation-continuity.md +24 -0
- package/docs/permission-modes.md +9 -1
- package/docs/prompt-budget.md +12 -0
- package/docs/rdd-odd-friction-triage-2026-11-07.md +57 -0
- package/docs/readme-reference.md +113 -32
- package/docs/review-coordinator.md +29 -9
- package/docs/review-delivery-preflight.md +22 -0
- package/docs/work-continuity.md +19 -6
- package/extensions/ask-user-choice.ts +36 -18
- package/extensions/ask-user-question.ts +48 -9
- package/extensions/child-context.ts +21 -7
- package/extensions/gentle-agents.ts +436 -66
- package/extensions/gentle-ai.ts +809 -158
- package/extensions/gentle-design.ts +69 -3
- package/extensions/gentle-desktop-feed.ts +778 -0
- package/extensions/gentle-desktop-rpc.ts +276 -0
- package/extensions/gentle-guide.ts +3 -0
- package/extensions/gentle-herdr-desktop-status.ts +275 -0
- package/extensions/gentle-shell.ts +174 -59
- package/extensions/gentle-stats.ts +30 -1
- package/extensions/gentle-todo.ts +48 -25
- package/extensions/gentle-tower.ts +305 -0
- package/extensions/skill-registry.ts +260 -225
- package/herdr/RECIPE.md +157 -0
- package/herdr/keys.json +14 -0
- package/herdr/layouts/gentle-shell.json +202 -0
- package/herdr/mods/gentle-agents/icons/kind-herdr.svg +1 -0
- package/herdr/mods/gentle-agents/icons/kind-remote.svg +1 -0
- package/herdr/mods/gentle-agents/icons/kind-tui.svg +1 -0
- package/herdr/mods/gentle-agents/main.js +190 -0
- package/herdr/mods/gentle-agents/mod.json +1 -0
- package/herdr/mods/gentle-agents/snapshot.js +469 -0
- package/herdr/mods/gentle-agents/tokens.js +273 -0
- package/herdr/mods/gentle-chat/MINIMAL.md +69 -0
- package/herdr/mods/gentle-chat/actions.js +180 -0
- package/herdr/mods/gentle-chat/feed.js +321 -0
- package/herdr/mods/gentle-chat/icons/branch.svg +1 -0
- package/herdr/mods/gentle-chat/icons/chat.svg +1 -0
- package/herdr/mods/gentle-chat/icons/check.svg +1 -0
- package/herdr/mods/gentle-chat/icons/chev.svg +1 -0
- package/herdr/mods/gentle-chat/icons/clip.svg +1 -0
- package/herdr/mods/gentle-chat/icons/down.svg +1 -0
- package/herdr/mods/gentle-chat/icons/folder.svg +1 -0
- package/herdr/mods/gentle-chat/icons/kind-herdr.svg +1 -0
- package/herdr/mods/gentle-chat/icons/kind-remote.svg +1 -0
- package/herdr/mods/gentle-chat/icons/kind-tui.svg +1 -0
- package/herdr/mods/gentle-chat/icons/mark.svg +1 -0
- package/herdr/mods/gentle-chat/icons/send.svg +1 -0
- package/herdr/mods/gentle-chat/icons/shield.svg +1 -0
- package/herdr/mods/gentle-chat/icons/stop.svg +1 -0
- package/herdr/mods/gentle-chat/icons/term.svg +1 -0
- package/herdr/mods/gentle-chat/icons/user.svg +1 -0
- package/herdr/mods/gentle-chat/icons/x.svg +1 -0
- package/herdr/mods/gentle-chat/main.js +968 -0
- package/herdr/mods/gentle-chat/mod.json +1 -0
- package/herdr/mods/gentle-chat/session.js +212 -0
- package/herdr/mods/gentle-chat/snapshot.js +469 -0
- package/herdr/mods/gentle-chat/tokens.js +137 -0
- package/herdr/mods/gentle-chat/ui.js +883 -0
- package/herdr/mods/gentle-confirm/main.js +60 -0
- package/herdr/mods/gentle-confirm/mod.json +1 -0
- package/herdr/mods/gentle-inspector/actions.js +180 -0
- package/herdr/mods/gentle-inspector/icons/bolt.svg +1 -0
- package/herdr/mods/gentle-inspector/icons/bot.svg +1 -0
- package/herdr/mods/gentle-inspector/icons/check.svg +1 -0
- package/herdr/mods/gentle-inspector/icons/db.svg +1 -0
- package/herdr/mods/gentle-inspector/icons/diff.svg +1 -0
- package/herdr/mods/gentle-inspector/icons/jobs.svg +1 -0
- package/herdr/mods/gentle-inspector/icons/plug.svg +1 -0
- package/herdr/mods/gentle-inspector/icons/review.svg +1 -0
- package/herdr/mods/gentle-inspector/icons/stats.svg +1 -0
- package/herdr/mods/gentle-inspector/icons/stop.svg +1 -0
- package/herdr/mods/gentle-inspector/icons/todo.svg +1 -0
- package/herdr/mods/gentle-inspector/main.js +500 -0
- package/herdr/mods/gentle-inspector/mod.json +1 -0
- package/herdr/mods/gentle-inspector/snapshot.js +469 -0
- package/herdr/mods/gentle-inspector/tokens.js +273 -0
- package/herdr/mods/gentle-palette/actions.js +180 -0
- package/herdr/mods/gentle-palette/icons/bolt.svg +1 -0
- package/herdr/mods/gentle-palette/icons/bot.svg +1 -0
- package/herdr/mods/gentle-palette/icons/chat.svg +1 -0
- package/herdr/mods/gentle-palette/icons/check.svg +1 -0
- package/herdr/mods/gentle-palette/icons/cmd.svg +1 -0
- package/herdr/mods/gentle-palette/icons/diff.svg +1 -0
- package/herdr/mods/gentle-palette/icons/jobs.svg +1 -0
- package/herdr/mods/gentle-palette/icons/plus.svg +1 -0
- package/herdr/mods/gentle-palette/icons/review.svg +1 -0
- package/herdr/mods/gentle-palette/icons/search.svg +1 -0
- package/herdr/mods/gentle-palette/icons/shield.svg +1 -0
- package/herdr/mods/gentle-palette/icons/stats.svg +1 -0
- package/herdr/mods/gentle-palette/icons/stop.svg +1 -0
- package/herdr/mods/gentle-palette/icons/term.svg +1 -0
- package/herdr/mods/gentle-palette/icons/todo.svg +1 -0
- package/herdr/mods/gentle-palette/main.js +333 -0
- package/herdr/mods/gentle-palette/mod.json +1 -0
- package/herdr/mods/gentle-palette/snapshot.js +469 -0
- package/herdr/mods/gentle-palette/tokens.js +273 -0
- package/herdr/mods/gentle-pane/icons/chat.svg +1 -0
- package/herdr/mods/gentle-pane/icons/close.svg +1 -0
- package/herdr/mods/gentle-pane/icons/kind-herdr.svg +1 -0
- package/herdr/mods/gentle-pane/icons/kind-remote.svg +1 -0
- package/herdr/mods/gentle-pane/icons/kind-tui.svg +1 -0
- package/herdr/mods/gentle-pane/icons/split-down.svg +1 -0
- package/herdr/mods/gentle-pane/icons/split-right.svg +1 -0
- package/herdr/mods/gentle-pane/icons/term.svg +1 -0
- package/herdr/mods/gentle-pane/icons/unzoom.svg +1 -0
- package/herdr/mods/gentle-pane/icons/zoom.svg +1 -0
- package/herdr/mods/gentle-pane/main.js +91 -0
- package/herdr/mods/gentle-pane/mod.json +1 -0
- package/herdr/mods/gentle-pane/snapshot.js +469 -0
- package/herdr/mods/gentle-pane/tokens.js +273 -0
- package/herdr/mods/gentle-sidebar/actions.js +180 -0
- package/herdr/mods/gentle-sidebar/icons/gear.svg +1 -0
- package/herdr/mods/gentle-sidebar/icons/mark.svg +1 -0
- package/herdr/mods/gentle-sidebar/icons/refresh.svg +1 -0
- package/herdr/mods/gentle-sidebar/icons/server-plus.svg +1 -0
- package/herdr/mods/gentle-sidebar/main.js +171 -0
- package/herdr/mods/gentle-sidebar/mod.json +1 -0
- package/herdr/mods/gentle-sidebar/snapshot.js +469 -0
- package/herdr/mods/gentle-sidebar/tokens.js +273 -0
- package/herdr/mods/gentle-spaces/icons/kind-herdr.svg +1 -0
- package/herdr/mods/gentle-spaces/icons/kind-remote.svg +1 -0
- package/herdr/mods/gentle-spaces/icons/kind-tui.svg +1 -0
- package/herdr/mods/gentle-spaces/icons/monitor.svg +1 -0
- package/herdr/mods/gentle-spaces/icons/plus.svg +1 -0
- package/herdr/mods/gentle-spaces/icons/server.svg +1 -0
- package/herdr/mods/gentle-spaces/machines.js +31 -0
- package/herdr/mods/gentle-spaces/main.js +299 -0
- package/herdr/mods/gentle-spaces/mod.json +1 -0
- package/herdr/mods/gentle-spaces/snapshot.js +469 -0
- package/herdr/mods/gentle-spaces/tokens.js +273 -0
- package/herdr/mods/gentle-status/actions.js +180 -0
- package/herdr/mods/gentle-status/main.js +192 -0
- package/herdr/mods/gentle-status/mod.json +1 -0
- package/herdr/mods/gentle-status/snapshot.js +469 -0
- package/herdr/mods/gentle-status/tokens.js +273 -0
- package/herdr/mods/gentle-tabs/icons/close.svg +1 -0
- package/herdr/mods/gentle-tabs/icons/kind-herdr.svg +1 -0
- package/herdr/mods/gentle-tabs/icons/kind-remote.svg +1 -0
- package/herdr/mods/gentle-tabs/icons/kind-tui.svg +1 -0
- package/herdr/mods/gentle-tabs/icons/plus.svg +1 -0
- package/herdr/mods/gentle-tabs/icons/win-close.svg +1 -0
- package/herdr/mods/gentle-tabs/icons/win-max.svg +1 -0
- package/herdr/mods/gentle-tabs/icons/win-min.svg +1 -0
- package/herdr/mods/gentle-tabs/icons/win-restore.svg +1 -0
- package/herdr/mods/gentle-tabs/main.js +171 -0
- package/herdr/mods/gentle-tabs/mod.json +1 -0
- package/herdr/mods/gentle-tabs/snapshot.js +469 -0
- package/herdr/mods/gentle-tabs/tokens.js +273 -0
- package/herdr/mods/gentle-tokens/main.js +20 -0
- package/herdr/mods/gentle-tokens/mod.json +1 -0
- package/herdr/mods/gentle-tokens/snapshot.js +469 -0
- package/herdr/mods/gentle-tokens/tokens.js +273 -0
- package/herdr/preview.png +0 -0
- package/herdr/themes/gentle-shell-dark.json +33 -0
- package/herdr/themes/gentle-shell-light.json +34 -0
- package/lib/agent-assets.ts +30 -6
- package/lib/agent-tool-overlay.ts +117 -0
- package/lib/agents-config.ts +47 -6
- package/lib/agents-message-delivery.ts +17 -0
- package/lib/agents-messaging.ts +8 -2
- package/lib/agents-protocol.ts +17 -0
- package/lib/agents-report-cap.ts +115 -0
- package/lib/agents-rpc-publisher.ts +39 -12
- package/lib/agents-runner.ts +92 -6
- package/lib/agents-session-transport.ts +17 -1
- package/lib/auto-permission-answers.ts +2 -1
- package/lib/background-jobs-tools.ts +9 -4
- package/lib/background-jobs.ts +22 -2
- package/lib/bounded-writer-admission.ts +184 -31
- package/lib/change-diff.ts +104 -0
- package/lib/child-context-files.ts +21 -6
- package/lib/codemode-renderer.ts +1 -0
- package/lib/commit-slice-signal.ts +1 -1
- package/lib/delivery-conflict-markers.ts +349 -0
- package/lib/design-canvas-assets.ts +38 -0
- package/lib/design-canvas-server.ts +241 -23
- package/lib/design-comments.ts +94 -4
- package/lib/design-handoffs.ts +2 -1
- package/lib/design-layout.ts +125 -0
- package/lib/design-parts.ts +281 -0
- package/lib/design-system-tokens.ts +111 -0
- package/lib/desktop-agents-service.ts +315 -0
- package/lib/desktop-changes-service.ts +171 -0
- package/lib/desktop-design-service.ts +233 -0
- package/lib/desktop-feed-actions.ts +804 -0
- package/lib/desktop-feed-answers.ts +129 -0
- package/lib/desktop-feed-sources.ts +184 -0
- package/lib/desktop-feed-stats.ts +98 -0
- package/lib/desktop-feed-store.ts +124 -0
- package/lib/desktop-feed.ts +788 -0
- package/lib/desktop-jobs-service.ts +290 -0
- package/lib/desktop-review-service.ts +187 -0
- package/lib/desktop-rpc-agents.ts +403 -0
- package/lib/desktop-rpc-changes.ts +223 -0
- package/lib/desktop-rpc-config-watch.ts +285 -0
- package/lib/desktop-rpc-config.ts +885 -0
- package/lib/desktop-rpc-design.ts +138 -0
- package/lib/desktop-rpc-jobs.ts +290 -0
- package/lib/desktop-rpc-permissions.ts +328 -0
- package/lib/desktop-rpc-profiles.ts +196 -0
- package/lib/desktop-rpc-review.ts +180 -0
- package/lib/desktop-rpc-session.ts +203 -0
- package/lib/desktop-rpc-sessions.ts +250 -0
- package/lib/desktop-rpc-stats.ts +187 -0
- package/lib/desktop-rpc-updates.ts +143 -0
- package/lib/desktop-rpc-usage.ts +229 -0
- package/lib/desktop-rpc.ts +336 -0
- package/lib/desktop-session-service.ts +223 -0
- package/lib/desktop-sessions-service.ts +249 -0
- package/lib/desktop-stats-service.ts +142 -0
- package/lib/desktop-updates-service.ts +268 -0
- package/lib/desktop-usage-service.ts +310 -0
- package/lib/destructive-command-guard.ts +188 -13
- package/lib/gentle-ai-renderer.ts +13 -1
- package/lib/gentle-design.ts +201 -14
- package/lib/gentle-shell-bundled.ts +100 -9
- package/lib/gentle-shell-desktop.ts +1370 -0
- package/lib/gentle-shell-launcher.ts +45 -3
- package/lib/herdr-desktop-events.ts +40 -0
- package/lib/herdr-desktop-status.ts +229 -0
- package/lib/hidden-tools.ts +35 -0
- package/lib/inprocess-reviewer.ts +96 -12
- package/lib/jobs-sidebar-state.ts +5 -0
- package/lib/model-fallback-policy.ts +9 -0
- package/lib/model-routing-authority.ts +9 -0
- package/lib/nan-provider.ts +42 -28
- package/lib/native-review-cli.ts +86 -4
- package/lib/openai-fast-tier.ts +1 -0
- package/lib/orchestrator-discovery.ts +39 -2
- package/lib/reply-language-anchor.ts +27 -2
- package/lib/request-context-placement.ts +53 -0
- package/lib/review-candidate-view.ts +11 -1
- package/lib/review-continuation-registry.ts +17 -0
- package/lib/review-coordinator.ts +252 -8
- package/lib/review-delivery-preflight.ts +85 -0
- package/lib/review-host-relay.ts +5 -1
- package/lib/review-integration-v2.ts +56 -3
- package/lib/reviewer-stream.ts +87 -0
- package/lib/session-profile-freeze.ts +13 -5
- package/lib/shell-prompt.ts +16 -3
- package/lib/shell-usage.ts +10 -0
- package/lib/stats-collector.ts +56 -27
- package/lib/tower-actions.ts +100 -0
- package/lib/tower-hub.ts +73 -0
- package/lib/tower-launch.ts +111 -0
- package/lib/tower-open.ts +99 -0
- package/lib/tower-presence.ts +70 -0
- package/lib/tower-server.ts +234 -0
- package/lib/tower-snapshot.ts +298 -0
- package/lib/update-status.ts +238 -0
- package/lib/verifier-settle-reminder.ts +1 -1
- package/lib/vim-editor-adapter.ts +9 -2
- package/lib/writer-batch-admission.ts +55 -0
- package/lib/yolo-session-policy.ts +6 -1
- package/package.json +14 -5
- package/prompts/skill-creation.md +1 -10
- package/runtime/design-canvas-assets.mjs +39 -0
- package/runtime/gentle-shell-bundled.mjs +100 -9
- package/runtime/gentle-shell-desktop.mjs +1371 -0
- package/runtime/gentle-shell-launcher.mjs +44 -2
- package/runtime/native-review-cli.mjs +86 -4
- package/runtime/review-integration-v2.mjs +56 -3
- package/runtime/tower-actions.mjs +101 -0
- package/runtime/tower-hub.mjs +74 -0
- package/runtime/tower-launch.mjs +112 -0
- package/runtime/tower-open.mjs +100 -0
- package/runtime/tower-presence.mjs +71 -0
- package/runtime/tower-server.mjs +234 -0
- package/runtime/tower-snapshot.mjs +299 -0
- package/scripts/bootstrap.cmd +2 -2
- package/scripts/bootstrap.sh +41 -4
- package/scripts/build-full-delegation-card.mjs +5 -21
- package/scripts/build-runtime-modules.mjs +10 -0
- package/scripts/gentle-ai-installer.mjs +10 -10
- package/scripts/gentle-ai-proxy.mjs +1 -1
- package/scripts/installer-downloads.mjs +34 -8
- package/scripts/installer-preflight.mjs +28 -17
- package/scripts/installer-probes.mjs +25 -5
- package/scripts/installer-server.mjs +38 -9
- package/scripts/installer-windows.mjs +2 -2
- package/scripts/pi-update.mjs +166 -27
- package/scripts/prepare-verifier.mjs +107 -0
- package/scripts/update-agent-body-history.mjs +55 -8
- package/scripts/verify-package-files.mjs +61 -20
- package/skills/branch-pr/SKILL.md +16 -16
- package/skills/comment-writer/SKILL.md +1 -1
- package/skills/design/SKILL.md +6 -6
- package/skills/gentle-ai/SKILL.md +5 -5
- package/skills/judgment-day/SKILL.md +2 -2
- package/skills/judgment-day/references/prompts-and-formats.md +1 -1
- package/skills/provider-defect-report/SKILL.md +61 -0
- package/skills/rdd-defect-workflow/SKILL.md +6 -6
- package/skills/skill-improver/SKILL.md +2 -2
- package/skills/skill-registry/SKILL.md +11 -13
- package/skills/tui-design/SKILL.md +1 -1
- package/skills/work-unit-commits/SKILL.md +5 -5
- package/tests/agent-prompt-diet-contract.test.ts +101 -0
- package/tests/agent-tool-overlay-acceptance.test.ts +158 -0
- package/tests/agent-tool-overlay.test.ts +89 -0
- package/tests/agents-config.test.ts +10 -1
- package/tests/agents-message-delivery.test.ts +36 -0
- package/tests/agents-queries.test.ts +144 -4
- package/tests/agents-report-cap.test.ts +126 -0
- package/tests/agents-runner.test.ts +37 -1
- package/tests/agents-session-transport.test.ts +34 -0
- package/tests/always-on-prompt-verdicts-contract.test.ts +188 -0
- package/tests/append-system-prompt-route.test.ts +26 -7
- package/tests/approved-text-leftovers-contract.test.ts +136 -0
- package/tests/artifact-language.test.ts +1 -1
- package/tests/ask-user-choice.test.ts +78 -21
- package/tests/ask-user-question.test.ts +61 -6
- package/tests/audit-leftovers-contract.test.ts +51 -0
- package/tests/auto-permission-answers.test.ts +12 -1
- package/tests/background-jobs.test.ts +12 -0
- package/tests/bounded-stop-contract.test.ts +148 -27
- package/tests/branch-pr-skill.test.ts +10 -1
- package/tests/bundled-install.test.ts +1 -1
- package/tests/change-diff.test.ts +75 -0
- package/tests/child-context-files.test.ts +64 -8
- package/tests/child-skills-catalog.test.ts +56 -0
- package/tests/codemode-rendering.test.ts +4 -1
- package/tests/commit-slice-signal.test.ts +3 -2
- package/tests/decision-routing-contract.test.ts +390 -0
- package/tests/delegate-for-reason-contract.test.ts +30 -8
- package/tests/delegated-key-learnings-contract.test.ts +21 -28
- package/tests/delivery-b-rendered-surfaces.test.ts +32 -0
- package/tests/delivery-conflict-markers.test.ts +348 -0
- package/tests/design-canvas-all-sizes.test.ts +631 -0
- package/tests/design-canvas-allowlist.test.ts +32 -0
- package/tests/design-canvas-assets.test.ts +11 -878
- package/tests/design-canvas-boards.test.ts +77 -0
- package/tests/design-canvas-checks.test.ts +655 -0
- package/tests/design-canvas-compare.test.ts +79 -0
- package/tests/design-canvas-events.test.ts +59 -0
- package/tests/design-canvas-export.test.ts +1168 -0
- package/tests/design-canvas-focus.test.ts +113 -0
- package/tests/design-canvas-handoffs.test.ts +59 -0
- package/tests/design-canvas-i18n-review.test.ts +513 -0
- package/tests/design-canvas-i18n-views.test.ts +259 -0
- package/tests/design-canvas-i18n.test.ts +528 -0
- package/tests/design-canvas-inspector.test.ts +1004 -0
- package/tests/design-canvas-layout.test.ts +1222 -0
- package/tests/design-canvas-minimap.test.ts +413 -0
- package/tests/design-canvas-modules.test.ts +91 -0
- package/tests/design-canvas-parts.test.ts +721 -0
- package/tests/design-canvas-rail.test.ts +799 -0
- package/tests/design-canvas-server.test.ts +855 -17
- package/tests/design-canvas-sizes.test.ts +548 -0
- package/tests/design-canvas-store.test.ts +189 -0
- package/tests/design-canvas-theme.test.ts +198 -0
- package/tests/design-canvas-tokens.test.ts +965 -0
- package/tests/design-canvas-view.test.ts +299 -0
- package/tests/design-comments.test.ts +201 -1
- package/tests/design-handoffs.test.ts +20 -0
- package/tests/design-layout.test.ts +100 -0
- package/tests/design-parts.test.ts +260 -0
- package/tests/design-system-tokens.test.ts +215 -0
- package/tests/desktop-feed-actions-guards.test.ts +595 -0
- package/tests/desktop-feed-actions.test.ts +761 -0
- package/tests/desktop-feed-live-work.test.ts +209 -0
- package/tests/desktop-feed-performance.test.ts +369 -0
- package/tests/desktop-feed-plan-profiles.test.ts +509 -0
- package/tests/desktop-feed-send-prompt.test.ts +303 -0
- package/tests/desktop-feed-tool-summaries.test.ts +69 -0
- package/tests/desktop-feed.test.ts +615 -0
- package/tests/desktop-rpc-agents.test.ts +1319 -0
- package/tests/desktop-rpc-changes.test.ts +608 -0
- package/tests/desktop-rpc-config-watch.test.ts +1159 -0
- package/tests/desktop-rpc-config.test.ts +1462 -0
- package/tests/desktop-rpc-design.test.ts +672 -0
- package/tests/desktop-rpc-jobs.test.ts +1193 -0
- package/tests/desktop-rpc-permissions.test.ts +321 -0
- package/tests/desktop-rpc-profiles.test.ts +140 -0
- package/tests/desktop-rpc-review.test.ts +678 -0
- package/tests/desktop-rpc-safety.test.ts +119 -0
- package/tests/desktop-rpc-session.test.ts +642 -0
- package/tests/desktop-rpc-sessions.test.ts +647 -0
- package/tests/desktop-rpc-stats.test.ts +431 -0
- package/tests/desktop-rpc-updates.test.ts +525 -0
- package/tests/desktop-rpc-usage.test.ts +707 -0
- package/tests/desktop-rpc.test.ts +293 -0
- package/tests/devbinary/pi-host-relay.devtest.ts +149 -80
- package/tests/devbinary/review-session-consent.devtest.ts +84 -0
- package/tests/engram-safety.test.ts +111 -0
- package/tests/fixtures/devbinary/status-v9-escalated-non-blocking.captured.json +92 -0
- package/tests/fixtures/devbinary/status-v9-escalated-non-blocking.provenance.md +3 -0
- package/tests/fixtures/primary-session-prompt/gentleman.golden.md +30 -41
- package/tests/fixtures/refusal-identity.probe.mjs +139 -0
- package/tests/fixtures/session-profile-v1/replay.ts +4 -1
- package/tests/full-delegation-closure.test.ts +48 -0
- package/tests/gentle-agents.test.ts +848 -8
- package/tests/gentle-ai-binary.test.ts +1 -1
- package/tests/gentle-ai-child-guards.test.ts +1 -0
- package/tests/gentle-ai-installer.test.ts +52 -51
- package/tests/gentle-ai-renderer.test.ts +36 -2
- package/tests/gentle-ai.test.ts +195 -21
- package/tests/gentle-design.test.ts +365 -1
- package/tests/gentle-fast.test.ts +15 -0
- package/tests/gentle-herdr-desktop-status.test.ts +595 -0
- package/tests/gentle-shell-bundled.test.ts +91 -5
- package/tests/gentle-shell-desktop-bin.test.ts +125 -0
- package/tests/gentle-shell-desktop.test.ts +927 -0
- package/tests/gentle-shell-launcher-tower.test.ts +104 -0
- package/tests/gentle-shell-launcher.test.ts +1 -1
- package/tests/gentle-shell.test.ts +121 -87
- package/tests/gentle-todo.test.ts +32 -9
- package/tests/gentle-tower.test.ts +578 -0
- package/tests/herdr-desktop-status.test.ts +285 -0
- package/tests/hidden-tools.test.ts +188 -0
- package/tests/independent-recovery-delivery.test.ts +35 -9
- package/tests/inprocess-reviewer.test.ts +73 -0
- package/tests/install-wizard.test.ts +27 -1
- package/tests/installer-downloads.test.ts +30 -1
- package/tests/installer-posix-bootstrap.test.ts +114 -13
- package/tests/installer-preflight.test.ts +49 -1
- package/tests/installer-probes.test.ts +146 -0
- package/tests/installer-server.test.ts +203 -4
- package/tests/installer-windows-bootstrap.test.ts +19 -1
- package/tests/judgment-day-severity-admission.test.ts +46 -0
- package/tests/lazy-module-contradictions-contract.test.ts +181 -0
- package/tests/maintainer/desktop-rpc.maintest.ts +907 -0
- package/tests/maintainer/pi-update-source.maintest.ts +48 -18
- package/tests/model-fallback-policy.test.ts +26 -7
- package/tests/nan-provider-runtime.test.ts +17 -3
- package/tests/nan-provider.test.ts +111 -56
- package/tests/native-review-capability-contract.test.ts +19 -1
- package/tests/native-review-cli-nonblocking-findings.test.ts +165 -0
- package/tests/native-review-parity.test.ts +24 -5
- package/tests/native-review-refusal-identity.test.ts +25 -0
- package/tests/no-self-pause-contract.test.ts +33 -15
- package/tests/odd-integration.test.ts +11 -3
- package/tests/odd-routing-canonical-ratchet.test.ts +10 -0
- package/tests/odd-routing-contract.test.ts +99 -31
- package/tests/orchestrator-budget.test.ts +32 -5
- package/tests/orchestrator-consultation-sdk.test.ts +32 -6
- package/tests/orchestrator-delegation-mode.test.ts +2 -1
- package/tests/orchestrator-discovery.test.ts +28 -0
- package/tests/orchestrator-prompt-budget.test.ts +12 -2
- package/tests/orchestrator-prompt-diet-contract.test.ts +249 -0
- package/tests/orchestrator-rdd-ownership.test.ts +2 -1
- package/tests/orchestrator-work-search.test.ts +4 -2
- package/tests/package-files.test.ts +25 -1
- package/tests/package-manifest.test.ts +15 -14
- package/tests/parallel-reason-contract.test.ts +6 -3
- package/tests/permission-allowlist.test.ts +200 -30
- package/tests/persona-neutral-voseo.test.ts +4 -4
- package/tests/persona-reply-language.test.ts +1 -1
- package/tests/persona-single-channel.test.ts +13 -5
- package/tests/pi-routing-measured-values.test.ts +24 -0
- package/tests/pi-update-launcher.test.ts +17 -7
- package/tests/pi-update-source.test.ts +113 -6
- package/tests/pi-update.test.ts +294 -19
- package/tests/pnpm-workspace-policy.test.ts +47 -0
- package/tests/primary-context-files.test.ts +233 -0
- package/tests/primary-context-three-files.test.ts +174 -0
- package/tests/primary-session-prompt.test.ts +25 -0
- package/tests/profile-fast-tier.test.ts +66 -1
- package/tests/provider-defect-handoff.test.ts +124 -99
- package/tests/rdd-aware-verification-contract.test.ts +1 -1
- package/tests/rdd-status-line.test.ts +94 -1
- package/tests/reply-language-anchor-placement.test.ts +184 -0
- package/tests/reply-language-anchor.test.ts +17 -1
- package/tests/request-context-append-only.test.ts +218 -0
- package/tests/request-context-placement.test.ts +148 -0
- package/tests/review-agent-end-preflight.test.ts +79 -1
- package/tests/review-candidate-view.test.ts +65 -0
- package/tests/review-continuation-registry.test.ts +31 -0
- package/tests/review-contract-prompt.test.ts +2 -1
- package/tests/review-controller.test.ts +2 -1
- package/tests/review-coordinator-correction-gate.test.ts +105 -0
- package/tests/review-coordinator-findings.test.ts +206 -0
- package/tests/review-coordinator-nonblocking-scope.test.ts +169 -0
- package/tests/review-coordinator.test.ts +271 -4
- package/tests/review-delivery-preflight.test.ts +462 -0
- package/tests/review-due-compaction.test.ts +31 -0
- package/tests/review-due-public-boundary.test.ts +27 -0
- package/tests/review-integration-nonblocking-findings.test.ts +108 -0
- package/tests/review-json-arguments.test.ts +41 -2
- package/tests/review-ledger-contract.test.ts +19 -40
- package/tests/review-loadout-rdd-off-sdk.test.ts +30 -1
- package/tests/review-one-call-findings.test.ts +131 -0
- package/tests/review-one-call-followups.test.ts +308 -0
- package/tests/review-one-call-reviewer-requests.test.ts +207 -0
- package/tests/review-one-call.test.ts +452 -0
- package/tests/review-relay-transport-agent.test.ts +28 -1
- package/tests/review-reviewer-evidence.test.ts +41 -1
- package/tests/review-risk-assessment.test.ts +52 -5
- package/tests/review-run-statement-guidance-independent.test.ts +54 -0
- package/tests/review-session-standing-permission-controller.test.ts +32 -2
- package/tests/review-tool-prose-budget.test.ts +1 -0
- package/tests/reviewer-stream.test.ts +149 -0
- package/tests/sensitive-path-tools.test.ts +138 -4
- package/tests/session-profile-extension.test.ts +312 -18
- package/tests/session-profile-freeze.test.ts +26 -0
- package/tests/session-profile-v1-compat.test.ts +20 -0
- package/tests/shell-prompt.test.ts +17 -0
- package/tests/shell-usage.test.ts +59 -10
- package/tests/skill-collision-prefixes.test.ts +1 -0
- package/tests/skill-contradictions-contract.test.ts +124 -0
- package/tests/skill-registry-watcher.test.ts +216 -2
- package/tests/skill-registry.test.ts +983 -306
- package/tests/stats-collector.test.ts +109 -2
- package/tests/support/design-canvas-dom.ts +386 -0
- package/tests/support/review-coordinator-runtime.ts +212 -17
- package/tests/task-size-routing-contract.test.ts +49 -14
- package/tests/test-strength-contract.test.ts +2 -1
- package/tests/todo-request-append-only.test.ts +214 -0
- package/tests/tool-batching-contract.test.ts +3 -1
- package/tests/tower-actions.test.ts +247 -0
- package/tests/tower-artifacts.test.ts +114 -0
- package/tests/tower-open.test.ts +97 -0
- package/tests/tower-presence.test.ts +175 -0
- package/tests/tower-server.test.ts +122 -0
- package/tests/tower-snapshot.test.ts +236 -0
- package/tests/tower-web-echo.test.ts +125 -0
- package/tests/tower-web-hover.test.ts +251 -0
- package/tests/update-agent-body-history.test.ts +138 -0
- package/tests/verification-scoped-stop-contract.test.ts +32 -0
- package/tests/verification-tiers-contract.test.ts +229 -0
- package/tests/verifier-preparation.test.ts +229 -0
- package/tests/verifier-settle-reminder.test.ts +2 -2
- package/tests/verify-agent-contract.test.ts +20 -2
- package/tests/verify-first-launch-contract.test.ts +88 -12
- package/tests/vim-editor-adapter.test.ts +2 -2
- package/tests/work-continuity-contract.test.ts +136 -27
- package/tests/writer-admission-messages.test.ts +232 -0
- package/tests/writer-batch-admission.test.ts +66 -0
- package/tests/writer-edit-surface-scope.test.ts +52 -20
- package/tests/writer-feature-document-admission.test.ts +184 -0
- package/tests/writer-rejection-next-step.test.ts +55 -0
- package/tests/writer-surface-authority-contract.test.ts +158 -0
- package/tests/yolo-mode.test.ts +39 -0
- package/skills/_shared/review-ledger-contract.md +0 -106
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.6.0}/bundle/README.md +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.6.0}/bundle/schemas/lens.schema.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.6.0}/bundle/schemas/refuter.schema.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.6.0}/bundle/schemas/targeted-validator.schema.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.6.0}/bundle/vectors/lens.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.6.0}/bundle/vectors/refuter.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.6.0}/bundle/vectors/targeted-validator.json +0 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
// Handoffs (design/<slug>/handoffs.json) show live on each artboard's header: the
|
|
2
|
+
// handoff state, the chosen artboard and its alternatives, and, once implemented
|
|
3
|
+
// with a loopback previewUrl, the button that opens Compare.
|
|
4
|
+
|
|
5
|
+
// Every string the handoff row shows, in English; canvas-i18n-es.js has the Spanish. Titles, feature paths and notes stay as written.
|
|
6
|
+
const TEXT = Object.freeze({
|
|
7
|
+
states: { queued: "Queued", sent: "Implementing…", in_progress: "In progress", implemented: "Implemented ✓" },
|
|
8
|
+
chosen: "Chosen",
|
|
9
|
+
alternative: "Alternative",
|
|
10
|
+
feature: "Tracked in this ODD feature document",
|
|
11
|
+
compare: "Compare",
|
|
12
|
+
compareLabel: (title) => `Compare ${title} with the running app`,
|
|
13
|
+
unreadable: (slug, reason) => `handoffs.json for ${slug} cannot be read: ${reason}`,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const LOOPBACK_HOSTS = ["localhost", "127.0.0.1", "[::1]"];
|
|
17
|
+
const MAX_PREVIEW_URL = 2048;
|
|
18
|
+
|
|
19
|
+
export function init(ctx) {
|
|
20
|
+
const { win, doc, store, api, ui, actions } = ctx;
|
|
21
|
+
const { state } = store;
|
|
22
|
+
const { getJson } = api;
|
|
23
|
+
const { setStatus } = ui;
|
|
24
|
+
const T = ctx.i18n.text("handoffs", TEXT);
|
|
25
|
+
|
|
26
|
+
function ownPort() {
|
|
27
|
+
const location = win.location;
|
|
28
|
+
return location && typeof location.port === "string" ? location.port : "";
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The preview URL Compare may frame: http(s) on localhost, 127.0.0.1 or [::1], no
|
|
33
|
+
* credentials, and never this canvas server's port (the server validates it too).
|
|
34
|
+
*/
|
|
35
|
+
function previewTarget(value) {
|
|
36
|
+
if (typeof value !== "string" || value.length === 0 || value.length > MAX_PREVIEW_URL) return null;
|
|
37
|
+
let url;
|
|
38
|
+
try { url = new win.URL(value); } catch { return null; }
|
|
39
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") return null;
|
|
40
|
+
if (url.username || url.password || !LOOPBACK_HOSTS.includes(url.hostname)) return null;
|
|
41
|
+
const port = url.port || (url.protocol === "https:" ? "443" : "80");
|
|
42
|
+
return port === ownPort() ? null : url.href;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function handoffOf(board) {
|
|
46
|
+
const data = state.handoffs;
|
|
47
|
+
if (board.system || data.slug !== board.slug) return { chosen: null, entry: null };
|
|
48
|
+
const file = board.artboard.file;
|
|
49
|
+
const entry = Object.prototype.hasOwnProperty.call(data.handoffs, file) ? data.handoffs[file] : null;
|
|
50
|
+
return { chosen: data.chosen, entry: entry && typeof entry === "object" ? entry : null };
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function handoffKind(entry) {
|
|
54
|
+
if (entry.status === "sent") return entry.queued === true ? "queued" : "sent";
|
|
55
|
+
return entry.status === "in_progress" || entry.status === "implemented" ? entry.status : null;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function chip(className, text) {
|
|
59
|
+
const element = doc.createElement("span");
|
|
60
|
+
element.className = className;
|
|
61
|
+
element.textContent = text;
|
|
62
|
+
return element;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** The header row of one artboard: Chosen or Alternative, the handoff badge, its feature document, note and Compare. */
|
|
66
|
+
function renderHandoff(board) {
|
|
67
|
+
if (board.system || !board.handoff) return;
|
|
68
|
+
const { chosen, entry } = handoffOf(board);
|
|
69
|
+
const isChosen = typeof chosen === "string" && chosen === board.artboard.file;
|
|
70
|
+
board.wrapper.classList.toggle("gd-chosen", isChosen);
|
|
71
|
+
const parts = [];
|
|
72
|
+
if (typeof chosen === "string") parts.push(chip(`gd-choice ${isChosen ? "gd-choice-chosen" : "gd-choice-alternative"}`, isChosen ? T.chosen : T.alternative));
|
|
73
|
+
const kind = entry ? handoffKind(entry) : null;
|
|
74
|
+
let compare = null;
|
|
75
|
+
if (kind) {
|
|
76
|
+
const badge = chip("gd-handoff-badge", T.states[kind]);
|
|
77
|
+
badge.dataset.status = kind;
|
|
78
|
+
parts.push(badge);
|
|
79
|
+
if (typeof entry.feature === "string" && entry.feature) {
|
|
80
|
+
const feature = chip("gd-handoff-feature", entry.feature);
|
|
81
|
+
feature.title = T.feature;
|
|
82
|
+
parts.push(feature);
|
|
83
|
+
}
|
|
84
|
+
if (typeof entry.note === "string" && entry.note) {
|
|
85
|
+
const note = chip("gd-handoff-note", entry.note);
|
|
86
|
+
note.title = entry.note;
|
|
87
|
+
parts.push(note);
|
|
88
|
+
}
|
|
89
|
+
const preview = kind === "implemented" ? previewTarget(entry.previewUrl) : null;
|
|
90
|
+
if (preview) {
|
|
91
|
+
compare = doc.createElement("button");
|
|
92
|
+
compare.type = "button";
|
|
93
|
+
compare.className = "gd-compare-start";
|
|
94
|
+
compare.textContent = T.compare;
|
|
95
|
+
compare.setAttribute("aria-label", T.compareLabel(board.artboard.title));
|
|
96
|
+
compare.addEventListener("click", () => actions.enterCompare(board, preview));
|
|
97
|
+
parts.push(compare);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const hadFocus = board.handoff.contains(doc.activeElement);
|
|
101
|
+
board.handoff.replaceChildren(...parts);
|
|
102
|
+
board.handoff.hidden = parts.length === 0;
|
|
103
|
+
board.wrapper.classList.toggle("gd-has-handoff", parts.length > 0);
|
|
104
|
+
if (hadFocus && compare) compare.focus();
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function renderHandoffs(options) {
|
|
108
|
+
state.boards.forEach(renderHandoff);
|
|
109
|
+
// The handoff row changes the labels' height: the arrangement and the minimap (its chosen block too) follow.
|
|
110
|
+
actions.boardsResized(options);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** A new language: the same rows, in place, without closing the token panel (boot places the artboard again). */
|
|
114
|
+
function relabel() {
|
|
115
|
+
renderHandoffs({ keepInspector: true });
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function setHandoffs(slug, data) {
|
|
119
|
+
const valid = Boolean(data && typeof data === "object" && data.handoffs && typeof data.handoffs === "object" && !Array.isArray(data.handoffs));
|
|
120
|
+
store.setHandoffs({ slug, chosen: valid && typeof data.chosen === "string" ? data.chosen : null, handoffs: valid ? data.handoffs : {} });
|
|
121
|
+
renderHandoffs();
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
async function loadHandoffs() {
|
|
125
|
+
const slug = state.slug;
|
|
126
|
+
if (!slug) return;
|
|
127
|
+
let data = null;
|
|
128
|
+
try {
|
|
129
|
+
data = await getJson(`api/designs/${encodeURIComponent(slug)}/handoffs`);
|
|
130
|
+
} catch (error) {
|
|
131
|
+
setStatus(T.unreadable(slug, error.message), true);
|
|
132
|
+
}
|
|
133
|
+
if (slug === state.slug) setHandoffs(slug, data);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/** Shows a handoff the server just accepted, before its handoffs.json change event arrives. */
|
|
137
|
+
function noteHandoff(slug, file, queued) {
|
|
138
|
+
const current = state.handoffs.slug === slug ? state.handoffs.handoffs : {};
|
|
139
|
+
const feature = state.manifest && state.manifest.slug === slug && typeof state.manifest.feature === "string" ? state.manifest.feature : undefined;
|
|
140
|
+
const entry = { status: "sent", queued, sentAt: new Date().toISOString(), startedAt: null, implementedAt: null };
|
|
141
|
+
if (feature) entry.feature = feature;
|
|
142
|
+
const handoffs = Object.assign({}, current);
|
|
143
|
+
handoffs[file] = entry;
|
|
144
|
+
store.setHandoffs({ slug, chosen: file, handoffs });
|
|
145
|
+
renderHandoffs();
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// A new language rewrites each artboard's handoff row (its chips only; no frame reloads).
|
|
149
|
+
return { relabel, renderHandoff, loadHandoffs, noteHandoff };
|
|
150
|
+
}
|
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
// The canvas in Spanish: one entry per module, with the keys of that module's English TEXT block
|
|
2
|
+
// (a function keeps the English one's parameters), and `html` for index.html's data-i18n* keys.
|
|
3
|
+
// A key missing here shows the English. Never a `session` key: what the canvas sends to the agent
|
|
4
|
+
// stays English. Neutral, professional Spanish, with tú, in the approved vocabulary: artboard =
|
|
5
|
+
// propuesta, canvas = canvas, design system = design system, Shift = Mayús, Settings = Ajustes,
|
|
6
|
+
// Comment mode = modo Comentar, shortcut = atajo, layout = disposición, Phone = Móvil, Desktop = Escritorio, Remove = Quitar,
|
|
7
|
+
// Quality = Calidad, part = parte (Enviada, Implementada), quotes around a person's or a page's words = « ».
|
|
8
|
+
// checks.findings shows an accessibility finding from the key and vars inspector.js sends with its English.
|
|
9
|
+
|
|
10
|
+
export const ES = Object.freeze({
|
|
11
|
+
rail: {
|
|
12
|
+
settings: "Ajustes",
|
|
13
|
+
system: "Tablero del design system",
|
|
14
|
+
keys: "Atajos de teclado",
|
|
15
|
+
technical: "Detalles técnicos",
|
|
16
|
+
navigateTitle: (key) => `Moverte por el canvas (${key})`,
|
|
17
|
+
commentTitle: (key) => `Comentar un elemento (${key})`,
|
|
18
|
+
fitTitle: (key) => `Ver todas las propuestas (${key})`,
|
|
19
|
+
panelTitle: (key) => `Panel de comentarios (${key})`,
|
|
20
|
+
actions: {
|
|
21
|
+
navigate: "Moverte por el canvas",
|
|
22
|
+
comment: "Comentar un elemento",
|
|
23
|
+
fit: "Ver todo (ajustar todas las propuestas)",
|
|
24
|
+
panel: "Mostrar u ocultar el panel de comentarios",
|
|
25
|
+
minimap: "Mostrar u ocultar el minimapa",
|
|
26
|
+
help: "Mostrar los atajos de teclado",
|
|
27
|
+
},
|
|
28
|
+
change: "Cambiar",
|
|
29
|
+
changeAria: (action, key) => `Cambiar la tecla de “${action}” (${key})`,
|
|
30
|
+
reset: "Restablecer",
|
|
31
|
+
resetAria: (action, key) => `Restablecer “${action}” a ${key}`,
|
|
32
|
+
waiting: "Pulsa una tecla…",
|
|
33
|
+
waitingMessage: (action) => `Pulsa la nueva tecla para “${action}”, o Esc para cancelar.`,
|
|
34
|
+
assigned: (action, key) => `“${action}” ahora usa ${key}.`,
|
|
35
|
+
kept: (action, key) => `“${action}” sigue con ${key}.`,
|
|
36
|
+
taken: (key, action) => `${key} ya la usa “${action}”. No se cambió nada.`,
|
|
37
|
+
fixed: (key) => `${key} es una tecla fija y no se puede asignar. No se cambió nada.`,
|
|
38
|
+
invalid: "Usa una sola letra, cifra o signo de puntuación, sin Ctrl, Alt ni Cmd. No se cambió nada.",
|
|
39
|
+
unsaved: "Este navegador no pudo guardar el cambio, así que solo se aplica en esta página.",
|
|
40
|
+
resetDone: (action, key) => `“${action}” vuelve a ${key}.`,
|
|
41
|
+
restored: "Todos los atajos vuelven a sus valores predeterminados.",
|
|
42
|
+
spaceKey: "Espacio",
|
|
43
|
+
shiftEscKey: "Mayús+Esc",
|
|
44
|
+
language: "Idioma",
|
|
45
|
+
spanish: "Español",
|
|
46
|
+
english: "English",
|
|
47
|
+
auto: "Igual que el navegador",
|
|
48
|
+
languageNote: "Los mensajes al agente siguen en inglés.",
|
|
49
|
+
},
|
|
50
|
+
theme: {
|
|
51
|
+
theme: "Tema",
|
|
52
|
+
gentleman: "Gentleman",
|
|
53
|
+
neutral: "Neutro",
|
|
54
|
+
},
|
|
55
|
+
focus: {
|
|
56
|
+
navigating: "Navegando",
|
|
57
|
+
using: (title) => `Usando: ${title} · Mayús+Esc para salir`,
|
|
58
|
+
},
|
|
59
|
+
boards: {
|
|
60
|
+
systemTitle: "Design system",
|
|
61
|
+
systemTradeoff: "Tokens del proyecto (design/system.md)",
|
|
62
|
+
systemNote: "Los comentarios solo se aplican a las propuestas. Para cambiar el sistema, actualiza las fuentes de diseño del proyecto y ejecuta /gentle:design sync.",
|
|
63
|
+
systemOff: "Comentarios desactivados en este tablero",
|
|
64
|
+
invalidDesign: (slug) => `${slug} (design.json no válido)`,
|
|
65
|
+
frameTitle: (title) => `Propuesta ${title}`,
|
|
66
|
+
viewSystem: (title) => `Ver ${title} (solo lectura)`,
|
|
67
|
+
use: (title) => `Usar ${title}`,
|
|
68
|
+
systemHint: "Haz clic para ver el design system",
|
|
69
|
+
useHint: "Haz clic para usar este diseño",
|
|
70
|
+
implement: "Implementar",
|
|
71
|
+
implementAria: (title) => `Implementar ${title} en el proyecto`,
|
|
72
|
+
confirmAria: (title) => `Confirmar la implementación de ${title}`,
|
|
73
|
+
question: "¿Enviarla a la sesión para implementarla?",
|
|
74
|
+
send: "Enviar",
|
|
75
|
+
cancel: "Cancelar",
|
|
76
|
+
queued: (title) => `En cola: la sesión implementará ${title} cuando termine su tarea actual.`,
|
|
77
|
+
sent: (title) => `Enviado: la sesión está implementando ${title} ahora.`,
|
|
78
|
+
notSent: (reason) => `No se envió: ${reason}`,
|
|
79
|
+
error: "error",
|
|
80
|
+
feature: (feature) => `Funcionalidad: ${feature}`,
|
|
81
|
+
noDesigns: "Aún no hay diseños. Ejecuta /gentle:design con una petición para crear uno.",
|
|
82
|
+
cannotShow: (slug, reason) => `No se puede mostrar el diseño "${slug}": ${reason}`,
|
|
83
|
+
invalidManifest: (slug) => `design.json de ${slug} no es válido`,
|
|
84
|
+
noArtboards: "Este diseño aún no tiene propuestas.",
|
|
85
|
+
cannotList: (reason) => `No se pueden listar los diseños: ${reason}`,
|
|
86
|
+
},
|
|
87
|
+
events: {
|
|
88
|
+
disconnected: "Recarga en vivo desconectada, reintentando…",
|
|
89
|
+
},
|
|
90
|
+
layout: {
|
|
91
|
+
saveFailed: (slug, reason) => `No se pudo guardar la disposición de ${slug}: ${reason}`,
|
|
92
|
+
readFailed: (slug, reason) => `No se pudo leer design/${slug}/layout.json: ${reason}`,
|
|
93
|
+
unusable: "no contiene ninguna disposición que esta página pueda usar",
|
|
94
|
+
error: "error",
|
|
95
|
+
},
|
|
96
|
+
minimap: {
|
|
97
|
+
label: (count) => `Posición del área visible entre ${count} ${count === 1 ? "propuesta" : "propuestas"}. Haz clic o arrastra para mover la vista.`,
|
|
98
|
+
},
|
|
99
|
+
sizes: {
|
|
100
|
+
group: "Tamaño de vista previa",
|
|
101
|
+
phone: "Móvil",
|
|
102
|
+
tablet: "Tablet",
|
|
103
|
+
desktop: "Escritorio",
|
|
104
|
+
all: "Todos los tamaños",
|
|
105
|
+
allTitle: "Todos los tamaños: móvil, tablet y la propuesta tal como se diseñó, lado a lado",
|
|
106
|
+
designed: "Tal como se diseñó",
|
|
107
|
+
custom: "Personalizado",
|
|
108
|
+
customAria: "Ancho personalizado en píxeles",
|
|
109
|
+
customGroup: "Ancho personalizado",
|
|
110
|
+
error: (min, max) => `Escribe un número entero de ${min} a ${max} (px).`,
|
|
111
|
+
itemTitle: (name, width, height) => `${name} ${width} × ${height}`,
|
|
112
|
+
button: (size) => `Tamaño de vista previa: ${size}`,
|
|
113
|
+
buttonTitle: "Tamaño de vista previa de la propuesta abierta",
|
|
114
|
+
buttonOff: "Abre una propuesta para elegir su tamaño de vista previa",
|
|
115
|
+
frameAria: (name, width, height) => `${name} de ${width} por ${height}`,
|
|
116
|
+
frameTitle: (title, name, width, height) => `Propuesta ${title} en ${name} ${width} × ${height}`,
|
|
117
|
+
designedTitle: (title, width, height) => `Propuesta ${title} tal como se diseñó, ${width} × ${height}`,
|
|
118
|
+
scale: (percent) => `· ${percent}%`,
|
|
119
|
+
overflow: "Se desborda",
|
|
120
|
+
overflowNote: (width) => `El contenido es más ancho que ${width} px, así que a este tamaño una parte queda cortada o hay que desplazarse en horizontal.`,
|
|
121
|
+
madeAt: (label) => `Hecho en ${label}`,
|
|
122
|
+
},
|
|
123
|
+
export: {
|
|
124
|
+
button: (title) => `Más acciones para ${title}`,
|
|
125
|
+
menu: (title) => `Acciones de ${title}`,
|
|
126
|
+
png: "Exportar como PNG",
|
|
127
|
+
png2x: "Exportar como PNG a 2×",
|
|
128
|
+
pdf: "Exportar como PDF",
|
|
129
|
+
html: "Descargar HTML",
|
|
130
|
+
frameTitle: (title) => `Propuesta ${title}`,
|
|
131
|
+
choose: "Elige esta pestaña del canvas en el selector de captura del navegador. Si eliges otra pestaña o pantalla, puede exportarse un contenido equivocado.",
|
|
132
|
+
failed: (reason) => `No se pudo exportar la propuesta. ${reason} Usa la herramienta de capturas de tu navegador.`,
|
|
133
|
+
unavailable: "La captura de pestañas no está disponible en este navegador.",
|
|
134
|
+
sharedScreen: "Compartiste una pantalla, no esta pestaña, así que no se puede recortar la propuesta de ella.",
|
|
135
|
+
sharedOther: (surface) => `Compartiste ${surface === "window" ? "una ventana" : `otra superficie (${surface})`}, no esta pestaña, así que no se puede recortar la propuesta de ella.`,
|
|
136
|
+
window: (width, height) => `La propuesta necesita una ventana del navegador de al menos ${width} × ${height} px. Agranda la ventana o usa la pantalla completa (F11) e inténtalo de nuevo.`,
|
|
137
|
+
noFrame: "El fotograma capturado no tiene dimensiones.",
|
|
138
|
+
noPng: "La exportación a PNG no está disponible.",
|
|
139
|
+
encode: "No se pudo codificar el PNG.",
|
|
140
|
+
denied: "La captura se denegó o falló.",
|
|
141
|
+
stopped: "Se dejó de compartir antes de capturar la propuesta.",
|
|
142
|
+
gone: "La propuesta ya no está en el diseño.",
|
|
143
|
+
changed: "La propuesta se recargó o se cerró durante la captura.",
|
|
144
|
+
done: "PNG exportado.",
|
|
145
|
+
doneUpscaled: "PNG exportado a 2× (ampliado).",
|
|
146
|
+
downloadFailed: (reason) => `No se pudo descargar la propuesta (${reason}). Ábrela desde design/ en tu proyecto.`,
|
|
147
|
+
printFailed: (reason) => `No se pudo imprimir la propuesta (${reason}). Ábrela desde design/ en tu proyecto.`,
|
|
148
|
+
error: "error",
|
|
149
|
+
},
|
|
150
|
+
compare: {
|
|
151
|
+
hint: "Si la app no deja mostrarse en un marco, usa Abrir en una pestaña nueva.",
|
|
152
|
+
ipv6: "Los navegadores no muestran [::1] en un marco con la política del canvas (CSP no admite orígenes IPv6): usa Abrir en una pestaña nueva o indica la vista previa en localhost.",
|
|
153
|
+
title: (title) => `Comparar: ${title}`,
|
|
154
|
+
artboardFrame: (title) => `Propuesta ${title}`,
|
|
155
|
+
appFrame: (preview) => `App en marcha en ${preview}`,
|
|
156
|
+
designCaption: (file) => `Diseño: ${file}`,
|
|
157
|
+
appCaption: (preview) => `Implementación: ${preview}`,
|
|
158
|
+
loadError: (preview) => `No se pudo cargar la app de ${preview} en el marco. Usa Abrir en una pestaña nueva.`,
|
|
159
|
+
timeout: (preview) => `La app de ${preview} no ha cargado; puede que esté detenida o que no deje mostrarse en un marco. Usa Abrir en una pestaña nueva.`,
|
|
160
|
+
},
|
|
161
|
+
comments: {
|
|
162
|
+
open: (count) => `Abiertos (${count})`,
|
|
163
|
+
resolved: (count) => `Resueltos (${count})`,
|
|
164
|
+
sendAll: (count) => `Enviar todo (${count})`,
|
|
165
|
+
empty: "Aún no hay comentarios. Activa el modo Comentar y haz clic en un elemento.",
|
|
166
|
+
emptyOpen: "No hay comentarios abiertos.",
|
|
167
|
+
emptyResolved: "No hay comentarios resueltos.",
|
|
168
|
+
pin: (number, status, text) => `Comentario ${number} (${status}): ${text}`,
|
|
169
|
+
statuses: { open: "abierto", resolved: "resuelto" },
|
|
170
|
+
showLabel: (number, file) => `Mostrar el comentario ${number} en ${file}`,
|
|
171
|
+
sent: "Enviado",
|
|
172
|
+
notSent: "Aún no enviado",
|
|
173
|
+
detached: "Desvinculado",
|
|
174
|
+
shot: (number) => `Captura del comentario ${number}`,
|
|
175
|
+
resolve: "Resolver",
|
|
176
|
+
reopen: "Reabrir",
|
|
177
|
+
resolveLabel: (number) => `Resolver el comentario ${number}`,
|
|
178
|
+
reopenLabel: (number) => `Reabrir el comentario ${number}`,
|
|
179
|
+
unreadable: (slug, reason) => `No se puede leer comments.json de ${slug}: ${reason}`,
|
|
180
|
+
notUpdated: (reason) => `No se actualizó el comentario: ${reason}`,
|
|
181
|
+
resolvedDone: "Comentario resuelto",
|
|
182
|
+
reopenedDone: "Comentario reabierto",
|
|
183
|
+
notSentAll: (reason) => `No se enviaron los comentarios: ${reason}`,
|
|
184
|
+
sentAll: (count) => (count === 1 ? `Se envió ${count} comentario a la sesión` : `Se enviaron ${count} comentarios a la sesión`),
|
|
185
|
+
noneUnsent: "No hay comentarios sin enviar",
|
|
186
|
+
error: "error",
|
|
187
|
+
save: "Guardar",
|
|
188
|
+
send: "Enviar",
|
|
189
|
+
commentMode: "Modo Comentar: haz clic en un elemento de una propuesta",
|
|
190
|
+
},
|
|
191
|
+
popover: {
|
|
192
|
+
shotType: "Adjunta una imagen PNG, JPEG, WebP o GIF.",
|
|
193
|
+
shotSize: "La captura debe ocupar 5 MB como máximo.",
|
|
194
|
+
shotRead: "No se pudo leer la captura.",
|
|
195
|
+
limits: (max) => `Escribe un comentario de 1 a ${max} caracteres.`,
|
|
196
|
+
sending: "Enviando…",
|
|
197
|
+
savedOnly: "Guardado, pero no enviado a la sesión",
|
|
198
|
+
saved: "Guardado; usa Enviar todo para enviarlo",
|
|
199
|
+
sent: "Enviado a la sesión",
|
|
200
|
+
notSent: (reason) => `No se envió: ${reason}`,
|
|
201
|
+
},
|
|
202
|
+
handoffs: {
|
|
203
|
+
states: { queued: "En cola", sent: "Implementando…", in_progress: "En curso", implemented: "Implementada ✓" },
|
|
204
|
+
chosen: "Elegida",
|
|
205
|
+
alternative: "Alternativa",
|
|
206
|
+
feature: "Seguido en este documento de funcionalidad de ODD",
|
|
207
|
+
compare: "Comparar",
|
|
208
|
+
compareLabel: (title) => `Comparar ${title} con la app en marcha`,
|
|
209
|
+
unreadable: (slug, reason) => `No se puede leer handoffs.json de ${slug}: ${reason}`,
|
|
210
|
+
},
|
|
211
|
+
parts: {
|
|
212
|
+
title: (count) => `Implementaciones parciales · ${count}`,
|
|
213
|
+
states: { sent: "Enviada", queued: "En cola", in_progress: "En curso", implemented: "Implementada ✓" },
|
|
214
|
+
times: {
|
|
215
|
+
sent: (time, today) => `Enviada ${today ? "a las" : "el"} ${time}`,
|
|
216
|
+
queued: (time, today) => `En cola ${today ? "desde las" : "desde el"} ${time}`,
|
|
217
|
+
in_progress: (time) => `En curso desde ${time}`,
|
|
218
|
+
implemented: (time, today) => `Implementada ${today ? "a las" : "el"} ${time}`,
|
|
219
|
+
},
|
|
220
|
+
quoted: (value) => `«${value}»`,
|
|
221
|
+
show: "Mostrar",
|
|
222
|
+
showLabel: (number, file) => `Mostrar la parte ${number} en ${file}`,
|
|
223
|
+
remove: "Quitar",
|
|
224
|
+
removeLabel: (number, file) => `Quitar la parte ${number} en ${file}`,
|
|
225
|
+
question: "¿Quitar esta parte? El agente ya no podrá informar sobre ella.",
|
|
226
|
+
confirmLabel: (number) => `Confirmar que quitas la parte ${number}`,
|
|
227
|
+
cancel: "Cancelar",
|
|
228
|
+
partTitle: "Construir solo este elemento en el proyecto; el campo es una nota opcional",
|
|
229
|
+
partOffline: "El canvas no está conectado a una sesión de Pi; ábrelo con /gentle:design open",
|
|
230
|
+
noteTooLong: (max) => `La nota puede tener como máximo ${max} caracteres.`,
|
|
231
|
+
sending: "Enviando…",
|
|
232
|
+
sentShort: "Enviado a la sesión",
|
|
233
|
+
sent: (title) => `Enviado: la sesión está construyendo ahora solo esta parte de ${title}.`,
|
|
234
|
+
queued: (title) => `En cola: la sesión construirá solo esta parte de ${title} cuando termine su tarea actual.`,
|
|
235
|
+
notSent: (why) => `No se envió: ${why}`,
|
|
236
|
+
sendErrors: {
|
|
237
|
+
"implement-part-unavailable": "el canvas no está conectado a una sesión de Pi; ábrelo con /gentle:design open.",
|
|
238
|
+
"invalid-file": "esa propuesta ya no está en el diseño.",
|
|
239
|
+
"invalid-selector": "el selector de este elemento no se puede enviar.",
|
|
240
|
+
"invalid-excerpt": "el texto de este elemento no se puede enviar.",
|
|
241
|
+
"invalid-note": "la nota puede tener como máximo 2000 caracteres.",
|
|
242
|
+
"not-found": "el diseño ya no existe.",
|
|
243
|
+
"too-many-parts": "este diseño ya tiene 100 partes; quita una primero.",
|
|
244
|
+
"parts-too-large": "parts.json está lleno; quita una parte primero.",
|
|
245
|
+
"invalid-parts": "parts.json no se puede leer; corrígelo o bórralo.",
|
|
246
|
+
},
|
|
247
|
+
deliveryFailed: (reason) => (reason ? `la sesión no la aceptó (${reason}).` : "la sesión no la aceptó."),
|
|
248
|
+
removed: "Parte quitada. El agente ya no puede informar sobre ella.",
|
|
249
|
+
notRemoved: (why) => `No se quitó: ${why}`,
|
|
250
|
+
removeErrors: {
|
|
251
|
+
"part-not-sent": "el agente ya empezó con esta parte.",
|
|
252
|
+
"not-found": "esta parte ya no existe; su entrega falló o ya se quitó.",
|
|
253
|
+
"invalid-parts": "parts.json no se puede leer; corrígelo o bórralo.",
|
|
254
|
+
"invalid-part": "el id de esta parte no es válido.",
|
|
255
|
+
},
|
|
256
|
+
notShown: "No se muestra: la propuesta de esta parte ya no está en el diseño.",
|
|
257
|
+
unreadable: (slug, message) => `No se puede leer parts.json de ${slug}: ${message}`,
|
|
258
|
+
},
|
|
259
|
+
tokens: {
|
|
260
|
+
labels: { color: "Color", background: "Fondo", contrast: "Contraste", font: "Fuente", size: "Tamaño", lineHeight: "Interlineado", spacing: "Espaciado", radius: "Radio" },
|
|
261
|
+
unreadable: "ilegible",
|
|
262
|
+
imageBackground: "imagen o degradado",
|
|
263
|
+
unknownBackground: "fondo desconocido",
|
|
264
|
+
aa: "AA (4.5 : 1)",
|
|
265
|
+
aaLarge: "AA texto grande (3 : 1)",
|
|
266
|
+
needs: (needed) => `necesita ${needed} : 1`,
|
|
267
|
+
needsLarge: (needed) => `necesita ${needed} : 1 (texto grande)`,
|
|
268
|
+
ok: (text) => `✓ ${text}`,
|
|
269
|
+
bad: (text) => `⚠ ${text}`,
|
|
270
|
+
noToken: "sin token",
|
|
271
|
+
nearest: (name) => `Más cercano: ${name}`,
|
|
272
|
+
ratio: (ratio) => `${ratio} : 1`,
|
|
273
|
+
px: (value) => `${value} px`,
|
|
274
|
+
weight: (value) => `peso ${value}`,
|
|
275
|
+
normal: "normal",
|
|
276
|
+
margin: (sides) => `margen ${sides}`,
|
|
277
|
+
padding: (sides) => `relleno ${sides}`,
|
|
278
|
+
onScale: "en la escala",
|
|
279
|
+
offScale: (value) => `${value} px fuera de la escala`,
|
|
280
|
+
radiusNoToken: (value) => `${value} px sin token`,
|
|
281
|
+
none: "—",
|
|
282
|
+
noTokens: "No se encontraron tokens en design/system.md, así que los valores y el contraste se muestran sin comparar.",
|
|
283
|
+
problems: {
|
|
284
|
+
"too-large": "design/system.md ocupa más de 256 KB, así que no se leyeron sus tokens: los valores y el contraste se muestran sin comparar.",
|
|
285
|
+
unreadable: "No se pudo leer design/system.md, así que los valores y el contraste se muestran sin comparar.",
|
|
286
|
+
},
|
|
287
|
+
nothingToFix: "Nada se sale del design system, así que no hay nada que corregir.",
|
|
288
|
+
copied: "Copiado",
|
|
289
|
+
copyFailed: "No se pudo copiar. Usa Pedir al agente que lo corrija y copia el texto del cuadro de comentario.",
|
|
290
|
+
},
|
|
291
|
+
checks: {
|
|
292
|
+
names: { contrast: "Contraste del texto", target: "Tamaño de los objetivos", alt: "Las imágenes tienen texto alternativo", label: "Los campos de formulario tienen etiqueta", heading: "Encabezados en orden" },
|
|
293
|
+
boardName: (number, title) => `${String(number).padStart(2, "0")} ${title}`,
|
|
294
|
+
groupLabel: (name) => `Comprobaciones de accesibilidad de ${name}`,
|
|
295
|
+
notChecked: "Aún sin comprobar",
|
|
296
|
+
accessible: "Accesible ✓",
|
|
297
|
+
failing: (count) => `${count} ${count === 1 ? "problema" : "problemas"}`,
|
|
298
|
+
passed: (names) => `Superadas: ${names.join(" · ")}`,
|
|
299
|
+
noBoards: "No hay propuestas de diseño que comprobar.",
|
|
300
|
+
kinds: { fail: "Problema", advice: "Consejo" },
|
|
301
|
+
hidden: "Fuera de la vista (oculto o fuera de la pantalla), así que Mostrar centra su propuesta sin anillo.",
|
|
302
|
+
show: "Mostrar",
|
|
303
|
+
showLabel: (title, label, name) => `Mostrar ${title} en ${label} de ${name}`,
|
|
304
|
+
fix: "Pedir al agente que lo corrija",
|
|
305
|
+
fixLabel: (title, label) => `Pedir al agente que corrija ${title} en ${label}`,
|
|
306
|
+
findings: {
|
|
307
|
+
contrast: { title: "Contraste bajo", detail: (v) => `«${v.text}» tiene ${v.ratio} : 1 (${v.foreground} sobre ${v.background}); WCAG AA pide ${v.needed} : 1.` },
|
|
308
|
+
contrastLarge: { title: "Contraste bajo", detail: (v) => `«${v.text}» tiene ${v.ratio} : 1 (${v.foreground} sobre ${v.background}); WCAG AA pide ${v.needed} : 1 para texto grande.` },
|
|
309
|
+
targetSmall: { title: "Objetivo táctil pequeño", detail: (v) => `${v.name ? `«${v.name}»` : v.element} mide ${v.width} × ${v.height} px; WCAG 2.2 pide ${v.min} × ${v.min} px, o espacio suficiente alrededor para que un círculo de ${v.min} px sobre él no toque ningún otro objetivo.` },
|
|
310
|
+
targetAdvised: { title: "Objetivo táctil de menos de 44 px", detail: (v) => `${v.name ? `«${v.name}»` : v.element} mide ${v.width} × ${v.height} px; para uso táctil se recomiendan ${v.advised} × ${v.advised} px.` },
|
|
311
|
+
alt: { title: "Imagen sin texto alternativo", detail: (v) => `${v.source || "La imagen"} no tiene atributo alt. Descríbela, o usa alt="" si es decorativa.` },
|
|
312
|
+
label: { title: "Campo de formulario sin etiqueta", detail: (v) => `${v.field === "select" ? "La lista desplegable" : v.field === "textarea" ? "El área de texto" : `El campo ${v.type}`}${v.hint ? ` «${v.hint}»` : ""} no tiene etiqueta. Añade un <label for>, aria-label o aria-labelledby; un placeholder no es una etiqueta.` },
|
|
313
|
+
heading: { title: "Nivel de encabezado saltado", detail: (v) => `h${v.level} «${v.text}» va después de h${v.previous}: ${v.count === 1 ? "falta" : "faltan"} ${v.missing}.` },
|
|
314
|
+
},
|
|
315
|
+
},
|
|
316
|
+
html: {
|
|
317
|
+
toolbar: "Controles del canvas de diseño",
|
|
318
|
+
design: "Diseño",
|
|
319
|
+
zoom: "Zoom",
|
|
320
|
+
zoomOut: "Alejar",
|
|
321
|
+
zoomLevel: "Nivel de zoom",
|
|
322
|
+
zoomIn: "Acercar",
|
|
323
|
+
fit: "Ajustar",
|
|
324
|
+
arrange: "Organizar las propuestas",
|
|
325
|
+
row: "Fila",
|
|
326
|
+
column: "Columna",
|
|
327
|
+
grid: "Cuadrícula",
|
|
328
|
+
arrangeRow: "Organizar en fila",
|
|
329
|
+
arrangeColumn: "Organizar en columna",
|
|
330
|
+
arrangeGrid: "Organizar en cuadrícula",
|
|
331
|
+
sendMode: "Cuándo se envía un comentario a la sesión",
|
|
332
|
+
sendNow: "Enviar ya",
|
|
333
|
+
collect: "Acumular",
|
|
334
|
+
comments: "Comentarios",
|
|
335
|
+
tools: "Herramientas",
|
|
336
|
+
move: "Mover",
|
|
337
|
+
comment: "Comentar",
|
|
338
|
+
overview: "Ver todo",
|
|
339
|
+
settings: "Ajustes",
|
|
340
|
+
settingsTitle: "Ajustes: design system, atajos de teclado y detalles técnicos",
|
|
341
|
+
artboards: "Propuestas",
|
|
342
|
+
back: "Volver al canvas",
|
|
343
|
+
backTitle: "Volver al canvas (Mayús+Esc)",
|
|
344
|
+
shortcutsTitle: "Atajos de teclado",
|
|
345
|
+
changeable: "Atajos que puedes cambiar",
|
|
346
|
+
fitAll: "Ajustar todas las propuestas",
|
|
347
|
+
zoomInOut: "Acercar y alejar",
|
|
348
|
+
pan: "Desplazarte (Mayús para pasos más largos)",
|
|
349
|
+
space: "Espacio",
|
|
350
|
+
drag: "arrastrar",
|
|
351
|
+
panAnywhere: "Desplazarte desde cualquier lugar, incluso sobre una propuesta",
|
|
352
|
+
escape: "Quitar el anillo de una comprobación o la selección de la propuesta, salir del modo Comentar o cerrar el cuadro de comentario",
|
|
353
|
+
shift: "Mayús",
|
|
354
|
+
shiftEscape: "Volver al canvas desde una propuesta o desde Comparar",
|
|
355
|
+
changeNote: "Cambiar asigna otra tecla a una acción; tus teclas se guardan en este navegador, para todos los diseños.",
|
|
356
|
+
singleKeysNote: "Las teclas sueltas no funcionan mientras escribes, mientras el cuadro de comentario está abierto ni mientras usas una propuesta.",
|
|
357
|
+
restore: "Restablecer valores predeterminados",
|
|
358
|
+
close: "Cerrar",
|
|
359
|
+
previewSize: "Tamaño de vista previa",
|
|
360
|
+
previewDesktop: "Tamaño de vista previa: Escritorio",
|
|
361
|
+
previewOff: "Abre una propuesta para elegir su tamaño de vista previa",
|
|
362
|
+
desktop: "Escritorio",
|
|
363
|
+
minimap: "Minimapa",
|
|
364
|
+
minimapMap: "Posición del área visible entre las propuestas. Haz clic o arrastra para mover la vista.",
|
|
365
|
+
compare: "Comparar",
|
|
366
|
+
scaleToFit: "Ajustar a la ventana",
|
|
367
|
+
openTab: "Abrir en una pestaña nueva",
|
|
368
|
+
compareBack: "Volver al canvas",
|
|
369
|
+
compareBackTitle: "Volver al canvas (Mayús+Esc)",
|
|
370
|
+
navigating: "Navegando",
|
|
371
|
+
sendAll: "Enviar todo (0)",
|
|
372
|
+
panelTitle: "Panel de comentarios (])",
|
|
373
|
+
navigateTitle: "Moverte por el canvas (V)",
|
|
374
|
+
commentTitle: "Comentar un elemento (C)",
|
|
375
|
+
fitTitle: "Ver todas las propuestas (F)",
|
|
376
|
+
inspectorFix: "Pedir al agente que lo corrija",
|
|
377
|
+
inspectorCopy: "Copiar",
|
|
378
|
+
review: "Revisión",
|
|
379
|
+
tabComments: "Comentarios",
|
|
380
|
+
quality: "Calidad",
|
|
381
|
+
showComments: "Mostrar comentarios",
|
|
382
|
+
filterOpen: "Abiertos (0)",
|
|
383
|
+
filterResolved: "Resueltos (0)",
|
|
384
|
+
panelEmpty: "Aún no hay comentarios. Activa el modo Comentar y haz clic en un elemento.",
|
|
385
|
+
partsTitle: "Implementaciones parciales",
|
|
386
|
+
commentOn: "Comentar en",
|
|
387
|
+
commentLabel: "Comentario",
|
|
388
|
+
placeholder: "¿Qué debería cambiar?",
|
|
389
|
+
attach: "Adjuntar captura",
|
|
390
|
+
attachTitle: "O pega una imagen, o suéltala aquí (PNG, JPEG, WebP o GIF, hasta 5 MB)",
|
|
391
|
+
attached: "Captura adjunta",
|
|
392
|
+
remove: "Quitar",
|
|
393
|
+
cancel: "Cancelar",
|
|
394
|
+
implementOnly: "Implementar solo esto",
|
|
395
|
+
send: "Enviar",
|
|
396
|
+
},
|
|
397
|
+
});
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
// The canvas language: Spanish or English, chosen in the rail's Settings (Español, English or
|
|
2
|
+
// Match the browser), saved in this browser and applied at once, without reloading an artboard.
|
|
3
|
+
// Each module keeps its English strings in its TEXT block and reads them through
|
|
4
|
+
// `const T = ctx.i18n.text("<module>", TEXT)`: T gives the Spanish of canvas-i18n-es.js for a
|
|
5
|
+
// key it has while the canvas is Spanish, else the English. TEXT.session (what the canvas sends
|
|
6
|
+
// to the agent) is never translated. index.html's text is keyed with data-i18n (and
|
|
7
|
+
// data-i18n-title, -aria-label, -placeholder, -alt), and applyMarkup rewrites it from ES.html,
|
|
8
|
+
// or back to the English it read when the language started. User content (comments, artboard
|
|
9
|
+
// titles and tradeoffs) and file names stay as written.
|
|
10
|
+
|
|
11
|
+
// The choice in this browser, for every design at this canvas address: "es", "en" or "auto".
|
|
12
|
+
const LANGUAGE_KEY = "gentle-design:language";
|
|
13
|
+
const CHOICES = ["es", "en", "auto"];
|
|
14
|
+
const ATTRIBUTES = ["title", "aria-label", "placeholder", "alt"];
|
|
15
|
+
const MARKUP = ["[data-i18n]", ...ATTRIBUTES.map((name) => `[data-i18n-${name}]`)].join(",");
|
|
16
|
+
|
|
17
|
+
/** es: the Spanish catalog (canvas-i18n-es.js); changed: what canvas-boot.js runs once the language changed. */
|
|
18
|
+
export function init(ctx, es, changed) {
|
|
19
|
+
const { win, doc, store } = ctx;
|
|
20
|
+
const { state } = store;
|
|
21
|
+
// Each keyed element of the page and the English it held when the language started.
|
|
22
|
+
const english = new WeakMap();
|
|
23
|
+
|
|
24
|
+
/** The browser's language: Spanish for es and es-*, English for anything else. */
|
|
25
|
+
function browserLanguage() {
|
|
26
|
+
const navigator = win.navigator;
|
|
27
|
+
const tag = navigator ? navigator.languages?.[0] ?? navigator.language : "";
|
|
28
|
+
return /^es(-|$)/i.test(String(tag ?? "")) ? "es" : "en";
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const resolve = (choice) => (choice === "auto" ? browserLanguage() : choice);
|
|
32
|
+
|
|
33
|
+
/** The saved choice; an unreadable or unknown one is "auto". */
|
|
34
|
+
function storedChoice() {
|
|
35
|
+
try {
|
|
36
|
+
const choice = win.localStorage.getItem(LANGUAGE_KEY);
|
|
37
|
+
return CHOICES.includes(choice) ? choice : "auto";
|
|
38
|
+
} catch {
|
|
39
|
+
return "auto";
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** A live view of a module's TEXT: each read gives the Spanish of that key while the canvas is Spanish and it has one, else the English. */
|
|
44
|
+
function view(source, spanish) {
|
|
45
|
+
const result = {};
|
|
46
|
+
for (const [key, value] of Object.entries(source)) {
|
|
47
|
+
const translated = key !== "session" && spanish && typeof spanish === "object" && Object.hasOwn(spanish, key) ? spanish[key] : undefined;
|
|
48
|
+
if (key === "session" || (value && typeof value === "object" && !Array.isArray(value))) {
|
|
49
|
+
// Agent instructions stay English whole; any other group is a view of its own.
|
|
50
|
+
Object.defineProperty(result, key, { enumerable: true, value: key === "session" ? value : view(value, translated) });
|
|
51
|
+
} else {
|
|
52
|
+
Object.defineProperty(result, key, { enumerable: true, get: () => (state.language === "es" && translated !== undefined ? translated : value) });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return Object.freeze(result);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const text = (module, source) => view(source, es[module]);
|
|
59
|
+
|
|
60
|
+
/** Rewrites the page's keyed text and attributes in the current language. */
|
|
61
|
+
function applyMarkup() {
|
|
62
|
+
const spanish = state.language === "es" && es.html ? es.html : {};
|
|
63
|
+
const pick = (key, fallback) => (Object.hasOwn(spanish, key) ? spanish[key] : fallback);
|
|
64
|
+
for (const element of doc.querySelectorAll(MARKUP)) {
|
|
65
|
+
if (!english.has(element)) english.set(element, { text: element.textContent, attributes: Object.fromEntries(ATTRIBUTES.map((name) => [name, element.getAttribute(name)])) });
|
|
66
|
+
const original = english.get(element);
|
|
67
|
+
const key = element.getAttribute("data-i18n");
|
|
68
|
+
if (key) element.textContent = pick(key, original.text);
|
|
69
|
+
for (const name of ATTRIBUTES) {
|
|
70
|
+
const attributeKey = element.getAttribute(`data-i18n-${name}`);
|
|
71
|
+
if (attributeKey && original.attributes[name] !== null) element.setAttribute(name, pick(attributeKey, original.attributes[name]));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** Sets the choice and its language; a new language rewrites the page (changed). */
|
|
77
|
+
function apply(choice) {
|
|
78
|
+
const language = resolve(choice);
|
|
79
|
+
const switched = language !== state.language;
|
|
80
|
+
store.setLanguage(choice, language);
|
|
81
|
+
doc.documentElement.setAttribute("lang", language);
|
|
82
|
+
if (switched) changed();
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/** The choice made in Settings: saved in this browser (or for this page only, when storage refuses it) and applied at once. */
|
|
86
|
+
function setLanguage(choice) {
|
|
87
|
+
if (!CHOICES.includes(choice)) return;
|
|
88
|
+
try {
|
|
89
|
+
win.localStorage.setItem(LANGUAGE_KEY, choice);
|
|
90
|
+
} catch {
|
|
91
|
+
// Storage refused it: the choice holds for this page.
|
|
92
|
+
}
|
|
93
|
+
apply(choice);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** The first language, before anything renders; then Match the browser follows the browser's language. */
|
|
97
|
+
function startLanguage() {
|
|
98
|
+
const choice = storedChoice();
|
|
99
|
+
store.setLanguage(choice, resolve(choice));
|
|
100
|
+
doc.documentElement.setAttribute("lang", state.language);
|
|
101
|
+
applyMarkup();
|
|
102
|
+
win.addEventListener("languagechange", () => {
|
|
103
|
+
if (state.languageChoice === "auto") apply("auto");
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return { text, applyMarkup, setLanguage, startLanguage };
|
|
108
|
+
}
|