@miller-tech/uap 1.20.32 → 1.20.34
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/config/model-profiles/qwen35.json +6 -5
- package/dist/.tsbuildinfo +1 -1
- package/dist/bin/cli.js +6 -1
- package/dist/bin/cli.js.map +1 -1
- package/dist/cli/hooks.js +30 -7
- package/dist/cli/hooks.js.map +1 -1
- package/dist/cli/policy.d.ts.map +1 -1
- package/dist/cli/policy.js +26 -0
- package/dist/cli/policy.js.map +1 -1
- package/dist/dashboard/data-seeder.d.ts.map +1 -1
- package/dist/dashboard/data-seeder.js +72 -3
- package/dist/dashboard/data-seeder.js.map +1 -1
- package/dist/dashboard/data-service.js +1 -1
- package/dist/dashboard/data-service.js.map +1 -1
- package/dist/dashboard/server.js +1 -1
- package/dist/dashboard/server.js.map +1 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +20 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +20 -0
- package/dist/types/index.js.map +1 -1
- package/docs/AGENTS.md +423 -0
- package/docs/AGENTS.md</path>CLAUDE.md</path>/home/cogtek/dev/miller-tech/universal-agent-protocol/docs/INDEX.md</path>/home/cogtek/dev/miller-tech/universal-agent-protocol/docs/reference/API_REFERENCE.md</path>/home/cogtek/dev/miller-tech/universal-agent-protocol/docs/reference/UAP_CLI_REFERENCE.md</path>src/index.ts</path>/src/cli/worktree.ts</path>/src/coordination/deploy-batcher.ts</path>/src/policies/policy-gate.ts</path>/src/memory/model-router.ts</path>/src/memory/embeddings.ts</path>/src/models/types.ts</path>/src/types/coordination.ts</path>/src/utils/logger.ts</path>/src/utils/config-loader.ts</path>/src/utils/performance-monitor.ts</path>/src/utils/concurrency.ts</path>/src/utils/concurrency-pool.ts</path>/src/utils/string-similarity.ts</path>/src/utils/rate-limiter.ts</path>/src/utils/system-resources.ts</path>/src/utils/adaptive-cache.ts</path>/src/utils/lazy-imports.ts</path>/src/utils/merge-claude-md.ts</path>/src/utils/stopwords.ts</path>/src/utils/config-loader.ts</path>/src/utils/performance-monitor.ts</path>/src/utils/concurrency.ts</path>/src/utils/concurrency-pool.ts</path>/src/utils/string-similarity.ts</path>/src/utils/rate-limiter.ts</path>/src/utils/system-resources.ts</path>/src/utils/adaptive-cache.ts</path>/src/utils/lazy-imports.ts</path>/src/utils/merge-claude-md.ts</path>/src/utils/stopwords.ts</path> +433 -0
- package/docs/DOCUMENTATION_AUDIT_REPORT.md +131 -0
- package/docs/GETTING_STARTED.md +288 -0
- package/docs/INDEX.md +272 -42
- package/docs/PROJECT_ANALYSIS_REPORT.md +510 -0
- package/docs/architecture/SYSTEM_ANALYSIS.md +220 -1003
- package/docs/blog/local-coding-agents.md +266 -0
- package/docs/blog/x-thread.md +254 -0
- package/docs/deployment/DEPLOY_BATCHER_ANALYSIS.md +15 -647
- package/docs/getting-started/OVERVIEW.md +10 -30
- package/docs/getting-started/SETUP.md +183 -9
- package/docs/pr/UPSTREAM_PRS.md +424 -0
- package/docs/reference/CONFIGURATION.md +208 -0
- package/docs/reference/DATABASE_SCHEMA.md +344 -0
- package/docs/reference/PATTERN_LIBRARY.md +636 -0
- package/package.json +1 -1
- package/templates/hooks/uap-policy-gate.sh +36 -0
- package/tools/agents/claude_local_agent.py +92 -0
- package/tools/agents/opencode_uap_agent.py +3 -0
- package/tools/agents/scripts/anthropic_proxy.py +654 -20
- package/tools/agents/uap_agent.py +1 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Claude Code agent optimized for local LLM inference (claude-local).
|
|
3
|
+
|
|
4
|
+
Reduces tool count to essentials only, improving tool-call accuracy
|
|
5
|
+
for smaller/quantized models that struggle with large tool schemas.
|
|
6
|
+
Also adds --dangerously-skip-permissions to match claude-local behavior.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import os
|
|
10
|
+
import shlex
|
|
11
|
+
|
|
12
|
+
from harbor.agents.installed.claude_code import ClaudeCode
|
|
13
|
+
from harbor.agents.installed.base import ExecInput
|
|
14
|
+
from harbor.models.trial.paths import EnvironmentPaths
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class ClaudeLocalAgent(ClaudeCode):
|
|
18
|
+
"""Claude Code agent with minimal tools for local model benchmarks."""
|
|
19
|
+
|
|
20
|
+
# Only essential tools - fewer choices = better accuracy for small models
|
|
21
|
+
ALLOWED_TOOLS = [
|
|
22
|
+
"Bash",
|
|
23
|
+
"Read",
|
|
24
|
+
"Write",
|
|
25
|
+
"Edit",
|
|
26
|
+
"Glob",
|
|
27
|
+
"Grep",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
@staticmethod
|
|
31
|
+
def name() -> str:
|
|
32
|
+
return "claude-local"
|
|
33
|
+
|
|
34
|
+
def create_run_agent_commands(self, instruction: str) -> list[ExecInput]:
|
|
35
|
+
escaped_instruction = shlex.quote(instruction)
|
|
36
|
+
|
|
37
|
+
env = {
|
|
38
|
+
"ANTHROPIC_API_KEY": os.environ.get("ANTHROPIC_API_KEY", ""),
|
|
39
|
+
"ANTHROPIC_BASE_URL": os.environ.get("ANTHROPIC_BASE_URL", None),
|
|
40
|
+
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
|
|
41
|
+
"FORCE_AUTO_BACKGROUND_TASKS": "1",
|
|
42
|
+
"ENABLE_BACKGROUND_TASKS": "1",
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
env = {k: v for k, v in env.items() if v}
|
|
46
|
+
|
|
47
|
+
if self.model_name:
|
|
48
|
+
if "ANTHROPIC_BASE_URL" in env:
|
|
49
|
+
env["ANTHROPIC_MODEL"] = self.model_name
|
|
50
|
+
else:
|
|
51
|
+
env["ANTHROPIC_MODEL"] = self.model_name.split("/")[-1]
|
|
52
|
+
elif "ANTHROPIC_MODEL" in os.environ:
|
|
53
|
+
env["ANTHROPIC_MODEL"] = os.environ["ANTHROPIC_MODEL"]
|
|
54
|
+
|
|
55
|
+
# Route all model aliases to the same local model
|
|
56
|
+
if "ANTHROPIC_BASE_URL" in env and "ANTHROPIC_MODEL" in env:
|
|
57
|
+
env["ANTHROPIC_DEFAULT_SONNET_MODEL"] = env["ANTHROPIC_MODEL"]
|
|
58
|
+
env["ANTHROPIC_DEFAULT_OPUS_MODEL"] = env["ANTHROPIC_MODEL"]
|
|
59
|
+
env["ANTHROPIC_DEFAULT_HAIKU_MODEL"] = env["ANTHROPIC_MODEL"]
|
|
60
|
+
env["CLAUDE_CODE_SUBAGENT_MODEL"] = env["ANTHROPIC_MODEL"]
|
|
61
|
+
|
|
62
|
+
max_thinking_tokens = self._max_thinking_tokens
|
|
63
|
+
if max_thinking_tokens is not None:
|
|
64
|
+
env["MAX_THINKING_TOKENS"] = str(max_thinking_tokens)
|
|
65
|
+
elif "MAX_THINKING_TOKENS" in os.environ:
|
|
66
|
+
env["MAX_THINKING_TOKENS"] = os.environ["MAX_THINKING_TOKENS"]
|
|
67
|
+
|
|
68
|
+
env["CLAUDE_CONFIG_DIR"] = (EnvironmentPaths.agent_dir / "sessions").as_posix()
|
|
69
|
+
|
|
70
|
+
return [
|
|
71
|
+
ExecInput(
|
|
72
|
+
command=(
|
|
73
|
+
"mkdir -p $CLAUDE_CONFIG_DIR/debug $CLAUDE_CONFIG_DIR/projects/-app "
|
|
74
|
+
"$CLAUDE_CONFIG_DIR/shell-snapshots $CLAUDE_CONFIG_DIR/statsig "
|
|
75
|
+
"$CLAUDE_CONFIG_DIR/todos && "
|
|
76
|
+
"if [ -d ~/.claude/skills ]; then "
|
|
77
|
+
"cp -r ~/.claude/skills $CLAUDE_CONFIG_DIR/skills 2>/dev/null || true; "
|
|
78
|
+
"fi"
|
|
79
|
+
),
|
|
80
|
+
env=env,
|
|
81
|
+
),
|
|
82
|
+
ExecInput(
|
|
83
|
+
command=(
|
|
84
|
+
f"claude --verbose "
|
|
85
|
+
f"--output-format stream-json "
|
|
86
|
+
f"-p {escaped_instruction} --allowedTools "
|
|
87
|
+
f"{' '.join(self.ALLOWED_TOOLS)} 2>&1 </dev/null | tee "
|
|
88
|
+
f"/logs/agent/claude-code.txt"
|
|
89
|
+
),
|
|
90
|
+
env=env,
|
|
91
|
+
),
|
|
92
|
+
]
|
|
@@ -1163,6 +1163,9 @@ class OpenCodeUAP(BaseInstalledAgent):
|
|
|
1163
1163
|
"package.json",
|
|
1164
1164
|
]
|
|
1165
1165
|
|
|
1166
|
+
# Create /uap-local explicitly - docker-compose cp requires the parent
|
|
1167
|
+
# directory to exist before copying files into it
|
|
1168
|
+
await environment.exec("mkdir -p /uap-local")
|
|
1166
1169
|
created_dirs = {"/uap-local"}
|
|
1167
1170
|
|
|
1168
1171
|
async def ensure_parent_dir(target_path: str) -> None:
|