@inupedia/spotlight-client 0.2.13 → 0.3.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.
Files changed (64) hide show
  1. package/dist/capabilities/channel.d.ts +28 -0
  2. package/dist/capabilities/channel.d.ts.map +1 -0
  3. package/dist/capabilities/channel.js +129 -0
  4. package/dist/capabilities/errors.d.ts +9 -0
  5. package/dist/capabilities/errors.d.ts.map +1 -0
  6. package/dist/capabilities/errors.js +19 -0
  7. package/dist/capabilities/handshake.d.ts +36 -0
  8. package/dist/capabilities/handshake.d.ts.map +1 -0
  9. package/dist/capabilities/handshake.js +78 -0
  10. package/dist/capabilities/hostActionExecutor.d.ts +19 -0
  11. package/dist/capabilities/hostActionExecutor.d.ts.map +1 -0
  12. package/dist/capabilities/hostActionExecutor.js +60 -0
  13. package/dist/capabilities/jsonSchema.d.ts +8 -0
  14. package/dist/capabilities/jsonSchema.d.ts.map +1 -0
  15. package/dist/capabilities/jsonSchema.js +43 -0
  16. package/dist/index.d.ts +5 -0
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +5 -0
  19. package/dist/node/capabilities/capabilityArtifact.d.ts +2 -0
  20. package/dist/node/capabilities/capabilityArtifact.d.ts.map +1 -1
  21. package/dist/node/capabilities/capabilityArtifact.js +6 -0
  22. package/dist/node/capabilities/capabilityFileMap.d.ts +2 -0
  23. package/dist/node/capabilities/capabilityFileMap.d.ts.map +1 -1
  24. package/dist/node/capabilities/capabilityFileMap.js +10 -2
  25. package/dist/node/capabilities/skillDirectoryLoader.d.ts +24 -0
  26. package/dist/node/capabilities/skillDirectoryLoader.d.ts.map +1 -0
  27. package/dist/node/capabilities/skillDirectoryLoader.js +308 -0
  28. package/dist/node/capabilities/skillFileValidator.d.ts +8 -0
  29. package/dist/node/capabilities/skillFileValidator.d.ts.map +1 -1
  30. package/dist/node/capabilities/skillFileValidator.js +46 -26
  31. package/dist/node/capabilities/skillManifest.d.ts +16 -0
  32. package/dist/node/capabilities/skillManifest.d.ts.map +1 -0
  33. package/dist/node/capabilities/skillManifest.js +22 -0
  34. package/dist/node/index.d.ts +2 -0
  35. package/dist/node/index.d.ts.map +1 -1
  36. package/dist/node/index.js +2 -0
  37. package/dist/node/publishCapabilitiesCli.d.ts +3 -0
  38. package/dist/node/publishCapabilitiesCli.d.ts.map +1 -0
  39. package/dist/node/publishCapabilitiesCli.js +36 -0
  40. package/dist/tools/frontendTool.d.ts +39 -0
  41. package/dist/tools/frontendTool.d.ts.map +1 -0
  42. package/dist/tools/frontendTool.js +51 -0
  43. package/dist/vite/capabilityBuild.d.ts +9 -0
  44. package/dist/vite/capabilityBuild.d.ts.map +1 -0
  45. package/dist/vite/capabilityBuild.js +164 -0
  46. package/dist/vite/capabilityBuildTypes.d.ts +31 -0
  47. package/dist/vite/capabilityBuildTypes.d.ts.map +1 -0
  48. package/dist/vite/capabilityBuildTypes.js +1 -0
  49. package/dist/vite/capabilityDevMiddleware.d.ts +5 -0
  50. package/dist/vite/capabilityDevMiddleware.d.ts.map +1 -0
  51. package/dist/vite/capabilityDevMiddleware.js +40 -0
  52. package/dist/vite/capabilityVirtualModule.d.ts +11 -0
  53. package/dist/vite/capabilityVirtualModule.d.ts.map +1 -0
  54. package/dist/vite/capabilityVirtualModule.js +43 -0
  55. package/dist/vite/capabilityVirtualModuleTypes.d.ts +12 -0
  56. package/dist/vite/capabilityVirtualModuleTypes.d.ts.map +1 -0
  57. package/dist/vite/capabilityVirtualModuleTypes.js +1 -0
  58. package/dist/vite/index.d.ts +4 -0
  59. package/dist/vite/index.d.ts.map +1 -1
  60. package/dist/vite/index.js +3 -0
  61. package/dist/vite/spotlightCapabilities.d.ts +4 -0
  62. package/dist/vite/spotlightCapabilities.d.ts.map +1 -0
  63. package/dist/vite/spotlightCapabilities.js +170 -0
  64. package/package.json +7 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skillDirectoryLoader.d.ts","sourceRoot":"","sources":["../../../src/node/capabilities/skillDirectoryLoader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,0BAA0B;;;;CAI7B,CAAC;AAEX,MAAM,MAAM,8BAA8B,GACtC,+BAA+B,GAC/B,iCAAiC,GACjC,gCAAgC,GAChC,mCAAmC,CAAC;AAExC,qBAAa,0BAA2B,SAAQ,KAAK;IACnD,QAAQ,CAAC,IAAI,EAAE,8BAA8B,CAAC;gBAElC,IAAI,EAAE,8BAA8B,EAAE,OAAO,EAAE,MAAM;CAKlE;AAED,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,SAAS,YAAY,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,qBAAqB,EAAE,CAAC;IAChC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB;AA4PD,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,0BAA0B,GAChC,OAAO,CAAC,uBAAuB,CAAC,CAiJlC"}
@@ -0,0 +1,308 @@
1
+ import { constants } from "node:fs";
2
+ import { lstat, open, opendir, realpath } from "node:fs/promises";
3
+ import { isAbsolute, relative, resolve, sep } from "node:path";
4
+ export const CAPABILITY_SKILL_LIMITS_V1 = {
5
+ maxSkills: 200,
6
+ maxFiles: 2_000,
7
+ maxExpandedBytes: 20 * 1024 * 1024,
8
+ };
9
+ export class CapabilitySkillLoadErrorV1 extends Error {
10
+ code;
11
+ constructor(code, message) {
12
+ super(message);
13
+ this.name = "CapabilitySkillLoadErrorV1";
14
+ this.code = code;
15
+ }
16
+ }
17
+ const compareUtf8 = (left, right) => Buffer.compare(Buffer.from(left, "utf8"), Buffer.from(right, "utf8"));
18
+ function isContained(base, candidate) {
19
+ const path = relative(base, candidate);
20
+ return path !== ".." && !path.startsWith(`..${sep}`) && !isAbsolute(path);
21
+ }
22
+ function toPosix(path) {
23
+ return path.split(sep).join("/");
24
+ }
25
+ function unsafe(message) {
26
+ return new CapabilitySkillLoadErrorV1("CAPABILITY_SKILL_ENTRY_UNSAFE", message);
27
+ }
28
+ function hasSameIdentity(left, right) {
29
+ return left.dev === right.dev && left.ino === right.ino;
30
+ }
31
+ function hasSameSnapshot(left, right) {
32
+ return (hasSameIdentity(left, right) &&
33
+ left.size === right.size &&
34
+ left.mtimeNs === right.mtimeNs &&
35
+ left.ctimeNs === right.ctimeNs);
36
+ }
37
+ function validateSkillDefinitions(projectRoot, skills) {
38
+ const sortedNames = [...skills].map((skill) => skill.name).sort(compareUtf8);
39
+ for (let index = 1; index < sortedNames.length; index += 1) {
40
+ if (sortedNames[index] === sortedNames[index - 1]) {
41
+ throw unsafe(`Duplicate Skill name is not allowed: ${sortedNames[index]}`);
42
+ }
43
+ }
44
+ const sortedDirectories = skills
45
+ .map((skill) => ({
46
+ name: skill.name,
47
+ directory: resolve(projectRoot, skill.directory),
48
+ }))
49
+ .sort((left, right) => compareUtf8(left.directory, right.directory) ||
50
+ compareUtf8(left.name, right.name));
51
+ for (let parentIndex = 0; parentIndex < sortedDirectories.length; parentIndex += 1) {
52
+ const parent = sortedDirectories[parentIndex];
53
+ for (let candidateIndex = parentIndex + 1; candidateIndex < sortedDirectories.length; candidateIndex += 1) {
54
+ const candidate = sortedDirectories[candidateIndex];
55
+ if (parent.directory === candidate.directory ||
56
+ isContained(parent.directory, candidate.directory)) {
57
+ throw unsafe(`Duplicate or overlapping Skill directories are not allowed for Skills "${parent.name}" and "${candidate.name}"`);
58
+ }
59
+ }
60
+ }
61
+ }
62
+ async function pinDirectory(directory, canonicalSkillRoot) {
63
+ try {
64
+ const before = await lstat(directory, { bigint: true });
65
+ if (before.isSymbolicLink() || !before.isDirectory()) {
66
+ throw unsafe("Skill directory is not a regular directory");
67
+ }
68
+ const canonicalPath = await realpath(directory);
69
+ const after = await lstat(directory, { bigint: true });
70
+ if (after.isSymbolicLink() ||
71
+ !after.isDirectory() ||
72
+ !hasSameIdentity(before, after)) {
73
+ throw unsafe("Skill directory changed while inspected");
74
+ }
75
+ if (canonicalSkillRoot !== undefined &&
76
+ !isContained(canonicalSkillRoot, canonicalPath)) {
77
+ throw unsafe("Skill directory resolves outside its root");
78
+ }
79
+ return {
80
+ path: directory,
81
+ canonicalPath,
82
+ dev: after.dev,
83
+ ino: after.ino,
84
+ size: after.size,
85
+ mtimeNs: after.mtimeNs,
86
+ ctimeNs: after.ctimeNs,
87
+ };
88
+ }
89
+ catch (error) {
90
+ if (error instanceof CapabilitySkillLoadErrorV1)
91
+ throw error;
92
+ throw unsafe("Cannot securely inspect Skill directory");
93
+ }
94
+ }
95
+ async function validateDirectory(pin) {
96
+ try {
97
+ const stat = await lstat(pin.path, { bigint: true });
98
+ const canonicalPath = await realpath(pin.path);
99
+ if (stat.isSymbolicLink() ||
100
+ !stat.isDirectory() ||
101
+ !hasSameSnapshot(pin, stat) ||
102
+ canonicalPath !== pin.canonicalPath) {
103
+ throw unsafe("Skill directory changed during traversal");
104
+ }
105
+ }
106
+ catch (error) {
107
+ if (error instanceof CapabilitySkillLoadErrorV1)
108
+ throw error;
109
+ throw unsafe("Cannot revalidate Skill directory");
110
+ }
111
+ }
112
+ async function readBoundedFile(candidate, parent, canonicalSkillRoot, remainingBytes) {
113
+ let handle;
114
+ try {
115
+ await validateDirectory(parent);
116
+ const pathBefore = await lstat(candidate, { bigint: true });
117
+ if (pathBefore.isSymbolicLink() || !pathBefore.isFile()) {
118
+ throw unsafe("Non-regular Skill entry is not allowed");
119
+ }
120
+ const canonicalBefore = await realpath(candidate);
121
+ if (!isContained(canonicalSkillRoot, canonicalBefore)) {
122
+ throw unsafe("Skill file resolves outside its directory");
123
+ }
124
+ // O_NOFOLLOW closes the final-component race on platforms that expose it.
125
+ // The handle/path identity and canonical containment checks below are the
126
+ // explicit safe fallback where the flag is unavailable.
127
+ const noFollow = typeof constants.O_NOFOLLOW === "number" ? constants.O_NOFOLLOW : 0;
128
+ handle = await open(candidate, constants.O_RDONLY | noFollow);
129
+ const opened = await handle.stat({ bigint: true });
130
+ const pathAfterOpen = await lstat(candidate, { bigint: true });
131
+ const canonicalAfterOpen = await realpath(candidate);
132
+ await validateDirectory(parent);
133
+ if (!opened.isFile() ||
134
+ pathAfterOpen.isSymbolicLink() ||
135
+ !pathAfterOpen.isFile() ||
136
+ !hasSameIdentity(pathBefore, opened) ||
137
+ !hasSameIdentity(opened, pathAfterOpen) ||
138
+ pathBefore.size !== opened.size ||
139
+ opened.size !== pathAfterOpen.size ||
140
+ pathBefore.mtimeNs !== opened.mtimeNs ||
141
+ pathBefore.ctimeNs !== opened.ctimeNs ||
142
+ opened.mtimeNs !== pathAfterOpen.mtimeNs ||
143
+ opened.ctimeNs !== pathAfterOpen.ctimeNs ||
144
+ canonicalBefore !== canonicalAfterOpen ||
145
+ !isContained(canonicalSkillRoot, canonicalAfterOpen)) {
146
+ throw unsafe("Skill file changed before reading");
147
+ }
148
+ const chunks = [];
149
+ let bytesRead = 0;
150
+ const maximumRead = remainingBytes + 1;
151
+ while (bytesRead < maximumRead) {
152
+ const buffer = Buffer.allocUnsafe(Math.min(64 * 1024, maximumRead - bytesRead));
153
+ const result = await handle.read(buffer, 0, buffer.byteLength, null);
154
+ if (result.bytesRead === 0)
155
+ break;
156
+ chunks.push(buffer.subarray(0, result.bytesRead));
157
+ bytesRead += result.bytesRead;
158
+ }
159
+ const openedAfterRead = await handle.stat({ bigint: true });
160
+ const pathAfterRead = await lstat(candidate, { bigint: true });
161
+ const canonicalAfterRead = await realpath(candidate);
162
+ await validateDirectory(parent);
163
+ if (pathAfterRead.isSymbolicLink() ||
164
+ !pathAfterRead.isFile() ||
165
+ !hasSameIdentity(opened, openedAfterRead) ||
166
+ !hasSameIdentity(openedAfterRead, pathAfterRead) ||
167
+ opened.size !== openedAfterRead.size ||
168
+ openedAfterRead.size !== pathAfterRead.size ||
169
+ opened.mtimeNs !== openedAfterRead.mtimeNs ||
170
+ opened.ctimeNs !== openedAfterRead.ctimeNs ||
171
+ openedAfterRead.mtimeNs !== pathAfterRead.mtimeNs ||
172
+ openedAfterRead.ctimeNs !== pathAfterRead.ctimeNs ||
173
+ canonicalAfterOpen !== canonicalAfterRead ||
174
+ !isContained(canonicalSkillRoot, canonicalAfterRead)) {
175
+ throw unsafe("Skill file changed while reading");
176
+ }
177
+ if (bytesRead > remainingBytes) {
178
+ throw new CapabilitySkillLoadErrorV1("CAPABILITY_EXPANDED_SIZE_EXCEEDED", `Expanded size exceeds ${CAPABILITY_SKILL_LIMITS_V1.maxExpandedBytes} bytes`);
179
+ }
180
+ return Buffer.concat(chunks, bytesRead);
181
+ }
182
+ catch (error) {
183
+ if (error instanceof CapabilitySkillLoadErrorV1)
184
+ throw error;
185
+ throw unsafe("Cannot securely read Skill file");
186
+ }
187
+ finally {
188
+ await handle?.close().catch(() => undefined);
189
+ }
190
+ }
191
+ export async function loadCanonicalSkillsV1(input) {
192
+ if (input.skills.length > CAPABILITY_SKILL_LIMITS_V1.maxSkills) {
193
+ throw new CapabilitySkillLoadErrorV1("CAPABILITY_SKILL_LIMIT_EXCEEDED", `Skill count ${input.skills.length} exceeds ${CAPABILITY_SKILL_LIMITS_V1.maxSkills}`);
194
+ }
195
+ const projectRoot = resolve(input.projectRoot);
196
+ validateSkillDefinitions(projectRoot, input.skills);
197
+ let canonicalProjectRoot;
198
+ try {
199
+ canonicalProjectRoot = await realpath(projectRoot);
200
+ }
201
+ catch {
202
+ throw unsafe("Cannot securely resolve project root");
203
+ }
204
+ const sortedSkills = [...input.skills].sort((left, right) => compareUtf8(left.name, right.name));
205
+ const pinnedSkills = [];
206
+ for (const skill of sortedSkills) {
207
+ const directory = resolve(projectRoot, skill.directory);
208
+ if (!isContained(projectRoot, directory)) {
209
+ throw unsafe(`Skill "${skill.name}" directory escapes project root`);
210
+ }
211
+ const root = await pinDirectory(directory);
212
+ if (!isContained(canonicalProjectRoot, root.canonicalPath)) {
213
+ throw unsafe(`Skill "${skill.name}" directory resolves outside project root`);
214
+ }
215
+ pinnedSkills.push({ skill, directory, root });
216
+ }
217
+ for (let leftIndex = 0; leftIndex < pinnedSkills.length; leftIndex += 1) {
218
+ const left = pinnedSkills[leftIndex];
219
+ for (let rightIndex = leftIndex + 1; rightIndex < pinnedSkills.length; rightIndex += 1) {
220
+ const right = pinnedSkills[rightIndex];
221
+ if (hasSameIdentity(left.root, right.root) ||
222
+ left.root.canonicalPath === right.root.canonicalPath ||
223
+ isContained(left.root.canonicalPath, right.root.canonicalPath) ||
224
+ isContained(right.root.canonicalPath, left.root.canonicalPath)) {
225
+ throw unsafe("Duplicate or overlapping Skill directories are not allowed");
226
+ }
227
+ }
228
+ }
229
+ const loadedSkills = [];
230
+ const watchedFiles = [];
231
+ let fileCount = 0;
232
+ let expandedBytes = 0;
233
+ for (const pinnedSkill of pinnedSkills) {
234
+ const { skill, directory: skillDirectory, root: skillRoot } = pinnedSkill;
235
+ const files = [];
236
+ const walk = async (directory) => {
237
+ await validateDirectory(directory);
238
+ let directoryHandle;
239
+ const entries = [];
240
+ try {
241
+ directoryHandle = await opendir(directory.path);
242
+ await validateDirectory(directory);
243
+ for (;;) {
244
+ const entry = await directoryHandle.read();
245
+ if (entry === null)
246
+ break;
247
+ entries.push(entry);
248
+ }
249
+ }
250
+ catch {
251
+ throw unsafe(`Cannot read directory for Skill "${skill.name}"`);
252
+ }
253
+ finally {
254
+ await directoryHandle?.close().catch(() => undefined);
255
+ }
256
+ await validateDirectory(directory);
257
+ entries.sort((left, right) => compareUtf8(left.name, right.name));
258
+ for (const entry of entries) {
259
+ await validateDirectory(directory);
260
+ const candidate = resolve(directory.path, entry.name);
261
+ if (!isContained(skillDirectory, candidate)) {
262
+ throw unsafe("Skill entry escapes its directory");
263
+ }
264
+ let stat;
265
+ try {
266
+ stat = await lstat(candidate, { bigint: true });
267
+ }
268
+ catch {
269
+ throw unsafe("Cannot inspect Skill entry");
270
+ }
271
+ if (stat.isSymbolicLink()) {
272
+ throw unsafe("Symbolic links are not allowed in Skills");
273
+ }
274
+ if (stat.isDirectory()) {
275
+ const child = await pinDirectory(candidate, skillRoot.canonicalPath);
276
+ await walk(child);
277
+ await validateDirectory(directory);
278
+ continue;
279
+ }
280
+ if (!stat.isFile()) {
281
+ throw unsafe("Non-regular Skill entry is not allowed");
282
+ }
283
+ fileCount += 1;
284
+ if (fileCount > CAPABILITY_SKILL_LIMITS_V1.maxFiles) {
285
+ throw new CapabilitySkillLoadErrorV1("CAPABILITY_FILE_LIMIT_EXCEEDED", `File count ${fileCount} exceeds ${CAPABILITY_SKILL_LIMITS_V1.maxFiles}`);
286
+ }
287
+ const bytes = await readBoundedFile(candidate, directory, skillRoot.canonicalPath, CAPABILITY_SKILL_LIMITS_V1.maxExpandedBytes - expandedBytes);
288
+ expandedBytes += bytes.byteLength;
289
+ files.push({
290
+ relativePath: toPosix(relative(skillDirectory, candidate)),
291
+ bytes,
292
+ });
293
+ watchedFiles.push(candidate);
294
+ }
295
+ await validateDirectory(directory);
296
+ };
297
+ await walk(skillRoot);
298
+ files.sort((left, right) => compareUtf8(left.relativePath, right.relativePath));
299
+ loadedSkills.push({ name: skill.name, files });
300
+ }
301
+ watchedFiles.sort(compareUtf8);
302
+ return {
303
+ skills: loadedSkills,
304
+ watchedFiles,
305
+ fileCount,
306
+ expandedBytes,
307
+ };
308
+ }
@@ -5,5 +5,13 @@ export type ValidateScannedSkillInput = {
5
5
  skill: ScannedSkill;
6
6
  mode?: "strict" | "compat";
7
7
  };
8
+ export type ValidateSkillContentInput = {
9
+ skill: ScannedSkill;
10
+ markdown: string;
11
+ mode?: "strict" | "compat";
12
+ skillRoot: string;
13
+ readReference: (relativePath: string) => Promise<Uint8Array | undefined>;
14
+ };
15
+ export declare function validateSkillContent(input: ValidateSkillContentInput): Promise<AgentSkillValidationResult>;
8
16
  export declare function validateScannedSkill(input: ValidateScannedSkillInput): Promise<AgentSkillValidationResult>;
9
17
  //# sourceMappingURL=skillFileValidator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"skillFileValidator.d.ts","sourceRoot":"","sources":["../../../src/node/capabilities/skillFileValidator.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAGL,KAAK,0BAA0B,EAChC,MAAM,qBAAqB,CAAC;AAO7B,MAAM,MAAM,yBAAyB,GAAG;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,YAAY,CAAC;IACpB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;CAC5B,CAAC;AAiGF,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,yBAAyB,GAC/B,OAAO,CAAC,0BAA0B,CAAC,CAmCrC"}
1
+ {"version":3,"file":"skillFileValidator.d.ts","sourceRoot":"","sources":["../../../src/node/capabilities/skillFileValidator.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAGL,KAAK,0BAA0B,EAChC,MAAM,qBAAqB,CAAC;AAO7B,MAAM,MAAM,yBAAyB,GAAG;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,YAAY,CAAC;IACpB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,KAAK,EAAE,YAAY,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,CACb,YAAY,EAAE,MAAM,KACjB,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;CACtC,CAAC;AA2FF,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,yBAAyB,GAC/B,OAAO,CAAC,0BAA0B,CAAC,CAiCrC;AAED,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,yBAAyB,GAC/B,OAAO,CAAC,0BAA0B,CAAC,CA+BrC"}
@@ -28,48 +28,37 @@ function isWithin(root, candidate) {
28
28
  return (relativePath === "" ||
29
29
  (!relativePath.startsWith("..") && !isAbsolute(relativePath)));
30
30
  }
31
- function warning(input, code, message) {
31
+ function warning(skill, code, message) {
32
32
  return {
33
33
  code,
34
34
  severity: "warning",
35
35
  message,
36
- skillFile: input.skill.skillFile,
36
+ skillFile: skill.skillFile,
37
37
  };
38
38
  }
39
- async function referenceWarnings(input, markdown, skillPath) {
40
- const skillRoot = dirname(skillPath);
39
+ async function referenceWarnings(input, markdown) {
40
+ const skillRoot = resolve(input.skillRoot);
41
41
  const diagnostics = [];
42
42
  for (const link of extractRelativeMarkdownLinks(markdown)) {
43
43
  const target = resolve(skillRoot, link);
44
44
  if (!isWithin(skillRoot, target)) {
45
- diagnostics.push(warning(input, "SKILL_REFERENCE_OUTSIDE_ROOT", `Markdown reference "${link}" resolves outside the Skill root.`));
45
+ diagnostics.push(warning(input.skill, "SKILL_REFERENCE_OUTSIDE_ROOT", `Markdown reference "${link}" resolves outside the Skill root.`));
46
46
  continue;
47
47
  }
48
- let stats;
49
- try {
50
- stats = await lstat(target);
51
- }
52
- catch (error) {
53
- if (error.code === "ENOENT")
54
- continue;
55
- throw error;
56
- }
57
- if (!stats.isFile() ||
58
- stats.isSymbolicLink() ||
59
- stats.size > MAX_REFERENCE_BYTES) {
48
+ const referencedBytes = await input.readReference(relative(skillRoot, target));
49
+ if (referencedBytes === undefined ||
50
+ referencedBytes.byteLength > MAX_REFERENCE_BYTES) {
60
51
  continue;
61
52
  }
62
- const referencedMarkdown = await readFile(target, "utf8");
53
+ const referencedMarkdown = Buffer.from(referencedBytes).toString("utf8");
63
54
  if (extractRelativeMarkdownLinks(referencedMarkdown).length > 0) {
64
- diagnostics.push(warning(input, "SKILL_REFERENCE_CHAIN_DEEP", `Markdown reference "${link}" links to another Markdown reference.`));
55
+ diagnostics.push(warning(input.skill, "SKILL_REFERENCE_CHAIN_DEEP", `Markdown reference "${link}" links to another Markdown reference.`));
65
56
  }
66
57
  }
67
58
  return diagnostics;
68
59
  }
69
- export async function validateScannedSkill(input) {
70
- const projectRoot = resolve(input.projectRoot);
71
- const skillPath = resolve(projectRoot, input.skill.skillFile);
72
- const markdown = (await readFile(skillPath, "utf8")).replace(/\r\n?/g, "\n");
60
+ export async function validateSkillContent(input) {
61
+ const markdown = input.markdown.replace(/\r\n?/g, "\n");
73
62
  const result = validateAgentSkillMarkdown({
74
63
  directoryName: input.skill.name,
75
64
  skillFile: input.skill.skillFile,
@@ -80,11 +69,42 @@ export async function validateScannedSkill(input) {
80
69
  const lineCount = markdown.split("\n").length;
81
70
  const estimatedTokens = Math.ceil(markdown.length / 4);
82
71
  if (lineCount > 500) {
83
- diagnostics.push(warning(input, "SKILL_RECOMMENDATION_LINES", `SKILL.md contains ${lineCount} lines; the Agent Skills recommendation is at most 500.`));
72
+ diagnostics.push(warning(input.skill, "SKILL_RECOMMENDATION_LINES", `SKILL.md contains ${lineCount} lines; the Agent Skills recommendation is at most 500.`));
84
73
  }
85
74
  if (estimatedTokens > 5_000) {
86
- diagnostics.push(warning(input, "SKILL_RECOMMENDATION_TOKENS", `SKILL.md has a deterministic estimate of ${estimatedTokens} tokens; the recommendation is at most 5000.`));
75
+ diagnostics.push(warning(input.skill, "SKILL_RECOMMENDATION_TOKENS", `SKILL.md has a deterministic estimate of ${estimatedTokens} tokens; the recommendation is at most 5000.`));
87
76
  }
88
- diagnostics.push(...(await referenceWarnings(input, markdown, skillPath)));
77
+ diagnostics.push(...(await referenceWarnings(input, markdown)));
89
78
  return { ...result, diagnostics };
90
79
  }
80
+ export async function validateScannedSkill(input) {
81
+ const projectRoot = resolve(input.projectRoot);
82
+ const skillPath = resolve(projectRoot, input.skill.skillFile);
83
+ const skillRoot = dirname(skillPath);
84
+ const markdown = await readFile(skillPath, "utf8");
85
+ return validateSkillContent({
86
+ skill: input.skill,
87
+ markdown,
88
+ mode: input.mode,
89
+ skillRoot,
90
+ async readReference(relativePath) {
91
+ const target = resolve(skillRoot, relativePath);
92
+ let stats;
93
+ try {
94
+ stats = await lstat(target);
95
+ }
96
+ catch (error) {
97
+ if (error.code === "ENOENT") {
98
+ return undefined;
99
+ }
100
+ throw error;
101
+ }
102
+ if (!stats.isFile() ||
103
+ stats.isSymbolicLink() ||
104
+ stats.size > MAX_REFERENCE_BYTES) {
105
+ return undefined;
106
+ }
107
+ return readFile(target);
108
+ },
109
+ });
110
+ }
@@ -0,0 +1,16 @@
1
+ import type { CanonicalSkillInputV1 } from "./capabilityArtifactTypes.js";
2
+ export interface CapabilitySkillManifestEntryV1 {
3
+ name: string;
4
+ entrypoint: string;
5
+ files: string[];
6
+ }
7
+ export interface CapabilitySkillManifestV1 {
8
+ schemaVersion: "spotlight.skill-manifest/1";
9
+ skills: CapabilitySkillManifestEntryV1[];
10
+ }
11
+ export declare function buildSkillManifestV1(skills: CanonicalSkillInputV1[]): {
12
+ manifest: CapabilitySkillManifestV1;
13
+ bytes: Uint8Array<ArrayBufferLike>;
14
+ digest: string;
15
+ };
16
+ //# sourceMappingURL=skillManifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skillManifest.d.ts","sourceRoot":"","sources":["../../../src/node/capabilities/skillManifest.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAE1E,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,yBAAyB;IACxC,aAAa,EAAE,4BAA4B,CAAC;IAC5C,MAAM,EAAE,8BAA8B,EAAE,CAAC;CAC1C;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,qBAAqB,EAAE;cAeP,yBAAyB;;;EAIrF"}
@@ -0,0 +1,22 @@
1
+ import { createHash } from "node:crypto";
2
+ import { canonicalizeJson, compareUtf16 } from "./canonicalJson.js";
3
+ export function buildSkillManifestV1(skills) {
4
+ const manifest = {
5
+ schemaVersion: "spotlight.skill-manifest/1",
6
+ skills: skills
7
+ .map((skill) => ({
8
+ name: skill.name,
9
+ entrypoint: `skills/${skill.name}/SKILL.md`,
10
+ files: skill.files
11
+ .map((file) => `skills/${skill.name}/${file.relativePath}`)
12
+ .sort(compareUtf16),
13
+ }))
14
+ .sort((left, right) => compareUtf16(left.name, right.name)),
15
+ };
16
+ const bytes = canonicalizeJson(manifest);
17
+ return {
18
+ manifest: JSON.parse(new TextDecoder().decode(bytes)),
19
+ bytes,
20
+ digest: `sha256:${createHash("sha256").update(bytes).digest("hex")}`,
21
+ };
22
+ }
@@ -1,6 +1,7 @@
1
1
  export { joinSkillScriptPath, type SkillScriptRunResult, } from "../skillScriptPath.js";
2
2
  export { createNodeSkillScriptRunner } from "./skillScriptRunner.js";
3
3
  export { DEFAULT_SKILL_ROOTS, scanProjectSkills, type ScanProjectSkillsOptions, type ScannedSkill, type SkillRootInput, type SkillScanDiagnostic, type SkillScanMode, type SkillScanResult, } from "./capabilities/skillScanner.js";
4
+ export { CAPABILITY_SKILL_LIMITS_V1, CapabilitySkillLoadErrorV1, loadCanonicalSkillsV1, type CapabilitySkillLoadErrorCodeV1, type LoadCanonicalSkillsInputV1, type LoadedCanonicalSkillsV1, } from "./capabilities/skillDirectoryLoader.js";
4
5
  export { validateAgentSkillMarkdown, type AgentSkillDiagnostic, type AgentSkillDiagnosticCode, type AgentSkillDiagnosticSeverity, type AgentSkillValidationResult, type ValidatedAgentSkill, type ValidateAgentSkillMarkdownInput, } from "./capabilities/skillValidator.js";
5
6
  export { validateScannedSkill, type ValidateScannedSkillInput, } from "./capabilities/skillFileValidator.js";
6
7
  export { buildCapabilityArtifactV1, type CapabilityArtifactBuildV1, } from "./capabilities/capabilityArtifact.js";
@@ -9,4 +10,5 @@ export { CAPABILITY_ARTIFACT_ERROR_CODES, CapabilityArtifactError, type Capabili
9
10
  export type { CanonicalSkillFileInputV1, CanonicalSkillInputV1, CapabilityArtifactInputV1, CapabilityFileManifestEntryV1, CapabilityFileManifestV1, CapabilityPayloadFileV1, } from "./capabilities/capabilityArtifactTypes.js";
10
11
  export { canonicalizeJson, compareUtf16, type CanonicalJsonValue, } from "./capabilities/canonicalJson.js";
11
12
  export { buildToolManifestV1, type BuiltToolManifestV1, type ToolManifestV1, } from "./capabilities/toolManifest.js";
13
+ export { buildSkillManifestV1, type CapabilitySkillManifestEntryV1, type CapabilitySkillManifestV1, } from "./capabilities/skillManifest.js";
12
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,KAAK,oBAAoB,GAC1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,eAAe,GACrB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,0BAA0B,EAC1B,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAC/B,KAAK,mBAAmB,EACxB,KAAK,+BAA+B,GACrC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,oBAAoB,EACpB,KAAK,yBAAyB,GAC/B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,yBAAyB,EACzB,KAAK,yBAAyB,GAC/B,MAAM,sCAAsC,CAAC;AAC9C,OAAO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AAsC,CAAC;AAC9C,OAAO,EACL,yBAAyB,EACzB,KAAK,yBAAyB,GAC/B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,KAAK,wBAAwB,GAC9B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,+BAA+B,EAC/B,uBAAuB,EACvB,KAAK,2BAA2B,GACjC,MAAM,2CAA2C,CAAC;AACnD,YAAY,EACV,yBAAyB,EACzB,qBAAqB,EACrB,yBAAyB,EACzB,6BAA6B,EAC7B,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,KAAK,kBAAkB,GACxB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,mBAAmB,EACnB,KAAK,mBAAmB,EACxB,KAAK,cAAc,GACpB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,oBAAoB,EACpB,KAAK,8BAA8B,EACnC,KAAK,yBAAyB,GAC/B,MAAM,iCAAiC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  export { joinSkillScriptPath, } from "../skillScriptPath.js";
2
2
  export { createNodeSkillScriptRunner } from "./skillScriptRunner.js";
3
3
  export { DEFAULT_SKILL_ROOTS, scanProjectSkills, } from "./capabilities/skillScanner.js";
4
+ export { CAPABILITY_SKILL_LIMITS_V1, CapabilitySkillLoadErrorV1, loadCanonicalSkillsV1, } from "./capabilities/skillDirectoryLoader.js";
4
5
  export { validateAgentSkillMarkdown, } from "./capabilities/skillValidator.js";
5
6
  export { validateScannedSkill, } from "./capabilities/skillFileValidator.js";
6
7
  export { buildCapabilityArtifactV1, } from "./capabilities/capabilityArtifact.js";
@@ -8,3 +9,4 @@ export { buildCapabilityFileMapV1, computeArtifactDigestV1, } from "./capabiliti
8
9
  export { CAPABILITY_ARTIFACT_ERROR_CODES, CapabilityArtifactError, } from "./capabilities/capabilityArtifactError.js";
9
10
  export { canonicalizeJson, compareUtf16, } from "./capabilities/canonicalJson.js";
10
11
  export { buildToolManifestV1, } from "./capabilities/toolManifest.js";
12
+ export { buildSkillManifestV1, } from "./capabilities/skillManifest.js";
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=publishCapabilitiesCli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publishCapabilitiesCli.d.ts","sourceRoot":"","sources":["../../src/node/publishCapabilitiesCli.ts"],"names":[],"mappings":""}
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env node
2
+ import { readFile } from "node:fs/promises";
3
+ import { resolve } from "node:path";
4
+ function argument(name) {
5
+ const index = process.argv.indexOf(`--${name}`);
6
+ const value = index >= 0 ? process.argv[index + 1] : undefined;
7
+ if (!value)
8
+ throw new Error(`Missing --${name}`);
9
+ return value;
10
+ }
11
+ async function main() {
12
+ const endpoint = argument("endpoint").replace(/\/$/, "");
13
+ const info = JSON.parse(await readFile(resolve(argument("build-info")), "utf8"));
14
+ const archive = await readFile(resolve(argument("artifact")));
15
+ const apiKey = process.env.SPOTLIGHT_API_KEY;
16
+ const response = await fetch(`${endpoint}/v1/capability-artifacts/${encodeURIComponent(info.artifactDigest)}/published`, {
17
+ method: "PUT",
18
+ headers: {
19
+ "Content-Type": "application/gzip",
20
+ ...(apiKey ? { "X-Spotlight-Api-Key": apiKey } : {}),
21
+ "X-Spotlight-Project-Id": info.projectId,
22
+ "X-Spotlight-Frontend-Build-Id": info.frontendBuildId,
23
+ "X-Spotlight-Manifest-Digest": info.manifestDigest,
24
+ "X-Spotlight-Skill-Manifest-Digest": info.skillManifestDigest,
25
+ "X-Spotlight-Tool-Manifest-Digest": info.toolManifestDigest,
26
+ },
27
+ body: archive,
28
+ });
29
+ if (!response.ok)
30
+ throw new Error(`Artifact publish failed (${response.status}): ${await response.text()}`);
31
+ process.stdout.write(`${await response.text()}\n`);
32
+ }
33
+ main().catch((error) => {
34
+ process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
35
+ process.exitCode = 1;
36
+ });
@@ -0,0 +1,39 @@
1
+ import type { FrontendToolDescriptorV1, HostActionFenceV2 } from "@inupedia/spotlight-protocol";
2
+ export interface FrontendToolHandlerContextV1 {
3
+ projectId: string;
4
+ sessionId: string;
5
+ callId: string;
6
+ attempt: number;
7
+ fence: Readonly<HostActionFenceV2>;
8
+ idempotencyKey?: string;
9
+ signal: AbortSignal;
10
+ }
11
+ export interface FrontendToolDefinitionV1<TInput extends Record<string, unknown> = Record<string, unknown>, TOutput = unknown> extends FrontendToolDescriptorV1 {
12
+ execute: (input: TInput, context: FrontendToolHandlerContextV1) => TOutput | Promise<TOutput>;
13
+ }
14
+ /** Heterogeneous project registry erases handler generics only at the collection boundary. */
15
+ export type AnyFrontendToolDefinitionV1 = FrontendToolDefinitionV1<any, any>;
16
+ export interface SpotlightProjectV1 {
17
+ readonly projectId: string;
18
+ readonly skillRoots?: readonly string[];
19
+ readonly tools: readonly AnyFrontendToolDefinitionV1[];
20
+ }
21
+ export declare function defineFrontendTool<TInput extends Record<string, unknown>, TOutput = unknown>(definition: FrontendToolDefinitionV1<TInput, TOutput>): FrontendToolDefinitionV1<TInput, TOutput>;
22
+ export declare function defineSpotlightProject(input: {
23
+ projectId: string;
24
+ skillRoots?: readonly string[];
25
+ tools: readonly AnyFrontendToolDefinitionV1[];
26
+ }): SpotlightProjectV1;
27
+ export declare function projectToolDescriptors(project: Pick<SpotlightProjectV1, "tools">): FrontendToolDescriptorV1[];
28
+ export interface FrontendToolRegistryV1 {
29
+ readonly projectId: string;
30
+ get(name: string, version: string): AnyFrontendToolDefinitionV1 | undefined;
31
+ setLive(name: string, version: string, live: boolean): void;
32
+ liveTools(): Array<{
33
+ name: string;
34
+ version: string;
35
+ }>;
36
+ descriptors(): FrontendToolDescriptorV1[];
37
+ }
38
+ export declare function createFrontendToolRegistry(project: SpotlightProjectV1): FrontendToolRegistryV1;
39
+ //# sourceMappingURL=frontendTool.d.ts.map
@@ -0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