@bastani/atomic 0.9.20-alpha.4 → 0.9.20-alpha.5
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 +19 -0
- package/dist/builtin/intercom/CHANGELOG.md +6 -0
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/intercom/skills/intercom/SKILL.md +32 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/CHANGELOG.md +12 -0
- package/dist/builtin/subagents/README.md +2 -0
- 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-online-researcher.md +3 -3
- package/dist/builtin/subagents/agents/debugger.md +7 -5
- package/dist/builtin/subagents/agents/worker.md +4 -2
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/skills/agent-browser/SKILL.md +56 -0
- package/dist/builtin/subagents/skills/subagent/SKILL.md +32 -8
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +7 -4
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/builtin/workflows/CHANGELOG.md +30 -0
- package/dist/builtin/workflows/README.md +4 -2
- package/dist/builtin/workflows/builtin/adversarial-verification.js +3 -3
- package/dist/builtin/workflows/builtin/{chunk-n8g2da69.js → chunk-00ywx588.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-d1xqh1rd.js → chunk-55p5dxjk.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-1dydq7w3.js → chunk-7f381xnq.js} +62 -24
- package/dist/builtin/workflows/builtin/{chunk-k18g9me8.js → chunk-7h7s5xdj.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-n4yxrsm9.js → chunk-e83tc6nr.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-sn5mchnx.js → chunk-evfb0312.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-scgprmdj.js → chunk-ne6vh5ct.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-119kxb28.js → chunk-pfm1kgqz.js} +62 -43
- package/dist/builtin/workflows/builtin/{chunk-hnbbb5r0.js → chunk-tdqvdrg1.js} +4 -4
- package/dist/builtin/workflows/builtin/{chunk-kf5xpbkz.js → chunk-tvcydq13.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-9y0f90rd.js → chunk-x2nftpgj.js} +1 -1
- package/dist/builtin/workflows/builtin/{chunk-vt9zgr9d.js → chunk-zj5162bh.js} +4 -4
- package/dist/builtin/workflows/builtin/classify-and-act.js +3 -3
- package/dist/builtin/workflows/builtin/fan-out-and-synthesize.js +3 -3
- package/dist/builtin/workflows/builtin/generate-and-filter.js +3 -3
- package/dist/builtin/workflows/builtin/goal.js +4 -4
- package/dist/builtin/workflows/builtin/index.d.ts +1 -1
- package/dist/builtin/workflows/builtin/index.js +12 -12
- package/dist/builtin/workflows/builtin/loop-until-done.js +3 -3
- package/dist/builtin/workflows/builtin/open-claude-design.d.ts +1 -1
- package/dist/builtin/workflows/builtin/open-claude-design.js +3 -3
- package/dist/builtin/workflows/builtin/ralph.js +4 -4
- package/dist/builtin/workflows/builtin/steering-context.js +1 -1
- package/dist/builtin/workflows/builtin/tournament.js +3 -3
- package/dist/builtin/workflows/package.json +1 -1
- package/dist/builtin/workflows/skills/impeccable/SKILL.md +18 -11
- package/dist/builtin/workflows/skills/impeccable/reference/adapt.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/adapt.native.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/animate.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/audit.md +5 -5
- package/dist/builtin/workflows/skills/impeccable/reference/audit.native.md +6 -6
- package/dist/builtin/workflows/skills/impeccable/reference/bolder.md +2 -2
- package/dist/builtin/workflows/skills/impeccable/reference/clarify.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/colorize.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/craft-floor.md +0 -6
- package/dist/builtin/workflows/skills/impeccable/reference/critique.md +19 -41
- package/dist/builtin/workflows/skills/impeccable/reference/degraded/asset-producer.md +11 -65
- package/dist/builtin/workflows/skills/impeccable/reference/degraded/documenter.md +3 -3
- package/dist/builtin/workflows/skills/impeccable/reference/degraded/finish-reviewer.md +4 -4
- package/dist/builtin/workflows/skills/impeccable/reference/degraded/manual-edit-applier.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/delight.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/distill.md +2 -2
- package/dist/builtin/workflows/skills/impeccable/reference/doctor.md +4 -4
- package/dist/builtin/workflows/skills/impeccable/reference/document.md +4 -4
- package/dist/builtin/workflows/skills/impeccable/reference/extract.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/harden.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/hooks.md +21 -21
- package/dist/builtin/workflows/skills/impeccable/reference/init.md +8 -8
- package/dist/builtin/workflows/skills/impeccable/reference/layout.md +2 -2
- package/dist/builtin/workflows/skills/impeccable/reference/live-setup.md +10 -8
- package/dist/builtin/workflows/skills/impeccable/reference/live.md +39 -38
- package/dist/builtin/workflows/skills/impeccable/reference/new-work.md +48 -21
- package/dist/builtin/workflows/skills/impeccable/reference/onboard.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/optimize.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/overdrive.md +1 -1
- package/dist/builtin/workflows/skills/impeccable/reference/polish.md +11 -3
- package/dist/builtin/workflows/skills/impeccable/reference/quieter.md +2 -2
- package/dist/builtin/workflows/skills/impeccable/reference/routing.md +13 -7
- package/dist/builtin/workflows/skills/impeccable/reference/typeset.md +2 -2
- package/dist/builtin/workflows/skills/impeccable/reference/visualize.md +13 -19
- package/dist/builtin/workflows/skills/impeccable/scripts/VERSION +1 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/data/font-index-failures.json +121 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/data/font-index.json +1 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/impeccable +212 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/impeccable.cmd +218 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live-browser-dom.js +21 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live-browser-ignores.js +242 -0
- package/dist/builtin/workflows/skills/impeccable/scripts/live-browser-session.js +25 -4
- package/dist/builtin/workflows/skills/impeccable/scripts/live-browser.js +666 -197
- package/dist/builtin/workflows/skills/research-codebase/SKILL.md +1 -1
- package/dist/builtin/workflows/src/extension/index.bundle.mjs +156 -84
- package/dist/builtin/workflows/src/index.js +62 -24
- package/dist/core/execution-model-router.d.ts +2 -0
- package/dist/core/execution-model-router.d.ts.map +1 -1
- package/dist/core/execution-model-router.js +30 -4
- package/dist/core/execution-model-router.js.map +1 -1
- package/dist/core/model-routing-task.d.ts +1 -1
- package/dist/core/model-routing-task.d.ts.map +1 -1
- package/dist/core/model-routing-task.js +4 -3
- package/dist/core/model-routing-task.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +2 -1
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/components/chat-message-renderer.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-message-renderer.js +4 -0
- package/dist/modes/interactive/components/chat-message-renderer.js.map +1 -1
- package/docs/computer-use.md +22 -21
- package/docs/getting-started/first-session.md +2 -2
- package/docs/getting-started/installation.md +6 -2
- package/docs/intercom.md +6 -1
- package/docs/models/model-selection.md +11 -7
- package/docs/quickstart.md +1 -1
- package/docs/skills.md +1 -1
- package/docs/subagents/reference.md +2 -2
- package/docs/subagents.md +7 -1
- package/docs/usage.md +2 -0
- package/docs/windows.md +1 -1
- package/docs/workflows/api-reference.md +3 -4
- package/docs/workflows/builtins.md +2 -2
- package/docs/workflows/operations.md +1 -1
- package/docs/workflows/reliable-design.md +12 -1
- package/docs/workflows/verification.md +8 -8
- package/npm-shrinkwrap.json +32 -32
- package/package.json +3 -3
- package/dist/builtin/subagents/skills/playwright-cli/SKILL.md +0 -420
- package/dist/builtin/subagents/skills/playwright-cli/references/element-attributes.md +0 -23
- package/dist/builtin/subagents/skills/playwright-cli/references/playwright-tests.md +0 -39
- package/dist/builtin/subagents/skills/playwright-cli/references/request-mocking.md +0 -87
- package/dist/builtin/subagents/skills/playwright-cli/references/running-code.md +0 -241
- package/dist/builtin/subagents/skills/playwright-cli/references/session-management.md +0 -225
- package/dist/builtin/subagents/skills/playwright-cli/references/storage-state.md +0 -275
- package/dist/builtin/subagents/skills/playwright-cli/references/test-generation.md +0 -433
- package/dist/builtin/subagents/skills/playwright-cli/references/tracing.md +0 -139
- package/dist/builtin/subagents/skills/playwright-cli/references/video-recording.md +0 -143
- package/dist/builtin/workflows/skills/impeccable/agents/impeccable_asset_producer.toml +0 -94
- package/dist/builtin/workflows/skills/impeccable/agents/impeccable_documenter.toml +0 -27
- package/dist/builtin/workflows/skills/impeccable/agents/impeccable_finish_reviewer.toml +0 -41
- package/dist/builtin/workflows/skills/impeccable/agents/impeccable_manual_edit_applier.toml +0 -95
- package/dist/builtin/workflows/skills/impeccable/agents/openai.yaml +0 -4
- package/dist/builtin/workflows/skills/impeccable/scripts/concept-seed.mjs +0 -695
- package/dist/builtin/workflows/skills/impeccable/scripts/context-signals.mjs +0 -325
- package/dist/builtin/workflows/skills/impeccable/scripts/context.mjs +0 -1503
- package/dist/builtin/workflows/skills/impeccable/scripts/critique-storage.mjs +0 -222
- package/dist/builtin/workflows/skills/impeccable/scripts/detect-csp.mjs +0 -198
- package/dist/builtin/workflows/skills/impeccable/scripts/detect.mjs +0 -21
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/browser/injected/index.mjs +0 -2073
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/cli/main.mjs +0 -432
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/design-system.mjs +0 -1121
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/detect-antipatterns-browser.js +0 -8746
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/detect-antipatterns.mjs +0 -51
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/browser/detect-url.mjs +0 -376
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/regex/detect-text.mjs +0 -1168
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/static-html/css-cascade.mjs +0 -1192
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/static-html/detect-html.mjs +0 -290
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/engines/visual/screenshot-contrast.mjs +0 -189
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/findings.mjs +0 -18
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/node/file-system.mjs +0 -213
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/profile/profiler.mjs +0 -166
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/registry/antipatterns.mjs +0 -617
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/rules/checks.mjs +0 -5534
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/color.mjs +0 -588
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/constants.mjs +0 -112
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/fonts.mjs +0 -30
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/inline-ignores.mjs +0 -148
- package/dist/builtin/workflows/skills/impeccable/scripts/detector/shared/page.mjs +0 -35
- package/dist/builtin/workflows/skills/impeccable/scripts/doctor.mjs +0 -338
- package/dist/builtin/workflows/skills/impeccable/scripts/embed-prompt.mjs +0 -270
- package/dist/builtin/workflows/skills/impeccable/scripts/generate-image.mjs +0 -277
- package/dist/builtin/workflows/skills/impeccable/scripts/hook-admin.mjs +0 -783
- package/dist/builtin/workflows/skills/impeccable/scripts/hook-lib.mjs +0 -2305
- package/dist/builtin/workflows/skills/impeccable/scripts/hook.mjs +0 -78
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/artifact-schema.mjs +0 -93
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/composition-catalog.mjs +0 -200
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/concept-catalog.mjs +0 -395
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/design-parser.mjs +0 -925
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/impeccable-config.mjs +0 -640
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/impeccable-paths.mjs +0 -137
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/is-generated.mjs +0 -72
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/open-system-browser.mjs +0 -57
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/provider.mjs +0 -5
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/roll-selection.mjs +0 -369
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/staleness-deep.mjs +0 -483
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/staleness-notice.mjs +0 -169
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/staleness.mjs +0 -528
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/surface-briefs.mjs +0 -151
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/target-args.mjs +0 -42
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/target-slug.mjs +0 -33
- package/dist/builtin/workflows/skills/impeccable/scripts/lib/template-extensions.mjs +0 -146
- package/dist/builtin/workflows/skills/impeccable/scripts/live/accept-css.mjs +0 -617
- package/dist/builtin/workflows/skills/impeccable/scripts/live/accept-verify.mjs +0 -71
- package/dist/builtin/workflows/skills/impeccable/scripts/live/browser-script-parts.mjs +0 -77
- package/dist/builtin/workflows/skills/impeccable/scripts/live/completion.mjs +0 -28
- package/dist/builtin/workflows/skills/impeccable/scripts/live/event-validation.mjs +0 -199
- package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/astro.mjs +0 -47
- package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/detect-utils.mjs +0 -157
- package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/index.mjs +0 -143
- package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/journal.mjs +0 -205
- package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/nextjs.mjs +0 -49
- package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/nuxt.mjs +0 -170
- package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/script-src.mjs +0 -26
- package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/static-html.mjs +0 -26
- package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/sveltekit.mjs +0 -71
- package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/tag-strategy.mjs +0 -247
- package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/tanstack-start.mjs +0 -70
- package/dist/builtin/workflows/skills/impeccable/scripts/live/frameworks/vite-generic.mjs +0 -42
- package/dist/builtin/workflows/skills/impeccable/scripts/live/generation-preflight.mjs +0 -149
- package/dist/builtin/workflows/skills/impeccable/scripts/live/insert-ui.mjs +0 -458
- package/dist/builtin/workflows/skills/impeccable/scripts/live/instructions.mjs +0 -169
- package/dist/builtin/workflows/skills/impeccable/scripts/live/manual-apply.mjs +0 -939
- package/dist/builtin/workflows/skills/impeccable/scripts/live/manual-edit-routes.mjs +0 -357
- package/dist/builtin/workflows/skills/impeccable/scripts/live/manual-edits-buffer.mjs +0 -152
- package/dist/builtin/workflows/skills/impeccable/scripts/live/poll-lanes.mjs +0 -14
- package/dist/builtin/workflows/skills/impeccable/scripts/live/roots.mjs +0 -670
- package/dist/builtin/workflows/skills/impeccable/scripts/live/session-store.mjs +0 -563
- package/dist/builtin/workflows/skills/impeccable/scripts/live/source-lock.mjs +0 -105
- package/dist/builtin/workflows/skills/impeccable/scripts/live/source-search.mjs +0 -105
- package/dist/builtin/workflows/skills/impeccable/scripts/live/svelte-ast.mjs +0 -969
- package/dist/builtin/workflows/skills/impeccable/scripts/live/svelte-component.mjs +0 -1401
- package/dist/builtin/workflows/skills/impeccable/scripts/live/sveltekit-adapter.mjs +0 -314
- package/dist/builtin/workflows/skills/impeccable/scripts/live/tanstack-adapter.mjs +0 -280
- package/dist/builtin/workflows/skills/impeccable/scripts/live/ui-surfaces.mjs +0 -75
- package/dist/builtin/workflows/skills/impeccable/scripts/live/vocabulary.mjs +0 -171
- package/dist/builtin/workflows/skills/impeccable/scripts/live-accept.mjs +0 -961
- package/dist/builtin/workflows/skills/impeccable/scripts/live-commit-manual-edits.mjs +0 -1244
- package/dist/builtin/workflows/skills/impeccable/scripts/live-complete.mjs +0 -107
- package/dist/builtin/workflows/skills/impeccable/scripts/live-copy-edit-agent.mjs +0 -800
- package/dist/builtin/workflows/skills/impeccable/scripts/live-discard-manual-edits.mjs +0 -51
- package/dist/builtin/workflows/skills/impeccable/scripts/live-inject.mjs +0 -515
- package/dist/builtin/workflows/skills/impeccable/scripts/live-insert.mjs +0 -292
- package/dist/builtin/workflows/skills/impeccable/scripts/live-manual-edit-evidence.mjs +0 -371
- package/dist/builtin/workflows/skills/impeccable/scripts/live-poll.mjs +0 -427
- package/dist/builtin/workflows/skills/impeccable/scripts/live-resume.mjs +0 -123
- package/dist/builtin/workflows/skills/impeccable/scripts/live-server.mjs +0 -1675
- package/dist/builtin/workflows/skills/impeccable/scripts/live-status.mjs +0 -71
- package/dist/builtin/workflows/skills/impeccable/scripts/live-target.mjs +0 -30
- package/dist/builtin/workflows/skills/impeccable/scripts/live-wrap.mjs +0 -927
- package/dist/builtin/workflows/skills/impeccable/scripts/live.mjs +0 -365
- package/dist/builtin/workflows/skills/impeccable/scripts/palette.mjs +0 -628
- package/dist/builtin/workflows/skills/impeccable/scripts/pin.mjs +0 -224
- package/dist/builtin/workflows/skills/impeccable/scripts/serve-question.mjs +0 -1540
- package/dist/builtin/workflows/skills/impeccable/scripts/surface-brief.mjs +0 -74
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACN,WAAW,GAIX,MAAM,wBAAwB,CAAC;AAWhC,OAAO,EAAE,mBAAmB,EAAyB,MAAM,4BAA4B,CAAC;AACxF,gEAAgE;AAChE,OAAO,EAAE,aAAa,EAA0D,MAAM,+BAA+B,CAAC;AAEtH,OAAO,EAA0B,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACpG,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAC3G,OAAO,EAAE,OAAO,EAAE,MAAM,4CAA4C,CAAC;AACrE,OAAO,EACN,0BAA0B,EAC1B,8BAA8B,GAC9B,MAAM,oDAAoD,CAAC;AAC5D,0BAA0B;AAE1B,OAAO,EAAa,SAAS,EAAE,MAAM,eAAe,CAAC;AACrD,eAAe;AACf,OAAO,EACN,QAAQ,EACR,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,WAAW,EACX,YAAY,EACZ,8BAA8B,EAC9B,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,WAAW,EACX,eAAe,EACf,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,sBAAsB,EACtB,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACX,OAAO,EACP,iCAAiC,GACjC,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,YAAY,EAQZ,eAAe,GAEf,MAAM,yBAAyB,CAAC;AAC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AsB,EACtB,qCAAqC,EACrC,uCAAuC,EAGvC,qBAAqB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAqB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC9F,OAAO,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC3G,OAAO,EAAE,oCAAoC,EAAE,MAAM,iBAAiB,CAAC;AACvE,kBAAkB;AAClB,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["export type { ExtensionBindings } from \"./core/agent-session-types.js\";\nexport {\n\tCacheWarmer,\n\ttype CacheWarmingDecisionEvent,\n\ttype CacheWarmingDecisionEventResult,\n\ttype CacheWarmingStatus,\n} from \"./core/cache-warmer.ts\";\nexport type {\n\tHostDiagnostic,\n\tHostInput,\n\tHostInputOptions,\n\tQuestionAnswer,\n\tQuestionnaireError,\n\tQuestionnaireResult,\n\tQuestionParams,\n} from \"./core/extensions/host-input.js\";\nexport type { UsageEntry } from \"./core/session-manager.ts\";\nexport { CACHE_WARMING_MODES, type CacheWarmingMode } from \"./core/settings-manager.ts\";\n// Internal trusted-host task integration (not model authority).\nexport { AgentTaskHost, type AgentTaskHostBinding, type AgentTaskRunnerFactory } from \"./core/tasks/agent-adapter.js\";\nexport type { AgentIntent, OperationId, TaskId, TaskResult, WaitPolicy } from \"./core/tasks/contracts.js\";\nexport { type AdmittedAgentTask, collectAgentTasks } from \"./core/tasks/execution-scope.js\";\nexport { bindOwnerTaskStore, getOwnerTaskStore, OwnerTaskStore } from \"./core/tasks/owner-store.js\";\nexport { renderTaskFooter, TaskList, taskListSections } from \"./modes/interactive/components/task-list.js\";\nexport { TaskRow } from \"./modes/interactive/components/task-row.js\";\nexport {\n\tapplyAssistantMessageDelta,\n\tbeginStreamingAssistantMessage,\n} from \"./modes/interactive/streaming-assistant-message.ts\";\n// Core session management\n\nexport { type Args, parseArgs } from \"./cli/args.ts\";\n// Config paths\nexport {\n\tAPP_NAME,\n\tAPP_TITLE,\n\tCONFIG_DIR_NAME,\n\tCONFIG_DIR_NAMES,\n\tgetAgentConfigPaths,\n\tgetAgentDir,\n\tgetAgentDirs,\n\tgetBundledInteractiveAssetPath,\n\tgetChangelogPath,\n\tgetDocsPath,\n\tgetEnvNames,\n\tgetEnvValue,\n\tgetExamplesPath,\n\tgetExportTemplateDir,\n\tgetInteractiveAssetsDir,\n\tgetLegacyAgentDir,\n\tgetPackageDir,\n\tgetPackageJsonPath,\n\tgetProjectConfigDirs,\n\tgetProjectConfigPaths,\n\tgetReadmePath,\n\tgetThemesDir,\n\tgetUserConfigDirs,\n\tgetUserConfigPaths,\n\thasEnvValue,\n\tisBunBinary,\n\tLEGACY_CONFIG_DIR_NAME,\n\tLEGACY_ENV_PREFIX,\n\tPACKAGE_NAME,\n\tsetEnvValue,\n\tVERSION,\n\tWORKFLOW_STAGE_SUBAGENT_GUARD_ENV,\n} from \"./config.js\";\nexport {\n\tAgentSession,\n\ttype AgentSessionConfig,\n\ttype AgentSessionEvent,\n\ttype AgentSessionEventListener,\n\ttype CompactionReason,\n\ttype ModelCycleResult,\n\ttype ParsedSkillBlock,\n\ttype PromptOptions,\n\tparseSkillBlock,\n\ttype SessionStats,\n} from \"./core/agent-session.js\";\n// Auth and model runtime\nexport { AuthStorage, readStoredCredential } from \"./core/auth-storage.ts\";\nexport {\n\ttype AuthStorageBackend,\n\tFileAuthStorageBackend,\n\tInMemoryAuthStorageBackend,\n} from \"./core/auth-storage-backends.ts\";\nexport { type BashResult, executeBashWithOperations } from \"./core/bash-executor.ts\";\nexport { getBuiltinPackagePaths } from \"./core/builtin-packages.ts\";\nexport {\n\ttype CallbackActivityDescriptor,\n\ttype CallbackActivityKind,\n\trunCallback,\n\trunSynchronousCallback,\n} from \"./core/callback-activity.ts\";\n// Cloudflare AI Gateway over the Workers AI binding (no API token; see docs/providers.md)\nexport {\n\ttype AiGatewayBinding,\n\ttype AiGatewayBindingGateway,\n\ttype AiGatewayUniversalRequestLike,\n\tCLOUDFLARE_GATEWAY_BINDING_AUTH_SENTINEL,\n\tcreateGatewayBindingFetch,\n\ttype GatewayBindingFetchOptions,\n} from \"./core/cloudflare-gateway-binding.ts\";\n// Compaction\nexport {\n\ttype BranchPreparation,\n\ttype BranchSummaryResult,\n\ttype CollectEntriesResult,\n\ttype CompactedTranscript,\n\ttype CompactionPlannerModel,\n\ttype CompactionPlanOptions,\n\ttype CompactionRung,\n\ttype CompactionRungResult,\n\ttype CompactionRunRequest,\n\ttype CompactionUrgency,\n\tcalculateContextTokens,\n\tcollectEntriesForBranchSummary,\n\tDEFAULT_COMPACTION_SETTINGS,\n\testimateTokens,\n\ttype FileOperations,\n\ttype GenerateBranchSummaryOptions,\n\tgenerateBranchSummary,\n\tgetLastAssistantUsage,\n\ttype LineRange,\n\ttype PlannerAuth,\n\ttype PlannerBudget,\n\ttype PlannerLimitClass,\n\ttype PlannerOutcome,\n\tprepareBranchEntries,\n\tprepareCompactionBoundary,\n\trunVerbatimCompaction,\n\tserializeConversation,\n\tserializeConversationForCompaction,\n\tshouldCompact,\n\tstartNewContextWindow,\n\ttype VerbatimCompactionDetails,\n\ttype VerbatimCompactionParameters,\n\ttype VerbatimCompactionPreparation,\n\ttype VerbatimCompactionResult,\n} from \"./core/compaction/index.ts\";\nexport { createEventBus, type EventBus, type EventBusController } from \"./core/event-bus.js\";\nexport { type ModelRoute, type ModelRoutingContext, routeExecutionModel } from \"./core/execution-model-router.js\";\nexport { areExperimentalFeaturesEnabled } from \"./core/experimental.ts\";\nexport { sessionScopedExtensionState } from \"./core/extension-session-state.ts\";\nexport {\n\tgetModelFastRoute,\n\tresolveUpstreamModelId,\n\tusesChatGptCodexTransport,\n\tusesFirstPartyCodexRouting,\n\twithCodexFastRouteHeaders,\n\twithFastRouteStreamOptions,\n} from \"./core/fast-model-routing.ts\";\nexport {\n\tCODEX_FAST_ROUTE_HEADER,\n\tCODEX_FAST_ROUTE_ORIGINATOR,\n} from \"./core/fast-model-routing-transport.ts\";\nexport {\n\tcopilotAdvertisedFastModelIds,\n\tderiveFastModelVariants,\n\tFAST_MODEL_ID_SUFFIX,\n\tFAST_MODEL_SERVICE_TIER,\n\ttype FastModelVariantDerivation,\n\ttype FastModelVariantDiagnostic,\n\ttype FastModelVariantsOptions,\n\tfastModelId,\n\tisNativeFastRouteApi,\n\tusesOpenAIFastServiceTier,\n\twithFastModelVariants,\n} from \"./core/fast-model-variants.ts\";\nexport {\n\tparseFlattenedKeyPath,\n\treconstructFlattenedKeys,\n\tunflattenArgumentsWithSchema,\n} from \"./core/flattened-tool-arguments.ts\";\n// Footer data provider (git branch + extension statuses - data not otherwise available to extensions)\nexport type { ReadonlyFooterDataProvider } from \"./core/footer-data-provider.ts\";\nexport {\n\tRUNTIME_INTERCOM_GROUP_ENV,\n\treadRuntimeIntercomGroup,\n\truntimeIntercomGroupEnvKey,\n} from \"./core/intercom-runtime-group.ts\";\nexport { keybindingIdentity } from \"./core/keybinding-identity.js\";\nexport { convertToLlm } from \"./core/messages.ts\";\nexport type {\n\tModelFallbackFailureKind,\n\tModelFallbackFailureSignal,\n\tModelFallbackFailureSource,\n} from \"./core/model-fallback-failures.ts\";\nexport {\n\terrorMessage,\n\tisRetryableModelFailure,\n\tisRetryableSameModelFailure,\n\tmodelFailureMessage,\n\tnormalizeModelFailureSignal,\n} from \"./core/model-fallback-failures.ts\";\nexport { ModelRegistry } from \"./core/model-registry.ts\";\nexport {\n\teligiblePair,\n\ttype ModelConstraints,\n\tModelConstraintsSchema,\n\ttype ModelRouterOutput,\n\tparseModelConstraints,\n} from \"./core/model-routing-constraints.js\";\nexport {\n\ttype CreateModelRuntimeOptions,\n\tCredentialSynchronizationError,\n\ttype CredentialSynchronizationOperation,\n\tModelRuntime,\n\ttype ModelRuntimeAuthOverrides,\n} from \"./core/model-runtime.js\";\nexport type {\n\tPackageManager,\n\tPathMetadata,\n\tProgressCallback,\n\tProgressEvent,\n\tResolvedPaths,\n\tResolvedResource,\n} from \"./core/package-manager.ts\";\nexport { DefaultPackageManager } from \"./core/package-manager.ts\";\nexport type {\n\tDefaultResourceLoaderInheritanceSnapshot,\n\tResourceCollision,\n\tResourceDiagnostic,\n\tResourceLoader,\n\tSkillCandidate,\n\tSkillCatalog,\n\tSkillCatalogCommand,\n\tSkillResolution,\n} from \"./core/resource-loader.ts\";\nexport {\n\tbuildSkillCatalog,\n\tDefaultResourceLoader,\n\tgetSkillCatalog,\n\tloadProjectContextFiles,\n} from \"./core/resource-loader.ts\";\nexport { nextRetryDecision, type RetryDecision, type RetryPolicySettings } from \"./core/retry-policy.ts\";\n// SDK for programmatic usage\nexport {\n\tAgentSessionRuntime,\n\ttype AgentSessionRuntimeDiagnostic,\n\ttype AgentSessionServices,\n\ttype AtomicBuiltin,\n\ttype CreateAgentSessionFromServicesOptions,\n\ttype CreateAgentSessionOptions,\n\ttype CreateAgentSessionResult,\n\ttype CreateAgentSessionRuntimeFactory,\n\ttype CreateAgentSessionRuntimeResult,\n\ttype CreateAgentSessionServicesOptions,\n\t// Factory\n\tcreateAgentSession,\n\tcreateAgentSessionFromServices,\n\tcreateAgentSessionRuntime,\n\tcreateAgentSessionServices,\n\tcreateBashTool,\n\t// Tool factories (for custom cwd)\n\tcreateCodingTools,\n\tcreateEditTool,\n\tcreateFindTool,\n\tcreateLsTool,\n\tcreatePowerShellTool,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateSearchTool,\n\tcreateStructuredOutputCapture,\n\tcreateStructuredOutputTool,\n\tcreateWriteTool,\n\ttype JsonObject,\n\ttype JsonPrimitive,\n\ttype JsonValue,\n\ttype MessageEndEvent,\n\ttype MessageStartEvent,\n\ttype MessageUpdateEvent,\n\ttype PromptTemplate,\n\tSTRUCTURED_OUTPUT_TOOL_NAME,\n\ttype StructuredOutputCapture,\n\ttype StructuredOutputFileCapture,\n\ttype StructuredOutputToolOptions,\n\ttype ToolExecutionEndEvent,\n\ttype ToolExecutionStartEvent,\n\ttype ToolExecutionUpdateEvent,\n} from \"./core/sdk.ts\";\nexport {\n\ttype BranchSummaryEntry,\n\tbuildContextEntries,\n\tbuildSessionContext,\n\ttype CompactionEntry,\n\tCURRENT_SESSION_VERSION,\n\ttype CustomEntry,\n\ttype CustomMessageEntry,\n\ttype FileEntry,\n\tgetLatestCompactionBoundaryEntry,\n\ttype ModelChangeEntry,\n\tmigrateSessionEntries,\n\ttype NewSessionOptions,\n\tparseSessionEntries,\n\ttype SessionContext,\n\ttype SessionEntry,\n\ttype SessionEntryBase,\n\ttype SessionHeader,\n\ttype SessionInfo,\n\ttype SessionInfoEntry,\n\tSessionManager,\n\ttype SessionMessageEntry,\n\ttype SessionNameState,\n\ttype SessionTreeNode,\n\ttype SessionWorkflowMetadata,\n\tsessionEntryToContextMessages,\n\ttype ThinkingLevelChangeEntry,\n} from \"./core/session-manager.ts\";\nexport {\n\tWORKFLOW_SESSION_METADATA_ENV,\n\tworkflowSessionMetadataFromEnv,\n} from \"./core/session-manager-classification.ts\";\nexport type { DefaultProjectTrust } from \"./core/settings-manager.ts\";\nexport {\n\ttype CompactionModelOverride,\n\ttype CompactionSettings,\n\ttype ImageSettings,\n\ttype PackageSource,\n\ttype RetrySettings,\n\tSettingsManager,\n\ttype SettingsManagerCreateOptions,\n} from \"./core/settings-manager.ts\";\n// Skills\nexport {\n\tformatSkillsForPrompt,\n\ttype LoadSkillsFromDirOptions,\n\ttype LoadSkillsResult,\n\tloadSkills,\n\tloadSkillsFromDir,\n\ttype Skill,\n\ttype SkillFrontmatter,\n} from \"./core/skills.ts\";\nexport { createSyntheticSourceInfo } from \"./core/source-info.ts\";\nexport {\n\tDEFAULT_STRUCTURED_OUTPUT_TIMEOUT_MS,\n\tgetStructuredOutputProviders,\n\tinferRouterDecision,\n\tinferStructuredOutput,\n\tJEV_STRUCTURED_OUTPUT_PROVIDER,\n\ttype RouterDecisionRequest,\n\ttype RouterModelSelectionOptions,\n\tresolveRouterModel,\n\ttype StructuredChoiceQuestion,\n\ttype StructuredOutputModel,\n\ttype StructuredOutputRequest,\n\ttype StructuredOutputResult,\n} from \"./core/structured-output/index.js\";\nexport type { NormalizedBuildSystemPromptOptions } from \"./core/system-prompt.ts\";\nexport { type EditDiffResult, generateDiffString, generateUnifiedPatch } from \"./core/tools/edit-diff.ts\";\n// Builtin tool definitions reusable by first-party extensions (e.g. workflows\n// invoking the structured ask_user_question UI deterministically).\n// Tools\nexport {\n\tBASH_SHELL_PRESENTATION,\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\tbashToolSystemPromptContribution,\n\tcreateAskUserQuestionToolDefinition,\n\tcreateBashToolDefinition,\n\tcreateEditToolDefinition,\n\tcreateFindToolDefinition,\n\tcreateKillTool,\n\tcreateKillToolDefinition,\n\tcreateLocalBashOperations,\n\tcreateLocalPowerShellOperations,\n\tcreateLsToolDefinition,\n\tcreatePowerShellToolDefinition,\n\tcreateReadToolDefinition,\n\tcreateSearchToolDefinition,\n\tcreateWriteToolDefinition,\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\ttype EditOperations,\n\ttype EditToolDetails,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n\teditToolSystemPromptContribution,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n\tfindToolSystemPromptContribution,\n\tformatSize,\n\ttype KillToolOptions,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n\tlsToolSystemPromptContribution,\n\ttype PowerShellOperations,\n\ttype PowerShellSpawnContext,\n\ttype PowerShellSpawnHook,\n\ttype PowerShellToolDetails,\n\ttype PowerShellToolInput,\n\ttype PowerShellToolOptions,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n\treadToolSystemPromptContribution,\n\ttype SearchToolDetails,\n\ttype SearchToolInput,\n\ttype SearchToolOptions,\n\ttype ShellToolPresentation,\n\tsearchToolSystemPromptContribution,\n\ttype ToolsOptions,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n\ttype WriteFileOptions,\n\ttype WriteOperations,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n\twithFileMutationQueue,\n\twriteToolSystemPromptContribution,\n} from \"./core/tools/index.ts\";\nexport {\n\thasProjectTrustInputs,\n\thasTrustRequiringProjectResources,\n\ttype ProjectTrustDecision,\n\tProjectTrustStore,\n\ttype ProjectTrustStoreEntry,\n\ttype ProjectTrustUpdate,\n\tTRUST_REQUIRING_PROJECT_CONFIG_RESOURCES,\n} from \"./core/trust-manager.ts\";\nexport { StringEnum, type StringEnumOptions } from \"./core/typebox-compat.ts\";\nexport * from \"./index-extensions.js\";\n// Main entry point\nexport { type MainOptions, main } from \"./main.ts\";\nexport {\n\tInteractiveMode,\n\ttype InteractiveModeOptions,\n\ttype ModelInfo,\n\ttype PrintModeOptions,\n\tRpcClient,\n\ttype RpcClientOptions,\n\ttype RpcCommand,\n\ttype RpcEvent,\n\ttype RpcEventListener,\n\ttype RpcExtensionUIRequest,\n\ttype RpcExtensionUIResponse,\n\ttype RpcResponse,\n\ttype RpcSessionState,\n\trunPrintMode,\n\trunRpcMode,\n} from \"./modes/index.ts\";\n// UI components for extensions\nexport {\n\tArminComponent,\n\tAssistantMessageComponent,\n\tBashExecutionComponent,\n\tBorderedLoader,\n\tBranchSummaryMessageComponent,\n\ttype ChatMessageEntry,\n\ttype ChatMessageRenderOptions,\n\t// Internal host seam for bundled workflow stage chat; not yet a stable extension API.\n\tChatSessionHost,\n\ttype ChatSessionHostBashRequest,\n\ttype ChatSessionHostCommands,\n\ttype ChatSessionHostEntry,\n\ttype ChatSessionHostOpts,\n\ttype ChatSessionHostStyle,\n\ttype ChatSessionSubmitMode,\n\tChatTranscriptComponent,\n\ttype ChatTranscriptEntryLike,\n\ttype ChatTranscriptRenderer,\n\ttype ChatTranscriptRole,\n\tCustomEditor,\n\ttype CustomEditorOptions,\n\tCustomEntryComponent,\n\tCustomMessageComponent,\n\tchatEntriesFromAgentMessages,\n\tDynamicBorder,\n\tExtensionEditorComponent,\n\tExtensionInputComponent,\n\tExtensionSelectorComponent,\n\tFooterComponent,\n\tkeyHint,\n\tkeyHintIfBound,\n\tkeyText,\n\tLiveChatEntriesController,\n\tLoginDialogComponent,\n\tModelSelectorComponent,\n\tOAuthSelectorComponent,\n\ttype RenderDiffOptions,\n\trawKeyHint,\n\trenderChatMessageEntry,\n\trenderDiff,\n\tScrollableChatTranscriptComponent,\n\tScrollableComponentViewport,\n\tSessionSelectorComponent,\n\ttype SettingsCallbacks,\n\ttype SettingsConfig,\n\tSettingsSelectorComponent,\n\tShowImagesSelectorComponent,\n\tSkillInvocationMessageComponent,\n\tThemeSelectorComponent,\n\tThinkingSelectorComponent,\n\tToolExecutionComponent,\n\ttype ToolExecutionOptions,\n\tTRANSCRIPT_JUMP_TO_END_URL,\n\tTranscriptFollowIndicator,\n\tTreeSelectorComponent,\n\ttruncateToVisualLines,\n\tUsageMeterComponent,\n\tUserMessageComponent,\n\tUserMessageSelectorComponent,\n\ttype VisualTruncateResult,\n\tWorkingStatusComponent,\n\ttype WorkingStatusComponentOptions,\n} from \"./modes/interactive/components/index.ts\";\nexport {\n\tclassifyChatCommand,\n\tcreateSessionSkillAutocompleteProvider,\n\tgetSessionSkillCommands,\n} from \"./modes/interactive/skill-command-autocomplete.ts\";\n// Theme utilities for custom tools and extensions\nexport {\n\tgetLanguageFromPath,\n\tgetMarkdownTheme,\n\tgetSelectListTheme,\n\tgetSettingsListTheme,\n\thighlightCode,\n\tinitTheme,\n\tTheme,\n\ttype ThemeColor,\n} from \"./modes/interactive/theme/theme.js\";\n// Run modes for programmatic SDK usage\nexport { pickWhimsicalWorkingMessage } from \"./modes/interactive/whimsical-messages.ts\";\nexport { createChildProcessEnvironment } from \"./utils/child-process.ts\";\n// Clipboard utilities\nexport { copyToClipboard } from \"./utils/clipboard.ts\";\nexport { parseFrontmatter, stripFrontmatter } from \"./utils/frontmatter.ts\";\nexport {\n\tisSafeFsWatchPathError,\n\tisUnsafeWindowsShortPath,\n\tresolveNativeWatchPath,\n\tSAFE_FS_WATCH_CANONICALIZATION_FAILED,\n\tSAFE_FS_WATCH_UNSAFE_WINDOWS_SHORT_PATH,\n\ttype SafeFsWatchErrorCode,\n\ttype SafeFsWatchPathError,\n\twatchWithErrorHandler,\n} from \"./utils/fs-watch.ts\";\nexport { createGitEnvironment, GIT_LOCAL_ENV_VARS } from \"./utils/git-env.ts\";\nexport { convertToPng } from \"./utils/image-convert.ts\";\nexport { formatDimensionNote, type ResizedImage, resizeImage } from \"./utils/image-resize.ts\";\nexport { INTERACTIVE_ENGINE_ENV_VARS, scrubInteractiveEngineEnv } from \"./utils/interactive-engine-env.ts\";\nexport { detectSupportedImageMimeTypeFromFile } from \"./utils/mime.ts\";\n// Shell utilities\nexport { getPowerShellConfig, getShellConfig } from \"./utils/shell.ts\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACN,WAAW,GAIX,MAAM,wBAAwB,CAAC;AAWhC,OAAO,EAAE,mBAAmB,EAAyB,MAAM,4BAA4B,CAAC;AACxF,gEAAgE;AAChE,OAAO,EAAE,aAAa,EAA0D,MAAM,+BAA+B,CAAC;AAEtH,OAAO,EAA0B,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACpG,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,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ionBindings } from \"./core/agent-session-types.js\";\nexport {\n\tCacheWarmer,\n\ttype CacheWarmingDecisionEvent,\n\ttype CacheWarmingDecisionEventResult,\n\ttype CacheWarmingStatus,\n} from \"./core/cache-warmer.ts\";\nexport type {\n\tHostDiagnostic,\n\tHostInput,\n\tHostInputOptions,\n\tQuestionAnswer,\n\tQuestionnaireError,\n\tQuestionnaireResult,\n\tQuestionParams,\n} from \"./core/extensions/host-input.js\";\nexport type { UsageEntry } from \"./core/session-manager.ts\";\nexport { CACHE_WARMING_MODES, type CacheWarmingMode } from \"./core/settings-manager.ts\";\n// Internal trusted-host task integration (not model authority).\nexport { AgentTaskHost, type AgentTaskHostBinding, type AgentTaskRunnerFactory } from \"./core/tasks/agent-adapter.js\";\nexport type { AgentIntent, OperationId, TaskId, TaskResult, WaitPolicy } from \"./core/tasks/contracts.js\";\nexport { type AdmittedAgentTask, collectAgentTasks } from \"./core/tasks/execution-scope.js\";\nexport { bindOwnerTaskStore, getOwnerTaskStore, OwnerTaskStore } from \"./core/tasks/owner-store.js\";\nexport { renderTaskFooter, TaskList, taskListSections } from \"./modes/interactive/components/task-list.js\";\nexport { TaskRow } from \"./modes/interactive/components/task-row.js\";\nexport {\n\tapplyAssistantMessageDelta,\n\tbeginStreamingAssistantMessage,\n} from \"./modes/interactive/streaming-assistant-message.ts\";\n// Core session management\n\nexport { type Args, parseArgs } from \"./cli/args.ts\";\n// Config paths\nexport {\n\tAPP_NAME,\n\tAPP_TITLE,\n\tCONFIG_DIR_NAME,\n\tCONFIG_DIR_NAMES,\n\tgetAgentConfigPaths,\n\tgetAgentDir,\n\tgetAgentDirs,\n\tgetBundledInteractiveAssetPath,\n\tgetChangelogPath,\n\tgetDocsPath,\n\tgetEnvNames,\n\tgetEnvValue,\n\tgetExamplesPath,\n\tgetExportTemplateDir,\n\tgetInteractiveAssetsDir,\n\tgetLegacyAgentDir,\n\tgetPackageDir,\n\tgetPackageJsonPath,\n\tgetProjectConfigDirs,\n\tgetProjectConfigPaths,\n\tgetReadmePath,\n\tgetThemesDir,\n\tgetUserConfigDirs,\n\tgetUserConfigPaths,\n\thasEnvValue,\n\tisBunBinary,\n\tLEGACY_CONFIG_DIR_NAME,\n\tLEGACY_ENV_PREFIX,\n\tPACKAGE_NAME,\n\tsetEnvValue,\n\tVERSION,\n\tWORKFLOW_STAGE_SUBAGENT_GUARD_ENV,\n} from \"./config.js\";\nexport {\n\tAgentSession,\n\ttype AgentSessionConfig,\n\ttype AgentSessionEvent,\n\ttype AgentSessionEventListener,\n\ttype CompactionReason,\n\ttype ModelCycleResult,\n\ttype ParsedSkillBlock,\n\ttype PromptOptions,\n\tparseSkillBlock,\n\ttype SessionStats,\n} from \"./core/agent-session.js\";\n// Auth and model runtime\nexport { AuthStorage, readStoredCredential } from \"./core/auth-storage.ts\";\nexport {\n\ttype AuthStorageBackend,\n\tFileAuthStorageBackend,\n\tInMemoryAuthStorageBackend,\n} from \"./core/auth-storage-backends.ts\";\nexport { type BashResult, executeBashWithOperations } from \"./core/bash-executor.ts\";\nexport { getBuiltinPackagePaths } from \"./core/builtin-packages.ts\";\nexport {\n\ttype CallbackActivityDescriptor,\n\ttype CallbackActivityKind,\n\trunCallback,\n\trunSynchronousCallback,\n} from \"./core/callback-activity.ts\";\n// Cloudflare AI Gateway over the Workers AI binding (no API token; see docs/providers.md)\nexport {\n\ttype AiGatewayBinding,\n\ttype AiGatewayBindingGateway,\n\ttype AiGatewayUniversalRequestLike,\n\tCLOUDFLARE_GATEWAY_BINDING_AUTH_SENTINEL,\n\tcreateGatewayBindingFetch,\n\ttype GatewayBindingFetchOptions,\n} from \"./core/cloudflare-gateway-binding.ts\";\n// Compaction\nexport {\n\ttype BranchPreparation,\n\ttype BranchSummaryResult,\n\ttype CollectEntriesResult,\n\ttype CompactedTranscript,\n\ttype CompactionPlannerModel,\n\ttype CompactionPlanOptions,\n\ttype CompactionRung,\n\ttype CompactionRungResult,\n\ttype CompactionRunRequest,\n\ttype CompactionUrgency,\n\tcalculateContextTokens,\n\tcollectEntriesForBranchSummary,\n\tDEFAULT_COMPACTION_SETTINGS,\n\testimateTokens,\n\ttype FileOperations,\n\ttype GenerateBranchSummaryOptions,\n\tgenerateBranchSummary,\n\tgetLastAssistantUsage,\n\ttype LineRange,\n\ttype PlannerAuth,\n\ttype PlannerBudget,\n\ttype PlannerLimitClass,\n\ttype PlannerOutcome,\n\tprepareBranchEntries,\n\tprepareCompactionBoundary,\n\trunVerbatimCompaction,\n\tserializeConversation,\n\tserializeConversationForCompaction,\n\tshouldCompact,\n\tstartNewContextWindow,\n\ttype VerbatimCompactionDetails,\n\ttype VerbatimCompactionParameters,\n\ttype VerbatimCompactionPreparation,\n\ttype VerbatimCompactionResult,\n} from \"./core/compaction/index.ts\";\nexport { createEventBus, type EventBus, type EventBusController } from \"./core/event-bus.js\";\nexport { type ModelRoute, type ModelRoutingContext, routeExecutionModel } from \"./core/execution-model-router.js\";\nexport { areExperimentalFeaturesEnabled } from \"./core/experimental.ts\";\nexport { sessionScopedExtensionState } from \"./core/extension-session-state.ts\";\nexport {\n\tgetModelFastRoute,\n\tresolveUpstreamModelId,\n\tusesChatGptCodexTransport,\n\tusesFirstPartyCodexRouting,\n\twithCodexFastRouteHeaders,\n\twithFastRouteStreamOptions,\n} from \"./core/fast-model-routing.ts\";\nexport {\n\tCODEX_FAST_ROUTE_HEADER,\n\tCODEX_FAST_ROUTE_ORIGINATOR,\n} from \"./core/fast-model-routing-transport.ts\";\nexport {\n\tcopilotAdvertisedFastModelIds,\n\tderiveFastModelVariants,\n\tFAST_MODEL_ID_SUFFIX,\n\tFAST_MODEL_SERVICE_TIER,\n\ttype FastModelVariantDerivation,\n\ttype FastModelVariantDiagnostic,\n\ttype FastModelVariantsOptions,\n\tfastModelId,\n\tisNativeFastRouteApi,\n\tusesOpenAIFastServiceTier,\n\twithFastModelVariants,\n} from \"./core/fast-model-variants.ts\";\nexport {\n\tparseFlattenedKeyPath,\n\treconstructFlattenedKeys,\n\tunflattenArgumentsWithSchema,\n} from \"./core/flattened-tool-arguments.ts\";\n// Footer data provider (git branch + extension statuses - data not otherwise available to extensions)\nexport type { ReadonlyFooterDataProvider } from \"./core/footer-data-provider.ts\";\nexport {\n\tRUNTIME_INTERCOM_GROUP_ENV,\n\treadRuntimeIntercomGroup,\n\truntimeIntercomGroupEnvKey,\n} from \"./core/intercom-runtime-group.ts\";\nexport { keybindingIdentity } from \"./core/keybinding-identity.js\";\nexport { convertToLlm } from \"./core/messages.ts\";\nexport type {\n\tModelFallbackFailureKind,\n\tModelFallbackFailureSignal,\n\tModelFallbackFailureSource,\n} from \"./core/model-fallback-failures.ts\";\nexport {\n\terrorMessage,\n\tisRetryableModelFailure,\n\tisRetryableSameModelFailure,\n\tmodelFailureMessage,\n\tnormalizeModelFailureSignal,\n} from \"./core/model-fallback-failures.ts\";\nexport { ModelRegistry } from \"./core/model-registry.ts\";\nexport {\n\teligiblePair,\n\ttype ModelConstraints,\n\tModelConstraintsSchema,\n\ttype ModelRouterOutput,\n\tparseModelConstraints,\n} from \"./core/model-routing-constraints.js\";\nexport {\n\ttype CreateModelRuntimeOptions,\n\tCredentialSynchronizationError,\n\ttype CredentialSynchronizationOperation,\n\tModelRuntime,\n\ttype ModelRuntimeAuthOverrides,\n} from \"./core/model-runtime.js\";\nexport type {\n\tPackageManager,\n\tPathMetadata,\n\tProgressCallback,\n\tProgressEvent,\n\tResolvedPaths,\n\tResolvedResource,\n} from \"./core/package-manager.ts\";\nexport { DefaultPackageManager } from \"./core/package-manager.ts\";\nexport type {\n\tDefaultResourceLoaderInheritanceSnapshot,\n\tResourceCollision,\n\tResourceDiagnostic,\n\tResourceLoader,\n\tSkillCandidate,\n\tSkillCatalog,\n\tSkillCatalogCommand,\n\tSkillResolution,\n} from \"./core/resource-loader.ts\";\nexport {\n\tbuildSkillCatalog,\n\tDefaultResourceLoader,\n\tgetSkillCatalog,\n\tloadProjectContextFiles,\n} from \"./core/resource-loader.ts\";\nexport { nextRetryDecision, type RetryDecision, type RetryPolicySettings } from \"./core/retry-policy.ts\";\n// SDK for programmatic usage\nexport {\n\tAgentSessionRuntime,\n\ttype AgentSessionRuntimeDiagnostic,\n\ttype AgentSessionServices,\n\ttype AtomicBuiltin,\n\ttype CreateAgentSessionFromServicesOptions,\n\ttype CreateAgentSessionOptions,\n\ttype CreateAgentSessionResult,\n\ttype CreateAgentSessionRuntimeFactory,\n\ttype CreateAgentSessionRuntimeResult,\n\ttype CreateAgentSessionServicesOptions,\n\t// Factory\n\tcreateAgentSession,\n\tcreateAgentSessionFromServices,\n\tcreateAgentSessionRuntime,\n\tcreateAgentSessionServices,\n\tcreateBashTool,\n\t// Tool factories (for custom cwd)\n\tcreateCodingTools,\n\tcreateEditTool,\n\tcreateFindTool,\n\tcreateLsTool,\n\tcreatePowerShellTool,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateSearchTool,\n\tcreateStructuredOutputCapture,\n\tcreateStructuredOutputTool,\n\tcreateWriteTool,\n\ttype JsonObject,\n\ttype JsonPrimitive,\n\ttype JsonValue,\n\ttype MessageEndEvent,\n\ttype MessageStartEvent,\n\ttype MessageUpdateEvent,\n\ttype PromptTemplate,\n\tSTRUCTURED_OUTPUT_TOOL_NAME,\n\ttype StructuredOutputCapture,\n\ttype StructuredOutputFileCapture,\n\ttype StructuredOutputToolOptions,\n\ttype ToolExecutionEndEvent,\n\ttype ToolExecutionStartEvent,\n\ttype ToolExecutionUpdateEvent,\n} from \"./core/sdk.ts\";\nexport {\n\ttype BranchSummaryEntry,\n\tbuildContextEntries,\n\tbuildSessionContext,\n\ttype CompactionEntry,\n\tCURRENT_SESSION_VERSION,\n\ttype CustomEntry,\n\ttype CustomMessageEntry,\n\ttype FileEntry,\n\tgetLatestCompactionBoundaryEntry,\n\ttype ModelChangeEntry,\n\tmigrateSessionEntries,\n\ttype NewSessionOptions,\n\tparseSessionEntries,\n\ttype SessionContext,\n\ttype SessionEntry,\n\ttype SessionEntryBase,\n\ttype SessionHeader,\n\ttype SessionInfo,\n\ttype SessionInfoEntry,\n\tSessionManager,\n\ttype SessionMessageEntry,\n\ttype SessionNameState,\n\ttype SessionTreeNode,\n\ttype SessionWorkflowMetadata,\n\tsessionEntryToContextMessages,\n\ttype ThinkingLevelChangeEntry,\n} from \"./core/session-manager.ts\";\nexport {\n\tWORKFLOW_SESSION_METADATA_ENV,\n\tworkflowSessionMetadataFromEnv,\n} from \"./core/session-manager-classification.ts\";\nexport type { DefaultProjectTrust } from \"./core/settings-manager.ts\";\nexport {\n\ttype CompactionModelOverride,\n\ttype CompactionSettings,\n\ttype ImageSettings,\n\ttype PackageSource,\n\ttype RetrySettings,\n\tSettingsManager,\n\ttype SettingsManagerCreateOptions,\n} from \"./core/settings-manager.ts\";\n// Skills\nexport {\n\tformatSkillsForPrompt,\n\ttype LoadSkillsFromDirOptions,\n\ttype LoadSkillsResult,\n\tloadSkills,\n\tloadSkillsFromDir,\n\ttype Skill,\n\ttype SkillFrontmatter,\n} from \"./core/skills.ts\";\nexport { createSyntheticSourceInfo } from \"./core/source-info.ts\";\nexport {\n\tDEFAULT_STRUCTURED_OUTPUT_TIMEOUT_MS,\n\tgetStructuredOutputProviders,\n\tinferRouterDecision,\n\tinferStructuredOutput,\n\tJEV_STRUCTURED_OUTPUT_PROVIDER,\n\ttype RouterDecisionRequest,\n\ttype RouterModelSelectionOptions,\n\tresolveRouterModel,\n\ttype StructuredChoiceQuestion,\n\ttype StructuredOutputModel,\n\ttype StructuredOutputRequest,\n\ttype StructuredOutputResult,\n} from \"./core/structured-output/index.js\";\nexport type { NormalizedBuildSystemPromptOptions } from \"./core/system-prompt.ts\";\nexport { type EditDiffResult, generateDiffString, generateUnifiedPatch } from \"./core/tools/edit-diff.ts\";\n// Builtin tool definitions reusable by first-party extensions (e.g. workflows\n// invoking the structured ask_user_question UI deterministically).\n// Tools\nexport {\n\tBASH_SHELL_PRESENTATION,\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\tbashToolSystemPromptContribution,\n\tcreateAskUserQuestionToolDefinition,\n\tcreateBashToolDefinition,\n\tcreateEditToolDefinition,\n\tcreateFindToolDefinition,\n\tcreateKillTool,\n\tcreateKillToolDefinition,\n\tcreateLocalBashOperations,\n\tcreateLocalPowerShellOperations,\n\tcreateLsToolDefinition,\n\tcreatePowerShellToolDefinition,\n\tcreateReadToolDefinition,\n\tcreateSearchToolDefinition,\n\tcreateWriteToolDefinition,\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\ttype EditOperations,\n\ttype EditToolDetails,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n\teditToolSystemPromptContribution,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n\tfindToolSystemPromptContribution,\n\tformatSize,\n\ttype KillToolOptions,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n\tlsToolSystemPromptContribution,\n\ttype PowerShellOperations,\n\ttype PowerShellSpawnContext,\n\ttype PowerShellSpawnHook,\n\ttype PowerShellToolDetails,\n\ttype PowerShellToolInput,\n\ttype PowerShellToolOptions,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n\treadToolSystemPromptContribution,\n\ttype SearchToolDetails,\n\ttype SearchToolInput,\n\ttype SearchToolOptions,\n\ttype ShellToolPresentation,\n\tsearchToolSystemPromptContribution,\n\ttype ToolsOptions,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n\ttype WriteFileOptions,\n\ttype WriteOperations,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n\twithFileMutationQueue,\n\twriteToolSystemPromptContribution,\n} from \"./core/tools/index.ts\";\nexport {\n\thasProjectTrustInputs,\n\thasTrustRequiringProjectResources,\n\ttype ProjectTrustDecision,\n\tProjectTrustStore,\n\ttype ProjectTrustStoreEntry,\n\ttype ProjectTrustUpdate,\n\tTRUST_REQUIRING_PROJECT_CONFIG_RESOURCES,\n} from \"./core/trust-manager.ts\";\nexport { StringEnum, type StringEnumOptions } from \"./core/typebox-compat.ts\";\nexport * from \"./index-extensions.js\";\n// Main entry point\nexport { type MainOptions, main } from \"./main.ts\";\nexport {\n\tInteractiveMode,\n\ttype InteractiveModeOptions,\n\ttype ModelInfo,\n\ttype PrintModeOptions,\n\tRpcClient,\n\ttype RpcClientOptions,\n\ttype RpcCommand,\n\ttype RpcEvent,\n\ttype RpcEventListener,\n\ttype RpcExtensionUIRequest,\n\ttype RpcExtensionUIResponse,\n\ttype RpcResponse,\n\ttype RpcSessionState,\n\trunPrintMode,\n\trunRpcMode,\n} from \"./modes/index.ts\";\n// UI components for extensions\nexport {\n\tArminComponent,\n\tAssistantMessageComponent,\n\tBashExecutionComponent,\n\tBorderedLoader,\n\tBranchSummaryMessageComponent,\n\ttype ChatMessageEntry,\n\ttype ChatMessageRenderOptions,\n\t// Internal host seam for bundled workflow stage chat; not yet a stable extension API.\n\tChatSessionHost,\n\ttype ChatSessionHostBashRequest,\n\ttype ChatSessionHostCommands,\n\ttype ChatSessionHostEntry,\n\ttype ChatSessionHostOpts,\n\ttype ChatSessionHostStyle,\n\ttype ChatSessionSubmitMode,\n\tChatTranscriptComponent,\n\ttype ChatTranscriptEntryLike,\n\ttype ChatTranscriptRenderer,\n\ttype ChatTranscriptRole,\n\tCustomEditor,\n\ttype CustomEditorOptions,\n\tCustomEntryComponent,\n\tCustomMessageComponent,\n\tchatEntriesFromAgentMessages,\n\tDynamicBorder,\n\tExtensionEditorComponent,\n\tExtensionInputComponent,\n\tExtensionSelectorComponent,\n\tFooterComponent,\n\tkeyHint,\n\tkeyHintIfBound,\n\tkeyText,\n\tLiveChatEntriesController,\n\tLoginDialogComponent,\n\tModelSelectorComponent,\n\tOAuthSelectorComponent,\n\ttype RenderDiffOptions,\n\trawKeyHint,\n\trenderChatMessageEntry,\n\trenderDiff,\n\tScrollableChatTranscriptComponent,\n\tScrollableComponentViewport,\n\tSessionSelectorComponent,\n\ttype SettingsCallbacks,\n\ttype SettingsConfig,\n\tSettingsSelectorComponent,\n\tShowImagesSelectorComponent,\n\tSkillInvocationMessageComponent,\n\tThemeSelectorComponent,\n\tThinkingSelectorComponent,\n\tToolExecutionComponent,\n\ttype ToolExecutionOptions,\n\tTRANSCRIPT_JUMP_TO_END_URL,\n\tTranscriptFollowIndicator,\n\tTreeSelectorComponent,\n\ttruncateToVisualLines,\n\tUsageMeterComponent,\n\tUserMessageComponent,\n\tUserMessageSelectorComponent,\n\ttype VisualTruncateResult,\n\tWorkingStatusComponent,\n\ttype WorkingStatusComponentOptions,\n} from \"./modes/interactive/components/index.ts\";\nexport {\n\tclassifyChatCommand,\n\tcreateSessionSkillAutocompleteProvider,\n\tgetSessionSkillCommands,\n} from \"./modes/interactive/skill-command-autocomplete.ts\";\n// Theme utilities for custom tools and extensions\nexport {\n\tgetLanguageFromPath,\n\tgetMarkdownTheme,\n\tgetSelectListTheme,\n\tgetSettingsListTheme,\n\thighlightCode,\n\tinitTheme,\n\tTheme,\n\ttype ThemeColor,\n} from \"./modes/interactive/theme/theme.js\";\n// Run modes for programmatic SDK usage\nexport { pickWhimsicalWorkingMessage } from \"./modes/interactive/whimsical-messages.ts\";\nexport { createChildProcessEnvironment, spawnProcess } from \"./utils/child-process.ts\";\n// Clipboard utilities\nexport { copyToClipboard } from \"./utils/clipboard.ts\";\nexport { parseFrontmatter, stripFrontmatter } from \"./utils/frontmatter.ts\";\nexport {\n\tisSafeFsWatchPathError,\n\tisUnsafeWindowsShortPath,\n\tresolveNativeWatchPath,\n\tSAFE_FS_WATCH_CANONICALIZATION_FAILED,\n\tSAFE_FS_WATCH_UNSAFE_WINDOWS_SHORT_PATH,\n\ttype SafeFsWatchErrorCode,\n\ttype SafeFsWatchPathError,\n\twatchWithErrorHandler,\n} from \"./utils/fs-watch.ts\";\nexport { createGitEnvironment, GIT_LOCAL_ENV_VARS } from \"./utils/git-env.ts\";\nexport { convertToPng } from \"./utils/image-convert.ts\";\nexport { formatDimensionNote, type ResizedImage, resizeImage } from \"./utils/image-resize.ts\";\nexport { INTERACTIVE_ENGINE_ENV_VARS, scrubInteractiveEngineEnv } from \"./utils/interactive-engine-env.ts\";\nexport { detectSupportedImageMimeTypeFromFile } from \"./utils/mime.ts\";\n// Shell utilities\nexport { getPowerShellConfig, getShellConfig } from \"./utils/shell.ts\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-message-renderer.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/chat-message-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,KAAK,SAAS,EAAa,KAAK,aAAa,EAAQ,KAAK,GAAG,EAAE,MAAM,wBAAwB,CAAC;AACvG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAC9G,OAAO,EACN,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAElB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvF,OAAO,EAGN,KAAK,uBAAuB,EAC5B,MAAM,mCAAmC,CAAC;AAY3C,MAAM,MAAM,gBAAgB,GACzB;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,gBAAgB,CAA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,CAAC,EAAE,OAAO,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oBAAoB,CAAC,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACtD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IACvF,wBAAwB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,eAAe,GAAG,SAAS,CAAC;IAC/E,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,gBAAgB,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,KAAK,SAAS,CAAC;IACxF,4BAA4B,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,KAAK,SAAS,CAAC;CAC9E;AACD,wBAAgB,4BAA4B,CAAC,QAAQ,EAAE,SAAS,YAAY,EAAE,GAAG,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"chat-message-renderer.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/chat-message-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AACjF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,KAAK,SAAS,EAAa,KAAK,aAAa,EAAQ,KAAK,GAAG,EAAE,MAAM,wBAAwB,CAAC;AACvG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO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gC,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAI1D;IACD,UAAU,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CA6B5C;IACD,cAAc,IAAI,MAAM,EAAE,CAEzB;IACD,iBAAiB,IAAI,IAAI,CAExB;IAED,yBAAyB,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAE1D;IAED,OAAO,CAAC,kBAAkB;IAgB1B,OAAO,CAAC,mBAAmB;IAM3B,OAAO,CAAC,gBAAgB;IAmBxB,OAAO,CAAC,sBAAsB;IAwB9B,OAAO,CAAC,gCAAgC;IAIxC,OAAO,CAAC,eAAe;IAwBvB,OAAO,CAAC,gBAAgB;IAUxB,OAAO,CAAC,qBAAqB;IAG7B,OAAO,CAAC,kBAAkB;IAgB1B,OAAO,CAAC,mBAAmB;IAO3B,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,WAAW;CAGnB;AAmBD,2FAA2F;AAC3F,KAAK,oBAAoB,GAAG,IAAI,CAAC,iBAAiB,EAAE,SAAS,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AA6BvF,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,wBAAwB,GAAG,SAAS,CA4F5G"}
|
|
@@ -91,6 +91,10 @@ export function chatEntriesFromAgentMessages(messages) {
|
|
|
91
91
|
case "branchSummary":
|
|
92
92
|
entries.push({ role: "summary", kind: "branchSummary", message });
|
|
93
93
|
break;
|
|
94
|
+
case "system":
|
|
95
|
+
// System messages carry prompt sections, not chat content; rendering
|
|
96
|
+
// them printed a bare dim "system" line in workflow stage chats.
|
|
97
|
+
break;
|
|
94
98
|
default: {
|
|
95
99
|
const role = message.role;
|
|
96
100
|
entries.push({ role: "system", kind: "system", text: role });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat-message-renderer.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/chat-message-renderer.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AAS,CAAC,QAAQ,CACjB,IAAI,oBAAoB,CAAC,UAAU,CAAC,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,oBAAoB,EAAE,WAAW,CAAC,CAC7G,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AAClB,CAAC;AACD,SAAS,cAAc,CAAC,OAAgD;IACvE,OAAO,kBAAkB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;AACnD,CAAC","sourcesContent":["import type { AssistantMessage, ToolResultMessage } from \"@bastani/pi-ai/compat\";\nimport type { AgentMessage } from \"@earendil-works/pi-agent-core\";\nimport { type Component, Container, type MarkdownTheme, Text, type TUI } from \"@earendil-works/pi-tui\";\nimport type { TSchema } from \"typebox\";\nimport { parseSkillBlock } from \"../../../core/agent-session.js\";\nimport type { MarkdownTransformer, MessageRenderer, ToolDefinition } from \"../../../core/extensions/types.ts\";\nimport {\n\ttype BashExecutionMessage,\n\ttype BranchSummaryMessage,\n\ttype CustomMessage,\n\tisVerbatimCompactionMessage,\n} from \"../../../core/messages.ts\";\nimport type { TaskRecord } from \"../../../core/tasks/contracts.js\";\nimport type { OwnerTaskStore, TaskActivity } from \"../../../core/tasks/owner-store.js\";\nimport {\n\tapplyAssistantMessageDelta,\n\tbeginStreamingAssistantMessage,\n\ttype StreamingAssistantDelta,\n} from \"../streaming-assistant-message.ts\";\nimport { getMarkdownTheme, theme } from \"../theme/theme.js\";\nimport { AssistantMessageComponent } from \"./assistant-message.ts\";\nimport { BashExecutionComponent } from \"./bash-execution.ts\";\nimport { BranchSummaryMessageComponent } from \"./branch-summary-message.ts\";\nimport { extractMessageText } from \"./chat-session-host-utils.ts\";\nimport { compactionBoundaryFromMessage } from \"./compaction-boundary-message.ts\";\nimport { CustomMessageComponent } from \"./custom-message.ts\";\nimport { SkillInvocationMessageComponent } from \"./skill-invocation-message.ts\";\nimport { TaskRow } from \"./task-row.js\";\nimport { ToolExecutionComponent } from \"./tool-execution.ts\";\nimport { UserMessageComponent } from \"./user-message.ts\";\nexport type ChatMessageEntry =\n\t| { role: \"assistant\"; kind: \"assistant\"; message: AssistantMessage }\n\t| {\n\t\t\trole: \"tool\";\n\t\t\tkind: \"task\";\n\t\t\ttask: TaskRecord;\n\t\t\tduplicate: boolean;\n\t\t\tsiblings: readonly TaskRecord[];\n\t\t\tactivity: TaskActivity[];\n\t\t\tactivityOmitted: boolean;\n\t }\n\t| {\n\t\t\trole: \"tool\";\n\t\t\tkind: \"tool\";\n\t\t\ttoolName: string;\n\t\t\ttoolCallId: string;\n\t\t\targs: unknown;\n\t\t\tresult?: RenderableToolResult;\n\t\t\tisPartial?: boolean;\n\t }\n\t| { role: \"tool\"; kind: \"bashExecution\"; message: BashExecutionMessage; isPartial?: boolean }\n\t| { role: \"user\"; kind: \"user\"; text: string }\n\t| { role: \"custom\"; kind: \"custom\"; message: CustomMessage<unknown> }\n\t| { role: \"summary\"; kind: \"branchSummary\"; message: BranchSummaryMessage }\n\t| { role: \"system\"; kind: \"system\"; text: string };\nexport interface ChatMessageRenderOptions {\n\tui: Pick<TUI, \"requestRender\">;\n\tcwd: string;\n\tmarkdownTheme?: MarkdownTheme;\n\thideThinkingBlock?: boolean;\n\thiddenThinkingLabel?: string;\n\ttoolOutputExpanded?: boolean;\n\tshowImages?: boolean;\n\timageWidthCells?: number;\n\toutputPad?: number;\n\tisStreaming?: boolean;\n\tmarkdownTransformers?: readonly MarkdownTransformer[];\n\trenderLatex?: boolean;\n\tgetToolDefinition?: (toolName: string) => ToolDefinition<TSchema, unknown> | undefined;\n\tgetCustomMessageRenderer?: (customType: string) => MessageRenderer | undefined;\n\tcreateToolComponent?: (entry: Extract<ChatMessageEntry, { kind: \"tool\" }>) => Component;\n\tcreateCustomMessageComponent?: (message: CustomMessage<unknown>) => Component;\n}\nexport function chatEntriesFromAgentMessages(messages: readonly AgentMessage[]): ChatMessageEntry[] {\n\tconst entries: ChatMessageEntry[] = [];\n\tconst pendingTools = new Map<string, Extract<ChatMessageEntry, { kind: \"tool\" }>>();\n\tfor (const message of messages) {\n\t\tif (isLegacyCompactionSummaryMessage(message)) continue;\n\t\tswitch (message.role) {\n\t\t\tcase \"assistant\": {\n\t\t\t\tentries.push({ role: \"assistant\", kind: \"assistant\", message });\n\t\t\t\tfor (const content of message.content) {\n\t\t\t\t\tif (content.type !== \"toolCall\") continue;\n\t\t\t\t\tconst toolEntry: ChatMessageEntry = {\n\t\t\t\t\t\trole: \"tool\",\n\t\t\t\t\t\tkind: \"tool\",\n\t\t\t\t\t\ttoolName: content.name,\n\t\t\t\t\t\ttoolCallId: content.id,\n\t\t\t\t\t\targs: content.arguments,\n\t\t\t\t\t\tisPartial: true,\n\t\t\t\t\t};\n\t\t\t\t\tentries.push(toolEntry);\n\t\t\t\t\tpendingTools.set(content.id, toolEntry);\n\t\t\t\t}\n\t\t\t\tif (message.stopReason === \"aborted\" || message.stopReason === \"error\") {\n\t\t\t\t\tconst errorText =\n\t\t\t\t\t\tmessage.stopReason === \"aborted\"\n\t\t\t\t\t\t\t? message.errorMessage || \"Operation aborted\"\n\t\t\t\t\t\t\t: message.errorMessage || \"Unknown error\";\n\t\t\t\t\tfor (const toolEntry of pendingTools.values()) {\n\t\t\t\t\t\ttoolEntry.result = {\n\t\t\t\t\t\t\trole: \"toolResult\",\n\t\t\t\t\t\t\ttoolCallId: toolEntry.toolCallId,\n\t\t\t\t\t\t\ttoolName: toolEntry.toolName,\n\t\t\t\t\t\t\tcontent: [{ type: \"text\", text: errorText }],\n\t\t\t\t\t\t\tisError: true,\n\t\t\t\t\t\t\ttimestamp: message.timestamp,\n\t\t\t\t\t\t};\n\t\t\t\t\t\ttoolEntry.isPartial = false;\n\t\t\t\t\t}\n\t\t\t\t\tpendingTools.clear();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"toolResult\": {\n\t\t\t\tconst toolEntry = pendingTools.get(message.toolCallId);\n\t\t\t\tif (toolEntry) {\n\t\t\t\t\ttoolEntry.result = message;\n\t\t\t\t\ttoolEntry.isPartial = false;\n\t\t\t\t\tpendingTools.delete(message.toolCallId);\n\t\t\t\t} else {\n\t\t\t\t\tentries.push({\n\t\t\t\t\t\trole: \"tool\",\n\t\t\t\t\t\tkind: \"tool\",\n\t\t\t\t\t\ttoolName: message.toolName,\n\t\t\t\t\t\ttoolCallId: message.toolCallId,\n\t\t\t\t\t\targs: {},\n\t\t\t\t\t\tresult: message,\n\t\t\t\t\t\tisPartial: false,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"user\": {\n\t\t\t\tconst text = getMessageText(message);\n\t\t\t\tif (text) entries.push({ role: \"user\", kind: \"user\", text });\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"bashExecution\":\n\t\t\t\tentries.push({ role: \"tool\", kind: \"bashExecution\", message });\n\t\t\t\tbreak;\n\t\t\tcase \"custom\":\n\t\t\t\tif (message.display) entries.push({ role: \"custom\", kind: \"custom\", message });\n\t\t\t\tbreak;\n\t\t\tcase \"branchSummary\":\n\t\t\t\tentries.push({ role: \"summary\", kind: \"branchSummary\", message });\n\t\t\t\tbreak;\n\t\t\tdefault: {\n\t\t\t\tconst role = (message as { role: string }).role;\n\t\t\t\tentries.push({ role: \"system\", kind: \"system\", text: role });\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn entries;\n}\nexport interface LiveChatEventLike {\n\treadonly type?: unknown;\n\treadonly message?: unknown;\n\treadonly assistantMessageEvent?: StreamingAssistantDelta;\n\treadonly toolCallId?: unknown;\n\treadonly toolName?: unknown;\n\treadonly args?: unknown;\n\treadonly partialResult?: unknown;\n\treadonly result?: unknown;\n\treadonly isError?: unknown;\n}\ntype LiveChatEntry = ChatMessageEntry | { role: string };\nexport class LiveChatEntriesController {\n\tprivate streamingAssistantIndex: number | undefined;\n\tprivate pendingToolIndexes = new Map<string, number>();\n\tprivate declare readonly entries: LiveChatEntry[];\n\tconstructor(entries: LiveChatEntry[]) {\n\t\tthis.entries = entries;\n\t}\n\tclearTasks(): void {\n\t\tconst streaming =\n\t\t\tthis.streamingAssistantIndex === undefined ? undefined : this.entries[this.streamingAssistantIndex];\n\t\tfor (let index = this.entries.length - 1; index >= 0; index--) {\n\t\t\tconst entry = this.entries[index];\n\t\t\tif (\"kind\" in entry && entry.kind === \"task\") this.entries.splice(index, 1);\n\t\t}\n\t\tthis.streamingAssistantIndex = streaming === undefined ? undefined : this.entries.indexOf(streaming);\n\t\tthis.reindexPendingTools();\n\t}\n\tupsertTasks(tasks: readonly TaskRecord[], store?: OwnerTaskStore): void {\n\t\tfor (const task of tasks) {\n\t\t\tconst activity = store?.recentActivity(task.ref.taskId) ?? [];\n\t\t\tconst activityOmitted = store?.activityOmitted(task.ref.taskId) ?? false;\n\t\t\tconst duplicate =\n\t\t\t\ttasks.filter((other) => other.agentName === task.agentName && other.title === task.title).length > 1;\n\t\t\tconst entry = this.entries.find(\n\t\t\t\t(entry) => \"kind\" in entry && entry.kind === \"task\" && entry.task.ref.taskId === task.ref.taskId,\n\t\t\t);\n\t\t\tif (entry && \"kind\" in entry && entry.kind === \"task\") {\n\t\t\t\tentry.task = task;\n\t\t\t\tentry.duplicate = duplicate;\n\t\t\t\tentry.siblings = tasks;\n\t\t\t\tentry.activity = activity;\n\t\t\t\tentry.activityOmitted = activityOmitted;\n\t\t\t} else\n\t\t\t\tthis.entries.push({\n\t\t\t\t\trole: \"tool\",\n\t\t\t\t\tkind: \"task\",\n\t\t\t\t\ttask,\n\t\t\t\t\tduplicate,\n\t\t\t\t\tsiblings: tasks,\n\t\t\t\t\tactivity,\n\t\t\t\t\tactivityOmitted,\n\t\t\t\t});\n\t\t}\n\t}\n\tappendMessages(messages: readonly AgentMessage[]): void {\n\t\tthis.entries.push(...chatEntriesFromAgentMessages(messages));\n\t\tthis.reindexPendingTools();\n\t}\n\treplaceMessages(messages: readonly AgentMessage[], preservedEntries: readonly { role: string }[] = []): void {\n\t\tthis.entries.splice(0, this.entries.length, ...chatEntriesFromAgentMessages(messages), ...preservedEntries);\n\t\tthis.streamingAssistantIndex = undefined;\n\t\tthis.reindexPendingTools();\n\t}\n\tappendUserText(text: string): void {\n\t\tthis.entries.push({ role: \"user\", kind: \"user\", text });\n\t}\n\t/**\n\t * Seed the assistant message a chat mounted mid-stream never saw start.\n\t *\n\t * Delta-only updates carry just the next fragment, so a consumer attached\n\t * part-way through a turn cannot recover the text that already streamed. The\n\t * live session keeps that in-flight message, and seeding it here makes the\n\t * deltas that arrive afterwards continue it instead of opening a second\n\t * assistant message. A stream this consumer is already following wins.\n\t */\n\thydrateStreamingAssistantMessage(message: unknown): boolean {\n\t\tif (!isAgentMessageLike(message) || message.role !== \"assistant\") return false;\n\t\tif (this.currentStreamingAssistantMessage() !== undefined) return false;\n\t\treturn this.updateAssistantMessage(beginStreamingAssistantMessage(message as AssistantMessage));\n\t}\n\tapplyEvent(event: LiveChatEventLike): boolean {\n\t\tconst type = String(event.type ?? \"\");\n\t\tswitch (type) {\n\t\t\tcase \"message_start\":\n\t\t\t\treturn this.handleMessageStart(event.message);\n\t\t\tcase \"message_update\":\n\t\t\t\treturn this.handleMessageUpdate(event);\n\t\t\tcase \"message_end\":\n\t\t\t\treturn this.handleMessageEnd(event.message);\n\t\t\tcase \"tool_execution_start\":\n\t\t\t\treturn this.upsertToolEntry({\n\t\t\t\t\ttoolCallId: typeof event.toolCallId === \"string\" ? event.toolCallId : undefined,\n\t\t\t\t\ttoolName: typeof event.toolName === \"string\" ? event.toolName : \"tool\",\n\t\t\t\t\targs: event.args,\n\t\t\t\t\tisPartial: true,\n\t\t\t\t});\n\t\t\tcase \"tool_execution_update\": {\n\t\t\t\tconst toolCallId = typeof event.toolCallId === \"string\" ? event.toolCallId : undefined;\n\t\t\t\tif (!toolCallId) return false;\n\t\t\t\treturn this.updateToolResult(toolCallId, event.partialResult, true, false);\n\t\t\t}\n\t\t\tcase \"tool_execution_end\": {\n\t\t\t\tconst toolCallId = typeof event.toolCallId === \"string\" ? event.toolCallId : undefined;\n\t\t\t\tif (!toolCallId) return false;\n\t\t\t\treturn this.updateToolResult(toolCallId, event.result, false, event.isError === true);\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t}\n\tpendingToolIds(): string[] {\n\t\treturn [...this.pendingToolIndexes.keys()];\n\t}\n\tclearPendingTools(): void {\n\t\tthis.pendingToolIndexes.clear();\n\t}\n\n\tisStreamingAssistantEntry(entry: ChatMessageEntry): boolean {\n\t\treturn this.streamingAssistantIndex !== undefined && this.entries[this.streamingAssistantIndex] === entry;\n\t}\n\n\tprivate handleMessageStart(message: unknown): boolean {\n\t\tif (!isAgentMessageLike(message)) return false;\n\t\tif (message.role === \"assistant\") {\n\t\t\tthis.streamingAssistantIndex = undefined;\n\t\t\treturn this.updateAssistantMessage(beginStreamingAssistantMessage(message as AssistantMessage));\n\t\t}\n\t\tif (message.role === \"toolResult\") {\n\t\t\tconst toolResult = message as ToolResultMessage;\n\t\t\tif (this.findToolEntryIndex(toolResult.toolCallId) >= 0) return true;\n\t\t}\n\t\tconst entries = chatEntriesFromAgentMessages([message as AgentMessage]);\n\t\tif (entries.length === 0) return false;\n\t\tthis.entries.push(...entries);\n\t\tthis.reindexPendingTools();\n\t\treturn true;\n\t}\n\tprivate handleMessageUpdate(event: LiveChatEventLike): boolean {\n\t\tif (!event.assistantMessageEvent) return false;\n\t\tconst message = this.currentStreamingAssistantMessage() ?? minimalAssistantMessage();\n\t\tif (!applyAssistantMessageDelta(message, event.assistantMessageEvent)) return false;\n\t\treturn this.updateAssistantMessage(message);\n\t}\n\tprivate handleMessageEnd(message: unknown): boolean {\n\t\tif (!isAgentMessageLike(message) || message.role !== \"assistant\") return false;\n\t\tconst changed = this.updateAssistantMessage(message as AssistantMessage);\n\t\tconst stopReason = typeof message.stopReason === \"string\" ? message.stopReason : \"\";\n\t\tif (stopReason === \"aborted\" || stopReason === \"error\") {\n\t\t\tconst errorText =\n\t\t\t\ttypeof message.errorMessage === \"string\" && message.errorMessage\n\t\t\t\t\t? message.errorMessage\n\t\t\t\t\t: stopReason === \"aborted\"\n\t\t\t\t\t\t? \"Operation aborted\"\n\t\t\t\t\t\t: \"Unknown error\";\n\t\t\tfor (const toolCallId of this.pendingToolIds()) {\n\t\t\t\tthis.updateToolResult(toolCallId, { content: [{ type: \"text\", text: errorText }] }, false, true);\n\t\t\t}\n\t\t\tthis.clearPendingTools();\n\t\t}\n\t\tthis.streamingAssistantIndex = undefined;\n\t\treturn changed || true;\n\t}\n\tprivate updateAssistantMessage(message: AssistantMessage): boolean {\n\t\tif (\n\t\t\tthis.streamingAssistantIndex !== undefined &&\n\t\t\tthis.isAssistantEntry(this.entries[this.streamingAssistantIndex])\n\t\t) {\n\t\t\tthis.entries[this.streamingAssistantIndex] = {\n\t\t\t\t...(this.entries[this.streamingAssistantIndex] as Extract<ChatMessageEntry, { kind: \"assistant\" }>),\n\t\t\t\tmessage,\n\t\t\t};\n\t\t} else {\n\t\t\tthis.entries.push({ role: \"assistant\", kind: \"assistant\", message });\n\t\t\tthis.streamingAssistantIndex = this.entries.length - 1;\n\t\t}\n\t\tfor (const content of message.content) {\n\t\t\tif (content.type !== \"toolCall\") continue;\n\t\t\tthis.upsertToolEntry({\n\t\t\t\ttoolCallId: content.id,\n\t\t\t\ttoolName: content.name,\n\t\t\t\targs: content.arguments,\n\t\t\t\tisPartial: true,\n\t\t\t});\n\t\t}\n\t\treturn true;\n\t}\n\tprivate currentStreamingAssistantMessage(): AssistantMessage | undefined {\n\t\tconst entry = this.streamingAssistantIndex !== undefined ? this.entries[this.streamingAssistantIndex] : undefined;\n\t\treturn this.isAssistantEntry(entry) ? entry.message : undefined;\n\t}\n\tprivate upsertToolEntry(update: {\n\t\ttoolCallId?: string;\n\t\ttoolName: string;\n\t\targs?: unknown;\n\t\tisPartial: boolean;\n\t}): boolean {\n\t\tconst toolCallId = update.toolCallId ?? `live-${update.toolName}`;\n\t\tconst index = this.pendingToolIndexes.get(toolCallId) ?? this.findToolEntryIndex(toolCallId, update.toolName);\n\t\tconst previous = index >= 0 ? this.entries[index] : undefined;\n\t\tconst previousTool = this.isToolEntry(previous) ? previous : undefined;\n\t\tconst next: ChatMessageEntry = {\n\t\t\trole: \"tool\",\n\t\t\tkind: \"tool\",\n\t\t\ttoolName: previousTool?.toolName ?? update.toolName,\n\t\t\ttoolCallId,\n\t\t\targs: update.args ?? previousTool?.args ?? {},\n\t\t\tresult: previousTool?.result,\n\t\t\tisPartial: update.isPartial,\n\t\t};\n\t\tif (index >= 0) this.entries[index] = next;\n\t\telse this.entries.push(next);\n\t\tthis.pendingToolIndexes.set(toolCallId, index >= 0 ? index : this.entries.length - 1);\n\t\treturn true;\n\t}\n\tprivate updateToolResult(toolCallId: string, result: unknown, isPartial: boolean, isError: boolean): boolean {\n\t\tconst index = this.pendingToolIndexes.get(toolCallId) ?? this.findToolEntryIndex(toolCallId);\n\t\tif (index < 0) return false;\n\t\tconst entry = this.entries[index];\n\t\tif (!this.isToolEntry(entry)) return false;\n\t\tconst resultObject = toolResultFromUnknown(result, entry.toolName, toolCallId, isError);\n\t\tthis.entries[index] = { ...entry, result: resultObject, isPartial };\n\t\tif (!isPartial) this.pendingToolIndexes.delete(toolCallId);\n\t\treturn true;\n\t}\n\tprivate isSyntheticToolCallId(toolCallId: string): boolean {\n\t\treturn toolCallId.startsWith(\"live-\");\n\t}\n\tprivate findToolEntryIndex(toolCallId: string, toolName?: string): number {\n\t\tfor (let i = this.entries.length - 1; i >= 0; i--) {\n\t\t\tconst entry = this.entries[i];\n\t\t\tif (!this.isToolEntry(entry)) continue;\n\t\t\tif (entry.toolCallId === toolCallId) return i;\n\t\t\tif (\n\t\t\t\ttoolName &&\n\t\t\t\tentry.toolName === toolName &&\n\t\t\t\tentry.isPartial !== false &&\n\t\t\t\t(this.isSyntheticToolCallId(toolCallId) || this.isSyntheticToolCallId(entry.toolCallId))\n\t\t\t) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}\n\tprivate reindexPendingTools(): void {\n\t\tthis.pendingToolIndexes.clear();\n\t\tfor (let i = 0; i < this.entries.length; i++) {\n\t\t\tconst entry = this.entries[i];\n\t\t\tif (this.isToolEntry(entry) && entry.isPartial !== false) this.pendingToolIndexes.set(entry.toolCallId, i);\n\t\t}\n\t}\n\tprivate isAssistantEntry(\n\t\tentry: LiveChatEntry | undefined,\n\t): entry is Extract<ChatMessageEntry, { kind: \"assistant\" }> {\n\t\treturn isChatMessageEntry(entry) && entry.kind === \"assistant\";\n\t}\n\tprivate isToolEntry(entry: LiveChatEntry | undefined): entry is Extract<ChatMessageEntry, { kind: \"tool\" }> {\n\t\treturn isChatMessageEntry(entry) && entry.kind === \"tool\";\n\t}\n}\nfunction isChatMessageEntry(entry: LiveChatEntry | undefined): entry is ChatMessageEntry {\n\treturn entry !== undefined && \"kind\" in entry;\n}\nfunction isLegacyCompactionSummaryMessage(message: AgentMessage): boolean {\n\treturn message.role === \"compaction\" + \"Summary\";\n}\nfunction isAgentMessageLike(\n\tmessage: unknown,\n): message is AgentMessage & { stopReason?: unknown; errorMessage?: unknown } {\n\treturn message !== null && typeof message === \"object\" && \"role\" in message;\n}\nfunction minimalAssistantMessage(): AssistantMessage {\n\treturn {\n\t\trole: \"assistant\",\n\t\tcontent: [],\n\t\tstopReason: \"stop\",\n\t} as unknown as AssistantMessage;\n}\n/** UI progress may contain in-memory details; only durable transcript results are JSON. */\ntype RenderableToolResult = Omit<ToolResultMessage, \"details\"> & { details?: unknown };\nfunction toolResultFromUnknown(\n\tresult: unknown,\n\ttoolName: string,\n\ttoolCallId: string,\n\tisError: boolean,\n): RenderableToolResult {\n\tif (result !== null && typeof result === \"object\" && \"content\" in result) {\n\t\tconst candidate = result as { content?: unknown; details?: unknown };\n\t\tconst content = Array.isArray(candidate.content) ? candidate.content : [];\n\t\treturn {\n\t\t\trole: \"toolResult\",\n\t\t\ttoolCallId,\n\t\t\ttoolName,\n\t\t\tcontent: content as ToolResultMessage[\"content\"],\n\t\t\tdetails: candidate.details,\n\t\t\tisError,\n\t\t\ttimestamp: Date.now(),\n\t\t};\n\t}\n\treturn {\n\t\trole: \"toolResult\",\n\t\ttoolCallId,\n\t\ttoolName,\n\t\tcontent: typeof result === \"string\" ? [{ type: \"text\", text: result }] : [],\n\t\tisError,\n\t\ttimestamp: Date.now(),\n\t};\n}\nexport function renderChatMessageEntry(entry: ChatMessageEntry, options: ChatMessageRenderOptions): Component {\n\tconst messageEntry = entry as ChatMessageEntry;\n\tconst markdownTheme = options.markdownTheme ?? getMarkdownTheme();\n\tswitch (messageEntry.kind) {\n\t\tcase \"task\":\n\t\t\treturn new TaskRow(messageEntry.task, {\n\t\t\t\texpanded: options.toolOutputExpanded,\n\t\t\t\tduplicate: messageEntry.duplicate,\n\t\t\t\tsiblings: messageEntry.siblings,\n\t\t\t\tactivity: messageEntry.activity,\n\t\t\t\tactivityOmitted: messageEntry.activityOmitted,\n\t\t\t});\n\t\tcase \"assistant\":\n\t\t\treturn new AssistantMessageComponent(\n\t\t\t\tmessageEntry.message,\n\t\t\t\toptions.hideThinkingBlock ?? false,\n\t\t\t\tmarkdownTheme,\n\t\t\t\toptions.hiddenThinkingLabel ?? \"Thinking...\",\n\t\t\t\toptions.outputPad ?? 1,\n\t\t\t\toptions.markdownTransformers,\n\t\t\t\toptions.isStreaming,\n\t\t\t\toptions.renderLatex,\n\t\t\t);\n\t\tcase \"tool\": {\n\t\t\tif (options.createToolComponent) return options.createToolComponent(messageEntry);\n\t\t\tconst component = new ToolExecutionComponent(\n\t\t\t\tmessageEntry.toolName,\n\t\t\t\tmessageEntry.toolCallId,\n\t\t\t\tmessageEntry.args,\n\t\t\t\t{\n\t\t\t\t\tshowImages: options.showImages ?? true,\n\t\t\t\t\timageWidthCells: options.imageWidthCells,\n\t\t\t\t},\n\t\t\t\toptions.getToolDefinition?.(messageEntry.toolName),\n\t\t\t\toptions.ui as TUI,\n\t\t\t\toptions.cwd,\n\t\t\t);\n\t\t\tcomponent.setExpanded(options.toolOutputExpanded ?? false);\n\t\t\tif (messageEntry.result) component.updateResult(messageEntry.result, messageEntry.isPartial ?? false);\n\t\t\treturn component;\n\t\t}\n\t\tcase \"bashExecution\": {\n\t\t\tconst component = new BashExecutionComponent(\n\t\t\t\tmessageEntry.message.command,\n\t\t\t\toptions.ui as TUI,\n\t\t\t\tmessageEntry.message.excludeFromContext,\n\t\t\t);\n\t\t\tif (messageEntry.message.output) component.appendOutput(messageEntry.message.output);\n\t\t\tif (messageEntry.isPartial !== true) {\n\t\t\t\tcomponent.setComplete(\n\t\t\t\t\tmessageEntry.message.exitCode,\n\t\t\t\t\tmessageEntry.message.cancelled,\n\t\t\t\t\tmessageEntry.message.truncated\n\t\t\t\t\t\t? ({ truncated: true } as Parameters<BashExecutionComponent[\"setComplete\"]>[2])\n\t\t\t\t\t\t: undefined,\n\t\t\t\t\tmessageEntry.message.fullOutputPath,\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn component;\n\t\t}\n\t\tcase \"user\":\n\t\t\treturn userMessageComponent(\n\t\t\t\tmessageEntry.text,\n\t\t\t\tmarkdownTheme,\n\t\t\t\toptions.toolOutputExpanded ?? false,\n\t\t\t\toptions.outputPad ?? 1,\n\t\t\t\toptions.markdownTransformers,\n\t\t\t\toptions.renderLatex,\n\t\t\t);\n\t\tcase \"custom\": {\n\t\t\tif (isVerbatimCompactionMessage(messageEntry.message)) {\n\t\t\t\treturn compactionBoundaryFromMessage(messageEntry.message, options.toolOutputExpanded ?? false);\n\t\t\t}\n\t\t\tif (options.createCustomMessageComponent) return options.createCustomMessageComponent(messageEntry.message);\n\t\t\tconst component = new CustomMessageComponent(\n\t\t\t\tmessageEntry.message,\n\t\t\t\toptions.getCustomMessageRenderer?.(messageEntry.message.customType),\n\t\t\t\tmarkdownTheme,\n\t\t\t\toptions.outputPad ?? 1,\n\t\t\t\toptions.renderLatex,\n\t\t\t);\n\t\t\tcomponent.setExpanded(options.toolOutputExpanded ?? false);\n\t\t\treturn component;\n\t\t}\n\t\tcase \"branchSummary\": {\n\t\t\tconst component = new BranchSummaryMessageComponent(messageEntry.message, markdownTheme, options.renderLatex);\n\t\t\tcomponent.setExpanded(options.toolOutputExpanded ?? false);\n\t\t\treturn component;\n\t\t}\n\t\tcase \"system\":\n\t\t\treturn new Text(theme.fg(\"dim\", messageEntry.text), 1, 0);\n\t}\n}\nfunction userMessageComponent(\n\ttext: string,\n\tmarkdownTheme: MarkdownTheme,\n\texpanded: boolean,\n\toutputPad = 1,\n\tmarkdownTransformers: readonly MarkdownTransformer[] = [],\n\trenderLatex = true,\n): Component {\n\tconst skillBlock = parseSkillBlock(text);\n\tif (!skillBlock) return new UserMessageComponent(text, markdownTheme, outputPad, markdownTransformers, renderLatex);\n\tconst container = new Container();\n\tconst skillComponent = new SkillInvocationMessageComponent(skillBlock, markdownTheme, renderLatex);\n\tskillComponent.setExpanded(expanded);\n\tcontainer.addChild(skillComponent);\n\tif (skillBlock.userMessage) {\n\t\tcontainer.addChild(\n\t\t\tnew UserMessageComponent(skillBlock.userMessage, markdownTheme, outputPad, markdownTransformers, renderLatex),\n\t\t);\n\t}\n\treturn container;\n}\nfunction getMessageText(message: Extract<AgentMessage, { role: \"user\" }>): string {\n\treturn extractMessageText(message.content).trim();\n}\n"]}
|
|
1
|
+
{"version":3,"file":"chat-message-renderer.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/chat-message-renderer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkB,SAAS,EAAsB,IAAI,EAAY,MAAM,wBAAwB,CAAC;AAEvG,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,OAAO,EAIN,2BAA2B,GAC3B,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EACN,0BAA0B,EAC1B,8BAA8B,GAE9B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC5D,O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EAAE,CAAC;AACnD,CAAC","sourcesContent":["import type { AssistantMessage, ToolResultMessage } from \"@bastani/pi-ai/compat\";\nimport type { AgentMessage } from \"@earendil-works/pi-agent-core\";\nimport { type Component, Container, type MarkdownTheme, Text, type TUI } from \"@earendil-works/pi-tui\";\nimport type { TSchema } from \"typebox\";\nimport { parseSkillBlock } from \"../../../core/agent-session.js\";\nimport type { MarkdownTransformer, MessageRenderer, ToolDefinition } from \"../../../core/extensions/types.ts\";\nimport {\n\ttype BashExecutionMessage,\n\ttype BranchSummaryMessage,\n\ttype CustomMessage,\n\tisVerbatimCompactionMessage,\n} from \"../../../core/messages.ts\";\nimport type { TaskRecord } from \"../../../core/tasks/contracts.js\";\nimport type { OwnerTaskStore, TaskActivity } from \"../../../core/tasks/owner-store.js\";\nimport {\n\tapplyAssistantMessageDelta,\n\tbeginStreamingAssistantMessage,\n\ttype StreamingAssistantDelta,\n} from \"../streaming-assistant-message.ts\";\nimport { getMarkdownTheme, theme } from \"../theme/theme.js\";\nimport { AssistantMessageComponent } from \"./assistant-message.ts\";\nimport { BashExecutionComponent } from \"./bash-execution.ts\";\nimport { BranchSummaryMessageComponent } from \"./branch-summary-message.ts\";\nimport { extractMessageText } from \"./chat-session-host-utils.ts\";\nimport { compactionBoundaryFromMessage } from \"./compaction-boundary-message.ts\";\nimport { CustomMessageComponent } from \"./custom-message.ts\";\nimport { SkillInvocationMessageComponent } from \"./skill-invocation-message.ts\";\nimport { TaskRow } from \"./task-row.js\";\nimport { ToolExecutionComponent } from \"./tool-execution.ts\";\nimport { UserMessageComponent } from \"./user-message.ts\";\nexport type ChatMessageEntry =\n\t| { role: \"assistant\"; kind: \"assistant\"; message: AssistantMessage }\n\t| {\n\t\t\trole: \"tool\";\n\t\t\tkind: \"task\";\n\t\t\ttask: TaskRecord;\n\t\t\tduplicate: boolean;\n\t\t\tsiblings: readonly TaskRecord[];\n\t\t\tactivity: TaskActivity[];\n\t\t\tactivityOmitted: boolean;\n\t }\n\t| {\n\t\t\trole: \"tool\";\n\t\t\tkind: \"tool\";\n\t\t\ttoolName: string;\n\t\t\ttoolCallId: string;\n\t\t\targs: unknown;\n\t\t\tresult?: RenderableToolResult;\n\t\t\tisPartial?: boolean;\n\t }\n\t| { role: \"tool\"; kind: \"bashExecution\"; message: BashExecutionMessage; isPartial?: boolean }\n\t| { role: \"user\"; kind: \"user\"; text: string }\n\t| { role: \"custom\"; kind: \"custom\"; message: CustomMessage<unknown> }\n\t| { role: \"summary\"; kind: \"branchSummary\"; message: BranchSummaryMessage }\n\t| { role: \"system\"; kind: \"system\"; text: string };\nexport interface ChatMessageRenderOptions {\n\tui: Pick<TUI, \"requestRender\">;\n\tcwd: string;\n\tmarkdownTheme?: MarkdownTheme;\n\thideThinkingBlock?: boolean;\n\thiddenThinkingLabel?: string;\n\ttoolOutputExpanded?: boolean;\n\tshowImages?: boolean;\n\timageWidthCells?: number;\n\toutputPad?: number;\n\tisStreaming?: boolean;\n\tmarkdownTransformers?: readonly MarkdownTransformer[];\n\trenderLatex?: boolean;\n\tgetToolDefinition?: (toolName: string) => ToolDefinition<TSchema, unknown> | undefined;\n\tgetCustomMessageRenderer?: (customType: string) => MessageRenderer | undefined;\n\tcreateToolComponent?: (entry: Extract<ChatMessageEntry, { kind: \"tool\" }>) => Component;\n\tcreateCustomMessageComponent?: (message: CustomMessage<unknown>) => Component;\n}\nexport function chatEntriesFromAgentMessages(messages: readonly AgentMessage[]): ChatMessageEntry[] {\n\tconst entries: ChatMessageEntry[] = [];\n\tconst pendingTools = new Map<string, Extract<ChatMessageEntry, { kind: \"tool\" }>>();\n\tfor (const message of messages) {\n\t\tif (isLegacyCompactionSummaryMessage(message)) continue;\n\t\tswitch (message.role) {\n\t\t\tcase \"assistant\": {\n\t\t\t\tentries.push({ role: \"assistant\", kind: \"assistant\", message });\n\t\t\t\tfor (const content of message.content) {\n\t\t\t\t\tif (content.type !== \"toolCall\") continue;\n\t\t\t\t\tconst toolEntry: ChatMessageEntry = {\n\t\t\t\t\t\trole: \"tool\",\n\t\t\t\t\t\tkind: \"tool\",\n\t\t\t\t\t\ttoolName: content.name,\n\t\t\t\t\t\ttoolCallId: content.id,\n\t\t\t\t\t\targs: content.arguments,\n\t\t\t\t\t\tisPartial: true,\n\t\t\t\t\t};\n\t\t\t\t\tentries.push(toolEntry);\n\t\t\t\t\tpendingTools.set(content.id, toolEntry);\n\t\t\t\t}\n\t\t\t\tif (message.stopReason === \"aborted\" || message.stopReason === \"error\") {\n\t\t\t\t\tconst errorText =\n\t\t\t\t\t\tmessage.stopReason === \"aborted\"\n\t\t\t\t\t\t\t? message.errorMessage || \"Operation aborted\"\n\t\t\t\t\t\t\t: message.errorMessage || \"Unknown error\";\n\t\t\t\t\tfor (const toolEntry of pendingTools.values()) {\n\t\t\t\t\t\ttoolEntry.result = {\n\t\t\t\t\t\t\trole: \"toolResult\",\n\t\t\t\t\t\t\ttoolCallId: toolEntry.toolCallId,\n\t\t\t\t\t\t\ttoolName: toolEntry.toolName,\n\t\t\t\t\t\t\tcontent: [{ type: \"text\", text: errorText }],\n\t\t\t\t\t\t\tisError: true,\n\t\t\t\t\t\t\ttimestamp: message.timestamp,\n\t\t\t\t\t\t};\n\t\t\t\t\t\ttoolEntry.isPartial = false;\n\t\t\t\t\t}\n\t\t\t\t\tpendingTools.clear();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"toolResult\": {\n\t\t\t\tconst toolEntry = pendingTools.get(message.toolCallId);\n\t\t\t\tif (toolEntry) {\n\t\t\t\t\ttoolEntry.result = message;\n\t\t\t\t\ttoolEntry.isPartial = false;\n\t\t\t\t\tpendingTools.delete(message.toolCallId);\n\t\t\t\t} else {\n\t\t\t\t\tentries.push({\n\t\t\t\t\t\trole: \"tool\",\n\t\t\t\t\t\tkind: \"tool\",\n\t\t\t\t\t\ttoolName: message.toolName,\n\t\t\t\t\t\ttoolCallId: message.toolCallId,\n\t\t\t\t\t\targs: {},\n\t\t\t\t\t\tresult: message,\n\t\t\t\t\t\tisPartial: false,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"user\": {\n\t\t\t\tconst text = getMessageText(message);\n\t\t\t\tif (text) entries.push({ role: \"user\", kind: \"user\", text });\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"bashExecution\":\n\t\t\t\tentries.push({ role: \"tool\", kind: \"bashExecution\", message });\n\t\t\t\tbreak;\n\t\t\tcase \"custom\":\n\t\t\t\tif (message.display) entries.push({ role: \"custom\", kind: \"custom\", message });\n\t\t\t\tbreak;\n\t\t\tcase \"branchSummary\":\n\t\t\t\tentries.push({ role: \"summary\", kind: \"branchSummary\", message });\n\t\t\t\tbreak;\n\t\t\tcase \"system\":\n\t\t\t\t// System messages carry prompt sections, not chat content; rendering\n\t\t\t\t// them printed a bare dim \"system\" line in workflow stage chats.\n\t\t\t\tbreak;\n\t\t\tdefault: {\n\t\t\t\tconst role = (message as { role: string }).role;\n\t\t\t\tentries.push({ role: \"system\", kind: \"system\", text: role });\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn entries;\n}\nexport interface LiveChatEventLike {\n\treadonly type?: unknown;\n\treadonly message?: unknown;\n\treadonly assistantMessageEvent?: StreamingAssistantDelta;\n\treadonly toolCallId?: unknown;\n\treadonly toolName?: unknown;\n\treadonly args?: unknown;\n\treadonly partialResult?: unknown;\n\treadonly result?: unknown;\n\treadonly isError?: unknown;\n}\ntype LiveChatEntry = ChatMessageEntry | { role: string };\nexport class LiveChatEntriesController {\n\tprivate streamingAssistantIndex: number | undefined;\n\tprivate pendingToolIndexes = new Map<string, number>();\n\tprivate declare readonly entries: LiveChatEntry[];\n\tconstructor(entries: LiveChatEntry[]) {\n\t\tthis.entries = entries;\n\t}\n\tclearTasks(): void {\n\t\tconst streaming =\n\t\t\tthis.streamingAssistantIndex === undefined ? undefined : this.entries[this.streamingAssistantIndex];\n\t\tfor (let index = this.entries.length - 1; index >= 0; index--) {\n\t\t\tconst entry = this.entries[index];\n\t\t\tif (\"kind\" in entry && entry.kind === \"task\") this.entries.splice(index, 1);\n\t\t}\n\t\tthis.streamingAssistantIndex = streaming === undefined ? undefined : this.entries.indexOf(streaming);\n\t\tthis.reindexPendingTools();\n\t}\n\tupsertTasks(tasks: readonly TaskRecord[], store?: OwnerTaskStore): void {\n\t\tfor (const task of tasks) {\n\t\t\tconst activity = store?.recentActivity(task.ref.taskId) ?? [];\n\t\t\tconst activityOmitted = store?.activityOmitted(task.ref.taskId) ?? false;\n\t\t\tconst duplicate =\n\t\t\t\ttasks.filter((other) => other.agentName === task.agentName && other.title === task.title).length > 1;\n\t\t\tconst entry = this.entries.find(\n\t\t\t\t(entry) => \"kind\" in entry && entry.kind === \"task\" && entry.task.ref.taskId === task.ref.taskId,\n\t\t\t);\n\t\t\tif (entry && \"kind\" in entry && entry.kind === \"task\") {\n\t\t\t\tentry.task = task;\n\t\t\t\tentry.duplicate = duplicate;\n\t\t\t\tentry.siblings = tasks;\n\t\t\t\tentry.activity = activity;\n\t\t\t\tentry.activityOmitted = activityOmitted;\n\t\t\t} else\n\t\t\t\tthis.entries.push({\n\t\t\t\t\trole: \"tool\",\n\t\t\t\t\tkind: \"task\",\n\t\t\t\t\ttask,\n\t\t\t\t\tduplicate,\n\t\t\t\t\tsiblings: tasks,\n\t\t\t\t\tactivity,\n\t\t\t\t\tactivityOmitted,\n\t\t\t\t});\n\t\t}\n\t}\n\tappendMessages(messages: readonly AgentMessage[]): void {\n\t\tthis.entries.push(...chatEntriesFromAgentMessages(messages));\n\t\tthis.reindexPendingTools();\n\t}\n\treplaceMessages(messages: readonly AgentMessage[], preservedEntries: readonly { role: string }[] = []): void {\n\t\tthis.entries.splice(0, this.entries.length, ...chatEntriesFromAgentMessages(messages), ...preservedEntries);\n\t\tthis.streamingAssistantIndex = undefined;\n\t\tthis.reindexPendingTools();\n\t}\n\tappendUserText(text: string): void {\n\t\tthis.entries.push({ role: \"user\", kind: \"user\", text });\n\t}\n\t/**\n\t * Seed the assistant message a chat mounted mid-stream never saw start.\n\t *\n\t * Delta-only updates carry just the next fragment, so a consumer attached\n\t * part-way through a turn cannot recover the text that already streamed. The\n\t * live session keeps that in-flight message, and seeding it here makes the\n\t * deltas that arrive afterwards continue it instead of opening a second\n\t * assistant message. A stream this consumer is already following wins.\n\t */\n\thydrateStreamingAssistantMessage(message: unknown): boolean {\n\t\tif (!isAgentMessageLike(message) || message.role !== \"assistant\") return false;\n\t\tif (this.currentStreamingAssistantMessage() !== undefined) return false;\n\t\treturn this.updateAssistantMessage(beginStreamingAssistantMessage(message as AssistantMessage));\n\t}\n\tapplyEvent(event: LiveChatEventLike): boolean {\n\t\tconst type = String(event.type ?? \"\");\n\t\tswitch (type) {\n\t\t\tcase \"message_start\":\n\t\t\t\treturn this.handleMessageStart(event.message);\n\t\t\tcase \"message_update\":\n\t\t\t\treturn this.handleMessageUpdate(event);\n\t\t\tcase \"message_end\":\n\t\t\t\treturn this.handleMessageEnd(event.message);\n\t\t\tcase \"tool_execution_start\":\n\t\t\t\treturn this.upsertToolEntry({\n\t\t\t\t\ttoolCallId: typeof event.toolCallId === \"string\" ? event.toolCallId : undefined,\n\t\t\t\t\ttoolName: typeof event.toolName === \"string\" ? event.toolName : \"tool\",\n\t\t\t\t\targs: event.args,\n\t\t\t\t\tisPartial: true,\n\t\t\t\t});\n\t\t\tcase \"tool_execution_update\": {\n\t\t\t\tconst toolCallId = typeof event.toolCallId === \"string\" ? event.toolCallId : undefined;\n\t\t\t\tif (!toolCallId) return false;\n\t\t\t\treturn this.updateToolResult(toolCallId, event.partialResult, true, false);\n\t\t\t}\n\t\t\tcase \"tool_execution_end\": {\n\t\t\t\tconst toolCallId = typeof event.toolCallId === \"string\" ? event.toolCallId : undefined;\n\t\t\t\tif (!toolCallId) return false;\n\t\t\t\treturn this.updateToolResult(toolCallId, event.result, false, event.isError === true);\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t}\n\tpendingToolIds(): string[] {\n\t\treturn [...this.pendingToolIndexes.keys()];\n\t}\n\tclearPendingTools(): void {\n\t\tthis.pendingToolIndexes.clear();\n\t}\n\n\tisStreamingAssistantEntry(entry: ChatMessageEntry): boolean {\n\t\treturn this.streamingAssistantIndex !== undefined && this.entries[this.streamingAssistantIndex] === entry;\n\t}\n\n\tprivate handleMessageStart(message: unknown): boolean {\n\t\tif (!isAgentMessageLike(message)) return false;\n\t\tif (message.role === \"assistant\") {\n\t\t\tthis.streamingAssistantIndex = undefined;\n\t\t\treturn this.updateAssistantMessage(beginStreamingAssistantMessage(message as AssistantMessage));\n\t\t}\n\t\tif (message.role === \"toolResult\") {\n\t\t\tconst toolResult = message as ToolResultMessage;\n\t\t\tif (this.findToolEntryIndex(toolResult.toolCallId) >= 0) return true;\n\t\t}\n\t\tconst entries = chatEntriesFromAgentMessages([message as AgentMessage]);\n\t\tif (entries.length === 0) return false;\n\t\tthis.entries.push(...entries);\n\t\tthis.reindexPendingTools();\n\t\treturn true;\n\t}\n\tprivate handleMessageUpdate(event: LiveChatEventLike): boolean {\n\t\tif (!event.assistantMessageEvent) return false;\n\t\tconst message = this.currentStreamingAssistantMessage() ?? minimalAssistantMessage();\n\t\tif (!applyAssistantMessageDelta(message, event.assistantMessageEvent)) return false;\n\t\treturn this.updateAssistantMessage(message);\n\t}\n\tprivate handleMessageEnd(message: unknown): boolean {\n\t\tif (!isAgentMessageLike(message) || message.role !== \"assistant\") return false;\n\t\tconst changed = this.updateAssistantMessage(message as AssistantMessage);\n\t\tconst stopReason = typeof message.stopReason === \"string\" ? message.stopReason : \"\";\n\t\tif (stopReason === \"aborted\" || stopReason === \"error\") {\n\t\t\tconst errorText =\n\t\t\t\ttypeof message.errorMessage === \"string\" && message.errorMessage\n\t\t\t\t\t? message.errorMessage\n\t\t\t\t\t: stopReason === \"aborted\"\n\t\t\t\t\t\t? \"Operation aborted\"\n\t\t\t\t\t\t: \"Unknown error\";\n\t\t\tfor (const toolCallId of this.pendingToolIds()) {\n\t\t\t\tthis.updateToolResult(toolCallId, { content: [{ type: \"text\", text: errorText }] }, false, true);\n\t\t\t}\n\t\t\tthis.clearPendingTools();\n\t\t}\n\t\tthis.streamingAssistantIndex = undefined;\n\t\treturn changed || true;\n\t}\n\tprivate updateAssistantMessage(message: AssistantMessage): boolean {\n\t\tif (\n\t\t\tthis.streamingAssistantIndex !== undefined &&\n\t\t\tthis.isAssistantEntry(this.entries[this.streamingAssistantIndex])\n\t\t) {\n\t\t\tthis.entries[this.streamingAssistantIndex] = {\n\t\t\t\t...(this.entries[this.streamingAssistantIndex] as Extract<ChatMessageEntry, { kind: \"assistant\" }>),\n\t\t\t\tmessage,\n\t\t\t};\n\t\t} else {\n\t\t\tthis.entries.push({ role: \"assistant\", kind: \"assistant\", message });\n\t\t\tthis.streamingAssistantIndex = this.entries.length - 1;\n\t\t}\n\t\tfor (const content of message.content) {\n\t\t\tif (content.type !== \"toolCall\") continue;\n\t\t\tthis.upsertToolEntry({\n\t\t\t\ttoolCallId: content.id,\n\t\t\t\ttoolName: content.name,\n\t\t\t\targs: content.arguments,\n\t\t\t\tisPartial: true,\n\t\t\t});\n\t\t}\n\t\treturn true;\n\t}\n\tprivate currentStreamingAssistantMessage(): AssistantMessage | undefined {\n\t\tconst entry = this.streamingAssistantIndex !== undefined ? this.entries[this.streamingAssistantIndex] : undefined;\n\t\treturn this.isAssistantEntry(entry) ? entry.message : undefined;\n\t}\n\tprivate upsertToolEntry(update: {\n\t\ttoolCallId?: string;\n\t\ttoolName: string;\n\t\targs?: unknown;\n\t\tisPartial: boolean;\n\t}): boolean {\n\t\tconst toolCallId = update.toolCallId ?? `live-${update.toolName}`;\n\t\tconst index = this.pendingToolIndexes.get(toolCallId) ?? this.findToolEntryIndex(toolCallId, update.toolName);\n\t\tconst previous = index >= 0 ? this.entries[index] : undefined;\n\t\tconst previousTool = this.isToolEntry(previous) ? previous : undefined;\n\t\tconst next: ChatMessageEntry = {\n\t\t\trole: \"tool\",\n\t\t\tkind: \"tool\",\n\t\t\ttoolName: previousTool?.toolName ?? update.toolName,\n\t\t\ttoolCallId,\n\t\t\targs: update.args ?? previousTool?.args ?? {},\n\t\t\tresult: previousTool?.result,\n\t\t\tisPartial: update.isPartial,\n\t\t};\n\t\tif (index >= 0) this.entries[index] = next;\n\t\telse this.entries.push(next);\n\t\tthis.pendingToolIndexes.set(toolCallId, index >= 0 ? index : this.entries.length - 1);\n\t\treturn true;\n\t}\n\tprivate updateToolResult(toolCallId: string, result: unknown, isPartial: boolean, isError: boolean): boolean {\n\t\tconst index = this.pendingToolIndexes.get(toolCallId) ?? this.findToolEntryIndex(toolCallId);\n\t\tif (index < 0) return false;\n\t\tconst entry = this.entries[index];\n\t\tif (!this.isToolEntry(entry)) return false;\n\t\tconst resultObject = toolResultFromUnknown(result, entry.toolName, toolCallId, isError);\n\t\tthis.entries[index] = { ...entry, result: resultObject, isPartial };\n\t\tif (!isPartial) this.pendingToolIndexes.delete(toolCallId);\n\t\treturn true;\n\t}\n\tprivate isSyntheticToolCallId(toolCallId: string): boolean {\n\t\treturn toolCallId.startsWith(\"live-\");\n\t}\n\tprivate findToolEntryIndex(toolCallId: string, toolName?: string): number {\n\t\tfor (let i = this.entries.length - 1; i >= 0; i--) {\n\t\t\tconst entry = this.entries[i];\n\t\t\tif (!this.isToolEntry(entry)) continue;\n\t\t\tif (entry.toolCallId === toolCallId) return i;\n\t\t\tif (\n\t\t\t\ttoolName &&\n\t\t\t\tentry.toolName === toolName &&\n\t\t\t\tentry.isPartial !== false &&\n\t\t\t\t(this.isSyntheticToolCallId(toolCallId) || this.isSyntheticToolCallId(entry.toolCallId))\n\t\t\t) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}\n\tprivate reindexPendingTools(): void {\n\t\tthis.pendingToolIndexes.clear();\n\t\tfor (let i = 0; i < this.entries.length; i++) {\n\t\t\tconst entry = this.entries[i];\n\t\t\tif (this.isToolEntry(entry) && entry.isPartial !== false) this.pendingToolIndexes.set(entry.toolCallId, i);\n\t\t}\n\t}\n\tprivate isAssistantEntry(\n\t\tentry: LiveChatEntry | undefined,\n\t): entry is Extract<ChatMessageEntry, { kind: \"assistant\" }> {\n\t\treturn isChatMessageEntry(entry) && entry.kind === \"assistant\";\n\t}\n\tprivate isToolEntry(entry: LiveChatEntry | undefined): entry is Extract<ChatMessageEntry, { kind: \"tool\" }> {\n\t\treturn isChatMessageEntry(entry) && entry.kind === \"tool\";\n\t}\n}\nfunction isChatMessageEntry(entry: LiveChatEntry | undefined): entry is ChatMessageEntry {\n\treturn entry !== undefined && \"kind\" in entry;\n}\nfunction isLegacyCompactionSummaryMessage(message: AgentMessage): boolean {\n\treturn message.role === \"compaction\" + \"Summary\";\n}\nfunction isAgentMessageLike(\n\tmessage: unknown,\n): message is AgentMessage & { stopReason?: unknown; errorMessage?: unknown } {\n\treturn message !== null && typeof message === \"object\" && \"role\" in message;\n}\nfunction minimalAssistantMessage(): AssistantMessage {\n\treturn {\n\t\trole: \"assistant\",\n\t\tcontent: [],\n\t\tstopReason: \"stop\",\n\t} as unknown as AssistantMessage;\n}\n/** UI progress may contain in-memory details; only durable transcript results are JSON. */\ntype RenderableToolResult = Omit<ToolResultMessage, \"details\"> & { details?: unknown };\nfunction toolResultFromUnknown(\n\tresult: unknown,\n\ttoolName: string,\n\ttoolCallId: string,\n\tisError: boolean,\n): RenderableToolResult {\n\tif (result !== null && typeof result === \"object\" && \"content\" in result) {\n\t\tconst candidate = result as { content?: unknown; details?: unknown };\n\t\tconst content = Array.isArray(candidate.content) ? candidate.content : [];\n\t\treturn {\n\t\t\trole: \"toolResult\",\n\t\t\ttoolCallId,\n\t\t\ttoolName,\n\t\t\tcontent: content as ToolResultMessage[\"content\"],\n\t\t\tdetails: candidate.details,\n\t\t\tisError,\n\t\t\ttimestamp: Date.now(),\n\t\t};\n\t}\n\treturn {\n\t\trole: \"toolResult\",\n\t\ttoolCallId,\n\t\ttoolName,\n\t\tcontent: typeof result === \"string\" ? [{ type: \"text\", text: result }] : [],\n\t\tisError,\n\t\ttimestamp: Date.now(),\n\t};\n}\nexport function renderChatMessageEntry(entry: ChatMessageEntry, options: ChatMessageRenderOptions): Component {\n\tconst messageEntry = entry as ChatMessageEntry;\n\tconst markdownTheme = options.markdownTheme ?? getMarkdownTheme();\n\tswitch (messageEntry.kind) {\n\t\tcase \"task\":\n\t\t\treturn new TaskRow(messageEntry.task, {\n\t\t\t\texpanded: options.toolOutputExpanded,\n\t\t\t\tduplicate: messageEntry.duplicate,\n\t\t\t\tsiblings: messageEntry.siblings,\n\t\t\t\tactivity: messageEntry.activity,\n\t\t\t\tactivityOmitted: messageEntry.activityOmitted,\n\t\t\t});\n\t\tcase \"assistant\":\n\t\t\treturn new AssistantMessageComponent(\n\t\t\t\tmessageEntry.message,\n\t\t\t\toptions.hideThinkingBlock ?? false,\n\t\t\t\tmarkdownTheme,\n\t\t\t\toptions.hiddenThinkingLabel ?? \"Thinking...\",\n\t\t\t\toptions.outputPad ?? 1,\n\t\t\t\toptions.markdownTransformers,\n\t\t\t\toptions.isStreaming,\n\t\t\t\toptions.renderLatex,\n\t\t\t);\n\t\tcase \"tool\": {\n\t\t\tif (options.createToolComponent) return options.createToolComponent(messageEntry);\n\t\t\tconst component = new ToolExecutionComponent(\n\t\t\t\tmessageEntry.toolName,\n\t\t\t\tmessageEntry.toolCallId,\n\t\t\t\tmessageEntry.args,\n\t\t\t\t{\n\t\t\t\t\tshowImages: options.showImages ?? true,\n\t\t\t\t\timageWidthCells: options.imageWidthCells,\n\t\t\t\t},\n\t\t\t\toptions.getToolDefinition?.(messageEntry.toolName),\n\t\t\t\toptions.ui as TUI,\n\t\t\t\toptions.cwd,\n\t\t\t);\n\t\t\tcomponent.setExpanded(options.toolOutputExpanded ?? false);\n\t\t\tif (messageEntry.result) component.updateResult(messageEntry.result, messageEntry.isPartial ?? false);\n\t\t\treturn component;\n\t\t}\n\t\tcase \"bashExecution\": {\n\t\t\tconst component = new BashExecutionComponent(\n\t\t\t\tmessageEntry.message.command,\n\t\t\t\toptions.ui as TUI,\n\t\t\t\tmessageEntry.message.excludeFromContext,\n\t\t\t);\n\t\t\tif (messageEntry.message.output) component.appendOutput(messageEntry.message.output);\n\t\t\tif (messageEntry.isPartial !== true) {\n\t\t\t\tcomponent.setComplete(\n\t\t\t\t\tmessageEntry.message.exitCode,\n\t\t\t\t\tmessageEntry.message.cancelled,\n\t\t\t\t\tmessageEntry.message.truncated\n\t\t\t\t\t\t? ({ truncated: true } as Parameters<BashExecutionComponent[\"setComplete\"]>[2])\n\t\t\t\t\t\t: undefined,\n\t\t\t\t\tmessageEntry.message.fullOutputPath,\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn component;\n\t\t}\n\t\tcase \"user\":\n\t\t\treturn userMessageComponent(\n\t\t\t\tmessageEntry.text,\n\t\t\t\tmarkdownTheme,\n\t\t\t\toptions.toolOutputExpanded ?? false,\n\t\t\t\toptions.outputPad ?? 1,\n\t\t\t\toptions.markdownTransformers,\n\t\t\t\toptions.renderLatex,\n\t\t\t);\n\t\tcase \"custom\": {\n\t\t\tif (isVerbatimCompactionMessage(messageEntry.message)) {\n\t\t\t\treturn compactionBoundaryFromMessage(messageEntry.message, options.toolOutputExpanded ?? false);\n\t\t\t}\n\t\t\tif (options.createCustomMessageComponent) return options.createCustomMessageComponent(messageEntry.message);\n\t\t\tconst component = new CustomMessageComponent(\n\t\t\t\tmessageEntry.message,\n\t\t\t\toptions.getCustomMessageRenderer?.(messageEntry.message.customType),\n\t\t\t\tmarkdownTheme,\n\t\t\t\toptions.outputPad ?? 1,\n\t\t\t\toptions.renderLatex,\n\t\t\t);\n\t\t\tcomponent.setExpanded(options.toolOutputExpanded ?? false);\n\t\t\treturn component;\n\t\t}\n\t\tcase \"branchSummary\": {\n\t\t\tconst component = new BranchSummaryMessageComponent(messageEntry.message, markdownTheme, options.renderLatex);\n\t\t\tcomponent.setExpanded(options.toolOutputExpanded ?? false);\n\t\t\treturn component;\n\t\t}\n\t\tcase \"system\":\n\t\t\treturn new Text(theme.fg(\"dim\", messageEntry.text), 1, 0);\n\t}\n}\nfunction userMessageComponent(\n\ttext: string,\n\tmarkdownTheme: MarkdownTheme,\n\texpanded: boolean,\n\toutputPad = 1,\n\tmarkdownTransformers: readonly MarkdownTransformer[] = [],\n\trenderLatex = true,\n): Component {\n\tconst skillBlock = parseSkillBlock(text);\n\tif (!skillBlock) return new UserMessageComponent(text, markdownTheme, outputPad, markdownTransformers, renderLatex);\n\tconst container = new Container();\n\tconst skillComponent = new SkillInvocationMessageComponent(skillBlock, markdownTheme, renderLatex);\n\tskillComponent.setExpanded(expanded);\n\tcontainer.addChild(skillComponent);\n\tif (skillBlock.userMessage) {\n\t\tcontainer.addChild(\n\t\t\tnew UserMessageComponent(skillBlock.userMessage, markdownTheme, outputPad, markdownTransformers, renderLatex),\n\t\t);\n\t}\n\treturn container;\n}\nfunction getMessageText(message: Extract<AgentMessage, { role: \"user\" }>): string {\n\treturn extractMessageText(message.content).trim();\n}\n"]}
|
package/docs/computer-use.md
CHANGED
|
@@ -9,7 +9,7 @@ Atomic can work in applications, not just edit code. Computer-use automation, or
|
|
|
9
9
|
|
|
10
10
|
This guide explains tool selection, setup, and safe operation. To test a software change and attach the results to a PR, see [Verification and evidence](/workflows/verification).
|
|
11
11
|
|
|
12
|
-
Jump to [application scripting](#application-scripting-and-apis), [desktop CUA](#desktop-automation-with-pyautogui-and-uv), [browser automation](#browser-automation-with-
|
|
12
|
+
Jump to [application scripting](#application-scripting-and-apis), [desktop CUA](#desktop-automation-with-pyautogui-and-uv), [browser automation](#browser-automation-with-agent-browser), [terminal automation](#terminal-automation-with-herdr), or [creative workflows](#creative-work-and-cua-workflows). Platform setup: [macOS](#macos), [Linux](#linux), [Windows](#windows).
|
|
13
13
|
|
|
14
14
|
## Choose the right tool
|
|
15
15
|
|
|
@@ -19,12 +19,12 @@ Start with the result you need, not the application you could click through. If
|
|
|
19
19
|
| --- | --- | --- |
|
|
20
20
|
| Create or edit files, such as presentations, documents, spreadsheets, or media | **A file library or CLI** | Use an app API or UI when the library cannot preserve required features, or when you need rendering or visual adjustments. |
|
|
21
21
|
| Interactive terminal or TUI | **Herdr** | Use tmux on macOS/Linux or native Windows psmux when Herdr cannot be used. Ordinary shell commands need no multiplexer. |
|
|
22
|
-
| Browser page or web application | **
|
|
22
|
+
| Browser page or web application | **agent-browser** | Use desktop CUA for browser chrome or OS dialogs that browser automation cannot reach. Keep existing browser test suites for repeatable tests. |
|
|
23
23
|
| Desktop application or work across apps | **PyAutoGUI, run with uv** | Use native accessibility tools, application scripting, or a CLI when they make the task easier, safer, or more reliable. |
|
|
24
24
|
|
|
25
25
|
You can combine tools without driving the whole task through a desktop. Generate a presentation with `python-pptx`, then inspect rendered slides for layout problems. Use Blender's Python API to generate repeated objects, then PyAutoGUI for adjustments in the visible editor. Use browser DOM controls rather than desktop clicks for a web form. For a supported web-service operation that does not require browser interaction, an authorized API request may be enough.
|
|
26
26
|
|
|
27
|
-
Atomic's skills supply operating instructions, not an installed desktop or automatic permission to control one. Load the `herdr`, `
|
|
27
|
+
Atomic's skills supply operating instructions, not an installed desktop or automatic permission to control one. Load the `herdr`, `agent-browser`, or `tmux` skill when applicable. Check the installed command's help before using version-dependent options.
|
|
28
28
|
|
|
29
29
|
**Herdr eligibility:** the bundled Herdr skill requires an explicit user mention or request and an agent running inside a Herdr-managed pane with `HERDR_ENV=1`. Launch Atomic inside Herdr and ask it to use Herdr for terminal work. Do not set the variable manually to bypass the check or control a focused session from outside Herdr. If those conditions are not met, use a suitable fallback.
|
|
30
30
|
|
|
@@ -230,40 +230,41 @@ Prefer complete actions such as `press`, `hotkey`, and `click` over holding inpu
|
|
|
230
230
|
|
|
231
231
|
After a timeout or interruption, inspect the current document and any output files. A save or export may have completed even if its acknowledgement was lost. Do not repeat destructive actions blindly.
|
|
232
232
|
|
|
233
|
-
## Browser automation with
|
|
233
|
+
## Browser automation with agent-browser
|
|
234
234
|
|
|
235
|
-
For tasks that require browser interaction, prefer [
|
|
235
|
+
For tasks that require browser interaction, prefer [agent-browser](https://github.com/vercel-labs/agent-browser) for websites and web apps on all three desktop platforms. Its accessibility-tree snapshots expose page structure and element references, so automation can use actual controls rather than screen coordinates. For data retrieval or batch operations, consider a supported API first when it meets the request and you have permission to use it.
|
|
236
236
|
|
|
237
237
|
### Setup and first session
|
|
238
238
|
|
|
239
|
-
Load the `
|
|
239
|
+
Load the `agent-browser` skill and check `agent-browser --help`. If the command is unavailable, install it when permitted:
|
|
240
240
|
|
|
241
241
|
```sh
|
|
242
|
-
npm
|
|
243
|
-
|
|
242
|
+
npm i -g agent-browser
|
|
243
|
+
agent-browser install
|
|
244
|
+
agent-browser --help
|
|
244
245
|
```
|
|
245
246
|
|
|
246
|
-
|
|
247
|
+
On Linux, use `agent-browser install --with-deps` to install system dependencies alongside the browser. Do not add browser automation dependencies to an unrelated project just to run a one-off task.
|
|
247
248
|
|
|
248
249
|
Create a uniquely named session, replacing `desktop-demo` if that name is already in use:
|
|
249
250
|
|
|
250
251
|
```sh
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
252
|
+
agent-browser --session desktop-demo open https://example.com --headed
|
|
253
|
+
agent-browser --session desktop-demo snapshot
|
|
254
|
+
agent-browser --session desktop-demo screenshot browser-before.png
|
|
255
|
+
agent-browser --session desktop-demo close
|
|
255
256
|
```
|
|
256
257
|
|
|
257
|
-
For a real task, act between the snapshot and final capture. Read element references from the current snapshot, then
|
|
258
|
+
For a real task, act between the snapshot and final capture. Read element references from the current snapshot, then interact through them. Do not reuse an example reference without discovering what it points to. Refresh the snapshot after navigation or substantial UI changes. Run `agent-browser skills get core` for the authoritative workflow, common patterns, and troubleshooting; `--full` adds the complete command reference.
|
|
258
259
|
|
|
259
260
|
### Best practices
|
|
260
261
|
|
|
261
|
-
- Keep the same session name on every command. Close only sessions you created, not every browser on the machine.
|
|
262
|
+
- Keep the same session name on every command (or set `AGENT_BROWSER_SESSION`). Close only sessions you created, not every browser on the machine.
|
|
262
263
|
- Prefer a fresh profile. Attach to an existing personal browser only when authorized; stored sessions can expose private tabs and credentials.
|
|
263
264
|
- Use headed mode for visual work. Headless mode can verify DOM behavior, but does not establish that desktop integration or native dialogs work.
|
|
264
|
-
- Inspect visible results and relevant console/network output.
|
|
265
|
-
- Use
|
|
266
|
-
- Treat cookies, saved authentication state,
|
|
265
|
+
- Inspect visible results and relevant console/network output (`agent-browser console`, `agent-browser errors`, `agent-browser network requests`). Keep semantic locators and assertions in a maintained browser test suite for repeatable regression coverage.
|
|
266
|
+
- Use the CLI's file-upload support for supported file inputs rather than driving an OS file picker. Switch to CUA or native tooling only for UI outside the page, and then recheck focus before returning to browser control.
|
|
267
|
+
- Treat cookies, saved authentication state, and network logs as sensitive. Do not commit or attach a browser profile as evidence.
|
|
267
268
|
- Browser mobile emulation tests a web viewport, not a native Android or iOS application.
|
|
268
269
|
|
|
269
270
|
For verification captures and recordings, see [browser evidence](/workflows/verification#browser-changes).
|
|
@@ -337,7 +338,7 @@ Use `osascript` for AppleScript or JavaScript for Automation when an app's scrip
|
|
|
337
338
|
|
|
338
339
|
### Browser and terminal
|
|
339
340
|
|
|
340
|
-
|
|
341
|
+
agent-browser uses its own Chrome/Chromium session. Chromium coverage is not proof of every Safari-specific desktop behavior. Use an actual target browser when that distinction matters.
|
|
341
342
|
|
|
342
343
|
Herdr is the first choice for interactive terminals when eligible. Homebrew provides Herdr and tmux. Preserve the shell, terminal dimensions, and keyboard behavior relevant to the task rather than silently changing them to make a scenario pass.
|
|
343
344
|
|
|
@@ -357,7 +358,7 @@ For recordings, use a supported desktop recorder or OBS with the appropriate dis
|
|
|
357
358
|
|
|
358
359
|
### Browser and terminal
|
|
359
360
|
|
|
360
|
-
|
|
361
|
+
agent-browser may need browser binaries and system libraries on a minimal Linux install; `agent-browser install --with-deps` installs both. A headed browser needs a display. Headless browsing remains useful on SSH or CI hosts but does not grant desktop access.
|
|
361
362
|
|
|
362
363
|
Herdr is preferred when eligible; tmux is a practical fallback on local or remote POSIX shells. An SSH terminal can run terminal scenarios without access to the remote desktop. Record which host owns the pane and application.
|
|
363
364
|
|
|
@@ -377,7 +378,7 @@ Snipping Tool or OBS can capture desktop evidence. Check the selected window and
|
|
|
377
378
|
|
|
378
379
|
### Browser and terminal
|
|
379
380
|
|
|
380
|
-
Use native Windows
|
|
381
|
+
Use native Windows agent-browser when the task depends on Windows browsers, downloads, or desktop dialogs. Quote paths and URLs for the shell actually in use; do not paste POSIX shell syntax into PowerShell.
|
|
381
382
|
|
|
382
383
|
Prefer native Herdr when eligible. In PowerShell, check `$env:HERDR_ENV -eq '1'`, use `(Get-Location).Path` for the working directory, and read pane IDs from CLI responses. If Herdr cannot be used, install psmux through its documented Windows installation options and inspect its help. WSL tmux is useful for Linux programs, but is not native Windows ConPTY coverage.
|
|
383
384
|
|
|
@@ -114,12 +114,12 @@ Skills are reusable expert instructions. Trigger one with `/skill:<name>` follow
|
|
|
114
114
|
| `prompt-engineer` | Write, evaluate, migrate, or troubleshoot GPT and Claude prompts using separate model guides. | `/skill:prompt-engineer Draft a sharper repo-research prompt for payment retries end to end.` |
|
|
115
115
|
| `tdd` | Test-first feature or bug work. | `/skill:tdd` |
|
|
116
116
|
| `impeccable` | Critique or refine web/native frontend and product UI; includes detector hooks, framework-aware live review, and mount-failure recovery. | `/skill:impeccable` |
|
|
117
|
-
| `
|
|
117
|
+
| `agent-browser` | Drive a real browser for end-to-end UI checks, screenshots, and reviewable proof videos. | `/skill:agent-browser` |
|
|
118
118
|
| `qlty` | Lint, auto-format, and measure code quality — complexity, duplication, and code smells — through one CLI across the repository's languages. | `/skill:qlty check this branch before I hand it off` |
|
|
119
119
|
| `liteparse` | Pull text, tables, or values out of PDF, DOCX, PPTX, XLSX, and image files locally. | `/skill:liteparse` |
|
|
120
120
|
| `show-me` | Explain a topic visually with concise diagrams, code-shape sketches, or focused HTML artifacts. HumanLayer, MIT licensed. | `/skill:show-me` |
|
|
121
121
|
|
|
122
|
-
Impeccable 4.
|
|
122
|
+
Impeccable 4.3.1 runs its commands (`context`, `live`, `detect`, hooks, and the rest) through a self-contained engine binary instead of Node scripts. The bundled launcher, `scripts/impeccable` (`impeccable.cmd` on Windows), looks for a binary next to itself, then in `~/.impeccable/bin/`, and otherwise downloads the pinned engine release for your platform into `~/.impeccable/bin/<version>/` and verifies it against its published SHA-256 before running it, so the first use needs network access. Point `IMPECCABLE_BIN` at a preinstalled engine or set `IMPECCABLE_HOME` to a writable cache when that is not possible. Atomic's launcher keeps the engine's anonymous concept-roll ping and its `npx impeccable update` check switched off, since the skill ships with each Atomic release. Live sessions resolve to the selected app root and support SvelteKit, Nuxt, TanStack Start, Astro, Next.js, Vite, and static HTML injection. The image fallback runs only with `OPENAI_API_KEY`, sends prompts and optional reference images to OpenAI, and spends that account's API credit. Generated image prompts are embedded in the image or a sidecar, so do not include secrets.
|
|
123
123
|
|
|
124
124
|
Use `/skill:research-codebase` for a focused subsystem or question. For repository-wide research, use `fan-out-and-synthesize` with distinct repository partitions and an artifact synthesis barrier. Use Goal for ledger-backed bounded orchestration and Ralph for research-first delegated implementation with iterative review; task size alone does not select either workflow.
|
|
125
125
|
|
|
@@ -57,9 +57,13 @@ irm https://raw.githubusercontent.com/bastani-inc/atomic/main/install.ps1 | iex
|
|
|
57
57
|
|
|
58
58
|
The installer downloads only the matching GitHub Release archive and `SHA256SUMS`, verifies the checksum, and keeps the complete payload in a versioned directory.
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
In an interactive terminal it prints the release and platform it is installing, draws a live progress bar with the percentage and megabytes downloaded, confirms each phase on one line, shows the Atomic logo (UTF-8 terminals on macOS/Linux, Windows Terminal on Windows), and ends with a `To start:` block. PATH guidance appears only when the launcher directory is not already on your `PATH`. When an install already exists it prints the installed version, or `Version <tag> already installed`, and still repairs that version in place.
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
Set `NO_COLOR=1` for plain text instead: no colours, no progress bar, and no logo, with `Downloading <archive> (<size> MB) ... done` in place of the bar. The installer also switches to plain output on its own when standard output is not a terminal, when `CI` is set, or (on macOS/Linux) when `TERM` is `dumb` or unset. Plain mode changes only the presentation; verification, error messages, and exit codes stay the same.
|
|
63
|
+
|
|
64
|
+
On macOS or Linux, the default paths are `~/.local/share/atomic` for versioned payloads and `~/.local/bin/atomic` for the launcher. The installer never edits your shell configuration; when `~/.local/bin` is not on your `PATH` it prints a paste-safe `export PATH=...` command (or `fish_add_path` for fish) and names the startup file to add it to.
|
|
65
|
+
|
|
66
|
+
On Windows, the defaults are `%LOCALAPPDATA%\atomic` for payloads and `%LOCALAPPDATA%\atomic\bin\atomic.cmd` for the launcher. The installer prints `Installed to <path>`, and when it adds the bin directory to your User PATH it says so and asks you to open a new terminal.
|
|
63
67
|
|
|
64
68
|
The installer accepts these environment variables:
|
|
65
69
|
|
package/docs/intercom.md
CHANGED
|
@@ -207,8 +207,13 @@ intercom({
|
|
|
207
207
|
| **Clarification request** | Worker uses `ask` | Worker needs the answer to proceed. Blocks until reply. |
|
|
208
208
|
| **Discovery escalation** | Worker uses `ask` | Worker needs approval before changing course. |
|
|
209
209
|
| **Completion report** | Worker uses `ask` | Planner might have follow-up instructions or the next task. |
|
|
210
|
+
| **Peer handoff** | Sibling uses `send` | A locator, researcher, or debugger passes paths, evidence, or a reproduction straight to the sibling that needs it. |
|
|
211
|
+
| **Peer challenge** | Sibling uses `ask` | One reviewer or worker questions another's finding with evidence; each still returns its own verdict. |
|
|
212
|
+
| **Ownership claim** | Sibling uses `send` | Parallel writers divide files or serialize a shared suite, build, or migration. |
|
|
210
213
|
|
|
211
|
-
|
|
214
|
+
Coordination is not only vertical. Subagents launched together and workflow stages in one invocation share an Intercom group, so they can list each other and message directly to debate, connect, learn, and coordinate as peers. `contact_supervisor` is only for the supervisor. See [Peer coordination](/subagents#peer-coordination) for how to enable it from the launching prompt.
|
|
215
|
+
|
|
216
|
+
The bundled `intercom` skill (`/skill:intercom`) has copy-paste ready patterns for planner-worker delegation, status checks, natural replies, broadcasting to multiple workers, attachments, handling subagent escalations on the orchestrator side, and peer coordination between subagents and workflow stages.
|
|
212
217
|
|
|
213
218
|
**Recommended:** Add this snippet to your project's `AGENTS.md` to help agents understand when to coordinate across sessions:
|
|
214
219
|
|
|
@@ -33,13 +33,17 @@ Missing evidence is unknown, not zero. A rounded lead is not proof of significan
|
|
|
33
33
|
|
|
34
34
|
Use these starting defaults unless the user requests a level. Higher effort can improve hard reasoning, but it also costs more and can be slower. `max` is an exception, not a default.
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
| Codebase
|
|
41
|
-
|
|
|
42
|
-
|
|
|
36
|
+
Price is per task. Candidate cost is USD per million tokens, and roles differ in token volume and in what a mistake costs. High-volume, tool-checked roles such as exploration and routine implementation default to cheaper, faster models; roles where a missed defect is expensive, such as review, verification, and final approval, justify frontier models at high effort. Pick the tier first, then the effort within it; do not compensate for a cheap model with `max` or for an expensive one with `minimal`.
|
|
37
|
+
|
|
38
|
+
| Stage role | Default thinking level | Model cost tier | Why |
|
|
39
|
+
| --- | --- | --- | --- |
|
|
40
|
+
| Codebase exploration: locating files, reading code, tracing call sites | `minimal` or `low` | Cheap, fast | Tool-driven lookups need speed, not deliberation; escalate to mapping or analysis only when the question becomes a design judgement. |
|
|
41
|
+
| Coding, implementation, routine fixes | `low` or `medium` | Cheap or mid-priced | Runs many times per task and is validated by tools and review afterwards. |
|
|
42
|
+
| Code review, test design, failure analysis, security, identity, adversarial challenge, final approval | `high` or `xhigh` | Frontier | A missed defect is the expensive outcome; spend the strongest model and reasoning here. |
|
|
43
|
+
| Codebase mapping, lifecycle analysis, compatibility, planning, synthesis, triage | `high` | Frontier or mid-priced | Resolve ambiguity before downstream work depends on it. |
|
|
44
|
+
| Orchestration, delegation, and multi-stage coordination | `medium` or `high` | Mid-priced | Judge scope, sequence work, and integrate results without re-deriving what delegated stages already verified. |
|
|
45
|
+
| User-impact review and final reporting | `medium` | Mid-priced | Preserve evidence and communicate clearly without unnecessary reasoning. |
|
|
46
|
+
| Deterministic checks | No model call | — | Run tests, typechecks, probes, and scripts directly. |
|
|
43
47
|
|
|
44
48
|
An explicit user request wins over these defaults, but the requested level must exist for the selected catalog entry. Do not invent unsupported suffixes. If `xhigh` is unavailable, use `high` rather than automatically promoting to `max`; choose another catalog model or leave the stage unpinned if neither fits.
|
|
45
49
|
|
package/docs/quickstart.md
CHANGED
|
@@ -37,7 +37,7 @@ Full detail: package manager commands and the `--ignore-scripts` note.
|
|
|
37
37
|
|
|
38
38
|
Moved to [Installation](/getting-started/installation#release-archive).
|
|
39
39
|
|
|
40
|
-
Full detail: version pinning, `ATOMIC_VERSION`, `ATOMIC_INSTALL_DIR`, `ATOMIC_BIN_DIR`, `GITHUB_TOKEN`/`GH_TOKEN`, default paths, and PATH guidance.
|
|
40
|
+
Full detail: version pinning, `ATOMIC_VERSION`, `ATOMIC_INSTALL_DIR`, `ATOMIC_BIN_DIR`, `GITHUB_TOKEN`/`GH_TOKEN`, default paths, and PATH guidance. It also describes what the installer prints: the release and platform, a live download progress bar, one-line phase confirmations, the Atomic logo, and a `To start:` block, or plain text when `NO_COLOR=1` is set, `CI` is set, or output is not a terminal.
|
|
41
41
|
|
|
42
42
|
#### ATOMIC_VERSION
|
|
43
43
|
|
package/docs/skills.md
CHANGED
|
@@ -109,7 +109,7 @@ Offline, `qlty metrics` and `qlty smells` still work through built-in static ana
|
|
|
109
109
|
|
|
110
110
|
### Built-in computer-use and automation guidance
|
|
111
111
|
|
|
112
|
-
For desktop computer use, or CUA, use PyAutoGUI for mouse, keyboard and screenshots. For browser automation, load `/skill:
|
|
112
|
+
For desktop computer use, or CUA, use PyAutoGUI for mouse, keyboard and screenshots. For browser automation, load `/skill:agent-browser`. For terminal automation/testing, prefer `/skill:herdr` on macOS, Linux and Windows. Install Herdr if missing when network access and permissions permit; fall back to `/skill:tmux` or native Windows psmux when installation or use is not possible. Preserve the upstream skill's explicit-request and managed-pane requirements. These are separate interfaces, not interchangeable command names. See [verification and desktop safety](/workflows/verification) for installation, permissions, dedicated sessions and input cleanup.
|
|
113
113
|
|
|
114
114
|
The bundled [Herdr skill](https://github.com/herdrdev/herdr/blob/v0.9.0/skills/herdr/SKILL.md) requires an explicit Herdr mention or request and `HERDR_ENV=1`; it stops outside a Herdr-managed pane. It does not install Herdr or authorize control of unrelated panes. Use returned pane IDs, and check completion separately from command submission.
|
|
115
115
|
|