savant-code 0.0.19 → 0.0.21
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/README.md +402 -550
- package/{cli/release/index.js → index.js} +0 -0
- package/{cli/release-core/launcher.js → launcher.js} +138 -32
- package/package.json +44 -71
- package/.agents/skills/coding-csharp/SKILL.md +0 -82
- package/.agents/skills/coding-go/SKILL.md +0 -76
- package/.agents/skills/coding-java/SKILL.md +0 -79
- package/.agents/skills/coding-python/SKILL.md +0 -87
- package/.agents/skills/coding-rust/SKILL.md +0 -83
- package/.agents/skills/coding-typescript/SKILL.md +0 -90
- package/.agents/skills/release-workflow/SKILL.md +0 -69
- package/.bun-version +0 -1
- package/.commandcode/settings.json +0 -11
- package/.commandcode/taste/workflow/taste.md +0 -6
- package/.env.example +0 -95
- package/.gitattributes +0 -43
- package/.githooks/pre-push +0 -35
- package/.github/workflows/build-release-binaries.yml +0 -163
- package/.markdownlint.json +0 -42
- package/.markdownlintignore +0 -21
- package/.prettierignore +0 -9
- package/.prettierrc +0 -23
- package/.savantignore +0 -3
- package/AGENTS.md +0 -97
- package/ARCHITECTURE.md +0 -241
- package/CHANGELOG.md +0 -2631
- package/CONTRIBUTING.md +0 -88
- package/ECHO-freebuff.md +0 -22
- package/ECHO.md +0 -722
- package/FREEREADME.md +0 -35
- package/LEARNINGS.md +0 -345
- package/NOTICE +0 -15
- package/README.zh-CN.md +0 -479
- package/SECURITY.md +0 -8
- package/VERSION +0 -1
- package/WINDOWS.md +0 -238
- package/agents/README.md +0 -41
- package/agents/base-chat.ts +0 -44
- package/agents/basher.ts +0 -107
- package/agents/browser-use/browser-use.test.ts +0 -211
- package/agents/browser-use/browser-use.ts +0 -259
- package/agents/constants.ts +0 -1
- package/agents/context-pruner.ts +0 -1076
- package/agents/detective/detective.ts +0 -168
- package/agents/editor/best-of-n/best-of-n-selector2.ts +0 -148
- package/agents/editor/best-of-n/editor-implementor-gpt-5.ts +0 -7
- package/agents/editor/best-of-n/editor-implementor-opus.ts +0 -7
- package/agents/editor/best-of-n/editor-implementor.ts +0 -196
- package/agents/editor/best-of-n/editor-multi-prompt.ts +0 -265
- package/agents/file-explorer/directory-lister.ts +0 -92
- package/agents/file-explorer/glob-matcher.ts +0 -96
- package/agents/forge/forge.ts +0 -146
- package/agents/librarian/librarian.test.ts +0 -289
- package/agents/librarian/librarian.ts +0 -158
- package/agents/package.json +0 -11
- package/agents/recorder/recorder.ts +0 -104
- package/agents/researcher/researcher-docs.ts +0 -32
- package/agents/researcher/researcher-web.ts +0 -40
- package/agents/savant/savant-analyze.ts +0 -11
- package/agents/savant/savant-free-deepseek-flash.ts +0 -13
- package/agents/savant/savant-free-deepseek.ts +0 -13
- package/agents/savant/savant-free-evals.ts +0 -9
- package/agents/savant/savant-free-glm.ts +0 -13
- package/agents/savant/savant-free-kimi.ts +0 -13
- package/agents/savant/savant-free-mimo-pro.ts +0 -13
- package/agents/savant/savant-free-mimo.ts +0 -13
- package/agents/savant/savant-free-minimax-m3.ts +0 -13
- package/agents/savant/savant-free.ts +0 -9
- package/agents/savant/savant-scaffold.ts +0 -15
- package/agents/savant/savant.ts +0 -706
- package/agents/scout/scout.ts +0 -305
- package/agents/scribe/scribe.ts +0 -54
- package/agents/thinker/thinker-gemini.ts +0 -26
- package/agents/thinker/thinker-gpt.ts +0 -21
- package/agents/thinker/thinker-with-files-gemini.ts +0 -66
- package/agents/thinker/thinker.ts +0 -99
- package/agents/tmux-cli.ts +0 -724
- package/agents/tsconfig.json +0 -12
- package/agents/types/agent-definition.ts +0 -1
- package/agents/types/secret-agent-definition.ts +0 -103
- package/agents/types/tools.ts +0 -465
- package/agents/types/util-types.ts +0 -167
- package/agents/verifier/verifier.ts +0 -80
- package/art/savant-redesign.md +0 -7
- package/art/savant-text-graf.md +0 -5
- package/art/savant_ascii.md +0 -88
- package/assets/banner.png +0 -0
- package/bun.lock +0 -1979
- package/bunfig.toml +0 -7
- package/cli/README.md +0 -111
- package/cli/bunfig.toml +0 -2
- package/cli/cli_exit +0 -1
- package/cli/package.json +0 -66
- package/cli/release/README.md +0 -348
- package/cli/release/package.json +0 -56
- package/cli/release-core/README.md +0 -20
- package/cli/release-core/package.json +0 -4
- package/cli/release-core/prepare-package.js +0 -31
- package/cli/release-staging/README.md +0 -70
- package/cli/release-staging/index.js +0 -42
- package/cli/release-staging/package.json +0 -43
- package/cli/scripts/build-binary.ts +0 -469
- package/cli/scripts/clean.ts +0 -16
- package/cli/scripts/prebuild-agents.ts +0 -250
- package/cli/scripts/release.ts +0 -103
- package/cli/scripts/smoke-binary.ts +0 -280
- package/cli/scripts/test-sdk-file-hooks.sh +0 -87
- package/cli/scripts/validate-cli-with-tmux.sh +0 -43
- package/cli/src/__tests__/README.md +0 -256
- package/cli/src/__tests__/bash-mode.test.ts +0 -442
- package/cli/src/__tests__/cli-args.test.ts +0 -241
- package/cli/src/__tests__/e2e/first-time-login.test.ts +0 -173
- package/cli/src/__tests__/e2e/logout-relogin-flow.test.ts +0 -110
- package/cli/src/__tests__/e2e/returning-user-auth.test.ts +0 -111
- package/cli/src/__tests__/e2e-cli.test.ts +0 -185
- package/cli/src/__tests__/helpers/mock-api-client.ts +0 -64
- package/cli/src/__tests__/helpers/terminal-watchdog-fixture.ts +0 -50
- package/cli/src/__tests__/home-directory-detection.test.ts +0 -213
- package/cli/src/__tests__/integration/agent-toolnames-validation.test.ts +0 -63
- package/cli/src/__tests__/integration/api-integration.test.ts +0 -289
- package/cli/src/__tests__/integration/credentials-storage.test.ts +0 -453
- package/cli/src/__tests__/integration/local-agents.test.ts +0 -1187
- package/cli/src/__tests__/integration/login-flow-instrumentation.test.ts +0 -146
- package/cli/src/__tests__/integration/login-polling-working.test.ts +0 -287
- package/cli/src/__tests__/integration/usage-refresh-on-completion.test.ts +0 -177
- package/cli/src/__tests__/integration-tmux.test.ts +0 -186
- package/cli/src/__tests__/mocks/hover-toggle-controller.ts +0 -71
- package/cli/src/__tests__/path-completion.test.ts +0 -243
- package/cli/src/__tests__/project-files-chat-id.test.ts +0 -34
- package/cli/src/__tests__/release/proxy-http-get.test.ts +0 -670
- package/cli/src/__tests__/release/wrapper-safety.test.ts +0 -177
- package/cli/src/__tests__/rerender-perf.integration.test.ts +0 -283
- package/cli/src/__tests__/terminal-reset-sequences.test.ts +0 -36
- package/cli/src/__tests__/terminal-watchdog.test.ts +0 -114
- package/cli/src/__tests__/test-utils.ts +0 -266
- package/cli/src/__tests__/tmux-poc.ts +0 -150
- package/cli/src/__tests__/unit/agent-mode-toggle.test.ts +0 -138
- package/cli/src/__tests__/unit/copy-button.test.tsx +0 -188
- package/cli/src/__tests__/unit/create-run-config.test.ts +0 -77
- package/cli/src/__tests__/unit/publish-confirmation.test.ts +0 -70
- package/cli/src/__tests__/unit/segmented-control.test.ts +0 -167
- package/cli/src/__tests__/utils/env.test.ts +0 -210
- package/cli/src/__tests__/utils/project-picker.test.ts +0 -39
- package/cli/src/agents/bundled-agents.generated.d.ts +0 -14
- package/cli/src/agents/bundled-agents.generated.ts +0 -1962
- package/cli/src/app.tsx +0 -383
- package/cli/src/chat.tsx +0 -2008
- package/cli/src/cli-args.ts +0 -183
- package/cli/src/commands/__tests__/bash-command.test.ts +0 -449
- package/cli/src/commands/__tests__/command-args.test.ts +0 -325
- package/cli/src/commands/__tests__/copy-conversation.test.ts +0 -240
- package/cli/src/commands/__tests__/dev-command.test.ts +0 -128
- package/cli/src/commands/__tests__/diagnostics-command.test.ts +0 -35
- package/cli/src/commands/__tests__/image.test.ts +0 -99
- package/cli/src/commands/__tests__/init.test.ts +0 -479
- package/cli/src/commands/__tests__/loop-command.test.ts +0 -89
- package/cli/src/commands/__tests__/new-command-rotates-chat.test.ts +0 -87
- package/cli/src/commands/__tests__/permissions-command.test.ts +0 -93
- package/cli/src/commands/__tests__/process-diagnostics.test.ts +0 -54
- package/cli/src/commands/__tests__/prompt-builders.test.ts +0 -69
- package/cli/src/commands/__tests__/registry-gating.test.ts +0 -125
- package/cli/src/commands/__tests__/rewind-command.test.ts +0 -227
- package/cli/src/commands/__tests__/router-connect-chatgpt.test.ts +0 -72
- package/cli/src/commands/__tests__/router-input.test.ts +0 -302
- package/cli/src/commands/__tests__/router-provider-setup.test.ts +0 -180
- package/cli/src/commands/__tests__/savant-free-command-aliases.test.ts +0 -56
- package/cli/src/commands/ads.ts +0 -45
- package/cli/src/commands/command-registry.ts +0 -1112
- package/cli/src/commands/copy-conversation.ts +0 -386
- package/cli/src/commands/goal.ts +0 -87
- package/cli/src/commands/health-command.ts +0 -61
- package/cli/src/commands/help.ts +0 -13
- package/cli/src/commands/image.ts +0 -20
- package/cli/src/commands/init.ts +0 -121
- package/cli/src/commands/loop.ts +0 -182
- package/cli/src/commands/process-diagnostics.ts +0 -120
- package/cli/src/commands/prompt-builders.ts +0 -140
- package/cli/src/commands/publish.ts +0 -261
- package/cli/src/commands/rewind.ts +0 -130
- package/cli/src/commands/router-utils.ts +0 -80
- package/cli/src/commands/router.ts +0 -589
- package/cli/src/commands/telemetry.ts +0 -68
- package/cli/src/commands/usage.ts +0 -26
- package/cli/src/components/__tests__/ad-banner.test.tsx +0 -84
- package/cli/src/components/__tests__/block-helpers.test.tsx +0 -139
- package/cli/src/components/__tests__/clickable.test.tsx +0 -39
- package/cli/src/components/__tests__/grid-layout.integration.test.tsx +0 -365
- package/cli/src/components/__tests__/grid-layout.test.tsx +0 -1033
- package/cli/src/components/__tests__/markdown-content.test.tsx +0 -163
- package/cli/src/components/__tests__/message-block.completion.test.tsx +0 -104
- package/cli/src/components/__tests__/message-block.streaming.test.tsx +0 -78
- package/cli/src/components/__tests__/message-with-agents.test.tsx +0 -571
- package/cli/src/components/__tests__/multiline-input.test.tsx +0 -1129
- package/cli/src/components/__tests__/selectable-list.test.ts +0 -232
- package/cli/src/components/__tests__/shimmer-text.test.tsx +0 -32
- package/cli/src/components/__tests__/status-indicator.test.tsx +0 -184
- package/cli/src/components/__tests__/user-error-banner.test.tsx +0 -100
- package/cli/src/components/ad-banner.tsx +0 -351
- package/cli/src/components/agent-checklist.tsx +0 -385
- package/cli/src/components/agent-mode-toggle.tsx +0 -294
- package/cli/src/components/ask-user/__tests__/multiple-choice-form.test.ts +0 -432
- package/cli/src/components/ask-user/__tests__/validation.test.ts +0 -213
- package/cli/src/components/ask-user/components/accordion-question.tsx +0 -153
- package/cli/src/components/ask-user/components/custom-answer-input.tsx +0 -66
- package/cli/src/components/ask-user/components/options-list.tsx +0 -139
- package/cli/src/components/ask-user/components/question-header.tsx +0 -80
- package/cli/src/components/ask-user/components/question-option.tsx +0 -94
- package/cli/src/components/ask-user/constants.ts +0 -35
- package/cli/src/components/ask-user/index.tsx +0 -660
- package/cli/src/components/ask-user/utils/validation.ts +0 -85
- package/cli/src/components/attachment-card.tsx +0 -67
- package/cli/src/components/blocks/agent-block-grid.tsx +0 -58
- package/cli/src/components/blocks/agent-branch-item.tsx +0 -230
- package/cli/src/components/blocks/agent-branch-wrapper.tsx +0 -524
- package/cli/src/components/blocks/agent-list-branch.tsx +0 -77
- package/cli/src/components/blocks/ask-user-branch.tsx +0 -98
- package/cli/src/components/blocks/block-helpers.tsx +0 -257
- package/cli/src/components/blocks/blocks-renderer.tsx +0 -296
- package/cli/src/components/blocks/content-with-markdown.tsx +0 -34
- package/cli/src/components/blocks/copy-button.tsx +0 -106
- package/cli/src/components/blocks/copyable-block.tsx +0 -47
- package/cli/src/components/blocks/image-block.tsx +0 -128
- package/cli/src/components/blocks/implementor-row.tsx +0 -453
- package/cli/src/components/blocks/markdown-content.tsx +0 -360
- package/cli/src/components/blocks/markdown-renderables.tsx +0 -347
- package/cli/src/components/blocks/single-block.tsx +0 -210
- package/cli/src/components/blocks/thinking-block.tsx +0 -77
- package/cli/src/components/blocks/tool-block-group.tsx +0 -72
- package/cli/src/components/blocks/tool-branch.tsx +0 -196
- package/cli/src/components/blocks/user-content-copy.tsx +0 -171
- package/cli/src/components/bottom-banner.tsx +0 -145
- package/cli/src/components/build-mode-buttons.tsx +0 -110
- package/cli/src/components/button.tsx +0 -75
- package/cli/src/components/chat-header.tsx +0 -11
- package/cli/src/components/chat-history-screen.tsx +0 -417
- package/cli/src/components/chat-input-bar.tsx +0 -535
- package/cli/src/components/chatgpt-connect-banner.tsx +0 -234
- package/cli/src/components/clickable.tsx +0 -149
- package/cli/src/components/collapse-button.tsx +0 -36
- package/cli/src/components/command-palette.tsx +0 -166
- package/cli/src/components/copy-button.tsx +0 -219
- package/cli/src/components/dialog.tsx +0 -111
- package/cli/src/components/elapsed-timer.tsx +0 -56
- package/cli/src/components/error-boundary.tsx +0 -63
- package/cli/src/components/feedback-container.tsx +0 -206
- package/cli/src/components/feedback-icon-button.tsx +0 -89
- package/cli/src/components/feedback-input-mode.tsx +0 -352
- package/cli/src/components/file-attachment-card.tsx +0 -89
- package/cli/src/components/grid-layout.tsx +0 -83
- package/cli/src/components/help-banner.tsx +0 -136
- package/cli/src/components/highlighted-text.tsx +0 -52
- package/cli/src/components/image-card.tsx +0 -167
- package/cli/src/components/image-thumbnail.tsx +0 -112
- package/cli/src/components/input-cursor.tsx +0 -77
- package/cli/src/components/input-mode-banner.tsx +0 -70
- package/cli/src/components/load-previous-button.tsx +0 -48
- package/cli/src/components/login-modal.tsx +0 -450
- package/cli/src/components/message-block.tsx +0 -337
- package/cli/src/components/message-footer.tsx +0 -269
- package/cli/src/components/message-with-agents.tsx +0 -594
- package/cli/src/components/mode-divider.tsx +0 -43
- package/cli/src/components/model-picker.tsx +0 -371
- package/cli/src/components/multiline-input.tsx +0 -1276
- package/cli/src/components/out-of-credits-banner.tsx +0 -155
- package/cli/src/components/pending-attachments-banner.tsx +0 -125
- package/cli/src/components/pending-bash-message.tsx +0 -57
- package/cli/src/components/progress-bar.tsx +0 -81
- package/cli/src/components/project-picker-screen.tsx +0 -469
- package/cli/src/components/provider-picker.tsx +0 -139
- package/cli/src/components/publish-confirmation.tsx +0 -514
- package/cli/src/components/publish-container.tsx +0 -737
- package/cli/src/components/raised-pill.tsx +0 -89
- package/cli/src/components/renderers/plan-box.tsx +0 -70
- package/cli/src/components/review-screen.tsx +0 -114
- package/cli/src/components/rewind-picker.tsx +0 -276
- package/cli/src/components/right-sidebar.tsx +0 -296
- package/cli/src/components/savant-free-active-session-summary.tsx +0 -63
- package/cli/src/components/savant-free-landing-screen.tsx +0 -756
- package/cli/src/components/savant-free-model-selector.tsx +0 -815
- package/cli/src/components/savant-free-referral-banner.tsx +0 -423
- package/cli/src/components/savant-free-superseded-screen.tsx +0 -62
- package/cli/src/components/savant-ui/animation/pulse.tsx +0 -26
- package/cli/src/components/savant-ui/animation/typewriter.tsx +0 -40
- package/cli/src/components/savant-ui/branding.tsx +0 -59
- package/cli/src/components/savant-ui/data-display/badge.tsx +0 -52
- package/cli/src/components/savant-ui/data-display/code-block.tsx +0 -55
- package/cli/src/components/savant-ui/data-display/key-value.tsx +0 -34
- package/cli/src/components/savant-ui/data-display/sparkline.tsx +0 -42
- package/cli/src/components/savant-ui/data-display/timeline.tsx +0 -44
- package/cli/src/components/savant-ui/data-display/tree-view.tsx +0 -55
- package/cli/src/components/savant-ui/echo/__tests__/sidebar-collapse.test.tsx +0 -90
- package/cli/src/components/savant-ui/echo/agent-stack.tsx +0 -72
- package/cli/src/components/savant-ui/echo/agent-status.tsx +0 -66
- package/cli/src/components/savant-ui/echo/fid-card.tsx +0 -89
- package/cli/src/components/savant-ui/echo/fid-list.tsx +0 -68
- package/cli/src/components/savant-ui/echo/loop-status-panel.tsx +0 -64
- package/cli/src/components/savant-ui/echo/perfection-loop.tsx +0 -118
- package/cli/src/components/savant-ui/echo/phase-indicator.tsx +0 -68
- package/cli/src/components/savant-ui/echo/phase-info.ts +0 -72
- package/cli/src/components/savant-ui/echo/token-meter.tsx +0 -39
- package/cli/src/components/savant-ui/feedback/alert.tsx +0 -45
- package/cli/src/components/savant-ui/feedback/cost-tracker.tsx +0 -54
- package/cli/src/components/savant-ui/feedback/progress-bar.tsx +0 -71
- package/cli/src/components/savant-ui/feedback/spinner.tsx +0 -40
- package/cli/src/components/savant-ui/icon-theme-keys.ts +0 -67
- package/cli/src/components/savant-ui/icon.tsx +0 -53
- package/cli/src/components/savant-ui/index.ts +0 -75
- package/cli/src/components/savant-ui/input/select.tsx +0 -26
- package/cli/src/components/savant-ui/input/toggle.tsx +0 -28
- package/cli/src/components/savant-ui/layout/grid.tsx +0 -52
- package/cli/src/components/savant-ui/layout/header.tsx +0 -28
- package/cli/src/components/savant-ui/navigation/stepper.tsx +0 -41
- package/cli/src/components/savant-ui/primitives/key-hint.tsx +0 -45
- package/cli/src/components/savant-ui/primitives/key-value-row.tsx +0 -41
- package/cli/src/components/savant-ui/primitives/panel.tsx +0 -42
- package/cli/src/components/savant-ui/primitives/separator.tsx +0 -34
- package/cli/src/components/savant-ui/primitives/sidebar-section.tsx +0 -64
- package/cli/src/components/savant-ui/primitives/spacer.tsx +0 -13
- package/cli/src/components/savant-ui/primitives/stack.tsx +0 -35
- package/cli/src/components/savant-ui/theme.ts +0 -45
- package/cli/src/components/scroll-to-bottom-button.tsx +0 -34
- package/cli/src/components/segmented-control.tsx +0 -199
- package/cli/src/components/selectable-list.tsx +0 -249
- package/cli/src/components/selected-chips.tsx +0 -86
- package/cli/src/components/separator.tsx +0 -40
- package/cli/src/components/session-ended-banner.tsx +0 -183
- package/cli/src/components/shimmer-text.tsx +0 -254
- package/cli/src/components/status-bar.tsx +0 -279
- package/cli/src/components/subscription-limit-banner.tsx +0 -269
- package/cli/src/components/suggested-prompts.tsx +0 -184
- package/cli/src/components/suggestion-menu.tsx +0 -219
- package/cli/src/components/terminal-command-display.tsx +0 -152
- package/cli/src/components/terminal-link.tsx +0 -97
- package/cli/src/components/text-attachment-card.tsx +0 -77
- package/cli/src/components/thinking.tsx +0 -108
- package/cli/src/components/toast.tsx +0 -109
- package/cli/src/components/tools/__tests__/apply-patch.test.tsx +0 -97
- package/cli/src/components/tools/__tests__/code-search.test.tsx +0 -45
- package/cli/src/components/tools/__tests__/gravity-index.test.ts +0 -76
- package/cli/src/components/tools/__tests__/render-ui.test.tsx +0 -556
- package/cli/src/components/tools/__tests__/run-terminal-command.test.ts +0 -274
- package/cli/src/components/tools/__tests__/tool-call-item.test.tsx +0 -73
- package/cli/src/components/tools/apply-patch.tsx +0 -101
- package/cli/src/components/tools/code-search.tsx +0 -50
- package/cli/src/components/tools/composio.tsx +0 -140
- package/cli/src/components/tools/diff-viewer.tsx +0 -21
- package/cli/src/components/tools/glob.tsx +0 -66
- package/cli/src/components/tools/gravity-index.tsx +0 -80
- package/cli/src/components/tools/list-directory.tsx +0 -66
- package/cli/src/components/tools/read-docs.tsx +0 -36
- package/cli/src/components/tools/read-files.tsx +0 -97
- package/cli/src/components/tools/read-subtree.tsx +0 -40
- package/cli/src/components/tools/read-url.tsx +0 -32
- package/cli/src/components/tools/registry.ts +0 -131
- package/cli/src/components/tools/render-ui.tsx +0 -466
- package/cli/src/components/tools/run-terminal-command.tsx +0 -86
- package/cli/src/components/tools/skill.tsx +0 -26
- package/cli/src/components/tools/str-replace.tsx +0 -77
- package/cli/src/components/tools/suggest-followups.tsx +0 -373
- package/cli/src/components/tools/task-completed.tsx +0 -16
- package/cli/src/components/tools/tool-call-item.tsx +0 -163
- package/cli/src/components/tools/types.ts +0 -100
- package/cli/src/components/tools/web-search.tsx +0 -32
- package/cli/src/components/tools/write-file.tsx +0 -20
- package/cli/src/components/tools/write-todos.tsx +0 -105
- package/cli/src/components/top-banner.tsx +0 -187
- package/cli/src/components/usage-banner.tsx +0 -296
- package/cli/src/components/user-error-banner.tsx +0 -54
- package/cli/src/components/validation-error-popover.tsx +0 -191
- package/cli/src/data/slash-commands.ts +0 -306
- package/cli/src/hooks/__tests__/holds-live-savant-free-slot.test.ts +0 -49
- package/cli/src/hooks/__tests__/run-outcome.test.ts +0 -178
- package/cli/src/hooks/__tests__/session-fetch-signal.test.ts +0 -45
- package/cli/src/hooks/__tests__/use-activity-query.test.ts +0 -810
- package/cli/src/hooks/__tests__/use-ask-user-bridge.test.ts +0 -175
- package/cli/src/hooks/__tests__/use-auth-query.test.ts +0 -21
- package/cli/src/hooks/__tests__/use-chat-messages-collapse.test.ts +0 -96
- package/cli/src/hooks/__tests__/use-connection-status.test.ts +0 -112
- package/cli/src/hooks/__tests__/use-directory-browser.test.ts +0 -215
- package/cli/src/hooks/__tests__/use-gravity-ad.test.ts +0 -73
- package/cli/src/hooks/__tests__/use-grid-layout.test.ts +0 -346
- package/cli/src/hooks/__tests__/use-input-history.test.ts +0 -704
- package/cli/src/hooks/__tests__/use-loop-scheduler.test.ts +0 -247
- package/cli/src/hooks/__tests__/use-path-tab-completion.test.ts +0 -324
- package/cli/src/hooks/__tests__/use-queue-controls.test.ts +0 -68
- package/cli/src/hooks/__tests__/use-searchable-list.test.ts +0 -364
- package/cli/src/hooks/__tests__/use-send-message-timer.test.ts +0 -146
- package/cli/src/hooks/__tests__/use-suggestion-engine-mention.test.ts +0 -364
- package/cli/src/hooks/__tests__/use-suggestion-engine.test.ts +0 -485
- package/cli/src/hooks/__tests__/use-terminal-focus.test.ts +0 -66
- package/cli/src/hooks/__tests__/use-terminal-layout.test.ts +0 -675
- package/cli/src/hooks/__tests__/use-timeout.test.ts +0 -330
- package/cli/src/hooks/__tests__/use-usage-query.test.ts +0 -526
- package/cli/src/hooks/__tests__/use-user-details-query.test.ts +0 -225
- package/cli/src/hooks/helpers/__tests__/send-message.test.ts +0 -1851
- package/cli/src/hooks/helpers/send-message.ts +0 -553
- package/cli/src/hooks/run-outcome.ts +0 -64
- package/cli/src/hooks/stream-state.ts +0 -106
- package/cli/src/hooks/use-activity-query.ts +0 -696
- package/cli/src/hooks/use-agent-validation.ts +0 -80
- package/cli/src/hooks/use-ask-user-bridge.ts +0 -102
- package/cli/src/hooks/use-auth-query.ts +0 -261
- package/cli/src/hooks/use-auth-state.ts +0 -155
- package/cli/src/hooks/use-chat-input.ts +0 -87
- package/cli/src/hooks/use-chat-keyboard.ts +0 -325
- package/cli/src/hooks/use-chat-messages.ts +0 -273
- package/cli/src/hooks/use-chat-state.ts +0 -219
- package/cli/src/hooks/use-chat-streaming.ts +0 -270
- package/cli/src/hooks/use-chat-ui.ts +0 -136
- package/cli/src/hooks/use-clipboard.ts +0 -154
- package/cli/src/hooks/use-connection-status.ts +0 -156
- package/cli/src/hooks/use-directory-browser.ts +0 -88
- package/cli/src/hooks/use-elapsed-time.ts +0 -116
- package/cli/src/hooks/use-event.ts +0 -36
- package/cli/src/hooks/use-exit-handler.ts +0 -108
- package/cli/src/hooks/use-fetch-login-url.ts +0 -65
- package/cli/src/hooks/use-fids.ts +0 -48
- package/cli/src/hooks/use-fingerprint.ts +0 -64
- package/cli/src/hooks/use-gravity-ad.ts +0 -688
- package/cli/src/hooks/use-grid-layout.ts +0 -78
- package/cli/src/hooks/use-input-history.ts +0 -173
- package/cli/src/hooks/use-login-keyboard-handlers.ts +0 -74
- package/cli/src/hooks/use-login-polling.ts +0 -120
- package/cli/src/hooks/use-logo.tsx +0 -178
- package/cli/src/hooks/use-loop-scheduler.ts +0 -481
- package/cli/src/hooks/use-message-queue.ts +0 -301
- package/cli/src/hooks/use-now.ts +0 -20
- package/cli/src/hooks/use-path-tab-completion.ts +0 -88
- package/cli/src/hooks/use-publish-mutation.ts +0 -60
- package/cli/src/hooks/use-queue-controls.ts +0 -70
- package/cli/src/hooks/use-queue-ui.ts +0 -55
- package/cli/src/hooks/use-savant-free-ctrl-c-exit.ts +0 -23
- package/cli/src/hooks/use-savant-free-session-progress.ts +0 -34
- package/cli/src/hooks/use-savant-free-session.ts +0 -679
- package/cli/src/hooks/use-savant-free-streak-query.ts +0 -72
- package/cli/src/hooks/use-scaffold-confirm.ts +0 -62
- package/cli/src/hooks/use-scaffold-revert-subscriber.ts +0 -66
- package/cli/src/hooks/use-scroll-management.ts +0 -182
- package/cli/src/hooks/use-searchable-list.ts +0 -99
- package/cli/src/hooks/use-send-message.ts +0 -1038
- package/cli/src/hooks/use-sheen-animation.tsx +0 -88
- package/cli/src/hooks/use-subscription-query.ts +0 -106
- package/cli/src/hooks/use-suggestion-engine.ts +0 -793
- package/cli/src/hooks/use-terminal-breakpoints.ts +0 -77
- package/cli/src/hooks/use-terminal-dimensions.ts +0 -50
- package/cli/src/hooks/use-terminal-focus.ts +0 -146
- package/cli/src/hooks/use-terminal-layout.ts +0 -189
- package/cli/src/hooks/use-theme.tsx +0 -140
- package/cli/src/hooks/use-timeout.ts +0 -88
- package/cli/src/hooks/use-toast.ts +0 -114
- package/cli/src/hooks/use-update-preference.ts +0 -77
- package/cli/src/hooks/use-usage-monitor.ts +0 -59
- package/cli/src/hooks/use-usage-query.ts +0 -138
- package/cli/src/hooks/use-user-details-query.ts +0 -104
- package/cli/src/hooks/use-why-did-you-update.ts +0 -178
- package/cli/src/index.tsx +0 -484
- package/cli/src/init/__tests__/init-direnv.test.ts +0 -597
- package/cli/src/init/init-app.ts +0 -54
- package/cli/src/init/init-direnv.ts +0 -133
- package/cli/src/login/constants.ts +0 -71
- package/cli/src/login/login-flow.ts +0 -224
- package/cli/src/login/plain-login.ts +0 -107
- package/cli/src/login/utils.ts +0 -183
- package/cli/src/native/ripgrep.ts +0 -82
- package/cli/src/polyfills/bun-strip-ansi.ts +0 -12
- package/cli/src/pre-init/load-dev-env.ts +0 -98
- package/cli/src/pre-init/tree-sitter-wasm.ts +0 -98
- package/cli/src/project-files.ts +0 -102
- package/cli/src/state/__tests__/chat-store-focus.test.ts +0 -22
- package/cli/src/state/__tests__/feedback-store.test.ts +0 -260
- package/cli/src/state/chat-history-store.ts +0 -27
- package/cli/src/state/chat-store.ts +0 -791
- package/cli/src/state/feedback-store.ts +0 -162
- package/cli/src/state/gateway-catalog-store.ts +0 -45
- package/cli/src/state/login-store.ts +0 -150
- package/cli/src/state/message-block-store.ts +0 -143
- package/cli/src/state/model-picker-store.ts +0 -67
- package/cli/src/state/provider-picker-store.ts +0 -53
- package/cli/src/state/publish-store.ts +0 -141
- package/cli/src/state/review-store.ts +0 -24
- package/cli/src/state/rewind-picker-store.ts +0 -74
- package/cli/src/state/savant-free-model-store.ts +0 -59
- package/cli/src/state/savant-free-session-store.ts +0 -32
- package/cli/src/test-setup.ts +0 -20
- package/cli/src/testing/env.ts +0 -46
- package/cli/src/types/chat-state.ts +0 -15
- package/cli/src/types/chat.ts +0 -242
- package/cli/src/types/contracts/send-message.ts +0 -16
- package/cli/src/types/env.ts +0 -107
- package/cli/src/types/function-params.ts +0 -35
- package/cli/src/types/opentui-augmentation.d.ts +0 -11
- package/cli/src/types/react19-compat.d.ts +0 -19
- package/cli/src/types/savant-free-session.ts +0 -17
- package/cli/src/types/store.ts +0 -112
- package/cli/src/types/theme-system.ts +0 -194
- package/cli/src/types/utils.ts +0 -3
- package/cli/src/utils/__tests__/activity-tracker.test.ts +0 -440
- package/cli/src/utils/__tests__/agent-display.test.ts +0 -139
- package/cli/src/utils/__tests__/analytics-client.test.ts +0 -311
- package/cli/src/utils/__tests__/anonymous-id.test.ts +0 -74
- package/cli/src/utils/__tests__/arrays.test.ts +0 -264
- package/cli/src/utils/__tests__/bash-context-processor.test.ts +0 -38
- package/cli/src/utils/__tests__/block-processor.test.ts +0 -690
- package/cli/src/utils/__tests__/chat-history.test.ts +0 -247
- package/cli/src/utils/__tests__/chat-input-key-intercept.test.ts +0 -40
- package/cli/src/utils/__tests__/chat-layout.test.ts +0 -32
- package/cli/src/utils/__tests__/chat-meta.test.ts +0 -160
- package/cli/src/utils/__tests__/chatgpt-oauth.test.ts +0 -50
- package/cli/src/utils/__tests__/clipboard.test.ts +0 -998
- package/cli/src/utils/__tests__/code-search-summary.test.ts +0 -84
- package/cli/src/utils/__tests__/collapse-helpers.test.ts +0 -1272
- package/cli/src/utils/__tests__/error-handling.test.ts +0 -611
- package/cli/src/utils/__tests__/feedback-helpers.test.ts +0 -452
- package/cli/src/utils/__tests__/feedback-submission.test.ts +0 -26
- package/cli/src/utils/__tests__/fetch-usage.test.ts +0 -355
- package/cli/src/utils/__tests__/fingerprint.test.ts +0 -147
- package/cli/src/utils/__tests__/format-elapsed-time.test.ts +0 -103
- package/cli/src/utils/__tests__/format-timeout.test.ts +0 -87
- package/cli/src/utils/__tests__/image-dimensions.test.ts +0 -243
- package/cli/src/utils/__tests__/image-processor.test.ts +0 -250
- package/cli/src/utils/__tests__/implementor-helpers.test.ts +0 -1457
- package/cli/src/utils/__tests__/keyboard-actions.test.ts +0 -686
- package/cli/src/utils/__tests__/layout-helpers.test.ts +0 -36
- package/cli/src/utils/__tests__/lazy-response-ads.test.ts +0 -167
- package/cli/src/utils/__tests__/logger-sanitize-secrets.test.ts +0 -80
- package/cli/src/utils/__tests__/markdown-renderer.test.tsx +0 -518
- package/cli/src/utils/__tests__/markdown-streaming.test.ts +0 -64
- package/cli/src/utils/__tests__/message-block-helpers.test.ts +0 -1197
- package/cli/src/utils/__tests__/message-updater.test.ts +0 -659
- package/cli/src/utils/__tests__/ollama-onboarding.test.ts +0 -239
- package/cli/src/utils/__tests__/openrouter-models.test.ts +0 -295
- package/cli/src/utils/__tests__/osc-timeout-scenarios.test.ts +0 -172
- package/cli/src/utils/__tests__/pending-attachments.test.ts +0 -278
- package/cli/src/utils/__tests__/provider-setup.test.ts +0 -183
- package/cli/src/utils/__tests__/run-state-storage.test.ts +0 -741
- package/cli/src/utils/__tests__/savant-code-api.test.ts +0 -634
- package/cli/src/utils/__tests__/savant-free-instance-owner.test.ts +0 -69
- package/cli/src/utils/__tests__/savant-free-model-navigation.test.ts +0 -104
- package/cli/src/utils/__tests__/savant-free-premium-reset.test.ts +0 -81
- package/cli/src/utils/__tests__/savant-free-referral-cache.test.ts +0 -67
- package/cli/src/utils/__tests__/savant-free-session-display.test.ts +0 -23
- package/cli/src/utils/__tests__/savant-free-streak-line.test.ts +0 -76
- package/cli/src/utils/__tests__/sdk-event-handlers.test.ts +0 -615
- package/cli/src/utils/__tests__/send-message-helpers.test.ts +0 -1875
- package/cli/src/utils/__tests__/send-message-timer.test.ts +0 -68
- package/cli/src/utils/__tests__/settings.test.ts +0 -138
- package/cli/src/utils/__tests__/strings.test.ts +0 -210
- package/cli/src/utils/__tests__/syntax-theme.test.ts +0 -91
- package/cli/src/utils/__tests__/terminal-color-detection.test.ts +0 -425
- package/cli/src/utils/__tests__/terminal-enter-detection.test.ts +0 -77
- package/cli/src/utils/__tests__/text-layout.test.ts +0 -82
- package/cli/src/utils/__tests__/think-tag-parser.test.ts +0 -159
- package/cli/src/utils/__tests__/trace-writer.test.ts +0 -193
- package/cli/src/utils/__tests__/trim-chat-logs.test.ts +0 -79
- package/cli/src/utils/__tests__/usage-banner-state.test.ts +0 -298
- package/cli/src/utils/__tests__/validation-error-formatting.test.ts +0 -126
- package/cli/src/utils/__tests__/write-file-atomic.test.ts +0 -130
- package/cli/src/utils/active-run.ts +0 -22
- package/cli/src/utils/activity-tracker.ts +0 -66
- package/cli/src/utils/agent-display.ts +0 -87
- package/cli/src/utils/agent-helpers.ts +0 -47
- package/cli/src/utils/ai-message-id.ts +0 -12
- package/cli/src/utils/analytics.ts +0 -407
- package/cli/src/utils/anonymous-id.ts +0 -87
- package/cli/src/utils/arrays.ts +0 -117
- package/cli/src/utils/auth.ts +0 -258
- package/cli/src/utils/bash-context-processor.ts +0 -47
- package/cli/src/utils/bash-messages.ts +0 -108
- package/cli/src/utils/block-margins.ts +0 -35
- package/cli/src/utils/block-operations.ts +0 -548
- package/cli/src/utils/block-processor.ts +0 -212
- package/cli/src/utils/chat-history.ts +0 -265
- package/cli/src/utils/chat-input-key-intercept.ts +0 -52
- package/cli/src/utils/chat-layout.ts +0 -44
- package/cli/src/utils/chat-meta.ts +0 -101
- package/cli/src/utils/chat-scroll-accel.ts +0 -151
- package/cli/src/utils/chatgpt-oauth.ts +0 -350
- package/cli/src/utils/clipboard-image.ts +0 -610
- package/cli/src/utils/clipboard.ts +0 -307
- package/cli/src/utils/code-search-summary.ts +0 -69
- package/cli/src/utils/collapse-helpers.ts +0 -265
- package/cli/src/utils/config-dir.ts +0 -30
- package/cli/src/utils/constants.ts +0 -159
- package/cli/src/utils/create-event-handler-state.ts +0 -79
- package/cli/src/utils/create-run-config.ts +0 -160
- package/cli/src/utils/db-storage.ts +0 -254
- package/cli/src/utils/detect-shell.ts +0 -112
- package/cli/src/utils/directory-browser.ts +0 -74
- package/cli/src/utils/engagement.ts +0 -55
- package/cli/src/utils/env.ts +0 -109
- package/cli/src/utils/error-handling.ts +0 -246
- package/cli/src/utils/error-messages.ts +0 -84
- package/cli/src/utils/feedback-helpers.ts +0 -115
- package/cli/src/utils/feedback-submission.ts +0 -24
- package/cli/src/utils/fetch-usage.ts +0 -75
- package/cli/src/utils/fid-loader.ts +0 -135
- package/cli/src/utils/fingerprint.ts +0 -263
- package/cli/src/utils/finish-logic.ts +0 -154
- package/cli/src/utils/format-elapsed-time.ts +0 -33
- package/cli/src/utils/format-session-units.ts +0 -6
- package/cli/src/utils/format-timeout.ts +0 -28
- package/cli/src/utils/format-validation-errors-for-message.ts +0 -85
- package/cli/src/utils/git.ts +0 -17
- package/cli/src/utils/glyphs.ts +0 -188
- package/cli/src/utils/helpers.ts +0 -47
- package/cli/src/utils/image-display.ts +0 -73
- package/cli/src/utils/image-handler.ts +0 -336
- package/cli/src/utils/image-processor.ts +0 -133
- package/cli/src/utils/image-thumbnail.ts +0 -83
- package/cli/src/utils/implementor-helpers.ts +0 -817
- package/cli/src/utils/input-modes.ts +0 -196
- package/cli/src/utils/keyboard-actions.ts +0 -394
- package/cli/src/utils/keypad-keys.ts +0 -47
- package/cli/src/utils/layout-helpers.ts +0 -36
- package/cli/src/utils/lazy-response-ads.ts +0 -1
- package/cli/src/utils/loading-phrases.ts +0 -68
- package/cli/src/utils/local-agent-registry.ts +0 -611
- package/cli/src/utils/log-shipper.ts +0 -116
- package/cli/src/utils/logger.ts +0 -435
- package/cli/src/utils/markdown-renderer.tsx +0 -1315
- package/cli/src/utils/math.ts +0 -3
- package/cli/src/utils/message-block-helpers.ts +0 -667
- package/cli/src/utils/message-history.ts +0 -153
- package/cli/src/utils/message-tree-utils.ts +0 -67
- package/cli/src/utils/message-updater.ts +0 -279
- package/cli/src/utils/ollama-onboarding.ts +0 -215
- package/cli/src/utils/open-file.ts +0 -144
- package/cli/src/utils/open-url.ts +0 -63
- package/cli/src/utils/openrouter-models.ts +0 -945
- package/cli/src/utils/path-completion.ts +0 -111
- package/cli/src/utils/path-helpers.ts +0 -38
- package/cli/src/utils/pending-attachments.ts +0 -363
- package/cli/src/utils/post-processing.ts +0 -99
- package/cli/src/utils/project-picker.ts +0 -12
- package/cli/src/utils/provider-setup.ts +0 -259
- package/cli/src/utils/recent-projects.ts +0 -156
- package/cli/src/utils/renderer-cleanup.ts +0 -142
- package/cli/src/utils/response-ad-positions.ts +0 -1
- package/cli/src/utils/rewind.ts +0 -175
- package/cli/src/utils/run-state-storage.ts +0 -480
- package/cli/src/utils/savant-code-api.ts +0 -686
- package/cli/src/utils/savant-code-client.ts +0 -217
- package/cli/src/utils/savant-free-agent-selection.ts +0 -12
- package/cli/src/utils/savant-free-exit.ts +0 -24
- package/cli/src/utils/savant-free-instance-owner.ts +0 -66
- package/cli/src/utils/savant-free-model-navigation.ts +0 -46
- package/cli/src/utils/savant-free-premium-reset.ts +0 -52
- package/cli/src/utils/savant-free-referral-cache.ts +0 -35
- package/cli/src/utils/savant-free-session-display.ts +0 -21
- package/cli/src/utils/savant-free-streak-line.ts +0 -67
- package/cli/src/utils/sdk-event-handlers.ts +0 -587
- package/cli/src/utils/send-message-helpers.ts +0 -199
- package/cli/src/utils/send-message-timer.ts +0 -110
- package/cli/src/utils/settings.ts +0 -388
- package/cli/src/utils/skill-registry.ts +0 -100
- package/cli/src/utils/spawn-agent-matcher.ts +0 -56
- package/cli/src/utils/status-indicator-state.ts +0 -100
- package/cli/src/utils/stream-chunk-processor.ts +0 -65
- package/cli/src/utils/strings.ts +0 -272
- package/cli/src/utils/subscription.ts +0 -31
- package/cli/src/utils/syntax-highlighter.tsx +0 -19
- package/cli/src/utils/syntax-theme.ts +0 -131
- package/cli/src/utils/terminal-color-detection.ts +0 -472
- package/cli/src/utils/terminal-enter-detection.ts +0 -63
- package/cli/src/utils/terminal-images.ts +0 -223
- package/cli/src/utils/terminal-reset-sequences.ts +0 -33
- package/cli/src/utils/terminal-title.ts +0 -113
- package/cli/src/utils/terminal-watchdog.ts +0 -246
- package/cli/src/utils/text-layout.ts +0 -153
- package/cli/src/utils/theme-config.ts +0 -143
- package/cli/src/utils/theme-system.ts +0 -1265
- package/cli/src/utils/think-tag-parser.ts +0 -105
- package/cli/src/utils/trace-writer.ts +0 -147
- package/cli/src/utils/ui-constants.ts +0 -69
- package/cli/src/utils/usage-banner-state.ts +0 -146
- package/cli/src/utils/validation-error-formatting.ts +0 -92
- package/cli/src/utils/validation-error-helpers.ts +0 -19
- package/cli/src/utils/version.ts +0 -23
- package/cli/src/utils/word-wrap-utils.ts +0 -53
- package/cli/src/utils/write-file-atomic.ts +0 -82
- package/cli/src/utils/yield-to-event-loop.ts +0 -9
- package/cli/tsconfig.json +0 -26
- package/coding-standards/csharp.md +0 -77
- package/coding-standards/go.md +0 -71
- package/coding-standards/java.md +0 -74
- package/coding-standards/python.md +0 -82
- package/coding-standards/rust.md +0 -78
- package/coding-standards/typescript.md +0 -85
- package/coding-standards/x402.md +0 -227
- package/common/README.md +0 -41
- package/common/common_exit +0 -1
- package/common/package.json +0 -45
- package/common/src/__tests__/agent-validation.test.ts +0 -861
- package/common/src/__tests__/agents.test.ts +0 -16
- package/common/src/__tests__/dynamic-agent-template-schema.test.ts +0 -420
- package/common/src/__tests__/env-ci.test.ts +0 -167
- package/common/src/__tests__/env-process.test.ts +0 -145
- package/common/src/__tests__/free-agents.test.ts +0 -269
- package/common/src/__tests__/handlesteps-parsing.test.ts +0 -247
- package/common/src/__tests__/model-config.test.ts +0 -41
- package/common/src/__tests__/project-file-tree.test.ts +0 -82
- package/common/src/__tests__/response-ad-positions.test.ts +0 -78
- package/common/src/__tests__/savant-free-models.test.ts +0 -460
- package/common/src/__tests__/savant-free-referral-tiers.test.ts +0 -122
- package/common/src/__tests__/user-state.test.ts +0 -30
- package/common/src/actions.ts +0 -215
- package/common/src/analytics-core.ts +0 -73
- package/common/src/analytics.ts +0 -96
- package/common/src/api-keys/constants.ts +0 -26
- package/common/src/browser-actions.ts +0 -414
- package/common/src/constants/agents.ts +0 -250
- package/common/src/constants/analytics-events.ts +0 -318
- package/common/src/constants/anthropic.ts +0 -72
- package/common/src/constants/byok.ts +0 -2
- package/common/src/constants/chatgpt-oauth.ts +0 -85
- package/common/src/constants/composio.ts +0 -34
- package/common/src/constants/feedback.ts +0 -18
- package/common/src/constants/free-agents.ts +0 -347
- package/common/src/constants/gemini.ts +0 -6
- package/common/src/constants/grant-priorities.ts +0 -13
- package/common/src/constants/hosts.ts +0 -6
- package/common/src/constants/images.ts +0 -53
- package/common/src/constants/index.ts +0 -8
- package/common/src/constants/knowledge.ts +0 -46
- package/common/src/constants/limits.ts +0 -23
- package/common/src/constants/model-config.ts +0 -469
- package/common/src/constants/paths.ts +0 -69
- package/common/src/constants/savant-code-config.ts +0 -12
- package/common/src/constants/savant-free-gemini-thinker.ts +0 -30
- package/common/src/constants/savant-free-models.ts +0 -855
- package/common/src/constants/savant-free-referral-tiers.ts +0 -169
- package/common/src/constants/skills.ts +0 -60
- package/common/src/constants/subscription-plans.ts +0 -54
- package/common/src/constants/ui.ts +0 -25
- package/common/src/env-ci.ts +0 -36
- package/common/src/env-process.ts +0 -95
- package/common/src/env-schema.ts +0 -42
- package/common/src/env.ts +0 -69
- package/common/src/mcp/client.ts +0 -308
- package/common/src/old-constants.ts +0 -10
- package/common/src/project-file-tree.ts +0 -361
- package/common/src/reddit-capi.ts +0 -175
- package/common/src/schemas/feedback.ts +0 -57
- package/common/src/schemas/logs.ts +0 -66
- package/common/src/templates/agent-validation.ts +0 -436
- package/common/src/templates/initial-agents-dir/LICENSE +0 -202
- package/common/src/templates/initial-agents-dir/README.md +0 -314
- package/common/src/templates/initial-agents-dir/examples/01-basic-diff-reviewer.ts +0 -17
- package/common/src/templates/initial-agents-dir/examples/02-intermediate-git-committer.ts +0 -78
- package/common/src/templates/initial-agents-dir/examples/03-advanced-file-explorer.ts +0 -76
- package/common/src/templates/initial-agents-dir/my-custom-agent.ts +0 -40
- package/common/src/templates/initial-agents-dir/package.json +0 -6
- package/common/src/templates/initial-agents-dir/skills/README.md +0 -66
- package/common/src/templates/initial-agents-dir/skills/example-skill/SKILL.md +0 -29
- package/common/src/templates/initial-agents-dir/types/agent-definition.ts +0 -484
- package/common/src/templates/initial-agents-dir/types/tools.ts +0 -452
- package/common/src/templates/initial-agents-dir/types/util-types.ts +0 -167
- package/common/src/testing/TESTING_PATTERNS.md +0 -353
- package/common/src/testing/errors.ts +0 -33
- package/common/src/testing/fixtures/agent-runtime.ts +0 -325
- package/common/src/testing/impl/agent-runtime.ts +0 -6
- package/common/src/testing/index.ts +0 -84
- package/common/src/testing/mock-modules.ts +0 -54
- package/common/src/testing/mock-types.ts +0 -123
- package/common/src/testing/mocks/analytics.ts +0 -262
- package/common/src/testing/mocks/child-process.ts +0 -93
- package/common/src/testing/mocks/crypto.ts +0 -218
- package/common/src/testing/mocks/database.ts +0 -337
- package/common/src/testing/mocks/filesystem.ts +0 -166
- package/common/src/testing/mocks/index.ts +0 -83
- package/common/src/testing/mocks/logger.ts +0 -136
- package/common/src/testing/mocks/stream.ts +0 -314
- package/common/src/testing/mocks/timers.ts +0 -132
- package/common/src/testing/mocks/tree-sitter.ts +0 -127
- package/common/src/testing/setup.ts +0 -282
- package/common/src/testing-env-ci.ts +0 -15
- package/common/src/testing-env-process.ts +0 -78
- package/common/src/tools/__tests__/compile-tool-definitions.test.ts +0 -34
- package/common/src/tools/__tests__/thought-session.test.ts +0 -256
- package/common/src/tools/compile-tool-definitions.ts +0 -194
- package/common/src/tools/constants.ts +0 -132
- package/common/src/tools/list.ts +0 -193
- package/common/src/tools/params/__tests__/coerce-to-array.test.ts +0 -237
- package/common/src/tools/params/__tests__/sequential-thinking-coercion.test.ts +0 -98
- package/common/src/tools/params/tool/add-message.ts +0 -36
- package/common/src/tools/params/tool/add-subgoal.ts +0 -57
- package/common/src/tools/params/tool/apply-patch.ts +0 -110
- package/common/src/tools/params/tool/ask-user.ts +0 -181
- package/common/src/tools/params/tool/browser-logs.ts +0 -85
- package/common/src/tools/params/tool/code-search.ts +0 -144
- package/common/src/tools/params/tool/composio.ts +0 -131
- package/common/src/tools/params/tool/create-plan.ts +0 -80
- package/common/src/tools/params/tool/end-turn.ts +0 -54
- package/common/src/tools/params/tool/find-files.ts +0 -60
- package/common/src/tools/params/tool/glob.ts +0 -74
- package/common/src/tools/params/tool/gravity-index.ts +0 -92
- package/common/src/tools/params/tool/list-directory.ts +0 -58
- package/common/src/tools/params/tool/lookup-agent-info.ts +0 -37
- package/common/src/tools/params/tool/propose-str-replace.ts +0 -103
- package/common/src/tools/params/tool/propose-write-file.ts +0 -71
- package/common/src/tools/params/tool/read-docs.ts +0 -85
- package/common/src/tools/params/tool/read-files.ts +0 -61
- package/common/src/tools/params/tool/read-subtree.ts +0 -83
- package/common/src/tools/params/tool/read-url.ts +0 -81
- package/common/src/tools/params/tool/render-ui.ts +0 -203
- package/common/src/tools/params/tool/run-file-change-hooks.ts +0 -57
- package/common/src/tools/params/tool/run-readonly-command.ts +0 -76
- package/common/src/tools/params/tool/run-terminal-command.ts +0 -185
- package/common/src/tools/params/tool/sequential-thinking.ts +0 -110
- package/common/src/tools/params/tool/set-messages.ts +0 -42
- package/common/src/tools/params/tool/set-output.ts +0 -62
- package/common/src/tools/params/tool/set-scaffold-complete.ts +0 -51
- package/common/src/tools/params/tool/skill.ts +0 -56
- package/common/src/tools/params/tool/spawn-agent-inline.ts +0 -57
- package/common/src/tools/params/tool/spawn-agents.ts +0 -154
- package/common/src/tools/params/tool/str-replace.ts +0 -107
- package/common/src/tools/params/tool/suggest-followups.ts +0 -94
- package/common/src/tools/params/tool/task-completed.ts +0 -58
- package/common/src/tools/params/tool/think-deeply.ts +0 -53
- package/common/src/tools/params/tool/transition-phase.ts +0 -57
- package/common/src/tools/params/tool/update-subgoal.ts +0 -89
- package/common/src/tools/params/tool/web-search.ts +0 -73
- package/common/src/tools/params/tool/write-file.ts +0 -71
- package/common/src/tools/params/tool/write-todos.ts +0 -67
- package/common/src/tools/params/utils.ts +0 -152
- package/common/src/tools/safety-registry.ts +0 -274
- package/common/src/tools/safety.ts +0 -42
- package/common/src/tools/sequential-thinking.ts +0 -340
- package/common/src/tools/utils.ts +0 -25
- package/common/src/types/__tests__/dynamic-agent-template.test.ts +0 -20
- package/common/src/types/agent-template.ts +0 -223
- package/common/src/types/api/agents/publish.ts +0 -63
- package/common/src/types/contracts/agent-runtime.ts +0 -84
- package/common/src/types/contracts/analytics.ts +0 -12
- package/common/src/types/contracts/bigquery.ts +0 -55
- package/common/src/types/contracts/billing.ts +0 -46
- package/common/src/types/contracts/client.ts +0 -52
- package/common/src/types/contracts/database.ts +0 -104
- package/common/src/types/contracts/env.ts +0 -203
- package/common/src/types/contracts/llm.ts +0 -183
- package/common/src/types/contracts/logger.ts +0 -29
- package/common/src/types/contracts/logs.ts +0 -34
- package/common/src/types/contracts/trace.ts +0 -21
- package/common/src/types/dynamic-agent-template.ts +0 -290
- package/common/src/types/filesystem.ts +0 -10
- package/common/src/types/function-params.ts +0 -35
- package/common/src/types/grant.ts +0 -20
- package/common/src/types/gravity-index.ts +0 -170
- package/common/src/types/json.ts +0 -26
- package/common/src/types/mcp.ts +0 -26
- package/common/src/types/messages/content-part.ts +0 -59
- package/common/src/types/messages/data-content.ts +0 -14
- package/common/src/types/messages/provider-metadata.ts +0 -10
- package/common/src/types/messages/savant-code-message.ts +0 -55
- package/common/src/types/organization.ts +0 -118
- package/common/src/types/print-mode.ts +0 -167
- package/common/src/types/publisher.ts +0 -67
- package/common/src/types/savant-free-session.ts +0 -295
- package/common/src/types/savant-free-streak.ts +0 -6
- package/common/src/types/session-state.ts +0 -237
- package/common/src/types/skill.ts +0 -56
- package/common/src/types/source.ts +0 -11
- package/common/src/types/spawn.ts +0 -13
- package/common/src/types/subscription.ts +0 -68
- package/common/src/types/usage.ts +0 -16
- package/common/src/types/util.ts +0 -3
- package/common/src/util/__tests__/analytics-dispatcher.test.ts +0 -145
- package/common/src/util/__tests__/analytics-log.test.ts +0 -110
- package/common/src/util/__tests__/analytics-sampling.test.ts +0 -131
- package/common/src/util/__tests__/axiom-only-log.test.ts +0 -64
- package/common/src/util/__tests__/engagement-tracker.test.ts +0 -115
- package/common/src/util/__tests__/error-abort.test.ts +0 -822
- package/common/src/util/__tests__/error-api-details.test.ts +0 -190
- package/common/src/util/__tests__/format-code-search.test.ts +0 -60
- package/common/src/util/__tests__/log-mirror.test.ts +0 -31
- package/common/src/util/__tests__/messages.test.ts +0 -1118
- package/common/src/util/__tests__/partial-json-delta.test.ts +0 -505
- package/common/src/util/__tests__/paths.test.ts +0 -289
- package/common/src/util/__tests__/promise.test.ts +0 -334
- package/common/src/util/__tests__/protocol-config.test.ts +0 -119
- package/common/src/util/__tests__/rate-limit.test.ts +0 -28
- package/common/src/util/__tests__/reddit-savant-free-retention.test.ts +0 -120
- package/common/src/util/__tests__/savant-free-streak.test.ts +0 -142
- package/common/src/util/__tests__/saxy.test.ts +0 -1008
- package/common/src/util/__tests__/string.test.ts +0 -238
- package/common/src/util/__tests__/zoned-time.test.ts +0 -88
- package/common/src/util/agent-file-utils.ts +0 -110
- package/common/src/util/agent-id-parsing.ts +0 -147
- package/common/src/util/agent-name-normalization.ts +0 -39
- package/common/src/util/analytics-dispatcher.ts +0 -81
- package/common/src/util/analytics-log.ts +0 -84
- package/common/src/util/analytics-sampling.ts +0 -225
- package/common/src/util/array.ts +0 -63
- package/common/src/util/axiom-only-log.ts +0 -79
- package/common/src/util/cache-debug.ts +0 -191
- package/common/src/util/credentials.ts +0 -12
- package/common/src/util/currency.ts +0 -25
- package/common/src/util/dates.ts +0 -81
- package/common/src/util/engagement-tracker.ts +0 -133
- package/common/src/util/error.ts +0 -580
- package/common/src/util/file.ts +0 -363
- package/common/src/util/format-code-search.ts +0 -115
- package/common/src/util/lazy-response-ads.ts +0 -93
- package/common/src/util/log-data.ts +0 -57
- package/common/src/util/log-mirror.ts +0 -34
- package/common/src/util/lru-cache.ts +0 -67
- package/common/src/util/messages.ts +0 -600
- package/common/src/util/model-utils.ts +0 -25
- package/common/src/util/object.ts +0 -137
- package/common/src/util/param-helpers.ts +0 -49
- package/common/src/util/partial-json-delta.ts +0 -100
- package/common/src/util/paths.ts +0 -194
- package/common/src/util/promise.ts +0 -87
- package/common/src/util/protocol-config.ts +0 -141
- package/common/src/util/random.ts +0 -15
- package/common/src/util/rate-limit.ts +0 -56
- package/common/src/util/reddit-capi-events.ts +0 -40
- package/common/src/util/reddit-savant-free-retention.ts +0 -69
- package/common/src/util/response-ad-positions.ts +0 -54
- package/common/src/util/savant-free-privacy.ts +0 -78
- package/common/src/util/savant-free-streak.ts +0 -153
- package/common/src/util/saxy.ts +0 -739
- package/common/src/util/skills.ts +0 -32
- package/common/src/util/stop-sequence.ts +0 -60
- package/common/src/util/string.ts +0 -419
- package/common/src/util/system-info.ts +0 -51
- package/common/src/util/type-narrowing.ts +0 -125
- package/common/src/util/xml.ts +0 -17
- package/common/src/util/zod-schema.ts +0 -80
- package/common/src/util/zoned-time.ts +0 -136
- package/common/src/utils/ask-user-bridge.ts +0 -47
- package/common/tsconfig.json +0 -8
- package/database.db +0 -0
- package/dev/LEARNINGS.md +0 -309
- 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 +0 -238
- package/dev/fids/archive/FID-2026-0803-001-echo-enforcement-layer-drift.md +0 -404
- package/dev/fids/archive/FID-2026-0803-002-llm-providers-database-audit.md +0 -348
- package/dev/fids/archive/FID-2026-0803-003-sdk-impl-common-util-audit.md +0 -277
- package/dev/fids/archive/FID-2026-0803-004-checkpoint-rewind.md +0 -181
- package/dev/fids/archive/FID-2026-0803-005-quality-scan-hygiene-fixes.md +0 -265
- package/dev/fids/archive/FID-2026-0803-006-code-map-audit-hygiene.md +0 -243
- package/dev/fids/archive/FID-2026-0803-007-evals-benchmark-audit-hygiene.md +0 -296
- package/dev/fids/archive/FID-2026-0803-009-echo-enforcement-doc-drift.md +0 -112
- package/dev/fids/archive/FID-2026-0803-010-database-llm-providers-low-fixes.md +0 -255
- package/dev/fids/archive/FID-2026-0803-011-build-artifact-hygiene.md +0 -169
- package/dev/fids/archive/FID-2026-0803-012-release-readiness-audit.md +0 -162
- package/dev/fids/archive/FID-2026-0803-013-agent-roster-over-reporting.md +0 -146
- package/dev/fids/archive/FID-2026-0803-014-freebuff-to-savant-rebrand-sweep.md +0 -185
- package/dev/nova/reports/2026-08-02-top-25-ai-inference-providers-competitive-intel.md +0 -213
- package/dev/nova/specs/echo-v0.1.2-freebuff.md +0 -391
- package/dev/nova/specs/goal-loop-feature-spec.md +0 -245
- package/dev/nova/specs/launch-strategy-research-prompt.md +0 -88
- package/dev/releases/README.md +0 -50
- package/dev/scratchpad/.gitkeep +0 -0
- package/dev/session-summaries/.gitkeep +0 -0
- package/dev/session-summaries/2026-07-16-1255.md +0 -128
- package/dev/session-summaries/2026-07-17-1000.md +0 -64
- package/dev/session-summaries/2026-07-19-eslint-zero-tolerance-cleanup.md +0 -145
- package/dev/session-summaries/2026-07-19-fid-026-debugging-and-rename.md +0 -79
- package/dev/session-summaries/2026-07-19-fid-026-phase-b-rebrand.md +0 -76
- package/dev/session-summaries/2026-07-19-fid-027-clean-break.md +0 -47
- package/dev/session-summaries/2026-07-19-pre-push-house-cleaning.md +0 -100
- package/dev/session-summaries/2026-07-19-v0.0.2-release-session.md +0 -229
- package/dev/session-summaries/2026-07-20-1805-fid-loop-closure.md +0 -95
- package/dev/session-summaries/2026-07-22-1800.md +0 -52
- package/dev/session-summaries/2026-07-23-fsm-optimization.md +0 -88
- package/dev/session-summaries/2026-07-25-0000.md +0 -80
- package/dev/session-summaries/2026-07-25-1200-context-compaction.md +0 -154
- package/dev/session-summaries/2026-07-25-1600-layer4-reactive-compact.md +0 -96
- package/dev/session-summaries/2026-07-25-1700-dev-folder-audit.md +0 -161
- package/dev/session-summaries/2026-07-25-2000-benchmark-v2-filters.md +0 -147
- package/dev/session-summaries/2026-07-25-2000.md +0 -77
- package/dev/session-summaries/2026-07-27-0000.md +0 -63
- package/dev/session-summaries/2026-07-28-history-capture-handoff.md +0 -206
- package/dev/session-summaries/2026-07-31-freebuff-echo-compliance-remediation.md +0 -156
- package/dev/session-summaries/2026-07-31-pre-launch-optimization-execution.md +0 -46
- package/dev/session-summaries/2026-0721-1800.md +0 -44
- package/dev/session-summaries/2026-08-01-sidebar-folded-startup.md +0 -159
- package/dev/session-summaries/2026-08-02-0.0.15-release-closeout.md +0 -32
- package/dev/session-summaries/2026-08-02-repository-hygiene.md +0 -51
- package/dev/session-summaries/2026-08-03-agent-roster-fix-and-ready-check-closeout.md +0 -73
- package/dev/session-summaries/2026-08-03-build-artifact-hygiene-closeout.md +0 -40
- package/dev/session-summaries/2026-08-03-code-map-audit-closeout.md +0 -44
- package/dev/session-summaries/2026-08-03-database-llm-providers-low-fixes-closeout.md +0 -47
- package/dev/session-summaries/2026-08-03-echo-enforcement-doc-drift-closeout.md +0 -43
- package/dev/session-summaries/2026-08-03-evals-benchmark-audit-closeout.md +0 -50
- package/dev/session-summaries/2026-08-03-quality-scan-hygiene-fixes-closeout.md +0 -57
- package/dev/session-summaries/2026-08-03-quality-session-checkpoint-rewind-closeout.md +0 -56
- package/dev/session-summaries/2026-08-03-release-readiness-audit-closeout.md +0 -60
- package/dev/test-prompts/archive/0.0.2-final-pass.md +0 -209
- package/dev/test-prompts/archive/agent-capabilities-full-test.md +0 -361
- package/dev/test-prompts/archive/agent-capabilities-test.md +0 -471
- package/dev/test-prompts/archive/comprehensive-az-system-test-v1.md +0 -441
- package/dev/test-prompts/archive/comprehensive-az-system-test-v2-report.md +0 -377
- package/dev/test-prompts/archive/comprehensive-az-system-test-v2.md +0 -544
- package/dev/test-prompts/archive/comprehensive-az-system-test.md +0 -396
- package/dev/test-prompts/archive/comprehensive-az-test-final.md +0 -900
- package/dev/test-prompts/archive/comprehensive-az-test-v11.md +0 -141
- package/dev/test-prompts/archive/comprehensive-az-test-v12.md +0 -29
- package/dev/test-prompts/archive/comprehensive-az-test-v6.md +0 -631
- package/dev/test-prompts/archive/comprehensive-az-test-v7.md +0 -625
- package/dev/test-prompts/archive/fid-007-ability-confirmation.md +0 -248
- package/dev/test-prompts/archive/fid-2026-0801-006-thinker-tool-call-boundary.md +0 -86
- package/dev/test-prompts/archive/fid-2026-0801-007-child-tool-set-fallback-cli.md +0 -101
- package/dev/test-prompts/archive/fid-2026-0801-008-provider-tool-call-accumulation-cli.md +0 -111
- package/dev/test-prompts/archive/fid-2026-0801-012-thinker-state-output-cli.md +0 -134
- package/dev/test-prompts/archive/gemini-deep-research-sidebar-highlight.md +0 -598
- package/dev/test-prompts/archive/goal-loop-cli-test.md +0 -142
- package/dev/test-prompts/archive/rebrand-qa.md +0 -258
- package/dev/test-prompts/archive/release-az-test-fid-085.md +0 -306
- package/dev/test-prompts/archive/release-az-test-fid-087.md +0 -219
- package/dev/test-prompts/archive/release-az-test-fid-2026-0726-001.md +0 -270
- package/dev/test-prompts/archive/release-az-test-fid-2026-0728-008.md +0 -213
- package/dev/test-prompts/archive/release-az-test-fid-2026-0728-launch-tracks.md +0 -253
- package/dev/test-prompts/archive/release-az-test-fid-2026-0731-pre-launch.md +0 -102
- package/docs/AI Coding Agents Market Research.md +0 -516
- package/docs/Agent Harness Feature Pairing Research.md +0 -166
- package/docs/CLI Agent Inference Backend Research.md +0 -446
- package/docs/Codebuff Rebranding And Migration Plan.md +0 -418
- package/docs/ECHO-EVOLUTION-ARCH.md +0 -77
- package/docs/Harness Engineering for Coding Agents Research.md +0 -196
- package/docs/Launch Plan Review and Optimization.md +0 -178
- package/docs/OpenTUI Sidebar Bug Fix.md +0 -245
- package/docs/SAVANT-VERSIONING.md +0 -31
- package/docs/Savant Code Launch Strategy.md +0 -270
- package/docs/Savant-Code Business And Backend Research.md +0 -222
- package/docs/agents-and-tools.md +0 -217
- package/docs/cloudflare-llms-full.md +0 -9623
- package/docs/design/OpenTUI Terminal Visualization Guide.md +0 -471
- package/docs/design/database-architecture.md +0 -217
- package/docs/design/deep-research-report.md +0 -295
- package/docs/design/thinker-sequentialthinking-regression-diagnostic.md +0 -366
- package/docs/discord-server-design.md +0 -167
- package/docs/gravity-integration-starter.md +0 -202
- package/docs/launch/hn-first-comment.md +0 -44
- package/docs/launch/hn-post.md +0 -35
- package/docs/launch/incident-response.md +0 -88
- package/docs/launch/landing/index.html +0 -233
- package/docs/launch/mastodon-thread.md +0 -52
- package/docs/launch/newsletter-pitch.md +0 -49
- package/docs/launch/twitter-thread.md +0 -62
- package/docs/privacy.md +0 -186
- package/docs/reports/Savant-Code Benchmark Specification.md +0 -206
- package/docs/reports/Thinker Agent Architecture Research.md +0 -284
- package/docs/reports/adoptable-features-2026-07-25.md +0 -604
- package/docs/reports/adoptable-features-master.md +0 -480
- package/docs/reports/codebuff-discord-feedback.md +0 -43
- package/docs/reports/feature-parity-report.md +0 -810
- package/docs/reports/repos/AionUi.md +0 -75
- package/docs/reports/repos/OpenHands.md +0 -76
- package/docs/reports/repos/SWE-agent.md +0 -82
- package/docs/reports/repos/agno.md +0 -89
- package/docs/reports/repos/aider.md +0 -74
- package/docs/reports/repos/cline.md +0 -83
- package/docs/reports/repos/codex.md +0 -83
- package/docs/reports/repos/gemini-cli.md +0 -92
- package/docs/reports/repos/goose.md +0 -65
- package/docs/reports/repos/gpt-pilot.md +0 -52
- package/docs/reports/repos/hermes-agent.md +0 -101
- package/docs/reports/repos/kilocode.md +0 -79
- package/docs/reports/repos/openclaude.md +0 -99
- package/docs/reports/repos/openclaw.md +0 -100
- package/docs/reports/repos/opencode-dev.md +0 -78
- package/docs/reports/repos/zero.md +0 -123
- package/docs/reports/savant-code-benchmark-v2-2026-08-03.md +0 -76
- package/docs/savant-code-modes.md +0 -338
- package/docs/testing.md +0 -51
- package/docs/visual-mockup-neon-slate.txt +0 -41
- package/eslint.config.js +0 -211
- package/evals/README.md +0 -45
- package/evals/benchmark/README.md +0 -449
- package/evals/benchmark/agent-runner.ts +0 -217
- package/evals/benchmark/analyze-task-scores.ts +0 -496
- package/evals/benchmark/eval-codebuff-hard.json +0 -3343
- package/evals/benchmark/eval-codebuff.json +0 -3193
- package/evals/benchmark/eval-codebuff2.json +0 -2494
- package/evals/benchmark/eval-manifold-hard.json +0 -2525
- package/evals/benchmark/eval-manifold.json +0 -1675
- package/evals/benchmark/eval-manifold2.json +0 -1945
- package/evals/benchmark/eval-plane-hard.json +0 -4372
- package/evals/benchmark/eval-plane.json +0 -2028
- package/evals/benchmark/eval-plane2.json +0 -3517
- package/evals/benchmark/eval-saleor-hard.json +0 -6081
- package/evals/benchmark/eval-saleor.json +0 -1829
- package/evals/benchmark/eval-saleor2.json +0 -3273
- package/evals/benchmark/eval-task-generator.ts +0 -158
- package/evals/benchmark/filter-supplemental-files.ts +0 -225
- package/evals/benchmark/format-output.ts +0 -215
- package/evals/benchmark/gen-evals.ts +0 -294
- package/evals/benchmark/gen-repo-eval.ts +0 -71
- package/evals/benchmark/judge.ts +0 -308
- package/evals/benchmark/lessons-extractor.ts +0 -247
- package/evals/benchmark/main-hard-tasks.ts +0 -49
- package/evals/benchmark/main-single-eval.ts +0 -23
- package/evals/benchmark/main.ts +0 -29
- package/evals/benchmark/meta-analyzer.ts +0 -329
- package/evals/benchmark/pick-commits.ts +0 -627
- package/evals/benchmark/run-benchmark.ts +0 -657
- package/evals/benchmark/runners/claude.ts +0 -176
- package/evals/benchmark/runners/codex.ts +0 -143
- package/evals/benchmark/runners/index.ts +0 -4
- package/evals/benchmark/runners/opencode.ts +0 -253
- package/evals/benchmark/runners/runner.ts +0 -13
- package/evals/benchmark/runners/savant.ts +0 -148
- package/evals/benchmark/setup-test-repo.ts +0 -314
- package/evals/benchmark/trace-analyzer.ts +0 -257
- package/evals/benchmark/trace-utils.ts +0 -80
- package/evals/benchmark/types.ts +0 -83
- package/evals/bunfig.toml +0 -4
- package/evals/logger.ts +0 -87
- package/evals/package.json +0 -31
- package/evals/subagents/test-repo-utils.ts +0 -131
- package/evals/tsconfig.json +0 -13
- package/evals/v2/README.md +0 -149
- package/evals/v2/reports/report.json +0 -261
- package/evals/v2/reports/report.md +0 -15
- package/evals/v2/schema/task.schema.json +0 -172
- package/evals/v2/src/cli.ts +0 -216
- package/evals/v2/src/golden.ts +0 -73
- package/evals/v2/src/harness.ts +0 -293
- package/evals/v2/src/metrics.ts +0 -326
- package/evals/v2/src/registry.ts +0 -179
- package/evals/v2/src/reports.ts +0 -126
- package/evals/v2/src/runner.ts +0 -143
- package/evals/v2/src/runners/savant.ts +0 -105
- package/evals/v2/src/sandbox.ts +0 -42
- package/evals/v2/src/sandboxes/docker.ts +0 -49
- package/evals/v2/src/sandboxes/tempdir.ts +0 -120
- package/evals/v2/src/schema.ts +0 -83
- package/evals/v2/src/trace.ts +0 -186
- package/evals/v2/src/verify.ts +0 -199
- package/evals/v2/tasks/error_recovery/env-fault/calculator.js +0 -11
- package/evals/v2/tasks/error_recovery/env-fault/calculator.test.js +0 -15
- package/evals/v2/tasks/error_recovery/env-fault/golden.patch +0 -15
- package/evals/v2/tasks/error_recovery/env-fault/task.yaml +0 -20
- package/evals/v2/tasks/multi_agent_orchestration/options-contract/app.js +0 -5
- package/evals/v2/tasks/multi_agent_orchestration/options-contract/app.test.js +0 -7
- package/evals/v2/tasks/multi_agent_orchestration/options-contract/golden.patch +0 -19
- package/evals/v2/tasks/multi_agent_orchestration/options-contract/greet.js +0 -3
- package/evals/v2/tasks/multi_agent_orchestration/options-contract/orchestration.test.js +0 -30
- package/evals/v2/tasks/multi_agent_orchestration/options-contract/task.yaml +0 -29
- package/evals/v2/tasks/pure_coding/add-fix/add.js +0 -3
- package/evals/v2/tasks/pure_coding/add-fix/add.test.js +0 -11
- package/evals/v2/tasks/pure_coding/add-fix/golden.patch +0 -7
- package/evals/v2/tasks/pure_coding/add-fix/task.yaml +0 -20
- package/evals/v2/tasks/pure_coding/rename-greet/app.js +0 -5
- package/evals/v2/tasks/pure_coding/rename-greet/app.test.js +0 -32
- package/evals/v2/tasks/pure_coding/rename-greet/golden.patch +0 -19
- package/evals/v2/tasks/pure_coding/rename-greet/greet.js +0 -5
- package/evals/v2/tasks/pure_coding/rename-greet/task.yaml +0 -21
- package/evals/v2/tests/golden.test.ts +0 -104
- package/evals/v2/tests/harness.test.ts +0 -204
- package/evals/v2/tests/metrics.test.ts +0 -353
- package/evals/v2/tests/registry.test.ts +0 -210
- package/evals/v2/tests/reports.test.ts +0 -218
- package/evals/v2/tests/savant-runner.test.ts +0 -218
- package/evals/v2/tests/schema.test.ts +0 -127
- package/evals/v2/tests/tempdir-sandbox.test.ts +0 -49
- package/evals/v2/tests/trace.test.ts +0 -76
- package/evals/v2/tests/verify.test.ts +0 -224
- package/license +0 -202
- package/packages/agent-runtime/README.md +0 -46
- package/packages/agent-runtime/agent_exit +0 -1
- package/packages/agent-runtime/bunfig.toml +0 -2
- package/packages/agent-runtime/package.json +0 -34
- package/packages/agent-runtime/src/__tests__/apply-patch-tool.test.ts +0 -202
- package/packages/agent-runtime/src/__tests__/cost-aggregation.test.ts +0 -397
- package/packages/agent-runtime/src/__tests__/generate-diffs-prompt.test.ts +0 -107
- package/packages/agent-runtime/src/__tests__/get-file-reading-updates.test.ts +0 -59
- package/packages/agent-runtime/src/__tests__/gravity-index-tool.test.ts +0 -501
- package/packages/agent-runtime/src/__tests__/loop-agent-steps.test.ts +0 -1512
- package/packages/agent-runtime/src/__tests__/main-prompt.test.ts +0 -452
- package/packages/agent-runtime/src/__tests__/n-parameter.test.ts +0 -984
- package/packages/agent-runtime/src/__tests__/process-file-block.test.ts +0 -196
- package/packages/agent-runtime/src/__tests__/process-str-replace.test.ts +0 -512
- package/packages/agent-runtime/src/__tests__/programmatic-tool-authorization.test.ts +0 -219
- package/packages/agent-runtime/src/__tests__/prompt-caching-subagents.test.ts +0 -749
- package/packages/agent-runtime/src/__tests__/prompts-schema-handling.test.ts +0 -454
- package/packages/agent-runtime/src/__tests__/propose-tools.test.ts +0 -824
- package/packages/agent-runtime/src/__tests__/read-docs-tool.test.ts +0 -394
- package/packages/agent-runtime/src/__tests__/run-agent-step-prefill.test.ts +0 -161
- package/packages/agent-runtime/src/__tests__/run-agent-step-tools.test.ts +0 -612
- package/packages/agent-runtime/src/__tests__/run-programmatic-step.test.ts +0 -1743
- package/packages/agent-runtime/src/__tests__/sandbox-generator.test.ts +0 -154
- package/packages/agent-runtime/src/__tests__/spawn-agents-image-content.test.ts +0 -354
- package/packages/agent-runtime/src/__tests__/spawn-agents-message-history.test.ts +0 -280
- package/packages/agent-runtime/src/__tests__/spawn-agents-permissions.test.ts +0 -664
- package/packages/agent-runtime/src/__tests__/stream-parser-abort.test.ts +0 -250
- package/packages/agent-runtime/src/__tests__/stream-parser-reasoning.test.ts +0 -194
- package/packages/agent-runtime/src/__tests__/subagent-streaming.test.ts +0 -230
- package/packages/agent-runtime/src/__tests__/test-utils.ts +0 -96
- package/packages/agent-runtime/src/__tests__/thinker-convergence-gate.test.ts +0 -242
- package/packages/agent-runtime/src/__tests__/to-token-count-input-schema.test.ts +0 -81
- package/packages/agent-runtime/src/__tests__/tool-executor-sandbox.test.ts +0 -167
- package/packages/agent-runtime/src/__tests__/tool-stream-parser.test.ts +0 -682
- package/packages/agent-runtime/src/__tests__/tool-validation-error.test.ts +0 -1380
- package/packages/agent-runtime/src/__tests__/web-search-tool.test.ts +0 -402
- package/packages/agent-runtime/src/__tests__/xml-tool-result-ordering.test.ts +0 -264
- package/packages/agent-runtime/src/constants.ts +0 -12
- package/packages/agent-runtime/src/context-compactor.ts +0 -425
- package/packages/agent-runtime/src/find-files/__tests__/request-files-prompt.test.ts +0 -190
- package/packages/agent-runtime/src/find-files/custom-file-picker-config.ts +0 -61
- package/packages/agent-runtime/src/find-files/request-files-prompt.ts +0 -462
- package/packages/agent-runtime/src/generate-diffs-prompt.ts +0 -38
- package/packages/agent-runtime/src/get-file-reading-updates.ts +0 -27
- package/packages/agent-runtime/src/llm-api/__tests__/gemini-with-fallbacks.test.ts +0 -267
- package/packages/agent-runtime/src/llm-api/__tests__/serper-api.test.ts +0 -297
- package/packages/agent-runtime/src/llm-api/claude.ts +0 -7
- package/packages/agent-runtime/src/llm-api/context7-api.ts +0 -290
- package/packages/agent-runtime/src/llm-api/gemini-with-fallbacks.ts +0 -104
- package/packages/agent-runtime/src/llm-api/savant-code-web-api.ts +0 -370
- package/packages/agent-runtime/src/llm-api/serper-api.ts +0 -193
- package/packages/agent-runtime/src/main-prompt.ts +0 -251
- package/packages/agent-runtime/src/mcp-constants.ts +0 -12
- package/packages/agent-runtime/src/mcp.ts +0 -83
- package/packages/agent-runtime/src/process-file-block.ts +0 -118
- package/packages/agent-runtime/src/process-str-replace.ts +0 -213
- package/packages/agent-runtime/src/prompt-agent-stream.ts +0 -119
- package/packages/agent-runtime/src/run-agent-step.ts +0 -1632
- package/packages/agent-runtime/src/run-programmatic-step.ts +0 -633
- package/packages/agent-runtime/src/system-prompt/prompts.ts +0 -215
- package/packages/agent-runtime/src/system-prompt/search-system-prompt.ts +0 -89
- package/packages/agent-runtime/src/system-prompt/truncate-file-tree.ts +0 -414
- package/packages/agent-runtime/src/templates/README.md +0 -160
- package/packages/agent-runtime/src/templates/__tests__/agent-registry.test.ts +0 -489
- package/packages/agent-runtime/src/templates/__tests__/strings.test.ts +0 -465
- package/packages/agent-runtime/src/templates/agent-registry.ts +0 -122
- package/packages/agent-runtime/src/templates/prompts.ts +0 -189
- package/packages/agent-runtime/src/templates/strings.ts +0 -292
- package/packages/agent-runtime/src/templates/types.ts +0 -61
- package/packages/agent-runtime/src/tool-stream-parser.ts +0 -260
- package/packages/agent-runtime/src/tools/filter-tool-set.ts +0 -18
- package/packages/agent-runtime/src/tools/handlers/__tests__/glob.test.ts +0 -331
- package/packages/agent-runtime/src/tools/handlers/__tests__/read-subtree.test.ts +0 -346
- package/packages/agent-runtime/src/tools/handlers/__tests__/run-readonly-command.test.ts +0 -284
- package/packages/agent-runtime/src/tools/handlers/handler-function-type.ts +0 -77
- package/packages/agent-runtime/src/tools/handlers/list.ts +0 -105
- package/packages/agent-runtime/src/tools/handlers/tool/__tests__/checkpoint-store.test.ts +0 -394
- package/packages/agent-runtime/src/tools/handlers/tool/__tests__/skill.test.ts +0 -98
- package/packages/agent-runtime/src/tools/handlers/tool/__tests__/write-file.test.ts +0 -24
- package/packages/agent-runtime/src/tools/handlers/tool/add-message.ts +0 -37
- package/packages/agent-runtime/src/tools/handlers/tool/add-subgoal.ts +0 -30
- package/packages/agent-runtime/src/tools/handlers/tool/apply-patch.ts +0 -120
- package/packages/agent-runtime/src/tools/handlers/tool/ask-user.ts +0 -25
- package/packages/agent-runtime/src/tools/handlers/tool/browser-logs.ts +0 -21
- package/packages/agent-runtime/src/tools/handlers/tool/checkpoint-store.ts +0 -378
- package/packages/agent-runtime/src/tools/handlers/tool/code-search.ts +0 -21
- package/packages/agent-runtime/src/tools/handlers/tool/composio.ts +0 -52
- package/packages/agent-runtime/src/tools/handlers/tool/create-plan.ts +0 -63
- package/packages/agent-runtime/src/tools/handlers/tool/end-turn.ts +0 -15
- package/packages/agent-runtime/src/tools/handlers/tool/find-files.ts +0 -161
- package/packages/agent-runtime/src/tools/handlers/tool/glob.ts +0 -22
- package/packages/agent-runtime/src/tools/handlers/tool/gravity-index.ts +0 -230
- package/packages/agent-runtime/src/tools/handlers/tool/list-directory.ts +0 -22
- package/packages/agent-runtime/src/tools/handlers/tool/lookup-agent-info.ts +0 -105
- package/packages/agent-runtime/src/tools/handlers/tool/propose-str-replace.ts +0 -111
- package/packages/agent-runtime/src/tools/handlers/tool/propose-write-file.ts +0 -89
- package/packages/agent-runtime/src/tools/handlers/tool/proposed-content-store.ts +0 -64
- package/packages/agent-runtime/src/tools/handlers/tool/read-docs.ts +0 -160
- package/packages/agent-runtime/src/tools/handlers/tool/read-files.ts +0 -43
- package/packages/agent-runtime/src/tools/handlers/tool/read-subtree.ts +0 -198
- package/packages/agent-runtime/src/tools/handlers/tool/read-url.ts +0 -21
- package/packages/agent-runtime/src/tools/handlers/tool/render-ui.ts +0 -15
- package/packages/agent-runtime/src/tools/handlers/tool/run-file-change-hooks.ts +0 -20
- package/packages/agent-runtime/src/tools/handlers/tool/run-readonly-command.ts +0 -215
- package/packages/agent-runtime/src/tools/handlers/tool/run-terminal-command.ts +0 -33
- package/packages/agent-runtime/src/tools/handlers/tool/sequential-thinking.ts +0 -53
- package/packages/agent-runtime/src/tools/handlers/tool/set-messages.ts +0 -19
- package/packages/agent-runtime/src/tools/handlers/tool/set-output.ts +0 -104
- package/packages/agent-runtime/src/tools/handlers/tool/set-scaffold-complete.ts +0 -32
- package/packages/agent-runtime/src/tools/handlers/tool/skill.ts +0 -146
- package/packages/agent-runtime/src/tools/handlers/tool/spawn-agent-inline.ts +0 -149
- package/packages/agent-runtime/src/tools/handlers/tool/spawn-agent-utils.ts +0 -436
- package/packages/agent-runtime/src/tools/handlers/tool/spawn-agents.ts +0 -286
- package/packages/agent-runtime/src/tools/handlers/tool/str-replace.ts +0 -135
- package/packages/agent-runtime/src/tools/handlers/tool/suggest-followups.ts +0 -20
- package/packages/agent-runtime/src/tools/handlers/tool/task-completed.ts +0 -15
- package/packages/agent-runtime/src/tools/handlers/tool/think-deeply.ts +0 -25
- package/packages/agent-runtime/src/tools/handlers/tool/transition-phase.ts +0 -160
- package/packages/agent-runtime/src/tools/handlers/tool/update-subgoal.ts +0 -48
- package/packages/agent-runtime/src/tools/handlers/tool/web-search.ts +0 -151
- package/packages/agent-runtime/src/tools/handlers/tool/write-file.ts +0 -281
- package/packages/agent-runtime/src/tools/handlers/tool/write-todos.ts +0 -19
- package/packages/agent-runtime/src/tools/prompts.ts +0 -233
- package/packages/agent-runtime/src/tools/sandbox/__tests__/engine.test.ts +0 -169
- package/packages/agent-runtime/src/tools/sandbox/__tests__/shell-denylist.test.ts +0 -104
- package/packages/agent-runtime/src/tools/sandbox/engine.ts +0 -109
- package/packages/agent-runtime/src/tools/sandbox/index.ts +0 -14
- package/packages/agent-runtime/src/tools/sandbox/shell-denylist.ts +0 -119
- package/packages/agent-runtime/src/tools/stream-parser.ts +0 -407
- package/packages/agent-runtime/src/tools/thinker-convergence-gate.ts +0 -162
- package/packages/agent-runtime/src/tools/thought-session-store.ts +0 -43
- package/packages/agent-runtime/src/tools/tool-executor.ts +0 -1098
- package/packages/agent-runtime/src/util/__tests__/messages.test.ts +0 -995
- package/packages/agent-runtime/src/util/__tests__/parse-tool-calls-from-text.test.ts +0 -363
- package/packages/agent-runtime/src/util/__tests__/simplify-tool-results.test.ts +0 -382
- package/packages/agent-runtime/src/util/__tests__/stream-xml-parser.test.ts +0 -285
- package/packages/agent-runtime/src/util/__tests__/think-tags.test.ts +0 -49
- package/packages/agent-runtime/src/util/__tests__/token-counter.test.ts +0 -121
- package/packages/agent-runtime/src/util/activity-tracking.ts +0 -252
- package/packages/agent-runtime/src/util/agent-output.ts +0 -102
- package/packages/agent-runtime/src/util/cache-debug.ts +0 -330
- package/packages/agent-runtime/src/util/format-value.ts +0 -16
- package/packages/agent-runtime/src/util/messages.ts +0 -461
- package/packages/agent-runtime/src/util/parse-tool-calls-from-text.ts +0 -122
- package/packages/agent-runtime/src/util/render-read-files-result.ts +0 -18
- package/packages/agent-runtime/src/util/simplify-tool-results.ts +0 -61
- package/packages/agent-runtime/src/util/stream-xml-parser.ts +0 -259
- package/packages/agent-runtime/src/util/think-tags.ts +0 -33
- package/packages/agent-runtime/src/util/token-counter.ts +0 -136
- package/packages/agent-runtime/tsconfig.json +0 -8
- package/packages/code-map/README.md +0 -43
- package/packages/code-map/__tests__/integration.test.ts +0 -278
- package/packages/code-map/__tests__/languages.test.ts +0 -240
- package/packages/code-map/__tests__/parse.test.ts +0 -640
- package/packages/code-map/__tests__/test-langs/test.c +0 -42
- package/packages/code-map/__tests__/test-langs/test.cpp +0 -34
- package/packages/code-map/__tests__/test-langs/test.cs +0 -34
- package/packages/code-map/__tests__/test-langs/test.go +0 -27
- package/packages/code-map/__tests__/test-langs/test.java +0 -31
- package/packages/code-map/__tests__/test-langs/test.js +0 -50
- package/packages/code-map/__tests__/test-langs/test.php +0 -34
- package/packages/code-map/__tests__/test-langs/test.py +0 -25
- package/packages/code-map/__tests__/test-langs/test.rb +0 -28
- package/packages/code-map/__tests__/test-langs/test.rs +0 -28
- package/packages/code-map/__tests__/test-langs/test.ts +0 -31
- package/packages/code-map/package.json +0 -33
- package/packages/code-map/src/index.ts +0 -4
- package/packages/code-map/src/init-node.ts +0 -185
- package/packages/code-map/src/languages.ts +0 -344
- package/packages/code-map/src/parse.ts +0 -410
- package/packages/code-map/src/tree-sitter-queries/readme.md +0 -24
- package/packages/code-map/src/tree-sitter-queries/tree-sitter-c-tags.scm +0 -16
- package/packages/code-map/src/tree-sitter-queries/tree-sitter-c_sharp-tags.scm +0 -23
- package/packages/code-map/src/tree-sitter-queries/tree-sitter-cpp-tags.scm +0 -29
- package/packages/code-map/src/tree-sitter-queries/tree-sitter-go-tags.scm +0 -26
- package/packages/code-map/src/tree-sitter-queries/tree-sitter-java-tags.scm +0 -19
- package/packages/code-map/src/tree-sitter-queries/tree-sitter-javascript-tags.scm +0 -16
- package/packages/code-map/src/tree-sitter-queries/tree-sitter-php-tags.scm +0 -23
- package/packages/code-map/src/tree-sitter-queries/tree-sitter-python-tags.scm +0 -12
- package/packages/code-map/src/tree-sitter-queries/tree-sitter-ruby-tags.scm +0 -58
- package/packages/code-map/src/tree-sitter-queries/tree-sitter-rust-tags.scm +0 -26
- package/packages/code-map/src/tree-sitter-queries/tree-sitter-typescript-tags.scm +0 -22
- package/packages/code-map/src/types.ts +0 -11
- package/packages/code-map/src/utils.ts +0 -12
- package/packages/code-map/tsconfig.json +0 -10
- package/packages/database/README.md +0 -43
- package/packages/database/package.json +0 -28
- package/packages/database/src/__tests__/service.test.ts +0 -167
- package/packages/database/src/index.ts +0 -146
- package/packages/database/src/service.ts +0 -342
- package/packages/database/tsconfig.json +0 -9
- package/packages/llm-providers/README.md +0 -42
- package/packages/llm-providers/package.json +0 -42
- package/packages/llm-providers/src/ollama/__tests__/detect.test.ts +0 -59
- package/packages/llm-providers/src/ollama/detect.ts +0 -113
- package/packages/llm-providers/src/ollama/index.ts +0 -2
- package/packages/llm-providers/src/openai-compatible/chat/convert-to-openai-compatible-chat-messages.test.ts +0 -855
- package/packages/llm-providers/src/openai-compatible/chat/convert-to-openai-compatible-chat-messages.ts +0 -177
- package/packages/llm-providers/src/openai-compatible/chat/get-response-metadata.ts +0 -15
- package/packages/llm-providers/src/openai-compatible/chat/map-openai-compatible-finish-reason.ts +0 -19
- package/packages/llm-providers/src/openai-compatible/chat/openai-compatible-api-types.ts +0 -60
- package/packages/llm-providers/src/openai-compatible/chat/openai-compatible-chat-language-model.test.ts +0 -549
- package/packages/llm-providers/src/openai-compatible/chat/openai-compatible-chat-language-model.ts +0 -474
- package/packages/llm-providers/src/openai-compatible/chat/openai-compatible-chat-options.ts +0 -25
- package/packages/llm-providers/src/openai-compatible/chat/openai-compatible-metadata-extractor.ts +0 -49
- package/packages/llm-providers/src/openai-compatible/chat/openai-compatible-prepare-tools.ts +0 -162
- package/packages/llm-providers/src/openai-compatible/chat/stream-transform.test.ts +0 -106
- package/packages/llm-providers/src/openai-compatible/chat/stream-transform.ts +0 -585
- package/packages/llm-providers/src/openai-compatible/completion/convert-to-openai-compatible-completion-prompt.ts +0 -98
- package/packages/llm-providers/src/openai-compatible/completion/openai-compatible-completion-language-model.test.ts +0 -173
- package/packages/llm-providers/src/openai-compatible/completion/openai-compatible-completion-language-model.ts +0 -414
- package/packages/llm-providers/src/openai-compatible/completion/openai-compatible-completion-options.ts +0 -33
- package/packages/llm-providers/src/openai-compatible/embedding/openai-compatible-embedding-model.ts +0 -143
- package/packages/llm-providers/src/openai-compatible/embedding/openai-compatible-embedding-options.ts +0 -21
- package/packages/llm-providers/src/openai-compatible/image/openai-compatible-image-model.ts +0 -129
- package/packages/llm-providers/src/openai-compatible/image/openai-compatible-image-settings.ts +0 -1
- package/packages/llm-providers/src/openai-compatible/index.ts +0 -27
- package/packages/llm-providers/src/openai-compatible/openai-compatible-error.ts +0 -34
- package/packages/llm-providers/src/openai-compatible/openai-compatible-provider.ts +0 -174
- package/packages/llm-providers/src/openai-compatible/version.ts +0 -5
- package/packages/llm-providers/tsconfig.json +0 -9
- package/protocol.config.yaml +0 -113
- package/savant-free/README.md +0 -73
- package/savant-free/SPEC.md +0 -385
- package/savant-free/cli/build.ts +0 -49
- package/savant-free/cli/release/README.md +0 -55
- package/savant-free/cli/release/index.js +0 -37
- package/savant-free/cli/release/package.json +0 -43
- package/savant-free/cli/release.ts +0 -128
- package/savant-free/cli/smoke-test.test.ts +0 -257
- package/savant-free/e2e/README.md +0 -173
- package/savant-free/e2e/agent/savant-free-tester.ts +0 -52
- package/savant-free/e2e/tests/ads-behavior.e2e.test.ts +0 -51
- package/savant-free/e2e/tests/agent-startup.e2e.test.ts +0 -61
- package/savant-free/e2e/tests/code-edit.e2e.test.ts +0 -78
- package/savant-free/e2e/tests/help-command.e2e.test.ts +0 -97
- package/savant-free/e2e/tests/knowledge-file.e2e.test.ts +0 -66
- package/savant-free/e2e/tests/slash-commands.e2e.test.ts +0 -119
- package/savant-free/e2e/tests/startup.e2e.test.ts +0 -56
- package/savant-free/e2e/tests/terminal-command.e2e.test.ts +0 -71
- package/savant-free/e2e/tests/version.e2e.test.ts +0 -50
- package/savant-free/e2e/utils/binary-helpers.ts +0 -24
- package/savant-free/e2e/utils/index.ts +0 -17
- package/savant-free/e2e/utils/savant-free-session.ts +0 -229
- package/savant-free/e2e/utils/tmux-custom-tools.ts +0 -156
- package/savant-free/e2e/utils/tmux-helpers.ts +0 -79
- package/savant-free/package.json +0 -20
- package/scripts/eslint-rules/__fixtures__/debug-ast.mjs +0 -20
- package/scripts/eslint-rules/__fixtures__/probe.mjs +0 -41
- package/scripts/eslint-rules/__fixtures__/probe2.mjs +0 -43
- package/scripts/eslint-rules/__fixtures__/rule-test.mjs +0 -44
- package/scripts/eslint-rules/__fixtures__/rule-test2.mjs +0 -27
- package/scripts/eslint-rules/__fixtures__/unknown-bad.ts +0 -21
- package/scripts/eslint-rules/__fixtures__/unknown-good.ts +0 -35
- package/scripts/eslint-rules/no-unknown-in-signatures.js +0 -141
- package/scripts/release.py +0 -360
- package/scripts/run-az-test.sh +0 -1150
- package/scripts/sync-agents.py +0 -337
- package/scripts/tmux/README.md +0 -359
- package/scripts/tmux/package.json +0 -9
- package/scripts/tmux/tmux-capture.sh +0 -231
- package/scripts/tmux/tmux-cli.sh +0 -160
- package/scripts/tmux/tmux-env.sh +0 -34
- package/scripts/tmux/tmux-send.sh +0 -339
- package/scripts/tmux/tmux-start.sh +0 -264
- package/scripts/tmux/tmux-stop.sh +0 -157
- package/scripts/tmux/tmux-viewer/README.md +0 -254
- package/scripts/tmux/tmux-viewer/components/session-viewer.tsx +0 -556
- package/scripts/tmux/tmux-viewer/components/theme.ts +0 -54
- package/scripts/tmux/tmux-viewer/gif-encoder-2.d.ts +0 -28
- package/scripts/tmux/tmux-viewer/gif-exporter.ts +0 -278
- package/scripts/tmux/tmux-viewer/index.tsx +0 -237
- package/scripts/tmux/tmux-viewer/package.json +0 -9
- package/scripts/tmux/tmux-viewer/session-loader.ts +0 -234
- package/scripts/tmux/tmux-viewer/tsconfig.json +0 -9
- package/scripts/tmux/tmux-viewer/types.ts +0 -76
- package/sdk/CHANGELOG.md +0 -126
- package/sdk/PUBLISHING.md +0 -55
- package/sdk/README.md +0 -334
- package/sdk/bunfig.toml +0 -6
- package/sdk/e2e/README.md +0 -158
- package/sdk/e2e/custom-agents/api-integration-agent.e2e.test.ts +0 -145
- package/sdk/e2e/custom-agents/apply-patch-tool.e2e.test.ts +0 -62
- package/sdk/e2e/custom-agents/database-query-agent.e2e.test.ts +0 -135
- package/sdk/e2e/custom-agents/weather-agent.e2e.test.ts +0 -120
- package/sdk/e2e/examples/code-explainer.example.ts +0 -62
- package/sdk/e2e/examples/code-reviewer.example.ts +0 -52
- package/sdk/e2e/examples/commit-message-generator.example.ts +0 -61
- package/sdk/e2e/examples/sdk-lint.example.ts +0 -65
- package/sdk/e2e/examples/sdk-refactor.example.ts +0 -63
- package/sdk/e2e/examples/sdk-test-gen.example.ts +0 -62
- package/sdk/e2e/features/knowledge-files.e2e.test.ts +0 -82
- package/sdk/e2e/features/max-agent-steps.e2e.test.ts +0 -65
- package/sdk/e2e/features/project-files.e2e.test.ts +0 -80
- package/sdk/e2e/integration/connection-check.integration.test.ts +0 -33
- package/sdk/e2e/integration/event-ordering.integration.test.ts +0 -186
- package/sdk/e2e/integration/event-types.integration.test.ts +0 -183
- package/sdk/e2e/integration/stream-chunks.integration.test.ts +0 -191
- package/sdk/e2e/streaming/concurrent-streams.e2e.test.ts +0 -164
- package/sdk/e2e/streaming/subagent-streaming.e2e.test.ts +0 -158
- package/sdk/e2e/utils/__tests__/event-collector.test.ts +0 -297
- package/sdk/e2e/utils/e2e-mocks.ts +0 -458
- package/sdk/e2e/utils/event-collector.ts +0 -145
- package/sdk/e2e/utils/get-api-key.ts +0 -76
- package/sdk/e2e/utils/index.ts +0 -3
- package/sdk/e2e/utils/test-fixtures.ts +0 -196
- package/sdk/e2e/workflows/error-recovery.e2e.test.ts +0 -112
- package/sdk/e2e/workflows/multi-turn-conversation.e2e.test.ts +0 -132
- package/sdk/examples/readme-example-1.ts +0 -34
- package/sdk/examples/readme-example-2.ts +0 -76
- package/sdk/package.json +0 -82
- package/sdk/scripts/build.ts +0 -349
- package/sdk/scripts/fetch-ripgrep.ts +0 -172
- package/sdk/scripts/publish.ts +0 -51
- package/sdk/scripts/release.js +0 -100
- package/sdk/scripts/verify.ts +0 -204
- package/sdk/sdk_exit +0 -1
- package/sdk/smoke-test-dist.ts +0 -248
- package/sdk/src/__tests__/apply-overrides-resume.test.ts +0 -83
- package/sdk/src/__tests__/apply-patch.test.ts +0 -438
- package/sdk/src/__tests__/build-file-tree.test.ts +0 -31
- package/sdk/src/__tests__/change-file.test.ts +0 -212
- package/sdk/src/__tests__/client.test.ts +0 -142
- package/sdk/src/__tests__/clone-session-state.test.ts +0 -158
- package/sdk/src/__tests__/code-search.test.ts +0 -896
- package/sdk/src/__tests__/composio.test.ts +0 -86
- package/sdk/src/__tests__/credentials.test.ts +0 -344
- package/sdk/src/__tests__/database.test.ts +0 -153
- package/sdk/src/__tests__/env.test.ts +0 -137
- package/sdk/src/__tests__/error-utils.test.ts +0 -253
- package/sdk/src/__tests__/fixtures/windows-stubborn-grandchild.ts +0 -26
- package/sdk/src/__tests__/initial-session-state.test.ts +0 -447
- package/sdk/src/__tests__/knowledge-file-selection.test.ts +0 -335
- package/sdk/src/__tests__/load-agents.test.ts +0 -935
- package/sdk/src/__tests__/load-mcp-config.test.ts +0 -285
- package/sdk/src/__tests__/load-skills.test.ts +0 -325
- package/sdk/src/__tests__/model-provider.test.ts +0 -44
- package/sdk/src/__tests__/path-utils.test.ts +0 -66
- package/sdk/src/__tests__/read-files.test.ts +0 -573
- package/sdk/src/__tests__/read-url.test.ts +0 -371
- package/sdk/src/__tests__/researcher-web.integration.test.ts +0 -130
- package/sdk/src/__tests__/run-cancellation.test.ts +0 -1321
- package/sdk/src/__tests__/run-error-preserves-history.test.ts +0 -335
- package/sdk/src/__tests__/run-event-dispatch.test.ts +0 -80
- package/sdk/src/__tests__/run-file-filter.test.ts +0 -530
- package/sdk/src/__tests__/run-handle-event.test.ts +0 -142
- package/sdk/src/__tests__/run-mcp-tool-filter.test.ts +0 -124
- package/sdk/src/__tests__/run-state-child-process.test.ts +0 -72
- package/sdk/src/__tests__/run-terminal-command.test.ts +0 -236
- package/sdk/src/__tests__/run.integration.test.ts +0 -170
- package/sdk/src/__tests__/user-knowledge-files.test.ts +0 -361
- package/sdk/src/__tests__/validate-agents.test.ts +0 -943
- package/sdk/src/agents/load-agents.ts +0 -339
- package/sdk/src/agents/load-mcp-config.ts +0 -275
- package/sdk/src/client.ts +0 -87
- package/sdk/src/composio.ts +0 -78
- package/sdk/src/constants.ts +0 -29
- package/sdk/src/credentials.ts +0 -303
- package/sdk/src/custom-tool.ts +0 -66
- package/sdk/src/env.ts +0 -116
- package/sdk/src/error-utils.ts +0 -127
- package/sdk/src/impl/__tests__/llm-chatgpt-oauth-policy.test.ts +0 -67
- package/sdk/src/impl/__tests__/llm-native-tool-call.test.ts +0 -38
- package/sdk/src/impl/__tests__/llm-stream-yielded-content.test.ts +0 -118
- package/sdk/src/impl/__tests__/model-provider-free-mode.test.ts +0 -166
- package/sdk/src/impl/__tests__/prompt-result.test.ts +0 -210
- package/sdk/src/impl/__tests__/provider-options-metadata.test.ts +0 -67
- package/sdk/src/impl/agent-runtime.ts +0 -159
- package/sdk/src/impl/chatgpt-backend-fetch.ts +0 -588
- package/sdk/src/impl/database.ts +0 -516
- package/sdk/src/impl/llm.ts +0 -852
- package/sdk/src/impl/model-provider.ts +0 -638
- package/sdk/src/impl/openrouter-key-resolver.ts +0 -78
- package/sdk/src/index.ts +0 -133
- package/sdk/src/native/ripgrep.ts +0 -141
- package/sdk/src/retry-config.ts +0 -51
- package/sdk/src/run-state.ts +0 -897
- package/sdk/src/run.ts +0 -1222
- package/sdk/src/skills/load-skills.ts +0 -253
- package/sdk/src/testing/env.ts +0 -19
- package/sdk/src/tools/apply-patch.ts +0 -690
- package/sdk/src/tools/change-file.ts +0 -155
- package/sdk/src/tools/code-search.ts +0 -547
- package/sdk/src/tools/glob.ts +0 -58
- package/sdk/src/tools/index.ts +0 -19
- package/sdk/src/tools/list-directory.ts +0 -52
- package/sdk/src/tools/path-utils.ts +0 -101
- package/sdk/src/tools/read-files.ts +0 -110
- package/sdk/src/tools/read-url.ts +0 -469
- package/sdk/src/tools/run-file-change-hooks.ts +0 -22
- package/sdk/src/tools/run-terminal-command.ts +0 -483
- package/sdk/src/tools/ssrf.ts +0 -120
- package/sdk/src/types/env.ts +0 -40
- package/sdk/src/utils/logger.ts +0 -15
- package/sdk/src/validate-agents.ts +0 -157
- package/sdk/test/cjs-compatibility/package-lock.json +0 -423
- package/sdk/test/cjs-compatibility/package.json +0 -21
- package/sdk/test/cjs-compatibility/test-imports.js +0 -77
- package/sdk/test/cjs-compatibility/test-types.ts +0 -54
- package/sdk/test/cjs-compatibility/tsconfig.json +0 -17
- package/sdk/test/esm-compatibility/package-lock.json +0 -423
- package/sdk/test/esm-compatibility/package.json +0 -21
- package/sdk/test/esm-compatibility/test-imports.js +0 -83
- package/sdk/test/esm-compatibility/test-types.ts +0 -59
- package/sdk/test/esm-compatibility/tsconfig.json +0 -17
- package/sdk/test/ripgrep-bundling/package-lock.json +0 -423
- package/sdk/test/ripgrep-bundling/package.json +0 -21
- package/sdk/test/ripgrep-bundling/test-ripgrep-types.ts +0 -132
- package/sdk/test/ripgrep-bundling/test-ripgrep.js +0 -257
- package/sdk/test/ripgrep-bundling/tsconfig.json +0 -15
- package/sdk/test/setup-env.ts +0 -54
- package/sdk/test/test-sdk.ts +0 -25
- package/sdk/test/tree-sitter-queries/package-lock.json +0 -47
- package/sdk/test/tree-sitter-queries/package.json +0 -12
- package/sdk/test/tree-sitter-queries/test-query-files.js +0 -256
- package/sdk/tsconfig.build.json +0 -32
- package/sdk/tsconfig.json +0 -27
- 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 +0 -125
- package/templates/README-TEMPLATE.md +0 -87
- package/templates/SESSION-SUMMARY.md +0 -135
- package/tsconfig.base.json +0 -18
- package/tsconfig.json +0 -27
- /package/{cli/release-core/http.js → http.js} +0 -0
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
# Agent Harness Feature Pairing Research
|
|
2
|
-
|
|
3
|
-
**Author:** Savant
|
|
4
|
-
**Date:** 2026-08-03
|
|
5
|
-
**Status:** research — no FIDs opened yet
|
|
6
|
-
**Scope:** Full catalog scan of `resources/` (~120 repos, 0 unscanned), consolidating
|
|
7
|
-
two prior scan reports plus four live sweeps, distilled into feature pairings
|
|
8
|
-
relevant to Savant-Code.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## 1. Method
|
|
13
|
-
|
|
14
|
-
- `resources/_SCAN_REPORT.md` and `resources/SCANNING-REPORT.md` cover 44 repos
|
|
15
|
-
(Bernstein, Forge, Entroly, ctxlint, Cline, Zero, mini-swe-agent, Kimi Code,
|
|
16
|
-
OpenCode, Aider, Codex, Goose, OpenHands, Hermes, Gemini CLI, and others).
|
|
17
|
-
- Four additional sweeps covered the remaining ~76 repos, with deep dives on the
|
|
18
|
-
high-signal candidates: DeepSeek-Reasonix, sourcebook, OpenSpec, agenttrace,
|
|
19
|
-
ORCH, pi-steering-hooks, prpack, LoopTroop, IM.codes, TokenWise, codesight,
|
|
20
|
-
iwe, brood-box, Shep, Spartan, onUI, Jctx, SwarmVault, GolemBot, and more.
|
|
21
|
-
- Findings were relevance-filtered against Savant-Code's architecture (agent
|
|
22
|
-
runtime, CLI, SDK, ECHO Protocol, checkpoints, permissions, sub-agents).
|
|
23
|
-
|
|
24
|
-
The organizing principle is **feature pairing**: single features rarely move the
|
|
25
|
-
needle; pairs that multiply each other's value are what ship.
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## 2. The Pairing Map
|
|
30
|
-
|
|
31
|
-
### 2.1 Coding ↔ Coding pairs
|
|
32
|
-
|
|
33
|
-
| Pair | Why they multiply | Proven by |
|
|
34
|
-
| --- | --- | --- |
|
|
35
|
-
| Guardrails ↔ Audited override | Deterministic blocking works because of a logged escape hatch; agent proceeds with `# steering-override: <rule>` but it is audited; `noOverride` rules stay absolute | pi-steering-hooks |
|
|
36
|
-
| Checkpoints ↔ Per-file landing review | Snapshot before is half; reviewing each change before it lands (COW snapshot + accept/reject) is the other half | brood-box, Savant FID-2026-0803-004 |
|
|
37
|
-
| Tier routing ↔ A/B verification | Routing to cheap models is faith without proof; run the same task on two tiers, diff outputs, then trust the router | TokenWise |
|
|
38
|
-
| Spec artifacts ↔ Verify gates | Proposal/spec/design/tasks pay off only when implementation is checked against them (scored PASS/REWORK/BLOCKED) | OpenSpec, Spartan, IM.codes |
|
|
39
|
-
| Memory ↔ Graph retrieval | Storing facts is useless without graph-structured recall (parent-context expansion, fuzzy find) | iwe, SwarmVault, Entroly |
|
|
40
|
-
| Worktrees ↔ Parallel agents | One agent per isolated branch: zero conflicts, review diffs, merge wins | Shep, ORCH, parallel-code |
|
|
41
|
-
| CI-watch ↔ Auto-fix loop | Agent opens PR, harness watches CI, failure logs loop back to the agent before merge | Shep |
|
|
42
|
-
| Context isolation ↔ Sub-agents | Bead-level context (only active unit + its files) prevents rot the way sub-agent firewalls do | LoopTroop, OpenCode |
|
|
43
|
-
| Evidence ledger ↔ Completion gates | Receipts per tool call + `complete_step` proof means no completion claim without evidence | DeepSeek-Reasonix, Bernstein |
|
|
44
|
-
| Diff completeness ↔ Review | Detect files the agent forgot to change (co-change, siblings, missing tests) before review | sourcebook |
|
|
45
|
-
| Full-file context ↔ Review | Reviewer gets full post-change file contents + sibling tests, not just diffs | prpack |
|
|
46
|
-
|
|
47
|
-
### 2.2 Coding ↔ General bridges
|
|
48
|
-
|
|
49
|
-
| Pair | The bridge | Proven by |
|
|
50
|
-
| --- | --- | --- |
|
|
51
|
-
| Coding agent ↔ IM gateway | Coding agents get Slack/Telegram/Discord/Feishu/WeChat bodies — the agent you already have becomes a 24/7 teammate | GolemBot (13k+ OpenClaw skills) |
|
|
52
|
-
| Coding agent ↔ UI annotation | Annotate any webpage (intent+severity markers, draw regions, export formats) → direct agent input | onUI |
|
|
53
|
-
| Coding agent ↔ Knowledge wiki | Docs/code/transcripts → durable markdown wiki + queryable graph handed to agents | SwarmVault, iwe |
|
|
54
|
-
| Coding agent ↔ OpenAPI→formats | One OpenAPI spec → MCP server + CLAUDE.md + AGENTS.md + .cursorrules + A2A card + CLI | agentify |
|
|
55
|
-
| Coding agent ↔ Remote session | Mobile/web terminal access to running sessions, git views, localhost preview, pair invites | IM.codes |
|
|
56
|
-
| Coding agent ↔ Asset registry | Typed-contract install of skills, prompts, MCP configs, workflows | TokRepo |
|
|
57
|
-
| Coding agent ↔ Always-on scheduler | Heartbeats + cron + delegation → autonomous agents that keep working | SwarmClaw, Dorothy |
|
|
58
|
-
| Coding agent ↔ Supervision board | Reviewer agent files ranked findings against task; nothing reaches Done until triaged | Kagan |
|
|
59
|
-
|
|
60
|
-
### 2.3 General ↔ General pairs
|
|
61
|
-
|
|
62
|
-
| Pair | Why | Proven by |
|
|
63
|
-
| --- | --- | --- |
|
|
64
|
-
| Org chart ↔ Delegation | Role hierarchy visualized with live activity → natural delegation | SwarmClaw |
|
|
65
|
-
| Conversation ↔ Skill learning | Reviewed conversations become reusable skills (user-reviewed, not silent) | SwarmClaw, Hermes |
|
|
66
|
-
| Kanban ↔ Auto-assignment | Tasks auto-assigned to agents by capability; dependency chains | Dorothy, Cline |
|
|
67
|
-
| Vault ↔ Audit | Hash-chained append-only ledger + atomic rollback on every change | os-moda, Bernstein |
|
|
68
|
-
|
|
69
|
-
---
|
|
70
|
-
|
|
71
|
-
## 3. Top 5 Adoptions for Savant-Code
|
|
72
|
-
|
|
73
|
-
Each is a *pair*, not a single feature. Verified against the codebase.
|
|
74
|
-
|
|
75
|
-
| # | Pair | Savant fit | Effort |
|
|
76
|
-
| --- | --- | --- | --- |
|
|
77
|
-
| 1 | Guardrails + audited override (pi-steering-hooks) | plugs into `/permissions` + `run-readonly-command.ts`; zero-token ECHO enforcement | S–M |
|
|
78
|
-
| 2 | Checkpoints + per-file landing review (brood-box) | extends checkpoint-store (review diffs before accepting writes) | L–M |
|
|
79
|
-
| 3 | Tier routing + A/B verification (TokenWise) | plugs into model picker + per-agent model config | M |
|
|
80
|
-
| 4 | Spec artifacts + verify gates (OpenSpec/Spartan) | grafts onto FID lifecycle (scored PASS/REWORK/BLOCKED) | M |
|
|
81
|
-
| 5 | Coding agent + IM gateway (GolemBot) | biggest product expansion: Savant as a team teammate | L |
|
|
82
|
-
|
|
83
|
-
### Detailed notes on the top 5
|
|
84
|
-
|
|
85
|
-
**1. Guardrails + audited override.** Rule format `{ tool, field, pattern,
|
|
86
|
-
requires?, unless?, reason, noOverride? }` intercepts tool calls before
|
|
87
|
-
execution. The override comment (`# steering-override: <rule>`) lets the agent
|
|
88
|
-
proceed with a logged reason; `noOverride: true` rules (e.g. `rm -rf /`) cannot
|
|
89
|
-
be bypassed. Default rules block long-running commands and enforce conventional
|
|
90
|
-
commits. Zero token cost, 100% reliability — the "ratchet rule" from harness
|
|
91
|
-
engineering made literal.
|
|
92
|
-
|
|
93
|
-
**2. Checkpoints + per-file landing review.** brood-box boots a COW workspace
|
|
94
|
-
snapshot, lets the agent work, then requires interactive per-file diff review
|
|
95
|
-
before anything lands. Savant already has checkpoint-store (per-turn snapshots,
|
|
96
|
-
first-capture dedup, restore). Adding a pre-landing review gate (accept/reject
|
|
97
|
-
each changed file with unified diffs) completes the edit-safety story.
|
|
98
|
-
|
|
99
|
-
**3. Tier routing + A/B verification.** TokenWise cites Anthropic issue #27665:
|
|
100
|
-
93.8% of Max-subscriber tokens flow to Opus even when Haiku suffices. Three
|
|
101
|
-
tiers (mechanical / scoped reasoning / synthesis) with safety caps: cheap tier
|
|
102
|
-
never spawns subagents, max spawn depth 2, trivial tasks run inline, context
|
|
103
|
-
>30k tokens escalates a tier. The `/ab` command runs a task on two tiers, diffs
|
|
104
|
-
outputs, scores quality before trusting the router. Every routed call logs
|
|
105
|
-
NDJSON with real token/cost.
|
|
106
|
-
|
|
107
|
-
**4. Spec artifacts + verify gates.** OpenSpec's change directory
|
|
108
|
-
(`proposal.md → specs/ → design.md → tasks.md → apply → verify → sync →
|
|
109
|
-
archive`) with `/opsx:verify` checking three dimensions (completeness,
|
|
110
|
-
correctness, coherence) and reporting CRITICAL/WARNING/SUGGESTION. IM.codes
|
|
111
|
-
adds automatic module scoring (spec/tasks/implementation/tests/risk) with
|
|
112
|
-
PASS/REWORK/BLOCKED verdicts and rework gates. Grafts onto the FID lifecycle.
|
|
113
|
-
|
|
114
|
-
**5. Coding agent + IM gateway.** GolemBot connects existing coding agents
|
|
115
|
-
(Claude Code, Codex, OpenCode) to Slack, Telegram, Discord, Feishu, DingTalk,
|
|
116
|
-
WeCom, WeChat, or any HTTP client — "the agent you already have is the brain."
|
|
117
|
-
One config block routes any provider; no framework, no prompt engineering.
|
|
118
|
-
|
|
119
|
-
---
|
|
120
|
-
|
|
121
|
-
## 4. Validated as already-correct in Savant-Code
|
|
122
|
-
|
|
123
|
-
The catalog repeatedly validated Savant's existing machinery — no adoption
|
|
124
|
-
needed:
|
|
125
|
-
|
|
126
|
-
- Context isolation + sub-agent firewalls (FID-007 tool-set filtering)
|
|
127
|
-
- Multi-tier compaction with stale-tool-result clearing and reactive compact
|
|
128
|
-
- Checkpoints/rewind (matches Claude Code and DeepSeek-Reasonix designs)
|
|
129
|
-
- Skills with progressive disclosure (matches the skills standard)
|
|
130
|
-
- Permission modes + dangerous-command regex blocking
|
|
131
|
-
- Phase-gated tool access (schema-level gating)
|
|
132
|
-
- Forge/Verifier split (Generator-Evaluator separation)
|
|
133
|
-
- Ratchet-rule loop (FID → LEARNINGS → eslint rules)
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
## 5. Notable ecosystem patterns observed (for context)
|
|
138
|
-
|
|
139
|
-
- **Content-addressed everything** (Bernstein, Entroly, Forge): hash every
|
|
140
|
-
artifact and journal entry; same inputs reproduce byte-identical outputs.
|
|
141
|
-
- **Merkle-chained event journals** (Bernstein, os-moda): tamper detectable at
|
|
142
|
-
the exact step.
|
|
143
|
-
- **Disk-based state machines** (Forge, Bernstein): crash recovery from disk,
|
|
144
|
-
not memory.
|
|
145
|
-
- **Select-then-compress** (Entroly): choose highest-value evidence before
|
|
146
|
-
compressing; keep originals recoverable.
|
|
147
|
-
- **Fail-open hooks** (Kimi Code): hooks enhance, never block the agent.
|
|
148
|
-
- **Steering accuracy beats prompts** (pi-steering-hooks, Strands Agents):
|
|
149
|
-
deterministic before-tool rules over instruction-following.
|
|
150
|
-
|
|
151
|
-
---
|
|
152
|
-
|
|
153
|
-
## 6. Sources
|
|
154
|
-
|
|
155
|
-
- HumanLayer — "Skill Issue: Harness Engineering for Coding Agents" (Mar 2026)
|
|
156
|
-
- Anthropic Engineering — harness design for long-running agents
|
|
157
|
-
- OpenAI Engineering — "Harness engineering: leveraging Codex in an agent-first
|
|
158
|
-
world"
|
|
159
|
-
- ETH Zürich — agentfile study (138 agentfiles)
|
|
160
|
-
- Chroma — context rot research; LongCLI-Bench
|
|
161
|
-
- Repos in `resources/` (see method above): pi-steering-hooks, brood-box,
|
|
162
|
-
TokenWise, OpenSpec, Spartan, IM.codes, sourcebook, prpack, LoopTroop,
|
|
163
|
-
GolemBot, SwarmVault, iwe, onUI, agentify, Shep, ORCH, agenttrace, tokscale,
|
|
164
|
-
onwatch, WhereMyTokens, Kilo Code, Refact, codesight, Jctx, DeepSeek-Reasonix,
|
|
165
|
-
os-moda, SwarmClaw, Dorothy, Kagan, and the repos covered by the two prior
|
|
166
|
-
scan reports.
|
|
@@ -1,446 +0,0 @@
|
|
|
1
|
-
<!-- markdownlint-disable MD041 -->
|
|
2
|
-
|
|
3
|
-
> **Historical note:** This document uses the original product name *FreeBuff* in some sections because it references
|
|
4
|
-
external research and third-party projects from that period. The product is now **Savant-Code / Savant-Free**.
|
|
5
|
-
|
|
6
|
-
# **Architecting a Sustainable Free-Tier Inference Backend for a CLI Coding Agent**
|
|
7
|
-
|
|
8
|
-
The evolution of autonomous AI coding agents is currently constrained by a rigid economic dichotomy: developers must
|
|
9
|
-
either pay substantial monthly subscriptions for proprietary platforms (e.g., Cursor, GitHub Copilot, Claude Code) or
|
|
10
|
-
rely on open-source frameworks (e.g., Cline, Aider, Continue.dev) that require high-end local GPUs or "Bring Your Own
|
|
11
|
-
Key" (BYOK) API setups1. The emergence of tools like FreeBuff has proven the viability of a third path: a
|
|
12
|
-
zero-configuration, free-to-use CLI agent subsidized by a combination of targeted developer advertising and strategic
|
|
13
|
-
"data-for-compute" partnerships with major AI laboratories4.
|
|
14
|
-
Building a proprietary fork, such as Savant-Code, necessitates a highly resilient backend capable of orchestrating
|
|
15
|
-
thousands of concurrent agentic sessions. This infrastructure must proxy requests to diverse Large Language Model (LLM)
|
|
16
|
-
providers, seamlessly integrate multiple AI-native ad networks (Gravity, ZeroClick, Carbon), and enforce cryptographic
|
|
17
|
-
validation to prevent headless API exploitation4.
|
|
18
|
-
|
|
19
|
-
## **1\. Backend Architecture Deep Dive: Edge-Native Proxy Design**
|
|
20
|
-
|
|
21
|
-
Serving free inference to a massive global user base requires a backend architecture that minimizes persistent compute
|
|
22
|
-
costs while managing long-lived, stateful connections. Traditional containerized deployments (e.g., AWS ECS or
|
|
23
|
-
Kubernetes) introduce idle costs that erode the margins of an ad-subsidized model. Cloudflare Workers provides the ideal
|
|
24
|
-
serverless edge computing substrate, but standard HTTP proxying is insufficient for the continuous, bidirectional
|
|
25
|
-
streaming required by multi-turn AI agents.
|
|
26
|
-
|
|
27
|
-
### **1.1 Managing WebSocket Streaming on Cloudflare Workers**
|
|
28
|
-
|
|
29
|
-
CLI coding agents rely on real-time streaming to output planning, file scanning, and code generation steps9. Standard
|
|
30
|
-
reverse proxies often buffer Server-Sent Events (SSE) or terminate connections prematurely. For instance, Nginx defaults
|
|
31
|
-
to a 60-second read timeout, silently dropping connections during complex, long-running LLM reasoning phases10.
|
|
32
|
-
Cloudflare's edge network natively supports WebSocket upgrades, but it enforces a strict 100-second idle timeout10.
|
|
33
|
-
To maintain persistent connections for agentic loops without being disconnected by edge timeouts, the backend must
|
|
34
|
-
utilize **Cloudflare Durable Objects (DO)** configured as WebSocket servers. A single Durable Object instance
|
|
35
|
-
coordinates the state of a user's terminal session, maintaining the connection to the CLI client while waiting for
|
|
36
|
-
upstream responses from models like DeepSeek V4 Pro or Kimi K2.7 Code4.
|
|
37
|
-
However, running active Durable Objects continuously is cost-prohibitive. Billing accrues for the entire duration the
|
|
38
|
-
object remains in memory12. The architectural solution is the **WebSocket Hibernation API**. This API allows the Durable
|
|
39
|
-
Object to hibernate—removing it from active memory and halting billable duration (GB-s charges)—while keeping the
|
|
40
|
-
client's WebSocket connection alive at the network edge14.
|
|
41
|
-
When the upstream LLM provider returns a chunk of the response, the Durable Object is instantly re-initialized, its
|
|
42
|
-
webSocketMessage handler executes, it forwards the payload to the CLI, and it immediately returns to hibernation14. This
|
|
43
|
-
event-driven hibernation is the only mechanism that makes a free-tier WebSocket proxy economically viable at scale.
|
|
44
|
-
|
|
45
|
-
### **1.2 The Session Management State Machine**
|
|
46
|
-
|
|
47
|
-
A robust session management approach requires a tiered state tracking system utilizing Cloudflare's entire storage
|
|
48
|
-
ecosystem: KV, Durable Objects, and D1.
|
|
49
|
-
|
|
50
|
-
| Storage Layer | Purpose in Proxy Architecture | Performance Characteristics |
|
|
51
|
-
| :---- | :---- | :---- |
|
|
52
|
-
| **Cloudflare KV** | Geographic routing, IP rate limiting, and global token blacklisting. | High-speed global reads, eventual consistency for writes. Ideal for checking cf.country against the Full/Limited tier lists4. |
|
|
53
|
-
| **Durable Objects** | Active state machine for concurrent session tracking. | Strongly consistent, single-region execution. Ensures a user cannot exploit concurrency by opening multiple terminal instances simultaneously16. |
|
|
54
|
-
| **Cloudflare D1** | Asynchronous audit logging, token consumption metrics, and streak rewards. | Serverless SQLite. Used for analytics and reporting to ad networks and AI providers without blocking the critical execution path16. |
|
|
55
|
-
|
|
56
|
-
The Durable Object acts as a strict state machine, transitioning the session through specific phases:
|
|
57
|
-
|
|
58
|
-
* Queued: The user is waiting for upstream capacity (polled until active)8.
|
|
59
|
-
* Active: The session is currently provisioned and bound to a specific model.
|
|
60
|
-
* Superseded: The user has issued a new prompt, aborting the previous generation to save compute8.
|
|
61
|
-
* Ended: The session has expired or the task is complete.
|
|
62
|
-
* Disabled: No active session is required.
|
|
63
|
-
|
|
64
|
-
If a user attempts to request a model that violates their current state—for example, a session\_model\_mismatch where a
|
|
65
|
-
user requests a premium model while assigned to a limited-tier session—the Durable Object automatically ends the session
|
|
66
|
-
and attempts to recreate a valid one transparently8.
|
|
67
|
-
|
|
68
|
-
### **1.3 Upstream LLM Routing and Normalization**
|
|
69
|
-
|
|
70
|
-
The proxy must act as a universal translator. The CLI issues standard OpenAI-compatible /v1/chat/completions or
|
|
71
|
-
Anthropic-compatible /v1/messages requests. The proxy intercepts these payloads, resolves the requested model (e.g.,
|
|
72
|
-
translating kimi-k2.6 to moonshotai/kimi-k2.6), and routes the traffic to the corresponding provider8.
|
|
73
|
-
Critically, the proxy must perform real-time **Message Normalization**. Providers have distinct formatting rules; for
|
|
74
|
-
example, some Chinese models reject the developer role, requiring the proxy to map it to the system role before
|
|
75
|
-
forwarding8. The proxy must also resolve JSON schema definitions, normalizing $ref pointers within tool schemas for
|
|
76
|
-
providers that do not natively support deeply nested function-calling structures8.
|
|
77
|
-
|
|
78
|
-
### **1.4 Minimal Viable Backend for 1,000+ Concurrent Users**
|
|
79
|
-
|
|
80
|
-
To support 1,000+ concurrent users, the minimal viable backend must address Cloudflare's subrequest limits. The free
|
|
81
|
-
tier of Cloudflare Workers allows 50 subrequests per request, while the paid tier allows 1,00018. Because a single
|
|
82
|
-
multi-agent CLI loop (Planner, File Picker, Editor, Reviewer) can spawn dozens of LLM calls, the proxy must batch
|
|
83
|
-
messages efficiently9.
|
|
84
|
-
The minimal architecture requires:
|
|
85
|
-
|
|
86
|
-
> 1. A standard Worker to validate GitHub OAuth tokens and upgrade the connection to a WebSocket14.
|
|
87
|
-
> 2. A Hibernatable Durable Object to manage the WebSocket lifecycle and route requests to the LLM APIs14.
|
|
88
|
-
> 3. A request debounce mechanism (e.g., a 1.3-second global lock) to prevent automated looping scripts from triggering
|
|
89
|
-
429 Too Many Requests errors from upstream providers8.
|
|
90
|
-
|
|
91
|
-
## **2\. Provider Partnership Playbook: The Data-for-Compute Exchange**
|
|
92
|
-
|
|
93
|
-
The fundamental economic engine of the free-tier model relies on bartering developer workflow data for LLM inference
|
|
94
|
-
compute. Subsidizing peak inference costs (which can exceed $7,800 daily at high scale) strictly via ad revenue is
|
|
95
|
-
challenging4. The solution is negotiating partnerships with AI laboratories that are desperate for high-quality,
|
|
96
|
-
domain-specific training data.
|
|
97
|
-
|
|
98
|
-
### **2.1 The Value of Developer Telemetry**
|
|
99
|
-
|
|
100
|
-
Frontier model development is currently bottlenecked by a scarcity of high-quality reasoning data. While public
|
|
101
|
-
repositories (GitHub, StackOverflow) have been exhausted, the next leap in coding AI requires execution
|
|
102
|
-
traces—specifically, how humans and agents iteratively plan, edit, debug, and recover from compilation errors19. This
|
|
103
|
-
concept, often referred to as "Harness Engineering," focuses on designing agent workspaces where models can learn from
|
|
104
|
-
multi-turn interactions and environment feedback20.
|
|
105
|
-
Chinese AI providers—such as DeepSeek, Moonshot (Kimi), Zhipu (GLM), and MiniMax—are uniquely positioned in this market.
|
|
106
|
-
Facing geopolitical constraints on hardware accumulation, they rely on algorithmic efficiency, MoE (Mixture-of-Experts)
|
|
107
|
-
architectures, and superior data pipelines to compete with Western frontier models21. Evidence suggests that some of
|
|
108
|
-
these laboratories have aggressively distilled Western models (e.g., Claude) to capture reasoning pathways23. By
|
|
109
|
-
partnering with a CLI coding agent, these providers gain legal, direct access to proprietary, multi-turn developer
|
|
110
|
-
telemetry: bash execution traces, file edits, and error-correction loops.
|
|
111
|
-
|
|
112
|
-
### **2.2 Negotiating the Deal and Typical Terms**
|
|
113
|
-
|
|
114
|
-
When negotiating a "data-for-compute" deal with providers like DeepSeek or MiniMax, the CLI developer must position the
|
|
115
|
-
telemetry as a premium, exclusive asset.
|
|
116
|
-
**What they want in return:** Providers seek deep visibility into the agentic loop. They want anonymized prompt logs,
|
|
117
|
-
codebase context mapped by the File Picker agent, applied code diffs, and the terminal output of failed test runs4. They
|
|
118
|
-
analyze this data to fine-tune their base models, improving their performance on complex benchmarks like SWE-bench and
|
|
119
|
-
CursorBench20.
|
|
120
|
-
**Typical Terms and Governance:**
|
|
121
|
-
|
|
122
|
-
* **Perpetual Licensing:** Data policy surveys indicate that providers like Zhipu and Moonshot/Kimi often require
|
|
123
|
-
"perpetual licenses" to utilize the submitted telemetry for ongoing model training25.
|
|
124
|
-
* **Compute Subsidies:** In exchange for the data, the provider grants unrestricted, zero-cost API access for specific
|
|
125
|
-
models, or sets a compute threshold that scales with user volume4.
|
|
126
|
-
* **Minimum User Counts:** To provide statistically significant data volumes, providers typically look for a minimum
|
|
127
|
-
threshold of active users. A platform with 10,000 Daily Active Users (DAU) running 3 sessions a day generates millions
|
|
128
|
-
of structured coding tokens daily, which is highly attractive to data-hungry labs.
|
|
129
|
-
|
|
130
|
-
### **2.3 Western vs. Eastern Provider Programs**
|
|
131
|
-
|
|
132
|
-
The "data-for-compute" model contrasts sharply with Western provider programs. OpenAI and Anthropic generally offer
|
|
133
|
-
structured, time-limited startup credits (e.g., via Microsoft for Startups)4. While these credits bootstrap early
|
|
134
|
-
development, they eventually expire, forcing the developer into a standard SaaS billing model that is incompatible with
|
|
135
|
-
a permanently free consumer tool.
|
|
136
|
-
Conversely, partnering with Chinese open-weight innovators provides a permanent subsidy mechanism. The tradeoff is
|
|
137
|
-
stringent regulatory compliance. Transferring user data cross-border requires strict adherence to privacy frameworks.
|
|
138
|
-
The proxy must implement robust sanitization, stripping Personally Identifiable Information (PII), API keys, and
|
|
139
|
-
environment variables before routing payloads to subsidized providers. Explicit user opt-in is mandatory; users must
|
|
140
|
-
understand that utilizing the free tier permits their prompts to be used for AI training4.
|
|
141
|
-
|
|
142
|
-
## **3\. Ad Network Integration: Monetizing the CLI**
|
|
143
|
-
|
|
144
|
-
To cover infrastructural overhead and generate profit, the CLI must integrate context-aware advertising without
|
|
145
|
-
disrupting the developer experience. Traditional ad networks rely on browser cookies and DOM manipulation, making them
|
|
146
|
-
incompatible with terminal environments5. The backend must integrate specialized AI-native networks—Gravity, ZeroClick,
|
|
147
|
-
and Carbon—using a hybrid of server-side fetching and cryptographic client-side validation.
|
|
148
|
-
|
|
149
|
-
### **3.1 Integrating Gravity Ads**
|
|
150
|
-
|
|
151
|
-
Gravity Ads is an AI-native network designed to monetize LLM conversations by matching contextual intent to sponsored
|
|
152
|
-
suggestions28. For example, if a developer asks the CLI to "set up a serverless database," Gravity might return a native
|
|
153
|
-
text ad for PlanetScale or MongoDB6.
|
|
154
|
-
**Integration Mechanics:** Gravity is integrated entirely server-side to ensure zero added latency for the user. The
|
|
155
|
-
backend utilizes the @gravity-ai/api SDK (or standard REST calls)6. When the proxy receives a user prompt, it spawns an
|
|
156
|
-
asynchronous fetch request to Gravity in parallel with the LLM inference call.
|
|
157
|
-
|
|
158
|
-
JavaScript
|
|
159
|
-
// Conceptual flow, executed within the Cloudflare Worker
|
|
160
|
-
const adTask \= gravity.getAds(request, messages, \[{"placement": "cli\_terminal"}\]);
|
|
161
|
-
const llmStream \= fetchUpstreamLLM(messages);
|
|
162
|
-
const adResult \= await adTask;
|
|
163
|
-
// The ad is injected into the initial SSE response before the LLM tokens stream
|
|
164
|
-
|
|
165
|
-
Gravity requires the conversation context (the last 2-3 messages) to ensure high relevancy, filtering out
|
|
166
|
-
non-conversational roles like tool or function. The network pays on a CPM or CPC basis, with high-intent developer
|
|
167
|
-
audiences commanding premium CPMs.
|
|
168
|
-
|
|
169
|
-
### **3.2 Integrating ZeroClick**
|
|
170
|
-
|
|
171
|
-
ZeroClick focuses on agentic commerce, turning API services into agent-purchasable storefronts32. For a CLI tool,
|
|
172
|
-
ZeroClick functions as an offer marketplace, delivering contextual ads based on real-time user intent and continuously
|
|
173
|
-
learned preferences34.
|
|
174
|
-
**API Endpoints and Tracking Requirements:** Integrating ZeroClick requires a strict, two-step split architecture:
|
|
175
|
-
|
|
176
|
-
> 1. **Offer Retrieval (Server-Side):** The Cloudflare proxy issues a POST request to
|
|
177
|
-
https://zeroclick.dev/api/v2/offers. The request must include the Content-Type: application/json and x-zc-api-key
|
|
178
|
-
headers, passing a JSON body containing the method ("server"), the client's ipAddress, and the user's query7.
|
|
179
|
-
> 2. **Impression Tracking (Client-Side):** ZeroClick enforces rigorous tracking to prevent automated server scraping.
|
|
180
|
-
After the CLI renders the ad, the CLI itself must issue a POST request to https://zeroclick.dev/api/v2/impressions.
|
|
181
|
-
The JSON body must contain the ids of the rendered offers7.
|
|
182
|
-
|
|
183
|
-
*Critical Constraint:* Impression requests must originate from the end user's device, not the proxy server, and are
|
|
184
|
-
subject to IP-based rate limiting7. This split architecture introduces a massive vulnerability: if a user bypasses the
|
|
185
|
-
official CLI, the impression endpoint is never pinged, and revenue collapses.
|
|
186
|
-
|
|
187
|
-
### **3.3 Integrating Carbon Ads**
|
|
188
|
-
|
|
189
|
-
Carbon Ads is a veteran network (established in 2010 via BuySellAds) that curates native advertising for developers and
|
|
190
|
-
designers5. Unlike typical display networks, Carbon provides a single, unobtrusive text ad and strictly refuses to use
|
|
191
|
-
tracking cookies5.
|
|
192
|
-
Carbon provides a CLI-specific SDK that handles fetching, local caching, and formatting5. Crucially, the SDK
|
|
193
|
-
automatically suppresses ads in CI/CD pipelines or piped outputs (e.g., codebuff | grep) to avoid breaking developer
|
|
194
|
-
automation5. Carbon's CPMs are heavily dependent on geography; Tier 1 countries (US, UK, CA, EU) yield excellent
|
|
195
|
-
returns, while Tier 3 countries yield very little37. Therefore, Carbon should be prioritized for "Full Mode" tier users.
|
|
196
|
-
|
|
197
|
-
### **3.4 Realistic Fill Rates and CPMs**
|
|
198
|
-
|
|
199
|
-
For a CLI coding tool with 10,000 to 50,000 DAU, the blended monetization strategy yields substantial revenue:
|
|
200
|
-
|
|
201
|
-
* **Full Mode (Premium Geographies):** Combining Gravity's high-intent matching ($20-$30 CPM) with Carbon's established
|
|
202
|
-
developer demand ($2-$5 CPM) and ZeroClick's CPC conversions results in an effective blended CPM of approximately
|
|
203
|
-
$25.00 for Tier 1 users6.
|
|
204
|
-
* **Limited Mode (Global Geographies):** Traffic outside core markets suffers from low advertiser demand and lower fill
|
|
205
|
-
rates. The effective blended CPM for these regions typically drops to around $4.0037.
|
|
206
|
-
|
|
207
|
-
## **4\. Anti-Abuse and Validation: The Cryptographic Ad Chain**
|
|
208
|
-
|
|
209
|
-
The greatest threat to a proxy-based free inference model is headless exploitation. Projects like "Freebuff2API" are
|
|
210
|
-
explicitly designed to translate the backend's proprietary protocol back into standard OpenAI API endpoints38. These
|
|
211
|
-
tools strip identifiers (like cost\_mode), rotate stolen authentication tokens, and allow users to run massive automated
|
|
212
|
-
workloads (or connect local IDEs like Cursor) without ever rendering an ad in the terminal8.
|
|
213
|
-
To prevent the total collapse of the business model, the backend must mathematically guarantee that LLM compute is only
|
|
214
|
-
provisioned *after* an ad has been verifiably rendered to a human user. This requires a Cryptographic Ad Chain.
|
|
215
|
-
|
|
216
|
-
### **4.1 Implementing HMAC Signature Validation**
|
|
217
|
-
|
|
218
|
-
The proxy leverages the Web Crypto API, which is natively supported on Cloudflare Workers, to create an unforgeable
|
|
219
|
-
state machine39. The flow operates as follows:
|
|
220
|
-
|
|
221
|
-
> 1. **Session Initiation & Ad Fetch:** The user initiates a CLI command. The proxy fetches an ad payload from Gravity
|
|
222
|
-
or Carbon and generates a unique session\_id.
|
|
223
|
-
> 2. **Token Minting:** The Cloudflare Worker imports a master secret key using crypto.subtle.importKey configured for
|
|
224
|
-
HMAC and SHA-25639. The Worker creates a concatenated message payload: version:session\_id:ad\_id:expiresAt. It then
|
|
225
|
-
signs this payload using crypto.subtle.sign, encodes the binary buffer using base64UrlEncode, and returns the ad copy
|
|
226
|
-
and this cryptographic token to the CLI41.
|
|
227
|
-
> 3. **Client-Side Verification:** The CLI renders the text ad in the terminal. If ZeroClick is used, the CLI executes
|
|
228
|
-
the client-side impression tracking ping7.
|
|
229
|
-
> 4. **Inference Request:** The CLI sends the user's prompt to the proxy, placing the base64UrlEncode HMAC token in the
|
|
230
|
-
authorization header41.
|
|
231
|
-
> 5. **Token Verification:** The Worker intercepts the prompt. It first checks the expiresAt timestamp to ensure the
|
|
232
|
-
token hasn't timed out. It then decodes the token and validates the signature using crypto.subtle.verify41.
|
|
233
|
-
|
|
234
|
-
*Security Imperative:* The validation must rely on crypto.subtle.verify rather than a standard JavaScript string
|
|
235
|
-
comparison (token \=== expected). Standard string comparisons bail out on the first mismatched character, creating a
|
|
236
|
-
timing side-channel attack that allows malicious actors to guess the HMAC secret byte by byte41.
|
|
237
|
-
If the token is valid, the Worker opens the WebSocket and streams the LLM response. If invalid, the request is dropped.
|
|
238
|
-
Because third-party headless proxies (like Freebuff2API) refuse to render ads, they cannot complete the ad-fetch step to
|
|
239
|
-
acquire a valid HMAC token, effectively neutralizing the exploit8.
|
|
240
|
-
|
|
241
|
-
### **4.2 Defense-in-Depth Heuristics**
|
|
242
|
-
|
|
243
|
-
Cryptography alone cannot stop sophisticated scrapers that attempt to simulate the ad chain. The proxy must enforce a
|
|
244
|
-
minimal anti-abuse system:
|
|
245
|
-
|
|
246
|
-
* **HAR-Style Fingerprinting:** The proxy must inspect incoming HTTP headers (Accept-Encoding, Connection, Host,
|
|
247
|
-
User-Agent) to ensure they exactly match the signature of the official Node.js/Bun CLI fetch implementation8.
|
|
248
|
-
* **SOCKS5 Proxy Blocking:** Attackers frequently use tools like Cloudflare WARP (Warp Plus Manager) or SOCKS5 proxies
|
|
249
|
-
to bypass rate limits on limited-tier sessions8. The backend KV store should cross-reference incoming IPs against
|
|
250
|
-
known VPN/proxy exit nodes and enforce aggressive CAPTCHA or token rotation penalties8.
|
|
251
|
-
* **Streak and Rate Limiting:** Implement a global debounce (e.g., a 1.3-second minimum gap between requests) and track
|
|
252
|
-
daily usage streaks in D1 to dynamically adjust rate limits for trusted vs. untrusted accounts8.
|
|
253
|
-
|
|
254
|
-
## **5\. Unit Economics at Scale**
|
|
255
|
-
|
|
256
|
-
To determine the viability of the ad-subsidized, data-bartered model, we must model the monthly unit economics at
|
|
257
|
-
10,000, 50,000, and 170,000 registered users.
|
|
258
|
-
|
|
259
|
-
### **5.1 Cost and Revenue Assumptions**
|
|
260
|
-
|
|
261
|
-
The financial modeling relies on several distinct behavioral and infrastructural assumptions characteristic of developer
|
|
262
|
-
tools:
|
|
263
|
-
|
|
264
|
-
* **User Engagement:** Monthly Active Users (MAU) typically represent 30% of registered users. Daily Active Users (DAU)
|
|
265
|
-
represent 25% of MAU (effectively 7.5% of total registrations). The average DAU initiates 3 multi-turn sessions per
|
|
266
|
-
day.
|
|
267
|
-
* **Token Consumption and Prompt Caching:** An average agentic session requires significant context gathering, consuming
|
|
268
|
-
roughly 150,000 input tokens and 10,000 output tokens.
|
|
269
|
-
* *Flash Models (Limited Tier):* Baseline input cost is \~$0.15 per 1M tokens. Utilizing prompt caching yields an
|
|
270
|
-
estimated 80% hit rate (cached tokens cost \~$0.015/1M). The effective blended input cost is $0.042 per 1M tokens.
|
|
271
|
-
Total cost per session: \~$0.0093.
|
|
272
|
-
* *Premium Models (Full Tier):* Baseline input cost is \~$1.00 per 1M tokens. With an 80% cache hit rate, the
|
|
273
|
-
effective blended input cost is $0.28 per 1M tokens. Total cost per session: \~$0.062.
|
|
274
|
-
* **Geographic Distribution:** 30% of traffic originates from high-CPM countries (Full Mode, using Premium models). 70%
|
|
275
|
-
originates from the rest of the world (Limited Mode, using Flash models)4.
|
|
276
|
-
* **Ad Impressions:** Each multi-turn session generates an average of 12 ad impressions (rendered between agentic
|
|
277
|
-
reasoning steps).
|
|
278
|
-
* **Blended CPMs:** Full Mode yields a blended $25.00 CPM (Gravity \+ Carbon \+ ZeroClick). Limited Mode yields a $4.00
|
|
279
|
-
CPM6.
|
|
280
|
-
|
|
281
|
-
### **5.2 Break-Even Analysis**
|
|
282
|
-
|
|
283
|
-
The break-even ad impression volume per inference session is highly favorable.
|
|
284
|
-
|
|
285
|
-
* In **Full Mode**, the inference cost per session is $0.062. At a $25.00 CPM, each ad impression generates $0.025.
|
|
286
|
-
Therefore, a session reaches break-even after just **2.5 ad impressions**.
|
|
287
|
-
* In **Limited Mode**, the inference cost is $0.0093. At a $4.00 CPM, each impression generates $0.004. A session
|
|
288
|
-
reaches break-even after **2.3 ad impressions**.
|
|
289
|
-
|
|
290
|
-
Because the CLI renders an average of 12 impressions per session, the model is inherently profitable *even without* the
|
|
291
|
-
data-for-compute subsidy.
|
|
292
|
-
|
|
293
|
-
### **5.3 Monthly Financial Projections**
|
|
294
|
-
|
|
295
|
-
The following table calculates the monthly unit economics across the three scale points.
|
|
296
|
-
|
|
297
|
-
* **Net Profit (No Subsidy):** Assumes the backend pays raw API costs out of pocket to the providers.
|
|
298
|
-
* **Net Profit (With Subsidy):** Assumes a successful data-for-compute agreement where providers absorb 100% of LLM
|
|
299
|
-
inference costs.
|
|
300
|
-
|
|
301
|
-
| Metric | Startup Phase | Growth Phase | Scale Phase |
|
|
302
|
-
| :---- | :---- | :---- | :---- |
|
|
303
|
-
| **Registered Users** | 10,000 | 50,000 | 170,000 |
|
|
304
|
-
| **Monthly Active Users (MAU)** | 3,000 | 15,000 | 51,000 |
|
|
305
|
-
| **Daily Active Users (DAU)** | 750 | 3,750 | 12,750 |
|
|
306
|
-
| **Daily Sessions** | 2,250 | 11,250 | 38,250 |
|
|
307
|
-
| **Inference Cost / Month (Unsubsidized)** | $1,694.93 | $8,474.62 | $28,813.72 |
|
|
308
|
-
| **Cloudflare Infra Cost / Month** | $5.08 | $5.41 | $6.38 |
|
|
309
|
-
| **Gross Ad Revenue / Month (Gravity \+ ZeroClick \+ Carbon)** | $8,343.00 | $41,715.00 | $141,831.00 |
|
|
310
|
-
| **Net Profit / Month (No Subsidy)** | **$6,642.99** | **$33,234.97** | **$113,010.90** |
|
|
311
|
-
| **Net Profit / Month (With Subsidy)** | **$8,337.92** | **$41,709.60** | **$141,824.62** |
|
|
312
|
-
|
|
313
|
-
At the 10,000 registered user mark, the system generates over 2.5 million structured coding tokens per day. This is the
|
|
314
|
-
inflection point where the sheer volume of high-quality telemetry becomes statistically significant for LLM training,
|
|
315
|
-
making the platform highly attractive to Chinese providers seeking to negotiate data-for-compute contracts.
|
|
316
|
-
|
|
317
|
-
## **6\. Competitive Landscape and Maturity**
|
|
318
|
-
|
|
319
|
-
The AI developer tools ecosystem is currently divided between premium proprietary subscriptions and highly fragmented
|
|
320
|
-
open-source frameworks.
|
|
321
|
-
|
|
322
|
-
### **6.1 The Open-Source vs. Proprietary Divide**
|
|
323
|
-
|
|
324
|
-
Commercial platforms such as Cursor, GitHub Copilot, and Claude Code operate strictly on subscription models, typically
|
|
325
|
-
ranging from $20 to $39 per month, or they meter usage heavily2. While they offer polished user experiences, they lock
|
|
326
|
-
developers into specific proprietary ecosystems.
|
|
327
|
-
Conversely, the open-source community has rallied around frameworks like Continue.dev, Aider, and Cline1. These tools
|
|
328
|
-
are highly capable and model-agnostic, supporting advanced features like the Model Context Protocol (MCP)2. However,
|
|
329
|
-
**none of these open-source alternatives provide a free, centralized inference backend**. Users are forced to either
|
|
330
|
-
supply their own API keys (shifting the cost burden directly to the developer) or run local models via Ollama or LM
|
|
331
|
-
Studio2. Local execution demands expensive GPU hardware (e.g., RTX 3090, Macs with massive Unified Memory), which
|
|
332
|
-
isolates developers in emerging markets or those working on low-power machines44.
|
|
333
|
-
Savant-Code, utilizing the FreeBuff architecture, occupies a unique position: it provides cloud-based,
|
|
334
|
-
zero-configuration, frontier-level AI coding that is genuinely free to the end-user, subsidized seamlessly in the
|
|
335
|
-
background4.
|
|
336
|
-
|
|
337
|
-
### **6.2 Maturity of AI-Native Ad Networks**
|
|
338
|
-
|
|
339
|
-
The success of this model relies heavily on the maturity of the underlying ad networks.
|
|
340
|
-
|
|
341
|
-
* **Carbon Ads:** Extremely mature. Backed by BuySellAds and operating since 2010, Carbon is the gold standard for
|
|
342
|
-
developer advertising, offering reliable payouts, robust CLI SDKs, and deep advertiser demand5.
|
|
343
|
-
* **Gravity Ads:** Emerging but highly capable. Gravity has successfully built SDKs specifically tailored for streaming
|
|
344
|
-
LLM responses, allowing publishers to monetize conversational intent without introducing latency6.
|
|
345
|
-
* **ZeroClick:** The newest entrant, focused exclusively on the burgeoning field of agentic commerce and
|
|
346
|
-
machine-to-machine payments32. While their API endpoints and tracking requirements are strict, their focus on
|
|
347
|
-
providing agents with purchasing power represents the next frontier of monetization32.
|
|
348
|
-
|
|
349
|
-
## **Conclusion**
|
|
350
|
-
|
|
351
|
-
Architecting a sustainable free-tier inference backend for a CLI coding agent requires neutralizing the exorbitant costs
|
|
352
|
-
of LLM inference through a synthesis of edge computing, cryptographic security, and hybrid monetization.
|
|
353
|
-
By leveraging Cloudflare Workers and Hibernatable Durable Objects, the proxy can manage stateful, multi-turn WebSocket
|
|
354
|
-
streams for thousands of concurrent users with negligible infrastructure costs. Integrating AI-native advertising
|
|
355
|
-
networks (Gravity, ZeroClick, Carbon) directly into the agentic loop generates immediate positive unit economics.
|
|
356
|
-
However, this revenue is only protected by enforcing a rigorous Cryptographic Ad Chain using HMAC-SHA256 signatures,
|
|
357
|
-
mathematically guaranteeing that headless proxies cannot bleed compute without rendering ads.
|
|
358
|
-
Ultimately, true scale is unlocked not just through advertising, but by weaponizing the platform's developer telemetry.
|
|
359
|
-
By bartering execution traces, file edits, and debugging loops with data-hungry global AI providers, the platform
|
|
360
|
-
transforms its largest expense—inference compute—into a perpetually subsidized asset, ensuring the CLI remains powerful,
|
|
361
|
-
fast, and entirely free.
|
|
362
|
-
|
|
363
|
-
### **Works cited**
|
|
364
|
-
|
|
365
|
-
> 1. Pricing \- Cline AI Coding Agent, [https://cline.bot/pricing](https://cline.bot/pricing)
|
|
366
|
-
> 2. What Is Cline? The Open-Source AI Coding Tool That Runs in VS Code \- Developers Digest,
|
|
367
|
-
[https://www.developersdigest.tech/blog/what-is-cline-open-source-ai-coding-tool](https://www.developersdigest.tech/blog/what-is-cline-open-source-ai-coding-tool)
|
|
368
|
-
> 3. Continue.dev \+ Ollama Setup 2026: Free Copilot, Full config.yaml | Local AI Master,
|
|
369
|
-
[https://localaimaster.com/blog/continue-dev-ollama-setup](https://localaimaster.com/blog/continue-dev-ollama-setup)
|
|
370
|
-
> 4. CodebuffAI/codebuff: Generate code from the terminal\! \- GitHub,
|
|
371
|
-
[https://github.com/CodebuffAI/codebuff](https://github.com/CodebuffAI/codebuff)
|
|
372
|
-
> 5. Monetize Your CLI Tool with Carbon Ads, [https://www.carbonads.net/cli](https://www.carbonads.net/cli)
|
|
373
|
-
> 6. For AI Platforms | Gravity, [https://www.trygravity.ai/ai-platforms](https://www.trygravity.ai/ai-platforms)
|
|
374
|
-
> 7. Overview \- ZeroClick,
|
|
375
|
-
[https://developer.zeroclick.ai/docs/integration-guide](https://developer.zeroclick.ai/docs/integration-guide)
|
|
376
|
-
> 8. notBlubbll/free-buff-lol \- GitHub,
|
|
377
|
-
[https://github.com/notBlubbll/free-buff-lol](https://github.com/notBlubbll/free-buff-lol)
|
|
378
|
-
> 9. syntax-syndicate/codebuff-v0: Generate code from the terminal\! \- GitHub,
|
|
379
|
-
[https://github.com/syntax-syndicate/codebuff-v0](https://github.com/syntax-syndicate/codebuff-v0)
|
|
380
|
-
> 10. SSE vs WebSockets vs gRPC Streaming for LLM Apps: The Protocol Decision That Bites You Later \- TianPan.co,
|
|
381
|
-
[https://tianpan.co/blog/2026-04-19-sse-websockets-grpc-streaming-llm-applications](https://tianpan.co/blog/2026-04-19-sse-websockets-grpc-streaming-llm-applications)
|
|
382
|
-
> 11. Cloudflare WebSockets: CDN, Workers & Durable Objects,
|
|
383
|
-
[https://websocket.org/guides/infrastructure/cloudflare/](https://websocket.org/guides/infrastructure/cloudflare/)
|
|
384
|
-
> 12. A Workers optimization that reduces your bill | The Cloudflare Blog,
|
|
385
|
-
[https://blog.cloudflare.com/workers-optimization-reduces-your-bill/](https://blog.cloudflare.com/workers-optimization-reduces-your-bill/)
|
|
386
|
-
> 13. tRPC over websockets on Cloudflare Workers Durable Objects \#4400 \- GitHub,
|
|
387
|
-
[https://github.com/trpc/trpc/discussions/4400](https://github.com/trpc/trpc/discussions/4400)
|
|
388
|
-
> 14. Use WebSockets · Cloudflare Durable Objects docs,
|
|
389
|
-
[https://developers.cloudflare.com/durable-objects/best-practices/websockets/](https://developers.cloudflare.com/durable-objects/best-practices/websockets/)
|
|
390
|
-
> 15. Durable Object State \- Cloudflare Docs,
|
|
391
|
-
[https://developers.cloudflare.com/durable-objects/api/state/](https://developers.cloudflare.com/durable-objects/api/state/)
|
|
392
|
-
> 16. Cloudflare Durable Objects \- Stateful Serverless Functions,
|
|
393
|
-
[https://www.cloudflare.com/products/durable-objects/](https://www.cloudflare.com/products/durable-objects/)
|
|
394
|
-
> 17. Introducing WebSockets Support in Cloudflare Workers,
|
|
395
|
-
[https://blog.cloudflare.com/introducing-websockets-in-workers/](https://blog.cloudflare.com/introducing-websockets-in-workers/)
|
|
396
|
-
> 18. Transport modes \- Sandbox SDK \- Cloudflare Docs,
|
|
397
|
-
[https://developers.cloudflare.com/sandbox/configuration/transport/](https://developers.cloudflare.com/sandbox/configuration/transport/)
|
|
398
|
-
> 19. DeepSh\*t: Exposing the Security Risks of DeepSeek-R1 \- HiddenLayer,
|
|
399
|
-
[https://www.hiddenlayer.com/research/deepsht-exposing-the-security-risks-of-deepseek-r1](https://www.hiddenlayer.com/research/deepsht-exposing-the-security-risks-of-deepseek-r1)
|
|
400
|
-
> 20. Superlinear Academy · Deep News \- Computing Life,
|
|
401
|
-
[https://yage.ai/share/?lang=all\&page=29](https://yage.ai/share/?lang=all&page=29)
|
|
402
|
-
> 21. AI Models | NVIDIA Developer, [https://developer.nvidia.com/ai-models](https://developer.nvidia.com/ai-models)
|
|
403
|
-
> 22. Deep News — Superlinear Academy \- AI Builders 2027, [https://grapeot.me/share/](https://grapeot.me/share/)
|
|
404
|
-
> 23. Anthropic just dropped evidence that DeepSeek, Moonshot and MiniMax were mass-distilling Claude. 24K fake
|
|
405
|
-
accounts, 16M+ exchanges. : r/ClaudeAI \- Reddit,
|
|
406
|
-
[https://www.reddit.com/r/ClaudeAI/comments/1rd1j8u/anthropic\_just\_dropped\_evidence\_that\_deepseek/](https://www.reddit.com/r/ClaudeAI/comments/1rd1j8u/anthropic_just_dropped_evidence_that_deepseek/)
|
|
407
|
-
> 24. codebuff — Commands, Examples & Usage Guide \- Skywork,
|
|
408
|
-
[https://skywork.ai/clihub/keywords/codebuff.html](https://skywork.ai/clihub/keywords/codebuff.html)
|
|
409
|
-
> 25. ai-coding-data-policy-survey-en-20260309,
|
|
410
|
-
[https://yage.ai/share/ai-coding-data-policy-survey-en-20260309.html](https://yage.ai/share/ai-coding-data-policy-survey-en-20260309.html)
|
|
411
|
-
> 26. DeepSeek Security, Privacy, and Governance: Hidden Risks in Open-Source AI \- Theori,
|
|
412
|
-
[https://theori.io/blog/deepseek-security-privacy-and-governance-hidden-risks-in-open-source-ai](https://theori.io/blog/deepseek-security-privacy-and-governance-hidden-risks-in-open-source-ai)
|
|
413
|
-
> 27. What Makes EthicalAds a Great Carbon Ads Alternative,
|
|
414
|
-
[https://www.ethicalads.io/alternative-to-carbon-ads/](https://www.ethicalads.io/alternative-to-carbon-ads/)
|
|
415
|
-
> 28. Gravity | The Ad Network for AI, [https://www.trygravity.ai/](https://www.trygravity.ai/)
|
|
416
|
-
> 29. Publisher Spotlight: How Freebuff Funds Free AI Coding | Carbon Ads,
|
|
417
|
-
[https://www.carbonads.net/blog/freebuff-publisher-spotlight](https://www.carbonads.net/blog/freebuff-publisher-spotlight)
|
|
418
|
-
> 30. gravity-sdk \- PyPI, [https://pypi.org/project/gravity-sdk/](https://pypi.org/project/gravity-sdk/)
|
|
419
|
-
> 31. AI Platform Monetization Help \- Gravity,
|
|
420
|
-
[https://www.trygravity.ai/help/ai-platforms](https://www.trygravity.ai/help/ai-platforms)
|
|
421
|
-
> 32. ZeroClick \- Sell Your Product to AI Agents, [https://www.zeroclick.ai/](https://www.zeroclick.ai/)
|
|
422
|
-
> 33. It's time to sell to AI agents \- ZeroClick,
|
|
423
|
-
[https://www.zeroclick.ai/its-time-to-sell-to-agents](https://www.zeroclick.ai/its-time-to-sell-to-agents)
|
|
424
|
-
> 34. Overview \- ZeroClick, [https://developer.zeroclick.ai/docs](https://developer.zeroclick.ai/docs)
|
|
425
|
-
> 35. Carbon Ads Media Kit \- Slides Design \- BuySellAds,
|
|
426
|
-
[https://www.buysellads.com/hubfs/Carbon%20Ads%20Media%20Kit.pdf](https://www.buysellads.com/hubfs/Carbon%20Ads%20Media%20Kit.pdf)
|
|
427
|
-
> 36. GitHub \- buysellads/carbon-sdk · GitHub,
|
|
428
|
-
[https://github.com/buysellads/carbon-sdk](https://github.com/buysellads/carbon-sdk)
|
|
429
|
-
> 37. What CTR Actually Looks Like for Developer Ads | Carbon Ads,
|
|
430
|
-
[https://www.carbonads.net/blog/developer-ad-ctr-benchmarks](https://www.carbonads.net/blog/developer-ad-ctr-benchmarks)
|
|
431
|
-
> 38. GitHub \- Quorinex/Freebuff2API: OpenAI-compatible Freebuff proxy with dynamic free-agent tracking, token
|
|
432
|
-
rotation, and ready-to-use Docker deployment.,
|
|
433
|
-
[https://github.com/Quorinex/Freebuff2API](https://github.com/Quorinex/Freebuff2API)
|
|
434
|
-
> 39. Sign and Verify Messages with HMAC Using Web Crypto \- Brady Joslin,
|
|
435
|
-
[https://bradyjoslin.com/posts/webcrypto-signing/](https://bradyjoslin.com/posts/webcrypto-signing/)
|
|
436
|
-
> 40. Web Crypto · Cloudflare Workers docs,
|
|
437
|
-
[https://developers.cloudflare.com/workers/runtime-apis/web-crypto/](https://developers.cloudflare.com/workers/runtime-apis/web-crypto/)
|
|
438
|
-
> 41. HMAC-signed URLs on Cloudflare Workers \- Flavio Copes,
|
|
439
|
-
[https://flaviocopes.com/hmac-signed-urls-cloudflare-workers/](https://flaviocopes.com/hmac-signed-urls-cloudflare-workers/)
|
|
440
|
-
> 42. Workers Best Practices \- Cloudflare Docs,
|
|
441
|
-
[https://developers.cloudflare.com/workers/best-practices/workers-best-practices/](https://developers.cloudflare.com/workers/best-practices/workers-best-practices/)
|
|
442
|
-
> 43. Web Crypto \- Zuplo Docs,
|
|
443
|
-
[https://zuplo.com/docs/programmable-api/web-crypto-apis](https://zuplo.com/docs/programmable-api/web-crypto-apis)
|
|
444
|
-
> 44. Continue.dev AI Coding | Guides \- Clore.ai,
|
|
445
|
-
[https://docs.clore.ai/guides/ai-platforms-and-agents/continue-dev](https://docs.clore.ai/guides/ai-platforms-and-agents/continue-dev)
|
|
446
|
-
> 45. Freebuff — the free coding agent (free Claude Code, Codex, Cursor & Lovable alternative), [https://freebuff.com/](https://freebuff.com/)
|