@ontrails/core 1.0.0-beta.13 → 1.0.0-beta.15
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/.turbo/turbo-lint.log +1 -1
- package/CHANGELOG.md +17 -0
- package/README.md +19 -14
- package/dist/branded.d.ts +1 -1
- package/dist/branded.d.ts.map +1 -1
- package/dist/branded.js +1 -1
- package/dist/branded.js.map +1 -1
- package/dist/context.d.ts +13 -1
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +19 -3
- package/dist/context.js.map +1 -1
- package/dist/contour.d.ts +81 -0
- package/dist/contour.d.ts.map +1 -0
- package/dist/contour.js +176 -0
- package/dist/contour.js.map +1 -0
- package/dist/cross-schema.d.ts +18 -0
- package/dist/cross-schema.d.ts.map +1 -0
- package/dist/cross-schema.js +29 -0
- package/dist/cross-schema.js.map +1 -0
- package/dist/derive.d.ts +6 -0
- package/dist/derive.d.ts.map +1 -1
- package/dist/derive.js +29 -5
- package/dist/derive.js.map +1 -1
- package/dist/draft.d.ts +28 -0
- package/dist/draft.d.ts.map +1 -0
- package/dist/draft.js +157 -0
- package/dist/draft.js.map +1 -0
- package/dist/errors.d.ts +62 -4
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +44 -1
- package/dist/errors.js.map +1 -1
- package/dist/execute.d.ts +26 -9
- package/dist/execute.d.ts.map +1 -1
- package/dist/execute.js +441 -20
- package/dist/execute.js.map +1 -1
- package/dist/fire.d.ts +43 -0
- package/dist/fire.d.ts.map +1 -0
- package/dist/fire.js +185 -0
- package/dist/fire.js.map +1 -0
- package/dist/index.d.ts +33 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -12
- package/dist/index.js.map +1 -1
- package/dist/internal/cross-batch.d.ts +44 -0
- package/dist/internal/cross-batch.d.ts.map +1 -0
- package/dist/internal/cross-batch.js +58 -0
- package/dist/internal/cross-batch.js.map +1 -0
- package/dist/internal/fork-ctx.d.ts +41 -0
- package/dist/internal/fork-ctx.d.ts.map +1 -0
- package/dist/internal/fork-ctx.js +47 -0
- package/dist/internal/fork-ctx.js.map +1 -0
- package/dist/internal/signal-ref.d.ts +15 -0
- package/dist/internal/signal-ref.d.ts.map +1 -0
- package/dist/internal/signal-ref.js +41 -0
- package/dist/internal/signal-ref.js.map +1 -0
- package/dist/internal/topo-saves.d.ts +53 -0
- package/dist/internal/topo-saves.d.ts.map +1 -0
- package/dist/internal/topo-saves.js +449 -0
- package/dist/internal/topo-saves.js.map +1 -0
- package/dist/internal/topo-snapshots.d.ts +57 -0
- package/dist/internal/topo-snapshots.d.ts.map +1 -0
- package/dist/internal/topo-snapshots.js +372 -0
- package/dist/internal/topo-snapshots.js.map +1 -0
- package/dist/internal/topo-store-read.d.ts +70 -0
- package/dist/internal/topo-store-read.d.ts.map +1 -0
- package/dist/internal/topo-store-read.js +221 -0
- package/dist/internal/topo-store-read.js.map +1 -0
- package/dist/internal/topo-store.d.ts +26 -0
- package/dist/internal/topo-store.d.ts.map +1 -0
- package/dist/internal/topo-store.js +621 -0
- package/dist/internal/topo-store.js.map +1 -0
- package/dist/internal/tracing.d.ts +98 -0
- package/dist/internal/tracing.d.ts.map +1 -0
- package/dist/internal/tracing.js +102 -0
- package/dist/internal/tracing.js.map +1 -0
- package/dist/internal/trails-db.d.ts +16 -0
- package/dist/internal/trails-db.d.ts.map +1 -0
- package/dist/internal/trails-db.js +118 -0
- package/dist/internal/trails-db.js.map +1 -0
- package/dist/internal/zod-wrappers.d.ts +40 -0
- package/dist/internal/zod-wrappers.d.ts.map +1 -0
- package/dist/internal/zod-wrappers.js +59 -0
- package/dist/internal/zod-wrappers.js.map +1 -0
- package/dist/layer.d.ts +22 -5
- package/dist/layer.d.ts.map +1 -1
- package/dist/layer.js +20 -3
- package/dist/layer.js.map +1 -1
- package/dist/path-security.d.ts +1 -1
- package/dist/path-security.d.ts.map +1 -1
- package/dist/path-security.js +1 -1
- package/dist/path-security.js.map +1 -1
- package/dist/resilience.d.ts +1 -1
- package/dist/resilience.d.ts.map +1 -1
- package/dist/resilience.js +3 -3
- package/dist/resilience.js.map +1 -1
- package/dist/resource-config.d.ts +22 -0
- package/dist/resource-config.d.ts.map +1 -0
- package/dist/resource-config.js +210 -0
- package/dist/resource-config.js.map +1 -0
- package/dist/resource.d.ts +74 -0
- package/dist/resource.d.ts.map +1 -0
- package/dist/resource.js +61 -0
- package/dist/resource.js.map +1 -0
- package/dist/run.d.ts +4 -3
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +5 -4
- package/dist/run.js.map +1 -1
- package/dist/serialization.d.ts.map +1 -1
- package/dist/serialization.js +2 -1
- package/dist/serialization.js.map +1 -1
- package/dist/store/accessor-protocol.d.ts +51 -0
- package/dist/store/accessor-protocol.d.ts.map +1 -0
- package/dist/store/accessor-protocol.js +2 -0
- package/dist/store/accessor-protocol.js.map +1 -0
- package/dist/store/index.d.ts +2 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js +2 -0
- package/dist/store/index.js.map +1 -0
- package/dist/surface-filter.d.ts +13 -0
- package/dist/surface-filter.d.ts.map +1 -0
- package/dist/surface-filter.js +76 -0
- package/dist/surface-filter.js.map +1 -0
- package/dist/topo-store.d.ts +62 -0
- package/dist/topo-store.d.ts.map +1 -0
- package/dist/topo-store.js +319 -0
- package/dist/topo-store.js.map +1 -0
- package/dist/topo.d.ts +23 -9
- package/dist/topo.d.ts.map +1 -1
- package/dist/topo.js +175 -46
- package/dist/topo.js.map +1 -1
- package/dist/trail.d.ts +86 -19
- package/dist/trail.d.ts.map +1 -1
- package/dist/trail.js +59 -4
- package/dist/trail.js.map +1 -1
- package/dist/trails/derive-trail.d.ts +66 -0
- package/dist/trails/derive-trail.d.ts.map +1 -0
- package/dist/trails/derive-trail.js +378 -0
- package/dist/trails/derive-trail.js.map +1 -0
- package/dist/trails/index.d.ts +5 -0
- package/dist/trails/index.d.ts.map +1 -0
- package/dist/trails/index.js +3 -0
- package/dist/trails/index.js.map +1 -0
- package/dist/trails/ingest.d.ts +24 -0
- package/dist/trails/ingest.d.ts.map +1 -0
- package/dist/trails/ingest.js +63 -0
- package/dist/trails/ingest.js.map +1 -0
- package/dist/transport-error-map.d.ts +106 -0
- package/dist/transport-error-map.d.ts.map +1 -0
- package/dist/transport-error-map.js +24 -0
- package/dist/transport-error-map.js.map +1 -0
- package/dist/type-checks.test-d.d.ts +71 -0
- package/dist/type-checks.test-d.d.ts.map +1 -0
- package/dist/type-checks.test-d.js +12 -0
- package/dist/type-checks.test-d.js.map +1 -0
- package/dist/type-utils.d.ts +11 -2
- package/dist/type-utils.d.ts.map +1 -1
- package/dist/type-utils.js.map +1 -1
- package/dist/types.d.ts +113 -7
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/validate-established-topo.d.ts +76 -0
- package/dist/validate-established-topo.d.ts.map +1 -0
- package/dist/validate-established-topo.js +43 -0
- package/dist/validate-established-topo.js.map +1 -0
- package/dist/validate-topo.d.ts.map +1 -1
- package/dist/validate-topo.js +27 -8
- package/dist/validate-topo.js.map +1 -1
- package/dist/workspace.d.ts +1 -1
- package/dist/workspace.d.ts.map +1 -1
- package/dist/workspace.js +1 -1
- package/dist/workspace.js.map +1 -1
- package/package.json +10 -1
- package/src/__tests__/branded.test.ts +5 -5
- package/src/__tests__/context.test.ts +3 -3
- package/src/__tests__/contour.test.ts +263 -0
- package/src/__tests__/derive-trail.test.ts +668 -0
- package/src/__tests__/derive.test.ts +58 -1
- package/src/__tests__/errors.test.ts +118 -0
- package/src/__tests__/execute.test.ts +1179 -141
- package/src/__tests__/fire.test.ts +1056 -0
- package/src/__tests__/fork-ctx.test.ts +83 -0
- package/src/__tests__/ingest.test.ts +191 -0
- package/src/__tests__/{gate.test.ts → layer.test.ts} +21 -21
- package/src/__tests__/path-security.test.ts +7 -7
- package/src/__tests__/resilience.test.ts +8 -8
- package/src/__tests__/resource.test.ts +204 -0
- package/src/__tests__/run.test.ts +13 -13
- package/src/__tests__/service-config.test.ts +28 -32
- package/src/__tests__/surface-filter.test.ts +196 -0
- package/src/__tests__/topo-store-read.test.ts +256 -0
- package/src/__tests__/topo-store.test.ts +869 -0
- package/src/__tests__/topo.test.ts +350 -54
- package/src/__tests__/trail.test.ts +189 -24
- package/src/__tests__/trails-db.test.ts +198 -0
- package/src/__tests__/transport-error-map.test.ts +82 -0
- package/src/__tests__/type-utils.test.ts +29 -1
- package/src/__tests__/validate-topo.test.ts +305 -16
- package/src/__tests__/workspace.test.ts +6 -6
- package/src/__tests__/zod-wrappers.test.ts +62 -0
- package/src/branded.ts +1 -1
- package/src/context.ts +24 -4
- package/src/contour.ts +344 -0
- package/src/cross-schema.ts +36 -0
- package/src/derive.ts +39 -8
- package/src/draft.ts +338 -0
- package/src/errors.ts +62 -18
- package/src/execute.ts +840 -29
- package/src/fire.ts +295 -0
- package/src/index.ts +142 -26
- package/src/internal/cross-batch.ts +77 -0
- package/src/internal/fork-ctx.ts +69 -0
- package/src/internal/signal-ref.ts +87 -0
- package/src/internal/topo-snapshots.ts +517 -0
- package/src/internal/topo-store-read.ts +481 -0
- package/src/internal/topo-store.ts +1192 -0
- package/src/internal/tracing.ts +187 -0
- package/src/internal/trails-db.ts +187 -0
- package/src/internal/zod-wrappers.ts +78 -0
- package/src/layer.ts +50 -0
- package/src/path-security.ts +1 -1
- package/src/resilience.ts +3 -3
- package/src/{provision-config.ts → resource-config.ts} +109 -123
- package/src/resource.ts +155 -0
- package/src/run.ts +5 -4
- package/src/serialization.ts +2 -0
- package/src/store/accessor-protocol.ts +56 -0
- package/src/store/index.ts +4 -0
- package/src/surface-filter.ts +182 -0
- package/src/topo-store.ts +510 -0
- package/src/topo.ts +328 -57
- package/src/trail.ts +199 -31
- package/src/trails/derive-trail.ts +842 -0
- package/src/trails/index.ts +9 -0
- package/src/trails/ingest.ts +146 -0
- package/src/transport-error-map.ts +56 -0
- package/src/type-checks.test-d.ts +106 -0
- package/src/type-utils.ts +17 -2
- package/src/types.ts +148 -11
- package/src/validate-established-topo.ts +63 -0
- package/src/validate-topo.ts +37 -9
- package/src/workspace.ts +1 -1
- package/tsconfig.tests.json +10 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/adapters.d.ts +0 -39
- package/dist/adapters.d.ts.map +0 -1
- package/dist/adapters.js +0 -2
- package/dist/adapters.js.map +0 -1
- package/dist/dispatch.d.ts +0 -27
- package/dist/dispatch.d.ts.map +0 -1
- package/dist/dispatch.js +0 -34
- package/dist/dispatch.js.map +0 -1
- package/dist/event.d.ts +0 -8
- package/dist/event.d.ts.map +0 -1
- package/dist/event.js +0 -7
- package/dist/event.js.map +0 -1
- package/dist/gate.d.ts +0 -17
- package/dist/gate.d.ts.map +0 -1
- package/dist/gate.js +0 -21
- package/dist/gate.js.map +0 -1
- package/dist/health.d.ts +0 -18
- package/dist/health.d.ts.map +0 -1
- package/dist/health.js +0 -5
- package/dist/health.js.map +0 -1
- package/dist/job.d.ts +0 -24
- package/dist/job.d.ts.map +0 -1
- package/dist/job.js +0 -17
- package/dist/job.js.map +0 -1
- package/dist/provision-config.d.ts +0 -22
- package/dist/provision-config.d.ts.map +0 -1
- package/dist/provision-config.js +0 -210
- package/dist/provision-config.js.map +0 -1
- package/dist/provision.d.ts +0 -71
- package/dist/provision.d.ts.map +0 -1
- package/dist/provision.js +0 -56
- package/dist/provision.js.map +0 -1
- package/dist/service-config.d.ts +0 -22
- package/dist/service-config.d.ts.map +0 -1
- package/dist/service-config.js +0 -210
- package/dist/service-config.js.map +0 -1
- package/dist/service.d.ts +0 -71
- package/dist/service.d.ts.map +0 -1
- package/dist/service.js +0 -56
- package/dist/service.js.map +0 -1
- package/src/__tests__/service.test.ts +0 -197
- package/src/event.ts +0 -15
- package/src/gate.ts +0 -44
- package/src/provision.ts +0 -148
package/dist/execute.js
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Centralized trail execution pipeline.
|
|
3
3
|
*
|
|
4
|
-
* Validates input, builds context, composes
|
|
4
|
+
* Validates input, builds context, composes layers, and runs the
|
|
5
5
|
* implementation. Surfaces (CLI, MCP, HTTP) delegate here instead
|
|
6
6
|
* of reimplementing the pipeline.
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
9
|
-
import { createTrailContext } from './context.js';
|
|
10
|
-
import {
|
|
8
|
+
import { createFireFn } from './fire.js';
|
|
9
|
+
import { createTrailContext, passthroughTrace } from './context.js';
|
|
10
|
+
import { buildCrossValidationSchema } from './cross-schema.js';
|
|
11
|
+
import { CancelledError, InternalError, NotFoundError, RetryExhaustedError, TrailsError, } from './errors.js';
|
|
12
|
+
import { claimNextCrossBatchIndex, createCrossBatchValidationResults, normalizeCrossBatchConcurrency, } from './internal/cross-batch.js';
|
|
13
|
+
import { forkCtx } from './internal/fork-ctx.js';
|
|
14
|
+
import { TRACE_CONTEXT_KEY, completeRecord, createSpanRecord, createTraceRecord, getTraceSink, isTracingDisabled, writeToSink, } from './internal/tracing.js';
|
|
11
15
|
import { Result } from './result.js';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
16
|
+
import { createResourceLookup } from './resource.js';
|
|
17
|
+
import { createResources } from './resource-config.js';
|
|
18
|
+
import { TRAILHEAD_KEY } from './types.js';
|
|
14
19
|
import { validateInput } from './validation.js';
|
|
15
20
|
// ---------------------------------------------------------------------------
|
|
16
21
|
// Context resolution
|
|
@@ -27,14 +32,14 @@ const applyContextOverrides = (base, options) => {
|
|
|
27
32
|
? { ...withOverrides, abortSignal: options.abortSignal }
|
|
28
33
|
: withOverrides;
|
|
29
34
|
};
|
|
30
|
-
const
|
|
35
|
+
const bindResourceLookup = (resolved, options) => {
|
|
31
36
|
if (options?.ctx?.extensions === undefined &&
|
|
32
|
-
resolved.
|
|
37
|
+
resolved.resource !== undefined) {
|
|
33
38
|
return resolved;
|
|
34
39
|
}
|
|
35
40
|
const bound = { ...resolved };
|
|
36
|
-
const lookup =
|
|
37
|
-
bound.
|
|
41
|
+
const lookup = createResourceLookup(() => bound);
|
|
42
|
+
bound.resource = lookup;
|
|
38
43
|
return bound;
|
|
39
44
|
};
|
|
40
45
|
/**
|
|
@@ -48,31 +53,447 @@ const bindProvisionLookup = (resolved, options) => {
|
|
|
48
53
|
const resolveContext = async (options) => {
|
|
49
54
|
const seed = options?.createContext
|
|
50
55
|
? await options.createContext()
|
|
51
|
-
:
|
|
52
|
-
const base =
|
|
56
|
+
: undefined;
|
|
57
|
+
const base = createTrailContext(seed);
|
|
53
58
|
const resolved = applyContextOverrides(base, options);
|
|
54
|
-
return
|
|
59
|
+
return bindResourceLookup(resolved, options);
|
|
55
60
|
};
|
|
56
61
|
const prepareContext = async (trail, options) => {
|
|
57
62
|
const baseCtx = await resolveContext(options);
|
|
58
|
-
return await
|
|
63
|
+
return await createResources(trail, baseCtx, options?.resources, options?.configValues);
|
|
59
64
|
};
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
65
|
+
// ---------------------------------------------------------------------------
|
|
66
|
+
// Intrinsic tracing
|
|
67
|
+
// ---------------------------------------------------------------------------
|
|
68
|
+
/** Derive the status + error category fields from a trail result. */
|
|
69
|
+
const deriveResultErrorCategory = (error) => {
|
|
70
|
+
if (error instanceof TrailsError) {
|
|
71
|
+
return error.category;
|
|
72
|
+
}
|
|
73
|
+
return 'internal';
|
|
74
|
+
};
|
|
75
|
+
const deriveOutcome = (result) => result.match({
|
|
76
|
+
err: (error) => ({
|
|
77
|
+
errorCategory: deriveResultErrorCategory(error),
|
|
78
|
+
status: error instanceof CancelledError ? 'cancelled' : 'err',
|
|
79
|
+
}),
|
|
80
|
+
ok: () => ({ errorCategory: undefined, status: 'ok' }),
|
|
81
|
+
});
|
|
82
|
+
/**
|
|
83
|
+
* Best-effort error category for a thrown (not Result.err) value.
|
|
84
|
+
*
|
|
85
|
+
* Unknown/non-Error throws normalize to `'internal'` so the trace record
|
|
86
|
+
* always carries a category when the trail unexpectedly throws.
|
|
87
|
+
*/
|
|
88
|
+
const categorizeSpanError = (error) => {
|
|
89
|
+
if (error instanceof TrailsError) {
|
|
90
|
+
return error.category;
|
|
91
|
+
}
|
|
92
|
+
return 'internal';
|
|
93
|
+
};
|
|
94
|
+
/** Extract the permit identity fields for the trace record. */
|
|
95
|
+
const extractPermit = (ctx) => {
|
|
96
|
+
if (ctx.permit === undefined) {
|
|
97
|
+
return undefined;
|
|
98
|
+
}
|
|
99
|
+
const tenantId = 'tenantId' in ctx.permit
|
|
100
|
+
? ctx.permit.tenantId
|
|
101
|
+
: undefined;
|
|
102
|
+
return tenantId === undefined
|
|
103
|
+
? { id: ctx.permit.id }
|
|
104
|
+
: { id: ctx.permit.id, tenantId };
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Build a `ctx.trace` function bound to a parent trace context.
|
|
108
|
+
*
|
|
109
|
+
* Each call creates a child span under the parent, times the callback,
|
|
110
|
+
* records success/failure with the appropriate error category, writes the
|
|
111
|
+
* completed span to the sink, and returns the callback result. Errors
|
|
112
|
+
* thrown by the callback are recorded and then rethrown.
|
|
113
|
+
*
|
|
114
|
+
* The returned function reads the *current* trace context from its captured
|
|
115
|
+
* parent. That means direct nesting (`ctx.trace('a', () => ctx.trace('b',
|
|
116
|
+
* ...))`) produces siblings under `a`'s parent, not children of `a`. For
|
|
117
|
+
* true child nesting, callers should cross into another trail (which gets
|
|
118
|
+
* its own root record parented by this one) — full cross-trail parenting
|
|
119
|
+
* is implemented in a later phase. For Phase 1, sibling spans under the
|
|
120
|
+
* trail's root are the supported shape.
|
|
121
|
+
*/
|
|
122
|
+
const buildTraceFn = (parent, sink) => async (label, fn) => {
|
|
123
|
+
const record = createSpanRecord(parent, label);
|
|
124
|
+
try {
|
|
125
|
+
const value = await fn();
|
|
126
|
+
await writeToSink(sink, completeRecord(record, 'ok'));
|
|
127
|
+
return value;
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
130
|
+
const errorCategory = categorizeSpanError(error);
|
|
131
|
+
const status = error instanceof CancelledError ? 'cancelled' : 'err';
|
|
132
|
+
await writeToSink(sink, completeRecord(record, status, errorCategory));
|
|
133
|
+
throw error;
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
/** Build the root trace record + trace-enriched context for a trail run. */
|
|
137
|
+
const buildTracedContext = (trail, ctx, sink) => {
|
|
138
|
+
// If a parent trace context is present (set by an outer executeTrail when
|
|
139
|
+
// the current trail was invoked via ctx.cross or ctx.fire), inherit its
|
|
140
|
+
// traceId/rootId so the trace tree spans trail boundaries. Otherwise this
|
|
141
|
+
// execution becomes a fresh root.
|
|
142
|
+
const parent = ctx.extensions?.[TRACE_CONTEXT_KEY];
|
|
143
|
+
const record = createTraceRecord({
|
|
144
|
+
intent: trail.intent,
|
|
145
|
+
parentId: parent?.spanId,
|
|
146
|
+
permit: extractPermit(ctx),
|
|
147
|
+
rootId: parent?.rootId,
|
|
148
|
+
traceId: parent?.traceId,
|
|
149
|
+
trailId: trail.id,
|
|
150
|
+
trailhead: ctx.extensions?.[TRAILHEAD_KEY],
|
|
151
|
+
});
|
|
152
|
+
// Root trace context for this trail's span. When inheriting a parent, the
|
|
153
|
+
// traceId/rootId carry forward and only spanId advances to the new record.
|
|
154
|
+
const rootTrace = {
|
|
155
|
+
rootId: parent?.rootId ?? record.id,
|
|
156
|
+
sampled: true,
|
|
157
|
+
spanId: record.id,
|
|
158
|
+
traceId: record.traceId,
|
|
159
|
+
};
|
|
160
|
+
const tracedCtx = {
|
|
161
|
+
...ctx,
|
|
162
|
+
extensions: {
|
|
163
|
+
...ctx.extensions,
|
|
164
|
+
[TRACE_CONTEXT_KEY]: rootTrace,
|
|
165
|
+
},
|
|
166
|
+
trace: buildTraceFn(rootTrace, sink),
|
|
167
|
+
};
|
|
168
|
+
return { record, tracedCtx };
|
|
169
|
+
};
|
|
170
|
+
const buildUntracedContext = (ctx) => {
|
|
171
|
+
const { [TRACE_CONTEXT_KEY]: _traceContext, ...extensions } = ctx.extensions ?? {};
|
|
172
|
+
const hasExtensions = Object.keys(extensions).length > 0;
|
|
173
|
+
return {
|
|
174
|
+
...ctx,
|
|
175
|
+
extensions: hasExtensions ? extensions : undefined,
|
|
176
|
+
trace: passthroughTrace,
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
/** Run the composed implementation and write the root record on any outcome. */
|
|
180
|
+
const runImplWithRootRecord = async (impl, input, tracedCtx, record, sink) => {
|
|
181
|
+
try {
|
|
182
|
+
const result = await impl(input, tracedCtx);
|
|
183
|
+
const outcome = deriveOutcome(result);
|
|
184
|
+
await writeToSink(sink, completeRecord(record, outcome.status, outcome.errorCategory));
|
|
185
|
+
return result;
|
|
186
|
+
}
|
|
187
|
+
catch (error) {
|
|
188
|
+
// Normalize unexpected throws so the root record still reflects the error
|
|
189
|
+
// outcome. The outer executeTrail try/catch converts the thrown value into
|
|
190
|
+
// a Result.err(InternalError) for the caller.
|
|
191
|
+
const status = error instanceof CancelledError ? 'cancelled' : 'err';
|
|
192
|
+
const errorCategory = categorizeSpanError(error);
|
|
193
|
+
await writeToSink(sink, completeRecord(record, status, errorCategory));
|
|
194
|
+
throw error;
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
const resolveCrossTarget = (trailOrId, topo) => {
|
|
198
|
+
if (typeof trailOrId !== 'string') {
|
|
199
|
+
return Result.ok(trailOrId);
|
|
200
|
+
}
|
|
201
|
+
if (topo === undefined) {
|
|
202
|
+
return Result.err(new NotFoundError(`Trail "${trailOrId}" cannot be crossed without topo access`));
|
|
203
|
+
}
|
|
204
|
+
const target = topo.get(trailOrId);
|
|
205
|
+
return target
|
|
206
|
+
? Result.ok(target)
|
|
207
|
+
: Result.err(new NotFoundError(`Trail "${trailOrId}" not found in topo "${topo.name}"`));
|
|
208
|
+
};
|
|
209
|
+
const collectConcurrentBranchResourceIds = (target, topo) => new Set(topo?.resourceIds() ?? target.resources.map((resource) => resource.id));
|
|
210
|
+
const stripInheritedResourceExtensions = (ctx, target, topo) => {
|
|
211
|
+
const resourceIds = collectConcurrentBranchResourceIds(target, topo);
|
|
212
|
+
const entries = Object.entries(ctx.extensions ?? {}).filter(([key]) => !resourceIds.has(key));
|
|
213
|
+
return Object.fromEntries(entries);
|
|
214
|
+
};
|
|
215
|
+
const deriveConcurrentBranchLogger = (ctx, target, branchIndex) => ctx.logger?.child?.({
|
|
216
|
+
branchIndex,
|
|
217
|
+
crossedTrailId: target.id,
|
|
218
|
+
}) ?? ctx.logger;
|
|
219
|
+
/**
|
|
220
|
+
* Build a child context for one concurrent crossing branch.
|
|
221
|
+
*
|
|
222
|
+
* Concurrent crossings should not inherit already-resolved resource instances
|
|
223
|
+
* from the parent execution scope. Stripping resource IDs from extensions
|
|
224
|
+
* forces each branch to resolve its own scope while still carrying forward
|
|
225
|
+
* request-scoped values like tracing, trailhead identity, permits, and the
|
|
226
|
+
* shared AbortSignal.
|
|
227
|
+
*
|
|
228
|
+
* `cross`, `fire`, and `resource` are cleared so the child execution can
|
|
229
|
+
* rebind them to the branch-local context instead of reusing closures that
|
|
230
|
+
* capture the parent scope.
|
|
231
|
+
*/
|
|
232
|
+
const buildConcurrentBranchContext = (ctx, target, topo, branchIndex) => forkCtx(ctx, {
|
|
233
|
+
extensions: stripInheritedResourceExtensions(ctx, target, topo),
|
|
234
|
+
logger: deriveConcurrentBranchLogger(ctx, target, branchIndex),
|
|
235
|
+
});
|
|
236
|
+
const executeResolvedCrossTarget = async (target, input, ctx, topo, forwarded) => await // eslint-disable-next-line no-use-before-define -- executor closure runs only after executeTrail is defined
|
|
237
|
+
executeTrail(target, input, {
|
|
238
|
+
...forwarded,
|
|
239
|
+
ctx,
|
|
240
|
+
topo,
|
|
241
|
+
validationSchema: buildCrossValidationSchema(target),
|
|
242
|
+
});
|
|
243
|
+
const executeCrossTarget = async (trailOrId, input, ctx, topo, forwarded) => {
|
|
244
|
+
const target = resolveCrossTarget(trailOrId, topo);
|
|
245
|
+
if (target.isErr()) {
|
|
246
|
+
return target;
|
|
247
|
+
}
|
|
248
|
+
return await executeResolvedCrossTarget(target.value, input, ctx, topo, forwarded);
|
|
249
|
+
};
|
|
250
|
+
const executeConcurrentCrossBatchCall = async (call, branchIndex, ctx, topo, forwarded) => {
|
|
251
|
+
const [trailOrId, batchInput] = call;
|
|
252
|
+
const target = resolveCrossTarget(trailOrId, topo);
|
|
253
|
+
if (target.isErr()) {
|
|
254
|
+
return target;
|
|
255
|
+
}
|
|
256
|
+
return await executeResolvedCrossTarget(target.value, batchInput, buildConcurrentBranchContext(ctx, target.value, topo, branchIndex), topo, forwarded);
|
|
257
|
+
};
|
|
258
|
+
const executeUnlimitedCrossBatch = async (calls, ctx, topo, forwarded) => await Promise.all(calls.map((call, branchIndex) => executeConcurrentCrossBatchCall(call, branchIndex, ctx, topo, forwarded)));
|
|
259
|
+
const createCrossBatchResults = (calls) => Array.from({ length: calls.length });
|
|
260
|
+
const executeLimitedCrossBatch = async (calls, ctx, topo, forwarded, limit) => {
|
|
261
|
+
const results = createCrossBatchResults(calls);
|
|
262
|
+
const nextIndex = { value: 0 };
|
|
263
|
+
const runWorker = async () => {
|
|
264
|
+
while (true) {
|
|
265
|
+
const branchIndex = claimNextCrossBatchIndex(nextIndex, calls);
|
|
266
|
+
if (branchIndex === undefined) {
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
const call = calls[branchIndex];
|
|
270
|
+
if (call === undefined) {
|
|
271
|
+
// Defensive: `claimNextCrossBatchIndex` only returns indices within
|
|
272
|
+
// bounds, so this slot should always be populated. If it ever isn't,
|
|
273
|
+
// surface a clear InternalError in place of the missing slot and keep
|
|
274
|
+
// the worker loop running so sibling branches still get processed.
|
|
275
|
+
results[branchIndex] = Result.err(new InternalError(`unreachable: concurrent cross batch call missing at index ${branchIndex}`));
|
|
276
|
+
continue;
|
|
277
|
+
}
|
|
278
|
+
results[branchIndex] = await executeConcurrentCrossBatchCall(call, branchIndex, ctx, topo, forwarded);
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
await Promise.all(Array.from({ length: limit }, runWorker));
|
|
282
|
+
return results;
|
|
283
|
+
};
|
|
284
|
+
const executeCrossBatch = async (calls, ctx, topo, forwarded, batchOptions) => {
|
|
285
|
+
if (calls.length === 0) {
|
|
286
|
+
return [];
|
|
287
|
+
}
|
|
288
|
+
const concurrency = normalizeCrossBatchConcurrency(batchOptions);
|
|
289
|
+
if (concurrency.isErr()) {
|
|
290
|
+
return createCrossBatchValidationResults(calls, concurrency.error);
|
|
291
|
+
}
|
|
292
|
+
const limit = concurrency.value ?? calls.length;
|
|
293
|
+
return limit >= calls.length
|
|
294
|
+
? await executeUnlimitedCrossBatch(calls, ctx, topo, forwarded)
|
|
295
|
+
: await executeLimitedCrossBatch(calls, ctx, topo, forwarded, limit);
|
|
296
|
+
};
|
|
297
|
+
const bindCrossToCtx = (ctx, topo, options) => {
|
|
298
|
+
if (ctx.cross !== undefined) {
|
|
299
|
+
return ctx;
|
|
300
|
+
}
|
|
301
|
+
const { createContext: _omit, validationSchema: _omitSchema, ...forwarded } = options ?? {};
|
|
302
|
+
const cross = (async (trailOrCalls, inputOrOptions) => {
|
|
303
|
+
if (Array.isArray(trailOrCalls)) {
|
|
304
|
+
return await executeCrossBatch(trailOrCalls, ctx, topo, forwarded, inputOrOptions);
|
|
305
|
+
}
|
|
306
|
+
return await executeCrossTarget(trailOrCalls, inputOrOptions, ctx, topo, forwarded);
|
|
307
|
+
});
|
|
308
|
+
return {
|
|
309
|
+
...ctx,
|
|
310
|
+
cross,
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
const bindFireToCtx = (ctx, topo, options) => {
|
|
314
|
+
if (topo === undefined) {
|
|
315
|
+
return ctx;
|
|
316
|
+
}
|
|
317
|
+
// Forward the producer's execution options to consumers so resources,
|
|
318
|
+
// layers, configValues, and abortSignal propagate through signal fan-out.
|
|
319
|
+
// `createContext` is intentionally stripped — consumers inherit the
|
|
320
|
+
// already-resolved ctx via `consumerCtx`, and re-running the factory would
|
|
321
|
+
// clobber that.
|
|
322
|
+
// Strip createContext (consumers inherit resolved ctx) and validationSchema
|
|
323
|
+
// (consumers validate against their own schema, not the producer's cross schema).
|
|
324
|
+
const { createContext: _omit, validationSchema: _omitSchema, ...forwarded } = options ?? {};
|
|
325
|
+
const fire = createFireFn(topo, ctx, (consumer, input, consumerCtx) =>
|
|
326
|
+
// eslint-disable-next-line no-use-before-define -- executor closure runs only after executeTrail is defined
|
|
327
|
+
executeTrail(consumer, input, {
|
|
328
|
+
...forwarded,
|
|
329
|
+
ctx: consumerCtx,
|
|
330
|
+
topo,
|
|
331
|
+
}));
|
|
332
|
+
return { ...ctx, fire };
|
|
333
|
+
};
|
|
334
|
+
const bindCrossAtLayerBoundary = (implementation, topo, options) => (input, ctx) => implementation(input, bindCrossToCtx(ctx, topo, options));
|
|
335
|
+
const bindFireAtLayerBoundary = (implementation, topo, options) => {
|
|
336
|
+
if (topo === undefined) {
|
|
337
|
+
return implementation;
|
|
338
|
+
}
|
|
339
|
+
return (input, ctx) => implementation(input, bindFireToCtx(ctx, topo, options));
|
|
340
|
+
};
|
|
341
|
+
// ---------------------------------------------------------------------------
|
|
342
|
+
// Detour loop
|
|
343
|
+
// ---------------------------------------------------------------------------
|
|
344
|
+
const DETOUR_MAX_ATTEMPTS_CAP = 5;
|
|
345
|
+
/**
|
|
346
|
+
* Find the first detour whose `on` class matches the error via `instanceof`.
|
|
347
|
+
*
|
|
348
|
+
* Declaration order wins — no most-specific-first hierarchy walking.
|
|
349
|
+
*/
|
|
350
|
+
const findMatchingDetour = (
|
|
351
|
+
/* oxlint-disable-next-line no-explicit-any -- existential detour array from AnyTrail */
|
|
352
|
+
detours, error
|
|
353
|
+
/* oxlint-disable-next-line no-explicit-any -- matched detour carries runtime generics */
|
|
354
|
+
) => detours.find((d) => error instanceof d.on);
|
|
355
|
+
/** Execute a single detour recovery attempt, routing through ctx.trace when available. */
|
|
356
|
+
const executeDetourAttempt = async (
|
|
357
|
+
/* oxlint-disable-next-line no-explicit-any -- existential detour from AnyTrail */
|
|
358
|
+
detour, attempt, lastError, input, ctx) => {
|
|
359
|
+
const run = async () => await detour.recover({ attempt, error: lastError, input }, ctx);
|
|
360
|
+
return ctx.trace
|
|
361
|
+
? await ctx.trace(`detour:${detour.on.name}:${attempt}`, run)
|
|
362
|
+
: await run();
|
|
363
|
+
};
|
|
364
|
+
/** Classify a detour attempt result: continue the loop, or return early. */
|
|
365
|
+
const classifyDetourResult = (result,
|
|
366
|
+
/* oxlint-disable-next-line no-explicit-any -- existential detour from AnyTrail */
|
|
367
|
+
detour) => {
|
|
368
|
+
if (result.isOk()) {
|
|
369
|
+
return { done: true, result };
|
|
370
|
+
}
|
|
371
|
+
const recoverError = result.error;
|
|
372
|
+
if (!(recoverError instanceof TrailsError) ||
|
|
373
|
+
!(recoverError instanceof detour.on)) {
|
|
374
|
+
return { done: true, result };
|
|
375
|
+
}
|
|
376
|
+
return { done: false, nextError: recoverError };
|
|
377
|
+
};
|
|
378
|
+
/** Resolve effective maxAttempts, warning if the declared value exceeds the hard cap. */
|
|
379
|
+
const resolveMaxAttempts = (
|
|
380
|
+
/* oxlint-disable-next-line no-explicit-any -- existential detour from AnyTrail */
|
|
381
|
+
detour, ctx) => {
|
|
382
|
+
const declared = detour.maxAttempts ?? 1;
|
|
383
|
+
const clamped = Math.max(1, Math.min(declared, DETOUR_MAX_ATTEMPTS_CAP));
|
|
384
|
+
if (clamped === declared) {
|
|
385
|
+
return clamped;
|
|
386
|
+
}
|
|
387
|
+
ctx.logger?.warn('detour maxAttempts clamped', {
|
|
388
|
+
declared,
|
|
389
|
+
detour: detour.on.name,
|
|
390
|
+
effective: clamped,
|
|
391
|
+
});
|
|
392
|
+
return clamped;
|
|
393
|
+
};
|
|
394
|
+
/** Run the detour recovery loop for a single matched detour. */
|
|
395
|
+
const runDetourRecovery = async (
|
|
396
|
+
/* oxlint-disable-next-line no-explicit-any -- existential detour from AnyTrail */
|
|
397
|
+
detour, error, input, ctx) => {
|
|
398
|
+
const maxAttempts = resolveMaxAttempts(detour, ctx);
|
|
399
|
+
let lastError = error;
|
|
400
|
+
for (let attempt = 1; attempt <= maxAttempts; attempt += 1) {
|
|
401
|
+
ctx.logger?.debug('detour recovery attempt', {
|
|
402
|
+
attempt,
|
|
403
|
+
errorClass: lastError.name,
|
|
404
|
+
matchedDetour: detour.on.name,
|
|
405
|
+
maxAttempts,
|
|
406
|
+
});
|
|
407
|
+
const result = await executeDetourAttempt(detour, attempt, lastError, input, ctx);
|
|
408
|
+
const classification = classifyDetourResult(result, detour);
|
|
409
|
+
if (classification.done) {
|
|
410
|
+
return classification.result;
|
|
411
|
+
}
|
|
412
|
+
lastError = classification.nextError;
|
|
413
|
+
}
|
|
414
|
+
return Result.err(new RetryExhaustedError(lastError, {
|
|
415
|
+
attempts: maxAttempts,
|
|
416
|
+
detour: detour.on.name,
|
|
417
|
+
}));
|
|
418
|
+
};
|
|
419
|
+
/**
|
|
420
|
+
* Wrap a blaze with the detour recovery loop.
|
|
421
|
+
*
|
|
422
|
+
* If the trail has no detours, returns the blaze unchanged (no wrapper overhead).
|
|
423
|
+
* The detour loop runs inside the layer stack, closest to the blaze.
|
|
424
|
+
*/
|
|
425
|
+
const wrapWithDetours = (blaze,
|
|
426
|
+
/* oxlint-disable-next-line no-explicit-any -- existential detour array from AnyTrail */
|
|
427
|
+
detours) => {
|
|
428
|
+
if (detours.length === 0) {
|
|
429
|
+
return blaze;
|
|
430
|
+
}
|
|
431
|
+
return async (input, ctx) => {
|
|
432
|
+
const result = await blaze(input, ctx);
|
|
433
|
+
if (result.isOk()) {
|
|
434
|
+
return result;
|
|
435
|
+
}
|
|
436
|
+
const { error } = result;
|
|
437
|
+
if (!(error instanceof TrailsError)) {
|
|
438
|
+
return result;
|
|
439
|
+
}
|
|
440
|
+
const matched = findMatchingDetour(detours, error);
|
|
441
|
+
if (matched === undefined) {
|
|
442
|
+
return result;
|
|
443
|
+
}
|
|
444
|
+
return await runDetourRecovery(matched, error, input, ctx);
|
|
445
|
+
};
|
|
446
|
+
};
|
|
447
|
+
const prepareRunImpl = (trail, ctx, layers, topo, options) => {
|
|
448
|
+
const ctxWithIntrinsics = bindFireToCtx(bindCrossToCtx(ctx, topo, options), topo, options);
|
|
449
|
+
// Detour loop wraps the blaze (inside layer stack, closest to blaze)
|
|
450
|
+
let impl = wrapWithDetours(bindFireAtLayerBoundary(bindCrossAtLayerBoundary(trail.blaze, topo, options), topo, options), trail.detours);
|
|
451
|
+
for (let i = layers.length - 1; i >= 0; i -= 1) {
|
|
452
|
+
const layer = layers[i];
|
|
453
|
+
if (layer) {
|
|
454
|
+
impl = bindFireAtLayerBoundary(bindCrossAtLayerBoundary(layer.wrap(trail, impl), topo, options), topo, options);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
return {
|
|
458
|
+
ctxWithIntrinsics,
|
|
459
|
+
impl,
|
|
460
|
+
};
|
|
461
|
+
};
|
|
462
|
+
const runImplWithoutTracing = async (trail, input, ctx, layers, topo, options) => {
|
|
463
|
+
const prepared = prepareRunImpl(trail, buildUntracedContext(ctx), layers, topo, options);
|
|
464
|
+
return await prepared.impl(input, prepared.ctxWithIntrinsics);
|
|
465
|
+
};
|
|
466
|
+
const runTrailWithTracing = async (trail, input, ctx, layers, topo, options, sink) => {
|
|
467
|
+
const { record, tracedCtx } = buildTracedContext(trail, ctx, sink);
|
|
468
|
+
let prepared;
|
|
469
|
+
try {
|
|
470
|
+
prepared = prepareRunImpl(trail, tracedCtx, layers, topo, options);
|
|
471
|
+
}
|
|
472
|
+
catch (error) {
|
|
473
|
+
const status = error instanceof CancelledError ? 'cancelled' : 'err';
|
|
474
|
+
await writeToSink(sink, completeRecord(record, status, categorizeSpanError(error)));
|
|
475
|
+
throw error;
|
|
476
|
+
}
|
|
477
|
+
return await runImplWithRootRecord(prepared.impl, input, prepared.ctxWithIntrinsics, record, sink);
|
|
478
|
+
};
|
|
479
|
+
const runTrail = async (trail, input, ctx, layers, topo, options) => {
|
|
480
|
+
const sink = getTraceSink();
|
|
481
|
+
return isTracingDisabled(sink)
|
|
482
|
+
? await runImplWithoutTracing(trail, input, ctx, layers, topo, options)
|
|
483
|
+
: await runTrailWithTracing(trail, input, ctx, layers, topo, options, sink);
|
|
63
484
|
};
|
|
64
485
|
// ---------------------------------------------------------------------------
|
|
65
486
|
// Pipeline
|
|
66
487
|
// ---------------------------------------------------------------------------
|
|
67
488
|
/**
|
|
68
|
-
* Execute a trail through the standard validate-context-
|
|
489
|
+
* Execute a trail through the standard validate-context-layers-run pipeline.
|
|
69
490
|
*
|
|
70
491
|
* The function never throws -- unexpected exceptions are caught and
|
|
71
492
|
* returned as `Result.err(InternalError)`.
|
|
72
493
|
*/
|
|
73
494
|
export const executeTrail = async (trail, rawInput, options) => {
|
|
74
495
|
try {
|
|
75
|
-
const validated = validateInput(trail.input, rawInput);
|
|
496
|
+
const validated = validateInput(options?.validationSchema ?? trail.input, rawInput);
|
|
76
497
|
if (validated.isErr()) {
|
|
77
498
|
return validated;
|
|
78
499
|
}
|
|
@@ -80,7 +501,7 @@ export const executeTrail = async (trail, rawInput, options) => {
|
|
|
80
501
|
if (resolvedCtx.isErr()) {
|
|
81
502
|
return resolvedCtx;
|
|
82
503
|
}
|
|
83
|
-
return await runTrail(trail, validated.value, resolvedCtx.value, options?.
|
|
504
|
+
return await runTrail(trail, validated.value, resolvedCtx.value, options?.layers ?? [], options?.topo, options);
|
|
84
505
|
}
|
|
85
506
|
catch (error) {
|
|
86
507
|
const message = error instanceof Error ? error.message : String(error);
|
package/dist/execute.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../src/execute.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,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E,OAAO,CAAC,CAAC;QACzD,IAAI,WAAW,CAAC,KAAK,EAAE,EAAE,CAAC;YACxB,OAAO,WAAW,CAAC;QACrB,CAAC;QAED,OAAO,MAAM,QAAQ,CACnB,KAAK,EACL,SAAS,CAAC,KAAK,EACf,WAAW,CAAC,KAAK,EACjB,OAAO,EAAE,MAAM,IAAI,EAAE,EACrB,OAAO,EAAE,IAAI,EACb,OAAO,CACR,CAAC;IACJ,CAAC;IAAC,OAAO,KAAc,EAAE,CAAC;QACxB,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,OAAO,MAAM,CAAC,GAAG,CAAC,IAAI,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;IAChD,CAAC;AACH,CAAC,CAAC"}
|
package/dist/fire.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Signal emission and auto-activation.
|
|
3
|
+
*
|
|
4
|
+
* `createFireFn(topo, producerCtx?, executor)` returns a `FireFn` bound to
|
|
5
|
+
* a topo. Calling `fire(signalId, payload)` looks up the signal, validates
|
|
6
|
+
* the payload against its schema, finds every trail with the signal in its
|
|
7
|
+
* `on:` array, and invokes each consumer via the supplied executor.
|
|
8
|
+
*
|
|
9
|
+
* The `executor` parameter is an indirection that lets `execute.ts` pass in
|
|
10
|
+
* `executeTrail` without `fire.ts` importing it directly — keeping the two
|
|
11
|
+
* modules dependency-cycle-free.
|
|
12
|
+
*
|
|
13
|
+
* Consumer contexts inherit the producer's full ctx (logger, extensions,
|
|
14
|
+
* resources, abortSignal, requestId, env, workspaceRoot, permit) with
|
|
15
|
+
* `fire` rebound to the same closure so consumers can fan out further.
|
|
16
|
+
* Each consumer gets its own derived context so sibling fan-out branches do
|
|
17
|
+
* not share mutable top-level state. The consumer logger is derived from the
|
|
18
|
+
* producer logger as a child tagged with `signalId` and `consumerId` when
|
|
19
|
+
* `logger.child` exists.
|
|
20
|
+
*
|
|
21
|
+
* Error semantics match the fire-and-forget framing: producers get
|
|
22
|
+
* `Result.ok(undefined)` unless the signal id is unknown or the payload
|
|
23
|
+
* fails schema validation. Consumer errors are logged via the producer's
|
|
24
|
+
* logger but do NOT propagate back to the producer. Consumers that need
|
|
25
|
+
* transactional coupling should use `crosses:`.
|
|
26
|
+
*/
|
|
27
|
+
import { Result } from './result.js';
|
|
28
|
+
import type { Topo } from './topo.js';
|
|
29
|
+
import type { AnyTrail } from './trail.js';
|
|
30
|
+
import type { FireFn, TrailContextInit } from './types.js';
|
|
31
|
+
/** Signature execute.ts passes in to avoid a fire ↔ execute import cycle. */
|
|
32
|
+
export type ConsumerExecutor = (consumer: AnyTrail, input: unknown, ctx: Partial<TrailContextInit>) => Promise<Result<unknown, Error>>;
|
|
33
|
+
/**
|
|
34
|
+
* Build a `FireFn` closure bound to a topo.
|
|
35
|
+
*
|
|
36
|
+
* When `producerCtx` is provided, consumer trails activated via `on:`
|
|
37
|
+
* inherit the producer's logger, extensions, resources, abortSignal,
|
|
38
|
+
* requestId, env, workspaceRoot, and permit. `ctx.fire` on the consumer
|
|
39
|
+
* is rebound to the same closure so consumers can emit downstream
|
|
40
|
+
* signals naturally.
|
|
41
|
+
*/
|
|
42
|
+
export declare const createFireFn: (topo: Topo, producerCtx: TrailContextInit | undefined, executor: ConsumerExecutor) => FireFn;
|
|
43
|
+
//# sourceMappingURL=fire.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fire.d.ts","sourceRoot":"","sources":["../src/fire.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,MAAM,EAAU,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnE,6EAA6E;AAC7E,MAAM,MAAM,gBAAgB,GAAG,CAC7B,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,OAAO,EACd,GAAG,EAAE,OAAO,CAAC,gBAAgB,CAAC,KAC3B,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AAyKrC;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,GACvB,MAAM,IAAI,EACV,aAAa,gBAAgB,GAAG,SAAS,EACzC,UAAU,gBAAgB,KACzB,MAyEF,CAAC"}
|