From 2e7aadf085a0aaf061a1b8415b4e067ab4e9a6ff Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 19 Nov 2026 17:51:43 +0000 Subject: [PATCH] Sync fxtr plugin 0.1.6 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Sb4pQZGAp3dxMdaLUirmuL --- .claude-plugin/marketplace.json | 2 +- plugins/fxtr/.claude-plugin/plugin.json | 2 +- plugins/fxtr/skills/behaviors/provenance.json | 8 +++---- .../behaviors/references/reference/api.mdx | 16 ++++++++++++- .../skills/first-experiment/provenance.json | 6 ++--- plugins/fxtr/skills/fxtr/SKILL.md | 24 ++++++++++++++----- plugins/fxtr/skills/fxtr/provenance.json | 8 +++---- 7 files changed, 46 insertions(+), 20 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 188ccfe..83a100d 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -21,7 +21,7 @@ "name": "fxtr", "source": "./plugins/fxtr", "description": "Skills for writing, running, and viewing fxtr experiments, and for calling models from them with behaviors", - "version": "0.1.5", + "version": "0.1.6", "author": { "name": "TransluceAI" }, diff --git a/plugins/fxtr/.claude-plugin/plugin.json b/plugins/fxtr/.claude-plugin/plugin.json index 86af4c0..20cabef 100644 --- a/plugins/fxtr/.claude-plugin/plugin.json +++ b/plugins/fxtr/.claude-plugin/plugin.json @@ -4,5 +4,5 @@ "author": { "name": "TransluceAI" }, - "version": "0.1.5" + "version": "0.1.6" } diff --git a/plugins/fxtr/skills/behaviors/provenance.json b/plugins/fxtr/skills/behaviors/provenance.json index ca1a050..819b8ca 100644 --- a/plugins/fxtr/skills/behaviors/provenance.json +++ b/plugins/fxtr/skills/behaviors/provenance.json @@ -2,10 +2,10 @@ "skill": "behaviors", "documentation": "https://docs.transluce.ai/behaviors", "packages": { - "fxtr": "0.2.0a0", - "behaviors": "0.0.1a5" + "fxtr": "0.2.0a1", + "behaviors": "0.0.1a6" }, - "revision": "6432f6ad1682ca0a8ff344a6ef66cb09bbccb8f7", + "revision": "15e931fd57b9731c677daebd977e474baaf11868", "modified": false, - "content_sha256": "f67fdb291628ed957c6fa39d933926312c3c3864bea083e28264c69666da8d96" + "content_sha256": "2f7c10c745c1a4fa5df386e2417cf07fe36a43d25b95b4460eb625b4bbe00407" } diff --git a/plugins/fxtr/skills/behaviors/references/reference/api.mdx b/plugins/fxtr/skills/behaviors/references/reference/api.mdx index 4b00683..37c9c94 100644 --- a/plugins/fxtr/skills/behaviors/references/reference/api.mdx +++ b/plugins/fxtr/skills/behaviors/references/reference/api.mdx @@ -350,6 +350,7 @@ async def judge_run( ), sampling=sampling.params, custom_formats=[AGENT_RUN_LINE_CITATION_FORMAT], + preview=context.preview, ) finally: await api.aclose() @@ -408,6 +409,19 @@ The arguments: written once. * **`sampling`** is the sampling parameters for each call, and **`callback`**, if given, receives the events of each call when the model API can stream. +* **`preview`**, if given, receives the judgment so far, so you can watch it in the viewer while + its step runs. In a step, pass `preview=context.preview`. It receives a function that builds a + partial `Judgment` (see [Partial values](../../../fxtr/references/concepts/entities-and-custom-types.mdx#partial-values)), + so the value is built only when the viewer's copy is saved. In it, `entity_ids` is set, and + `output` and `citations` are `None`. `attempts` holds a partial `JudgeAttempt` for each finished + attempt, with its `response` and `invalid_output_reasons`, then one for the attempt in flight, + whose `response` is a partial `ModelResponse` holding the answer so far (`None` before the + answer starts). Each attempt's `request` is `None`: every request repeats the entities, so the + preview leaves them out, and the judgment `judge` returns keeps them. With the behaviors + renderers (`behaviorsRenderers` from `fxtr-view-behaviors`) registered, the step's panel shows + the judge's answers so far, each invalid one with what was wrong, ending in the answer being + written, and its row in the run's table says which attempt it is on ("attempt 2 · 1 invalid · + streaming…"). When `judge` returns, the step's result takes the preview's place. * **`max_answers`** is how many answers the model gets, 3 by default. An answer that is not accepted goes back to the model with what was wrong, until it has given this many. * **`retry`** and **`failure_categories_to_retry`** say when a failed call is made again. By @@ -417,7 +431,7 @@ The arguments: failed calls, the two multiply: pass `retry=RetryConfig(max_attempts=1)` to make each call once. -All of these but `callback` change what a judgment can come out as. In a step, pass the ones you +All of these but `callback` and `preview` change what a judgment can come out as. In a step, pass the ones you vary as step inputs, so the judgment points at the settings that produced it and the step cache sees each one: `sampling` in a sampling entity of the project's own, as the example does, and `max_answers` as a number. A setting kept in the step's code, such as `retry`, is invisible to the diff --git a/plugins/fxtr/skills/first-experiment/provenance.json b/plugins/fxtr/skills/first-experiment/provenance.json index 7649488..3cd993e 100644 --- a/plugins/fxtr/skills/first-experiment/provenance.json +++ b/plugins/fxtr/skills/first-experiment/provenance.json @@ -2,10 +2,10 @@ "skill": "first-experiment", "documentation": null, "packages": { - "fxtr": "0.2.0a0", - "behaviors": "0.0.1a5" + "fxtr": "0.2.0a1", + "behaviors": "0.0.1a6" }, - "revision": "6432f6ad1682ca0a8ff344a6ef66cb09bbccb8f7", + "revision": "15e931fd57b9731c677daebd977e474baaf11868", "modified": false, "content_sha256": "a940ab9c02eec8a663fd3ef94d622a4dc88c9a42b4d5f7faa777c4c90b3e340a" } diff --git a/plugins/fxtr/skills/fxtr/SKILL.md b/plugins/fxtr/skills/fxtr/SKILL.md index 189edba..b5ebb69 100644 --- a/plugins/fxtr/skills/fxtr/SKILL.md +++ b/plugins/fxtr/skills/fxtr/SKILL.md @@ -137,14 +137,10 @@ before [adding one](references/reference/renderers.mdx#adding-a-package-to-a-pro the viewer's URL (the one `fxtr view` printed, also saved in `.fxtr/viewer.json` within the project), then `#` and `&`-separated parts. ``` - http://127.0.0.1:8000/#job=&w=flowchart(/outer,model=sonnet)&slice=(prompt=3)&card=judge&p=table(/outer/judge,model=sonnet)&p=.output.transcript + http://127.0.0.1:8000/#job=&p=table(/outer/judge,model=sonnet)&p=.output.transcript ``` - `job` is the job's ID (left out, the newest job). `w` is the workflow invocation shown (left - out, the root's trace): `trace`, `flowchart`, or the id of an `InvocationPanel` renderer - of that workflow, applied to its step path from the root, with the keys of the mapped workflows - on the way. `slice` picks dim values for every card and panel. `card` names a step of that workflow (or - `return`, what it returned) whose card to scroll to. Each `p` opens a panel, in order, + `job` is the job's ID (left out, the newest job). Each `p` opens a panel, in order, each following the one before it; `pin` opens one that stays as it is. A panel is an address, a view applied to a location and params: the view is `table`, `invocation`, `tree`, `code`, a renderer's or page's id, or nothing for the default; the location is a step path from the root @@ -158,6 +154,22 @@ before [adding one](references/reference/renderers.mdx#adding-a-package-to-a-pro panel, a location may be relative to the panel before it: `.field…` below it, `../step` a sibling. Percent-encode only spaces, `%`, `&`, `#`, `+`, and quotes. + A panel on a step is enough to show where the step is: the link opens on the trace of the + workflow that step is in, scrolled to its card, so bind the keys of the mapped workflows on the + way (`model=sonnet` above) in the panel or the slice. Three more parts say otherwise: + + ``` + http://127.0.0.1:8000/#job=&w=flowchart(/outer,model=sonnet)&slice=(prompt=3)&card=judge + ``` + + `w` is the workflow invocation shown: `trace`, `flowchart`, or the id of an `InvocationPanel` + renderer of that workflow, applied to its step path from the root, with the keys of the mapped + workflows on the way. Left out, it is the trace of the workflow the first panel's step is in, + or the root's when no panel shows a step. `card` names a step of the workflow shown (or + `return`, what it returned) whose card to scroll to, which points at a step without opening a + panel; left out, it is the first panel's step. `slice` picks dim values for every card and + panel. + ### Reading the documentation * **Know which documentation you have.** Distributed in the fxtr plugin for Claude Code or diff --git a/plugins/fxtr/skills/fxtr/provenance.json b/plugins/fxtr/skills/fxtr/provenance.json index fac62c0..91e1e5d 100644 --- a/plugins/fxtr/skills/fxtr/provenance.json +++ b/plugins/fxtr/skills/fxtr/provenance.json @@ -2,10 +2,10 @@ "skill": "fxtr", "documentation": "https://docs.transluce.ai/fxtr", "packages": { - "fxtr": "0.2.0a0", - "behaviors": "0.0.1a5" + "fxtr": "0.2.0a1", + "behaviors": "0.0.1a6" }, - "revision": "6432f6ad1682ca0a8ff344a6ef66cb09bbccb8f7", + "revision": "15e931fd57b9731c677daebd977e474baaf11868", "modified": false, - "content_sha256": "3188553424bccd6a1a5b64c814bec89797e7468678f4d4e0fed6540d89636780" + "content_sha256": "d4abbc2df2317b0199f41169698ed57c65206989c424230be0347c86351200e2" }