@ikarmic/forge-core 4.5.0 → 5.0.0
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/LICENSE +44 -21
- package/README.md +1 -1
- package/dist/agent/agent.d.ts +0 -1
- package/dist/agent/agent.js +20 -1
- package/dist/agent/architect.d.ts +0 -1
- package/dist/agent/architect.js +0 -1
- package/dist/agent/cache-hints.d.ts +0 -1
- package/dist/agent/cache-hints.js +0 -1
- package/dist/agent/cost-router.d.ts +0 -1
- package/dist/agent/cost-router.js +0 -1
- package/dist/agent/enhance-prompt.d.ts +7 -0
- package/dist/agent/enhance-prompt.js +30 -0
- package/dist/agent/index.d.ts +0 -1
- package/dist/agent/index.js +0 -1
- package/dist/agent/loop-guard.d.ts +21 -0
- package/dist/agent/loop-guard.js +41 -0
- package/dist/agent/prompts.d.ts +0 -1
- package/dist/agent/prompts.js +0 -1
- package/dist/agent/think-tags.d.ts +0 -1
- package/dist/agent/think-tags.js +0 -1
- package/dist/agent/verify.d.ts +0 -1
- package/dist/agent/verify.js +0 -1
- package/dist/ai-comments/index.d.ts +0 -1
- package/dist/ai-comments/index.js +0 -1
- package/dist/attachments.d.ts +0 -1
- package/dist/attachments.js +0 -1
- package/dist/browser/cdp.d.ts +0 -1
- package/dist/browser/cdp.js +0 -1
- package/dist/browser/chrome.d.ts +0 -1
- package/dist/browser/chrome.js +0 -1
- package/dist/browser/session.d.ts +0 -1
- package/dist/browser/session.js +0 -1
- package/dist/checkpoints/index.d.ts +0 -1
- package/dist/checkpoints/index.js +0 -1
- package/dist/checkpoints/store.d.ts +0 -1
- package/dist/checkpoints/store.js +0 -1
- package/dist/checkpoints/types.d.ts +0 -1
- package/dist/checkpoints/types.js +0 -1
- package/dist/code-index/builder.d.ts +0 -1
- package/dist/code-index/builder.js +0 -1
- package/dist/code-index/index-store.d.ts +0 -1
- package/dist/code-index/index-store.js +0 -1
- package/dist/code-index/parser.d.ts +0 -1
- package/dist/code-index/parser.js +0 -1
- package/dist/code-index/types.d.ts +0 -1
- package/dist/code-index/types.js +0 -1
- package/dist/commands/custom-commands.d.ts +0 -1
- package/dist/commands/custom-commands.js +0 -1
- package/dist/config-file.d.ts +4 -1
- package/dist/config-file.js +0 -1
- package/dist/config.d.ts +0 -1
- package/dist/config.js +0 -1
- package/dist/context/compaction.d.ts +0 -1
- package/dist/context/compaction.js +6 -2
- package/dist/context/mask.d.ts +0 -1
- package/dist/context/mask.js +0 -1
- package/dist/credentials/index.d.ts +0 -1
- package/dist/credentials/index.js +0 -1
- package/dist/credentials/types.d.ts +0 -1
- package/dist/credentials/types.js +0 -1
- package/dist/diff/index.d.ts +0 -1
- package/dist/diff/index.js +0 -1
- package/dist/diff/unified-diff.d.ts +0 -1
- package/dist/diff/unified-diff.js +0 -1
- package/dist/git/auto-commit.d.ts +1 -2
- package/dist/git/auto-commit.js +3 -3
- package/dist/git/index.d.ts +0 -1
- package/dist/git/index.js +0 -1
- package/dist/github/github-tools.d.ts +0 -1
- package/dist/github/github-tools.js +0 -1
- package/dist/hooks/agent-runner.d.ts +0 -1
- package/dist/hooks/agent-runner.js +0 -1
- package/dist/hooks/bus.d.ts +0 -1
- package/dist/hooks/bus.js +0 -1
- package/dist/hooks/config.d.ts +0 -1
- package/dist/hooks/config.js +0 -1
- package/dist/hooks/events.d.ts +0 -1
- package/dist/hooks/events.js +0 -1
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/index.js +0 -1
- package/dist/hooks/loader.d.ts +0 -1
- package/dist/hooks/loader.js +0 -1
- package/dist/hooks/runner.d.ts +0 -1
- package/dist/hooks/runner.js +0 -1
- package/dist/hooks/watch-coalescer.d.ts +0 -1
- package/dist/hooks/watch-coalescer.js +0 -1
- package/dist/hooks/watch-ignore.d.ts +0 -1
- package/dist/hooks/watch-ignore.js +0 -1
- package/dist/hooks/watcher.d.ts +0 -1
- package/dist/hooks/watcher.js +0 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.js +4 -2
- package/dist/lazy-model.d.ts +0 -1
- package/dist/lazy-model.js +0 -1
- package/dist/lint/auto-lint.d.ts +0 -1
- package/dist/lint/auto-lint.js +0 -1
- package/dist/lint/index.d.ts +0 -1
- package/dist/lint/index.js +0 -1
- package/dist/lsp/client.d.ts +0 -1
- package/dist/lsp/client.js +0 -1
- package/dist/lsp/diagnostics.d.ts +0 -1
- package/dist/lsp/diagnostics.js +0 -1
- package/dist/lsp/index.d.ts +0 -1
- package/dist/lsp/index.js +0 -1
- package/dist/mcp/catalog.d.ts +0 -1
- package/dist/mcp/catalog.js +0 -1
- package/dist/mcp/index.d.ts +0 -1
- package/dist/mcp/index.js +0 -1
- package/dist/mcp/json-schema-to-zod.d.ts +0 -1
- package/dist/mcp/json-schema-to-zod.js +0 -1
- package/dist/mcp/manager.d.ts +0 -1
- package/dist/mcp/manager.js +0 -1
- package/dist/mcp/marketplace-types.d.ts +0 -1
- package/dist/mcp/marketplace-types.js +0 -1
- package/dist/mcp/marketplace.d.ts +0 -1
- package/dist/mcp/marketplace.js +0 -1
- package/dist/mcp/mcp-client.d.ts +0 -1
- package/dist/mcp/mcp-client.js +0 -1
- package/dist/mcp/mcp-config.d.ts +0 -1
- package/dist/mcp/mcp-config.js +0 -1
- package/dist/mcp/registry.d.ts +0 -1
- package/dist/mcp/registry.js +0 -1
- package/dist/memory/memory-store.d.ts +0 -1
- package/dist/memory/memory-store.js +0 -1
- package/dist/memory/rank.d.ts +0 -1
- package/dist/memory/rank.js +0 -1
- package/dist/memory/stale.d.ts +0 -1
- package/dist/memory/stale.js +0 -1
- package/dist/model-alias.d.ts +0 -1
- package/dist/model-alias.js +0 -1
- package/dist/model-catalog.d.ts +0 -1
- package/dist/model-catalog.js +0 -1
- package/dist/model-list.d.ts +0 -1
- package/dist/model-list.js +0 -1
- package/dist/orchestrator/board-tools.d.ts +0 -1
- package/dist/orchestrator/board-tools.js +0 -1
- package/dist/orchestrator/board.d.ts +0 -1
- package/dist/orchestrator/board.js +0 -1
- package/dist/orchestrator/index.d.ts +0 -1
- package/dist/orchestrator/index.js +0 -1
- package/dist/orchestrator/orchestrator.d.ts +0 -1
- package/dist/orchestrator/orchestrator.js +0 -1
- package/dist/orchestrator/router.d.ts +0 -1
- package/dist/orchestrator/router.js +0 -1
- package/dist/orchestrator/specialists-registry.d.ts +0 -1
- package/dist/orchestrator/specialists-registry.js +0 -1
- package/dist/orchestrator/specialists.d.ts +0 -1
- package/dist/orchestrator/specialists.js +0 -1
- package/dist/orchestrator/types.d.ts +0 -1
- package/dist/orchestrator/types.js +0 -1
- package/dist/plugins/index.d.ts +0 -1
- package/dist/plugins/index.js +0 -1
- package/dist/plugins/install.d.ts +0 -1
- package/dist/plugins/install.js +0 -1
- package/dist/plugins/loader.d.ts +0 -1
- package/dist/plugins/loader.js +0 -1
- package/dist/policy/audit.d.ts +0 -1
- package/dist/policy/audit.js +0 -1
- package/dist/policy/policy.d.ts +0 -1
- package/dist/policy/policy.js +0 -1
- package/dist/policy/proxy.d.ts +0 -1
- package/dist/policy/proxy.js +0 -1
- package/dist/pricing.d.ts +0 -1
- package/dist/pricing.js +0 -1
- package/dist/providers.d.ts +0 -1
- package/dist/providers.js +0 -1
- package/dist/repomap/index.d.ts +0 -1
- package/dist/repomap/index.js +0 -1
- package/dist/repomap/repo-map.d.ts +0 -1
- package/dist/repomap/repo-map.js +0 -1
- package/dist/semantic/chunker.d.ts +0 -1
- package/dist/semantic/chunker.js +0 -1
- package/dist/semantic/embedder.d.ts +0 -1
- package/dist/semantic/embedder.js +0 -1
- package/dist/semantic/semantic-index.d.ts +0 -1
- package/dist/semantic/semantic-index.js +0 -1
- package/dist/semantic/vector-store.d.ts +0 -1
- package/dist/semantic/vector-store.js +0 -1
- package/dist/sessions/index.d.ts +1 -1
- package/dist/sessions/index.js +1 -1
- package/dist/sessions/prune.d.ts +23 -0
- package/dist/sessions/prune.js +35 -0
- package/dist/sessions/search.d.ts +0 -1
- package/dist/sessions/search.js +0 -1
- package/dist/sessions/session-export.d.ts +0 -1
- package/dist/sessions/session-export.js +0 -1
- package/dist/sessions/session-store.d.ts +0 -1
- package/dist/sessions/session-store.js +0 -1
- package/dist/sessions/watch.d.ts +0 -1
- package/dist/sessions/watch.js +0 -1
- package/dist/settings-export.d.ts +0 -1
- package/dist/settings-export.js +0 -1
- package/dist/skills/activator.d.ts +0 -1
- package/dist/skills/activator.js +0 -1
- package/dist/skills/index.d.ts +0 -1
- package/dist/skills/index.js +0 -1
- package/dist/skills/loader.d.ts +0 -1
- package/dist/skills/loader.js +0 -1
- package/dist/skills/marketplace-types.d.ts +0 -1
- package/dist/skills/marketplace-types.js +0 -1
- package/dist/skills/marketplace.d.ts +0 -1
- package/dist/skills/marketplace.js +0 -1
- package/dist/skills/parser.d.ts +0 -1
- package/dist/skills/parser.js +0 -1
- package/dist/skills/types.d.ts +0 -1
- package/dist/skills/types.js +0 -1
- package/dist/specs/generate.d.ts +0 -1
- package/dist/specs/generate.js +0 -1
- package/dist/specs/index.d.ts +0 -1
- package/dist/specs/index.js +0 -1
- package/dist/specs/store.d.ts +0 -1
- package/dist/specs/store.js +0 -1
- package/dist/specs/sync.d.ts +0 -1
- package/dist/specs/sync.js +0 -1
- package/dist/specs/tasks-parser.d.ts +0 -1
- package/dist/specs/tasks-parser.js +0 -1
- package/dist/specs/types.d.ts +0 -1
- package/dist/specs/types.js +0 -1
- package/dist/steering/glob.d.ts +0 -1
- package/dist/steering/glob.js +0 -1
- package/dist/steering/index.d.ts +0 -1
- package/dist/steering/index.js +0 -1
- package/dist/steering/loader.d.ts +0 -1
- package/dist/steering/loader.js +0 -1
- package/dist/steering/project-instructions.d.ts +0 -1
- package/dist/steering/project-instructions.js +0 -1
- package/dist/steering/select.d.ts +0 -1
- package/dist/steering/select.js +0 -1
- package/dist/steering/types.d.ts +0 -1
- package/dist/steering/types.js +0 -1
- package/dist/structured/index.d.ts +0 -1
- package/dist/structured/index.js +0 -1
- package/dist/structured/retry.d.ts +0 -1
- package/dist/structured/retry.js +0 -1
- package/dist/structured/schema.d.ts +0 -1
- package/dist/structured/schema.js +0 -1
- package/dist/tools/browser-tools.d.ts +0 -1
- package/dist/tools/browser-tools.js +0 -1
- package/dist/tools/codebase-search.d.ts +0 -1
- package/dist/tools/codebase-search.js +0 -1
- package/dist/tools/command-allow.d.ts +0 -1
- package/dist/tools/command-allow.js +0 -1
- package/dist/tools/edit-file.d.ts +0 -1
- package/dist/tools/edit-file.js +0 -1
- package/dist/tools/fetch-url.d.ts +0 -1
- package/dist/tools/fetch-url.js +0 -1
- package/dist/tools/find-references.d.ts +0 -1
- package/dist/tools/find-references.js +0 -1
- package/dist/tools/find-symbol.d.ts +0 -1
- package/dist/tools/find-symbol.js +0 -1
- package/dist/tools/ignore-rules.d.ts +0 -1
- package/dist/tools/ignore-rules.js +0 -1
- package/dist/tools/index.d.ts +0 -1
- package/dist/tools/index.js +0 -1
- package/dist/tools/list-files.d.ts +0 -1
- package/dist/tools/list-files.js +0 -1
- package/dist/tools/list-symbols.d.ts +0 -1
- package/dist/tools/list-symbols.js +0 -1
- package/dist/tools/memory.d.ts +0 -1
- package/dist/tools/memory.js +0 -1
- package/dist/tools/notebook.d.ts +0 -1
- package/dist/tools/notebook.js +0 -1
- package/dist/tools/policy.d.ts +0 -1
- package/dist/tools/policy.js +0 -1
- package/dist/tools/read-file.d.ts +0 -1
- package/dist/tools/read-file.js +0 -1
- package/dist/tools/read-image.d.ts +0 -1
- package/dist/tools/read-image.js +0 -1
- package/dist/tools/read-only.d.ts +0 -1
- package/dist/tools/read-only.js +0 -1
- package/dist/tools/redact.d.ts +0 -1
- package/dist/tools/redact.js +0 -1
- package/dist/tools/result-cache.d.ts +0 -1
- package/dist/tools/result-cache.js +0 -1
- package/dist/tools/run-command.d.ts +0 -1
- package/dist/tools/run-command.js +0 -1
- package/dist/tools/sandbox-loader.d.ts +0 -1
- package/dist/tools/sandbox-loader.js +0 -1
- package/dist/tools/search-files.d.ts +0 -1
- package/dist/tools/search-files.js +0 -1
- package/dist/tools/shared.d.ts +0 -1
- package/dist/tools/shared.js +0 -1
- package/dist/tools/sub-agent.d.ts +0 -1
- package/dist/tools/sub-agent.js +0 -1
- package/dist/tools/web-search.d.ts +0 -1
- package/dist/tools/web-search.js +0 -1
- package/dist/tools/write-file.d.ts +0 -1
- package/dist/tools/write-file.js +0 -1
- package/dist/types.d.ts +12 -2
- package/dist/types.js +0 -1
- package/dist/verify/detect.d.ts +0 -1
- package/dist/verify/detect.js +0 -1
- package/dist/verify/index.d.ts +0 -1
- package/dist/verify/index.js +0 -1
- package/dist/worktree/branch-ops.d.ts +0 -1
- package/dist/worktree/branch-ops.js +0 -1
- package/dist/worktree/index.d.ts +0 -1
- package/dist/worktree/index.js +0 -1
- package/dist/worktree/worktree.d.ts +0 -1
- package/dist/worktree/worktree.js +0 -1
- package/package.json +3 -2
- package/dist/agent/agent.d.ts.map +0 -1
- package/dist/agent/agent.js.map +0 -1
- package/dist/agent/architect.d.ts.map +0 -1
- package/dist/agent/architect.js.map +0 -1
- package/dist/agent/cache-hints.d.ts.map +0 -1
- package/dist/agent/cache-hints.js.map +0 -1
- package/dist/agent/cost-router.d.ts.map +0 -1
- package/dist/agent/cost-router.js.map +0 -1
- package/dist/agent/index.d.ts.map +0 -1
- package/dist/agent/index.js.map +0 -1
- package/dist/agent/prompts.d.ts.map +0 -1
- package/dist/agent/prompts.js.map +0 -1
- package/dist/agent/think-tags.d.ts.map +0 -1
- package/dist/agent/think-tags.js.map +0 -1
- package/dist/agent/verify.d.ts.map +0 -1
- package/dist/agent/verify.js.map +0 -1
- package/dist/ai-comments/index.d.ts.map +0 -1
- package/dist/ai-comments/index.js.map +0 -1
- package/dist/attachments.d.ts.map +0 -1
- package/dist/attachments.js.map +0 -1
- package/dist/browser/cdp.d.ts.map +0 -1
- package/dist/browser/cdp.js.map +0 -1
- package/dist/browser/chrome.d.ts.map +0 -1
- package/dist/browser/chrome.js.map +0 -1
- package/dist/browser/session.d.ts.map +0 -1
- package/dist/browser/session.js.map +0 -1
- package/dist/checkpoints/index.d.ts.map +0 -1
- package/dist/checkpoints/index.js.map +0 -1
- package/dist/checkpoints/store.d.ts.map +0 -1
- package/dist/checkpoints/store.js.map +0 -1
- package/dist/checkpoints/types.d.ts.map +0 -1
- package/dist/checkpoints/types.js.map +0 -1
- package/dist/code-index/builder.d.ts.map +0 -1
- package/dist/code-index/builder.js.map +0 -1
- package/dist/code-index/index-store.d.ts.map +0 -1
- package/dist/code-index/index-store.js.map +0 -1
- package/dist/code-index/parser.d.ts.map +0 -1
- package/dist/code-index/parser.js.map +0 -1
- package/dist/code-index/types.d.ts.map +0 -1
- package/dist/code-index/types.js.map +0 -1
- package/dist/commands/custom-commands.d.ts.map +0 -1
- package/dist/commands/custom-commands.js.map +0 -1
- package/dist/config-file.d.ts.map +0 -1
- package/dist/config-file.js.map +0 -1
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/context/compaction.d.ts.map +0 -1
- package/dist/context/compaction.js.map +0 -1
- package/dist/context/mask.d.ts.map +0 -1
- package/dist/context/mask.js.map +0 -1
- package/dist/credentials/index.d.ts.map +0 -1
- package/dist/credentials/index.js.map +0 -1
- package/dist/credentials/types.d.ts.map +0 -1
- package/dist/credentials/types.js.map +0 -1
- package/dist/diff/index.d.ts.map +0 -1
- package/dist/diff/index.js.map +0 -1
- package/dist/diff/unified-diff.d.ts.map +0 -1
- package/dist/diff/unified-diff.js.map +0 -1
- package/dist/git/auto-commit.d.ts.map +0 -1
- package/dist/git/auto-commit.js.map +0 -1
- package/dist/git/index.d.ts.map +0 -1
- package/dist/git/index.js.map +0 -1
- package/dist/github/github-tools.d.ts.map +0 -1
- package/dist/github/github-tools.js.map +0 -1
- package/dist/hooks/agent-runner.d.ts.map +0 -1
- package/dist/hooks/agent-runner.js.map +0 -1
- package/dist/hooks/bus.d.ts.map +0 -1
- package/dist/hooks/bus.js.map +0 -1
- package/dist/hooks/config.d.ts.map +0 -1
- package/dist/hooks/config.js.map +0 -1
- package/dist/hooks/events.d.ts.map +0 -1
- package/dist/hooks/events.js.map +0 -1
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/loader.d.ts.map +0 -1
- package/dist/hooks/loader.js.map +0 -1
- package/dist/hooks/runner.d.ts.map +0 -1
- package/dist/hooks/runner.js.map +0 -1
- package/dist/hooks/watch-coalescer.d.ts.map +0 -1
- package/dist/hooks/watch-coalescer.js.map +0 -1
- package/dist/hooks/watch-ignore.d.ts.map +0 -1
- package/dist/hooks/watch-ignore.js.map +0 -1
- package/dist/hooks/watcher.d.ts.map +0 -1
- package/dist/hooks/watcher.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lazy-model.d.ts.map +0 -1
- package/dist/lazy-model.js.map +0 -1
- package/dist/lint/auto-lint.d.ts.map +0 -1
- package/dist/lint/auto-lint.js.map +0 -1
- package/dist/lint/index.d.ts.map +0 -1
- package/dist/lint/index.js.map +0 -1
- package/dist/lsp/client.d.ts.map +0 -1
- package/dist/lsp/client.js.map +0 -1
- package/dist/lsp/diagnostics.d.ts.map +0 -1
- package/dist/lsp/diagnostics.js.map +0 -1
- package/dist/lsp/index.d.ts.map +0 -1
- package/dist/lsp/index.js.map +0 -1
- package/dist/mcp/catalog.d.ts.map +0 -1
- package/dist/mcp/catalog.js.map +0 -1
- package/dist/mcp/index.d.ts.map +0 -1
- package/dist/mcp/index.js.map +0 -1
- package/dist/mcp/json-schema-to-zod.d.ts.map +0 -1
- package/dist/mcp/json-schema-to-zod.js.map +0 -1
- package/dist/mcp/manager.d.ts.map +0 -1
- package/dist/mcp/manager.js.map +0 -1
- package/dist/mcp/marketplace-types.d.ts.map +0 -1
- package/dist/mcp/marketplace-types.js.map +0 -1
- package/dist/mcp/marketplace.d.ts.map +0 -1
- package/dist/mcp/marketplace.js.map +0 -1
- package/dist/mcp/mcp-client.d.ts.map +0 -1
- package/dist/mcp/mcp-client.js.map +0 -1
- package/dist/mcp/mcp-config.d.ts.map +0 -1
- package/dist/mcp/mcp-config.js.map +0 -1
- package/dist/mcp/registry.d.ts.map +0 -1
- package/dist/mcp/registry.js.map +0 -1
- package/dist/memory/memory-store.d.ts.map +0 -1
- package/dist/memory/memory-store.js.map +0 -1
- package/dist/memory/rank.d.ts.map +0 -1
- package/dist/memory/rank.js.map +0 -1
- package/dist/memory/stale.d.ts.map +0 -1
- package/dist/memory/stale.js.map +0 -1
- package/dist/model-alias.d.ts.map +0 -1
- package/dist/model-alias.js.map +0 -1
- package/dist/model-catalog.d.ts.map +0 -1
- package/dist/model-catalog.js.map +0 -1
- package/dist/model-list.d.ts.map +0 -1
- package/dist/model-list.js.map +0 -1
- package/dist/orchestrator/board-tools.d.ts.map +0 -1
- package/dist/orchestrator/board-tools.js.map +0 -1
- package/dist/orchestrator/board.d.ts.map +0 -1
- package/dist/orchestrator/board.js.map +0 -1
- package/dist/orchestrator/index.d.ts.map +0 -1
- package/dist/orchestrator/index.js.map +0 -1
- package/dist/orchestrator/orchestrator.d.ts.map +0 -1
- package/dist/orchestrator/orchestrator.js.map +0 -1
- package/dist/orchestrator/router.d.ts.map +0 -1
- package/dist/orchestrator/router.js.map +0 -1
- package/dist/orchestrator/specialists-registry.d.ts.map +0 -1
- package/dist/orchestrator/specialists-registry.js.map +0 -1
- package/dist/orchestrator/specialists.d.ts.map +0 -1
- package/dist/orchestrator/specialists.js.map +0 -1
- package/dist/orchestrator/types.d.ts.map +0 -1
- package/dist/orchestrator/types.js.map +0 -1
- package/dist/plugins/index.d.ts.map +0 -1
- package/dist/plugins/index.js.map +0 -1
- package/dist/plugins/install.d.ts.map +0 -1
- package/dist/plugins/install.js.map +0 -1
- package/dist/plugins/loader.d.ts.map +0 -1
- package/dist/plugins/loader.js.map +0 -1
- package/dist/policy/audit.d.ts.map +0 -1
- package/dist/policy/audit.js.map +0 -1
- package/dist/policy/policy.d.ts.map +0 -1
- package/dist/policy/policy.js.map +0 -1
- package/dist/policy/proxy.d.ts.map +0 -1
- package/dist/policy/proxy.js.map +0 -1
- package/dist/pricing.d.ts.map +0 -1
- package/dist/pricing.js.map +0 -1
- package/dist/providers.d.ts.map +0 -1
- package/dist/providers.js.map +0 -1
- package/dist/repomap/index.d.ts.map +0 -1
- package/dist/repomap/index.js.map +0 -1
- package/dist/repomap/repo-map.d.ts.map +0 -1
- package/dist/repomap/repo-map.js.map +0 -1
- package/dist/semantic/chunker.d.ts.map +0 -1
- package/dist/semantic/chunker.js.map +0 -1
- package/dist/semantic/embedder.d.ts.map +0 -1
- package/dist/semantic/embedder.js.map +0 -1
- package/dist/semantic/semantic-index.d.ts.map +0 -1
- package/dist/semantic/semantic-index.js.map +0 -1
- package/dist/semantic/vector-store.d.ts.map +0 -1
- package/dist/semantic/vector-store.js.map +0 -1
- package/dist/sessions/index.d.ts.map +0 -1
- package/dist/sessions/index.js.map +0 -1
- package/dist/sessions/search.d.ts.map +0 -1
- package/dist/sessions/search.js.map +0 -1
- package/dist/sessions/session-export.d.ts.map +0 -1
- package/dist/sessions/session-export.js.map +0 -1
- package/dist/sessions/session-store.d.ts.map +0 -1
- package/dist/sessions/session-store.js.map +0 -1
- package/dist/sessions/watch.d.ts.map +0 -1
- package/dist/sessions/watch.js.map +0 -1
- package/dist/settings-export.d.ts.map +0 -1
- package/dist/settings-export.js.map +0 -1
- package/dist/skills/activator.d.ts.map +0 -1
- package/dist/skills/activator.js.map +0 -1
- package/dist/skills/index.d.ts.map +0 -1
- package/dist/skills/index.js.map +0 -1
- package/dist/skills/loader.d.ts.map +0 -1
- package/dist/skills/loader.js.map +0 -1
- package/dist/skills/marketplace-types.d.ts.map +0 -1
- package/dist/skills/marketplace-types.js.map +0 -1
- package/dist/skills/marketplace.d.ts.map +0 -1
- package/dist/skills/marketplace.js.map +0 -1
- package/dist/skills/parser.d.ts.map +0 -1
- package/dist/skills/parser.js.map +0 -1
- package/dist/skills/types.d.ts.map +0 -1
- package/dist/skills/types.js.map +0 -1
- package/dist/specs/generate.d.ts.map +0 -1
- package/dist/specs/generate.js.map +0 -1
- package/dist/specs/index.d.ts.map +0 -1
- package/dist/specs/index.js.map +0 -1
- package/dist/specs/store.d.ts.map +0 -1
- package/dist/specs/store.js.map +0 -1
- package/dist/specs/sync.d.ts.map +0 -1
- package/dist/specs/sync.js.map +0 -1
- package/dist/specs/tasks-parser.d.ts.map +0 -1
- package/dist/specs/tasks-parser.js.map +0 -1
- package/dist/specs/types.d.ts.map +0 -1
- package/dist/specs/types.js.map +0 -1
- package/dist/steering/glob.d.ts.map +0 -1
- package/dist/steering/glob.js.map +0 -1
- package/dist/steering/index.d.ts.map +0 -1
- package/dist/steering/index.js.map +0 -1
- package/dist/steering/loader.d.ts.map +0 -1
- package/dist/steering/loader.js.map +0 -1
- package/dist/steering/project-instructions.d.ts.map +0 -1
- package/dist/steering/project-instructions.js.map +0 -1
- package/dist/steering/select.d.ts.map +0 -1
- package/dist/steering/select.js.map +0 -1
- package/dist/steering/types.d.ts.map +0 -1
- package/dist/steering/types.js.map +0 -1
- package/dist/structured/index.d.ts.map +0 -1
- package/dist/structured/index.js.map +0 -1
- package/dist/structured/retry.d.ts.map +0 -1
- package/dist/structured/retry.js.map +0 -1
- package/dist/structured/schema.d.ts.map +0 -1
- package/dist/structured/schema.js.map +0 -1
- package/dist/tools/browser-tools.d.ts.map +0 -1
- package/dist/tools/browser-tools.js.map +0 -1
- package/dist/tools/codebase-search.d.ts.map +0 -1
- package/dist/tools/codebase-search.js.map +0 -1
- package/dist/tools/command-allow.d.ts.map +0 -1
- package/dist/tools/command-allow.js.map +0 -1
- package/dist/tools/edit-file.d.ts.map +0 -1
- package/dist/tools/edit-file.js.map +0 -1
- package/dist/tools/fetch-url.d.ts.map +0 -1
- package/dist/tools/fetch-url.js.map +0 -1
- package/dist/tools/find-references.d.ts.map +0 -1
- package/dist/tools/find-references.js.map +0 -1
- package/dist/tools/find-symbol.d.ts.map +0 -1
- package/dist/tools/find-symbol.js.map +0 -1
- package/dist/tools/ignore-rules.d.ts.map +0 -1
- package/dist/tools/ignore-rules.js.map +0 -1
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/list-files.d.ts.map +0 -1
- package/dist/tools/list-files.js.map +0 -1
- package/dist/tools/list-symbols.d.ts.map +0 -1
- package/dist/tools/list-symbols.js.map +0 -1
- package/dist/tools/memory.d.ts.map +0 -1
- package/dist/tools/memory.js.map +0 -1
- package/dist/tools/notebook.d.ts.map +0 -1
- package/dist/tools/notebook.js.map +0 -1
- package/dist/tools/policy.d.ts.map +0 -1
- package/dist/tools/policy.js.map +0 -1
- package/dist/tools/read-file.d.ts.map +0 -1
- package/dist/tools/read-file.js.map +0 -1
- package/dist/tools/read-image.d.ts.map +0 -1
- package/dist/tools/read-image.js.map +0 -1
- package/dist/tools/read-only.d.ts.map +0 -1
- package/dist/tools/read-only.js.map +0 -1
- package/dist/tools/redact.d.ts.map +0 -1
- package/dist/tools/redact.js.map +0 -1
- package/dist/tools/result-cache.d.ts.map +0 -1
- package/dist/tools/result-cache.js.map +0 -1
- package/dist/tools/run-command.d.ts.map +0 -1
- package/dist/tools/run-command.js.map +0 -1
- package/dist/tools/sandbox-loader.d.ts.map +0 -1
- package/dist/tools/sandbox-loader.js.map +0 -1
- package/dist/tools/search-files.d.ts.map +0 -1
- package/dist/tools/search-files.js.map +0 -1
- package/dist/tools/shared.d.ts.map +0 -1
- package/dist/tools/shared.js.map +0 -1
- package/dist/tools/sub-agent.d.ts.map +0 -1
- package/dist/tools/sub-agent.js.map +0 -1
- package/dist/tools/web-search.d.ts.map +0 -1
- package/dist/tools/web-search.js.map +0 -1
- package/dist/tools/write-file.d.ts.map +0 -1
- package/dist/tools/write-file.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/verify/detect.d.ts.map +0 -1
- package/dist/verify/detect.js.map +0 -1
- package/dist/verify/index.d.ts.map +0 -1
- package/dist/verify/index.js.map +0 -1
- package/dist/worktree/branch-ops.d.ts.map +0 -1
- package/dist/worktree/branch-ops.js.map +0 -1
- package/dist/worktree/index.d.ts.map +0 -1
- package/dist/worktree/index.js.map +0 -1
- package/dist/worktree/worktree.d.ts.map +0 -1
- package/dist/worktree/worktree.js.map +0 -1
package/LICENSE
CHANGED
|
@@ -1,21 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 IKarmic
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
IKarmic Forge Core: Proprietary License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 IKarmic. All rights reserved.
|
|
4
|
+
|
|
5
|
+
This license covers "@ikarmic/forge-core" version 5.0.0 and later
|
|
6
|
+
(the "Software"). Earlier versions (4.5.0 and before) were released under
|
|
7
|
+
the MIT License and stay under it.
|
|
8
|
+
|
|
9
|
+
1. Grant. IKarmic grants you a non-exclusive, non-transferable, royalty-free
|
|
10
|
+
licence to install and run the Software, in the form distributed by
|
|
11
|
+
IKarmic, as a dependency of the IKarmic Forge VS Code extension and the
|
|
12
|
+
IKarmic Forge command line tool (the "Forge Clients"), for any purpose,
|
|
13
|
+
including commercial use.
|
|
14
|
+
|
|
15
|
+
2. Restrictions. You may not, and may not let others:
|
|
16
|
+
a. copy, modify, translate or create derivative works of the Software;
|
|
17
|
+
b. redistribute, sublicense, sell, lease or host the Software, alone or
|
|
18
|
+
bundled in another product, except as part of an unmodified Forge
|
|
19
|
+
Client distributed by IKarmic;
|
|
20
|
+
c. reverse engineer, decompile or disassemble the Software, except to the
|
|
21
|
+
extent applicable law forbids this restriction;
|
|
22
|
+
d. use the Software to build a product or service that competes with the
|
|
23
|
+
Forge Clients or with IKarmic's paid editions;
|
|
24
|
+
e. remove or alter any copyright, licence or attribution notice.
|
|
25
|
+
|
|
26
|
+
3. Enterprise features. Features marked as enterprise features need a valid
|
|
27
|
+
licence key from IKarmic. Using them without one is not permitted.
|
|
28
|
+
|
|
29
|
+
4. Ownership. IKarmic and its licensors keep all rights not granted here.
|
|
30
|
+
No right is granted by implication or estoppel.
|
|
31
|
+
|
|
32
|
+
5. Open-source Forge Clients. The Forge Clients' own source code is licensed
|
|
33
|
+
separately under AGPL-3.0-only (see the LICENSE and NOTICE files of the
|
|
34
|
+
Forge Clients). That licence does not extend to this Software, and
|
|
35
|
+
nothing in it lets you redistribute this Software.
|
|
36
|
+
|
|
37
|
+
6. No warranty. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
|
|
38
|
+
KIND. IKARMIC IS NOT LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY
|
|
39
|
+
ARISING FROM THE SOFTWARE OR ITS USE, TO THE EXTENT THE LAW ALLOWS.
|
|
40
|
+
|
|
41
|
+
7. Termination. This licence ends automatically if you break it. On
|
|
42
|
+
termination you must stop using and delete all copies of the Software.
|
|
43
|
+
|
|
44
|
+
Contact: ikarmicaiss@gmail.com
|
package/README.md
CHANGED
package/dist/agent/agent.d.ts
CHANGED
package/dist/agent/agent.js
CHANGED
|
@@ -15,6 +15,7 @@ import { createGitHubTools, githubFromEnv } from '../github/github-tools.js';
|
|
|
15
15
|
import { createWebSearchTool, webSearchFromEnv } from '../tools/web-search.js';
|
|
16
16
|
import { embedderFromEnv } from '../semantic/embedder.js';
|
|
17
17
|
import { DEFAULT_VERIFY_RETRIES, failureMessage, runVerification } from './verify.js';
|
|
18
|
+
import { LoopGuard, resultKeyOf } from './loop-guard.js';
|
|
18
19
|
import { isListedCommand } from '../tools/command-allow.js';
|
|
19
20
|
import { createLanguageModel } from '../providers.js';
|
|
20
21
|
import { BUILTIN_TOOLS } from '../tools/index.js';
|
|
@@ -216,6 +217,14 @@ export class Agent {
|
|
|
216
217
|
let model = modelFactory(currentModelConfig);
|
|
217
218
|
let stepPricing = this.pricing;
|
|
218
219
|
let lastToolNames = [];
|
|
220
|
+
// Stops a run that repeats one identical tool call (off unless `loopGuardThreshold` is set).
|
|
221
|
+
const loopGuard = new LoopGuard(this.config.loopGuardThreshold ?? 0);
|
|
222
|
+
let loopTripped;
|
|
223
|
+
// Every call outcome feeds the guard (results, errors, invalid or denied calls), so a different call in between resets the streak.
|
|
224
|
+
const trackLoop = (tool, args, outcome) => {
|
|
225
|
+
if (loopGuard.record(tool, args, resultKeyOf(outcome)) && !loopTripped)
|
|
226
|
+
loopTripped = { tool, count: loopGuard.streak };
|
|
227
|
+
};
|
|
219
228
|
// Verify loop state: only run checks when the run actually edited files.
|
|
220
229
|
let editedSinceVerify = false;
|
|
221
230
|
const editedFiles = new Set();
|
|
@@ -483,11 +492,13 @@ export class Agent {
|
|
|
483
492
|
if (!def) {
|
|
484
493
|
currentToolResults.push(toolResultError(call.toolCallId, call.toolName, `Unknown tool: ${call.toolName}`));
|
|
485
494
|
emit({ type: 'tool_result', name: call.toolName, id: call.toolCallId, result: `Unknown tool`, isError: true });
|
|
495
|
+
trackLoop(call.toolName, call.input, 'unknown tool');
|
|
486
496
|
continue;
|
|
487
497
|
}
|
|
488
498
|
const argsParsed = def.parameters.safeParse(call.input);
|
|
489
499
|
if (!argsParsed.success) {
|
|
490
500
|
const message = `Invalid arguments for ${call.toolName}: ${argsParsed.error.message}`;
|
|
501
|
+
trackLoop(call.toolName, call.input, message);
|
|
491
502
|
currentToolResults.push(toolResultError(call.toolCallId, call.toolName, message));
|
|
492
503
|
emit({ type: 'tool_result', name: call.toolName, id: call.toolCallId, result: message, isError: true });
|
|
493
504
|
continue;
|
|
@@ -496,6 +507,7 @@ export class Agent {
|
|
|
496
507
|
this.audit?.record({ event: 'tool_call', tool: call.toolName, args: approval.args ?? argsParsed.data, approved: approval.approved, auto: this.config.auto === true }, auditCtx);
|
|
497
508
|
if (!approval.approved) {
|
|
498
509
|
const denial = approval.note ? `Denied by user. ${approval.note}` : `Denied by user.`;
|
|
510
|
+
trackLoop(call.toolName, argsParsed.data, denial);
|
|
499
511
|
currentToolResults.push(toolResult(call.toolCallId, call.toolName, denial));
|
|
500
512
|
emit({ type: 'tool_result', name: call.toolName, id: call.toolCallId, result: denial, isError: false });
|
|
501
513
|
continue;
|
|
@@ -507,6 +519,7 @@ export class Agent {
|
|
|
507
519
|
const edited = def.parameters.safeParse(approval.args);
|
|
508
520
|
if (!edited.success) {
|
|
509
521
|
const message = `Invalid edited arguments for ${call.toolName}: ${edited.error.message}`;
|
|
522
|
+
trackLoop(call.toolName, approval.args, message);
|
|
510
523
|
currentToolResults.push(toolResultError(call.toolCallId, call.toolName, message));
|
|
511
524
|
emit({ type: 'tool_result', name: call.toolName, id: call.toolCallId, result: message, isError: true });
|
|
512
525
|
continue;
|
|
@@ -586,6 +599,7 @@ export class Agent {
|
|
|
586
599
|
: { result: finalResult, userNote: approval.note };
|
|
587
600
|
}
|
|
588
601
|
currentToolResults.push(toolResult(call.toolCallId, call.toolName, finalResult));
|
|
602
|
+
trackLoop(call.toolName, toolArgs, finalResult);
|
|
589
603
|
if (STEERING_FILE_TOOLS.has(call.toolName)) {
|
|
590
604
|
const touched = toolArgs.path;
|
|
591
605
|
if (typeof touched === 'string')
|
|
@@ -617,6 +631,7 @@ export class Agent {
|
|
|
617
631
|
const message = errorMessageOf(err);
|
|
618
632
|
currentToolResults.push(toolResultError(call.toolCallId, call.toolName, message));
|
|
619
633
|
emit({ type: 'tool_result', name: call.toolName, id: call.toolCallId, result: message, isError: true });
|
|
634
|
+
trackLoop(call.toolName, toolArgs, `error:${message}`);
|
|
620
635
|
if (this.hooks) {
|
|
621
636
|
await this.hooks.dispatch({
|
|
622
637
|
type: 'PostToolUse',
|
|
@@ -636,6 +651,11 @@ export class Agent {
|
|
|
636
651
|
}
|
|
637
652
|
for (const m of toolResultMessages)
|
|
638
653
|
messages.push(m);
|
|
654
|
+
if (loopTripped) {
|
|
655
|
+
emit({ type: 'loop_detected', tool: loopTripped.tool, count: loopTripped.count });
|
|
656
|
+
reason = 'loop_detected';
|
|
657
|
+
break;
|
|
658
|
+
}
|
|
639
659
|
// Mid-run fileMatch steering: one extra user message per round, each doc once per run.
|
|
640
660
|
if (steeringDocs.length > 0 && touchedPaths.length > 0) {
|
|
641
661
|
const injected = [];
|
|
@@ -1119,4 +1139,3 @@ function estimateNextPromptTokens(messages) {
|
|
|
1119
1139
|
}
|
|
1120
1140
|
return total;
|
|
1121
1141
|
}
|
|
1122
|
-
//# sourceMappingURL=agent.js.map
|
|
@@ -45,4 +45,3 @@ export declare function editorLimits(base: AgentConfig, architect: {
|
|
|
45
45
|
};
|
|
46
46
|
export declare function editorTask(task: string, plan: string): string;
|
|
47
47
|
export declare function runArchitect(opts: ArchitectOptions): Promise<AgentRunResult>;
|
|
48
|
-
//# sourceMappingURL=architect.d.ts.map
|
package/dist/agent/architect.js
CHANGED
|
@@ -13,4 +13,3 @@ import type { ModelMessage } from 'ai';
|
|
|
13
13
|
import type { ModelConfig } from '../types.js';
|
|
14
14
|
export declare function supportsCacheHints(model: ModelConfig): boolean;
|
|
15
15
|
export declare function applyCacheHints(messages: ModelMessage[], model: ModelConfig): ModelMessage[];
|
|
16
|
-
//# sourceMappingURL=cache-hints.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LanguageModel } from 'ai';
|
|
2
|
+
import type { ModelConfig } from '../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Rewrite a draft chat message into a clearer request using `model` (typically the cheap model).
|
|
5
|
+
* Never throws: an empty input, a missing model, a model error or an empty reply all return `input` unchanged.
|
|
6
|
+
*/
|
|
7
|
+
export declare function enhancePrompt(input: string, model: ModelConfig | undefined, modelFactory?: (cfg: ModelConfig) => LanguageModel): Promise<string>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { generateText } from 'ai';
|
|
2
|
+
import { createLanguageModel } from '../providers.js';
|
|
3
|
+
import { stripThinkTags } from './think-tags.js';
|
|
4
|
+
const ENHANCE_INSTRUCTIONS = 'Rewrite the request below so a coding agent can act on it: say what to change and where, name the expected result, and keep every file, symbol and constraint the user mentioned. ' +
|
|
5
|
+
'Do not invent requirements or add steps the user did not ask for. Reply with the rewritten request only, no quotes, no code fences, no preface.';
|
|
6
|
+
/**
|
|
7
|
+
* Rewrite a draft chat message into a clearer request using `model` (typically the cheap model).
|
|
8
|
+
* Never throws: an empty input, a missing model, a model error or an empty reply all return `input` unchanged.
|
|
9
|
+
*/
|
|
10
|
+
export async function enhancePrompt(input, model, modelFactory = createLanguageModel) {
|
|
11
|
+
if (!model || !input.trim())
|
|
12
|
+
return input;
|
|
13
|
+
try {
|
|
14
|
+
const result = await generateText({ model: modelFactory(model), prompt: `${ENHANCE_INSTRUCTIONS}\n\nRequest:\n${input}` });
|
|
15
|
+
return clean(result.text) || input;
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
return input;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function clean(text) {
|
|
22
|
+
// Reasoning models put an inline <think> block in the reply; only what follows it is the rewrite.
|
|
23
|
+
return stripThinkTags(text)
|
|
24
|
+
.trim()
|
|
25
|
+
.replace(/^```[a-z]*\s*\n?/i, '')
|
|
26
|
+
.replace(/\n?```$/, '')
|
|
27
|
+
.trim()
|
|
28
|
+
.replace(/^["'“”](.*)["'“”]$/s, '$1')
|
|
29
|
+
.trim();
|
|
30
|
+
}
|
package/dist/agent/index.d.ts
CHANGED
package/dist/agent/index.js
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Detects a run that is stuck repeating one tool call. A call counts as a repeat only when the tool
|
|
3
|
+
* name, the arguments (key order ignored) and the result all match the previous call, so re-reading
|
|
4
|
+
* a file after an edit changed it never trips the guard.
|
|
5
|
+
*/
|
|
6
|
+
export declare class LoopGuard {
|
|
7
|
+
private lastKey;
|
|
8
|
+
private count;
|
|
9
|
+
private readonly threshold;
|
|
10
|
+
/**
|
|
11
|
+
* `threshold` identical calls in a row trip the guard; 0 turns it off. A threshold of 1 would stop
|
|
12
|
+
* every run at its first call, so it counts as 2.
|
|
13
|
+
*/
|
|
14
|
+
constructor(threshold: number);
|
|
15
|
+
/** Length of the current run of identical calls. */
|
|
16
|
+
get streak(): number;
|
|
17
|
+
/** Record a finished call. Returns true when the streak has reached the threshold. */
|
|
18
|
+
record(toolName: string, args: unknown, resultKey: string): boolean;
|
|
19
|
+
}
|
|
20
|
+
/** A short stable key for a tool result, so the guard never holds large outputs in memory. */
|
|
21
|
+
export declare function resultKeyOf(value: unknown): string;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
/**
|
|
3
|
+
* Detects a run that is stuck repeating one tool call. A call counts as a repeat only when the tool
|
|
4
|
+
* name, the arguments (key order ignored) and the result all match the previous call, so re-reading
|
|
5
|
+
* a file after an edit changed it never trips the guard.
|
|
6
|
+
*/
|
|
7
|
+
export class LoopGuard {
|
|
8
|
+
lastKey;
|
|
9
|
+
count = 0;
|
|
10
|
+
threshold;
|
|
11
|
+
/**
|
|
12
|
+
* `threshold` identical calls in a row trip the guard; 0 turns it off. A threshold of 1 would stop
|
|
13
|
+
* every run at its first call, so it counts as 2.
|
|
14
|
+
*/
|
|
15
|
+
constructor(threshold) {
|
|
16
|
+
this.threshold = threshold >= 1 ? Math.max(2, threshold) : 0;
|
|
17
|
+
}
|
|
18
|
+
/** Length of the current run of identical calls. */
|
|
19
|
+
get streak() {
|
|
20
|
+
return this.count;
|
|
21
|
+
}
|
|
22
|
+
/** Record a finished call. Returns true when the streak has reached the threshold. */
|
|
23
|
+
record(toolName, args, resultKey) {
|
|
24
|
+
if (this.threshold <= 0)
|
|
25
|
+
return false;
|
|
26
|
+
const key = `${toolName}\u0000${canonical(args)}\u0000${resultKey}`;
|
|
27
|
+
this.count = key === this.lastKey ? this.count + 1 : 1;
|
|
28
|
+
this.lastKey = key;
|
|
29
|
+
return this.count >= this.threshold;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/** A short stable key for a tool result, so the guard never holds large outputs in memory. */
|
|
33
|
+
export function resultKeyOf(value) {
|
|
34
|
+
const text = typeof value === 'string' ? value : (JSON.stringify(value) ?? '');
|
|
35
|
+
return createHash('sha1').update(text).digest('hex');
|
|
36
|
+
}
|
|
37
|
+
function canonical(value) {
|
|
38
|
+
return JSON.stringify(value, (_k, v) => v !== null && typeof v === 'object' && !Array.isArray(v)
|
|
39
|
+
? Object.fromEntries(Object.entries(v).sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0)))
|
|
40
|
+
: v);
|
|
41
|
+
}
|
package/dist/agent/prompts.d.ts
CHANGED
|
@@ -22,4 +22,3 @@ export declare const DEFAULT_SPEC_MODE_SUFFIX = "\n\nSPEC MODE \u2014 IMPORTANT:
|
|
|
22
22
|
export declare const CONTINUE_PROMPT = "Continue exactly where you stopped. Do not repeat anything you already wrote.";
|
|
23
23
|
/** Spec-mode prompt override for architect phase 1 (see agent/architect.ts). */
|
|
24
24
|
export declare const ARCHITECT_PROMPT = "\n\nYou are the ARCHITECT. Explore the codebase with your read-only tools, then\nreply with a precise change plan for a separate editor model to apply. Do not\nwrite code outside the plan. Your final message must contain only:\n\n1. Files to change \u2014 for each file, the exact edits (what to find, what to\n replace it with, or the new code to add and where).\n2. New files \u2014 path and full contents.\n3. Verification \u2014 the commands to run to check the change.\n\nBe exact: the editor applies your plan literally and cannot ask questions.\n";
|
|
25
|
-
//# sourceMappingURL=prompts.d.ts.map
|
package/dist/agent/prompts.js
CHANGED
package/dist/agent/think-tags.js
CHANGED
package/dist/agent/verify.d.ts
CHANGED
|
@@ -14,4 +14,3 @@ export interface VerifyOutcome {
|
|
|
14
14
|
export declare function runVerification(config: VerifyConfig, ctx: ToolContext, editedFiles?: string[]): Promise<VerifyOutcome>;
|
|
15
15
|
/** The message shown to the model after a failed verification. */
|
|
16
16
|
export declare function failureMessage(failures: VerifyFailure[]): string;
|
|
17
|
-
//# sourceMappingURL=verify.d.ts.map
|
package/dist/agent/verify.js
CHANGED
|
@@ -38,4 +38,3 @@ export function aiCommentTask(files, action) {
|
|
|
38
38
|
? `Apply the instructions left as AI comments in these files, then remove the AI comments you resolved:\n\n${body}`
|
|
39
39
|
: `Answer the questions left as AI comments in these files. Do not edit any file:\n\n${body}`;
|
|
40
40
|
}
|
|
41
|
-
//# sourceMappingURL=index.js.map
|
package/dist/attachments.d.ts
CHANGED
|
@@ -44,4 +44,3 @@ export declare function attachmentParts(attachments: readonly Attachment[]): Arr
|
|
|
44
44
|
export declare function mediaPartTokens(part: unknown): number;
|
|
45
45
|
/** A short stand-in for a media part in transcripts (summaries, logs), never the bytes. */
|
|
46
46
|
export declare function mediaPartLabel(part: unknown): string | null;
|
|
47
|
-
//# sourceMappingURL=attachments.d.ts.map
|
package/dist/attachments.js
CHANGED
package/dist/browser/cdp.d.ts
CHANGED
package/dist/browser/cdp.js
CHANGED
package/dist/browser/chrome.d.ts
CHANGED
package/dist/browser/chrome.js
CHANGED
package/dist/browser/session.js
CHANGED
|
@@ -9,4 +9,3 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export { CheckpointStore, type CheckpointStoreLimits } from './store.js';
|
|
11
11
|
export type { CaptureOptions, Checkpoint, CheckpointFile, CheckpointFileStatus, CheckpointSummary, CheckpointTrigger, PruneResult, RestoreResult, } from './types.js';
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -9,4 +9,3 @@ export declare function saveManifest(cwd: string, manifest: IndexManifest): Prom
|
|
|
9
9
|
export declare function getEntry(manifest: IndexManifest, relPath: string): IndexFileEntry | undefined;
|
|
10
10
|
export declare function setEntry(manifest: IndexManifest, relPath: string, entry: IndexFileEntry): void;
|
|
11
11
|
export declare function deleteEntry(manifest: IndexManifest, relPath: string): void;
|
|
12
|
-
//# sourceMappingURL=index-store.d.ts.map
|
package/dist/code-index/types.js
CHANGED
|
@@ -22,4 +22,3 @@ export declare function loadCustomCommands(cwd: string, home?: string): Promise<
|
|
|
22
22
|
export declare function expandCustomCommand(command: Pick<CustomCommand, 'template'>, args: string): string;
|
|
23
23
|
/** `/name — description` lines for help output. */
|
|
24
24
|
export declare function formatCustomCommands(commands: Map<string, CustomCommand>): string;
|
|
25
|
-
//# sourceMappingURL=custom-commands.d.ts.map
|
package/dist/config-file.d.ts
CHANGED
|
@@ -22,6 +22,10 @@ export interface ForgeConfigFile {
|
|
|
22
22
|
}>>;
|
|
23
23
|
/** Short names for models: `"fast": "anthropic:claude-haiku-4-5"`. See model-alias.ts. */
|
|
24
24
|
aliases?: ModelAliases;
|
|
25
|
+
/** Model for a chat mode that has none of its own: mode id → `provider:model`, bare model id or alias. */
|
|
26
|
+
modeModels?: Record<string, string>;
|
|
27
|
+
/** Delete saved sessions not updated for this many days, when the VS Code extension starts. Unset keeps everything. */
|
|
28
|
+
sessionRetentionDays?: number;
|
|
25
29
|
display?: {
|
|
26
30
|
blockDefault?: 'collapsed' | 'expanded';
|
|
27
31
|
detail?: 'compact' | 'full';
|
|
@@ -41,4 +45,3 @@ export declare function loadForgeConfigFile(configPath?: string): Promise<LoadFo
|
|
|
41
45
|
* Fields not present in `partial` are left untouched.
|
|
42
46
|
*/
|
|
43
47
|
export declare function saveForgeConfigFile(partial: ForgeConfigFile, configPath?: string): Promise<void>;
|
|
44
|
-
//# sourceMappingURL=config-file.d.ts.map
|
package/dist/config-file.js
CHANGED
package/dist/config.d.ts
CHANGED
package/dist/config.js
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { generateText } from 'ai';
|
|
15
15
|
import { mediaPartLabel, mediaPartTokens } from '../attachments.js';
|
|
16
|
+
import { stripThinkTags } from '../agent/think-tags.js';
|
|
16
17
|
import { createLanguageModel } from '../providers.js';
|
|
17
18
|
/**
|
|
18
19
|
* Approximate model context window (input) in tokens. Used to decide when
|
|
@@ -201,7 +202,8 @@ ${truncateToBudget(transcript, 60_000)}`;
|
|
|
201
202
|
prompt,
|
|
202
203
|
maxOutputTokens: 2000,
|
|
203
204
|
});
|
|
204
|
-
|
|
205
|
+
// Reasoning models put an inline <think> block in the reply; it must not be stored as the summary.
|
|
206
|
+
return stripThinkTags(result.text).trim();
|
|
205
207
|
};
|
|
206
208
|
}
|
|
207
209
|
/** Truncate the transcript at a character budget so we don't blow the summarizer's own context. */
|
|
@@ -259,6 +261,9 @@ export async function compactMessages(allMessages, summarizer, options = {}) {
|
|
|
259
261
|
const pinned = toSummarize[0]?.role === 'user' ? toSummarize[0] : undefined;
|
|
260
262
|
const beforeTokens = estimateMessageTokens(toSummarize) - (pinned ? estimateMessageTokens([pinned]) : 0);
|
|
261
263
|
const summary = await summarizer(toSummarize);
|
|
264
|
+
// An empty summary (a failed or reasoning-only reply) must not replace the dropped turns with nothing.
|
|
265
|
+
if (!summary.trim())
|
|
266
|
+
return { messages: allMessages, droppedCount: 0, savedTokens: 0, summary: '' };
|
|
262
267
|
const summaryTokens = estimateTokens(summary);
|
|
263
268
|
const separator = {
|
|
264
269
|
role: 'system',
|
|
@@ -280,4 +285,3 @@ export async function compactMessages(allMessages, summarizer, options = {}) {
|
|
|
280
285
|
summary,
|
|
281
286
|
};
|
|
282
287
|
}
|
|
283
|
-
//# sourceMappingURL=compaction.js.map
|
package/dist/context/mask.d.ts
CHANGED
package/dist/context/mask.js
CHANGED
|
@@ -4,4 +4,3 @@ export type { CredentialStore } from './types.js';
|
|
|
4
4
|
export declare const CREDENTIAL_SERVICE_NAME = "ikarmic-forge";
|
|
5
5
|
/** Account key for a provider's stored API key: same on every surface. */
|
|
6
6
|
export declare function credentialAccountKey(provider: ProviderName): string;
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|