savant-code 0.0.16 → 0.0.19
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/.agents/skills/coding-csharp/SKILL.md +82 -0
- package/.agents/skills/coding-go/SKILL.md +76 -0
- package/.agents/skills/coding-java/SKILL.md +79 -0
- package/.agents/skills/coding-python/SKILL.md +87 -0
- package/.agents/skills/coding-rust/SKILL.md +83 -0
- package/.agents/skills/coding-typescript/SKILL.md +90 -0
- package/.agents/skills/release-workflow/SKILL.md +69 -0
- package/.bun-version +1 -0
- package/.commandcode/settings.json +11 -0
- package/.commandcode/taste/workflow/taste.md +6 -0
- package/.env.example +95 -0
- package/.gitattributes +43 -0
- package/.githooks/pre-push +35 -0
- package/.github/workflows/build-release-binaries.yml +163 -0
- package/.markdownlint.json +42 -0
- package/.markdownlintignore +21 -0
- package/.prettierignore +9 -0
- package/.prettierrc +23 -0
- package/.savantignore +3 -0
- package/AGENTS.md +97 -0
- package/ARCHITECTURE.md +241 -0
- package/CHANGELOG.md +2631 -0
- package/CONTRIBUTING.md +88 -0
- package/ECHO-freebuff.md +22 -0
- package/ECHO.md +722 -0
- package/FREEREADME.md +35 -0
- package/LEARNINGS.md +345 -0
- package/NOTICE +15 -0
- package/README.md +550 -216
- package/README.zh-CN.md +479 -0
- package/SECURITY.md +8 -0
- package/VERSION +1 -0
- package/WINDOWS.md +238 -0
- package/agents/README.md +41 -0
- package/agents/base-chat.ts +44 -0
- package/agents/basher.ts +107 -0
- package/agents/browser-use/browser-use.test.ts +211 -0
- package/agents/browser-use/browser-use.ts +259 -0
- package/agents/constants.ts +1 -0
- package/agents/context-pruner.ts +1076 -0
- package/agents/detective/detective.ts +168 -0
- package/agents/editor/best-of-n/best-of-n-selector2.ts +148 -0
- package/agents/editor/best-of-n/editor-implementor-gpt-5.ts +7 -0
- package/agents/editor/best-of-n/editor-implementor-opus.ts +7 -0
- package/agents/editor/best-of-n/editor-implementor.ts +196 -0
- package/agents/editor/best-of-n/editor-multi-prompt.ts +265 -0
- package/agents/file-explorer/directory-lister.ts +92 -0
- package/agents/file-explorer/glob-matcher.ts +96 -0
- package/agents/forge/forge.ts +146 -0
- package/agents/librarian/librarian.test.ts +289 -0
- package/agents/librarian/librarian.ts +158 -0
- package/agents/package.json +11 -0
- package/agents/recorder/recorder.ts +104 -0
- package/agents/researcher/researcher-docs.ts +32 -0
- package/agents/researcher/researcher-web.ts +40 -0
- package/agents/savant/savant-analyze.ts +11 -0
- package/agents/savant/savant-free-deepseek-flash.ts +13 -0
- package/agents/savant/savant-free-deepseek.ts +13 -0
- package/agents/savant/savant-free-evals.ts +9 -0
- package/agents/savant/savant-free-glm.ts +13 -0
- package/agents/savant/savant-free-kimi.ts +13 -0
- package/agents/savant/savant-free-mimo-pro.ts +13 -0
- package/agents/savant/savant-free-mimo.ts +13 -0
- package/agents/savant/savant-free-minimax-m3.ts +13 -0
- package/agents/savant/savant-free.ts +9 -0
- package/agents/savant/savant-scaffold.ts +15 -0
- package/agents/savant/savant.ts +706 -0
- package/agents/scout/scout.ts +305 -0
- package/agents/scribe/scribe.ts +54 -0
- package/agents/thinker/thinker-gemini.ts +26 -0
- package/agents/thinker/thinker-gpt.ts +21 -0
- package/agents/thinker/thinker-with-files-gemini.ts +66 -0
- package/agents/thinker/thinker.ts +99 -0
- package/agents/tmux-cli.ts +724 -0
- package/agents/tsconfig.json +12 -0
- package/agents/types/agent-definition.ts +1 -0
- package/agents/types/secret-agent-definition.ts +103 -0
- package/agents/types/tools.ts +465 -0
- package/agents/types/util-types.ts +167 -0
- package/agents/verifier/verifier.ts +80 -0
- package/art/savant-redesign.md +7 -0
- package/art/savant-text-graf.md +5 -0
- package/art/savant_ascii.md +88 -0
- package/assets/banner.png +0 -0
- package/bun.lock +1979 -0
- package/bunfig.toml +7 -0
- package/cli/README.md +111 -0
- package/cli/bunfig.toml +2 -0
- package/cli/cli_exit +1 -0
- package/cli/package.json +66 -0
- package/cli/release/README.md +348 -0
- package/{index.js → cli/release/index.js} +0 -0
- package/cli/release/package.json +56 -0
- package/cli/release-core/README.md +20 -0
- package/cli/release-core/package.json +4 -0
- package/cli/release-core/prepare-package.js +31 -0
- package/cli/release-staging/README.md +70 -0
- package/cli/release-staging/index.js +42 -0
- package/cli/release-staging/package.json +43 -0
- package/cli/scripts/build-binary.ts +469 -0
- package/cli/scripts/clean.ts +16 -0
- package/cli/scripts/prebuild-agents.ts +250 -0
- package/cli/scripts/release.ts +103 -0
- package/cli/scripts/smoke-binary.ts +280 -0
- package/cli/scripts/test-sdk-file-hooks.sh +87 -0
- package/cli/scripts/validate-cli-with-tmux.sh +43 -0
- package/cli/src/__tests__/README.md +256 -0
- package/cli/src/__tests__/bash-mode.test.ts +442 -0
- package/cli/src/__tests__/cli-args.test.ts +241 -0
- package/cli/src/__tests__/e2e/first-time-login.test.ts +173 -0
- package/cli/src/__tests__/e2e/logout-relogin-flow.test.ts +110 -0
- package/cli/src/__tests__/e2e/returning-user-auth.test.ts +111 -0
- package/cli/src/__tests__/e2e-cli.test.ts +185 -0
- package/cli/src/__tests__/helpers/mock-api-client.ts +64 -0
- package/cli/src/__tests__/helpers/terminal-watchdog-fixture.ts +50 -0
- package/cli/src/__tests__/home-directory-detection.test.ts +213 -0
- package/cli/src/__tests__/integration/agent-toolnames-validation.test.ts +63 -0
- package/cli/src/__tests__/integration/api-integration.test.ts +289 -0
- package/cli/src/__tests__/integration/credentials-storage.test.ts +453 -0
- package/cli/src/__tests__/integration/local-agents.test.ts +1187 -0
- package/cli/src/__tests__/integration/login-flow-instrumentation.test.ts +146 -0
- package/cli/src/__tests__/integration/login-polling-working.test.ts +287 -0
- package/cli/src/__tests__/integration/usage-refresh-on-completion.test.ts +177 -0
- package/cli/src/__tests__/integration-tmux.test.ts +186 -0
- package/cli/src/__tests__/mocks/hover-toggle-controller.ts +71 -0
- package/cli/src/__tests__/path-completion.test.ts +243 -0
- package/cli/src/__tests__/project-files-chat-id.test.ts +34 -0
- package/cli/src/__tests__/release/proxy-http-get.test.ts +670 -0
- package/cli/src/__tests__/release/wrapper-safety.test.ts +177 -0
- package/cli/src/__tests__/rerender-perf.integration.test.ts +283 -0
- package/cli/src/__tests__/terminal-reset-sequences.test.ts +36 -0
- package/cli/src/__tests__/terminal-watchdog.test.ts +114 -0
- package/cli/src/__tests__/test-utils.ts +266 -0
- package/cli/src/__tests__/tmux-poc.ts +150 -0
- package/cli/src/__tests__/unit/agent-mode-toggle.test.ts +138 -0
- package/cli/src/__tests__/unit/copy-button.test.tsx +188 -0
- package/cli/src/__tests__/unit/create-run-config.test.ts +77 -0
- package/cli/src/__tests__/unit/publish-confirmation.test.ts +70 -0
- package/cli/src/__tests__/unit/segmented-control.test.ts +167 -0
- package/cli/src/__tests__/utils/env.test.ts +210 -0
- package/cli/src/__tests__/utils/project-picker.test.ts +39 -0
- package/cli/src/agents/bundled-agents.generated.d.ts +14 -0
- package/cli/src/agents/bundled-agents.generated.ts +1962 -0
- package/cli/src/app.tsx +383 -0
- package/cli/src/chat.tsx +2008 -0
- package/cli/src/cli-args.ts +183 -0
- package/cli/src/commands/__tests__/bash-command.test.ts +449 -0
- package/cli/src/commands/__tests__/command-args.test.ts +325 -0
- package/cli/src/commands/__tests__/copy-conversation.test.ts +240 -0
- package/cli/src/commands/__tests__/dev-command.test.ts +128 -0
- package/cli/src/commands/__tests__/diagnostics-command.test.ts +35 -0
- package/cli/src/commands/__tests__/image.test.ts +99 -0
- package/cli/src/commands/__tests__/init.test.ts +479 -0
- package/cli/src/commands/__tests__/loop-command.test.ts +89 -0
- package/cli/src/commands/__tests__/new-command-rotates-chat.test.ts +87 -0
- package/cli/src/commands/__tests__/permissions-command.test.ts +93 -0
- package/cli/src/commands/__tests__/process-diagnostics.test.ts +54 -0
- package/cli/src/commands/__tests__/prompt-builders.test.ts +69 -0
- package/cli/src/commands/__tests__/registry-gating.test.ts +125 -0
- package/cli/src/commands/__tests__/rewind-command.test.ts +227 -0
- package/cli/src/commands/__tests__/router-connect-chatgpt.test.ts +72 -0
- package/cli/src/commands/__tests__/router-input.test.ts +302 -0
- package/cli/src/commands/__tests__/router-provider-setup.test.ts +180 -0
- package/cli/src/commands/__tests__/savant-free-command-aliases.test.ts +56 -0
- package/cli/src/commands/ads.ts +45 -0
- package/cli/src/commands/command-registry.ts +1112 -0
- package/cli/src/commands/copy-conversation.ts +386 -0
- package/cli/src/commands/goal.ts +87 -0
- package/cli/src/commands/health-command.ts +61 -0
- package/cli/src/commands/help.ts +13 -0
- package/cli/src/commands/image.ts +20 -0
- package/cli/src/commands/init.ts +121 -0
- package/cli/src/commands/loop.ts +182 -0
- package/cli/src/commands/process-diagnostics.ts +120 -0
- package/cli/src/commands/prompt-builders.ts +140 -0
- package/cli/src/commands/publish.ts +261 -0
- package/cli/src/commands/rewind.ts +130 -0
- package/cli/src/commands/router-utils.ts +80 -0
- package/cli/src/commands/router.ts +589 -0
- package/cli/src/commands/telemetry.ts +68 -0
- package/cli/src/commands/usage.ts +26 -0
- package/cli/src/components/__tests__/ad-banner.test.tsx +84 -0
- package/cli/src/components/__tests__/block-helpers.test.tsx +139 -0
- package/cli/src/components/__tests__/clickable.test.tsx +39 -0
- package/cli/src/components/__tests__/grid-layout.integration.test.tsx +365 -0
- package/cli/src/components/__tests__/grid-layout.test.tsx +1033 -0
- package/cli/src/components/__tests__/markdown-content.test.tsx +163 -0
- package/cli/src/components/__tests__/message-block.completion.test.tsx +104 -0
- package/cli/src/components/__tests__/message-block.streaming.test.tsx +78 -0
- package/cli/src/components/__tests__/message-with-agents.test.tsx +571 -0
- package/cli/src/components/__tests__/multiline-input.test.tsx +1129 -0
- package/cli/src/components/__tests__/selectable-list.test.ts +232 -0
- package/cli/src/components/__tests__/shimmer-text.test.tsx +32 -0
- package/cli/src/components/__tests__/status-indicator.test.tsx +184 -0
- package/cli/src/components/__tests__/user-error-banner.test.tsx +100 -0
- package/cli/src/components/ad-banner.tsx +351 -0
- package/cli/src/components/agent-checklist.tsx +385 -0
- package/cli/src/components/agent-mode-toggle.tsx +294 -0
- package/cli/src/components/ask-user/__tests__/multiple-choice-form.test.ts +432 -0
- package/cli/src/components/ask-user/__tests__/validation.test.ts +213 -0
- package/cli/src/components/ask-user/components/accordion-question.tsx +153 -0
- package/cli/src/components/ask-user/components/custom-answer-input.tsx +66 -0
- package/cli/src/components/ask-user/components/options-list.tsx +139 -0
- package/cli/src/components/ask-user/components/question-header.tsx +80 -0
- package/cli/src/components/ask-user/components/question-option.tsx +94 -0
- package/cli/src/components/ask-user/constants.ts +35 -0
- package/cli/src/components/ask-user/index.tsx +660 -0
- package/cli/src/components/ask-user/utils/validation.ts +85 -0
- package/cli/src/components/attachment-card.tsx +67 -0
- package/cli/src/components/blocks/agent-block-grid.tsx +58 -0
- package/cli/src/components/blocks/agent-branch-item.tsx +230 -0
- package/cli/src/components/blocks/agent-branch-wrapper.tsx +524 -0
- package/cli/src/components/blocks/agent-list-branch.tsx +77 -0
- package/cli/src/components/blocks/ask-user-branch.tsx +98 -0
- package/cli/src/components/blocks/block-helpers.tsx +257 -0
- package/cli/src/components/blocks/blocks-renderer.tsx +296 -0
- package/cli/src/components/blocks/content-with-markdown.tsx +34 -0
- package/cli/src/components/blocks/copy-button.tsx +106 -0
- package/cli/src/components/blocks/copyable-block.tsx +47 -0
- package/cli/src/components/blocks/image-block.tsx +128 -0
- package/cli/src/components/blocks/implementor-row.tsx +453 -0
- package/cli/src/components/blocks/markdown-content.tsx +360 -0
- package/cli/src/components/blocks/markdown-renderables.tsx +347 -0
- package/cli/src/components/blocks/single-block.tsx +210 -0
- package/cli/src/components/blocks/thinking-block.tsx +77 -0
- package/cli/src/components/blocks/tool-block-group.tsx +72 -0
- package/cli/src/components/blocks/tool-branch.tsx +196 -0
- package/cli/src/components/blocks/user-content-copy.tsx +171 -0
- package/cli/src/components/bottom-banner.tsx +145 -0
- package/cli/src/components/build-mode-buttons.tsx +110 -0
- package/cli/src/components/button.tsx +75 -0
- package/cli/src/components/chat-header.tsx +11 -0
- package/cli/src/components/chat-history-screen.tsx +417 -0
- package/cli/src/components/chat-input-bar.tsx +535 -0
- package/cli/src/components/chatgpt-connect-banner.tsx +234 -0
- package/cli/src/components/clickable.tsx +149 -0
- package/cli/src/components/collapse-button.tsx +36 -0
- package/cli/src/components/command-palette.tsx +166 -0
- package/cli/src/components/copy-button.tsx +219 -0
- package/cli/src/components/dialog.tsx +111 -0
- package/cli/src/components/elapsed-timer.tsx +56 -0
- package/cli/src/components/error-boundary.tsx +63 -0
- package/cli/src/components/feedback-container.tsx +206 -0
- package/cli/src/components/feedback-icon-button.tsx +89 -0
- package/cli/src/components/feedback-input-mode.tsx +352 -0
- package/cli/src/components/file-attachment-card.tsx +89 -0
- package/cli/src/components/grid-layout.tsx +83 -0
- package/cli/src/components/help-banner.tsx +136 -0
- package/cli/src/components/highlighted-text.tsx +52 -0
- package/cli/src/components/image-card.tsx +167 -0
- package/cli/src/components/image-thumbnail.tsx +112 -0
- package/cli/src/components/input-cursor.tsx +77 -0
- package/cli/src/components/input-mode-banner.tsx +70 -0
- package/cli/src/components/load-previous-button.tsx +48 -0
- package/cli/src/components/login-modal.tsx +450 -0
- package/cli/src/components/message-block.tsx +337 -0
- package/cli/src/components/message-footer.tsx +269 -0
- package/cli/src/components/message-with-agents.tsx +594 -0
- package/cli/src/components/mode-divider.tsx +43 -0
- package/cli/src/components/model-picker.tsx +371 -0
- package/cli/src/components/multiline-input.tsx +1276 -0
- package/cli/src/components/out-of-credits-banner.tsx +155 -0
- package/cli/src/components/pending-attachments-banner.tsx +125 -0
- package/cli/src/components/pending-bash-message.tsx +57 -0
- package/cli/src/components/progress-bar.tsx +81 -0
- package/cli/src/components/project-picker-screen.tsx +469 -0
- package/cli/src/components/provider-picker.tsx +139 -0
- package/cli/src/components/publish-confirmation.tsx +514 -0
- package/cli/src/components/publish-container.tsx +737 -0
- package/cli/src/components/raised-pill.tsx +89 -0
- package/cli/src/components/renderers/plan-box.tsx +70 -0
- package/cli/src/components/review-screen.tsx +114 -0
- package/cli/src/components/rewind-picker.tsx +276 -0
- package/cli/src/components/right-sidebar.tsx +296 -0
- package/cli/src/components/savant-free-active-session-summary.tsx +63 -0
- package/cli/src/components/savant-free-landing-screen.tsx +756 -0
- package/cli/src/components/savant-free-model-selector.tsx +815 -0
- package/cli/src/components/savant-free-referral-banner.tsx +423 -0
- package/cli/src/components/savant-free-superseded-screen.tsx +62 -0
- package/cli/src/components/savant-ui/animation/pulse.tsx +26 -0
- package/cli/src/components/savant-ui/animation/typewriter.tsx +40 -0
- package/cli/src/components/savant-ui/branding.tsx +59 -0
- package/cli/src/components/savant-ui/data-display/badge.tsx +52 -0
- package/cli/src/components/savant-ui/data-display/code-block.tsx +55 -0
- package/cli/src/components/savant-ui/data-display/key-value.tsx +34 -0
- package/cli/src/components/savant-ui/data-display/sparkline.tsx +42 -0
- package/cli/src/components/savant-ui/data-display/timeline.tsx +44 -0
- package/cli/src/components/savant-ui/data-display/tree-view.tsx +55 -0
- package/cli/src/components/savant-ui/echo/__tests__/sidebar-collapse.test.tsx +90 -0
- package/cli/src/components/savant-ui/echo/agent-stack.tsx +72 -0
- package/cli/src/components/savant-ui/echo/agent-status.tsx +66 -0
- package/cli/src/components/savant-ui/echo/fid-card.tsx +89 -0
- package/cli/src/components/savant-ui/echo/fid-list.tsx +68 -0
- package/cli/src/components/savant-ui/echo/loop-status-panel.tsx +64 -0
- package/cli/src/components/savant-ui/echo/perfection-loop.tsx +118 -0
- package/cli/src/components/savant-ui/echo/phase-indicator.tsx +68 -0
- package/cli/src/components/savant-ui/echo/phase-info.ts +72 -0
- package/cli/src/components/savant-ui/echo/token-meter.tsx +39 -0
- package/cli/src/components/savant-ui/feedback/alert.tsx +45 -0
- package/cli/src/components/savant-ui/feedback/cost-tracker.tsx +54 -0
- package/cli/src/components/savant-ui/feedback/progress-bar.tsx +71 -0
- package/cli/src/components/savant-ui/feedback/spinner.tsx +40 -0
- package/cli/src/components/savant-ui/icon-theme-keys.ts +67 -0
- package/cli/src/components/savant-ui/icon.tsx +53 -0
- package/cli/src/components/savant-ui/index.ts +75 -0
- package/cli/src/components/savant-ui/input/select.tsx +26 -0
- package/cli/src/components/savant-ui/input/toggle.tsx +28 -0
- package/cli/src/components/savant-ui/layout/grid.tsx +52 -0
- package/cli/src/components/savant-ui/layout/header.tsx +28 -0
- package/cli/src/components/savant-ui/navigation/stepper.tsx +41 -0
- package/cli/src/components/savant-ui/primitives/key-hint.tsx +45 -0
- package/cli/src/components/savant-ui/primitives/key-value-row.tsx +41 -0
- package/cli/src/components/savant-ui/primitives/panel.tsx +42 -0
- package/cli/src/components/savant-ui/primitives/separator.tsx +34 -0
- package/cli/src/components/savant-ui/primitives/sidebar-section.tsx +64 -0
- package/cli/src/components/savant-ui/primitives/spacer.tsx +13 -0
- package/cli/src/components/savant-ui/primitives/stack.tsx +35 -0
- package/cli/src/components/savant-ui/theme.ts +45 -0
- package/cli/src/components/scroll-to-bottom-button.tsx +34 -0
- package/cli/src/components/segmented-control.tsx +199 -0
- package/cli/src/components/selectable-list.tsx +249 -0
- package/cli/src/components/selected-chips.tsx +86 -0
- package/cli/src/components/separator.tsx +40 -0
- package/cli/src/components/session-ended-banner.tsx +183 -0
- package/cli/src/components/shimmer-text.tsx +254 -0
- package/cli/src/components/status-bar.tsx +279 -0
- package/cli/src/components/subscription-limit-banner.tsx +269 -0
- package/cli/src/components/suggested-prompts.tsx +184 -0
- package/cli/src/components/suggestion-menu.tsx +219 -0
- package/cli/src/components/terminal-command-display.tsx +152 -0
- package/cli/src/components/terminal-link.tsx +97 -0
- package/cli/src/components/text-attachment-card.tsx +77 -0
- package/cli/src/components/thinking.tsx +108 -0
- package/cli/src/components/toast.tsx +109 -0
- package/cli/src/components/tools/__tests__/apply-patch.test.tsx +97 -0
- package/cli/src/components/tools/__tests__/code-search.test.tsx +45 -0
- package/cli/src/components/tools/__tests__/gravity-index.test.ts +76 -0
- package/cli/src/components/tools/__tests__/render-ui.test.tsx +556 -0
- package/cli/src/components/tools/__tests__/run-terminal-command.test.ts +274 -0
- package/cli/src/components/tools/__tests__/tool-call-item.test.tsx +73 -0
- package/cli/src/components/tools/apply-patch.tsx +101 -0
- package/cli/src/components/tools/code-search.tsx +50 -0
- package/cli/src/components/tools/composio.tsx +140 -0
- package/cli/src/components/tools/diff-viewer.tsx +21 -0
- package/cli/src/components/tools/glob.tsx +66 -0
- package/cli/src/components/tools/gravity-index.tsx +80 -0
- package/cli/src/components/tools/list-directory.tsx +66 -0
- package/cli/src/components/tools/read-docs.tsx +36 -0
- package/cli/src/components/tools/read-files.tsx +97 -0
- package/cli/src/components/tools/read-subtree.tsx +40 -0
- package/cli/src/components/tools/read-url.tsx +32 -0
- package/cli/src/components/tools/registry.ts +131 -0
- package/cli/src/components/tools/render-ui.tsx +466 -0
- package/cli/src/components/tools/run-terminal-command.tsx +86 -0
- package/cli/src/components/tools/skill.tsx +26 -0
- package/cli/src/components/tools/str-replace.tsx +77 -0
- package/cli/src/components/tools/suggest-followups.tsx +373 -0
- package/cli/src/components/tools/task-completed.tsx +16 -0
- package/cli/src/components/tools/tool-call-item.tsx +163 -0
- package/cli/src/components/tools/types.ts +100 -0
- package/cli/src/components/tools/web-search.tsx +32 -0
- package/cli/src/components/tools/write-file.tsx +20 -0
- package/cli/src/components/tools/write-todos.tsx +105 -0
- package/cli/src/components/top-banner.tsx +187 -0
- package/cli/src/components/usage-banner.tsx +296 -0
- package/cli/src/components/user-error-banner.tsx +54 -0
- package/cli/src/components/validation-error-popover.tsx +191 -0
- package/cli/src/data/slash-commands.ts +306 -0
- package/cli/src/hooks/__tests__/holds-live-savant-free-slot.test.ts +49 -0
- package/cli/src/hooks/__tests__/run-outcome.test.ts +178 -0
- package/cli/src/hooks/__tests__/session-fetch-signal.test.ts +45 -0
- package/cli/src/hooks/__tests__/use-activity-query.test.ts +810 -0
- package/cli/src/hooks/__tests__/use-ask-user-bridge.test.ts +175 -0
- package/cli/src/hooks/__tests__/use-auth-query.test.ts +21 -0
- package/cli/src/hooks/__tests__/use-chat-messages-collapse.test.ts +96 -0
- package/cli/src/hooks/__tests__/use-connection-status.test.ts +112 -0
- package/cli/src/hooks/__tests__/use-directory-browser.test.ts +215 -0
- package/cli/src/hooks/__tests__/use-gravity-ad.test.ts +73 -0
- package/cli/src/hooks/__tests__/use-grid-layout.test.ts +346 -0
- package/cli/src/hooks/__tests__/use-input-history.test.ts +704 -0
- package/cli/src/hooks/__tests__/use-loop-scheduler.test.ts +247 -0
- package/cli/src/hooks/__tests__/use-path-tab-completion.test.ts +324 -0
- package/cli/src/hooks/__tests__/use-queue-controls.test.ts +68 -0
- package/cli/src/hooks/__tests__/use-searchable-list.test.ts +364 -0
- package/cli/src/hooks/__tests__/use-send-message-timer.test.ts +146 -0
- package/cli/src/hooks/__tests__/use-suggestion-engine-mention.test.ts +364 -0
- package/cli/src/hooks/__tests__/use-suggestion-engine.test.ts +485 -0
- package/cli/src/hooks/__tests__/use-terminal-focus.test.ts +66 -0
- package/cli/src/hooks/__tests__/use-terminal-layout.test.ts +675 -0
- package/cli/src/hooks/__tests__/use-timeout.test.ts +330 -0
- package/cli/src/hooks/__tests__/use-usage-query.test.ts +526 -0
- package/cli/src/hooks/__tests__/use-user-details-query.test.ts +225 -0
- package/cli/src/hooks/helpers/__tests__/send-message.test.ts +1851 -0
- package/cli/src/hooks/helpers/send-message.ts +553 -0
- package/cli/src/hooks/run-outcome.ts +64 -0
- package/cli/src/hooks/stream-state.ts +106 -0
- package/cli/src/hooks/use-activity-query.ts +696 -0
- package/cli/src/hooks/use-agent-validation.ts +80 -0
- package/cli/src/hooks/use-ask-user-bridge.ts +102 -0
- package/cli/src/hooks/use-auth-query.ts +261 -0
- package/cli/src/hooks/use-auth-state.ts +155 -0
- package/cli/src/hooks/use-chat-input.ts +87 -0
- package/cli/src/hooks/use-chat-keyboard.ts +325 -0
- package/cli/src/hooks/use-chat-messages.ts +273 -0
- package/cli/src/hooks/use-chat-state.ts +219 -0
- package/cli/src/hooks/use-chat-streaming.ts +270 -0
- package/cli/src/hooks/use-chat-ui.ts +136 -0
- package/cli/src/hooks/use-clipboard.ts +154 -0
- package/cli/src/hooks/use-connection-status.ts +156 -0
- package/cli/src/hooks/use-directory-browser.ts +88 -0
- package/cli/src/hooks/use-elapsed-time.ts +116 -0
- package/cli/src/hooks/use-event.ts +36 -0
- package/cli/src/hooks/use-exit-handler.ts +108 -0
- package/cli/src/hooks/use-fetch-login-url.ts +65 -0
- package/cli/src/hooks/use-fids.ts +48 -0
- package/cli/src/hooks/use-fingerprint.ts +64 -0
- package/cli/src/hooks/use-gravity-ad.ts +688 -0
- package/cli/src/hooks/use-grid-layout.ts +78 -0
- package/cli/src/hooks/use-input-history.ts +173 -0
- package/cli/src/hooks/use-login-keyboard-handlers.ts +74 -0
- package/cli/src/hooks/use-login-polling.ts +120 -0
- package/cli/src/hooks/use-logo.tsx +178 -0
- package/cli/src/hooks/use-loop-scheduler.ts +481 -0
- package/cli/src/hooks/use-message-queue.ts +301 -0
- package/cli/src/hooks/use-now.ts +20 -0
- package/cli/src/hooks/use-path-tab-completion.ts +88 -0
- package/cli/src/hooks/use-publish-mutation.ts +60 -0
- package/cli/src/hooks/use-queue-controls.ts +70 -0
- package/cli/src/hooks/use-queue-ui.ts +55 -0
- package/cli/src/hooks/use-savant-free-ctrl-c-exit.ts +23 -0
- package/cli/src/hooks/use-savant-free-session-progress.ts +34 -0
- package/cli/src/hooks/use-savant-free-session.ts +679 -0
- package/cli/src/hooks/use-savant-free-streak-query.ts +72 -0
- package/cli/src/hooks/use-scaffold-confirm.ts +62 -0
- package/cli/src/hooks/use-scaffold-revert-subscriber.ts +66 -0
- package/cli/src/hooks/use-scroll-management.ts +182 -0
- package/cli/src/hooks/use-searchable-list.ts +99 -0
- package/cli/src/hooks/use-send-message.ts +1038 -0
- package/cli/src/hooks/use-sheen-animation.tsx +88 -0
- package/cli/src/hooks/use-subscription-query.ts +106 -0
- package/cli/src/hooks/use-suggestion-engine.ts +793 -0
- package/cli/src/hooks/use-terminal-breakpoints.ts +77 -0
- package/cli/src/hooks/use-terminal-dimensions.ts +50 -0
- package/cli/src/hooks/use-terminal-focus.ts +146 -0
- package/cli/src/hooks/use-terminal-layout.ts +189 -0
- package/cli/src/hooks/use-theme.tsx +140 -0
- package/cli/src/hooks/use-timeout.ts +88 -0
- package/cli/src/hooks/use-toast.ts +114 -0
- package/cli/src/hooks/use-update-preference.ts +77 -0
- package/cli/src/hooks/use-usage-monitor.ts +59 -0
- package/cli/src/hooks/use-usage-query.ts +138 -0
- package/cli/src/hooks/use-user-details-query.ts +104 -0
- package/cli/src/hooks/use-why-did-you-update.ts +178 -0
- package/cli/src/index.tsx +484 -0
- package/cli/src/init/__tests__/init-direnv.test.ts +597 -0
- package/cli/src/init/init-app.ts +54 -0
- package/cli/src/init/init-direnv.ts +133 -0
- package/cli/src/login/constants.ts +71 -0
- package/cli/src/login/login-flow.ts +224 -0
- package/cli/src/login/plain-login.ts +107 -0
- package/cli/src/login/utils.ts +183 -0
- package/cli/src/native/ripgrep.ts +82 -0
- package/cli/src/polyfills/bun-strip-ansi.ts +12 -0
- package/cli/src/pre-init/load-dev-env.ts +98 -0
- package/cli/src/pre-init/tree-sitter-wasm.ts +98 -0
- package/cli/src/project-files.ts +102 -0
- package/cli/src/state/__tests__/chat-store-focus.test.ts +22 -0
- package/cli/src/state/__tests__/feedback-store.test.ts +260 -0
- package/cli/src/state/chat-history-store.ts +27 -0
- package/cli/src/state/chat-store.ts +791 -0
- package/cli/src/state/feedback-store.ts +162 -0
- package/cli/src/state/gateway-catalog-store.ts +45 -0
- package/cli/src/state/login-store.ts +150 -0
- package/cli/src/state/message-block-store.ts +143 -0
- package/cli/src/state/model-picker-store.ts +67 -0
- package/cli/src/state/provider-picker-store.ts +53 -0
- package/cli/src/state/publish-store.ts +141 -0
- package/cli/src/state/review-store.ts +24 -0
- package/cli/src/state/rewind-picker-store.ts +74 -0
- package/cli/src/state/savant-free-model-store.ts +59 -0
- package/cli/src/state/savant-free-session-store.ts +32 -0
- package/cli/src/test-setup.ts +20 -0
- package/cli/src/testing/env.ts +46 -0
- package/cli/src/types/chat-state.ts +15 -0
- package/cli/src/types/chat.ts +242 -0
- package/cli/src/types/contracts/send-message.ts +16 -0
- package/cli/src/types/env.ts +107 -0
- package/cli/src/types/function-params.ts +35 -0
- package/cli/src/types/opentui-augmentation.d.ts +11 -0
- package/cli/src/types/react19-compat.d.ts +19 -0
- package/cli/src/types/savant-free-session.ts +17 -0
- package/cli/src/types/store.ts +112 -0
- package/cli/src/types/theme-system.ts +194 -0
- package/cli/src/types/utils.ts +3 -0
- package/cli/src/utils/__tests__/activity-tracker.test.ts +440 -0
- package/cli/src/utils/__tests__/agent-display.test.ts +139 -0
- package/cli/src/utils/__tests__/analytics-client.test.ts +311 -0
- package/cli/src/utils/__tests__/anonymous-id.test.ts +74 -0
- package/cli/src/utils/__tests__/arrays.test.ts +264 -0
- package/cli/src/utils/__tests__/bash-context-processor.test.ts +38 -0
- package/cli/src/utils/__tests__/block-processor.test.ts +690 -0
- package/cli/src/utils/__tests__/chat-history.test.ts +247 -0
- package/cli/src/utils/__tests__/chat-input-key-intercept.test.ts +40 -0
- package/cli/src/utils/__tests__/chat-layout.test.ts +32 -0
- package/cli/src/utils/__tests__/chat-meta.test.ts +160 -0
- package/cli/src/utils/__tests__/chatgpt-oauth.test.ts +50 -0
- package/cli/src/utils/__tests__/clipboard.test.ts +998 -0
- package/cli/src/utils/__tests__/code-search-summary.test.ts +84 -0
- package/cli/src/utils/__tests__/collapse-helpers.test.ts +1272 -0
- package/cli/src/utils/__tests__/error-handling.test.ts +611 -0
- package/cli/src/utils/__tests__/feedback-helpers.test.ts +452 -0
- package/cli/src/utils/__tests__/feedback-submission.test.ts +26 -0
- package/cli/src/utils/__tests__/fetch-usage.test.ts +355 -0
- package/cli/src/utils/__tests__/fingerprint.test.ts +147 -0
- package/cli/src/utils/__tests__/format-elapsed-time.test.ts +103 -0
- package/cli/src/utils/__tests__/format-timeout.test.ts +87 -0
- package/cli/src/utils/__tests__/image-dimensions.test.ts +243 -0
- package/cli/src/utils/__tests__/image-processor.test.ts +250 -0
- package/cli/src/utils/__tests__/implementor-helpers.test.ts +1457 -0
- package/cli/src/utils/__tests__/keyboard-actions.test.ts +686 -0
- package/cli/src/utils/__tests__/layout-helpers.test.ts +36 -0
- package/cli/src/utils/__tests__/lazy-response-ads.test.ts +167 -0
- package/cli/src/utils/__tests__/logger-sanitize-secrets.test.ts +80 -0
- package/cli/src/utils/__tests__/markdown-renderer.test.tsx +518 -0
- package/cli/src/utils/__tests__/markdown-streaming.test.ts +64 -0
- package/cli/src/utils/__tests__/message-block-helpers.test.ts +1197 -0
- package/cli/src/utils/__tests__/message-updater.test.ts +659 -0
- package/cli/src/utils/__tests__/ollama-onboarding.test.ts +239 -0
- package/cli/src/utils/__tests__/openrouter-models.test.ts +295 -0
- package/cli/src/utils/__tests__/osc-timeout-scenarios.test.ts +172 -0
- package/cli/src/utils/__tests__/pending-attachments.test.ts +278 -0
- package/cli/src/utils/__tests__/provider-setup.test.ts +183 -0
- package/cli/src/utils/__tests__/run-state-storage.test.ts +741 -0
- package/cli/src/utils/__tests__/savant-code-api.test.ts +634 -0
- package/cli/src/utils/__tests__/savant-free-instance-owner.test.ts +69 -0
- package/cli/src/utils/__tests__/savant-free-model-navigation.test.ts +104 -0
- package/cli/src/utils/__tests__/savant-free-premium-reset.test.ts +81 -0
- package/cli/src/utils/__tests__/savant-free-referral-cache.test.ts +67 -0
- package/cli/src/utils/__tests__/savant-free-session-display.test.ts +23 -0
- package/cli/src/utils/__tests__/savant-free-streak-line.test.ts +76 -0
- package/cli/src/utils/__tests__/sdk-event-handlers.test.ts +615 -0
- package/cli/src/utils/__tests__/send-message-helpers.test.ts +1875 -0
- package/cli/src/utils/__tests__/send-message-timer.test.ts +68 -0
- package/cli/src/utils/__tests__/settings.test.ts +138 -0
- package/cli/src/utils/__tests__/strings.test.ts +210 -0
- package/cli/src/utils/__tests__/syntax-theme.test.ts +91 -0
- package/cli/src/utils/__tests__/terminal-color-detection.test.ts +425 -0
- package/cli/src/utils/__tests__/terminal-enter-detection.test.ts +77 -0
- package/cli/src/utils/__tests__/text-layout.test.ts +82 -0
- package/cli/src/utils/__tests__/think-tag-parser.test.ts +159 -0
- package/cli/src/utils/__tests__/trace-writer.test.ts +193 -0
- package/cli/src/utils/__tests__/trim-chat-logs.test.ts +79 -0
- package/cli/src/utils/__tests__/usage-banner-state.test.ts +298 -0
- package/cli/src/utils/__tests__/validation-error-formatting.test.ts +126 -0
- package/cli/src/utils/__tests__/write-file-atomic.test.ts +130 -0
- package/cli/src/utils/active-run.ts +22 -0
- package/cli/src/utils/activity-tracker.ts +66 -0
- package/cli/src/utils/agent-display.ts +87 -0
- package/cli/src/utils/agent-helpers.ts +47 -0
- package/cli/src/utils/ai-message-id.ts +12 -0
- package/cli/src/utils/analytics.ts +407 -0
- package/cli/src/utils/anonymous-id.ts +87 -0
- package/cli/src/utils/arrays.ts +117 -0
- package/cli/src/utils/auth.ts +258 -0
- package/cli/src/utils/bash-context-processor.ts +47 -0
- package/cli/src/utils/bash-messages.ts +108 -0
- package/cli/src/utils/block-margins.ts +35 -0
- package/cli/src/utils/block-operations.ts +548 -0
- package/cli/src/utils/block-processor.ts +212 -0
- package/cli/src/utils/chat-history.ts +265 -0
- package/cli/src/utils/chat-input-key-intercept.ts +52 -0
- package/cli/src/utils/chat-layout.ts +44 -0
- package/cli/src/utils/chat-meta.ts +101 -0
- package/cli/src/utils/chat-scroll-accel.ts +151 -0
- package/cli/src/utils/chatgpt-oauth.ts +350 -0
- package/cli/src/utils/clipboard-image.ts +610 -0
- package/cli/src/utils/clipboard.ts +307 -0
- package/cli/src/utils/code-search-summary.ts +69 -0
- package/cli/src/utils/collapse-helpers.ts +265 -0
- package/cli/src/utils/config-dir.ts +30 -0
- package/cli/src/utils/constants.ts +159 -0
- package/cli/src/utils/create-event-handler-state.ts +79 -0
- package/cli/src/utils/create-run-config.ts +160 -0
- package/cli/src/utils/db-storage.ts +254 -0
- package/cli/src/utils/detect-shell.ts +112 -0
- package/cli/src/utils/directory-browser.ts +74 -0
- package/cli/src/utils/engagement.ts +55 -0
- package/cli/src/utils/env.ts +109 -0
- package/cli/src/utils/error-handling.ts +246 -0
- package/cli/src/utils/error-messages.ts +84 -0
- package/cli/src/utils/feedback-helpers.ts +115 -0
- package/cli/src/utils/feedback-submission.ts +24 -0
- package/cli/src/utils/fetch-usage.ts +75 -0
- package/cli/src/utils/fid-loader.ts +135 -0
- package/cli/src/utils/fingerprint.ts +263 -0
- package/cli/src/utils/finish-logic.ts +154 -0
- package/cli/src/utils/format-elapsed-time.ts +33 -0
- package/cli/src/utils/format-session-units.ts +6 -0
- package/cli/src/utils/format-timeout.ts +28 -0
- package/cli/src/utils/format-validation-errors-for-message.ts +85 -0
- package/cli/src/utils/git.ts +17 -0
- package/cli/src/utils/glyphs.ts +188 -0
- package/cli/src/utils/helpers.ts +47 -0
- package/cli/src/utils/image-display.ts +73 -0
- package/cli/src/utils/image-handler.ts +336 -0
- package/cli/src/utils/image-processor.ts +133 -0
- package/cli/src/utils/image-thumbnail.ts +83 -0
- package/cli/src/utils/implementor-helpers.ts +817 -0
- package/cli/src/utils/input-modes.ts +196 -0
- package/cli/src/utils/keyboard-actions.ts +394 -0
- package/cli/src/utils/keypad-keys.ts +47 -0
- package/cli/src/utils/layout-helpers.ts +36 -0
- package/cli/src/utils/lazy-response-ads.ts +1 -0
- package/cli/src/utils/loading-phrases.ts +68 -0
- package/cli/src/utils/local-agent-registry.ts +611 -0
- package/cli/src/utils/log-shipper.ts +116 -0
- package/cli/src/utils/logger.ts +435 -0
- package/cli/src/utils/markdown-renderer.tsx +1315 -0
- package/cli/src/utils/math.ts +3 -0
- package/cli/src/utils/message-block-helpers.ts +667 -0
- package/cli/src/utils/message-history.ts +153 -0
- package/cli/src/utils/message-tree-utils.ts +67 -0
- package/cli/src/utils/message-updater.ts +279 -0
- package/cli/src/utils/ollama-onboarding.ts +215 -0
- package/cli/src/utils/open-file.ts +144 -0
- package/cli/src/utils/open-url.ts +63 -0
- package/cli/src/utils/openrouter-models.ts +945 -0
- package/cli/src/utils/path-completion.ts +111 -0
- package/cli/src/utils/path-helpers.ts +38 -0
- package/cli/src/utils/pending-attachments.ts +363 -0
- package/cli/src/utils/post-processing.ts +99 -0
- package/cli/src/utils/project-picker.ts +12 -0
- package/cli/src/utils/provider-setup.ts +259 -0
- package/cli/src/utils/recent-projects.ts +156 -0
- package/cli/src/utils/renderer-cleanup.ts +142 -0
- package/cli/src/utils/response-ad-positions.ts +1 -0
- package/cli/src/utils/rewind.ts +175 -0
- package/cli/src/utils/run-state-storage.ts +480 -0
- package/cli/src/utils/savant-code-api.ts +686 -0
- package/cli/src/utils/savant-code-client.ts +217 -0
- package/cli/src/utils/savant-free-agent-selection.ts +12 -0
- package/cli/src/utils/savant-free-exit.ts +24 -0
- package/cli/src/utils/savant-free-instance-owner.ts +66 -0
- package/cli/src/utils/savant-free-model-navigation.ts +46 -0
- package/cli/src/utils/savant-free-premium-reset.ts +52 -0
- package/cli/src/utils/savant-free-referral-cache.ts +35 -0
- package/cli/src/utils/savant-free-session-display.ts +21 -0
- package/cli/src/utils/savant-free-streak-line.ts +67 -0
- package/cli/src/utils/sdk-event-handlers.ts +587 -0
- package/cli/src/utils/send-message-helpers.ts +199 -0
- package/cli/src/utils/send-message-timer.ts +110 -0
- package/cli/src/utils/settings.ts +388 -0
- package/cli/src/utils/skill-registry.ts +100 -0
- package/cli/src/utils/spawn-agent-matcher.ts +56 -0
- package/cli/src/utils/status-indicator-state.ts +100 -0
- package/cli/src/utils/stream-chunk-processor.ts +65 -0
- package/cli/src/utils/strings.ts +272 -0
- package/cli/src/utils/subscription.ts +31 -0
- package/cli/src/utils/syntax-highlighter.tsx +19 -0
- package/cli/src/utils/syntax-theme.ts +131 -0
- package/cli/src/utils/terminal-color-detection.ts +472 -0
- package/cli/src/utils/terminal-enter-detection.ts +63 -0
- package/cli/src/utils/terminal-images.ts +223 -0
- package/cli/src/utils/terminal-reset-sequences.ts +33 -0
- package/cli/src/utils/terminal-title.ts +113 -0
- package/cli/src/utils/terminal-watchdog.ts +246 -0
- package/cli/src/utils/text-layout.ts +153 -0
- package/cli/src/utils/theme-config.ts +143 -0
- package/cli/src/utils/theme-system.ts +1265 -0
- package/cli/src/utils/think-tag-parser.ts +105 -0
- package/cli/src/utils/trace-writer.ts +147 -0
- package/cli/src/utils/ui-constants.ts +69 -0
- package/cli/src/utils/usage-banner-state.ts +146 -0
- package/cli/src/utils/validation-error-formatting.ts +92 -0
- package/cli/src/utils/validation-error-helpers.ts +19 -0
- package/cli/src/utils/version.ts +23 -0
- package/cli/src/utils/word-wrap-utils.ts +53 -0
- package/cli/src/utils/write-file-atomic.ts +82 -0
- package/cli/src/utils/yield-to-event-loop.ts +9 -0
- package/cli/tsconfig.json +26 -0
- package/coding-standards/csharp.md +77 -0
- package/coding-standards/go.md +71 -0
- package/coding-standards/java.md +74 -0
- package/coding-standards/python.md +82 -0
- package/coding-standards/rust.md +78 -0
- package/coding-standards/typescript.md +85 -0
- package/coding-standards/x402.md +227 -0
- package/common/README.md +41 -0
- package/common/common_exit +1 -0
- package/common/package.json +45 -0
- package/common/src/__tests__/agent-validation.test.ts +861 -0
- package/common/src/__tests__/agents.test.ts +16 -0
- package/common/src/__tests__/dynamic-agent-template-schema.test.ts +420 -0
- package/common/src/__tests__/env-ci.test.ts +167 -0
- package/common/src/__tests__/env-process.test.ts +145 -0
- package/common/src/__tests__/free-agents.test.ts +269 -0
- package/common/src/__tests__/handlesteps-parsing.test.ts +247 -0
- package/common/src/__tests__/model-config.test.ts +41 -0
- package/common/src/__tests__/project-file-tree.test.ts +82 -0
- package/common/src/__tests__/response-ad-positions.test.ts +78 -0
- package/common/src/__tests__/savant-free-models.test.ts +460 -0
- package/common/src/__tests__/savant-free-referral-tiers.test.ts +122 -0
- package/common/src/__tests__/user-state.test.ts +30 -0
- package/common/src/actions.ts +215 -0
- package/common/src/analytics-core.ts +73 -0
- package/common/src/analytics.ts +96 -0
- package/common/src/api-keys/constants.ts +26 -0
- package/common/src/browser-actions.ts +414 -0
- package/common/src/constants/agents.ts +250 -0
- package/common/src/constants/analytics-events.ts +318 -0
- package/common/src/constants/anthropic.ts +72 -0
- package/common/src/constants/byok.ts +2 -0
- package/common/src/constants/chatgpt-oauth.ts +85 -0
- package/common/src/constants/composio.ts +34 -0
- package/common/src/constants/feedback.ts +18 -0
- package/common/src/constants/free-agents.ts +347 -0
- package/common/src/constants/gemini.ts +6 -0
- package/common/src/constants/grant-priorities.ts +13 -0
- package/common/src/constants/hosts.ts +6 -0
- package/common/src/constants/images.ts +53 -0
- package/common/src/constants/index.ts +8 -0
- package/common/src/constants/knowledge.ts +46 -0
- package/common/src/constants/limits.ts +23 -0
- package/common/src/constants/model-config.ts +469 -0
- package/common/src/constants/paths.ts +69 -0
- package/common/src/constants/savant-code-config.ts +12 -0
- package/common/src/constants/savant-free-gemini-thinker.ts +30 -0
- package/common/src/constants/savant-free-models.ts +855 -0
- package/common/src/constants/savant-free-referral-tiers.ts +169 -0
- package/common/src/constants/skills.ts +60 -0
- package/common/src/constants/subscription-plans.ts +54 -0
- package/common/src/constants/ui.ts +25 -0
- package/common/src/env-ci.ts +36 -0
- package/common/src/env-process.ts +95 -0
- package/common/src/env-schema.ts +42 -0
- package/common/src/env.ts +69 -0
- package/common/src/mcp/client.ts +308 -0
- package/common/src/old-constants.ts +10 -0
- package/common/src/project-file-tree.ts +361 -0
- package/common/src/reddit-capi.ts +175 -0
- package/common/src/schemas/feedback.ts +57 -0
- package/common/src/schemas/logs.ts +66 -0
- package/common/src/templates/agent-validation.ts +436 -0
- package/common/src/templates/initial-agents-dir/LICENSE +202 -0
- package/common/src/templates/initial-agents-dir/README.md +314 -0
- package/common/src/templates/initial-agents-dir/examples/01-basic-diff-reviewer.ts +17 -0
- package/common/src/templates/initial-agents-dir/examples/02-intermediate-git-committer.ts +78 -0
- package/common/src/templates/initial-agents-dir/examples/03-advanced-file-explorer.ts +76 -0
- package/common/src/templates/initial-agents-dir/my-custom-agent.ts +40 -0
- package/common/src/templates/initial-agents-dir/package.json +6 -0
- package/common/src/templates/initial-agents-dir/skills/README.md +66 -0
- package/common/src/templates/initial-agents-dir/skills/example-skill/SKILL.md +29 -0
- package/common/src/templates/initial-agents-dir/types/agent-definition.ts +484 -0
- package/common/src/templates/initial-agents-dir/types/tools.ts +452 -0
- package/common/src/templates/initial-agents-dir/types/util-types.ts +167 -0
- package/common/src/testing/TESTING_PATTERNS.md +353 -0
- package/common/src/testing/errors.ts +33 -0
- package/common/src/testing/fixtures/agent-runtime.ts +325 -0
- package/common/src/testing/impl/agent-runtime.ts +6 -0
- package/common/src/testing/index.ts +84 -0
- package/common/src/testing/mock-modules.ts +54 -0
- package/common/src/testing/mock-types.ts +123 -0
- package/common/src/testing/mocks/analytics.ts +262 -0
- package/common/src/testing/mocks/child-process.ts +93 -0
- package/common/src/testing/mocks/crypto.ts +218 -0
- package/common/src/testing/mocks/database.ts +337 -0
- package/common/src/testing/mocks/filesystem.ts +166 -0
- package/common/src/testing/mocks/index.ts +83 -0
- package/common/src/testing/mocks/logger.ts +136 -0
- package/common/src/testing/mocks/stream.ts +314 -0
- package/common/src/testing/mocks/timers.ts +132 -0
- package/common/src/testing/mocks/tree-sitter.ts +127 -0
- package/common/src/testing/setup.ts +282 -0
- package/common/src/testing-env-ci.ts +15 -0
- package/common/src/testing-env-process.ts +78 -0
- package/common/src/tools/__tests__/compile-tool-definitions.test.ts +34 -0
- package/common/src/tools/__tests__/thought-session.test.ts +256 -0
- package/common/src/tools/compile-tool-definitions.ts +194 -0
- package/common/src/tools/constants.ts +132 -0
- package/common/src/tools/list.ts +193 -0
- package/common/src/tools/params/__tests__/coerce-to-array.test.ts +237 -0
- package/common/src/tools/params/__tests__/sequential-thinking-coercion.test.ts +98 -0
- package/common/src/tools/params/tool/add-message.ts +36 -0
- package/common/src/tools/params/tool/add-subgoal.ts +57 -0
- package/common/src/tools/params/tool/apply-patch.ts +110 -0
- package/common/src/tools/params/tool/ask-user.ts +181 -0
- package/common/src/tools/params/tool/browser-logs.ts +85 -0
- package/common/src/tools/params/tool/code-search.ts +144 -0
- package/common/src/tools/params/tool/composio.ts +131 -0
- package/common/src/tools/params/tool/create-plan.ts +80 -0
- package/common/src/tools/params/tool/end-turn.ts +54 -0
- package/common/src/tools/params/tool/find-files.ts +60 -0
- package/common/src/tools/params/tool/glob.ts +74 -0
- package/common/src/tools/params/tool/gravity-index.ts +92 -0
- package/common/src/tools/params/tool/list-directory.ts +58 -0
- package/common/src/tools/params/tool/lookup-agent-info.ts +37 -0
- package/common/src/tools/params/tool/propose-str-replace.ts +103 -0
- package/common/src/tools/params/tool/propose-write-file.ts +71 -0
- package/common/src/tools/params/tool/read-docs.ts +85 -0
- package/common/src/tools/params/tool/read-files.ts +61 -0
- package/common/src/tools/params/tool/read-subtree.ts +83 -0
- package/common/src/tools/params/tool/read-url.ts +81 -0
- package/common/src/tools/params/tool/render-ui.ts +203 -0
- package/common/src/tools/params/tool/run-file-change-hooks.ts +57 -0
- package/common/src/tools/params/tool/run-readonly-command.ts +76 -0
- package/common/src/tools/params/tool/run-terminal-command.ts +185 -0
- package/common/src/tools/params/tool/sequential-thinking.ts +110 -0
- package/common/src/tools/params/tool/set-messages.ts +42 -0
- package/common/src/tools/params/tool/set-output.ts +62 -0
- package/common/src/tools/params/tool/set-scaffold-complete.ts +51 -0
- package/common/src/tools/params/tool/skill.ts +56 -0
- package/common/src/tools/params/tool/spawn-agent-inline.ts +57 -0
- package/common/src/tools/params/tool/spawn-agents.ts +154 -0
- package/common/src/tools/params/tool/str-replace.ts +107 -0
- package/common/src/tools/params/tool/suggest-followups.ts +94 -0
- package/common/src/tools/params/tool/task-completed.ts +58 -0
- package/common/src/tools/params/tool/think-deeply.ts +53 -0
- package/common/src/tools/params/tool/transition-phase.ts +57 -0
- package/common/src/tools/params/tool/update-subgoal.ts +89 -0
- package/common/src/tools/params/tool/web-search.ts +73 -0
- package/common/src/tools/params/tool/write-file.ts +71 -0
- package/common/src/tools/params/tool/write-todos.ts +67 -0
- package/common/src/tools/params/utils.ts +152 -0
- package/common/src/tools/safety-registry.ts +274 -0
- package/common/src/tools/safety.ts +42 -0
- package/common/src/tools/sequential-thinking.ts +340 -0
- package/common/src/tools/utils.ts +25 -0
- package/common/src/types/__tests__/dynamic-agent-template.test.ts +20 -0
- package/common/src/types/agent-template.ts +223 -0
- package/common/src/types/api/agents/publish.ts +63 -0
- package/common/src/types/contracts/agent-runtime.ts +84 -0
- package/common/src/types/contracts/analytics.ts +12 -0
- package/common/src/types/contracts/bigquery.ts +55 -0
- package/common/src/types/contracts/billing.ts +46 -0
- package/common/src/types/contracts/client.ts +52 -0
- package/common/src/types/contracts/database.ts +104 -0
- package/common/src/types/contracts/env.ts +203 -0
- package/common/src/types/contracts/llm.ts +183 -0
- package/common/src/types/contracts/logger.ts +29 -0
- package/common/src/types/contracts/logs.ts +34 -0
- package/common/src/types/contracts/trace.ts +21 -0
- package/common/src/types/dynamic-agent-template.ts +290 -0
- package/common/src/types/filesystem.ts +10 -0
- package/common/src/types/function-params.ts +35 -0
- package/common/src/types/grant.ts +20 -0
- package/common/src/types/gravity-index.ts +170 -0
- package/common/src/types/json.ts +26 -0
- package/common/src/types/mcp.ts +26 -0
- package/common/src/types/messages/content-part.ts +59 -0
- package/common/src/types/messages/data-content.ts +14 -0
- package/common/src/types/messages/provider-metadata.ts +10 -0
- package/common/src/types/messages/savant-code-message.ts +55 -0
- package/common/src/types/organization.ts +118 -0
- package/common/src/types/print-mode.ts +167 -0
- package/common/src/types/publisher.ts +67 -0
- package/common/src/types/savant-free-session.ts +295 -0
- package/common/src/types/savant-free-streak.ts +6 -0
- package/common/src/types/session-state.ts +237 -0
- package/common/src/types/skill.ts +56 -0
- package/common/src/types/source.ts +11 -0
- package/common/src/types/spawn.ts +13 -0
- package/common/src/types/subscription.ts +68 -0
- package/common/src/types/usage.ts +16 -0
- package/common/src/types/util.ts +3 -0
- package/common/src/util/__tests__/analytics-dispatcher.test.ts +145 -0
- package/common/src/util/__tests__/analytics-log.test.ts +110 -0
- package/common/src/util/__tests__/analytics-sampling.test.ts +131 -0
- package/common/src/util/__tests__/axiom-only-log.test.ts +64 -0
- package/common/src/util/__tests__/engagement-tracker.test.ts +115 -0
- package/common/src/util/__tests__/error-abort.test.ts +822 -0
- package/common/src/util/__tests__/error-api-details.test.ts +190 -0
- package/common/src/util/__tests__/format-code-search.test.ts +60 -0
- package/common/src/util/__tests__/log-mirror.test.ts +31 -0
- package/common/src/util/__tests__/messages.test.ts +1118 -0
- package/common/src/util/__tests__/partial-json-delta.test.ts +505 -0
- package/common/src/util/__tests__/paths.test.ts +289 -0
- package/common/src/util/__tests__/promise.test.ts +334 -0
- package/common/src/util/__tests__/protocol-config.test.ts +119 -0
- package/common/src/util/__tests__/rate-limit.test.ts +28 -0
- package/common/src/util/__tests__/reddit-savant-free-retention.test.ts +120 -0
- package/common/src/util/__tests__/savant-free-streak.test.ts +142 -0
- package/common/src/util/__tests__/saxy.test.ts +1008 -0
- package/common/src/util/__tests__/string.test.ts +238 -0
- package/common/src/util/__tests__/zoned-time.test.ts +88 -0
- package/common/src/util/agent-file-utils.ts +110 -0
- package/common/src/util/agent-id-parsing.ts +147 -0
- package/common/src/util/agent-name-normalization.ts +39 -0
- package/common/src/util/analytics-dispatcher.ts +81 -0
- package/common/src/util/analytics-log.ts +84 -0
- package/common/src/util/analytics-sampling.ts +225 -0
- package/common/src/util/array.ts +63 -0
- package/common/src/util/axiom-only-log.ts +79 -0
- package/common/src/util/cache-debug.ts +191 -0
- package/common/src/util/credentials.ts +12 -0
- package/common/src/util/currency.ts +25 -0
- package/common/src/util/dates.ts +81 -0
- package/common/src/util/engagement-tracker.ts +133 -0
- package/common/src/util/error.ts +580 -0
- package/common/src/util/file.ts +363 -0
- package/common/src/util/format-code-search.ts +115 -0
- package/common/src/util/lazy-response-ads.ts +93 -0
- package/common/src/util/log-data.ts +57 -0
- package/common/src/util/log-mirror.ts +34 -0
- package/common/src/util/lru-cache.ts +67 -0
- package/common/src/util/messages.ts +600 -0
- package/common/src/util/model-utils.ts +25 -0
- package/common/src/util/object.ts +137 -0
- package/common/src/util/param-helpers.ts +49 -0
- package/common/src/util/partial-json-delta.ts +100 -0
- package/common/src/util/paths.ts +194 -0
- package/common/src/util/promise.ts +87 -0
- package/common/src/util/protocol-config.ts +141 -0
- package/common/src/util/random.ts +15 -0
- package/common/src/util/rate-limit.ts +56 -0
- package/common/src/util/reddit-capi-events.ts +40 -0
- package/common/src/util/reddit-savant-free-retention.ts +69 -0
- package/common/src/util/response-ad-positions.ts +54 -0
- package/common/src/util/savant-free-privacy.ts +78 -0
- package/common/src/util/savant-free-streak.ts +153 -0
- package/common/src/util/saxy.ts +739 -0
- package/common/src/util/skills.ts +32 -0
- package/common/src/util/stop-sequence.ts +60 -0
- package/common/src/util/string.ts +419 -0
- package/common/src/util/system-info.ts +51 -0
- package/common/src/util/type-narrowing.ts +125 -0
- package/common/src/util/xml.ts +17 -0
- package/common/src/util/zod-schema.ts +80 -0
- package/common/src/util/zoned-time.ts +136 -0
- package/common/src/utils/ask-user-bridge.ts +47 -0
- package/common/tsconfig.json +8 -0
- package/database.db +0 -0
- package/dev/LEARNINGS.md +309 -0
- package/dev/fids/.gitkeep +0 -0
- package/dev/fids/archive/.gitkeep +0 -0
- package/dev/fids/archive/FID-2026-0802-008-sdk-package-audit-client-run-run-state.md +238 -0
- package/dev/fids/archive/FID-2026-0803-001-echo-enforcement-layer-drift.md +404 -0
- package/dev/fids/archive/FID-2026-0803-002-llm-providers-database-audit.md +348 -0
- package/dev/fids/archive/FID-2026-0803-003-sdk-impl-common-util-audit.md +277 -0
- package/dev/fids/archive/FID-2026-0803-004-checkpoint-rewind.md +181 -0
- package/dev/fids/archive/FID-2026-0803-005-quality-scan-hygiene-fixes.md +265 -0
- package/dev/fids/archive/FID-2026-0803-006-code-map-audit-hygiene.md +243 -0
- package/dev/fids/archive/FID-2026-0803-007-evals-benchmark-audit-hygiene.md +296 -0
- package/dev/fids/archive/FID-2026-0803-009-echo-enforcement-doc-drift.md +112 -0
- package/dev/fids/archive/FID-2026-0803-010-database-llm-providers-low-fixes.md +255 -0
- package/dev/fids/archive/FID-2026-0803-011-build-artifact-hygiene.md +169 -0
- package/dev/fids/archive/FID-2026-0803-012-release-readiness-audit.md +162 -0
- package/dev/fids/archive/FID-2026-0803-013-agent-roster-over-reporting.md +146 -0
- package/dev/fids/archive/FID-2026-0803-014-freebuff-to-savant-rebrand-sweep.md +185 -0
- package/dev/nova/reports/2026-08-02-top-25-ai-inference-providers-competitive-intel.md +213 -0
- package/dev/nova/specs/echo-v0.1.2-freebuff.md +391 -0
- package/dev/nova/specs/goal-loop-feature-spec.md +245 -0
- package/dev/nova/specs/launch-strategy-research-prompt.md +88 -0
- package/dev/releases/README.md +50 -0
- package/dev/scratchpad/.gitkeep +0 -0
- package/dev/session-summaries/.gitkeep +0 -0
- package/dev/session-summaries/2026-07-16-1255.md +128 -0
- package/dev/session-summaries/2026-07-17-1000.md +64 -0
- package/dev/session-summaries/2026-07-19-eslint-zero-tolerance-cleanup.md +145 -0
- package/dev/session-summaries/2026-07-19-fid-026-debugging-and-rename.md +79 -0
- package/dev/session-summaries/2026-07-19-fid-026-phase-b-rebrand.md +76 -0
- package/dev/session-summaries/2026-07-19-fid-027-clean-break.md +47 -0
- package/dev/session-summaries/2026-07-19-pre-push-house-cleaning.md +100 -0
- package/dev/session-summaries/2026-07-19-v0.0.2-release-session.md +229 -0
- package/dev/session-summaries/2026-07-20-1805-fid-loop-closure.md +95 -0
- package/dev/session-summaries/2026-07-22-1800.md +52 -0
- package/dev/session-summaries/2026-07-23-fsm-optimization.md +88 -0
- package/dev/session-summaries/2026-07-25-0000.md +80 -0
- package/dev/session-summaries/2026-07-25-1200-context-compaction.md +154 -0
- package/dev/session-summaries/2026-07-25-1600-layer4-reactive-compact.md +96 -0
- package/dev/session-summaries/2026-07-25-1700-dev-folder-audit.md +161 -0
- package/dev/session-summaries/2026-07-25-2000-benchmark-v2-filters.md +147 -0
- package/dev/session-summaries/2026-07-25-2000.md +77 -0
- package/dev/session-summaries/2026-07-27-0000.md +63 -0
- package/dev/session-summaries/2026-07-28-history-capture-handoff.md +206 -0
- package/dev/session-summaries/2026-07-31-freebuff-echo-compliance-remediation.md +156 -0
- package/dev/session-summaries/2026-07-31-pre-launch-optimization-execution.md +46 -0
- package/dev/session-summaries/2026-0721-1800.md +44 -0
- package/dev/session-summaries/2026-08-01-sidebar-folded-startup.md +159 -0
- package/dev/session-summaries/2026-08-02-0.0.15-release-closeout.md +32 -0
- package/dev/session-summaries/2026-08-02-repository-hygiene.md +51 -0
- package/dev/session-summaries/2026-08-03-agent-roster-fix-and-ready-check-closeout.md +73 -0
- package/dev/session-summaries/2026-08-03-build-artifact-hygiene-closeout.md +40 -0
- package/dev/session-summaries/2026-08-03-code-map-audit-closeout.md +44 -0
- package/dev/session-summaries/2026-08-03-database-llm-providers-low-fixes-closeout.md +47 -0
- package/dev/session-summaries/2026-08-03-echo-enforcement-doc-drift-closeout.md +43 -0
- package/dev/session-summaries/2026-08-03-evals-benchmark-audit-closeout.md +50 -0
- package/dev/session-summaries/2026-08-03-quality-scan-hygiene-fixes-closeout.md +57 -0
- package/dev/session-summaries/2026-08-03-quality-session-checkpoint-rewind-closeout.md +56 -0
- package/dev/session-summaries/2026-08-03-release-readiness-audit-closeout.md +60 -0
- package/dev/test-prompts/archive/0.0.2-final-pass.md +209 -0
- package/dev/test-prompts/archive/agent-capabilities-full-test.md +361 -0
- package/dev/test-prompts/archive/agent-capabilities-test.md +471 -0
- package/dev/test-prompts/archive/comprehensive-az-system-test-v1.md +441 -0
- package/dev/test-prompts/archive/comprehensive-az-system-test-v2-report.md +377 -0
- package/dev/test-prompts/archive/comprehensive-az-system-test-v2.md +544 -0
- package/dev/test-prompts/archive/comprehensive-az-system-test.md +396 -0
- package/dev/test-prompts/archive/comprehensive-az-test-final.md +900 -0
- package/dev/test-prompts/archive/comprehensive-az-test-v11.md +141 -0
- package/dev/test-prompts/archive/comprehensive-az-test-v12.md +29 -0
- package/dev/test-prompts/archive/comprehensive-az-test-v6.md +631 -0
- package/dev/test-prompts/archive/comprehensive-az-test-v7.md +625 -0
- package/dev/test-prompts/archive/fid-007-ability-confirmation.md +248 -0
- package/dev/test-prompts/archive/fid-2026-0801-006-thinker-tool-call-boundary.md +86 -0
- package/dev/test-prompts/archive/fid-2026-0801-007-child-tool-set-fallback-cli.md +101 -0
- package/dev/test-prompts/archive/fid-2026-0801-008-provider-tool-call-accumulation-cli.md +111 -0
- package/dev/test-prompts/archive/fid-2026-0801-012-thinker-state-output-cli.md +134 -0
- package/dev/test-prompts/archive/gemini-deep-research-sidebar-highlight.md +598 -0
- package/dev/test-prompts/archive/goal-loop-cli-test.md +142 -0
- package/dev/test-prompts/archive/rebrand-qa.md +258 -0
- package/dev/test-prompts/archive/release-az-test-fid-085.md +306 -0
- package/dev/test-prompts/archive/release-az-test-fid-087.md +219 -0
- package/dev/test-prompts/archive/release-az-test-fid-2026-0726-001.md +270 -0
- package/dev/test-prompts/archive/release-az-test-fid-2026-0728-008.md +213 -0
- package/dev/test-prompts/archive/release-az-test-fid-2026-0728-launch-tracks.md +253 -0
- package/dev/test-prompts/archive/release-az-test-fid-2026-0731-pre-launch.md +102 -0
- package/docs/AI Coding Agents Market Research.md +516 -0
- package/docs/Agent Harness Feature Pairing Research.md +166 -0
- package/docs/CLI Agent Inference Backend Research.md +446 -0
- package/docs/Codebuff Rebranding And Migration Plan.md +418 -0
- package/docs/ECHO-EVOLUTION-ARCH.md +77 -0
- package/docs/Harness Engineering for Coding Agents Research.md +196 -0
- package/docs/Launch Plan Review and Optimization.md +178 -0
- package/docs/OpenTUI Sidebar Bug Fix.md +245 -0
- package/docs/SAVANT-VERSIONING.md +31 -0
- package/docs/Savant Code Launch Strategy.md +270 -0
- package/docs/Savant-Code Business And Backend Research.md +222 -0
- package/docs/agents-and-tools.md +217 -0
- package/docs/cloudflare-llms-full.md +9623 -0
- package/docs/design/OpenTUI Terminal Visualization Guide.md +471 -0
- package/docs/design/database-architecture.md +217 -0
- package/docs/design/deep-research-report.md +295 -0
- package/docs/design/thinker-sequentialthinking-regression-diagnostic.md +366 -0
- package/docs/discord-server-design.md +167 -0
- package/docs/gravity-integration-starter.md +202 -0
- package/docs/launch/hn-first-comment.md +44 -0
- package/docs/launch/hn-post.md +35 -0
- package/docs/launch/incident-response.md +88 -0
- package/docs/launch/landing/index.html +233 -0
- package/docs/launch/mastodon-thread.md +52 -0
- package/docs/launch/newsletter-pitch.md +49 -0
- package/docs/launch/twitter-thread.md +62 -0
- package/docs/privacy.md +186 -0
- package/docs/reports/Savant-Code Benchmark Specification.md +206 -0
- package/docs/reports/Thinker Agent Architecture Research.md +284 -0
- package/docs/reports/adoptable-features-2026-07-25.md +604 -0
- package/docs/reports/adoptable-features-master.md +480 -0
- package/docs/reports/codebuff-discord-feedback.md +43 -0
- package/docs/reports/feature-parity-report.md +810 -0
- package/docs/reports/repos/AionUi.md +75 -0
- package/docs/reports/repos/OpenHands.md +76 -0
- package/docs/reports/repos/SWE-agent.md +82 -0
- package/docs/reports/repos/agno.md +89 -0
- package/docs/reports/repos/aider.md +74 -0
- package/docs/reports/repos/cline.md +83 -0
- package/docs/reports/repos/codex.md +83 -0
- package/docs/reports/repos/gemini-cli.md +92 -0
- package/docs/reports/repos/goose.md +65 -0
- package/docs/reports/repos/gpt-pilot.md +52 -0
- package/docs/reports/repos/hermes-agent.md +101 -0
- package/docs/reports/repos/kilocode.md +79 -0
- package/docs/reports/repos/openclaude.md +99 -0
- package/docs/reports/repos/openclaw.md +100 -0
- package/docs/reports/repos/opencode-dev.md +78 -0
- package/docs/reports/repos/zero.md +123 -0
- package/docs/reports/savant-code-benchmark-v2-2026-08-03.md +76 -0
- package/docs/savant-code-modes.md +338 -0
- package/docs/testing.md +51 -0
- package/docs/visual-mockup-neon-slate.txt +41 -0
- package/eslint.config.js +211 -0
- package/evals/README.md +45 -0
- package/evals/benchmark/README.md +449 -0
- package/evals/benchmark/agent-runner.ts +217 -0
- package/evals/benchmark/analyze-task-scores.ts +496 -0
- package/evals/benchmark/eval-codebuff-hard.json +3343 -0
- package/evals/benchmark/eval-codebuff.json +3193 -0
- package/evals/benchmark/eval-codebuff2.json +2494 -0
- package/evals/benchmark/eval-manifold-hard.json +2525 -0
- package/evals/benchmark/eval-manifold.json +1675 -0
- package/evals/benchmark/eval-manifold2.json +1945 -0
- package/evals/benchmark/eval-plane-hard.json +4372 -0
- package/evals/benchmark/eval-plane.json +2028 -0
- package/evals/benchmark/eval-plane2.json +3517 -0
- package/evals/benchmark/eval-saleor-hard.json +6081 -0
- package/evals/benchmark/eval-saleor.json +1829 -0
- package/evals/benchmark/eval-saleor2.json +3273 -0
- package/evals/benchmark/eval-task-generator.ts +158 -0
- package/evals/benchmark/filter-supplemental-files.ts +225 -0
- package/evals/benchmark/format-output.ts +215 -0
- package/evals/benchmark/gen-evals.ts +294 -0
- package/evals/benchmark/gen-repo-eval.ts +71 -0
- package/evals/benchmark/judge.ts +308 -0
- package/evals/benchmark/lessons-extractor.ts +247 -0
- package/evals/benchmark/main-hard-tasks.ts +49 -0
- package/evals/benchmark/main-single-eval.ts +23 -0
- package/evals/benchmark/main.ts +29 -0
- package/evals/benchmark/meta-analyzer.ts +329 -0
- package/evals/benchmark/pick-commits.ts +627 -0
- package/evals/benchmark/run-benchmark.ts +657 -0
- package/evals/benchmark/runners/claude.ts +176 -0
- package/evals/benchmark/runners/codex.ts +143 -0
- package/evals/benchmark/runners/index.ts +4 -0
- package/evals/benchmark/runners/opencode.ts +253 -0
- package/evals/benchmark/runners/runner.ts +13 -0
- package/evals/benchmark/runners/savant.ts +148 -0
- package/evals/benchmark/setup-test-repo.ts +314 -0
- package/evals/benchmark/trace-analyzer.ts +257 -0
- package/evals/benchmark/trace-utils.ts +80 -0
- package/evals/benchmark/types.ts +83 -0
- package/evals/bunfig.toml +4 -0
- package/evals/logger.ts +87 -0
- package/evals/package.json +31 -0
- package/evals/subagents/test-repo-utils.ts +131 -0
- package/evals/tsconfig.json +13 -0
- package/evals/v2/README.md +149 -0
- package/evals/v2/reports/report.json +261 -0
- package/evals/v2/reports/report.md +15 -0
- package/evals/v2/schema/task.schema.json +172 -0
- package/evals/v2/src/cli.ts +216 -0
- package/evals/v2/src/golden.ts +73 -0
- package/evals/v2/src/harness.ts +293 -0
- package/evals/v2/src/metrics.ts +326 -0
- package/evals/v2/src/registry.ts +179 -0
- package/evals/v2/src/reports.ts +126 -0
- package/evals/v2/src/runner.ts +143 -0
- package/evals/v2/src/runners/savant.ts +105 -0
- package/evals/v2/src/sandbox.ts +42 -0
- package/evals/v2/src/sandboxes/docker.ts +49 -0
- package/evals/v2/src/sandboxes/tempdir.ts +120 -0
- package/evals/v2/src/schema.ts +83 -0
- package/evals/v2/src/trace.ts +186 -0
- package/evals/v2/src/verify.ts +199 -0
- package/evals/v2/tasks/error_recovery/env-fault/calculator.js +11 -0
- package/evals/v2/tasks/error_recovery/env-fault/calculator.test.js +15 -0
- package/evals/v2/tasks/error_recovery/env-fault/golden.patch +15 -0
- package/evals/v2/tasks/error_recovery/env-fault/task.yaml +20 -0
- package/evals/v2/tasks/multi_agent_orchestration/options-contract/app.js +5 -0
- package/evals/v2/tasks/multi_agent_orchestration/options-contract/app.test.js +7 -0
- package/evals/v2/tasks/multi_agent_orchestration/options-contract/golden.patch +19 -0
- package/evals/v2/tasks/multi_agent_orchestration/options-contract/greet.js +3 -0
- package/evals/v2/tasks/multi_agent_orchestration/options-contract/orchestration.test.js +30 -0
- package/evals/v2/tasks/multi_agent_orchestration/options-contract/task.yaml +29 -0
- package/evals/v2/tasks/pure_coding/add-fix/add.js +3 -0
- package/evals/v2/tasks/pure_coding/add-fix/add.test.js +11 -0
- package/evals/v2/tasks/pure_coding/add-fix/golden.patch +7 -0
- package/evals/v2/tasks/pure_coding/add-fix/task.yaml +20 -0
- package/evals/v2/tasks/pure_coding/rename-greet/app.js +5 -0
- package/evals/v2/tasks/pure_coding/rename-greet/app.test.js +32 -0
- package/evals/v2/tasks/pure_coding/rename-greet/golden.patch +19 -0
- package/evals/v2/tasks/pure_coding/rename-greet/greet.js +5 -0
- package/evals/v2/tasks/pure_coding/rename-greet/task.yaml +21 -0
- package/evals/v2/tests/golden.test.ts +104 -0
- package/evals/v2/tests/harness.test.ts +204 -0
- package/evals/v2/tests/metrics.test.ts +353 -0
- package/evals/v2/tests/registry.test.ts +210 -0
- package/evals/v2/tests/reports.test.ts +218 -0
- package/evals/v2/tests/savant-runner.test.ts +218 -0
- package/evals/v2/tests/schema.test.ts +127 -0
- package/evals/v2/tests/tempdir-sandbox.test.ts +49 -0
- package/evals/v2/tests/trace.test.ts +76 -0
- package/evals/v2/tests/verify.test.ts +224 -0
- package/license +202 -0
- package/package.json +71 -44
- package/packages/agent-runtime/README.md +46 -0
- package/packages/agent-runtime/agent_exit +1 -0
- package/packages/agent-runtime/bunfig.toml +2 -0
- package/packages/agent-runtime/package.json +34 -0
- package/packages/agent-runtime/src/__tests__/apply-patch-tool.test.ts +202 -0
- package/packages/agent-runtime/src/__tests__/cost-aggregation.test.ts +397 -0
- package/packages/agent-runtime/src/__tests__/generate-diffs-prompt.test.ts +107 -0
- package/packages/agent-runtime/src/__tests__/get-file-reading-updates.test.ts +59 -0
- package/packages/agent-runtime/src/__tests__/gravity-index-tool.test.ts +501 -0
- package/packages/agent-runtime/src/__tests__/loop-agent-steps.test.ts +1512 -0
- package/packages/agent-runtime/src/__tests__/main-prompt.test.ts +452 -0
- package/packages/agent-runtime/src/__tests__/n-parameter.test.ts +984 -0
- package/packages/agent-runtime/src/__tests__/process-file-block.test.ts +196 -0
- package/packages/agent-runtime/src/__tests__/process-str-replace.test.ts +512 -0
- package/packages/agent-runtime/src/__tests__/programmatic-tool-authorization.test.ts +219 -0
- package/packages/agent-runtime/src/__tests__/prompt-caching-subagents.test.ts +749 -0
- package/packages/agent-runtime/src/__tests__/prompts-schema-handling.test.ts +454 -0
- package/packages/agent-runtime/src/__tests__/propose-tools.test.ts +824 -0
- package/packages/agent-runtime/src/__tests__/read-docs-tool.test.ts +394 -0
- package/packages/agent-runtime/src/__tests__/run-agent-step-prefill.test.ts +161 -0
- package/packages/agent-runtime/src/__tests__/run-agent-step-tools.test.ts +612 -0
- package/packages/agent-runtime/src/__tests__/run-programmatic-step.test.ts +1743 -0
- package/packages/agent-runtime/src/__tests__/sandbox-generator.test.ts +154 -0
- package/packages/agent-runtime/src/__tests__/spawn-agents-image-content.test.ts +354 -0
- package/packages/agent-runtime/src/__tests__/spawn-agents-message-history.test.ts +280 -0
- package/packages/agent-runtime/src/__tests__/spawn-agents-permissions.test.ts +664 -0
- package/packages/agent-runtime/src/__tests__/stream-parser-abort.test.ts +250 -0
- package/packages/agent-runtime/src/__tests__/stream-parser-reasoning.test.ts +194 -0
- package/packages/agent-runtime/src/__tests__/subagent-streaming.test.ts +230 -0
- package/packages/agent-runtime/src/__tests__/test-utils.ts +96 -0
- package/packages/agent-runtime/src/__tests__/thinker-convergence-gate.test.ts +242 -0
- package/packages/agent-runtime/src/__tests__/to-token-count-input-schema.test.ts +81 -0
- package/packages/agent-runtime/src/__tests__/tool-executor-sandbox.test.ts +167 -0
- package/packages/agent-runtime/src/__tests__/tool-stream-parser.test.ts +682 -0
- package/packages/agent-runtime/src/__tests__/tool-validation-error.test.ts +1380 -0
- package/packages/agent-runtime/src/__tests__/web-search-tool.test.ts +402 -0
- package/packages/agent-runtime/src/__tests__/xml-tool-result-ordering.test.ts +264 -0
- package/packages/agent-runtime/src/constants.ts +12 -0
- package/packages/agent-runtime/src/context-compactor.ts +425 -0
- package/packages/agent-runtime/src/find-files/__tests__/request-files-prompt.test.ts +190 -0
- package/packages/agent-runtime/src/find-files/custom-file-picker-config.ts +61 -0
- package/packages/agent-runtime/src/find-files/request-files-prompt.ts +462 -0
- package/packages/agent-runtime/src/generate-diffs-prompt.ts +38 -0
- package/packages/agent-runtime/src/get-file-reading-updates.ts +27 -0
- package/packages/agent-runtime/src/llm-api/__tests__/gemini-with-fallbacks.test.ts +267 -0
- package/packages/agent-runtime/src/llm-api/__tests__/serper-api.test.ts +297 -0
- package/packages/agent-runtime/src/llm-api/claude.ts +7 -0
- package/packages/agent-runtime/src/llm-api/context7-api.ts +290 -0
- package/packages/agent-runtime/src/llm-api/gemini-with-fallbacks.ts +104 -0
- package/packages/agent-runtime/src/llm-api/savant-code-web-api.ts +370 -0
- package/packages/agent-runtime/src/llm-api/serper-api.ts +193 -0
- package/packages/agent-runtime/src/main-prompt.ts +251 -0
- package/packages/agent-runtime/src/mcp-constants.ts +12 -0
- package/packages/agent-runtime/src/mcp.ts +83 -0
- package/packages/agent-runtime/src/process-file-block.ts +118 -0
- package/packages/agent-runtime/src/process-str-replace.ts +213 -0
- package/packages/agent-runtime/src/prompt-agent-stream.ts +119 -0
- package/packages/agent-runtime/src/run-agent-step.ts +1632 -0
- package/packages/agent-runtime/src/run-programmatic-step.ts +633 -0
- package/packages/agent-runtime/src/system-prompt/prompts.ts +215 -0
- package/packages/agent-runtime/src/system-prompt/search-system-prompt.ts +89 -0
- package/packages/agent-runtime/src/system-prompt/truncate-file-tree.ts +414 -0
- package/packages/agent-runtime/src/templates/README.md +160 -0
- package/packages/agent-runtime/src/templates/__tests__/agent-registry.test.ts +489 -0
- package/packages/agent-runtime/src/templates/__tests__/strings.test.ts +465 -0
- package/packages/agent-runtime/src/templates/agent-registry.ts +122 -0
- package/packages/agent-runtime/src/templates/prompts.ts +189 -0
- package/packages/agent-runtime/src/templates/strings.ts +292 -0
- package/packages/agent-runtime/src/templates/types.ts +61 -0
- package/packages/agent-runtime/src/tool-stream-parser.ts +260 -0
- package/packages/agent-runtime/src/tools/filter-tool-set.ts +18 -0
- package/packages/agent-runtime/src/tools/handlers/__tests__/glob.test.ts +331 -0
- package/packages/agent-runtime/src/tools/handlers/__tests__/read-subtree.test.ts +346 -0
- package/packages/agent-runtime/src/tools/handlers/__tests__/run-readonly-command.test.ts +284 -0
- package/packages/agent-runtime/src/tools/handlers/handler-function-type.ts +77 -0
- package/packages/agent-runtime/src/tools/handlers/list.ts +105 -0
- package/packages/agent-runtime/src/tools/handlers/tool/__tests__/checkpoint-store.test.ts +394 -0
- package/packages/agent-runtime/src/tools/handlers/tool/__tests__/skill.test.ts +98 -0
- package/packages/agent-runtime/src/tools/handlers/tool/__tests__/write-file.test.ts +24 -0
- package/packages/agent-runtime/src/tools/handlers/tool/add-message.ts +37 -0
- package/packages/agent-runtime/src/tools/handlers/tool/add-subgoal.ts +30 -0
- package/packages/agent-runtime/src/tools/handlers/tool/apply-patch.ts +120 -0
- package/packages/agent-runtime/src/tools/handlers/tool/ask-user.ts +25 -0
- package/packages/agent-runtime/src/tools/handlers/tool/browser-logs.ts +21 -0
- package/packages/agent-runtime/src/tools/handlers/tool/checkpoint-store.ts +378 -0
- package/packages/agent-runtime/src/tools/handlers/tool/code-search.ts +21 -0
- package/packages/agent-runtime/src/tools/handlers/tool/composio.ts +52 -0
- package/packages/agent-runtime/src/tools/handlers/tool/create-plan.ts +63 -0
- package/packages/agent-runtime/src/tools/handlers/tool/end-turn.ts +15 -0
- package/packages/agent-runtime/src/tools/handlers/tool/find-files.ts +161 -0
- package/packages/agent-runtime/src/tools/handlers/tool/glob.ts +22 -0
- package/packages/agent-runtime/src/tools/handlers/tool/gravity-index.ts +230 -0
- package/packages/agent-runtime/src/tools/handlers/tool/list-directory.ts +22 -0
- package/packages/agent-runtime/src/tools/handlers/tool/lookup-agent-info.ts +105 -0
- package/packages/agent-runtime/src/tools/handlers/tool/propose-str-replace.ts +111 -0
- package/packages/agent-runtime/src/tools/handlers/tool/propose-write-file.ts +89 -0
- package/packages/agent-runtime/src/tools/handlers/tool/proposed-content-store.ts +64 -0
- package/packages/agent-runtime/src/tools/handlers/tool/read-docs.ts +160 -0
- package/packages/agent-runtime/src/tools/handlers/tool/read-files.ts +43 -0
- package/packages/agent-runtime/src/tools/handlers/tool/read-subtree.ts +198 -0
- package/packages/agent-runtime/src/tools/handlers/tool/read-url.ts +21 -0
- package/packages/agent-runtime/src/tools/handlers/tool/render-ui.ts +15 -0
- package/packages/agent-runtime/src/tools/handlers/tool/run-file-change-hooks.ts +20 -0
- package/packages/agent-runtime/src/tools/handlers/tool/run-readonly-command.ts +215 -0
- package/packages/agent-runtime/src/tools/handlers/tool/run-terminal-command.ts +33 -0
- package/packages/agent-runtime/src/tools/handlers/tool/sequential-thinking.ts +53 -0
- package/packages/agent-runtime/src/tools/handlers/tool/set-messages.ts +19 -0
- package/packages/agent-runtime/src/tools/handlers/tool/set-output.ts +104 -0
- package/packages/agent-runtime/src/tools/handlers/tool/set-scaffold-complete.ts +32 -0
- package/packages/agent-runtime/src/tools/handlers/tool/skill.ts +146 -0
- package/packages/agent-runtime/src/tools/handlers/tool/spawn-agent-inline.ts +149 -0
- package/packages/agent-runtime/src/tools/handlers/tool/spawn-agent-utils.ts +436 -0
- package/packages/agent-runtime/src/tools/handlers/tool/spawn-agents.ts +286 -0
- package/packages/agent-runtime/src/tools/handlers/tool/str-replace.ts +135 -0
- package/packages/agent-runtime/src/tools/handlers/tool/suggest-followups.ts +20 -0
- package/packages/agent-runtime/src/tools/handlers/tool/task-completed.ts +15 -0
- package/packages/agent-runtime/src/tools/handlers/tool/think-deeply.ts +25 -0
- package/packages/agent-runtime/src/tools/handlers/tool/transition-phase.ts +160 -0
- package/packages/agent-runtime/src/tools/handlers/tool/update-subgoal.ts +48 -0
- package/packages/agent-runtime/src/tools/handlers/tool/web-search.ts +151 -0
- package/packages/agent-runtime/src/tools/handlers/tool/write-file.ts +281 -0
- package/packages/agent-runtime/src/tools/handlers/tool/write-todos.ts +19 -0
- package/packages/agent-runtime/src/tools/prompts.ts +233 -0
- package/packages/agent-runtime/src/tools/sandbox/__tests__/engine.test.ts +169 -0
- package/packages/agent-runtime/src/tools/sandbox/__tests__/shell-denylist.test.ts +104 -0
- package/packages/agent-runtime/src/tools/sandbox/engine.ts +109 -0
- package/packages/agent-runtime/src/tools/sandbox/index.ts +14 -0
- package/packages/agent-runtime/src/tools/sandbox/shell-denylist.ts +119 -0
- package/packages/agent-runtime/src/tools/stream-parser.ts +407 -0
- package/packages/agent-runtime/src/tools/thinker-convergence-gate.ts +162 -0
- package/packages/agent-runtime/src/tools/thought-session-store.ts +43 -0
- package/packages/agent-runtime/src/tools/tool-executor.ts +1098 -0
- package/packages/agent-runtime/src/util/__tests__/messages.test.ts +995 -0
- package/packages/agent-runtime/src/util/__tests__/parse-tool-calls-from-text.test.ts +363 -0
- package/packages/agent-runtime/src/util/__tests__/simplify-tool-results.test.ts +382 -0
- package/packages/agent-runtime/src/util/__tests__/stream-xml-parser.test.ts +285 -0
- package/packages/agent-runtime/src/util/__tests__/think-tags.test.ts +49 -0
- package/packages/agent-runtime/src/util/__tests__/token-counter.test.ts +121 -0
- package/packages/agent-runtime/src/util/activity-tracking.ts +252 -0
- package/packages/agent-runtime/src/util/agent-output.ts +102 -0
- package/packages/agent-runtime/src/util/cache-debug.ts +330 -0
- package/packages/agent-runtime/src/util/format-value.ts +16 -0
- package/packages/agent-runtime/src/util/messages.ts +461 -0
- package/packages/agent-runtime/src/util/parse-tool-calls-from-text.ts +122 -0
- package/packages/agent-runtime/src/util/render-read-files-result.ts +18 -0
- package/packages/agent-runtime/src/util/simplify-tool-results.ts +61 -0
- package/packages/agent-runtime/src/util/stream-xml-parser.ts +259 -0
- package/packages/agent-runtime/src/util/think-tags.ts +33 -0
- package/packages/agent-runtime/src/util/token-counter.ts +136 -0
- package/packages/agent-runtime/tsconfig.json +8 -0
- package/packages/code-map/README.md +43 -0
- package/packages/code-map/__tests__/integration.test.ts +278 -0
- package/packages/code-map/__tests__/languages.test.ts +240 -0
- package/packages/code-map/__tests__/parse.test.ts +640 -0
- package/packages/code-map/__tests__/test-langs/test.c +42 -0
- package/packages/code-map/__tests__/test-langs/test.cpp +34 -0
- package/packages/code-map/__tests__/test-langs/test.cs +34 -0
- package/packages/code-map/__tests__/test-langs/test.go +27 -0
- package/packages/code-map/__tests__/test-langs/test.java +31 -0
- package/packages/code-map/__tests__/test-langs/test.js +50 -0
- package/packages/code-map/__tests__/test-langs/test.php +34 -0
- package/packages/code-map/__tests__/test-langs/test.py +25 -0
- package/packages/code-map/__tests__/test-langs/test.rb +28 -0
- package/packages/code-map/__tests__/test-langs/test.rs +28 -0
- package/packages/code-map/__tests__/test-langs/test.ts +31 -0
- package/packages/code-map/package.json +33 -0
- package/packages/code-map/src/index.ts +4 -0
- package/packages/code-map/src/init-node.ts +185 -0
- package/packages/code-map/src/languages.ts +344 -0
- package/packages/code-map/src/parse.ts +410 -0
- package/packages/code-map/src/tree-sitter-queries/readme.md +24 -0
- package/packages/code-map/src/tree-sitter-queries/tree-sitter-c-tags.scm +16 -0
- package/packages/code-map/src/tree-sitter-queries/tree-sitter-c_sharp-tags.scm +23 -0
- package/packages/code-map/src/tree-sitter-queries/tree-sitter-cpp-tags.scm +29 -0
- package/packages/code-map/src/tree-sitter-queries/tree-sitter-go-tags.scm +26 -0
- package/packages/code-map/src/tree-sitter-queries/tree-sitter-java-tags.scm +19 -0
- package/packages/code-map/src/tree-sitter-queries/tree-sitter-javascript-tags.scm +16 -0
- package/packages/code-map/src/tree-sitter-queries/tree-sitter-php-tags.scm +23 -0
- package/packages/code-map/src/tree-sitter-queries/tree-sitter-python-tags.scm +12 -0
- package/packages/code-map/src/tree-sitter-queries/tree-sitter-ruby-tags.scm +58 -0
- package/packages/code-map/src/tree-sitter-queries/tree-sitter-rust-tags.scm +26 -0
- package/packages/code-map/src/tree-sitter-queries/tree-sitter-typescript-tags.scm +22 -0
- package/packages/code-map/src/types.ts +11 -0
- package/packages/code-map/src/utils.ts +12 -0
- package/packages/code-map/tsconfig.json +10 -0
- package/packages/database/README.md +43 -0
- package/packages/database/package.json +28 -0
- package/packages/database/src/__tests__/service.test.ts +167 -0
- package/packages/database/src/index.ts +146 -0
- package/packages/database/src/service.ts +342 -0
- package/packages/database/tsconfig.json +9 -0
- package/packages/llm-providers/README.md +42 -0
- package/packages/llm-providers/package.json +42 -0
- package/packages/llm-providers/src/ollama/__tests__/detect.test.ts +59 -0
- package/packages/llm-providers/src/ollama/detect.ts +113 -0
- package/packages/llm-providers/src/ollama/index.ts +2 -0
- package/packages/llm-providers/src/openai-compatible/chat/convert-to-openai-compatible-chat-messages.test.ts +855 -0
- package/packages/llm-providers/src/openai-compatible/chat/convert-to-openai-compatible-chat-messages.ts +177 -0
- package/packages/llm-providers/src/openai-compatible/chat/get-response-metadata.ts +15 -0
- package/packages/llm-providers/src/openai-compatible/chat/map-openai-compatible-finish-reason.ts +19 -0
- package/packages/llm-providers/src/openai-compatible/chat/openai-compatible-api-types.ts +60 -0
- package/packages/llm-providers/src/openai-compatible/chat/openai-compatible-chat-language-model.test.ts +549 -0
- package/packages/llm-providers/src/openai-compatible/chat/openai-compatible-chat-language-model.ts +474 -0
- package/packages/llm-providers/src/openai-compatible/chat/openai-compatible-chat-options.ts +25 -0
- package/packages/llm-providers/src/openai-compatible/chat/openai-compatible-metadata-extractor.ts +49 -0
- package/packages/llm-providers/src/openai-compatible/chat/openai-compatible-prepare-tools.ts +162 -0
- package/packages/llm-providers/src/openai-compatible/chat/stream-transform.test.ts +106 -0
- package/packages/llm-providers/src/openai-compatible/chat/stream-transform.ts +585 -0
- package/packages/llm-providers/src/openai-compatible/completion/convert-to-openai-compatible-completion-prompt.ts +98 -0
- package/packages/llm-providers/src/openai-compatible/completion/openai-compatible-completion-language-model.test.ts +173 -0
- package/packages/llm-providers/src/openai-compatible/completion/openai-compatible-completion-language-model.ts +414 -0
- package/packages/llm-providers/src/openai-compatible/completion/openai-compatible-completion-options.ts +33 -0
- package/packages/llm-providers/src/openai-compatible/embedding/openai-compatible-embedding-model.ts +143 -0
- package/packages/llm-providers/src/openai-compatible/embedding/openai-compatible-embedding-options.ts +21 -0
- package/packages/llm-providers/src/openai-compatible/image/openai-compatible-image-model.ts +129 -0
- package/packages/llm-providers/src/openai-compatible/image/openai-compatible-image-settings.ts +1 -0
- package/packages/llm-providers/src/openai-compatible/index.ts +27 -0
- package/packages/llm-providers/src/openai-compatible/openai-compatible-error.ts +34 -0
- package/packages/llm-providers/src/openai-compatible/openai-compatible-provider.ts +174 -0
- package/packages/llm-providers/src/openai-compatible/version.ts +5 -0
- package/packages/llm-providers/tsconfig.json +9 -0
- package/protocol.config.yaml +113 -0
- package/savant-free/README.md +73 -0
- package/savant-free/SPEC.md +385 -0
- package/savant-free/cli/build.ts +49 -0
- package/savant-free/cli/release/README.md +55 -0
- package/savant-free/cli/release/index.js +37 -0
- package/savant-free/cli/release/package.json +43 -0
- package/savant-free/cli/release.ts +128 -0
- package/savant-free/cli/smoke-test.test.ts +257 -0
- package/savant-free/e2e/README.md +173 -0
- package/savant-free/e2e/agent/savant-free-tester.ts +52 -0
- package/savant-free/e2e/tests/ads-behavior.e2e.test.ts +51 -0
- package/savant-free/e2e/tests/agent-startup.e2e.test.ts +61 -0
- package/savant-free/e2e/tests/code-edit.e2e.test.ts +78 -0
- package/savant-free/e2e/tests/help-command.e2e.test.ts +97 -0
- package/savant-free/e2e/tests/knowledge-file.e2e.test.ts +66 -0
- package/savant-free/e2e/tests/slash-commands.e2e.test.ts +119 -0
- package/savant-free/e2e/tests/startup.e2e.test.ts +56 -0
- package/savant-free/e2e/tests/terminal-command.e2e.test.ts +71 -0
- package/savant-free/e2e/tests/version.e2e.test.ts +50 -0
- package/savant-free/e2e/utils/binary-helpers.ts +24 -0
- package/savant-free/e2e/utils/index.ts +17 -0
- package/savant-free/e2e/utils/savant-free-session.ts +229 -0
- package/savant-free/e2e/utils/tmux-custom-tools.ts +156 -0
- package/savant-free/e2e/utils/tmux-helpers.ts +79 -0
- package/savant-free/package.json +20 -0
- package/scripts/eslint-rules/__fixtures__/debug-ast.mjs +20 -0
- package/scripts/eslint-rules/__fixtures__/probe.mjs +41 -0
- package/scripts/eslint-rules/__fixtures__/probe2.mjs +43 -0
- package/scripts/eslint-rules/__fixtures__/rule-test.mjs +44 -0
- package/scripts/eslint-rules/__fixtures__/rule-test2.mjs +27 -0
- package/scripts/eslint-rules/__fixtures__/unknown-bad.ts +21 -0
- package/scripts/eslint-rules/__fixtures__/unknown-good.ts +35 -0
- package/scripts/eslint-rules/no-unknown-in-signatures.js +141 -0
- package/scripts/release.py +360 -0
- package/scripts/run-az-test.sh +1150 -0
- package/scripts/sync-agents.py +337 -0
- package/scripts/tmux/README.md +359 -0
- package/scripts/tmux/package.json +9 -0
- package/scripts/tmux/tmux-capture.sh +231 -0
- package/scripts/tmux/tmux-cli.sh +160 -0
- package/scripts/tmux/tmux-env.sh +34 -0
- package/scripts/tmux/tmux-send.sh +339 -0
- package/scripts/tmux/tmux-start.sh +264 -0
- package/scripts/tmux/tmux-stop.sh +157 -0
- package/scripts/tmux/tmux-viewer/README.md +254 -0
- package/scripts/tmux/tmux-viewer/components/session-viewer.tsx +556 -0
- package/scripts/tmux/tmux-viewer/components/theme.ts +54 -0
- package/scripts/tmux/tmux-viewer/gif-encoder-2.d.ts +28 -0
- package/scripts/tmux/tmux-viewer/gif-exporter.ts +278 -0
- package/scripts/tmux/tmux-viewer/index.tsx +237 -0
- package/scripts/tmux/tmux-viewer/package.json +9 -0
- package/scripts/tmux/tmux-viewer/session-loader.ts +234 -0
- package/scripts/tmux/tmux-viewer/tsconfig.json +9 -0
- package/scripts/tmux/tmux-viewer/types.ts +76 -0
- package/sdk/CHANGELOG.md +126 -0
- package/sdk/PUBLISHING.md +55 -0
- package/sdk/README.md +334 -0
- package/sdk/bunfig.toml +6 -0
- package/sdk/e2e/README.md +158 -0
- package/sdk/e2e/custom-agents/api-integration-agent.e2e.test.ts +145 -0
- package/sdk/e2e/custom-agents/apply-patch-tool.e2e.test.ts +62 -0
- package/sdk/e2e/custom-agents/database-query-agent.e2e.test.ts +135 -0
- package/sdk/e2e/custom-agents/weather-agent.e2e.test.ts +120 -0
- package/sdk/e2e/examples/code-explainer.example.ts +62 -0
- package/sdk/e2e/examples/code-reviewer.example.ts +52 -0
- package/sdk/e2e/examples/commit-message-generator.example.ts +61 -0
- package/sdk/e2e/examples/sdk-lint.example.ts +65 -0
- package/sdk/e2e/examples/sdk-refactor.example.ts +63 -0
- package/sdk/e2e/examples/sdk-test-gen.example.ts +62 -0
- package/sdk/e2e/features/knowledge-files.e2e.test.ts +82 -0
- package/sdk/e2e/features/max-agent-steps.e2e.test.ts +65 -0
- package/sdk/e2e/features/project-files.e2e.test.ts +80 -0
- package/sdk/e2e/integration/connection-check.integration.test.ts +33 -0
- package/sdk/e2e/integration/event-ordering.integration.test.ts +186 -0
- package/sdk/e2e/integration/event-types.integration.test.ts +183 -0
- package/sdk/e2e/integration/stream-chunks.integration.test.ts +191 -0
- package/sdk/e2e/streaming/concurrent-streams.e2e.test.ts +164 -0
- package/sdk/e2e/streaming/subagent-streaming.e2e.test.ts +158 -0
- package/sdk/e2e/utils/__tests__/event-collector.test.ts +297 -0
- package/sdk/e2e/utils/e2e-mocks.ts +458 -0
- package/sdk/e2e/utils/event-collector.ts +145 -0
- package/sdk/e2e/utils/get-api-key.ts +76 -0
- package/sdk/e2e/utils/index.ts +3 -0
- package/sdk/e2e/utils/test-fixtures.ts +196 -0
- package/sdk/e2e/workflows/error-recovery.e2e.test.ts +112 -0
- package/sdk/e2e/workflows/multi-turn-conversation.e2e.test.ts +132 -0
- package/sdk/examples/readme-example-1.ts +34 -0
- package/sdk/examples/readme-example-2.ts +76 -0
- package/sdk/package.json +82 -0
- package/sdk/scripts/build.ts +349 -0
- package/sdk/scripts/fetch-ripgrep.ts +172 -0
- package/sdk/scripts/publish.ts +51 -0
- package/sdk/scripts/release.js +100 -0
- package/sdk/scripts/verify.ts +204 -0
- package/sdk/sdk_exit +1 -0
- package/sdk/smoke-test-dist.ts +248 -0
- package/sdk/src/__tests__/apply-overrides-resume.test.ts +83 -0
- package/sdk/src/__tests__/apply-patch.test.ts +438 -0
- package/sdk/src/__tests__/build-file-tree.test.ts +31 -0
- package/sdk/src/__tests__/change-file.test.ts +212 -0
- package/sdk/src/__tests__/client.test.ts +142 -0
- package/sdk/src/__tests__/clone-session-state.test.ts +158 -0
- package/sdk/src/__tests__/code-search.test.ts +896 -0
- package/sdk/src/__tests__/composio.test.ts +86 -0
- package/sdk/src/__tests__/credentials.test.ts +344 -0
- package/sdk/src/__tests__/database.test.ts +153 -0
- package/sdk/src/__tests__/env.test.ts +137 -0
- package/sdk/src/__tests__/error-utils.test.ts +253 -0
- package/sdk/src/__tests__/fixtures/windows-stubborn-grandchild.ts +26 -0
- package/sdk/src/__tests__/initial-session-state.test.ts +447 -0
- package/sdk/src/__tests__/knowledge-file-selection.test.ts +335 -0
- package/sdk/src/__tests__/load-agents.test.ts +935 -0
- package/sdk/src/__tests__/load-mcp-config.test.ts +285 -0
- package/sdk/src/__tests__/load-skills.test.ts +325 -0
- package/sdk/src/__tests__/model-provider.test.ts +44 -0
- package/sdk/src/__tests__/path-utils.test.ts +66 -0
- package/sdk/src/__tests__/read-files.test.ts +573 -0
- package/sdk/src/__tests__/read-url.test.ts +371 -0
- package/sdk/src/__tests__/researcher-web.integration.test.ts +130 -0
- package/sdk/src/__tests__/run-cancellation.test.ts +1321 -0
- package/sdk/src/__tests__/run-error-preserves-history.test.ts +335 -0
- package/sdk/src/__tests__/run-event-dispatch.test.ts +80 -0
- package/sdk/src/__tests__/run-file-filter.test.ts +530 -0
- package/sdk/src/__tests__/run-handle-event.test.ts +142 -0
- package/sdk/src/__tests__/run-mcp-tool-filter.test.ts +124 -0
- package/sdk/src/__tests__/run-state-child-process.test.ts +72 -0
- package/sdk/src/__tests__/run-terminal-command.test.ts +236 -0
- package/sdk/src/__tests__/run.integration.test.ts +170 -0
- package/sdk/src/__tests__/user-knowledge-files.test.ts +361 -0
- package/sdk/src/__tests__/validate-agents.test.ts +943 -0
- package/sdk/src/agents/load-agents.ts +339 -0
- package/sdk/src/agents/load-mcp-config.ts +275 -0
- package/sdk/src/client.ts +87 -0
- package/sdk/src/composio.ts +78 -0
- package/sdk/src/constants.ts +29 -0
- package/sdk/src/credentials.ts +303 -0
- package/sdk/src/custom-tool.ts +66 -0
- package/sdk/src/env.ts +116 -0
- package/sdk/src/error-utils.ts +127 -0
- package/sdk/src/impl/__tests__/llm-chatgpt-oauth-policy.test.ts +67 -0
- package/sdk/src/impl/__tests__/llm-native-tool-call.test.ts +38 -0
- package/sdk/src/impl/__tests__/llm-stream-yielded-content.test.ts +118 -0
- package/sdk/src/impl/__tests__/model-provider-free-mode.test.ts +166 -0
- package/sdk/src/impl/__tests__/prompt-result.test.ts +210 -0
- package/sdk/src/impl/__tests__/provider-options-metadata.test.ts +67 -0
- package/sdk/src/impl/agent-runtime.ts +159 -0
- package/sdk/src/impl/chatgpt-backend-fetch.ts +588 -0
- package/sdk/src/impl/database.ts +516 -0
- package/sdk/src/impl/llm.ts +852 -0
- package/sdk/src/impl/model-provider.ts +638 -0
- package/sdk/src/impl/openrouter-key-resolver.ts +78 -0
- package/sdk/src/index.ts +133 -0
- package/sdk/src/native/ripgrep.ts +141 -0
- package/sdk/src/retry-config.ts +51 -0
- package/sdk/src/run-state.ts +897 -0
- package/sdk/src/run.ts +1222 -0
- package/sdk/src/skills/load-skills.ts +253 -0
- package/sdk/src/testing/env.ts +19 -0
- package/sdk/src/tools/apply-patch.ts +690 -0
- package/sdk/src/tools/change-file.ts +155 -0
- package/sdk/src/tools/code-search.ts +547 -0
- package/sdk/src/tools/glob.ts +58 -0
- package/sdk/src/tools/index.ts +19 -0
- package/sdk/src/tools/list-directory.ts +52 -0
- package/sdk/src/tools/path-utils.ts +101 -0
- package/sdk/src/tools/read-files.ts +110 -0
- package/sdk/src/tools/read-url.ts +469 -0
- package/sdk/src/tools/run-file-change-hooks.ts +22 -0
- package/sdk/src/tools/run-terminal-command.ts +483 -0
- package/sdk/src/tools/ssrf.ts +120 -0
- package/sdk/src/types/env.ts +40 -0
- package/sdk/src/utils/logger.ts +15 -0
- package/sdk/src/validate-agents.ts +157 -0
- package/sdk/test/cjs-compatibility/package-lock.json +423 -0
- package/sdk/test/cjs-compatibility/package.json +21 -0
- package/sdk/test/cjs-compatibility/test-imports.js +77 -0
- package/sdk/test/cjs-compatibility/test-types.ts +54 -0
- package/sdk/test/cjs-compatibility/tsconfig.json +17 -0
- package/sdk/test/esm-compatibility/package-lock.json +423 -0
- package/sdk/test/esm-compatibility/package.json +21 -0
- package/sdk/test/esm-compatibility/test-imports.js +83 -0
- package/sdk/test/esm-compatibility/test-types.ts +59 -0
- package/sdk/test/esm-compatibility/tsconfig.json +17 -0
- package/sdk/test/ripgrep-bundling/package-lock.json +423 -0
- package/sdk/test/ripgrep-bundling/package.json +21 -0
- package/sdk/test/ripgrep-bundling/test-ripgrep-types.ts +132 -0
- package/sdk/test/ripgrep-bundling/test-ripgrep.js +257 -0
- package/sdk/test/ripgrep-bundling/tsconfig.json +15 -0
- package/sdk/test/setup-env.ts +54 -0
- package/sdk/test/test-sdk.ts +25 -0
- package/sdk/test/tree-sitter-queries/package-lock.json +47 -0
- package/sdk/test/tree-sitter-queries/package.json +12 -0
- package/sdk/test/tree-sitter-queries/test-query-files.js +256 -0
- package/sdk/tsconfig.build.json +32 -0
- package/sdk/tsconfig.json +27 -0
- package/sdk/vendor/ripgrep/arm64-darwin/rg +0 -0
- package/sdk/vendor/ripgrep/arm64-linux/rg +0 -0
- package/sdk/vendor/ripgrep/x64-darwin/rg +0 -0
- package/sdk/vendor/ripgrep/x64-linux/rg +0 -0
- package/sdk/vendor/ripgrep/x64-win32/rg.exe +0 -0
- package/templates/FID-TEMPLATE.md +125 -0
- package/templates/README-TEMPLATE.md +87 -0
- package/templates/SESSION-SUMMARY.md +135 -0
- package/tsconfig.base.json +18 -0
- package/tsconfig.json +27 -0
- /package/{http.js → cli/release-core/http.js} +0 -0
- /package/{launcher.js → cli/release-core/launcher.js} +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Session Summary — 2026-08-03 Release-Readiness Audit (FID-2026-0803-012)
|
|
2
|
+
|
|
3
|
+
**FID:** FID-2026-0803-012 (release-readiness audit: bloat trim, doc alignment, eval run + tracking)
|
|
4
|
+
**Status:** Verified + archived
|
|
5
|
+
**Signed:** Savant
|
|
6
|
+
|
|
7
|
+
## What was done
|
|
8
|
+
|
|
9
|
+
### Bloat trim
|
|
10
|
+
|
|
11
|
+
- **CRITICAL:** Restored the 12 benchmark eval fixture JSONs
|
|
12
|
+
(`eval-{codebuff,manifold,plane,saleor}[-hard|-2].json`) — deleted in the working
|
|
13
|
+
tree but still tracked in git; the benchmark runner could not start without them.
|
|
14
|
+
- Removed six gitignored `.test-reports-md-*` temp dirs under `evals/v2/tests/`.
|
|
15
|
+
- Root `LEARNINGS.md` **kept** per operator decision (agent learnings library).
|
|
16
|
+
|
|
17
|
+
### Eval run + harness fixes (found by actually running it)
|
|
18
|
+
|
|
19
|
+
- **Baseline: 4/4 PASS** (offline, golden-patch verification) — incl. the previously
|
|
20
|
+
missing `savant-v2-pure-add-001` after its stale golden patch was regenerated.
|
|
21
|
+
- **Evaluate: proven end-to-end, 0/4** — the run now populates the agent registry,
|
|
22
|
+
issues real model calls, executes tools, and writes reports. Failures are
|
|
23
|
+
environmental: free-tier provider 429 rate-limiting + BYOK key rejection +
|
|
24
|
+
`injectFault` MVP no-op (documented, deferred).
|
|
25
|
+
- Three harness bugs fixed: (1) empty SDK agent registry (no `agentDefinitions` →
|
|
26
|
+
`Invalid agent ID`) wired via `loadLocalAgents`; (2) `writeJsonReport` crashed on
|
|
27
|
+
cyclic provider errors → circular-safe replacer; (3) `add-fix` golden-patch
|
|
28
|
+
pre-image mismatch.
|
|
29
|
+
- Entrypoint fix: `main.ts`/`main-single-eval.ts` referenced the never-existing
|
|
30
|
+
`eval-savant-code.json` → retargeted to `eval-codebuff.json`.
|
|
31
|
+
- Results tracked in `docs/reports/savant-code-benchmark-v2-2026-08-03.md` + raw
|
|
32
|
+
artifacts in `evals/v2/reports/`.
|
|
33
|
+
|
|
34
|
+
### Doc alignment
|
|
35
|
+
|
|
36
|
+
- `README.zh-CN.md` fully regenerated — complete Chinese translation of the current
|
|
37
|
+
v0.0.16 README (12-section parity; old file was stale pre-rebrand).
|
|
38
|
+
|
|
39
|
+
## Gates
|
|
40
|
+
|
|
41
|
+
- evals typecheck exit 0 · v2 suite **69 pass / 0 fail** (2 new regression tests)
|
|
42
|
+
- Baseline 4/4 PASS · ESLint `--max-warnings 0` on changed files · `lint:md` exit 0
|
|
43
|
+
- Fixtures verified (12 restored, zero `D`) · forbidden-name sweep clean
|
|
44
|
+
- Independent code-reviewer AUDIT: clean — 2 regression tests added in response
|
|
45
|
+
|
|
46
|
+
## Deferred
|
|
47
|
+
|
|
48
|
+
- Evaluate mode needs a valid Savant backend key for a meaningful pass.
|
|
49
|
+
- `injectFault` MVP no-op — error_recovery task cannot pass until wired.
|
|
50
|
+
|
|
51
|
+
## Final readiness follow-up
|
|
52
|
+
|
|
53
|
+
- Updated six current-facing `0.0.15` references to `0.0.16`; historical release records remain unchanged.
|
|
54
|
+
- Corrected the Savant-Free smoke harness to select `savant-free.exe` on Windows.
|
|
55
|
+
The post-build smoke run executed **4 pass / 0 fail**; 2 tmux title-screen tests
|
|
56
|
+
were skipped because tmux is unavailable.
|
|
57
|
+
- Final `bun run ci` build gate: exit 0. Full Markdownlint: exit 0.
|
|
58
|
+
`git diff --check`: exit 0.
|
|
59
|
+
- The two untracked research documents with spaces in their names are intentional
|
|
60
|
+
research artifacts, not malformed or temporary filenames.
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# Savant-Code 0.0.2 — Pre-Push Final Pass
|
|
2
|
+
|
|
3
|
+
**Purpose:** Ship gate. ALL items must pass before bumping VERSION 0.0.1 → 0.0.2 and pushing the pre-rebrand milestone.
|
|
4
|
+
|
|
5
|
+
**Mode:** Interactive live execution. Drive the actual chat session. Run real commands on the committed tree (no scratch artifacts).
|
|
6
|
+
|
|
7
|
+
**Environment:** Strict mode on, language typescript, ECHO v0.2.0, bun ≥ 1.1.x, node ≥ 22.
|
|
8
|
+
|
|
9
|
+
**Skip rules:**
|
|
10
|
+
- `[LIVE]` = drive in tmux (interactive CLI)
|
|
11
|
+
- `[SOURCE]` = read file + grep for evidence
|
|
12
|
+
- `[BASH]` = run via `bun test` / `bun run typecheck`
|
|
13
|
+
- SKIP only with explicit `BLOCKER:` reason + logged in `dev/scratchpad/0.0.2-blockers.md`
|
|
14
|
+
|
|
15
|
+
**Reconciliation note (post-FID-017, 2026-07-19):** Several Items below were updated from the original 0.0.2-final-pass to reflect the actual current code state — see specific reconciliation notes per Item.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Section 1: Pre-Flight
|
|
20
|
+
|
|
21
|
+
1. `[BASH]` `bun --version` → must print ≥ 1.1.x
|
|
22
|
+
2. `[BASH]` `node --version` → v22.11.x expected
|
|
23
|
+
3. `[BASH]` `git status` → clean working tree (no uncommitted changes outside dev/)
|
|
24
|
+
4. `[SOURCE]` `VERSION` → currently 0.0.2 (post-FID-017 bump)
|
|
25
|
+
5. `[SOURCE]` `package.json` → version 0.0.2 (matches VERSION, post-FID-017 bump)
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Section 2: Typecheck × 4 (Hard Gate)
|
|
30
|
+
|
|
31
|
+
6. `[BASH]` `cd common && bun run typecheck` → exit 0
|
|
32
|
+
7. `[BASH]` `cd sdk && bun run typecheck` → exit 0
|
|
33
|
+
8. `[BASH]` `cd packages/agent-runtime && bun run typecheck` → exit 0
|
|
34
|
+
9. `[BASH]` `cd cli && bun run typecheck` → exit 0
|
|
35
|
+
10. `[SOURCE]` `grep -rn 'ts-ignore\|@ts-expect-error' --include='*.ts' .` → expect ≤ 41 hits (all in pre-existing string prompts — justified, not real directives)
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Section 3: SDK Test Suite (Hard Gate)
|
|
40
|
+
|
|
41
|
+
11. `[BASH]` `cd sdk && bun test src/` → **415 pass / 0 fail** (post-FID-016; FID-016 fixed 22 pre-existing failures leaving 415 stable baseline in `src/`)
|
|
42
|
+
12. `[BASH]` `cd sdk && bun test src/__tests__/user-knowledge-files.test.ts` → 15/15
|
|
43
|
+
13. `[BASH]` `cd sdk && bun test src/__tests__/code-search.test.ts -t 'cwd'` → 3/3
|
|
44
|
+
14. `[BASH]` `cd sdk && bun test src/__tests__/database.test.ts` → 3/3
|
|
45
|
+
15. `[BASH]` `cd sdk && bun test src/__tests__/initial-session-state.test.ts -t 'discovers'` → 1/1
|
|
46
|
+
16. `[BASH]` `cd sdk && bun test src/__tests__/load-agents.test.ts -t 'verbose'` → 1/1
|
|
47
|
+
17. `[BASH]` `cd sdk && bun test src/__tests__/load-skills.test.ts -t 'malformed'` → 1/1
|
|
48
|
+
18. `[BASH]` `cd sdk && bun test e2e/custom-agents/apply-patch-tool.e2e.test.ts` → SKIP (no API key per FID-016 Fix G — was silently running in mock mode before)
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Section 4: Boot Sequence Smoke
|
|
53
|
+
|
|
54
|
+
19. `[LIVE]` Drive CLI, watch startup → confirm no crash, prompt appears in ≤ 5s
|
|
55
|
+
20. `[LIVE]` Confirm "One Mind. A Thousand Faces." tagline visible in right sidebar
|
|
56
|
+
21. `[SOURCE]` Confirm `ECHO.md` is READ 0-end by orchestrator (no partial read)
|
|
57
|
+
22. `[SOURCE]` Confirm `protocol.config.yaml` fields parsed: `strict_mode: true`, `language: typescript`
|
|
58
|
+
23. `[SOURCE]` Confirm session summary auto-created at `dev/session-summaries/<YYYY-MM-DD>-*.md`
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Section 5: Slash Commands
|
|
63
|
+
|
|
64
|
+
24. `[LIVE]` Drive `/phase` → print current (idle expected)
|
|
65
|
+
25. `[LIVE]` Drive `/phase red` → succeeds (idle → red legal)
|
|
66
|
+
26. `[LIVE]` Drive `/phase green` → BLOCKED if no open FID, succeeds if FID exists
|
|
67
|
+
27. `[LIVE]` Drive `/fids` → list open FIDs
|
|
68
|
+
28. `[LIVE]` Drive `/dev` → toggle dev mode
|
|
69
|
+
29. `[LIVE]` Drive `/exit` → clean shutdown, summary saved
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Section 6: FSM Transition Cycle
|
|
74
|
+
|
|
75
|
+
30. `[LIVE]` With open FID-2026-0718-X present: idle → red → green → audit → complete arc
|
|
76
|
+
31. `[LIVE]` Confirm right sidebar `[phase]` indicator + `[work]` activity indicator (per FID-009) update after every transition
|
|
77
|
+
32. `[LIVE]` Confirm status banner above input updates between `idle` / `red` / `green` / `audit` / `complete`
|
|
78
|
+
33. `[LIVE]` Confirm `/phase idle` fires auto-reset on next user message after complete
|
|
79
|
+
34. `[SOURCE]` Verify `packages/agent-runtime/src/tools/handlers/tool/transition-phase.ts` enforces FSM legal transitions + 10-iter breaker
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Section 7: Tool Gating (Hard Gate)
|
|
84
|
+
|
|
85
|
+
35. `[LIVE]` During RED, drive write_file from Orchestrator to `src/example.ts` → BLOCKED
|
|
86
|
+
36. `[LIVE]` During GREEN, same write_file → succeeds
|
|
87
|
+
37. `[LIVE]` During RED, drive run_terminal_command `ls` → BLOCKED
|
|
88
|
+
38. `[LIVE]` During AUDIT, same `ls` → succeeds
|
|
89
|
+
39. `[LIVE]` Confirm `dev/scratchpad/` writes always allowed (dev mode off, scratchpad exempt per FID-008)
|
|
90
|
+
40. `[LIVE]` Confirm `dev/fids/` writes always allowed (FID lifecycle privileged per FID-001)
|
|
91
|
+
41. `[SOURCE]` Read `packages/agent-runtime/src/tools/tool-executor.ts` lines 339-372 → gate logic + dev-override + path-exemption present
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Section 8: Dev Override
|
|
96
|
+
|
|
97
|
+
42. `[LIVE]` Drive `/dev` → enter dev mode
|
|
98
|
+
43. `[LIVE]` Confirm dev mode banner / status indicator visible
|
|
99
|
+
44. `[LIVE]` Orchestrator direct write to `dev/scratchpad/test.md` → succeeds (even in dev mode off due to path exemption)
|
|
100
|
+
45. `[LIVE]` Confirm dev mode is INVISIBLE to user (no banner toast — only on toggle)
|
|
101
|
+
46. `[LIVE]` Drive `/dev` again → exit dev mode
|
|
102
|
+
47. `[LIVE]` After exit, direct write attempt to `src/example.ts` → BLOCKED
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Section 9: Agent Roster Conformance
|
|
107
|
+
|
|
108
|
+
**Reconciliation note (post-FID-017, 2026-07-19):** Item 49 was updated to reflect the 9-runtime-role vs 14-fs-entry distinction documented in `ARCHITECTURE.md` "Helper Tool Libraries" section. Items 50/51 were updated to reflect FID-007/008 intentional tooling changes.
|
|
109
|
+
|
|
110
|
+
48. `[SOURCE]` Read `ECHO.md` roster table — must list exactly 9 agents (Orchestrator, Detective, Forge, Verifier, Recorder, Thinker, Scout, Researcher, Scribe)
|
|
111
|
+
49. `[SOURCE]` `ls agents/` → **14 directories** (9 canonical ECHO runtime roles + 5 active helper tool libraries: browser-use, editor, file-explorer, librarian, types)
|
|
112
|
+
50. `[SOURCE]` Verify `agents/base2/base2.ts` has `write_file`+`str_replace` in toolNames (per FID-008 scratchpad design) BUT tool-executor.ts gates them to exempt paths (`dev/fids/`, `dev/scratchpad/`, `dev/nova/`) — separation of duties preserved via exemption, not absence
|
|
113
|
+
51. `[SOURCE]` Verify `agents/detective/detective.ts` toolNames includes `code_search`, `set_output`, `list_directory`, `glob`, `read_files`, `read_subtree` (per FID-007 inlined extract-keywords + expanded delegation)
|
|
114
|
+
52. `[SOURCE]` Verify `agents/forge/forge.ts` has `write_file`, `str_replace`, but NOT `bash`
|
|
115
|
+
53. `[SOURCE]` Verify `agents/verifier/verifier.ts` has NO write tools
|
|
116
|
+
54. `[SOURCE]` Verify no leftover `SAVANT_GEMINI_THINKER_*` vars in any agent template
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Section 10: Circuit Breaker
|
|
121
|
+
|
|
122
|
+
55. `[LIVE]` Drive 11 iterations of self_correct → green → hard stop expected at iter 10
|
|
123
|
+
56. `[LIVE]` Confirm warning surfaced at iter 8
|
|
124
|
+
57. `[SOURCE]` `grep -n 'iterationCount\|MAX_ITERATIONS' packages/agent-runtime/src/tools/handlers/tool/transition-phase.ts` + `packages/agent-runtime/src/tools/handlers/tool/spawn-agent-utils.ts` → enforce at 10
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Section 11: UI State Sync
|
|
129
|
+
|
|
130
|
+
58. `[LIVE]` Right sidebar `phase` indicator matches FSM after every `/phase` call
|
|
131
|
+
59. `[LIVE]` Right sidebar `work` activity indicator (new per FID-009) reflects current sub-state (idle | thinking | tool | etc.)
|
|
132
|
+
60. `[LIVE]` Right sidebar `tokens` updates after every agent step
|
|
133
|
+
61. `[LIVE]` Right sidebar `cost` updates after every agent step (with env stub fallback)
|
|
134
|
+
62. `[LIVE]` Status banner matches FSM phase (not stuck on "working")
|
|
135
|
+
63. `[LIVE]` After `complete`, banner resets to ready/prompt within 2s
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Section 12: FID Lifecycle End-to-End
|
|
140
|
+
|
|
141
|
+
64. `[LIVE]` Create FID-2026-0718-Y manually in `dev/fids/`
|
|
142
|
+
65. `[LIVE]` Drive `/phase red` → confirm Detective spawns with code_search
|
|
143
|
+
66. `[LIVE]` Drive `/phase green` → confirm Forge spawns with write_file
|
|
144
|
+
67. `[LIVE]` Drive Forge write → confirm snapshot stored at `dev/scratchpad/.snapshots/`
|
|
145
|
+
68. `[LIVE]` Drive `/phase audit` → confirm Verifier reads history (no writes)
|
|
146
|
+
69. `[LIVE]` Drive `/phase complete` → confirm FID auto-archives to `dev/fids/archive/`
|
|
147
|
+
70. `[LIVE]` Confirm CHANGELOG.md gains matching entry at top (auto-archive rule)
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Section 13: CHANGELOG + VERSION Consistency
|
|
152
|
+
|
|
153
|
+
71. `[SOURCE]` `cat CHANGELOG.md | head -50` → most recent entry is FID-2026-0718-017 (per FID-017 close-out entry)
|
|
154
|
+
72. `[SOURCE]` `cat VERSION` confirms 0.0.2 (post-FID-017 bump)
|
|
155
|
+
73. `[SOURCE]` `cat package.json | grep version` matches 0.0.2
|
|
156
|
+
74. `[SOURCE]` All archived FIDs in `dev/fids/archive/` have matching CHANGELOG entries (ECHO Auto-Archive rule)
|
|
157
|
+
75. `[SOURCE]` No unarchived FID files in `dev/fids/*.md`
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Section 14: Build Artifact Hygiene
|
|
162
|
+
|
|
163
|
+
76. `[BASH]` `find . -name '*.ts' -not -path './node_modules/*' -path '*/dist/*'` → 0 hits (no source in dist)
|
|
164
|
+
77. `[BASH]` `git status --porcelain` (post `git add -A`) → 0 unstaged files
|
|
165
|
+
78. `[BASH]` `find . -name '.DS_Store' -not -path './node_modules/*'` → 0 hits
|
|
166
|
+
79. `[BASH]` `bun install --frozen-lockfile` → exit 0 (lockfile matches workspace state per FID-017 Option C — 11 pkg names reverted to `@savant-code/X`)
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Section 15: Pre-Rebrand Blockers (Hard Gate)
|
|
171
|
+
|
|
172
|
+
80. `[BASH]` `git log --oneline -20` → after `git commit`, 3+ commits documenting FID history since rebrand start
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Section 16: Manual Dual-Audit Check
|
|
177
|
+
|
|
178
|
+
81. `[SOURCE]` Trigger Nova audit on FID-017 closeout one more time → confirm PASS holds (per `dev/nova/outbox/2026-07-19-fid-017-closeout.md`)
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Final Sign-Off (Only After All Sections Pass)
|
|
183
|
+
|
|
184
|
+
If all PASS, proceed to 0.0.2 push:
|
|
185
|
+
1. ~~Bump `VERSION` to `0.0.2`~~ → **DONE by FID-017**
|
|
186
|
+
2. ~~Bump `package.json` version to `0.0.2`~~ → **DONE by FID-017**
|
|
187
|
+
3. `git commit -m "chore: 0.0.2 pre-rebrand safety milestone — FID-001..017 closed, 415/0 src tests + 488/0 full, 4 typechecks clean"`
|
|
188
|
+
4. `git push` (your action; preserves the pre-rebrand snapshot)
|
|
189
|
+
5. Confirm push success
|
|
190
|
+
6. Archive this test-prompt to `dev/test-prompts/archive/0.0.2-final-pass.md`
|
|
191
|
+
7. Greenlight the complete rebrand work in next push
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Report Format
|
|
196
|
+
|
|
197
|
+
Per item: `### N: TITLE` then `Status: PASS|FAIL|SKIP|BLOCKER`, `Mode:`, `Evidence:`, `Error:`, `Timestamp:`.
|
|
198
|
+
|
|
199
|
+
End with summary: pass count, fail count, skip count, blocker list. If ANY item in Sections 2, 3, 7, 12 are FAIL → **DON'T PUSH**. Open a new FID and loop.
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
**Run by:** Savant Orchestrator (you, before bumping VERSION)
|
|
204
|
+
**Audit by:** Nova (third-party ECHO verification, optional but recommended for any uncertain items)
|
|
205
|
+
**Approve by:** Creator (you, the human)
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
> *"0.0.2 = the safety checkpoint before the full rebrand gut. Restore point locked. Next push will own the entire codebase rename."*
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
# Savant Agent — Full Capabilities Test
|
|
2
|
+
|
|
3
|
+
**Version:** 1.0.0
|
|
4
|
+
**Purpose:** Exhaustively exercise every tool, mode, phase gate, sub-agent, skill, path-safety rule, and validation path available to the Savant orchestrator. Run this prompt whenever the agent's capabilities have been changed to verify the system is production-ready.
|
|
5
|
+
|
|
6
|
+
**How to use this prompt:** Point the Savant orchestrator at this file and instruct it: *"Execute the full capabilities test in this file. Report PASS/FAIL for every test with evidence. Continue until every section is complete. Write the final report to `dev/scratchpad/agent-capabilities-test-report.md`"*.
|
|
7
|
+
|
|
8
|
+
**Quick-start for the testing agent:**
|
|
9
|
+
1. Read this entire file first.
|
|
10
|
+
2. Create a `write_todos` list with one todo per phase (Phases 1–13).
|
|
11
|
+
3. Use `read_files`, `code_search`, and `spawn_agents` as needed to gather evidence.
|
|
12
|
+
4. For every test, record: `TEST-ID`, `STATUS (PASS/FAIL/SKIP)`, `EVIDENCE`.
|
|
13
|
+
5. Update todos as you finish each phase.
|
|
14
|
+
6. Clean up temporary test artifacts at the end.
|
|
15
|
+
7. Write the final report to `dev/scratchpad/agent-capabilities-test-report.md`.
|
|
16
|
+
|
|
17
|
+
**Environment assumptions:**
|
|
18
|
+
- The test runs inside a Savant-Code/SavantFree workspace with ECHO Protocol v0.2.0 active.
|
|
19
|
+
- The CLI is interactive and supports the full tool set.
|
|
20
|
+
- `dev/fids/` and `dev/scratchpad/` exist.
|
|
21
|
+
- An internet connection is available for `web_search` and `read_url` tests.
|
|
22
|
+
|
|
23
|
+
**Global rules for the testing agent:**
|
|
24
|
+
1. Report every test with: `TEST-ID`, `STATUS (PASS/FAIL/SKIP)`, `EVIDENCE` (file path, line number, exact output, or error message).
|
|
25
|
+
2. Do not skip a test unless it is impossible to run in the current environment; document the reason.
|
|
26
|
+
3. If a test fails, continue to the next test. Do not halt the suite.
|
|
27
|
+
4. Use `write_todos` to track progress through the phases.
|
|
28
|
+
5. Preserve the git state and any user files; clean up temporary test files after each phase.
|
|
29
|
+
6. **Record results incrementally.** After each phase, append the phase results to `dev/scratchpad/agent-test-progress.md` using the row format: `| TEST-ID | STATUS | EVIDENCE | NOTES |`. Do not wait until the end to record evidence.
|
|
30
|
+
|
|
31
|
+
**How to enable `devMode` for Dev Override tests:**
|
|
32
|
+
- In the interactive CLI, run the slash command `/dev on`. Disable with `/dev off`.
|
|
33
|
+
- In programmatic tests, ensure the runtime sets `fileContext.devMode = true` before the test runs.
|
|
34
|
+
- The key observable behavior: with `devMode` active, the FSM phase gate for `write_file`/`str_replace`/`apply_patch` and the AUDIT gate for `run_terminal_command` are bypassed.
|
|
35
|
+
|
|
36
|
+
**Tests that may be skipped:**
|
|
37
|
+
- `read_url` / `web_search` — SKIP if the environment has no internet.
|
|
38
|
+
- `browser_logs` / `browser-use` — SKIP if Chrome/Chromium is not installed or no browser session exists.
|
|
39
|
+
- `tmux-cli` — SKIP if no tmux session is available.
|
|
40
|
+
|
|
41
|
+
**At-a-glance checklist:**
|
|
42
|
+
- [ ] Phase 1: Modes verified by reading `agents/savant/*.ts`.
|
|
43
|
+
- [ ] Phase 2: Every tool called with valid input.
|
|
44
|
+
- [ ] Phase 3: ECHO phase gates enforced correctly.
|
|
45
|
+
- [ ] Phase 4: Every sub-agent spawned and returned output.
|
|
46
|
+
- [ ] Phase 5: FID lifecycle works.
|
|
47
|
+
- [ ] Phase 6: Path safety rejects escapes and accepts exempt paths.
|
|
48
|
+
- [ ] Phase 7: All skills load.
|
|
49
|
+
- [ ] Phase 8: Dev override bypasses phase gates.
|
|
50
|
+
- [ ] Phase 9: Perfection Loop cycles through phases and respects circuit breaker.
|
|
51
|
+
- [ ] Phase 10: Sequential thinking / Thinker agent works.
|
|
52
|
+
- [ ] Phase 11: Typechecks and key tests pass.
|
|
53
|
+
- [ ] Phase 12: Error cases produce expected errors.
|
|
54
|
+
- [ ] Phase 13: Report written.
|
|
55
|
+
|
|
56
|
+
**Critical path (must all pass for sign-off):**
|
|
57
|
+
- M-01 `default` mode has the expected orchestrator tool set.
|
|
58
|
+
- T-07 `write_file` succeeds in GREEN phase.
|
|
59
|
+
- T-19 `run_terminal_command` succeeds in AUDIT phase.
|
|
60
|
+
- T-26 `transition_phase` succeeds for valid transitions.
|
|
61
|
+
- T-31 `sequentialthinking` / T-30 `think_deeply` spawns Thinker and returns reasoning.
|
|
62
|
+
- P-01 `write_file` in `idle` is blocked.
|
|
63
|
+
- P-03 `write_file` in `green` is allowed.
|
|
64
|
+
- P-05–P-06 exempt paths (`dev/scratchpad`, `dev/fids`) are writable in any phase.
|
|
65
|
+
- A-06 `thinker` agent returns a structured analysis with `<thinking>` tags.
|
|
66
|
+
- PL-01 Perfection Loop advances through RED → GREEN → AUDIT → COMPLETE.
|
|
67
|
+
- V-01..V-04 all typechecks pass.
|
|
68
|
+
- E-01 `spawn_agents` with invalid agent returns an error.
|
|
69
|
+
|
|
70
|
+
**Known disabled features:**
|
|
71
|
+
- Composio meta tools are currently disabled (`ENABLE_COMPOSIO_TOOLS = false` in `agents/savant/savant.ts`). Do not test them unless you have explicitly enabled them.
|
|
72
|
+
- External browser tests are optional and only run when Chrome/Chromium is available.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Phase 1: Orchestrator Identity & Modes
|
|
77
|
+
|
|
78
|
+
For each Savant mode below, verify the agent can be instantiated and reports the correct identity/tool set.
|
|
79
|
+
|
|
80
|
+
| Test | Mode | Expected Behavior |
|
|
81
|
+
|------|------|---------------------|
|
|
82
|
+
| M-01 | `default` | `displayName` = "Savant the Orchestrator"; has `spawn_agents`, `read_files`, `transition_phase`, `write_file`, `str_replace`, `ask_user`, `suggest_followups` |
|
|
83
|
+
| M-02 | `max` | Same as default but reads more files; has `transition_phase`, `write_file`, `str_replace`, `apply_patch` |
|
|
84
|
+
| M-03 | `fast` | No `write_todos`, `ask_user`, `suggest_followups`; still delegates writes |
|
|
85
|
+
| M-04 | `free`/`lite` | Uses free-tier model; has data_collection deny; still has orchestrator tools |
|
|
86
|
+
| M-05 | `analyze` | Read-only: has `code_search`, `read_files`, `spawn_agents` (Detective/Scout/Thinker); does NOT have `write_file`, `str_replace`, `apply_patch`, `transition_phase` |
|
|
87
|
+
| M-06 | `plan` | Has `ask_user`, `spawn_agents`; does NOT have `write_file`, `str_replace`, `apply_patch` |
|
|
88
|
+
| M-07 | `scaffold` | Has `set_scaffold_complete`; creates one umbrella FID only |
|
|
89
|
+
| M-08 | `deep` | Orchestrates a 6–7 phase workflow with SPEC.md/PLAN.md; has `transition_phase` |
|
|
90
|
+
|
|
91
|
+
**Execution:**
|
|
92
|
+
- For each mode, read the relevant `agents/savant/*.ts` file (e.g., `savant.ts`, `savant-analyze.ts`, `savant-plan.ts`, `savant-scaffold.ts`, `savant-deep.ts`) and record the tool set.
|
|
93
|
+
- Verify the expected presence/absence of each tool above.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Phase 2: Tool-by-Tool Functional Test
|
|
98
|
+
|
|
99
|
+
For each tool in `common/src/tools/constants.ts`, call it with a valid input and verify the result. Report PASS/FAIL per tool.
|
|
100
|
+
|
|
101
|
+
| Test | Tool | Minimal Valid Input | Expected Success Signal |
|
|
102
|
+
|------|------|---------------------|---------------------------|
|
|
103
|
+
| T-01 | `read_files` | `{ "paths": ["ECHO.md"] }` | Returns file contents |
|
|
104
|
+
| T-02 | `read_subtree` | `{ "paths": ["agents"] }` | Returns tree summary |
|
|
105
|
+
| T-03 | `list_directory` | `{ "path": "agents" }` | Returns directory entries |
|
|
106
|
+
| T-04 | `glob` | `{ "pattern": "agents/**/*.ts" }` | Returns matching paths |
|
|
107
|
+
| T-05 | `code_search` | `{ "pattern": "resolveAndContain", "flags": "-g common/src/**/*.ts" }` | Returns search results |
|
|
108
|
+
| T-06 | `find_files` | `{ "query": "agent runtime tool executor" }` | Returns relevant files |
|
|
109
|
+
| T-07 [CRITICAL] | `write_file` | Must be in GREEN phase or exempt path; write to `dev/scratchpad/tool-test.md` | File is written |
|
|
110
|
+
| T-08 | `str_replace` | Replace a line in `dev/scratchpad/tool-test.md` | File is updated |
|
|
111
|
+
| T-09 | `apply_patch` | Apply a small diff to `dev/scratchpad/tool-test.md` | File is patched |
|
|
112
|
+
| T-10 | `propose_write_file` | Propose writing `dev/scratchpad/proposed.md` | Proposal returned (editor best-of-n) |
|
|
113
|
+
| T-11 | `propose_str_replace` | Propose replacing text in `dev/scratchpad/tool-test.md` | Proposal returned (editor best-of-n) |
|
|
114
|
+
| T-12 [OPTIONAL] | `read_url` | `{ "url": "https://example.com" }` | Returns page text (SKIPPABLE if offline) |
|
|
115
|
+
| T-13 [OPTIONAL] | `web_search` | `{ "query": "OpenTUI React terminal UI" }` | Returns search results (SKIPPABLE if offline) |
|
|
116
|
+
| T-14 | `read_docs` | `{ "query": "React useEffect", "source": "react.dev" }` | Returns doc excerpt |
|
|
117
|
+
| T-15 | `skill` | `{ "name": "coding-typescript" }` | Returns skill contents |
|
|
118
|
+
| T-16 | `gravity_index` | `{ "action": "list_categories" }` | Returns service categories |
|
|
119
|
+
| T-17 | `spawn_agents` | `{ "agents": [{"agent_type": "detective", "prompt": "find tests"}] }` | Spawns Detective |
|
|
120
|
+
| T-18 | `spawn_agent_inline` | `{ "agent_type": "context-pruner", "params": {"maxContextLength": 400000} }` | Spawns inline context pruner |
|
|
121
|
+
| T-19 [CRITICAL] | `run_terminal_command` | Must be in AUDIT phase; `{ "command": "echo hello" }` | Returns `hello` |
|
|
122
|
+
| T-20 | `write_todos` | `{ "todos": [{"task": "test", "completed": false}] }` | Todos displayed |
|
|
123
|
+
| T-21 | `ask_user` | `{ "questions": [{"question": "Approve?", "options": [{"label": "Yes"}]} }` | Renders question (user may skip response) |
|
|
124
|
+
| T-22 | `suggest_followups` | `{ "followups": [{"prompt": "Next step", "label": "Next"}] }` | Renders followups |
|
|
125
|
+
| T-23 | `set_output` | `{ "data": {"status": "ok"} }` | Output stored |
|
|
126
|
+
| T-24 | `add_message` | `{ "role": "user", "content": "test" }` | Message added to history |
|
|
127
|
+
| T-25 | `set_messages` | `{ "messages": [] }` | History replaced |
|
|
128
|
+
| T-26 [CRITICAL] | `transition_phase` | `{"phase": "red", "reason": "test"}` in non-analyze mode | Phase transitions |
|
|
129
|
+
| T-27 | `update_subgoal` | `{ "id": "test", "status": "IN_PROGRESS" }` | Subgoal updated |
|
|
130
|
+
| T-28 | `create_plan` | `{ "path": "dev/scratchpad/test-plan.md", "plan": "test plan" }` | Plan file created |
|
|
131
|
+
| T-29 | `render_ui` | `{ "widget": {"type": "button", "text": "Test", "link": "https://example.com"} }` | Renders button |
|
|
132
|
+
| T-30 | `think_deeply` | `{ "prompt": "Think about test coverage" }` | Thinker agent spawns |
|
|
133
|
+
| T-31 | `sequentialthinking` | `{ "prompt": "Plan a test" }` | Thinker agent spawns |
|
|
134
|
+
| T-32 [OPTIONAL] | `browser_logs` | Only if browser active | Browser logs returned (SKIPPABLE if no browser session) |
|
|
135
|
+
| T-33 | `end_turn` | `{}` | Turn ends |
|
|
136
|
+
| T-34 | `task_completed` | `{}` | Task marked complete |
|
|
137
|
+
| T-35 | `set_scaffold_complete` | In scaffold mode | Scaffold mode ends |
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Phase 3: ECHO Phase Gate Tests
|
|
142
|
+
|
|
143
|
+
**Goal:** Verify that write tools are blocked outside GREEN phase and allowed inside it, and that scratchpad/FID paths are exempt.
|
|
144
|
+
|
|
145
|
+
| Test | Phase | Action | Expected |
|
|
146
|
+
|------|-------|--------|----------|
|
|
147
|
+
| P-01 | `idle` | `write_file` to `src/test.txt` | Blocked: "only available during the GREEN phase" |
|
|
148
|
+
| P-02 | `red` | `write_file` to `src/test.txt` | Blocked |
|
|
149
|
+
| P-03 | `green` | `write_file` to `src/test.txt` | Allowed (clean up after) |
|
|
150
|
+
| P-04 | `audit` | `write_file` to `src/test.txt` | Blocked || P-05 | `any` | `write_file` to `dev/scratchpad/any-phase.md` | Allowed (exempt path) |
|
|
151
|
+
| P-06 | `any` | `write_file` to `dev/fids/any-phase.md` | Allowed (exempt path) |
|
|
152
|
+
| P-07 | `idle` | `run_terminal_command` | Blocked: "only available during the AUDIT phase" |
|
|
153
|
+
| P-08 | `audit` | `run_terminal_command "echo ok"` | Allowed |
|
|
154
|
+
| P-09 | `analyze` | `write_file` | Tool not present; agent returns error |
|
|
155
|
+
| P-10 | `dev` | `write_file` to `src/test.txt` in `idle` phase with `devMode` enabled | Allowed (dev override bypasses phase gate) |
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Phase 4: Sub-Agent Roster Test
|
|
160
|
+
|
|
161
|
+
For each agent in the ECHO roster, spawn it with a minimal task and verify it executes without error.
|
|
162
|
+
|
|
163
|
+
| Test | Agent | Task Prompt | Expected |
|
|
164
|
+
|------|-------|-------------|----------|
|
|
165
|
+
| A-01 | `detective` | "Search for all tests of resolveAndContain" | Returns issue catalog |
|
|
166
|
+
| A-02 | `scout` | "Find all files related to the sidebar" | Returns file list |
|
|
167
|
+
| A-03 | `researcher-web` | "What is OpenTUI?" | Returns research summary |
|
|
168
|
+
| A-04 | `researcher-docs` | "React useEffect docs" | Returns doc summary |
|
|
169
|
+
| A-05 | `basher` | "Run `cd common && bun run typecheck`" | Returns command output |
|
|
170
|
+
| A-06 | `thinker` | "Think through the pros and cons of adding gap={1} to all sidebar components" | Returns analysis |
|
|
171
|
+
| A-07 | `forge` | Must be in GREEN phase; "Create a tiny test file in dev/scratchpad" | File created |
|
|
172
|
+
| A-08 | `verifier` | "Review the file created by forge" | Returns review |
|
|
173
|
+
| A-09 | `recorder` | "Create a test FID in dev/fids/" | FID created |
|
|
174
|
+
| A-10 | `scribe` | "Summarize this session's changes" | Returns summary |
|
|
175
|
+
| A-11 | `context-pruner` | (spawned automatically) | Context pruned |
|
|
176
|
+
| A-12 | `browser-use` | "Fetch https://example.com" | Returns page text |
|
|
177
|
+
| A-13 | `tmux-cli` | (if CLI interactive testing is available) | Executes command (SKIPPABLE if no tmux session available) |
|
|
178
|
+
|
|
179
|
+
**Sub-agent verification criteria:** For each spawned sub-agent, the test passes if:
|
|
180
|
+
- The agent runs to completion (no tool/validation error).
|
|
181
|
+
- The returned output contains the expected structure:
|
|
182
|
+
- **Detective:** at least one issue with `file path`, `line number`, and `severity`.
|
|
183
|
+
- **Scout:** a list of relevant file paths.
|
|
184
|
+
- **Researcher:** a concise summary with source URLs or doc references.
|
|
185
|
+
- **Basher:** the exact command output and exit code.
|
|
186
|
+
- **Thinker:** `<thinking>` ... `</thinking>` tags with numbered steps and a conclusion.
|
|
187
|
+
- **Forge:** the created/updated file path.
|
|
188
|
+
- **Verifier:** a list of findings with at least one critical or blocking issue flagged.
|
|
189
|
+
- **Recorder/Scribe:** the created/updated file path or summary text.
|
|
190
|
+
- No disallowed tool is called by that agent (e.g., Detective must not call `write_file`).
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## Phase 5: FID Lifecycle
|
|
195
|
+
|
|
196
|
+
| Test | Action | Expected |
|
|
197
|
+
|------|--------|----------|
|
|
198
|
+
| FID-01 | Recorder creates a FID in `dev/fids/` | FID file exists with required metadata |
|
|
199
|
+
| FID-02 | Update the FID status to `in_progress` | FID status field updated |
|
|
200
|
+
| FID-03 | Move the FID to `dev/fids/archive/` | FID is archived |
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Phase 6: Path Safety & Containment
|
|
205
|
+
|
|
206
|
+
| Test | Path | Tool | Expected |
|
|
207
|
+
|------|------|------|----------|
|
|
208
|
+
| S-01 | `/etc/passwd` | `write_file` | Rejected: escapes project root |
|
|
209
|
+
| S-02 | `../../etc/passwd` | `write_file` | Rejected: escapes project root |
|
|
210
|
+
| S-03 | `dev/fids/../etc/passwd` | `write_file` | Rejected: collapses to escape |
|
|
211
|
+
| S-04 | `dev/scratchpad/test.md` | `write_file` | Allowed: exempt |
|
|
212
|
+
| S-05 | `dev/fids/test.md` | `write_file` | Allowed: exempt |
|
|
213
|
+
| S-06 | Absolute path to `dev/scratchpad/test.md` | `write_file` | Allowed: exempt |
|
|
214
|
+
| S-07 | Symlink to `/etc/passwd` | `write_file` | Rejected: symlink escape |
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## Phase 7: Skills System
|
|
219
|
+
|
|
220
|
+
| Test | Skill | Expected |
|
|
221
|
+
|------|-------|----------|
|
|
222
|
+
| SK-01 | `coding-typescript` | Loads TypeScript conventions |
|
|
223
|
+
| SK-02 | `coding-python` | Loads Python conventions |
|
|
224
|
+
| SK-03 | `coding-rust` | Loads Rust conventions |
|
|
225
|
+
| SK-04 | `coding-java` | Loads Java conventions |
|
|
226
|
+
| SK-05 | `coding-go` | Loads Go conventions |
|
|
227
|
+
| SK-06 | `coding-csharp` | Loads C# conventions |
|
|
228
|
+
| SK-07 | `release-workflow` | Loads release workflow |
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
## Phase 8: Dev Override & FSM Bypass
|
|
233
|
+
|
|
234
|
+
| Test | Scenario | Expected |
|
|
235
|
+
|------|----------|----------|
|
|
236
|
+
| DEV-01 | Enable `devMode`, then `write_file` to `tmp/devmode-test.txt` in `idle` phase | Allowed (dev override); clean up after |
|
|
237
|
+
| DEV-02 | Disable `devMode`, then `write_file` to `tmp/devmode-test.txt` in `idle` phase | Blocked (phase gate active) |
|
|
238
|
+
| DEV-03 | With `devMode` on, `run_terminal_command` in `idle` phase | Allowed (dev override bypasses AUDIT gate) |
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## Phase 9: Perfection Loop
|
|
243
|
+
|
|
244
|
+
**Goal:** Verify the ECHO Perfection Loop advances through phases, displays correctly in the sidebar, and respects the circuit breaker.
|
|
245
|
+
|
|
246
|
+
| Test | Action | Expected |
|
|
247
|
+
|------|--------|----------|
|
|
248
|
+
| PL-01 [CRITICAL] | Create a FID in `dev/fids/`, transition `idle` → `red` → `green` → `audit` → `self_correct` → `complete` | Each `transition_phase` succeeds and the right sidebar shows the matching phase label/color |
|
|
249
|
+
| PL-02 | In the sidebar, verify the Perfection Loop widget shows RED as the active phase when at least one open FID has status `created` or `analyzed` | Widget renders without overlap, current step highlighted |
|
|
250
|
+
| PL-03 | Verify the loop prevents invalid transitions (e.g., `idle` → `complete`) | Returns an error or is rejected by the FSM |
|
|
251
|
+
| PL-04 | Open more than 10 FIDs and cycle them; verify a circuit breaker/halting condition is reached (or the system degrades gracefully) | No crash; loop state remains consistent |
|
|
252
|
+
| PL-05 | Archive all open FIDs and confirm the loop returns to the `complete`/`idle` state | Sidebar shows loop converged |
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Phase 10: Sequential Thinking / Thinker Agent Deep Test
|
|
257
|
+
|
|
258
|
+
**Goal:** Verify the Thinker agent, `think_deeply`, and `sequentialthinking` produce structured reasoning and respect tool restrictions.
|
|
259
|
+
|
|
260
|
+
| Test | Action | Expected |
|
|
261
|
+
|------|--------|----------|
|
|
262
|
+
| ST-01 [CRITICAL] | Spawn the `thinker` agent with a multi-step problem (e.g., "Compare three approaches to caching in this repo") | Returns a response containing `<thinking>` ... `</thinking>` tags with numbered steps and a conclusion |
|
|
263
|
+
| ST-02 | Call `sequentialthinking` from the Orchestrator with a prompt that requires stepwise reasoning | Thinker agent is spawned and returns a structured answer |
|
|
264
|
+
| ST-03 | Call `think_deeply` with the same prompt | Returns deep reasoning; no crash |
|
|
265
|
+
| ST-04 | Verify `sequentialthinking` is rejected when called by a non-Thinker agent | Error: "only available to Thinker agents" |
|
|
266
|
+
| ST-05 | Verify the `<thinking>` block is stripped from the final user-facing output (if applicable) | Final message does not contain raw `<thinking>` tags |
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## Phase 11: Validation Gates
|
|
271
|
+
|
|
272
|
+
| Test | Command | Expected |
|
|
273
|
+
|------|---------|----------|
|
|
274
|
+
| V-01 | `cd sdk && bun run typecheck` | Exit 0 |
|
|
275
|
+
| V-02 | `cd common && bun run typecheck` | Exit 0 |
|
|
276
|
+
| V-03 | `cd packages/agent-runtime && bun run typecheck` | Exit 0 |
|
|
277
|
+
| V-04 | `cd cli && bun run typecheck` | Exit 0 |
|
|
278
|
+
| V-05 | `bun test common/src/util/__tests__/paths.test.ts` | All pass |
|
|
279
|
+
| V-06 | `bun x eslint cli/src/components/right-sidebar.tsx --max-warnings 0` | Exit 0 |
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## Phase 12: Error Handling & Edge Cases
|
|
284
|
+
|
|
285
|
+
| Test | Scenario | Expected |
|
|
286
|
+
|------|----------|----------|
|
|
287
|
+
| E-01 | Call `spawn_agents` with a non-existent agent | Error: agent does not exist |
|
|
288
|
+
| E-02 | Call `write_file` with missing `content` | Validation error |
|
|
289
|
+
| E-03 | Call `str_replace` with mismatched `oldString` | Error/patch not applied |
|
|
290
|
+
| E-04 | Call `read_files` with non-existent path | Error or empty result |
|
|
291
|
+
| E-05 | Call `run_terminal_command` with destructive command in AUDIT | Agent warns and asks user |
|
|
292
|
+
| E-06 | Call `transition_phase` with invalid phase | Validation error |
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
## Phase 13: Report & Cleanup
|
|
297
|
+
|
|
298
|
+
After all tests, write the report to `dev/scratchpad/agent-capabilities-test-report.md` with the following sections. You may copy the template below and fill it in.
|
|
299
|
+
|
|
300
|
+
**Cleanup — remove all temporary test artifacts:**
|
|
301
|
+
- `dev/scratchpad/tool-test.md`
|
|
302
|
+
- `dev/scratchpad/proposed.md`
|
|
303
|
+
- `dev/scratchpad/test-plan.md`
|
|
304
|
+
- `dev/scratchpad/agent-test-progress.md`
|
|
305
|
+
- `tmp/devmode-test.txt` (and any `tmp/` directory if created)
|
|
306
|
+
- Any test FIDs created in `dev/fids/` (move to `dev/fids/archive/` if they should be kept for evidence, then delete if ephemeral)
|
|
307
|
+
- Any files written to non-exempt source paths (e.g., `src/test.txt`) — these should NOT exist after cleanup.
|
|
308
|
+
|
|
309
|
+
**Important:** Do not delete `dev/scratchpad/agent-capabilities-test-report.md` — this is the deliverable.
|
|
310
|
+
|
|
311
|
+
**Report template:**
|
|
312
|
+
|
|
313
|
+
```markdown
|
|
314
|
+
# Agent Capabilities Test Report
|
|
315
|
+
|
|
316
|
+
## Summary
|
|
317
|
+
- **Date:**
|
|
318
|
+
- **Agent/Model:**
|
|
319
|
+
- **Total tests:**
|
|
320
|
+
- **PASS:**
|
|
321
|
+
- **FAIL:**
|
|
322
|
+
- **SKIP:**
|
|
323
|
+
|
|
324
|
+
## Critical Success Criteria
|
|
325
|
+
- [ ] All mode tests (M-01..M-08) pass.
|
|
326
|
+
- [ ] All core tools (T-01..T-35) pass.
|
|
327
|
+
- [ ] GREEN phase allows source writes; non-GREEN phases block them.
|
|
328
|
+
- [ ] Exempt paths (`dev/scratchpad`, `dev/fids`) are writable in any phase.
|
|
329
|
+
- [ ] All 9+ sub-agents spawn and execute.
|
|
330
|
+
- [ ] All typecheck gates (V-01..V-04) pass.
|
|
331
|
+
|
|
332
|
+
## Detailed Results
|
|
333
|
+
| Test ID | Section | Status | Evidence | Notes |
|
|
334
|
+
|---------|---------|--------|----------|-------|
|
|
335
|
+
| T-01 | Tools | PASS | `read_files` returned ECHO.md contents | - |
|
|
336
|
+
|
|
337
|
+
## Failures & Recommendations
|
|
338
|
+
List each FAIL/SKIP, the root cause, and the recommended fix or further investigation.
|
|
339
|
+
|
|
340
|
+
## Sign-off
|
|
341
|
+
The agent is / is not verified for the next run because: __________
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
## Appendix: Quick Reference for the Testing Agent
|
|
347
|
+
|
|
348
|
+
**Tool set to verify presence/absence:**
|
|
349
|
+
- Orchestrator: `spawn_agents`, `read_files`, `read_subtree`, `write_todos`, `suggest_followups`, `ask_user`, `read_url`, `skill`, `set_output`, `list_directory`, `glob`, `render_ui`, `gravity_index`, `transition_phase`, `write_file`, `str_replace`, `apply_patch`, `set_scaffold_complete` (scaffold mode).
|
|
350
|
+
- Read-only agents: Detective, Scout, Researcher, Verifier.
|
|
351
|
+
- Write agents: Forge.
|
|
352
|
+
- Utility agents: Basher, Thinker, Context-Pruner, Recorder, Scribe, Browser-Use, tmux-cli.
|
|
353
|
+
|
|
354
|
+
**ECHO phases:** `idle` → `red` → `green` → `audit` → `self_correct` → `complete`.
|
|
355
|
+
|
|
356
|
+
**Exempt paths (always writable):** `dev/fids/`, `dev/scratchpad/`.
|
|
357
|
+
|
|
358
|
+
**FSM rules:**
|
|
359
|
+
- `write_file`, `str_replace`, `apply_patch` → GREEN phase only (or exempt path / dev override / scaffold mode).
|
|
360
|
+
- `run_terminal_command` → AUDIT phase only.
|
|
361
|
+
- `sequentialthinking` → Thinker agents only.
|