fascicle 0.10.0 → 0.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/adapters.d.ts +1 -1
- package/dist/agents.d.ts +2 -2
- package/dist/agents.js +1 -1
- package/dist/{core-DNH8ddMT.js → core-Dit3Rv9J.js} +13 -9
- package/dist/{core-DNH8ddMT.js.map → core-Dit3Rv9J.js.map} +1 -1
- package/dist/{index-SkPG_Rew.d.ts → index-C2ayBpzS.d.ts} +7 -5
- package/dist/{index-D20uBog5.d.ts → index-CHtfOfEF.d.ts} +19 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +33 -9
- package/dist/index.js.map +1 -1
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.js +1 -1
- package/dist/otel.d.ts +1 -1
- package/dist/stdio.d.ts +1 -1
- package/dist/stdio.js +1 -1
- package/dist/ui.d.ts +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.10.2 — 2026-08-11
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **`fallback` gains a `handoff` option, so the backup can be told why it is running.** `fallback(primary, backup, { handoff })` calls `handoff(input, err)` when the primary throws an application error and runs the backup on the result, instead of retrying the same input blind; a handoff note like "a previous attempt failed, answer from scratch" is the intended use. Omitting the option keeps the old behaviour exactly: the backup receives the original input. Control-flow signals are untouched by the new path: suspend and abort still propagate without triggering the backup, and the handoff is never called for them, so an approval gate cannot be bypassed through a mapped input. Tests pin the mapped-input path, the handoff argument order, the success path (no handoff call), and the control-flow bypass.
|
|
8
|
+
|
|
9
|
+
### Internal
|
|
10
|
+
|
|
11
|
+
- **The cookbook gains an escalation-tiering recipe: judge the cheap model's actual work, escalate only on real trouble.** Where `fallback` escalates on a throw, the recipe escalates on mediocrity. It covers the single-request shape (a buffered weak draft, a fail-open judge expressed as `fallback` around the judge so a dead judge serves the draft rather than escalating, and an escalate-or-serve `branch` that emits the verdict into the trajectory), a multi-turn latch that holds a confirmation streak in `loop` carry-state (an escalate verdict increments, a decline resets, a fail-open judge holds, two confirmations latch the run onto the strong tier), and a calibration method for deciding when the weak tier is enough (RESCUE/LOSS/SAFE/HARD quadrants over a strong-tier baseline plus a stratified weak-tier probe, harnessed with `bench` and pinned with `regression_compare`). The multi-provider fallback recipe picks up a `handoff` example.
|
|
12
|
+
- **`docs/comparison.md` places NVIDIA's Switchyard.** A wire-level routing proxy is a different layer, not competition: aligned with fascicle on keeping routing policy outside the model surface (its `libsy` library hands every model call back to the caller, the same separation as adapters passed in per run and verbatim model resolution), different on where routing belongs (rewriting traffic for clients you cannot modify versus explicit composition when you own the call site), and usable today as one more OpenAI-compatible gateway behind the compat recipe in `docs/providers.md`.
|
|
13
|
+
- **The check runner (checkride) is upgraded from 0.6.0 to 0.12.1.**
|
|
14
|
+
|
|
15
|
+
## v0.10.1 — 2026-08-07
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- **A schema call that finished without finishing no longer returns unchecked text typed as your schema.** `generate` gated schema parsing on `finish_reason === 'stop'` and, on any other finish, fell through to returning the raw model text cast to `T`. A Bedrock guardrail block, a `max_tokens` truncation, or a step-cap exit therefore produced a `GenerateResult<T>` whose `content` was a string wearing the schema's type: reading a field off it crashed, and a defensive consumer got `undefined` fields instead, so a blocked call could score as a low-risk one. The gate now throws `incomplete_generation_error` (exported from `fascicle`) carrying `finish_reason`, `raw_text`, and `provider_reported`, the last so a guardrail's own assessment stays reachable from the catch without logging the matched text. Repair is still not attempted, which was the one correct half of the old behaviour: re-prompting a model that was blocked or cut off cannot produce the missing value. The error is deliberately distinct from `schema_validation_error`, which continues to mean a response that completed normally and then failed validation. **Breaking for schema callers** who relied on the old return: those calls now reject, and a streamed one rejects after its text deltas without emitting a `finish` chunk, matching what `schema_validation_error` already did. Calls without a schema are untouched — `content_filter` and `length` still return the partial text with the finish reason. `claude_cli` was never affected (it validates unconditionally and reports every completion as `stop`), so this closes a divergence between the transports rather than opening one. The flipped criterion is pinned in `spec_coverage.test.ts`, the finish reasons and the no-repair guarantee in `generate.test.ts`, and the payload's survival onto the error across plain, streamed, and multi-step runs in `provider_reported.test.ts`.
|
|
20
|
+
|
|
21
|
+
- **A schema that validates to `undefined` returned the raw model text instead of the validated value.** `generate` tracked its parsed value in a `T | undefined` and gated the final read on `content_parsed !== undefined`, so a schema whose `.transform()` or `.catch()` legitimately yields `undefined` parsed successfully and was then discarded in favour of the raw string, cast to `T`. The parsed value now rides a `{ value: T }` holder, which distinguishes "validated to undefined" from "nothing parsed" and collapses the three-way final-content branch to two. This also retires the comment claiming the fallthrough was unreachable: it was reachable before this release, and the branch that remains is the no-schema one.
|
|
22
|
+
|
|
23
|
+
### Internal
|
|
24
|
+
|
|
25
|
+
- **The two grandfathered `unused_class_members` findings on `errors.ts` are resolved rather than baselined.** `turn_timeout_error.kind` and `schema_validation_error.kind` have no in-repo production reader — `classify_retryable` reaches them through `read_string(err, 'kind')` on an `unknown`, and external consumers switch on the discriminant outside this repo — so the finding was a limitation of static analysis, not real debt. Both now carry an inline `fallow-ignore-next-line` with the reason beside the field, and the baseline entries are gone. The entries were anchored by `line:col`, so any edit above them re-surfaced frozen debt as a new finding; documenting the intent at the field removes that fragility.
|
|
26
|
+
|
|
3
27
|
## v0.10.0 — 2026-08-05
|
|
4
28
|
|
|
5
29
|
### Added
|
package/dist/adapters.d.ts
CHANGED
package/dist/agents.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as Step } from "./index-
|
|
2
|
-
import {
|
|
1
|
+
import { G as Step } from "./index-C2ayBpzS.js";
|
|
2
|
+
import { b as Engine } from "./index-CHtfOfEF.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/agents/define_agent.d.ts
|
package/dist/agents.js
CHANGED
|
@@ -1559,11 +1559,13 @@ register_traced_kind("retry");
|
|
|
1559
1559
|
* fallback: primary-or-backup.
|
|
1560
1560
|
*
|
|
1561
1561
|
* `fallback(primary, backup)` runs `primary`. If it throws an application
|
|
1562
|
-
* error, runs `backup` with the same input
|
|
1563
|
-
* `
|
|
1564
|
-
* `
|
|
1565
|
-
*
|
|
1566
|
-
*
|
|
1562
|
+
* error, runs `backup` with the same input, or with `handoff(input, err)`
|
|
1563
|
+
* when the `handoff` option is set, so the backup can be told why it is
|
|
1564
|
+
* running. If `backup` also throws, the `backup` error propagates.
|
|
1565
|
+
* Control-flow signals (`suspended_error`, `aborted_error`) are not
|
|
1566
|
+
* failures: they propagate instead of triggering the backup, so a
|
|
1567
|
+
* human-approval gate is never silently bypassed and the backup never runs
|
|
1568
|
+
* under an aborted context. `handoff` is never called for them.
|
|
1567
1569
|
*/
|
|
1568
1570
|
let fallback_counter = 0;
|
|
1569
1571
|
/**
|
|
@@ -1576,17 +1578,19 @@ function next_id$4() {
|
|
|
1576
1578
|
/**
|
|
1577
1579
|
* Build a primary-or-backup step.
|
|
1578
1580
|
*
|
|
1579
|
-
* Runs `primary`; on an application error runs `backup` with the same input
|
|
1580
|
-
*
|
|
1581
|
+
* Runs `primary`; on an application error runs `backup` with the same input,
|
|
1582
|
+
* or with `handoff(input, err)` when the option is set. Control-flow signals
|
|
1583
|
+
* propagate without triggering the backup or the handoff.
|
|
1581
1584
|
*/
|
|
1582
1585
|
function fallback(primary, backup, options) {
|
|
1583
1586
|
const id = next_id$4();
|
|
1587
|
+
const handoff = options?.handoff;
|
|
1584
1588
|
const run_fn = async (input, ctx) => {
|
|
1585
1589
|
try {
|
|
1586
1590
|
return await dispatch_step(primary, input, ctx);
|
|
1587
1591
|
} catch (err) {
|
|
1588
1592
|
if (is_control_flow_error(err)) throw err;
|
|
1589
|
-
return dispatch_step(backup, input, ctx);
|
|
1593
|
+
return dispatch_step(backup, handoff === void 0 ? input : handoff(input, err), ctx);
|
|
1590
1594
|
}
|
|
1591
1595
|
};
|
|
1592
1596
|
const config_meta = options?.name === void 0 ? void 0 : { display_name: options.name };
|
|
@@ -2152,4 +2156,4 @@ const trajectory_event_schema = z.union([
|
|
|
2152
2156
|
//#endregion
|
|
2153
2157
|
export { timeout_error as A, describe as C, describe_cycle_error as D, aborted_error as E, resume_validation_error as O, sequence as S, run as T, retry as _, trajectory_event_schema as a, branch as b, scope as c, suspend as d, checkpoint as f, fallback as g, timeout as h, span_start_event_schema as i, flow_schema_default as j, suspended_error as k, stash as l, loop as m, emit_event_schema as n, STEP_KINDS as o, compose as p, span_end_event_schema as r, is_step_kind as s, custom_event_schema as t, use as u, pipe as v, step as w, parallel as x, map as y };
|
|
2154
2158
|
|
|
2155
|
-
//# sourceMappingURL=core-
|
|
2159
|
+
//# sourceMappingURL=core-Dit3Rv9J.js.map
|