@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
package/README.md
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
> TypeScript-first application composition framework for the ARKI package family.
|
|
4
4
|
|
|
5
|
-
`@arki/dot` is the kernel that wires **
|
|
5
|
+
`@arki/dot` is the kernel that wires **plugins**, lifecycle hooks, dependency
|
|
6
6
|
injection, and diagnostics into a deterministic application boot. It gives
|
|
7
7
|
library authors a stable contract for declaring how their package
|
|
8
8
|
participates in an app, and gives app developers a single place to wire
|
|
9
9
|
those packages together — with the type checker verifying the wiring before
|
|
10
10
|
anything runs.
|
|
11
11
|
|
|
12
|
-
## What is a
|
|
12
|
+
## What is a plugin?
|
|
13
13
|
|
|
14
|
-
A **
|
|
15
|
-
lifecycle-aware piece of an application. Each
|
|
14
|
+
A **plugin** is the unit a DOT app is built from — one self-describing,
|
|
15
|
+
lifecycle-aware piece of an application. Each plugin:
|
|
16
16
|
|
|
17
17
|
- declares a **name**, **version**, and the services it **needs** as a shape
|
|
18
18
|
of type witnesses;
|
|
@@ -20,38 +20,38 @@ lifecycle-aware piece of an application. Each pip:
|
|
|
20
20
|
are *inferred from the return type*, never declared separately;
|
|
21
21
|
- runs a **5-hook lifecycle** — `configure` → `boot` → `start` → `stop` → `dispose`;
|
|
22
22
|
- **publishes typed services** to a shared, type-safe registry that later
|
|
23
|
-
|
|
24
|
-
- **composes deterministically** —
|
|
23
|
+
plugins can read from;
|
|
24
|
+
- **composes deterministically** — plugins boot in declaration order and
|
|
25
25
|
dispose in reverse.
|
|
26
26
|
|
|
27
27
|
The name comes from the small dots on dice, dominoes, and music notation:
|
|
28
|
-
each
|
|
29
|
-
app its value. Two
|
|
30
|
-
|
|
28
|
+
each plugin is one small mark, and the *combination* of plugins is what gives the
|
|
29
|
+
app its value. Two plugins on a die make a value of two; six plugins make six. The
|
|
30
|
+
plugins **are** the app — not optional add-ons to a hidden core.
|
|
31
31
|
|
|
32
32
|
```ts
|
|
33
33
|
import { defineApp } from '@arki/dot';
|
|
34
|
-
import { env } from '@arki/env/dot'; // env
|
|
35
|
-
import { db } from '@arki/db/dot'; // db
|
|
36
|
-
import { kv } from '@arki/kv/dot'; // kv
|
|
34
|
+
import { env } from '@arki/env/dot'; // env plugin
|
|
35
|
+
import { db } from '@arki/db/dot'; // db plugin
|
|
36
|
+
import { kv } from '@arki/kv/dot'; // kv plugin
|
|
37
37
|
|
|
38
38
|
const app = await defineApp('orders')
|
|
39
|
-
.use(env({ schema: { /* ... */ } })) // 1st
|
|
40
|
-
.use(db({ relations })) // 2nd
|
|
41
|
-
.use(kv({ url: process.env.KV_URL! })) // 3rd
|
|
42
|
-
.boot(); //
|
|
39
|
+
.use(env({ schema: { /* ... */ } })) // 1st plugin — provides services.env
|
|
40
|
+
.use(db({ relations })) // 2nd plugin — provides services.db
|
|
41
|
+
.use(kv({ url: process.env.KV_URL! })) // 3rd plugin — provides services.kv
|
|
42
|
+
.boot(); // plugins boot in declaration order
|
|
43
43
|
|
|
44
44
|
await app.services.db.query(/* ... */);
|
|
45
|
-
await app.dispose(); //
|
|
45
|
+
await app.dispose(); // plugins dispose in REVERSE order
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
Each `/dot` subpath exports a **
|
|
49
|
-
the framework the adapter targets (DOT), not the unit (which is a
|
|
48
|
+
Each `/dot` subpath exports a **plugin** for that package. The subpath names
|
|
49
|
+
the framework the adapter targets (DOT), not the unit (which is a plugin).
|
|
50
50
|
|
|
51
51
|
> **Why not "plugin"?** Plugins suggest *optional add-ons* to a core. DOT's
|
|
52
|
-
> reality is the opposite: there is no hidden core — the
|
|
53
|
-
> "
|
|
54
|
-
> (a dot, a
|
|
52
|
+
> reality is the opposite: there is no hidden core — the plugins *are* the app.
|
|
53
|
+
> "Plugin" names that truth, and ties the framework to the DOT name etymologically
|
|
54
|
+
> (a dot, a plugin, a small mark that gains meaning by combining with others).
|
|
55
55
|
|
|
56
56
|
## Installation
|
|
57
57
|
|
|
@@ -64,11 +64,11 @@ bun add @arki/dot
|
|
|
64
64
|
## Quick start
|
|
65
65
|
|
|
66
66
|
```ts
|
|
67
|
-
import { defineApp,
|
|
67
|
+
import { defineApp, plugin, service } from '@arki/dot';
|
|
68
68
|
|
|
69
69
|
type Db = { query(sql: string): Promise<unknown[]> };
|
|
70
70
|
|
|
71
|
-
const
|
|
71
|
+
const dbPlugin = plugin({
|
|
72
72
|
name: 'database',
|
|
73
73
|
async boot() {
|
|
74
74
|
const db = await openDb(process.env.DATABASE_URL);
|
|
@@ -79,7 +79,7 @@ const dbPip = pip({
|
|
|
79
79
|
},
|
|
80
80
|
});
|
|
81
81
|
|
|
82
|
-
const
|
|
82
|
+
const billingPlugin = plugin({
|
|
83
83
|
name: 'billing',
|
|
84
84
|
version: '1.0.0',
|
|
85
85
|
needs: { db: service<Db>() }, // typed injection — destructure in hooks
|
|
@@ -87,7 +87,7 @@ const billingPip = pip({
|
|
|
87
87
|
// Validate config, register schemas, no I/O.
|
|
88
88
|
},
|
|
89
89
|
async boot({ db }) {
|
|
90
|
-
// Open connections. The return value IS what this
|
|
90
|
+
// Open connections. The return value IS what this plugin provides.
|
|
91
91
|
return { stripe: makeStripeClient(db) };
|
|
92
92
|
},
|
|
93
93
|
async start({ stripe }) {
|
|
@@ -102,8 +102,8 @@ const billingPip = pip({
|
|
|
102
102
|
});
|
|
103
103
|
|
|
104
104
|
const app = await defineApp('acme')
|
|
105
|
-
.use(
|
|
106
|
-
.use(
|
|
105
|
+
.use(dbPlugin) // providers before consumers — enforced at compile time
|
|
106
|
+
.use(billingPlugin)
|
|
107
107
|
.start();
|
|
108
108
|
|
|
109
109
|
// app.manifest, app.diagnostics — agent-friendly envelopes.
|
|
@@ -125,21 +125,21 @@ carries `T` at the type level. The property name you give it is your local
|
|
|
125
125
|
alias *and* (for anonymous witnesses) the wire key:
|
|
126
126
|
|
|
127
127
|
```ts
|
|
128
|
-
const search =
|
|
128
|
+
const search = plugin({
|
|
129
129
|
name: 'search',
|
|
130
130
|
needs: {
|
|
131
131
|
db: service<Db>(), // wire key 'db', local alias 'db'
|
|
132
132
|
log: service<Logger>(), // wire key 'log'
|
|
133
133
|
},
|
|
134
|
-
async boot({ db, log, $app }) { // $app/$
|
|
134
|
+
async boot({ db, log, $app }) { // $app/$plugin/$config: kernel context
|
|
135
135
|
log.info(`indexing for ${$app}`);
|
|
136
136
|
return { search: await buildIndex(db) };
|
|
137
137
|
},
|
|
138
138
|
});
|
|
139
139
|
```
|
|
140
140
|
|
|
141
|
-
`start`, `stop`, and `dispose` additionally receive the
|
|
142
|
-
provides** — and because teardown runs in reverse declaration order, a
|
|
141
|
+
`start`, `stop`, and `dispose` additionally receive the plugin's **own
|
|
142
|
+
provides** — and because teardown runs in reverse declaration order, a plugin's
|
|
143
143
|
needs are still alive in its `dispose`:
|
|
144
144
|
|
|
145
145
|
```ts
|
|
@@ -166,12 +166,12 @@ defineApp('shop')
|
|
|
166
166
|
Reordering the first example — or `rename`-ing one provider in the second —
|
|
167
167
|
makes both compile. The kernel re-validates at runtime with coded errors
|
|
168
168
|
(`E012` unsatisfied need, `E013` collision, `E014` reserved key) for
|
|
169
|
-
erased/dynamic composition, with full rollback of already-booted
|
|
169
|
+
erased/dynamic composition, with full rollback of already-booted plugins.
|
|
170
170
|
|
|
171
171
|
There is no dependency graph to debug and **cycles are unrepresentable**:
|
|
172
|
-
services flow strictly forward through the `.use()` chain. If two
|
|
172
|
+
services flow strictly forward through the `.use()` chain. If two plugins need
|
|
173
173
|
each other's services, that's a design smell the type system surfaces
|
|
174
|
-
immediately — merge them, or extract the shared piece into a third
|
|
174
|
+
immediately — merge them, or extract the shared piece into a third plugin both
|
|
175
175
|
consume.
|
|
176
176
|
|
|
177
177
|
### Tokens — cross-package service contracts
|
|
@@ -185,7 +185,7 @@ alias becomes free choice:
|
|
|
185
185
|
export const Db = token<NodePgDatabase<Schema>>()('arki.db');
|
|
186
186
|
|
|
187
187
|
// A provider publishes under the token's key:
|
|
188
|
-
const database =
|
|
188
|
+
const database = plugin({
|
|
189
189
|
name: 'database',
|
|
190
190
|
async boot() {
|
|
191
191
|
return provide(Db, await connect()); // → { 'arki.db': NodePgDatabase }
|
|
@@ -193,7 +193,7 @@ const database = pip({
|
|
|
193
193
|
});
|
|
194
194
|
|
|
195
195
|
// Any consumer, any package, any local alias:
|
|
196
|
-
const reports =
|
|
196
|
+
const reports = plugin({
|
|
197
197
|
name: 'reports',
|
|
198
198
|
needs: { warehouse: Db }, // wire key 'arki.db', alias yours
|
|
199
199
|
async boot({ warehouse }) { /* ... */ },
|
|
@@ -214,9 +214,9 @@ const app = await defineApp('shop')
|
|
|
214
214
|
.use(rename(
|
|
215
215
|
database({ url: REPLICA_URL }),
|
|
216
216
|
{ 'arki.db': ReportsDb.key }, // republish under the derived key
|
|
217
|
-
'reports-db', // distinct
|
|
217
|
+
'reports-db', // distinct plugin name
|
|
218
218
|
))
|
|
219
|
-
.use(
|
|
219
|
+
.use(plugin({
|
|
220
220
|
name: 'analytics',
|
|
221
221
|
needs: { primary: Db, replica: ReportsDb },
|
|
222
222
|
async boot({ primary, replica }) { /* two live instances, both typed */ },
|
|
@@ -233,10 +233,10 @@ checks see the final keys.
|
|
|
233
233
|
resource. Initialization runs on first `get()` (memoized, single-flight;
|
|
234
234
|
failed attempts retry). Never-touched handles never initialize — and the
|
|
235
235
|
kernel auto-disposes initialized ones during teardown, *after* the
|
|
236
|
-
publishing
|
|
236
|
+
publishing plugin's own `dispose` hook, even if that plugin has none:
|
|
237
237
|
|
|
238
238
|
```ts
|
|
239
|
-
const search =
|
|
239
|
+
const search = plugin({
|
|
240
240
|
name: 'search',
|
|
241
241
|
async boot() {
|
|
242
242
|
return {
|
|
@@ -253,7 +253,7 @@ Consumers that shouldn't care whether a provider is eager or lazy declare a
|
|
|
253
253
|
handle, wrapping eager provides and passing lazy ones through by identity:
|
|
254
254
|
|
|
255
255
|
```ts
|
|
256
|
-
const suggestions =
|
|
256
|
+
const suggestions = plugin({
|
|
257
257
|
name: 'suggestions',
|
|
258
258
|
needs: { search: service.lazy<SearchClient>() },
|
|
259
259
|
async start({ search }) {
|
|
@@ -268,20 +268,20 @@ consumer — the wiring guard accepts both shapes against the same witness.
|
|
|
268
268
|
|
|
269
269
|
### Kernel context — the reserved `$` namespace
|
|
270
270
|
|
|
271
|
-
Every service-carrying hook context includes `$app` (app name), `$
|
|
271
|
+
Every service-carrying hook context includes `$app` (app name), `$plugin` (plugin
|
|
272
272
|
name), and `$config` (the `defineApp(name, { config })` bag). The `$` prefix
|
|
273
|
-
is enforced as reserved: `
|
|
273
|
+
is enforced as reserved: `plugin()` rejects `$`-prefixed needs aliases and
|
|
274
274
|
publish keys at compile time, and the kernel re-validates at runtime
|
|
275
275
|
(`DOT_LIFECYCLE_E014`) — kernel keys can never be shadowed.
|
|
276
276
|
|
|
277
277
|
## A complex setup
|
|
278
278
|
|
|
279
279
|
A distilled commerce platform showing everything above working together.
|
|
280
|
-
(The package's stress-test suite boots a 28-
|
|
280
|
+
(The package's stress-test suite boots a 28-plugin version of this and asserts
|
|
281
281
|
exact boot/teardown ordering.)
|
|
282
282
|
|
|
283
283
|
```ts
|
|
284
|
-
import { defineApp, lazy,
|
|
284
|
+
import { defineApp, lazy, plugin, provide, rename, service, token } from '@arki/dot';
|
|
285
285
|
|
|
286
286
|
// ── contracts.ts — tokens owned by their respective packages ─────────
|
|
287
287
|
export const Env = token<AppEnv>()('shop.env');
|
|
@@ -290,13 +290,13 @@ export const ReportsDb = Db.instance('reports');
|
|
|
290
290
|
export const Cache = token<CacheHandle>()('shop.cache');
|
|
291
291
|
export const Bus = token<MessageBus>()('shop.bus');
|
|
292
292
|
|
|
293
|
-
// ── infrastructure
|
|
294
|
-
const env =
|
|
293
|
+
// ── infrastructure plugins ───────────────────────────────────────────────
|
|
294
|
+
const env = plugin({
|
|
295
295
|
name: 'env',
|
|
296
296
|
boot: ({ $config }) => provide(Env, parseEnv($config)),
|
|
297
297
|
});
|
|
298
298
|
|
|
299
|
-
const telemetry =
|
|
299
|
+
const telemetry = plugin({
|
|
300
300
|
name: 'telemetry',
|
|
301
301
|
needs: { env: Env },
|
|
302
302
|
boot: ({ env }) => ({ metrics: makeMetrics(env.OTEL_ENDPOINT) }),
|
|
@@ -304,7 +304,7 @@ const telemetry = pip({
|
|
|
304
304
|
});
|
|
305
305
|
|
|
306
306
|
const database = (url: string) =>
|
|
307
|
-
|
|
307
|
+
plugin({
|
|
308
308
|
name: 'database',
|
|
309
309
|
needs: { metrics: service<Metrics>() },
|
|
310
310
|
async boot({ metrics }) {
|
|
@@ -315,14 +315,14 @@ const database = (url: string) =>
|
|
|
315
315
|
},
|
|
316
316
|
});
|
|
317
317
|
|
|
318
|
-
const cache =
|
|
318
|
+
const cache = plugin({
|
|
319
319
|
name: 'cache',
|
|
320
320
|
needs: { env: Env },
|
|
321
321
|
boot: ({ env }) => provide(Cache, connectRedis(env.REDIS_URL)),
|
|
322
322
|
dispose: async ctx => ctx[Cache.key].quit(),
|
|
323
323
|
});
|
|
324
324
|
|
|
325
|
-
const searchCluster =
|
|
325
|
+
const searchCluster = plugin({
|
|
326
326
|
name: 'search-cluster',
|
|
327
327
|
needs: { env: Env },
|
|
328
328
|
boot: ({ env }) => ({
|
|
@@ -333,13 +333,13 @@ const searchCluster = pip({
|
|
|
333
333
|
}),
|
|
334
334
|
});
|
|
335
335
|
|
|
336
|
-
const bus =
|
|
336
|
+
const bus = plugin({
|
|
337
337
|
name: 'bus',
|
|
338
338
|
boot: () => provide(Bus, makeInMemoryBus()),
|
|
339
339
|
});
|
|
340
340
|
|
|
341
|
-
// ── domain
|
|
342
|
-
const catalog =
|
|
341
|
+
// ── domain plugins ───────────────────────────────────────────────────────
|
|
342
|
+
const catalog = plugin({
|
|
343
343
|
name: 'catalog',
|
|
344
344
|
needs: {
|
|
345
345
|
db: Db,
|
|
@@ -351,7 +351,7 @@ const catalog = pip({
|
|
|
351
351
|
}),
|
|
352
352
|
});
|
|
353
353
|
|
|
354
|
-
const checkout =
|
|
354
|
+
const checkout = plugin({
|
|
355
355
|
name: 'checkout',
|
|
356
356
|
needs: { db: Db, bus: Bus, catalog: service<Catalog>() },
|
|
357
357
|
boot: ({ db, bus, catalog }) => ({
|
|
@@ -359,14 +359,14 @@ const checkout = pip({
|
|
|
359
359
|
}),
|
|
360
360
|
});
|
|
361
361
|
|
|
362
|
-
const reporting =
|
|
362
|
+
const reporting = plugin({
|
|
363
363
|
name: 'reporting',
|
|
364
364
|
needs: { replica: ReportsDb, catalog: service<Catalog>() },
|
|
365
365
|
boot: ({ replica, catalog }) => ({ reporting: makeReporting(replica, catalog) }),
|
|
366
366
|
});
|
|
367
367
|
|
|
368
|
-
// ── process
|
|
369
|
-
const outboxWorker =
|
|
368
|
+
// ── process plugins — real work happens in start/stop ───────────────────
|
|
369
|
+
const outboxWorker = plugin({
|
|
370
370
|
name: 'outbox-worker',
|
|
371
371
|
needs: { db: Db, bus: Bus },
|
|
372
372
|
boot: ({ db, bus }) => ({ outbox: makeOutbox(db, bus) }),
|
|
@@ -374,7 +374,7 @@ const outboxWorker = pip({
|
|
|
374
374
|
stop: ({ outbox }) => outbox.drain(), // stop processing, keep resources
|
|
375
375
|
});
|
|
376
376
|
|
|
377
|
-
const http =
|
|
377
|
+
const http = plugin({
|
|
378
378
|
name: 'http',
|
|
379
379
|
needs: {
|
|
380
380
|
env: Env,
|
|
@@ -425,18 +425,18 @@ queue, same-phase calls coalesce onto one in-flight promise, and a
|
|
|
425
425
|
`dispose()` racing a slow `start()` always runs after it — the app ends
|
|
426
426
|
`disposed`, never resurrected.
|
|
427
427
|
|
|
428
|
-
## Testing
|
|
428
|
+
## Testing plugins
|
|
429
429
|
|
|
430
|
-
`
|
|
430
|
+
`testPlugin` is the typed unit-test builder: satisfy a plugin's needs directly
|
|
431
431
|
with fakes — no real providers, no dependency chain — and the compiler
|
|
432
432
|
holds the same line it holds in production. A missing fake means `boot()`
|
|
433
433
|
does not compile; a fake of the wrong shape fails at the `.provide()`
|
|
434
434
|
call site:
|
|
435
435
|
|
|
436
436
|
```ts
|
|
437
|
-
import {
|
|
437
|
+
import { testPlugin } from '@arki/dot/test-harness';
|
|
438
438
|
|
|
439
|
-
const app = await
|
|
439
|
+
const app = await testPlugin(catalog)
|
|
440
440
|
.provide(Db, fakeDb) // token need
|
|
441
441
|
.provide('cache', fakeKv) // anonymous need — wire key is the alias
|
|
442
442
|
.boot();
|
|
@@ -445,13 +445,13 @@ expect(app.services.catalog.list()).toEqual([]);
|
|
|
445
445
|
await app.dispose();
|
|
446
446
|
```
|
|
447
447
|
|
|
448
|
-
The fakes are published by a synthetic first
|
|
448
|
+
The fakes are published by a synthetic first plugin, so lifecycle semantics
|
|
449
449
|
are the real kernel's — reverse-order teardown, lazy auto-dispose, and
|
|
450
450
|
`$config` all behave exactly as in production. `service.lazy<T>()` needs
|
|
451
451
|
accept a plain `T` fake (lifted automatically) or `lazyOf(value)`.
|
|
452
452
|
|
|
453
|
-
For integration tests across several real
|
|
454
|
-
builds an app from an erased
|
|
453
|
+
For integration tests across several real plugins, `testApp([...plugins])`
|
|
454
|
+
builds an app from an erased plugin array (runtime validation only), and
|
|
455
455
|
`bootTestApp` is the one-line boot-and-return variant.
|
|
456
456
|
|
|
457
457
|
## Operations
|
|
@@ -474,26 +474,26 @@ hookSignals(app); // SIGTERM/SIGINT → stop() + dispose() → re-raise
|
|
|
474
474
|
Returns an unhook function.
|
|
475
475
|
- **`hookTimeoutMs`** — a per-hook watchdog. Any `boot`/`start`/`stop`/
|
|
476
476
|
`dispose` hook exceeding the budget fails with `DOT_LIFECYCLE_E015`
|
|
477
|
-
naming the
|
|
477
|
+
naming the plugin and hook, and the kernel applies its normal rollback or
|
|
478
478
|
aggregation rules. Your app cannot hang silently at boot.
|
|
479
479
|
|
|
480
|
-
##
|
|
480
|
+
## Plugin authoring
|
|
481
481
|
|
|
482
|
-
`
|
|
482
|
+
`plugin(config)` accepts a `needs` shape plus five lifecycle hooks. Hook
|
|
483
483
|
contexts carry the needed services (typed, under your local aliases) and
|
|
484
|
-
`$`-prefixed kernel keys (`$app`, `$
|
|
484
|
+
`$`-prefixed kernel keys (`$app`, `$plugin`, `$config`):
|
|
485
485
|
|
|
486
486
|
| Hook | Purpose |
|
|
487
487
|
| ----------- | ------------------------------------------------------------------- |
|
|
488
488
|
| `configure` | Validate static config; declare schemas, routes, services. No I/O. |
|
|
489
|
-
| `boot` | Open connections; the returned record is what the
|
|
489
|
+
| `boot` | Open connections; the returned record is what the plugin provides. |
|
|
490
490
|
| `start` | Begin processing (workers, subscribers, schedulers). |
|
|
491
491
|
| `stop` | Stop processing in reverse declaration order. |
|
|
492
492
|
| `dispose` | Free resources after `stop`; lazy handles auto-clean afterwards. |
|
|
493
493
|
|
|
494
|
-
Wiring is compile-time checked: `.use(
|
|
495
|
-
|
|
496
|
-
provides collide with an existing wire key. `rename(
|
|
494
|
+
Wiring is compile-time checked: `.use(plugin)` fails to typecheck when the
|
|
495
|
+
plugin's needs aren't satisfied by earlier `.use()` calls, or when its
|
|
496
|
+
provides collide with an existing wire key. `rename(plugin, { db: 'reportsDb' })`
|
|
497
497
|
mounts a second instance of an adapter without collision; `token<T>()('key')`
|
|
498
498
|
shares a service contract across packages; `lazy(() => open(), { dispose })`
|
|
499
499
|
defers an expensive open until first `get()` — never-touched services never
|
|
@@ -502,8 +502,8 @@ order is boot order — same input, same order, every time.
|
|
|
502
502
|
|
|
503
503
|
## Lifecycle
|
|
504
504
|
|
|
505
|
-
`defineApp(name)` returns a builder. Calling `.use(
|
|
506
|
-
|
|
505
|
+
`defineApp(name)` returns a builder. Calling `.use(plugin)` accumulates
|
|
506
|
+
plugins. The lifecycle then flows:
|
|
507
507
|
|
|
508
508
|
```text
|
|
509
509
|
defined ──configure()──▶ configured ──boot()──▶ booted ──start()──▶ started
|
|
@@ -514,15 +514,15 @@ defined ──configure()──▶ configured ──boot()──▶ booted ─
|
|
|
514
514
|
`boot()` runs `configure()` implicitly if you skipped it. `start()` runs
|
|
515
515
|
`boot()` implicitly. `stop()` and `dispose()` always run in reverse
|
|
516
516
|
declaration order, even when an earlier hook failed — failure isolation is
|
|
517
|
-
part of the contract. A boot failure rolls back every already-booted
|
|
517
|
+
part of the contract. A boot failure rolls back every already-booted plugin
|
|
518
518
|
before throwing.
|
|
519
519
|
|
|
520
520
|
Runtime failures carry stable codes (`DotLifecycleError.code`):
|
|
521
521
|
|
|
522
522
|
| Code | Meaning |
|
|
523
523
|
| -------------------- | ---------------------------------------------------- |
|
|
524
|
-
| `DOT_LIFECYCLE_E011` |
|
|
525
|
-
| `DOT_LIFECYCLE_E012` | A need has no provider among earlier
|
|
524
|
+
| `DOT_LIFECYCLE_E011` | Plugin registered twice. |
|
|
525
|
+
| `DOT_LIFECYCLE_E012` | A need has no provider among earlier plugins. |
|
|
526
526
|
| `DOT_LIFECYCLE_E013` | A published wire key collides with an earlier one. |
|
|
527
527
|
| `DOT_LIFECYCLE_E014` | A service key uses the reserved `$` (kernel) prefix. |
|
|
528
528
|
| `DOT_LIFECYCLE_E015` | A hook exceeded the `hookTimeoutMs` watchdog. |
|
|
@@ -547,18 +547,18 @@ dot explain --app ./my-app.ts
|
|
|
547
547
|
# Run boot-time diagnostics; non-zero exit if any check fails.
|
|
548
548
|
dot doctor --app ./my-app.ts
|
|
549
549
|
|
|
550
|
-
# Render the
|
|
550
|
+
# Render the plugin graph as Mermaid flowchart source. explain shows
|
|
551
551
|
# declaration (= boot) order; doctor boots and shows the OBSERVED wiring.
|
|
552
552
|
dot doctor --app ./my-app.ts --graph
|
|
553
553
|
|
|
554
554
|
# Every command supports --json for agent-friendly output.
|
|
555
|
-
dot explain --app ./my-app.ts --json | jq '.data.
|
|
555
|
+
dot explain --app ./my-app.ts --json | jq '.data.plugins'
|
|
556
556
|
```
|
|
557
557
|
|
|
558
558
|
The CLI emits the same envelope shape as the in-process diagnostics snapshot
|
|
559
559
|
(`app.diagnostics`), so the same downstream tools can consume either. The
|
|
560
560
|
manifest's dependency edges are **observed, not declared** — the kernel
|
|
561
|
-
records which
|
|
561
|
+
records which plugin's published service satisfied which need during boot.
|
|
562
562
|
|
|
563
563
|
### `dot new <app-name>`
|
|
564
564
|
|
|
@@ -576,7 +576,7 @@ ship with the published tarball.
|
|
|
576
576
|
|
|
577
577
|
## Architecture
|
|
578
578
|
|
|
579
|
-
`@arki/dot` is intentionally small: it defines the contracts (
|
|
579
|
+
`@arki/dot` is intentionally small: it defines the contracts (plugin shape,
|
|
580
580
|
lifecycle hooks, manifest schema, diagnostics envelope) and runs them. Adapters
|
|
581
581
|
that bridge databases, queues, auth providers, and HTTP routers live in their
|
|
582
582
|
own packages and consume `@arki/dot` as a peer dependency:
|
|
@@ -598,12 +598,12 @@ The full docs live in [`docs/`](./docs):
|
|
|
598
598
|
- [Principles](./docs/principles.md) — **read first.** The five rules every
|
|
599
599
|
API, error, and PR is measured against. Slightly playful, very precise.
|
|
600
600
|
- [Quickstart](./docs/quickstart.md) — boot your first app in five minutes.
|
|
601
|
-
- [
|
|
601
|
+
- [Plugin authoring](./docs/plugin-authoring.md) — write your own plugin.
|
|
602
602
|
- [Lifecycle](./docs/lifecycle.md) — the 5-hook contract, idempotency, error codes.
|
|
603
603
|
- [Diagnostics](./docs/diagnostics.md) — `app.manifest`, `app.diagnostics`,
|
|
604
604
|
`dot explain`, `dot doctor`.
|
|
605
605
|
- [Adapter authoring](./docs/adapter-authoring.md) — expose your package as
|
|
606
|
-
a DOT
|
|
606
|
+
a DOT plugin.
|
|
607
607
|
- [Agent guide](./docs/agent-guide.md) — how coding agents inspect, modify,
|
|
608
608
|
and verify DOT apps.
|
|
609
609
|
- [Release policy](./docs/release-policy.md) — SemVer and deprecation.
|
package/dist/cli/discover.js
CHANGED
|
@@ -151,7 +151,7 @@ export async function loadAppFromFile(filePath) {
|
|
|
151
151
|
throw new DotCliError({
|
|
152
152
|
code: DotCliErrorCode.AppInvalidExport,
|
|
153
153
|
message: `Default export from ${filePath} is not a DotApp or DotAppBuilder.`,
|
|
154
|
-
remediation: 'Export a DotApp or DotAppBuilder as the default. Example: `export default defineApp("my-app").use(
|
|
154
|
+
remediation: 'Export a DotApp or DotAppBuilder as the default. Example: `export default defineApp("my-app").use(plugin);`',
|
|
155
155
|
metadata: { filePath },
|
|
156
156
|
});
|
|
157
157
|
}
|
|
@@ -166,7 +166,7 @@ export async function discoverApp(options = {}) {
|
|
|
166
166
|
throw new DotCliError({
|
|
167
167
|
code: DotCliErrorCode.AppNotFound,
|
|
168
168
|
message: `No DOT app file found in ${cwd}.`,
|
|
169
|
-
remediation: 'Create `dot.config.ts` exporting your app (e.g. `export default defineApp("my-app").use(
|
|
169
|
+
remediation: 'Create `dot.config.ts` exporting your app (e.g. `export default defineApp("my-app").use(plugin)`), or pass `--app <path>` to point at an existing file.',
|
|
170
170
|
metadata: { cwd, searched: DEFAULT_APP_PATHS },
|
|
171
171
|
});
|
|
172
172
|
}
|
package/dist/cli/discover.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover.js","sourceRoot":"","sources":["../../src/cli/discover.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO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B,EAAE;SAC/C,CAAC,CAAC;IACL,CAAC;IAED,MAAM,GAAG,GAAG,MAAM,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC5C,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC;AAC3B,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,QAAQ;IACR,eAAe;IACf,kBAAkB;CACnB,CAAC"}
|
|
@@ -20,6 +20,14 @@ export declare const DotCliErrorCode: {
|
|
|
20
20
|
readonly AppLifecycleFailed: "DOT_CLI_E006";
|
|
21
21
|
/** `dot doctor --observability` ran but no OTel SDK is registered. */
|
|
22
22
|
readonly ObservabilityNoSdk: "DOT_CLI_E007";
|
|
23
|
+
/** Requested projection format is not registered by the app. */
|
|
24
|
+
readonly ProjectionNotFound: "DOT_CLI_E008";
|
|
25
|
+
/** Projection module import failed or did not export `project`. */
|
|
26
|
+
readonly ProjectionImportFailed: "DOT_CLI_E009";
|
|
27
|
+
/** Projection execution failed or returned non-JSON output. */
|
|
28
|
+
readonly ProjectionExecutionFailed: "DOT_CLI_E010";
|
|
29
|
+
/** Multiple modules claim the same projection format. */
|
|
30
|
+
readonly ProjectionConflict: "DOT_CLI_E011";
|
|
23
31
|
};
|
|
24
32
|
export type DotCliErrorCodeValue = (typeof DotCliErrorCode)[keyof typeof DotCliErrorCode];
|
|
25
33
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../../src/cli/error-codes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,eAAe;IAC1B,+EAA+E;;IAE/E,iFAAiF;;IAEjF,iDAAiD;;IAEjD,2BAA2B;;IAE3B,+BAA+B;;IAE/B,sEAAsE;;IAEtE,sEAAsE;;
|
|
1
|
+
{"version":3,"file":"error-codes.d.ts","sourceRoot":"","sources":["../../src/cli/error-codes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,eAAe;IAC1B,+EAA+E;;IAE/E,iFAAiF;;IAEjF,iDAAiD;;IAEjD,2BAA2B;;IAE3B,+BAA+B;;IAE/B,sEAAsE;;IAEtE,sEAAsE;;IAEtE,gEAAgE;;IAEhE,mEAAmE;;IAEnE,+DAA+D;;IAE/D,yDAAyD;;CAEjD,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAI1F;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAYjE,CAAC;AAEF,wBAAgB,aAAa,CAAC,IAAI,EAAE,oBAAoB,GAAG,MAAM,CAEhE;AAED;;;GAGG;AACH,qBAAa,WAAY,SAAQ,KAAK;IACpC,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAC;IACpC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5C,SAAkB,KAAK,CAAC,EAAE,OAAO,CAAC;gBAEtB,IAAI,EAAE;QAChB,IAAI,EAAE,oBAAoB,CAAC;QAC3B,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACnC,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB;CASF"}
|
package/dist/cli/error-codes.js
CHANGED
|
@@ -20,6 +20,14 @@ export const DotCliErrorCode = {
|
|
|
20
20
|
AppLifecycleFailed: 'DOT_CLI_E006',
|
|
21
21
|
/** `dot doctor --observability` ran but no OTel SDK is registered. */
|
|
22
22
|
ObservabilityNoSdk: 'DOT_CLI_E007',
|
|
23
|
+
/** Requested projection format is not registered by the app. */
|
|
24
|
+
ProjectionNotFound: 'DOT_CLI_E008',
|
|
25
|
+
/** Projection module import failed or did not export `project`. */
|
|
26
|
+
ProjectionImportFailed: 'DOT_CLI_E009',
|
|
27
|
+
/** Projection execution failed or returned non-JSON output. */
|
|
28
|
+
ProjectionExecutionFailed: 'DOT_CLI_E010',
|
|
29
|
+
/** Multiple modules claim the same projection format. */
|
|
30
|
+
ProjectionConflict: 'DOT_CLI_E011',
|
|
23
31
|
};
|
|
24
32
|
const DOCS_BASE = 'https://docs.arki.dev/dot/cli';
|
|
25
33
|
/**
|
|
@@ -34,6 +42,10 @@ export const DotCliDocsAnchor = {
|
|
|
34
42
|
[DotCliErrorCode.InvalidArgs]: 'invalid-args',
|
|
35
43
|
[DotCliErrorCode.AppLifecycleFailed]: 'app-lifecycle-failed',
|
|
36
44
|
[DotCliErrorCode.ObservabilityNoSdk]: 'observability-no-sdk',
|
|
45
|
+
[DotCliErrorCode.ProjectionNotFound]: 'projection-not-found',
|
|
46
|
+
[DotCliErrorCode.ProjectionImportFailed]: 'projection-import-failed',
|
|
47
|
+
[DotCliErrorCode.ProjectionExecutionFailed]: 'projection-execution-failed',
|
|
48
|
+
[DotCliErrorCode.ProjectionConflict]: 'projection-conflict',
|
|
37
49
|
};
|
|
38
50
|
export function dotCliDocsUrl(code) {
|
|
39
51
|
return `${DOCS_BASE}#${DotCliDocsAnchor[code]}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-codes.js","sourceRoot":"","sources":["../../src/cli/error-codes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,+EAA+E;IAC/E,WAAW,EAAE,cAAc;IAC3B,iFAAiF;IACjF,gBAAgB,EAAE,cAAc;IAChC,iDAAiD;IACjD,eAAe,EAAE,cAAc;IAC/B,2BAA2B;IAC3B,cAAc,EAAE,cAAc;IAC9B,+BAA+B;IAC/B,WAAW,EAAE,cAAc;IAC3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IAAI,CAAC,KAAK,CAAC;IAC1B,CAAC;CACF"}
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -39,7 +39,11 @@ export type CliArgs = {
|
|
|
39
39
|
observability?: boolean;
|
|
40
40
|
/** `--graph` (honored by `explain` and `doctor`). */
|
|
41
41
|
graph?: boolean;
|
|
42
|
-
/** `--
|
|
42
|
+
/** `--as` projection format (honored by `explain` only). */
|
|
43
|
+
as?: string;
|
|
44
|
+
/** `--module` projection override (honored by `explain --as` only). */
|
|
45
|
+
module?: string;
|
|
46
|
+
/** Deprecated `--openapi` alias for `--as openapi`. */
|
|
43
47
|
openapi?: boolean;
|
|
44
48
|
};
|
|
45
49
|
/**
|
|
@@ -54,6 +58,9 @@ export declare function parseArgs(argv: readonly string[]): CliArgs;
|
|
|
54
58
|
export declare function runExplain(discovered: DiscoveredApp, opts: {
|
|
55
59
|
json: boolean;
|
|
56
60
|
graph?: boolean;
|
|
61
|
+
as?: string;
|
|
62
|
+
module?: string;
|
|
63
|
+
appFilePath?: string;
|
|
57
64
|
openapi?: boolean;
|
|
58
65
|
out?: (line: string) => void;
|
|
59
66
|
now?: () => Date;
|
|
@@ -68,7 +75,7 @@ type DoctorRunOptions = {
|
|
|
68
75
|
* present. Default `false`.
|
|
69
76
|
*/
|
|
70
77
|
observability?: boolean;
|
|
71
|
-
/** When `true`, emit the
|
|
78
|
+
/** When `true`, emit the plugin graph (Mermaid) instead of diagnostics. */
|
|
72
79
|
graph?: boolean;
|
|
73
80
|
};
|
|
74
81
|
/**
|
package/dist/cli/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;GAgBG;AAQH,OAAO,KAAK,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;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