@agntn/harnesses 0.0.1

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.
Files changed (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +142 -0
  3. package/dist/THIRD-PARTY-LICENSES.md +36 -0
  4. package/dist/_chunks/agents-sync.d.mts +417 -0
  5. package/dist/_chunks/agents-sync.d.mts.map +1 -0
  6. package/dist/_chunks/agents-sync.mjs +2719 -0
  7. package/dist/_chunks/agents-sync.mjs.map +1 -0
  8. package/dist/_chunks/agents.mjs +62 -0
  9. package/dist/_chunks/agents.mjs.map +1 -0
  10. package/dist/_chunks/libs/typebox.mjs +5512 -0
  11. package/dist/_chunks/libs/typebox.mjs.map +1 -0
  12. package/dist/_chunks/mcp-servers.mjs +149 -0
  13. package/dist/_chunks/mcp-servers.mjs.map +1 -0
  14. package/dist/_chunks/mcp.mjs +164 -0
  15. package/dist/_chunks/mcp.mjs.map +1 -0
  16. package/dist/_chunks/mcp2.mjs +17 -0
  17. package/dist/_chunks/mcp2.mjs.map +1 -0
  18. package/dist/_chunks/tool-operations.mjs +361 -0
  19. package/dist/_chunks/tool-operations.mjs.map +1 -0
  20. package/dist/_chunks/tool-schemas.d.mts +94 -0
  21. package/dist/_chunks/tool-schemas.d.mts.map +1 -0
  22. package/dist/_chunks/tool-schemas.mjs +112 -0
  23. package/dist/_chunks/tool-schemas.mjs.map +1 -0
  24. package/dist/_chunks/types.mjs +4 -0
  25. package/dist/_chunks/types.mjs.map +1 -0
  26. package/dist/cli.d.mts +1 -0
  27. package/dist/cli.mjs +350 -0
  28. package/dist/cli.mjs.map +1 -0
  29. package/dist/index.d.mts +300 -0
  30. package/dist/index.d.mts.map +1 -0
  31. package/dist/index.mjs +6 -0
  32. package/dist/index.mjs.map +1 -0
  33. package/dist/mcp.d.mts +15 -0
  34. package/dist/mcp.d.mts.map +1 -0
  35. package/dist/mcp.mjs +2 -0
  36. package/dist/tool-operations.d.mts +222 -0
  37. package/dist/tool-operations.d.mts.map +1 -0
  38. package/dist/tool-operations.mjs +3 -0
  39. package/dist/tool-schemas.d.mts +2 -0
  40. package/dist/tool-schemas.mjs +2 -0
  41. package/package.json +102 -0
  42. package/packages/omp/extensions/AGENTS.md +7 -0
  43. package/packages/omp/extensions/harnesses.ts +253 -0
  44. package/packages/pi/extensions/AGENTS.md +7 -0
  45. package/packages/pi/extensions/harnesses.ts +265 -0
  46. package/packages/shared/AGENTS.md +7 -0
  47. package/packages/shared/tui.ts +346 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.mjs","names":["pkg.version"],"sources":["../../package.json","../../src/types.ts"],"sourcesContent":["","import pkg from \"../package.json\" with { type: \"json\" };\n\nexport const version: string = pkg.version;\n\nexport type HarnessId =\n | \"antigravity\"\n | \"codex\"\n | \"gemini\"\n | \"grok\"\n | \"claude\"\n | \"opencode\"\n | \"cursor\"\n | \"freebuff\"\n | \"github-copilot\"\n | \"mastracode\"\n | \"omp\"\n | \"pi\";\nexport type EvidenceLevel = \"official\" | \"community\" | \"inferred\";\nexport type Platform = \"linux\" | \"darwin\" | \"win32\";\n\nexport interface PathCandidate {\n path: string;\n scope: \"user\" | \"project\" | \"system\" | \"data\";\n level: EvidenceLevel;\n platforms?: Platform[];\n note?: string;\n}\n\nexport interface StorageDescriptor {\n format: string;\n level: EvidenceLevel;\n note?: string;\n}\n\nexport interface HarnessCapabilities {\n mcp: boolean;\n vision: boolean;\n /** Audio reaches the model without conversion or MCP. */\n audio: boolean;\n /** Video reaches the model without conversion or MCP. */\n video: boolean;\n tools: boolean;\n streaming: boolean;\n}\n\n/** How to run one prompt through the harness non-interactively. */\nexport interface HarnessInvocation {\n /** Binary to spawn; defaults to the harness's first `binaries` entry. */\n binary?: string;\n /** Full agent argument template; every \"{prompt}\" is replaced with the prompt text. */\n args: string[];\n /** Structured full agent argument template. */\n jsonArgs?: string[];\n /** Advisor argument template without tools; absent when the CLI cannot disable tools. */\n noToolsArgs?: string[];\n /** Structured advisor argument template without tools. */\n noToolsJsonArgs?: string[];\n /** Agent argument template whose native sandbox enforces read-only tool access. */\n readOnlyArgs?: string[];\n /** Structured agent argument template with read-only tool access. */\n readOnlyJsonArgs?: string[];\n /** Arguments appended when a model is selected; every \"{model}\" is replaced. */\n modelArgs?: string[];\n level: EvidenceLevel;\n note?: string;\n}\n\n/** Invocation modes a harness supports without fallback or prompt-only restrictions. */\nexport interface HarnessInvocationModes {\n advisor: boolean;\n advisorStructured: boolean;\n readOnly: boolean;\n readOnlyStructured: boolean;\n agent: boolean;\n agentStructured: boolean;\n}\n\n/** How to ask one harness CLI for the models currently available to it. */\nexport interface HarnessModelListing {\n /** Arguments used when no search filter is supplied. */\n args: string[];\n /** Optional argument template for a search filter; every \"{search}\" is replaced. */\n searchArgs?: string[];\n level: EvidenceLevel;\n note?: string;\n}\n\n/** One model normalized from a harness's native model-listing output. */\nexport interface AvailableModel {\n provider: string;\n id: string;\n contextWindow: number;\n maxOutputTokens: number;\n thinking: boolean;\n images: boolean;\n}\n\n/** Options for querying the models available to one harness. */\nexport interface ListModelsOptions {\n search?: string;\n cwd?: string;\n env?: Record<string, string>;\n /** Kill the model-listing command after this many milliseconds; unset means no timeout. */\n timeoutMs?: number;\n}\n\nexport interface InvokeOptions {\n cwd?: string;\n env?: Record<string, string>;\n /** Harness-native model id or selector. */\n model?: string;\n /** Enable the spawned harness's tools; defaults to advisor without tools mode. */\n tools?: boolean;\n /** Require native enforcement of read-only tool access. Implies `tools: true`. */\n readOnly?: boolean;\n /** Kill the harness after this many milliseconds; unset means no timeout. */\n timeoutMs?: number;\n /** Use the harness's structured (JSON) output mode instead of plain text. */\n structured?: boolean;\n}\n\nexport interface InvokeResult {\n command: string;\n args: string[];\n stdout: string;\n stderr: string;\n /** Process exit code; null when the run hit `timeoutMs` and was killed. */\n exitCode: number | null;\n timedOut: boolean;\n}\n\n/** Result of one native model-listing command. */\nexport interface ListModelsResult extends InvokeResult {\n /** Empty on a successful no-match response or when the command itself failed. */\n models: AvailableModel[];\n}\n\n/** Normalized MCP server entry, shared across every harness dialect. */\nexport interface McpServerConfig {\n name: string;\n transport: \"stdio\" | \"http\" | \"sse\";\n command?: string;\n args?: string[];\n env?: Record<string, string>;\n url?: string;\n headers?: Record<string, string>;\n /** Present only when the harness tracks an on/off state per server. */\n enabled?: boolean;\n}\n\n/** How one harness config file stores its MCP servers. */\nexport interface McpConfigFile extends PathCandidate {\n format: \"json\" | \"toml\";\n /** Object path to the server map inside the file, e.g. [\"mcpServers\"]. */\n key: string[];\n /** Shape of individual entries; \"standard\" is the {command, args, env, url} family. */\n dialect: \"standard\" | \"antigravity\" | \"opencode\" | \"vscode\";\n}\n\nexport interface HarnessDetection {\n /** Environment variables that indicate running inside this agent. */\n envVars: string[];\n /** Project-level files or directories whose presence indicates this agent. */\n projectMarkers: string[];\n}\n\nexport interface ResolveOptions {\n homeDir?: string;\n projectRoot?: string;\n platform?: Platform;\n}\n\nexport interface ResolvedPaths {\n config: PathCandidate[];\n sessions: PathCandidate[];\n instructions: PathCandidate[];\n skills: PathCandidate[];\n commands: PathCandidate[];\n hooks: PathCandidate[];\n}\n"],"mappings":"ACEA,MAAa,UAAkBA"}
package/dist/cli.d.mts ADDED
@@ -0,0 +1 @@
1
+ export {}
package/dist/cli.mjs ADDED
@@ -0,0 +1,350 @@
1
+ #!/usr/bin/env node
2
+ import { version } from "./_chunks/types.mjs";
3
+ import { getAllHarnesses, getHarness, isHarnessId, listHarnesses } from "./_chunks/agents-sync.mjs";
4
+ import { listHarnessModels } from "./_chunks/tool-operations.mjs";
5
+ import { defineCommand, runMain } from "citty";
6
+ import { consola } from "consola";
7
+ import { encode } from "@toon-format/toon";
8
+ const s = {
9
+ cyan: (t) => `\x1B[36m${t}\x1B[0m`,
10
+ hi: (t) => `\x1B[96m${t}\x1B[0m`,
11
+ green: (t) => `\x1B[32m${t}\x1B[0m`,
12
+ red: (t) => `\x1B[31m${t}\x1B[0m`,
13
+ dim: (t) => `\x1B[90m${t}\x1B[0m`,
14
+ bold: (t) => `\x1B[1m${t}\x1B[0m`,
15
+ white: (t) => `\x1B[97m${t}\x1B[0m`
16
+ };
17
+ function header(title) {
18
+ return `\n ${s.bold(s.cyan(title))}`;
19
+ }
20
+ function section(title) {
21
+ return `\n ${s.cyan("▸")} ${s.white(title)}`;
22
+ }
23
+ function entry(content) {
24
+ return ` ${content}`;
25
+ }
26
+ function renderPathSection(title, entries) {
27
+ if (!entries.length) return;
28
+ consola.log(section(title));
29
+ for (const e of entries) {
30
+ const tags = [s.dim(e.scope)];
31
+ if (e.platforms) tags.push(s.dim(e.platforms.join(", ")));
32
+ consola.log(entry(`${s.hi(e.path)} ${tags.join(s.dim(" · "))}`));
33
+ if (e.note) consola.log(entry(`${s.dim(` ${e.note}`)}`));
34
+ }
35
+ }
36
+ const formatArgs = {
37
+ json: {
38
+ type: "boolean",
39
+ description: "Output as JSON"
40
+ },
41
+ toon: {
42
+ type: "boolean",
43
+ description: "Output as TOON"
44
+ }
45
+ };
46
+ const harnessArg = {
47
+ type: "positional",
48
+ description: "Harness id",
49
+ required: true
50
+ };
51
+ function emit(data, args) {
52
+ if (args.json) {
53
+ console.log(JSON.stringify(data, null, 2));
54
+ return true;
55
+ }
56
+ if (args.toon) {
57
+ console.log(encode(data));
58
+ return true;
59
+ }
60
+ return false;
61
+ }
62
+ function resolveHarness(id) {
63
+ if (!isHarnessId(id)) {
64
+ consola.error(`Unknown harness: ${id}\nKnown: ${listHarnesses().join(", ")}`);
65
+ process.exit(1);
66
+ }
67
+ return getHarness(id);
68
+ }
69
+ function renderResolvedPathSection(title, entries) {
70
+ if (entries.length === 0) return;
71
+ consola.log(section(title));
72
+ for (const item of entries) consola.log(entry(s.hi(item.path)));
73
+ }
74
+ function parsePositiveTimeout(raw) {
75
+ if (!raw) return void 0;
76
+ const value = Number(raw);
77
+ return Number.isFinite(value) && value > 0 ? value : null;
78
+ }
79
+ function modelFailureMessage(details) {
80
+ return "error" in details ? details.error : "Failed to list models";
81
+ }
82
+ function modelDescription(model) {
83
+ const features = [];
84
+ if (model.thinking) features.push("thinking");
85
+ if (model.images) features.push("images");
86
+ const suffix = features.length > 0 ? ` · ${features.join(", ")}` : "";
87
+ return `${model.contextWindow} context · ${model.maxOutputTokens} max-out${suffix}`;
88
+ }
89
+ function renderModels(details) {
90
+ consola.log(header(`${details.id} models`));
91
+ consola.log("");
92
+ for (const model of details.models) consola.log(entry(`${s.hi(`${model.provider}/${model.id}`)} ${s.dim(modelDescription(model))}`));
93
+ if (details.models.length === 0) consola.log(entry(s.dim("No models found")));
94
+ consola.log("");
95
+ }
96
+ function finishInvocation(result, timeoutSeconds) {
97
+ if (result.stdout) process.stdout.write(result.stdout);
98
+ if (result.stderr) process.stderr.write(result.stderr);
99
+ if (result.timedOut) {
100
+ consola.error(`Timed out after ${timeoutSeconds}s`);
101
+ process.exit(124);
102
+ }
103
+ process.exit(result.exitCode ?? 1);
104
+ }
105
+ const list = defineCommand({
106
+ meta: { description: "List all known harnesses" },
107
+ args: { ...formatArgs },
108
+ run({ args }) {
109
+ const data = getAllHarnesses().map((harness) => ({
110
+ id: harness.id,
111
+ name: harness.name
112
+ }));
113
+ if (emit(data, args)) return;
114
+ consola.log(header("Harnesses"));
115
+ consola.log("");
116
+ const maxId = Math.max(...data.map((r) => r.id.length));
117
+ for (const { id, name } of data) consola.log(entry(`${s.hi(id.padEnd(maxId))} ${name}`));
118
+ consola.log("");
119
+ }
120
+ });
121
+ const detect = defineCommand({
122
+ meta: { description: "Detect installed harnesses and versions" },
123
+ args: { ...formatArgs },
124
+ run({ args }) {
125
+ const results = getAllHarnesses().map((harness) => {
126
+ const installed = harness.isInstalled();
127
+ const v = installed ? harness.version : null;
128
+ return {
129
+ id: harness.id,
130
+ name: harness.name,
131
+ installed,
132
+ version: v
133
+ };
134
+ });
135
+ if (emit(results, args)) return;
136
+ consola.log(header("System Scan"));
137
+ consola.log("");
138
+ const maxId = Math.max(...results.map((r) => r.id.length));
139
+ for (const r of results) if (r.installed) {
140
+ const ver = r.version ? ` ${s.dim(`v${r.version}`)}` : "";
141
+ consola.log(entry(`${s.green("●")} ${s.hi(r.id.padEnd(maxId))} ${r.name}${ver}`));
142
+ } else consola.log(entry(`${s.dim("○")} ${s.dim(r.id.padEnd(maxId))} ${s.dim(r.name)}`));
143
+ consola.log("");
144
+ }
145
+ });
146
+ const info = defineCommand({
147
+ meta: { description: "Show metadata for a harness" },
148
+ args: {
149
+ id: harnessArg,
150
+ ...formatArgs
151
+ },
152
+ run({ args }) {
153
+ const harness = resolveHarness(args.id);
154
+ if (emit({
155
+ id: harness.id,
156
+ name: harness.name,
157
+ binaries: harness.binaries,
158
+ capabilities: harness.capabilities,
159
+ invocationModes: harness.invocationModes,
160
+ modelListing: harness.modelListing !== null,
161
+ modelSelection: harness.invocation?.modelArgs !== void 0,
162
+ config: harness.config,
163
+ sessions: harness.sessions,
164
+ instructions: harness.instructions,
165
+ skills: harness.skills,
166
+ commands: harness.commands,
167
+ hooks: harness.hooks,
168
+ persistence: harness.persistence,
169
+ detection: harness.detection
170
+ }, args)) return;
171
+ consola.log(header(`${harness.name} ${s.dim(harness.id)}`));
172
+ consola.log(section("Binaries"));
173
+ for (const b of harness.binaries) consola.log(entry(s.white(b)));
174
+ consola.log(section("Capabilities"));
175
+ const caps = Object.entries(harness.capabilities).map(([k, v]) => v ? s.green(k) : s.dim(k)).join(s.dim(" · "));
176
+ consola.log(entry(caps));
177
+ consola.log(section("Invocation modes"));
178
+ const modes = Object.entries(harness.invocationModes).map(([k, v]) => v ? s.green(k) : s.dim(k)).join(s.dim(" · "));
179
+ consola.log(entry(modes));
180
+ consola.log(section("Models"));
181
+ const modelFeatures = {
182
+ listing: harness.modelListing !== null,
183
+ selection: harness.invocation?.modelArgs !== void 0
184
+ };
185
+ consola.log(entry(Object.entries(modelFeatures).map(([k, v]) => v ? s.green(k) : s.dim(k)).join(s.dim(" · "))));
186
+ renderPathSection("Config", harness.config);
187
+ renderPathSection("Sessions", harness.sessions);
188
+ renderPathSection("Instructions", harness.instructions);
189
+ renderPathSection("Skills", harness.skills);
190
+ renderPathSection("Commands", harness.commands);
191
+ renderPathSection("Hooks", harness.hooks);
192
+ if (harness.persistence.length) {
193
+ consola.log(section("Persistence"));
194
+ for (const e of harness.persistence) {
195
+ const note = e.note ? ` ${s.dim(e.note)}` : "";
196
+ consola.log(entry(`${s.white(e.format)}${note}`));
197
+ }
198
+ }
199
+ consola.log("");
200
+ }
201
+ });
202
+ const paths = defineCommand({
203
+ meta: { description: "Show resolved paths for current platform" },
204
+ args: {
205
+ id: harnessArg,
206
+ ...formatArgs
207
+ },
208
+ run({ args }) {
209
+ const harness = resolveHarness(args.id);
210
+ const resolved = harness.resolve();
211
+ if (emit(resolved, args)) return;
212
+ consola.log(header(`${harness.name} ${s.dim(process.platform)}`));
213
+ renderResolvedPathSection("Config", resolved.config);
214
+ renderResolvedPathSection("Sessions", resolved.sessions);
215
+ renderResolvedPathSection("Instructions", resolved.instructions);
216
+ renderResolvedPathSection("Skills", resolved.skills);
217
+ renderResolvedPathSection("Commands", resolved.commands);
218
+ renderResolvedPathSection("Hooks", resolved.hooks);
219
+ consola.log("");
220
+ }
221
+ });
222
+ const models = defineCommand({
223
+ meta: { description: "List models available to a harness" },
224
+ args: {
225
+ id: harnessArg,
226
+ search: {
227
+ type: "positional",
228
+ description: "Optional native model search filter",
229
+ required: false
230
+ },
231
+ cwd: {
232
+ type: "string",
233
+ description: "Working directory used while loading harness configuration"
234
+ },
235
+ timeout: {
236
+ type: "string",
237
+ description: "Wall-clock budget in seconds"
238
+ },
239
+ ...formatArgs
240
+ },
241
+ async run({ args }) {
242
+ const timeoutSeconds = parsePositiveTimeout(args.timeout);
243
+ if (timeoutSeconds === null) {
244
+ consola.error(`Invalid timeout: ${args.timeout}`);
245
+ process.exitCode = 1;
246
+ return;
247
+ }
248
+ const result = await listHarnessModels(args.id, {
249
+ search: args.search,
250
+ cwd: args.cwd,
251
+ timeoutSeconds
252
+ });
253
+ if (emit(result.details, args)) {
254
+ if (result.isError) process.exitCode = 1;
255
+ return;
256
+ }
257
+ if (result.isError || !("models" in result.details)) {
258
+ consola.error(modelFailureMessage(result.details));
259
+ process.exitCode = 1;
260
+ return;
261
+ }
262
+ renderModels(result.details);
263
+ }
264
+ });
265
+ const run = defineCommand({
266
+ meta: { description: "Run one prompt through a harness's non-interactive mode" },
267
+ args: {
268
+ id: harnessArg,
269
+ prompt: {
270
+ type: "positional",
271
+ description: "Prompt to send to the harness",
272
+ required: true
273
+ },
274
+ cwd: {
275
+ type: "string",
276
+ description: "Working directory for the run"
277
+ },
278
+ model: {
279
+ type: "string",
280
+ description: "Harness-native model id or selector"
281
+ },
282
+ timeout: {
283
+ type: "string",
284
+ description: "Wall-clock budget in seconds"
285
+ },
286
+ json: {
287
+ type: "boolean",
288
+ description: "Use the harness's structured (JSON) output mode"
289
+ },
290
+ tools: {
291
+ type: "boolean",
292
+ description: "Enable tools; default false uses native advisor without tools mode"
293
+ },
294
+ "read-only": {
295
+ type: "boolean",
296
+ description: "Require native read-only tool enforcement; implies --tools"
297
+ }
298
+ },
299
+ async run({ args }) {
300
+ const harness = resolveHarness(args.id);
301
+ const structured = args.json === true;
302
+ const readOnly = args["read-only"] === true;
303
+ const tools = readOnly || args.tools === true;
304
+ const invocationOptions = {
305
+ model: args.model,
306
+ structured,
307
+ tools,
308
+ readOnly
309
+ };
310
+ if (!harness.buildInvocation("", invocationOptions)) {
311
+ consola.error(harness.invocationError(invocationOptions) ?? "Invalid invocation");
312
+ process.exit(1);
313
+ }
314
+ const timeoutSeconds = parsePositiveTimeout(args.timeout);
315
+ if (timeoutSeconds === null) {
316
+ consola.error(`Invalid timeout: ${args.timeout}`);
317
+ process.exit(1);
318
+ }
319
+ finishInvocation(await harness.invoke(args.prompt, {
320
+ cwd: args.cwd,
321
+ model: args.model,
322
+ timeoutMs: timeoutSeconds === void 0 ? void 0 : timeoutSeconds * 1e3,
323
+ structured,
324
+ tools,
325
+ readOnly
326
+ }), timeoutSeconds);
327
+ }
328
+ });
329
+ const main = defineCommand({
330
+ meta: {
331
+ name: "harnesses",
332
+ version,
333
+ description: "Metadata toolkit for AI coding harnesses"
334
+ },
335
+ subCommands: {
336
+ list,
337
+ detect,
338
+ info,
339
+ paths,
340
+ models,
341
+ run,
342
+ "mcp-servers": () => import("./_chunks/mcp-servers.mjs").then((m) => m.default),
343
+ agents: () => import("./_chunks/agents.mjs").then((m) => m.default),
344
+ mcp: () => import("./_chunks/mcp2.mjs").then((m) => m.default)
345
+ }
346
+ });
347
+ await runMain(main);
348
+ export {};
349
+
350
+ //# sourceMappingURL=cli.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.mjs","names":["toToon"],"sources":["../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { defineCommand, runMain } from \"citty\";\nimport { consola } from \"consola\";\nimport { encode as toToon } from \"@toon-format/toon\";\nimport { version, type AvailableModel, type InvokeResult } from \"./types.ts\";\nimport { getAllHarnesses, getHarness, isHarnessId, listHarnesses } from \"./registry.ts\";\nimport { listHarnessModels, type ModelsOutcome, type RunFailure } from \"./tool-operations.ts\";\n\nconst s = {\n cyan: (t: string) => `\\x1B[36m${t}\\x1B[0m`,\n hi: (t: string) => `\\x1B[96m${t}\\x1B[0m`,\n green: (t: string) => `\\x1B[32m${t}\\x1B[0m`,\n red: (t: string) => `\\x1B[31m${t}\\x1B[0m`,\n dim: (t: string) => `\\x1B[90m${t}\\x1B[0m`,\n bold: (t: string) => `\\x1B[1m${t}\\x1B[0m`,\n white: (t: string) => `\\x1B[97m${t}\\x1B[0m`,\n};\n\nfunction header(title: string) {\n return `\\n ${s.bold(s.cyan(title))}`;\n}\n\nfunction section(title: string) {\n return `\\n ${s.cyan(\"▸\")} ${s.white(title)}`;\n}\n\nfunction entry(content: string) {\n return ` ${content}`;\n}\n\nfunction renderPathSection(\n title: string,\n entries: readonly {\n readonly path: string;\n readonly scope: string;\n readonly platforms?: readonly string[];\n readonly note?: string;\n }[],\n) {\n if (!entries.length) return;\n consola.log(section(title));\n for (const e of entries) {\n const tags = [s.dim(e.scope)];\n if (e.platforms) tags.push(s.dim(e.platforms.join(\", \")));\n consola.log(entry(`${s.hi(e.path)} ${tags.join(s.dim(\" · \"))}`));\n if (e.note) consola.log(entry(`${s.dim(` ${e.note}`)}`));\n }\n}\n\nconst formatArgs = {\n json: { type: \"boolean\" as const, description: \"Output as JSON\" },\n toon: { type: \"boolean\" as const, description: \"Output as TOON\" },\n};\n\nconst harnessArg = {\n type: \"positional\" as const,\n description: \"Harness id\",\n required: true,\n};\n\nfunction emit(data: unknown, args: Readonly<{ json?: boolean; toon?: boolean }>) {\n if (args.json) {\n console.log(JSON.stringify(data, null, 2));\n return true;\n }\n if (args.toon) {\n console.log(toToon(data));\n return true;\n }\n return false;\n}\n\nfunction resolveHarness(id: string): ReturnType<typeof getHarness> {\n if (!isHarnessId(id)) {\n consola.error(`Unknown harness: ${id}\\nKnown: ${listHarnesses().join(\", \")}`);\n process.exit(1);\n }\n return getHarness(id);\n}\n\nfunction renderResolvedPathSection(\n title: string,\n entries: readonly { readonly path: string }[],\n): void {\n if (entries.length === 0) return;\n consola.log(section(title));\n for (const item of entries) consola.log(entry(s.hi(item.path)));\n}\n\nfunction parsePositiveTimeout(raw: string | undefined): number | null | undefined {\n if (!raw) return undefined;\n const value = Number(raw);\n return Number.isFinite(value) && value > 0 ? value : null;\n}\n\nfunction modelFailureMessage(details: ModelsOutcome | RunFailure): string {\n return \"error\" in details ? details.error : \"Failed to list models\";\n}\n\nfunction modelDescription(model: Readonly<AvailableModel>): string {\n const features: string[] = [];\n if (model.thinking) features.push(\"thinking\");\n if (model.images) features.push(\"images\");\n const suffix = features.length > 0 ? ` · ${features.join(\", \")}` : \"\";\n return `${model.contextWindow} context · ${model.maxOutputTokens} max-out${suffix}`;\n}\n\nfunction renderModels(details: ModelsOutcome): void {\n consola.log(header(`${details.id} models`));\n consola.log(\"\");\n for (const model of details.models) {\n consola.log(\n entry(`${s.hi(`${model.provider}/${model.id}`)} ${s.dim(modelDescription(model))}`),\n );\n }\n if (details.models.length === 0) consola.log(entry(s.dim(\"No models found\")));\n consola.log(\"\");\n}\n\nfunction finishInvocation(result: InvokeResult, timeoutSeconds: number | undefined): never {\n if (result.stdout) process.stdout.write(result.stdout);\n if (result.stderr) process.stderr.write(result.stderr);\n if (result.timedOut) {\n consola.error(`Timed out after ${timeoutSeconds}s`);\n process.exit(124);\n }\n process.exit(result.exitCode ?? 1);\n}\n\nconst list = defineCommand({\n meta: { description: \"List all known harnesses\" },\n args: { ...formatArgs },\n run({ args }) {\n const harnesses = getAllHarnesses();\n const data = harnesses.map((harness) => ({ id: harness.id, name: harness.name }));\n\n if (emit(data, args)) return;\n\n consola.log(header(\"Harnesses\"));\n consola.log(\"\");\n const maxId = Math.max(...data.map((r) => r.id.length));\n for (const { id, name } of data) {\n consola.log(entry(`${s.hi(id.padEnd(maxId))} ${name}`));\n }\n consola.log(\"\");\n },\n});\n\nconst detect = defineCommand({\n meta: { description: \"Detect installed harnesses and versions\" },\n args: { ...formatArgs },\n run({ args }) {\n const harnesses = getAllHarnesses();\n const results = harnesses.map((harness) => {\n const installed = harness.isInstalled();\n const v = installed ? harness.version : null;\n return { id: harness.id, name: harness.name, installed, version: v };\n });\n\n if (emit(results, args)) return;\n\n consola.log(header(\"System Scan\"));\n consola.log(\"\");\n const maxId = Math.max(...results.map((r) => r.id.length));\n for (const r of results) {\n if (r.installed) {\n const ver = r.version ? ` ${s.dim(`v${r.version}`)}` : \"\";\n consola.log(entry(`${s.green(\"●\")} ${s.hi(r.id.padEnd(maxId))} ${r.name}${ver}`));\n } else {\n consola.log(entry(`${s.dim(\"○\")} ${s.dim(r.id.padEnd(maxId))} ${s.dim(r.name)}`));\n }\n }\n consola.log(\"\");\n },\n});\n\nconst info = defineCommand({\n meta: { description: \"Show metadata for a harness\" },\n args: { id: harnessArg, ...formatArgs },\n run({ args }) {\n const harness = resolveHarness(args.id as string);\n\n if (\n emit(\n {\n id: harness.id,\n name: harness.name,\n binaries: harness.binaries,\n capabilities: harness.capabilities,\n invocationModes: harness.invocationModes,\n modelListing: harness.modelListing !== null,\n modelSelection: harness.invocation?.modelArgs !== undefined,\n config: harness.config,\n sessions: harness.sessions,\n instructions: harness.instructions,\n skills: harness.skills,\n commands: harness.commands,\n hooks: harness.hooks,\n persistence: harness.persistence,\n detection: harness.detection,\n },\n args,\n )\n )\n return;\n\n consola.log(header(`${harness.name} ${s.dim(harness.id)}`));\n\n consola.log(section(\"Binaries\"));\n for (const b of harness.binaries) consola.log(entry(s.white(b)));\n\n consola.log(section(\"Capabilities\"));\n const caps = Object.entries(harness.capabilities)\n .map(([k, v]) => (v ? s.green(k) : s.dim(k)))\n .join(s.dim(\" · \"));\n consola.log(entry(caps));\n\n consola.log(section(\"Invocation modes\"));\n const modes = Object.entries(harness.invocationModes)\n .map(([k, v]) => (v ? s.green(k) : s.dim(k)))\n .join(s.dim(\" · \"));\n consola.log(entry(modes));\n\n consola.log(section(\"Models\"));\n const modelFeatures = {\n listing: harness.modelListing !== null,\n selection: harness.invocation?.modelArgs !== undefined,\n };\n consola.log(\n entry(\n Object.entries(modelFeatures)\n .map(([k, v]) => (v ? s.green(k) : s.dim(k)))\n .join(s.dim(\" · \")),\n ),\n );\n\n renderPathSection(\"Config\", harness.config);\n renderPathSection(\"Sessions\", harness.sessions);\n renderPathSection(\"Instructions\", harness.instructions);\n renderPathSection(\"Skills\", harness.skills);\n renderPathSection(\"Commands\", harness.commands);\n renderPathSection(\"Hooks\", harness.hooks);\n\n if (harness.persistence.length) {\n consola.log(section(\"Persistence\"));\n for (const e of harness.persistence) {\n const note = e.note ? ` ${s.dim(e.note)}` : \"\";\n consola.log(entry(`${s.white(e.format)}${note}`));\n }\n }\n\n consola.log(\"\");\n },\n});\n\nconst paths = defineCommand({\n meta: { description: \"Show resolved paths for current platform\" },\n args: { id: harnessArg, ...formatArgs },\n run({ args }) {\n const harness = resolveHarness(args.id as string);\n const resolved = harness.resolve();\n\n if (emit(resolved, args)) return;\n\n consola.log(header(`${harness.name} ${s.dim(process.platform)}`));\n\n renderResolvedPathSection(\"Config\", resolved.config);\n renderResolvedPathSection(\"Sessions\", resolved.sessions);\n renderResolvedPathSection(\"Instructions\", resolved.instructions);\n renderResolvedPathSection(\"Skills\", resolved.skills);\n renderResolvedPathSection(\"Commands\", resolved.commands);\n renderResolvedPathSection(\"Hooks\", resolved.hooks);\n\n consola.log(\"\");\n },\n});\n\nconst models = defineCommand({\n meta: { description: \"List models available to a harness\" },\n args: {\n id: harnessArg,\n search: {\n type: \"positional\" as const,\n description: \"Optional native model search filter\",\n required: false,\n },\n cwd: {\n type: \"string\" as const,\n description: \"Working directory used while loading harness configuration\",\n },\n timeout: { type: \"string\" as const, description: \"Wall-clock budget in seconds\" },\n ...formatArgs,\n },\n async run({ args }) {\n const timeoutSeconds = parsePositiveTimeout(args.timeout);\n if (timeoutSeconds === null) {\n consola.error(`Invalid timeout: ${args.timeout}`);\n process.exitCode = 1;\n return;\n }\n\n const result = await listHarnessModels(args.id as string, {\n search: args.search as string | undefined,\n cwd: args.cwd,\n timeoutSeconds,\n });\n if (emit(result.details, args)) {\n if (result.isError) process.exitCode = 1;\n return;\n }\n if (result.isError || !(\"models\" in result.details)) {\n consola.error(modelFailureMessage(result.details));\n process.exitCode = 1;\n return;\n }\n\n renderModels(result.details);\n },\n});\n\nconst run = defineCommand({\n meta: { description: \"Run one prompt through a harness's non-interactive mode\" },\n args: {\n id: harnessArg,\n prompt: {\n type: \"positional\" as const,\n description: \"Prompt to send to the harness\",\n required: true,\n },\n cwd: { type: \"string\" as const, description: \"Working directory for the run\" },\n model: { type: \"string\" as const, description: \"Harness-native model id or selector\" },\n timeout: { type: \"string\" as const, description: \"Wall-clock budget in seconds\" },\n json: {\n type: \"boolean\" as const,\n description: \"Use the harness's structured (JSON) output mode\",\n },\n tools: {\n type: \"boolean\" as const,\n description: \"Enable tools; default false uses native advisor without tools mode\",\n },\n \"read-only\": {\n type: \"boolean\" as const,\n description: \"Require native read-only tool enforcement; implies --tools\",\n },\n },\n async run({ args }) {\n const harness = resolveHarness(args.id as string);\n const structured = args.json === true;\n const readOnly = args[\"read-only\"] === true;\n const tools = readOnly || args.tools === true;\n\n const invocationOptions = { model: args.model, structured, tools, readOnly };\n if (!harness.buildInvocation(\"\", invocationOptions)) {\n consola.error(harness.invocationError(invocationOptions) ?? \"Invalid invocation\");\n process.exit(1);\n }\n\n const timeoutSeconds = parsePositiveTimeout(args.timeout);\n if (timeoutSeconds === null) {\n consola.error(`Invalid timeout: ${args.timeout}`);\n process.exit(1);\n }\n\n const result = await harness.invoke(args.prompt as string, {\n cwd: args.cwd,\n model: args.model,\n timeoutMs: timeoutSeconds === undefined ? undefined : timeoutSeconds * 1000,\n structured,\n tools,\n readOnly,\n });\n\n finishInvocation(result, timeoutSeconds);\n },\n});\n\nconst main = defineCommand({\n meta: {\n name: \"harnesses\",\n version,\n description: \"Metadata toolkit for AI coding harnesses\",\n },\n subCommands: {\n list,\n detect,\n info,\n paths,\n models,\n run,\n \"mcp-servers\": () => import(\"./commands/mcp-servers.ts\").then((m) => m.default),\n agents: () => import(\"./commands/agents.ts\").then((m) => m.default),\n mcp: () => import(\"./commands/mcp.ts\").then((m) => m.default),\n },\n});\n\nawait runMain(main);\n"],"mappings":";;;;;;;AASA,MAAM,IAAI;CACR,OAAO,MAAc,WAAW,EAAE;CAClC,KAAK,MAAc,WAAW,EAAE;CAChC,QAAQ,MAAc,WAAW,EAAE;CACnC,MAAM,MAAc,WAAW,EAAE;CACjC,MAAM,MAAc,WAAW,EAAE;CACjC,OAAO,MAAc,UAAU,EAAE;CACjC,QAAQ,MAAc,WAAW,EAAE;AACrC;AAEA,SAAS,OAAO,OAAe;CAC7B,OAAO,OAAO,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC;AACpC;AAEA,SAAS,QAAQ,OAAe;CAC9B,OAAO,OAAO,EAAE,KAAK,GAAG,EAA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