skills-package-manager 0.8.0 → 0.9.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 (3) hide show
  1. package/dist/index.d.ts +28 -6
  2. package/dist/index.js +1344 -726
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -64,6 +64,7 @@ export declare enum ErrorCode {
64
64
  MANIFEST_VALIDATION_ERROR = "EMANIFESTVAL",
65
65
  NETWORK_ERROR = "ENETWORK",
66
66
  REPO_NOT_FOUND = "EREPONOTFOUND",
67
+ INSTALL_ERROR = "EINSTALL",
67
68
  UNKNOWN_ERROR = "EUNKNOWN",
68
69
  NOT_IMPLEMENTED = "ENOTIMPL",
69
70
  VALIDATION_ERROR = "EVALIDATION",
@@ -82,7 +83,7 @@ export declare function fetchSkillsFromLock(rootDir: string, manifest: SkillsMan
82
83
  } | {
83
84
  readonly status: "fetched";
84
85
  readonly fetched: string[];
85
- readonly reason?: undefined;
86
+ reason?: undefined;
86
87
  }>;
87
88
 
88
89
  /**
@@ -144,13 +145,19 @@ declare type InitPromptResult = {
144
145
  };
145
146
 
146
147
  export declare function installCommand(options: InstallCommandOptions): Promise<{
147
- readonly status: "installed";
148
- readonly installed: string[];
148
+ status: "skipped";
149
+ reason: string;
150
+ installed?: undefined;
151
+ } | {
152
+ status: "installed";
153
+ installed: string[];
154
+ reason?: undefined;
149
155
  }>;
150
156
 
151
157
  export declare type InstallCommandOptions = {
152
158
  cwd: string;
153
159
  frozenLockfile?: boolean;
160
+ onProgress?: InstallProgressListener;
154
161
  };
155
162
 
156
163
  declare type InstallPhase = 'resolving' | 'fetching' | 'linking' | 'finalizing' | 'done';
@@ -158,6 +165,12 @@ declare type InstallPhase = 'resolving' | 'fetching' | 'linking' | 'finalizing'
158
165
  export declare type InstallProgressEvent = {
159
166
  type: 'resolved';
160
167
  skillName: string;
168
+ } | {
169
+ type: 'reused';
170
+ skillName: string;
171
+ } | {
172
+ type: 'downloaded';
173
+ skillName: string;
161
174
  } | {
162
175
  type: 'added';
163
176
  skillName: string;
@@ -182,18 +195,20 @@ export declare function installSkills(rootDir: string, options?: {
182
195
  }): Promise<{
183
196
  readonly status: "skipped";
184
197
  readonly reason: "manifest-missing";
185
- readonly installed?: undefined;
198
+ installed?: undefined;
186
199
  } | {
187
200
  readonly status: "installed";
188
201
  readonly installed: string[];
189
- readonly reason?: undefined;
202
+ reason?: undefined;
190
203
  }>;
191
204
 
192
205
  export declare const installStageHooks: {
193
206
  beforeFetch: (_rootDir: string, _manifest: SkillsManifest, _lockfile: SkillsLock) => Promise<void>;
194
207
  };
195
208
 
196
- export declare function isLockInSync(rootDir: string, manifest: NormalizedSkillsManifest, lock: SkillsLock | null): Promise<boolean>;
209
+ export declare function isLockInSync(rootDir: string, manifest: NormalizedSkillsManifest, lock: SkillsLock | null, manifestStat?: ManifestStat | null, installState?: {
210
+ manifestStat?: ManifestStat;
211
+ } | null): Promise<boolean>;
197
212
 
198
213
  /**
199
214
  * Checks if an error is a known SPM error
@@ -226,6 +241,11 @@ export declare class ManifestError extends SpmError {
226
241
  });
227
242
  }
228
243
 
244
+ declare interface ManifestStat {
245
+ mtimeMs: number;
246
+ size: number;
247
+ }
248
+
229
249
  /**
230
250
  * Error thrown when network operations fail
231
251
  */
@@ -459,6 +479,8 @@ export declare type UpdateCommandResult = {
459
479
  }>;
460
480
  };
461
481
 
482
+ export declare function withBundledSelfSkillLock(rootDir: string, manifest: SkillsManifest, lockfile: SkillsLock): Promise<SkillsLock>;
483
+
462
484
  export declare function writeSkillsLock(rootDir: string, lockfile: SkillsLock): Promise<void>;
463
485
 
464
486
  export declare function writeSkillsManifest(rootDir: string, manifest: SkillsManifest): Promise<void>;