fascicle 0.17.7 → 0.18.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/CHANGELOG.md +42 -0
- package/README.md +25 -2
- package/dist/AGENTS.md +23 -11
- package/dist/acp.d.ts +3 -17
- package/dist/acp.js +25 -44
- package/dist/acp.js.map +1 -1
- package/dist/{adapters-CDUzZlby.js → adapters-CpKpDk7r.js} +9 -17
- package/dist/{adapters-CDUzZlby.js.map → adapters-CpKpDk7r.js.map} +1 -1
- package/dist/adapters.d.ts +1 -13
- package/dist/adapters.js +1 -1
- package/dist/agents.d.ts +3 -5
- package/dist/agents.js +2 -3
- package/dist/{console-CdB4pcFO.js → console-B1ozi_ii.js} +2 -3
- package/dist/{console-CdB4pcFO.js.map → console-B1ozi_ii.js.map} +1 -1
- package/dist/{core-Bfzt55Fl.js → core-BH7sWpEG.js} +34 -66
- package/dist/{core-Bfzt55Fl.js.map → core-BH7sWpEG.js.map} +1 -1
- package/dist/diagram_bin.d.ts +0 -2
- package/dist/diagram_bin.js +3 -5
- package/dist/diagram_bin.js.map +1 -1
- package/dist/{engine-B5iQ3if9.js → engine-fOjYHcv6.js} +302 -98
- package/dist/engine-fOjYHcv6.js.map +1 -0
- package/dist/index.d.ts +4 -98
- package/dist/index.js +27 -47
- package/dist/index.js.map +1 -1
- package/dist/{invoke-DnmWf8gE.js → invoke-7iu8db6V.js} +19 -12
- package/dist/{invoke-DnmWf8gE.js.map → invoke-7iu8db6V.js.map} +1 -1
- package/dist/{json_schema_to_standard-C4F4lXHE.js → json_schema_to_standard-BstoXjM8.js} +3 -4
- package/dist/{json_schema_to_standard-C4F4lXHE.js.map → json_schema_to_standard-BstoXjM8.js.map} +1 -1
- package/dist/{leading_system-CHSYz0h9.js → leading_system-BeQUSAim.js} +6 -10
- package/dist/{leading_system-CHSYz0h9.js.map → leading_system-BeQUSAim.js.map} +1 -1
- package/dist/{mcp-8mKK7eDY.js → mcp-CHJ88HiG.js} +9 -14
- package/dist/{mcp-8mKK7eDY.js.map → mcp-CHJ88HiG.js.map} +1 -1
- package/dist/mcp.d.ts +3 -11
- package/dist/mcp.js +2 -2
- package/dist/otel.d.ts +1 -5
- package/dist/otel.js +3 -6
- package/dist/otel.js.map +1 -1
- package/dist/{records-1HU7mWXf.js → records-Btlmvunj.js} +2 -3
- package/dist/{records-1HU7mWXf.js.map → records-Btlmvunj.js.map} +1 -1
- package/dist/{search-DjhdMsJ8.js → search-BZagxXtd.js} +7 -11
- package/dist/{search-DjhdMsJ8.js.map → search-BZagxXtd.js.map} +1 -1
- package/dist/search_worker.js +2 -3
- package/dist/stdio.d.ts +2 -6
- package/dist/stdio.js +5 -7
- package/dist/stdio.js.map +1 -1
- package/dist/testing.d.ts +2 -18
- package/dist/testing.js +12 -21
- package/dist/testing.js.map +1 -1
- package/dist/{trajectory-DeURWIhj.js → trajectory-CkCFZWNR.js} +2 -3
- package/dist/{trajectory-DeURWIhj.js.map → trajectory-CkCFZWNR.js.map} +1 -1
- package/dist/{trajectory-BKGNxi7u.d.ts → trajectory-Dt0-A7kb.d.ts} +1 -3
- package/dist/{types-CPqLZOEr.d.ts → types-BUXt_zgJ.d.ts} +1 -3
- package/dist/{types-BK0UW28o.d.ts → types-CvghbZ0x.d.ts} +1 -5
- package/dist/{types-xYjCEd6i.d.ts → types-Dk9tLpUq.d.ts} +42 -9
- package/dist/ui.d.ts +1 -3
- package/dist/ui.js +1 -2
- package/dist/viewer-app/assets/index-D8Tb3drm.js +4 -0
- package/dist/viewer-app/index.html +1 -1
- package/dist/viewer.d.ts +1 -11
- package/dist/viewer.js +8 -14
- package/dist/viewer.js.map +1 -1
- package/dist/web.d.ts +83 -0
- package/dist/web.js +2888 -0
- package/dist/web.js.map +1 -0
- package/package.json +34 -28
- package/dist/engine-B5iQ3if9.js.map +0 -1
- package/dist/viewer-app/assets/index-YrQFld-l.js +0 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as is_record } from "./records-
|
|
1
|
+
import { n as is_record } from "./records-Btlmvunj.js";
|
|
2
2
|
import { createHash, randomUUID } from "node:crypto";
|
|
3
|
-
|
|
3
|
+
// src/core/cleanup.ts
|
|
4
4
|
const HANDLER_TIMEOUT_MS = 5e3;
|
|
5
5
|
/**
|
|
6
6
|
* Create the per-run cleanup registry.
|
|
@@ -70,8 +70,7 @@ async function run_one(fn, trajectory) {
|
|
|
70
70
|
if (timeout_id) clearTimeout(timeout_id);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
|
|
74
|
-
//#region src/core/display_name.ts
|
|
73
|
+
// src/core/display_name.ts
|
|
75
74
|
/**
|
|
76
75
|
* Resolve the human-readable label for `node`, falling back to `fallback`
|
|
77
76
|
* (typically the step's kind) when neither display channel is populated.
|
|
@@ -94,8 +93,7 @@ function resolve_display_name(node, fallback) {
|
|
|
94
93
|
function description_meta(description) {
|
|
95
94
|
return description === void 0 ? {} : { meta: { description } };
|
|
96
95
|
}
|
|
97
|
-
|
|
98
|
-
//#region src/core/step_kinds.ts
|
|
96
|
+
// src/core/step_kinds.ts
|
|
99
97
|
/**
|
|
100
98
|
* Closed registry of every `Step.kind` produced by the composition layer.
|
|
101
99
|
*
|
|
@@ -131,8 +129,7 @@ const STEP_KINDS = [
|
|
|
131
129
|
function is_step_kind(value) {
|
|
132
130
|
return typeof value === "string" && STEP_KINDS.includes(value);
|
|
133
131
|
}
|
|
134
|
-
|
|
135
|
-
//#region src/core/node_label.ts
|
|
132
|
+
// src/core/node_label.ts
|
|
136
133
|
/**
|
|
137
134
|
* What a flow node is called: its display name, an id its author chose, or
|
|
138
135
|
* its kind, in that order. `describe.diagram` labels its rows this way, and
|
|
@@ -170,8 +167,7 @@ function has_chosen_id(node) {
|
|
|
170
167
|
if (node.anonymous === true || node.kind === "<cycle>") return false;
|
|
171
168
|
return !is_step_kind(node.kind) || CHOSEN_ID_KINDS.has(node.kind);
|
|
172
169
|
}
|
|
173
|
-
|
|
174
|
-
//#region src/core/replays.ts
|
|
170
|
+
// src/core/replays.ts
|
|
175
171
|
/**
|
|
176
172
|
* The analysis behind `describe.replays(step)`: which steps marked
|
|
177
173
|
* `side_effect` a resumed run can run again before it reaches a gate.
|
|
@@ -279,8 +275,7 @@ function find_replays(root) {
|
|
|
279
275
|
}
|
|
280
276
|
return [...by_id.values()];
|
|
281
277
|
}
|
|
282
|
-
|
|
283
|
-
//#region src/core/diagram.ts
|
|
278
|
+
// src/core/diagram.ts
|
|
284
279
|
/**
|
|
285
280
|
* The renderer behind `describe.diagram(step)`: a flow drawn as an annotated
|
|
286
281
|
* box-drawing tree.
|
|
@@ -481,8 +476,7 @@ function string_list(value) {
|
|
|
481
476
|
if (!Array.isArray(value)) return [];
|
|
482
477
|
return value.filter((entry) => typeof entry === "string");
|
|
483
478
|
}
|
|
484
|
-
|
|
485
|
-
//#region src/core/errors.ts
|
|
479
|
+
// src/core/errors.ts
|
|
486
480
|
var timeout_error = class extends Error {
|
|
487
481
|
kind = "timeout_error";
|
|
488
482
|
timeout_ms;
|
|
@@ -634,8 +628,7 @@ function error_path(err) {
|
|
|
634
628
|
const ids = entries.filter((v) => typeof v === "string");
|
|
635
629
|
return ids.length === entries.length ? ids : void 0;
|
|
636
630
|
}
|
|
637
|
-
|
|
638
|
-
//#region src/core/is_step.ts
|
|
631
|
+
// src/core/is_step.ts
|
|
639
632
|
/**
|
|
640
633
|
* Check whether a value is structurally a `Step`.
|
|
641
634
|
*
|
|
@@ -648,8 +641,7 @@ function is_step(value) {
|
|
|
648
641
|
const { id, kind, run } = value;
|
|
649
642
|
return typeof id === "string" && typeof kind === "string" && typeof run === "function";
|
|
650
643
|
}
|
|
651
|
-
|
|
652
|
-
//#region src/core/describe.ts
|
|
644
|
+
// src/core/describe.ts
|
|
653
645
|
/**
|
|
654
646
|
* describe(step), describe.json(step), and describe.diagram(step):
|
|
655
647
|
* composition introspection.
|
|
@@ -927,8 +919,7 @@ function is_zod_schema(value) {
|
|
|
927
919
|
function is_renderable_object(value) {
|
|
928
920
|
return typeof value === "object" && value !== null && !is_zod_schema(value);
|
|
929
921
|
}
|
|
930
|
-
|
|
931
|
-
//#region src/core/streaming.ts
|
|
922
|
+
// src/core/streaming.ts
|
|
932
923
|
const STREAMING_HIGH_WATER_MARK = 1e4;
|
|
933
924
|
/**
|
|
934
925
|
* Build the logger/iterable pair backing `run.stream`.
|
|
@@ -1036,8 +1027,7 @@ function create_streaming_channel(base, high_water_mark = STREAMING_HIGH_WATER_M
|
|
|
1036
1027
|
close
|
|
1037
1028
|
};
|
|
1038
1029
|
}
|
|
1039
|
-
|
|
1040
|
-
//#region src/core/suspend_ids.ts
|
|
1030
|
+
// src/core/suspend_ids.ts
|
|
1041
1031
|
/**
|
|
1042
1032
|
* suspend_ids: one suspend id, one place in the flow.
|
|
1043
1033
|
*
|
|
@@ -1174,8 +1164,7 @@ function same_input_as(first) {
|
|
|
1174
1164
|
if (snapshot === void 0) return (next) => Object.is(next, first);
|
|
1175
1165
|
return (next) => stable_json(next) === snapshot;
|
|
1176
1166
|
}
|
|
1177
|
-
|
|
1178
|
-
//#region src/policy/backoff.ts
|
|
1167
|
+
// src/policy/backoff.ts
|
|
1179
1168
|
/**
|
|
1180
1169
|
* Compute the delay before retry attempt `attempt`, counted from zero.
|
|
1181
1170
|
*
|
|
@@ -1214,8 +1203,7 @@ function wait_with_abort(ms, signal, to_error) {
|
|
|
1214
1203
|
signal.addEventListener("abort", on_abort, { once: true });
|
|
1215
1204
|
});
|
|
1216
1205
|
}
|
|
1217
|
-
|
|
1218
|
-
//#region src/policy/failure_meta.ts
|
|
1206
|
+
// src/policy/failure_meta.ts
|
|
1219
1207
|
/**
|
|
1220
1208
|
* Read `status`, `attempts`, `cause_kind`, and `retry_after_ms` off `err`
|
|
1221
1209
|
* into their `error_` fields, keeping each only when it is present.
|
|
@@ -1233,8 +1221,7 @@ function failure_meta(err) {
|
|
|
1233
1221
|
if (typeof retry_after_ms === "number") meta.error_retry_after_ms = retry_after_ms;
|
|
1234
1222
|
return meta;
|
|
1235
1223
|
}
|
|
1236
|
-
|
|
1237
|
-
//#region src/core/runner.ts
|
|
1224
|
+
// src/core/runner.ts
|
|
1238
1225
|
/**
|
|
1239
1226
|
* Runner.
|
|
1240
1227
|
*
|
|
@@ -1747,8 +1734,7 @@ const run = Object.assign(run_impl, {
|
|
|
1747
1734
|
stream: run_stream,
|
|
1748
1735
|
until_suspended: run_until_suspended
|
|
1749
1736
|
});
|
|
1750
|
-
|
|
1751
|
-
//#region src/schema/validate.ts
|
|
1737
|
+
// src/schema/validate.ts
|
|
1752
1738
|
/**
|
|
1753
1739
|
* Validate `value` against `schema`, returning the typed value or the issues.
|
|
1754
1740
|
*
|
|
@@ -1804,8 +1790,7 @@ function format_issue(issue) {
|
|
|
1804
1790
|
if (path === void 0 || path.length === 0) return issue.message;
|
|
1805
1791
|
return `${path.map((segment) => String(segment)).join(".")}: ${issue.message}`;
|
|
1806
1792
|
}
|
|
1807
|
-
|
|
1808
|
-
//#region src/core/durable.ts
|
|
1793
|
+
// src/core/durable.ts
|
|
1809
1794
|
/**
|
|
1810
1795
|
* durable: drive a flow that suspends across processes, one event at a time.
|
|
1811
1796
|
*
|
|
@@ -2349,8 +2334,7 @@ function durable(config) {
|
|
|
2349
2334
|
delete: (run_id) => delete_run(driver, run_id)
|
|
2350
2335
|
};
|
|
2351
2336
|
}
|
|
2352
|
-
|
|
2353
|
-
//#region src/core/step_id.ts
|
|
2337
|
+
// src/core/step_id.ts
|
|
2354
2338
|
/**
|
|
2355
2339
|
* Step id validation.
|
|
2356
2340
|
*
|
|
@@ -2395,8 +2379,7 @@ function assert_valid_step_id(id, subject, remedy) {
|
|
|
2395
2379
|
if (is_valid_step_id(id)) return;
|
|
2396
2380
|
throw new TypeError(`${subject} ${JSON.stringify(id)} is not a valid identifier: ids are read back as property names, so use ${suggest_step_id(id)} and ${remedy}`);
|
|
2397
2381
|
}
|
|
2398
|
-
|
|
2399
|
-
//#region src/core/step.ts
|
|
2382
|
+
// src/core/step.ts
|
|
2400
2383
|
/**
|
|
2401
2384
|
* step() factory.
|
|
2402
2385
|
*
|
|
@@ -2449,8 +2432,7 @@ function step(id_or_fn, maybe_fn, options) {
|
|
|
2449
2432
|
};
|
|
2450
2433
|
}
|
|
2451
2434
|
register_traced_kind("step");
|
|
2452
|
-
|
|
2453
|
-
//#region src/core/sequence.ts
|
|
2435
|
+
// src/core/sequence.ts
|
|
2454
2436
|
/**
|
|
2455
2437
|
* sequence: chain child outputs.
|
|
2456
2438
|
*
|
|
@@ -2504,8 +2486,7 @@ function sequence(children, options) {
|
|
|
2504
2486
|
};
|
|
2505
2487
|
}
|
|
2506
2488
|
register_traced_kind("sequence");
|
|
2507
|
-
|
|
2508
|
-
//#region src/core/parallel.ts
|
|
2489
|
+
// src/core/parallel.ts
|
|
2509
2490
|
/**
|
|
2510
2491
|
* parallel: concurrent execution of named children.
|
|
2511
2492
|
*
|
|
@@ -2634,8 +2615,7 @@ function parallel(members, options) {
|
|
|
2634
2615
|
};
|
|
2635
2616
|
}
|
|
2636
2617
|
register_traced_kind("parallel");
|
|
2637
|
-
|
|
2638
|
-
//#region src/core/branch.ts
|
|
2618
|
+
// src/core/branch.ts
|
|
2639
2619
|
/**
|
|
2640
2620
|
* branch: conditional routing.
|
|
2641
2621
|
*
|
|
@@ -2681,8 +2661,7 @@ function branch(config) {
|
|
|
2681
2661
|
};
|
|
2682
2662
|
}
|
|
2683
2663
|
register_traced_kind("branch");
|
|
2684
|
-
|
|
2685
|
-
//#region src/core/map.ts
|
|
2664
|
+
// src/core/map.ts
|
|
2686
2665
|
/**
|
|
2687
2666
|
* map: per-item execution.
|
|
2688
2667
|
*
|
|
@@ -2831,8 +2810,7 @@ function map(config) {
|
|
|
2831
2810
|
return build_map(config, (value) => value);
|
|
2832
2811
|
}
|
|
2833
2812
|
register_traced_kind("map");
|
|
2834
|
-
|
|
2835
|
-
//#region src/core/pipe.ts
|
|
2813
|
+
// src/core/pipe.ts
|
|
2836
2814
|
/**
|
|
2837
2815
|
* pipe: transform output.
|
|
2838
2816
|
*
|
|
@@ -2877,8 +2855,7 @@ function pipe(inner, fn, options) {
|
|
|
2877
2855
|
};
|
|
2878
2856
|
}
|
|
2879
2857
|
register_traced_kind("pipe");
|
|
2880
|
-
|
|
2881
|
-
//#region src/core/retry.ts
|
|
2858
|
+
// src/core/retry.ts
|
|
2882
2859
|
/**
|
|
2883
2860
|
* retry: re-run on failure.
|
|
2884
2861
|
*
|
|
@@ -3013,8 +2990,7 @@ function retry(inner, config) {
|
|
|
3013
2990
|
};
|
|
3014
2991
|
}
|
|
3015
2992
|
register_traced_kind("retry");
|
|
3016
|
-
|
|
3017
|
-
//#region src/core/fallback.ts
|
|
2993
|
+
// src/core/fallback.ts
|
|
3018
2994
|
/**
|
|
3019
2995
|
* fallback: primary-or-backup.
|
|
3020
2996
|
*
|
|
@@ -3100,8 +3076,7 @@ function fallback(primary, backup, options) {
|
|
|
3100
3076
|
};
|
|
3101
3077
|
}
|
|
3102
3078
|
register_traced_kind("fallback");
|
|
3103
|
-
|
|
3104
|
-
//#region src/core/timeout.ts
|
|
3079
|
+
// src/core/timeout.ts
|
|
3105
3080
|
/**
|
|
3106
3081
|
* timeout: bound execution.
|
|
3107
3082
|
*
|
|
@@ -3178,8 +3153,7 @@ function timeout(inner, ms, options) {
|
|
|
3178
3153
|
};
|
|
3179
3154
|
}
|
|
3180
3155
|
register_traced_kind("timeout");
|
|
3181
|
-
|
|
3182
|
-
//#region src/core/loop.ts
|
|
3156
|
+
// src/core/loop.ts
|
|
3183
3157
|
/**
|
|
3184
3158
|
* loop: bounded iteration with carry-state.
|
|
3185
3159
|
*
|
|
@@ -3287,8 +3261,7 @@ function loop(config) {
|
|
|
3287
3261
|
};
|
|
3288
3262
|
}
|
|
3289
3263
|
register_traced_kind("loop");
|
|
3290
|
-
|
|
3291
|
-
//#region src/core/compose.ts
|
|
3264
|
+
// src/core/compose.ts
|
|
3292
3265
|
/**
|
|
3293
3266
|
* compose: name a composite step.
|
|
3294
3267
|
*
|
|
@@ -3377,8 +3350,7 @@ function path_to(from, target, seen) {
|
|
|
3377
3350
|
}
|
|
3378
3351
|
}
|
|
3379
3352
|
register_traced_kind("compose");
|
|
3380
|
-
|
|
3381
|
-
//#region src/core/checkpoint.ts
|
|
3353
|
+
// src/core/checkpoint.ts
|
|
3382
3354
|
/**
|
|
3383
3355
|
* checkpoint: persist and resume.
|
|
3384
3356
|
*
|
|
@@ -3534,8 +3506,7 @@ function checkpoint(inner, config) {
|
|
|
3534
3506
|
};
|
|
3535
3507
|
}
|
|
3536
3508
|
register_traced_kind("checkpoint");
|
|
3537
|
-
|
|
3538
|
-
//#region src/core/suspend.ts
|
|
3509
|
+
// src/core/suspend.ts
|
|
3539
3510
|
/**
|
|
3540
3511
|
* suspend: human-in-the-loop pause.
|
|
3541
3512
|
*
|
|
@@ -3618,8 +3589,7 @@ function suspend(config) {
|
|
|
3618
3589
|
};
|
|
3619
3590
|
}
|
|
3620
3591
|
register_traced_kind("suspend");
|
|
3621
|
-
|
|
3622
|
-
//#region src/core/scope.ts
|
|
3592
|
+
// src/core/scope.ts
|
|
3623
3593
|
/**
|
|
3624
3594
|
* scope / stash / use: named state.
|
|
3625
3595
|
*
|
|
@@ -3756,8 +3726,7 @@ function use(keys, fn, options) {
|
|
|
3756
3726
|
register_traced_kind("scope");
|
|
3757
3727
|
register_traced_kind("stash");
|
|
3758
3728
|
register_traced_kind("use");
|
|
3759
|
-
|
|
3760
|
-
//#region src/core/chain.ts
|
|
3729
|
+
// src/core/chain.ts
|
|
3761
3730
|
/**
|
|
3762
3731
|
* chain: named steps over a growing record.
|
|
3763
3732
|
*
|
|
@@ -3944,7 +3913,6 @@ function chain(input_name) {
|
|
|
3944
3913
|
};
|
|
3945
3914
|
}
|
|
3946
3915
|
register_traced_kind("chain");
|
|
3947
|
-
//#endregion
|
|
3948
3916
|
export { is_step as A, timeout_error as B, validate_schema as C, wait_with_abort as D, compute_backoff as E, flow_changed_error as F, is_step_kind as H, gate_result_error as I, resume_validation_error as L, describe_cycle_error as M, duplicate_suspend_id_error as N, same_input_as as O, error_path as P, run_not_found_error as R, format_schema_issues as S, failure_meta as T, resolve_display_name as U, STEP_KINDS as V, step as _, suspend as a, suggest_step_id as b, loop as c, retry as d, pipe as f, sequence as g, parallel as h, use as i, aborted_error as j, describe as k, timeout as l, branch as m, scope as n, checkpoint as o, map as p, stash as r, compose as s, chain as t, fallback as u, assert_valid_step_id as v, run as w, durable as x, is_valid_step_id as y, suspended_error as z };
|
|
3949
3917
|
|
|
3950
|
-
//# sourceMappingURL=core-
|
|
3918
|
+
//# sourceMappingURL=core-BH7sWpEG.js.map
|