@avantf/dsh-plugin-base 0.3.1
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/LICENSE +21 -0
- package/README.md +303 -0
- package/dist/artifact.d.ts +29 -0
- package/dist/artifact.d.ts.map +1 -0
- package/dist/artifact.js +60 -0
- package/dist/artifact.js.map +1 -0
- package/dist/bootstrap.d.ts +54 -0
- package/dist/bootstrap.d.ts.map +1 -0
- package/dist/bootstrap.js +334 -0
- package/dist/bootstrap.js.map +1 -0
- package/dist/cli.d.ts +4 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +37 -0
- package/dist/cli.js.map +1 -0
- package/dist/compat.d.ts +413 -0
- package/dist/compat.d.ts.map +1 -0
- package/dist/compat.js +742 -0
- package/dist/compat.js.map +1 -0
- package/dist/conformance.d.ts +55 -0
- package/dist/conformance.d.ts.map +1 -0
- package/dist/conformance.js +702 -0
- package/dist/conformance.js.map +1 -0
- package/dist/errors.d.ts +26 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +28 -0
- package/dist/errors.js.map +1 -0
- package/dist/fs.d.ts +18 -0
- package/dist/fs.d.ts.map +1 -0
- package/dist/fs.js +152 -0
- package/dist/fs.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/dist/integrity.d.ts +5 -0
- package/dist/integrity.d.ts.map +1 -0
- package/dist/integrity.js +33 -0
- package/dist/integrity.js.map +1 -0
- package/dist/interface.d.ts +262 -0
- package/dist/interface.d.ts.map +1 -0
- package/dist/interface.js +136 -0
- package/dist/interface.js.map +1 -0
- package/dist/interface_gate.d.ts +61 -0
- package/dist/interface_gate.d.ts.map +1 -0
- package/dist/interface_gate.js +103 -0
- package/dist/interface_gate.js.map +1 -0
- package/dist/internal.d.ts +23 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +18 -0
- package/dist/internal.js.map +1 -0
- package/dist/kit/family.d.ts +52 -0
- package/dist/kit/family.d.ts.map +1 -0
- package/dist/kit/family.js +65 -0
- package/dist/kit/family.js.map +1 -0
- package/dist/kit/index.d.ts +26 -0
- package/dist/kit/index.d.ts.map +1 -0
- package/dist/kit/index.js +26 -0
- package/dist/kit/index.js.map +1 -0
- package/dist/kit/logger.d.ts +41 -0
- package/dist/kit/logger.d.ts.map +1 -0
- package/dist/kit/logger.js +42 -0
- package/dist/kit/logger.js.map +1 -0
- package/dist/kit/prompt_files.d.ts +90 -0
- package/dist/kit/prompt_files.d.ts.map +1 -0
- package/dist/kit/prompt_files.js +121 -0
- package/dist/kit/prompt_files.js.map +1 -0
- package/dist/kit/typert.d.ts +40 -0
- package/dist/kit/typert.d.ts.map +1 -0
- package/dist/kit/typert.js +17 -0
- package/dist/kit/typert.js.map +1 -0
- package/dist/layout.d.ts +28 -0
- package/dist/layout.d.ts.map +1 -0
- package/dist/layout.js +84 -0
- package/dist/layout.js.map +1 -0
- package/dist/lint.d.ts +33 -0
- package/dist/lint.d.ts.map +1 -0
- package/dist/lint.js +271 -0
- package/dist/lint.js.map +1 -0
- package/dist/lock.d.ts +12 -0
- package/dist/lock.d.ts.map +1 -0
- package/dist/lock.js +93 -0
- package/dist/lock.js.map +1 -0
- package/dist/manifest.d.ts +12 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +75 -0
- package/dist/manifest.js.map +1 -0
- package/dist/net.d.ts +23 -0
- package/dist/net.d.ts.map +1 -0
- package/dist/net.js +112 -0
- package/dist/net.js.map +1 -0
- package/dist/package-name.d.ts +3 -0
- package/dist/package-name.d.ts.map +1 -0
- package/dist/package-name.js +13 -0
- package/dist/package-name.js.map +1 -0
- package/dist/preset.d.ts +46 -0
- package/dist/preset.d.ts.map +1 -0
- package/dist/preset.js +230 -0
- package/dist/preset.js.map +1 -0
- package/dist/providers/archive.d.ts +32 -0
- package/dist/providers/archive.d.ts.map +1 -0
- package/dist/providers/archive.js +248 -0
- package/dist/providers/archive.js.map +1 -0
- package/dist/providers/model.d.ts +25 -0
- package/dist/providers/model.d.ts.map +1 -0
- package/dist/providers/model.js +550 -0
- package/dist/providers/model.js.map +1 -0
- package/dist/providers/npm.d.ts +21 -0
- package/dist/providers/npm.d.ts.map +1 -0
- package/dist/providers/npm.js +458 -0
- package/dist/providers/npm.js.map +1 -0
- package/dist/provisioner.d.ts +21 -0
- package/dist/provisioner.d.ts.map +1 -0
- package/dist/provisioner.js +962 -0
- package/dist/provisioner.js.map +1 -0
- package/dist/semver.d.ts +31 -0
- package/dist/semver.d.ts.map +1 -0
- package/dist/semver.js +244 -0
- package/dist/semver.js.map +1 -0
- package/dist/state.d.ts +71 -0
- package/dist/state.d.ts.map +1 -0
- package/dist/state.js +225 -0
- package/dist/state.js.map +1 -0
- package/dist/tar.d.ts +10 -0
- package/dist/tar.d.ts.map +1 -0
- package/dist/tar.js +178 -0
- package/dist/tar.js.map +1 -0
- package/dist/types.d.ts +431 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/zip.d.ts +8 -0
- package/dist/zip.d.ts.map +1 -0
- package/dist/zip.js +109 -0
- package/dist/zip.js.map +1 -0
- package/package.json +84 -0
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The base's INTERFACE TYPE — the named, frozen v1 surface of `@avantf/dsh-plugin-base`'s `.` entry.
|
|
3
|
+
*
|
|
4
|
+
* Plugins load the base through the inlined bootstrap and never name it by specifier at runtime; they
|
|
5
|
+
* describe what they loaded with `typeof import('@avantf/dsh-plugin-base')`, a namespace type that
|
|
6
|
+
* grows silently with every new export. This file is the other half: named types an author can hold in
|
|
7
|
+
* their head, stating which members are the contract and what each one means. The compiler checks them
|
|
8
|
+
* structurally against the real module in `test/public-surface.spec.ts`, and the cross-tree behaviour
|
|
9
|
+
* tests in `mem/packages/plugin/test/interface.spec.ts` / `work/packages/plugin/test/interface.spec.ts`
|
|
10
|
+
* drive the SAME members from a base that is actually linked — because the semantic half of the
|
|
11
|
+
* contract (which directory a path resolves to, what `ensure` guarantees, what a refusal says) cannot
|
|
12
|
+
* be caught by a type.
|
|
13
|
+
*
|
|
14
|
+
* The surface has TWO halves and they are named separately because they are checked differently:
|
|
15
|
+
*
|
|
16
|
+
* - {@link BaseRuntimeV1} — the VALUE members. A real module can be structurally assigned to it, so
|
|
17
|
+
* a missing or reshaped value member is a compile error, and `keyof` matches the runtime exports.
|
|
18
|
+
* - {@link BaseTypeSurfaceV1} — the TYPES a caller names when using those members (types are erased,
|
|
19
|
+
* so no runtime value can carry them). `keyof` is the type-name list.
|
|
20
|
+
*
|
|
21
|
+
* `VALUE_NAMES_V1` and `TYPE_NAMES_V1` are the same two lists as data, because the snapshot gate needs
|
|
22
|
+
* to compare string sets. The gate asserts they are exactly the two `keyof`s, so a member can never be
|
|
23
|
+
* added to the interface and forgotten in the snapshot (or vice versa).
|
|
24
|
+
*
|
|
25
|
+
* `INTERFACE_VERSION` is the integer the plugins bake at build time and compare against the value
|
|
26
|
+
* reported by the base they actually loaded at startup. It moves only for an INTERFACE change (the set
|
|
27
|
+
* of names below, a signature in it, or the meaning of a member) — not for a behaviour/flow change and
|
|
28
|
+
* not for a fix. The package version remains the INSTALL-time gate (the plugin's peer range); this
|
|
29
|
+
* constant is the RUNTIME one.
|
|
30
|
+
*
|
|
31
|
+
* @module @avantf/dsh-plugin-base/interface
|
|
32
|
+
*/
|
|
33
|
+
import type { CompatContext, CompatEvidence, CompatLine, CompatLogger, CompatReportWords, CompatSpec, CompatVerdict, ProbeOutcome, ServiceProbe } from './compat.js';
|
|
34
|
+
import type { ProvisionCode } from './errors.js';
|
|
35
|
+
import type { InterfaceRequirement, InterfaceVerdict } from './interface_gate.js';
|
|
36
|
+
import type { DataHomeInput } from './kit/family.js';
|
|
37
|
+
import type { PluginLogger, PluginLoggerHost, PluginLoggerOptions } from './kit/logger.js';
|
|
38
|
+
import type { LoadedPromptText, PromptFileSpec, PromptFilesIo, PromptFilesLogger, PromptFilesOptions } from './kit/prompt_files.js';
|
|
39
|
+
import type { StrictCodec } from './kit/typert.js';
|
|
40
|
+
import type { EnsureOptions, InstallContext, InstallManifest, ItemPolicy, Kind, Manifest, MirrorPolicy, OnMissing, Plan, PlanEntry, PlanOptions, ProbeResult, ProgressEvent, Provider, ProviderContext, ProviderPlan, ProvisionEvent, ProvisionFs, ProvisionLock, ProvisionLogger, ProvisionPolicy, ProvisionReport, ProvisionReportEntry, ProvisionStatus, Provisioner, ProvisionerExperimental, ProvisionerOptions, PrunePolicy, PruneReport, PublishMeta, Resolved, ResourceHandle, ResourceIdentity, ResourceState, Startup } from './types.js';
|
|
41
|
+
/**
|
|
42
|
+
* The integer interface generation this module implements.
|
|
43
|
+
*
|
|
44
|
+
* `1` is the first frozen generation: the surface recorded by `api/interface-v1.json`. The file name's
|
|
45
|
+
* `N` and this constant are the SAME fact — `test/public-surface.spec.ts` asserts that the snapshot for
|
|
46
|
+
* this constant exists and that its `interfaceVersion` field equals it, so "the JSON says v2, the
|
|
47
|
+
* constant says 1" cannot happen. Bump it (and add `api/interface-vN.json`) only for an interface
|
|
48
|
+
* change (INTERFACE.md §1); a behaviour change or a fix does NOT touch it. The plugins bake this number
|
|
49
|
+
* into their artifacts and compare it, at startup, with the number the base they loaded reports — a
|
|
50
|
+
* difference is a warning and a capability-level degradation, never a refused mount.
|
|
51
|
+
*/
|
|
52
|
+
export declare const INTERFACE_VERSION = 1;
|
|
53
|
+
/**
|
|
54
|
+
* The VALUE half of the v1 `.` surface: every member that exists at runtime.
|
|
55
|
+
*
|
|
56
|
+
* Members are typed `typeof import('./x.js').name` — one reference to the source of truth, never a
|
|
57
|
+
* restated signature — so a change to an implementation's signature is a compile error where a real
|
|
58
|
+
* module is assigned to this type, not two silently disagreeing declarations. `keyof BaseRuntimeV1` is
|
|
59
|
+
* exactly the module's runtime export set (the gate asserts it against `Object.keys`).
|
|
60
|
+
*
|
|
61
|
+
* The `kit` group is the family's shared, DSH-free code: the reason a shared-helper fix needs only a
|
|
62
|
+
* base release. Plugins take those members off the module they loaded at runtime instead of inlining a
|
|
63
|
+
* copy. `resolveDataHome` takes the NAMED slot object {@link DataHomeInput}, which is the one breaking
|
|
64
|
+
* change that produced this generation.
|
|
65
|
+
*/
|
|
66
|
+
export interface BaseRuntimeV1 {
|
|
67
|
+
/** The interface generation; see {@link INTERFACE_VERSION}. */
|
|
68
|
+
readonly INTERFACE_VERSION: typeof INTERFACE_VERSION;
|
|
69
|
+
/** The compat log token (`compat:`) every line the gate emits begins with. */
|
|
70
|
+
readonly COMPAT_PREFIX: typeof import('./compat.js').COMPAT_PREFIX;
|
|
71
|
+
/** The baked build-record file name (`dsh-build.json`) read beside a plugin's entry. */
|
|
72
|
+
readonly BUILD_VERSIONS_FILE: typeof import('./compat.js').BUILD_VERSIONS_FILE;
|
|
73
|
+
/** The name of the throwaway tool the tools probe registers. */
|
|
74
|
+
readonly COMPAT_PROBE_TOOL: typeof import('./compat.js').COMPAT_PROBE_TOOL;
|
|
75
|
+
/** The item schema generation this build understands. */
|
|
76
|
+
readonly ITEM_SCHEMA_VERSION: typeof import('./provisioner.js').ITEM_SCHEMA_VERSION;
|
|
77
|
+
/** The default ensure deadline, in milliseconds. */
|
|
78
|
+
readonly DEFAULT_DEADLINE_MS: typeof import('./provisioner.js').DEFAULT_DEADLINE_MS;
|
|
79
|
+
/** The provisioner's capability list. */
|
|
80
|
+
readonly CAPABILITIES: typeof import('./provisioner.js').CAPABILITIES;
|
|
81
|
+
/**
|
|
82
|
+
* Decide whether a loaded module implements the interface generation a caller requires. Pure,
|
|
83
|
+
* bidirectional, guarded and total — the ONE implementation of the verdict semantics, so a fix to
|
|
84
|
+
* them is a base release and not two plugin rebuilds.
|
|
85
|
+
*/
|
|
86
|
+
readonly checkInterface: typeof import('./interface_gate.js').checkInterface;
|
|
87
|
+
/**
|
|
88
|
+
* Read the `{ baseVersion, interfaceVersion }` record a plugin artifact was baked with; a missing
|
|
89
|
+
* or malformed file is `undefined` ("not baked"), never a throw.
|
|
90
|
+
*/
|
|
91
|
+
readonly readInterfaceRequirement: typeof import('./interface_gate.js').readInterfaceRequirement;
|
|
92
|
+
/** Run the gate against a live context: register nothing, decide `load`, log the diagnosis. */
|
|
93
|
+
readonly provision: typeof import('./compat.js').provision;
|
|
94
|
+
/** Build the refusal report from a verdict plus the CALLER's wording. */
|
|
95
|
+
readonly compatReport: typeof import('./compat.js').compatReport;
|
|
96
|
+
/** Keep one user-visible command that reports a refusal (the only channel on that path). */
|
|
97
|
+
readonly registerMegaphone: typeof import('./compat.js').registerMegaphone;
|
|
98
|
+
/** The wire schema names a contribution declares (the post-registration check's input). */
|
|
99
|
+
readonly schemaNamesFrom: typeof import('./compat.js').schemaNamesFrom;
|
|
100
|
+
/** Confirm, after mounting, that every declared schema and tool is really registered. */
|
|
101
|
+
readonly verifyRegisteredFaces: typeof import('./compat.js').verifyRegisteredFaces;
|
|
102
|
+
/** The peer-range FLOORS of the packages that identify the host (the `declared` fallback). */
|
|
103
|
+
readonly readDeclaredVersions: typeof import('./compat.js').readDeclaredVersions;
|
|
104
|
+
/** The versions this BUILD was compiled against, baked next to the entry. */
|
|
105
|
+
readonly readBuildVersions: typeof import('./compat.js').readBuildVersions;
|
|
106
|
+
/** The versions THIS build's links resolve to at startup. */
|
|
107
|
+
readonly readRuntimeVersions: typeof import('./compat.js').readRuntimeVersions;
|
|
108
|
+
/** Build the probe tool declaration from the caller's own `defineTool`. */
|
|
109
|
+
readonly toolProbeDeclaration: typeof import('./compat.js').toolProbeDeclaration;
|
|
110
|
+
/** The rules as a pure function of evidence (no host, no I/O). */
|
|
111
|
+
readonly verdictOf: typeof import('./compat.js').verdictOf;
|
|
112
|
+
/** The lower bound one declared peer range names. */
|
|
113
|
+
readonly floorOf: typeof import('./compat.js').floorOf;
|
|
114
|
+
/** The versions THIS build's links resolve to for one package. */
|
|
115
|
+
readonly resolveRuntimeVersion: typeof import('./compat.js').resolveRuntimeVersion;
|
|
116
|
+
/** The services a live context actually exposes, against the caller's contracts. */
|
|
117
|
+
readonly checkServices: typeof import('./compat.js').checkServices;
|
|
118
|
+
/** Whether the context carries the effect-scoped timer (`ctx.interval`) the engine needs. */
|
|
119
|
+
readonly checkInterval: typeof import('./compat.js').checkInterval;
|
|
120
|
+
/** Gather the plain evidence {@link verdictOf} consumes from a live context. */
|
|
121
|
+
readonly gatherEvidence: typeof import('./compat.js').gatherEvidence;
|
|
122
|
+
/** Probe a tools registry with the caller's real declaration (`not probed` is not a break). */
|
|
123
|
+
readonly probeToolsRegistry: typeof import('./compat.js').probeToolsRegistry;
|
|
124
|
+
/** Probe the Typert registry with the caller's real wire contribution. */
|
|
125
|
+
readonly probeTypertRegistry: typeof import('./compat.js').probeTypertRegistry;
|
|
126
|
+
/** The registry keys a package's schema names become (`<packageId>#<name>`). */
|
|
127
|
+
readonly declaredSchemaKeys: typeof import('./compat.js').declaredSchemaKeys;
|
|
128
|
+
/** Ensure + read the family's user-editable prompt files. */
|
|
129
|
+
readonly PromptFiles: typeof import('./kit/prompt_files.js').PromptFiles;
|
|
130
|
+
/** Build a plugin logger with the family's line format and host mirror. */
|
|
131
|
+
readonly createPluginLogger: typeof import('./kit/logger.js').createPluginLogger;
|
|
132
|
+
/** The family root: `$AVANTF_HOME`, else `~/.avantf/env`. */
|
|
133
|
+
readonly familyHome: typeof import('./kit/family.js').familyHome;
|
|
134
|
+
/** `<family root>/tools`. */
|
|
135
|
+
readonly familyToolsDir: typeof import('./kit/family.js').familyToolsDir;
|
|
136
|
+
/** `<family root>/models`. */
|
|
137
|
+
readonly familyModelsDir: typeof import('./kit/family.js').familyModelsDir;
|
|
138
|
+
/**
|
|
139
|
+
* The DATA root, by the family's layer order: ⑤ explicit → ④ `$AVANTF_HOME` → ② the configured
|
|
140
|
+
* `dataHome` → `~/.avantf`. Every slot is NAMED ({@link DataHomeInput}) — the positional form is
|
|
141
|
+
* what let the two copies of this rule disagree about where the profile's `dataHome` belongs.
|
|
142
|
+
*/
|
|
143
|
+
readonly resolveDataHome: typeof import('./kit/family.js').resolveDataHome;
|
|
144
|
+
/** `~/x` → `<home>/x`, `~` → `<home>`; anything else unchanged. */
|
|
145
|
+
readonly expandHome: typeof import('./kit/family.js').expandHome;
|
|
146
|
+
/** Build the family's Typert `<pkg>#<namespace>/<method>:<field>` wire codec. */
|
|
147
|
+
readonly strictCodec: typeof import('./kit/typert.js').strictCodec;
|
|
148
|
+
/** `<package>#<namespace>/<method>`. */
|
|
149
|
+
readonly endpointId: typeof import('./kit/typert.js').endpointId;
|
|
150
|
+
/** The type symbol of one field of one method. */
|
|
151
|
+
readonly fieldSymbol: typeof import('./kit/typert.js').fieldSymbol;
|
|
152
|
+
/** The type symbol of a method's result. */
|
|
153
|
+
readonly resultSymbol: typeof import('./kit/typert.js').resultSymbol;
|
|
154
|
+
/** Build a provisioner over a family root. */
|
|
155
|
+
readonly createProvisioner: typeof import('./provisioner.js').createProvisioner;
|
|
156
|
+
/** The policy value that normalizes an `onMissing` shorthand. */
|
|
157
|
+
readonly normalizeOnMissing: typeof import('./provisioner.js').normalizeOnMissing;
|
|
158
|
+
/** The error a failed provision throws, with its machine-readable `code`. */
|
|
159
|
+
readonly ProvisionError: typeof import('./errors.js').ProvisionError;
|
|
160
|
+
/** The machine-readable code of a provision failure. */
|
|
161
|
+
readonly reasonOf: typeof import('./errors.js').reasonOf;
|
|
162
|
+
/** The binary-archive provider factory. */
|
|
163
|
+
readonly binaryArchiveProvider: typeof import('./providers/archive.js').binaryArchiveProvider;
|
|
164
|
+
/** The binary-archive item kind. */
|
|
165
|
+
readonly BINARY_ARCHIVE_KIND: typeof import('./providers/archive.js').BINARY_ARCHIVE_KIND;
|
|
166
|
+
/** The npm-package provider factory. */
|
|
167
|
+
readonly npmPackageProvider: typeof import('./providers/npm.js').npmPackageProvider;
|
|
168
|
+
/** The npm-package item kind. */
|
|
169
|
+
readonly NPM_PACKAGE_KIND: typeof import('./providers/npm.js').NPM_PACKAGE_KIND;
|
|
170
|
+
/** The model-cache provider factory. */
|
|
171
|
+
readonly modelCacheProvider: typeof import('./providers/model.js').modelCacheProvider;
|
|
172
|
+
/** The model-cache item kind. */
|
|
173
|
+
readonly MODEL_CACHE_KIND: typeof import('./providers/model.js').MODEL_CACHE_KIND;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* The TYPE half of the v1 `.` surface: every type a caller names when it uses the members above.
|
|
177
|
+
*
|
|
178
|
+
* These members exist only at compile time (types are erased), so they are declared as properties of
|
|
179
|
+
* their own name and never checked against a runtime value. `keyof` them, though, and you have the
|
|
180
|
+
* type-name list — which is what makes the list data (`TYPE_NAMES_V1`) mechanical rather than a second
|
|
181
|
+
* hand-kept inventory.
|
|
182
|
+
*
|
|
183
|
+
* Most are re-exported from `.` today; `CompatReportWords` and `ServiceContract` are named here because
|
|
184
|
+
* they appear in public signatures. The snapshot's type list is derived from this interface, so a
|
|
185
|
+
* member added here and not to the JSON (or the reverse) is a red gate.
|
|
186
|
+
*/
|
|
187
|
+
export interface BaseTypeSurfaceV1 {
|
|
188
|
+
readonly EnsureOptions: EnsureOptions;
|
|
189
|
+
readonly InstallContext: InstallContext;
|
|
190
|
+
readonly InstallManifest: InstallManifest;
|
|
191
|
+
readonly ItemPolicy: ItemPolicy;
|
|
192
|
+
readonly Kind: Kind;
|
|
193
|
+
readonly Manifest: Manifest;
|
|
194
|
+
readonly MirrorPolicy: MirrorPolicy;
|
|
195
|
+
readonly OnMissing: OnMissing;
|
|
196
|
+
readonly Plan: Plan;
|
|
197
|
+
readonly PlanEntry: PlanEntry;
|
|
198
|
+
readonly PlanOptions: PlanOptions;
|
|
199
|
+
readonly ProbeResult: ProbeResult;
|
|
200
|
+
readonly ProgressEvent: ProgressEvent;
|
|
201
|
+
readonly PromptFileSpec: PromptFileSpec;
|
|
202
|
+
readonly LoadedPromptText: LoadedPromptText;
|
|
203
|
+
readonly PromptFilesIo: PromptFilesIo;
|
|
204
|
+
readonly PromptFilesLogger: PromptFilesLogger;
|
|
205
|
+
readonly PromptFilesOptions: PromptFilesOptions;
|
|
206
|
+
readonly Provider: Provider;
|
|
207
|
+
readonly ProviderContext: ProviderContext;
|
|
208
|
+
readonly ProviderPlan: ProviderPlan;
|
|
209
|
+
readonly ProvisionCode: ProvisionCode;
|
|
210
|
+
readonly ProvisionEvent: ProvisionEvent;
|
|
211
|
+
readonly ProvisionFs: ProvisionFs;
|
|
212
|
+
readonly ProvisionLock: ProvisionLock;
|
|
213
|
+
readonly ProvisionLogger: ProvisionLogger;
|
|
214
|
+
readonly ProvisionPolicy: ProvisionPolicy;
|
|
215
|
+
readonly ProvisionReport: ProvisionReport;
|
|
216
|
+
readonly ProvisionReportEntry: ProvisionReportEntry;
|
|
217
|
+
readonly ProvisionStatus: ProvisionStatus;
|
|
218
|
+
readonly Provisioner: Provisioner;
|
|
219
|
+
readonly ProvisionerExperimental: ProvisionerExperimental;
|
|
220
|
+
readonly ProvisionerOptions: ProvisionerOptions;
|
|
221
|
+
readonly PrunePolicy: PrunePolicy;
|
|
222
|
+
readonly PruneReport: PruneReport;
|
|
223
|
+
readonly PublishMeta: PublishMeta;
|
|
224
|
+
readonly Resolved: Resolved;
|
|
225
|
+
readonly ResourceHandle: ResourceHandle;
|
|
226
|
+
readonly ResourceIdentity: ResourceIdentity;
|
|
227
|
+
readonly ResourceState: ResourceState;
|
|
228
|
+
readonly Startup: Startup;
|
|
229
|
+
readonly CompatContext: CompatContext;
|
|
230
|
+
readonly CompatEvidence: CompatEvidence;
|
|
231
|
+
readonly CompatLine: CompatLine;
|
|
232
|
+
readonly CompatLogger: CompatLogger;
|
|
233
|
+
readonly CompatSpec: CompatSpec;
|
|
234
|
+
readonly CompatVerdict: CompatVerdict;
|
|
235
|
+
readonly CompatReportWords: CompatReportWords;
|
|
236
|
+
readonly ProbeOutcome: ProbeOutcome;
|
|
237
|
+
readonly ServiceProbe: ServiceProbe;
|
|
238
|
+
readonly PluginLogger: PluginLogger;
|
|
239
|
+
readonly PluginLoggerHost: PluginLoggerHost;
|
|
240
|
+
readonly PluginLoggerOptions: PluginLoggerOptions;
|
|
241
|
+
readonly StrictCodec: StrictCodec;
|
|
242
|
+
readonly DataHomeInput: DataHomeInput;
|
|
243
|
+
readonly InterfaceVerdict: InterfaceVerdict;
|
|
244
|
+
readonly InterfaceRequirement: InterfaceRequirement;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Every VALUE name of the v1 `.` surface, in {@link BaseRuntimeV1} declaration order.
|
|
248
|
+
*
|
|
249
|
+
* The `satisfies readonly (keyof BaseRuntimeV1)[]` makes a typo or a stale entry a compile error, and
|
|
250
|
+
* the gate asserts that this list and the module's actual exports are the same set — and that it is
|
|
251
|
+
* the whole `keyof`, so nothing can live in the interface without also being in the snapshot.
|
|
252
|
+
*/
|
|
253
|
+
export declare const VALUE_NAMES_V1: readonly ["INTERFACE_VERSION", "COMPAT_PREFIX", "BUILD_VERSIONS_FILE", "COMPAT_PROBE_TOOL", "ITEM_SCHEMA_VERSION", "DEFAULT_DEADLINE_MS", "CAPABILITIES", "checkInterface", "readInterfaceRequirement", "provision", "compatReport", "registerMegaphone", "schemaNamesFrom", "verifyRegisteredFaces", "readDeclaredVersions", "readBuildVersions", "readRuntimeVersions", "toolProbeDeclaration", "verdictOf", "floorOf", "resolveRuntimeVersion", "checkServices", "checkInterval", "gatherEvidence", "probeToolsRegistry", "probeTypertRegistry", "declaredSchemaKeys", "PromptFiles", "createPluginLogger", "familyHome", "familyToolsDir", "familyModelsDir", "resolveDataHome", "expandHome", "strictCodec", "endpointId", "fieldSymbol", "resultSymbol", "createProvisioner", "normalizeOnMissing", "ProvisionError", "reasonOf", "binaryArchiveProvider", "BINARY_ARCHIVE_KIND", "npmPackageProvider", "NPM_PACKAGE_KIND", "modelCacheProvider", "MODEL_CACHE_KIND"];
|
|
254
|
+
/**
|
|
255
|
+
* Every TYPE name of the v1 `.` surface, in {@link BaseTypeSurfaceV1} declaration order.
|
|
256
|
+
*
|
|
257
|
+
* Types are erased, so this is the only form in which they can be enumerated at runtime. The
|
|
258
|
+
* `satisfies` clause keeps it honest against the interface, and the gate asserts the two together are
|
|
259
|
+
* exactly the interface's members.
|
|
260
|
+
*/
|
|
261
|
+
export declare const TYPE_NAMES_V1: readonly ["EnsureOptions", "InstallContext", "InstallManifest", "ItemPolicy", "Kind", "Manifest", "MirrorPolicy", "OnMissing", "Plan", "PlanEntry", "PlanOptions", "ProbeResult", "ProgressEvent", "PromptFileSpec", "LoadedPromptText", "PromptFilesIo", "PromptFilesLogger", "PromptFilesOptions", "Provider", "ProviderContext", "ProviderPlan", "ProvisionCode", "ProvisionEvent", "ProvisionFs", "ProvisionLock", "ProvisionLogger", "ProvisionPolicy", "ProvisionReport", "ProvisionReportEntry", "ProvisionStatus", "Provisioner", "ProvisionerExperimental", "ProvisionerOptions", "PrunePolicy", "PruneReport", "PublishMeta", "Resolved", "ResourceHandle", "ResourceIdentity", "ResourceState", "Startup", "CompatContext", "CompatEvidence", "CompatLine", "CompatLogger", "CompatSpec", "CompatVerdict", "CompatReportWords", "ProbeOutcome", "ServiceProbe", "PluginLogger", "PluginLoggerHost", "PluginLoggerOptions", "StrictCodec", "DataHomeInput", "InterfaceVerdict", "InterfaceRequirement"];
|
|
262
|
+
//# sourceMappingURL=interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../src/interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,UAAU,EAAE,YAAY,EAAE,iBAAiB,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AACpK,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,KAAK,EAAE,oBAAoB,EAAE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AO,MAAM,cAAc,66BAiD0B,CAAA;AAErD;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,m9BA0D+B,CAAA"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The integer interface generation this module implements.
|
|
3
|
+
*
|
|
4
|
+
* `1` is the first frozen generation: the surface recorded by `api/interface-v1.json`. The file name's
|
|
5
|
+
* `N` and this constant are the SAME fact — `test/public-surface.spec.ts` asserts that the snapshot for
|
|
6
|
+
* this constant exists and that its `interfaceVersion` field equals it, so "the JSON says v2, the
|
|
7
|
+
* constant says 1" cannot happen. Bump it (and add `api/interface-vN.json`) only for an interface
|
|
8
|
+
* change (INTERFACE.md §1); a behaviour change or a fix does NOT touch it. The plugins bake this number
|
|
9
|
+
* into their artifacts and compare it, at startup, with the number the base they loaded reports — a
|
|
10
|
+
* difference is a warning and a capability-level degradation, never a refused mount.
|
|
11
|
+
*/
|
|
12
|
+
export const INTERFACE_VERSION = 1;
|
|
13
|
+
/**
|
|
14
|
+
* Every VALUE name of the v1 `.` surface, in {@link BaseRuntimeV1} declaration order.
|
|
15
|
+
*
|
|
16
|
+
* The `satisfies readonly (keyof BaseRuntimeV1)[]` makes a typo or a stale entry a compile error, and
|
|
17
|
+
* the gate asserts that this list and the module's actual exports are the same set — and that it is
|
|
18
|
+
* the whole `keyof`, so nothing can live in the interface without also being in the snapshot.
|
|
19
|
+
*/
|
|
20
|
+
export const VALUE_NAMES_V1 = [
|
|
21
|
+
'INTERFACE_VERSION',
|
|
22
|
+
'COMPAT_PREFIX',
|
|
23
|
+
'BUILD_VERSIONS_FILE',
|
|
24
|
+
'COMPAT_PROBE_TOOL',
|
|
25
|
+
'ITEM_SCHEMA_VERSION',
|
|
26
|
+
'DEFAULT_DEADLINE_MS',
|
|
27
|
+
'CAPABILITIES',
|
|
28
|
+
'checkInterface',
|
|
29
|
+
'readInterfaceRequirement',
|
|
30
|
+
'provision',
|
|
31
|
+
'compatReport',
|
|
32
|
+
'registerMegaphone',
|
|
33
|
+
'schemaNamesFrom',
|
|
34
|
+
'verifyRegisteredFaces',
|
|
35
|
+
'readDeclaredVersions',
|
|
36
|
+
'readBuildVersions',
|
|
37
|
+
'readRuntimeVersions',
|
|
38
|
+
'toolProbeDeclaration',
|
|
39
|
+
'verdictOf',
|
|
40
|
+
'floorOf',
|
|
41
|
+
'resolveRuntimeVersion',
|
|
42
|
+
'checkServices',
|
|
43
|
+
'checkInterval',
|
|
44
|
+
'gatherEvidence',
|
|
45
|
+
'probeToolsRegistry',
|
|
46
|
+
'probeTypertRegistry',
|
|
47
|
+
'declaredSchemaKeys',
|
|
48
|
+
'PromptFiles',
|
|
49
|
+
'createPluginLogger',
|
|
50
|
+
'familyHome',
|
|
51
|
+
'familyToolsDir',
|
|
52
|
+
'familyModelsDir',
|
|
53
|
+
'resolveDataHome',
|
|
54
|
+
'expandHome',
|
|
55
|
+
'strictCodec',
|
|
56
|
+
'endpointId',
|
|
57
|
+
'fieldSymbol',
|
|
58
|
+
'resultSymbol',
|
|
59
|
+
'createProvisioner',
|
|
60
|
+
'normalizeOnMissing',
|
|
61
|
+
'ProvisionError',
|
|
62
|
+
'reasonOf',
|
|
63
|
+
'binaryArchiveProvider',
|
|
64
|
+
'BINARY_ARCHIVE_KIND',
|
|
65
|
+
'npmPackageProvider',
|
|
66
|
+
'NPM_PACKAGE_KIND',
|
|
67
|
+
'modelCacheProvider',
|
|
68
|
+
'MODEL_CACHE_KIND',
|
|
69
|
+
];
|
|
70
|
+
/**
|
|
71
|
+
* Every TYPE name of the v1 `.` surface, in {@link BaseTypeSurfaceV1} declaration order.
|
|
72
|
+
*
|
|
73
|
+
* Types are erased, so this is the only form in which they can be enumerated at runtime. The
|
|
74
|
+
* `satisfies` clause keeps it honest against the interface, and the gate asserts the two together are
|
|
75
|
+
* exactly the interface's members.
|
|
76
|
+
*/
|
|
77
|
+
export const TYPE_NAMES_V1 = [
|
|
78
|
+
'EnsureOptions',
|
|
79
|
+
'InstallContext',
|
|
80
|
+
'InstallManifest',
|
|
81
|
+
'ItemPolicy',
|
|
82
|
+
'Kind',
|
|
83
|
+
'Manifest',
|
|
84
|
+
'MirrorPolicy',
|
|
85
|
+
'OnMissing',
|
|
86
|
+
'Plan',
|
|
87
|
+
'PlanEntry',
|
|
88
|
+
'PlanOptions',
|
|
89
|
+
'ProbeResult',
|
|
90
|
+
'ProgressEvent',
|
|
91
|
+
'PromptFileSpec',
|
|
92
|
+
'LoadedPromptText',
|
|
93
|
+
'PromptFilesIo',
|
|
94
|
+
'PromptFilesLogger',
|
|
95
|
+
'PromptFilesOptions',
|
|
96
|
+
'Provider',
|
|
97
|
+
'ProviderContext',
|
|
98
|
+
'ProviderPlan',
|
|
99
|
+
'ProvisionCode',
|
|
100
|
+
'ProvisionEvent',
|
|
101
|
+
'ProvisionFs',
|
|
102
|
+
'ProvisionLock',
|
|
103
|
+
'ProvisionLogger',
|
|
104
|
+
'ProvisionPolicy',
|
|
105
|
+
'ProvisionReport',
|
|
106
|
+
'ProvisionReportEntry',
|
|
107
|
+
'ProvisionStatus',
|
|
108
|
+
'Provisioner',
|
|
109
|
+
'ProvisionerExperimental',
|
|
110
|
+
'ProvisionerOptions',
|
|
111
|
+
'PrunePolicy',
|
|
112
|
+
'PruneReport',
|
|
113
|
+
'PublishMeta',
|
|
114
|
+
'Resolved',
|
|
115
|
+
'ResourceHandle',
|
|
116
|
+
'ResourceIdentity',
|
|
117
|
+
'ResourceState',
|
|
118
|
+
'Startup',
|
|
119
|
+
'CompatContext',
|
|
120
|
+
'CompatEvidence',
|
|
121
|
+
'CompatLine',
|
|
122
|
+
'CompatLogger',
|
|
123
|
+
'CompatSpec',
|
|
124
|
+
'CompatVerdict',
|
|
125
|
+
'CompatReportWords',
|
|
126
|
+
'ProbeOutcome',
|
|
127
|
+
'ServiceProbe',
|
|
128
|
+
'PluginLogger',
|
|
129
|
+
'PluginLoggerHost',
|
|
130
|
+
'PluginLoggerOptions',
|
|
131
|
+
'StrictCodec',
|
|
132
|
+
'DataHomeInput',
|
|
133
|
+
'InterfaceVerdict',
|
|
134
|
+
'InterfaceRequirement',
|
|
135
|
+
];
|
|
136
|
+
//# sourceMappingURL=interface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../src/interface.ts"],"names":[],"mappings":"AA6EA;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAA;AA8MlC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,mBAAmB;IACnB,eAAe;IACf,qBAAqB;IACrB,mBAAmB;IACnB,qBAAqB;IACrB,qBAAqB;IACrB,cAAc;IACd,gBAAgB;IAChB,0BAA0B;IAC1B,WAAW;IACX,cAAc;IACd,mBAAmB;IACnB,iBAAiB;IACjB,uBAAuB;IACvB,sBAAsB;IACtB,mBAAmB;IACnB,qBAAqB;IACrB,sBAAsB;IACtB,WAAW;IACX,SAAS;IACT,uBAAuB;IACvB,eAAe;IACf,eAAe;IACf,gBAAgB;IAChB,oBAAoB;IACpB,qBAAqB;IACrB,oBAAoB;IACpB,aAAa;IACb,oBAAoB;IACpB,YAAY;IACZ,gBAAgB;IAChB,iBAAiB;IACjB,iBAAiB;IACjB,YAAY;IACZ,aAAa;IACb,YAAY;IACZ,aAAa;IACb,cAAc;IACd,mBAAmB;IACnB,oBAAoB;IACpB,gBAAgB;IAChB,UAAU;IACV,uBAAuB;IACvB,qBAAqB;IACrB,oBAAoB;IACpB,kBAAkB;IAClB,oBAAoB;IACpB,kBAAkB;CACiC,CAAA;AAErD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,eAAe;IACf,gBAAgB;IAChB,iBAAiB;IACjB,YAAY;IACZ,MAAM;IACN,UAAU;IACV,cAAc;IACd,WAAW;IACX,MAAM;IACN,WAAW;IACX,aAAa;IACb,aAAa;IACb,eAAe;IACf,gBAAgB;IAChB,kBAAkB;IAClB,eAAe;IACf,mBAAmB;IACnB,oBAAoB;IACpB,UAAU;IACV,iBAAiB;IACjB,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,aAAa;IACb,eAAe;IACf,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,sBAAsB;IACtB,iBAAiB;IACjB,aAAa;IACb,yBAAyB;IACzB,oBAAoB;IACpB,aAAa;IACb,aAAa;IACb,aAAa;IACb,UAAU;IACV,gBAAgB;IAChB,kBAAkB;IAClB,eAAe;IACf,SAAS;IACT,eAAe;IACf,gBAAgB;IAChB,YAAY;IACZ,cAAc;IACd,YAAY;IACZ,eAAe;IACf,mBAAmB;IACnB,cAAc;IACd,cAAc;IACd,cAAc;IACd,kBAAkB;IAClB,qBAAqB;IACrB,aAAa;IACb,eAAe;IACf,kBAAkB;IAClB,sBAAsB;CACiC,CAAA"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The interface generation a plugin artifact was baked for — the base's side of the contract.
|
|
3
|
+
*
|
|
4
|
+
* `scripts/lib/interface-version.mjs` writes it beside the built entry; the base reads it back here
|
|
5
|
+
* so both plugins share ONE reader (and ONE definition of "malformed", which is `undefined`).
|
|
6
|
+
*/
|
|
7
|
+
export interface InterfaceRequirement {
|
|
8
|
+
/** The base package version the bake was taken from, so a diagnostic can name it. */
|
|
9
|
+
readonly baseVersion: string;
|
|
10
|
+
/** The `INTERFACE_VERSION` of the base the artifact was built against. */
|
|
11
|
+
readonly interfaceVersion: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* What {@link checkInterface} decided.
|
|
15
|
+
*
|
|
16
|
+
* `ok` — both sides were readable and name the same generation; use the base normally.
|
|
17
|
+
* `incompatible` — both sides were readable and differ (either direction); a caller must NOT use the
|
|
18
|
+
* base's shared capabilities. The family invariant still holds: this is a degradation, never a
|
|
19
|
+
* refused mount.
|
|
20
|
+
* `cannot-tell` — at least one side could not be read. "Cannot tell" is never "incompatible": the
|
|
21
|
+
* caller warns and uses the base normally.
|
|
22
|
+
*/
|
|
23
|
+
export interface InterfaceVerdict {
|
|
24
|
+
readonly status: 'ok' | 'incompatible' | 'cannot-tell';
|
|
25
|
+
/** The generation the caller was built for, when it was readable. */
|
|
26
|
+
readonly required?: number;
|
|
27
|
+
/** The generation the loaded module reported, when it was readable. */
|
|
28
|
+
readonly loaded?: number;
|
|
29
|
+
/**
|
|
30
|
+
* One sentence a caller can log verbatim — present whenever the status is not `ok`, and absent when
|
|
31
|
+
* it is. The caller owns the wording around it (prefix, "mounting anyway", …).
|
|
32
|
+
*/
|
|
33
|
+
readonly reason?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Compare the interface generation a caller requires with the one a loaded module reports.
|
|
37
|
+
*
|
|
38
|
+
* Pure, bidirectional and total: it reads exactly one property, guards that read, and answers a
|
|
39
|
+
* verdict for every input. Both arguments are trusted only as far as they can be read.
|
|
40
|
+
*
|
|
41
|
+
* @param required - the generation the caller was built for (its baked `interfaceVersion`).
|
|
42
|
+
* @param module - the loaded base module; only `INTERFACE_VERSION` is read.
|
|
43
|
+
* @returns the verdict; `status` is `cannot-tell` for any side that could not be read.
|
|
44
|
+
*/
|
|
45
|
+
export declare function checkInterface(required: number, module: {
|
|
46
|
+
readonly INTERFACE_VERSION?: unknown;
|
|
47
|
+
}): InterfaceVerdict;
|
|
48
|
+
/**
|
|
49
|
+
* Read the interface requirement a plugin artifact was baked with.
|
|
50
|
+
*
|
|
51
|
+
* A missing, unreadable or malformed file is `undefined` — "not baked" — never a throw: every caller
|
|
52
|
+
* is a startup path that must degrade to a warning, and a half-written record must not read as a
|
|
53
|
+
* version. This is the reader the PLUGINS use on their startup path; the build-side link step reads
|
|
54
|
+
* the same file with its own copy in `scripts/lib/interface-version.mjs` (it runs before the base it
|
|
55
|
+
* is about to vendor is importable), and the two field names are the same fact.
|
|
56
|
+
*
|
|
57
|
+
* @param url - the record's location, normally `new URL('./interface-version.json', import.meta.url)`.
|
|
58
|
+
* @returns `{ baseVersion, interfaceVersion }`, or `undefined`.
|
|
59
|
+
*/
|
|
60
|
+
export declare function readInterfaceRequirement(url: URL | string): InterfaceRequirement | undefined;
|
|
61
|
+
//# sourceMappingURL=interface_gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface_gate.d.ts","sourceRoot":"","sources":["../src/interface_gate.ts"],"names":[],"mappings":"AA4BA;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,qFAAqF;IACrF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,0EAA0E;IAC1E,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAA;CAClC;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,IAAI,GAAG,cAAc,GAAG,aAAa,CAAA;IACtD,qEAAqE;IACrE,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,uEAAuE;IACvE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CACzB;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE;IAAE,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAAE,GAC/C,gBAAgB,CAiClB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,GAAG,oBAAoB,GAAG,SAAS,CAa5F"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The RUNTIME interface gate — the decision half of the family's compatibility contract.
|
|
3
|
+
*
|
|
4
|
+
* `INTERFACE_VERSION` (see {@link INTERFACE_VERSION} in `./interface.js`) is the generation number of
|
|
5
|
+
* the `.` surface; the plugins BAKE the generation they were built for into their artifact
|
|
6
|
+
* (`lib/interface-version.json`, written by each tree's `scripts/link-envinit.mjs`) and, at startup,
|
|
7
|
+
* compare it with the number the base they actually loaded reports. This module is that comparison.
|
|
8
|
+
*
|
|
9
|
+
* It lives in the BASE, not in each plugin, for the same reason the rest of the shared kit does
|
|
10
|
+
* (root `AGENTS.md`: "can this knowledge be fixed by one base release?"): the verdict semantics are
|
|
11
|
+
* now the family's MAIN contract, so a wrong direction, an unguarded property read or a thrown error
|
|
12
|
+
* must be fixable with one base release, not two plugin rebuilds. The plugins keep only the
|
|
13
|
+
* consumption: read their own bake through {@link readInterfaceRequirement}, call
|
|
14
|
+
* {@link checkInterface}, and act on the verdict.
|
|
15
|
+
*
|
|
16
|
+
* Two properties are absolute, and both are why this is a pure function rather than a live check:
|
|
17
|
+
*
|
|
18
|
+
* - **It never throws.** A gate that throws while deciding would reject a mount it is not allowed to
|
|
19
|
+
* reject. A module whose property access throws (the "hostile module" the plugins' loaders are
|
|
20
|
+
* built to survive) reads as "reports no INTERFACE_VERSION", i.e. `cannot-tell`.
|
|
21
|
+
* - **It is bidirectional.** A plugin written for a NEWER generation than the base it loaded is as
|
|
22
|
+
* incompatible as one written for an older one; "in range but another generation" is the one case
|
|
23
|
+
* `supportedRange` cannot see, so this gate must see it in both directions.
|
|
24
|
+
*
|
|
25
|
+
* @module @avantf/dsh-plugin-base/interface_gate
|
|
26
|
+
*/
|
|
27
|
+
import { readFileSync } from 'node:fs';
|
|
28
|
+
/**
|
|
29
|
+
* Compare the interface generation a caller requires with the one a loaded module reports.
|
|
30
|
+
*
|
|
31
|
+
* Pure, bidirectional and total: it reads exactly one property, guards that read, and answers a
|
|
32
|
+
* verdict for every input. Both arguments are trusted only as far as they can be read.
|
|
33
|
+
*
|
|
34
|
+
* @param required - the generation the caller was built for (its baked `interfaceVersion`).
|
|
35
|
+
* @param module - the loaded base module; only `INTERFACE_VERSION` is read.
|
|
36
|
+
* @returns the verdict; `status` is `cannot-tell` for any side that could not be read.
|
|
37
|
+
*/
|
|
38
|
+
export function checkInterface(required, module) {
|
|
39
|
+
// Guarded read: a module that throws on property access is "reports no INTERFACE_VERSION", not a
|
|
40
|
+
// failure of the gate (and never a rejected mount).
|
|
41
|
+
let loaded;
|
|
42
|
+
try {
|
|
43
|
+
loaded = module.INTERFACE_VERSION;
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
loaded = undefined;
|
|
47
|
+
}
|
|
48
|
+
const loadedVersion = typeof loaded === 'number' && Number.isInteger(loaded) && loaded > 0 ? loaded : undefined;
|
|
49
|
+
if (!Number.isInteger(required) || required <= 0) {
|
|
50
|
+
return {
|
|
51
|
+
status: 'cannot-tell',
|
|
52
|
+
...(loadedVersion === undefined ? {} : { loaded: loadedVersion }),
|
|
53
|
+
reason: `this build has no usable baked interface generation (got ${JSON.stringify(required)}); the runtime interface gate cannot run`,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
if (loadedVersion === undefined) {
|
|
57
|
+
return {
|
|
58
|
+
status: 'cannot-tell',
|
|
59
|
+
required,
|
|
60
|
+
reason: 'the loaded base reports no INTERFACE_VERSION; which interface generation it implements cannot be told',
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
if (loadedVersion === required)
|
|
64
|
+
return { status: 'ok', required, loaded: loadedVersion };
|
|
65
|
+
return {
|
|
66
|
+
status: 'incompatible',
|
|
67
|
+
required,
|
|
68
|
+
loaded: loadedVersion,
|
|
69
|
+
reason: `this build was written for interface generation ${String(required)} but the loaded base reports ${String(loadedVersion)}`
|
|
70
|
+
+ ` (${loadedVersion > required ? 'newer' : 'older'} generation); the base's shared capabilities are not used`,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Read the interface requirement a plugin artifact was baked with.
|
|
75
|
+
*
|
|
76
|
+
* A missing, unreadable or malformed file is `undefined` — "not baked" — never a throw: every caller
|
|
77
|
+
* is a startup path that must degrade to a warning, and a half-written record must not read as a
|
|
78
|
+
* version. This is the reader the PLUGINS use on their startup path; the build-side link step reads
|
|
79
|
+
* the same file with its own copy in `scripts/lib/interface-version.mjs` (it runs before the base it
|
|
80
|
+
* is about to vendor is importable), and the two field names are the same fact.
|
|
81
|
+
*
|
|
82
|
+
* @param url - the record's location, normally `new URL('./interface-version.json', import.meta.url)`.
|
|
83
|
+
* @returns `{ baseVersion, interfaceVersion }`, or `undefined`.
|
|
84
|
+
*/
|
|
85
|
+
export function readInterfaceRequirement(url) {
|
|
86
|
+
try {
|
|
87
|
+
const parsed = JSON.parse(readFileSync(url, 'utf8'));
|
|
88
|
+
if (typeof parsed !== 'object' || parsed === null)
|
|
89
|
+
return undefined;
|
|
90
|
+
const record = parsed;
|
|
91
|
+
const baseVersion = record['baseVersion'];
|
|
92
|
+
const interfaceVersion = record['interfaceVersion'];
|
|
93
|
+
if (typeof baseVersion !== 'string' || baseVersion === '')
|
|
94
|
+
return undefined;
|
|
95
|
+
if (typeof interfaceVersion !== 'number' || !Number.isInteger(interfaceVersion) || interfaceVersion <= 0)
|
|
96
|
+
return undefined;
|
|
97
|
+
return { baseVersion, interfaceVersion };
|
|
98
|
+
}
|
|
99
|
+
catch {
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=interface_gate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface_gate.js","sourceRoot":"","sources":["../src/interface_gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAsCtC;;;;;;;;;GASG;AACH,MAAM,UAAU,cAAc,CAC5B,QAAgB,EAChB,MAAgD;IAEhD,iGAAiG;IACjG,oDAAoD;IACpD,IAAI,MAAe,CAAA;IACnB,IAAI,CAAC;QACH,MAAM,GAAG,MAAM,CAAC,iBAAiB,CAAA;IACnC,CAAC;IAAC,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AE,MAAM,CAAC,CAAC,CAAA;QAC7D,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI;YAAE,OAAO,SAAS,CAAA;QACnE,MAAM,MAAM,GAAG,MAAiC,CAAA;QAChD,MAAM,WAAW,GAAG,MAAM,CAAC,aAAa,CAAC,CAAA;QACzC,MAAM,gBAAgB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAA;QACnD,IAAI,OAAO,WAAW,KAAK,QAAQ,IAAI,WAAW,KAAK,EAAE;YAAE,OAAO,SAAS,CAAA;QAC3E,IAAI,OAAO,gBAAgB,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,gBAAgB,CAAC,IAAI,gBAAgB,IAAI,CAAC;YAAE,OAAO,SAAS,CAAA;QAC1H,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAA;IAC1C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAA;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Framework building blocks shared by the core and the entry points.
|
|
3
|
+
* @module internal
|
|
4
|
+
*/
|
|
5
|
+
export { defaultFs, exists, linkOrCopy } from './fs.js';
|
|
6
|
+
export { defaultLock, pidIsAlive } from './lock.js';
|
|
7
|
+
export { extractTarGz, safeEntryPath } from './tar.js';
|
|
8
|
+
export { extractZip } from './zip.js';
|
|
9
|
+
export type { ZipExtractOptions } from './zip.js';
|
|
10
|
+
export { assertRange, compareVersions, parseRange, parseVersion, satisfies, satisfiesRange, selectVersion } from './semver.js';
|
|
11
|
+
export type { Range, Version } from './semver.js';
|
|
12
|
+
export { INSTALL_MANIFEST_FILE, MANIFEST_SCHEMA_VERSION, aliasLegacyManifest, decodeJson, encodeInstallManifest, readInstallManifest, } from './manifest.js';
|
|
13
|
+
export { assertPackageName } from './package-name.js';
|
|
14
|
+
export { sriOfSha256, verifyIntegrity } from './integrity.js';
|
|
15
|
+
export { LAYOUT_SCHEMA_VERSION, STATUS_SCHEMA_VERSION, mergeRows, persistStatus, readDeclared, readLayout, readStatus, recordDeclared, writeLayout, } from './state.js';
|
|
16
|
+
export type { DeclaredEntry, DeclaredFile, LayoutFile, StatusFile, StatusRow } from './state.js';
|
|
17
|
+
export { BUILTIN_KINDS, IMPLEMENTED_POLICY_KEYS, ITEM_FIELDS, MANIFEST_FIELDS, UNIMPLEMENTED_POLICY_KEYS, UNIMPLEMENTED_PROVISION_POLICY_KEYS, hasStarBranch, isNamespacedKind, lintManifest, lintManifestText, unknownFields, } from './lint.js';
|
|
18
|
+
export type { LintFinding, LintResult } from './lint.js';
|
|
19
|
+
export { candidateUrls, downloadBytes, fetchImplOf, platformKey, readCapped, signalFor, verifySha256, DEFAULT_MAX_BYTES } from './net.js';
|
|
20
|
+
export { CONTROL_DIR, assertSafeRelativePath, assertSafeRelativeRoot, controlRoot, declaredPath, layoutPath, lockPath, quarantineRoot, stagingDir, statusLockPath, statusPath, tempRoot, versionSegment, } from './layout.js';
|
|
21
|
+
export { BOOTSTRAP_SUBPATH, FRAMEWORK_INLINING_BEACONS, FRAMEWORK_PACKAGE, MIN_INLINING_BEACONS, findFrameworkImports, findInliningBeacons, isBootstrapSpecifier, } from './artifact.js';
|
|
22
|
+
export type { FrameworkImportKind, FrameworkImportRef } from './artifact.js';
|
|
23
|
+
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACvD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA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