dryai 2.2.0 → 3.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/README.md +25 -21
- package/dest/cli.d.ts +68 -0
- package/dest/cli.js +147 -0
- package/dest/commands/skills/add.d.ts +2 -2
- package/dest/commands/skills/add.js +23 -7
- package/dest/commands/skills/index.d.ts +3 -3
- package/dest/commands/skills/index.js +10 -11
- package/dest/commands/skills/list.d.ts +2 -2
- package/dest/commands/skills/list.js +4 -3
- package/dest/commands/skills/rehash-all.d.ts +2 -2
- package/dest/commands/skills/rehash-all.js +6 -5
- package/dest/commands/skills/rehash.d.ts +2 -2
- package/dest/commands/skills/rehash.js +3 -2
- package/dest/commands/skills/remove.d.ts +2 -2
- package/dest/commands/skills/remove.js +3 -2
- package/dest/commands/skills/update-all.d.ts +2 -2
- package/dest/commands/skills/update-all.js +8 -7
- package/dest/commands/skills/update.d.ts +2 -2
- package/dest/commands/skills/update.js +6 -5
- package/dest/commands/sync.d.ts +6 -0
- package/dest/commands/sync.js +8 -0
- package/dest/lib/agent-definition-helpers.d.ts +74 -0
- package/dest/lib/agent-definition-helpers.js +68 -0
- package/dest/lib/agent-definitions.d.ts +333 -0
- package/dest/lib/agent-definitions.js +301 -0
- package/dest/lib/agent-types.d.ts +46 -0
- package/dest/lib/agent-types.js +1 -0
- package/dest/lib/agents.d.ts +81 -0
- package/dest/lib/agents.js +301 -0
- package/dest/lib/command-options.d.ts +1 -1
- package/dest/lib/command-options.js +1 -1
- package/dest/lib/context.d.ts +8 -25
- package/dest/lib/context.js +8 -26
- package/dest/lib/frontmatter.d.ts +27 -70
- package/dest/lib/frontmatter.js +23 -42
- package/dest/lib/object-helpers.d.ts +5 -0
- package/dest/lib/object-helpers.js +6 -0
- package/dest/lib/skills.d.ts +17 -93
- package/dest/lib/skills.js +25 -7
- package/dest/lib/sync.d.ts +7 -0
- package/dest/lib/sync.js +503 -0
- package/dest/main.js +6 -86
- package/package.json +3 -3
- package/dest/commands/install.d.ts +0 -3
- package/dest/commands/install.js +0 -4
- package/dest/lib/install.d.ts +0 -8
- package/dest/lib/install.js +0 -380
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { computeDirectoryHashes, createUpdatedSkillRecord, detectLocalSkillEdits, fetchRemoteSkillSnapshot, formatManagedSkillSummary, getManagedSkillDirectory, loadSkillsLockfile, replaceManagedSkillDirectory, saveSkillsLockfile, timestampNow, upsertManagedSkill, } from '../../lib/skills.js';
|
|
1
|
+
import { cleanupRemoteSkillSnapshot, computeDirectoryHashes, createUpdatedSkillRecord, detectLocalSkillEdits, fetchRemoteSkillSnapshot, formatManagedSkillSummary, getManagedSkillDirectory, loadSkillsLockfile, replaceManagedSkillDirectory, saveSkillsLockfile, timestampNow, upsertManagedSkill, } from '../../lib/skills.js';
|
|
2
2
|
/**
|
|
3
3
|
* Updates every managed skill from its tracked remote source and saves the refreshed lockfile.
|
|
4
4
|
*/
|
|
5
|
-
export async function runSkillsUpdateAllCommand(
|
|
5
|
+
export async function runSkillsUpdateAllCommand(env, input) {
|
|
6
|
+
const { context, runtime } = env;
|
|
6
7
|
let lockfile = await loadSkillsLockfile(context);
|
|
7
8
|
if (lockfile.skills.length === 0) {
|
|
8
|
-
|
|
9
|
+
runtime.logInfo('No managed skills to update.');
|
|
9
10
|
return;
|
|
10
11
|
}
|
|
11
12
|
const updatedLines = [];
|
|
@@ -43,17 +44,17 @@ export async function runSkillsUpdateAllCommand(context, input) {
|
|
|
43
44
|
updatedLines.push(`- ${formatManagedSkillSummary(updatedSkill)}`);
|
|
44
45
|
}
|
|
45
46
|
finally {
|
|
46
|
-
await snapshot
|
|
47
|
+
await cleanupRemoteSkillSnapshot(snapshot);
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
50
|
await saveSkillsLockfile(context, { lockfile });
|
|
50
51
|
if (updatedLines.length > 0) {
|
|
51
|
-
|
|
52
|
+
runtime.logInfo(`Updated ${updatedLines.length} managed skills:\n${updatedLines.join('\n')}`);
|
|
52
53
|
}
|
|
53
54
|
else {
|
|
54
|
-
|
|
55
|
+
runtime.logInfo('No managed skills were updated.');
|
|
55
56
|
}
|
|
56
57
|
if (skippedLines.length > 0) {
|
|
57
|
-
|
|
58
|
+
runtime.logWarn(`Skipped ${skippedLines.length} managed skills due to local edits. Re-run with --force to overwrite local changes:\n${skippedLines.join('\n')}`);
|
|
58
59
|
}
|
|
59
60
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CommandEnv } from '../../cli.js';
|
|
2
2
|
/**
|
|
3
3
|
* Updates one managed skill from its tracked remote source and refreshes the lockfile.
|
|
4
4
|
*/
|
|
5
|
-
export declare function runSkillsUpdateCommand(
|
|
5
|
+
export declare function runSkillsUpdateCommand(env: CommandEnv, input: {
|
|
6
6
|
force: boolean;
|
|
7
7
|
skillName: string;
|
|
8
8
|
}): Promise<void>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { computeDirectoryHashes, createUpdatedSkillRecord, detectLocalSkillEdits, fetchRemoteSkillSnapshot, findManagedSkill, formatManagedSkillSummary, getManagedSkillDirectory, loadSkillsLockfile, replaceManagedSkillDirectory, saveSkillsLockfile, timestampNow, upsertManagedSkill, } from '../../lib/skills.js';
|
|
1
|
+
import { cleanupRemoteSkillSnapshot, computeDirectoryHashes, createUpdatedSkillRecord, detectLocalSkillEdits, fetchRemoteSkillSnapshot, findManagedSkill, formatManagedSkillSummary, getManagedSkillDirectory, loadSkillsLockfile, replaceManagedSkillDirectory, saveSkillsLockfile, timestampNow, upsertManagedSkill, } from '../../lib/skills.js';
|
|
2
2
|
/**
|
|
3
3
|
* Updates one managed skill from its tracked remote source and refreshes the lockfile.
|
|
4
4
|
*/
|
|
5
|
-
export async function runSkillsUpdateCommand(
|
|
5
|
+
export async function runSkillsUpdateCommand(env, input) {
|
|
6
|
+
const { context, runtime } = env;
|
|
6
7
|
const { force, skillName } = input;
|
|
7
8
|
const lockfile = await loadSkillsLockfile(context);
|
|
8
9
|
const managedSkill = findManagedSkill(lockfile, { name: skillName });
|
|
@@ -15,7 +16,7 @@ export async function runSkillsUpdateCommand(context, input) {
|
|
|
15
16
|
storedFiles: managedSkill.files,
|
|
16
17
|
});
|
|
17
18
|
if (localEditState.modified && !force) {
|
|
18
|
-
|
|
19
|
+
runtime.logWarn(`Skipped ${skillName} because local edits were detected in: ${localEditState.changedFiles.join(', ')}. Re-run with --force to overwrite local changes.`);
|
|
19
20
|
return;
|
|
20
21
|
}
|
|
21
22
|
const snapshot = await fetchRemoteSkillSnapshot({
|
|
@@ -38,9 +39,9 @@ export async function runSkillsUpdateCommand(context, input) {
|
|
|
38
39
|
await saveSkillsLockfile(context, {
|
|
39
40
|
lockfile: upsertManagedSkill(lockfile, { updatedSkill }),
|
|
40
41
|
});
|
|
41
|
-
|
|
42
|
+
runtime.logInfo(`Updated ${formatManagedSkillSummary(updatedSkill)}`);
|
|
42
43
|
}
|
|
43
44
|
finally {
|
|
44
|
-
await snapshot
|
|
45
|
+
await cleanupRemoteSkillSnapshot(snapshot);
|
|
45
46
|
}
|
|
46
47
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CommandEnv } from '../cli.js';
|
|
2
|
+
/**
|
|
3
|
+
* Runs the sync command, writing all command, rule, and skill outputs into their agent target directories.
|
|
4
|
+
*/
|
|
5
|
+
export declare function runSyncCommand(env: CommandEnv): Promise<void>;
|
|
6
|
+
//# sourceMappingURL=sync.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { syncToTargets } from '../lib/sync.js';
|
|
2
|
+
/**
|
|
3
|
+
* Runs the sync command, writing all command, rule, and skill outputs into their agent target directories.
|
|
4
|
+
*/
|
|
5
|
+
export async function runSyncCommand(env) {
|
|
6
|
+
const { context, runtime } = env;
|
|
7
|
+
await syncToTargets(context, runtime);
|
|
8
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { OwnershipKeyInput } from './agent-types.js';
|
|
3
|
+
type CreateTargetPathInput<TargetRoots> = {
|
|
4
|
+
targetRoots: TargetRoots;
|
|
5
|
+
itemName: string;
|
|
6
|
+
sourceFileStem: string;
|
|
7
|
+
};
|
|
8
|
+
type BuildTargetInput<Input, TargetRoots> = {
|
|
9
|
+
targetRoots: TargetRoots;
|
|
10
|
+
input: Input;
|
|
11
|
+
};
|
|
12
|
+
type AgentFrontmatterSectionEnv<SyncItemSpec> = {
|
|
13
|
+
currentInput: SyncItemSpec;
|
|
14
|
+
sectionValues: ReadonlyMap<string, unknown>;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Defines the ownership key namespace for one agent output type, providing a typed prefix and key-derivation functions.
|
|
18
|
+
*/
|
|
19
|
+
export declare function defineOwnershipKey<Prefix extends string>(input: {
|
|
20
|
+
prefix: Prefix;
|
|
21
|
+
descriptionLabel: string;
|
|
22
|
+
selectSuffix: (value: OwnershipKeyInput) => string;
|
|
23
|
+
}): {
|
|
24
|
+
prefix: Prefix;
|
|
25
|
+
descriptionLabel: string;
|
|
26
|
+
createKey: (value: string) => `${Prefix}${string}`;
|
|
27
|
+
createKeyForInput: (value: OwnershipKeyInput) => `${Prefix}${string}`;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Defines a strict Zod schema and a `create` method for building validated frontmatter metadata objects.
|
|
31
|
+
*/
|
|
32
|
+
export declare function defineMetadata<Input, Shape extends z.ZodRawShape>(input: {
|
|
33
|
+
shape: Shape;
|
|
34
|
+
buildMetadata: (value: Input) => Record<string, unknown>;
|
|
35
|
+
}): {
|
|
36
|
+
schema: z.ZodObject<Shape, z.core.$strict>;
|
|
37
|
+
create: (value: Input) => z.output<z.ZodObject<Shape, z.core.$strict>>;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Defines how to compute the outputPath and writePath for a sync target from target roots and source file metadata.
|
|
41
|
+
*/
|
|
42
|
+
export declare function defineOutputPathCreators<TargetRoots>(input: {
|
|
43
|
+
createTargetPath: (value: CreateTargetPathInput<TargetRoots>) => string;
|
|
44
|
+
createWritePath?: (targetPath: string) => string;
|
|
45
|
+
}): {
|
|
46
|
+
createTargetPath: (value: CreateTargetPathInput<TargetRoots>) => string;
|
|
47
|
+
createWritePath: (targetPath: string) => string;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Wraps a typed buildTarget function for use in an agent's sync target definition.
|
|
51
|
+
*/
|
|
52
|
+
export declare function defineTarget<Input, Target, TargetRoots = unknown>(input: {
|
|
53
|
+
buildTarget: (value: BuildTargetInput<Input, TargetRoots>) => Target;
|
|
54
|
+
}): {
|
|
55
|
+
buildTarget: (value: BuildTargetInput<Input, TargetRoots>) => Target;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Defines a validated frontmatter section that parses its value with a Zod schema and merges extra fields into the sync input.
|
|
59
|
+
*/
|
|
60
|
+
export declare function defineAgentFrontmatterSection<Section, SyncItemSpec extends Record<string, unknown>>(input: {
|
|
61
|
+
schema: z.ZodType<Section>;
|
|
62
|
+
extendSyncInput: (value: Section, context: AgentFrontmatterSectionEnv<SyncItemSpec>) => Partial<SyncItemSpec>;
|
|
63
|
+
}): {
|
|
64
|
+
schema: z.ZodType<Section>;
|
|
65
|
+
createSyncInputExtension: (value: unknown, context: AgentFrontmatterSectionEnv<SyncItemSpec>) => {
|
|
66
|
+
success: true;
|
|
67
|
+
data: Partial<SyncItemSpec>;
|
|
68
|
+
} | {
|
|
69
|
+
success: false;
|
|
70
|
+
issues: readonly z.ZodIssue[];
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
export {};
|
|
74
|
+
//# sourceMappingURL=agent-definition-helpers.d.ts.map
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Defines the ownership key namespace for one agent output type, providing a typed prefix and key-derivation functions.
|
|
4
|
+
*/
|
|
5
|
+
export function defineOwnershipKey(input) {
|
|
6
|
+
return {
|
|
7
|
+
prefix: input.prefix,
|
|
8
|
+
descriptionLabel: input.descriptionLabel,
|
|
9
|
+
createKey(value) {
|
|
10
|
+
return `${input.prefix}${value}`;
|
|
11
|
+
},
|
|
12
|
+
createKeyForInput(value) {
|
|
13
|
+
return `${input.prefix}${input.selectSuffix(value)}`;
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Defines a strict Zod schema and a `create` method for building validated frontmatter metadata objects.
|
|
19
|
+
*/
|
|
20
|
+
export function defineMetadata(input) {
|
|
21
|
+
const schema = z.strictObject(input.shape);
|
|
22
|
+
return {
|
|
23
|
+
schema,
|
|
24
|
+
create(value) {
|
|
25
|
+
return schema.parse(input.buildMetadata(value));
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Defines how to compute the outputPath and writePath for a sync target from target roots and source file metadata.
|
|
31
|
+
*/
|
|
32
|
+
export function defineOutputPathCreators(input) {
|
|
33
|
+
return {
|
|
34
|
+
createTargetPath: input.createTargetPath,
|
|
35
|
+
createWritePath(targetPath) {
|
|
36
|
+
return input.createWritePath?.(targetPath) ?? targetPath;
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Wraps a typed buildTarget function for use in an agent's sync target definition.
|
|
42
|
+
*/
|
|
43
|
+
export function defineTarget(input) {
|
|
44
|
+
return {
|
|
45
|
+
buildTarget: input.buildTarget,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Defines a validated frontmatter section that parses its value with a Zod schema and merges extra fields into the sync input.
|
|
50
|
+
*/
|
|
51
|
+
export function defineAgentFrontmatterSection(input) {
|
|
52
|
+
return {
|
|
53
|
+
schema: input.schema,
|
|
54
|
+
createSyncInputExtension(value, context) {
|
|
55
|
+
const result = input.schema.safeParse(value);
|
|
56
|
+
if (!result.success) {
|
|
57
|
+
return {
|
|
58
|
+
success: false,
|
|
59
|
+
issues: result.error.issues,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
success: true,
|
|
64
|
+
data: input.extendSyncInput(result.data, context),
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
}
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { AgentCmdSyncSpec, AgentRuleSyncSpec, AgentSkillSyncSpec } from './agent-types.js';
|
|
3
|
+
type ConfiguredTargetRoots = Record<string, Record<string, string>>;
|
|
4
|
+
/**
|
|
5
|
+
* The central sync agent registry, mapping each agent name to its command, rule, and skill definitions.
|
|
6
|
+
*/
|
|
7
|
+
export declare const AGENT_DEFINITIONS: {
|
|
8
|
+
readonly copilot: {
|
|
9
|
+
readonly displayLabel: "Copilot";
|
|
10
|
+
readonly targetRoots: {
|
|
11
|
+
readonly prompts: readonly [".copilot", "prompts"];
|
|
12
|
+
readonly instructions: readonly [".copilot", "instructions"];
|
|
13
|
+
readonly skills: readonly [".copilot", "skills"];
|
|
14
|
+
};
|
|
15
|
+
readonly command: {
|
|
16
|
+
frontmatterSection: {
|
|
17
|
+
schema: z.ZodType<Record<string, never> | undefined, unknown, z.core.$ZodTypeInternals<Record<string, never> | undefined, unknown>>;
|
|
18
|
+
createSyncInputExtension: (value: unknown, context: {
|
|
19
|
+
currentInput: AgentCmdSyncSpec;
|
|
20
|
+
sectionValues: ReadonlyMap<string, unknown>;
|
|
21
|
+
}) => {
|
|
22
|
+
success: false;
|
|
23
|
+
issues: readonly z.ZodIssue[];
|
|
24
|
+
} | {
|
|
25
|
+
success: true;
|
|
26
|
+
data: Partial<AgentCmdSyncSpec>;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
ownershipKey: {
|
|
30
|
+
prefix: "copilot:prompt-path:";
|
|
31
|
+
descriptionLabel: string;
|
|
32
|
+
createKey: (value: string) => `copilot:prompt-path:${string}`;
|
|
33
|
+
createKeyForInput: (value: import("./agent-types.js").OwnershipKeyInput) => `copilot:prompt-path:${string}`;
|
|
34
|
+
};
|
|
35
|
+
outputPathCreators: {
|
|
36
|
+
createTargetPath: (value: {
|
|
37
|
+
targetRoots: ConfiguredTargetRoots;
|
|
38
|
+
itemName: string;
|
|
39
|
+
sourceFileStem: string;
|
|
40
|
+
}) => string;
|
|
41
|
+
createWritePath: (targetPath: string) => string;
|
|
42
|
+
};
|
|
43
|
+
metadata: {
|
|
44
|
+
schema: z.ZodObject<{
|
|
45
|
+
name: z.ZodString;
|
|
46
|
+
description: z.ZodString;
|
|
47
|
+
}, z.core.$strict>;
|
|
48
|
+
create: (value: {
|
|
49
|
+
name: string;
|
|
50
|
+
description: string;
|
|
51
|
+
}) => {
|
|
52
|
+
name: string;
|
|
53
|
+
description: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
target: {
|
|
57
|
+
buildTarget: (value: {
|
|
58
|
+
targetRoots: ConfiguredTargetRoots;
|
|
59
|
+
input: AgentCmdSyncSpec;
|
|
60
|
+
}) => {
|
|
61
|
+
agent: string;
|
|
62
|
+
body: string;
|
|
63
|
+
metadata: {
|
|
64
|
+
name: string;
|
|
65
|
+
description: string;
|
|
66
|
+
};
|
|
67
|
+
outputPath: string;
|
|
68
|
+
targetType: "markdown";
|
|
69
|
+
writePath: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
readonly rule: {
|
|
74
|
+
frontmatterSection: {
|
|
75
|
+
schema: z.ZodType<{
|
|
76
|
+
applyTo: string;
|
|
77
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
78
|
+
applyTo: string;
|
|
79
|
+
}, unknown>>;
|
|
80
|
+
createSyncInputExtension: (value: unknown, context: {
|
|
81
|
+
currentInput: AgentRuleSyncSpec;
|
|
82
|
+
sectionValues: ReadonlyMap<string, unknown>;
|
|
83
|
+
}) => {
|
|
84
|
+
success: false;
|
|
85
|
+
issues: readonly z.ZodIssue[];
|
|
86
|
+
} | {
|
|
87
|
+
success: true;
|
|
88
|
+
data: Partial<AgentRuleSyncSpec>;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
ownershipKey: {
|
|
92
|
+
prefix: "copilot:instruction-path:";
|
|
93
|
+
descriptionLabel: string;
|
|
94
|
+
createKey: (value: string) => `copilot:instruction-path:${string}`;
|
|
95
|
+
createKeyForInput: (value: import("./agent-types.js").OwnershipKeyInput) => `copilot:instruction-path:${string}`;
|
|
96
|
+
};
|
|
97
|
+
outputPathCreators: {
|
|
98
|
+
createTargetPath: (value: {
|
|
99
|
+
targetRoots: ConfiguredTargetRoots;
|
|
100
|
+
itemName: string;
|
|
101
|
+
sourceFileStem: string;
|
|
102
|
+
}) => string;
|
|
103
|
+
createWritePath: (targetPath: string) => string;
|
|
104
|
+
};
|
|
105
|
+
metadata: {
|
|
106
|
+
schema: z.ZodObject<{
|
|
107
|
+
description: z.ZodString;
|
|
108
|
+
applyTo: z.ZodString;
|
|
109
|
+
}, z.core.$strict>;
|
|
110
|
+
create: (value: {
|
|
111
|
+
description: string;
|
|
112
|
+
applyTo: string;
|
|
113
|
+
}) => {
|
|
114
|
+
description: string;
|
|
115
|
+
applyTo: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
target: {
|
|
119
|
+
buildTarget: (value: {
|
|
120
|
+
targetRoots: ConfiguredTargetRoots;
|
|
121
|
+
input: AgentRuleSyncSpec;
|
|
122
|
+
}) => {
|
|
123
|
+
agent: string;
|
|
124
|
+
body: string;
|
|
125
|
+
metadata: {
|
|
126
|
+
description: string;
|
|
127
|
+
applyTo: string;
|
|
128
|
+
};
|
|
129
|
+
outputPath: string;
|
|
130
|
+
targetType: "markdown";
|
|
131
|
+
writePath: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
readonly skill: {
|
|
136
|
+
ownershipKey: {
|
|
137
|
+
prefix: "copilot:skill-name:";
|
|
138
|
+
descriptionLabel: string;
|
|
139
|
+
createKey: (value: string) => `copilot:skill-name:${string}`;
|
|
140
|
+
createKeyForInput: (value: import("./agent-types.js").OwnershipKeyInput) => `copilot:skill-name:${string}`;
|
|
141
|
+
};
|
|
142
|
+
outputPathCreators: {
|
|
143
|
+
createTargetPath: (value: {
|
|
144
|
+
targetRoots: ConfiguredTargetRoots;
|
|
145
|
+
itemName: string;
|
|
146
|
+
sourceFileStem: string;
|
|
147
|
+
}) => string;
|
|
148
|
+
createWritePath: (targetPath: string) => string;
|
|
149
|
+
};
|
|
150
|
+
target: {
|
|
151
|
+
buildTarget: (value: {
|
|
152
|
+
targetRoots: ConfiguredTargetRoots;
|
|
153
|
+
input: AgentSkillSyncSpec;
|
|
154
|
+
}) => {
|
|
155
|
+
agent: string;
|
|
156
|
+
outputPath: string;
|
|
157
|
+
sourceDir: string;
|
|
158
|
+
targetType: "directory";
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
readonly cursor: {
|
|
164
|
+
readonly displayLabel: "Cursor";
|
|
165
|
+
readonly targetRoots: {
|
|
166
|
+
readonly rules: readonly [".cursor", "rules"];
|
|
167
|
+
readonly skills: readonly [".cursor", "skills"];
|
|
168
|
+
};
|
|
169
|
+
readonly command: {
|
|
170
|
+
frontmatterSection: {
|
|
171
|
+
schema: z.ZodType<{
|
|
172
|
+
'disable-model-invocation'?: boolean | undefined;
|
|
173
|
+
} | undefined, unknown, z.core.$ZodTypeInternals<{
|
|
174
|
+
'disable-model-invocation'?: boolean | undefined;
|
|
175
|
+
} | undefined, unknown>>;
|
|
176
|
+
createSyncInputExtension: (value: unknown, context: {
|
|
177
|
+
currentInput: AgentCmdSyncSpec;
|
|
178
|
+
sectionValues: ReadonlyMap<string, unknown>;
|
|
179
|
+
}) => {
|
|
180
|
+
success: false;
|
|
181
|
+
issues: readonly z.ZodIssue[];
|
|
182
|
+
} | {
|
|
183
|
+
success: true;
|
|
184
|
+
data: Partial<AgentCmdSyncSpec>;
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
ownershipKey: {
|
|
188
|
+
prefix: "cursor:skill-name:";
|
|
189
|
+
descriptionLabel: string;
|
|
190
|
+
createKey: (value: string) => `cursor:skill-name:${string}`;
|
|
191
|
+
createKeyForInput: (value: import("./agent-types.js").OwnershipKeyInput) => `cursor:skill-name:${string}`;
|
|
192
|
+
};
|
|
193
|
+
outputPathCreators: {
|
|
194
|
+
createTargetPath: (value: {
|
|
195
|
+
targetRoots: ConfiguredTargetRoots;
|
|
196
|
+
itemName: string;
|
|
197
|
+
sourceFileStem: string;
|
|
198
|
+
}) => string;
|
|
199
|
+
createWritePath: (targetPath: string) => string;
|
|
200
|
+
};
|
|
201
|
+
metadata: {
|
|
202
|
+
schema: z.ZodObject<{
|
|
203
|
+
name: z.ZodString;
|
|
204
|
+
description: z.ZodString;
|
|
205
|
+
'disable-model-invocation': z.ZodOptional<z.ZodBoolean>;
|
|
206
|
+
}, z.core.$strict>;
|
|
207
|
+
create: (value: {
|
|
208
|
+
name: string;
|
|
209
|
+
description: string;
|
|
210
|
+
disableModelInvocation: boolean | undefined;
|
|
211
|
+
}) => {
|
|
212
|
+
name: string;
|
|
213
|
+
description: string;
|
|
214
|
+
'disable-model-invocation'?: boolean | undefined;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
target: {
|
|
218
|
+
buildTarget: (value: {
|
|
219
|
+
targetRoots: ConfiguredTargetRoots;
|
|
220
|
+
input: AgentCmdSyncSpec;
|
|
221
|
+
}) => {
|
|
222
|
+
agent: string;
|
|
223
|
+
body: string;
|
|
224
|
+
metadata: {
|
|
225
|
+
name: string;
|
|
226
|
+
description: string;
|
|
227
|
+
'disable-model-invocation'?: boolean | undefined;
|
|
228
|
+
};
|
|
229
|
+
outputPath: string;
|
|
230
|
+
targetType: "markdown";
|
|
231
|
+
writePath: string;
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
readonly rule: {
|
|
236
|
+
frontmatterSection: {
|
|
237
|
+
schema: z.ZodType<{
|
|
238
|
+
alwaysApply?: boolean | undefined;
|
|
239
|
+
globs?: string | undefined;
|
|
240
|
+
} | undefined, unknown, z.core.$ZodTypeInternals<{
|
|
241
|
+
alwaysApply?: boolean | undefined;
|
|
242
|
+
globs?: string | undefined;
|
|
243
|
+
} | undefined, unknown>>;
|
|
244
|
+
createSyncInputExtension: (value: unknown, context: {
|
|
245
|
+
currentInput: AgentRuleSyncSpec;
|
|
246
|
+
sectionValues: ReadonlyMap<string, unknown>;
|
|
247
|
+
}) => {
|
|
248
|
+
success: false;
|
|
249
|
+
issues: readonly z.ZodIssue[];
|
|
250
|
+
} | {
|
|
251
|
+
success: true;
|
|
252
|
+
data: Partial<AgentRuleSyncSpec>;
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
ownershipKey: {
|
|
256
|
+
prefix: "cursor:rule-path:";
|
|
257
|
+
descriptionLabel: string;
|
|
258
|
+
createKey: (value: string) => `cursor:rule-path:${string}`;
|
|
259
|
+
createKeyForInput: (value: import("./agent-types.js").OwnershipKeyInput) => `cursor:rule-path:${string}`;
|
|
260
|
+
};
|
|
261
|
+
outputPathCreators: {
|
|
262
|
+
createTargetPath: (value: {
|
|
263
|
+
targetRoots: ConfiguredTargetRoots;
|
|
264
|
+
itemName: string;
|
|
265
|
+
sourceFileStem: string;
|
|
266
|
+
}) => string;
|
|
267
|
+
createWritePath: (targetPath: string) => string;
|
|
268
|
+
};
|
|
269
|
+
metadata: {
|
|
270
|
+
schema: z.ZodObject<{
|
|
271
|
+
description: z.ZodString;
|
|
272
|
+
globs: z.ZodOptional<z.ZodString>;
|
|
273
|
+
alwaysApply: z.ZodBoolean;
|
|
274
|
+
}, z.core.$strict>;
|
|
275
|
+
create: (value: {
|
|
276
|
+
description: string;
|
|
277
|
+
globs: string | undefined;
|
|
278
|
+
alwaysApply: boolean;
|
|
279
|
+
}) => {
|
|
280
|
+
description: string;
|
|
281
|
+
alwaysApply: boolean;
|
|
282
|
+
globs?: string | undefined;
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
target: {
|
|
286
|
+
buildTarget: (value: {
|
|
287
|
+
targetRoots: ConfiguredTargetRoots;
|
|
288
|
+
input: AgentRuleSyncSpec;
|
|
289
|
+
}) => {
|
|
290
|
+
agent: string;
|
|
291
|
+
body: string;
|
|
292
|
+
metadata: {
|
|
293
|
+
description: string;
|
|
294
|
+
alwaysApply: boolean;
|
|
295
|
+
globs?: string | undefined;
|
|
296
|
+
};
|
|
297
|
+
outputPath: string;
|
|
298
|
+
targetType: "markdown";
|
|
299
|
+
writePath: string;
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
readonly skill: {
|
|
304
|
+
ownershipKey: {
|
|
305
|
+
prefix: "cursor:skill-name:";
|
|
306
|
+
descriptionLabel: string;
|
|
307
|
+
createKey: (value: string) => `cursor:skill-name:${string}`;
|
|
308
|
+
createKeyForInput: (value: import("./agent-types.js").OwnershipKeyInput) => `cursor:skill-name:${string}`;
|
|
309
|
+
};
|
|
310
|
+
outputPathCreators: {
|
|
311
|
+
createTargetPath: (value: {
|
|
312
|
+
targetRoots: ConfiguredTargetRoots;
|
|
313
|
+
itemName: string;
|
|
314
|
+
sourceFileStem: string;
|
|
315
|
+
}) => string;
|
|
316
|
+
createWritePath: (targetPath: string) => string;
|
|
317
|
+
};
|
|
318
|
+
target: {
|
|
319
|
+
buildTarget: (value: {
|
|
320
|
+
targetRoots: ConfiguredTargetRoots;
|
|
321
|
+
input: AgentSkillSyncSpec;
|
|
322
|
+
}) => {
|
|
323
|
+
agent: string;
|
|
324
|
+
outputPath: string;
|
|
325
|
+
sourceDir: string;
|
|
326
|
+
targetType: "directory";
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
export {};
|
|
333
|
+
//# sourceMappingURL=agent-definitions.d.ts.map
|