@punica/editor 1.48.1 → 1.49.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/package.json
CHANGED
|
@@ -257,6 +257,18 @@ declare module 'punica' {
|
|
|
257
257
|
originExtension?: string;
|
|
258
258
|
productId?: string;
|
|
259
259
|
outputSchemaSummary?: string;
|
|
260
|
+
/**
|
|
261
|
+
* Present and `true` only when the workspace has overridden this
|
|
262
|
+
* class. Absent on an ordinary one, so a stock list carries no
|
|
263
|
+
* extra field.
|
|
264
|
+
*/
|
|
265
|
+
overridden?: true;
|
|
266
|
+
/**
|
|
267
|
+
* The extension whose shipped class this override replaces —
|
|
268
|
+
* absent when the override stands alone (its extension was
|
|
269
|
+
* uninstalled, or nothing ever shipped the id).
|
|
270
|
+
*/
|
|
271
|
+
overridesExtension?: string;
|
|
260
272
|
}
|
|
261
273
|
|
|
262
274
|
/**
|
|
@@ -274,6 +286,39 @@ declare module 'punica' {
|
|
|
274
286
|
originExtension?: string
|
|
275
287
|
): void;
|
|
276
288
|
|
|
289
|
+
/**
|
|
290
|
+
* Register a workspace override for an id.
|
|
291
|
+
*
|
|
292
|
+
* The registry holds two layers per id: the **base**, registered by
|
|
293
|
+
* the extension that ships the class, and this **override**,
|
|
294
|
+
* registered by whoever owns the workspace. Every read — `get`,
|
|
295
|
+
* `list`, `getCapability` — answers the override when there is one,
|
|
296
|
+
* so an override reaches `llm.invoke` and the tool catalogue alike.
|
|
297
|
+
*
|
|
298
|
+
* The base is neither mutated nor deleted, which is what makes
|
|
299
|
+
* `removeOverride` a restore rather than a reinstall. Unlike
|
|
300
|
+
* `register`, this never throws on an existing entry: saving over
|
|
301
|
+
* an override is the ordinary case.
|
|
302
|
+
*
|
|
303
|
+
* Contract: `docs/instruction-class-overrides.md`.
|
|
304
|
+
*/
|
|
305
|
+
registerOverride(
|
|
306
|
+
instructionClass: InstructionClass,
|
|
307
|
+
originExtension?: string
|
|
308
|
+
): void;
|
|
309
|
+
|
|
310
|
+
/** Drop the override for `id`; the shipped class answers again. */
|
|
311
|
+
removeOverride(id: string): void;
|
|
312
|
+
|
|
313
|
+
/** True when the workspace has replaced this class. */
|
|
314
|
+
isOverridden(id: string): boolean;
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* The class as its extension ships it, ignoring any override — what
|
|
318
|
+
* a "compare with the shipped version" surface reads.
|
|
319
|
+
*/
|
|
320
|
+
getBase(id: string): InstructionClass | undefined;
|
|
321
|
+
|
|
277
322
|
/**
|
|
278
323
|
* Inject a product → originExtension resolver.
|
|
279
324
|
*
|
|
@@ -291,6 +336,11 @@ declare module 'punica' {
|
|
|
291
336
|
|
|
292
337
|
/**
|
|
293
338
|
* Unregister an instruction class by ID.
|
|
339
|
+
*
|
|
340
|
+
* An override is removed in preference to the base, so one call
|
|
341
|
+
* undoes a workspace edit and leaves the shipped class registered.
|
|
342
|
+
* With no override, the base itself goes.
|
|
343
|
+
*
|
|
294
344
|
* @param id Instruction class ID to unregister
|
|
295
345
|
*/
|
|
296
346
|
unregister(id: string): void;
|