@bastani/atomic 0.9.13 → 0.9.14-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +58 -0
- package/README.md +3 -3
- package/dist/builtin/intercom/package.json +2 -2
- package/dist/builtin/mcp/package.json +3 -3
- package/dist/builtin/subagents/CHANGELOG.md +14 -0
- package/dist/builtin/subagents/README.md +6 -4
- package/dist/builtin/subagents/agents/code-simplifier.md +1 -1
- package/dist/builtin/subagents/agents/codebase-analyzer.md +1 -1
- package/dist/builtin/subagents/agents/codebase-locator.md +1 -1
- package/dist/builtin/subagents/agents/codebase-online-researcher.md +1 -1
- package/dist/builtin/subagents/agents/codebase-pattern-finder.md +1 -1
- package/dist/builtin/subagents/agents/codebase-research-analyzer.md +1 -1
- package/dist/builtin/subagents/agents/codebase-research-locator.md +1 -1
- package/dist/builtin/subagents/agents/debugger.md +1 -1
- package/dist/builtin/subagents/agents/worker.md +1 -1
- package/dist/builtin/subagents/package.json +6 -5
- package/dist/builtin/subagents/src/agents/agent-discovery.ts +17 -11
- package/dist/builtin/subagents/src/agents/agent-loaders.ts +115 -43
- package/dist/builtin/subagents/src/agents/agent-management-helpers.ts +10 -8
- package/dist/builtin/subagents/src/agents/agent-management.ts +8 -7
- package/dist/builtin/subagents/src/agents/agent-overrides.ts +2 -2
- package/dist/builtin/subagents/src/agents/agent-scope.ts +1 -1
- package/dist/builtin/subagents/src/agents/agent-selection.ts +1 -1
- package/dist/builtin/subagents/src/agents/agent-serializer.ts +24 -3
- package/dist/builtin/subagents/src/agents/agent-types.ts +3 -1
- package/dist/builtin/subagents/src/agents/agents.ts +7 -5
- package/dist/builtin/subagents/src/agents/frontmatter.ts +67 -22
- package/dist/builtin/subagents/src/agents/identity.ts +1 -1
- package/dist/builtin/subagents/src/agents/skills-paths.ts +1 -1
- package/dist/builtin/subagents/src/agents/skills.ts +64 -6
- package/dist/builtin/subagents/src/extension/config.ts +1 -1
- package/dist/builtin/subagents/src/extension/control-notices.ts +2 -2
- package/dist/builtin/subagents/src/extension/doctor.ts +15 -5
- package/dist/builtin/subagents/src/extension/fanout-child.ts +12 -12
- package/dist/builtin/subagents/src/extension/index.ts +23 -23
- package/dist/builtin/subagents/src/extension/notification-content.ts +1 -1
- package/dist/builtin/subagents/src/extension/schemas.ts +1 -1
- package/dist/builtin/subagents/src/extension/startup-maintenance.ts +3 -3
- package/dist/builtin/subagents/src/intercom/intercom-bridge.ts +3 -3
- package/dist/builtin/subagents/src/intercom/result-intercom.ts +1 -1
- package/dist/builtin/subagents/src/intercom/supervisor-authorization.ts +1 -1
- package/dist/builtin/subagents/src/runs/foreground/completion-notification.ts +2 -2
- package/dist/builtin/subagents/src/runs/foreground/execution-detach-reservations.ts +1 -1
- package/dist/builtin/subagents/src/runs/foreground/execution-intercom-detach.ts +3 -3
- package/dist/builtin/subagents/src/runs/foreground/execution-run-sync.ts +1 -1
- package/dist/builtin/subagents/src/runs/foreground/execution-updates.ts +2 -2
- package/dist/builtin/subagents/src/runs/foreground/execution-utils.ts +1 -1
- package/dist/builtin/subagents/src/runs/foreground/execution.ts +2 -2
- package/dist/builtin/subagents/src/runs/foreground/inprocess-run-sync.ts +27 -11
- package/dist/builtin/subagents/src/runs/foreground/notify.ts +3 -3
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-context.ts +11 -11
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-input.ts +3 -3
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-parallel-task.ts +15 -14
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-parallel.ts +19 -19
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-runtime.ts +2 -2
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-single.ts +14 -13
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-status.ts +9 -9
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-types.ts +7 -7
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor-worktree.ts +6 -6
- package/dist/builtin/subagents/src/runs/foreground/subagent-executor.ts +24 -23
- package/dist/builtin/subagents/src/runs/inprocess/control-registry.ts +1 -1
- package/dist/builtin/subagents/src/runs/inprocess/control-status.ts +3 -3
- package/dist/builtin/subagents/src/runs/inprocess/index.ts +3 -3
- package/dist/builtin/subagents/src/runs/inprocess/prompt-behavior.ts +17 -8
- package/dist/builtin/subagents/src/runs/inprocess/runner.ts +60 -12
- package/dist/builtin/subagents/src/runs/inprocess/runtime-support/nested-api.ts +8 -8
- package/dist/builtin/subagents/src/runs/inprocess/runtime-support/nested-control.ts +3 -3
- package/dist/builtin/subagents/src/runs/inprocess/runtime-support/nested-core.ts +4 -4
- package/dist/builtin/subagents/src/runs/inprocess/runtime-support/nested-projection.ts +4 -4
- package/dist/builtin/subagents/src/runs/inprocess/runtime-support/nested-registry.ts +5 -5
- package/dist/builtin/subagents/src/runs/inprocess/runtime-support/nested-rendering.ts +3 -3
- package/dist/builtin/subagents/src/runs/inprocess/runtime-support/nested-sanitize.ts +3 -3
- package/dist/builtin/subagents/src/runs/inprocess.ts +1 -1
- package/dist/builtin/subagents/src/runs/shared/long-running-guard.ts +1 -1
- package/dist/builtin/subagents/src/runs/shared/mcp-direct-tool-allowlist.ts +1 -1
- package/dist/builtin/subagents/src/runs/shared/model-candidate-filter.ts +3 -3
- package/dist/builtin/subagents/src/runs/shared/model-fallback.ts +2 -2
- package/dist/builtin/subagents/src/runs/shared/parallel-utils.ts +1 -1
- package/dist/builtin/subagents/src/runs/shared/single-output.ts +1 -1
- package/dist/builtin/subagents/src/runs/shared/subagent-control.ts +1 -1
- package/dist/builtin/subagents/src/shared/artifacts.ts +2 -2
- package/dist/builtin/subagents/src/shared/event-jsonl-writer.ts +1 -1
- package/dist/builtin/subagents/src/shared/fast-mode.ts +1 -1
- package/dist/builtin/subagents/src/shared/formatters.ts +2 -2
- package/dist/builtin/subagents/src/shared/jsonl-writer.ts +1 -1
- package/dist/builtin/subagents/src/shared/model-resolution.ts +1 -1
- package/dist/builtin/subagents/src/shared/session-tokens.ts +1 -1
- package/dist/builtin/subagents/src/shared/settings.ts +4 -4
- package/dist/builtin/subagents/src/shared/status-format.ts +1 -1
- package/dist/builtin/subagents/src/shared/types-config.ts +16 -4
- package/dist/builtin/subagents/src/shared/types-depth.ts +1 -1
- package/dist/builtin/subagents/src/shared/types-nested.ts +1 -1
- package/dist/builtin/subagents/src/shared/types-output.ts +1 -1
- package/dist/builtin/subagents/src/shared/types-results.ts +1 -1
- package/dist/builtin/subagents/src/shared/types-runtime.ts +1 -1
- package/dist/builtin/subagents/src/shared/types.ts +6 -6
- package/dist/builtin/subagents/src/shared/utils.ts +3 -3
- package/dist/builtin/subagents/src/slash/prompt-template-bridge.ts +1 -1
- package/dist/builtin/subagents/src/slash/slash-bridge.ts +3 -3
- package/dist/builtin/subagents/src/slash/slash-commands.ts +6 -6
- package/dist/builtin/subagents/src/slash/slash-live-state.ts +3 -3
- package/dist/builtin/subagents/src/tui/render-event-formatting.ts +2 -2
- package/dist/builtin/subagents/src/tui/render-layout.ts +1 -1
- package/dist/builtin/subagents/src/tui/render-progress.ts +2 -2
- package/dist/builtin/subagents/src/tui/render-result-compact.ts +7 -7
- package/dist/builtin/subagents/src/tui/render-result.ts +10 -10
- package/dist/builtin/subagents/src/tui/render-stable-output.ts +1 -1
- package/dist/builtin/subagents/src/tui/render-status-progress.ts +5 -5
- package/dist/builtin/subagents/src/tui/render.ts +4 -4
- package/dist/builtin/web-access/package.json +2 -2
- package/dist/builtin/workflows/CHANGELOG.md +57 -0
- package/dist/builtin/workflows/README.md +39 -8
- package/dist/builtin/workflows/builtin/adversarial-verification-runner.ts +16 -5
- package/dist/builtin/workflows/builtin/adversarial-verification.ts +4 -0
- package/dist/builtin/workflows/builtin/classify-and-act.ts +4 -0
- package/dist/builtin/workflows/builtin/fan-out-and-synthesize.ts +4 -0
- package/dist/builtin/workflows/builtin/generate-and-filter-runner.ts +12 -4
- package/dist/builtin/workflows/builtin/generate-and-filter.ts +4 -0
- package/dist/builtin/workflows/builtin/goal-models.ts +8 -10
- package/dist/builtin/workflows/builtin/goal.ts +4 -0
- package/dist/builtin/workflows/builtin/index.d.ts +0 -4
- package/dist/builtin/workflows/builtin/loop-until-done-runner.ts +4 -2
- package/dist/builtin/workflows/builtin/loop-until-done.ts +4 -0
- package/dist/builtin/workflows/builtin/open-claude-design-live-protocol.ts +305 -0
- package/dist/builtin/workflows/builtin/open-claude-design-phases.ts +115 -171
- package/dist/builtin/workflows/builtin/open-claude-design-runner.ts +9 -25
- package/dist/builtin/workflows/builtin/open-claude-design-setup.ts +19 -86
- package/dist/builtin/workflows/builtin/open-claude-design-utils.ts +0 -6
- package/dist/builtin/workflows/builtin/open-claude-design.d.ts +0 -5
- package/dist/builtin/workflows/builtin/open-claude-design.ts +11 -15
- package/dist/builtin/workflows/builtin/ralph-models.ts +24 -29
- package/dist/builtin/workflows/builtin/ralph.ts +4 -0
- package/dist/builtin/workflows/builtin/tournament-runner.ts +6 -3
- package/dist/builtin/workflows/builtin/tournament.ts +4 -0
- package/dist/builtin/workflows/package.json +2 -2
- package/dist/builtin/workflows/skills/impeccable/SKILL.md +3 -3
- package/dist/builtin/workflows/skills/impeccable/agents/impeccable_asset_producer.toml +25 -31
- package/dist/builtin/workflows/skills/impeccable/agents/impeccable_documenter.toml +1 -0
- package/dist/builtin/workflows/skills/impeccable/agents/impeccable_finish_reviewer.toml +16 -10
- package/dist/builtin/workflows/skills/impeccable/agents/impeccable_manual_edit_applier.toml +2 -2
- package/dist/builtin/workflows/skills/impeccable/reference/android.md +6 -0
- package/dist/builtin/workflows/skills/impeccable/reference/animate.md +3 -0
- package/dist/builtin/workflows/skills/impeccable/reference/bolder.md +3 -1
- package/dist/builtin/workflows/skills/impeccable/reference/craft-floor.md +6 -1
- package/dist/builtin/workflows/skills/impeccable/reference/critique.md +18 -2
- package/dist/builtin/workflows/skills/impeccable/reference/degraded/asset-producer.md +24 -30
- package/dist/builtin/workflows/skills/impeccable/reference/degraded/documenter.md +1 -0
- package/dist/builtin/workflows/skills/impeccable/reference/degraded/finish-reviewer.md +16 -10
- package/dist/builtin/workflows/skills/impeccable/reference/degraded/manual-edit-applier.md +2 -2
- package/dist/builtin/workflows/skills/impeccable/reference/distill.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/doctor.md +1 -0
- package/dist/builtin/workflows/skills/impeccable/reference/document.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/extract.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/hooks.md +12 -6
- package/dist/builtin/workflows/skills/impeccable/reference/init.md +12 -3
- package/dist/builtin/workflows/skills/impeccable/reference/ios.md +6 -0
- package/dist/builtin/workflows/skills/impeccable/reference/live-setup.md +102 -0
- package/dist/builtin/workflows/skills/impeccable/reference/live.md +113 -521
- package/dist/builtin/workflows/skills/impeccable/reference/new-work.md +39 -26
- package/dist/builtin/workflows/skills/impeccable/reference/overdrive.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/polish.md +3 -3
- package/dist/builtin/workflows/skills/impeccable/reference/quieter.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/visualize.md +25 -11
- package/dist/builtin/workflows/skills/impeccable/scripts/concept-seed.mjs +332 -221
- package/dist/builtin/workflows/skills/impeccable/scripts/context-signals.mjs +10 -19
- package/dist/builtin/workflows/skills/impeccable/scripts/context.mjs +91 -38
- package/dist/builtin/workflows/skills/impeccable/scripts/critique-storage.mjs +19 -10
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/browser/injected/index.mjs +56 -6
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/cli/main.mjs +10 -16
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/design-system.mjs +140 -2
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/detect-antipatterns-browser.js +1174 -694
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/detect-antipatterns.mjs +1 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/browser/detect-url.mjs +5 -1
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/regex/detect-text.mjs +431 -45
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/static-html/css-cascade.mjs +10 -1
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/static-html/detect-html.mjs +47 -6
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/node/file-system.mjs +23 -22
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/registry/antipatterns.mjs +0 -10
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/rules/checks.mjs +384 -384
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/color.mjs +466 -2
- package/dist/builtin/workflows/skills/impeccable/scripts/doctor.mjs +2 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/embed-prompt.mjs +270 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/generate-image.mjs +51 -6
- package/dist/builtin/workflows/skills/impeccable/scripts/hook-admin.mjs +70 -10
- package/dist/builtin/workflows/skills/impeccable/scripts/hook-lib.mjs +336 -90
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/composition-catalog.mjs +38 -3
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/concept-catalog.mjs +77 -11
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/design-parser.mjs +102 -19
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/impeccable-config.mjs +44 -59
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/is-generated.mjs +3 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/open-system-browser.mjs +57 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/roll-selection.mjs +369 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/staleness-deep.mjs +31 -3
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/staleness.mjs +73 -2
- package/dist/builtin/workflows/skills/impeccable/scripts/live/accept-css.mjs +617 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live/accept-verify.mjs +71 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live/browser-script-parts.mjs +29 -2
- package/dist/builtin/workflows/skills/impeccable/scripts/live/event-validation.mjs +54 -7
- package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/astro.mjs +47 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/detect-utils.mjs +157 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/index.mjs +143 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/journal.mjs +205 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/nextjs.mjs +49 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/nuxt.mjs +170 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/script-src.mjs +26 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/static-html.mjs +26 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/sveltekit.mjs +71 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/tag-strategy.mjs +247 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/tanstack-start.mjs +70 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/vite-generic.mjs +42 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live/instructions.mjs +169 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live/roots.mjs +670 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live/session-store.mjs +232 -35
- package/dist/builtin/workflows/skills/impeccable/scripts/live/svelte-ast.mjs +969 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live/svelte-component.mjs +621 -74
- package/dist/builtin/workflows/skills/impeccable/scripts/live/sveltekit-adapter.mjs +66 -28
- package/dist/builtin/workflows/skills/impeccable/scripts/live/tanstack-adapter.mjs +12 -12
- package/dist/builtin/workflows/skills/impeccable/scripts/live/ui-surfaces.mjs +75 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live/vocabulary.mjs +135 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live-accept.mjs +23 -37
- package/dist/builtin/workflows/skills/impeccable/scripts/live-browser.js +945 -115
- package/dist/builtin/workflows/skills/impeccable/scripts/live-complete.mjs +33 -1
- package/dist/builtin/workflows/skills/impeccable/scripts/live-copy-edit-agent.mjs +132 -15
- package/dist/builtin/workflows/skills/impeccable/scripts/live-inject.mjs +173 -425
- package/dist/builtin/workflows/skills/impeccable/scripts/live-insert.mjs +2 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live-poll.mjs +16 -3
- package/dist/builtin/workflows/skills/impeccable/scripts/live-resume.mjs +39 -10
- package/dist/builtin/workflows/skills/impeccable/scripts/live-server.mjs +194 -27
- package/dist/builtin/workflows/skills/impeccable/scripts/live-status.mjs +10 -4
- package/dist/builtin/workflows/skills/impeccable/scripts/live-wrap.mjs +50 -31
- package/dist/builtin/workflows/skills/impeccable/scripts/live.mjs +91 -28
- package/dist/builtin/workflows/skills/impeccable/scripts/pin.mjs +8 -5
- package/dist/builtin/workflows/skills/impeccable/scripts/serve-question.mjs +759 -109
- package/dist/builtin/workflows/src/authoring/workflow.ts +9 -0
- package/dist/builtin/workflows/src/authoring.d.ts +3 -0
- package/dist/builtin/workflows/src/durable/completed-catalog.ts +23 -2
- package/dist/builtin/workflows/src/durable/dbos-backend.ts +30 -17
- package/dist/builtin/workflows/src/durable/dbos-envelope.ts +14 -0
- package/dist/builtin/workflows/src/durable/dbos-lifecycle.ts +60 -57
- package/dist/builtin/workflows/src/durable/dbos-process-owner.ts +87 -0
- package/dist/builtin/workflows/src/durable/dbos-registration-diagnostics.ts +113 -0
- package/dist/builtin/workflows/src/durable/factory.ts +11 -8
- package/dist/builtin/workflows/src/durable/tool-failure-checkpoint.ts +5 -0
- package/dist/builtin/workflows/src/durable/tool-primitive.ts +186 -20
- package/dist/builtin/workflows/src/durable/types.ts +4 -0
- package/dist/builtin/workflows/src/durable/workflow-heartbeat-anchor.ts +153 -0
- package/dist/builtin/workflows/src/engine/run-durable-stage-session.ts +28 -0
- package/dist/builtin/workflows/src/engine/run-tool-control-registry.ts +9 -1
- package/dist/builtin/workflows/src/engine/run.ts +1 -0
- package/dist/builtin/workflows/src/extension/adopt-session-run-state.ts +20 -0
- package/dist/builtin/workflows/src/extension/background-ui-adapter.ts +9 -30
- package/dist/builtin/workflows/src/extension/extension-factory.ts +3 -0
- package/dist/builtin/workflows/src/extension/extension-lifecycle.ts +28 -10
- package/dist/builtin/workflows/src/extension/extension-runtime-state.ts +138 -0
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +3365 -1341
- package/dist/builtin/workflows/src/extension/workflow-heartbeat-delivery.ts +197 -0
- package/dist/builtin/workflows/src/extension/workflow-heartbeat-notice.ts +115 -0
- package/dist/builtin/workflows/src/extension/workflow-heartbeat-scheduler.ts +962 -0
- package/dist/builtin/workflows/src/extension/workflow-prompts.ts +4 -1
- package/dist/builtin/workflows/src/extension/workflow-schema.ts +29 -5
- package/dist/builtin/workflows/src/extension/workflow-tool-send.ts +32 -1
- package/dist/builtin/workflows/src/runs/background/cancellation-registry.ts +10 -1
- package/dist/builtin/workflows/src/runs/background/job-tracker.ts +10 -1
- package/dist/builtin/workflows/src/runs/foreground/executor-prompt-nodes.ts +16 -11
- package/dist/builtin/workflows/src/runs/foreground/stage-control-registry.ts +31 -1
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-context.ts +41 -10
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-messages.ts +48 -0
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-output.ts +4 -1
- package/dist/builtin/workflows/src/runs/foreground/stage-runner-structured-output.ts +45 -12
- package/dist/builtin/workflows/src/sdk-surface.ts +9 -0
- package/dist/builtin/workflows/src/shared/authoring-contract-ui.d.ts +10 -0
- package/dist/builtin/workflows/src/shared/authoring-contract-ui.ts +10 -0
- package/dist/builtin/workflows/src/shared/graph-store-snapshot.ts +14 -2
- package/dist/builtin/workflows/src/shared/persistence-restore.ts +12 -0
- package/dist/builtin/workflows/src/shared/prompt-answer.ts +130 -0
- package/dist/builtin/workflows/src/shared/session-scoped-singleton.ts +98 -0
- package/dist/builtin/workflows/src/shared/stage-ui-broker.ts +9 -1
- package/dist/builtin/workflows/src/shared/store-factory.ts +9 -1
- package/dist/builtin/workflows/src/shared/store-public-types.ts +2 -1
- package/dist/builtin/workflows/src/shared/store-tool-node-methods.ts +7 -0
- package/dist/builtin/workflows/src/shared/store-types.ts +18 -1
- package/dist/builtin/workflows/src/shared/tool-payload-bounds.ts +576 -0
- package/dist/builtin/workflows/src/shared/workflow-authoring-types.d.ts +1 -0
- package/dist/builtin/workflows/src/shared/workflow-authoring-types.ts +1 -0
- package/dist/builtin/workflows/src/shared/workflow-heartbeat-contract.d.ts +21 -0
- package/dist/builtin/workflows/src/shared/workflow-heartbeat-contract.ts +25 -0
- package/dist/builtin/workflows/src/tui/graph-theme.ts +8 -1
- package/dist/builtin/workflows/src/tui/graph-view-constants.ts +11 -0
- package/dist/builtin/workflows/src/tui/graph-view-input.ts +100 -5
- package/dist/builtin/workflows/src/tui/graph-view-layout.ts +42 -11
- package/dist/builtin/workflows/src/tui/graph-view-render-helpers.ts +55 -6
- package/dist/builtin/workflows/src/tui/graph-view-render.ts +71 -6
- package/dist/builtin/workflows/src/tui/graph-view-state.ts +43 -0
- package/dist/builtin/workflows/src/tui/keybindings-adapter.ts +2 -0
- package/dist/builtin/workflows/src/tui/node-card.ts +5 -1
- package/dist/builtin/workflows/src/tui/stage-chat-view-archive-history.ts +11 -2
- package/dist/builtin/workflows/src/tui/stage-chat-view.ts +36 -10
- package/dist/builtin/workflows/src/tui/switcher.ts +11 -4
- package/dist/builtin/workflows/src/tui/tool-detail.ts +348 -0
- package/dist/builtin/workflows/src/tui/workflow-status.ts +5 -2
- package/dist/cli/args.d.ts +1 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +11 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/auth-check.d.ts +1 -1
- package/dist/cli/auth-check.js.map +1 -1
- package/dist/cli/credential-print.d.ts +1 -1
- package/dist/cli/credential-print.js.map +1 -1
- package/dist/cli/list-models.d.ts +1 -1
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli/startup-ui.d.ts +9 -0
- package/dist/cli/startup-ui.d.ts.map +1 -1
- package/dist/cli/startup-ui.js +7 -1
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/core/agent-session-custom-message-commit.js +2 -2
- package/dist/core/agent-session-custom-message-commit.js.map +1 -1
- package/dist/core/agent-session-export.d.ts +6 -1
- package/dist/core/agent-session-export.d.ts.map +1 -1
- package/dist/core/agent-session-export.js +6 -3
- package/dist/core/agent-session-export.js.map +1 -1
- package/dist/core/agent-session-extension-bindings.d.ts.map +1 -1
- package/dist/core/agent-session-extension-bindings.js +6 -4
- package/dist/core/agent-session-extension-bindings.js.map +1 -1
- package/dist/core/agent-session-methods.d.ts +5 -2
- package/dist/core/agent-session-methods.d.ts.map +1 -1
- package/dist/core/agent-session-methods.js.map +1 -1
- package/dist/core/agent-session-prompt.d.ts +12 -1
- package/dist/core/agent-session-prompt.d.ts.map +1 -1
- package/dist/core/agent-session-prompt.js +31 -10
- package/dist/core/agent-session-prompt.js.map +1 -1
- package/dist/core/agent-session-runtime-auth.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +1 -1
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session-skill-block.d.ts +1 -0
- package/dist/core/agent-session-skill-block.d.ts.map +1 -1
- package/dist/core/agent-session-skill-block.js +18 -2
- package/dist/core/agent-session-skill-block.js.map +1 -1
- package/dist/core/agent-session-state.d.ts.map +1 -1
- package/dist/core/agent-session-state.js +2 -1
- package/dist/core/agent-session-state.js.map +1 -1
- package/dist/core/agent-session-types.d.ts +2 -1
- package/dist/core/agent-session-types.d.ts.map +1 -1
- package/dist/core/agent-session-types.js.map +1 -1
- package/dist/core/agent-session.d.ts +1 -1
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/atomic-guide-command.js +2 -2
- package/dist/core/atomic-guide-command.js.map +1 -1
- package/dist/core/builtin-packages.d.ts.map +1 -1
- package/dist/core/builtin-packages.js +0 -6
- package/dist/core/builtin-packages.js.map +1 -1
- package/dist/core/cloudflare-gateway-binding.d.ts +11 -0
- package/dist/core/cloudflare-gateway-binding.d.ts.map +1 -0
- package/dist/core/cloudflare-gateway-binding.js +11 -0
- package/dist/core/cloudflare-gateway-binding.js.map +1 -0
- package/dist/core/codex-fast-mode-transport.d.ts +12 -0
- package/dist/core/codex-fast-mode-transport.d.ts.map +1 -0
- package/dist/core/codex-fast-mode-transport.js +130 -0
- package/dist/core/codex-fast-mode-transport.js.map +1 -0
- package/dist/core/codex-fast-mode.d.ts +20 -6
- package/dist/core/codex-fast-mode.d.ts.map +1 -1
- package/dist/core/codex-fast-mode.js +111 -3
- package/dist/core/codex-fast-mode.js.map +1 -1
- package/dist/core/diagnostics.d.ts +4 -0
- package/dist/core/diagnostics.d.ts.map +1 -1
- package/dist/core/diagnostics.js.map +1 -1
- package/dist/core/event-bus.d.ts +12 -0
- package/dist/core/event-bus.d.ts.map +1 -1
- package/dist/core/event-bus.js +22 -0
- package/dist/core/event-bus.js.map +1 -1
- package/dist/core/experimental.d.ts +25 -0
- package/dist/core/experimental.d.ts.map +1 -1
- package/dist/core/experimental.js +24 -0
- package/dist/core/experimental.js.map +1 -1
- package/dist/core/export-html/template-js/tree-filter-render.js +4 -3
- package/dist/core/export-html/template.js +4 -3
- package/dist/core/extension-session-state.d.ts +28 -0
- package/dist/core/extension-session-state.d.ts.map +1 -0
- package/dist/core/extension-session-state.js +55 -0
- package/dist/core/extension-session-state.js.map +1 -0
- package/dist/core/extensions/api-types.d.ts +6 -0
- package/dist/core/extensions/api-types.d.ts.map +1 -1
- package/dist/core/extensions/api-types.js.map +1 -1
- package/dist/core/extensions/context-types.d.ts +4 -0
- package/dist/core/extensions/context-types.d.ts.map +1 -1
- package/dist/core/extensions/context-types.js.map +1 -1
- package/dist/core/extensions/index.d.ts +1 -0
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js +1 -0
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader-api.d.ts +1 -1
- package/dist/core/extensions/loader-api.d.ts.map +1 -1
- package/dist/core/extensions/loader-api.js +16 -10
- package/dist/core/extensions/loader-api.js.map +1 -1
- package/dist/core/extensions/loader-virtual-modules.d.ts.map +1 -1
- package/dist/core/extensions/loader-virtual-modules.js +12 -1
- package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
- package/dist/core/extensions/runner-context.d.ts +2 -0
- package/dist/core/extensions/runner-context.d.ts.map +1 -1
- package/dist/core/extensions/runner-context.js +8 -0
- package/dist/core/extensions/runner-context.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +1 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +3 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/runtime-types.d.ts +3 -0
- package/dist/core/extensions/runtime-types.d.ts.map +1 -1
- package/dist/core/extensions/runtime-types.js.map +1 -1
- package/dist/core/extensions/ui-types.d.ts +26 -0
- package/dist/core/extensions/ui-types.d.ts.map +1 -1
- package/dist/core/extensions/ui-types.js +17 -1
- package/dist/core/extensions/ui-types.js.map +1 -1
- package/dist/core/http-dispatcher.d.ts.map +1 -1
- package/dist/core/http-dispatcher.js +5 -0
- package/dist/core/http-dispatcher.js.map +1 -1
- package/dist/core/keybindings.d.ts +24 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +6 -0
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/model-config.d.ts +5 -0
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +1 -0
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-registry.d.ts +1 -1
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver-cli.d.ts +1 -1
- package/dist/core/model-resolver-cli.js.map +1 -1
- package/dist/core/model-resolver-defaults.js +3 -3
- package/dist/core/model-resolver-defaults.js.map +1 -1
- package/dist/core/model-resolver-initial.d.ts +1 -1
- package/dist/core/model-resolver-initial.js.map +1 -1
- package/dist/core/model-resolver-scope.d.ts +1 -1
- package/dist/core/model-resolver-scope.js.map +1 -1
- package/dist/core/model-runtime.d.ts +54 -0
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +96 -13
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/oauth-login.js.map +1 -1
- package/dist/core/project-trust.d.ts +10 -0
- package/dist/core/project-trust.d.ts.map +1 -1
- package/dist/core/project-trust.js +12 -0
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/resource-loader-assets.d.ts.map +1 -1
- package/dist/core/resource-loader-assets.js +14 -5
- package/dist/core/resource-loader-assets.js.map +1 -1
- package/dist/core/resource-loader-core.d.ts +3 -0
- package/dist/core/resource-loader-core.d.ts.map +1 -1
- package/dist/core/resource-loader-core.js +5 -0
- package/dist/core/resource-loader-core.js.map +1 -1
- package/dist/core/resource-loader-internals.d.ts +2 -0
- package/dist/core/resource-loader-internals.d.ts.map +1 -1
- package/dist/core/resource-loader-internals.js.map +1 -1
- package/dist/core/resource-loader-reload.d.ts.map +1 -1
- package/dist/core/resource-loader-reload.js +2 -0
- package/dist/core/resource-loader-reload.js.map +1 -1
- package/dist/core/resource-loader-types.d.ts +2 -0
- package/dist/core/resource-loader-types.d.ts.map +1 -1
- package/dist/core/resource-loader-types.js.map +1 -1
- package/dist/core/resource-loader.d.ts +2 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +1 -0
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sdk-types.d.ts +7 -6
- package/dist/core/sdk-types.d.ts.map +1 -1
- package/dist/core/sdk-types.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +17 -6
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager-core.d.ts +7 -1
- package/dist/core/session-manager-core.d.ts.map +1 -1
- package/dist/core/session-manager-core.js +11 -2
- package/dist/core/session-manager-core.js.map +1 -1
- package/dist/core/session-manager-entries.d.ts +2 -2
- package/dist/core/session-manager-entries.d.ts.map +1 -1
- package/dist/core/session-manager-entries.js +6 -4
- package/dist/core/session-manager-entries.js.map +1 -1
- package/dist/core/session-manager-list.d.ts.map +1 -1
- package/dist/core/session-manager-list.js +5 -1
- package/dist/core/session-manager-list.js.map +1 -1
- package/dist/core/session-manager-types.d.ts +25 -2
- package/dist/core/session-manager-types.d.ts.map +1 -1
- package/dist/core/session-manager-types.js.map +1 -1
- package/dist/core/session-manager.d.ts +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager-basic-accessors.d.ts +1 -0
- package/dist/core/settings-manager-basic-accessors.d.ts.map +1 -1
- package/dist/core/settings-manager-basic-accessors.js +8 -0
- package/dist/core/settings-manager-basic-accessors.js.map +1 -1
- package/dist/core/settings-manager-ui-accessors.d.ts +3 -1
- package/dist/core/settings-manager-ui-accessors.d.ts.map +1 -1
- package/dist/core/settings-manager-ui-accessors.js +9 -0
- package/dist/core/settings-manager-ui-accessors.js.map +1 -1
- package/dist/core/settings-manager.d.ts +1 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-types.d.ts +4 -0
- package/dist/core/settings-types.d.ts.map +1 -1
- package/dist/core/settings-types.js.map +1 -1
- package/dist/core/skill-catalog.d.ts +35 -0
- package/dist/core/skill-catalog.d.ts.map +1 -0
- package/dist/core/skill-catalog.js +264 -0
- package/dist/core/skill-catalog.js.map +1 -0
- package/dist/core/skills-async.d.ts.map +1 -1
- package/dist/core/skills-async.js +12 -6
- package/dist/core/skills-async.js.map +1 -1
- package/dist/core/skills.d.ts +2 -0
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +8 -5
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -5
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/system-prompt.js +2 -2
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/ask-user-question/ask-user-question.d.ts +25 -2
- package/dist/core/tools/ask-user-question/ask-user-question.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/ask-user-question.js +47 -18
- package/dist/core/tools/ask-user-question/ask-user-question.js.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/multi-select-view.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/multi-select-view.js +5 -2
- package/dist/core/tools/ask-user-question/view/components/multi-select-view.js.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/submit-picker.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/submit-picker.js +3 -1
- package/dist/core/tools/ask-user-question/view/components/submit-picker.js.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/wrapping-select.d.ts.map +1 -1
- package/dist/core/tools/ask-user-question/view/components/wrapping-select.js +8 -1
- package/dist/core/tools/ask-user-question/view/components/wrapping-select.js.map +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +2 -0
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +2 -0
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +3 -1
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.js +1 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/hashline-engine/format.d.ts +2 -0
- package/dist/core/tools/hashline-engine/format.d.ts.map +1 -1
- package/dist/core/tools/hashline-engine/format.js +4 -2
- package/dist/core/tools/hashline-engine/format.js.map +1 -1
- package/dist/core/tools/hashline-engine/messages.d.ts +2 -0
- package/dist/core/tools/hashline-engine/messages.d.ts.map +1 -1
- package/dist/core/tools/hashline-engine/messages.js +4 -2
- package/dist/core/tools/hashline-engine/messages.js.map +1 -1
- package/dist/core/tools/hashline-engine/parser.d.ts.map +1 -1
- package/dist/core/tools/hashline-engine/parser.js +16 -4
- package/dist/core/tools/hashline-engine/parser.js.map +1 -1
- package/dist/core/tools/hashline-engine/tokenizer.d.ts.map +1 -1
- package/dist/core/tools/hashline-engine/tokenizer.js +37 -27
- package/dist/core/tools/hashline-engine/tokenizer.js.map +1 -1
- package/dist/core/tools/hashline.d.ts.map +1 -1
- package/dist/core/tools/hashline.js +8 -2
- package/dist/core/tools/hashline.js.map +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +2 -0
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +8 -1
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/search.d.ts.map +1 -1
- package/dist/core/tools/search.js +2 -0
- package/dist/core/tools/search.js.map +1 -1
- package/dist/core/tools/todos.d.ts +3 -12
- package/dist/core/tools/todos.d.ts.map +1 -1
- package/dist/core/tools/todos.js +19 -4
- package/dist/core/tools/todos.js.map +1 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +2 -0
- package/dist/core/tools/write.js.map +1 -1
- package/dist/index-extensions.d.ts +1 -1
- package/dist/index-extensions.d.ts.map +1 -1
- package/dist/index-extensions.js +1 -1
- package/dist/index-extensions.js.map +1 -1
- package/dist/index.d.ts +8 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/main-runtime-api-key.d.ts +1 -1
- package/dist/main-runtime-api-key.js.map +1 -1
- package/dist/main-session-options.d.ts +1 -1
- package/dist/main-session-options.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +10 -2
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-rendering.js +1 -1
- package/dist/modes/interactive/components/chat-session-host-rendering.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-state.d.ts +8 -0
- package/dist/modes/interactive/components/chat-session-host-state.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host-state.js +8 -0
- package/dist/modes/interactive/components/chat-session-host-state.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.d.ts +26 -0
- package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.js +38 -0
- package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
- package/dist/modes/interactive/components/chat-transcript.d.ts +37 -0
- package/dist/modes/interactive/components/chat-transcript.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-transcript.js +54 -1
- package/dist/modes/interactive/components/chat-transcript.js.map +1 -1
- package/dist/modes/interactive/components/fast-mode-selector.js +1 -1
- package/dist/modes/interactive/components/fast-mode-selector.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +2 -1
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +1 -1
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/reserved-bottom-overlay.d.ts +95 -0
- package/dist/modes/interactive/components/reserved-bottom-overlay.d.ts.map +1 -0
- package/dist/modes/interactive/components/reserved-bottom-overlay.js +234 -0
- package/dist/modes/interactive/components/reserved-bottom-overlay.js.map +1 -0
- package/dist/modes/interactive/components/session-selector-search.d.ts +4 -0
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.js +4 -0
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-handlers.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-handlers.js +3 -0
- package/dist/modes/interactive/components/settings-selector-handlers.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-items.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-items.js +7 -0
- package/dist/modes/interactive/components/settings-selector-items.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector-types.d.ts +3 -1
- package/dist/modes/interactive/components/settings-selector-types.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +12 -1
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/interactive-auth-login.js.map +1 -1
- package/dist/modes/interactive/interactive-auth-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-autocomplete.js +5 -4
- package/dist/modes/interactive/interactive-autocomplete.js.map +1 -1
- package/dist/modes/interactive/interactive-bash-compact.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-bash-compact.js +2 -2
- package/dist/modes/interactive/interactive-bash-compact.js.map +1 -1
- package/dist/modes/interactive/interactive-extension-custom-ui.js +94 -6
- package/dist/modes/interactive/interactive-extension-custom-ui.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.d.ts +41 -3
- package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-base.js +80 -11
- package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts +9 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-types.d.ts +2 -0
- package/dist/modes/interactive/interactive-mode-types.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-types.js.map +1 -1
- package/dist/modes/interactive/interactive-model-catalog-startup.d.ts +8 -1
- package/dist/modes/interactive/interactive-model-catalog-startup.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-model-catalog-startup.js +13 -3
- package/dist/modes/interactive/interactive-model-catalog-startup.js.map +1 -1
- package/dist/modes/interactive/interactive-model-routing.js +3 -4
- package/dist/modes/interactive/interactive-model-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-render-chat.js +6 -0
- package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
- package/dist/modes/interactive/interactive-resource-disclosure.js +2 -2
- package/dist/modes/interactive/interactive-resource-disclosure.js.map +1 -1
- package/dist/modes/interactive/interactive-selectors.js +7 -3
- package/dist/modes/interactive/interactive-selectors.js.map +1 -1
- package/dist/modes/interactive/interactive-session-runtime.js +7 -1
- package/dist/modes/interactive/interactive-session-runtime.js.map +1 -1
- package/dist/modes/interactive/interactive-slash-commands.js +2 -2
- package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
- package/dist/modes/interactive/interactive-startup.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-startup.js +34 -9
- package/dist/modes/interactive/interactive-startup.js.map +1 -1
- package/dist/modes/interactive/interactive-tui.d.ts +21 -1
- package/dist/modes/interactive/interactive-tui.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-tui.js +140 -38
- package/dist/modes/interactive/interactive-tui.js.map +1 -1
- package/dist/modes/interactive/model-catalog-refresh.d.ts +17 -0
- package/dist/modes/interactive/model-catalog-refresh.d.ts.map +1 -0
- package/dist/modes/interactive/model-catalog-refresh.js +84 -0
- package/dist/modes/interactive/model-catalog-refresh.js.map +1 -0
- package/dist/modes/interactive/theme/dark.json +2 -0
- package/dist/modes/interactive/theme/light.json +2 -0
- package/dist/modes/interactive/theme/theme-class.d.ts +12 -3
- package/dist/modes/interactive/theme/theme-class.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-class.js +6 -1
- package/dist/modes/interactive/theme/theme-class.js.map +1 -1
- package/dist/modes/interactive/theme/theme-controller.d.ts +10 -2
- package/dist/modes/interactive/theme/theme-controller.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-controller.js +23 -10
- package/dist/modes/interactive/theme/theme-controller.js.map +1 -1
- package/dist/modes/interactive/theme/theme-loading.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-loading.js +1 -0
- package/dist/modes/interactive/theme/theme-loading.js.map +1 -1
- package/dist/modes/interactive/theme/theme-schema.d.ts +8 -0
- package/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme-schema.js +3 -1
- package/dist/modes/interactive/theme/theme-schema.js.map +1 -1
- package/dist/modes/interactive/theme/theme-schema.json +9 -1
- package/dist/modes/interactive-engine/engine-custom-ui.d.ts +2 -0
- package/dist/modes/interactive-engine/engine-custom-ui.d.ts.map +1 -1
- package/dist/modes/interactive-engine/engine-custom-ui.js +1 -0
- package/dist/modes/interactive-engine/engine-custom-ui.js.map +1 -1
- package/dist/modes/interactive-engine/protocol.d.ts +1 -0
- package/dist/modes/interactive-engine/protocol.d.ts.map +1 -1
- package/dist/modes/interactive-engine/protocol.js +1 -0
- package/dist/modes/interactive-engine/protocol.js.map +1 -1
- package/dist/modes/interactive-engine/remote-component.d.ts +3 -1
- package/dist/modes/interactive-engine/remote-component.d.ts.map +1 -1
- package/dist/modes/interactive-engine/remote-component.js +3 -2
- package/dist/modes/interactive-engine/remote-component.js.map +1 -1
- package/dist/modes/json-event.d.ts +6 -1
- package/dist/modes/json-event.d.ts.map +1 -1
- package/dist/modes/json-event.js +17 -2
- package/dist/modes/json-event.js.map +1 -1
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-command-handler.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-command-handler.js +5 -4
- package/dist/modes/rpc/rpc-command-handler.js.map +1 -1
- package/dist/modes/rpc/rpc-provider-auth.js.map +1 -1
- package/dist/modes/rpc/rpc-responses.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/server/create-harness.d.ts.map +1 -1
- package/dist/server/create-harness.js +11 -0
- package/dist/server/create-harness.js.map +1 -1
- package/dist/utils/abort.d.ts +9 -0
- package/dist/utils/abort.d.ts.map +1 -0
- package/dist/utils/abort.js +19 -0
- package/dist/utils/abort.js.map +1 -0
- package/dist/utils/tools-manager.d.ts +16 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +19 -19
- package/dist/utils/tools-manager.js.map +1 -1
- package/docs/custom-provider.md +9 -8
- package/docs/development.md +0 -1
- package/docs/docs.json +0 -1
- package/docs/environment-variables.md +3 -0
- package/docs/extensions.md +100 -2
- package/docs/json.md +3 -1
- package/docs/keybindings.md +8 -3
- package/docs/models/artificial-analysis-index.md +2 -2
- package/docs/models/model-selection.md +32 -23
- package/docs/models/pareto-efficiency.md +25 -24
- package/docs/providers.md +95 -2
- package/docs/quickstart.md +4 -2
- package/docs/rpc.md +21 -7
- package/docs/sdk.md +26 -1
- package/docs/session-format.md +5 -2
- package/docs/settings.md +34 -3
- package/docs/skills.md +16 -1
- package/docs/terminal-setup.md +15 -2
- package/docs/themes.md +22 -4
- package/docs/tools.md +3 -1
- package/docs/tui.md +2 -0
- package/docs/usage.md +5 -4
- package/docs/workflows.md +96 -19
- package/npm-shrinkwrap.json +211 -232
- package/package.json +8 -8
- package/dist/builtin/i-have-adhd/CHANGELOG.md +0 -30
- package/dist/builtin/i-have-adhd/LICENSE +0 -21
- package/dist/builtin/i-have-adhd/README.md +0 -18
- package/dist/builtin/i-have-adhd/index.ts +0 -238
- package/dist/builtin/i-have-adhd/package.json +0 -56
- package/dist/builtin/i-have-adhd/skills/i-have-adhd/SKILL.md +0 -140
- package/dist/builtin/workflows/builtin/open-claude-design-feedback.ts +0 -359
- package/dist/builtin/workflows/skills/impeccable/scripts/live/ui-core.mjs +0 -180
- package/docs/i-have-adhd.md +0 -36
|
@@ -35,6 +35,7 @@ export { detectUrl, createBrowserDetector } from './engines/browser/detect-url.m
|
|
|
35
35
|
export { detectText, extractStyleBlocks, extractCSSinJS } from './engines/regex/detect-text.mjs';
|
|
36
36
|
export {
|
|
37
37
|
walkDir,
|
|
38
|
+
hasScannableExtension,
|
|
38
39
|
SCANNABLE_EXTENSIONS,
|
|
39
40
|
SKIP_DIRS,
|
|
40
41
|
buildImportGraph,
|
package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/browser/detect-url.mjs
CHANGED
|
@@ -34,7 +34,11 @@ async function launchBrowser(puppeteer, { headless = true, args = [] } = {}) {
|
|
|
34
34
|
try {
|
|
35
35
|
return await puppeteer.default.launch({ headless, args });
|
|
36
36
|
} catch (err) {
|
|
37
|
-
|
|
37
|
+
// Keep the original channel failure without risking a second TypeError if
|
|
38
|
+
// a nonstandard launcher rejects with a primitive instead of an Error.
|
|
39
|
+
if (channelError && err && (typeof err === 'object' || typeof err === 'function') && err.cause === undefined) {
|
|
40
|
+
err.cause = channelError;
|
|
41
|
+
}
|
|
38
42
|
throw err;
|
|
39
43
|
}
|
|
40
44
|
}
|
package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/regex/detect-text.mjs
CHANGED
|
@@ -12,7 +12,8 @@ import { profileFindings, profileStep } from '../../profile/profiler.mjs';
|
|
|
12
12
|
// Regex fallback (non-HTML files: CSS, JSX, TSX, etc.)
|
|
13
13
|
// ---------------------------------------------------------------------------
|
|
14
14
|
|
|
15
|
-
const hasRounded = (line) =>
|
|
15
|
+
const hasRounded = (line) =>
|
|
16
|
+
/\brounded(?:-\w+)?\b/.test(line.replace(/\brounded-none\b/g, ''));
|
|
16
17
|
const hasBorderRadius = (line) => /border-radius/i.test(line);
|
|
17
18
|
const isSafeElement = (line) => /<(?:blockquote|nav[\s>]|pre[\s>]|code[\s>]|a\s|input[\s>]|span[\s>])/i.test(line);
|
|
18
19
|
|
|
@@ -37,6 +38,221 @@ function shouldRunPageAnalyzers(content, filePath) {
|
|
|
37
38
|
return !ext || PAGE_ANALYZER_EXTS.has(ext);
|
|
38
39
|
}
|
|
39
40
|
|
|
41
|
+
const JS_SOURCE_EXTS = new Set(['.js', '.jsx', '.ts', '.tsx', '.mjs', '.cjs']);
|
|
42
|
+
const REGEX_PREFIX_KEYWORDS = new Set(['await', 'case', 'default', 'delete', 'do', 'else', 'in', 'instanceof', 'new', 'of', 'return', 'throw', 'typeof', 'void', 'yield']);
|
|
43
|
+
const BLOCK_BRACE_PREFIX_KEYWORDS = new Set(['do', 'else', 'finally', 'try']);
|
|
44
|
+
|
|
45
|
+
function isInsideOpeningJsxTag(source) {
|
|
46
|
+
const tagStart = source.lastIndexOf('<');
|
|
47
|
+
if (tagStart === -1 || !/^<[A-Za-z][\w.:-]*/.test(source.slice(tagStart))) return false;
|
|
48
|
+
|
|
49
|
+
let quote = '';
|
|
50
|
+
for (let cursor = tagStart + 1; cursor < source.length; cursor++) {
|
|
51
|
+
const char = source[cursor];
|
|
52
|
+
if (quote) {
|
|
53
|
+
if (char === '\\') cursor++;
|
|
54
|
+
else if (char === quote) quote = '';
|
|
55
|
+
} else if (char === "'" || char === '"') {
|
|
56
|
+
quote = char;
|
|
57
|
+
} else if (char === '>') {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Blank JavaScript comments without moving any following source. Regex
|
|
66
|
+
* findings keep their original line numbers, while prose examples inside
|
|
67
|
+
* comments cannot masquerade as rendered markup.
|
|
68
|
+
*/
|
|
69
|
+
function stripJsComments(content, options = {}) {
|
|
70
|
+
let state = 'code';
|
|
71
|
+
let output = '';
|
|
72
|
+
let lastSignificant = '';
|
|
73
|
+
let previousSignificant = '';
|
|
74
|
+
let antePreviousSignificant = '';
|
|
75
|
+
let currentWord = '';
|
|
76
|
+
let currentWordPrefix = '';
|
|
77
|
+
let wordSeparated = false;
|
|
78
|
+
let regexCharClass = false;
|
|
79
|
+
let jsxExpressionDepth = 0;
|
|
80
|
+
let lastClosedBraceKind = '';
|
|
81
|
+
const braceKinds = [];
|
|
82
|
+
const templateExpressionDepths = [];
|
|
83
|
+
|
|
84
|
+
const braceKind = (startsJsxExpression = false) => (
|
|
85
|
+
!startsJsxExpression && (
|
|
86
|
+
!lastSignificant ||
|
|
87
|
+
lastSignificant === ')' ||
|
|
88
|
+
lastSignificant === ';' ||
|
|
89
|
+
lastSignificant === '}' ||
|
|
90
|
+
(previousSignificant === '=' && lastSignificant === '>') ||
|
|
91
|
+
BLOCK_BRACE_PREFIX_KEYWORDS.has(currentWord)
|
|
92
|
+
) ? 'block' : 'expression'
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
const recordSignificant = (char) => {
|
|
96
|
+
if (/\s/.test(char)) {
|
|
97
|
+
wordSeparated = true;
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
const isWordChar = /[\w$]/.test(char);
|
|
101
|
+
if (isWordChar && (wordSeparated || !currentWord)) {
|
|
102
|
+
currentWord = '';
|
|
103
|
+
currentWordPrefix = lastSignificant;
|
|
104
|
+
} else if (!isWordChar) {
|
|
105
|
+
currentWordPrefix = '';
|
|
106
|
+
}
|
|
107
|
+
wordSeparated = false;
|
|
108
|
+
antePreviousSignificant = previousSignificant;
|
|
109
|
+
previousSignificant = lastSignificant;
|
|
110
|
+
lastSignificant = char;
|
|
111
|
+
currentWord = isWordChar ? currentWord + char : '';
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
for (let i = 0; i < content.length; i++) {
|
|
115
|
+
const char = content[i];
|
|
116
|
+
const next = content[i + 1];
|
|
117
|
+
|
|
118
|
+
if (state === 'line-comment') {
|
|
119
|
+
if (char === '\n') {
|
|
120
|
+
output += char;
|
|
121
|
+
state = 'code';
|
|
122
|
+
} else {
|
|
123
|
+
output += ' ';
|
|
124
|
+
}
|
|
125
|
+
continue;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (state === 'block-comment') {
|
|
129
|
+
if (char === '*' && next === '/') {
|
|
130
|
+
output += ' ';
|
|
131
|
+
i++;
|
|
132
|
+
state = 'code';
|
|
133
|
+
} else {
|
|
134
|
+
output += char === '\n' ? '\n' : ' ';
|
|
135
|
+
}
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
if (state === 'regex') {
|
|
140
|
+
output += char;
|
|
141
|
+
if (char === '\\' && next) {
|
|
142
|
+
output += next;
|
|
143
|
+
i++;
|
|
144
|
+
} else if (char === '[') {
|
|
145
|
+
regexCharClass = true;
|
|
146
|
+
} else if (char === ']') {
|
|
147
|
+
regexCharClass = false;
|
|
148
|
+
} else if (char === '/' && !regexCharClass) {
|
|
149
|
+
state = 'code';
|
|
150
|
+
recordSignificant('/');
|
|
151
|
+
}
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (state === 'template' && char === '$' && next === '{') {
|
|
156
|
+
output += '${';
|
|
157
|
+
i++;
|
|
158
|
+
recordSignificant('$');
|
|
159
|
+
recordSignificant('{');
|
|
160
|
+
templateExpressionDepths.push(1);
|
|
161
|
+
braceKinds.push('expression');
|
|
162
|
+
if (jsxExpressionDepth) jsxExpressionDepth++;
|
|
163
|
+
state = 'code';
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if (state !== 'code') {
|
|
168
|
+
output += char;
|
|
169
|
+
if (char === '\\' && next) {
|
|
170
|
+
output += next;
|
|
171
|
+
i++;
|
|
172
|
+
} else if (
|
|
173
|
+
(state === 'single-quote' && char === "'") ||
|
|
174
|
+
(state === 'double-quote' && char === '"') ||
|
|
175
|
+
(state === 'template' && char === '`')
|
|
176
|
+
) {
|
|
177
|
+
state = 'code';
|
|
178
|
+
recordSignificant(char);
|
|
179
|
+
}
|
|
180
|
+
continue;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
const jsxUrlSeparator = options.jsx && char === '/' && next === '/' &&
|
|
184
|
+
jsxExpressionDepth === 0 &&
|
|
185
|
+
(output.endsWith('http:') ||
|
|
186
|
+
output.endsWith('https:') ||
|
|
187
|
+
(/<[A-Za-z](?:[^>]*[^/])?>[^<]*$/.test(output.slice(output.lastIndexOf('\n') + 1)) &&
|
|
188
|
+
/^[\w.-]+\.[A-Za-z]{2,}(?=[:/?#\s<]|$)/.test(content.slice(i + 2))));
|
|
189
|
+
const afterPostfixUpdate = (lastSignificant === '+' || lastSignificant === '-') &&
|
|
190
|
+
previousSignificant === lastSignificant &&
|
|
191
|
+
antePreviousSignificant !== lastSignificant;
|
|
192
|
+
if (char === '/' && next === '/' && jsxUrlSeparator) {
|
|
193
|
+
output += '//';
|
|
194
|
+
i++;
|
|
195
|
+
recordSignificant('/');
|
|
196
|
+
recordSignificant('/');
|
|
197
|
+
} else if (char === '/' && next === '/') {
|
|
198
|
+
output += ' ';
|
|
199
|
+
i++;
|
|
200
|
+
state = 'line-comment';
|
|
201
|
+
} else if (char === '/' && next === '*') {
|
|
202
|
+
output += ' ';
|
|
203
|
+
i++;
|
|
204
|
+
state = 'block-comment';
|
|
205
|
+
} else if (templateExpressionDepths.length && char === '{') {
|
|
206
|
+
output += char;
|
|
207
|
+
templateExpressionDepths[templateExpressionDepths.length - 1]++;
|
|
208
|
+
braceKinds.push(braceKind());
|
|
209
|
+
if (jsxExpressionDepth) jsxExpressionDepth++;
|
|
210
|
+
recordSignificant(char);
|
|
211
|
+
} else if (templateExpressionDepths.length && char === '}') {
|
|
212
|
+
output += char;
|
|
213
|
+
const depthIndex = templateExpressionDepths.length - 1;
|
|
214
|
+
templateExpressionDepths[depthIndex]--;
|
|
215
|
+
lastClosedBraceKind = braceKinds.pop() || '';
|
|
216
|
+
if (jsxExpressionDepth) jsxExpressionDepth--;
|
|
217
|
+
recordSignificant(char);
|
|
218
|
+
if (templateExpressionDepths[depthIndex] === 0) {
|
|
219
|
+
templateExpressionDepths.pop();
|
|
220
|
+
state = 'template';
|
|
221
|
+
}
|
|
222
|
+
} else if (
|
|
223
|
+
char === '/' &&
|
|
224
|
+
(!lastSignificant ||
|
|
225
|
+
(/[=([{!?:;,&|+\-*%^~<>]/.test(lastSignificant) && !afterPostfixUpdate) ||
|
|
226
|
+
(lastSignificant === '}' && lastClosedBraceKind === 'block') ||
|
|
227
|
+
(previousSignificant === '=' && lastSignificant === '>') ||
|
|
228
|
+
(currentWordPrefix !== '.' && REGEX_PREFIX_KEYWORDS.has(currentWord)))
|
|
229
|
+
) {
|
|
230
|
+
output += char;
|
|
231
|
+
state = 'regex';
|
|
232
|
+
regexCharClass = false;
|
|
233
|
+
} else {
|
|
234
|
+
output += char;
|
|
235
|
+
const startsJsxExpression = options.jsx && char === '{' && jsxExpressionDepth === 0 &&
|
|
236
|
+
(/<[A-Za-z](?:[^>]*[^/])?>[^<]*$/.test(output.slice(output.lastIndexOf('\n') + 1, -1)) ||
|
|
237
|
+
isInsideOpeningJsxTag(output.slice(0, -1)));
|
|
238
|
+
if (char === '{') braceKinds.push(braceKind(startsJsxExpression));
|
|
239
|
+
else if (char === '}') lastClosedBraceKind = braceKinds.pop() || '';
|
|
240
|
+
if (char === '{' && (jsxExpressionDepth || startsJsxExpression)) jsxExpressionDepth++;
|
|
241
|
+
else if (char === '}' && jsxExpressionDepth) jsxExpressionDepth--;
|
|
242
|
+
recordSignificant(char);
|
|
243
|
+
if (char === "'") state = 'single-quote';
|
|
244
|
+
else if (char === '"') state = 'double-quote';
|
|
245
|
+
else if (char === '`') state = 'template';
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
return output;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
function stripCssComments(content) {
|
|
253
|
+
return content.replace(/\/\*[\s\S]*?\*\//g, comment => comment.replace(/[^\n]/g, ' '));
|
|
254
|
+
}
|
|
255
|
+
|
|
40
256
|
function firstOverusedGoogleFont(text) {
|
|
41
257
|
return extractGoogleFontFamilies(text).find(f => OVERUSED_FONTS.has(f)) || '';
|
|
42
258
|
}
|
|
@@ -206,25 +422,28 @@ const REGEX_MATCHERS = [
|
|
|
206
422
|
},
|
|
207
423
|
fmt: (m) => `cubic-bezier(${m[1]}, ${m[2]}, ${m[3]}, ${m[4]})` },
|
|
208
424
|
// --- Layout property transition ---
|
|
209
|
-
|
|
425
|
+
// JSX inline style objects use comma-delimited quoted values, not semicolons (issue #548).
|
|
426
|
+
{ id: 'layout-transition', regex: /transition\s*:\s*(?:(['"])((?:(?!\1)[^\\]|\\.)*)\1|([^;{}]+))/gi,
|
|
210
427
|
test: (m) => {
|
|
211
|
-
const val = m[
|
|
428
|
+
const val = (m[2] ?? m[3] ?? '').toLowerCase();
|
|
212
429
|
if (/\ball\b/.test(val)) return false;
|
|
213
430
|
return /\b(?:(?:max|min)-)?(?:width|height)\b|\bpadding\b|\bmargin\b/.test(val);
|
|
214
431
|
},
|
|
215
432
|
fmt: (m) => {
|
|
216
|
-
const
|
|
217
|
-
|
|
433
|
+
const raw = m[2] ?? m[3] ?? '';
|
|
434
|
+
const found = raw.match(/\b(?:(?:max|min)-)?(?:width|height)\b|\bpadding(?:-(?:top|right|bottom|left))?\b|\bmargin(?:-(?:top|right|bottom|left))?\b/gi);
|
|
435
|
+
return `transition: ${found ? found.join(', ') : raw.trim()}`;
|
|
218
436
|
} },
|
|
219
|
-
{ id: 'layout-transition', regex: /transition-property\s*:\s*([^;{}]+)/gi,
|
|
437
|
+
{ id: 'layout-transition', regex: /transition-property\s*:\s*(?:(['"])((?:(?!\1)[^\\]|\\.)*)\1|([^;{}]+))/gi,
|
|
220
438
|
test: (m) => {
|
|
221
|
-
const val = m[
|
|
439
|
+
const val = (m[2] ?? m[3] ?? '').toLowerCase();
|
|
222
440
|
if (/\ball\b/.test(val)) return false;
|
|
223
441
|
return /\b(?:(?:max|min)-)?(?:width|height)\b|\bpadding\b|\bmargin\b/.test(val);
|
|
224
442
|
},
|
|
225
443
|
fmt: (m) => {
|
|
226
|
-
const
|
|
227
|
-
|
|
444
|
+
const raw = m[2] ?? m[3] ?? '';
|
|
445
|
+
const found = raw.match(/\b(?:(?:max|min)-)?(?:width|height)\b|\bpadding(?:-(?:top|right|bottom|left))?\b|\bmargin(?:-(?:top|right|bottom|left))?\b/gi);
|
|
446
|
+
return `transition-property: ${found ? found.join(', ') : raw.trim()}`;
|
|
228
447
|
} },
|
|
229
448
|
// --- Broken image: src="" or src="#" or src=" " ---
|
|
230
449
|
{ id: 'broken-image', regex: /<img\b[^>]*?\bsrc\s*=\s*(?:""|''|"\s+"|'\s+'|"#"|'#')/gi,
|
|
@@ -237,24 +456,6 @@ const REGEX_MATCHERS = [
|
|
|
237
456
|
];
|
|
238
457
|
|
|
239
458
|
const REGEX_ANALYZERS = [
|
|
240
|
-
// Single font
|
|
241
|
-
(content, filePath) => {
|
|
242
|
-
const fontFamilyRe = /font-family\s*:\s*([^;}]+)/gi;
|
|
243
|
-
const fonts = new Set();
|
|
244
|
-
let m;
|
|
245
|
-
while ((m = fontFamilyRe.exec(content)) !== null) {
|
|
246
|
-
for (const f of m[1].split(',').map(f => f.trim().replace(/^['"]|['"]$/g, '').toLowerCase())) {
|
|
247
|
-
if (f && !GENERIC_FONTS.has(f)) fonts.add(f);
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
for (const f of extractGoogleFontFamilies(content)) fonts.add(f);
|
|
251
|
-
if (fonts.size !== 1 || content.split('\n').length < 20) return [];
|
|
252
|
-
const name = [...fonts][0];
|
|
253
|
-
const lines = content.split('\n');
|
|
254
|
-
let line = 1;
|
|
255
|
-
for (let i = 0; i < lines.length; i++) { if (lines[i].toLowerCase().includes(name)) { line = i + 1; break; } }
|
|
256
|
-
return [finding('single-font', filePath, `only font used is ${name}`, line)];
|
|
257
|
-
},
|
|
258
459
|
// Flat type hierarchy
|
|
259
460
|
(content, filePath) => {
|
|
260
461
|
const sizes = new Set();
|
|
@@ -542,18 +743,198 @@ function extractStyleBlocks(content, ext) {
|
|
|
542
743
|
|
|
543
744
|
const CSS_IN_JS_EXTENSIONS = new Set(['.js', '.ts', '.jsx', '.tsx']);
|
|
544
745
|
|
|
746
|
+
function findQuotedStringEnd(content, start, quote) {
|
|
747
|
+
for (let cursor = start + 1; cursor < content.length; cursor++) {
|
|
748
|
+
if (content[cursor] === '\\') cursor++;
|
|
749
|
+
else if (content[cursor] === quote) return cursor;
|
|
750
|
+
}
|
|
751
|
+
return -1;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
function findRegexLiteralEnd(content, start) {
|
|
755
|
+
let inCharacterClass = false;
|
|
756
|
+
for (let cursor = start + 1; cursor < content.length; cursor++) {
|
|
757
|
+
const char = content[cursor];
|
|
758
|
+
if (char === '\\') {
|
|
759
|
+
cursor++;
|
|
760
|
+
} else if (char === '[') {
|
|
761
|
+
inCharacterClass = true;
|
|
762
|
+
} else if (char === ']') {
|
|
763
|
+
inCharacterClass = false;
|
|
764
|
+
} else if (char === '/' && !inCharacterClass) {
|
|
765
|
+
while (/[A-Za-z]/.test(content[cursor + 1] || '')) cursor++;
|
|
766
|
+
return cursor;
|
|
767
|
+
} else if (char === '\n' || char === '\r') {
|
|
768
|
+
return -1;
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
return -1;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
function findTemplateExpressionEnd(content, start) {
|
|
775
|
+
let depth = 1;
|
|
776
|
+
let lastSignificant = '';
|
|
777
|
+
let previousSignificant = '';
|
|
778
|
+
let antePreviousSignificant = '';
|
|
779
|
+
let currentWord = '';
|
|
780
|
+
let currentWordPrefix = '';
|
|
781
|
+
let wordSeparated = false;
|
|
782
|
+
let lastClosedBraceKind = '';
|
|
783
|
+
const braceKinds = [];
|
|
784
|
+
|
|
785
|
+
const braceKind = () => (
|
|
786
|
+
lastSignificant === ')' ||
|
|
787
|
+
lastSignificant === ';' ||
|
|
788
|
+
lastSignificant === '}' ||
|
|
789
|
+
(previousSignificant === '=' && lastSignificant === '>') ||
|
|
790
|
+
BLOCK_BRACE_PREFIX_KEYWORDS.has(currentWord)
|
|
791
|
+
? 'block'
|
|
792
|
+
: 'expression'
|
|
793
|
+
);
|
|
794
|
+
|
|
795
|
+
const recordSignificant = (char) => {
|
|
796
|
+
if (/\s/.test(char)) {
|
|
797
|
+
wordSeparated = true;
|
|
798
|
+
return;
|
|
799
|
+
}
|
|
800
|
+
const isWordChar = /[\w$]/.test(char);
|
|
801
|
+
if (isWordChar && (wordSeparated || !currentWord)) {
|
|
802
|
+
currentWord = '';
|
|
803
|
+
currentWordPrefix = lastSignificant;
|
|
804
|
+
} else if (!isWordChar) {
|
|
805
|
+
currentWordPrefix = '';
|
|
806
|
+
}
|
|
807
|
+
wordSeparated = false;
|
|
808
|
+
antePreviousSignificant = previousSignificant;
|
|
809
|
+
previousSignificant = lastSignificant;
|
|
810
|
+
lastSignificant = char;
|
|
811
|
+
currentWord = isWordChar ? currentWord + char : '';
|
|
812
|
+
};
|
|
813
|
+
|
|
814
|
+
for (let cursor = start; cursor < content.length; cursor++) {
|
|
815
|
+
const char = content[cursor];
|
|
816
|
+
const next = content[cursor + 1];
|
|
817
|
+
const afterPostfixUpdate = (lastSignificant === '+' || lastSignificant === '-') &&
|
|
818
|
+
previousSignificant === lastSignificant &&
|
|
819
|
+
antePreviousSignificant !== lastSignificant;
|
|
820
|
+
if (char === "'" || char === '"') {
|
|
821
|
+
cursor = findQuotedStringEnd(content, cursor, char);
|
|
822
|
+
if (cursor === -1) return -1;
|
|
823
|
+
recordSignificant(')');
|
|
824
|
+
} else if (char === '/' && next === '/') {
|
|
825
|
+
const lineEnd = content.indexOf('\n', cursor + 2);
|
|
826
|
+
if (lineEnd === -1) return -1;
|
|
827
|
+
cursor = lineEnd;
|
|
828
|
+
} else if (char === '/' && next === '*') {
|
|
829
|
+
const commentEnd = content.indexOf('*/', cursor + 2);
|
|
830
|
+
if (commentEnd === -1) return -1;
|
|
831
|
+
cursor = commentEnd + 1;
|
|
832
|
+
} else if (
|
|
833
|
+
char === '/' &&
|
|
834
|
+
(!lastSignificant ||
|
|
835
|
+
(/[=([{!?:;,&|+\-*%^~<>]/.test(lastSignificant) && !afterPostfixUpdate) ||
|
|
836
|
+
(lastSignificant === '}' && lastClosedBraceKind === 'block') ||
|
|
837
|
+
(previousSignificant === '=' && lastSignificant === '>') ||
|
|
838
|
+
(currentWordPrefix !== '.' && REGEX_PREFIX_KEYWORDS.has(currentWord)))
|
|
839
|
+
) {
|
|
840
|
+
cursor = findRegexLiteralEnd(content, cursor);
|
|
841
|
+
if (cursor === -1) return -1;
|
|
842
|
+
recordSignificant(')');
|
|
843
|
+
} else if (char === '`') {
|
|
844
|
+
cursor = findTemplateLiteralEnd(content, cursor);
|
|
845
|
+
if (cursor === -1) return -1;
|
|
846
|
+
recordSignificant(')');
|
|
847
|
+
} else if (char === '{') {
|
|
848
|
+
depth++;
|
|
849
|
+
braceKinds.push(braceKind());
|
|
850
|
+
recordSignificant(char);
|
|
851
|
+
} else if (char === '}') {
|
|
852
|
+
depth--;
|
|
853
|
+
if (depth === 0) return cursor;
|
|
854
|
+
lastClosedBraceKind = braceKinds.pop() || '';
|
|
855
|
+
recordSignificant(char);
|
|
856
|
+
} else {
|
|
857
|
+
recordSignificant(char);
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
return -1;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
function findTemplateLiteralEnd(content, start) {
|
|
864
|
+
for (let cursor = start + 1; cursor < content.length; cursor++) {
|
|
865
|
+
const char = content[cursor];
|
|
866
|
+
if (char === '\\') {
|
|
867
|
+
cursor++;
|
|
868
|
+
} else if (char === '`') {
|
|
869
|
+
return cursor;
|
|
870
|
+
} else if (char === '$' && content[cursor + 1] === '{') {
|
|
871
|
+
cursor = findTemplateExpressionEnd(content, cursor + 2);
|
|
872
|
+
if (cursor === -1) return -1;
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
return -1;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
function findCSSinJSTemplates(content) {
|
|
879
|
+
const templates = [];
|
|
880
|
+
const tagRe = /\b(?:styled(?:\.\w+|\([^)]+\))|css)/g;
|
|
881
|
+
let match;
|
|
882
|
+
while ((match = tagRe.exec(content)) !== null) {
|
|
883
|
+
let cursor = match.index + match[0].length;
|
|
884
|
+
while (/\s/.test(content[cursor] || '')) cursor++;
|
|
885
|
+
|
|
886
|
+
if (content[cursor] === '<') {
|
|
887
|
+
let depth = 0;
|
|
888
|
+
while (cursor < content.length) {
|
|
889
|
+
const char = content[cursor];
|
|
890
|
+
if (char === '<') depth++;
|
|
891
|
+
else if (char === '>' && content[cursor - 1] !== '=') depth--;
|
|
892
|
+
cursor++;
|
|
893
|
+
if (depth === 0) break;
|
|
894
|
+
}
|
|
895
|
+
if (depth !== 0) continue;
|
|
896
|
+
while (/\s/.test(content[cursor] || '')) cursor++;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
if (content[cursor] !== '`') continue;
|
|
900
|
+
const contentStart = cursor + 1;
|
|
901
|
+
cursor = findTemplateLiteralEnd(content, cursor);
|
|
902
|
+
if (cursor === -1) continue;
|
|
903
|
+
|
|
904
|
+
templates.push({
|
|
905
|
+
tagStart: match.index,
|
|
906
|
+
contentStart,
|
|
907
|
+
contentEnd: cursor,
|
|
908
|
+
});
|
|
909
|
+
tagRe.lastIndex = cursor + 1;
|
|
910
|
+
}
|
|
911
|
+
return templates;
|
|
912
|
+
}
|
|
913
|
+
|
|
545
914
|
function extractCSSinJS(content, ext) {
|
|
546
915
|
ext = ext.toLowerCase();
|
|
547
916
|
if (!CSS_IN_JS_EXTENSIONS.has(ext)) return [];
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
let m;
|
|
551
|
-
while ((m = re.exec(content)) !== null) {
|
|
552
|
-
const before = content.substring(0, m.index);
|
|
917
|
+
return findCSSinJSTemplates(content).map((template) => {
|
|
918
|
+
const before = content.substring(0, template.tagStart);
|
|
553
919
|
const startLine = before.split('\n').length;
|
|
554
|
-
|
|
920
|
+
return {
|
|
921
|
+
content: content.slice(template.contentStart, template.contentEnd),
|
|
922
|
+
startLine,
|
|
923
|
+
};
|
|
924
|
+
});
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
function stripCssInJsComments(content, ext) {
|
|
928
|
+
if (!CSS_IN_JS_EXTENSIONS.has(ext.toLowerCase())) return content;
|
|
929
|
+
const templates = findCSSinJSTemplates(content);
|
|
930
|
+
let output = '';
|
|
931
|
+
let cursor = 0;
|
|
932
|
+
for (const template of templates) {
|
|
933
|
+
output += content.slice(cursor, template.contentStart);
|
|
934
|
+
output += stripCssComments(content.slice(template.contentStart, template.contentEnd));
|
|
935
|
+
cursor = template.contentEnd;
|
|
555
936
|
}
|
|
556
|
-
return
|
|
937
|
+
return output + content.slice(cursor);
|
|
557
938
|
}
|
|
558
939
|
|
|
559
940
|
function runRegexMatchers(lines, filePath, lineOffset = 0, blockContext = null, options = {}) {
|
|
@@ -622,10 +1003,11 @@ const TEXT_CONTENT_ANALYZER_IDS = [
|
|
|
622
1003
|
function runTextContentAnalyzers(content, filePath, options = {}) {
|
|
623
1004
|
const profile = options?.profile;
|
|
624
1005
|
if (!shouldRunPageAnalyzers(content, filePath)) return [];
|
|
625
|
-
// The 3 text-content analyzers are at indices
|
|
1006
|
+
// The 3 text-content analyzers are at indices 2-4 in REGEX_ANALYZERS
|
|
1007
|
+
// (single-font's removal on 2026-07-29 shifted every index down one).
|
|
626
1008
|
const findings = [];
|
|
627
1009
|
for (let i = 0; i < TEXT_CONTENT_ANALYZER_IDS.length; i++) {
|
|
628
|
-
const analyzer = REGEX_ANALYZERS[
|
|
1010
|
+
const analyzer = REGEX_ANALYZERS[2 + i];
|
|
629
1011
|
const ruleId = TEXT_CONTENT_ANALYZER_IDS[i];
|
|
630
1012
|
findings.push(...profileFindings(profile, {
|
|
631
1013
|
engine: 'regex',
|
|
@@ -640,8 +1022,12 @@ function runTextContentAnalyzers(content, filePath, options = {}) {
|
|
|
640
1022
|
function detectText(content, filePath, options = {}) {
|
|
641
1023
|
const profile = options?.profile;
|
|
642
1024
|
const findings = [];
|
|
643
|
-
const lines = content.split('\n');
|
|
644
1025
|
const ext = extFromFilePath(filePath);
|
|
1026
|
+
const commentStrippedSource = JS_SOURCE_EXTS.has(ext) ? stripJsComments(content, {
|
|
1027
|
+
jsx: ext === '.js' || ext === '.jsx' || ext === '.tsx',
|
|
1028
|
+
}) : content;
|
|
1029
|
+
const source = stripCssInJsComments(commentStrippedSource, ext);
|
|
1030
|
+
const lines = source.split('\n');
|
|
645
1031
|
|
|
646
1032
|
// Run regex matchers on the full file content (catches Tailwind classes, inline styles)
|
|
647
1033
|
// Enable block context for CSS files where related properties span multiple lines
|
|
@@ -674,8 +1060,8 @@ function detectText(content, filePath, options = {}) {
|
|
|
674
1060
|
phase: 'source',
|
|
675
1061
|
ruleId: 'codex-grid-background',
|
|
676
1062
|
target: filePath,
|
|
677
|
-
}, () => scanCssTextForGridBackground(
|
|
678
|
-
const line =
|
|
1063
|
+
}, () => scanCssTextForGridBackground(source).map(hit => {
|
|
1064
|
+
const line = source.substring(0, hit.index).split('\n').length;
|
|
679
1065
|
return finding('codex-grid-background', filePath, hit.snippet, line);
|
|
680
1066
|
})));
|
|
681
1067
|
|
|
@@ -711,16 +1097,17 @@ function detectText(content, filePath, options = {}) {
|
|
|
711
1097
|
phase: 'extract',
|
|
712
1098
|
ruleId: 'css-in-js',
|
|
713
1099
|
target: filePath,
|
|
714
|
-
}, () => extractCSSinJS(
|
|
715
|
-
: extractCSSinJS(
|
|
1100
|
+
}, () => extractCSSinJS(source, ext))
|
|
1101
|
+
: extractCSSinJS(source, ext);
|
|
716
1102
|
for (const block of cssJsBlocks) {
|
|
717
|
-
const
|
|
1103
|
+
const blockContent = stripCssComments(block.content);
|
|
1104
|
+
const blockLines = blockContent.split('\n');
|
|
718
1105
|
findings.push(...runRegexMatchers(blockLines, filePath, block.startLine - 1, true, {
|
|
719
1106
|
profile,
|
|
720
1107
|
phase: 'css-in-js',
|
|
721
1108
|
}));
|
|
722
|
-
findings.push(...scanInsetStripeCss(
|
|
723
|
-
findings.push(...pseudoStripeFindings(
|
|
1109
|
+
findings.push(...scanInsetStripeCss(blockContent, filePath, block.startLine - 1));
|
|
1110
|
+
findings.push(...pseudoStripeFindings(blockContent, block.startLine - 1));
|
|
724
1111
|
}
|
|
725
1112
|
|
|
726
1113
|
if (options?.designSystem) {
|
|
@@ -746,7 +1133,6 @@ function detectText(content, filePath, options = {}) {
|
|
|
746
1133
|
// Page-level analyzers only run on full pages
|
|
747
1134
|
if (shouldRunPageAnalyzers(content, filePath)) {
|
|
748
1135
|
const analyzerIds = [
|
|
749
|
-
'single-font',
|
|
750
1136
|
'flat-type-hierarchy',
|
|
751
1137
|
'monotonous-spacing',
|
|
752
1138
|
'em-dash-overuse',
|
|
@@ -226,6 +226,10 @@ const STATIC_INHERITED_PROPS = new Set([
|
|
|
226
226
|
'color', 'fontFamily', 'fontSize', 'fontStyle', 'fontWeight', 'fontVariant',
|
|
227
227
|
'lineHeight', 'letterSpacing', 'textTransform', 'textAlign', 'hyphens',
|
|
228
228
|
'webkitHyphens',
|
|
229
|
+
// visibility inherits in real CSS, and the invisible-at-rest contrast skip
|
|
230
|
+
// relies on descendants of a hidden container computing as hidden. A child
|
|
231
|
+
// that declares `visibility: visible` still overrides the inherited value.
|
|
232
|
+
'visibility',
|
|
229
233
|
]);
|
|
230
234
|
|
|
231
235
|
const STATIC_DEFAULT_STYLE = {
|
|
@@ -278,6 +282,7 @@ const STATIC_DEFAULT_STYLE = {
|
|
|
278
282
|
marginLeft: '0px',
|
|
279
283
|
position: 'static',
|
|
280
284
|
visibility: 'visible',
|
|
285
|
+
opacity: '1',
|
|
281
286
|
top: 'auto',
|
|
282
287
|
right: 'auto',
|
|
283
288
|
bottom: 'auto',
|
|
@@ -334,6 +339,7 @@ const STATIC_PROP_MAP = {
|
|
|
334
339
|
'margin-left': 'marginLeft',
|
|
335
340
|
'position': 'position',
|
|
336
341
|
'visibility': 'visibility',
|
|
342
|
+
'opacity': 'opacity',
|
|
337
343
|
'top': 'top',
|
|
338
344
|
'right': 'right',
|
|
339
345
|
'bottom': 'bottom',
|
|
@@ -952,7 +958,10 @@ function collectStaticCssText(root, fileDir, profile, filePath, modules) {
|
|
|
952
958
|
const rel = link.attribs?.rel || '';
|
|
953
959
|
const href = link.attribs?.href || '';
|
|
954
960
|
if (!/\bstylesheet\b/i.test(rel) || !href || /^(https?:)?\/\//i.test(href)) continue;
|
|
955
|
-
|
|
961
|
+
// Cache-busting hrefs (styles.css?v=3) resolve to the file, not to a
|
|
962
|
+
// literal path with the query in it; a versioned link otherwise made the
|
|
963
|
+
// whole stylesheet invisible to every element-level check.
|
|
964
|
+
const cssPath = path.resolve(fileDir, href.split(/[?#]/)[0]);
|
|
956
965
|
try {
|
|
957
966
|
const css = profileStep(profile, {
|
|
958
967
|
engine: 'static-html',
|