@tagma/sdk 0.6.0 → 0.6.2
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 -21
- package/README.md +573 -573
- package/dist/bootstrap.d.ts +11 -1
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +18 -9
- package/dist/bootstrap.js.map +1 -1
- package/dist/drivers/opencode.d.ts.map +1 -1
- package/dist/drivers/opencode.js +47 -17
- package/dist/drivers/opencode.js.map +1 -1
- package/dist/engine.d.ts +8 -0
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +17 -16
- package/dist/engine.js.map +1 -1
- package/dist/plugin-registry.test.d.ts +2 -0
- package/dist/plugin-registry.test.d.ts.map +1 -0
- package/dist/plugin-registry.test.js +188 -0
- package/dist/plugin-registry.test.js.map +1 -0
- package/dist/registry.d.ts +52 -28
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +126 -91
- package/dist/registry.js.map +1 -1
- package/dist/sdk.d.ts +1 -1
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +1 -1
- package/dist/sdk.js.map +1 -1
- package/package.json +2 -2
- package/src/bootstrap.ts +46 -37
- package/src/completions/output-check.ts +92 -92
- package/src/dag.ts +245 -245
- package/src/drivers/opencode.ts +410 -371
- package/src/engine.ts +1228 -1220
- package/src/hooks.ts +193 -193
- package/src/middlewares/static-context.ts +49 -49
- package/src/pipeline-runner.ts +173 -173
- package/src/plugin-registry.test.ts +230 -0
- package/src/prompt-doc.ts +49 -49
- package/src/registry.ts +316 -267
- package/src/runner.ts +460 -460
- package/src/schema.test.ts +101 -101
- package/src/schema.ts +338 -338
- package/src/sdk.ts +120 -118
- package/src/task-ref.test.ts +401 -401
- package/src/task-ref.ts +120 -120
- package/src/validate-raw.ts +412 -412
- package/dist/drivers/claude-code.d.ts +0 -3
- package/dist/drivers/claude-code.d.ts.map +0 -1
- package/dist/drivers/claude-code.js +0 -225
- package/dist/drivers/claude-code.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"claude-code.d.ts","sourceRoot":"","sources":["../../src/drivers/claude-code.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EAQb,MAAM,UAAU,CAAC;AAmIlB,eAAO,MAAM,gBAAgB,EAAE,YA2G9B,CAAC"}
|
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
import { existsSync } from 'node:fs';
|
|
2
|
-
import { isAbsolute, relative, dirname, join } from 'node:path';
|
|
3
|
-
// Claude Code CLI reference: https://code.claude.com/docs/en/cli-reference
|
|
4
|
-
const DEFAULT_MODEL = 'sonnet';
|
|
5
|
-
// Claude Code CLI accepts --effort low|medium|high|max. tagma's vocabulary
|
|
6
|
-
// is low|medium|high, so low/medium/high pass through unchanged; users who
|
|
7
|
-
// want the claude-specific "max" tier can also set it explicitly.
|
|
8
|
-
const VALID_EFFORT = new Set(['low', 'medium', 'high', 'max']);
|
|
9
|
-
function resolveModel() {
|
|
10
|
-
return DEFAULT_MODEL;
|
|
11
|
-
}
|
|
12
|
-
function resolveTools(permissions) {
|
|
13
|
-
const tools = ['Grep', 'Glob'];
|
|
14
|
-
if (permissions.read)
|
|
15
|
-
tools.push('Read');
|
|
16
|
-
if (permissions.write)
|
|
17
|
-
tools.push('Edit', 'Write');
|
|
18
|
-
if (permissions.execute)
|
|
19
|
-
tools.push('Bash');
|
|
20
|
-
return tools.join(',');
|
|
21
|
-
}
|
|
22
|
-
// Maps our Permissions to Claude Code's --permission-mode. In print (-p) mode
|
|
23
|
-
// Claude needs non-interactive permission handling:
|
|
24
|
-
// - `bypassPermissions` skips all checks (required for reliable Bash automation
|
|
25
|
-
// under `execute: true`, matches the "full trust" semantics of that tier).
|
|
26
|
-
// - `dontAsk` auto-denies anything outside `--allowedTools`, which is exactly
|
|
27
|
-
// what we want for read/write tiers: the allowedTools whitelist already
|
|
28
|
-
// enumerates what Claude may do, and dontAsk makes violations fail fast
|
|
29
|
-
// instead of hanging on a prompt no one can answer in headless mode.
|
|
30
|
-
// See: https://code.claude.com/docs/en/permission-modes
|
|
31
|
-
function resolvePermissionMode(permissions) {
|
|
32
|
-
if (permissions.execute)
|
|
33
|
-
return 'bypassPermissions';
|
|
34
|
-
return 'dontAsk';
|
|
35
|
-
}
|
|
36
|
-
// Returns true if `sub` is inside `root` (or equal to it).
|
|
37
|
-
function isInside(root, sub) {
|
|
38
|
-
const rel = relative(root, sub);
|
|
39
|
-
return rel === '' || (!rel.startsWith('..') && !isAbsolute(rel));
|
|
40
|
-
}
|
|
41
|
-
// Claude Code requires CLAUDE_CODE_GIT_BASH_PATH on Windows pointing to
|
|
42
|
-
// Git Bash (bin\bash.exe under a Git for Windows install). See:
|
|
43
|
-
// https://code.claude.com/docs/en/troubleshooting#windows-claude-code-on-windows-requires-git-bash
|
|
44
|
-
// The path must use native Windows backslashes — forward slashes are rejected
|
|
45
|
-
// by Claude Code's path validation.
|
|
46
|
-
function resolveGitBashEnv() {
|
|
47
|
-
if (process.platform !== 'win32')
|
|
48
|
-
return {};
|
|
49
|
-
// Respect user-provided value if it points to an actual file. If the user
|
|
50
|
-
// set it to a non-existent path, fall through to discovery rather than
|
|
51
|
-
// propagating the broken config.
|
|
52
|
-
const existing = process.env.CLAUDE_CODE_GIT_BASH_PATH;
|
|
53
|
-
if (existing && existsSync(existing))
|
|
54
|
-
return {};
|
|
55
|
-
const discovered = discoverGitBash();
|
|
56
|
-
return discovered ? { CLAUDE_CODE_GIT_BASH_PATH: discovered } : {};
|
|
57
|
-
}
|
|
58
|
-
function discoverGitBash() {
|
|
59
|
-
// Strategy 1: find git.exe in PATH (equivalent to `where.exe git`) and
|
|
60
|
-
// walk up looking for bin\bash.exe under a Git install root. Git for
|
|
61
|
-
// Windows may expose multiple git.exe locations (cmd\git.exe,
|
|
62
|
-
// mingw64\bin\git.exe, mingw64\libexec\git-core\git.exe), so we walk up
|
|
63
|
-
// several levels rather than assuming a fixed depth.
|
|
64
|
-
const gitExe = findExeInPath('git.exe');
|
|
65
|
-
if (gitExe) {
|
|
66
|
-
let dir = dirname(gitExe);
|
|
67
|
-
for (let depth = 0; depth < 5; depth++) {
|
|
68
|
-
const candidate = join(dir, 'bin', 'bash.exe');
|
|
69
|
-
if (existsSync(candidate))
|
|
70
|
-
return candidate;
|
|
71
|
-
const parent = dirname(dir);
|
|
72
|
-
if (parent === dir)
|
|
73
|
-
break;
|
|
74
|
-
dir = parent;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
// Strategy 2: check common Git for Windows install locations.
|
|
78
|
-
// Uses %ProgramFiles%/%LOCALAPPDATA%/%USERPROFILE% env vars so it works on
|
|
79
|
-
// systems where those aren't mapped to C:\ (e.g. localized Windows).
|
|
80
|
-
const programFiles = process.env['ProgramFiles'] ?? 'C:\\Program Files';
|
|
81
|
-
const programFilesX86 = process.env['ProgramFiles(x86)'] ?? 'C:\\Program Files (x86)';
|
|
82
|
-
const localAppData = process.env['LOCALAPPDATA'];
|
|
83
|
-
const userProfile = process.env['USERPROFILE'];
|
|
84
|
-
const candidates = [
|
|
85
|
-
join(programFiles, 'Git', 'bin', 'bash.exe'),
|
|
86
|
-
join(programFilesX86, 'Git', 'bin', 'bash.exe'),
|
|
87
|
-
// Git for Windows user-level install
|
|
88
|
-
localAppData && join(localAppData, 'Programs', 'Git', 'bin', 'bash.exe'),
|
|
89
|
-
// Scoop
|
|
90
|
-
userProfile && join(userProfile, 'scoop', 'apps', 'git', 'current', 'bin', 'bash.exe'),
|
|
91
|
-
// Chocolatey default
|
|
92
|
-
'C:\\tools\\git\\bin\\bash.exe',
|
|
93
|
-
].filter((p) => Boolean(p));
|
|
94
|
-
for (const c of candidates) {
|
|
95
|
-
if (existsSync(c))
|
|
96
|
-
return c;
|
|
97
|
-
}
|
|
98
|
-
// Strategy 3: scan PATH for any entry containing "git" (e.g. Git's
|
|
99
|
-
// mingw64/bin or usr/bin already in PATH), walk up to find bash.exe.
|
|
100
|
-
// Catches custom install locations.
|
|
101
|
-
const pathEntries = (process.env.PATH ?? '').split(';');
|
|
102
|
-
for (const entry of pathEntries) {
|
|
103
|
-
if (!/git/i.test(entry))
|
|
104
|
-
continue;
|
|
105
|
-
const normalized = entry.replace(/\//g, '\\').replace(/\\+$/, '');
|
|
106
|
-
const parts = normalized.split('\\');
|
|
107
|
-
for (let depth = 1; depth <= 4; depth++) {
|
|
108
|
-
const root = parts.slice(0, parts.length - depth).join('\\');
|
|
109
|
-
if (!root)
|
|
110
|
-
continue;
|
|
111
|
-
const candidate = root + '\\bin\\bash.exe';
|
|
112
|
-
if (existsSync(candidate))
|
|
113
|
-
return candidate;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
return null;
|
|
117
|
-
}
|
|
118
|
-
function findExeInPath(exe) {
|
|
119
|
-
const pathDirs = (process.env.PATH ?? '').split(';');
|
|
120
|
-
for (const dir of pathDirs) {
|
|
121
|
-
if (!dir)
|
|
122
|
-
continue;
|
|
123
|
-
const full = join(dir, exe);
|
|
124
|
-
if (existsSync(full))
|
|
125
|
-
return full;
|
|
126
|
-
}
|
|
127
|
-
return null;
|
|
128
|
-
}
|
|
129
|
-
export const ClaudeCodeDriver = {
|
|
130
|
-
name: 'claude-code',
|
|
131
|
-
capabilities: {
|
|
132
|
-
sessionResume: true,
|
|
133
|
-
systemPrompt: true,
|
|
134
|
-
outputFormat: true,
|
|
135
|
-
},
|
|
136
|
-
resolveModel,
|
|
137
|
-
resolveTools,
|
|
138
|
-
async buildCommand(task, track, ctx) {
|
|
139
|
-
const permissions = task.permissions ?? track.permissions;
|
|
140
|
-
const model = task.model ?? track.model ?? DEFAULT_MODEL;
|
|
141
|
-
// SDK schema layer already resolved task → track → pipeline inheritance.
|
|
142
|
-
// Drop unknown effort values so a typo can't break `claude -p` startup;
|
|
143
|
-
// validateRaw / the UI should prevent this from reaching us in practice.
|
|
144
|
-
const rawEffort = task.reasoning_effort ?? track.reasoning_effort;
|
|
145
|
-
const effort = rawEffort && VALID_EFFORT.has(rawEffort) ? rawEffort : null;
|
|
146
|
-
const tools = resolveTools(permissions);
|
|
147
|
-
const permissionMode = resolvePermissionMode(permissions);
|
|
148
|
-
// Pass the prompt via stdin instead of as a -p argument value. On Windows,
|
|
149
|
-
// multi-line strings in CLI arguments break cmd.exe argument parsing when
|
|
150
|
-
// the executable is a .cmd wrapper — newlines cause all subsequent flags
|
|
151
|
-
// (--output-format, --model, etc.) to be silently dropped.
|
|
152
|
-
const stdin = task.prompt;
|
|
153
|
-
const args = [
|
|
154
|
-
'claude',
|
|
155
|
-
'-p', // no value — prompt is piped via stdin
|
|
156
|
-
'--model',
|
|
157
|
-
model,
|
|
158
|
-
'--allowedTools',
|
|
159
|
-
tools,
|
|
160
|
-
'--permission-mode',
|
|
161
|
-
permissionMode,
|
|
162
|
-
'--output-format',
|
|
163
|
-
'json',
|
|
164
|
-
// NOTE: do NOT use --verbose here. It changes stdout from a single JSON
|
|
165
|
-
// result object to a JSON event-stream array, breaking parseResult's
|
|
166
|
-
// session_id extraction (needed for continue_from) and normalizedOutput.
|
|
167
|
-
// The engine already captures stdout/stderr for pipeline logs.
|
|
168
|
-
// Pin to project+local settings only; don't inherit arbitrary user-level
|
|
169
|
-
// config (hooks, MCP servers, etc.) into pipeline automation.
|
|
170
|
-
'--setting-sources',
|
|
171
|
-
'project,local',
|
|
172
|
-
];
|
|
173
|
-
if (effort) {
|
|
174
|
-
args.push('--effort', effort);
|
|
175
|
-
}
|
|
176
|
-
// If the task runs in a subdirectory of the project, grant read/edit
|
|
177
|
-
// access to the project root via --add-dir so Claude can still see
|
|
178
|
-
// shared files (configs, types, etc.) outside task.cwd.
|
|
179
|
-
const effectiveCwd = task.cwd ?? ctx.workDir;
|
|
180
|
-
if (effectiveCwd !== ctx.workDir && isInside(ctx.workDir, effectiveCwd)) {
|
|
181
|
-
args.push('--add-dir', ctx.workDir);
|
|
182
|
-
}
|
|
183
|
-
// Native session resume
|
|
184
|
-
if (task.continue_from) {
|
|
185
|
-
const sessionId = ctx.sessionMap.get(task.continue_from);
|
|
186
|
-
if (sessionId) {
|
|
187
|
-
args.push('--resume', sessionId);
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
// --append-system-prompt MUST be last: its value may contain newlines,
|
|
191
|
-
// and on Windows cmd.exe can silently drop any flags that follow a
|
|
192
|
-
// newline-containing argument.
|
|
193
|
-
const profile = task.agent_profile ?? track.agent_profile;
|
|
194
|
-
if (profile) {
|
|
195
|
-
args.push('--append-system-prompt', profile);
|
|
196
|
-
}
|
|
197
|
-
return { args, cwd: effectiveCwd, env: resolveGitBashEnv(), stdin };
|
|
198
|
-
},
|
|
199
|
-
parseResult(stdout) {
|
|
200
|
-
try {
|
|
201
|
-
let json = JSON.parse(stdout);
|
|
202
|
-
// --verbose produces a JSON array of events; extract the final "result"
|
|
203
|
-
// event so session_id and normalizedOutput are correctly populated.
|
|
204
|
-
if (Array.isArray(json)) {
|
|
205
|
-
const resultEvent = json.findLast((e) => e.type === 'result');
|
|
206
|
-
if (!resultEvent)
|
|
207
|
-
return { normalizedOutput: stdout };
|
|
208
|
-
json = resultEvent;
|
|
209
|
-
}
|
|
210
|
-
// Extract canonical text: strip JSON envelope so downstream drivers
|
|
211
|
-
// get the actual AI response, not metadata
|
|
212
|
-
const normalizedOutput = json.result ?? json.text ?? json.content ?? stdout;
|
|
213
|
-
return {
|
|
214
|
-
sessionId: json.session_id,
|
|
215
|
-
normalizedOutput: typeof normalizedOutput === 'string'
|
|
216
|
-
? normalizedOutput
|
|
217
|
-
: JSON.stringify(normalizedOutput),
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
catch {
|
|
221
|
-
return { normalizedOutput: stdout };
|
|
222
|
-
}
|
|
223
|
-
},
|
|
224
|
-
};
|
|
225
|
-
//# sourceMappingURL=claude-code.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"claude-code.js","sourceRoot":"","sources":["../../src/drivers/claude-code.ts"],"names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