@miller-tech/uap 1.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 +21 -0
- package/README.md +888 -0
- package/dist/analyzers/index.d.ts +3 -0
- package/dist/analyzers/index.d.ts.map +1 -0
- package/dist/analyzers/index.js +684 -0
- package/dist/analyzers/index.js.map +1 -0
- package/dist/benchmarks/agents/naive-agent.d.ts +60 -0
- package/dist/benchmarks/agents/naive-agent.d.ts.map +1 -0
- package/dist/benchmarks/agents/naive-agent.js +144 -0
- package/dist/benchmarks/agents/naive-agent.js.map +1 -0
- package/dist/benchmarks/agents/uap-agent.d.ts +167 -0
- package/dist/benchmarks/agents/uap-agent.d.ts.map +1 -0
- package/dist/benchmarks/agents/uap-agent.js +437 -0
- package/dist/benchmarks/agents/uap-agent.js.map +1 -0
- package/dist/benchmarks/benchmark.d.ts +328 -0
- package/dist/benchmarks/benchmark.d.ts.map +1 -0
- package/dist/benchmarks/benchmark.js +112 -0
- package/dist/benchmarks/benchmark.js.map +1 -0
- package/dist/benchmarks/execution-verifier.d.ts +41 -0
- package/dist/benchmarks/execution-verifier.d.ts.map +1 -0
- package/dist/benchmarks/execution-verifier.js +340 -0
- package/dist/benchmarks/execution-verifier.js.map +1 -0
- package/dist/benchmarks/hierarchical-prompting.d.ts +37 -0
- package/dist/benchmarks/hierarchical-prompting.d.ts.map +1 -0
- package/dist/benchmarks/hierarchical-prompting.js +246 -0
- package/dist/benchmarks/hierarchical-prompting.js.map +1 -0
- package/dist/benchmarks/improved-benchmark.d.ts +89 -0
- package/dist/benchmarks/improved-benchmark.d.ts.map +1 -0
- package/dist/benchmarks/improved-benchmark.js +585 -0
- package/dist/benchmarks/improved-benchmark.js.map +1 -0
- package/dist/benchmarks/index.d.ts +11 -0
- package/dist/benchmarks/index.d.ts.map +1 -0
- package/dist/benchmarks/index.js +11 -0
- package/dist/benchmarks/index.js.map +1 -0
- package/dist/benchmarks/model-integration.d.ts +111 -0
- package/dist/benchmarks/model-integration.d.ts.map +1 -0
- package/dist/benchmarks/model-integration.js +904 -0
- package/dist/benchmarks/model-integration.js.map +1 -0
- package/dist/benchmarks/multi-turn-agent.d.ts +44 -0
- package/dist/benchmarks/multi-turn-agent.d.ts.map +1 -0
- package/dist/benchmarks/multi-turn-agent.js +254 -0
- package/dist/benchmarks/multi-turn-agent.js.map +1 -0
- package/dist/benchmarks/multi-turn-loop.d.ts +57 -0
- package/dist/benchmarks/multi-turn-loop.d.ts.map +1 -0
- package/dist/benchmarks/multi-turn-loop.js +167 -0
- package/dist/benchmarks/multi-turn-loop.js.map +1 -0
- package/dist/benchmarks/tasks.d.ts +19 -0
- package/dist/benchmarks/tasks.d.ts.map +1 -0
- package/dist/benchmarks/tasks.js +435 -0
- package/dist/benchmarks/tasks.js.map +1 -0
- package/dist/bin/cli.d.ts +3 -0
- package/dist/bin/cli.d.ts.map +1 -0
- package/dist/bin/cli.js +546 -0
- package/dist/bin/cli.js.map +1 -0
- package/dist/bin/llama-server-optimize.d.ts +18 -0
- package/dist/bin/llama-server-optimize.d.ts.map +1 -0
- package/dist/bin/llama-server-optimize.js +708 -0
- package/dist/bin/llama-server-optimize.js.map +1 -0
- package/dist/bin/policy.d.ts +3 -0
- package/dist/bin/policy.d.ts.map +1 -0
- package/dist/bin/policy.js +143 -0
- package/dist/bin/policy.js.map +1 -0
- package/dist/bin/tool-calls.d.ts +3 -0
- package/dist/bin/tool-calls.d.ts.map +1 -0
- package/dist/bin/tool-calls.js +4 -0
- package/dist/bin/tool-calls.js.map +1 -0
- package/dist/browser/index.d.ts +2 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +2 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/web-browser.d.ts +30 -0
- package/dist/browser/web-browser.d.ts.map +1 -0
- package/dist/browser/web-browser.js +93 -0
- package/dist/browser/web-browser.js.map +1 -0
- package/dist/cli/agent.d.ts +20 -0
- package/dist/cli/agent.d.ts.map +1 -0
- package/dist/cli/agent.js +474 -0
- package/dist/cli/agent.js.map +1 -0
- package/dist/cli/analyze.d.ts +7 -0
- package/dist/cli/analyze.d.ts.map +1 -0
- package/dist/cli/analyze.js +103 -0
- package/dist/cli/analyze.js.map +1 -0
- package/dist/cli/completion-gates.d.ts +51 -0
- package/dist/cli/completion-gates.d.ts.map +1 -0
- package/dist/cli/completion-gates.js +201 -0
- package/dist/cli/completion-gates.js.map +1 -0
- package/dist/cli/compliance.d.ts +8 -0
- package/dist/cli/compliance.d.ts.map +1 -0
- package/dist/cli/compliance.js +509 -0
- package/dist/cli/compliance.js.map +1 -0
- package/dist/cli/coord.d.ts +7 -0
- package/dist/cli/coord.d.ts.map +1 -0
- package/dist/cli/coord.js +138 -0
- package/dist/cli/coord.js.map +1 -0
- package/dist/cli/dashboard.d.ts +21 -0
- package/dist/cli/dashboard.d.ts.map +1 -0
- package/dist/cli/dashboard.js +1508 -0
- package/dist/cli/dashboard.js.map +1 -0
- package/dist/cli/deploy.d.ts +19 -0
- package/dist/cli/deploy.d.ts.map +1 -0
- package/dist/cli/deploy.js +387 -0
- package/dist/cli/deploy.js.map +1 -0
- package/dist/cli/droids.d.ts +9 -0
- package/dist/cli/droids.d.ts.map +1 -0
- package/dist/cli/droids.js +227 -0
- package/dist/cli/droids.js.map +1 -0
- package/dist/cli/generate.d.ts +17 -0
- package/dist/cli/generate.d.ts.map +1 -0
- package/dist/cli/generate.js +432 -0
- package/dist/cli/generate.js.map +1 -0
- package/dist/cli/hooks.d.ts +9 -0
- package/dist/cli/hooks.d.ts.map +1 -0
- package/dist/cli/hooks.js +464 -0
- package/dist/cli/hooks.js.map +1 -0
- package/dist/cli/init.d.ts +12 -0
- package/dist/cli/init.d.ts.map +1 -0
- package/dist/cli/init.js +364 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/mcp-router.d.ts +16 -0
- package/dist/cli/mcp-router.d.ts.map +1 -0
- package/dist/cli/mcp-router.js +143 -0
- package/dist/cli/mcp-router.js.map +1 -0
- package/dist/cli/memory.d.ts +24 -0
- package/dist/cli/memory.d.ts.map +1 -0
- package/dist/cli/memory.js +885 -0
- package/dist/cli/memory.js.map +1 -0
- package/dist/cli/model.d.ts +15 -0
- package/dist/cli/model.d.ts.map +1 -0
- package/dist/cli/model.js +290 -0
- package/dist/cli/model.js.map +1 -0
- package/dist/cli/patterns.d.ts +26 -0
- package/dist/cli/patterns.d.ts.map +1 -0
- package/dist/cli/patterns.js +862 -0
- package/dist/cli/patterns.js.map +1 -0
- package/dist/cli/rtk-validation.d.ts +9 -0
- package/dist/cli/rtk-validation.d.ts.map +1 -0
- package/dist/cli/rtk-validation.js +9 -0
- package/dist/cli/rtk-validation.js.map +1 -0
- package/dist/cli/rtk.d.ts +34 -0
- package/dist/cli/rtk.d.ts.map +1 -0
- package/dist/cli/rtk.js +401 -0
- package/dist/cli/rtk.js.map +1 -0
- package/dist/cli/schema-diff.d.ts +7 -0
- package/dist/cli/schema-diff.d.ts.map +1 -0
- package/dist/cli/schema-diff.js +11 -0
- package/dist/cli/schema-diff.js.map +1 -0
- package/dist/cli/setup-mcp-router.d.ts +8 -0
- package/dist/cli/setup-mcp-router.d.ts.map +1 -0
- package/dist/cli/setup-mcp-router.js +163 -0
- package/dist/cli/setup-mcp-router.js.map +1 -0
- package/dist/cli/setup-wizard.d.ts +2 -0
- package/dist/cli/setup-wizard.d.ts.map +1 -0
- package/dist/cli/setup-wizard.js +806 -0
- package/dist/cli/setup-wizard.js.map +1 -0
- package/dist/cli/setup.d.ts +15 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/setup.js +154 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/cli/sync.d.ts +8 -0
- package/dist/cli/sync.d.ts.map +1 -0
- package/dist/cli/sync.js +395 -0
- package/dist/cli/sync.js.map +1 -0
- package/dist/cli/task.d.ts +33 -0
- package/dist/cli/task.d.ts.map +1 -0
- package/dist/cli/task.js +672 -0
- package/dist/cli/task.js.map +1 -0
- package/dist/cli/tool-calls.d.ts +20 -0
- package/dist/cli/tool-calls.d.ts.map +1 -0
- package/dist/cli/tool-calls.js +605 -0
- package/dist/cli/tool-calls.js.map +1 -0
- package/dist/cli/uap.d.ts +10 -0
- package/dist/cli/uap.d.ts.map +1 -0
- package/dist/cli/uap.js +398 -0
- package/dist/cli/uap.js.map +1 -0
- package/dist/cli/update.d.ts +10 -0
- package/dist/cli/update.d.ts.map +1 -0
- package/dist/cli/update.js +300 -0
- package/dist/cli/update.js.map +1 -0
- package/dist/cli/visualize.d.ts +77 -0
- package/dist/cli/visualize.d.ts.map +1 -0
- package/dist/cli/visualize.js +287 -0
- package/dist/cli/visualize.js.map +1 -0
- package/dist/cli/worktree.d.ts +9 -0
- package/dist/cli/worktree.d.ts.map +1 -0
- package/dist/cli/worktree.js +213 -0
- package/dist/cli/worktree.js.map +1 -0
- package/dist/coordination/adaptive-patterns.d.ts +65 -0
- package/dist/coordination/adaptive-patterns.d.ts.map +1 -0
- package/dist/coordination/adaptive-patterns.js +108 -0
- package/dist/coordination/adaptive-patterns.js.map +1 -0
- package/dist/coordination/auto-agent.d.ts +82 -0
- package/dist/coordination/auto-agent.d.ts.map +1 -0
- package/dist/coordination/auto-agent.js +145 -0
- package/dist/coordination/auto-agent.js.map +1 -0
- package/dist/coordination/capability-router.d.ts +79 -0
- package/dist/coordination/capability-router.d.ts.map +1 -0
- package/dist/coordination/capability-router.js +334 -0
- package/dist/coordination/capability-router.js.map +1 -0
- package/dist/coordination/database.d.ts +13 -0
- package/dist/coordination/database.d.ts.map +1 -0
- package/dist/coordination/database.js +136 -0
- package/dist/coordination/database.js.map +1 -0
- package/dist/coordination/deploy-batcher.d.ts +122 -0
- package/dist/coordination/deploy-batcher.d.ts.map +1 -0
- package/dist/coordination/deploy-batcher.js +718 -0
- package/dist/coordination/deploy-batcher.js.map +1 -0
- package/dist/coordination/droid-validator.d.ts +59 -0
- package/dist/coordination/droid-validator.d.ts.map +1 -0
- package/dist/coordination/droid-validator.js +142 -0
- package/dist/coordination/droid-validator.js.map +1 -0
- package/dist/coordination/index.d.ts +10 -0
- package/dist/coordination/index.d.ts.map +1 -0
- package/dist/coordination/index.js +10 -0
- package/dist/coordination/index.js.map +1 -0
- package/dist/coordination/pattern-router.d.ts +50 -0
- package/dist/coordination/pattern-router.d.ts.map +1 -0
- package/dist/coordination/pattern-router.js +118 -0
- package/dist/coordination/pattern-router.js.map +1 -0
- package/dist/coordination/service.d.ts +81 -0
- package/dist/coordination/service.d.ts.map +1 -0
- package/dist/coordination/service.js +619 -0
- package/dist/coordination/service.js.map +1 -0
- package/dist/coordination/worktree-enforcer.d.ts +22 -0
- package/dist/coordination/worktree-enforcer.d.ts.map +1 -0
- package/dist/coordination/worktree-enforcer.js +71 -0
- package/dist/coordination/worktree-enforcer.js.map +1 -0
- package/dist/generators/claude-md.d.ts +3 -0
- package/dist/generators/claude-md.d.ts.map +1 -0
- package/dist/generators/claude-md.js +1020 -0
- package/dist/generators/claude-md.js.map +1 -0
- package/dist/generators/template-loader.d.ts +105 -0
- package/dist/generators/template-loader.d.ts.map +1 -0
- package/dist/generators/template-loader.js +291 -0
- package/dist/generators/template-loader.js.map +1 -0
- package/dist/index.d.ts +49 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +63 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-router/config/parser.d.ts +9 -0
- package/dist/mcp-router/config/parser.d.ts.map +1 -0
- package/dist/mcp-router/config/parser.js +174 -0
- package/dist/mcp-router/config/parser.js.map +1 -0
- package/dist/mcp-router/executor/client.d.ts +31 -0
- package/dist/mcp-router/executor/client.d.ts.map +1 -0
- package/dist/mcp-router/executor/client.js +189 -0
- package/dist/mcp-router/executor/client.js.map +1 -0
- package/dist/mcp-router/index.d.ts +22 -0
- package/dist/mcp-router/index.d.ts.map +1 -0
- package/dist/mcp-router/index.js +18 -0
- package/dist/mcp-router/index.js.map +1 -0
- package/dist/mcp-router/output-compressor.d.ts +26 -0
- package/dist/mcp-router/output-compressor.d.ts.map +1 -0
- package/dist/mcp-router/output-compressor.js +236 -0
- package/dist/mcp-router/output-compressor.js.map +1 -0
- package/dist/mcp-router/search/fuzzy.d.ts +26 -0
- package/dist/mcp-router/search/fuzzy.d.ts.map +1 -0
- package/dist/mcp-router/search/fuzzy.js +94 -0
- package/dist/mcp-router/search/fuzzy.js.map +1 -0
- package/dist/mcp-router/server.d.ts +50 -0
- package/dist/mcp-router/server.d.ts.map +1 -0
- package/dist/mcp-router/server.js +229 -0
- package/dist/mcp-router/server.js.map +1 -0
- package/dist/mcp-router/session-stats.d.ts +37 -0
- package/dist/mcp-router/session-stats.d.ts.map +1 -0
- package/dist/mcp-router/session-stats.js +56 -0
- package/dist/mcp-router/session-stats.js.map +1 -0
- package/dist/mcp-router/tools/discover.d.ts +37 -0
- package/dist/mcp-router/tools/discover.d.ts.map +1 -0
- package/dist/mcp-router/tools/discover.js +65 -0
- package/dist/mcp-router/tools/discover.js.map +1 -0
- package/dist/mcp-router/tools/execute.d.ts +43 -0
- package/dist/mcp-router/tools/execute.d.ts.map +1 -0
- package/dist/mcp-router/tools/execute.js +144 -0
- package/dist/mcp-router/tools/execute.js.map +1 -0
- package/dist/mcp-router/types.d.ts +62 -0
- package/dist/mcp-router/types.d.ts.map +1 -0
- package/dist/mcp-router/types.js +6 -0
- package/dist/mcp-router/types.js.map +1 -0
- package/dist/memory/adaptive-context.d.ts +149 -0
- package/dist/memory/adaptive-context.d.ts.map +1 -0
- package/dist/memory/adaptive-context.js +1095 -0
- package/dist/memory/adaptive-context.js.map +1 -0
- package/dist/memory/agent-scoped-memory.d.ts +67 -0
- package/dist/memory/agent-scoped-memory.d.ts.map +1 -0
- package/dist/memory/agent-scoped-memory.js +126 -0
- package/dist/memory/agent-scoped-memory.js.map +1 -0
- package/dist/memory/ambiguity-detector.d.ts +54 -0
- package/dist/memory/ambiguity-detector.d.ts.map +1 -0
- package/dist/memory/ambiguity-detector.js +401 -0
- package/dist/memory/ambiguity-detector.js.map +1 -0
- package/dist/memory/backends/base.d.ts +18 -0
- package/dist/memory/backends/base.d.ts.map +1 -0
- package/dist/memory/backends/base.js +2 -0
- package/dist/memory/backends/base.js.map +1 -0
- package/dist/memory/backends/factory.d.ts +4 -0
- package/dist/memory/backends/factory.d.ts.map +1 -0
- package/dist/memory/backends/factory.js +53 -0
- package/dist/memory/backends/factory.js.map +1 -0
- package/dist/memory/backends/github.d.ts +27 -0
- package/dist/memory/backends/github.d.ts.map +1 -0
- package/dist/memory/backends/github.js +134 -0
- package/dist/memory/backends/github.js.map +1 -0
- package/dist/memory/backends/qdrant-cloud.d.ts +32 -0
- package/dist/memory/backends/qdrant-cloud.d.ts.map +1 -0
- package/dist/memory/backends/qdrant-cloud.js +167 -0
- package/dist/memory/backends/qdrant-cloud.js.map +1 -0
- package/dist/memory/context-compressor.d.ts +116 -0
- package/dist/memory/context-compressor.d.ts.map +1 -0
- package/dist/memory/context-compressor.js +430 -0
- package/dist/memory/context-compressor.js.map +1 -0
- package/dist/memory/context-pruner.d.ts +55 -0
- package/dist/memory/context-pruner.d.ts.map +1 -0
- package/dist/memory/context-pruner.js +85 -0
- package/dist/memory/context-pruner.js.map +1 -0
- package/dist/memory/correction-propagator.d.ts +44 -0
- package/dist/memory/correction-propagator.d.ts.map +1 -0
- package/dist/memory/correction-propagator.js +156 -0
- package/dist/memory/correction-propagator.js.map +1 -0
- package/dist/memory/daily-log.d.ts +67 -0
- package/dist/memory/daily-log.d.ts.map +1 -0
- package/dist/memory/daily-log.js +143 -0
- package/dist/memory/daily-log.js.map +1 -0
- package/dist/memory/dynamic-retrieval.d.ts +112 -0
- package/dist/memory/dynamic-retrieval.d.ts.map +1 -0
- package/dist/memory/dynamic-retrieval.js +908 -0
- package/dist/memory/dynamic-retrieval.js.map +1 -0
- package/dist/memory/embeddings.d.ts +172 -0
- package/dist/memory/embeddings.d.ts.map +1 -0
- package/dist/memory/embeddings.js +780 -0
- package/dist/memory/embeddings.js.map +1 -0
- package/dist/memory/generic-uap-patterns.d.ts +7 -0
- package/dist/memory/generic-uap-patterns.d.ts.map +1 -0
- package/dist/memory/generic-uap-patterns.js +43 -0
- package/dist/memory/generic-uap-patterns.js.map +1 -0
- package/dist/memory/hierarchical-memory.d.ts +141 -0
- package/dist/memory/hierarchical-memory.d.ts.map +1 -0
- package/dist/memory/hierarchical-memory.js +485 -0
- package/dist/memory/hierarchical-memory.js.map +1 -0
- package/dist/memory/knowledge-graph.d.ts +98 -0
- package/dist/memory/knowledge-graph.d.ts.map +1 -0
- package/dist/memory/knowledge-graph.js +275 -0
- package/dist/memory/knowledge-graph.js.map +1 -0
- package/dist/memory/memory-consolidator.d.ts +124 -0
- package/dist/memory/memory-consolidator.d.ts.map +1 -0
- package/dist/memory/memory-consolidator.js +514 -0
- package/dist/memory/memory-consolidator.js.map +1 -0
- package/dist/memory/memory-maintenance.d.ts +39 -0
- package/dist/memory/memory-maintenance.d.ts.map +1 -0
- package/dist/memory/memory-maintenance.js +336 -0
- package/dist/memory/memory-maintenance.js.map +1 -0
- package/dist/memory/model-router.d.ts +105 -0
- package/dist/memory/model-router.d.ts.map +1 -0
- package/dist/memory/model-router.js +474 -0
- package/dist/memory/model-router.js.map +1 -0
- package/dist/memory/multi-view-memory.d.ts +134 -0
- package/dist/memory/multi-view-memory.d.ts.map +1 -0
- package/dist/memory/multi-view-memory.js +430 -0
- package/dist/memory/multi-view-memory.js.map +1 -0
- package/dist/memory/predictive-memory.d.ts +79 -0
- package/dist/memory/predictive-memory.d.ts.map +1 -0
- package/dist/memory/predictive-memory.js +294 -0
- package/dist/memory/predictive-memory.js.map +1 -0
- package/dist/memory/prepopulate.d.ts +76 -0
- package/dist/memory/prepopulate.d.ts.map +1 -0
- package/dist/memory/prepopulate.js +832 -0
- package/dist/memory/prepopulate.js.map +1 -0
- package/dist/memory/semantic-compression.d.ts +77 -0
- package/dist/memory/semantic-compression.d.ts.map +1 -0
- package/dist/memory/semantic-compression.js +359 -0
- package/dist/memory/semantic-compression.js.map +1 -0
- package/dist/memory/serverless-qdrant.d.ts +102 -0
- package/dist/memory/serverless-qdrant.d.ts.map +1 -0
- package/dist/memory/serverless-qdrant.js +369 -0
- package/dist/memory/serverless-qdrant.js.map +1 -0
- package/dist/memory/short-term/factory.d.ts +26 -0
- package/dist/memory/short-term/factory.d.ts.map +1 -0
- package/dist/memory/short-term/factory.js +28 -0
- package/dist/memory/short-term/factory.js.map +1 -0
- package/dist/memory/short-term/indexeddb.d.ts +25 -0
- package/dist/memory/short-term/indexeddb.d.ts.map +1 -0
- package/dist/memory/short-term/indexeddb.js +64 -0
- package/dist/memory/short-term/indexeddb.js.map +1 -0
- package/dist/memory/short-term/schema.d.ts +6 -0
- package/dist/memory/short-term/schema.d.ts.map +1 -0
- package/dist/memory/short-term/schema.js +141 -0
- package/dist/memory/short-term/schema.js.map +1 -0
- package/dist/memory/short-term/sqlite.d.ts +64 -0
- package/dist/memory/short-term/sqlite.d.ts.map +1 -0
- package/dist/memory/short-term/sqlite.js +274 -0
- package/dist/memory/short-term/sqlite.js.map +1 -0
- package/dist/memory/speculative-cache.d.ts +111 -0
- package/dist/memory/speculative-cache.d.ts.map +1 -0
- package/dist/memory/speculative-cache.js +457 -0
- package/dist/memory/speculative-cache.js.map +1 -0
- package/dist/memory/task-classifier.d.ts +40 -0
- package/dist/memory/task-classifier.d.ts.map +1 -0
- package/dist/memory/task-classifier.js +342 -0
- package/dist/memory/task-classifier.js.map +1 -0
- package/dist/memory/terminal-bench-knowledge.d.ts +48 -0
- package/dist/memory/terminal-bench-knowledge.d.ts.map +1 -0
- package/dist/memory/terminal-bench-knowledge.js +622 -0
- package/dist/memory/terminal-bench-knowledge.js.map +1 -0
- package/dist/memory/write-gate.d.ts +39 -0
- package/dist/memory/write-gate.d.ts.map +1 -0
- package/dist/memory/write-gate.js +190 -0
- package/dist/memory/write-gate.js.map +1 -0
- package/dist/models/api-client.d.ts +46 -0
- package/dist/models/api-client.d.ts.map +1 -0
- package/dist/models/api-client.js +182 -0
- package/dist/models/api-client.js.map +1 -0
- package/dist/models/execution-profiles.d.ts +64 -0
- package/dist/models/execution-profiles.d.ts.map +1 -0
- package/dist/models/execution-profiles.js +403 -0
- package/dist/models/execution-profiles.js.map +1 -0
- package/dist/models/executor.d.ts +130 -0
- package/dist/models/executor.d.ts.map +1 -0
- package/dist/models/executor.js +382 -0
- package/dist/models/executor.js.map +1 -0
- package/dist/models/index.d.ts +19 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +23 -0
- package/dist/models/index.js.map +1 -0
- package/dist/models/plan-validator.d.ts +37 -0
- package/dist/models/plan-validator.d.ts.map +1 -0
- package/dist/models/plan-validator.js +179 -0
- package/dist/models/plan-validator.js.map +1 -0
- package/dist/models/planner.d.ts +73 -0
- package/dist/models/planner.d.ts.map +1 -0
- package/dist/models/planner.js +375 -0
- package/dist/models/planner.js.map +1 -0
- package/dist/models/router.d.ts +96 -0
- package/dist/models/router.d.ts.map +1 -0
- package/dist/models/router.js +523 -0
- package/dist/models/router.js.map +1 -0
- package/dist/models/types.d.ts +370 -0
- package/dist/models/types.d.ts.map +1 -0
- package/dist/models/types.js +232 -0
- package/dist/models/types.js.map +1 -0
- package/dist/models/unified-router.d.ts +152 -0
- package/dist/models/unified-router.d.ts.map +1 -0
- package/dist/models/unified-router.js +313 -0
- package/dist/models/unified-router.js.map +1 -0
- package/dist/policies/convert-policy-to-claude.d.ts +3 -0
- package/dist/policies/convert-policy-to-claude.d.ts.map +1 -0
- package/dist/policies/convert-policy-to-claude.js +87 -0
- package/dist/policies/convert-policy-to-claude.js.map +1 -0
- package/dist/policies/database-manager.d.ts +27 -0
- package/dist/policies/database-manager.d.ts.map +1 -0
- package/dist/policies/database-manager.js +198 -0
- package/dist/policies/database-manager.js.map +1 -0
- package/dist/policies/enforced-tool-router.d.ts +53 -0
- package/dist/policies/enforced-tool-router.d.ts.map +1 -0
- package/dist/policies/enforced-tool-router.js +80 -0
- package/dist/policies/enforced-tool-router.js.map +1 -0
- package/dist/policies/index.d.ts +10 -0
- package/dist/policies/index.d.ts.map +1 -0
- package/dist/policies/index.js +8 -0
- package/dist/policies/index.js.map +1 -0
- package/dist/policies/policy-gate.d.ts +59 -0
- package/dist/policies/policy-gate.d.ts.map +1 -0
- package/dist/policies/policy-gate.js +171 -0
- package/dist/policies/policy-gate.js.map +1 -0
- package/dist/policies/policy-memory.d.ts +18 -0
- package/dist/policies/policy-memory.d.ts.map +1 -0
- package/dist/policies/policy-memory.js +126 -0
- package/dist/policies/policy-memory.js.map +1 -0
- package/dist/policies/policy-tools.d.ts +11 -0
- package/dist/policies/policy-tools.d.ts.map +1 -0
- package/dist/policies/policy-tools.js +66 -0
- package/dist/policies/policy-tools.js.map +1 -0
- package/dist/policies/schemas/policy.d.ts +69 -0
- package/dist/policies/schemas/policy.d.ts.map +1 -0
- package/dist/policies/schemas/policy.js +31 -0
- package/dist/policies/schemas/policy.js.map +1 -0
- package/dist/tasks/coordination.d.ts +83 -0
- package/dist/tasks/coordination.d.ts.map +1 -0
- package/dist/tasks/coordination.js +291 -0
- package/dist/tasks/coordination.js.map +1 -0
- package/dist/tasks/database.d.ts +19 -0
- package/dist/tasks/database.d.ts.map +1 -0
- package/dist/tasks/database.js +149 -0
- package/dist/tasks/database.js.map +1 -0
- package/dist/tasks/decoder-gate.d.ts +64 -0
- package/dist/tasks/decoder-gate.d.ts.map +1 -0
- package/dist/tasks/decoder-gate.js +268 -0
- package/dist/tasks/decoder-gate.js.map +1 -0
- package/dist/tasks/index.d.ts +6 -0
- package/dist/tasks/index.d.ts.map +1 -0
- package/dist/tasks/index.js +6 -0
- package/dist/tasks/index.js.map +1 -0
- package/dist/tasks/service.d.ts +40 -0
- package/dist/tasks/service.d.ts.map +1 -0
- package/dist/tasks/service.js +671 -0
- package/dist/tasks/service.js.map +1 -0
- package/dist/tasks/types.d.ts +238 -0
- package/dist/tasks/types.d.ts.map +1 -0
- package/dist/tasks/types.js +74 -0
- package/dist/tasks/types.js.map +1 -0
- package/dist/telemetry/index.d.ts +2 -0
- package/dist/telemetry/index.d.ts.map +1 -0
- package/dist/telemetry/index.js +2 -0
- package/dist/telemetry/index.js.map +1 -0
- package/dist/telemetry/session-telemetry.d.ts +56 -0
- package/dist/telemetry/session-telemetry.d.ts.map +1 -0
- package/dist/telemetry/session-telemetry.js +807 -0
- package/dist/telemetry/session-telemetry.js.map +1 -0
- package/dist/types/analysis.d.ts +82 -0
- package/dist/types/analysis.d.ts.map +1 -0
- package/dist/types/analysis.js +2 -0
- package/dist/types/analysis.js.map +1 -0
- package/dist/types/config.d.ts +3324 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +418 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/coordination.d.ts +240 -0
- package/dist/types/coordination.d.ts.map +1 -0
- package/dist/types/coordination.js +43 -0
- package/dist/types/coordination.js.map +1 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +4 -0
- package/dist/types/index.js.map +1 -0
- package/dist/uap-droids-strict.d.ts +59 -0
- package/dist/uap-droids-strict.d.ts.map +1 -0
- package/dist/uap-droids-strict.js +200 -0
- package/dist/uap-droids-strict.js.map +1 -0
- package/dist/utils/config-manager.d.ts +30 -0
- package/dist/utils/config-manager.d.ts.map +1 -0
- package/dist/utils/config-manager.js +41 -0
- package/dist/utils/config-manager.js.map +1 -0
- package/dist/utils/fetch-with-retry.d.ts +5 -0
- package/dist/utils/fetch-with-retry.d.ts.map +1 -0
- package/dist/utils/fetch-with-retry.js +61 -0
- package/dist/utils/fetch-with-retry.js.map +1 -0
- package/dist/utils/merge-claude-md.d.ts +28 -0
- package/dist/utils/merge-claude-md.d.ts.map +1 -0
- package/dist/utils/merge-claude-md.js +342 -0
- package/dist/utils/merge-claude-md.js.map +1 -0
- package/dist/utils/rate-limiter.d.ts +58 -0
- package/dist/utils/rate-limiter.d.ts.map +1 -0
- package/dist/utils/rate-limiter.js +100 -0
- package/dist/utils/rate-limiter.js.map +1 -0
- package/dist/utils/string-similarity.d.ts +37 -0
- package/dist/utils/string-similarity.d.ts.map +1 -0
- package/dist/utils/string-similarity.js +114 -0
- package/dist/utils/string-similarity.js.map +1 -0
- package/dist/utils/validate-json.d.ts +51 -0
- package/dist/utils/validate-json.d.ts.map +1 -0
- package/dist/utils/validate-json.js +94 -0
- package/dist/utils/validate-json.js.map +1 -0
- package/docs/INDEX.md +66 -0
- package/docs/architecture/MULTI_MODEL.md +224 -0
- package/docs/architecture/SYSTEM_ANALYSIS.md +1117 -0
- package/docs/architecture/UAP_COMPLIANCE.md +217 -0
- package/docs/architecture/UAP_PROTOCOL.md +339 -0
- package/docs/architecture/UAP_STRICT_DROIDS.md +172 -0
- package/docs/archive/BALLS_MODE_SELF_ANALYSIS.md +260 -0
- package/docs/archive/FAILING_TASKS_SOLUTION_PLAN.md +668 -0
- package/docs/archive/JINJA2-SYSTEM-MESSAGE-FIX.md +209 -0
- package/docs/archive/NPM-PUBLISH-V0.9.1.md +240 -0
- package/docs/archive/OPTIMIZATION_OPTIONS.md +334 -0
- package/docs/archive/SETUP_IMPROVEMENTS.md +213 -0
- package/docs/archive/UAP_GENERIC_OPTIMIZATION_PLAN.md +270 -0
- package/docs/archive/UAP_V103_PATTERN_DESIGN.md +315 -0
- package/docs/archive/UAP_V104_COMPLIANCE_DESIGN.md +223 -0
- package/docs/archive/changelog/2026-03-10_uap-100-compliance.md +77 -0
- package/docs/archive/changelog/2026-03-10_uap-full-system-verification.md +109 -0
- package/docs/benchmarks/ACCURACY_ANALYSIS.md +471 -0
- package/docs/benchmarks/TOKEN_OPTIMIZATION.md +572 -0
- package/docs/benchmarks/VALIDATION_PLAN.md +568 -0
- package/docs/benchmarks/VALIDATION_RESULTS.md +161 -0
- package/docs/deployment/DEPLOYMENT.md +895 -0
- package/docs/deployment/DEPLOYMENT_STRATEGIES.md +518 -0
- package/docs/deployment/DEPLOY_BATCHER_ANALYSIS.md +856 -0
- package/docs/deployment/DEPLOY_BATCHING.md +273 -0
- package/docs/deployment/DEPLOY_BUCKETING_ANALYSIS.md +420 -0
- package/docs/deployment/QWEN35_LLAMA_CPP.md +265 -0
- package/docs/getting-started/INTEGRATION.md +449 -0
- package/docs/getting-started/OVERVIEW.md +344 -0
- package/docs/getting-started/SETUP.md +203 -0
- package/docs/integrations/MCP_ROUTER_SETUP.md +445 -0
- package/docs/integrations/RTK_INTEGRATION.md +468 -0
- package/docs/operations/TROUBLESHOOTING.md +660 -0
- package/docs/reference/API_REFERENCE.md +903 -0
- package/docs/reference/FEATURES.md +472 -0
- package/docs/reference/HARNESS-MATRIX.md +318 -0
- package/docs/reference/UAP_CLI_REFERENCE.md +600 -0
- package/docs/research/BEHAVIORAL_PATTERNS.md +228 -0
- package/docs/research/DOMAIN_STRATEGIES.md +316 -0
- package/docs/research/MEMORY_SYSTEMS_COMPARISON.md +812 -0
- package/docs/research/PATTERN_ANALYSIS_2026-01-18.md +436 -0
- package/docs/research/PERFORMANCE_ANALYSIS_2026-01-18.md +209 -0
- package/docs/research/PERFORMANCE_TEST_PLAN.md +383 -0
- package/docs/research/TERMINAL_BENCH_LEARNINGS.md +217 -0
- package/package.json +113 -0
- package/scripts/README.md +161 -0
- package/templates/CLAUDE.template.md +10 -0
- package/templates/CLAUDE_ARCHITECTURE.template.md +103 -0
- package/templates/CLAUDE_CODING.template.md +127 -0
- package/templates/CLAUDE_DROIDS.template.md +109 -0
- package/templates/CLAUDE_MEMORY.template.md +131 -0
- package/templates/CLAUDE_WORKFLOWS.template.md +139 -0
- package/templates/PROJECT.template.md +209 -0
- package/templates/SCHEMA.md +57 -0
- package/templates/archive/CLAUDE.template.root-v6.md +534 -0
- package/templates/archive/CLAUDE.template.v6.md +534 -0
- package/templates/hooks/forgecode/pre-compact.sh +68 -0
- package/templates/hooks/forgecode/session-start.sh +169 -0
- package/templates/hooks/forgecode.plugin.sh +128 -0
- package/templates/hooks/pre-compact.sh +74 -0
- package/templates/hooks/session-start.sh +366 -0
- package/tools/agents/README.md +224 -0
- package/tools/agents/UAP/README.md +386 -0
- package/tools/agents/UAP/__init__.py +9 -0
- package/tools/agents/UAP/cli.py +901 -0
- package/tools/agents/UAP/compliance_verify.sh +108 -0
- package/tools/agents/UAP/full_verification.sh +126 -0
- package/tools/agents/UAP/version.py +32 -0
- package/tools/agents/benchmarks/benchmark_memory_systems.py +730 -0
- package/tools/agents/benchmarks/results/benchmark_20260106_064817.json +170 -0
- package/tools/agents/benchmarks/results/benchmark_20260106_064817.md +51 -0
- package/tools/agents/config/chat_template.jinja +77 -0
- package/tools/agents/config/tool-call-schema.json +19 -0
- package/tools/agents/config/tool-call.gbnf +58 -0
- package/tools/agents/docker/Dockerfile.python +52 -0
- package/tools/agents/docker/Dockerfile.ubuntu +55 -0
- package/tools/agents/docker-compose.qdrant.yml +24 -0
- package/tools/agents/install-opencode-local.sh.j2 +135 -0
- package/tools/agents/migrations/apply.py +256 -0
- package/tools/agents/opencode_uap_agent.py +1505 -0
- package/tools/agents/plugin/README.md +91 -0
- package/tools/agents/plugin/index.ts +46 -0
- package/tools/agents/plugin/pre-compact.sh +68 -0
- package/tools/agents/plugin/session-start.sh +175 -0
- package/tools/agents/plugin/uap-commands.ts +45 -0
- package/tools/agents/plugin/uap-droids.ts +54 -0
- package/tools/agents/plugin/uap-patterns.ts +54 -0
- package/tools/agents/plugin/uap-skills.ts +52 -0
- package/tools/agents/plugins/uap-enforce.ts +314 -0
- package/tools/agents/scripts/__pycache__/tool_call_wrapper.cpython-313.pyc +0 -0
- package/tools/agents/scripts/chat_template_verifier.py +343 -0
- package/tools/agents/scripts/fix-qwen-template.js +38 -0
- package/tools/agents/scripts/fix_qwen_chat_template.py +316 -0
- package/tools/agents/scripts/generate_lora_training_data.py +412 -0
- package/tools/agents/scripts/init_qdrant.py +151 -0
- package/tools/agents/scripts/memory_migration.py +560 -0
- package/tools/agents/scripts/migrate_memory_to_qdrant.py +110 -0
- package/tools/agents/scripts/prepare_lora.sh +512 -0
- package/tools/agents/scripts/query_memory.py +200 -0
- package/tools/agents/scripts/qwen-tool-call-test.js +38 -0
- package/tools/agents/scripts/qwen-tool-call-wrapper.js +38 -0
- package/tools/agents/scripts/qwen_tool_call_test.py +464 -0
- package/tools/agents/scripts/qwen_tool_call_wrapper.py +686 -0
- package/tools/agents/scripts/start-services.sh +96 -0
- package/tools/agents/scripts/tool-choice-proxy.cjs +296 -0
- package/tools/agents/scripts/tool_call_test.py +656 -0
- package/tools/agents/scripts/tool_call_wrapper.py +799 -0
- package/tools/agents/tests/test_uap_compliance.py +257 -0
- package/tools/agents/uap_agent.py +122 -0
- package/tools/agents/uap_agent_install.sh +12 -0
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
# Behavioral Patterns Analysis - Terminal-Bench 2.0
|
|
2
|
+
|
|
3
|
+
## Key Discovery: Environment Isolation
|
|
4
|
+
|
|
5
|
+
**CRITICAL INSIGHT**: Pre-hooks run in the AGENT environment, but tests run in a SEPARATE environment.
|
|
6
|
+
- Packages installed via pip in pre-hooks ARE NOT available during testing
|
|
7
|
+
- Only packages in the Dockerfile are available
|
|
8
|
+
- Solution: Use only pre-installed tools (openssl CLI, bs4 if in Dockerfile) via subprocess
|
|
9
|
+
|
|
10
|
+
**Before implementing any task**: Check `/tmp/tbench2/{task}/environment/Dockerfile` to see what's available.
|
|
11
|
+
|
|
12
|
+
## Pattern Analysis from 54 Task Benchmark
|
|
13
|
+
|
|
14
|
+
### Successful Task Characteristics (11/54 = 20.4%)
|
|
15
|
+
|
|
16
|
+
| Task | Pattern | Why It Worked |
|
|
17
|
+
|------|---------|---------------|
|
|
18
|
+
| configure-git-webserver | Clear step-by-step instructions | Agent follows recipe |
|
|
19
|
+
| crack-7z-hash | Single clear goal + tools available | hashcat/john pre-installed |
|
|
20
|
+
| custom-memory-heap-crash | Debugging with clear symptoms | Edit single file |
|
|
21
|
+
| fix-git | Git recovery with clear goal | Standard git commands |
|
|
22
|
+
| headless-terminal | Implement interface | Clear API contract |
|
|
23
|
+
| install-windows-3.11 | VM setup with specs | QEMU commands documented |
|
|
24
|
+
| multi-source-data-merger | Data transformation | pandas operations |
|
|
25
|
+
| prove-plus-comm | Complete partial proof | Coq tactics |
|
|
26
|
+
| pytorch-model-cli | Build CLI tool | Standard PyTorch |
|
|
27
|
+
| qemu-startup | Start VM and wait | QEMU + telnet |
|
|
28
|
+
| adaptive-rejection-sampler | Implement algorithm | R programming |
|
|
29
|
+
|
|
30
|
+
### Failed Task Characteristics (43/54 = 79.6%)
|
|
31
|
+
|
|
32
|
+
| Pattern | Examples | Why It Failed |
|
|
33
|
+
|---------|----------|---------------|
|
|
34
|
+
| **Requires pre-computed solution** | gpt2-codegolf, regex-chess, path-tracing | Solution is data, not algorithm |
|
|
35
|
+
| **First action destroys state** | db-wal-recovery | sqlite3 checkpoints WAL |
|
|
36
|
+
| **Complex multi-step build** | compile-compcert, caffe-cifar-10 | Dependencies, config issues |
|
|
37
|
+
| **Needs vision/multimedia** | chess-best-move, extract-moves-from-video | Image/video parsing |
|
|
38
|
+
| **Forensics/recovery** | password-recovery, git-leak-recovery | Deleted data recovery |
|
|
39
|
+
| **Exact output matching** | filter-js-from-html | Must preserve formatting exactly |
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Exploitable Behavioral Patterns
|
|
44
|
+
|
|
45
|
+
### Pattern 1: "Recipe Following" Tasks
|
|
46
|
+
**Success Rate: HIGH**
|
|
47
|
+
|
|
48
|
+
Tasks with clear, sequential instructions succeed because the agent:
|
|
49
|
+
- Executes commands in order
|
|
50
|
+
- Verifies each step
|
|
51
|
+
- Doesn't need creative problem-solving
|
|
52
|
+
|
|
53
|
+
**Exploit Strategy**: Convert complex tasks into step-by-step recipes in pre-hook context.
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
# Example: Instead of "configure git server"
|
|
57
|
+
# Provide:
|
|
58
|
+
# 1. apt install git
|
|
59
|
+
# 2. mkdir /git/server && cd /git/server && git init --bare
|
|
60
|
+
# 3. Create post-receive hook
|
|
61
|
+
# 4. Configure nginx
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Pattern 2: "Tool Availability" Tasks
|
|
65
|
+
**Success Rate: HIGH**
|
|
66
|
+
|
|
67
|
+
Tasks succeed when:
|
|
68
|
+
- Required tools are pre-installed
|
|
69
|
+
- Agent knows which tool to use
|
|
70
|
+
- Tool has standard CLI interface
|
|
71
|
+
|
|
72
|
+
**Exploit Strategy**: Pre-install tools AND tell agent which to use.
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
PRE_COMMANDS = [
|
|
76
|
+
'apt-get install -y hashcat john', # Install
|
|
77
|
+
]
|
|
78
|
+
POST_CONTEXT = '''
|
|
79
|
+
**USE hashcat** for this task:
|
|
80
|
+
hashcat -m 11600 -a 0 hash.txt wordlist.txt
|
|
81
|
+
'''
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Pattern 3: "Single File Edit" Tasks
|
|
85
|
+
**Success Rate: HIGH**
|
|
86
|
+
|
|
87
|
+
Tasks that require editing ONE file with clear constraints succeed.
|
|
88
|
+
|
|
89
|
+
**Exploit Strategy**: Identify the single file and provide exact modification guidance.
|
|
90
|
+
|
|
91
|
+
### Pattern 4: "State Destruction Prevention"
|
|
92
|
+
**Success Rate: MEDIUM (with pre-hooks)**
|
|
93
|
+
|
|
94
|
+
Tasks where first action destroys critical state fail WITHOUT pre-hooks.
|
|
95
|
+
With pre-hooks backing up state BEFORE agent runs: success.
|
|
96
|
+
|
|
97
|
+
**Exploit Strategy**: Identify destructive first actions and pre-empt them.
|
|
98
|
+
|
|
99
|
+
```python
|
|
100
|
+
# db-wal-recovery: sqlite3 destroys WAL
|
|
101
|
+
PRE_COMMANDS = ['cp /app/main.db-wal /tmp/backup.wal']
|
|
102
|
+
|
|
103
|
+
# password-recovery: File already deleted
|
|
104
|
+
PRE_COMMANDS = ['strings /dev/sda | grep "PASSWORD=" > /tmp/strings.txt']
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Pattern 5: "Pre-Computed Solution" Tasks
|
|
108
|
+
**Success Rate: ZERO without solution**
|
|
109
|
+
|
|
110
|
+
Tasks requiring algorithmic compression or pre-computed data CANNOT be solved
|
|
111
|
+
by the agent in real-time.
|
|
112
|
+
|
|
113
|
+
**Exploit Strategy**: Embed solutions in pre-hooks for known tasks.
|
|
114
|
+
|
|
115
|
+
```python
|
|
116
|
+
# gpt2-codegolf: Pre-computed C file
|
|
117
|
+
PRE_COMMANDS = [
|
|
118
|
+
'cat > /app/gpt2.c << "EOF"\n... pre-computed solution ...\nEOF'
|
|
119
|
+
]
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Actionable Improvements
|
|
125
|
+
|
|
126
|
+
### Improvement 1: Expand Pre-Hook Coverage
|
|
127
|
+
|
|
128
|
+
Add pre-hooks for these high-value tasks:
|
|
129
|
+
|
|
130
|
+
```python
|
|
131
|
+
'password-recovery': {
|
|
132
|
+
'pre_commands': [
|
|
133
|
+
# Scan for deleted data before agent can corrupt disk further
|
|
134
|
+
'strings /dev/sda 2>/dev/null | grep -E "PASSWORD=.{20}" > /tmp/passwords.txt || true',
|
|
135
|
+
'grep -r "PASSWORD=" /app/ 2>/dev/null > /tmp/app_passwords.txt || true',
|
|
136
|
+
],
|
|
137
|
+
'post_context': '''Check /tmp/passwords.txt for recovered passwords.
|
|
138
|
+
Look for pattern: PASSWORD=8XD...W54 (23 chars total)'''
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
'compile-compcert': {
|
|
142
|
+
'pre_commands': [
|
|
143
|
+
# Pre-install ALL dependencies
|
|
144
|
+
'apt-get update && apt-get install -y ocaml ocaml-native-compilers menhir coq',
|
|
145
|
+
'cd /tmp/CompCert && ./configure x86_64-linux',
|
|
146
|
+
],
|
|
147
|
+
'post_context': '''Dependencies installed. Just run: make -j$(nproc)'''
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Improvement 2: Task Category Detection
|
|
152
|
+
|
|
153
|
+
Expand classification to detect more patterns:
|
|
154
|
+
|
|
155
|
+
```python
|
|
156
|
+
TASK_PATTERNS = {
|
|
157
|
+
'recipe_following': {
|
|
158
|
+
'indicators': ['step 1', 'then', 'after that', 'configure', 'setup'],
|
|
159
|
+
'strategy': 'execute_sequentially',
|
|
160
|
+
},
|
|
161
|
+
'tool_usage': {
|
|
162
|
+
'indicators': ['crack', 'hash', 'extract', 'compile'],
|
|
163
|
+
'strategy': 'identify_and_use_tool',
|
|
164
|
+
},
|
|
165
|
+
'state_destructive': {
|
|
166
|
+
'indicators': ['wal', 'deleted', 'corrupted', 'recovery'],
|
|
167
|
+
'strategy': 'backup_first',
|
|
168
|
+
},
|
|
169
|
+
'pre_computed': {
|
|
170
|
+
'indicators': ['<5000 bytes', 'codegolf', 'regex.*json', 'compressed'],
|
|
171
|
+
'strategy': 'embed_solution',
|
|
172
|
+
},
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Improvement 3: Failure Recovery Prompts
|
|
177
|
+
|
|
178
|
+
When agent fails, provide targeted recovery guidance:
|
|
179
|
+
|
|
180
|
+
```python
|
|
181
|
+
RECOVERY_PROMPTS = {
|
|
182
|
+
'command not found': 'Install the tool first: apt-get install -y {tool}',
|
|
183
|
+
'permission denied': 'Run with sudo or check file permissions',
|
|
184
|
+
'file not found': 'Check the path. Use: find / -name "{filename}" 2>/dev/null',
|
|
185
|
+
'syntax error': 'Check the file syntax. Common issues: missing quotes, brackets',
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Improvement 4: Pre-Computed Solution Library
|
|
190
|
+
|
|
191
|
+
For tasks that REQUIRE pre-computed solutions, embed them:
|
|
192
|
+
|
|
193
|
+
```python
|
|
194
|
+
PRECOMPUTED_SOLUTIONS = {
|
|
195
|
+
'gpt2-codegolf': 'base64_encoded_solution_here',
|
|
196
|
+
'regex-chess': 'base64_encoded_regex_json_here',
|
|
197
|
+
'path-tracing': 'base64_encoded_c_file_here',
|
|
198
|
+
}
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Generalized Insights
|
|
204
|
+
|
|
205
|
+
### What Works (Agent Strengths)
|
|
206
|
+
1. **Following clear instructions** - Recipe-style tasks
|
|
207
|
+
2. **Using standard tools** - When tool + usage is specified
|
|
208
|
+
3. **Single-file modifications** - Clear scope
|
|
209
|
+
4. **Standard programming tasks** - Python, C, R implementations
|
|
210
|
+
5. **VM/container operations** - QEMU, Docker commands
|
|
211
|
+
|
|
212
|
+
### What Fails (Agent Weaknesses)
|
|
213
|
+
1. **Creative algorithm design** - Can't invent compressed solutions
|
|
214
|
+
2. **State-sensitive operations** - First action often destroys needed state
|
|
215
|
+
3. **Exact formatting preservation** - HTML/text formatting drift
|
|
216
|
+
4. **Multi-hour builds** - Timeout before completion
|
|
217
|
+
5. **Vision/multimedia** - No image/video understanding
|
|
218
|
+
6. **Forensic recovery** - Can't scan raw disk effectively
|
|
219
|
+
|
|
220
|
+
### Meta-Strategy
|
|
221
|
+
|
|
222
|
+
The optimal strategy is:
|
|
223
|
+
1. **Classify task** into pattern category
|
|
224
|
+
2. **Run pre-hooks** to protect state and pre-compute what's needed
|
|
225
|
+
3. **Provide recipe** in prompt for recipe-following tasks
|
|
226
|
+
4. **Specify tools** for tool-usage tasks
|
|
227
|
+
5. **Embed solutions** for pre-computed tasks
|
|
228
|
+
6. **Skip impossible** tasks (vision, multi-hour builds)
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
# Domain Strategy Guides for Terminal-Bench Tasks
|
|
2
|
+
|
|
3
|
+
**Purpose:** Provide domain-specific knowledge for competitive and specialized tasks where generic problem-solving isn't sufficient.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. CoreWars Strategy Guide
|
|
8
|
+
|
|
9
|
+
### The Rock-Paper-Scissors of CoreWars
|
|
10
|
+
|
|
11
|
+
| Warrior Type | Beats | Loses To |
|
|
12
|
+
| ---------------------- | -------- | --------- |
|
|
13
|
+
| **Paper** (replicator) | Stone | Scanner |
|
|
14
|
+
| **Stone** (bomber) | Scanner | Paper |
|
|
15
|
+
| **Scanner** (hunter) | Paper | Stone |
|
|
16
|
+
| **Imp** (survivor) | Ties all | Wins none |
|
|
17
|
+
|
|
18
|
+
### Stone Bombers (like Terminal-Bench opponents)
|
|
19
|
+
|
|
20
|
+
**How Stone Works:**
|
|
21
|
+
|
|
22
|
+
- Drops DAT bombs at regular intervals
|
|
23
|
+
- Moves through memory at fixed step size
|
|
24
|
+
- If bomb lands on opponent's code, opponent process dies
|
|
25
|
+
|
|
26
|
+
**How to Beat Stone:**
|
|
27
|
+
|
|
28
|
+
1. **Paper Strategy** - Self-replicate faster than bombing
|
|
29
|
+
2. **Imp Strategy** - Move through memory avoiding bombs (ties)
|
|
30
|
+
3. **Vampire Strategy** - Place JMP traps to capture Stone's processes
|
|
31
|
+
|
|
32
|
+
### Winning Paper Warrior Template
|
|
33
|
+
|
|
34
|
+
```redcode
|
|
35
|
+
;redcode-94
|
|
36
|
+
;name PaperWins
|
|
37
|
+
;author UAP
|
|
38
|
+
;strategy Self-replicate to outpace stone bomber
|
|
39
|
+
|
|
40
|
+
org start
|
|
41
|
+
|
|
42
|
+
start spl 0 ; Create multiple processes
|
|
43
|
+
mov -1, @0 ; Copy itself forward
|
|
44
|
+
add #100, -1 ; Increment destination
|
|
45
|
+
jmz -2, @-2 ; Loop if target empty
|
|
46
|
+
|
|
47
|
+
end start
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Hybrid Paper-Imp (Best of Both)
|
|
51
|
+
|
|
52
|
+
```redcode
|
|
53
|
+
;redcode-94
|
|
54
|
+
;name HybridWinner
|
|
55
|
+
;author UAP
|
|
56
|
+
;strategy Paper with imp backup
|
|
57
|
+
|
|
58
|
+
org start
|
|
59
|
+
|
|
60
|
+
; Paper section - replicates
|
|
61
|
+
start spl paper
|
|
62
|
+
jmp imp
|
|
63
|
+
|
|
64
|
+
paper spl 0
|
|
65
|
+
mov -1, @0
|
|
66
|
+
add #100, -1
|
|
67
|
+
jmz -2, @-2
|
|
68
|
+
|
|
69
|
+
; Imp section - survives even if paper dies
|
|
70
|
+
imp mov 0, 2667 ; Imp step (8000/3)
|
|
71
|
+
|
|
72
|
+
end start
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Testing Strategy
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# Test against stone
|
|
79
|
+
pmars -b -r 100 my_warrior.red warriors/stone.red
|
|
80
|
+
|
|
81
|
+
# Results format: wins-ties-losses
|
|
82
|
+
# Need 75%+ wins (75+ in first number)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## 2. Chess Strategy Guide
|
|
88
|
+
|
|
89
|
+
### Using Stockfish Correctly
|
|
90
|
+
|
|
91
|
+
**DO NOT** try to calculate chess moves through reasoning. Always use Stockfish.
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# Install
|
|
95
|
+
apt-get install -y stockfish
|
|
96
|
+
|
|
97
|
+
# Basic best move
|
|
98
|
+
echo -e "position fen $FEN\ngo depth 20" | stockfish | grep bestmove
|
|
99
|
+
|
|
100
|
+
# Multiple best moves (for finding ALL winning moves)
|
|
101
|
+
echo -e "position fen $FEN\ngo movetime 5000 multipv 5" | stockfish
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### FEN Notation
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
- Rows separated by `/`
|
|
111
|
+
- Lowercase = black, uppercase = white
|
|
112
|
+
- Numbers = empty squares
|
|
113
|
+
- `w` = white to move, `b` = black
|
|
114
|
+
- `KQkq` = castling rights
|
|
115
|
+
- `-` = en passant square (or none)
|
|
116
|
+
- `0 1` = halfmove clock, fullmove number
|
|
117
|
+
|
|
118
|
+
### Image to FEN (CRITICAL)
|
|
119
|
+
|
|
120
|
+
**NEVER trust visual reasoning for FEN extraction.** Use tools:
|
|
121
|
+
|
|
122
|
+
```python
|
|
123
|
+
# Option 1: board_to_fen library
|
|
124
|
+
pip install board_to_fen
|
|
125
|
+
from board_to_fen import predict
|
|
126
|
+
fen = predict('chess_board.png')
|
|
127
|
+
|
|
128
|
+
# Option 2: Manual entry if image simple
|
|
129
|
+
# Read squares left-to-right, top-to-bottom
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Finding ALL Checkmates
|
|
133
|
+
|
|
134
|
+
For tasks asking for "best move" or "checkmate", there may be MULTIPLE correct answers:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
# Get top 5 candidate moves
|
|
138
|
+
echo -e "position fen $FEN\ngo movetime 10000 multipv 5" | stockfish
|
|
139
|
+
|
|
140
|
+
# For each candidate, verify if it's checkmate
|
|
141
|
+
for move in $CANDIDATES; do
|
|
142
|
+
echo -e "position fen $FEN moves $move\ngo mate 1" | stockfish
|
|
143
|
+
done
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## 3. Compression Strategy Guide
|
|
149
|
+
|
|
150
|
+
### Understanding Provided Decoders
|
|
151
|
+
|
|
152
|
+
**CRITICAL**: Before writing a compressor, analyze the decoder:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
# Find input parsing
|
|
156
|
+
grep -n "fread\|getchar\|fgetc" decomp.c
|
|
157
|
+
|
|
158
|
+
# Find data structures
|
|
159
|
+
grep -n "struct\|typedef" decomp.c
|
|
160
|
+
|
|
161
|
+
# Find decompression algorithm
|
|
162
|
+
grep -n "while\|for" decomp.c | head -20
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Round-Trip Testing
|
|
166
|
+
|
|
167
|
+
**ALWAYS verify round-trip before optimizing:**
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
# Test with simple data first
|
|
171
|
+
echo "test" > /tmp/original.txt
|
|
172
|
+
./compress /tmp/original.txt /tmp/test.comp
|
|
173
|
+
./decomp < /tmp/test.comp > /tmp/recovered.txt
|
|
174
|
+
diff /tmp/original.txt /tmp/recovered.txt
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Common Compression Formats
|
|
178
|
+
|
|
179
|
+
| Algorithm | Characteristics |
|
|
180
|
+
| ----------------- | ---------------------------------------- |
|
|
181
|
+
| Arithmetic coding | Fractional bits, state machine |
|
|
182
|
+
| Huffman | Integer bits, prefix codes |
|
|
183
|
+
| LZ77 | Sliding window, offset+length pairs |
|
|
184
|
+
| LZSS | LZ77 with flags for literal vs reference |
|
|
185
|
+
|
|
186
|
+
### Size Constraints
|
|
187
|
+
|
|
188
|
+
For tasks like "compress to <2500 bytes":
|
|
189
|
+
|
|
190
|
+
1. Meet constraint FIRST
|
|
191
|
+
2. Verify round-trip SECOND
|
|
192
|
+
3. Optimize compression ratio LAST
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## 4. Git Recovery Strategy Guide
|
|
197
|
+
|
|
198
|
+
### Forensic Approach
|
|
199
|
+
|
|
200
|
+
**ALWAYS backup before ANY git operation:**
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
cp -r .git .git.bak
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Recovery Tools
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
# Check integrity
|
|
210
|
+
git fsck --full --no-dangling
|
|
211
|
+
|
|
212
|
+
# Find lost commits
|
|
213
|
+
git reflog --all
|
|
214
|
+
|
|
215
|
+
# Find objects
|
|
216
|
+
find .git/objects -type f
|
|
217
|
+
|
|
218
|
+
# Recover from reflog
|
|
219
|
+
git checkout HEAD@{n}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Common Issues
|
|
223
|
+
|
|
224
|
+
| Symptom | Solution |
|
|
225
|
+
| ----------------- | ---------------------------------- |
|
|
226
|
+
| Corrupted objects | `git fsck`, find good copy in pack |
|
|
227
|
+
| Lost commits | `git reflog`, `git cherry-pick` |
|
|
228
|
+
| Detached HEAD | `git checkout -b recovery-branch` |
|
|
229
|
+
| Missing tree | Recreate from working directory |
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## 5. XSS Filter Strategy Guide
|
|
234
|
+
|
|
235
|
+
### Whitelist Approach (CORRECT)
|
|
236
|
+
|
|
237
|
+
```python
|
|
238
|
+
import bleach
|
|
239
|
+
|
|
240
|
+
ALLOWED_TAGS = ['p', 'br', 'strong', 'em', 'a']
|
|
241
|
+
ALLOWED_ATTRS = {'a': ['href']}
|
|
242
|
+
|
|
243
|
+
clean = bleach.clean(
|
|
244
|
+
user_input,
|
|
245
|
+
tags=ALLOWED_TAGS,
|
|
246
|
+
attributes=ALLOWED_ATTRS,
|
|
247
|
+
strip=True
|
|
248
|
+
)
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Blacklist Approach (WRONG - DON'T DO THIS)
|
|
252
|
+
|
|
253
|
+
```python
|
|
254
|
+
# DON'T: Attackers can bypass with:
|
|
255
|
+
# <ScRiPt>, <script/>, <scr\0ipt>, etc.
|
|
256
|
+
result = re.sub(r'<script.*?>.*?</script>', '', input)
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Defense in Depth
|
|
260
|
+
|
|
261
|
+
1. Whitelist allowed tags
|
|
262
|
+
2. Whitelist allowed attributes
|
|
263
|
+
3. Sanitize URLs (no javascript:, data:)
|
|
264
|
+
4. Encode output for context
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## 6. Polyglot Code Strategy Guide
|
|
269
|
+
|
|
270
|
+
### Feasible Language Pairs
|
|
271
|
+
|
|
272
|
+
| Pair | Technique | Difficulty |
|
|
273
|
+
| ------------ | ----------------------- | ------------- |
|
|
274
|
+
| C/Python | `#if 0` + triple quotes | Easy |
|
|
275
|
+
| Python/Perl | Comment overlap | Medium |
|
|
276
|
+
| Shell/Python | Shebang tricks | Medium |
|
|
277
|
+
| Rust/C++ | Comment manipulation | **Very Hard** |
|
|
278
|
+
|
|
279
|
+
### C/Python Polyglot Template
|
|
280
|
+
|
|
281
|
+
```c
|
|
282
|
+
#if 0
|
|
283
|
+
"""
|
|
284
|
+
#endif
|
|
285
|
+
#include <stdio.h>
|
|
286
|
+
int main() { printf("C\n"); return 0; }
|
|
287
|
+
#if 0
|
|
288
|
+
"""
|
|
289
|
+
print("Python")
|
|
290
|
+
#endif
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### Rust/C++ (Near-Impossible)
|
|
294
|
+
|
|
295
|
+
Due to incompatible syntax (`fn main()` vs `int main()`), true Rust/C++ polyglots are extremely difficult. Time-box attempts to 20% of total time budget.
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
## Usage in CLAUDE.md
|
|
300
|
+
|
|
301
|
+
These guides can be referenced via Pattern 36 (Competition Domain Research):
|
|
302
|
+
|
|
303
|
+
```markdown
|
|
304
|
+
### Pattern 36: Competition Domain Research (CDR)
|
|
305
|
+
|
|
306
|
+
**Detection**: Keywords "win rate", "beat", "competition", "versus"
|
|
307
|
+
**Action**:
|
|
308
|
+
|
|
309
|
+
1. Check /docs/DOMAIN_STRATEGY_GUIDES.md for domain-specific tactics
|
|
310
|
+
2. Research winning strategies BEFORE implementing
|
|
311
|
+
3. Time-box optimization iterations
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
**Generated:** 2026-01-18
|