@bastani/atomic 0.9.74-alpha.1 → 0.9.75-alpha.1
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 +94 -0
- package/dist/builtin/intercom/package.json +2 -2
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +8 -0
- package/dist/builtin/subagents/package.json +3 -3
- package/dist/builtin/subagents/skills/agent-browser/SKILL.md +8 -10
- package/dist/builtin/subagents/skills/agent-desktop/SKILL.md +9 -5
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +7 -1
- package/dist/builtin/web-access/package.json +2 -2
- package/dist/builtin/workflows/CHANGELOG.md +48 -0
- package/dist/builtin/workflows/README.md +5 -2
- package/dist/builtin/workflows/builtin/{chunk-m8eg152f.js → chunk-89we7r4p.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-a4fdm2cw.js → chunk-8yfssw01.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-774myqzs.js → chunk-v8mb0005.js} +366 -45
- package/dist/builtin/workflows/builtin/{chunk-d5cxskkp.js → chunk-wh2p4qjg.js} +2 -2
- package/dist/builtin/workflows/builtin/goal.js +2 -2
- package/dist/builtin/workflows/builtin/index.d.ts +10 -0
- package/dist/builtin/workflows/builtin/index.js +4 -4
- package/dist/builtin/workflows/builtin/open-claude-design.d.ts +12 -0
- package/dist/builtin/workflows/builtin/open-claude-design.js +1 -1
- package/dist/builtin/workflows/builtin/ralph.js +2 -2
- package/dist/builtin/workflows/package.json +2 -2
- package/dist/builtin/workflows/skills/impeccable/SKILL.md +4 -4
- package/dist/builtin/workflows/skills/impeccable/reference/android.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/audit.md +2 -2
- package/dist/builtin/workflows/skills/impeccable/reference/craft-floor.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/degraded/asset-producer.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/degraded/documenter.md +4 -4
- package/dist/builtin/workflows/skills/impeccable/reference/degraded/finish-reviewer.md +2 -2
- package/dist/builtin/workflows/skills/impeccable/reference/degraded/manual-edit-applier.md +3 -2
- package/dist/builtin/workflows/skills/impeccable/reference/distill.md +3 -3
- package/dist/builtin/workflows/skills/impeccable/reference/doctor.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/document.md +3 -3
- package/dist/builtin/workflows/skills/impeccable/reference/harden.md +19 -0
- package/dist/builtin/workflows/skills/impeccable/reference/hooks.md +15 -8
- package/dist/builtin/workflows/skills/impeccable/reference/init.md +2 -0
- package/dist/builtin/workflows/skills/impeccable/reference/live.md +8 -6
- package/dist/builtin/workflows/skills/impeccable/reference/new-work.md +4 -4
- package/dist/builtin/workflows/skills/impeccable/reference/optimize.md +0 -1
- package/dist/builtin/workflows/skills/impeccable/reference/visualize.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/scripts/VERSION +1 -1
- package/dist/builtin/workflows/skills/impeccable/scripts/command-metadata.json +2 -2
- package/dist/builtin/workflows/skills/impeccable/scripts/engine-checksums.txt +9 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/impeccable +98 -44
- package/dist/builtin/workflows/skills/impeccable/scripts/impeccable.cmd +101 -34
- package/dist/builtin/workflows/skills/impeccable/scripts/live-browser-ignores.js +6 -2
- package/dist/builtin/workflows/skills/impeccable/scripts/live-browser-session.js +4 -1
- package/dist/builtin/workflows/skills/impeccable/scripts/live-browser.js +444 -144
- package/dist/builtin/workflows/skills/prompt-engineer/SKILL.md +3 -1
- package/dist/builtin/workflows/skills/prompt-engineer/references/advanced_patterns.md +2 -2
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_fable_5.md +13 -11
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_fable_5_1.md +10 -8
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_fable_5_2.md +143 -0
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_haiku_5_5.md +11 -7
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_opus_4_8.md +3 -3
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_opus_5.md +6 -2
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_opus_5_5.md +7 -7
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_sonnet_5.md +2 -2
- package/dist/builtin/workflows/skills/prompt-engineer/references/claude_sonnet_5_5.md +3 -3
- package/dist/builtin/workflows/skills/prompt-engineer/references/gpt_5_5.md +2 -2
- package/dist/builtin/workflows/skills/prompt-engineer/references/gpt_5_6.md +2 -2
- package/dist/builtin/workflows/skills/prompt-engineer/references/gpt_6.md +6 -5
- package/dist/builtin/workflows/skills/prompt-engineer/references/gpt_6_1_sol.md +4 -4
- package/dist/builtin/workflows/skills/prompt-engineer/references/gpt_6_1_terra.md +2 -2
- package/dist/builtin/workflows/skills/prompt-engineer/references/quality_improvement.md +4 -3
- package/dist/builtin/workflows/skills/skill-creator/scripts/aggregate_benchmark.py +0 -0
- package/dist/builtin/workflows/skills/skill-creator/scripts/generate_report.py +0 -0
- package/dist/builtin/workflows/skills/skill-creator/scripts/improve_description.py +0 -0
- package/dist/builtin/workflows/skills/skill-creator/scripts/package_skill.py +0 -0
- package/dist/builtin/workflows/skills/skill-creator/scripts/quick_validate.py +0 -0
- package/dist/builtin/workflows/skills/skill-creator/scripts/run_eval.py +0 -0
- package/dist/builtin/workflows/skills/skill-creator/scripts/run_loop.py +0 -0
- package/dist/builtin/workflows/skills/unslop/SKILL.md +15 -34
- package/dist/builtin/workflows/src/durable/journal/memory-run-journal.d.ts +1 -0
- package/dist/builtin/workflows/src/durable/journal/values.d.ts +2 -0
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +809 -410
- package/dist/builtin/workflows/src/extension/local-worker-entry.mjs +695 -305
- package/dist/builtin/workflows/src/index.js +685 -295
- package/dist/builtin/workflows/src/local-worker-entry.mjs +695 -305
- package/dist/builtin/workflows/src/shared/authoring-contract-stage.d.ts +6 -6
- package/dist/builtin/workflows/src/shared/authoring-contract-ui.d.ts +2 -2
- package/dist/builtin/workflows/src/shared/serializable-error-families.d.ts +2 -0
- package/dist/bun/app-host-modules.d.ts +1 -1
- package/dist/bun/app-host-modules.d.ts.map +1 -1
- package/dist/bun/app-host-modules.js.map +1 -1
- package/dist/bun/internal-workflow-worker.d.ts +2 -0
- package/dist/bun/internal-workflow-worker.d.ts.map +1 -1
- package/dist/bun/internal-workflow-worker.js +2 -1
- package/dist/bun/internal-workflow-worker.js.map +1 -1
- package/dist/codemode-worker.js +2 -0
- package/dist/config.d.ts +8 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +14 -0
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-bash.d.ts.map +1 -1
- package/dist/core/agent-session-bash.js +2 -1
- package/dist/core/agent-session-bash.js.map +1 -1
- package/dist/core/agent-session-blueprint-environment.d.ts +10 -0
- package/dist/core/agent-session-blueprint-environment.d.ts.map +1 -0
- package/dist/core/agent-session-blueprint-environment.js +28 -0
- package/dist/core/agent-session-blueprint-environment.js.map +1 -0
- package/dist/core/agent-session-events.d.ts.map +1 -1
- package/dist/core/agent-session-events.js +2 -0
- package/dist/core/agent-session-events.js.map +1 -1
- package/dist/core/agent-session-methods.d.ts +1 -0
- 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-retry.d.ts.map +1 -1
- package/dist/core/agent-session-retry.js +14 -4
- package/dist/core/agent-session-retry.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +20 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +55 -6
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
- package/dist/core/agent-session-tool-registry.js +2 -1
- package/dist/core/agent-session-tool-registry.js.map +1 -1
- package/dist/core/agent-session.d.ts +2 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +2 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/async-scope.d.ts +13 -0
- package/dist/core/async-scope.d.ts.map +1 -0
- package/dist/core/async-scope.js +20 -0
- package/dist/core/async-scope.js.map +1 -0
- package/dist/core/cache-warmer.d.ts +3 -14
- package/dist/core/cache-warmer.d.ts.map +1 -1
- package/dist/core/cache-warmer.js +8 -60
- package/dist/core/cache-warmer.js.map +1 -1
- package/dist/core/extensions/extension-work.js +2 -2
- package/dist/core/extensions/extension-work.js.map +1 -1
- package/dist/core/extensions/loader-host-modules.d.ts.map +1 -1
- package/dist/core/extensions/loader-host-modules.js +3 -1
- package/dist/core/extensions/loader-host-modules.js.map +1 -1
- package/dist/core/extensions/ui-types.d.ts +2 -1
- package/dist/core/extensions/ui-types.d.ts.map +1 -1
- package/dist/core/extensions/ui-types.js.map +1 -1
- package/dist/core/extensions/workflow-events.d.ts +1 -1
- package/dist/core/extensions/workflow-events.d.ts.map +1 -1
- package/dist/core/extensions/workflow-events.js.map +1 -1
- package/dist/core/extensions/workflow-run-control.d.ts +4 -2
- package/dist/core/extensions/workflow-run-control.d.ts.map +1 -1
- package/dist/core/extensions/workflow-run-control.js.map +1 -1
- package/dist/core/model-fallback-failures.d.ts +6 -0
- package/dist/core/model-fallback-failures.d.ts.map +1 -1
- package/dist/core/model-fallback-failures.js +10 -1
- package/dist/core/model-fallback-failures.js.map +1 -1
- package/dist/core/preferred-providers.d.ts +19 -0
- package/dist/core/preferred-providers.d.ts.map +1 -0
- package/dist/core/preferred-providers.js +25 -0
- package/dist/core/preferred-providers.js.map +1 -0
- package/dist/core/provider-alias.d.ts.map +1 -1
- package/dist/core/provider-alias.js +4 -0
- package/dist/core/provider-alias.js.map +1 -1
- package/dist/core/provider-composer.d.ts.map +1 -1
- package/dist/core/provider-composer.js +1 -0
- package/dist/core/provider-composer.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +3 -0
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/resume/blueprint/action-expressions.d.ts +32 -0
- package/dist/core/resume/blueprint/action-expressions.d.ts.map +1 -0
- package/dist/core/resume/blueprint/action-expressions.js +389 -0
- package/dist/core/resume/blueprint/action-expressions.js.map +1 -0
- package/dist/core/resume/blueprint/actions.d.ts +90 -0
- package/dist/core/resume/blueprint/actions.d.ts.map +1 -0
- package/dist/core/resume/blueprint/actions.js +818 -0
- package/dist/core/resume/blueprint/actions.js.map +1 -0
- package/dist/core/resume/blueprint/build.d.ts +102 -0
- package/dist/core/resume/blueprint/build.d.ts.map +1 -0
- package/dist/core/resume/blueprint/build.js +535 -0
- package/dist/core/resume/blueprint/build.js.map +1 -0
- package/dist/core/resume/blueprint/context.d.ts +11 -0
- package/dist/core/resume/blueprint/context.d.ts.map +1 -0
- package/dist/core/resume/blueprint/context.js +106 -0
- package/dist/core/resume/blueprint/context.js.map +1 -0
- package/dist/core/resume/blueprint/envrc.d.ts +19 -0
- package/dist/core/resume/blueprint/envrc.d.ts.map +1 -0
- package/dist/core/resume/blueprint/envrc.js +77 -0
- package/dist/core/resume/blueprint/envrc.js.map +1 -0
- package/dist/core/resume/blueprint/errors.d.ts +179 -0
- package/dist/core/resume/blueprint/errors.d.ts.map +1 -0
- package/dist/core/resume/blueprint/errors.js +169 -0
- package/dist/core/resume/blueprint/errors.js.map +1 -0
- package/dist/core/resume/blueprint/ledger.d.ts +51 -0
- package/dist/core/resume/blueprint/ledger.d.ts.map +1 -0
- package/dist/core/resume/blueprint/ledger.js +119 -0
- package/dist/core/resume/blueprint/ledger.js.map +1 -0
- package/dist/core/resume/blueprint/notices.d.ts +14 -0
- package/dist/core/resume/blueprint/notices.d.ts.map +1 -0
- package/dist/core/resume/blueprint/notices.js +44 -0
- package/dist/core/resume/blueprint/notices.js.map +1 -0
- package/dist/core/resume/blueprint/process.d.ts +44 -0
- package/dist/core/resume/blueprint/process.d.ts.map +1 -0
- package/dist/core/resume/blueprint/process.js +142 -0
- package/dist/core/resume/blueprint/process.js.map +1 -0
- package/dist/core/resume/blueprint/resume.d.ts +73 -0
- package/dist/core/resume/blueprint/resume.d.ts.map +1 -0
- package/dist/core/resume/blueprint/resume.js +206 -0
- package/dist/core/resume/blueprint/resume.js.map +1 -0
- package/dist/core/resume/blueprint/schema.d.ts +26 -0
- package/dist/core/resume/blueprint/schema.d.ts.map +1 -0
- package/dist/core/resume/blueprint/schema.js +243 -0
- package/dist/core/resume/blueprint/schema.js.map +1 -0
- package/dist/core/resume/blueprint/steps.d.ts +54 -0
- package/dist/core/resume/blueprint/steps.d.ts.map +1 -0
- package/dist/core/resume/blueprint/steps.js +155 -0
- package/dist/core/resume/blueprint/steps.js.map +1 -0
- package/dist/core/resume/blueprint/types.d.ts +63 -0
- package/dist/core/resume/blueprint/types.d.ts.map +1 -0
- package/dist/core/resume/blueprint/types.js +2 -0
- package/dist/core/resume/blueprint/types.js.map +1 -0
- package/dist/core/resume/errors.d.ts +7 -35
- package/dist/core/resume/errors.d.ts.map +1 -1
- package/dist/core/resume/errors.js +1 -21
- package/dist/core/resume/errors.js.map +1 -1
- package/dist/core/resume/index.d.ts +12 -4
- package/dist/core/resume/index.d.ts.map +1 -1
- package/dist/core/resume/index.js +11 -4
- package/dist/core/resume/index.js.map +1 -1
- package/dist/core/resume/run-setup.d.ts +36 -15
- package/dist/core/resume/run-setup.d.ts.map +1 -1
- package/dist/core/resume/run-setup.js +70 -54
- package/dist/core/resume/run-setup.js.map +1 -1
- package/dist/core/resume/session-resume.d.ts +34 -20
- package/dist/core/resume/session-resume.d.ts.map +1 -1
- package/dist/core/resume/session-resume.js +244 -106
- package/dist/core/resume/session-resume.js.map +1 -1
- package/dist/core/retry-policy.d.ts +19 -1
- package/dist/core/retry-policy.d.ts.map +1 -1
- package/dist/core/retry-policy.js +26 -1
- package/dist/core/retry-policy.js.map +1 -1
- package/dist/core/sdk.js +1 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-cwd.d.ts +56 -1
- package/dist/core/session-cwd.d.ts.map +1 -1
- package/dist/core/session-cwd.js +94 -4
- package/dist/core/session-cwd.js.map +1 -1
- package/dist/core/session-manager-core.d.ts +1 -1
- package/dist/core/session-manager-core.d.ts.map +1 -1
- package/dist/core/session-manager-core.js +10 -5
- package/dist/core/session-manager-core.js.map +1 -1
- package/dist/core/session-worktree-snapshots.d.ts +11 -0
- package/dist/core/session-worktree-snapshots.d.ts.map +1 -1
- package/dist/core/session-worktree-snapshots.js +10 -4
- package/dist/core/session-worktree-snapshots.js.map +1 -1
- package/dist/core/settings-defaults.d.ts +1 -1
- package/dist/core/settings-defaults.d.ts.map +1 -1
- package/dist/core/settings-defaults.js +1 -1
- package/dist/core/settings-defaults.js.map +1 -1
- package/dist/core/settings-manager-basic-accessors.d.ts +3 -2
- package/dist/core/settings-manager-basic-accessors.d.ts.map +1 -1
- package/dist/core/settings-manager-basic-accessors.js.map +1 -1
- package/dist/core/settings-schema.d.ts.map +1 -1
- package/dist/core/settings-schema.js +2 -1
- package/dist/core/settings-schema.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +4 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/storage/write-ahead-log.d.ts +2 -1
- package/dist/core/storage/write-ahead-log.d.ts.map +1 -1
- package/dist/core/storage/write-ahead-log.js +27 -6
- package/dist/core/storage/write-ahead-log.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +10 -0
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/file-tool-errors.d.ts +1 -1
- package/dist/core/tools/file-tool-errors.js +1 -1
- package/dist/core/tools/file-tool-errors.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +52 -26
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts +2 -0
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/powershell.d.ts.map +1 -1
- package/dist/core/tools/powershell.js +10 -2
- package/dist/core/tools/powershell.js.map +1 -1
- package/dist/core/tools/tool-concurrency.d.ts.map +1 -1
- package/dist/core/tools/tool-concurrency.js +2 -2
- package/dist/core/tools/tool-concurrency.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/main-session.d.ts +12 -4
- package/dist/main-session.d.ts.map +1 -1
- package/dist/main-session.js +28 -4
- package/dist/main-session.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +6 -8
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.d.ts +5 -1
- package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.js +6 -1
- package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +10 -3
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +34 -13
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/provider-brand.d.ts +16 -0
- package/dist/modes/interactive/components/provider-brand.d.ts.map +1 -0
- package/dist/modes/interactive/components/provider-brand.js +67 -0
- package/dist/modes/interactive/components/provider-brand.js.map +1 -0
- package/dist/modes/interactive/interactive-auth-routing.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-auth-routing.js +8 -6
- package/dist/modes/interactive/interactive-auth-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-extension-dialogs.js +4 -3
- package/dist/modes/interactive/interactive-extension-dialogs.js.map +1 -1
- package/dist/modes/interactive/interactive-extension-runtime.js +8 -3
- package/dist/modes/interactive/interactive-extension-runtime.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-deps.d.ts +1 -1
- package/dist/modes/interactive/interactive-mode-deps.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode-deps.js +1 -1
- package/dist/modes/interactive/interactive-mode-deps.js.map +1 -1
- package/dist/modes/interactive/interactive-mode-surface.d.ts +12 -2
- 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-session-routing.js +59 -21
- package/dist/modes/interactive/interactive-session-routing.js.map +1 -1
- package/dist/modes/interactive/interactive-slash-commands.js +23 -12
- package/dist/modes/interactive/interactive-slash-commands.js.map +1 -1
- package/dist/modes/interactive/login-provider-options.d.ts.map +1 -1
- package/dist/modes/interactive/login-provider-options.js +2 -1
- package/dist/modes/interactive/login-provider-options.js.map +1 -1
- package/dist/modes/interactive-engine/isolated-runtime.d.ts +2 -0
- package/dist/modes/interactive-engine/isolated-runtime.d.ts.map +1 -1
- package/dist/modes/interactive-engine/isolated-runtime.js +8 -3
- package/dist/modes/interactive-engine/isolated-runtime.js.map +1 -1
- package/dist/modes/rpc/rpc-client-api.d.ts +2 -1
- package/dist/modes/rpc/rpc-client-api.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client-api.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +0 -1
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +2 -18
- 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 +8 -2
- package/dist/modes/rpc/rpc-command-handler.js.map +1 -1
- package/dist/modes/rpc/rpc-error-decoding.d.ts +7 -0
- package/dist/modes/rpc/rpc-error-decoding.d.ts.map +1 -0
- package/dist/modes/rpc/rpc-error-decoding.js +25 -0
- package/dist/modes/rpc/rpc-error-decoding.js.map +1 -0
- package/dist/modes/rpc/rpc-responses.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-responses.js +12 -0
- package/dist/modes/rpc/rpc-responses.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +11 -0
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +12 -3
- package/dist/package-manager-cli.js.map +1 -1
- package/docs/background-tasks.md +1 -1
- package/docs/codemode.md +22 -0
- package/docs/extensions/api-reference.md +27 -1
- package/docs/extensions/authoring.md +1 -1
- package/docs/extensions/ui.md +1 -1
- package/docs/getting-started/first-session.md +1 -1
- package/docs/guides/resume-on-any-machine.md +72 -19
- package/docs/models/evals.md +85 -17
- package/docs/models/reference.md +1 -1
- package/docs/providers.md +38 -5
- package/docs/reference/cli.md +2 -0
- package/docs/rpc/protocol.md +11 -1
- package/docs/sdk/reference.md +36 -4
- package/docs/sdk.md +2 -2
- package/docs/sessions.md +11 -1
- package/docs/settings.md +7 -2
- package/docs/skills.md +3 -3
- package/docs/storage.md +1 -1
- package/docs/tools.md +3 -1
- package/docs/workflows/api-reference.md +14 -12
- package/docs/workflows/authoring.md +29 -1
- package/docs/workflows/builtins.md +9 -1
- package/docs/workflows/operations.md +8 -8
- package/docs/worktree-snapshots.md +3 -2
- package/npm-shrinkwrap.json +83 -67
- package/package.json +7 -7
- package/schemas/settings.schema.json +3 -2
- package/dist/core/resume/setup-hook.d.ts +0 -69
- package/dist/core/resume/setup-hook.d.ts.map +0 -1
- package/dist/core/resume/setup-hook.js +0 -261
- package/dist/core/resume/setup-hook.js.map +0 -1
|
@@ -26,7 +26,7 @@ Each comp is a direction test, not a screenshot specification. Core UI text, res
|
|
|
26
26
|
|
|
27
27
|
Show the three together on the decision page (`impeccable serve-question`, one option per comp with the comp as its hero), or in the harness only when it renders images inline; a text-only surface does not count as display. Ask what should carry forward, what feels false to the world, and whether the selected concept should be approved, combined, revised, or rejected. Then stop and wait. A structured simulated user counts as attended and receives the same question.
|
|
28
28
|
|
|
29
|
-
Do not begin code until the user approves a direction or explicitly delegates the choice. If they delegate, choose using the task brief, PRODUCT.md, and DESIGN.md, and state the evidence. Approval refines the task concept; it does not modify DESIGN.md.
|
|
29
|
+
Do not begin code until the user approves a direction or explicitly delegates the choice. If they delegate, choose using the task brief, PRODUCT.md, and DESIGN.md (the chosen direction on a new world), and state the evidence. Approval refines the task concept; it does not modify DESIGN.md.
|
|
30
30
|
|
|
31
31
|
This approval point has no substitute and no skip condition. When the structured question tool errors, fall back to the decision page; only after both fail may you treat the choice as delegated, and a delegated pick is recorded exactly as an approval is and disclosed in your first reply, not your last. The finish reviewer treats comp-round comps with no recorded approval as a material finding; decision comps under `.impeccable/mocks/decision/` are the direction round's hand, not comp-round output, and imply no approval on their own.
|
|
32
32
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.19
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"argumentHint": "[feature description]"
|
|
5
5
|
},
|
|
6
6
|
"init": {
|
|
7
|
-
"description": "Sets up a project for impeccable. Runs a multi-round discovery interview when context is missing and writes PRODUCT.md (strategic: users, brand, principles);
|
|
7
|
+
"description": "Sets up a project for impeccable. Runs a multi-round discovery interview when context is missing and writes PRODUCT.md (strategic: users, brand, principles); pre-configures live mode; then recommends the best commands to run next. Every other command reads these files before doing work. Use once per project.",
|
|
8
8
|
"argumentHint": ""
|
|
9
9
|
},
|
|
10
10
|
"document": {
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"argumentHint": "[target]"
|
|
89
89
|
},
|
|
90
90
|
"shape": {
|
|
91
|
-
"description": "Plan UX and UI before code. Runs a
|
|
91
|
+
"description": "Plan UX and UI before code. Runs a discovery interview (one round by default), uses visual probes when available, and produces a user-confirmed design brief for implementation.",
|
|
92
92
|
"argumentHint": "[feature to shape]"
|
|
93
93
|
},
|
|
94
94
|
"typeset": {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Engine binary digests for the pinned ENGINE_VERSION: <engine-version> <asset> <sha256>.
|
|
2
|
+
# The launchers, the npm shim, `impeccable install` and scripts/fetch-engine.mjs verify
|
|
3
|
+
# every engine download against this file. Written by
|
|
4
|
+
# `node scripts/check-engine-release.mjs --record` after each engine release.
|
|
5
|
+
0.1.19 impeccable-darwin-arm64 c35d0b0b250afceb5ab6ee7edfe190a04d76d25c56bac01935a7a1b06d0df818
|
|
6
|
+
0.1.19 impeccable-darwin-x64 df7c2b9cec89df54d1d9722a35aecc48b965dfad190c4ec2e766ce3f7743a544
|
|
7
|
+
0.1.19 impeccable-linux-x64 07b763dc00012e9acf219fe2d2e8980f0810fb8af2e4a41c090107a8351d412f
|
|
8
|
+
0.1.19 impeccable-linux-arm64 73b5662e42f060aba716016c34a7274cc49a998cd0d5da8b84a95d9e4edea729
|
|
9
|
+
0.1.19 impeccable-windows-x64.exe 30427e0cfea383a0adbc5cc554481c3f18337eeabcc4eaf7d9bb48ad2e8b5676
|
|
@@ -6,9 +6,16 @@
|
|
|
6
6
|
# The unversioned home binary and the PATH candidate are validated with the
|
|
7
7
|
# engine-probe handshake first: the retired 3.x npm CLI also installed a bin
|
|
8
8
|
# named `impeccable`, and exec'ing it would fail every verb with
|
|
9
|
-
# "Unknown command".
|
|
10
|
-
#
|
|
11
|
-
#
|
|
9
|
+
# "Unknown command". The sibling binary must also report the version in
|
|
10
|
+
# VERSION: it is gitignored, so a skill upgrade that copies files over this
|
|
11
|
+
# directory leaves the old engine in place. A local build of the same version
|
|
12
|
+
# passes, which is why it is not hashed. IMPECCABLE_BIN is the operator's
|
|
13
|
+
# explicit choice and is exec'd without a probe. The version-pinned cache and
|
|
14
|
+
# the download are verified against engine-checksums.txt (next to this
|
|
15
|
+
# script), never against anything published beside the binary; a
|
|
16
|
+
# <binary>.verified stamp holding the manifest digest and the binary's size
|
|
17
|
+
# skips rehashing until either changes or the binary is newer than the stamp.
|
|
18
|
+
# No path hashes on every run: hooks run this launcher on every edit.
|
|
12
19
|
set -eu
|
|
13
20
|
|
|
14
21
|
# True when the candidate answers the engine handshake (prints
|
|
@@ -18,14 +25,59 @@ set -eu
|
|
|
18
25
|
# then skips its own probes and refuses to download, so probing stays cheap
|
|
19
26
|
# and can never loop.
|
|
20
27
|
probe_ok() {
|
|
21
|
-
|
|
22
|
-
|
|
28
|
+
probe_out=$(IMPECCABLE_LAUNCHER_PROBE=1 "$1" engine-probe 2>/dev/null) || return 1
|
|
29
|
+
case "$probe_out" in
|
|
30
|
+
impeccable-engine*) probe_version=${probe_out#impeccable-engine }; return 0 ;;
|
|
23
31
|
esac
|
|
24
32
|
return 1
|
|
25
33
|
}
|
|
26
34
|
probing=${IMPECCABLE_LAUNCHER_PROBE:-}
|
|
27
35
|
|
|
36
|
+
# Prints the digest engine-checksums.txt records for engine version $1 and
|
|
37
|
+
# asset $2 (lines are "<version> <asset> <sha256>"), nothing when there is none.
|
|
38
|
+
# A CR is a separator too (CRLF checkouts), and a last line with no newline
|
|
39
|
+
# still counts.
|
|
40
|
+
manifest_digest() {
|
|
41
|
+
[ -f "$manifest" ] || return 0
|
|
42
|
+
sep=$(printf ' \t\r')
|
|
43
|
+
while IFS="$sep" read -r m_version m_asset m_sum _ || [ -n "$m_version" ]; do
|
|
44
|
+
case "$m_version" in ''|'#'*) continue ;; esac
|
|
45
|
+
if [ "$m_version" = "$1" ] && [ "$m_asset" = "$2" ]; then
|
|
46
|
+
printf '%s' "$m_sum"
|
|
47
|
+
return 0
|
|
48
|
+
fi
|
|
49
|
+
done < "$manifest"
|
|
50
|
+
return 0
|
|
51
|
+
}
|
|
52
|
+
# Sets $expected (and, on Windows on ARM, which runs x64 binaries,
|
|
53
|
+
# $expected_x64) from engine-checksums.txt.
|
|
54
|
+
read_expected() {
|
|
55
|
+
expected=$(manifest_digest "$version" "$asset")
|
|
56
|
+
expected_x64=""
|
|
57
|
+
if [ "$os" = windows ] && [ "$arch" = arm64 ]; then
|
|
58
|
+
expected_x64=$(manifest_digest "$version" impeccable-windows-x64.exe)
|
|
59
|
+
fi
|
|
60
|
+
}
|
|
61
|
+
# Sets $size to the byte count of the cached binary (BSD wc pads it).
|
|
62
|
+
cached_size() {
|
|
63
|
+
size=$(wc -c < "$cached") || size=""
|
|
64
|
+
size=${size##* }
|
|
65
|
+
}
|
|
66
|
+
# Sets $actual to the sha256 of $1, empty when no hash tool works.
|
|
67
|
+
hash_file() {
|
|
68
|
+
actual=""
|
|
69
|
+
if command -v shasum >/dev/null 2>&1; then
|
|
70
|
+
if digest=$(shasum -a 256 "$1" 2>/dev/null); then actual=${digest%% *}; fi
|
|
71
|
+
elif command -v sha256sum >/dev/null 2>&1; then
|
|
72
|
+
if digest=$(sha256sum "$1" 2>/dev/null); then actual=${digest%% *}; fi
|
|
73
|
+
fi
|
|
74
|
+
}
|
|
75
|
+
|
|
28
76
|
dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
|
77
|
+
# VS Code syncs a plugin without the executable bit. Its hooks run this through
|
|
78
|
+
# sh, so restore the bit for the commands the skill runs directly (#1249).
|
|
79
|
+
[ -x "$0" ] || chmod +x "$0" 2>/dev/null || :
|
|
80
|
+
manifest="$dir/engine-checksums.txt"
|
|
29
81
|
|
|
30
82
|
# What the binary needs to know about its home: the skill directory (for
|
|
31
83
|
# reference/*.md and command-metadata.json) and how to name itself in the
|
|
@@ -60,15 +112,17 @@ case "$(uname -m 2>/dev/null || echo unknown)" in
|
|
|
60
112
|
*) arch=unknown ;;
|
|
61
113
|
esac
|
|
62
114
|
|
|
115
|
+
version=""
|
|
116
|
+
[ -f "$dir/VERSION" ] && version=$(tr -d '[:space:]' < "$dir/VERSION")
|
|
63
117
|
bin="$dir/bin/$os-$arch/impeccable"
|
|
64
118
|
[ "$os" = windows ] && bin="$bin.exe"
|
|
65
119
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
120
|
+
# Lost the executable bit in transit (zip extraction, some copiers).
|
|
121
|
+
if [ -f "$bin" ] && { [ -x "$bin" ] || chmod +x "$bin" 2>/dev/null; }; then
|
|
122
|
+
if [ -n "$probing" ] || [ -z "$version" ] || { probe_ok "$bin" && [ "$probe_version" = "$version" ]; }; then
|
|
123
|
+
exec "$bin" "$@"
|
|
124
|
+
fi
|
|
125
|
+
echo "impeccable: skipping $bin: it reports engine ${probe_version:-unknown} but this skill pins $version; delete it to stop this warning" >&2
|
|
72
126
|
fi
|
|
73
127
|
# On Windows (an MSYS/Git Bash shell) the cached names carry .exe so this
|
|
74
128
|
# launcher and impeccable.cmd share one cache.
|
|
@@ -79,12 +133,25 @@ if [ -z "$probing" ] && [ -x "$home_bin" ] && probe_ok "$home_bin"; then
|
|
|
79
133
|
exec "$home_bin" "$@"
|
|
80
134
|
fi
|
|
81
135
|
# Version-pinned user cache, filled by the download below or by `impeccable update`.
|
|
82
|
-
version=""
|
|
83
|
-
[ -f "$dir/VERSION" ] && version=$(tr -d '[:space:]' < "$dir/VERSION")
|
|
84
136
|
cache_root="${IMPECCABLE_HOME:-${HOME:-/nonexistent}/.impeccable}"
|
|
85
137
|
cached="$cache_root/bin/$version/impeccable$exe"
|
|
138
|
+
asset="impeccable-$os-$arch"
|
|
139
|
+
[ "$os" = windows ] && asset="$asset.exe"
|
|
86
140
|
if [ -n "$version" ] && [ -x "$cached" ]; then
|
|
87
|
-
|
|
141
|
+
read_expected
|
|
142
|
+
cached_size
|
|
143
|
+
stamp=""
|
|
144
|
+
stamp_size=""
|
|
145
|
+
{ IFS="$(printf ' \t\r')" read -r stamp stamp_size _ < "$cached.verified"; } 2>/dev/null || :
|
|
146
|
+
if [ -n "$stamp" ] && [ "$stamp_size" = "$size" ] && { [ "$stamp" = "$expected" ] || [ "$stamp" = "$expected_x64" ]; } && [ ! "$cached" -nt "$cached.verified" ]; then
|
|
147
|
+
exec "$cached" "$@"
|
|
148
|
+
fi
|
|
149
|
+
hash_file "$cached"
|
|
150
|
+
if [ -n "$actual" ] && { [ "$actual" = "$expected" ] || [ "$actual" = "$expected_x64" ]; }; then
|
|
151
|
+
{ echo "$actual $size" > "$cached.verified"; } 2>/dev/null || :
|
|
152
|
+
exec "$cached" "$@"
|
|
153
|
+
fi
|
|
154
|
+
echo "impeccable: cannot verify the cached engine $cached against $manifest; not using it" >&2
|
|
88
155
|
fi
|
|
89
156
|
if [ -z "$probing" ] && command -v impeccable >/dev/null 2>&1 && probe_ok impeccable; then
|
|
90
157
|
exec impeccable "$@"
|
|
@@ -110,12 +177,11 @@ fetch_url() {
|
|
|
110
177
|
check_download() {
|
|
111
178
|
download_file=${1:-$tmp}
|
|
112
179
|
if [ ! -f "$download_file" ]; then
|
|
113
|
-
rm -f "$tmp.sha256"
|
|
114
180
|
echo "impeccable: download completed but the file was removed before execution: $url; check your antivirus quarantine or logs. Refusing to continue; do not disable protection." >&2
|
|
115
181
|
exit 127
|
|
116
182
|
fi
|
|
117
183
|
if [ ! -s "$download_file" ]; then
|
|
118
|
-
rm -f "$download_file"
|
|
184
|
+
rm -f "$download_file"
|
|
119
185
|
echo "impeccable: downloaded file is empty: $url; refusing the unverified download" >&2
|
|
120
186
|
exit 127
|
|
121
187
|
fi
|
|
@@ -126,13 +192,17 @@ if [ -n "$probing" ]; then
|
|
|
126
192
|
fi
|
|
127
193
|
if [ -n "$version" ] && [ "$os" != unknown ] && [ "$arch" != unknown ]; then
|
|
128
194
|
base="${IMPECCABLE_DOWNLOAD_BASE:-https://github.com/pbakaus/impeccable/releases/download}"
|
|
129
|
-
asset="impeccable-$os-$arch"
|
|
130
|
-
[ "$os" = windows ] && asset="$asset.exe"
|
|
131
195
|
url="$base/engine-v$version/$asset"
|
|
196
|
+
read_expected
|
|
197
|
+
# Fail closed before any network traffic or cache write.
|
|
198
|
+
if [ -z "$expected" ] && [ -z "$expected_x64" ]; then
|
|
199
|
+
echo "impeccable: no checksum for engine $version ($asset) in $manifest; refusing the unverified download" >&2
|
|
200
|
+
exit 127
|
|
201
|
+
fi
|
|
132
202
|
tmp="$cache_root/bin/$version/.impeccable.part.$$"
|
|
133
203
|
# An interrupted download (Ctrl-C, a hook timeout) would otherwise leave the
|
|
134
204
|
# PID-named staging file behind for good. The handlers must exit explicitly.
|
|
135
|
-
cleanup() { rm -f "$tmp"
|
|
205
|
+
cleanup() { rm -f "$tmp" 2>/dev/null || :; }
|
|
136
206
|
trap 'cleanup; exit 129' HUP
|
|
137
207
|
trap 'cleanup; exit 130' INT
|
|
138
208
|
trap 'cleanup; exit 143' TERM
|
|
@@ -149,40 +219,22 @@ if [ -n "$version" ] && [ "$os" != unknown ] && [ "$arch" != unknown ]; then
|
|
|
149
219
|
exit 127
|
|
150
220
|
fi
|
|
151
221
|
fetched=0
|
|
152
|
-
if fetch_url "$url"; then
|
|
222
|
+
if [ -n "$expected" ] && fetch_url "$url"; then
|
|
153
223
|
fetched=1
|
|
154
|
-
elif [
|
|
224
|
+
elif [ -n "$expected_x64" ]; then
|
|
155
225
|
# Windows on ARM runs x64 binaries; fall back when no arm64 asset exists.
|
|
156
226
|
url="$base/engine-v$version/impeccable-windows-x64.exe"
|
|
227
|
+
expected=$expected_x64
|
|
157
228
|
fetch_url "$url" && fetched=1
|
|
158
229
|
fi
|
|
159
230
|
if [ "$fetched" = 1 ]; then
|
|
160
231
|
check_download
|
|
161
|
-
#
|
|
162
|
-
|
|
163
|
-
# machine with no sha256 tool, refuses the download instead of exec'ing
|
|
164
|
-
# an unverified binary. (A binary already on PATH or in the cache that
|
|
165
|
-
# passes engine-probe is unaffected.)
|
|
166
|
-
sidecar_ok=0
|
|
167
|
-
if command -v curl >/dev/null 2>&1; then
|
|
168
|
-
curl -fsSL --retry 2 -o "$tmp.sha256" "$url.sha256" 2>/dev/null && sidecar_ok=1
|
|
169
|
-
elif command -v wget >/dev/null 2>&1; then
|
|
170
|
-
wget -q -O "$tmp.sha256" "$url.sha256" 2>/dev/null && sidecar_ok=1
|
|
171
|
-
fi
|
|
172
|
-
check_download
|
|
173
|
-
expected=""
|
|
174
|
-
[ "$sidecar_ok" = 1 ] && expected=$(cut -d' ' -f1 < "$tmp.sha256")
|
|
175
|
-
actual=""
|
|
176
|
-
if command -v shasum >/dev/null 2>&1; then
|
|
177
|
-
if digest=$(shasum -a 256 "$tmp" 2>/dev/null); then actual=${digest%% *}; fi
|
|
178
|
-
elif command -v sha256sum >/dev/null 2>&1; then
|
|
179
|
-
if digest=$(sha256sum "$tmp" 2>/dev/null); then actual=${digest%% *}; fi
|
|
180
|
-
fi
|
|
232
|
+
# No sha256 tool refuses the download too.
|
|
233
|
+
hash_file "$tmp"
|
|
181
234
|
check_download
|
|
182
|
-
|
|
183
|
-
if [ -z "$expected" ] || [ -z "$actual" ]; then
|
|
235
|
+
if [ -z "$actual" ]; then
|
|
184
236
|
rm -f "$tmp"
|
|
185
|
-
echo "impeccable: cannot verify $url
|
|
237
|
+
echo "impeccable: cannot verify $url (no sha256 tool, or hashing failed); refusing the unverified download" >&2
|
|
186
238
|
exit 127
|
|
187
239
|
fi
|
|
188
240
|
if [ "$actual" != "$expected" ]; then
|
|
@@ -205,6 +257,8 @@ if [ -n "$version" ] && [ "$os" != unknown ] && [ "$arch" != unknown ]; then
|
|
|
205
257
|
exit 127
|
|
206
258
|
fi
|
|
207
259
|
check_download "$cached"
|
|
260
|
+
cached_size
|
|
261
|
+
{ echo "$actual $size" > "$cached.verified"; } 2>/dev/null || :
|
|
208
262
|
exec "$cached" "$@"
|
|
209
263
|
fi
|
|
210
264
|
rm -f "$tmp" 2>/dev/null
|
|
@@ -11,12 +11,16 @@ rem Linear goto flow keeps every expansion on its own line, and avoids
|
|
|
11
11
|
rem delayed expansion eating ! characters in user arguments.
|
|
12
12
|
rem - The unversioned user binary and the PATH candidate are validated with
|
|
13
13
|
rem the engine-probe handshake (see :probe) so the retired 3.x npm CLI,
|
|
14
|
-
rem whose bin is also named impeccable, is never exec'd.
|
|
15
|
-
rem
|
|
16
|
-
rem
|
|
17
|
-
rem
|
|
18
|
-
rem
|
|
19
|
-
rem
|
|
14
|
+
rem whose bin is also named impeccable, is never exec'd. The sibling binary
|
|
15
|
+
rem must also report the version in VERSION: it is not tracked, so a skill
|
|
16
|
+
rem upgrade can leave an old engine in place. IMPECCABLE_BIN stays trusted.
|
|
17
|
+
rem - Downloads and the version-pinned cache are verified via certutil
|
|
18
|
+
rem against engine-checksums.txt next to this file, and fail closed; a
|
|
19
|
+
rem .verified stamp lets later runs skip hashing the cache while it holds
|
|
20
|
+
rem the manifest digest and the binary's size and is not older than the
|
|
21
|
+
rem binary. On ARM64 the arm64 asset is tried first and the x64 asset is the
|
|
22
|
+
rem fallback (Windows on ARM runs x64 binaries), each only when the manifest
|
|
23
|
+
rem has a line for it.
|
|
20
24
|
if not defined IMPECCABLE_SKILL_DIR set "IMPECCABLE_SKILL_DIR=%~dp0.."
|
|
21
25
|
if not defined IMPECCABLE_SELF set "IMPECCABLE_SELF=%~f0"
|
|
22
26
|
rem Atomic ships this skill inside its own release and cannot self-update, so
|
|
@@ -32,8 +36,18 @@ set "run=%IMPECCABLE_BIN%"
|
|
|
32
36
|
goto run
|
|
33
37
|
:no_env_bin
|
|
34
38
|
|
|
39
|
+
set "version="
|
|
40
|
+
if exist "%~dp0VERSION" set /p version=<"%~dp0VERSION"
|
|
35
41
|
set "bin=%~dp0bin\windows-%arch%\impeccable.exe"
|
|
36
42
|
if not exist "%bin%" goto no_sibling
|
|
43
|
+
if defined IMPECCABLE_LAUNCHER_PROBE goto sibling_ok
|
|
44
|
+
if not defined version goto sibling_ok
|
|
45
|
+
call :probe "%bin%"
|
|
46
|
+
if "%probe_version%"=="%version%" goto sibling_ok
|
|
47
|
+
if not defined probe_version set "probe_version=unknown"
|
|
48
|
+
echo impeccable: skipping "%bin%": it reports engine %probe_version% but this skill pins %version%; delete it to stop this warning 1>&2
|
|
49
|
+
goto no_sibling
|
|
50
|
+
:sibling_ok
|
|
37
51
|
set "run=%bin%"
|
|
38
52
|
goto run
|
|
39
53
|
:no_sibling
|
|
@@ -47,12 +61,37 @@ set "run=%home_bin%"
|
|
|
47
61
|
goto run
|
|
48
62
|
:no_home_bin
|
|
49
63
|
|
|
50
|
-
set "version="
|
|
51
|
-
if exist "%~dp0VERSION" set /p version=<"%~dp0VERSION"
|
|
52
64
|
if not defined IMPECCABLE_HOME set "IMPECCABLE_HOME=%USERPROFILE%\.impeccable"
|
|
53
65
|
set "cached=%IMPECCABLE_HOME%\bin\%version%\impeccable.exe"
|
|
66
|
+
set "asset=impeccable-windows-%arch%.exe"
|
|
67
|
+
set "manifest=%~dp0engine-checksums.txt"
|
|
54
68
|
if not defined version goto no_cache
|
|
55
69
|
if not exist "%cached%" goto no_cache
|
|
70
|
+
call :read_expected
|
|
71
|
+
for %%f in ("%cached%") do set "size=%%~zf"
|
|
72
|
+
set "stamp="
|
|
73
|
+
if exist "%cached%.verified" for /f "usebackq tokens=1,2" %%s in ("%cached%.verified") do set "stamp=%%s"& set "stamp_size=%%t"
|
|
74
|
+
if not defined stamp goto cache_hash
|
|
75
|
+
if not "%stamp_size%"=="%size%" goto cache_hash
|
|
76
|
+
if /I "%stamp%"=="%expected%" goto cache_stamp_matches
|
|
77
|
+
if /I "%stamp%"=="%expected_x64%" goto cache_stamp_matches
|
|
78
|
+
goto cache_hash
|
|
79
|
+
:cache_stamp_matches
|
|
80
|
+
rem Newest first: the stamp must be listed before the binary it vouches for.
|
|
81
|
+
set "newest="
|
|
82
|
+
for /f "delims=" %%f in ('dir /b /a:-d /o:-d "%cached%*" 2^>nul') do if not defined newest set "newest=%%f"
|
|
83
|
+
if /I "%newest%"=="impeccable.exe.verified" goto cache_trusted
|
|
84
|
+
:cache_hash
|
|
85
|
+
call :sha256 "%cached%" "%TEMP%\impeccable-hash-%RANDOM%%RANDOM%.txt"
|
|
86
|
+
if not defined actual goto cache_unverified
|
|
87
|
+
if /I "%actual%"=="%expected%" goto cache_verified
|
|
88
|
+
if /I "%actual%"=="%expected_x64%" goto cache_verified
|
|
89
|
+
:cache_unverified
|
|
90
|
+
echo impeccable: cannot verify the cached engine "%cached%" against "%manifest%"; not using it 1>&2
|
|
91
|
+
goto no_cache
|
|
92
|
+
:cache_verified
|
|
93
|
+
(>"%cached%.verified" echo %actual% %size%) 2>nul
|
|
94
|
+
:cache_trusted
|
|
56
95
|
set "run=%cached%"
|
|
57
96
|
goto run
|
|
58
97
|
:no_cache
|
|
@@ -71,6 +110,8 @@ rem the version-pinned user cache, verify it, then run it. Never inside
|
|
|
71
110
|
rem another launcher's probe: fail fast and quiet instead.
|
|
72
111
|
if defined IMPECCABLE_LAUNCHER_PROBE exit /b 127
|
|
73
112
|
if not defined version goto fail
|
|
113
|
+
call :read_expected
|
|
114
|
+
if not defined expected if not defined expected_x64 goto no_checksum
|
|
74
115
|
where curl.exe >nul 2>nul
|
|
75
116
|
if errorlevel 1 goto curl_missing
|
|
76
117
|
if not defined IMPECCABLE_DOWNLOAD_BASE set "IMPECCABLE_DOWNLOAD_BASE=https://github.com/pbakaus/impeccable/releases/download"
|
|
@@ -97,16 +138,17 @@ set "staging=%IMPECCABLE_HOME%\bin\%version%\.impeccable.part.%stamp%-%RANDOM%%R
|
|
|
97
138
|
mkdir "%staging%" >nul 2>nul
|
|
98
139
|
if errorlevel 1 goto claim_staging
|
|
99
140
|
set "part=%staging%\impeccable.exe"
|
|
100
|
-
set "sidecar=%staging%\impeccable.sha256"
|
|
101
141
|
rem Redirection failures do not reliably update ERRORLEVEL in cmd.exe;
|
|
102
142
|
rem branch on the command's failure directly.
|
|
103
143
|
(type nul >"%part%") 2>nul || goto staging_write_failed
|
|
104
|
-
set "asset=impeccable-windows-%arch%.exe"
|
|
105
144
|
set "url=%IMPECCABLE_DOWNLOAD_BASE%/engine-v%version%/%asset%"
|
|
145
|
+
if not defined expected goto fetch_x64
|
|
106
146
|
curl.exe -fsSL -o "%part%" "%url%" >nul 2>nul
|
|
107
147
|
if not errorlevel 1 goto verify
|
|
108
|
-
|
|
148
|
+
:fetch_x64
|
|
149
|
+
if not defined expected_x64 goto download_failed
|
|
109
150
|
set "asset=impeccable-windows-x64.exe"
|
|
151
|
+
set "expected=%expected_x64%"
|
|
110
152
|
set "url=%IMPECCABLE_DOWNLOAD_BASE%/engine-v%version%/%asset%"
|
|
111
153
|
curl.exe -fsSL -o "%part%" "%url%" >nul 2>nul
|
|
112
154
|
if errorlevel 1 goto download_failed
|
|
@@ -115,28 +157,13 @@ if errorlevel 1 goto download_failed
|
|
|
115
157
|
call :check_download
|
|
116
158
|
if errorlevel 1 exit /b 127
|
|
117
159
|
rem Mirrors the sh launcher and fails closed: a freshly downloaded binary
|
|
118
|
-
rem runs only after
|
|
119
|
-
rem
|
|
120
|
-
rem
|
|
121
|
-
|
|
122
|
-
if errorlevel 1 goto verify_refuse
|
|
123
|
-
set "expected="
|
|
124
|
-
set /p expected=<"%sidecar%"
|
|
125
|
-
for /f "tokens=1" %%h in ("%expected%") do set "expected=%%h"
|
|
160
|
+
rem runs only after its hash matches the digest read from engine-checksums.txt.
|
|
161
|
+
rem An empty certutil result refuses the download instead of running an
|
|
162
|
+
rem unverified binary.
|
|
163
|
+
call :sha256 "%part%" "%staging%\hash.txt"
|
|
126
164
|
call :check_download
|
|
127
165
|
if errorlevel 1 exit /b 127
|
|
128
|
-
set "actual="
|
|
129
|
-
rem Reuse the sidecar staging file after reading expected. Check certutil's
|
|
130
|
-
rem status before parsing: its error text on stdout is not a digest.
|
|
131
|
-
certutil -hashfile "%part%" SHA256 >"%sidecar%" 2>nul
|
|
132
|
-
if errorlevel 1 goto verify_refuse
|
|
133
|
-
call :check_download
|
|
134
|
-
if errorlevel 1 exit /b 127
|
|
135
|
-
for /f "usebackq skip=1 delims=" %%h in ("%sidecar%") do if not defined actual set "actual=%%h"
|
|
136
|
-
del "%sidecar%" >nul 2>nul
|
|
137
|
-
if not defined expected goto verify_refuse
|
|
138
166
|
if not defined actual goto verify_refuse
|
|
139
|
-
set "actual=%actual: =%"
|
|
140
167
|
if /I "%actual%"=="%expected%" goto place
|
|
141
168
|
call :discard_staging
|
|
142
169
|
echo impeccable: checksum mismatch downloading %url% 1>&2
|
|
@@ -146,9 +173,39 @@ exit /b 127
|
|
|
146
173
|
call :check_download
|
|
147
174
|
if errorlevel 1 exit /b 127
|
|
148
175
|
call :discard_staging
|
|
149
|
-
echo impeccable: cannot verify %url%
|
|
176
|
+
echo impeccable: cannot verify %url% (certutil could not hash it); refusing the unverified download 1>&2
|
|
150
177
|
exit /b 127
|
|
151
178
|
|
|
179
|
+
:read_expected
|
|
180
|
+
rem Sets expected (and, on ARM64, expected_x64: Windows on ARM runs x64
|
|
181
|
+
rem binaries) from engine-checksums.txt.
|
|
182
|
+
call :manifest_digest "%asset%" expected
|
|
183
|
+
set "expected_x64="
|
|
184
|
+
if "%arch%"=="arm64" call :manifest_digest impeccable-windows-x64.exe expected_x64
|
|
185
|
+
exit /b 0
|
|
186
|
+
|
|
187
|
+
:manifest_digest
|
|
188
|
+
rem Sets the variable named %2 to the digest the first engine-checksums.txt
|
|
189
|
+
rem line for this version and asset %1 records, empty when there is none.
|
|
190
|
+
set "%~2="
|
|
191
|
+
if not exist "%manifest%" exit /b 0
|
|
192
|
+
for /f "usebackq tokens=1-3" %%a in ("%manifest%") do if "%%a"=="%version%" if /I "%%b"=="%~1" if not defined %~2 set "%~2=%%c"
|
|
193
|
+
exit /b 0
|
|
194
|
+
|
|
195
|
+
:sha256
|
|
196
|
+
rem Sets actual to the sha256 of %~1, empty when certutil fails. %~2 is the
|
|
197
|
+
rem scratch file for its output. Check certutil's status before parsing: its
|
|
198
|
+
rem error text on stdout is not a digest.
|
|
199
|
+
set "actual="
|
|
200
|
+
certutil -hashfile "%~1" SHA256 >"%~2" 2>nul
|
|
201
|
+
if errorlevel 1 goto sha256_done
|
|
202
|
+
for /f "usebackq skip=1 delims=" %%h in ("%~2") do if not defined actual set "actual=%%h"
|
|
203
|
+
if not defined actual goto sha256_done
|
|
204
|
+
set "actual=%actual: =%"
|
|
205
|
+
:sha256_done
|
|
206
|
+
del "%~2" >nul 2>nul
|
|
207
|
+
exit /b 0
|
|
208
|
+
|
|
152
209
|
:check_download
|
|
153
210
|
set "download_file=%~1"
|
|
154
211
|
if not defined download_file set "download_file=%part%"
|
|
@@ -181,6 +238,8 @@ if errorlevel 1 goto place_failed
|
|
|
181
238
|
call :discard_staging
|
|
182
239
|
call :check_download "%cached%"
|
|
183
240
|
if errorlevel 1 exit /b 127
|
|
241
|
+
for %%f in ("%cached%") do set "size=%%~zf"
|
|
242
|
+
(>"%cached%.verified" echo %actual% %size%) 2>nul
|
|
184
243
|
set "run=%cached%"
|
|
185
244
|
goto run
|
|
186
245
|
|
|
@@ -197,9 +256,11 @@ exit /b %errorlevel%
|
|
|
197
256
|
|
|
198
257
|
:probe
|
|
199
258
|
rem Sets probe_ok=1 when %1 answers the engine handshake: prints
|
|
200
|
-
rem "impeccable-engine <version>" and exits 0
|
|
201
|
-
rem unknown verb with "Unknown command",
|
|
259
|
+
rem "impeccable-engine <version>" and exits 0, and probe_version to that
|
|
260
|
+
rem version. The 3.x npm CLI answers any unknown verb with "Unknown command",
|
|
261
|
+
rem exit 1, so it never passes.
|
|
202
262
|
set "probe_ok="
|
|
263
|
+
set "probe_version="
|
|
203
264
|
set "probe_tmp=%TEMP%\impeccable-probe-%RANDOM%%RANDOM%.txt"
|
|
204
265
|
set "IMPECCABLE_LAUNCHER_PROBE=1"
|
|
205
266
|
"%~1" engine-probe >"%probe_tmp%" 2>nul
|
|
@@ -207,11 +268,17 @@ set "probe_err=%ERRORLEVEL%"
|
|
|
207
268
|
set "IMPECCABLE_LAUNCHER_PROBE="
|
|
208
269
|
if not "%probe_err%"=="0" goto probe_done
|
|
209
270
|
findstr /b /c:"impeccable-engine" "%probe_tmp%" >nul 2>nul
|
|
210
|
-
if
|
|
271
|
+
if errorlevel 1 goto probe_done
|
|
272
|
+
set "probe_ok=1"
|
|
273
|
+
for /f "usebackq tokens=2" %%v in ("%probe_tmp%") do if not defined probe_version set "probe_version=%%v"
|
|
211
274
|
:probe_done
|
|
212
275
|
del "%probe_tmp%" >nul 2>nul
|
|
213
276
|
exit /b 0
|
|
214
277
|
|
|
278
|
+
:no_checksum
|
|
279
|
+
echo impeccable: no checksum for engine %version% (%asset%) in "%manifest%"; refusing the unverified download 1>&2
|
|
280
|
+
exit /b 127
|
|
281
|
+
|
|
215
282
|
:cache_directory_failed
|
|
216
283
|
echo impeccable: engine %version% is not installed; cannot create cache directory: "%IMPECCABLE_HOME%\bin\%version%" 1>&2
|
|
217
284
|
goto setup_failed
|
|
@@ -63,9 +63,13 @@
|
|
|
63
63
|
const c = glob[i];
|
|
64
64
|
if (c === '*') {
|
|
65
65
|
if (glob[i + 1] === '*') {
|
|
66
|
-
re += '.*';
|
|
67
66
|
i += 2;
|
|
68
|
-
if (glob[i] === '/')
|
|
67
|
+
if (glob[i] === '/') {
|
|
68
|
+
re += '(?:.*/)?';
|
|
69
|
+
i += 1;
|
|
70
|
+
} else {
|
|
71
|
+
re += '.*';
|
|
72
|
+
}
|
|
69
73
|
} else {
|
|
70
74
|
re += '[^/]*';
|
|
71
75
|
i += 1;
|
|
@@ -34,7 +34,10 @@
|
|
|
34
34
|
|
|
35
35
|
function createLiveBrowserSessionState({ prefix, storage, idFactory }) {
|
|
36
36
|
if (!prefix) throw new Error('prefix required');
|
|
37
|
-
|
|
37
|
+
let store = storage;
|
|
38
|
+
if (!store) {
|
|
39
|
+
try { store = root.localStorage; } catch { store = null; /* storage denied */ }
|
|
40
|
+
}
|
|
38
41
|
const makeId = idFactory || function () {
|
|
39
42
|
// CSPRNG default: session owner ids gate recovery handoff, and the
|
|
40
43
|
// Math.random default was the same insecure-randomness class CodeQL
|