@arki/dot 0.3.0 → 0.4.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/README.md +86 -86
- package/dist/cli/discover.js +2 -2
- package/dist/cli/discover.js.map +1 -1
- package/dist/cli/error-codes.d.ts +8 -0
- package/dist/cli/error-codes.d.ts.map +1 -1
- package/dist/cli/error-codes.js +12 -0
- package/dist/cli/error-codes.js.map +1 -1
- package/dist/cli/index.d.ts +9 -2
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +54 -23
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/new.d.ts +1 -1
- package/dist/cli/new.js +1 -1
- package/dist/cli/render-doctor.d.ts +1 -1
- package/dist/cli/render-doctor.js +23 -23
- package/dist/cli/render-doctor.js.map +1 -1
- package/dist/cli/render-explain.d.ts.map +1 -1
- package/dist/cli/render-explain.js +33 -19
- package/dist/cli/render-explain.js.map +1 -1
- package/dist/cli/render-graph.d.ts +3 -3
- package/dist/cli/render-graph.js +12 -12
- package/dist/cli/render-graph.js.map +1 -1
- package/dist/cli/render-projection.d.ts +29 -0
- package/dist/cli/render-projection.d.ts.map +1 -0
- package/dist/cli/render-projection.js +202 -0
- package/dist/cli/render-projection.js.map +1 -0
- package/dist/define-app.d.ts +49 -17
- package/dist/define-app.d.ts.map +1 -1
- package/dist/define-app.js +16 -9
- package/dist/define-app.js.map +1 -1
- package/dist/diagnostics.d.ts +19 -15
- package/dist/diagnostics.d.ts.map +1 -1
- package/dist/diagnostics.js +2 -2
- package/dist/index.d.ts +15 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/init-pips.d.ts +45 -0
- package/dist/init-pips.d.ts.map +1 -0
- package/dist/init-pips.js +49 -0
- package/dist/init-pips.js.map +1 -0
- package/dist/init-plugins.d.ts +45 -0
- package/dist/init-plugins.d.ts.map +1 -0
- package/dist/init-plugins.js +49 -0
- package/dist/init-plugins.js.map +1 -0
- package/dist/kernel/app-instance.d.ts +5 -5
- package/dist/kernel/app-instance.d.ts.map +1 -1
- package/dist/kernel/app-instance.js +375 -244
- package/dist/kernel/app-instance.js.map +1 -1
- package/dist/kernel/otel.d.ts +19 -19
- package/dist/kernel/otel.d.ts.map +1 -1
- package/dist/kernel/otel.js +22 -22
- package/dist/kernel/otel.js.map +1 -1
- package/dist/lifecycle-observer.d.ts +10 -10
- package/dist/lifecycle-observer.d.ts.map +1 -1
- package/dist/lifecycle-observer.js +1 -1
- package/dist/lifecycle.d.ts +18 -14
- package/dist/lifecycle.d.ts.map +1 -1
- package/dist/lifecycle.js +13 -9
- package/dist/lifecycle.js.map +1 -1
- package/dist/manifest.d.ts +70 -48
- package/dist/manifest.d.ts.map +1 -1
- package/dist/manifest.js +74 -5
- package/dist/manifest.js.map +1 -1
- package/dist/pip-contract.d.ts +29 -21
- package/dist/pip-contract.d.ts.map +1 -1
- package/dist/pip-contract.js +1 -0
- package/dist/pip-contract.js.map +1 -1
- package/dist/pip.d.ts +7 -4
- package/dist/pip.d.ts.map +1 -1
- package/dist/pip.js +2 -0
- package/dist/pip.js.map +1 -1
- package/dist/plugin-contract.d.ts +335 -143
- package/dist/plugin-contract.d.ts.map +1 -1
- package/dist/plugin-contract.js +201 -36
- package/dist/plugin-contract.js.map +1 -1
- package/dist/plugin.d.ts +18 -15
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +11 -11
- package/dist/plugin.js.map +1 -1
- package/dist/test-harness.d.ts +31 -31
- package/dist/test-harness.d.ts.map +1 -1
- package/dist/test-harness.js +29 -28
- package/dist/test-harness.js.map +1 -1
- package/dist/timeline.d.ts +2 -2
- package/dist/timeline.js +5 -5
- package/dist/timeline.js.map +1 -1
- package/package.json +9 -9
- package/src/cli/discover.ts +2 -2
- package/src/cli/error-codes.ts +12 -0
- package/src/cli/index.ts +76 -29
- package/src/cli/new.ts +1 -1
- package/src/cli/render-doctor.ts +21 -21
- package/src/cli/render-explain.ts +37 -19
- package/src/cli/render-graph.ts +12 -12
- package/src/cli/render-projection.ts +239 -0
- package/src/define-app.ts +85 -22
- package/src/diagnostics.ts +19 -15
- package/src/index.ts +37 -20
- package/src/init-plugins.ts +142 -0
- package/src/kernel/app-instance.ts +428 -282
- package/src/kernel/otel.ts +27 -27
- package/src/lifecycle-observer.ts +10 -10
- package/src/lifecycle.ts +19 -15
- package/src/manifest.ts +128 -50
- package/src/{pip-contract.ts → plugin-contract.ts} +73 -62
- package/src/{pip.ts → plugin.ts} +37 -18
- package/src/test-harness.ts +52 -51
- package/src/timeline.ts +6 -6
- package/templates/app-minimal/AGENTS.md.tmpl +9 -9
- package/templates/app-minimal/README.md.tmpl +1 -1
- package/templates/app-minimal/tests/boot.test.ts.tmpl +1 -1
- package/src/cli/render-openapi.ts +0 -147
|
@@ -1,175 +1,367 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Public plugin contract for the DOT kernel.
|
|
2
|
+
* Public plugin contract for the DOT kernel (v2).
|
|
3
3
|
*
|
|
4
|
-
* A
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* A plugin declares what it **needs** as a shape of type witnesses and
|
|
5
|
+
* publishes what it **provides** from its `boot` hook. The kernel wires
|
|
6
|
+
* services by key, injects them into hook contexts under the plugin's local
|
|
7
|
+
* aliases, and fails loudly (coded errors) on unsatisfied needs or key
|
|
8
|
+
* collisions.
|
|
7
9
|
*
|
|
8
10
|
* Design constraints:
|
|
9
11
|
*
|
|
10
|
-
* - `configure` is SYNC. Returning a Promise is an error — the kernel
|
|
11
|
-
*
|
|
12
|
-
* -
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
import type {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/** Services this plugin publishes. */
|
|
27
|
-
services?: readonly {
|
|
28
|
-
name: string;
|
|
29
|
-
kind: ServiceKind;
|
|
30
|
-
}[];
|
|
31
|
-
/** Routes this plugin exposes. */
|
|
32
|
-
routes?: readonly {
|
|
33
|
-
id: string;
|
|
34
|
-
method?: string;
|
|
35
|
-
path?: string;
|
|
36
|
-
transport: RouteTransport;
|
|
37
|
-
}[];
|
|
38
|
-
/** Additional `provides` capability strings (joined with the plugin's `provides`). */
|
|
39
|
-
provides?: readonly string[];
|
|
40
|
-
/** Additional dependency edges. */
|
|
41
|
-
dependencies?: readonly {
|
|
42
|
-
to: string;
|
|
43
|
-
kind?: DependencyEdgeKind;
|
|
44
|
-
}[];
|
|
12
|
+
* - `configure` is SYNC. Returning a Promise is an error — the kernel
|
|
13
|
+
* throws {@link DotLifecycleError} with code `DOT_LIFECYCLE_E001`.
|
|
14
|
+
* - Declaration order IS boot order. The app builder's type-level guard
|
|
15
|
+
* makes out-of-order composition a compile error; the kernel re-validates
|
|
16
|
+
* at runtime for erased/dynamic composition.
|
|
17
|
+
* - `stop` and `dispose` run in reverse declaration order and continue
|
|
18
|
+
* through individual plugin failures, reporting an aggregate error.
|
|
19
|
+
*/
|
|
20
|
+
import type { ActionManifest, ProjectionManifest, JsonObject, ServiceKind } from './manifest.js';
|
|
21
|
+
declare const TypeOf: unique symbol;
|
|
22
|
+
/**
|
|
23
|
+
* Phantom type witness for a service. Carries `T` at the type level only —
|
|
24
|
+
* the runtime value is an empty object.
|
|
25
|
+
*/
|
|
26
|
+
export type Service<T> = {
|
|
27
|
+
readonly [TypeOf]?: T;
|
|
45
28
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
29
|
+
declare const LazyInner: unique symbol;
|
|
30
|
+
/**
|
|
31
|
+
* A lazy-lifting witness (create via {@link service.lazy}). The consumer
|
|
32
|
+
* always receives a `Lazy<T>` handle, regardless of whether the provider
|
|
33
|
+
* published a plain `T` (the kernel lifts it into a pre-initialized
|
|
34
|
+
* handle) or a `Lazy<T>` (passed through). This decouples consumers from
|
|
35
|
+
* the provider's eager-vs-lazy strategy.
|
|
36
|
+
*
|
|
37
|
+
* The phantom `Service<T | Lazy<T>>` base is what the wiring guard checks
|
|
38
|
+
* against — either provider shape satisfies it structurally.
|
|
39
|
+
*/
|
|
40
|
+
export type LazyService<T> = Service<T | Lazy<T>> & {
|
|
41
|
+
readonly lazy: true;
|
|
42
|
+
readonly [LazyInner]?: T;
|
|
51
43
|
};
|
|
52
|
-
/**
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Create an app-local (anonymous) service witness for a `needs` shape.
|
|
46
|
+
*
|
|
47
|
+
* `service.lazy<T>()` creates a lifting witness instead — the hook context
|
|
48
|
+
* delivers a `Lazy<T>` handle whether the provider is eager or lazy.
|
|
49
|
+
*/
|
|
50
|
+
export declare const service: (<T>() => Service<T>) & {
|
|
51
|
+
readonly lazy: <T>() => LazyService<T>;
|
|
52
|
+
};
|
|
53
|
+
/** Internal (kernel) check: is this witness a lazy-lifting one? */
|
|
54
|
+
export declare function isLazyWitness(witness: object): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Shared, named witness — a cross-package service contract. The `key` is
|
|
57
|
+
* the wire name used for satisfaction checks and runtime lookup; the local
|
|
58
|
+
* property name in a `needs` shape becomes a free-choice alias.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* // packages/db owns the contract:
|
|
63
|
+
* export const Db = token<NodePgDatabase<Schema>>()('arki.db');
|
|
64
|
+
*
|
|
65
|
+
* // any consumer, any local alias:
|
|
66
|
+
* const reports = plugin({
|
|
67
|
+
* name: 'reports',
|
|
68
|
+
* needs: { db: Db },
|
|
69
|
+
* async boot({ db }) { ... },
|
|
70
|
+
* });
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
export type Token<T, K extends string = string> = Service<T> & {
|
|
74
|
+
readonly key: K;
|
|
75
|
+
/** Derive a token for an additional instance of the same contract. */
|
|
76
|
+
instance<N extends string>(name: N): Token<T, `${K}#${N}`>;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Create a token. Curried so `T` is explicit while `K` is inferred as a
|
|
80
|
+
* literal: `const Db = token<DbHandle>()('arki.db')`.
|
|
81
|
+
*/
|
|
82
|
+
export declare function token<T>(): <K extends string>(key: K) => Token<T, K>;
|
|
83
|
+
/**
|
|
84
|
+
* Publish a value under a token's wire key. Returns a record typed by the
|
|
85
|
+
* token's literal key, so `boot: () => provide(Db, handle)` infers
|
|
86
|
+
* `TProvides = { 'arki.db': DbHandle }`.
|
|
87
|
+
*/
|
|
88
|
+
export declare function provide<T, K extends string>(tok: Token<T, K>, value: T): {
|
|
89
|
+
[P in K]: T;
|
|
90
|
+
};
|
|
91
|
+
/** Record of wire-keyed services. */
|
|
92
|
+
export type ServiceRecord = Record<string, unknown>;
|
|
93
|
+
/** Runtime brand for lazy service handles (kernel detects these for auto-dispose). */
|
|
94
|
+
export declare const LazyTag: unique symbol;
|
|
95
|
+
/**
|
|
96
|
+
* A lazily-initialized service handle. Publish one from `boot` to defer an
|
|
97
|
+
* expensive open until first use:
|
|
98
|
+
*
|
|
99
|
+
* ```ts
|
|
100
|
+
* boot: () => ({ db: lazy(() => openDb(), { dispose: db => db.close() }) })
|
|
101
|
+
* ```
|
|
102
|
+
*
|
|
103
|
+
* Laziness is visible in the type — consumers declare
|
|
104
|
+
* `needs: { db: service<Lazy<Db>>() }` and call `await db.get()`. The
|
|
105
|
+
* kernel auto-disposes initialized handles in reverse declaration order
|
|
106
|
+
* during `dispose` (and boot rollback), even when the publishing plugin has
|
|
107
|
+
* no `dispose` hook. A handle that was never `get()`ed never initializes
|
|
108
|
+
* and never runs cleanup.
|
|
109
|
+
*/
|
|
110
|
+
export type Lazy<T> = {
|
|
111
|
+
readonly [LazyTag]: true;
|
|
57
112
|
/**
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
113
|
+
* Initialize (once) and return the value. Concurrent callers share one
|
|
114
|
+
* attempt. A failed attempt is NOT cached — the next call retries.
|
|
115
|
+
* Throws if the handle has been disposed.
|
|
61
116
|
*/
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
path?: string;
|
|
68
|
-
transport: RouteTransport;
|
|
69
|
-
}): void;
|
|
70
|
-
/** Mark the plugin as participating in a lifecycle hook. */
|
|
71
|
-
registerLifecycleHook(hook: DotLifecycleHook): void;
|
|
72
|
-
/** Append `provides` capability strings. */
|
|
73
|
-
declareProvides(...capabilities: string[]): void;
|
|
74
|
-
/** Append an extra dependency edge (alongside `plugin.dependencies`). */
|
|
75
|
-
declareDependency(to: string, kind?: DependencyEdgeKind): void;
|
|
76
|
-
};
|
|
77
|
-
/** Context provided to a `boot` hook. */
|
|
78
|
-
export type DotBootContext = {
|
|
79
|
-
pluginName: string;
|
|
80
|
-
appName: string;
|
|
117
|
+
get(): Promise<T>;
|
|
118
|
+
/** True once an initialization attempt has succeeded. */
|
|
119
|
+
readonly initialized: boolean;
|
|
120
|
+
/** The value if initialized, else `undefined`. Never triggers initialization. */
|
|
121
|
+
peek(): T | undefined;
|
|
81
122
|
/**
|
|
82
|
-
*
|
|
83
|
-
*
|
|
123
|
+
* Run cleanup if initialized (awaits an in-flight initialization first).
|
|
124
|
+
* Idempotent. Called automatically by the kernel for published handles.
|
|
84
125
|
*/
|
|
85
|
-
|
|
86
|
-
/** Read-only configuration bag. */
|
|
87
|
-
config: Readonly<Record<string, unknown>>;
|
|
126
|
+
dispose(): Promise<void>;
|
|
88
127
|
};
|
|
89
|
-
/**
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
128
|
+
/**
|
|
129
|
+
* Create a lazy service handle. See {@link Lazy} for semantics.
|
|
130
|
+
*
|
|
131
|
+
* @param init - Opens the resource. Runs at most once concurrently; a
|
|
132
|
+
* rejected attempt is not cached, so a later `get()` retries.
|
|
133
|
+
* @param options.dispose - Cleanup for the initialized value. Skipped when
|
|
134
|
+
* the handle was never initialized.
|
|
135
|
+
*/
|
|
136
|
+
export declare function lazy<T>(init: () => Promise<T> | T, options?: {
|
|
137
|
+
readonly dispose?: (value: T) => Promise<void> | void;
|
|
138
|
+
}): Lazy<T>;
|
|
139
|
+
/** Type guard: is this published value a lazy service handle? */
|
|
140
|
+
export declare function isLazy(value: unknown): value is Lazy<unknown>;
|
|
141
|
+
/**
|
|
142
|
+
* Wrap an already-available value in a pre-initialized `Lazy<T>` handle.
|
|
143
|
+
* Used by the kernel to lift eager provides for `service.lazy` consumers;
|
|
144
|
+
* also handy for handing fakes to lazy-consuming plugins in tests. The handle
|
|
145
|
+
* has no cleanup of its own — the underlying value's lifecycle belongs to
|
|
146
|
+
* whoever created it.
|
|
147
|
+
*/
|
|
148
|
+
export declare function lazyOf<T>(value: T): Lazy<T>;
|
|
149
|
+
/** A `needs` declaration: local alias → witness (anonymous or token). */
|
|
150
|
+
export type NeedsShape = Record<string, Service<unknown>>;
|
|
151
|
+
export type EmptyShape = {};
|
|
152
|
+
/**
|
|
153
|
+
* Local-alias view of a needs shape — what lifecycle hooks destructure.
|
|
154
|
+
* `{ cache: Token<KV, 'arki.kv'> }` → `{ cache: KV }`.
|
|
155
|
+
* `{ search: service.lazy<S>() }` → `{ search: Lazy<S> }`.
|
|
156
|
+
*/
|
|
157
|
+
export type CtxOf<S extends NeedsShape> = {
|
|
158
|
+
[K in keyof S]: S[K] extends LazyService<infer T> ? Lazy<T> : S[K] extends Service<infer T> ? T : never;
|
|
94
159
|
};
|
|
95
|
-
/**
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
160
|
+
/**
|
|
161
|
+
* Wire-key view of a needs shape — what the app builder checks
|
|
162
|
+
* satisfaction against. Tokens contribute their owned key; anonymous
|
|
163
|
+
* witnesses contribute the property name.
|
|
164
|
+
* `{ cache: Token<KV, 'arki.kv'> }` → `{ 'arki.kv': KV }`.
|
|
165
|
+
*/
|
|
166
|
+
export type WireNeeds<S extends NeedsShape> = {
|
|
167
|
+
[K in keyof S as S[K] extends Token<unknown, infer WK> ? WK : K]: S[K] extends Service<infer T> ? T : never;
|
|
100
168
|
};
|
|
101
|
-
/**
|
|
102
|
-
|
|
169
|
+
/**
|
|
170
|
+
* No `$`-prefixed keys — that prefix is the kernel context namespace
|
|
171
|
+
* ({@link KernelCtx}). Used as a constraint on needs shapes and provides
|
|
172
|
+
* records: a matching key makes the property type `never`, which no
|
|
173
|
+
* witness or service value satisfies, so the violation errors at the
|
|
174
|
+
* exact offending property. The kernel re-validates at runtime with
|
|
175
|
+
* `DOT_LIFECYCLE_E014` for paths the constraint cannot see (renames,
|
|
176
|
+
* erased plugins).
|
|
177
|
+
*/
|
|
178
|
+
export type NoReservedKeys = Readonly<Record<`$${string}`, never>>;
|
|
179
|
+
/**
|
|
180
|
+
* Kernel-supplied context keys, present in every service-carrying hook
|
|
181
|
+
* context. The `$` prefix is a reserved namespace: `plugin()` rejects
|
|
182
|
+
* `$`-prefixed needs aliases and publish keys at compile time (via
|
|
183
|
+
* {@link NoReservedKeys}) and the kernel enforces it at runtime
|
|
184
|
+
* (`DOT_LIFECYCLE_E014`), so these keys can never be shadowed.
|
|
185
|
+
*/
|
|
186
|
+
export type KernelCtx = {
|
|
187
|
+
/** App name (passed to `defineApp`). */
|
|
188
|
+
readonly $app: string;
|
|
189
|
+
/** This plugin's name. */
|
|
190
|
+
readonly $plugin: string;
|
|
191
|
+
/** Read-only runtime config bag from `defineApp(name, { config })`. */
|
|
192
|
+
readonly $config: Readonly<Record<string, unknown>>;
|
|
193
|
+
};
|
|
194
|
+
/** Context provided to a `configure` hook (sync registration only). */
|
|
195
|
+
export type ActionDeclaration = Omit<ActionManifest, 'plugin'>;
|
|
196
|
+
/** Structural protocol for adapter-owned declarations. */
|
|
197
|
+
export type ActionSource = ActionDeclaration | {
|
|
198
|
+
toDotAction(): ActionDeclaration;
|
|
199
|
+
};
|
|
200
|
+
export type ProjectionDeclaration = Omit<ProjectionManifest, 'plugin'>;
|
|
201
|
+
type LegacyRouteDeclaration = {
|
|
202
|
+
id: string;
|
|
203
|
+
method?: string;
|
|
204
|
+
path?: string;
|
|
205
|
+
transport: string;
|
|
206
|
+
description?: string;
|
|
207
|
+
input?: {
|
|
208
|
+
readonly query?: Readonly<JsonObject>;
|
|
209
|
+
readonly body?: Readonly<JsonObject>;
|
|
210
|
+
};
|
|
211
|
+
output?: Readonly<JsonObject>;
|
|
212
|
+
streaming?: boolean;
|
|
213
|
+
};
|
|
214
|
+
export type DotConfigureContext = {
|
|
103
215
|
pluginName: string;
|
|
216
|
+
/** App name. */
|
|
104
217
|
appName: string;
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
218
|
+
/**
|
|
219
|
+
* Register a service this plugin publishes, for manifest/diagnostics
|
|
220
|
+
* purposes. Registration is metadata-only — the actual service instance
|
|
221
|
+
* is returned from the `boot` hook.
|
|
222
|
+
*/
|
|
223
|
+
registerService(name: string, kind: ServiceKind): void;
|
|
224
|
+
/** Register an action this plugin contributes at an app boundary. */
|
|
225
|
+
registerAction(action: ActionDeclaration): void;
|
|
226
|
+
/** Register a projection renderer this plugin contributes. */
|
|
227
|
+
registerProjection(projection: ProjectionDeclaration): void;
|
|
228
|
+
/** @deprecated Use `registerAction`; removed in DOT 0.5.0. */
|
|
229
|
+
registerRoute(route: LegacyRouteDeclaration): void;
|
|
230
|
+
/** Mark the plugin as participating in a lifecycle hook. */
|
|
231
|
+
registerLifecycleHook(hook: 'configure' | 'boot' | 'start' | 'stop' | 'dispose'): void;
|
|
232
|
+
/** Append `provides` capability strings (informational, manifest-only). */
|
|
233
|
+
declareProvides(...capabilities: string[]): void;
|
|
111
234
|
};
|
|
235
|
+
type MaybePromise<T> = T | Promise<T>;
|
|
236
|
+
declare const NeedsSym: unique symbol;
|
|
237
|
+
declare const ProvidesSym: unique symbol;
|
|
112
238
|
/**
|
|
113
|
-
* The DOT plugin
|
|
239
|
+
* The DOT plugin (v2). Author through {@link plugin} — never construct directly.
|
|
240
|
+
*
|
|
241
|
+
* Hook signatures are type-erased here (`ctx: never`): the typed view
|
|
242
|
+
* lives on `plugin()`'s parameter, and `(ctx: Typed) => R` is assignable to
|
|
243
|
+
* `(ctx: never) => R` without casts (parameter contravariance from the
|
|
244
|
+
* bottom type). The kernel crosses the erasure boundary at the call site.
|
|
114
245
|
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
* full contribution shape.
|
|
246
|
+
* The phantom symbol properties carry `TNeeds` / `TProvides` for the app
|
|
247
|
+
* builder's compile-time wiring check; they never exist at runtime.
|
|
118
248
|
*/
|
|
119
|
-
export type
|
|
249
|
+
export type Plugin<TNeeds extends ServiceRecord = ServiceRecord, TProvides extends ServiceRecord = ServiceRecord> = {
|
|
120
250
|
/** Unique identifier for this plugin within the app. */
|
|
121
|
-
name: string;
|
|
251
|
+
readonly name: string;
|
|
122
252
|
/** Optional semantic version string. */
|
|
123
|
-
version?: string;
|
|
124
|
-
/**
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
* SYNC registration hook. Declare metadata, register routes/services/jobs.
|
|
139
|
-
* MUST NOT perform IO, MUST NOT return a Promise.
|
|
140
|
-
*/
|
|
141
|
-
configure?: (ctx: DotConfigureContext) => void;
|
|
142
|
-
/** Async open-resources hook. Returns published services for DI. */
|
|
143
|
-
boot?: (ctx: DotBootContext) => Promise<DotBootResult<TServices>> | DotBootResult<TServices>;
|
|
144
|
-
/** Async begin-active-work hook. Runs after every plugin's `boot` succeeds. */
|
|
145
|
-
start?: (ctx: DotStartContext<TServices>) => Promise<void> | void;
|
|
146
|
-
/** Async halt-active-work hook. Runs in reverse-topological order. */
|
|
147
|
-
stop?: (ctx: DotStopContext<TServices>) => Promise<void> | void;
|
|
148
|
-
/** Async release-resources hook. Runs in reverse-topological order. */
|
|
149
|
-
dispose?: (ctx: DotDisposeContext<TServices>) => Promise<void> | void;
|
|
253
|
+
readonly version?: string;
|
|
254
|
+
/** Runtime needs shape (local alias → witness). */
|
|
255
|
+
readonly needs: NeedsShape;
|
|
256
|
+
readonly actions: readonly ActionSource[];
|
|
257
|
+
/** Mount-time renames: publish key → new wire key (see {@link rename}). */
|
|
258
|
+
readonly renames: Readonly<Record<string, string>>;
|
|
259
|
+
readonly hooks: {
|
|
260
|
+
readonly configure?: (ctx: DotConfigureContext) => void;
|
|
261
|
+
readonly boot?: (ctx: never) => MaybePromise<ServiceRecord | void>;
|
|
262
|
+
readonly start?: (ctx: never) => MaybePromise<void>;
|
|
263
|
+
readonly stop?: (ctx: never) => MaybePromise<void>;
|
|
264
|
+
readonly dispose?: (ctx: never) => MaybePromise<void>;
|
|
265
|
+
};
|
|
266
|
+
readonly [NeedsSym]?: TNeeds;
|
|
267
|
+
readonly [ProvidesSym]?: TProvides;
|
|
150
268
|
};
|
|
269
|
+
/** Extract a plugin's (wire-keyed) needs record. */
|
|
270
|
+
export type PluginNeeds<P> = P extends Plugin<infer N, ServiceRecord> ? N : never;
|
|
271
|
+
/** Extract a plugin's (wire-keyed) provides record. */
|
|
272
|
+
export type PluginProvides<P> = P extends Plugin<ServiceRecord, infer Pr> ? Pr : never;
|
|
273
|
+
/** Internal type alias used by the kernel to erase plugin service generics. */
|
|
274
|
+
export type AnyPlugin = Plugin<ServiceRecord, ServiceRecord>;
|
|
151
275
|
/**
|
|
152
|
-
*
|
|
276
|
+
* Author a DOT plugin.
|
|
277
|
+
*
|
|
278
|
+
* - `TShape` is inferred from the `needs` object literal.
|
|
279
|
+
* - `TProvides` is inferred from `boot`'s return type — no generic argument.
|
|
280
|
+
* - `boot({ db, log, $app })` destructures typed services under the local
|
|
281
|
+
* aliases declared in `needs`, plus the `$`-prefixed kernel keys.
|
|
282
|
+
* - `start` / `stop` / `dispose` additionally receive the plugin's own
|
|
283
|
+
* provides. Reverse-order teardown guarantees needs are still alive in
|
|
284
|
+
* `dispose`.
|
|
153
285
|
*
|
|
154
286
|
* @example
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
287
|
+
* ```ts
|
|
288
|
+
* export const billing = plugin({
|
|
289
|
+
* name: 'billing',
|
|
290
|
+
* needs: { db: service<Db>(), log: service<Logger>() },
|
|
291
|
+
* async boot({ db, log }) {
|
|
292
|
+
* return { billing: new BillingService(db, log) };
|
|
160
293
|
* },
|
|
161
|
-
* async dispose({
|
|
162
|
-
* await
|
|
294
|
+
* async dispose({ billing }) {
|
|
295
|
+
* await billing.flush();
|
|
163
296
|
* },
|
|
164
297
|
* });
|
|
298
|
+
* ```
|
|
165
299
|
*/
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
300
|
+
/**
|
|
301
|
+
* A `boot` that returns `void` gives `TProvides` no inference candidate,
|
|
302
|
+
* and TypeScript then substitutes the CONSTRAINT (`ServiceRecord & …`,
|
|
303
|
+
* whose `keyof` is `string`) rather than the declared default. That wide
|
|
304
|
+
* record would poison the app builder's collision check for every later
|
|
305
|
+
* `.use()` — `keyof TAvail & string` is never empty. Detect the fallback
|
|
306
|
+
* by its tell (a full string index signature — no `plugin()`-authored
|
|
307
|
+
* provides record has one) and collapse it to "provides nothing".
|
|
308
|
+
*/
|
|
309
|
+
export type InferredProvides<TP extends ServiceRecord> = string extends keyof TP ? EmptyShape : TP;
|
|
310
|
+
export declare function plugin<TShape extends NeedsShape & NoReservedKeys = EmptyShape, TProvides extends ServiceRecord & NoReservedKeys = EmptyShape>(def: {
|
|
311
|
+
readonly name: string;
|
|
312
|
+
readonly version?: string;
|
|
313
|
+
readonly needs?: TShape;
|
|
314
|
+
readonly actions?: readonly ActionSource[];
|
|
315
|
+
readonly configure?: (ctx: DotConfigureContext) => void;
|
|
316
|
+
readonly boot?: (ctx: CtxOf<TShape> & KernelCtx) => MaybePromise<TProvides | void>;
|
|
317
|
+
readonly start?: (ctx: CtxOf<TShape> & TProvides & KernelCtx) => MaybePromise<void>;
|
|
318
|
+
readonly stop?: (ctx: CtxOf<TShape> & TProvides & KernelCtx) => MaybePromise<void>;
|
|
319
|
+
readonly dispose?: (ctx: CtxOf<TShape> & TProvides & KernelCtx) => MaybePromise<void>;
|
|
320
|
+
}): Plugin<WireNeeds<TShape>, InferredProvides<TProvides>>;
|
|
321
|
+
/** Rename a plugin's published wire keys — the multi-instance primitive. */
|
|
322
|
+
export type RenamedProvides<TP, M> = {
|
|
323
|
+
[K in keyof TP as K extends keyof M ? (M[K] extends string ? M[K] : K) : K]: TP[K];
|
|
324
|
+
};
|
|
325
|
+
/**
|
|
326
|
+
* Mount-time rename. `rename(dbPlugin, { db: 'reportsDb' }, 'reports-db')`
|
|
327
|
+
* publishes the same service under a different wire key, retyped
|
|
328
|
+
* accordingly — the way to mount a second instance of an adapter without
|
|
329
|
+
* a key collision. Renames compose: renaming an already-renamed key
|
|
330
|
+
* rewrites the earlier entry.
|
|
331
|
+
*/
|
|
332
|
+
export declare function rename<TN extends ServiceRecord, TP extends ServiceRecord, const M extends {
|
|
333
|
+
readonly [K in keyof TP]?: string;
|
|
334
|
+
}>(p: Plugin<TN, TP>, map: M, newName?: string): Plugin<TN, RenamedProvides<TP, M>>;
|
|
335
|
+
/**
|
|
336
|
+
* Stable error thrown by DOT plugin adapters.
|
|
337
|
+
*
|
|
338
|
+
* Adapters MUST throw `DotPluginError` (not raw `Error`) when surfacing a
|
|
339
|
+
* misconfiguration, missing-input, or other fail-fast condition. Consumers
|
|
340
|
+
* and coding agents can then match on a stable `code`, follow `docsUrl`,
|
|
341
|
+
* and apply `remediation` without parsing the message.
|
|
342
|
+
*
|
|
343
|
+
* Codes are per-adapter. Recommended prefix is `<PKG>_PLUGIN_E<NNN>` (e.g.
|
|
344
|
+
* `KV_PLUGIN_E001`, `DB_PLUGIN_E001`). The kernel does not own the code
|
|
345
|
+
* namespace — each adapter defines its own constants and links them in
|
|
346
|
+
* its README.
|
|
347
|
+
*
|
|
348
|
+
* @see packages/dot/docs/principles.md — principle 1.3 ("errors are part
|
|
349
|
+
* of the API") and principle 4 ("agent-discoverable everywhere").
|
|
350
|
+
*/
|
|
351
|
+
export declare class DotPluginError extends Error {
|
|
352
|
+
/** Stable error code, e.g. `KV_PLUGIN_E001`. */
|
|
353
|
+
readonly code: string;
|
|
354
|
+
/** One-sentence guidance on how to fix the underlying problem. */
|
|
355
|
+
readonly remediation: string;
|
|
356
|
+
/** URL of the documentation page that explains this error. */
|
|
357
|
+
readonly docsUrl: string;
|
|
358
|
+
constructor(args: {
|
|
359
|
+
readonly code: string;
|
|
360
|
+
readonly message: string;
|
|
361
|
+
readonly remediation: string;
|
|
362
|
+
readonly docsUrl: string;
|
|
363
|
+
});
|
|
364
|
+
}
|
|
173
365
|
/** Re-exported for downstream typing. */
|
|
174
|
-
export { type DotAppManifest, type PluginManifest } from './manifest.js';
|
|
366
|
+
export { type ActionManifest, type DotAppManifest, type PluginManifest, type ProjectionManifest } from './manifest.js';
|
|
175
367
|
//# sourceMappingURL=plugin-contract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-contract.d.ts","sourceRoot":"","sources":["../src/plugin-contract.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"plugin-contract.d.ts","sourceRoot":"","sources":["../src/plugin-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjG,OAAO,CAAC,MAAM,MAAM,EAAE,OAAO,MAAM,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