@punica/editor 1.6.13 → 1.6.15
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/index.bundle.esm.js +2 -2
- package/dist/index.bundle.esm.js.map +1 -1
- package/dist/index.bundle.umd.js +1 -1
- package/dist/index.bundle.umd.js.map +1 -1
- package/package.json +1 -1
- package/types/punica.module.kernel.events.d.ts +23 -1
- package/types/punica.module.runtime.fs.d.ts +16 -0
- package/types/punica.module.runtime.search.d.ts +16 -2
package/package.json
CHANGED
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
declare module 'punica' {
|
|
2
2
|
export namespace kernel {
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* High-level kind of an event.
|
|
5
|
+
*
|
|
6
|
+
* `'audit'` is not just a label: it is the publisher's declaration that
|
|
7
|
+
* this event is a durable record, and the substrate **persists it** (see
|
|
8
|
+
* `docs/events.md` § Durability). Every other kind is persisted only if
|
|
9
|
+
* the event *name* matches one of the substrate's critical-event patterns,
|
|
10
|
+
* which is a fine default for lifecycle and failure events but cannot be
|
|
11
|
+
* relied on by a caller — an extension recording "a human promoted model
|
|
12
|
+
* version 3 to production" has no name it could choose to make that record
|
|
13
|
+
* survive a restart. Declaring `kind: 'audit'` is that mechanism.
|
|
14
|
+
*
|
|
15
|
+
* Use it for records that must outlive the session and would be a problem
|
|
16
|
+
* to lose: governed actions, approvals, promotions, irreversible writes.
|
|
17
|
+
* Do not use it for progress or telemetry — the audit ring is retained and
|
|
18
|
+
* queried, so volume there costs something real.
|
|
19
|
+
*/
|
|
20
|
+
export type KernelEventKind =
|
|
21
|
+
| 'result'
|
|
22
|
+
| 'progress'
|
|
23
|
+
| 'error'
|
|
24
|
+
| 'info'
|
|
25
|
+
| 'audit';
|
|
4
26
|
|
|
5
27
|
/**
|
|
6
28
|
* Standard event envelope for correlation, auditing and tracing.
|
|
@@ -192,6 +192,22 @@ declare module 'punica' {
|
|
|
192
192
|
*/
|
|
193
193
|
cwd?: string;
|
|
194
194
|
|
|
195
|
+
/**
|
|
196
|
+
* Is a concrete provider installed behind this facade?
|
|
197
|
+
*
|
|
198
|
+
* **Substrate-provided — hosts must NOT implement this.** It exists only
|
|
199
|
+
* on the wrapper the substrate hands out as `punica.runtime.fs`, which is
|
|
200
|
+
* why it is optional: reading it off a raw provider object yields
|
|
201
|
+
* `undefined`, and a caller should treat that as "cannot tell, fall back".
|
|
202
|
+
*
|
|
203
|
+
* Answers without any filesystem access. Before it existed, the only way
|
|
204
|
+
* to detect a missing provider was to call a real method and match its
|
|
205
|
+
* error message — which cost a full recursive workspace walk for a
|
|
206
|
+
* boolean, and could not distinguish "no provider" from a provider that
|
|
207
|
+
* failed transiently.
|
|
208
|
+
*/
|
|
209
|
+
hasProvider?(): boolean;
|
|
210
|
+
|
|
195
211
|
/**
|
|
196
212
|
* Returns the full file tree for the current workspace root.
|
|
197
213
|
*/
|
|
@@ -48,12 +48,26 @@ declare module 'punica' {
|
|
|
48
48
|
query(options: SearchQueryOptions): Promise<SearchResponse>;
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
* (Optional) Trigger
|
|
51
|
+
* (Optional) Trigger an index operation.
|
|
52
52
|
* Implementations may ignore this if indexing is managed externally.
|
|
53
|
+
*
|
|
54
|
+
* Incremental by default — a host is expected to re-read only what
|
|
55
|
+
* changed since the last pass. `rebuild` asks for a from-scratch index,
|
|
56
|
+
* which a caller should only need after changing what gets indexed.
|
|
57
|
+
*
|
|
58
|
+
* `skipped` and `rebuilt` are optional so an older host stays conformant;
|
|
59
|
+
* a host that reports them makes "the index quietly grew to a gigabyte
|
|
60
|
+
* over a virtualenv" observable instead of invisible.
|
|
53
61
|
*/
|
|
54
62
|
startIndex?(options?: {
|
|
55
63
|
verbose?: boolean;
|
|
56
|
-
|
|
64
|
+
rebuild?: boolean;
|
|
65
|
+
}): Promise<void | {
|
|
66
|
+
addedOrUpdated: number;
|
|
67
|
+
removed: number;
|
|
68
|
+
skipped?: number;
|
|
69
|
+
rebuilt?: boolean;
|
|
70
|
+
}>;
|
|
57
71
|
}
|
|
58
72
|
}
|
|
59
73
|
}
|