posipaki 0.44.0 → 0.45.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/dist/{hooks-Dpbe39oa.d.ts → hooks-DO-efRM_.d.ts} +2 -2
- package/dist/{hooks-Dpbe39oa.d.ts.map → hooks-DO-efRM_.d.ts.map} +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/plugins/debug-logger.d.ts +2 -2
- package/dist/plugins/tree-introspection.d.ts +2 -2
- package/dist/{process-CoEKoY5f.d.ts → process-eCAv2tIS.d.ts} +2 -2
- package/dist/{process-CoEKoY5f.d.ts.map → process-eCAv2tIS.d.ts.map} +1 -1
- package/dist/remote/gateway-cli.js +1157 -50
- package/dist/remote/gateway-cli.js.map +1 -1
- package/dist/remote/index.d.ts +4 -232
- package/dist/remote/index.d.ts.map +1 -1
- package/dist/remote/index.js +2 -2
- package/dist/remote/index.js.map +1 -1
- package/dist/remote/node.d.ts +29 -54
- package/dist/remote/node.d.ts.map +1 -1
- package/dist/remote/node.js +128 -128
- package/dist/remote/node.js.map +1 -1
- package/dist/testing/index.d.ts +4 -4
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js.map +1 -1
- package/dist/{types-CuabnerI.d.ts → types-U3NvKgpg.d.ts} +10 -1
- package/dist/{types-CuabnerI.d.ts.map → types-U3NvKgpg.d.ts.map} +1 -1
- package/dist/{version-B6eNJRZD.js → version-yonmO5bG.js} +2 -2
- package/dist/{version-B6eNJRZD.js.map → version-yonmO5bG.js.map} +1 -1
- package/dist/websocket-DT8zKD34.d.ts +836 -0
- package/dist/websocket-DT8zKD34.d.ts.map +1 -0
- package/dist/{websocket-DecgMfb3.js → websocket-DkDAHMFm.js} +1102 -85
- package/dist/websocket-DkDAHMFm.js.map +1 -0
- package/dist/xfetch.d.ts +2 -2
- package/package.json +1 -1
- package/dist/websocket-DecgMfb3.js.map +0 -1
- package/dist/websocket-sGQcEDbm.d.ts +0 -310
- package/dist/websocket-sGQcEDbm.d.ts.map +0 -1
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as Message, m as AsyncProcess } from "../types-
|
|
2
|
-
import { d as ActorPlugin } from "../hooks-
|
|
1
|
+
import { a as Message, m as AsyncProcess } from "../types-U3NvKgpg.js";
|
|
2
|
+
import { d as ActorPlugin } from "../hooks-DO-efRM_.js";
|
|
3
3
|
//#region src/testing/msg-matcher.d.ts
|
|
4
4
|
type Matcher<M extends Message> = (msg: M, history: M[]) => boolean;
|
|
5
5
|
type MatchSpec<M extends Message> = Matcher<M> | Partial<M> | Array<Partial<M>>;
|
|
@@ -52,8 +52,8 @@ declare function createRootTracker(): RootTracker;
|
|
|
52
52
|
declare function pnameMatch(name: string, patterns: string[]): boolean;
|
|
53
53
|
//#endregion
|
|
54
54
|
//#region src/testing/tick-utils.d.ts
|
|
55
|
-
declare function nextState<A, S, IM extends Message, OM extends Message, R extends object>(proc: AsyncProcess<A, S, IM, OM, R>): Promise<
|
|
56
|
-
declare function nextMessage<A, S, IM extends Message, OM extends Message, R extends object>(proc: AsyncProcess<A, S, IM, OM, R>): Promise<
|
|
55
|
+
declare function nextState<A, S, IM extends Message, OM extends Message, R extends object>(proc: AsyncProcess<A, S, IM, OM, R>): Promise<AsyncProcess<A, S, IM, OM, R>["state"]>;
|
|
56
|
+
declare function nextMessage<A, S, IM extends Message, OM extends Message, R extends object>(proc: AsyncProcess<A, S, IM, OM, R>): Promise<OM>;
|
|
57
57
|
//#endregion
|
|
58
58
|
export { type Collector, type MatchResult, type MatchSpec, type Matcher, type RootTracker, createCollector, createRootTracker, nextMessage, nextState, pnameMatch, times, toMatcher };
|
|
59
59
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/testing/msg-matcher.ts","../../src/testing/test-plugin.ts","../../src/testing/pname-match.ts","../../src/testing/tick-utils.ts"],"mappings":";;;KAaY,QAAQ,UAAU,YAAY,KAAK,GAAG,SAAS;KAE/C,UAAU,UAAU,WAAW,QAAQ,KAAK,QAAQ,KAAK,MAAM,QAAQ;;iBAUnE,UAAU,UAAU,SAAS,MAAM,UAAU,KAAK,QAAQ;;;;;;;;;;;;iBA2B1D,MAAM,UAAU,SAAS,MAAM,QAAQ,KAAK,QAAQ,IAAI,YAAY,QAAQ;;;UC7B3E;EACf;;EAEA;;UAGe,UAAU,UAAU;EACnC,QAAQ;EACR,UAAU;;;;;;;;EAQV,SAAS,qBAAqB,QAAQ;EACtC,KAAK,QAAQ,UAAU,IAAI,qBAAqB,QAAQ;EACxD,MAAM,SAAS,UAAU;;UAGV;EACf,QAAQ;EACR,WAAW;;iBAmBG,gBAAgB,UAAU,SACxC,QAAQ,UAAU,IAClB;EAAS;IACR,UAAU;iBA6FG,qBAAqB;;;;iBCvJrB,WAAW,cAAc;;;iBCPzB,UAAU,GAAG,GAAG,WAAW,SAAS,WAAW,SAAS,kBACtE,MAAM,aAAa,GAAG,GAAG,IAAI,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/testing/msg-matcher.ts","../../src/testing/test-plugin.ts","../../src/testing/pname-match.ts","../../src/testing/tick-utils.ts"],"mappings":";;;KAaY,QAAQ,UAAU,YAAY,KAAK,GAAG,SAAS;KAE/C,UAAU,UAAU,WAAW,QAAQ,KAAK,QAAQ,KAAK,MAAM,QAAQ;;iBAUnE,UAAU,UAAU,SAAS,MAAM,UAAU,KAAK,QAAQ;;;;;;;;;;;;iBA2B1D,MAAM,UAAU,SAAS,MAAM,QAAQ,KAAK,QAAQ,IAAI,YAAY,QAAQ;;;UC7B3E;EACf;;EAEA;;UAGe,UAAU,UAAU;EACnC,QAAQ;EACR,UAAU;;;;;;;;EAQV,SAAS,qBAAqB,QAAQ;EACtC,KAAK,QAAQ,UAAU,IAAI,qBAAqB,QAAQ;EACxD,MAAM,SAAS,UAAU;;UAGV;EACf,QAAQ;EACR,WAAW;;iBAmBG,gBAAgB,UAAU,SACxC,QAAQ,UAAU,IAClB;EAAS;IACR,UAAU;iBA6FG,qBAAqB;;;;iBCvJrB,WAAW,cAAc;;;iBCPzB,UAAU,GAAG,GAAG,WAAW,SAAS,WAAW,SAAS,kBACtE,MAAM,aAAa,GAAG,GAAG,IAAI,IAAI,KAChC,QAAQ,aAAa,GAAG,GAAG,IAAI,IAAI;iBAStB,YAAY,GAAG,GAAG,WAAW,SAAS,WAAW,SAAS,kBACxE,MAAM,aAAa,GAAG,GAAG,IAAI,IAAI,KAChC,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/testing/msg-matcher.ts","../../src/testing/pname-match.ts","../../src/testing/test-plugin.ts","../../src/testing/tick-utils.ts"],"sourcesContent":["// ── Message Matcher ──────────────────────────────────────────────────────\n//\n// Canonical form: `fn(msg, history) => boolean`. `msg` is the just-arrived\n// message (also the last element of `history`); `history` is the full\n// accumulated list *including* `msg`.\n//\n// Two shortcuts:\n// - a message literal `{ type: \"X\" }` → matches the latest message\n// - a list `[{...}, {...}]` → matches the tail of history,\n// in order, from oldest to newest\n\nimport type { Message } from \"../types.js\";\n\nexport type Matcher<M extends Message> = (msg: M, history: M[]) => boolean;\n\nexport type MatchSpec<M extends Message> = Matcher<M> | Partial<M> | Array<Partial<M>>;\n\nfunction shallowMatch<M extends Message>(msg: M, spec: Partial<M>): boolean {\n for (const key of Object.keys(spec) as Array<keyof M>) {\n if (msg[key] !== spec[key]) return false;\n }\n return true;\n}\n\n/** Convert a matcher spec to a canonical matcher function. */\nexport function toMatcher<M extends Message>(spec: MatchSpec<M>): Matcher<M> {\n if (typeof spec === \"function\") return spec as Matcher<M>;\n\n if (Array.isArray(spec)) {\n // Sequence: the tail of history must equal `spec`, in order.\n return (_msg, history) => {\n if (history.length < spec.length) return false;\n const tail = history.slice(-spec.length);\n return spec.every((s, i) => shallowMatch(tail[i], s));\n };\n }\n\n // Single literal: the latest message must shallow-match.\n return (msg) => shallowMatch(msg, spec);\n}\n\n/**\n * Occurrence matcher: matches when at least `n` messages in the history\n * satisfy `spec`. This is the canonical form for \"Nth occurrence\" waits:\n *\n * const c = createCollector<PongMsg>({ type: \"PONG\" });\n * await c.next(times({ type: \"PONG\" }, 3)); // wait for the 3rd PONG\n *\n * Note: `history` accumulates, so this counts occurrences over the whole\n * collected history, not since the previous `next()`. Use `reset()` with a\n * fresh collector for windowed counts.\n */\nexport function times<M extends Message>(spec: Partial<M> | Matcher<M>, n: number): Matcher<M> {\n const single: Matcher<M> = typeof spec === \"function\" ? spec : (m) => shallowMatch(m, spec);\n return (_msg, history) => history.filter((m) => single(m, history)).length >= n;\n}\n","// ── Process Name Match ───────────────────────────────────────────────────\n//\n// Tree-prefix matching for posipaki process names (`parent:child:...`).\n//\n// Pattern language (same as debug-logger's DEBUG env filtering):\n// - \"*\" matches any name\n// - \"name\" matches exactly\n// - \"prefix:*\" matches `prefix` and `prefix:` + anything below it\n\n/** True if `name` matches any of `patterns`. */\nexport function pnameMatch(name: string, patterns: string[]): boolean {\n for (const p of patterns) {\n if (p === \"*\") return true;\n if (p.endsWith(\":*\")) {\n const prefix = p.slice(0, -2);\n if (name === prefix || name.startsWith(prefix + \":\")) return true;\n } else if (p === name) {\n return true;\n }\n }\n return false;\n}\n","// ── Test Plugins ─────────────────────────────────────────────────────────\n//\n// createCollector: per-actor message collector plugin.\n// createRootTracker: global process tracker for cleanup.\n//\n// Observation model: the collector is a plugin installed on the root. It\n// sees every message that flows through the process's onEmit, filtered by\n// a pname scope (default: the root and everything below it). Waiting is\n// event-driven — `resolved()` settles when a matching message arrives, the\n// actor exits, or an explicit timeout fires. No polling.\n\nimport { mergeConfigs, type ActorPlugin, type ActorReflection } from \"../hooks.js\";\nimport type { ActorContext, ReflectionOptions } from \"../actor-types.js\";\n\nimport type { Message, SenderInfo } from \"../types.js\";\nimport { toMatcher, type MatchSpec } from \"./msg-matcher.js\";\nimport { pnameMatch } from \"./pname-match.js\";\nimport { withTimeout, makeWaiter, type Waiter } from \"../util.js\";\n\nconst DEFAULT_TIMEOUT = 4500;\n\n// ── types ────────────────────────────────────────────────────────────────\n\nexport interface MatchResult {\n ok: boolean;\n /** Human-readable diagnosis on failure (timeout / exit-before-match). */\n detail?: string;\n}\n\nexport interface Collector<M extends Message> {\n plugin: ActorPlugin;\n messages: M[];\n /**\n * Wait until the collected history matches the current filter,\n * the actor exits or timeout deadline hits.\n *\n * @param timeoutMs - deadline, defaults to 4.5 seconds\n *\n */\n resolved(timeoutMs?: number): Promise<MatchResult>;\n next(filter: MatchSpec<M>, timeoutMs?: number): Promise<MatchResult>;\n reset(filter?: MatchSpec<M>): void;\n}\n\nexport interface RootTracker {\n plugin: ActorPlugin;\n stopAll(): Promise<void>;\n}\n\n// ── diagnostics helpers ──────────────────────────────────────────────────\n\nfunction describeSpec<M extends Message>(spec: MatchSpec<M>): string {\n if (typeof spec === \"function\") return \"predicate\";\n if (Array.isArray(spec)) return `sequence [${spec.map((s) => JSON.stringify(s)).join(\" → \")}]`;\n return JSON.stringify(spec);\n}\n\nfunction lastSummary<M extends Message>(messages: M[]): string {\n const last = messages[messages.length - 1];\n if (last === undefined) return \"none\";\n return JSON.stringify(last).slice(0, 120);\n}\n\n// ── createCollector ──────────────────────────────────────────────────────\n\nexport function createCollector<M extends Message>(\n filter: MatchSpec<M>,\n opts?: { scope?: string | string[] },\n): Collector<M> {\n const messages: M[] = [];\n let matcher = toMatcher(filter);\n // The spec currently active — kept in sync with `matcher` so timeout\n // diagnostics can say what was expected.\n let currentSpec: MatchSpec<M> = filter;\n // Captured from the root's beforeStart; used as the default scope.\n let defaultScope: string[] = [];\n // The plugin is installed on the root first (spawn assembles before any\n // child is forked), so the first install's beforeStart is the root.\n let installed = false;\n let waiters: Waiter<MatchResult>[] = [];\n\n function setSpec(spec: MatchSpec<M>) {\n currentSpec = spec;\n matcher = toMatcher(spec);\n }\n\n function scopePatterns(): string[] {\n if (opts?.scope === undefined) return defaultScope;\n return Array.isArray(opts.scope) ? opts.scope : [opts.scope];\n }\n\n function checkAndNotify() {\n const last = messages[messages.length - 1];\n if (last !== undefined && matcher(last, messages)) {\n const ws = waiters.splice(0);\n for (const w of ws) w.resolve({ ok: true });\n }\n }\n\n async function resolved(timeoutMs: number = DEFAULT_TIMEOUT): Promise<MatchResult> {\n const last = messages[messages.length - 1];\n if (last !== undefined && matcher(last, messages)) {\n return { ok: true };\n }\n const matchWaiter = makeWaiter<MatchResult>();\n waiters.push(matchWaiter);\n\n try {\n return await withTimeout(matchWaiter.promise, timeoutMs, \"test-match\");\n } catch (e) {\n if ((e as Error)?.message !== \"Timeout:test-match\") {\n throw e;\n }\n\n return {\n ok: false,\n detail:\n `timeout after ${timeoutMs}ms — expected: ${describeSpec(currentSpec)} ` +\n `— received ${messages.length} message(s), last: ${lastSummary(messages)}`,\n };\n }\n }\n\n const collectorPlugin: ActorPlugin = (config) => {\n const isRoot = !installed;\n installed = true;\n return mergeConfigs(config, {\n beforeStart() {\n if (isRoot) defaultScope = [this.name];\n },\n onEmit(msg: Message, sender: SenderInfo) {\n if (!pnameMatch(sender.fromName, scopePatterns())) return;\n messages.push(msg as M);\n checkAndNotify();\n },\n beforeEnd() {\n const ws = waiters.splice(0);\n for (const w of ws) w.resolve({ ok: false, detail: \"actor exited before match\" });\n },\n });\n };\n\n // Named function so framework deduplication works.\n Object.defineProperty(collectorPlugin, \"name\", { value: \"messageCollector\" });\n\n return {\n plugin: collectorPlugin,\n messages,\n resolved,\n next(nextFilter, timeoutMs = DEFAULT_TIMEOUT) {\n setSpec(nextFilter);\n return resolved(timeoutMs);\n },\n reset(newFilter) {\n if (newFilter) setSpec(newFilter);\n },\n };\n}\n\n// ── createRootTracker ────────────────────────────────────────────────────\n\nexport function createRootTracker(): RootTracker {\n const roots = new Set<\n ActorContext<unknown, unknown, Message, Message, {}, {}, ReflectionOptions & ActorReflection>\n >();\n\n const rootTrackerPlugin: ActorPlugin = (config) =>\n mergeConfigs(config, {\n beforeStart() {\n roots.add(this);\n },\n afterEnd() {\n roots.delete(this);\n },\n });\n\n Object.defineProperty(rootTrackerPlugin, \"name\", { value: \"rootTracker\" });\n\n return {\n plugin: rootTrackerPlugin,\n async stopAll() {\n for (const root of roots) {\n try {\n root.exit();\n } catch {}\n }\n roots.clear();\n },\n };\n}\n","import type { AsyncProcess } from \"../process.async.js\";\nimport type { Message } from \"../types.js\";\n\nexport function nextState<A, S, IM extends Message, OM extends Message, R extends object>(\n proc: AsyncProcess<A, S, IM, OM, R>,\n) {\n return new Promise((resolve) => {\n const unsub = proc.subscribe(\"state\", () => {\n unsub();\n resolve(proc.state);\n });\n });\n}\n\nexport function nextMessage<A, S, IM extends Message, OM extends Message, R extends object>(\n proc: AsyncProcess<A, S, IM, OM, R>,\n) {\n return new Promise((resolve) => {\n const unsub = proc.subscribe(\"message\", (msg) => {\n unsub();\n resolve(msg);\n });\n });\n}\n"],"mappings":";;;AAiBA,SAAS,aAAgC,KAAQ,MAA2B;CAC1E,KAAK,MAAM,OAAO,OAAO,KAAK,IAAI,GAChC,IAAI,IAAI,SAAS,KAAK,MAAM,OAAO;CAErC,OAAO;AACT;;AAGA,SAAgB,UAA6B,MAAgC;CAC3E,IAAI,OAAO,SAAS,YAAY,OAAO;CAEvC,IAAI,MAAM,QAAQ,IAAI,GAEpB,QAAQ,MAAM,YAAY;EACxB,IAAI,QAAQ,SAAS,KAAK,QAAQ,OAAO;EACzC,MAAM,OAAO,QAAQ,MAAM,CAAC,KAAK,MAAM;EACvC,OAAO,KAAK,OAAO,GAAG,MAAM,aAAa,KAAK,IAAI,CAAC,CAAC;CACtD;CAIF,QAAQ,QAAQ,aAAa,KAAK,IAAI;AACxC;;;;;;;;;;;;AAaA,SAAgB,MAAyB,MAA+B,GAAuB;CAC7F,MAAM,SAAqB,OAAO,SAAS,aAAa,QAAQ,MAAM,aAAa,GAAG,IA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AAS,SAAS;EAC3B;EACA,MAAM,WAAW;GACf,IAAI,WAAW,QAAQ,SAAS;EAClC;CACF;AACF;AAIA,SAAgB,oBAAiC;CAC/C,MAAM,wBAAQ,IAAI,IAEhB;CAEF,MAAM,qBAAkC,WACtC,aAAa,QAAQ;EACnB,cAAc;GACZ,MAAM,IAAI,IAAI;EAChB;EACA,WAAW;GACT,MAAM,OAAO,IAAI;EACnB;CACF,CAAC;CAEH,OAAO,eAAe,mBAAmB,QAAQ,EAAE,OAAO,cAAc,CAAC;CAEzE,OAAO;EACL,QAAQ;EACR,MAAM,UAAU;GACd,KAAK,MAAM,QAAQ,OACjB,IAAI;IACF,KAAK,KAAK;GACZ,QAAQ,CAAC;GAEX,MAAM,MAAM;EACd;CACF;AACF;;;AC1LA,SAAgB,UACd,MACA;CACA,OAAO,IAAI,SAAS,YAAY;EAC9B,MAAM,QAAQ,KAAK,UAAU,eAAe;GAC1C,MAAM;GACN,QAAQ,KAAK,KAAK;EACpB,CAAC;CACH,CAAC;AACH;AAEA,SAAgB,YACd,MACA;CACA,OAAO,IAAI,SAAS,YAAY;EAC9B,MAAM,QAAQ,KAAK,UAAU,YAAY,QAAQ;GAC/C,MAAM;GACN,QAAQ,GAAG;EACb,CAAC;CACH,CAAC;AACH"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/testing/msg-matcher.ts","../../src/testing/pname-match.ts","../../src/testing/test-plugin.ts","../../src/testing/tick-utils.ts"],"sourcesContent":["// ── Message Matcher ──────────────────────────────────────────────────────\n//\n// Canonical form: `fn(msg, history) => boolean`. `msg` is the just-arrived\n// message (also the last element of `history`); `history` is the full\n// accumulated list *including* `msg`.\n//\n// Two shortcuts:\n// - a message literal `{ type: \"X\" }` → matches the latest message\n// - a list `[{...}, {...}]` → matches the tail of history,\n// in order, from oldest to newest\n\nimport type { Message } from \"../types.js\";\n\nexport type Matcher<M extends Message> = (msg: M, history: M[]) => boolean;\n\nexport type MatchSpec<M extends Message> = Matcher<M> | Partial<M> | Array<Partial<M>>;\n\nfunction shallowMatch<M extends Message>(msg: M, spec: Partial<M>): boolean {\n for (const key of Object.keys(spec) as Array<keyof M>) {\n if (msg[key] !== spec[key]) return false;\n }\n return true;\n}\n\n/** Convert a matcher spec to a canonical matcher function. */\nexport function toMatcher<M extends Message>(spec: MatchSpec<M>): Matcher<M> {\n if (typeof spec === \"function\") return spec as Matcher<M>;\n\n if (Array.isArray(spec)) {\n // Sequence: the tail of history must equal `spec`, in order.\n return (_msg, history) => {\n if (history.length < spec.length) return false;\n const tail = history.slice(-spec.length);\n return spec.every((s, i) => shallowMatch(tail[i], s));\n };\n }\n\n // Single literal: the latest message must shallow-match.\n return (msg) => shallowMatch(msg, spec);\n}\n\n/**\n * Occurrence matcher: matches when at least `n` messages in the history\n * satisfy `spec`. This is the canonical form for \"Nth occurrence\" waits:\n *\n * const c = createCollector<PongMsg>({ type: \"PONG\" });\n * await c.next(times({ type: \"PONG\" }, 3)); // wait for the 3rd PONG\n *\n * Note: `history` accumulates, so this counts occurrences over the whole\n * collected history, not since the previous `next()`. Use `reset()` with a\n * fresh collector for windowed counts.\n */\nexport function times<M extends Message>(spec: Partial<M> | Matcher<M>, n: number): Matcher<M> {\n const single: Matcher<M> = typeof spec === \"function\" ? spec : (m) => shallowMatch(m, spec);\n return (_msg, history) => history.filter((m) => single(m, history)).length >= n;\n}\n","// ── Process Name Match ───────────────────────────────────────────────────\n//\n// Tree-prefix matching for posipaki process names (`parent:child:...`).\n//\n// Pattern language (same as debug-logger's DEBUG env filtering):\n// - \"*\" matches any name\n// - \"name\" matches exactly\n// - \"prefix:*\" matches `prefix` and `prefix:` + anything below it\n\n/** True if `name` matches any of `patterns`. */\nexport function pnameMatch(name: string, patterns: string[]): boolean {\n for (const p of patterns) {\n if (p === \"*\") return true;\n if (p.endsWith(\":*\")) {\n const prefix = p.slice(0, -2);\n if (name === prefix || name.startsWith(prefix + \":\")) return true;\n } else if (p === name) {\n return true;\n }\n }\n return false;\n}\n","// ── Test Plugins ─────────────────────────────────────────────────────────\n//\n// createCollector: per-actor message collector plugin.\n// createRootTracker: global process tracker for cleanup.\n//\n// Observation model: the collector is a plugin installed on the root. It\n// sees every message that flows through the process's onEmit, filtered by\n// a pname scope (default: the root and everything below it). Waiting is\n// event-driven — `resolved()` settles when a matching message arrives, the\n// actor exits, or an explicit timeout fires. No polling.\n\nimport { mergeConfigs, type ActorPlugin, type ActorReflection } from \"../hooks.js\";\nimport type { ActorContext, ReflectionOptions } from \"../actor-types.js\";\n\nimport type { Message, SenderInfo } from \"../types.js\";\nimport { toMatcher, type MatchSpec } from \"./msg-matcher.js\";\nimport { pnameMatch } from \"./pname-match.js\";\nimport { withTimeout, makeWaiter, type Waiter } from \"../util.js\";\n\nconst DEFAULT_TIMEOUT = 4500;\n\n// ── types ────────────────────────────────────────────────────────────────\n\nexport interface MatchResult {\n ok: boolean;\n /** Human-readable diagnosis on failure (timeout / exit-before-match). */\n detail?: string;\n}\n\nexport interface Collector<M extends Message> {\n plugin: ActorPlugin;\n messages: M[];\n /**\n * Wait until the collected history matches the current filter,\n * the actor exits or timeout deadline hits.\n *\n * @param timeoutMs - deadline, defaults to 4.5 seconds\n *\n */\n resolved(timeoutMs?: number): Promise<MatchResult>;\n next(filter: MatchSpec<M>, timeoutMs?: number): Promise<MatchResult>;\n reset(filter?: MatchSpec<M>): void;\n}\n\nexport interface RootTracker {\n plugin: ActorPlugin;\n stopAll(): Promise<void>;\n}\n\n// ── diagnostics helpers ──────────────────────────────────────────────────\n\nfunction describeSpec<M extends Message>(spec: MatchSpec<M>): string {\n if (typeof spec === \"function\") return \"predicate\";\n if (Array.isArray(spec)) return `sequence [${spec.map((s) => JSON.stringify(s)).join(\" → \")}]`;\n return JSON.stringify(spec);\n}\n\nfunction lastSummary<M extends Message>(messages: M[]): string {\n const last = messages[messages.length - 1];\n if (last === undefined) return \"none\";\n return JSON.stringify(last).slice(0, 120);\n}\n\n// ── createCollector ──────────────────────────────────────────────────────\n\nexport function createCollector<M extends Message>(\n filter: MatchSpec<M>,\n opts?: { scope?: string | string[] },\n): Collector<M> {\n const messages: M[] = [];\n let matcher = toMatcher(filter);\n // The spec currently active — kept in sync with `matcher` so timeout\n // diagnostics can say what was expected.\n let currentSpec: MatchSpec<M> = filter;\n // Captured from the root's beforeStart; used as the default scope.\n let defaultScope: string[] = [];\n // The plugin is installed on the root first (spawn assembles before any\n // child is forked), so the first install's beforeStart is the root.\n let installed = false;\n let waiters: Waiter<MatchResult>[] = [];\n\n function setSpec(spec: MatchSpec<M>) {\n currentSpec = spec;\n matcher = toMatcher(spec);\n }\n\n function scopePatterns(): string[] {\n if (opts?.scope === undefined) return defaultScope;\n return Array.isArray(opts.scope) ? opts.scope : [opts.scope];\n }\n\n function checkAndNotify() {\n const last = messages[messages.length - 1];\n if (last !== undefined && matcher(last, messages)) {\n const ws = waiters.splice(0);\n for (const w of ws) w.resolve({ ok: true });\n }\n }\n\n async function resolved(timeoutMs: number = DEFAULT_TIMEOUT): Promise<MatchResult> {\n const last = messages[messages.length - 1];\n if (last !== undefined && matcher(last, messages)) {\n return { ok: true };\n }\n const matchWaiter = makeWaiter<MatchResult>();\n waiters.push(matchWaiter);\n\n try {\n return await withTimeout(matchWaiter.promise, timeoutMs, \"test-match\");\n } catch (e) {\n if ((e as Error)?.message !== \"Timeout:test-match\") {\n throw e;\n }\n\n return {\n ok: false,\n detail:\n `timeout after ${timeoutMs}ms — expected: ${describeSpec(currentSpec)} ` +\n `— received ${messages.length} message(s), last: ${lastSummary(messages)}`,\n };\n }\n }\n\n const collectorPlugin: ActorPlugin = (config) => {\n const isRoot = !installed;\n installed = true;\n return mergeConfigs(config, {\n beforeStart() {\n if (isRoot) defaultScope = [this.name];\n },\n onEmit(msg: Message, sender: SenderInfo) {\n if (!pnameMatch(sender.fromName, scopePatterns())) return;\n messages.push(msg as M);\n checkAndNotify();\n },\n beforeEnd() {\n const ws = waiters.splice(0);\n for (const w of ws) w.resolve({ ok: false, detail: \"actor exited before match\" });\n },\n });\n };\n\n // Named function so framework deduplication works.\n Object.defineProperty(collectorPlugin, \"name\", { value: \"messageCollector\" });\n\n return {\n plugin: collectorPlugin,\n messages,\n resolved,\n next(nextFilter, timeoutMs = DEFAULT_TIMEOUT) {\n setSpec(nextFilter);\n return resolved(timeoutMs);\n },\n reset(newFilter) {\n if (newFilter) setSpec(newFilter);\n },\n };\n}\n\n// ── createRootTracker ────────────────────────────────────────────────────\n\nexport function createRootTracker(): RootTracker {\n const roots = new Set<\n ActorContext<unknown, unknown, Message, Message, {}, {}, ReflectionOptions & ActorReflection>\n >();\n\n const rootTrackerPlugin: ActorPlugin = (config) =>\n mergeConfigs(config, {\n beforeStart() {\n roots.add(this);\n },\n afterEnd() {\n roots.delete(this);\n },\n });\n\n Object.defineProperty(rootTrackerPlugin, \"name\", { value: \"rootTracker\" });\n\n return {\n plugin: rootTrackerPlugin,\n async stopAll() {\n for (const root of roots) {\n try {\n root.exit();\n } catch {}\n }\n roots.clear();\n },\n };\n}\n","import type { AsyncProcess } from \"../process.async.js\";\nimport type { Message } from \"../types.js\";\n\nexport function nextState<A, S, IM extends Message, OM extends Message, R extends object>(\n proc: AsyncProcess<A, S, IM, OM, R>,\n): Promise<AsyncProcess<A, S, IM, OM, R>[\"state\"]> {\n return new Promise((resolve) => {\n const unsub = proc.subscribe(\"state\", () => {\n unsub();\n resolve(proc.state);\n });\n });\n}\n\nexport function nextMessage<A, S, IM extends Message, OM extends Message, R extends object>(\n proc: AsyncProcess<A, S, IM, OM, R>,\n): Promise<OM> {\n return new Promise((resolve) => {\n const unsub = proc.subscribe(\"message\", (msg) => {\n unsub();\n resolve(msg);\n });\n });\n}\n"],"mappings":";;;AAiBA,SAAS,aAAgC,KAAQ,MAA2B;CAC1E,KAAK,MAAM,OAAO,OAAO,KAAK,IAAI,GAChC,IAAI,IAAI,SAAS,KAAK,MAAM,OAAO;CAErC,OAAO;AACT;;AAGA,SAAgB,UAA6B,MAAgC;CAC3E,IAAI,OA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= ProcessCtx<unknown, unknown, Message, Message> | "root";
|
|
|
260
260
|
interface FrameChannel {
|
|
261
261
|
send(frame: Record<string, unknown>): void | Promise<void>;
|
|
262
262
|
onMessage(handler: (frame: Record<string, unknown>) => void): () => void;
|
|
263
|
+
/**
|
|
264
|
+
* A frame with raw octets after it, written as octets rather than inside JSON.
|
|
265
|
+
*
|
|
266
|
+
* A channel over whole objects has no octets to give and does not offer these two; a
|
|
267
|
+
* connection that carries them is the one a stream can cross.
|
|
268
|
+
*/
|
|
269
|
+
sendSegment?(frame: Record<string, unknown>, bytes: Uint8Array): void | Promise<void>;
|
|
270
|
+
/** Those octets, whole, in the order they were sent. */
|
|
271
|
+
onSegment?(handler: (frame: Record<string, unknown>, bytes: Uint8Array) => void): () => void;
|
|
263
272
|
/** Fires when the peer disconnects (the connection closes from the other side). */
|
|
264
273
|
onClose(handler: () => void): void;
|
|
265
274
|
close(): Promise<void>;
|
|
@@ -327,4 +336,4 @@ type ProcessCtx<Args, State, IM extends Message, OM extends Message> = {
|
|
|
327
336
|
type ForkSite = Pick<ProcessCtx<unknown, unknown, Message, Message>, "fork">;
|
|
328
337
|
//#endregion
|
|
329
338
|
export { Message as a, SenderInfo as c, WithSender as d, WithoutSender as f, spawnAsync as g, runDispatchAsync as h, FrameChannel as i, SenderOrigin as l, AsyncProcess as m, ExitMessage as n, ProcessCtx as o, AnyProcess as p, ForkSite as r, ProcessFn as s, AsyncProcessFn as t, StopMessage as u };
|
|
330
|
-
//# sourceMappingURL=types-
|
|
339
|
+
//# sourceMappingURL=types-U3NvKgpg.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-
|
|
1
|
+
{"version":3,"file":"types-U3NvKgpg.d.ts","names":[],"sources":["../src/process.async.ts","../src/types.d.ts"],"mappings":";KAwBK;KAkBA,aAAa,MAAM,KAAK,MAAM;KAC9B;;;;;;iBAOkB,iBAAiB,GACtC,cACA,IAAI,aAAa,IACjB,UAAS,SACT,uBACC,2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,WAAW,KAAK,KAAK;EACrB,UAAU,iBAAiB,KAAK;;;;EAIhC;;;;EAIA;;;;EAIA;;;EAGA,kBAAkB;IAClB,KAAK,aAAa,MAAM,OAAO,IAAI;;;;;;;;;;;;;;;KAgB3B,WAAW,KAAK,6BAA6B,SAAS"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region src/version.ts
|
|
2
2
|
/** posipaki's release version. Must equal package.json's `version`. */
|
|
3
|
-
const LIB_VERSION = "0.
|
|
3
|
+
const LIB_VERSION = "0.45.0";
|
|
4
4
|
//#endregion
|
|
5
5
|
export { LIB_VERSION as t };
|
|
6
6
|
|
|
7
|
-
//# sourceMappingURL=version-
|
|
7
|
+
//# sourceMappingURL=version-yonmO5bG.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-
|
|
1
|
+
{"version":3,"file":"version-yonmO5bG.js","names":[],"sources":["../src/version.ts"],"sourcesContent":["// ── Library identity ───────────────────────────────────────────────────────\n//\n// posipaki's own release version, as a plain inlined string. A consumer that\n// stages artifacts onto a host it knows nothing about has to name those\n// artifacts after which posipaki they speak, and the bundle that runs there has\n// no node_modules and no posipaki on disk — it can never read a file to find out.\n//\n// It is not the protocol version: that is `VERSION` in ./remote (`json.v1`), and\n// it does not move between releases. The two answer different questions.\n//\n// version.test.ts pins this to package.json, so a release that forgets to bump it\n// fails the suite rather than shipping a lie.\n\n/** posipaki's release version. Must equal package.json's `version`. */\nexport const LIB_VERSION = \"0.45.0\";\n"],"mappings":";;AAcA,MAAa,cAAc"}
|