@tiangong-ai/cli 0.0.22 → 0.0.24

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 (53) hide show
  1. package/AGENTS.md +3 -2
  2. package/README.md +114 -13
  3. package/dist/cli.js +15 -3
  4. package/dist/cli.js.map +1 -1
  5. package/dist/io.d.ts +3 -0
  6. package/dist/io.js.map +1 -1
  7. package/dist/main.js +1 -0
  8. package/dist/main.js.map +1 -1
  9. package/dist/research/orchestration.js +124 -4
  10. package/dist/research/orchestration.js.map +1 -1
  11. package/dist/research/setup-command.d.ts +3 -0
  12. package/dist/research/setup-command.js +487 -0
  13. package/dist/research/setup-command.js.map +1 -0
  14. package/dist/research/workspace/broker.js +77 -50
  15. package/dist/research/workspace/broker.js.map +1 -1
  16. package/dist/research/workspace/capabilities.d.ts +2 -0
  17. package/dist/research/workspace/capabilities.js +310 -7
  18. package/dist/research/workspace/capabilities.js.map +1 -1
  19. package/dist/research/workspace/constants.d.ts +3 -2
  20. package/dist/research/workspace/constants.js +25 -0
  21. package/dist/research/workspace/constants.js.map +1 -1
  22. package/dist/research/workspace/context.js +26 -1
  23. package/dist/research/workspace/context.js.map +1 -1
  24. package/dist/research/workspace/credentials.d.ts +19 -0
  25. package/dist/research/workspace/credentials.js +111 -0
  26. package/dist/research/workspace/credentials.js.map +1 -0
  27. package/dist/research/workspace/executor.d.ts +1 -0
  28. package/dist/research/workspace/executor.js +7 -3
  29. package/dist/research/workspace/executor.js.map +1 -1
  30. package/dist/research/workspace/external-skills.d.ts +477 -0
  31. package/dist/research/workspace/external-skills.js +1141 -0
  32. package/dist/research/workspace/external-skills.js.map +1 -0
  33. package/dist/research/workspace/preflight.d.ts +2 -0
  34. package/dist/research/workspace/preflight.js +11 -4
  35. package/dist/research/workspace/preflight.js.map +1 -1
  36. package/dist/research/workspace/runtime.js +63 -20
  37. package/dist/research/workspace/runtime.js.map +1 -1
  38. package/dist/research/workspace/setup-catalog.d.ts +161 -0
  39. package/dist/research/workspace/setup-catalog.js +601 -0
  40. package/dist/research/workspace/setup-catalog.js.map +1 -0
  41. package/dist/research/workspace/setup-wizard.d.ts +24 -0
  42. package/dist/research/workspace/setup-wizard.js +465 -0
  43. package/dist/research/workspace/setup-wizard.js.map +1 -0
  44. package/dist/research/workspace/setup.d.ts +463 -0
  45. package/dist/research/workspace/setup.js +3000 -0
  46. package/dist/research/workspace/setup.js.map +1 -0
  47. package/dist/research/workspace/storage.js +44 -2
  48. package/dist/research/workspace/storage.js.map +1 -1
  49. package/dist/research/workspace/types.d.ts +42 -1
  50. package/dist/research/workspace/workspace.d.ts +2 -0
  51. package/dist/research/workspace/workspace.js +154 -52
  52. package/dist/research/workspace/workspace.js.map +1 -1
  53. package/package.json +4 -4
@@ -0,0 +1,477 @@
1
+ import type { CapabilityDeclarations, CapabilitySourceDeclaration } from "./types.js";
2
+ export declare const EXTERNAL_SKILLS_CLI_VERSION = "1.5.22";
3
+ export declare const EXTERNAL_SKILL_PROFILE = "internet-research";
4
+ export declare const EXTERNAL_SKILL_CONTEXT_PROFILE = "internet-research-with-context";
5
+ export declare const EXTERNAL_SKILL_MEDIA_PROFILE = "internet-research-with-media";
6
+ export declare function inspectExternalSkillCatalog(input: {
7
+ selectedPath: string;
8
+ workspace?: string | null;
9
+ skillRoot?: string | null;
10
+ }): Promise<{
11
+ schemaVersion: 1;
12
+ catalog: string;
13
+ policy: {
14
+ implementations: string;
15
+ runtimeInstall: boolean;
16
+ projectLocalCopyRecommended: boolean;
17
+ };
18
+ installer: {
19
+ package: string;
20
+ version: string;
21
+ source: {
22
+ locator: "https://github.com/brave/brave-search-skills.git";
23
+ immutableRef: "3e088af66eb61f1c207c22b2be0278ca8744d1d1";
24
+ };
25
+ projectPlan: {
26
+ shell: string;
27
+ workingDirectory: string;
28
+ checkoutDirectory: string;
29
+ precondition: string;
30
+ automaticAtRuntime: boolean;
31
+ commands: string[];
32
+ verification: {
33
+ repository: "brave/brave-search-skills";
34
+ immutableRef: "3e088af66eb61f1c207c22b2be0278ca8744d1d1";
35
+ expectedTrees: {
36
+ skillName: string;
37
+ sha256: string;
38
+ }[];
39
+ };
40
+ };
41
+ globalPlan: {
42
+ shell: string;
43
+ workingDirectory: string;
44
+ checkoutDirectory: string;
45
+ precondition: string;
46
+ automaticAtRuntime: boolean;
47
+ commands: string[];
48
+ verification: {
49
+ repository: "brave/brave-search-skills";
50
+ immutableRef: "3e088af66eb61f1c207c22b2be0278ca8744d1d1";
51
+ expectedTrees: {
52
+ skillName: string;
53
+ sha256: string;
54
+ }[];
55
+ };
56
+ };
57
+ allRecommendedProjectPlan: {
58
+ shell: string;
59
+ workingDirectory: string;
60
+ checkoutDirectory: string;
61
+ precondition: string;
62
+ automaticAtRuntime: boolean;
63
+ commands: string[];
64
+ verification: {
65
+ repository: "brave/brave-search-skills";
66
+ immutableRef: "3e088af66eb61f1c207c22b2be0278ca8744d1d1";
67
+ expectedTrees: {
68
+ skillName: string;
69
+ sha256: string;
70
+ }[];
71
+ };
72
+ };
73
+ allRecommendedGlobalPlan: {
74
+ shell: string;
75
+ workingDirectory: string;
76
+ checkoutDirectory: string;
77
+ precondition: string;
78
+ automaticAtRuntime: boolean;
79
+ commands: string[];
80
+ verification: {
81
+ repository: "brave/brave-search-skills";
82
+ immutableRef: "3e088af66eb61f1c207c22b2be0278ca8744d1d1";
83
+ expectedTrees: {
84
+ skillName: string;
85
+ sha256: string;
86
+ }[];
87
+ };
88
+ };
89
+ };
90
+ profiles: {
91
+ id: string;
92
+ description: string;
93
+ skillIds: string[];
94
+ }[];
95
+ conditionalSkillIds: string[];
96
+ enhancedSkillIds: string[];
97
+ entries: {
98
+ id: string;
99
+ capabilityId: string;
100
+ skillName: string;
101
+ tier: "required" | "enhanced" | "conditional";
102
+ purpose: string;
103
+ source: {
104
+ repository: "brave/brave-search-skills";
105
+ locator: "https://github.com/brave/brave-search-skills.git";
106
+ immutableRef: "3e088af66eb61f1c207c22b2be0278ca8744d1d1";
107
+ license: "MIT";
108
+ expectedTreeSha256: string;
109
+ };
110
+ install: {
111
+ projectPlan: {
112
+ shell: string;
113
+ workingDirectory: string;
114
+ checkoutDirectory: string;
115
+ precondition: string;
116
+ automaticAtRuntime: boolean;
117
+ commands: string[];
118
+ verification: {
119
+ repository: "brave/brave-search-skills";
120
+ immutableRef: "3e088af66eb61f1c207c22b2be0278ca8744d1d1";
121
+ expectedTrees: {
122
+ skillName: string;
123
+ sha256: string;
124
+ }[];
125
+ };
126
+ };
127
+ globalPlan: {
128
+ shell: string;
129
+ workingDirectory: string;
130
+ checkoutDirectory: string;
131
+ precondition: string;
132
+ automaticAtRuntime: boolean;
133
+ commands: string[];
134
+ verification: {
135
+ repository: "brave/brave-search-skills";
136
+ immutableRef: "3e088af66eb61f1c207c22b2be0278ca8744d1d1";
137
+ expectedTrees: {
138
+ skillName: string;
139
+ sha256: string;
140
+ }[];
141
+ };
142
+ };
143
+ automaticAtRuntime: boolean;
144
+ };
145
+ configuration: {
146
+ allowedHosts: string[];
147
+ credentialIds: string[];
148
+ discoveryScopes: string[];
149
+ requiredForDiscovery: boolean;
150
+ providerPlan: string;
151
+ };
152
+ installation: {
153
+ status: "missing" | "installed" | "drifted" | "ambiguous";
154
+ paths: string[];
155
+ observedTreeSha256: string[];
156
+ errors: string[];
157
+ };
158
+ status: {
159
+ configured: boolean;
160
+ locked: boolean;
161
+ credential: string;
162
+ };
163
+ }[];
164
+ evaluatedAlternatives: {
165
+ skillName: string;
166
+ recommended: false;
167
+ disposition: "custom-admission" | "not-evidence-source" | "unsupported-execution";
168
+ reason: string;
169
+ source: {
170
+ repository: "brave/brave-search-skills";
171
+ locator: "https://github.com/brave/brave-search-skills.git";
172
+ immutableRef: "3e088af66eb61f1c207c22b2be0278ca8744d1d1";
173
+ license: "MIT";
174
+ expectedTreeSha256: string;
175
+ };
176
+ install: {
177
+ projectPlan: {
178
+ shell: string;
179
+ workingDirectory: string;
180
+ checkoutDirectory: string;
181
+ precondition: string;
182
+ automaticAtRuntime: boolean;
183
+ commands: string[];
184
+ verification: {
185
+ repository: "brave/brave-search-skills";
186
+ immutableRef: "3e088af66eb61f1c207c22b2be0278ca8744d1d1";
187
+ expectedTrees: {
188
+ skillName: string;
189
+ sha256: string;
190
+ }[];
191
+ };
192
+ };
193
+ globalPlan: {
194
+ shell: string;
195
+ workingDirectory: string;
196
+ checkoutDirectory: string;
197
+ precondition: string;
198
+ automaticAtRuntime: boolean;
199
+ commands: string[];
200
+ verification: {
201
+ repository: "brave/brave-search-skills";
202
+ immutableRef: "3e088af66eb61f1c207c22b2be0278ca8744d1d1";
203
+ expectedTrees: {
204
+ skillName: string;
205
+ sha256: string;
206
+ }[];
207
+ };
208
+ };
209
+ automaticAtRuntime: boolean;
210
+ };
211
+ installation: {
212
+ status: "missing" | "installed" | "drifted" | "ambiguous";
213
+ paths: string[];
214
+ observedTreeSha256: string[];
215
+ errors: string[];
216
+ };
217
+ configuration: {
218
+ status: "requires-explicit-import";
219
+ command: string;
220
+ } | {
221
+ status: "not-supported";
222
+ command: null;
223
+ };
224
+ }[];
225
+ credentials: {
226
+ id: string;
227
+ provider: string;
228
+ requiredBy: string[];
229
+ obtainAt: string;
230
+ workspaceEnvironmentKey: string;
231
+ exampleAssignment: string;
232
+ configureCommand: string;
233
+ minimumUtf8Bytes: number;
234
+ outputPolicy: string;
235
+ }[];
236
+ customExternalCapabilities: {
237
+ supported: boolean;
238
+ purpose: string;
239
+ supportedKinds: {
240
+ kind: string;
241
+ execution: string;
242
+ permissions: string[];
243
+ }[];
244
+ runtimeInstall: boolean;
245
+ sourceRequirements: string[];
246
+ networkRequirements: string[];
247
+ commands: string[];
248
+ brokeredEvidenceDefinitionTemplate: {
249
+ id: string;
250
+ skillPath: string;
251
+ source: {
252
+ type: string;
253
+ locator: string;
254
+ immutableRef: string;
255
+ expectedTreeSha256: string;
256
+ license: string;
257
+ catalogId: null;
258
+ };
259
+ requiredForDiscovery: boolean;
260
+ permissions: string[];
261
+ allowedHosts: string[];
262
+ http: {
263
+ accept: string;
264
+ allowedContentTypes: string[];
265
+ maxResponseBytes: number;
266
+ maxItems: number;
267
+ };
268
+ coverage: {
269
+ dimensions: string[];
270
+ sourceTypes: string[];
271
+ discoveryScopes: string[];
272
+ fullText: boolean;
273
+ publicationDates: boolean;
274
+ };
275
+ credentials: {
276
+ id: string;
277
+ allowedHosts: string[];
278
+ headerName: string;
279
+ prefix: string;
280
+ }[];
281
+ healthCheck: {
282
+ url: string;
283
+ credentialId: string;
284
+ expectedContentTypes: string[];
285
+ };
286
+ };
287
+ };
288
+ workspaceCapabilities: {
289
+ id: string;
290
+ skillName: string;
291
+ catalogId: string | null;
292
+ externalSource: boolean;
293
+ source: {
294
+ type: "git" | "registry" | "local";
295
+ locatorSha256: string;
296
+ immutableRef: string;
297
+ expectedTreeSha256: string;
298
+ license: string;
299
+ } | null;
300
+ requiredForDiscovery: boolean;
301
+ discoveryScopes: string[];
302
+ allowedHosts: string[];
303
+ credentialIds: string[];
304
+ status: {
305
+ locked: boolean;
306
+ credential: string;
307
+ errors: string[];
308
+ };
309
+ }[];
310
+ summary: {
311
+ recommended: number;
312
+ evaluated: number;
313
+ notSelected: number;
314
+ required: number;
315
+ enhanced: number;
316
+ conditional: number;
317
+ installed: number;
318
+ configured: number;
319
+ credentialsReady: number;
320
+ workspaceCapabilities: number;
321
+ };
322
+ workspace: string | null;
323
+ skillRoots: string[];
324
+ capabilityVerification: {
325
+ status: "verified" | "drifted";
326
+ checked: number;
327
+ errors: string[];
328
+ } | null;
329
+ credentialEnvironment: {
330
+ status: "ready" | "blocked";
331
+ detail: string;
332
+ missingIds: string[];
333
+ } | null;
334
+ }>;
335
+ export declare function configureExternalSkillProfile(input: {
336
+ workspace: string;
337
+ profile: string;
338
+ skillRoot?: string | null;
339
+ }): Promise<{
340
+ schemaVersion: 1;
341
+ workspace: string;
342
+ profile: string;
343
+ configured: {
344
+ id: string;
345
+ skillName: string;
346
+ treeSha256: string | undefined;
347
+ credentialIds: string[];
348
+ requiredForDiscovery: boolean;
349
+ }[];
350
+ lockStatus: "written";
351
+ next: string[];
352
+ }>;
353
+ export declare function configureTiangongSciCapability(input: {
354
+ workspace: string;
355
+ skillPath: string;
356
+ source: CapabilitySourceDeclaration;
357
+ endpoint: string;
358
+ region?: string | null;
359
+ }): Promise<{
360
+ schemaVersion: 1;
361
+ workspace: string;
362
+ configured: {
363
+ id: string;
364
+ skillName: string;
365
+ treeSha256: string;
366
+ credentialIds: string[];
367
+ requiredForDiscovery: boolean;
368
+ discoveryScopes: string[];
369
+ };
370
+ lockStatus: "written";
371
+ }>;
372
+ export declare function importExternalCapability(input: {
373
+ workspace: string;
374
+ definitionPath: string;
375
+ }): Promise<{
376
+ schemaVersion: 1;
377
+ workspace: string;
378
+ imported: {
379
+ id: string;
380
+ skillName: string;
381
+ sourceType: "git" | "registry" | "local";
382
+ sourceLocatorSha256: string;
383
+ immutableRef: string;
384
+ expectedTreeSha256: string;
385
+ license: string;
386
+ requiredForDiscovery: boolean;
387
+ discoveryScopes: string[];
388
+ };
389
+ lockStatus: "written";
390
+ }>;
391
+ export declare function doctorExternalCapabilities(workspace: string, options?: {
392
+ live?: boolean;
393
+ fetcher?: typeof fetch;
394
+ sleeper?: (milliseconds: number) => Promise<unknown>;
395
+ }): Promise<{
396
+ schemaVersion: 1;
397
+ workspace: string;
398
+ mode: "live" | "static";
399
+ status: "ready" | "blocked";
400
+ capabilityVerification: {
401
+ status: "verified" | "drifted";
402
+ checked: number;
403
+ errors: string[];
404
+ };
405
+ credentialEnvironment: {
406
+ status: "ready" | "blocked";
407
+ detail: string;
408
+ missingIds: string[];
409
+ };
410
+ capabilities: {
411
+ id: string;
412
+ skillName: string;
413
+ catalogId: string | null;
414
+ sourceType: "git" | "registry" | "local" | null;
415
+ externalSource: boolean;
416
+ installed: boolean;
417
+ locked: boolean;
418
+ requiredForDiscovery: boolean;
419
+ discoveryScopes: string[];
420
+ credentialIds: string[];
421
+ missingCredentialIds: string[];
422
+ staticStatus: string;
423
+ staticErrors: string[];
424
+ health: {
425
+ status: "fail";
426
+ code: string;
427
+ host: string;
428
+ targetSha256: string;
429
+ httpStatus: number;
430
+ retryAfterSeconds: number | null;
431
+ detail: string;
432
+ } | {
433
+ status: "pass";
434
+ code: string;
435
+ host: string;
436
+ targetSha256: string;
437
+ httpStatus: number;
438
+ retryAfterSeconds: number | null;
439
+ detail: string;
440
+ } | {
441
+ status: "fail";
442
+ code: string;
443
+ host: string;
444
+ targetSha256: string;
445
+ httpStatus: null;
446
+ retryAfterSeconds: null;
447
+ detail: string;
448
+ } | {
449
+ status: "blocked";
450
+ code: string;
451
+ host: string | null;
452
+ targetSha256: string | null;
453
+ httpStatus: null;
454
+ retryAfterSeconds: null;
455
+ detail: string;
456
+ } | {
457
+ status: "not-applicable";
458
+ code: string;
459
+ host: null;
460
+ targetSha256: null;
461
+ httpStatus: null;
462
+ retryAfterSeconds: null;
463
+ detail: string;
464
+ } | {
465
+ status: "not-run";
466
+ code: string;
467
+ host: string | null;
468
+ targetSha256: string | null;
469
+ httpStatus: null;
470
+ retryAfterSeconds: null;
471
+ detail: string;
472
+ };
473
+ }[];
474
+ failures: string[];
475
+ }>;
476
+ export declare function hasPublicInternetCapability(declarations: CapabilityDeclarations): boolean;
477
+ export declare function requiredDiscoveryCapabilityIds(declarations: CapabilityDeclarations): string[];