apcore-js 0.20.0 → 0.21.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/dist/executor.d.ts.map +1 -1
- package/dist/executor.js +39 -1
- package/dist/executor.js.map +1 -1
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/module.d.ts +94 -2
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +99 -2
- package/dist/module.js.map +1 -1
- package/dist/registry/multi-class.d.ts +14 -0
- package/dist/registry/multi-class.d.ts.map +1 -1
- package/dist/registry/multi-class.js.map +1 -1
- package/dist/registry/registry.d.ts +157 -4
- package/dist/registry/registry.d.ts.map +1 -1
- package/dist/registry/registry.js +316 -17
- package/dist/registry/registry.js.map +1 -1
- package/dist/schema/annotations.d.ts.map +1 -1
- package/dist/schema/annotations.js +1 -0
- package/dist/schema/annotations.js.map +1 -1
- package/dist/sys-modules/registration.d.ts.map +1 -1
- package/dist/sys-modules/registration.js +19 -0
- package/dist/sys-modules/registration.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi-class.js","sourceRoot":"","sources":["../../src/registry/multi-class.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE1F,MAAM,UAAU,GAAG,mBAAmB,CAAC;AACvC,MAAM,eAAe,GAAG,uCAAuC,CAAC;AAChE,MAAM,iBAAiB,GAAG,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"multi-class.js","sourceRoot":"","sources":["../../src/registry/multi-class.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAA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CAAC,EAAE,OAAO,CAAC,CAAC;QAC7F,CAAC;QACD,YAAY,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;QAEpC,MAAM,QAAQ,GAAG,GAAG,MAAM,IAAI,OAAO,EAAE,CAAC;QAExC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;YACpC,MAAM,IAAI,mBAAmB,CAAC,QAAQ,EAAE,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC7D,CAAC;QAED,IAAI,QAAQ,CAAC,MAAM,GAAG,iBAAiB,EAAE,CAAC;YACxC,MAAM,IAAI,cAAc,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC/C,CAAC;QAED,OAAO,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;IAClD,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,kBAAkB,CAAC"}
|
|
@@ -2,7 +2,17 @@
|
|
|
2
2
|
* Central module registry for discovering, registering, and querying modules.
|
|
3
3
|
*/
|
|
4
4
|
import type { Config } from '../config.js';
|
|
5
|
+
import type { Context } from '../context.js';
|
|
6
|
+
import type { EventEmitter } from '../events/emitter.js';
|
|
5
7
|
import type { ModuleDescriptor } from './types.js';
|
|
8
|
+
/**
|
|
9
|
+
* Reset the one-shot deprecation flag for the legacy 4-arg
|
|
10
|
+
* `Registry.discoverMultiClass` overload. Test-only — production callers
|
|
11
|
+
* never need this.
|
|
12
|
+
*
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export declare function _resetMultiClassEnabledDeprecationWarned(): void;
|
|
6
16
|
/**
|
|
7
17
|
* Standard registry event names.
|
|
8
18
|
*/
|
|
@@ -28,6 +38,23 @@ export declare const MAX_MODULE_ID_LENGTH = 192;
|
|
|
28
38
|
* Reserved words that cannot appear as the first segment of a module ID.
|
|
29
39
|
*/
|
|
30
40
|
export declare const RESERVED_WORDS: Set<string>;
|
|
41
|
+
/**
|
|
42
|
+
* Namespace prefix reserved for programmatically-registered modules
|
|
43
|
+
* synthesized at runtime (PROTOCOL_SPEC §2.5; RFC
|
|
44
|
+
* `apcore/docs/spec/rfc-ephemeral-modules.md`). IDs in this namespace MUST
|
|
45
|
+
* be registered through {@link Registry.register} only — the filesystem
|
|
46
|
+
* discoverer rejects matching IDs because the namespace has no
|
|
47
|
+
* directory-rooted source of truth, and {@link Registry.registerInternal}
|
|
48
|
+
* rejects them too so the audit-trail provenance distinction between
|
|
49
|
+
* framework-emitted (`system.*`) and caller-emitted (`ephemeral.*`)
|
|
50
|
+
* modules stays clean.
|
|
51
|
+
*
|
|
52
|
+
* The trailing dot is required so module IDs whose first segment merely
|
|
53
|
+
* *starts with* `ephemeral` (e.g. `ephemerals`) are not falsely classified.
|
|
54
|
+
*/
|
|
55
|
+
export declare const EPHEMERAL_NAMESPACE_PREFIX = "ephemeral.";
|
|
56
|
+
/** Return true when `moduleId` belongs to the reserved `ephemeral.*` namespace. */
|
|
57
|
+
export declare function isEphemeralModuleId(moduleId: string): boolean;
|
|
31
58
|
/**
|
|
32
59
|
* Interface for custom module discovery.
|
|
33
60
|
*/
|
|
@@ -65,6 +92,16 @@ export declare class Registry {
|
|
|
65
92
|
private _refCounts;
|
|
66
93
|
private _draining;
|
|
67
94
|
private _drainResolvers;
|
|
95
|
+
/**
|
|
96
|
+
* Optional EventEmitter for the ephemeral.* registry-side audit emits
|
|
97
|
+
* (RFC `apcore/docs/spec/rfc-ephemeral-modules.md` "Audit-event single-emit
|
|
98
|
+
* rule"). Set via {@link setEventEmitter}; when null, ephemeral audit
|
|
99
|
+
* events are warn-logged so they never silently disappear.
|
|
100
|
+
*
|
|
101
|
+
* Mirrors apcore-python `Registry._event_emitter` /
|
|
102
|
+
* `Registry.set_event_emitter`.
|
|
103
|
+
*/
|
|
104
|
+
private _eventEmitter;
|
|
68
105
|
constructor(options?: {
|
|
69
106
|
config?: Config | null;
|
|
70
107
|
extensionsDir?: string | null;
|
|
@@ -93,6 +130,21 @@ export declare class Registry {
|
|
|
93
130
|
*/
|
|
94
131
|
private _discoverDefault;
|
|
95
132
|
private _scanRoots;
|
|
133
|
+
/**
|
|
134
|
+
* Reject filesystem-derived IDs that fall in the reserved `ephemeral.*`
|
|
135
|
+
* namespace.
|
|
136
|
+
*
|
|
137
|
+
* Per the apcore ephemeral-modules RFC pilot (`apcore/docs/spec/
|
|
138
|
+
* rfc-ephemeral-modules.md`), `ephemeral.*` is reserved for
|
|
139
|
+
* programmatically-registered modules synthesized at runtime. Any
|
|
140
|
+
* filesystem layout that produces such an ID is a configuration error —
|
|
141
|
+
* either the directory is misnamed or the namespace prefix is being
|
|
142
|
+
* misused. We surface this as an `InvalidInputError` so callers cannot
|
|
143
|
+
* accidentally pollute the registry with filesystem-rooted ephemerals.
|
|
144
|
+
*
|
|
145
|
+
* Mirrors apcore-python `Registry._reject_ephemeral_discoveries`.
|
|
146
|
+
*/
|
|
147
|
+
private _rejectEphemeralDiscoveries;
|
|
96
148
|
private _applyIdMapOverrides;
|
|
97
149
|
private _loadAllMetadata;
|
|
98
150
|
private _resolveAllEntryPoints;
|
|
@@ -135,10 +187,14 @@ export declare class Registry {
|
|
|
135
187
|
* fields are merged into the module's metadata so callers can read them
|
|
136
188
|
* back via `getDefinition()` and `list({tags})`. See PROTOCOL_SPEC §5.4.
|
|
137
189
|
*/
|
|
138
|
-
register(moduleId: string, module: unknown, version?: string | null, metadata?: Record<string, unknown> | null
|
|
190
|
+
register(moduleId: string, module: unknown, version?: string | null, metadata?: Record<string, unknown> | null, options?: {
|
|
191
|
+
context?: Context | null;
|
|
192
|
+
}): void;
|
|
139
193
|
/** Inner registration — no validator, no ID validation. Used by discover() paths that run their own checks. */
|
|
140
194
|
private _registerImpl;
|
|
141
|
-
unregister(moduleId: string
|
|
195
|
+
unregister(moduleId: string, options?: {
|
|
196
|
+
context?: Context | null;
|
|
197
|
+
}): boolean;
|
|
142
198
|
/**
|
|
143
199
|
* Look up a registered module by ID.
|
|
144
200
|
*
|
|
@@ -153,13 +209,51 @@ export declare class Registry {
|
|
|
153
209
|
*/
|
|
154
210
|
get(moduleId: string, _versionHint?: string | null): unknown | null;
|
|
155
211
|
has(moduleId: string): boolean;
|
|
212
|
+
/**
|
|
213
|
+
* Return sorted list of registered module IDs, optionally filtered by
|
|
214
|
+
* `prefix` / `tags`.
|
|
215
|
+
*
|
|
216
|
+
* Modules whose `ModuleAnnotations.discoverable === false` are excluded
|
|
217
|
+
* by default per PROTOCOL_SPEC §4.4 (RFC
|
|
218
|
+
* `apcore/docs/spec/rfc-ephemeral-modules.md`). Pass
|
|
219
|
+
* `includeHidden: true` to enumerate every registered module — useful
|
|
220
|
+
* for introspection tools, debug consoles, and tests.
|
|
221
|
+
*/
|
|
156
222
|
list(options?: {
|
|
157
223
|
tags?: string[];
|
|
158
224
|
prefix?: string;
|
|
225
|
+
includeHidden?: boolean;
|
|
159
226
|
}): string[];
|
|
160
|
-
|
|
227
|
+
/**
|
|
228
|
+
* Iterate `[moduleId, module]` pairs. Hides modules annotated
|
|
229
|
+
* `discoverable: false` by default; pass `includeHidden: true` to walk
|
|
230
|
+
* every registered module.
|
|
231
|
+
*/
|
|
232
|
+
iter(options?: {
|
|
233
|
+
includeHidden?: boolean;
|
|
234
|
+
}): IterableIterator<[string, unknown]>;
|
|
235
|
+
/** Total number of registered modules (includes `discoverable: false`). */
|
|
161
236
|
get count(): number;
|
|
237
|
+
/**
|
|
238
|
+
* Sorted list of registered module IDs (excludes
|
|
239
|
+
* `ModuleAnnotations.discoverable === false` modules). Use
|
|
240
|
+
* {@link list} with `includeHidden: true` when the full set is required.
|
|
241
|
+
*/
|
|
162
242
|
get moduleIds(): string[];
|
|
243
|
+
/**
|
|
244
|
+
* Return false when the module's annotations declare
|
|
245
|
+
* `discoverable: false`. Anything else (including missing annotations)
|
|
246
|
+
* keeps the module visible — the default `true` preserves backward
|
|
247
|
+
* compatibility.
|
|
248
|
+
*
|
|
249
|
+
* Resolution order matches `mergeModuleMetadata`:
|
|
250
|
+
* 1. The merged `annotations` slot in `_moduleMeta` (which already
|
|
251
|
+
* accounts for YAML > code precedence).
|
|
252
|
+
* 2. The module instance's `annotations` attribute (covers paths that
|
|
253
|
+
* bypassed the merge, e.g. `registerInternal`).
|
|
254
|
+
*/
|
|
255
|
+
private _isDiscoverable;
|
|
256
|
+
private _readDiscoverable;
|
|
163
257
|
getDefinition(moduleId: string, _versionHint?: string | null): ModuleDescriptor | null;
|
|
164
258
|
describe(moduleId: string): string;
|
|
165
259
|
on(event: string, callback: EventCallback): void;
|
|
@@ -223,8 +317,27 @@ export declare class Registry {
|
|
|
223
317
|
* and the Rust trait method. Internally delegates to the free function
|
|
224
318
|
* {@link discoverMultiClass} (re-exported as `_discoverMultiClass` for
|
|
225
319
|
* scanner internals), so behaviour is identical.
|
|
320
|
+
*
|
|
321
|
+
* **apcore decision-log D-06**: the per-class `ClassDescriptor.multiClass`
|
|
322
|
+
* flag is the sole opt-in mechanism for multi-class discovery. When any
|
|
323
|
+
* qualifying class sets `multiClass: true`, the discovery routine derives
|
|
324
|
+
* a distinct module ID per class; otherwise whole-file mode is used.
|
|
325
|
+
*
|
|
326
|
+
* @param filePath - Source file path (relative to project root).
|
|
327
|
+
* @param classes - Class descriptors; each may carry `multiClass: true`
|
|
328
|
+
* to opt into per-class module ID derivation.
|
|
329
|
+
* @param extensionsRoot - Extensions root directory (defaults to
|
|
330
|
+
* `'extensions'`).
|
|
331
|
+
*
|
|
332
|
+
* **Deprecated 4-arg overload**: passing a `multiClassEnabled` boolean as
|
|
333
|
+
* the fourth argument is retained for backward compatibility through one
|
|
334
|
+
* minor release and will be removed in v0.22.0. The argument is now
|
|
335
|
+
* functionally inert — the per-class `multiClass` field is the source of
|
|
336
|
+
* truth. A one-shot deprecation notice is emitted on first use.
|
|
226
337
|
*/
|
|
227
|
-
discoverMultiClass(filePath: string, classes: readonly import('./multi-class.js').ClassDescriptor[], extensionsRoot?: string
|
|
338
|
+
discoverMultiClass(filePath: string, classes: readonly import('./multi-class.js').ClassDescriptor[], extensionsRoot?: string): import('./multi-class.js').MultiClassEntry[];
|
|
339
|
+
/** @deprecated Pass `multiClass: true` on each `ClassDescriptor` instead. The `multiClassEnabled` argument will be removed in v0.22.0. */
|
|
340
|
+
discoverMultiClass(filePath: string, classes: readonly import('./multi-class.js').ClassDescriptor[], extensionsRoot: string, multiClassEnabled: boolean): import('./multi-class.js').MultiClassEntry[];
|
|
228
341
|
/**
|
|
229
342
|
* Number of in-flight executions per module.
|
|
230
343
|
*/
|
|
@@ -274,6 +387,46 @@ export declare class Registry {
|
|
|
274
387
|
*
|
|
275
388
|
* Returns true if drained cleanly, false if force-unloaded after timeout.
|
|
276
389
|
*/
|
|
390
|
+
/**
|
|
391
|
+
* Wire an EventEmitter for registry-side audit emits.
|
|
392
|
+
*
|
|
393
|
+
* Per the apcore RFC `apcore/docs/spec/rfc-ephemeral-modules.md`
|
|
394
|
+
* "Audit-event single-emit rule", `ephemeral.*` registrations and
|
|
395
|
+
* unregistrations emit a single `apcore.registry.module_registered` /
|
|
396
|
+
* `apcore.registry.module_unregistered` event with the D-35 contextual
|
|
397
|
+
* payload. When no emitter is wired, the event is logged at INFO so it
|
|
398
|
+
* never silently disappears — useful for the v1 pilot where most
|
|
399
|
+
* callers will not have an emitter attached.
|
|
400
|
+
*
|
|
401
|
+
* Pilot scope: only `ephemeral.*` registrations trigger registry-side
|
|
402
|
+
* emits. The pre-existing bridge in
|
|
403
|
+
* `sys-modules/registration.ts` continues to emit empty-payload events
|
|
404
|
+
* for non-ephemeral modules and short-circuits for ephemerals so the
|
|
405
|
+
* single-emit rule holds.
|
|
406
|
+
*/
|
|
407
|
+
setEventEmitter(emitter: EventEmitter | null): void;
|
|
408
|
+
/**
|
|
409
|
+
* Soft-warn when an `ephemeral.*` module is registered without
|
|
410
|
+
* `requiresApproval: true`. Per the ephemeral-modules RFC pilot,
|
|
411
|
+
* agent-synthesized modules SHOULD declare `requiresApproval` so a
|
|
412
|
+
* human gates execution. The registry only warns; it does not refuse
|
|
413
|
+
* the registration.
|
|
414
|
+
*/
|
|
415
|
+
private _warnIfMissingApproval;
|
|
416
|
+
/**
|
|
417
|
+
* Build the D-35 audit payload (`caller_id` plus optional `identity`
|
|
418
|
+
* snapshot) for an ephemeral.* register/unregister. Mirrors the shape
|
|
419
|
+
* `extractAuditIdentity` produces for `system.control.*` events so
|
|
420
|
+
* subscribers can apply identical redaction rules.
|
|
421
|
+
*/
|
|
422
|
+
private _buildEphemeralAuditPayload;
|
|
423
|
+
/**
|
|
424
|
+
* Emit the canonical ephemeral.* audit event to the wired EventEmitter
|
|
425
|
+
* (or warn-log if none is wired). The bridge in
|
|
426
|
+
* `sys-modules/registration.ts` short-circuits on ephemeral.* IDs so
|
|
427
|
+
* exactly one event lands per registration / unregistration.
|
|
428
|
+
*/
|
|
429
|
+
private _emitEphemeralAudit;
|
|
277
430
|
safeUnregister(moduleId: string, timeoutMs?: number): Promise<boolean>;
|
|
278
431
|
}
|
|
279
432
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/registry/registry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/registry/registry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAe,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAWtE,OAAO,KAAK,EAAkB,gBAAgB,EAAE,MAAM,YAAY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