@setu-ts/kernel 0.0.0-stage → 0.10.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.
Files changed (79) hide show
  1. package/AGENT_CARD.md +47 -0
  2. package/LICENSE +21 -0
  3. package/README.md +152 -2
  4. package/dist/application/application.d.ts +174 -0
  5. package/dist/application/application.d.ts.map +1 -0
  6. package/dist/application/application.js +1905 -0
  7. package/dist/application/application.js.map +1 -0
  8. package/dist/application/inject-body.d.ts +58 -0
  9. package/dist/application/inject-body.d.ts.map +1 -0
  10. package/dist/application/inject-body.js +82 -0
  11. package/dist/application/inject-body.js.map +1 -0
  12. package/dist/context/request-context.d.ts +32 -0
  13. package/dist/context/request-context.d.ts.map +1 -0
  14. package/dist/context/request-context.js +136 -0
  15. package/dist/context/request-context.js.map +1 -0
  16. package/dist/context/response.d.ts +60 -0
  17. package/dist/context/response.d.ts.map +1 -0
  18. package/dist/context/response.js +193 -0
  19. package/dist/context/response.js.map +1 -0
  20. package/dist/diagnostics/buffer.d.ts +143 -0
  21. package/dist/diagnostics/buffer.d.ts.map +1 -0
  22. package/dist/diagnostics/buffer.js +190 -0
  23. package/dist/diagnostics/buffer.js.map +1 -0
  24. package/dist/diagnostics/collector.d.ts +284 -0
  25. package/dist/diagnostics/collector.d.ts.map +1 -0
  26. package/dist/diagnostics/collector.js +810 -0
  27. package/dist/diagnostics/collector.js.map +1 -0
  28. package/dist/diagnostics/projection.d.ts +153 -0
  29. package/dist/diagnostics/projection.d.ts.map +1 -0
  30. package/dist/diagnostics/projection.js +226 -0
  31. package/dist/diagnostics/projection.js.map +1 -0
  32. package/dist/index.d.ts +12 -0
  33. package/dist/index.d.ts.map +1 -0
  34. package/dist/index.js +11 -0
  35. package/dist/index.js.map +1 -0
  36. package/dist/lifecycle/lifecycle-manager.d.ts +136 -0
  37. package/dist/lifecycle/lifecycle-manager.d.ts.map +1 -0
  38. package/dist/lifecycle/lifecycle-manager.js +206 -0
  39. package/dist/lifecycle/lifecycle-manager.js.map +1 -0
  40. package/dist/pipeline/execute-chain.d.ts +71 -0
  41. package/dist/pipeline/execute-chain.d.ts.map +1 -0
  42. package/dist/pipeline/execute-chain.js +104 -0
  43. package/dist/pipeline/execute-chain.js.map +1 -0
  44. package/dist/pipeline/middleware-pipeline.d.ts +68 -0
  45. package/dist/pipeline/middleware-pipeline.d.ts.map +1 -0
  46. package/dist/pipeline/middleware-pipeline.js +82 -0
  47. package/dist/pipeline/middleware-pipeline.js.map +1 -0
  48. package/dist/registry/plugin-resolver.d.ts +42 -0
  49. package/dist/registry/plugin-resolver.d.ts.map +1 -0
  50. package/dist/registry/plugin-resolver.js +140 -0
  51. package/dist/registry/plugin-resolver.js.map +1 -0
  52. package/dist/registry/service-registry.d.ts +110 -0
  53. package/dist/registry/service-registry.d.ts.map +1 -0
  54. package/dist/registry/service-registry.js +197 -0
  55. package/dist/registry/service-registry.js.map +1 -0
  56. package/dist/router/route-matcher.d.ts +85 -0
  57. package/dist/router/route-matcher.d.ts.map +1 -0
  58. package/dist/router/route-matcher.js +105 -0
  59. package/dist/router/route-matcher.js.map +1 -0
  60. package/dist/router/router.d.ts +130 -0
  61. package/dist/router/router.d.ts.map +1 -0
  62. package/dist/router/router.js +350 -0
  63. package/dist/router/router.js.map +1 -0
  64. package/package.json +49 -3
  65. package/src/application/application.ts +2326 -0
  66. package/src/application/inject-body.ts +130 -0
  67. package/src/context/request-context.ts +169 -0
  68. package/src/context/response.ts +246 -0
  69. package/src/diagnostics/buffer.ts +243 -0
  70. package/src/diagnostics/collector.ts +1030 -0
  71. package/src/diagnostics/projection.ts +322 -0
  72. package/src/index.ts +20 -0
  73. package/src/lifecycle/lifecycle-manager.ts +282 -0
  74. package/src/pipeline/execute-chain.ts +162 -0
  75. package/src/pipeline/middleware-pipeline.ts +129 -0
  76. package/src/registry/plugin-resolver.ts +185 -0
  77. package/src/registry/service-registry.ts +262 -0
  78. package/src/router/route-matcher.ts +134 -0
  79. package/src/router/router.ts +485 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collector.js","sourceRoot":"","sources":["../../src/diagnostics/collector.ts"],"names":[],"mappings":"AAyCA,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,oBAAoB,EACpB,SAAS,EACT,SAAS,EACT,iBAAiB,EACjB,cAAc,GACf,MAAM,iBAAiB,CAAC;AA4EzB,MAAM,gBAAgB,GAAG,gBAAgB,CAAC;AAC1C,MAAM,eAAe,GAAG,gBAAgB,CAAC;AACzC,MAAM,QAAQ,GAAG,UAAU,CAAC;AAE5B;;;GAGG;AACH,SAAS,UAAU,CAAI,KAAQ;IAC7B,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAChD,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,KAAgC,CAAC,EAAE,CAAC;YAChE,UAAU,CAAE,KAAiC,CAAC,GAAG,CAAC,CAAC,CAAC;QACtD,CAAC;QACD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;GAIG;AACH,MAAM,OAAO,oBAAoB;IACtB,OAAO,CAA6B;IACpC,KAAK,GAAG,IAAI,oBAAoB,EAAE,CAAC;IACnC,MAAM,GAAiB,EAAE,CAAC;IAC1B,MAAM,GAAiB,EAAE,CAAC;IAC1B,SAAS,GAAG,IAAI,GAAG,EAAU,CAAC;IAC9B,kBAAkB,GAAG,IAAI,GAAG,EAAsB,CAAC;IACnD,uBAAuB,GAAG,IAAI,GAAG,EAAsB,CAAC;IACxD,aAAa,GAAG,IAAI,GAAG,EAAsB,CAAC;IAC9C,qBAAqB,GAAG,IAAI,GAAG,EAAwB,CAAC;IACxD,sBAAsB,GAAiB,EAAE,CAAC;IAC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,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,GAAG,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1D,GAAG,CAAC,IAAI,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAChE,GAAG,CAAC,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7D,GAAG,CAAC,IAAI,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACnE,GAAG,CAAC,IAAI,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACnE,GAAG,CAAC,IAAI,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC1E,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,IAAgB;IACjC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;AAC3D,CAAC"}
@@ -0,0 +1,153 @@
1
+ import type { DiagnosticsEdge, DiagnosticsNode, DiagnosticsSnapshot, HttpMethod } from '@setu-ts/common';
2
+ /**
3
+ * Explicit label allowlists for the four projected name families. A name
4
+ * leaves the process only when it exactly matches an entry here; unknown names
5
+ * authorize no output.
6
+ *
7
+ * @since 0.8.0
8
+ */
9
+ export interface KernelDiagnosticsLabelOptions {
10
+ /** Exact plugin `name` values that may appear as node labels. */
11
+ readonly plugins?: readonly string[];
12
+ /** Exact capability-token strings that may appear as node labels. */
13
+ readonly capabilities?: readonly string[];
14
+ /** Exact registered route patterns (including group prefix) that may appear as labels. */
15
+ readonly routes?: readonly string[];
16
+ /** Exact declared middleware names that may appear as labels. */
17
+ readonly middleware?: readonly string[];
18
+ }
19
+ /**
20
+ * Options enabling kernel diagnostics, supplied as
21
+ * `createApplication({ diagnostics })`. The presence of the option IS the
22
+ * activation: an omitted option creates no collector, metadata mirror, ring
23
+ * buffer, or timer anywhere in the kernel.
24
+ *
25
+ * @since 0.8.0
26
+ */
27
+ export interface KernelDiagnosticsOptions {
28
+ /**
29
+ * Explicit label allowlists. Omitted entirely, every projected node carries
30
+ * only its opaque identifier — no name, template, or version ever leaves the
31
+ * process.
32
+ */
33
+ readonly labels?: KernelDiagnosticsLabelOptions;
34
+ }
35
+ /** Maximum entries accepted in one label allowlist. */
36
+ export declare const MAX_LABEL_LIST_ENTRIES = 256;
37
+ /** Maximum UTF-8 byte length of one allowlist entry. */
38
+ export declare const MAX_LABEL_BYTES = 160;
39
+ /** A compiled allowlist set per label family. */
40
+ export interface DiagnosticsLabelAllowlists {
41
+ readonly plugins: ReadonlySet<string>;
42
+ readonly capabilities: ReadonlySet<string>;
43
+ readonly routes: ReadonlySet<string>;
44
+ readonly middleware: ReadonlySet<string>;
45
+ }
46
+ /**
47
+ * Compiles one allowlist, refusing malformed input with VALUE-FREE errors: an
48
+ * error must state the constraint it enforces, never echo the offending value,
49
+ * because a construction-time diagnostic failure is an attacker-reachable path
50
+ * for whatever the list contains.
51
+ *
52
+ * @param entries - The raw allowlist, or `undefined` for an empty set
53
+ * @param listName - Family name used in the error text only
54
+ * @returns The compiled exact-match set
55
+ * @throws {RangeError} When the list exceeds 256 entries, an entry exceeds 160
56
+ * UTF-8 bytes, or an entry contains a control character — without naming any entry
57
+ * @since 0.8.0
58
+ */
59
+ export declare function compileLabelAllowlist(entries: readonly string[] | undefined, listName: string): ReadonlySet<string>;
60
+ /**
61
+ * Compiles every label family of a {@linkcode KernelDiagnosticsOptions}.
62
+ *
63
+ * @param options - The diagnostics options, or `undefined` for all-empty lists
64
+ * @returns The compiled allowlists
65
+ * @throws {RangeError} When any list is malformed (see {@linkcode compileLabelAllowlist})
66
+ * @since 0.8.0
67
+ */
68
+ export declare function compileLabelAllowlists(options: KernelDiagnosticsOptions | undefined): DiagnosticsLabelAllowlists;
69
+ /**
70
+ * Projects a candidate registration string through an allowlist.
71
+ *
72
+ * Exact membership, never a truncation: a name either IS an approved label or
73
+ * it is omitted — truncating a 200-byte route pattern into an approved-looking
74
+ * prefix would mint a new name that was never disclosed on purpose.
75
+ *
76
+ * @param allowlist - The compiled exact-match set for this family
77
+ * @param candidate - The raw registration string
78
+ * @returns The candidate itself when approved, `undefined` otherwise
79
+ * @since 0.8.0
80
+ */
81
+ export declare function approvedLabel(allowlist: ReadonlySet<string>, candidate: string): string | undefined;
82
+ /**
83
+ * Projects a method string onto the {@linkcode HttpMethod} vocabulary.
84
+ * Unsupported input is omitted, never widened into a new name.
85
+ *
86
+ * @param method - The raw method string from a registration
87
+ * @returns The known verb, or `undefined` when outside the vocabulary
88
+ * @since 0.8.0
89
+ */
90
+ export declare function projectHttpMethod(method: string): HttpMethod | undefined;
91
+ /**
92
+ * Bounded plugin-version grammar. A version is emitted only when it is a plain
93
+ * `major.minor.patch` semver (optionally with prerelease/build suffixes) within
94
+ * 64 characters — anything else (a git sha, a sentence, a hostile string) is
95
+ * omitted rather than projected.
96
+ *
97
+ * @param version - The raw plugin `version` string
98
+ * @returns The version when it passes the bounded grammar, `undefined` otherwise
99
+ * @since 0.8.0
100
+ */
101
+ export declare function boundedPluginVersion(version: string): string | undefined;
102
+ /**
103
+ * Inclusive monotonic elapsed time for one observed boundary.
104
+ *
105
+ * @param clock - The injected monotonic clock
106
+ * @param startedAtMs - The boundary's recorded start offset, or `null`
107
+ * @returns Elapsed ms, or `null` when either reading was unavailable
108
+ * @since 0.8.0
109
+ */
110
+ export declare function monotonicElapsed(clock: () => number | null, startedAtMs: number | null): number | null;
111
+ /**
112
+ * Advances a monotonic counter with saturation at `Number.MAX_SAFE_INTEGER`.
113
+ * Returns `null` at saturation, which callers treat as "stop collection": a
114
+ * coarse failure state long before any identifier could wrap into a
115
+ * misleading value.
116
+ *
117
+ * @param current - The current counter value
118
+ * @returns The next value, or `null` when the counter is saturated
119
+ * @since 0.8.0
120
+ */
121
+ export declare function saturatingNext(current: number): number | null;
122
+ /** Fixed v1 limits: composition nodes retained by the collector. */
123
+ export declare const MAX_NODES = 1024;
124
+ /** Fixed v1 limits: composition edges retained by the collector. */
125
+ export declare const MAX_EDGES = 4096;
126
+ /** Fixed v1 limits: snapshot budget as the exact UTF-8 byte length of the compact JSON. */
127
+ export declare const MAX_SNAPSHOT_BYTES = 262144;
128
+ /**
129
+ * Applies the fixed 256 KiB snapshot budget to the final DTO: the exact UTF-8
130
+ * byte length of the compact JSON encoding of the RETURNED object is the
131
+ * number the wire consumer measures, so trimming runs on the final shape —
132
+ * omitting later entries (with their edges) and setting `truncated` until it
133
+ * fits.
134
+ *
135
+ * Extracted as a pure seam because the retained-field bounds make the budget
136
+ * unreachable through real captures (1,024 bounded nodes stay well under the
137
+ * cap); the defense still carries the bar, so the decidable trim is tested
138
+ * here directly rather than left behind an uncoverable branch.
139
+ *
140
+ * @param scalar - The snapshot's scalar members (instanceId, state, failureCode, droppedEvents)
141
+ * @param nodes - The projected nodes, oldest first
142
+ * @param edges - The projected edges, oldest first
143
+ * @param truncated - The topology truncation flag
144
+ * @returns The bounded snapshot DTO
145
+ * @since 0.8.0
146
+ */
147
+ export declare function applySnapshotBudget(scalar: {
148
+ readonly instanceId: string | null;
149
+ readonly state: DiagnosticsSnapshot['state'];
150
+ readonly failureCode: DiagnosticsSnapshot['failureCode'];
151
+ readonly droppedEvents: number;
152
+ }, nodes: readonly DiagnosticsNode[], edges: readonly DiagnosticsEdge[], truncated: boolean): DiagnosticsSnapshot;
153
+ //# sourceMappingURL=projection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projection.d.ts","sourceRoot":"","sources":["../../src/diagnostics/projection.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,UAAU,EACX,MAAM,iBAAiB,CAAC;AAEzB;;;;;;GAMG;AACH,MAAM,WAAW,6BAA6B;IAC5C,iEAAiE;IACjE,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,qEAAqE;IACrE,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,0FAA0F;IAC1F,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,iEAAiE;IACjE,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACzC;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,6BAA6B,CAAC;CACjD;AAED,uDAAuD;AACvD,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C,wDAAwD;AACxD,eAAO,MAAM,eAAe,MAAM,CAAC;AAEnC,iDAAiD;AACjD,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACtC,QAAQ,CAAC,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC3C,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACrC,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC1C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CACnC,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AM,CAAC;CAChC,EACD,KAAK,EAAE,SAAS,eAAe,EAAE,EACjC,KAAK,EAAE,SAAS,eAAe,EAAE,EACjC,SAAS,EAAE,OAAO,GACjB,mBAAmB,CA0DrB"}
@@ -0,0 +1,226 @@
1
+ /**
2
+ * Diagnostics projection — the pure half of kernel diagnostics: label
3
+ * allowlist compilation and bounded primitive projection.
4
+ *
5
+ * Every string that can leave the process through a diagnostics snapshot or
6
+ * event batch passes through the allowlists compiled here, at the capture
7
+ * boundary and never again. An allowlist is an EXACT set of registration
8
+ * strings — no globs, no regular expressions — because approving a label is a
9
+ * disclosure decision the developer makes per name, not a pattern match to be
10
+ * widened.
11
+ *
12
+ * @module
13
+ */
14
+ import { hasForbiddenAliasCharacter } from '@setu-ts/common';
15
+ /** Maximum entries accepted in one label allowlist. */
16
+ export const MAX_LABEL_LIST_ENTRIES = 256;
17
+ /** Maximum UTF-8 byte length of one allowlist entry. */
18
+ export const MAX_LABEL_BYTES = 160;
19
+ /**
20
+ * Compiles one allowlist, refusing malformed input with VALUE-FREE errors: an
21
+ * error must state the constraint it enforces, never echo the offending value,
22
+ * because a construction-time diagnostic failure is an attacker-reachable path
23
+ * for whatever the list contains.
24
+ *
25
+ * @param entries - The raw allowlist, or `undefined` for an empty set
26
+ * @param listName - Family name used in the error text only
27
+ * @returns The compiled exact-match set
28
+ * @throws {RangeError} When the list exceeds 256 entries, an entry exceeds 160
29
+ * UTF-8 bytes, or an entry contains a control character — without naming any entry
30
+ * @since 0.8.0
31
+ */
32
+ export function compileLabelAllowlist(entries, listName) {
33
+ if (entries === undefined) {
34
+ return new Set();
35
+ }
36
+ if (entries.length > MAX_LABEL_LIST_ENTRIES) {
37
+ throw new RangeError(`Invalid diagnostics labels.${listName}: more than ${MAX_LABEL_LIST_ENTRIES} entries.`);
38
+ }
39
+ const compiled = new Set();
40
+ for (const entry of entries) {
41
+ const bytes = new TextEncoder().encode(entry).length;
42
+ if (bytes > MAX_LABEL_BYTES) {
43
+ throw new RangeError(`Invalid diagnostics labels.${listName}: an entry exceeds the ${MAX_LABEL_BYTES}-byte bound.`);
44
+ }
45
+ if (hasForbiddenAliasCharacter(entry)) {
46
+ throw new RangeError(`Invalid diagnostics labels.${listName}: an entry contains a control, format or line-separator character.`);
47
+ }
48
+ compiled.add(entry);
49
+ }
50
+ return compiled;
51
+ }
52
+ /**
53
+ * Compiles every label family of a {@linkcode KernelDiagnosticsOptions}.
54
+ *
55
+ * @param options - The diagnostics options, or `undefined` for all-empty lists
56
+ * @returns The compiled allowlists
57
+ * @throws {RangeError} When any list is malformed (see {@linkcode compileLabelAllowlist})
58
+ * @since 0.8.0
59
+ */
60
+ export function compileLabelAllowlists(options) {
61
+ const labels = options?.labels;
62
+ return {
63
+ plugins: compileLabelAllowlist(labels?.plugins, 'plugins'),
64
+ capabilities: compileLabelAllowlist(labels?.capabilities, 'capabilities'),
65
+ routes: compileLabelAllowlist(labels?.routes, 'routes'),
66
+ middleware: compileLabelAllowlist(labels?.middleware, 'middleware'),
67
+ };
68
+ }
69
+ /**
70
+ * Projects a candidate registration string through an allowlist.
71
+ *
72
+ * Exact membership, never a truncation: a name either IS an approved label or
73
+ * it is omitted — truncating a 200-byte route pattern into an approved-looking
74
+ * prefix would mint a new name that was never disclosed on purpose.
75
+ *
76
+ * @param allowlist - The compiled exact-match set for this family
77
+ * @param candidate - The raw registration string
78
+ * @returns The candidate itself when approved, `undefined` otherwise
79
+ * @since 0.8.0
80
+ */
81
+ export function approvedLabel(allowlist, candidate) {
82
+ return allowlist.has(candidate) ? candidate : undefined;
83
+ }
84
+ const HTTP_METHODS = new Set([
85
+ 'GET',
86
+ 'HEAD',
87
+ 'POST',
88
+ 'PUT',
89
+ 'PATCH',
90
+ 'DELETE',
91
+ 'OPTIONS',
92
+ ]);
93
+ /**
94
+ * Projects a method string onto the {@linkcode HttpMethod} vocabulary.
95
+ * Unsupported input is omitted, never widened into a new name.
96
+ *
97
+ * @param method - The raw method string from a registration
98
+ * @returns The known verb, or `undefined` when outside the vocabulary
99
+ * @since 0.8.0
100
+ */
101
+ export function projectHttpMethod(method) {
102
+ return HTTP_METHODS.has(method) ? method : undefined;
103
+ }
104
+ /**
105
+ * Bounded plugin-version grammar. A version is emitted only when it is a plain
106
+ * `major.minor.patch` semver (optionally with prerelease/build suffixes) within
107
+ * 64 characters — anything else (a git sha, a sentence, a hostile string) is
108
+ * omitted rather than projected.
109
+ *
110
+ * @param version - The raw plugin `version` string
111
+ * @returns The version when it passes the bounded grammar, `undefined` otherwise
112
+ * @since 0.8.0
113
+ */
114
+ export function boundedPluginVersion(version) {
115
+ if (version.length === 0 || version.length > 64) {
116
+ return undefined;
117
+ }
118
+ const bounded = /^\d{1,5}\.\d{1,5}\.\d{1,5}(?:-[0-9A-Za-z.-]{1,64})?(?:\+[0-9A-Za-z.-]{1,64})?$/;
119
+ return bounded.test(version) ? version : undefined;
120
+ }
121
+ /**
122
+ * Inclusive monotonic elapsed time for one observed boundary.
123
+ *
124
+ * @param clock - The injected monotonic clock
125
+ * @param startedAtMs - The boundary's recorded start offset, or `null`
126
+ * @returns Elapsed ms, or `null` when either reading was unavailable
127
+ * @since 0.8.0
128
+ */
129
+ export function monotonicElapsed(clock, startedAtMs) {
130
+ if (startedAtMs === null) {
131
+ return null;
132
+ }
133
+ const finishedAtMs = clock();
134
+ return finishedAtMs === null ? null : finishedAtMs - startedAtMs;
135
+ }
136
+ /**
137
+ * Advances a monotonic counter with saturation at `Number.MAX_SAFE_INTEGER`.
138
+ * Returns `null` at saturation, which callers treat as "stop collection": a
139
+ * coarse failure state long before any identifier could wrap into a
140
+ * misleading value.
141
+ *
142
+ * @param current - The current counter value
143
+ * @returns The next value, or `null` when the counter is saturated
144
+ * @since 0.8.0
145
+ */
146
+ export function saturatingNext(current) {
147
+ return current >= Number.MAX_SAFE_INTEGER ? null : current + 1;
148
+ }
149
+ /** Fixed v1 limits: composition nodes retained by the collector. */
150
+ export const MAX_NODES = 1024;
151
+ /** Fixed v1 limits: composition edges retained by the collector. */
152
+ export const MAX_EDGES = 4096;
153
+ /** Fixed v1 limits: snapshot budget as the exact UTF-8 byte length of the compact JSON. */
154
+ export const MAX_SNAPSHOT_BYTES = 262_144;
155
+ /**
156
+ * Applies the fixed 256 KiB snapshot budget to the final DTO: the exact UTF-8
157
+ * byte length of the compact JSON encoding of the RETURNED object is the
158
+ * number the wire consumer measures, so trimming runs on the final shape —
159
+ * omitting later entries (with their edges) and setting `truncated` until it
160
+ * fits.
161
+ *
162
+ * Extracted as a pure seam because the retained-field bounds make the budget
163
+ * unreachable through real captures (1,024 bounded nodes stay well under the
164
+ * cap); the defense still carries the bar, so the decidable trim is tested
165
+ * here directly rather than left behind an uncoverable branch.
166
+ *
167
+ * @param scalar - The snapshot's scalar members (instanceId, state, failureCode, droppedEvents)
168
+ * @param nodes - The projected nodes, oldest first
169
+ * @param edges - The projected edges, oldest first
170
+ * @param truncated - The topology truncation flag
171
+ * @returns The bounded snapshot DTO
172
+ * @since 0.8.0
173
+ */
174
+ export function applySnapshotBudget(scalar, nodes, edges, truncated) {
175
+ const encoder = new TextEncoder();
176
+ const build = (keptNodes, keptEdges, isTruncated) => ({
177
+ version: 1,
178
+ instanceId: scalar.instanceId,
179
+ state: scalar.state,
180
+ failureCode: scalar.failureCode,
181
+ nodes: keptNodes,
182
+ edges: keptEdges,
183
+ truncated: isTruncated,
184
+ droppedEvents: scalar.droppedEvents,
185
+ });
186
+ const measure = (candidate) => encoder.encode(JSON.stringify(candidate)).length;
187
+ // Fast path: nothing to trim. Returning the inputs untouched also keeps the
188
+ // untrimmed shape EXACTLY as it was — an edge whose endpoint is somehow
189
+ // absent from `nodes` survives here, as it always did, rather than being
190
+ // silently dropped by the retained-id filter below.
191
+ const whole = build(nodes, edges, truncated);
192
+ if (measure(whole) <= MAX_SNAPSHOT_BYTES) {
193
+ return whole;
194
+ }
195
+ // Trimming keeps a PREFIX of the nodes, and dropping a suffix entry can only
196
+ // shrink the encoding — so the encoded length is monotone in the retained
197
+ // count and the largest fitting prefix is found by bisection. Dropping one
198
+ // node per measurement instead is quadratic: 4,000 nodes cost ~2,700 full
199
+ // `JSON.stringify` + encode passes (measured at ~1,000 ms) where bisection
200
+ // costs ~12 (~4 ms). The measurement itself is unchanged — every candidate
201
+ // is the exact compact UTF-8 length of the snapshot that would be returned.
202
+ const at = (count) => {
203
+ const keptNodes = nodes.slice(0, count);
204
+ const keptIds = new Set(keptNodes.map((node) => node.id));
205
+ // Equivalent to the cumulative per-drop filter: an edge survives exactly
206
+ // when neither endpoint was dropped.
207
+ const keptEdges = edges.filter((edge) => keptIds.has(edge.from) && keptIds.has(edge.to));
208
+ return build(keptNodes, keptEdges, true);
209
+ };
210
+ let low = 0;
211
+ let high = nodes.length - 1;
212
+ let best = at(0);
213
+ while (low <= high) {
214
+ const mid = (low + high) >> 1;
215
+ const candidate = at(mid);
216
+ if (measure(candidate) <= MAX_SNAPSHOT_BYTES) {
217
+ best = candidate;
218
+ low = mid + 1;
219
+ }
220
+ else {
221
+ high = mid - 1;
222
+ }
223
+ }
224
+ return best;
225
+ }
226
+ //# sourceMappingURL=projection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projection.js","sourceRoot":"","sources":["../../src/diagnostics/projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AA2C7D,uDAAuD;AACvD,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAC;AAE1C,wDAAwD;AACxD,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,CAAC;AAUnC;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAAsC,EACtC,QAAgB;IAEhB,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,IAAI,GAAG,EAAU,CAAC;IAC3B,CAAC;IACD,IAAI,OAAO,CAAC,MAAM,GAAG,sBAAsB,EAAE,CAAC;QAC5C,MAAM,IAAI,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G,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;QAC1D,yEAAyE;QACzE,qCAAqC;QACrC,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;QACzF,OAAO,KAAK,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC;IAC3C,CAAC,CAAC;IAEF,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,IAAI,IAAI,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAC5B,IAAI,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;IACjB,OAAO,GAAG,IAAI,IAAI,EAAE,CAAC;QACnB,MAAM,GAAG,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9B,MAAM,SAAS,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,OAAO,CAAC,SAAS,CAAC,IAAI,kBAAkB,EAAE,CAAC;YAC7C,IAAI,GAAG,SAAS,CAAC;YACjB,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;QAChB,CAAC;aAAM,CAAC;YACN,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC;QACjB,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @module
3
+ *
4
+ * Plugin kernel: plugin registry, service registry, middleware pipeline, router,
5
+ * and application lifecycle.
6
+ *
7
+ * Every export here is public API and documented in PUBLIC_API.md
8
+ * (AI_GUIDELINES §10).
9
+ */
10
+ export type { ApplicationOptions, IKernelApplication, InjectRequest, InjectResponse, KernelDiagnosticsLabelOptions, KernelDiagnosticsOptions, } from './application/application.ts';
11
+ export { createApplication } from './application/application.ts';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,6BAA6B,EAC7B,wBAAwB,GACzB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @module
3
+ *
4
+ * Plugin kernel: plugin registry, service registry, middleware pipeline, router,
5
+ * and application lifecycle.
6
+ *
7
+ * Every export here is public API and documented in PUBLIC_API.md
8
+ * (AI_GUIDELINES §10).
9
+ */
10
+ export { createApplication } from "./application/application.js";
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAWH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC"}
@@ -0,0 +1,136 @@
1
+ /**
2
+ * Lifecycle manager — registers and executes lifecycle hooks in the correct
3
+ * ordering. Shutdown hooks run in reverse (LIFO) for proper cleanup.
4
+ *
5
+ * @module
6
+ */
7
+ import type { IRequestContext } from '@setu-ts/common';
8
+ import type { ILifecycleApi } from '@setu-ts/common';
9
+ type RequestHook = (ctx: IRequestContext) => void | Promise<void>;
10
+ type ErrorHook = (error: Error, ctx: IRequestContext) => void | Promise<void>;
11
+ /**
12
+ * The lifecycle phases the manager itself drains, named exactly as the
13
+ * diagnostics stage vocabulary spells them. The request-scoped hooks
14
+ * (`onRequest`/`onResponse`/`onError`) are invoked by the application and
15
+ * observed there.
16
+ *
17
+ * @since 0.8.0
18
+ */
19
+ export type LifecycleHookPhase = 'register-hook' | 'init' | 'bootstrap' | 'stopping' | 'shutdown' | 'close';
20
+ /**
21
+ * One hook invocation observed with its fixed phase plus execution ordinal —
22
+ * ownership is NEVER inferred, because the manager does not record it.
23
+ *
24
+ * @since 0.8.0
25
+ */
26
+ export interface LifecycleHookObservation {
27
+ /** The lifecycle phase being drained. */
28
+ readonly phase: LifecycleHookPhase;
29
+ /** 1-based EXECUTION order within the phase (LIFO phases count downward). */
30
+ readonly ordinal: number;
31
+ /** Whether the hook threw (the error itself is never retained). */
32
+ readonly failed: boolean;
33
+ /** Monotonic start offset, or `null` when no runtime clock is available. */
34
+ readonly startedAtMs: number | null;
35
+ /** Inclusive monotonic elapsed ms, or `null`. */
36
+ readonly durationMs: number | null;
37
+ }
38
+ /**
39
+ * The diagnostics observer the application passes to instrument hook
40
+ * execution. Observation never changes hook ordering, aggregation, or
41
+ * propagation semantics.
42
+ *
43
+ * @since 0.8.0
44
+ */
45
+ export interface LifecycleObserver {
46
+ /** Monotonic clock; returns `null` when no runtime clock is available. */
47
+ readonly clock: () => number | null;
48
+ /** Called once per executed hook, in execution order. */
49
+ readonly onHook: (observation: LifecycleHookObservation) => void;
50
+ }
51
+ /**
52
+ * Default implementation of {@linkcode ILifecycleApi}. Stores hook arrays
53
+ * and exposes execution methods for each lifecycle phase.
54
+ */
55
+ export declare class LifecycleManager implements ILifecycleApi {
56
+ #private;
57
+ /**
58
+ * Installs the diagnostics observer for hook invocations. Pass `undefined`
59
+ * to detach (teardown).
60
+ *
61
+ * @param observer - The observer, or `undefined`
62
+ * @since 0.8.0
63
+ */
64
+ setLifecycleObserver(observer: LifecycleObserver | undefined): void;
65
+ onRegister(fn: () => void | Promise<void>): void;
66
+ onInit(fn: () => void | Promise<void>): void;
67
+ onBootstrap(fn: () => void | Promise<void>): void;
68
+ onRequest(fn: (ctx: IRequestContext) => void | Promise<void>): void;
69
+ onResponse(fn: (ctx: IRequestContext) => void | Promise<void>): void;
70
+ onError(fn: (error: Error, ctx: IRequestContext) => void | Promise<void>): void;
71
+ onStopping(fn: () => void | Promise<void>): void;
72
+ onShutdown(fn: () => void | Promise<void>): void;
73
+ onClose(fn: () => void | Promise<void>): void;
74
+ /**
75
+ * Runs onRegister hooks added since the previous call, in registration
76
+ * order. The kernel invokes this immediately after each plugin's
77
+ * `register()` returns, so a plugin's onRegister hooks run "during the
78
+ * owning plugin's registration" (per {@linkcode ILifecycleApi.onRegister})
79
+ * — after that plugin and before the next one. A cursor tracks how many
80
+ * hooks have already run so each plugin only fires the hooks it added; a
81
+ * hook that registers a further onRegister hook drains it in the same pass.
82
+ */
83
+ runRegister(): Promise<void>;
84
+ /** Runs all onInit hooks in registration order. */
85
+ runInit(): Promise<void>;
86
+ /** Runs all onBootstrap hooks in registration order. */
87
+ runBootstrap(): Promise<void>;
88
+ /**
89
+ * Whether any onStopping hook is registered.
90
+ *
91
+ * `Application` checks this rather than awaiting unconditionally: awaiting
92
+ * an already-resolved promise still defers the rest of `stop()` by a
93
+ * microtask, which would move when `#stopping` flips and change the answer a
94
+ * request arriving in that same tick gets. Branching keeps the new phase
95
+ * genuinely zero-width for an application that registers no hook.
96
+ */
97
+ hasStopping(): boolean;
98
+ /**
99
+ * Runs stopping hooks in reverse registration order (LIFO), before the
100
+ * application starts refusing requests.
101
+ */
102
+ runStopping(): Promise<void>;
103
+ /** Runs shutdown hooks in reverse registration order (LIFO cleanup). */
104
+ runShutdown(): Promise<void>;
105
+ /**
106
+ * Runs close hooks in registration order (after shutdown completes).
107
+ *
108
+ * EVERY hook runs, even when an earlier one rejects: a close hook releases
109
+ * one plugin's resources, and letting the first failure abort the loop meant
110
+ * one plugin that could not disconnect kept every later plugin from
111
+ * releasing anything — the M50 `onStopping` defect in a second place. The
112
+ * caller still learns about the failures, from an `AggregateError` raised
113
+ * once the whole list has run; a single failure is rethrown as itself, so an
114
+ * existing `instanceof` check on the hook's own error still matches.
115
+ *
116
+ * @throws {AggregateError} When more than one hook rejected
117
+ */
118
+ runClose(): Promise<void>;
119
+ /**
120
+ * Returns the request hooks list for the application to invoke during
121
+ * request processing.
122
+ */
123
+ getRequestHooks(): readonly RequestHook[];
124
+ /**
125
+ * Returns the response hooks list for the application to invoke after
126
+ * the response is produced.
127
+ */
128
+ getResponseHooks(): readonly RequestHook[];
129
+ /**
130
+ * Returns the error hooks list for the application to invoke when an
131
+ * error escapes middleware or a handler.
132
+ */
133
+ getErrorHooks(): readonly ErrorHook[];
134
+ }
135
+ export {};
136
+ //# sourceMappingURL=lifecycle-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lifecycle-manager.d.ts","sourceRoot":"","sources":["../../src/lifecycle/lifecycle-manager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAKrD,KAAK,WAAW,GAAG,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAClE,KAAK,SAAS,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,eAAe,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAE9E;;;;;;;GAOG;AACH,MAAM,MAAM,kBAAkB,GAC5B,eAAe,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC;AAE7E;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACvC,yCAAyC;IACzC,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC;IACnC,6EAA6E;IAC7E,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,mEAAmE;IACnE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,4EAA4E;IAC5E,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,iDAAiD;IACjD,QAAQ,CAAC,UAAU,EAAE,MAA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