@arki/dot 0.1.0 → 0.1.2

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.
Files changed (52) hide show
  1. package/README.md +36 -31
  2. package/dist/define-app.d.ts +58 -16
  3. package/dist/define-app.d.ts.map +1 -1
  4. package/dist/define-app.js +23 -13
  5. package/dist/define-app.js.map +1 -1
  6. package/dist/index.d.ts +7 -5
  7. package/dist/index.d.ts.map +1 -1
  8. package/dist/index.js +6 -4
  9. package/dist/index.js.map +1 -1
  10. package/dist/kernel/app-instance.d.ts +3 -3
  11. package/dist/kernel/app-instance.d.ts.map +1 -1
  12. package/dist/kernel/app-instance.js +265 -159
  13. package/dist/kernel/app-instance.js.map +1 -1
  14. package/dist/lifecycle.d.ts +11 -9
  15. package/dist/lifecycle.d.ts.map +1 -1
  16. package/dist/lifecycle.js +15 -9
  17. package/dist/lifecycle.js.map +1 -1
  18. package/dist/pip-contract.d.ts +254 -149
  19. package/dist/pip-contract.d.ts.map +1 -1
  20. package/dist/pip-contract.js +185 -41
  21. package/dist/pip-contract.js.map +1 -1
  22. package/dist/pip.d.ts +9 -12
  23. package/dist/pip.d.ts.map +1 -1
  24. package/dist/pip.js +8 -11
  25. package/dist/pip.js.map +1 -1
  26. package/dist/test-harness.d.ts +13 -10
  27. package/dist/test-harness.d.ts.map +1 -1
  28. package/dist/test-harness.js +12 -12
  29. package/dist/test-harness.js.map +1 -1
  30. package/package.json +10 -4
  31. package/src/cli/discover.ts +223 -0
  32. package/src/cli/error-codes.ts +74 -0
  33. package/src/cli/files.ts +120 -0
  34. package/src/cli/index.ts +539 -0
  35. package/src/cli/json.ts +49 -0
  36. package/src/cli/new.ts +420 -0
  37. package/src/cli/observability-probe.ts +51 -0
  38. package/src/cli/render-doctor.ts +199 -0
  39. package/src/cli/render-explain.ts +161 -0
  40. package/src/define-app.ts +310 -0
  41. package/src/diagnostics.ts +91 -0
  42. package/src/index.ts +89 -0
  43. package/src/kernel/app-instance.ts +1341 -0
  44. package/src/kernel/otel.ts +265 -0
  45. package/src/lifecycle-observer.ts +100 -0
  46. package/src/lifecycle.ts +121 -0
  47. package/src/manifest.ts +94 -0
  48. package/src/pip-contract.ts +477 -0
  49. package/src/pip.ts +84 -0
  50. package/src/test-harness.ts +72 -0
  51. package/src/timeline.ts +137 -0
  52. package/templates/app-minimal/AGENTS.md.tmpl +2 -2
@@ -1,44 +1,202 @@
1
1
  /**
2
- * Public pip contract for the DOT kernel.
2
+ * Public pip contract for the DOT kernel (v2).
3
3
  *
4
- * A `DotPip` is a plain object with a name, optional dependency list, and
5
- * up to five lifecycle hooks. The kernel calls each hook in dependency order
6
- * (or reverse-dependency order for `stop`/`dispose`).
4
+ * A pip 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 pip'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 will
11
- * throw {@link DotLifecycleError} with code `DOT_LIFECYCLE_E001`.
12
- * - `boot` may publish services into the app; downstream pips see them via
13
- * {@link DotBootContext.services}.
14
- * - `stop` and `dispose` continue through individual pip failures and
15
- * report an aggregate error.
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 pip failures, reporting an aggregate error.
16
19
  */
17
20
  /**
18
- * Type-narrowing helper for pip authors.
21
+ * Create an app-local (anonymous) service witness for a `needs` shape.
22
+ *
23
+ * `service.lazy<T>()` creates a lifting witness instead — the hook context
24
+ * delivers a `Lazy<T>` handle whether the provider is eager or lazy.
25
+ */
26
+ export const service = Object.assign(() => ({}), { lazy: () => ({ lazy: true }) });
27
+ /** Internal (kernel) check: is this witness a lazy-lifting one? */
28
+ export function isLazyWitness(witness) {
29
+ return 'lazy' in witness && witness.lazy === true;
30
+ }
31
+ /**
32
+ * Create a token. Curried so `T` is explicit while `K` is inferred as a
33
+ * literal: `const Db = token<DbHandle>()('arki.db')`.
34
+ */
35
+ export function token() {
36
+ return (key) => ({
37
+ key,
38
+ instance(name) {
39
+ // Safe by construction: the runtime string is exactly the template type.
40
+ return token()(`${key}#${name}`);
41
+ },
42
+ });
43
+ }
44
+ /**
45
+ * Publish a value under a token's wire key. Returns a record typed by the
46
+ * token's literal key, so `boot: () => provide(Db, handle)` infers
47
+ * `TProvides = { 'arki.db': DbHandle }`.
48
+ */
49
+ export function provide(tok, value) {
50
+ // Safe by construction: the computed key is exactly `tok.key: K`.
51
+ return { [tok.key]: value };
52
+ }
53
+ /** Runtime brand for lazy service handles (kernel detects these for auto-dispose). */
54
+ export const LazyTag = Symbol('dot.lazy');
55
+ /**
56
+ * Create a lazy service handle. See {@link Lazy} for semantics.
57
+ *
58
+ * @param init - Opens the resource. Runs at most once concurrently; a
59
+ * rejected attempt is not cached, so a later `get()` retries.
60
+ * @param options.dispose - Cleanup for the initialized value. Skipped when
61
+ * the handle was never initialized.
62
+ */
63
+ export function lazy(init, options = {}) {
64
+ let state = { status: 'idle' };
65
+ return {
66
+ [LazyTag]: true,
67
+ get() {
68
+ if (state.status === 'ready')
69
+ return Promise.resolve(state.value);
70
+ if (state.status === 'pending')
71
+ return state.promise;
72
+ if (state.status === 'disposed') {
73
+ return Promise.reject(new Error('Lazy service handle is disposed — the app has shut down.'));
74
+ }
75
+ const promise = Promise.resolve()
76
+ .then(init)
77
+ .then(value => {
78
+ state = { status: 'ready', value };
79
+ return value;
80
+ }, (error) => {
81
+ // Failed initialization is not cached — allow retry.
82
+ state = { status: 'idle' };
83
+ throw error;
84
+ });
85
+ state = { status: 'pending', promise };
86
+ return promise;
87
+ },
88
+ get initialized() {
89
+ return state.status === 'ready';
90
+ },
91
+ peek() {
92
+ return state.status === 'ready' ? state.value : undefined;
93
+ },
94
+ async dispose() {
95
+ if (state.status === 'pending') {
96
+ try {
97
+ await state.promise;
98
+ }
99
+ catch {
100
+ // Failed init: nothing to clean up.
101
+ }
102
+ }
103
+ if (state.status === 'ready') {
104
+ const { value } = state;
105
+ state = { status: 'disposed' };
106
+ await options.dispose?.(value);
107
+ return;
108
+ }
109
+ state = { status: 'disposed' };
110
+ },
111
+ };
112
+ }
113
+ /** Type guard: is this published value a lazy service handle? */
114
+ export function isLazy(value) {
115
+ return typeof value === 'object' && value !== null && LazyTag in value;
116
+ }
117
+ /**
118
+ * Wrap an already-available value in a pre-initialized `Lazy<T>` handle.
119
+ * Used by the kernel to lift eager provides for `service.lazy` consumers;
120
+ * also handy for handing fakes to lazy-consuming pips in tests. The handle
121
+ * has no cleanup of its own — the underlying value's lifecycle belongs to
122
+ * whoever created it.
123
+ */
124
+ export function lazyOf(value) {
125
+ let disposed = false;
126
+ return {
127
+ [LazyTag]: true,
128
+ get: () => disposed
129
+ ? Promise.reject(new Error('Lazy service handle is disposed — the app has shut down.'))
130
+ : Promise.resolve(value),
131
+ get initialized() {
132
+ return !disposed;
133
+ },
134
+ peek: () => (disposed ? undefined : value),
135
+ async dispose() {
136
+ disposed = true;
137
+ },
138
+ };
139
+ }
140
+ /**
141
+ * Author a DOT pip.
142
+ *
143
+ * - `TShape` is inferred from the `needs` object literal.
144
+ * - `TProvides` is inferred from `boot`'s return type — no generic argument.
145
+ * - `boot({ db, log, $app })` destructures typed services under the local
146
+ * aliases declared in `needs`, plus the `$`-prefixed kernel keys.
147
+ * - `start` / `stop` / `dispose` additionally receive the pip's own
148
+ * provides. Reverse-order teardown guarantees needs are still alive in
149
+ * `dispose`.
19
150
  *
20
151
  * @example
21
- * export const myPip = defineDotPip<{ db: MyDb }>({
22
- * name: 'my-pip',
23
- * async boot() {
24
- * const db = await openDb();
25
- * return { services: { db } };
152
+ * ```ts
153
+ * export const billing = pip({
154
+ * name: 'billing',
155
+ * needs: { db: service<Db>(), log: service<Logger>() },
156
+ * async boot({ db, log }) {
157
+ * return { billing: new BillingService(db, log) };
26
158
  * },
27
- * async dispose({ services }) {
28
- * await services.db.close();
159
+ * async dispose({ billing }) {
160
+ * await billing.flush();
29
161
  * },
30
162
  * });
163
+ * ```
31
164
  */
32
- export function defineDotPip(pip) {
33
- return pip;
34
- }
35
- /** Internal helper: extract the `provides` field from a pip (always returns an array). */
36
- export function pipProvides(pip) {
37
- return pip.provides ?? [];
165
+ export function pip(def) {
166
+ return {
167
+ name: def.name,
168
+ ...(def.version === undefined ? {} : { version: def.version }),
169
+ needs: def.needs ?? {},
170
+ renames: {},
171
+ hooks: {
172
+ ...(def.configure === undefined ? {} : { configure: def.configure }),
173
+ ...(def.boot === undefined ? {} : { boot: def.boot }),
174
+ ...(def.start === undefined ? {} : { start: def.start }),
175
+ ...(def.stop === undefined ? {} : { stop: def.stop }),
176
+ ...(def.dispose === undefined ? {} : { dispose: def.dispose }),
177
+ },
178
+ };
38
179
  }
39
- /** Internal helper: extract the `dependencies` field from a pip (always returns an array). */
40
- export function pipDependencies(pip) {
41
- return pip.dependencies ?? [];
180
+ /**
181
+ * Mount-time rename. `rename(dbPip, { db: 'reportsDb' }, 'reports-db')`
182
+ * publishes the same service under a different wire key, retyped
183
+ * accordingly — the way to mount a second instance of an adapter without
184
+ * a key collision. Renames compose: renaming an already-renamed key
185
+ * rewrites the earlier entry.
186
+ */
187
+ export function rename(p, map, newName) {
188
+ const renames = { ...p.renames };
189
+ for (const [wireKey, next] of Object.entries(map)) {
190
+ if (typeof next !== 'string')
191
+ continue;
192
+ // If `wireKey` is itself the *result* of an earlier rename, rewrite that
193
+ // entry (compose); otherwise it is a local publish key.
194
+ const localKey = Object.entries(renames).find(([, w]) => w === wireKey)?.[0] ?? wireKey;
195
+ renames[localKey] = next;
196
+ }
197
+ // Phantom-only cast: runtime fields are unchanged except `renames`/`name`;
198
+ // only the [ProvidesSym] carrier retypes.
199
+ return { ...p, name: newName ?? p.name, renames };
42
200
  }
43
201
  /**
44
202
  * Stable error thrown by DOT pip adapters.
@@ -55,20 +213,6 @@ export function pipDependencies(pip) {
55
213
  *
56
214
  * @see packages/dot/docs/principles.md — principle 1.3 ("errors are part
57
215
  * of the API") and principle 4 ("agent-discoverable everywhere").
58
- *
59
- * @example
60
- * ```ts
61
- * import { DotPipError } from '@arki/dot/pip';
62
- *
63
- * const KV_PIP_ERROR_CODES = { urlNotConfigured: 'KV_PIP_E001' } as const;
64
- *
65
- * throw new DotPipError({
66
- * code: KV_PIP_ERROR_CODES.urlNotConfigured,
67
- * message: '[kv] KV URL is not configured.',
68
- * remediation: 'Pass options.url to kv(...) or set KV_URL in the environment.',
69
- * docsUrl: 'https://arki.dev/dot/errors/kv-pip-e001',
70
- * });
71
- * ```
72
216
  */
73
217
  export class DotPipError extends Error {
74
218
  /** Stable error code, e.g. `KV_PIP_E001`. */
@@ -1 +1 @@
1
- {"version":3,"file":"pip-contract.js","sourceRoot":"","sources":["../src/pip-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAsJH;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,YAAY,CAC1B,GAAsB;IAEtB,OAAO,GAAG,CAAC;AACb,CAAC;AAKD,0FAA0F;AAC1F,MAAM,UAAU,WAAW,CAAC,GAAc;IACxC,OAAO,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC;AAC5B,CAAC;AAED,8FAA8F;AAC9F,MAAM,UAAU,eAAe,CAAC,GAAc;IAC5C,OAAO,GAAG,CAAC,YAAY,IAAI,EAAE,CAAC;AAChC,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,OAAO,WAAY,SAAQ,KAAK;IACpC,6CAA6C;IACpC,IAAI,CAAS;IACtB,kEAAkE;IACzD,WAAW,CAAS;IAC7B,8DAA8D;IACrD,O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ip authors.
3
3
  *
4
- * Exposes the new-kernel pip contract and the entry points a pip
5
- * author needs to author + test pips — `defineDotPip`, `defineApp`,
6
- * `testApp` / `bootTestApp`, plus lifecycle / manifest / diagnostics types.
4
+ * Exposes the pip contract and the entry points a pip author needs to
5
+ * author + test pips — `pip`, `service`, `token`, `provide`, `rename`,
6
+ * `defineApp`, `testApp` / `bootTestApp`, plus lifecycle / manifest /
7
+ * diagnostics types.
7
8
  *
8
- * Does NOT re-export the legacy `Dot` / `createDot` builder or the legacy
9
- * auth/db/event-sourcing modules. Adapter packages (e.g. `@arki/env/dot`,
10
- * `@arki/kv/dot`, `@arki/db/dot`) import from this subpath so their
11
- * `*.d.ts` graphs do not pull in the legacy surface — keeping their
12
- * compile times tight and decoupling adapters from the legacy retirement
13
- * schedule (Task 12).
9
+ * Adapter packages (e.g. `@arki/env/dot`, `@arki/kv/dot`, `@arki/db/dot`)
10
+ * import from this subpath so their `*.d.ts` graphs stay tight.
14
11
  *
15
12
  * @example
16
13
  * ```ts
17
- * import { defineDotPip, type DotPip } from '@arki/dot/pip';
14
+ * import { pip, service, type Pip } from '@arki/dot/pip';
18
15
  * ```
19
16
  */
20
- export { defineDotPip, DotPipError } from './pip-contract.js';
21
- export type { AnyDotPip, DotPip, DotBootContext, DotBootResult, DotConfigureContext, DotDisposeContext, DotManifestContext, DotManifestContribution, DotStartContext, DotStopContext, } from './pip-contract.js';
17
+ export { isLazy, lazy, lazyOf, pip, provide, rename, service, token, DotPipError } from './pip-contract.js';
18
+ export type { AnyPip, CtxOf, DotConfigureContext, EmptyShape, KernelCtx, Lazy, LazyService, NeedsShape, Pip, PipNeeds, PipProvides, RenamedProvides, Service, ServiceRecord, Token, WireNeeds, } from './pip-contract.js';
22
19
  export { defineApp } from './define-app.js';
23
20
  export type { DotApp, DotAppBuilder, DotAppConfigured } from './define-app.js';
24
21
  export { testApp, bootTestApp } from './test-harness.js';
package/dist/pip.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file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sB,EACtB,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,YAAY,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC"}
package/dist/pip.js CHANGED
@@ -1,23 +1,20 @@
1
1
  /**
2
2
  * Narrow public surface for pip authors.
3
3
  *
4
- * Exposes the new-kernel pip contract and the entry points a pip
5
- * author needs to author + test pips — `defineDotPip`, `defineApp`,
6
- * `testApp` / `bootTestApp`, plus lifecycle / manifest / diagnostics types.
4
+ * Exposes the pip contract and the entry points a pip author needs to
5
+ * author + test pips — `pip`, `service`, `token`, `provide`, `rename`,
6
+ * `defineApp`, `testApp` / `bootTestApp`, plus lifecycle / manifest /
7
+ * diagnostics types.
7
8
  *
8
- * Does NOT re-export the legacy `Dot` / `createDot` builder or the legacy
9
- * auth/db/event-sourcing modules. Adapter packages (e.g. `@arki/env/dot`,
10
- * `@arki/kv/dot`, `@arki/db/dot`) import from this subpath so their
11
- * `*.d.ts` graphs do not pull in the legacy surface — keeping their
12
- * compile times tight and decoupling adapters from the legacy retirement
13
- * schedule (Task 12).
9
+ * Adapter packages (e.g. `@arki/env/dot`, `@arki/kv/dot`, `@arki/db/dot`)
10
+ * import from this subpath so their `*.d.ts` graphs stay tight.
14
11
  *
15
12
  * @example
16
13
  * ```ts
17
- * import { defineDotPip, type DotPip } from '@arki/dot/pip';
14
+ * import { pip, service, type Pip } from '@arki/dot/pip';
18
15
  * ```
19
16
  */
20
- export { defineDotPip, DotPipError } from './pip-contract.js';
17
+ export { isLazy, lazy, lazyOf, pip, provide, rename, service, token, DotPipError } from './pip-contract.js';
21
18
  export { defineApp } from './define-app.js';
22
19
  export { testApp, bootTestApp } from './test-harness.js';
23
20
  export { DotLifecycleError, DotLifecycleErrorCode, DOT_LIFECYCLE_HOOKS } from './lifecycle.js';
package/dist/pip.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"pip.js","sourceRoot":"","sources":["../src/pip.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAc9D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AASzD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAiC/F,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"pip.js","sourceRoot":"","sources":["../src/pip.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAoB5G,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AASzD,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAiC/F,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
@@ -5,38 +5,41 @@
5
5
  * lifecycle behaviour, registration, and service publishing without dragging
6
6
  * in concrete framework dependencies.
7
7
  *
8
+ * NOTE: `testApp` takes an erased pip array, so the compile-time wiring
9
+ * guard does not apply here — the kernel's runtime validation (unsatisfied
10
+ * needs, collisions) still does. Use `defineApp(...).use(...)` chains in
11
+ * tests that should exercise the type-level guard.
12
+ *
8
13
  * @example
9
- * import { testApp, defineDotPip } from '@arki/dot';
14
+ * import { testApp, pip } from '@arki/dot';
10
15
  *
11
- * const myPip = defineDotPip<{ counter: { value: number } }>({
16
+ * const myPip = pip({
12
17
  * name: 'counter',
13
- * async boot() {
14
- * return { services: { counter: { value: 0 } } };
15
- * },
18
+ * boot: () => ({ counter: { value: 0 } }),
16
19
  * });
17
20
  *
18
21
  * it('publishes a counter service', async () => {
19
- * const app = await testApp([myPip]).boot();
22
+ * const app = await bootTestApp<{ counter: { value: number } }>([myPip]);
20
23
  * expect(app.services.counter.value).toBe(0);
21
24
  * await app.dispose();
22
25
  * });
23
26
  */
24
27
  import type { DotApp, DotAppBuilder } from './define-app.js';
25
- import type { AnyDotPip, DotPip } from './pip-contract.js';
28
+ import type { AnyPip, EmptyShape, ServiceRecord } from './pip-contract.js';
26
29
  export type TestAppOptions = {
27
30
  /** App name used in the manifest. Defaults to `'test-app'`. */
28
31
  name?: string;
29
- /** Runtime config bag passed to every boot hook. */
32
+ /** Runtime config bag exposed to hooks as `$config`. */
30
33
  config?: Readonly<Record<string, unknown>>;
31
34
  };
32
35
  /**
33
36
  * Build a DOT app builder pre-populated with the given pips, ready to
34
37
  * `.configure()`, `.boot()` or `.start()` from a test.
35
38
  */
36
- export declare function testApp<TServices extends Record<string, unknown> = Record<string, never>>(pips?: readonly DotPip<never>[] | readonly DotPip<Record<string, never>>[] | readonly AnyDotPip[], options?: TestAppOptions): DotAppBuilder<TServices>;
39
+ export declare function testApp<TServices extends ServiceRecord = EmptyShape>(pips?: readonly AnyPip[], options?: TestAppOptions): DotAppBuilder<TServices>;
37
40
  /**
38
41
  * Convenience: build, boot, return the running app. Caller is responsible for
39
42
  * calling `app.dispose()` when finished.
40
43
  */
41
- export declare function bootTestApp<TServices extends Record<string, unknown> = Record<string, never>>(pips?: readonly DotPip<never>[] | readonly DotPip<Record<string, never>>[] | readonly AnyDotPip[], options?: TestAppOptions): Promise<DotApp<TServices>>;
44
+ export declare function bootTestApp<TServices extends ServiceRecord = EmptyShape>(pips?: readonly AnyPip[], options?: TestAppOptions): Promise<DotApp<TServices>>;
42
45
  //# sourceMappingURL=test-harness.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"test-harness.d.ts","sourceRoot":"","sources":["../src/test-harness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAG3D,MAAM,MAAM,cAAc,GAAG;IAC3B,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC5C,CAAC;AAEF;;;GAGG;AACH,wBAAgB,OAAO,CAAC,SAAS,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAGvF,IAAI,GAAE,SAAS,MAAM,CAAC,KAAK,CAAC,EAAE,GAAG,SAAS,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,EAAE,GAAG,SAAS,SAAS,EAAO,EACrG,OAAO,GAAE,cAAmB,GAC3B,aAAa,CAAC,SAAS,CAAC,CAM1B;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAAC,SAAS,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EACjG,IAAI,GAAE,SAAS,MAAM,CAAC,KAAK,CAAC,EAAE,GAAG,SAAS,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,EAAE,GAAG,SAAS,SAAS,EAAO,EACrG,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAE5B"}
1
+ {"version":3,"file":"test-harness.d.ts","sourceRoot":"","sources":["../src/test-harness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAG3E,MAAM,MAAM,cAAc,GAAG;IAC3B,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CAC5C,CAAC;AAWF;;;GAGG;AACH,wBAAgB,OAAO,CAAC,SAAS,SAAS,aAAa,GAAG,UAAU,EAClE,IAAI,GAAE,SAAS,MAAM,EAAO,EAC5B,OAAO,GAAE,cAAmB,GAC3B,aAAa,CAAC,SAAS,CAAC,CAM1B;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAAC,SAAS,SAAS,aAAa,GAAG,UAAU,EAC5E,IAAI,GAAE,SAAS,MAAM,EAAO,EAC5B,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAE5B"}
@@ -5,18 +5,21 @@
5
5
  * lifecycle behaviour, registration, and service publishing without dragging
6
6
  * in concrete framework dependencies.
7
7
  *
8
+ * NOTE: `testApp` takes an erased pip array, so the compile-time wiring
9
+ * guard does not apply here — the kernel's runtime validation (unsatisfied
10
+ * needs, collisions) still does. Use `defineApp(...).use(...)` chains in
11
+ * tests that should exercise the type-level guard.
12
+ *
8
13
  * @example
9
- * import { testApp, defineDotPip } from '@arki/dot';
14
+ * import { testApp, pip } from '@arki/dot';
10
15
  *
11
- * const myPip = defineDotPip<{ counter: { value: number } }>({
16
+ * const myPip = pip({
12
17
  * name: 'counter',
13
- * async boot() {
14
- * return { services: { counter: { value: 0 } } };
15
- * },
18
+ * boot: () => ({ counter: { value: 0 } }),
16
19
  * });
17
20
  *
18
21
  * it('publishes a counter service', async () => {
19
- * const app = await testApp([myPip]).boot();
22
+ * const app = await bootTestApp<{ counter: { value: number } }>([myPip]);
20
23
  * expect(app.services.counter.value).toBe(0);
21
24
  * await app.dispose();
22
25
  * });
@@ -26,13 +29,10 @@ import { defineApp } from './define-app.js';
26
29
  * Build a DOT app builder pre-populated with the given pips, ready to
27
30
  * `.configure()`, `.boot()` or `.start()` from a test.
28
31
  */
29
- export function testApp(
30
- // Accept any pip shape — tests routinely mix services types. Internally
31
- // we erase to `AnyDotPip` for the kernel.
32
- pips = [], options = {}) {
32
+ export function testApp(pips = [], options = {}) {
33
33
  let builder = defineApp(options.name ?? 'test-app', { config: options.config });
34
- for (const pip of pips) {
35
- builder = builder.use(pip);
34
+ for (const p of pips) {
35
+ builder = builder.use(p);
36
36
  }
37
37
  return builder;
38
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"test-harness.js","sourceRoot":"","sources":["../src/test-harness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAIH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAS5C;;;GAGG;AACH,MAAM,UAAU,OAAO;AACrB,wEAAwE;AACxE,0CAA0C;AAC1C,OAAmG,EAAE,EACrG,UAA0B,EAAE;IAE5B,IAAI,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,IAAI,UAAU,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAChF,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,GAAsC,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,OAAmC,CAAC;AAC7C,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,OAAmG,EAAE,EACrG,UAA0B,EAAE;IAE5B,OAAO,OAAO,CAAY,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;AAClD,CAAC"}
1
+ {"version":3,"file":"test-harness.js","sourceRoot":"","sources":["../src/test-harness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAkB5C;;;GAGG;AACH,MAAM,UAAU,OAAO,CACrB,OAA0B,EAAE,EAC5B,UAA0B,EAAE;IAE5B,IAAI,OAAO,GAAY,SAAS,CAAC,OAAO,CAAC,IAAI,IAAI,UAAU,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACzF,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;QACrB,OAAO,GAAI,OAAwB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,OAAmC,CAAC;AAC7C,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,OAA0B,EAAE,EAC5B,UAA0B,EAAE;IAE5B,OAAO,OAAO,CAAY,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;AAClD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arki/dot",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "TypeScript-first application composition framework for the ARKI package family — lifecycle-aware pips, deterministic boot order, manifest/diagnostics envelopes, and an agent-native CLI. A DOT app is the sum of its pips.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -50,15 +50,21 @@
50
50
  },
51
51
  "files": [
52
52
  "dist/**",
53
+ "src/**",
54
+ "!src/**/*.test.*",
55
+ "!src/**/*.spec.*",
56
+ "!src/**/tests/**",
57
+ "!src/**/test/**",
58
+ "!src/**/__tests__/**",
53
59
  "templates/**",
54
60
  "README.md",
55
61
  "LICENSE",
56
62
  "package.json"
57
63
  ],
58
64
  "dependencies": {
59
- "@arki/assert": "0.0.1",
60
- "@arki/contracts": "0.0.1",
61
- "@arki/log": "0.0.1",
65
+ "@arki/assert": "0.0.2",
66
+ "@arki/contracts": "0.0.2",
67
+ "@arki/log": "0.0.2",
62
68
  "@opentelemetry/api": "^1.9.0",
63
69
  "zod": "4.3.5"
64
70
  },