@serviceme/devtools-core 2.0.0 → 2.0.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/dist/auth-Bzss8zOv.mjs +995 -0
- package/dist/auth-Bzss8zOv.mjs.map +1 -0
- package/dist/auth-DXam3c4S.js +1078 -0
- package/dist/auth-DXam3c4S.js.map +1 -0
- package/dist/auth.d.mts +2 -2
- package/dist/auth.d.ts +2 -2
- package/dist/auth.js +14 -1029
- package/dist/auth.mjs +2 -991
- package/dist/device-CDDcwDY6.mjs +758 -0
- package/dist/device-CDDcwDY6.mjs.map +1 -0
- package/dist/device-DuAYH8bk.js +839 -0
- package/dist/device-DuAYH8bk.js.map +1 -0
- package/dist/device.d.mts +2 -455
- package/dist/device.d.ts +2 -455
- package/dist/device.js +15 -728
- package/dist/device.mjs +2 -679
- package/dist/index-2rX86yMq.d.mts +331 -0
- package/dist/index-BI11AfMH.d.mts +377 -0
- package/dist/index-BI11AfMH.d.ts +377 -0
- package/dist/index-CoA6y0MP.d.mts +498 -0
- package/dist/index-CoA6y0MP.d.ts +498 -0
- package/dist/index-DaW7IYA-.d.mts +185 -0
- package/dist/index-DaW7IYA-.d.ts +185 -0
- package/dist/index-Dp6FwWKh.d.ts +331 -0
- package/dist/index.d.mts +2340 -2101
- package/dist/index.d.ts +2340 -2101
- package/dist/index.js +8117 -10538
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7895 -10318
- package/dist/index.mjs.map +1 -1
- package/dist/rolldown-runtime-VH7oDXx4.js +28 -0
- package/dist/skill-linker.d.mts +82 -81
- package/dist/skill-linker.d.ts +82 -81
- package/dist/skill-linker.js +359 -402
- package/dist/skill-linker.js.map +1 -1
- package/dist/skill-linker.mjs +345 -357
- package/dist/skill-linker.mjs.map +1 -1
- package/dist/skill-store-Bym2yinU.mjs +388 -0
- package/dist/skill-store-Bym2yinU.mjs.map +1 -0
- package/dist/skill-store-CJdYyyxu.js +408 -0
- package/dist/skill-store-CJdYyyxu.js.map +1 -0
- package/dist/skill-store.d.mts +41 -42
- package/dist/skill-store.d.ts +41 -42
- package/dist/skill-store.js +5 -338
- package/dist/skill-store.mjs +2 -301
- package/dist/submit-Cg7wSa3x.mjs +84 -0
- package/dist/submit-Cg7wSa3x.mjs.map +1 -0
- package/dist/submit-CltE6YOZ.js +98 -0
- package/dist/submit-CltE6YOZ.js.map +1 -0
- package/dist/submit.d.mts +2 -3
- package/dist/submit.d.ts +2 -3
- package/dist/submit.js +4 -166
- package/dist/submit.mjs +2 -130
- package/dist/toolbox-CbfxpNg-.mjs +540 -0
- package/dist/toolbox-CbfxpNg-.mjs.map +1 -0
- package/dist/toolbox-CxnOr-FY.js +614 -0
- package/dist/toolbox-CxnOr-FY.js.map +1 -0
- package/dist/toolbox.d.mts +2 -244
- package/dist/toolbox.d.ts +2 -244
- package/dist/toolbox.js +14 -584
- package/dist/toolbox.mjs +2 -536
- package/dist/{types-B9gk3dXH.d.ts → types-BCV3IedE.d.mts} +25 -23
- package/dist/{types-B9gk3dXH.d.mts → types-BCV3IedE.d.ts} +25 -23
- package/dist/userHome-BquDeFVE.js +526 -0
- package/dist/userHome-BquDeFVE.js.map +1 -0
- package/dist/userHome-CcnAQPG1.mjs +212 -0
- package/dist/userHome-CcnAQPG1.mjs.map +1 -0
- package/package.json +10 -10
- package/dist/auth.js.map +0 -1
- package/dist/auth.mjs.map +0 -1
- package/dist/device.js.map +0 -1
- package/dist/device.mjs.map +0 -1
- package/dist/index-BMk4tqIT.d.mts +0 -328
- package/dist/index-CymN0x9Z.d.ts +0 -328
- package/dist/index-PD135hlB.d.mts +0 -626
- package/dist/index-PD135hlB.d.ts +0 -626
- package/dist/skill-store.js.map +0 -1
- package/dist/skill-store.mjs.map +0 -1
- package/dist/submit.js.map +0 -1
- package/dist/submit.mjs.map +0 -1
- package/dist/toolbox.js.map +0 -1
- package/dist/toolbox.mjs.map +0 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
+
key = keys[i];
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
+
get: ((k) => from[k]).bind(null, key),
|
|
13
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
19
|
+
value: mod,
|
|
20
|
+
enumerable: true
|
|
21
|
+
}) : target, mod));
|
|
22
|
+
//#endregion
|
|
23
|
+
Object.defineProperty(exports, "__toESM", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function() {
|
|
26
|
+
return __toESM;
|
|
27
|
+
}
|
|
28
|
+
});
|
package/dist/skill-linker.d.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region src/skill-linker/index.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Skill & Agent v2 — Client SkillLinker (M3, path-parity revision)
|
|
3
4
|
*
|
|
@@ -37,104 +38,104 @@
|
|
|
37
38
|
* @see docs/architecture/skill-agent-v2-repo.md §5.6 SkillLinker
|
|
38
39
|
* @see docs/architecture/skill-agent-v2-repo.md §11.8 (throw, not copy)
|
|
39
40
|
*/
|
|
40
|
-
type LinkMode = "symlink" | "junction" | "copy";
|
|
41
|
+
export type LinkMode = "symlink" | "junction" | "copy";
|
|
41
42
|
/** Kind of artifact being linked. Mirrors `BridgeSkillKind`. */
|
|
42
|
-
type EntryKind = "skill" | "agent";
|
|
43
|
+
export type EntryKind = "skill" | "agent";
|
|
43
44
|
/**
|
|
44
45
|
* Which scope the link lives in:
|
|
45
46
|
* - `"workspace"` (default) → `<workspaceDir>/.github/<kind>/<name>`
|
|
46
47
|
* - `"user"` → `~/.copilot/<kind>/<name>` (visible to every workspace)
|
|
47
48
|
*/
|
|
48
|
-
type LinkScope = "workspace" | "user";
|
|
49
|
-
interface InstallSkillOptions {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
49
|
+
export type LinkScope = "workspace" | "user";
|
|
50
|
+
export interface InstallSkillOptions {
|
|
51
|
+
repoId: string;
|
|
52
|
+
skillName: string;
|
|
53
|
+
workspaceDir: string;
|
|
54
|
+
/** Choose link mode explicitly. Defaults to platform-optimal. */
|
|
55
|
+
mode?: "auto" | LinkMode;
|
|
56
|
+
/** "skill" (default) or "agent". */
|
|
57
|
+
kind?: EntryKind;
|
|
58
|
+
/** "workspace" (default) or "user". */
|
|
59
|
+
scope?: LinkScope;
|
|
60
|
+
/**
|
|
61
|
+
* Pre-resolved absolute source path (from `SkillStore`), overriding
|
|
62
|
+
* the `<repoRoot>/{skills,agents}/<name>` formula in
|
|
63
|
+
* {@link resolveSkillTarget}. Required for repos with non-standard
|
|
64
|
+
* layouts — flat root (no `skills/` prefix), nested scope dirs
|
|
65
|
+
* (`skills/official/<name>`), or flat single-file agent manifests
|
|
66
|
+
* (`agents/<name>.agent.md`) — which the formula can't predict.
|
|
67
|
+
* When omitted, falls back to the formula (kept for callers that
|
|
68
|
+
* install a hand-authored skill without going through `SkillStore`).
|
|
69
|
+
*/
|
|
70
|
+
sourcePath?: string;
|
|
71
|
+
/**
|
|
72
|
+
* True when `sourcePath` points at a single manifest FILE (e.g. a
|
|
73
|
+
* flat `<name>.agent.md`) rather than a directory. Determines the
|
|
74
|
+
* symlink type (file vs dir/junction) and the link's basename (the
|
|
75
|
+
* link mirrors the source file's name + extension, since Copilot/
|
|
76
|
+
* VS Code scan `.github/agents/<name>.agent.md` as a FILE).
|
|
77
|
+
*/
|
|
78
|
+
sourceIsFile?: boolean;
|
|
78
79
|
}
|
|
79
|
-
interface InstallSkillResult {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
export interface InstallSkillResult {
|
|
81
|
+
mode: LinkMode;
|
|
82
|
+
linkPath: string;
|
|
83
|
+
targetPath: string;
|
|
83
84
|
}
|
|
84
85
|
/** Describes one symlink/junction currently present in a workspace/user scope. */
|
|
85
|
-
interface LinkedSkill {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
86
|
+
export interface LinkedSkill {
|
|
87
|
+
/**
|
|
88
|
+
* Repo id the link resolves to, parsed back out of the symlink
|
|
89
|
+
* target. Empty string when the target isn't under a recognizable
|
|
90
|
+
* `~/.serviceme/repos/<repoId>/...` path.
|
|
91
|
+
*/
|
|
92
|
+
repoId: string;
|
|
93
|
+
skillName: string;
|
|
94
|
+
linkPath: string;
|
|
95
|
+
targetPath: string;
|
|
96
|
+
mode: LinkMode;
|
|
97
|
+
/** Which scope this link was found in — "workspace" or "user" (global). */
|
|
98
|
+
scope: LinkScope;
|
|
98
99
|
}
|
|
99
100
|
/**
|
|
100
101
|
* Sentinel error for link failures. Carries the chosen mode + platform
|
|
101
102
|
* hint so the UI can render an actionable message.
|
|
102
103
|
*/
|
|
103
|
-
declare class LinkError extends Error {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
104
|
+
export declare class LinkError extends Error {
|
|
105
|
+
readonly mode: LinkMode;
|
|
106
|
+
readonly target: string;
|
|
107
|
+
readonly linkPath: string;
|
|
108
|
+
readonly platform: NodeJS.Platform;
|
|
109
|
+
readonly cause: unknown;
|
|
110
|
+
constructor(opts: {
|
|
111
|
+
mode: LinkMode;
|
|
112
|
+
target: string;
|
|
113
|
+
linkPath: string;
|
|
114
|
+
platform: NodeJS.Platform;
|
|
115
|
+
cause: unknown;
|
|
116
|
+
});
|
|
117
|
+
/** A user-facing hint for the platform that failed. */
|
|
118
|
+
hint(): string;
|
|
118
119
|
}
|
|
119
120
|
/** Choose the platform-optimal link mode. */
|
|
120
|
-
declare function pickMode(platform?: NodeJS.Platform): LinkMode;
|
|
121
|
+
export declare function pickMode(platform?: NodeJS.Platform): LinkMode;
|
|
121
122
|
/** A short hint string for the platform where the link failed. */
|
|
122
|
-
declare function getPlatformHint(platform: NodeJS.Platform): string;
|
|
123
|
+
export declare function getPlatformHint(platform: NodeJS.Platform): string;
|
|
123
124
|
/**
|
|
124
125
|
* Resolve the source path inside `~/.serviceme/repos/<repoId>/{skills,agents}/<name>`.
|
|
125
126
|
* Exported for callers that need to inspect the target without installing.
|
|
126
127
|
*/
|
|
127
|
-
declare function resolveSkillTarget(repoId: string, skillName: string, kind?: EntryKind): string;
|
|
128
|
+
export declare function resolveSkillTarget(repoId: string, skillName: string, kind?: EntryKind): string;
|
|
128
129
|
/**
|
|
129
130
|
* Resolve the workspace link path — `<workspaceDir>/.github/{skills,agents}/<name>` —
|
|
130
131
|
* the same directory Copilot/Claude actually scan.
|
|
131
132
|
*/
|
|
132
|
-
declare function resolveSkillLinkPath(workspaceDir: string, skillName: string, kind?: EntryKind): string;
|
|
133
|
+
export declare function resolveSkillLinkPath(workspaceDir: string, skillName: string, kind?: EntryKind): string;
|
|
133
134
|
/**
|
|
134
135
|
* Resolve the user-scope link path — `~/.copilot/{skills,agents}/<name>` —
|
|
135
136
|
* visible to every workspace.
|
|
136
137
|
*/
|
|
137
|
-
declare function resolveUserSkillLinkPath(skillName: string, kind?: EntryKind): string;
|
|
138
|
+
export declare function resolveUserSkillLinkPath(skillName: string, kind?: EntryKind): string;
|
|
138
139
|
/**
|
|
139
140
|
* Install a skill into a workspace by creating a link at the standard
|
|
140
141
|
* path. Throws `LinkError` on failure (no silent copy fallback per
|
|
@@ -144,7 +145,7 @@ declare function resolveUserSkillLinkPath(skillName: string, kind?: EntryKind):
|
|
|
144
145
|
* record without touching the filesystem. If a *wrong* link exists at
|
|
145
146
|
* the target path, it is replaced.
|
|
146
147
|
*/
|
|
147
|
-
declare function installSkillToWorkspace(opts: InstallSkillOptions): Promise<InstallSkillResult>;
|
|
148
|
+
export declare function installSkillToWorkspace(opts: InstallSkillOptions): Promise<InstallSkillResult>;
|
|
148
149
|
/**
|
|
149
150
|
* Convert an existing, real (non-symlink) skill/agent directory at the
|
|
150
151
|
* standard scan path into a symlink pointing at the matching global
|
|
@@ -152,7 +153,7 @@ declare function installSkillToWorkspace(opts: InstallSkillOptions): Promise<Ins
|
|
|
152
153
|
* callers should only surface this action when a marketplace/scope
|
|
153
154
|
* state check already confirmed a non-symlink install is present.
|
|
154
155
|
*/
|
|
155
|
-
declare function convertToSymlink(opts: InstallSkillOptions): Promise<InstallSkillResult>;
|
|
156
|
+
export declare function convertToSymlink(opts: InstallSkillOptions): Promise<InstallSkillResult>;
|
|
156
157
|
/**
|
|
157
158
|
* Remove a skill/agent link from a workspace/user scope. Idempotent:
|
|
158
159
|
* succeeds when the link does not exist (no error).
|
|
@@ -163,12 +164,12 @@ declare function convertToSymlink(opts: InstallSkillOptions): Promise<InstallSki
|
|
|
163
164
|
* necessarily still have the source repo entry to know which shape was
|
|
164
165
|
* installed (e.g. the repo may have been removed since).
|
|
165
166
|
*/
|
|
166
|
-
declare function uninstallSkillFromWorkspace(opts: {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
167
|
+
export declare function uninstallSkillFromWorkspace(opts: {
|
|
168
|
+
repoId: string;
|
|
169
|
+
skillName: string;
|
|
170
|
+
workspaceDir: string;
|
|
171
|
+
kind?: EntryKind;
|
|
172
|
+
scope?: LinkScope;
|
|
172
173
|
}): Promise<void>;
|
|
173
174
|
/**
|
|
174
175
|
* Enumerate all skill/agent entries currently present in a workspace/user
|
|
@@ -183,11 +184,11 @@ declare function uninstallSkillFromWorkspace(opts: {
|
|
|
183
184
|
* match these by name only. Returns an empty array when the scan
|
|
184
185
|
* directory doesn't exist.
|
|
185
186
|
*/
|
|
186
|
-
declare function listLinkedSkills(workspaceDir: string, kind?: EntryKind, scope?: LinkScope): Promise<LinkedSkill[]>;
|
|
187
|
+
export declare function listLinkedSkills(workspaceDir: string, kind?: EntryKind, scope?: LinkScope): Promise<LinkedSkill[]>;
|
|
187
188
|
/**
|
|
188
189
|
* List entries still living in the legacy `~/.agents` user scope.
|
|
189
190
|
* Read-only: migration is an explicit user action elsewhere.
|
|
190
191
|
*/
|
|
191
|
-
declare function listLegacyUserScopeSkills(kind?: EntryKind): Promise<LinkedSkill[]>;
|
|
192
|
-
|
|
193
|
-
|
|
192
|
+
export declare function listLegacyUserScopeSkills(kind?: EntryKind): Promise<LinkedSkill[]>;
|
|
193
|
+
//#endregion
|
|
194
|
+
//# sourceMappingURL=skill-linker.d.mts.map
|
package/dist/skill-linker.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region src/skill-linker/index.d.ts
|
|
1
2
|
/**
|
|
2
3
|
* Skill & Agent v2 — Client SkillLinker (M3, path-parity revision)
|
|
3
4
|
*
|
|
@@ -37,104 +38,104 @@
|
|
|
37
38
|
* @see docs/architecture/skill-agent-v2-repo.md §5.6 SkillLinker
|
|
38
39
|
* @see docs/architecture/skill-agent-v2-repo.md §11.8 (throw, not copy)
|
|
39
40
|
*/
|
|
40
|
-
type LinkMode = "symlink" | "junction" | "copy";
|
|
41
|
+
export type LinkMode = "symlink" | "junction" | "copy";
|
|
41
42
|
/** Kind of artifact being linked. Mirrors `BridgeSkillKind`. */
|
|
42
|
-
type EntryKind = "skill" | "agent";
|
|
43
|
+
export type EntryKind = "skill" | "agent";
|
|
43
44
|
/**
|
|
44
45
|
* Which scope the link lives in:
|
|
45
46
|
* - `"workspace"` (default) → `<workspaceDir>/.github/<kind>/<name>`
|
|
46
47
|
* - `"user"` → `~/.copilot/<kind>/<name>` (visible to every workspace)
|
|
47
48
|
*/
|
|
48
|
-
type LinkScope = "workspace" | "user";
|
|
49
|
-
interface InstallSkillOptions {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
49
|
+
export type LinkScope = "workspace" | "user";
|
|
50
|
+
export interface InstallSkillOptions {
|
|
51
|
+
repoId: string;
|
|
52
|
+
skillName: string;
|
|
53
|
+
workspaceDir: string;
|
|
54
|
+
/** Choose link mode explicitly. Defaults to platform-optimal. */
|
|
55
|
+
mode?: "auto" | LinkMode;
|
|
56
|
+
/** "skill" (default) or "agent". */
|
|
57
|
+
kind?: EntryKind;
|
|
58
|
+
/** "workspace" (default) or "user". */
|
|
59
|
+
scope?: LinkScope;
|
|
60
|
+
/**
|
|
61
|
+
* Pre-resolved absolute source path (from `SkillStore`), overriding
|
|
62
|
+
* the `<repoRoot>/{skills,agents}/<name>` formula in
|
|
63
|
+
* {@link resolveSkillTarget}. Required for repos with non-standard
|
|
64
|
+
* layouts — flat root (no `skills/` prefix), nested scope dirs
|
|
65
|
+
* (`skills/official/<name>`), or flat single-file agent manifests
|
|
66
|
+
* (`agents/<name>.agent.md`) — which the formula can't predict.
|
|
67
|
+
* When omitted, falls back to the formula (kept for callers that
|
|
68
|
+
* install a hand-authored skill without going through `SkillStore`).
|
|
69
|
+
*/
|
|
70
|
+
sourcePath?: string;
|
|
71
|
+
/**
|
|
72
|
+
* True when `sourcePath` points at a single manifest FILE (e.g. a
|
|
73
|
+
* flat `<name>.agent.md`) rather than a directory. Determines the
|
|
74
|
+
* symlink type (file vs dir/junction) and the link's basename (the
|
|
75
|
+
* link mirrors the source file's name + extension, since Copilot/
|
|
76
|
+
* VS Code scan `.github/agents/<name>.agent.md` as a FILE).
|
|
77
|
+
*/
|
|
78
|
+
sourceIsFile?: boolean;
|
|
78
79
|
}
|
|
79
|
-
interface InstallSkillResult {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
export interface InstallSkillResult {
|
|
81
|
+
mode: LinkMode;
|
|
82
|
+
linkPath: string;
|
|
83
|
+
targetPath: string;
|
|
83
84
|
}
|
|
84
85
|
/** Describes one symlink/junction currently present in a workspace/user scope. */
|
|
85
|
-
interface LinkedSkill {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
86
|
+
export interface LinkedSkill {
|
|
87
|
+
/**
|
|
88
|
+
* Repo id the link resolves to, parsed back out of the symlink
|
|
89
|
+
* target. Empty string when the target isn't under a recognizable
|
|
90
|
+
* `~/.serviceme/repos/<repoId>/...` path.
|
|
91
|
+
*/
|
|
92
|
+
repoId: string;
|
|
93
|
+
skillName: string;
|
|
94
|
+
linkPath: string;
|
|
95
|
+
targetPath: string;
|
|
96
|
+
mode: LinkMode;
|
|
97
|
+
/** Which scope this link was found in — "workspace" or "user" (global). */
|
|
98
|
+
scope: LinkScope;
|
|
98
99
|
}
|
|
99
100
|
/**
|
|
100
101
|
* Sentinel error for link failures. Carries the chosen mode + platform
|
|
101
102
|
* hint so the UI can render an actionable message.
|
|
102
103
|
*/
|
|
103
|
-
declare class LinkError extends Error {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
104
|
+
export declare class LinkError extends Error {
|
|
105
|
+
readonly mode: LinkMode;
|
|
106
|
+
readonly target: string;
|
|
107
|
+
readonly linkPath: string;
|
|
108
|
+
readonly platform: NodeJS.Platform;
|
|
109
|
+
readonly cause: unknown;
|
|
110
|
+
constructor(opts: {
|
|
111
|
+
mode: LinkMode;
|
|
112
|
+
target: string;
|
|
113
|
+
linkPath: string;
|
|
114
|
+
platform: NodeJS.Platform;
|
|
115
|
+
cause: unknown;
|
|
116
|
+
});
|
|
117
|
+
/** A user-facing hint for the platform that failed. */
|
|
118
|
+
hint(): string;
|
|
118
119
|
}
|
|
119
120
|
/** Choose the platform-optimal link mode. */
|
|
120
|
-
declare function pickMode(platform?: NodeJS.Platform): LinkMode;
|
|
121
|
+
export declare function pickMode(platform?: NodeJS.Platform): LinkMode;
|
|
121
122
|
/** A short hint string for the platform where the link failed. */
|
|
122
|
-
declare function getPlatformHint(platform: NodeJS.Platform): string;
|
|
123
|
+
export declare function getPlatformHint(platform: NodeJS.Platform): string;
|
|
123
124
|
/**
|
|
124
125
|
* Resolve the source path inside `~/.serviceme/repos/<repoId>/{skills,agents}/<name>`.
|
|
125
126
|
* Exported for callers that need to inspect the target without installing.
|
|
126
127
|
*/
|
|
127
|
-
declare function resolveSkillTarget(repoId: string, skillName: string, kind?: EntryKind): string;
|
|
128
|
+
export declare function resolveSkillTarget(repoId: string, skillName: string, kind?: EntryKind): string;
|
|
128
129
|
/**
|
|
129
130
|
* Resolve the workspace link path — `<workspaceDir>/.github/{skills,agents}/<name>` —
|
|
130
131
|
* the same directory Copilot/Claude actually scan.
|
|
131
132
|
*/
|
|
132
|
-
declare function resolveSkillLinkPath(workspaceDir: string, skillName: string, kind?: EntryKind): string;
|
|
133
|
+
export declare function resolveSkillLinkPath(workspaceDir: string, skillName: string, kind?: EntryKind): string;
|
|
133
134
|
/**
|
|
134
135
|
* Resolve the user-scope link path — `~/.copilot/{skills,agents}/<name>` —
|
|
135
136
|
* visible to every workspace.
|
|
136
137
|
*/
|
|
137
|
-
declare function resolveUserSkillLinkPath(skillName: string, kind?: EntryKind): string;
|
|
138
|
+
export declare function resolveUserSkillLinkPath(skillName: string, kind?: EntryKind): string;
|
|
138
139
|
/**
|
|
139
140
|
* Install a skill into a workspace by creating a link at the standard
|
|
140
141
|
* path. Throws `LinkError` on failure (no silent copy fallback per
|
|
@@ -144,7 +145,7 @@ declare function resolveUserSkillLinkPath(skillName: string, kind?: EntryKind):
|
|
|
144
145
|
* record without touching the filesystem. If a *wrong* link exists at
|
|
145
146
|
* the target path, it is replaced.
|
|
146
147
|
*/
|
|
147
|
-
declare function installSkillToWorkspace(opts: InstallSkillOptions): Promise<InstallSkillResult>;
|
|
148
|
+
export declare function installSkillToWorkspace(opts: InstallSkillOptions): Promise<InstallSkillResult>;
|
|
148
149
|
/**
|
|
149
150
|
* Convert an existing, real (non-symlink) skill/agent directory at the
|
|
150
151
|
* standard scan path into a symlink pointing at the matching global
|
|
@@ -152,7 +153,7 @@ declare function installSkillToWorkspace(opts: InstallSkillOptions): Promise<Ins
|
|
|
152
153
|
* callers should only surface this action when a marketplace/scope
|
|
153
154
|
* state check already confirmed a non-symlink install is present.
|
|
154
155
|
*/
|
|
155
|
-
declare function convertToSymlink(opts: InstallSkillOptions): Promise<InstallSkillResult>;
|
|
156
|
+
export declare function convertToSymlink(opts: InstallSkillOptions): Promise<InstallSkillResult>;
|
|
156
157
|
/**
|
|
157
158
|
* Remove a skill/agent link from a workspace/user scope. Idempotent:
|
|
158
159
|
* succeeds when the link does not exist (no error).
|
|
@@ -163,12 +164,12 @@ declare function convertToSymlink(opts: InstallSkillOptions): Promise<InstallSki
|
|
|
163
164
|
* necessarily still have the source repo entry to know which shape was
|
|
164
165
|
* installed (e.g. the repo may have been removed since).
|
|
165
166
|
*/
|
|
166
|
-
declare function uninstallSkillFromWorkspace(opts: {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
167
|
+
export declare function uninstallSkillFromWorkspace(opts: {
|
|
168
|
+
repoId: string;
|
|
169
|
+
skillName: string;
|
|
170
|
+
workspaceDir: string;
|
|
171
|
+
kind?: EntryKind;
|
|
172
|
+
scope?: LinkScope;
|
|
172
173
|
}): Promise<void>;
|
|
173
174
|
/**
|
|
174
175
|
* Enumerate all skill/agent entries currently present in a workspace/user
|
|
@@ -183,11 +184,11 @@ declare function uninstallSkillFromWorkspace(opts: {
|
|
|
183
184
|
* match these by name only. Returns an empty array when the scan
|
|
184
185
|
* directory doesn't exist.
|
|
185
186
|
*/
|
|
186
|
-
declare function listLinkedSkills(workspaceDir: string, kind?: EntryKind, scope?: LinkScope): Promise<LinkedSkill[]>;
|
|
187
|
+
export declare function listLinkedSkills(workspaceDir: string, kind?: EntryKind, scope?: LinkScope): Promise<LinkedSkill[]>;
|
|
187
188
|
/**
|
|
188
189
|
* List entries still living in the legacy `~/.agents` user scope.
|
|
189
190
|
* Read-only: migration is an explicit user action elsewhere.
|
|
190
191
|
*/
|
|
191
|
-
declare function listLegacyUserScopeSkills(kind?: EntryKind): Promise<LinkedSkill[]>;
|
|
192
|
-
|
|
193
|
-
|
|
192
|
+
export declare function listLegacyUserScopeSkills(kind?: EntryKind): Promise<LinkedSkill[]>;
|
|
193
|
+
//#endregion
|
|
194
|
+
//# sourceMappingURL=skill-linker.d.ts.map
|