lsd-pi 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +7 -1
- package/dist/onboarding.js +3 -3
- package/dist/resources/agents/scout.md +6 -0
- package/dist/resources/extensions/slash-commands/plan.js +7 -1
- package/dist/resources/extensions/subagent/index.js +10 -2
- package/dist/resources/extensions/usage/index.js +87 -36
- package/package.json +1 -1
- package/packages/pi-agent-core/dist/agent.d.ts.map +1 -1
- package/packages/pi-agent-core/dist/agent.js +8 -2
- package/packages/pi-agent-core/dist/agent.js.map +1 -1
- package/packages/pi-agent-core/src/agent.ts +8 -2
- package/packages/pi-ai/dist/models.generated.d.ts +222 -1
- package/packages/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/packages/pi-ai/dist/models.generated.js +227 -6
- package/packages/pi-ai/dist/models.generated.js.map +1 -1
- package/packages/pi-ai/dist/models.test.js +28 -0
- package/packages/pi-ai/dist/models.test.js.map +1 -1
- package/packages/pi-ai/scripts/generate-models.ts +10 -100
- package/packages/pi-ai/src/models.generated.ts +227 -6
- package/packages/pi-ai/src/models.test.ts +30 -0
- package/packages/pi-coding-agent/dist/core/agent-session.d.ts +2 -0
- package/packages/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js +28 -0
- package/packages/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.js +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/system-prompt.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/system-prompt.js +10 -0
- package/packages/pi-coding-agent/dist/core/system-prompt.js.map +1 -1
- package/packages/pi-coding-agent/dist/index.d.ts +1 -1
- package/packages/pi-coding-agent/dist/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/index.js +1 -1
- package/packages/pi-coding-agent/dist/index.js.map +1 -1
- package/packages/pi-coding-agent/dist/tests/path-display.test.js +13 -0
- package/packages/pi-coding-agent/dist/tests/path-display.test.js.map +1 -1
- package/packages/pi-coding-agent/dist/tests/settings-manager-scout-policy.test.d.ts +2 -0
- package/packages/pi-coding-agent/dist/tests/settings-manager-scout-policy.test.d.ts.map +1 -0
- package/packages/pi-coding-agent/dist/tests/settings-manager-scout-policy.test.js +15 -0
- package/packages/pi-coding-agent/dist/tests/settings-manager-scout-policy.test.js.map +1 -0
- package/packages/pi-coding-agent/package.json +1 -1
- package/packages/pi-coding-agent/src/core/agent-session.ts +35 -0
- package/packages/pi-coding-agent/src/core/settings-manager.ts +1 -1
- package/packages/pi-coding-agent/src/core/system-prompt.ts +26 -0
- package/packages/pi-coding-agent/src/index.ts +1 -0
- package/packages/pi-coding-agent/src/tests/path-display.test.ts +14 -0
- package/pkg/package.json +1 -1
- package/src/resources/agents/scout.md +6 -0
- package/src/resources/extensions/slash-commands/plan.ts +11 -1
- package/src/resources/extensions/subagent/index.ts +10 -2
- package/src/resources/extensions/usage/index.ts +92 -38
- package/dist/resources/agents/javascript-pro.md +0 -280
- package/dist/resources/agents/researcher.md +0 -29
- package/dist/resources/agents/teams-builder.md +0 -74
- package/dist/resources/agents/teams-reviewer.md +0 -113
- package/dist/resources/agents/typescript-pro.md +0 -255
- package/dist/resources/skills/accessibility/SKILL.md +0 -522
- package/dist/resources/skills/accessibility/references/WCAG.md +0 -162
- package/dist/resources/skills/core-web-vitals/SKILL.md +0 -441
- package/dist/resources/skills/core-web-vitals/references/LCP.md +0 -208
- package/dist/resources/skills/frontend-design/SKILL.md +0 -45
- package/dist/resources/skills/make-interfaces-feel-better/SKILL.md +0 -122
- package/dist/resources/skills/make-interfaces-feel-better/animations.md +0 -379
- package/dist/resources/skills/make-interfaces-feel-better/performance.md +0 -88
- package/dist/resources/skills/make-interfaces-feel-better/surfaces.md +0 -247
- package/dist/resources/skills/make-interfaces-feel-better/typography.md +0 -123
- package/dist/resources/skills/react-best-practices/README.md +0 -123
- package/dist/resources/skills/react-best-practices/SKILL.md +0 -136
- package/dist/resources/skills/react-best-practices/metadata.json +0 -15
- package/dist/resources/skills/react-best-practices/rules/_sections.md +0 -46
- package/dist/resources/skills/react-best-practices/rules/_template.md +0 -28
- package/dist/resources/skills/react-best-practices/rules/advanced-event-handler-refs.md +0 -55
- package/dist/resources/skills/react-best-practices/rules/advanced-init-once.md +0 -42
- package/dist/resources/skills/react-best-practices/rules/advanced-use-latest.md +0 -39
- package/dist/resources/skills/react-best-practices/rules/async-api-routes.md +0 -38
- package/dist/resources/skills/react-best-practices/rules/async-defer-await.md +0 -80
- package/dist/resources/skills/react-best-practices/rules/async-dependencies.md +0 -51
- package/dist/resources/skills/react-best-practices/rules/async-parallel.md +0 -28
- package/dist/resources/skills/react-best-practices/rules/async-suspense-boundaries.md +0 -99
- package/dist/resources/skills/react-best-practices/rules/bundle-barrel-imports.md +0 -59
- package/dist/resources/skills/react-best-practices/rules/bundle-conditional.md +0 -31
- package/dist/resources/skills/react-best-practices/rules/bundle-defer-third-party.md +0 -49
- package/dist/resources/skills/react-best-practices/rules/bundle-dynamic-imports.md +0 -35
- package/dist/resources/skills/react-best-practices/rules/bundle-preload.md +0 -50
- package/dist/resources/skills/react-best-practices/rules/client-event-listeners.md +0 -74
- package/dist/resources/skills/react-best-practices/rules/client-localstorage-schema.md +0 -71
- package/dist/resources/skills/react-best-practices/rules/client-passive-event-listeners.md +0 -48
- package/dist/resources/skills/react-best-practices/rules/client-swr-dedup.md +0 -56
- package/dist/resources/skills/react-best-practices/rules/js-batch-dom-css.md +0 -107
- package/dist/resources/skills/react-best-practices/rules/js-cache-function-results.md +0 -80
- package/dist/resources/skills/react-best-practices/rules/js-cache-property-access.md +0 -28
- package/dist/resources/skills/react-best-practices/rules/js-cache-storage.md +0 -70
- package/dist/resources/skills/react-best-practices/rules/js-combine-iterations.md +0 -32
- package/dist/resources/skills/react-best-practices/rules/js-early-exit.md +0 -50
- package/dist/resources/skills/react-best-practices/rules/js-hoist-regexp.md +0 -45
- package/dist/resources/skills/react-best-practices/rules/js-index-maps.md +0 -37
- package/dist/resources/skills/react-best-practices/rules/js-length-check-first.md +0 -49
- package/dist/resources/skills/react-best-practices/rules/js-min-max-loop.md +0 -82
- package/dist/resources/skills/react-best-practices/rules/js-set-map-lookups.md +0 -24
- package/dist/resources/skills/react-best-practices/rules/js-tosorted-immutable.md +0 -57
- package/dist/resources/skills/react-best-practices/rules/rendering-activity.md +0 -26
- package/dist/resources/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +0 -47
- package/dist/resources/skills/react-best-practices/rules/rendering-conditional-render.md +0 -40
- package/dist/resources/skills/react-best-practices/rules/rendering-content-visibility.md +0 -38
- package/dist/resources/skills/react-best-practices/rules/rendering-hoist-jsx.md +0 -46
- package/dist/resources/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +0 -82
- package/dist/resources/skills/react-best-practices/rules/rendering-hydration-suppress-warning.md +0 -30
- package/dist/resources/skills/react-best-practices/rules/rendering-svg-precision.md +0 -28
- package/dist/resources/skills/react-best-practices/rules/rendering-usetransition-loading.md +0 -75
- package/dist/resources/skills/react-best-practices/rules/rerender-defer-reads.md +0 -39
- package/dist/resources/skills/react-best-practices/rules/rerender-dependencies.md +0 -45
- package/dist/resources/skills/react-best-practices/rules/rerender-derived-state-no-effect.md +0 -40
- package/dist/resources/skills/react-best-practices/rules/rerender-derived-state.md +0 -29
- package/dist/resources/skills/react-best-practices/rules/rerender-functional-setstate.md +0 -74
- package/dist/resources/skills/react-best-practices/rules/rerender-lazy-state-init.md +0 -58
- package/dist/resources/skills/react-best-practices/rules/rerender-memo-with-default-value.md +0 -38
- package/dist/resources/skills/react-best-practices/rules/rerender-memo.md +0 -44
- package/dist/resources/skills/react-best-practices/rules/rerender-move-effect-to-event.md +0 -45
- package/dist/resources/skills/react-best-practices/rules/rerender-simple-expression-in-memo.md +0 -35
- package/dist/resources/skills/react-best-practices/rules/rerender-transitions.md +0 -40
- package/dist/resources/skills/react-best-practices/rules/rerender-use-ref-transient-values.md +0 -73
- package/dist/resources/skills/react-best-practices/rules/server-after-nonblocking.md +0 -73
- package/dist/resources/skills/react-best-practices/rules/server-auth-actions.md +0 -96
- package/dist/resources/skills/react-best-practices/rules/server-cache-lru.md +0 -41
- package/dist/resources/skills/react-best-practices/rules/server-cache-react.md +0 -76
- package/dist/resources/skills/react-best-practices/rules/server-dedup-props.md +0 -65
- package/dist/resources/skills/react-best-practices/rules/server-parallel-fetching.md +0 -83
- package/dist/resources/skills/react-best-practices/rules/server-serialization.md +0 -38
- package/dist/resources/skills/userinterface-wiki/SKILL.md +0 -253
- package/dist/resources/skills/userinterface-wiki/rules/_sections.md +0 -66
- package/dist/resources/skills/userinterface-wiki/rules/_template.md +0 -24
- package/dist/resources/skills/userinterface-wiki/rules/a11y-reduced-motion-check.md +0 -30
- package/dist/resources/skills/userinterface-wiki/rules/a11y-toggle-setting.md +0 -30
- package/dist/resources/skills/userinterface-wiki/rules/a11y-visual-equivalent.md +0 -36
- package/dist/resources/skills/userinterface-wiki/rules/a11y-volume-control.md +0 -28
- package/dist/resources/skills/userinterface-wiki/rules/appropriate-confirmations-only.md +0 -19
- package/dist/resources/skills/userinterface-wiki/rules/appropriate-errors-warnings.md +0 -18
- package/dist/resources/skills/userinterface-wiki/rules/appropriate-no-decorative.md +0 -21
- package/dist/resources/skills/userinterface-wiki/rules/appropriate-no-high-frequency.md +0 -28
- package/dist/resources/skills/userinterface-wiki/rules/appropriate-no-punishing.md +0 -27
- package/dist/resources/skills/userinterface-wiki/rules/container-callback-ref.md +0 -31
- package/dist/resources/skills/userinterface-wiki/rules/container-guard-initial-zero.md +0 -25
- package/dist/resources/skills/userinterface-wiki/rules/container-no-excessive-use.md +0 -13
- package/dist/resources/skills/userinterface-wiki/rules/container-overflow-hidden.md +0 -25
- package/dist/resources/skills/userinterface-wiki/rules/container-transition-delay.md +0 -21
- package/dist/resources/skills/userinterface-wiki/rules/container-two-div-pattern.md +0 -35
- package/dist/resources/skills/userinterface-wiki/rules/container-use-resize-observer.md +0 -48
- package/dist/resources/skills/userinterface-wiki/rules/context-cleanup-nodes.md +0 -25
- package/dist/resources/skills/userinterface-wiki/rules/context-resume-suspended.md +0 -28
- package/dist/resources/skills/userinterface-wiki/rules/context-reuse-single.md +0 -30
- package/dist/resources/skills/userinterface-wiki/rules/design-filter-for-character.md +0 -25
- package/dist/resources/skills/userinterface-wiki/rules/design-noise-for-percussion.md +0 -26
- package/dist/resources/skills/userinterface-wiki/rules/design-oscillator-for-tonal.md +0 -22
- package/dist/resources/skills/userinterface-wiki/rules/duration-max-300ms.md +0 -21
- package/dist/resources/skills/userinterface-wiki/rules/duration-press-hover.md +0 -21
- package/dist/resources/skills/userinterface-wiki/rules/duration-shorten-before-curve.md +0 -21
- package/dist/resources/skills/userinterface-wiki/rules/duration-small-state.md +0 -15
- package/dist/resources/skills/userinterface-wiki/rules/easing-entrance-ease-out.md +0 -21
- package/dist/resources/skills/userinterface-wiki/rules/easing-exit-ease-in.md +0 -21
- package/dist/resources/skills/userinterface-wiki/rules/easing-for-state-change.md +0 -27
- package/dist/resources/skills/userinterface-wiki/rules/easing-linear-only-progress.md +0 -21
- package/dist/resources/skills/userinterface-wiki/rules/easing-natural-decay.md +0 -22
- package/dist/resources/skills/userinterface-wiki/rules/easing-no-linear-motion.md +0 -22
- package/dist/resources/skills/userinterface-wiki/rules/easing-transition-ease-in-out.md +0 -15
- package/dist/resources/skills/userinterface-wiki/rules/envelope-exponential-decay.md +0 -21
- package/dist/resources/skills/userinterface-wiki/rules/envelope-no-zero-target.md +0 -21
- package/dist/resources/skills/userinterface-wiki/rules/envelope-set-initial-value.md +0 -22
- package/dist/resources/skills/userinterface-wiki/rules/exit-key-required.md +0 -29
- package/dist/resources/skills/userinterface-wiki/rules/exit-matches-initial.md +0 -29
- package/dist/resources/skills/userinterface-wiki/rules/exit-prop-required.md +0 -33
- package/dist/resources/skills/userinterface-wiki/rules/exit-requires-wrapper.md +0 -27
- package/dist/resources/skills/userinterface-wiki/rules/impl-default-subtle.md +0 -21
- package/dist/resources/skills/userinterface-wiki/rules/impl-preload-audio.md +0 -34
- package/dist/resources/skills/userinterface-wiki/rules/impl-reset-current-time.md +0 -26
- package/dist/resources/skills/userinterface-wiki/rules/mode-pop-layout-for-lists.md +0 -25
- package/dist/resources/skills/userinterface-wiki/rules/mode-sync-layout-conflict.md +0 -29
- package/dist/resources/skills/userinterface-wiki/rules/mode-wait-doubles-duration.md +0 -25
- package/dist/resources/skills/userinterface-wiki/rules/morphing-aria-hidden.md +0 -21
- package/dist/resources/skills/userinterface-wiki/rules/morphing-consistent-viewbox.md +0 -23
- package/dist/resources/skills/userinterface-wiki/rules/morphing-group-variants.md +0 -33
- package/dist/resources/skills/userinterface-wiki/rules/morphing-jump-non-grouped.md +0 -29
- package/dist/resources/skills/userinterface-wiki/rules/morphing-reduced-motion.md +0 -28
- package/dist/resources/skills/userinterface-wiki/rules/morphing-spring-rotation.md +0 -23
- package/dist/resources/skills/userinterface-wiki/rules/morphing-strokelinecap-round.md +0 -21
- package/dist/resources/skills/userinterface-wiki/rules/morphing-three-lines.md +0 -32
- package/dist/resources/skills/userinterface-wiki/rules/morphing-use-collapsed.md +0 -33
- package/dist/resources/skills/userinterface-wiki/rules/native-backdrop-styling.md +0 -27
- package/dist/resources/skills/userinterface-wiki/rules/native-placeholder-styling.md +0 -27
- package/dist/resources/skills/userinterface-wiki/rules/native-selection-styling.md +0 -18
- package/dist/resources/skills/userinterface-wiki/rules/nested-consistent-timing.md +0 -25
- package/dist/resources/skills/userinterface-wiki/rules/nested-propagate-required.md +0 -41
- package/dist/resources/skills/userinterface-wiki/rules/none-context-menu-entrance.md +0 -25
- package/dist/resources/skills/userinterface-wiki/rules/none-high-frequency.md +0 -29
- package/dist/resources/skills/userinterface-wiki/rules/none-keyboard-navigation.md +0 -32
- package/dist/resources/skills/userinterface-wiki/rules/param-click-duration.md +0 -21
- package/dist/resources/skills/userinterface-wiki/rules/param-filter-frequency-range.md +0 -21
- package/dist/resources/skills/userinterface-wiki/rules/param-q-value-range.md +0 -21
- package/dist/resources/skills/userinterface-wiki/rules/param-reasonable-gain.md +0 -21
- package/dist/resources/skills/userinterface-wiki/rules/physics-active-state.md +0 -23
- package/dist/resources/skills/userinterface-wiki/rules/physics-no-excessive-stagger.md +0 -22
- package/dist/resources/skills/userinterface-wiki/rules/physics-spring-for-overshoot.md +0 -23
- package/dist/resources/skills/userinterface-wiki/rules/physics-subtle-deformation.md +0 -22
- package/dist/resources/skills/userinterface-wiki/rules/prefetch-hit-slop.md +0 -27
- package/dist/resources/skills/userinterface-wiki/rules/prefetch-keyboard-tab.md +0 -19
- package/dist/resources/skills/userinterface-wiki/rules/prefetch-not-everything.md +0 -22
- package/dist/resources/skills/userinterface-wiki/rules/prefetch-touch-fallback.md +0 -34
- package/dist/resources/skills/userinterface-wiki/rules/prefetch-trajectory-over-hover.md +0 -32
- package/dist/resources/skills/userinterface-wiki/rules/prefetch-use-selectively.md +0 -13
- package/dist/resources/skills/userinterface-wiki/rules/presence-disable-interactions.md +0 -31
- package/dist/resources/skills/userinterface-wiki/rules/presence-hook-in-child.md +0 -31
- package/dist/resources/skills/userinterface-wiki/rules/presence-safe-to-remove.md +0 -37
- package/dist/resources/skills/userinterface-wiki/rules/pseudo-content-required.md +0 -28
- package/dist/resources/skills/userinterface-wiki/rules/pseudo-first-line-styling.md +0 -27
- package/dist/resources/skills/userinterface-wiki/rules/pseudo-hit-target-expansion.md +0 -31
- package/dist/resources/skills/userinterface-wiki/rules/pseudo-marker-styling.md +0 -28
- package/dist/resources/skills/userinterface-wiki/rules/pseudo-over-dom-node.md +0 -32
- package/dist/resources/skills/userinterface-wiki/rules/pseudo-position-relative-parent.md +0 -33
- package/dist/resources/skills/userinterface-wiki/rules/pseudo-z-index-layering.md +0 -37
- package/dist/resources/skills/userinterface-wiki/rules/spring-for-gestures.md +0 -27
- package/dist/resources/skills/userinterface-wiki/rules/spring-for-interruptible.md +0 -27
- package/dist/resources/skills/userinterface-wiki/rules/spring-params-balanced.md +0 -29
- package/dist/resources/skills/userinterface-wiki/rules/spring-preserves-velocity.md +0 -28
- package/dist/resources/skills/userinterface-wiki/rules/staging-dim-background.md +0 -22
- package/dist/resources/skills/userinterface-wiki/rules/staging-one-focal-point.md +0 -24
- package/dist/resources/skills/userinterface-wiki/rules/staging-z-index-hierarchy.md +0 -22
- package/dist/resources/skills/userinterface-wiki/rules/timing-consistent.md +0 -24
- package/dist/resources/skills/userinterface-wiki/rules/timing-no-entrance-context-menu.md +0 -22
- package/dist/resources/skills/userinterface-wiki/rules/timing-under-300ms.md +0 -22
- package/dist/resources/skills/userinterface-wiki/rules/transition-name-cleanup.md +0 -28
- package/dist/resources/skills/userinterface-wiki/rules/transition-name-required.md +0 -27
- package/dist/resources/skills/userinterface-wiki/rules/transition-name-unique.md +0 -24
- package/dist/resources/skills/userinterface-wiki/rules/transition-over-js-library.md +0 -32
- package/dist/resources/skills/userinterface-wiki/rules/transition-style-pseudo-elements.md +0 -24
- package/dist/resources/skills/userinterface-wiki/rules/type-antialiased-on-retina.md +0 -18
- package/dist/resources/skills/userinterface-wiki/rules/type-disambiguation-stylistic-set.md +0 -15
- package/dist/resources/skills/userinterface-wiki/rules/type-font-display-swap.md +0 -28
- package/dist/resources/skills/userinterface-wiki/rules/type-justify-with-hyphens.md +0 -24
- package/dist/resources/skills/userinterface-wiki/rules/type-letter-spacing-uppercase.md +0 -28
- package/dist/resources/skills/userinterface-wiki/rules/type-no-font-synthesis.md +0 -18
- package/dist/resources/skills/userinterface-wiki/rules/type-oldstyle-nums-for-prose.md +0 -21
- package/dist/resources/skills/userinterface-wiki/rules/type-opentype-contextual-alternates.md +0 -15
- package/dist/resources/skills/userinterface-wiki/rules/type-optical-sizing-auto.md +0 -25
- package/dist/resources/skills/userinterface-wiki/rules/type-proper-fractions.md +0 -15
- package/dist/resources/skills/userinterface-wiki/rules/type-slashed-zero.md +0 -17
- package/dist/resources/skills/userinterface-wiki/rules/type-tabular-nums-for-data.md +0 -21
- package/dist/resources/skills/userinterface-wiki/rules/type-text-wrap-balance-headings.md +0 -21
- package/dist/resources/skills/userinterface-wiki/rules/type-text-wrap-pretty.md +0 -16
- package/dist/resources/skills/userinterface-wiki/rules/type-underline-offset.md +0 -25
- package/dist/resources/skills/userinterface-wiki/rules/type-variable-weight-continuous.md +0 -23
- package/dist/resources/skills/userinterface-wiki/rules/ux-aesthetic-usability.md +0 -32
- package/dist/resources/skills/userinterface-wiki/rules/ux-cognitive-load-reduce.md +0 -49
- package/dist/resources/skills/userinterface-wiki/rules/ux-common-region-boundaries.md +0 -50
- package/dist/resources/skills/userinterface-wiki/rules/ux-doherty-perceived-speed.md +0 -29
- package/dist/resources/skills/userinterface-wiki/rules/ux-doherty-under-400ms.md +0 -30
- package/dist/resources/skills/userinterface-wiki/rules/ux-fitts-hit-area.md +0 -32
- package/dist/resources/skills/userinterface-wiki/rules/ux-fitts-target-size.md +0 -31
- package/dist/resources/skills/userinterface-wiki/rules/ux-goal-gradient-progress.md +0 -33
- package/dist/resources/skills/userinterface-wiki/rules/ux-hicks-minimize-choices.md +0 -45
- package/dist/resources/skills/userinterface-wiki/rules/ux-jakobs-familiar-patterns.md +0 -37
- package/dist/resources/skills/userinterface-wiki/rules/ux-millers-chunking.md +0 -23
- package/dist/resources/skills/userinterface-wiki/rules/ux-pareto-prioritize-features.md +0 -36
- package/dist/resources/skills/userinterface-wiki/rules/ux-peak-end-finish-strong.md +0 -35
- package/dist/resources/skills/userinterface-wiki/rules/ux-postels-accept-messy-input.md +0 -45
- package/dist/resources/skills/userinterface-wiki/rules/ux-pragnanz-simplify.md +0 -33
- package/dist/resources/skills/userinterface-wiki/rules/ux-progressive-disclosure.md +0 -41
- package/dist/resources/skills/userinterface-wiki/rules/ux-proximity-grouping.md +0 -38
- package/dist/resources/skills/userinterface-wiki/rules/ux-serial-position.md +0 -31
- package/dist/resources/skills/userinterface-wiki/rules/ux-similarity-consistency.md +0 -35
- package/dist/resources/skills/userinterface-wiki/rules/ux-teslers-complexity.md +0 -28
- package/dist/resources/skills/userinterface-wiki/rules/ux-uniform-connectedness.md +0 -43
- package/dist/resources/skills/userinterface-wiki/rules/ux-von-restorff-emphasis.md +0 -29
- package/dist/resources/skills/userinterface-wiki/rules/ux-zeigarnik-show-incomplete.md +0 -36
- package/dist/resources/skills/userinterface-wiki/rules/visual-animate-shadow-pseudo.md +0 -49
- package/dist/resources/skills/userinterface-wiki/rules/visual-border-alpha-colors.md +0 -25
- package/dist/resources/skills/userinterface-wiki/rules/visual-button-shadow-anatomy.md +0 -49
- package/dist/resources/skills/userinterface-wiki/rules/visual-concentric-radius.md +0 -40
- package/dist/resources/skills/userinterface-wiki/rules/visual-consistent-spacing-scale.md +0 -35
- package/dist/resources/skills/userinterface-wiki/rules/visual-layered-shadows.md +0 -30
- package/dist/resources/skills/userinterface-wiki/rules/visual-no-pure-black-shadow.md +0 -25
- package/dist/resources/skills/userinterface-wiki/rules/visual-shadow-direction.md +0 -25
- package/dist/resources/skills/userinterface-wiki/rules/visual-shadow-matches-elevation.md +0 -23
- package/dist/resources/skills/userinterface-wiki/rules/weight-duration-matches-action.md +0 -29
- package/dist/resources/skills/userinterface-wiki/rules/weight-match-action.md +0 -32
- package/dist/resources/skills/web-design-guidelines/SKILL.md +0 -39
- package/dist/resources/skills/web-quality-audit/SKILL.md +0 -168
- package/dist/resources/skills/web-quality-audit/scripts/analyze.sh +0 -91
- package/src/resources/agents/javascript-pro.md +0 -280
- package/src/resources/agents/researcher.md +0 -29
- package/src/resources/agents/teams-builder.md +0 -74
- package/src/resources/agents/teams-reviewer.md +0 -113
- package/src/resources/agents/typescript-pro.md +0 -255
- package/src/resources/skills/accessibility/SKILL.md +0 -522
- package/src/resources/skills/accessibility/references/WCAG.md +0 -162
- package/src/resources/skills/core-web-vitals/SKILL.md +0 -441
- package/src/resources/skills/core-web-vitals/references/LCP.md +0 -208
- package/src/resources/skills/frontend-design/SKILL.md +0 -45
- package/src/resources/skills/make-interfaces-feel-better/SKILL.md +0 -122
- package/src/resources/skills/make-interfaces-feel-better/animations.md +0 -379
- package/src/resources/skills/make-interfaces-feel-better/performance.md +0 -88
- package/src/resources/skills/make-interfaces-feel-better/surfaces.md +0 -247
- package/src/resources/skills/make-interfaces-feel-better/typography.md +0 -123
- package/src/resources/skills/react-best-practices/README.md +0 -123
- package/src/resources/skills/react-best-practices/SKILL.md +0 -136
- package/src/resources/skills/react-best-practices/metadata.json +0 -15
- package/src/resources/skills/react-best-practices/rules/_sections.md +0 -46
- package/src/resources/skills/react-best-practices/rules/_template.md +0 -28
- package/src/resources/skills/react-best-practices/rules/advanced-event-handler-refs.md +0 -55
- package/src/resources/skills/react-best-practices/rules/advanced-init-once.md +0 -42
- package/src/resources/skills/react-best-practices/rules/advanced-use-latest.md +0 -39
- package/src/resources/skills/react-best-practices/rules/async-api-routes.md +0 -38
- package/src/resources/skills/react-best-practices/rules/async-defer-await.md +0 -80
- package/src/resources/skills/react-best-practices/rules/async-dependencies.md +0 -51
- package/src/resources/skills/react-best-practices/rules/async-parallel.md +0 -28
- package/src/resources/skills/react-best-practices/rules/async-suspense-boundaries.md +0 -99
- package/src/resources/skills/react-best-practices/rules/bundle-barrel-imports.md +0 -59
- package/src/resources/skills/react-best-practices/rules/bundle-conditional.md +0 -31
- package/src/resources/skills/react-best-practices/rules/bundle-defer-third-party.md +0 -49
- package/src/resources/skills/react-best-practices/rules/bundle-dynamic-imports.md +0 -35
- package/src/resources/skills/react-best-practices/rules/bundle-preload.md +0 -50
- package/src/resources/skills/react-best-practices/rules/client-event-listeners.md +0 -74
- package/src/resources/skills/react-best-practices/rules/client-localstorage-schema.md +0 -71
- package/src/resources/skills/react-best-practices/rules/client-passive-event-listeners.md +0 -48
- package/src/resources/skills/react-best-practices/rules/client-swr-dedup.md +0 -56
- package/src/resources/skills/react-best-practices/rules/js-batch-dom-css.md +0 -107
- package/src/resources/skills/react-best-practices/rules/js-cache-function-results.md +0 -80
- package/src/resources/skills/react-best-practices/rules/js-cache-property-access.md +0 -28
- package/src/resources/skills/react-best-practices/rules/js-cache-storage.md +0 -70
- package/src/resources/skills/react-best-practices/rules/js-combine-iterations.md +0 -32
- package/src/resources/skills/react-best-practices/rules/js-early-exit.md +0 -50
- package/src/resources/skills/react-best-practices/rules/js-hoist-regexp.md +0 -45
- package/src/resources/skills/react-best-practices/rules/js-index-maps.md +0 -37
- package/src/resources/skills/react-best-practices/rules/js-length-check-first.md +0 -49
- package/src/resources/skills/react-best-practices/rules/js-min-max-loop.md +0 -82
- package/src/resources/skills/react-best-practices/rules/js-set-map-lookups.md +0 -24
- package/src/resources/skills/react-best-practices/rules/js-tosorted-immutable.md +0 -57
- package/src/resources/skills/react-best-practices/rules/rendering-activity.md +0 -26
- package/src/resources/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +0 -47
- package/src/resources/skills/react-best-practices/rules/rendering-conditional-render.md +0 -40
- package/src/resources/skills/react-best-practices/rules/rendering-content-visibility.md +0 -38
- package/src/resources/skills/react-best-practices/rules/rendering-hoist-jsx.md +0 -46
- package/src/resources/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +0 -82
- package/src/resources/skills/react-best-practices/rules/rendering-hydration-suppress-warning.md +0 -30
- package/src/resources/skills/react-best-practices/rules/rendering-svg-precision.md +0 -28
- package/src/resources/skills/react-best-practices/rules/rendering-usetransition-loading.md +0 -75
- package/src/resources/skills/react-best-practices/rules/rerender-defer-reads.md +0 -39
- package/src/resources/skills/react-best-practices/rules/rerender-dependencies.md +0 -45
- package/src/resources/skills/react-best-practices/rules/rerender-derived-state-no-effect.md +0 -40
- package/src/resources/skills/react-best-practices/rules/rerender-derived-state.md +0 -29
- package/src/resources/skills/react-best-practices/rules/rerender-functional-setstate.md +0 -74
- package/src/resources/skills/react-best-practices/rules/rerender-lazy-state-init.md +0 -58
- package/src/resources/skills/react-best-practices/rules/rerender-memo-with-default-value.md +0 -38
- package/src/resources/skills/react-best-practices/rules/rerender-memo.md +0 -44
- package/src/resources/skills/react-best-practices/rules/rerender-move-effect-to-event.md +0 -45
- package/src/resources/skills/react-best-practices/rules/rerender-simple-expression-in-memo.md +0 -35
- package/src/resources/skills/react-best-practices/rules/rerender-transitions.md +0 -40
- package/src/resources/skills/react-best-practices/rules/rerender-use-ref-transient-values.md +0 -73
- package/src/resources/skills/react-best-practices/rules/server-after-nonblocking.md +0 -73
- package/src/resources/skills/react-best-practices/rules/server-auth-actions.md +0 -96
- package/src/resources/skills/react-best-practices/rules/server-cache-lru.md +0 -41
- package/src/resources/skills/react-best-practices/rules/server-cache-react.md +0 -76
- package/src/resources/skills/react-best-practices/rules/server-dedup-props.md +0 -65
- package/src/resources/skills/react-best-practices/rules/server-parallel-fetching.md +0 -83
- package/src/resources/skills/react-best-practices/rules/server-serialization.md +0 -38
- package/src/resources/skills/userinterface-wiki/SKILL.md +0 -253
- package/src/resources/skills/userinterface-wiki/rules/_sections.md +0 -66
- package/src/resources/skills/userinterface-wiki/rules/_template.md +0 -24
- package/src/resources/skills/userinterface-wiki/rules/a11y-reduced-motion-check.md +0 -30
- package/src/resources/skills/userinterface-wiki/rules/a11y-toggle-setting.md +0 -30
- package/src/resources/skills/userinterface-wiki/rules/a11y-visual-equivalent.md +0 -36
- package/src/resources/skills/userinterface-wiki/rules/a11y-volume-control.md +0 -28
- package/src/resources/skills/userinterface-wiki/rules/appropriate-confirmations-only.md +0 -19
- package/src/resources/skills/userinterface-wiki/rules/appropriate-errors-warnings.md +0 -18
- package/src/resources/skills/userinterface-wiki/rules/appropriate-no-decorative.md +0 -21
- package/src/resources/skills/userinterface-wiki/rules/appropriate-no-high-frequency.md +0 -28
- package/src/resources/skills/userinterface-wiki/rules/appropriate-no-punishing.md +0 -27
- package/src/resources/skills/userinterface-wiki/rules/container-callback-ref.md +0 -31
- package/src/resources/skills/userinterface-wiki/rules/container-guard-initial-zero.md +0 -25
- package/src/resources/skills/userinterface-wiki/rules/container-no-excessive-use.md +0 -13
- package/src/resources/skills/userinterface-wiki/rules/container-overflow-hidden.md +0 -25
- package/src/resources/skills/userinterface-wiki/rules/container-transition-delay.md +0 -21
- package/src/resources/skills/userinterface-wiki/rules/container-two-div-pattern.md +0 -35
- package/src/resources/skills/userinterface-wiki/rules/container-use-resize-observer.md +0 -48
- package/src/resources/skills/userinterface-wiki/rules/context-cleanup-nodes.md +0 -25
- package/src/resources/skills/userinterface-wiki/rules/context-resume-suspended.md +0 -28
- package/src/resources/skills/userinterface-wiki/rules/context-reuse-single.md +0 -30
- package/src/resources/skills/userinterface-wiki/rules/design-filter-for-character.md +0 -25
- package/src/resources/skills/userinterface-wiki/rules/design-noise-for-percussion.md +0 -26
- package/src/resources/skills/userinterface-wiki/rules/design-oscillator-for-tonal.md +0 -22
- package/src/resources/skills/userinterface-wiki/rules/duration-max-300ms.md +0 -21
- package/src/resources/skills/userinterface-wiki/rules/duration-press-hover.md +0 -21
- package/src/resources/skills/userinterface-wiki/rules/duration-shorten-before-curve.md +0 -21
- package/src/resources/skills/userinterface-wiki/rules/duration-small-state.md +0 -15
- package/src/resources/skills/userinterface-wiki/rules/easing-entrance-ease-out.md +0 -21
- package/src/resources/skills/userinterface-wiki/rules/easing-exit-ease-in.md +0 -21
- package/src/resources/skills/userinterface-wiki/rules/easing-for-state-change.md +0 -27
- package/src/resources/skills/userinterface-wiki/rules/easing-linear-only-progress.md +0 -21
- package/src/resources/skills/userinterface-wiki/rules/easing-natural-decay.md +0 -22
- package/src/resources/skills/userinterface-wiki/rules/easing-no-linear-motion.md +0 -22
- package/src/resources/skills/userinterface-wiki/rules/easing-transition-ease-in-out.md +0 -15
- package/src/resources/skills/userinterface-wiki/rules/envelope-exponential-decay.md +0 -21
- package/src/resources/skills/userinterface-wiki/rules/envelope-no-zero-target.md +0 -21
- package/src/resources/skills/userinterface-wiki/rules/envelope-set-initial-value.md +0 -22
- package/src/resources/skills/userinterface-wiki/rules/exit-key-required.md +0 -29
- package/src/resources/skills/userinterface-wiki/rules/exit-matches-initial.md +0 -29
- package/src/resources/skills/userinterface-wiki/rules/exit-prop-required.md +0 -33
- package/src/resources/skills/userinterface-wiki/rules/exit-requires-wrapper.md +0 -27
- package/src/resources/skills/userinterface-wiki/rules/impl-default-subtle.md +0 -21
- package/src/resources/skills/userinterface-wiki/rules/impl-preload-audio.md +0 -34
- package/src/resources/skills/userinterface-wiki/rules/impl-reset-current-time.md +0 -26
- package/src/resources/skills/userinterface-wiki/rules/mode-pop-layout-for-lists.md +0 -25
- package/src/resources/skills/userinterface-wiki/rules/mode-sync-layout-conflict.md +0 -29
- package/src/resources/skills/userinterface-wiki/rules/mode-wait-doubles-duration.md +0 -25
- package/src/resources/skills/userinterface-wiki/rules/morphing-aria-hidden.md +0 -21
- package/src/resources/skills/userinterface-wiki/rules/morphing-consistent-viewbox.md +0 -23
- package/src/resources/skills/userinterface-wiki/rules/morphing-group-variants.md +0 -33
- package/src/resources/skills/userinterface-wiki/rules/morphing-jump-non-grouped.md +0 -29
- package/src/resources/skills/userinterface-wiki/rules/morphing-reduced-motion.md +0 -28
- package/src/resources/skills/userinterface-wiki/rules/morphing-spring-rotation.md +0 -23
- package/src/resources/skills/userinterface-wiki/rules/morphing-strokelinecap-round.md +0 -21
- package/src/resources/skills/userinterface-wiki/rules/morphing-three-lines.md +0 -32
- package/src/resources/skills/userinterface-wiki/rules/morphing-use-collapsed.md +0 -33
- package/src/resources/skills/userinterface-wiki/rules/native-backdrop-styling.md +0 -27
- package/src/resources/skills/userinterface-wiki/rules/native-placeholder-styling.md +0 -27
- package/src/resources/skills/userinterface-wiki/rules/native-selection-styling.md +0 -18
- package/src/resources/skills/userinterface-wiki/rules/nested-consistent-timing.md +0 -25
- package/src/resources/skills/userinterface-wiki/rules/nested-propagate-required.md +0 -41
- package/src/resources/skills/userinterface-wiki/rules/none-context-menu-entrance.md +0 -25
- package/src/resources/skills/userinterface-wiki/rules/none-high-frequency.md +0 -29
- package/src/resources/skills/userinterface-wiki/rules/none-keyboard-navigation.md +0 -32
- package/src/resources/skills/userinterface-wiki/rules/param-click-duration.md +0 -21
- package/src/resources/skills/userinterface-wiki/rules/param-filter-frequency-range.md +0 -21
- package/src/resources/skills/userinterface-wiki/rules/param-q-value-range.md +0 -21
- package/src/resources/skills/userinterface-wiki/rules/param-reasonable-gain.md +0 -21
- package/src/resources/skills/userinterface-wiki/rules/physics-active-state.md +0 -23
- package/src/resources/skills/userinterface-wiki/rules/physics-no-excessive-stagger.md +0 -22
- package/src/resources/skills/userinterface-wiki/rules/physics-spring-for-overshoot.md +0 -23
- package/src/resources/skills/userinterface-wiki/rules/physics-subtle-deformation.md +0 -22
- package/src/resources/skills/userinterface-wiki/rules/prefetch-hit-slop.md +0 -27
- package/src/resources/skills/userinterface-wiki/rules/prefetch-keyboard-tab.md +0 -19
- package/src/resources/skills/userinterface-wiki/rules/prefetch-not-everything.md +0 -22
- package/src/resources/skills/userinterface-wiki/rules/prefetch-touch-fallback.md +0 -34
- package/src/resources/skills/userinterface-wiki/rules/prefetch-trajectory-over-hover.md +0 -32
- package/src/resources/skills/userinterface-wiki/rules/prefetch-use-selectively.md +0 -13
- package/src/resources/skills/userinterface-wiki/rules/presence-disable-interactions.md +0 -31
- package/src/resources/skills/userinterface-wiki/rules/presence-hook-in-child.md +0 -31
- package/src/resources/skills/userinterface-wiki/rules/presence-safe-to-remove.md +0 -37
- package/src/resources/skills/userinterface-wiki/rules/pseudo-content-required.md +0 -28
- package/src/resources/skills/userinterface-wiki/rules/pseudo-first-line-styling.md +0 -27
- package/src/resources/skills/userinterface-wiki/rules/pseudo-hit-target-expansion.md +0 -31
- package/src/resources/skills/userinterface-wiki/rules/pseudo-marker-styling.md +0 -28
- package/src/resources/skills/userinterface-wiki/rules/pseudo-over-dom-node.md +0 -32
- package/src/resources/skills/userinterface-wiki/rules/pseudo-position-relative-parent.md +0 -33
- package/src/resources/skills/userinterface-wiki/rules/pseudo-z-index-layering.md +0 -37
- package/src/resources/skills/userinterface-wiki/rules/spring-for-gestures.md +0 -27
- package/src/resources/skills/userinterface-wiki/rules/spring-for-interruptible.md +0 -27
- package/src/resources/skills/userinterface-wiki/rules/spring-params-balanced.md +0 -29
- package/src/resources/skills/userinterface-wiki/rules/spring-preserves-velocity.md +0 -28
- package/src/resources/skills/userinterface-wiki/rules/staging-dim-background.md +0 -22
- package/src/resources/skills/userinterface-wiki/rules/staging-one-focal-point.md +0 -24
- package/src/resources/skills/userinterface-wiki/rules/staging-z-index-hierarchy.md +0 -22
- package/src/resources/skills/userinterface-wiki/rules/timing-consistent.md +0 -24
- package/src/resources/skills/userinterface-wiki/rules/timing-no-entrance-context-menu.md +0 -22
- package/src/resources/skills/userinterface-wiki/rules/timing-under-300ms.md +0 -22
- package/src/resources/skills/userinterface-wiki/rules/transition-name-cleanup.md +0 -28
- package/src/resources/skills/userinterface-wiki/rules/transition-name-required.md +0 -27
- package/src/resources/skills/userinterface-wiki/rules/transition-name-unique.md +0 -24
- package/src/resources/skills/userinterface-wiki/rules/transition-over-js-library.md +0 -32
- package/src/resources/skills/userinterface-wiki/rules/transition-style-pseudo-elements.md +0 -24
- package/src/resources/skills/userinterface-wiki/rules/type-antialiased-on-retina.md +0 -18
- package/src/resources/skills/userinterface-wiki/rules/type-disambiguation-stylistic-set.md +0 -15
- package/src/resources/skills/userinterface-wiki/rules/type-font-display-swap.md +0 -28
- package/src/resources/skills/userinterface-wiki/rules/type-justify-with-hyphens.md +0 -24
- package/src/resources/skills/userinterface-wiki/rules/type-letter-spacing-uppercase.md +0 -28
- package/src/resources/skills/userinterface-wiki/rules/type-no-font-synthesis.md +0 -18
- package/src/resources/skills/userinterface-wiki/rules/type-oldstyle-nums-for-prose.md +0 -21
- package/src/resources/skills/userinterface-wiki/rules/type-opentype-contextual-alternates.md +0 -15
- package/src/resources/skills/userinterface-wiki/rules/type-optical-sizing-auto.md +0 -25
- package/src/resources/skills/userinterface-wiki/rules/type-proper-fractions.md +0 -15
- package/src/resources/skills/userinterface-wiki/rules/type-slashed-zero.md +0 -17
- package/src/resources/skills/userinterface-wiki/rules/type-tabular-nums-for-data.md +0 -21
- package/src/resources/skills/userinterface-wiki/rules/type-text-wrap-balance-headings.md +0 -21
- package/src/resources/skills/userinterface-wiki/rules/type-text-wrap-pretty.md +0 -16
- package/src/resources/skills/userinterface-wiki/rules/type-underline-offset.md +0 -25
- package/src/resources/skills/userinterface-wiki/rules/type-variable-weight-continuous.md +0 -23
- package/src/resources/skills/userinterface-wiki/rules/ux-aesthetic-usability.md +0 -32
- package/src/resources/skills/userinterface-wiki/rules/ux-cognitive-load-reduce.md +0 -49
- package/src/resources/skills/userinterface-wiki/rules/ux-common-region-boundaries.md +0 -50
- package/src/resources/skills/userinterface-wiki/rules/ux-doherty-perceived-speed.md +0 -29
- package/src/resources/skills/userinterface-wiki/rules/ux-doherty-under-400ms.md +0 -30
- package/src/resources/skills/userinterface-wiki/rules/ux-fitts-hit-area.md +0 -32
- package/src/resources/skills/userinterface-wiki/rules/ux-fitts-target-size.md +0 -31
- package/src/resources/skills/userinterface-wiki/rules/ux-goal-gradient-progress.md +0 -33
- package/src/resources/skills/userinterface-wiki/rules/ux-hicks-minimize-choices.md +0 -45
- package/src/resources/skills/userinterface-wiki/rules/ux-jakobs-familiar-patterns.md +0 -37
- package/src/resources/skills/userinterface-wiki/rules/ux-millers-chunking.md +0 -23
- package/src/resources/skills/userinterface-wiki/rules/ux-pareto-prioritize-features.md +0 -36
- package/src/resources/skills/userinterface-wiki/rules/ux-peak-end-finish-strong.md +0 -35
- package/src/resources/skills/userinterface-wiki/rules/ux-postels-accept-messy-input.md +0 -45
- package/src/resources/skills/userinterface-wiki/rules/ux-pragnanz-simplify.md +0 -33
- package/src/resources/skills/userinterface-wiki/rules/ux-progressive-disclosure.md +0 -41
- package/src/resources/skills/userinterface-wiki/rules/ux-proximity-grouping.md +0 -38
- package/src/resources/skills/userinterface-wiki/rules/ux-serial-position.md +0 -31
- package/src/resources/skills/userinterface-wiki/rules/ux-similarity-consistency.md +0 -35
- package/src/resources/skills/userinterface-wiki/rules/ux-teslers-complexity.md +0 -28
- package/src/resources/skills/userinterface-wiki/rules/ux-uniform-connectedness.md +0 -43
- package/src/resources/skills/userinterface-wiki/rules/ux-von-restorff-emphasis.md +0 -29
- package/src/resources/skills/userinterface-wiki/rules/ux-zeigarnik-show-incomplete.md +0 -36
- package/src/resources/skills/userinterface-wiki/rules/visual-animate-shadow-pseudo.md +0 -49
- package/src/resources/skills/userinterface-wiki/rules/visual-border-alpha-colors.md +0 -25
- package/src/resources/skills/userinterface-wiki/rules/visual-button-shadow-anatomy.md +0 -49
- package/src/resources/skills/userinterface-wiki/rules/visual-concentric-radius.md +0 -40
- package/src/resources/skills/userinterface-wiki/rules/visual-consistent-spacing-scale.md +0 -35
- package/src/resources/skills/userinterface-wiki/rules/visual-layered-shadows.md +0 -30
- package/src/resources/skills/userinterface-wiki/rules/visual-no-pure-black-shadow.md +0 -25
- package/src/resources/skills/userinterface-wiki/rules/visual-shadow-direction.md +0 -25
- package/src/resources/skills/userinterface-wiki/rules/visual-shadow-matches-elevation.md +0 -23
- package/src/resources/skills/userinterface-wiki/rules/weight-duration-matches-action.md +0 -29
- package/src/resources/skills/userinterface-wiki/rules/weight-match-action.md +0 -32
- package/src/resources/skills/web-design-guidelines/SKILL.md +0 -39
- package/src/resources/skills/web-quality-audit/SKILL.md +0 -168
- package/src/resources/skills/web-quality-audit/scripts/analyze.sh +0 -91
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAE1B,eAAe;AACf,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EACN,YAAY,EAOZ,eAAe,GAEf,MAAM,yBAAyB,CAAC;AACjC,0BAA0B;AAC1B,OAAO,EAGN,WAAW,E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cAAc,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["// Core session management\n\n// Config paths\nexport { CONFIG_DIR_NAME, getAgentDir, VERSION } from \"./config.js\";\nexport { resetStdinForTui } from \"./utils/reset-stdin.js\";\nexport {\n\tAgentSession,\n\ttype AgentSessionConfig,\n\ttype AgentSessionEvent,\n\ttype AgentSessionEventListener,\n\ttype ModelCycleResult,\n\ttype ParsedSkillBlock,\n\ttype PromptOptions,\n\tparseSkillBlock,\n\ttype SessionStats,\n} from \"./core/agent-session.js\";\n// Auth and model registry\nexport {\n\ttype ApiKeyCredential,\n\ttype AuthCredential,\n\tAuthStorage,\n\ttype AuthStorageBackend,\n\tFileAuthStorageBackend,\n\tInMemoryAuthStorageBackend,\n\ttype OAuthCredential,\n} from \"./core/auth-storage.js\";\n// Compaction\nexport {\n\ttype BranchPreparation,\n\ttype BranchSummaryResult,\n\ttype CollectEntriesResult,\n\ttype CompactionResult,\n\ttype CutPointResult,\n\tcalculateContextTokens,\n\tcollectEntriesForBranchSummary,\n\tcompact,\n\tDEFAULT_COMPACTION_SETTINGS,\n\testimateTokens,\n\ttype FileOperations,\n\tfindCutPoint,\n\tfindTurnStartIndex,\n\ttype GenerateBranchSummaryOptions,\n\tgenerateBranchSummary,\n\tgenerateSummary,\n\tgetLastAssistantUsage,\n\tprepareBranchEntries,\n\tserializeConversation,\n\tshouldCompact,\n} from \"./core/compaction/index.js\";\nexport { createEventBus, type EventBus, type EventBusController } from \"./core/event-bus.js\";\n// Extension system\nexport type {\n\tAgentEndEvent,\n\tAgentStartEvent,\n\tAgentToolResult,\n\tAgentToolUpdateCallback,\n\tAppAction,\n\tBashToolCallEvent,\n\tBeforeAgentStartEvent,\n\tBeforeProviderRequestEvent,\n\tBeforeProviderRequestEventResult,\n\tCompactOptions,\n\tContextEvent,\n\tContextUsage,\n\tCustomToolCallEvent,\n\tEditToolCallEvent,\n\tExecOptions,\n\tExecResult,\n\tExtension,\n\tExtensionActions,\n\tExtensionAPI,\n\tExtensionManifest,\n\tExtensionCommandContext,\n\tExtensionCommandContextActions,\n\tExtensionContext,\n\tExtensionContextActions,\n\tExtensionError,\n\tExtensionEvent,\n\tExtensionFactory,\n\tExtensionFlag,\n\tExtensionHandler,\n\tExtensionRuntime,\n\tExtensionShortcut,\n\tExtensionUIContext,\n\tExtensionUIDialogOptions,\n\tExtensionWidgetOptions,\n\tFindToolCallEvent,\n\tGrepToolCallEvent,\n\tInputEvent,\n\tInputEventResult,\n\tInputSource,\n\tKeybindingsManager,\n\tLoadExtensionsResult,\n\tLsToolCallEvent,\n\tMessageRenderer,\n\tMessageRenderOptions,\n\tProviderConfig,\n\tProviderModelConfig,\n\tLifecycleHookContext,\n\tLifecycleHookHandler,\n\tLifecycleHookMap,\n\tLifecycleHookPhase,\n\tLifecycleHookScope,\n\tReadToolCallEvent,\n\tRegisteredCommand,\n\tRegisteredTool,\n\tSessionBeforeCompactEvent,\n\tSessionBeforeForkEvent,\n\tSessionBeforeSwitchEvent,\n\tSessionBeforeTreeEvent,\n\tSessionCompactEvent,\n\tSessionForkEvent,\n\tSessionShutdownEvent,\n\tSessionStartEvent,\n\tSessionSwitchEvent,\n\tSessionTreeEvent,\n\tSlashCommandInfo,\n\tSlashCommandLocation,\n\tSlashCommandSource,\n\tTerminalInputHandler,\n\tToolCallEvent,\n\tToolDefinition,\n\tToolInfo,\n\tSortResult,\n\tSortWarning,\n\tToolRenderResultOptions,\n\tToolResultEvent,\n\tTurnEndEvent,\n\tTurnStartEvent,\n\tUserBashEvent,\n\tUserBashEventResult,\n\tBashTransformEvent,\n\tBashTransformEventResult,\n\tWidgetPlacement,\n\tWriteToolCallEvent,\n} from \"./core/extensions/index.js\";\nexport {\n\tcreateExtensionRuntime,\n\tdiscoverAndLoadExtensions,\n\tExtensionRunner,\n\timportExtensionModule,\n\tisToolCallEventType,\n\tisToolResultEventType,\n\treadManifest,\n\treadManifestFromEntryPath,\n\tsortExtensionPaths,\n\twrapRegisteredTool,\n\twrapRegisteredTools,\n\twrapToolsWithExtensions,\n\twrapToolWithExtensions,\n} from \"./core/extensions/index.js\";\n// Footer data provider (git branch + extension statuses - data not otherwise available to extensions)\nexport type { ReadonlyFooterDataProvider } from \"./core/footer-data-provider.js\";\nexport { convertToLlm } from \"./core/messages.js\";\nexport { ModelDiscoveryCache } from \"./core/discovery-cache.js\";\nexport type { DiscoveredModel, DiscoveryResult, ProviderDiscoveryAdapter } from \"./core/model-discovery.js\";\nexport { getDiscoverableProviders, getDiscoveryAdapter } from \"./core/model-discovery.js\";\nexport { ModelRegistry } from \"./core/model-registry.js\";\nexport { ModelsJsonWriter } from \"./core/models-json-writer.js\";\nexport type {\n\tPackageManager,\n\tPathMetadata,\n\tProgressCallback,\n\tProgressEvent,\n\tResolvedPaths,\n\tResolvedResource,\n} from \"./core/package-manager.js\";\nexport { DefaultPackageManager } from \"./core/package-manager.js\";\nexport type { PackageCommand, PackageCommandOptions, PackageCommandRunnerOptions, PackageCommandRunnerResult } from \"./core/package-commands.js\";\nexport { getPackageCommandUsage, parsePackageCommand, runPackageCommand } from \"./core/package-commands.js\";\nexport type { ResourceCollision, ResourceDiagnostic, ResourceLoader } from \"./core/resource-loader.js\";\nexport { DefaultResourceLoader } from \"./core/resource-loader.js\";\n// SDK for programmatic usage\nexport {\n\ttype CreateAgentSessionOptions,\n\ttype CreateAgentSessionResult,\n\t// Factory\n\tcreateAgentSession,\n\tcreateBashTool,\n\t// Tool factories (for custom cwd)\n\tcreateCodingTools,\n\tcreateEditTool,\n\tcreateFindTool,\n\tcreateGrepTool,\n\tcreateLsTool,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateWriteTool,\n\ttype PromptTemplate,\n\t// Pre-built tools (use process.cwd())\n\treadOnlyTools,\n} from \"./core/sdk.js\";\nexport {\n\ttype BranchSummaryEntry,\n\tbuildSessionContext,\n\ttype CompactionEntry,\n\tCURRENT_SESSION_VERSION,\n\ttype CustomEntry,\n\ttype CustomMessageEntry,\n\ttype FileEntry,\n\tgetLatestCompactionEntry,\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 ThinkingLevelChangeEntry,\n} from \"./core/session-manager.js\";\n// Blob and artifact storage\nexport { BlobStore, isBlobRef, parseBlobRef, externalizeImageData, resolveImageData } from \"./core/blob-store.js\";\nexport { ArtifactManager } from \"./core/artifact-manager.js\";\nexport {\n\tSandboxManager,\n\ttype SandboxCommandOptions,\n\ttype SandboxConfig,\n\ttype SandboxExecutionPlan,\n\ttype SandboxPolicy,\n\tpermissionModeToSandboxPolicy,\n} from \"./core/sandbox/index.js\";\nexport {\n\ttype AsyncSettings,\n\ttype CompactionSettings,\n\ttype ImageSettings,\n\ttype MemorySettings,\n\ttype PackageSource,\n\ttype RetrySettings,\n\ttype SandboxSettings,\n\tSettingsManager,\n\ttype TaskIsolationSettings,\n} from \"./core/settings-manager.js\";\n// Skills\nexport {\n\tECOSYSTEM_SKILLS_DIR,\n\tECOSYSTEM_PROJECT_SKILLS_DIR,\n\tformatSkillsForPrompt,\n\tgetLoadedSkills,\n\ttype LoadSkillsFromDirOptions,\n\ttype LoadSkillsResult,\n\tloadSkills,\n\tloadSkillsFromDir,\n\ttype Skill,\n\ttype SkillFrontmatter,\n} from \"./core/skills.js\";\n// Tools\nexport {\n\ttype BashInterceptorRule,\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\tbashTool,\n\trewriteBackgroundCommand,\n\tcheckBashInterception,\n\ttype CompiledInterceptor,\n\tcompileInterceptor,\n\tDEFAULT_BASH_INTERCEPTOR_RULES,\n\tcodingTools,\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\ttype EditOperations,\n\ttype EditToolDetails,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n\teditTool,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n\tfindTool,\n\tformatSize,\n\ttype GrepOperations,\n\ttype GrepToolDetails,\n\ttype GrepToolInput,\n\ttype GrepToolOptions,\n\tgrepTool,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n\tlsTool,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n\treadTool,\n\ttype ToolsOptions,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n\ttype WriteOperations,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n\twriteTool,\n\t// Hashline edit mode tools\n\thashlineEditTool,\n\thashlineReadTool,\n\thashlineCodingTools,\n\tcreateHashlineEditTool,\n\tcreateHashlineReadTool,\n\tcreateHashlineCodingTools,\n\ttype HashlineEditInput,\n\ttype HashlineEditToolDetails,\n\ttype HashlineEditToolOptions,\n\ttype HashlineReadToolDetails,\n\ttype HashlineReadToolInput,\n\ttype HashlineReadToolOptions,\n} from \"./core/tools/index.js\";\n// Main entry point\nexport { main } from \"./main.js\";\n// Run modes for programmatic SDK usage\nexport {\n\tInteractiveMode,\n\ttype InteractiveModeOptions,\n\ttype PrintModeOptions,\n\trunPrintMode,\n\trunRpcMode,\n\ttype ModelInfo,\n\tRpcClient,\n\ttype RpcClientOptions,\n\ttype RpcEventListener,\n\ttype RpcCommand,\n\ttype RpcInitResult,\n\ttype RpcProtocolVersion,\n\ttype RpcResponse,\n\ttype RpcSessionState,\n\ttype RpcV2Event,\n} from \"./modes/index.js\";\n// RPC JSONL utilities\nexport { attachJsonlLineReader, serializeJsonLine } from \"./modes/rpc/jsonl.js\";\nexport {\n\ttype FileChangeApprovalRequest,\n\ttype NetworkApprovalDecision,\n\ttype PermissionMode,\n\tgetPermissionMode,\n\tgetFileChangeApprovalHandler,\n\tgetClassifierHandler,\n\tregisterStdioApprovalHandler,\n\tregisterStdioClassifierHandler,\n\tregisterStdioNetworkApprovalHandler,\n\tresolveApprovalResponse,\n\tresolveClassifierResponse,\n\tresolveNetworkApprovalResponse,\n\trequestFileChangeApproval,\n\trequestNetworkApproval,\n\trequestClassifierDecision,\n\tsetFileChangeApprovalHandler,\n\tsetNetworkApprovalHandler,\n\tsetPermissionMode,\n\tsetSubagentApprovalRouter,\n\tsetSubagentClassifierRouter,\n} from \"./core/tool-approval.js\";\n// UI components for extensions\nexport {\n\tArminComponent,\n\tAssistantMessageComponent,\n\tappKey,\n\tappKeyHint,\n\tBashExecutionComponent,\n\tBorderedLoader,\n\tBranchSummaryMessageComponent,\n\tCompactionSummaryMessageComponent,\n\tCustomEditor,\n\tCustomMessageComponent,\n\tDynamicBorder,\n\tExtensionEditorComponent,\n\tExtensionInputComponent,\n\tExtensionSelectorComponent,\n\teditorKey,\n\tFooterComponent,\n\tkeyHint,\n\tLoginDialogComponent,\n\tModelSelectorComponent,\n\tOAuthSelectorComponent,\n\tProviderManagerComponent,\n\ttype RenderDiffOptions,\n\trawKeyHint,\n\trenderDiff,\n\tSessionSelectorComponent,\n\ttype SettingsCallbacks,\n\ttype SettingsConfig,\n\tSettingsSelectorComponent,\n\tShowImagesSelectorComponent,\n\tSkillInvocationMessageComponent,\n\tThemeSelectorComponent,\n\tThinkingSelectorComponent,\n\tToolExecutionComponent,\n\ttype ToolExecutionOptions,\n\tTreeSelectorComponent,\n\ttruncateToVisualLines,\n\tUserMessageComponent,\n\tUserMessageSelectorComponent,\n\ttype VisualTruncateResult,\n} from \"./modes/interactive/components/index.js\";\n// Theme utilities for custom tools and extensions\nexport {\n\tgetLanguageFromPath,\n\tgetMarkdownTheme,\n\tgetResolvedThemeColors,\n\tgetSelectListTheme,\n\tgetSettingsListTheme,\n\thighlightCode,\n\tinitTheme,\n\tTheme,\n\ttype ThemeColor,\n} from \"./modes/interactive/theme/theme.js\";\n// Clipboard utilities\nexport { copyToClipboard } from \"./utils/clipboard.js\";\nexport { parseFrontmatter, stripFrontmatter } from \"./utils/frontmatter.js\";\n// Shell utilities\nexport { getShellConfig, sanitizeCommand } from \"./utils/shell.js\";\n// Cross-platform path display\nexport { toPosixPath } from \"./utils/path-display.js\";\n// LSP config utilities\nexport { hasRootMarkers, resolveCommand, which } from \"./core/lsp/config.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAE1B,eAAe;AACf,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EACN,YAAY,EAOZ,eAAe,GAEf,MAAM,yBAAyB,CAAC;AACjC,0BAA0B;AAC1B,OAAO,EAGN,WAAW,EAEX,sBAAsB,EACtB,0BAA0B,GAE1B,MAAM,wBAAwB,CAAC;AAChC,aAAa;AACb,OAAO,EAMN,sBAAsB,EACtB,8BAA8B,EAC9B,OAAO,EACP,2BAA2B,EAC3B,cAAc,EAEd,YAAY,EACZ,kBAAkB,EAElB,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,aAAa,GACb,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAA0C,MAAM,qBAAqB,CAAC;AAuF7F,OAAO,EACN,sBAAsB,EACtB,yBAAyB,EACzB,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,YAAY,EACZ,yBAAyB,EACzB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,GACtB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,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B,UAAU,EACV,UAAU,EACV,wBAAwB,EAGxB,yBAAyB,EACzB,2BAA2B,EAC3B,+BAA+B,EAC/B,sBAAsB,EACtB,yBAAyB,EACzB,sBAAsB,EAEtB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,4BAA4B,GAE5B,MAAM,yCAAyC,CAAC;AACjD,kDAAkD;AAClD,OAAO,EACN,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,EACb,SAAS,EACT,KAAK,GAEL,MAAM,oCAAoC,CAAC;AAC5C,sBAAsB;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,kBAAkB;AAClB,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnE,8BAA8B;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,uBAAuB;AACvB,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["// Core session management\n\n// Config paths\nexport { CONFIG_DIR_NAME, getAgentDir, VERSION } from \"./config.js\";\nexport { resetStdinForTui } from \"./utils/reset-stdin.js\";\nexport {\n\tAgentSession,\n\ttype AgentSessionConfig,\n\ttype AgentSessionEvent,\n\ttype AgentSessionEventListener,\n\ttype ModelCycleResult,\n\ttype ParsedSkillBlock,\n\ttype PromptOptions,\n\tparseSkillBlock,\n\ttype SessionStats,\n} from \"./core/agent-session.js\";\n// Auth and model registry\nexport {\n\ttype ApiKeyCredential,\n\ttype AuthCredential,\n\tAuthStorage,\n\ttype AuthStorageBackend,\n\tFileAuthStorageBackend,\n\tInMemoryAuthStorageBackend,\n\ttype OAuthCredential,\n} from \"./core/auth-storage.js\";\n// Compaction\nexport {\n\ttype BranchPreparation,\n\ttype BranchSummaryResult,\n\ttype CollectEntriesResult,\n\ttype CompactionResult,\n\ttype CutPointResult,\n\tcalculateContextTokens,\n\tcollectEntriesForBranchSummary,\n\tcompact,\n\tDEFAULT_COMPACTION_SETTINGS,\n\testimateTokens,\n\ttype FileOperations,\n\tfindCutPoint,\n\tfindTurnStartIndex,\n\ttype GenerateBranchSummaryOptions,\n\tgenerateBranchSummary,\n\tgenerateSummary,\n\tgetLastAssistantUsage,\n\tprepareBranchEntries,\n\tserializeConversation,\n\tshouldCompact,\n} from \"./core/compaction/index.js\";\nexport { createEventBus, type EventBus, type EventBusController } from \"./core/event-bus.js\";\n// Extension system\nexport type {\n\tAgentEndEvent,\n\tAgentStartEvent,\n\tAgentToolResult,\n\tAgentToolUpdateCallback,\n\tAppAction,\n\tBashToolCallEvent,\n\tBeforeAgentStartEvent,\n\tBeforeProviderRequestEvent,\n\tBeforeProviderRequestEventResult,\n\tCompactOptions,\n\tContextEvent,\n\tContextUsage,\n\tCustomToolCallEvent,\n\tEditToolCallEvent,\n\tExecOptions,\n\tExecResult,\n\tExtension,\n\tExtensionActions,\n\tExtensionAPI,\n\tExtensionManifest,\n\tExtensionCommandContext,\n\tExtensionCommandContextActions,\n\tExtensionContext,\n\tExtensionContextActions,\n\tExtensionError,\n\tExtensionEvent,\n\tExtensionFactory,\n\tExtensionFlag,\n\tExtensionHandler,\n\tExtensionRuntime,\n\tExtensionShortcut,\n\tExtensionUIContext,\n\tExtensionUIDialogOptions,\n\tExtensionWidgetOptions,\n\tFindToolCallEvent,\n\tGrepToolCallEvent,\n\tInputEvent,\n\tInputEventResult,\n\tInputSource,\n\tKeybindingsManager,\n\tLoadExtensionsResult,\n\tLsToolCallEvent,\n\tMessageRenderer,\n\tMessageRenderOptions,\n\tProviderConfig,\n\tProviderModelConfig,\n\tLifecycleHookContext,\n\tLifecycleHookHandler,\n\tLifecycleHookMap,\n\tLifecycleHookPhase,\n\tLifecycleHookScope,\n\tReadToolCallEvent,\n\tRegisteredCommand,\n\tRegisteredTool,\n\tSessionBeforeCompactEvent,\n\tSessionBeforeForkEvent,\n\tSessionBeforeSwitchEvent,\n\tSessionBeforeTreeEvent,\n\tSessionCompactEvent,\n\tSessionForkEvent,\n\tSessionShutdownEvent,\n\tSessionStartEvent,\n\tSessionSwitchEvent,\n\tSessionTreeEvent,\n\tSlashCommandInfo,\n\tSlashCommandLocation,\n\tSlashCommandSource,\n\tTerminalInputHandler,\n\tToolCallEvent,\n\tToolDefinition,\n\tToolInfo,\n\tSortResult,\n\tSortWarning,\n\tToolRenderResultOptions,\n\tToolResultEvent,\n\tTurnEndEvent,\n\tTurnStartEvent,\n\tUserBashEvent,\n\tUserBashEventResult,\n\tBashTransformEvent,\n\tBashTransformEventResult,\n\tWidgetPlacement,\n\tWriteToolCallEvent,\n} from \"./core/extensions/index.js\";\nexport {\n\tcreateExtensionRuntime,\n\tdiscoverAndLoadExtensions,\n\tExtensionRunner,\n\timportExtensionModule,\n\tisToolCallEventType,\n\tisToolResultEventType,\n\treadManifest,\n\treadManifestFromEntryPath,\n\tsortExtensionPaths,\n\twrapRegisteredTool,\n\twrapRegisteredTools,\n\twrapToolsWithExtensions,\n\twrapToolWithExtensions,\n} from \"./core/extensions/index.js\";\n// Footer data provider (git branch + extension statuses - data not otherwise available to extensions)\nexport type { ReadonlyFooterDataProvider } from \"./core/footer-data-provider.js\";\nexport { convertToLlm } from \"./core/messages.js\";\nexport { ModelDiscoveryCache } from \"./core/discovery-cache.js\";\nexport type { DiscoveredModel, DiscoveryResult, ProviderDiscoveryAdapter } from \"./core/model-discovery.js\";\nexport { getDiscoverableProviders, getDiscoveryAdapter } from \"./core/model-discovery.js\";\nexport { ModelRegistry } from \"./core/model-registry.js\";\nexport { ModelsJsonWriter } from \"./core/models-json-writer.js\";\nexport type {\n\tPackageManager,\n\tPathMetadata,\n\tProgressCallback,\n\tProgressEvent,\n\tResolvedPaths,\n\tResolvedResource,\n} from \"./core/package-manager.js\";\nexport { DefaultPackageManager } from \"./core/package-manager.js\";\nexport type { PackageCommand, PackageCommandOptions, PackageCommandRunnerOptions, PackageCommandRunnerResult } from \"./core/package-commands.js\";\nexport { getPackageCommandUsage, parsePackageCommand, runPackageCommand } from \"./core/package-commands.js\";\nexport type { ResourceCollision, ResourceDiagnostic, ResourceLoader } from \"./core/resource-loader.js\";\nexport { DefaultResourceLoader } from \"./core/resource-loader.js\";\n// SDK for programmatic usage\nexport {\n\ttype CreateAgentSessionOptions,\n\ttype CreateAgentSessionResult,\n\t// Factory\n\tcreateAgentSession,\n\tcreateBashTool,\n\t// Tool factories (for custom cwd)\n\tcreateCodingTools,\n\tcreateEditTool,\n\tcreateFindTool,\n\tcreateGrepTool,\n\tcreateLsTool,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateWriteTool,\n\ttype PromptTemplate,\n\t// Pre-built tools (use process.cwd())\n\treadOnlyTools,\n\tallBuiltInTools,\n} from \"./core/sdk.js\";\nexport {\n\ttype BranchSummaryEntry,\n\tbuildSessionContext,\n\ttype CompactionEntry,\n\tCURRENT_SESSION_VERSION,\n\ttype CustomEntry,\n\ttype CustomMessageEntry,\n\ttype FileEntry,\n\tgetLatestCompactionEntry,\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 ThinkingLevelChangeEntry,\n} from \"./core/session-manager.js\";\n// Blob and artifact storage\nexport { BlobStore, isBlobRef, parseBlobRef, externalizeImageData, resolveImageData } from \"./core/blob-store.js\";\nexport { ArtifactManager } from \"./core/artifact-manager.js\";\nexport {\n\tSandboxManager,\n\ttype SandboxCommandOptions,\n\ttype SandboxConfig,\n\ttype SandboxExecutionPlan,\n\ttype SandboxPolicy,\n\tpermissionModeToSandboxPolicy,\n} from \"./core/sandbox/index.js\";\nexport {\n\ttype AsyncSettings,\n\ttype CompactionSettings,\n\ttype ImageSettings,\n\ttype MemorySettings,\n\ttype PackageSource,\n\ttype RetrySettings,\n\ttype SandboxSettings,\n\tSettingsManager,\n\ttype TaskIsolationSettings,\n} from \"./core/settings-manager.js\";\n// Skills\nexport {\n\tECOSYSTEM_SKILLS_DIR,\n\tECOSYSTEM_PROJECT_SKILLS_DIR,\n\tformatSkillsForPrompt,\n\tgetLoadedSkills,\n\ttype LoadSkillsFromDirOptions,\n\ttype LoadSkillsResult,\n\tloadSkills,\n\tloadSkillsFromDir,\n\ttype Skill,\n\ttype SkillFrontmatter,\n} from \"./core/skills.js\";\n// Tools\nexport {\n\ttype BashInterceptorRule,\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\tbashTool,\n\trewriteBackgroundCommand,\n\tcheckBashInterception,\n\ttype CompiledInterceptor,\n\tcompileInterceptor,\n\tDEFAULT_BASH_INTERCEPTOR_RULES,\n\tcodingTools,\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\ttype EditOperations,\n\ttype EditToolDetails,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n\teditTool,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n\tfindTool,\n\tformatSize,\n\ttype GrepOperations,\n\ttype GrepToolDetails,\n\ttype GrepToolInput,\n\ttype GrepToolOptions,\n\tgrepTool,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n\tlsTool,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n\treadTool,\n\ttype ToolsOptions,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n\ttype WriteOperations,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n\twriteTool,\n\t// Hashline edit mode tools\n\thashlineEditTool,\n\thashlineReadTool,\n\thashlineCodingTools,\n\tcreateHashlineEditTool,\n\tcreateHashlineReadTool,\n\tcreateHashlineCodingTools,\n\ttype HashlineEditInput,\n\ttype HashlineEditToolDetails,\n\ttype HashlineEditToolOptions,\n\ttype HashlineReadToolDetails,\n\ttype HashlineReadToolInput,\n\ttype HashlineReadToolOptions,\n} from \"./core/tools/index.js\";\n// Main entry point\nexport { main } from \"./main.js\";\n// Run modes for programmatic SDK usage\nexport {\n\tInteractiveMode,\n\ttype InteractiveModeOptions,\n\ttype PrintModeOptions,\n\trunPrintMode,\n\trunRpcMode,\n\ttype ModelInfo,\n\tRpcClient,\n\ttype RpcClientOptions,\n\ttype RpcEventListener,\n\ttype RpcCommand,\n\ttype RpcInitResult,\n\ttype RpcProtocolVersion,\n\ttype RpcResponse,\n\ttype RpcSessionState,\n\ttype RpcV2Event,\n} from \"./modes/index.js\";\n// RPC JSONL utilities\nexport { attachJsonlLineReader, serializeJsonLine } from \"./modes/rpc/jsonl.js\";\nexport {\n\ttype FileChangeApprovalRequest,\n\ttype NetworkApprovalDecision,\n\ttype PermissionMode,\n\tgetPermissionMode,\n\tgetFileChangeApprovalHandler,\n\tgetClassifierHandler,\n\tregisterStdioApprovalHandler,\n\tregisterStdioClassifierHandler,\n\tregisterStdioNetworkApprovalHandler,\n\tresolveApprovalResponse,\n\tresolveClassifierResponse,\n\tresolveNetworkApprovalResponse,\n\trequestFileChangeApproval,\n\trequestNetworkApproval,\n\trequestClassifierDecision,\n\tsetFileChangeApprovalHandler,\n\tsetNetworkApprovalHandler,\n\tsetPermissionMode,\n\tsetSubagentApprovalRouter,\n\tsetSubagentClassifierRouter,\n} from \"./core/tool-approval.js\";\n// UI components for extensions\nexport {\n\tArminComponent,\n\tAssistantMessageComponent,\n\tappKey,\n\tappKeyHint,\n\tBashExecutionComponent,\n\tBorderedLoader,\n\tBranchSummaryMessageComponent,\n\tCompactionSummaryMessageComponent,\n\tCustomEditor,\n\tCustomMessageComponent,\n\tDynamicBorder,\n\tExtensionEditorComponent,\n\tExtensionInputComponent,\n\tExtensionSelectorComponent,\n\teditorKey,\n\tFooterComponent,\n\tkeyHint,\n\tLoginDialogComponent,\n\tModelSelectorComponent,\n\tOAuthSelectorComponent,\n\tProviderManagerComponent,\n\ttype RenderDiffOptions,\n\trawKeyHint,\n\trenderDiff,\n\tSessionSelectorComponent,\n\ttype SettingsCallbacks,\n\ttype SettingsConfig,\n\tSettingsSelectorComponent,\n\tShowImagesSelectorComponent,\n\tSkillInvocationMessageComponent,\n\tThemeSelectorComponent,\n\tThinkingSelectorComponent,\n\tToolExecutionComponent,\n\ttype ToolExecutionOptions,\n\tTreeSelectorComponent,\n\ttruncateToVisualLines,\n\tUserMessageComponent,\n\tUserMessageSelectorComponent,\n\ttype VisualTruncateResult,\n} from \"./modes/interactive/components/index.js\";\n// Theme utilities for custom tools and extensions\nexport {\n\tgetLanguageFromPath,\n\tgetMarkdownTheme,\n\tgetResolvedThemeColors,\n\tgetSelectListTheme,\n\tgetSettingsListTheme,\n\thighlightCode,\n\tinitTheme,\n\tTheme,\n\ttype ThemeColor,\n} from \"./modes/interactive/theme/theme.js\";\n// Clipboard utilities\nexport { copyToClipboard } from \"./utils/clipboard.js\";\nexport { parseFrontmatter, stripFrontmatter } from \"./utils/frontmatter.js\";\n// Shell utilities\nexport { getShellConfig, sanitizeCommand } from \"./utils/shell.js\";\n// Cross-platform path display\nexport { toPosixPath } from \"./utils/path-display.js\";\n// LSP config utilities\nexport { hasRootMarkers, resolveCommand, which } from \"./core/lsp/config.js\";\n"]}
|
|
@@ -41,6 +41,19 @@ test("buildSystemPrompt: Unix paths pass through unchanged", () => {
|
|
|
41
41
|
});
|
|
42
42
|
assert.ok(prompt.includes("/home/user/project"));
|
|
43
43
|
});
|
|
44
|
+
test("buildSystemPrompt: encourages scout-first reconnaissance when subagent is available", () => {
|
|
45
|
+
const prompt = buildSystemPrompt({
|
|
46
|
+
cwd: "/home/user/project",
|
|
47
|
+
selectedTools: ["read", "lsp", "subagent", "edit", "write"],
|
|
48
|
+
});
|
|
49
|
+
assert.match(prompt, /delegate reconnaissance to the scout subagent/i);
|
|
50
|
+
assert.match(prompt, /0 scouts for narrow known-file work, 1 scout for one broad unfamiliar subsystem/i);
|
|
51
|
+
assert.match(prompt, /For one scout use \{ agent, task \}/i);
|
|
52
|
+
assert.match(prompt, /Scout is for mapping and reconnaissance only/i);
|
|
53
|
+
assert.match(prompt, /multiple scout subagents in parallel/i);
|
|
54
|
+
assert.match(prompt, /broad review or audit requests, use scout only as a prep step/i);
|
|
55
|
+
assert.match(prompt, /Skip scout only when the task is clearly narrow/i);
|
|
56
|
+
});
|
|
44
57
|
// ─── Regression: no backslash paths in LLM-visible text ────────────────────
|
|
45
58
|
/**
|
|
46
59
|
* Pattern that matches Windows-style absolute paths with backslashes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path-display.test.js","sourceRoot":"","sources":["../../src/tests/path-display.test.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,+EAA+E;AAE/E,IAAI,CAAC,kEAAkE,EAAE,GAAG,EAAE;IAC7E,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,0BAA0B,CAAC,EAAE,uBAAuB,CAAC,CAAC;AAChF,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,uCAAuC,EAAE,GAAG,EAAE;IAClD,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,6BAA6B,CAAC,EAAE,2BAA2B,CAAC,CAAC;AACvF,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,mCAAmC,EAAE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B,CAAC;AAE/C,IAAI,CAAC,yEAAyE,EAAE,GAAG,EAAE;IACpF,8BAA8B;IAC9B,MAAM,MAAM,GAAG,iBAAiB,CAAC;QAChC,GAAG,EAAE,6CAA6C;KAClD,CAAC,CAAC;IACH,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACxE,MAAM,CAAC,KAAK,CACX,UAAU,CAAC,MAAM,EAAE,CAAC,EACpB,oDAAoD,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC3E,CAAC;AACH,CAAC,CAAC,CAAC","sourcesContent":["/**\n * Cross-platform path display tests.\n *\n * Verifies that toPosixPath correctly normalizes Windows paths and that\n * the system prompt builder produces forward-slash paths for LLM consumption.\n */\n\nimport test from \"node:test\";\nimport assert from \"node:assert/strict\";\nimport { toPosixPath } from \"../utils/path-display.js\";\nimport { buildSystemPrompt } from \"../core/system-prompt.js\";\n\n// ─── toPosixPath ────────────────────────────────────────────────────────────\n\ntest(\"toPosixPath: converts Windows backslash paths to forward slashes\", () => {\n\tassert.equal(toPosixPath(\"C:\\\\Users\\\\name\\\\project\"), \"C:/Users/name/project\");\n});\n\ntest(\"toPosixPath: handles mixed separators\", () => {\n\tassert.equal(toPosixPath(\"C:\\\\Users/name\\\\project/src\"), \"C:/Users/name/project/src\");\n});\n\ntest(\"toPosixPath: no-op for Unix paths\", () => {\n\tassert.equal(toPosixPath(\"/home/user/project\"), \"/home/user/project\");\n});\n\ntest(\"toPosixPath: handles empty string\", () => {\n\tassert.equal(toPosixPath(\"\"), \"\");\n});\n\ntest(\"toPosixPath: handles Windows UNC paths\", () => {\n\tassert.equal(toPosixPath(\"\\\\\\\\server\\\\share\\\\dir\"), \"//server/share/dir\");\n});\n\ntest(\"toPosixPath: handles .gsd/worktrees path on Windows\", () => {\n\tassert.equal(\n\t\ttoPosixPath(\"C:\\\\Users\\\\name\\\\project\\\\.gsd\\\\worktrees\\\\M001\"),\n\t\t\"C:/Users/name/project/.gsd/worktrees/M001\",\n\t);\n});\n\n// ─── System prompt path normalization ───────────────────────────────────────\n\ntest(\"buildSystemPrompt: cwd uses forward slashes even with Windows input\", () => {\n\tconst prompt = buildSystemPrompt({\n\t\tcwd: \"C:\\\\Users\\\\name\\\\development\\\\app-name\",\n\t});\n\tassert.ok(\n\t\tprompt.includes(\"C:/Users/name/development/app-name\"),\n\t\t\"System prompt should contain forward-slash path\",\n\t);\n\tassert.ok(\n\t\t!prompt.includes(\"C:\\\\Users\\\\name\\\\development\\\\app-name\"),\n\t\t\"System prompt must NOT contain backslash path\",\n\t);\n});\n\ntest(\"buildSystemPrompt: Unix paths pass through unchanged\", () => {\n\tconst prompt = buildSystemPrompt({\n\t\tcwd: \"/home/user/project\",\n\t});\n\tassert.ok(prompt.includes(\"/home/user/project\"));\n});\n\n// ─── Regression: no backslash paths in LLM-visible text ────────────────────\n\n/**\n * Pattern that matches Windows-style absolute paths with backslashes.\n * Catches: C:\\Users\\..., D:\\Projects\\..., \\\\server\\share\\...\n * Does not match: escaped chars in regex, JSON strings, etc.\n */\nconst WINDOWS_ABS_PATH_RE = /[A-Z]:\\\\[A-Za-z]/;\n\ntest(\"buildSystemPrompt: no Windows absolute paths with backslashes in output\", () => {\n\t// Simulate a Windows-like cwd\n\tconst prompt = buildSystemPrompt({\n\t\tcwd: \"D:\\\\Projects\\\\my-app\\\\.gsd\\\\worktrees\\\\M002\",\n\t});\n\tconst lines = prompt.split(\"\\n\");\n\tconst violations = lines.filter(line => WINDOWS_ABS_PATH_RE.test(line));\n\tassert.equal(\n\t\tviolations.length, 0,\n\t\t`System prompt contains Windows backslash paths:\\n${violations.join(\"\\n\")}`,\n\t);\n});\n"]}
|
|
1
|
+
{"version":3,"file":"path-display.test.js","sourceRoot":"","sources":["../../src/tests/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BAAmB,GAAG,kBAAkB,CAAC;AAE/C,IAAI,CAAC,yEAAyE,EAAE,GAAG,EAAE;IACpF,8BAA8B;IAC9B,MAAM,MAAM,GAAG,iBAAiB,CAAC;QAChC,GAAG,EAAE,6CAA6C;KAClD,CAAC,CAAC;IACH,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACxE,MAAM,CAAC,KAAK,CACX,UAAU,CAAC,MAAM,EAAE,CAAC,EACpB,oDAAoD,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC3E,CAAC;AACH,CAAC,CAAC,CAAC","sourcesContent":["/**\n * Cross-platform path display tests.\n *\n * Verifies that toPosixPath correctly normalizes Windows paths and that\n * the system prompt builder produces forward-slash paths for LLM consumption.\n */\n\nimport test from \"node:test\";\nimport assert from \"node:assert/strict\";\nimport { toPosixPath } from \"../utils/path-display.js\";\nimport { buildSystemPrompt } from \"../core/system-prompt.js\";\n\n// ─── toPosixPath ────────────────────────────────────────────────────────────\n\ntest(\"toPosixPath: converts Windows backslash paths to forward slashes\", () => {\n\tassert.equal(toPosixPath(\"C:\\\\Users\\\\name\\\\project\"), \"C:/Users/name/project\");\n});\n\ntest(\"toPosixPath: handles mixed separators\", () => {\n\tassert.equal(toPosixPath(\"C:\\\\Users/name\\\\project/src\"), \"C:/Users/name/project/src\");\n});\n\ntest(\"toPosixPath: no-op for Unix paths\", () => {\n\tassert.equal(toPosixPath(\"/home/user/project\"), \"/home/user/project\");\n});\n\ntest(\"toPosixPath: handles empty string\", () => {\n\tassert.equal(toPosixPath(\"\"), \"\");\n});\n\ntest(\"toPosixPath: handles Windows UNC paths\", () => {\n\tassert.equal(toPosixPath(\"\\\\\\\\server\\\\share\\\\dir\"), \"//server/share/dir\");\n});\n\ntest(\"toPosixPath: handles .gsd/worktrees path on Windows\", () => {\n\tassert.equal(\n\t\ttoPosixPath(\"C:\\\\Users\\\\name\\\\project\\\\.gsd\\\\worktrees\\\\M001\"),\n\t\t\"C:/Users/name/project/.gsd/worktrees/M001\",\n\t);\n});\n\n// ─── System prompt path normalization ───────────────────────────────────────\n\ntest(\"buildSystemPrompt: cwd uses forward slashes even with Windows input\", () => {\n\tconst prompt = buildSystemPrompt({\n\t\tcwd: \"C:\\\\Users\\\\name\\\\development\\\\app-name\",\n\t});\n\tassert.ok(\n\t\tprompt.includes(\"C:/Users/name/development/app-name\"),\n\t\t\"System prompt should contain forward-slash path\",\n\t);\n\tassert.ok(\n\t\t!prompt.includes(\"C:\\\\Users\\\\name\\\\development\\\\app-name\"),\n\t\t\"System prompt must NOT contain backslash path\",\n\t);\n});\n\ntest(\"buildSystemPrompt: Unix paths pass through unchanged\", () => {\n\tconst prompt = buildSystemPrompt({\n\t\tcwd: \"/home/user/project\",\n\t});\n\tassert.ok(prompt.includes(\"/home/user/project\"));\n});\n\ntest(\"buildSystemPrompt: encourages scout-first reconnaissance when subagent is available\", () => {\n\tconst prompt = buildSystemPrompt({\n\t\tcwd: \"/home/user/project\",\n\t\tselectedTools: [\"read\", \"lsp\", \"subagent\", \"edit\", \"write\"],\n\t});\n\tassert.match(prompt, /delegate reconnaissance to the scout subagent/i);\n\tassert.match(prompt, /0 scouts for narrow known-file work, 1 scout for one broad unfamiliar subsystem/i);\n\tassert.match(prompt, /For one scout use \\{ agent, task \\}/i);\n\tassert.match(prompt, /Scout is for mapping and reconnaissance only/i);\n\tassert.match(prompt, /multiple scout subagents in parallel/i);\n\tassert.match(prompt, /broad review or audit requests, use scout only as a prep step/i);\n\tassert.match(prompt, /Skip scout only when the task is clearly narrow/i);\n});\n\n// ─── Regression: no backslash paths in LLM-visible text ────────────────────\n\n/**\n * Pattern that matches Windows-style absolute paths with backslashes.\n * Catches: C:\\Users\\..., D:\\Projects\\..., \\\\server\\share\\...\n * Does not match: escaped chars in regex, JSON strings, etc.\n */\nconst WINDOWS_ABS_PATH_RE = /[A-Z]:\\\\[A-Za-z]/;\n\ntest(\"buildSystemPrompt: no Windows absolute paths with backslashes in output\", () => {\n\t// Simulate a Windows-like cwd\n\tconst prompt = buildSystemPrompt({\n\t\tcwd: \"D:\\\\Projects\\\\my-app\\\\.gsd\\\\worktrees\\\\M002\",\n\t});\n\tconst lines = prompt.split(\"\\n\");\n\tconst violations = lines.filter(line => WINDOWS_ABS_PATH_RE.test(line));\n\tassert.equal(\n\t\tviolations.length, 0,\n\t\t`System prompt contains Windows backslash paths:\\n${violations.join(\"\\n\")}`,\n\t);\n});\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-manager-scout-policy.test.d.ts","sourceRoot":"","sources":["../../src/tests/settings-manager-scout-policy.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import test from "node:test";
|
|
2
|
+
import assert from "node:assert/strict";
|
|
3
|
+
import { SettingsManager } from "../core/settings-manager.js";
|
|
4
|
+
test("SettingsManager defaults scoutUsagePolicy to recommend", () => {
|
|
5
|
+
const settings = SettingsManager.inMemory();
|
|
6
|
+
assert.equal(settings.getScoutUsagePolicy(), "recommend");
|
|
7
|
+
});
|
|
8
|
+
test("SettingsManager persists scoutUsagePolicy values", () => {
|
|
9
|
+
const settings = SettingsManager.inMemory();
|
|
10
|
+
settings.setScoutUsagePolicy("aggressive");
|
|
11
|
+
assert.equal(settings.getScoutUsagePolicy(), "aggressive");
|
|
12
|
+
settings.setScoutUsagePolicy("off");
|
|
13
|
+
assert.equal(settings.getScoutUsagePolicy(), "off");
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=settings-manager-scout-policy.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-manager-scout-policy.test.js","sourceRoot":"","sources":["../../src/tests/settings-manager-scout-policy.test.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAExC,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,IAAI,CAAC,wDAAwD,EAAE,GAAG,EAAE;IACnE,MAAM,QAAQ,GAAG,eAAe,CAAC,QAAQ,EAAE,CAAC;IAC5C,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,mBAAmB,EAAE,EAAE,WAAW,CAAC,CAAC;AAC3D,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,kDAAkD,EAAE,GAAG,EAAE;IAC7D,MAAM,QAAQ,GAAG,eAAe,CAAC,QAAQ,EAAE,CAAC;IAE5C,QAAQ,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;IAC3C,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,mBAAmB,EAAE,EAAE,YAAY,CAAC,CAAC;IAE3D,QAAQ,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,mBAAmB,EAAE,EAAE,KAAK,CAAC,CAAC;AACrD,CAAC,CAAC,CAAC","sourcesContent":["import test from \"node:test\";\nimport assert from \"node:assert/strict\";\n\nimport { SettingsManager } from \"../core/settings-manager.js\";\n\ntest(\"SettingsManager defaults scoutUsagePolicy to recommend\", () => {\n\tconst settings = SettingsManager.inMemory();\n\tassert.equal(settings.getScoutUsagePolicy(), \"recommend\");\n});\n\ntest(\"SettingsManager persists scoutUsagePolicy values\", () => {\n\tconst settings = SettingsManager.inMemory();\n\n\tsettings.setScoutUsagePolicy(\"aggressive\");\n\tassert.equal(settings.getScoutUsagePolicy(), \"aggressive\");\n\n\tsettings.setScoutUsagePolicy(\"off\");\n\tassert.equal(settings.getScoutUsagePolicy(), \"off\");\n});\n"]}
|
|
@@ -1039,10 +1039,45 @@ export class AgentSession {
|
|
|
1039
1039
|
return this._expandSkillByName(skillName, args);
|
|
1040
1040
|
}
|
|
1041
1041
|
|
|
1042
|
+
private _isPremiumReconModel(): boolean {
|
|
1043
|
+
const model = this.model;
|
|
1044
|
+
if (!model) return false;
|
|
1045
|
+
const provider = model.provider.toLowerCase();
|
|
1046
|
+
const id = model.id.toLowerCase();
|
|
1047
|
+
return (
|
|
1048
|
+
(provider === "anthropic" && (id.includes("opus") || id.includes("sonnet"))) ||
|
|
1049
|
+
(provider === "openai" && /^gpt-5(\.|-|$)/.test(id)) ||
|
|
1050
|
+
(provider === "google" && id.includes("gemini-2.5-pro"))
|
|
1051
|
+
);
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
private _buildScoutPolicyGuidelines(toolNames: string[]): string[] {
|
|
1055
|
+
if (!toolNames.includes("subagent")) return [];
|
|
1056
|
+
|
|
1057
|
+
const guidelines = [
|
|
1058
|
+
"Recon planning policy: use 0 scouts for narrow known-file work, 1 scout for one broad unfamiliar subsystem, and 2-4 parallel scouts only when the work spans multiple loosely-coupled subsystems.",
|
|
1059
|
+
"Scout-first reconnaissance policy: when you need architecture context across multiple files or folders, do not map the subsystem by reading file-after-file yourself. Launch the scout subagent first, then continue with lsp and targeted reads.",
|
|
1060
|
+
"If your next step would be broad exploration rather than a targeted lookup, prefer scout before doing more read/find/grep sweeps yourself.",
|
|
1061
|
+
"When you choose scout, call subagent directly with valid parameters: { agent, task } for one scout, or { tasks: [{ agent, task }, ...] } for parallel scouts.",
|
|
1062
|
+
"Scout is reconnaissance-only. Do not use it as the reviewer, auditor, or final issue-ranker; use it to map files, ownership, and likely hotspots for later evaluation.",
|
|
1063
|
+
"If the work spans multiple loosely-coupled subsystems, prefer parallel scout subagents so each scout maps one area and the parent model reads the summaries instead of the raw files.",
|
|
1064
|
+
"For broad review or audit requests, use scout only as a prep step to map architecture and hotspots; the parent model or a reviewer should make the final judgments.",
|
|
1065
|
+
];
|
|
1066
|
+
|
|
1067
|
+
if (this._isPremiumReconModel()) {
|
|
1068
|
+
guidelines.push(
|
|
1069
|
+
"You are on a premium model. Spend tokens on synthesis, planning, and edits — not broad reconnaissance. Delegate exploratory reading to scout whenever the scope is not already narrow.",
|
|
1070
|
+
);
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
return guidelines;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1042
1076
|
private _rebuildSystemPrompt(toolNames: string[]): string {
|
|
1043
1077
|
const validToolNames = toolNames.filter((name) => this._toolRegistry.has(name));
|
|
1044
1078
|
const toolSnippets: Record<string, string> = {};
|
|
1045
1079
|
const promptGuidelines: string[] = [];
|
|
1080
|
+
promptGuidelines.push(...this._buildScoutPolicyGuidelines(validToolNames));
|
|
1046
1081
|
for (const name of validToolNames) {
|
|
1047
1082
|
const snippet = this._toolPromptSnippets.get(name);
|
|
1048
1083
|
if (snippet) {
|
|
@@ -1099,7 +1099,7 @@ export class SettingsManager {
|
|
|
1099
1099
|
if (profile === "balanced" || profile === "full") return profile;
|
|
1100
1100
|
// Migrate legacy minimal/toolSearch settings to balanced.
|
|
1101
1101
|
if (this.settings.toolSearch !== undefined) return "balanced";
|
|
1102
|
-
return "
|
|
1102
|
+
return "full";
|
|
1103
1103
|
}
|
|
1104
1104
|
|
|
1105
1105
|
setToolProfile(profile: "balanced" | "full"): void {
|
|
@@ -152,6 +152,8 @@ export function buildSystemPrompt(options: BuildSystemPromptOptions = {}): strin
|
|
|
152
152
|
addGuideline("Be concise. Prefer short, direct answers over preamble.");
|
|
153
153
|
addGuideline("For conceptual, product, or UX questions, answer first; inspect code only if implementation detail is needed.");
|
|
154
154
|
|
|
155
|
+
const hasSubagent = tools.includes("subagent");
|
|
156
|
+
|
|
155
157
|
if (hasLsp) {
|
|
156
158
|
addGuideline(
|
|
157
159
|
"Code navigation in typed codebases: use lsp for symbols (definition, references, implementation, hover, diagnostics, rename, format). Use grep/find/ls for text patterns, filenames, and non-code files.",
|
|
@@ -160,6 +162,30 @@ export function buildSystemPrompt(options: BuildSystemPromptOptions = {}): strin
|
|
|
160
162
|
addGuideline("Use grep/find/ls for code search and file exploration (faster than bash, respects .gitignore)");
|
|
161
163
|
}
|
|
162
164
|
|
|
165
|
+
if (hasSubagent) {
|
|
166
|
+
addGuideline(
|
|
167
|
+
"Recon planning policy: use 0 scouts for narrow known-file work, 1 scout for one broad unfamiliar subsystem, and 2-4 parallel scouts only when the work spans multiple loosely-coupled subsystems.",
|
|
168
|
+
);
|
|
169
|
+
addGuideline(
|
|
170
|
+
"For broad or unfamiliar codebase exploration, delegate reconnaissance to the scout subagent before reading many files yourself. After scout returns, use lsp and targeted reads for the narrowed file set.",
|
|
171
|
+
);
|
|
172
|
+
addGuideline(
|
|
173
|
+
"Call the subagent tool directly. For one scout use { agent, task }. For several scouts use parallel mode with { tasks: [{ agent, task }, ...] }.",
|
|
174
|
+
);
|
|
175
|
+
addGuideline(
|
|
176
|
+
"Scout is for mapping and reconnaissance only — not for final review, audit, or ranked issue lists. Use it to identify relevant files, subsystems, and likely hotspots for later evaluation.",
|
|
177
|
+
);
|
|
178
|
+
addGuideline(
|
|
179
|
+
"If reconnaissance spans multiple loosely-coupled areas, prefer multiple scout subagents in parallel, each covering one subsystem, instead of one model exploring everything itself.",
|
|
180
|
+
);
|
|
181
|
+
addGuideline(
|
|
182
|
+
"For broad review or audit requests, use scout only as a prep step to map architecture and hotspots; the parent model or a reviewer should make the final judgments.",
|
|
183
|
+
);
|
|
184
|
+
addGuideline(
|
|
185
|
+
"Skip scout only when the task is clearly narrow, the relevant file is already known, or the user explicitly asked for direct inspection of a specific file.",
|
|
186
|
+
);
|
|
187
|
+
}
|
|
188
|
+
|
|
163
189
|
if (hasRead && hasEdit) {
|
|
164
190
|
addGuideline("Read files before editing them. Never use cat or sed to inspect or modify files.");
|
|
165
191
|
}
|
|
@@ -62,6 +62,20 @@ test("buildSystemPrompt: Unix paths pass through unchanged", () => {
|
|
|
62
62
|
assert.ok(prompt.includes("/home/user/project"));
|
|
63
63
|
});
|
|
64
64
|
|
|
65
|
+
test("buildSystemPrompt: encourages scout-first reconnaissance when subagent is available", () => {
|
|
66
|
+
const prompt = buildSystemPrompt({
|
|
67
|
+
cwd: "/home/user/project",
|
|
68
|
+
selectedTools: ["read", "lsp", "subagent", "edit", "write"],
|
|
69
|
+
});
|
|
70
|
+
assert.match(prompt, /delegate reconnaissance to the scout subagent/i);
|
|
71
|
+
assert.match(prompt, /0 scouts for narrow known-file work, 1 scout for one broad unfamiliar subsystem/i);
|
|
72
|
+
assert.match(prompt, /For one scout use \{ agent, task \}/i);
|
|
73
|
+
assert.match(prompt, /Scout is for mapping and reconnaissance only/i);
|
|
74
|
+
assert.match(prompt, /multiple scout subagents in parallel/i);
|
|
75
|
+
assert.match(prompt, /broad review or audit requests, use scout only as a prep step/i);
|
|
76
|
+
assert.match(prompt, /Skip scout only when the task is clearly narrow/i);
|
|
77
|
+
});
|
|
78
|
+
|
|
65
79
|
// ─── Regression: no backslash paths in LLM-visible text ────────────────────
|
|
66
80
|
|
|
67
81
|
/**
|
package/pkg/package.json
CHANGED
|
@@ -9,6 +9,12 @@ You are a scout. Quickly investigate a codebase and return structured findings t
|
|
|
9
9
|
|
|
10
10
|
Your output will be passed to an agent who has NOT seen the files you explored.
|
|
11
11
|
|
|
12
|
+
Scope boundary:
|
|
13
|
+
- Scout is for reconnaissance and mapping only.
|
|
14
|
+
- Do **not** perform full code review, security audit, bug triage, ranking of issues, or final recommendations as if you were the reviewer.
|
|
15
|
+
- If the task asks for review/audit findings, narrow your work to reconnaissance support: identify likely hotspots, relevant files, and questions/risks for a later reviewer.
|
|
16
|
+
- Do not present "top issues" as final judgments; present them as areas worth deeper review.
|
|
17
|
+
|
|
12
18
|
Thoroughness (infer from task, default medium):
|
|
13
19
|
|
|
14
20
|
- Quick: Targeted lookups, key files only
|
|
@@ -364,7 +364,17 @@ function buildExecutionKickoffMessage(options: { permissionMode: RestorablePermi
|
|
|
364
364
|
];
|
|
365
365
|
if (task) details.push(`Original task: ${task}`);
|
|
366
366
|
if (state.latestPlanPath) details.push(`Primary plan artifact: ${state.latestPlanPath}`);
|
|
367
|
-
details.push(
|
|
367
|
+
details.push(
|
|
368
|
+
"Important: if the plan is large and you estimate it would exceed a single subagent's context window (~200k tokens), " +
|
|
369
|
+
"split execution across multiple sequential subagents instead of one. " +
|
|
370
|
+
"Use the subagent tool's chain mode: pass a \"chain\" array where each entry covers one self-contained phase or group of steps from the plan. " +
|
|
371
|
+
"Each chain entry should include the agent name, a focused task description for that phase, and may reference {previous} to receive the prior phase's output as handoff context. " +
|
|
372
|
+
"Only split when genuinely needed — prefer a single subagent for plans that fit comfortably.",
|
|
373
|
+
);
|
|
374
|
+
details.push(
|
|
375
|
+
"After all subagents complete: (1) do a quick review of the implementation — check that the plan steps were actually carried out, spot obvious issues or missed pieces, and verify the code compiles/passes lint if applicable. " +
|
|
376
|
+
"(2) Then summarize what was done, what (if anything) needs follow-up, and flag any concerns found during review.",
|
|
377
|
+
);
|
|
368
378
|
return details.join(" ");
|
|
369
379
|
}
|
|
370
380
|
|
|
@@ -954,9 +954,17 @@ export default function(pi: ExtensionAPI) {
|
|
|
954
954
|
].join(" "),
|
|
955
955
|
promptGuidelines: [
|
|
956
956
|
"Use subagent to delegate self-contained tasks that benefit from an isolated context window.",
|
|
957
|
-
"
|
|
957
|
+
"When scout is the right fit, call the subagent tool directly — do not type '/subagent' as a shell-like command.",
|
|
958
|
+
"Valid call shapes: single mode uses { agent, task }, parallel mode uses { tasks: [{ agent, task }, ...] }, and chain mode uses { chain: [{ agent, task }, ...] }.",
|
|
959
|
+
"Recon planning rule: use no scout for narrow known-file work, one scout for one broad unfamiliar subsystem, and parallel scouts only when the work spans multiple loosely-coupled subsystems.",
|
|
960
|
+
"Use scout only for broad or unfamiliar codebase reconnaissance before you read many files yourself; save direct reads for targeted lookups once the relevant files are known.",
|
|
961
|
+
"Do not use scout as the reviewer, auditor, or final judge. Scout should map architecture, files, ownership, and likely hotspots for another agent or the parent model to evaluate.",
|
|
962
|
+
"If understanding the task would require scanning multiple files or folders to figure out architecture, routes, data flow, or ownership, launch scout first with single mode: { agent: 'scout', task: '...' }.",
|
|
963
|
+
"If reconnaissance spans multiple loosely-coupled subsystems, prefer parallel scout subagents with { tasks: [{ agent: 'scout', task: 'map frontend...' }, { agent: 'scout', task: 'map backend...' }] }.",
|
|
964
|
+
"When using scout for a review-like request, phrase the task as mapping: ask for architecture, key files, hotspots, and likely risk areas to inspect next — not for a final ranked review.",
|
|
965
|
+
"For broad review or audit requests, use scout only as a prep step; the parent model or a reviewer should make the final judgments.",
|
|
966
|
+
"Skip scout when the user already named the exact file/function to inspect or the task is obviously narrow.",
|
|
958
967
|
"Use parallel mode when tasks are independent and don't need each other's output.",
|
|
959
|
-
"Always check available agents with /subagent before choosing one.",
|
|
960
968
|
"Use background: true when the user wants to keep chatting while a long-running agent works in parallel.",
|
|
961
969
|
"If the user wants to wait for a background subagent result, use await_subagent.",
|
|
962
970
|
],
|
|
@@ -68,6 +68,7 @@ type UsageRow = {
|
|
|
68
68
|
project: string;
|
|
69
69
|
model: string;
|
|
70
70
|
messages: number;
|
|
71
|
+
userPrompts: number;
|
|
71
72
|
input: number;
|
|
72
73
|
output: number;
|
|
73
74
|
cacheRead: number;
|
|
@@ -302,13 +303,16 @@ function makeGroupKey(groupBy: GroupBy, project: string, model: string): string
|
|
|
302
303
|
|
|
303
304
|
function collectUsage(sessionFiles: string[], startMs: number, endMs: number, scope: Scope, groupBy: GroupBy): UsageReport {
|
|
304
305
|
const rows = new Map<string, UsageRow>();
|
|
306
|
+
const userPromptRows = new Map<string, UsageRow>();
|
|
305
307
|
let filesScanned = 0;
|
|
306
308
|
let matchedMessages = 0;
|
|
309
|
+
let matchedUserPrompts = 0;
|
|
307
310
|
|
|
308
311
|
for (const file of sessionFiles) {
|
|
309
312
|
filesScanned++;
|
|
310
313
|
let projectLabel = basename(file);
|
|
311
314
|
let headerResolved = false;
|
|
315
|
+
let currentModel = "";
|
|
312
316
|
|
|
313
317
|
const raw = readFileSync(file, "utf-8");
|
|
314
318
|
for (const line of raw.split("\n")) {
|
|
@@ -328,44 +332,87 @@ function collectUsage(sessionFiles: string[], startMs: number, endMs: number, sc
|
|
|
328
332
|
}
|
|
329
333
|
}
|
|
330
334
|
|
|
335
|
+
// Track model changes
|
|
336
|
+
if (parsed?.type === "model_change" && parsed.provider && parsed.modelId) {
|
|
337
|
+
currentModel = `${parsed.provider}/${parsed.modelId}`;
|
|
338
|
+
}
|
|
339
|
+
|
|
331
340
|
const message = parsed?.type === "message" ? (parsed.message as AssistantMessageLike | undefined) : undefined;
|
|
332
|
-
if (!message
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
key
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
341
|
+
if (!message) continue;
|
|
342
|
+
|
|
343
|
+
if (message.role === "assistant") {
|
|
344
|
+
const timestamp = Number(message.timestamp ?? 0);
|
|
345
|
+
if (!timestamp || timestamp < startMs || timestamp >= endMs) continue;
|
|
346
|
+
|
|
347
|
+
matchedMessages++;
|
|
348
|
+
const model = message.provider && message.model ? `${message.provider}/${message.model}` : currentModel;
|
|
349
|
+
const key = makeGroupKey(groupBy, projectLabel, model);
|
|
350
|
+
const usage = message.usage ?? {};
|
|
351
|
+
const input = Number(usage.input ?? 0);
|
|
352
|
+
const output = Number(usage.output ?? 0);
|
|
353
|
+
const cacheRead = Number(usage.cacheRead ?? 0);
|
|
354
|
+
const cacheWrite = Number(usage.cacheWrite ?? 0);
|
|
355
|
+
const cost = Number(usage.cost?.total ?? 0);
|
|
356
|
+
const total = input + output + cacheRead + cacheWrite;
|
|
357
|
+
|
|
358
|
+
const existing = rows.get(key) ?? {
|
|
359
|
+
key,
|
|
360
|
+
project: groupBy === "model" ? "—" : projectLabel,
|
|
361
|
+
model: groupBy === "project" ? "—" : model,
|
|
362
|
+
messages: 0,
|
|
363
|
+
userPrompts: 0,
|
|
364
|
+
input: 0,
|
|
365
|
+
output: 0,
|
|
366
|
+
cacheRead: 0,
|
|
367
|
+
cacheWrite: 0,
|
|
368
|
+
total: 0,
|
|
369
|
+
cost: 0,
|
|
370
|
+
};
|
|
371
|
+
|
|
372
|
+
existing.messages += 1;
|
|
373
|
+
existing.input += input;
|
|
374
|
+
existing.output += output;
|
|
375
|
+
existing.cacheRead += cacheRead;
|
|
376
|
+
existing.cacheWrite += cacheWrite;
|
|
377
|
+
existing.total += total;
|
|
378
|
+
existing.cost += cost;
|
|
379
|
+
rows.set(key, existing);
|
|
380
|
+
} else if (message.role === "user") {
|
|
381
|
+
const timestamp = Number(message.timestamp ?? 0);
|
|
382
|
+
if (!timestamp || timestamp < startMs || timestamp >= endMs) continue;
|
|
383
|
+
|
|
384
|
+
matchedUserPrompts++;
|
|
385
|
+
const model = currentModel;
|
|
386
|
+
const key = makeGroupKey(groupBy, projectLabel, model);
|
|
387
|
+
|
|
388
|
+
const existing = userPromptRows.get(key) ?? {
|
|
389
|
+
key,
|
|
390
|
+
project: groupBy === "model" ? "—" : projectLabel,
|
|
391
|
+
model: groupBy === "project" ? "—" : model,
|
|
392
|
+
messages: 0,
|
|
393
|
+
userPrompts: 0,
|
|
394
|
+
input: 0,
|
|
395
|
+
output: 0,
|
|
396
|
+
cacheRead: 0,
|
|
397
|
+
cacheWrite: 0,
|
|
398
|
+
total: 0,
|
|
399
|
+
cost: 0,
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
existing.userPrompts += 1;
|
|
403
|
+
userPromptRows.set(key, existing);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
}
|
|
360
407
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
existing.
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
rows.set(key,
|
|
408
|
+
// Merge user prompt counts into the main rows
|
|
409
|
+
for (const [key, userRow] of userPromptRows.entries()) {
|
|
410
|
+
const existing = rows.get(key);
|
|
411
|
+
if (existing) {
|
|
412
|
+
existing.userPrompts = userRow.userPrompts;
|
|
413
|
+
} else {
|
|
414
|
+
// User prompts without assistant responses (edge case)
|
|
415
|
+
rows.set(key, userRow);
|
|
369
416
|
}
|
|
370
417
|
}
|
|
371
418
|
|
|
@@ -377,6 +424,7 @@ function collectUsage(sessionFiles: string[], startMs: number, endMs: number, sc
|
|
|
377
424
|
const totals = orderedRows.reduce(
|
|
378
425
|
(acc, row) => {
|
|
379
426
|
acc.messages += row.messages;
|
|
427
|
+
acc.userPrompts += row.userPrompts;
|
|
380
428
|
acc.input += row.input;
|
|
381
429
|
acc.output += row.output;
|
|
382
430
|
acc.cacheRead += row.cacheRead;
|
|
@@ -385,7 +433,7 @@ function collectUsage(sessionFiles: string[], startMs: number, endMs: number, sc
|
|
|
385
433
|
acc.cost += row.cost;
|
|
386
434
|
return acc;
|
|
387
435
|
},
|
|
388
|
-
{ messages: 0, input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0, cost: 0 },
|
|
436
|
+
{ messages: 0, userPrompts: 0, input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0, cost: 0 },
|
|
389
437
|
);
|
|
390
438
|
|
|
391
439
|
return {
|
|
@@ -409,6 +457,7 @@ function renderTable(report: UsageReport): string {
|
|
|
409
457
|
|
|
410
458
|
const displayRows = report.rows.map((row) => ({
|
|
411
459
|
label: row.key,
|
|
460
|
+
userPrompts: String(row.userPrompts),
|
|
412
461
|
msgs: String(row.messages),
|
|
413
462
|
input: formatInt(row.input),
|
|
414
463
|
output: formatInt(row.output),
|
|
@@ -420,6 +469,7 @@ function renderTable(report: UsageReport): string {
|
|
|
420
469
|
|
|
421
470
|
const widths = {
|
|
422
471
|
label: Math.max(firstColumnHeader.length, ...displayRows.map((row) => row.label.length), 5),
|
|
472
|
+
userPrompts: Math.max(11, ...displayRows.map((row) => row.userPrompts.length), String(report.totals.userPrompts).length),
|
|
423
473
|
msgs: Math.max(4, ...displayRows.map((row) => row.msgs.length), String(report.totals.messages).length),
|
|
424
474
|
input: Math.max(5, ...displayRows.map((row) => row.input.length), formatInt(report.totals.input).length),
|
|
425
475
|
output: Math.max(6, ...displayRows.map((row) => row.output.length), formatInt(report.totals.output).length),
|
|
@@ -431,6 +481,7 @@ function renderTable(report: UsageReport): string {
|
|
|
431
481
|
|
|
432
482
|
const header = [
|
|
433
483
|
firstColumnHeader.padEnd(widths.label),
|
|
484
|
+
"user prompts".padStart(widths.userPrompts),
|
|
434
485
|
"msgs".padStart(widths.msgs),
|
|
435
486
|
"input".padStart(widths.input),
|
|
436
487
|
"output".padStart(widths.output),
|
|
@@ -443,6 +494,7 @@ function renderTable(report: UsageReport): string {
|
|
|
443
494
|
const divider = "-".repeat(header.length);
|
|
444
495
|
const body = displayRows.map((row) => [
|
|
445
496
|
row.label.padEnd(widths.label),
|
|
497
|
+
row.userPrompts.padStart(widths.userPrompts),
|
|
446
498
|
row.msgs.padStart(widths.msgs),
|
|
447
499
|
row.input.padStart(widths.input),
|
|
448
500
|
row.output.padStart(widths.output),
|
|
@@ -454,6 +506,7 @@ function renderTable(report: UsageReport): string {
|
|
|
454
506
|
|
|
455
507
|
const totalsLine = [
|
|
456
508
|
"TOTAL".padEnd(widths.label),
|
|
509
|
+
String(report.totals.userPrompts).padStart(widths.userPrompts),
|
|
457
510
|
String(report.totals.messages).padStart(widths.msgs),
|
|
458
511
|
formatInt(report.totals.input).padStart(widths.input),
|
|
459
512
|
formatInt(report.totals.output).padStart(widths.output),
|
|
@@ -474,7 +527,8 @@ function renderReport(report: UsageReport): string {
|
|
|
474
527
|
`Grouped by: ${report.groupBy}`,
|
|
475
528
|
`Sessions root: ${report.sessionsRoot}`,
|
|
476
529
|
`Session files scanned: ${report.filesScanned}`,
|
|
477
|
-
`
|
|
530
|
+
`User prompts: ${report.totals.userPrompts}`,
|
|
531
|
+
`Assistant messages: ${report.matchedMessages}`,
|
|
478
532
|
].join("\n");
|
|
479
533
|
|
|
480
534
|
if (report.rows.length === 0) {
|