@agntn/harnesses 0.3.0 → 0.4.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/README.md +35 -5
- package/dist/_chunks/agents.mjs +5 -3
- package/dist/_chunks/agents.mjs.map +1 -1
- package/dist/_chunks/mcp-servers.mjs +5 -3
- package/dist/_chunks/mcp-servers.mjs.map +1 -1
- package/dist/_chunks/mcp.mjs +10 -1
- package/dist/_chunks/mcp.mjs.map +1 -1
- package/dist/_chunks/output.mjs +7 -1
- package/dist/_chunks/output.mjs.map +1 -1
- package/dist/_chunks/prompts.mjs +4 -2
- package/dist/_chunks/prompts.mjs.map +1 -1
- package/dist/_chunks/{prompt-sync.d.mts → skills-sync.d.mts} +111 -53
- package/dist/_chunks/skills-sync.d.mts.map +1 -0
- package/dist/_chunks/{prompt-sync.mjs → skills-sync.mjs} +392 -100
- package/dist/_chunks/skills-sync.mjs.map +1 -0
- package/dist/_chunks/skills.mjs +30 -0
- package/dist/_chunks/skills.mjs.map +1 -0
- package/dist/_chunks/tool-operations.mjs +36 -8
- package/dist/_chunks/tool-operations.mjs.map +1 -1
- package/dist/_chunks/tool-schemas.d.mts +21 -13
- package/dist/_chunks/tool-schemas.d.mts.map +1 -1
- package/dist/_chunks/tool-schemas.mjs +7 -1
- package/dist/_chunks/tool-schemas.mjs.map +1 -1
- package/dist/_chunks/types.mjs +5 -2
- package/dist/_chunks/types.mjs.map +1 -1
- package/dist/cli.mjs +9 -3
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +16 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +5 -3
- package/dist/index.mjs.map +1 -1
- package/dist/mcp.d.mts +2 -0
- package/dist/mcp.d.mts.map +1 -1
- package/dist/mcp.mjs +6256 -3
- package/dist/mcp.mjs.map +1 -1
- package/dist/tool-operations.d.mts +14 -3
- package/dist/tool-operations.d.mts.map +1 -1
- package/dist/tool-operations.mjs +3 -3
- package/dist/tool-schemas.d.mts +2 -2
- package/dist/tool-schemas.mjs +1 -1
- package/dist/typebox.LICENSE +23 -0
- package/package.json +19 -19
- package/packages/omp/extensions/harnesses.ts +27 -40
- package/packages/pi/extensions/harnesses.ts +26 -45
- package/packages/shared/tui.ts +13 -0
- package/dist/THIRD-PARTY-LICENSES.md +0 -36
- package/dist/_chunks/libs/typebox.mjs +0 -5439
- package/dist/_chunks/libs/typebox.mjs.map +0 -1
- package/dist/_chunks/prompt-sync.d.mts.map +0 -1
- package/dist/_chunks/prompt-sync.mjs.map +0 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
//#region src/types.d.ts
|
|
2
|
+
declare const version: string;
|
|
3
|
+
type HarnessId = "antigravity" | "codex" | "gemini" | "grok" | "claude" | "opencode" | "cursor" | "freebuff" | "github-copilot" | "mastracode" | "omp" | "pi" | "prime-agent";
|
|
4
|
+
type EvidenceLevel = "official" | "community" | "inferred";
|
|
5
|
+
type Platform = "linux" | "darwin" | "win32";
|
|
6
|
+
interface PathCandidate {
|
|
6
7
|
path: string;
|
|
7
8
|
scope: "user" | "project" | "system" | "data";
|
|
8
9
|
level: EvidenceLevel;
|
|
@@ -10,27 +11,31 @@ export interface PathCandidate {
|
|
|
10
11
|
note?: string;
|
|
11
12
|
}
|
|
12
13
|
/** The path lists of a harness descriptor, as named in {@link ResolvedPaths}. */
|
|
13
|
-
|
|
14
|
+
type PathCategory = "config" | "sessions" | "instructions" | "skills" | "commands" | "promptTemplates" | "hooks" | "temp";
|
|
14
15
|
/**
|
|
15
16
|
* An environment variable the harness reads to move one of its roots. `path`
|
|
16
17
|
* is the default root, used while the variable is unset or empty.
|
|
17
18
|
*/
|
|
18
|
-
|
|
19
|
+
interface EnvOverride extends PathCandidate {
|
|
19
20
|
variable: string;
|
|
20
21
|
/** Categories with entries under this root, which move with it. */
|
|
21
22
|
relocates: PathCategory[];
|
|
22
23
|
}
|
|
24
|
+
/** The user-scope skills directory that skill synchronization links to the source. */
|
|
25
|
+
interface SkillsSyncTarget extends PathCandidate {
|
|
26
|
+
scope: "user";
|
|
27
|
+
}
|
|
23
28
|
/** One stable user-scope destination used by prompt template synchronization. */
|
|
24
|
-
|
|
29
|
+
interface PromptTemplateSyncTarget extends PathCandidate {
|
|
25
30
|
scope: "user";
|
|
26
31
|
format: "markdown" | "gemini-toml";
|
|
27
32
|
}
|
|
28
|
-
|
|
33
|
+
interface StorageDescriptor {
|
|
29
34
|
format: string;
|
|
30
35
|
level: EvidenceLevel;
|
|
31
36
|
note?: string;
|
|
32
37
|
}
|
|
33
|
-
|
|
38
|
+
interface HarnessCapabilities {
|
|
34
39
|
mcp: boolean;
|
|
35
40
|
vision: boolean;
|
|
36
41
|
/** Audio reaches the model without conversion or MCP. */
|
|
@@ -41,7 +46,7 @@ export interface HarnessCapabilities {
|
|
|
41
46
|
streaming: boolean;
|
|
42
47
|
}
|
|
43
48
|
/** How to run one prompt through the harness non-interactively. */
|
|
44
|
-
|
|
49
|
+
interface HarnessInvocation {
|
|
45
50
|
/** Binary to spawn; defaults to the harness's first `binaries` entry. */
|
|
46
51
|
binary?: string;
|
|
47
52
|
/** Full agent argument template; every "{prompt}" is replaced with the prompt text. */
|
|
@@ -70,7 +75,7 @@ export interface HarnessInvocation {
|
|
|
70
75
|
note?: string;
|
|
71
76
|
}
|
|
72
77
|
/** Invocation modes a harness supports without fallback or prompt-only restrictions. */
|
|
73
|
-
|
|
78
|
+
interface HarnessInvocationModes {
|
|
74
79
|
advisor: boolean;
|
|
75
80
|
advisorStructured: boolean;
|
|
76
81
|
readOnly: boolean;
|
|
@@ -79,7 +84,7 @@ export interface HarnessInvocationModes {
|
|
|
79
84
|
agentStructured: boolean;
|
|
80
85
|
}
|
|
81
86
|
/** How to ask one harness CLI for the models currently available to it. */
|
|
82
|
-
|
|
87
|
+
interface HarnessModelListing {
|
|
83
88
|
/** Arguments used when no search filter is supplied. */
|
|
84
89
|
args: string[];
|
|
85
90
|
/**
|
|
@@ -91,7 +96,7 @@ export interface HarnessModelListing {
|
|
|
91
96
|
note?: string;
|
|
92
97
|
}
|
|
93
98
|
/** One model normalized from a harness's native model-listing output. */
|
|
94
|
-
|
|
99
|
+
interface AvailableModel {
|
|
95
100
|
provider: string;
|
|
96
101
|
id: string;
|
|
97
102
|
/** Absent when the native listing prints only ids, like Grok's. */
|
|
@@ -103,7 +108,7 @@ export interface AvailableModel {
|
|
|
103
108
|
default?: boolean;
|
|
104
109
|
}
|
|
105
110
|
/** Options for querying the models available to one harness. */
|
|
106
|
-
|
|
111
|
+
interface ListModelsOptions {
|
|
107
112
|
search?: string;
|
|
108
113
|
cwd?: string;
|
|
109
114
|
env?: Record<string, string>;
|
|
@@ -112,7 +117,7 @@ export interface ListModelsOptions {
|
|
|
112
117
|
/** Cancel with the same process cleanup as a timeout. */
|
|
113
118
|
signal?: AbortSignal;
|
|
114
119
|
}
|
|
115
|
-
|
|
120
|
+
interface InvokeOptions {
|
|
116
121
|
cwd?: string;
|
|
117
122
|
env?: Record<string, string>;
|
|
118
123
|
/** Harness-native model id or selector. */
|
|
@@ -128,7 +133,7 @@ export interface InvokeOptions {
|
|
|
128
133
|
/** Use the harness's structured (JSON) output mode instead of plain text. */
|
|
129
134
|
structured?: boolean;
|
|
130
135
|
}
|
|
131
|
-
|
|
136
|
+
interface InvokeResult {
|
|
132
137
|
command: string;
|
|
133
138
|
args: string[];
|
|
134
139
|
stdout: string;
|
|
@@ -142,12 +147,12 @@ export interface InvokeResult {
|
|
|
142
147
|
idleMs?: number;
|
|
143
148
|
}
|
|
144
149
|
/** Result of one native model-listing command. */
|
|
145
|
-
|
|
150
|
+
interface ListModelsResult extends InvokeResult {
|
|
146
151
|
/** Empty on a successful no-match response or when the command itself failed. */
|
|
147
152
|
models: AvailableModel[];
|
|
148
153
|
}
|
|
149
154
|
/** Normalized MCP server entry, shared across every harness dialect. */
|
|
150
|
-
|
|
155
|
+
interface McpServerConfig {
|
|
151
156
|
name: string;
|
|
152
157
|
transport: "stdio" | "http" | "sse";
|
|
153
158
|
command?: string;
|
|
@@ -164,35 +169,37 @@ export interface McpServerConfig {
|
|
|
164
169
|
enabled?: boolean;
|
|
165
170
|
}
|
|
166
171
|
/** How one harness config file stores its MCP servers. */
|
|
167
|
-
|
|
172
|
+
interface McpConfigFile extends PathCandidate {
|
|
168
173
|
format: "json" | "toml";
|
|
169
174
|
/** Object path to the server map inside the file, e.g. ["mcpServers"]. */
|
|
170
175
|
key: string[];
|
|
171
176
|
/**
|
|
172
177
|
* Shape of individual entries; "standard" is the {command, args, env, url}
|
|
173
|
-
* family, "prime" is that family with env values as {"env": "NAME"} references
|
|
174
|
-
*
|
|
178
|
+
* family, "prime" is that family with env values as {"env": "NAME"} references,
|
|
179
|
+
* "mastracode" is that family read by its keys alone, type ignored, and "pi"
|
|
180
|
+
* is that family without sse that keeps the entry fields it doesn't manage.
|
|
175
181
|
*/
|
|
176
|
-
dialect: "standard" | "antigravity" | "mastracode" | "opencode" | "prime" | "vscode";
|
|
182
|
+
dialect: "standard" | "antigravity" | "mastracode" | "opencode" | "pi" | "prime" | "vscode";
|
|
177
183
|
}
|
|
178
|
-
|
|
184
|
+
interface HarnessDetection {
|
|
179
185
|
/** Environment variables that indicate running inside this agent. */
|
|
180
186
|
envVars: string[];
|
|
181
187
|
/** Project-level files or directories whose presence indicates this agent. */
|
|
182
188
|
projectMarkers: string[];
|
|
183
189
|
}
|
|
184
|
-
|
|
190
|
+
interface ResolveOptions {
|
|
185
191
|
homeDir?: string;
|
|
186
192
|
projectRoot?: string;
|
|
187
193
|
platform?: Platform;
|
|
188
194
|
/** Replaces `os.tmpdir()` as the value of `${TMPDIR}`. */
|
|
189
195
|
tempDir?: string;
|
|
190
196
|
}
|
|
191
|
-
|
|
197
|
+
interface ResolvedPaths {
|
|
192
198
|
config: PathCandidate[];
|
|
193
199
|
sessions: PathCandidate[];
|
|
194
200
|
instructions: PathCandidate[];
|
|
195
201
|
skills: PathCandidate[];
|
|
202
|
+
skillsSyncTarget: SkillsSyncTarget | null;
|
|
196
203
|
commands: PathCandidate[];
|
|
197
204
|
promptTemplates: PathCandidate[];
|
|
198
205
|
promptTemplateSyncTarget: PromptTemplateSyncTarget | null;
|
|
@@ -200,13 +207,15 @@ export interface ResolvedPaths {
|
|
|
200
207
|
/** Temp roots, moved by a set `temp` override from {@link EnvOverride}. */
|
|
201
208
|
temp: PathCandidate[];
|
|
202
209
|
}
|
|
210
|
+
//#endregion
|
|
211
|
+
//#region src/harness.d.ts
|
|
203
212
|
type InvocationOptions = Readonly<{
|
|
204
213
|
model?: string;
|
|
205
214
|
structured?: boolean;
|
|
206
215
|
tools?: boolean;
|
|
207
216
|
readOnly?: boolean;
|
|
208
217
|
}>;
|
|
209
|
-
|
|
218
|
+
declare abstract class Harness {
|
|
210
219
|
abstract readonly id: HarnessId;
|
|
211
220
|
abstract readonly name: string;
|
|
212
221
|
abstract readonly binaries: string[];
|
|
@@ -215,6 +224,8 @@ export declare abstract class Harness {
|
|
|
215
224
|
abstract readonly persistence: StorageDescriptor[];
|
|
216
225
|
abstract readonly instructions: PathCandidate[];
|
|
217
226
|
abstract readonly skills: PathCandidate[];
|
|
227
|
+
/** User-scope skills directory that skill synchronization links; null when none is verified. */
|
|
228
|
+
readonly skillsSyncTarget: SkillsSyncTarget | null;
|
|
218
229
|
abstract readonly commands: PathCandidate[];
|
|
219
230
|
/** Reusable prompt files; empty when no CLI template location is verified. */
|
|
220
231
|
readonly promptTemplates: PathCandidate[];
|
|
@@ -272,7 +283,7 @@ export declare abstract class Harness {
|
|
|
272
283
|
/**
|
|
273
284
|
* Runs one prompt through the harness non-interactively and collects the
|
|
274
285
|
* output. stdin is closed so a harness that falls back to interactive mode
|
|
275
|
-
* exits instead of waiting forever.
|
|
286
|
+
* exits instead of waiting forever. Inside a harness that `invoke` started, it rejects.
|
|
276
287
|
*
|
|
277
288
|
* @param prompt - Prompt sent to the harness.
|
|
278
289
|
* @param options - Invocation, environment, timeout, and cancellation options.
|
|
@@ -350,9 +361,11 @@ export declare abstract class Harness {
|
|
|
350
361
|
*/
|
|
351
362
|
private resolveTemp;
|
|
352
363
|
}
|
|
353
|
-
|
|
364
|
+
type HarnessConstructor = new () => Harness;
|
|
365
|
+
//#endregion
|
|
366
|
+
//#region src/mcp-servers.d.ts
|
|
354
367
|
/** One resolved config file together with the servers it declares. */
|
|
355
|
-
|
|
368
|
+
interface McpConfigListing {
|
|
356
369
|
path: string;
|
|
357
370
|
scope: McpConfigFile["scope"];
|
|
358
371
|
format: McpConfigFile["format"];
|
|
@@ -364,9 +377,13 @@ export interface McpConfigListing {
|
|
|
364
377
|
error?: string;
|
|
365
378
|
}
|
|
366
379
|
/** Thrown when a server's env cannot be written the way the target dialect requires. */
|
|
367
|
-
|
|
380
|
+
declare class McpEnvError extends Error {
|
|
368
381
|
readonly name = "McpEnvError";
|
|
369
382
|
}
|
|
383
|
+
/** Thrown when the target dialect cannot carry a server's transport. */
|
|
384
|
+
declare class McpTransportError extends Error {
|
|
385
|
+
readonly name = "McpTransportError";
|
|
386
|
+
}
|
|
370
387
|
/**
|
|
371
388
|
* Lists the MCP servers a harness has configured, per declared config file.
|
|
372
389
|
* Missing files come back with `exists: false`; unparsable ones carry `error`.
|
|
@@ -375,7 +392,7 @@ export declare class McpEnvError extends Error {
|
|
|
375
392
|
* @param options - Platform and path-resolution overrides.
|
|
376
393
|
* @returns {McpConfigListing[]} One listing per declared config file.
|
|
377
394
|
*/
|
|
378
|
-
|
|
395
|
+
declare function listMcpServers(harness: Harness, options?: ResolveOptions): McpConfigListing[];
|
|
379
396
|
/**
|
|
380
397
|
* Adds (or replaces) one MCP server in a harness's config. The rest of the
|
|
381
398
|
* file is preserved: JSON through a parse/serialize round trip (formatting
|
|
@@ -387,7 +404,7 @@ export declare function listMcpServers(harness: Harness, options?: ResolveOption
|
|
|
387
404
|
* @param options - Platform and path-resolution overrides.
|
|
388
405
|
* @returns {{ path: string, replaced: boolean }} The written path and replacement status.
|
|
389
406
|
*/
|
|
390
|
-
|
|
407
|
+
declare function addMcpServer(harness: Harness, server: McpServerConfig, scope?: "user" | "project", options?: ResolveOptions): {
|
|
391
408
|
path: string;
|
|
392
409
|
replaced: boolean;
|
|
393
410
|
};
|
|
@@ -400,7 +417,7 @@ export declare function addMcpServer(harness: Harness, server: McpServerConfig,
|
|
|
400
417
|
* @param options - Platform and path-resolution overrides.
|
|
401
418
|
* @returns {{ path: string, removed: boolean }} The targeted path and removal status.
|
|
402
419
|
*/
|
|
403
|
-
|
|
420
|
+
declare function removeMcpServer(harness: Harness, name: string, scope?: "user" | "project", options?: ResolveOptions): {
|
|
404
421
|
path: string;
|
|
405
422
|
removed: boolean;
|
|
406
423
|
};
|
|
@@ -411,16 +428,16 @@ export declare function removeMcpServer(harness: Harness, name: string, scope?:
|
|
|
411
428
|
* @param text - JSONC source text.
|
|
412
429
|
* @returns {unknown} The parsed JSON value.
|
|
413
430
|
*/
|
|
414
|
-
|
|
431
|
+
declare function parseJsonc(text: string): unknown;
|
|
415
432
|
/**
|
|
416
433
|
* Resolves the master sync file path: $XDG_CONFIG_HOME or ~/.config.
|
|
417
434
|
*
|
|
418
435
|
* @param options - Path-resolution overrides.
|
|
419
436
|
* @returns {string} The resolved master MCP config path.
|
|
420
437
|
*/
|
|
421
|
-
|
|
438
|
+
declare function masterMcpPath(options?: ResolveOptions): string;
|
|
422
439
|
/** One harness's outcome of a sync run. */
|
|
423
|
-
|
|
440
|
+
interface SyncTargetResult {
|
|
424
441
|
id: string;
|
|
425
442
|
path?: string;
|
|
426
443
|
/** Reason this harness could not be targeted; `results` is empty then. */
|
|
@@ -435,7 +452,7 @@ export interface SyncTargetResult {
|
|
|
435
452
|
}>;
|
|
436
453
|
}
|
|
437
454
|
/** Outcome of resetting the harness configs to the master list. */
|
|
438
|
-
|
|
455
|
+
interface SyncReport {
|
|
439
456
|
source: string;
|
|
440
457
|
servers: string[];
|
|
441
458
|
targets: SyncTargetResult[];
|
|
@@ -446,7 +463,7 @@ export interface SyncReport {
|
|
|
446
463
|
* @param options - Path-resolution overrides.
|
|
447
464
|
* @returns {{ path: string, servers: McpServerConfig[], excludes: string[] }} The master list.
|
|
448
465
|
*/
|
|
449
|
-
|
|
466
|
+
declare function readMasterMcpServers(options?: ResolveOptions): {
|
|
450
467
|
path: string;
|
|
451
468
|
servers: McpServerConfig[];
|
|
452
469
|
/** Harness ids the master list opts out of syncing. */
|
|
@@ -461,9 +478,11 @@ export declare function readMasterMcpServers(options?: ResolveOptions): {
|
|
|
461
478
|
* @param options - Platform and path-resolution overrides.
|
|
462
479
|
* @returns {SyncReport} Per-harness synchronization outcomes.
|
|
463
480
|
*/
|
|
464
|
-
|
|
481
|
+
declare function syncMcpServers(harnesses: readonly Harness[], options?: ResolveOptions): SyncReport;
|
|
482
|
+
//#endregion
|
|
483
|
+
//#region src/agents-sync.d.ts
|
|
465
484
|
/** Configuration read from agents.jsonc. */
|
|
466
|
-
|
|
485
|
+
interface AgentsConfig {
|
|
467
486
|
/** The master instructions file every harness links to. */
|
|
468
487
|
source: string;
|
|
469
488
|
/** Relative files to link beside every harness instructions target. */
|
|
@@ -473,9 +492,9 @@ export interface AgentsConfig {
|
|
|
473
492
|
/** Path the config was read from; absent when defaults were used. */
|
|
474
493
|
configPath?: string;
|
|
475
494
|
}
|
|
476
|
-
|
|
495
|
+
type AgentsSyncAction = "linked" | "relinked" | "adopted" | "unchanged" | "skipped";
|
|
477
496
|
/** One companion file's outcome for a harness target. */
|
|
478
|
-
|
|
497
|
+
interface AgentsCompanionTargetResult {
|
|
479
498
|
readonly source: string;
|
|
480
499
|
readonly path: string;
|
|
481
500
|
readonly action: Exclude<AgentsSyncAction, "skipped">;
|
|
@@ -483,7 +502,7 @@ export interface AgentsCompanionTargetResult {
|
|
|
483
502
|
readonly detail?: string;
|
|
484
503
|
}
|
|
485
504
|
/** One harness's outcome of an agents sync run. */
|
|
486
|
-
|
|
505
|
+
interface AgentsTargetResult {
|
|
487
506
|
id: string;
|
|
488
507
|
path?: string;
|
|
489
508
|
action: AgentsSyncAction;
|
|
@@ -493,7 +512,7 @@ export interface AgentsTargetResult {
|
|
|
493
512
|
companions?: readonly AgentsCompanionTargetResult[];
|
|
494
513
|
}
|
|
495
514
|
/** Outcome of one agents sync/doctor run. */
|
|
496
|
-
|
|
515
|
+
interface AgentsSyncReport {
|
|
497
516
|
source: string;
|
|
498
517
|
check: boolean;
|
|
499
518
|
targets: AgentsTargetResult[];
|
|
@@ -504,7 +523,7 @@ export interface AgentsSyncReport {
|
|
|
504
523
|
* @param options - Path-resolution overrides.
|
|
505
524
|
* @returns {AgentsConfig} The normalized sync configuration.
|
|
506
525
|
*/
|
|
507
|
-
|
|
526
|
+
declare function readAgentsConfig(options?: ResolveOptions): AgentsConfig;
|
|
508
527
|
/**
|
|
509
528
|
* Links every harness's user-scope instructions file to the master. In check
|
|
510
529
|
* mode nothing is written; the report shows what a real run would do.
|
|
@@ -514,10 +533,12 @@ export declare function readAgentsConfig(options?: ResolveOptions): AgentsConfig
|
|
|
514
533
|
* @param options - Path-resolution overrides.
|
|
515
534
|
* @returns {AgentsSyncReport} Per-harness synchronization outcomes.
|
|
516
535
|
*/
|
|
517
|
-
|
|
518
|
-
|
|
536
|
+
declare function syncAgentsFiles(harnesses: readonly Harness[], check?: boolean, options?: ResolveOptions): AgentsSyncReport;
|
|
537
|
+
//#endregion
|
|
538
|
+
//#region src/prompt-sync.d.ts
|
|
539
|
+
type PromptSyncAction = "linked" | "generated" | "relinked" | "replaced" | "adopted" | "removed" | "unchanged" | "skipped";
|
|
519
540
|
/** One prompt template's outcome at a harness destination. */
|
|
520
|
-
|
|
541
|
+
interface PromptTemplateTargetResult {
|
|
521
542
|
readonly name: string;
|
|
522
543
|
readonly source?: string;
|
|
523
544
|
readonly path: string;
|
|
@@ -526,7 +547,7 @@ export interface PromptTemplateTargetResult {
|
|
|
526
547
|
readonly detail?: string;
|
|
527
548
|
}
|
|
528
549
|
/** One harness's outcome of a prompt template sync run. */
|
|
529
|
-
|
|
550
|
+
interface PromptSyncTargetResult {
|
|
530
551
|
readonly id: string;
|
|
531
552
|
readonly path?: string;
|
|
532
553
|
readonly format?: PromptTemplateSyncTarget["format"];
|
|
@@ -537,7 +558,7 @@ export interface PromptSyncTargetResult {
|
|
|
537
558
|
readonly templates: readonly PromptTemplateTargetResult[];
|
|
538
559
|
}
|
|
539
560
|
/** Outcome of one prompt template sync run. */
|
|
540
|
-
|
|
561
|
+
interface PromptSyncReport {
|
|
541
562
|
readonly source: string;
|
|
542
563
|
readonly check: boolean;
|
|
543
564
|
readonly templates: readonly string[];
|
|
@@ -555,5 +576,42 @@ export interface PromptSyncReport {
|
|
|
555
576
|
* @param options - Path-resolution overrides.
|
|
556
577
|
* @returns {PromptSyncReport} Per-harness synchronization outcomes.
|
|
557
578
|
*/
|
|
558
|
-
|
|
559
|
-
//#
|
|
579
|
+
declare function syncPromptTemplates(harnesses: readonly Harness[], check?: boolean, options?: ResolveOptions): PromptSyncReport;
|
|
580
|
+
//#endregion
|
|
581
|
+
//#region src/directory-link.d.ts
|
|
582
|
+
type DirectoryLinkAction = "linked" | "relinked" | "adopted" | "unchanged" | "skipped";
|
|
583
|
+
//#endregion
|
|
584
|
+
//#region src/skills-sync.d.ts
|
|
585
|
+
type SkillsSyncAction = DirectoryLinkAction;
|
|
586
|
+
/** One harness's outcome of a skill sync run. */
|
|
587
|
+
interface SkillsSyncTargetResult {
|
|
588
|
+
readonly id: string;
|
|
589
|
+
readonly path?: string;
|
|
590
|
+
readonly action: SkillsSyncAction;
|
|
591
|
+
/** Backup path, skip reason, or a check-mode note. */
|
|
592
|
+
readonly detail?: string;
|
|
593
|
+
}
|
|
594
|
+
/** Outcome of one skill sync run. */
|
|
595
|
+
interface SkillsSyncReport {
|
|
596
|
+
readonly source: string;
|
|
597
|
+
readonly check: boolean;
|
|
598
|
+
/** Source subdirectories that hold a SKILL.md. */
|
|
599
|
+
readonly skills: readonly string[];
|
|
600
|
+
readonly targets: readonly SkillsSyncTargetResult[];
|
|
601
|
+
}
|
|
602
|
+
/**
|
|
603
|
+
* Links each harness's user-scope skills directory to the canonical skills
|
|
604
|
+
* directory under the agntn XDG data directory, so a skill added or edited
|
|
605
|
+
* through any harness lands in one place. Per-skill links into the source are
|
|
606
|
+
* replaced; any other content is backed up first. In check mode nothing is
|
|
607
|
+
* written.
|
|
608
|
+
*
|
|
609
|
+
* @param harnesses - Harnesses to inspect or update.
|
|
610
|
+
* @param check - Report intended changes without writing them.
|
|
611
|
+
* @param options - Path-resolution overrides.
|
|
612
|
+
* @returns {SkillsSyncReport} Per-harness synchronization outcomes.
|
|
613
|
+
*/
|
|
614
|
+
declare function syncSkills(harnesses: readonly Harness[], check?: boolean, options?: ResolveOptions): SkillsSyncReport;
|
|
615
|
+
//#endregion
|
|
616
|
+
export { StorageDescriptor as $, HarnessConstructor as A, InvokeOptions as B, listMcpServers as C, removeMcpServer as D, readMasterMcpServers as E, HarnessDetection as F, McpServerConfig as G, ListModelsOptions as H, HarnessId as I, Platform as J, PathCandidate as K, HarnessInvocation as L, EnvOverride as M, EvidenceLevel as N, syncMcpServers as O, HarnessCapabilities as P, SkillsSyncTarget as Q, HarnessInvocationModes as R, addMcpServer as S, parseJsonc as T, ListModelsResult as U, InvokeResult as V, McpConfigFile as W, ResolveOptions as X, PromptTemplateSyncTarget as Y, ResolvedPaths as Z, McpConfigListing as _, PromptSyncAction as a, SyncReport as b, PromptTemplateTargetResult as c, AgentsConfig as d, version as et, AgentsSyncAction as f, syncAgentsFiles as g, readAgentsConfig as h, syncSkills as i, AvailableModel as j, Harness as k, syncPromptTemplates as l, AgentsTargetResult as m, SkillsSyncReport as n, PromptSyncReport as o, AgentsSyncReport as p, PathCategory as q, SkillsSyncTargetResult as r, PromptSyncTargetResult as s, SkillsSyncAction as t, AgentsCompanionTargetResult as u, McpEnvError as v, masterMcpPath as w, SyncTargetResult as x, McpTransportError as y, HarnessModelListing as z };
|
|
617
|
+
//# sourceMappingURL=skills-sync.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skills-sync.d.mts","names":[],"sources":["../../src/types.ts","../../src/harness.ts","../../src/mcp-servers.ts","../../src/agents-sync.ts","../../src/prompt-sync.ts","../../src/directory-link.ts","../../src/skills-sync.ts"],"mappings":";cAEa;KAED;KAcA;KACA;UAEK;EACf;EACA;EACA,OAAO;EACP,YAAY;EACZ;;;KAIU;;;;;UAcK,oBAAoB;EACnC;;EAEA,WAAW;;;UAII,yBAAyB;EACxC;;;UAIe,iCAAiC;EAChD;EACA;;UAGe;EACf;EACA,OAAO;EACP;;UAGe;EACf;EACA;;EAEA;;EAEA;EACA;EACA;;;UAIe;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;EAMA;EACA,OAAO;EACP;;;UAIe;EACf;EACA;EACA;EACA;EACA;EACA;;;UAIe;;EAEf;;;;;EAKA;EACA,OAAO;EACP;;;UAIe;EACf;EACA;;EAEA;EACA;EACA;EACA;;EAEA;;;UAIe;EACf;EACA;EACA,MAAM;;EAEN;;EAEA,SAAS;;UAGM;EACf;EACA,MAAM;;EAEN;;EAEA;;EAEA;;EAEA;;EAEA,SAAS;;EAET;;UAGe;EACf;EACA;EACA;EACA;;EAEA;EACA;;EAEA;;EAEA;;;UAIe,yBAAyB;;EAExC,QAAQ;;;UAIO;EACf;EACA;EACA;EACA;;;;;;EAMA,MAAM;EACN;EACA,UAAU;;EAEV;;;UAIe,sBAAsB;EACrC;;EAEA;;;;;;;EAOA;;UAGe;;EAEf;;EAEA;;UAGe;EACf;EACA;EACA,WAAW;;EAEX;;UAGe;EACf,QAAQ;EACR,UAAU;EACV,cAAc;EACd,QAAQ;EACR,kBAAkB;EAClB,UAAU;EACV,iBAAiB;EACjB,0BAA0B;EAC1B,OAAO;;EAEP,MAAM;;;;KC1LH,oBAAoB;EACvB;EACA;EACA;EACA;;uBAoToB;oB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