@e4779/pi-fabric 0.92.17-fork.3 → 0.92.28-fork.5
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/actors/host-event-payload.d.ts.map +1 -1
- package/dist/agents/budget-ledger.d.ts.map +1 -1
- package/dist/agents/handoff-continuation.d.ts +4 -0
- package/dist/agents/handoff-continuation.d.ts.map +1 -0
- package/dist/agents/manager.d.ts.map +1 -1
- package/dist/agents/request.d.ts +4 -0
- package/dist/agents/request.d.ts.map +1 -1
- package/dist/agents.js +5 -4
- package/dist/agents.js.map +1 -1
- package/dist/chunks/{chunk-GXNR6NRU.js → chunk-2IAVP4O2.js} +2 -2
- package/dist/chunks/{chunk-TPLMVELH.js → chunk-77PDIBK2.js} +15 -4
- package/dist/chunks/{chunk-TPLMVELH.js.map → chunk-77PDIBK2.js.map} +2 -2
- package/dist/chunks/chunk-7TX532EG.js +134 -0
- package/dist/chunks/chunk-7TX532EG.js.map +7 -0
- package/dist/chunks/chunk-BJOJX2UW.js +59 -0
- package/dist/chunks/chunk-BJOJX2UW.js.map +7 -0
- package/dist/chunks/{chunk-2PZWDVJB.js → chunk-BYOGRJME.js} +13 -4
- package/dist/chunks/chunk-BYOGRJME.js.map +7 -0
- package/dist/chunks/{chunk-RERA6YWA.js → chunk-CIODQX77.js} +12 -4
- package/dist/chunks/chunk-CIODQX77.js.map +7 -0
- package/dist/chunks/{chunk-OP2KTYQB.js → chunk-D6YSBP3R.js} +4 -4
- package/dist/chunks/chunk-EDL4JDW7.js +184 -0
- package/dist/chunks/chunk-EDL4JDW7.js.map +7 -0
- package/dist/chunks/{chunk-WVH324VF.js → chunk-FAMBJFFF.js} +1 -1
- package/dist/chunks/{chunk-WVH324VF.js.map → chunk-FAMBJFFF.js.map} +1 -1
- package/dist/chunks/{chunk-UDFDF7IY.js → chunk-G7UJLM33.js} +148 -251
- package/dist/chunks/chunk-G7UJLM33.js.map +7 -0
- package/dist/chunks/{chunk-RNOPHITP.js → chunk-H6DDV6E2.js} +180 -24
- package/dist/chunks/chunk-H6DDV6E2.js.map +7 -0
- package/dist/chunks/{chunk-ARLYAW2A.js → chunk-IR3PIHJM.js} +2 -1
- package/dist/chunks/chunk-IR3PIHJM.js.map +7 -0
- package/dist/chunks/{chunk-VRZNFNPB.js → chunk-IYQ5MNCW.js} +20 -17
- package/dist/chunks/chunk-IYQ5MNCW.js.map +7 -0
- package/dist/chunks/chunk-JNMTTJMQ.js +50 -0
- package/dist/chunks/chunk-JNMTTJMQ.js.map +7 -0
- package/dist/chunks/{chunk-CPSW2GW4.js → chunk-JOEFBOFN.js} +11 -7
- package/dist/chunks/chunk-JOEFBOFN.js.map +7 -0
- package/dist/chunks/chunk-KI277YNS.js +218 -0
- package/dist/chunks/chunk-KI277YNS.js.map +7 -0
- package/dist/chunks/{chunk-Y7KNRAFL.js → chunk-M3ZNZ6EZ.js} +28 -3
- package/dist/chunks/chunk-M3ZNZ6EZ.js.map +7 -0
- package/dist/chunks/{chunk-2DMJ7MEI.js → chunk-M7W57BRC.js} +172 -141
- package/dist/chunks/chunk-M7W57BRC.js.map +7 -0
- package/dist/chunks/{chunk-U6CTHPZC.js → chunk-MQG5QKGI.js} +2 -2
- package/dist/chunks/{chunk-CI56CW53.js → chunk-NPHCGLGH.js} +16 -10
- package/dist/chunks/chunk-NPHCGLGH.js.map +7 -0
- package/dist/chunks/{chunk-4SSMGBF4.js → chunk-QLV2IZ3F.js} +6 -7
- package/dist/chunks/chunk-QLV2IZ3F.js.map +7 -0
- package/dist/chunks/{chunk-PH7ZJ27F.js → chunk-RAEGNBRA.js} +210 -118
- package/dist/chunks/chunk-RAEGNBRA.js.map +7 -0
- package/dist/chunks/chunk-RAO6TQFP.js +187 -0
- package/dist/chunks/chunk-RAO6TQFP.js.map +7 -0
- package/dist/chunks/{chunk-ZZ4LHQYJ.js → chunk-RTXZHKMS.js} +22 -13
- package/dist/chunks/chunk-RTXZHKMS.js.map +7 -0
- package/dist/chunks/{chunk-BOTRGFQQ.js → chunk-RWDKJ24D.js} +26 -19
- package/dist/chunks/chunk-RWDKJ24D.js.map +7 -0
- package/dist/chunks/{chunk-2UQV52II.js → chunk-RZKN534S.js} +6 -6
- package/dist/chunks/{chunk-656HWVFU.js → chunk-SZUXWOO7.js} +5 -3
- package/dist/chunks/chunk-SZUXWOO7.js.map +7 -0
- package/dist/chunks/{chunk-YK5AZ7CZ.js → chunk-ULLIZPBH.js} +7 -7
- package/dist/chunks/{chunk-UTR3I23Z.js → chunk-W63E3WEO.js} +2 -2
- package/dist/chunks/{chunk-32BNQ75J.js → chunk-WG24VI7K.js} +56 -2
- package/dist/chunks/{chunk-32BNQ75J.js.map → chunk-WG24VI7K.js.map} +2 -2
- package/dist/chunks/{chunk-3MEHEH6B.js → chunk-X3OD47CL.js} +12 -2
- package/dist/chunks/chunk-X3OD47CL.js.map +7 -0
- package/dist/chunks/{chunk-4JETKRFE.js → chunk-ZHJNWM6A.js} +2 -2
- package/dist/compaction/hook.js +2 -2
- package/dist/components/configuration.d.ts +42 -0
- package/dist/components/configuration.d.ts.map +1 -0
- package/dist/components/configuration.js +18 -0
- package/dist/components/configuration.js.map +7 -0
- package/dist/components/control.d.ts +76 -0
- package/dist/components/control.d.ts.map +1 -0
- package/dist/components/loader.d.ts +12 -0
- package/dist/components/loader.d.ts.map +1 -1
- package/dist/components/supervisor.d.ts.map +1 -1
- package/dist/components/types.d.ts +2 -0
- package/dist/components/types.d.ts.map +1 -1
- package/dist/components/validation.d.ts +6 -0
- package/dist/components/validation.d.ts.map +1 -0
- package/dist/config.d.ts +4 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/core/action-registry.d.ts +1 -0
- package/dist/core/action-registry.d.ts.map +1 -1
- package/dist/core/action-registry.js +3 -3
- package/dist/core/auto-approval-classifier.d.ts.map +1 -1
- package/dist/core/media-sanitize.d.ts +45 -0
- package/dist/core/media-sanitize.d.ts.map +1 -0
- package/dist/core/model-resolution.d.ts +20 -3
- package/dist/core/model-resolution.d.ts.map +1 -1
- package/dist/core/shell-jobs.d.ts +7 -1
- package/dist/core/shell-jobs.d.ts.map +1 -1
- package/dist/entropy/compiler.d.ts +8 -0
- package/dist/entropy/compiler.d.ts.map +1 -1
- package/dist/entropy/index.js +9 -1
- package/dist/entropy/meter.d.ts +10 -0
- package/dist/entropy/meter.d.ts.map +1 -1
- package/dist/entropy/pool.d.ts +5 -0
- package/dist/entropy/pool.d.ts.map +1 -1
- package/dist/entropy/sessions.d.ts +12 -1
- package/dist/entropy/sessions.d.ts.map +1 -1
- package/dist/execution-service.d.ts +3 -1
- package/dist/execution-service.d.ts.map +1 -1
- package/dist/fabric-exec-tool.d.ts.map +1 -1
- package/dist/fabric-runtime-state.d.ts.map +1 -1
- package/dist/fabric-runtime-state.js +424 -65
- package/dist/fabric-runtime-state.js.map +4 -4
- package/dist/fabric-state.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +130 -51
- package/dist/index.js.map +3 -3
- package/dist/jev/browser.d.ts.map +1 -1
- package/dist/jev/browser.js +2 -2
- package/dist/jev/config.d.ts +2 -0
- package/dist/jev/config.d.ts.map +1 -1
- package/dist/jev/model-key.d.ts +6 -0
- package/dist/jev/model-key.d.ts.map +1 -0
- package/dist/jev/observation.js +3 -2
- package/dist/jev.js +8 -7
- package/dist/memory/file-worker.d.ts +15 -0
- package/dist/memory/file-worker.d.ts.map +1 -0
- package/dist/memory/file-worker.js +44 -0
- package/dist/memory/file-worker.js.map +7 -0
- package/dist/memory/worker-provider.d.ts +24 -0
- package/dist/memory/worker-provider.d.ts.map +1 -0
- package/dist/memory/worker-provider.js +18 -0
- package/dist/memory/worker-provider.js.map +7 -0
- package/dist/output-budget.d.ts.map +1 -1
- package/dist/prewalk/arm.d.ts.map +1 -1
- package/dist/prewalk/handoff.d.ts.map +1 -1
- package/dist/protocol.d.ts +1 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +1 -1
- package/dist/providers/agents-actions.d.ts.map +1 -1
- package/dist/providers/captured-tools-provider.d.ts.map +1 -1
- package/dist/providers/components-provider.d.ts +5 -3
- package/dist/providers/components-provider.d.ts.map +1 -1
- package/dist/providers/jev-provider.js +7 -6
- package/dist/residency/actor-client.d.ts +2 -2
- package/dist/residency/actor-client.d.ts.map +1 -1
- package/dist/residency/actor-client.js +2 -2
- package/dist/residency/client.d.ts.map +1 -1
- package/dist/residency/host.js +11 -9
- package/dist/residency/pi-entry.js +11 -9
- package/dist/residency/pi-entry.js.map +1 -1
- package/dist/residency/protocol.d.ts +11 -2
- package/dist/residency/protocol.d.ts.map +1 -1
- package/dist/runtime/core-override-guest-types.js +2 -2
- package/dist/runtime/guest-types.d.ts +1 -1
- package/dist/runtime/guest-types.d.ts.map +1 -1
- package/dist/runtime/guest-types.js +1 -1
- package/dist/runtime/monty-runtime.js +4 -2
- package/dist/runtime/monty-runtime.js.map +1 -1
- package/dist/runtime/node-process-runtime.d.ts.map +1 -1
- package/dist/runtime/node-process-runtime.js +2 -2
- package/dist/runtime/quickjs-runtime.d.ts.map +1 -1
- package/dist/runtime/quickjs-runtime.js +1 -1
- package/dist/runtime/typescript-kernel.js +6 -6
- package/dist/runtime-state-builtins.d.ts.map +1 -1
- package/dist/schema/policy.d.ts.map +1 -1
- package/dist/speculation/stream-tap.d.ts.map +1 -1
- package/dist/storage/retention.d.ts +3 -1
- package/dist/storage/retention.d.ts.map +1 -1
- package/dist/storage/scratch.d.ts +33 -0
- package/dist/storage/scratch.d.ts.map +1 -0
- package/dist/ui/code-preview-shell.d.ts.map +1 -1
- package/dist/ui/controller.d.ts.map +1 -1
- package/dist/ui/conversation-chrome.js +2 -2
- package/dist/ui/conversation-native-reader.js +4 -2
- package/dist/ui/conversation-native-reader.js.map +2 -2
- package/dist/ui/conversation.js +3 -3
- package/dist/ui/dashboard-presentation.d.ts.map +1 -1
- package/dist/ui/dashboard.js +13 -9
- package/dist/ui/dashboard.js.map +2 -2
- package/dist/ui/fabric-code-parser.d.ts.map +1 -1
- package/dist/ui/format.d.ts +1 -0
- package/dist/ui/format.d.ts.map +1 -1
- package/dist/ui/highlight.d.ts.map +1 -1
- package/dist/ui/settings-rpc.d.ts.map +1 -1
- package/dist/ui/settings-sections-execution.d.ts.map +1 -1
- package/dist/ui/settings-submenus.d.ts +12 -4
- package/dist/ui/settings-submenus.d.ts.map +1 -1
- package/dist/ui/settings.js +79 -31
- package/dist/ui/settings.js.map +2 -2
- package/dist/ui/shiki-catalog.d.ts +3 -0
- package/dist/ui/shiki-catalog.d.ts.map +1 -0
- package/dist/ui/structured.d.ts.map +1 -1
- package/dist/ui/tool-call-timing.d.ts.map +1 -1
- package/dist/ui/widget.d.ts +12 -1
- package/dist/ui/widget.d.ts.map +1 -1
- package/dist/worker/model-control.d.ts.map +1 -1
- package/dist/worker/model-control.js +0 -1
- package/dist/worker/model-control.js.map +2 -2
- package/dist/worker.js +14 -12
- package/dist/worker.js.map +2 -2
- package/docs/agents.md +7 -3
- package/docs/architecture.md +1 -1
- package/docs/components.md +30 -1
- package/docs/configuration.md +24 -10
- package/docs/entropy.md +17 -1
- package/docs/jev.md +68 -3
- package/docs/memory-recall.md +21 -0
- package/package.json +5 -2
- package/skillsets/python/fabric-exec/references/agents.md +2 -0
- package/skillsets/python/fabric-jev/SKILL.md +1 -1
- package/skillsets/typescript/fabric-exec/SKILL.md +5 -1
- package/skillsets/typescript/fabric-exec/references/agents.md +4 -0
- package/skillsets/typescript/fabric-jev/SKILL.md +1 -1
- package/dist/chunks/chunk-2DMJ7MEI.js.map +0 -7
- package/dist/chunks/chunk-2PZWDVJB.js.map +0 -7
- package/dist/chunks/chunk-3MEHEH6B.js.map +0 -7
- package/dist/chunks/chunk-4SSMGBF4.js.map +0 -7
- package/dist/chunks/chunk-656HWVFU.js.map +0 -7
- package/dist/chunks/chunk-ARLYAW2A.js.map +0 -7
- package/dist/chunks/chunk-BOTRGFQQ.js.map +0 -7
- package/dist/chunks/chunk-CI56CW53.js.map +0 -7
- package/dist/chunks/chunk-CPSW2GW4.js.map +0 -7
- package/dist/chunks/chunk-PH7ZJ27F.js.map +0 -7
- package/dist/chunks/chunk-RERA6YWA.js.map +0 -7
- package/dist/chunks/chunk-RNOPHITP.js.map +0 -7
- package/dist/chunks/chunk-TSRKCXNI.js +0 -17
- package/dist/chunks/chunk-TSRKCXNI.js.map +0 -7
- package/dist/chunks/chunk-UDFDF7IY.js.map +0 -7
- package/dist/chunks/chunk-VRZNFNPB.js.map +0 -7
- package/dist/chunks/chunk-Y7KNRAFL.js.map +0 -7
- package/dist/chunks/chunk-ZZ4LHQYJ.js.map +0 -7
- /package/dist/chunks/{chunk-GXNR6NRU.js.map → chunk-2IAVP4O2.js.map} +0 -0
- /package/dist/chunks/{chunk-OP2KTYQB.js.map → chunk-D6YSBP3R.js.map} +0 -0
- /package/dist/chunks/{chunk-U6CTHPZC.js.map → chunk-MQG5QKGI.js.map} +0 -0
- /package/dist/chunks/{chunk-2UQV52II.js.map → chunk-RZKN534S.js.map} +0 -0
- /package/dist/chunks/{chunk-YK5AZ7CZ.js.map → chunk-ULLIZPBH.js.map} +0 -0
- /package/dist/chunks/{chunk-UTR3I23Z.js.map → chunk-W63E3WEO.js.map} +0 -0
- /package/dist/chunks/{chunk-4JETKRFE.js.map → chunk-ZHJNWM6A.js.map} +0 -0
package/docs/configuration.md
CHANGED
|
@@ -209,7 +209,7 @@ Host ceilings include `maxDurationMs`, `maxEvaluations`, `maxToolCalls`, `maxTok
|
|
|
209
209
|
|
|
210
210
|
`components` is a root array of declarative supervised instances. Each `id` gives one instance a stable identity, and `component` names its definition in the versioned protocol. Fabric passes `config` to `activate(context, config)`. The `disabled` field removes an instance from the active graph and preserves its declaration. An empty array is the default, with a limit of 256 valid entries. The runtime installs enabled first-party providers as pinned `fabric.provider.*` components whose reserved IDs sit outside this array.
|
|
211
211
|
|
|
212
|
-
Unknown definitions stay visible as waiting. They do not fail the Fabric runtime. Late discovery activates them. `/fabric reload`
|
|
212
|
+
Unknown definitions stay visible as waiting. They do not fail the Fabric runtime. Late discovery activates them. Once the runtime is active, trusted file edits reconcile automatically without `/fabric reload`; idle bootstrap remains lazy and first use rereads the component configuration. Invalid live edits keep the last working state and are never repaired or renamed by the watcher. `components.describe`, `components.plan`, `components.apply`, and `components.reconcile` provide the same control plane to programs. Changes default to session scope; global/project persistence is explicit, and untrusted project writes are rejected rather than redirected. Project component arrays replace global arrays; session overrides apply by ID on top. Definitions may declare `configSchema` for pre-activation validation. When a definition re-registers with `overwrite: true`, Fabric uses the same rollback-capable replacement path. See [components, effects, and committed capabilities](components.md#live-configuration-control).
|
|
213
213
|
|
|
214
214
|
## Speculation
|
|
215
215
|
|
|
@@ -239,7 +239,7 @@ Unknown definitions stay visible as waiting. They do not fail the Fabric runtime
|
|
|
239
239
|
|
|
240
240
|
`prewalk.thinking` sets the optional reasoning effort for the trajectory child executor. Its values are `off` / `minimal` / `low` / `medium` / `high` / `xhigh` / `max`, clamped to each model's supported levels. When you leave it unset, the executor inherits `agents.thinking`. In-place mode keeps Main's session level.
|
|
241
241
|
|
|
242
|
-
`prewalk.alwaysRearm` defaults to `false`. When enabled, prewalk returns to an armed, taskless state after each completed handoff (in-place return or trajectory completion). Every session then starts armed automatically, non-interactively from `prewalk.model`, and `/fabric reload` re-arms as well. `/fabric prewalk --off` cancels the armed state until the next session start or reload. Turns that settle without a handoff never disarm prewalk, regardless of this setting. The settings UI labels an unset model **Ask each time**. Non-interactive sessions must configure a model. In-place mode does not require child agents. Trajectory mode requires `agents.enabled`. It shows child spawn, progress, nested tools, metrics, and completion in Main's Fabric activity UI.
|
|
242
|
+
`prewalk.alwaysRearm` defaults to `false`. When enabled, prewalk returns to an armed, taskless state after each completed handoff (in-place return or trajectory completion). Every Main session then starts armed automatically, non-interactively from `prewalk.model`, and `/fabric reload` re-arms Main as well. Child agents and actors never auto-arm from inherited settings; explicit arming is unaffected. `/fabric prewalk --off` cancels the armed state until the next session start or reload. Turns that settle without a handoff never disarm prewalk, regardless of this setting. The settings UI labels an unset model **Ask each time**. Non-interactive sessions must configure a model. In-place mode does not require child agents. Trajectory mode requires `agents.enabled`. It shows child spawn, progress, nested tools, metrics, and completion in Main's Fabric activity UI.
|
|
243
243
|
|
|
244
244
|
`prewalk.detectShellWrites` defaults to `true`. When armed, a `fabric_exec` boundary that ran a successful `pi.bash` or `pi.powershell` without an audited `pi.edit` / `pi.write` / `schema.commit` claims the handoff if file size or mtime stats drifted from the arm-time baseline. This routes shell heredocs and formatter binaries to the executor as well. The report's `trigger.files` lists the bounded drifted paths. Set it to `false` to accept audited mutations only.
|
|
245
245
|
|
|
@@ -249,14 +249,15 @@ Each in-place handoff captures Main's active model at the boundary and restores
|
|
|
249
249
|
|
|
250
250
|
## Models
|
|
251
251
|
|
|
252
|
-
`models.aliases` names model selectors for `agents.switchModel` and for Pi-runner `model` arguments on `agents.run`, `agents.spawn`, `agents.create`, and `agents.handoff` (see [Agents](agents.md#switching-mains-session-model)). Each alias is either one `provider/model` target
|
|
252
|
+
`models.aliases` names model selectors for `agents.switchModel` and for Pi-runner `model` arguments on `agents.run`, `agents.spawn`, `agents.create`, and `agents.handoff` (see [Agents](agents.md#switching-mains-session-model)). Each alias is either one `provider/model` target, an ordered fallback chain, or an object `{"model": <target or chain>, "thinking": <level>}`. Resolution walks the chain and uses the first authenticated target. Alias names match case-insensitively and take priority over bare model ids and fuzzy matching. Aliases live in normal Fabric configuration, so a project `.pi/fabric.json` can extend the agent-level `fabric.json`; entries with malformed names or targets are ignored at load, and an unrecognized `thinking` level is dropped while the alias survives. An alias `thinking` level is the default effort for every run that selects it: an explicit `thinking` on the call or actor wins, and `agents.thinking` applies only when the alias sets none. `agents.switchModel` changes only the session model, so an alias thinking level does not apply there.
|
|
253
253
|
|
|
254
254
|
```json
|
|
255
255
|
{
|
|
256
256
|
"models": {
|
|
257
257
|
"aliases": {
|
|
258
258
|
"cheap": "google/gemini-2.5-flash",
|
|
259
|
-
"budget": ["openai/gpt-5-mini", "google/gemini-2.5-flash"]
|
|
259
|
+
"budget": ["openai/gpt-5-mini", "google/gemini-2.5-flash"],
|
|
260
|
+
"shallow": { "model": "google/gemini-2.5-flash", "thinking": "low" }
|
|
260
261
|
}
|
|
261
262
|
}
|
|
262
263
|
}
|
|
@@ -392,7 +393,7 @@ Select **Jev (TypeSafe safety classifier)** in **Approvals → Auto model** afte
|
|
|
392
393
|
```json
|
|
393
394
|
{
|
|
394
395
|
"approvals": {
|
|
395
|
-
"model": "
|
|
396
|
+
"model": "pi-fabric/typesafe/jev-latest",
|
|
396
397
|
"write": "auto",
|
|
397
398
|
"execute": "auto",
|
|
398
399
|
"network": "auto",
|
|
@@ -401,9 +402,11 @@ Select **Jev (TypeSafe safety classifier)** in **Approvals → Auto model** afte
|
|
|
401
402
|
}
|
|
402
403
|
```
|
|
403
404
|
|
|
404
|
-
Jev is an auth-only provider, not a chat model. This picker
|
|
405
|
+
Jev is an auth-only provider, not a chat model. This picker offers `pi-fabric/typesafe/jev-latest` and `pi-fabric/typesafe/jev-1.13` only in the approvals list, plus the configured `jev.model` if different. Legacy `jev/<model-id>` overrides normalize to `pi-fabric/typesafe/<model-id>` when loaded. `/login jev` credentials and raw TypeSafe request IDs (`jev-latest`, `jev-1.13`) are unchanged. **Inherit** still means the active Pi chat model, never Jev. Selecting Jev for approvals is independent of `jev.enabled`, which controls Fabric's Jev tool provider.
|
|
406
|
+
|
|
407
|
+
The host asks one typed Noul question about whether the exact action is routine, reversible, task-aligned, and safe to run without human approval. It auto-allows when the returned probability is **at least `jev.autoApprovalThreshold` (default 0.50)**. Selecting a Jev model reveals **Approvals → Jev minimum probability**, an editable number from 0 to 1 in both terminal and RPC settings. The setting persists in the selected global/project scope, remains saved when switching models, and applies only to Jev classification. For example, `"jev": { "autoApprovalThreshold": 0.95 }` requires a probability of at least 0.95. Missing, non-numeric, non-finite, or out-of-range configuration values use the 0.50 default; valid decimals and zero are preserved. Upgrading from the former fixed 0.99 cutoff uses 0.50 unless you explicitly configure another value.
|
|
405
408
|
|
|
406
|
-
|
|
409
|
+
Lower thresholds permit more actions; **0 allows every valid judgment**, while 1 requires a probability of 1. Scores below the threshold require explicit approval. Missing evidence and errors still escalate regardless of threshold. Reasons report the numeric judgment and effective threshold, not generated explanations. This is a policy cutoff, **not a calibrated security guarantee**. Use `ask` or `deny` when a probabilistic advisor is inappropriate.
|
|
407
410
|
|
|
408
411
|
Jev receives the exact bounded arguments plus the **latest user message and subsequent assistant tool calls**. Earlier turns, assistant prose, thinking, images, and tool outputs are excluded. Vague follow-ups cannot borrow authority from omitted history. Missing user text, non-serializable arguments, or truncation of this evidence require explicit approval without inference (16,000 argument characters, 6,000 per user message/tool-call batch, 24,000 total evidence characters). Starting a new explicit user turn resets this evidence window.
|
|
409
412
|
|
|
@@ -415,11 +418,21 @@ Authentication uses `/login jev`, `TYPESAFE_API_KEY`, then trusted `jev.credenti
|
|
|
415
418
|
|
|
416
419
|
Fabric clears inactive run artifacts by age. It never truncates active JSONL files. The defaults are:
|
|
417
420
|
|
|
418
|
-
- `retention.orphanedTempRunMs`:
|
|
419
|
-
- `retention.oneShotRunMs`: retain terminal one-shot agent run artifacts for 24 hours. An explicit `agents.cleanup()` may remove them sooner.
|
|
421
|
+
- `retention.orphanedTempRunMs`: reclaim a managed temporary run root six hours after a sweep **first notices** its owner is dead, provided its contents and descendant liveness can be verified. Live owners/descendants are preserved. Closed, shutdown-confirmed incomplete runs use the same grace from close.
|
|
422
|
+
- `retention.oneShotRunMs`: retain terminal one-shot agent run artifacts for 24 hours. An explicit `agents.cleanup()` may remove them sooner. Graceful shutdown with `agents.retainRuns: true` marks managed roots closed; empty roots are removed immediately. `retainRuns: false` requests deletion after child transports stop, including for managed temporary roots.
|
|
420
423
|
- `retention.actorRunArchiveMs`: retain terminal actor run archives for seven days. Fabric always preserves the latest run for each actor.
|
|
421
424
|
|
|
422
|
-
|
|
425
|
+
Run housekeeping begins on actual agent storage use (not manager startup), continues during use, and runs best-effort on close. It never applies cache pressure to agent runs or truncates their JSONL/actor `session.jsonl` files. Caller-owned run roots retain their existing explicit-cleanup semantics. Symlink roots/markers, wrong-uid files, malformed ownership, unknown contents, and unverifiable incomplete descendants are preserved. `/fabric settings` exposes all three values under **Retention**. Changing them requires `/fabric reload`.
|
|
426
|
+
|
|
427
|
+
### Temporary output and reader scratch
|
|
428
|
+
|
|
429
|
+
New model-output spills and shell logs use private directories with a versioned `.fabric-scratch.json` ownership marker. They expire 24 hours after completion; oldest eligible caches may be removed sooner above **128 MiB or 256 items**, pooled across these two classes. Completed output is protected for its first hour. These aggregate limits are **soft** while files are active/recent or cannot be safely attributed. Model-output artifacts remain complete (not truncated), but their links are temporary.
|
|
430
|
+
|
|
431
|
+
Shell hang tracking keeps a **1 MiB RAM tail per running command**, then releases it on finish. Completed handles are capped at **256** and expire after 24 hours on subsequent store access. Each shell log is capped at **8 MiB including notices**; it starts with the retained pre-spill tail, not necessarily the command's beginning. The returned notice and log header explicitly say this is bounded, **not a full-output archive**; reaching the disk cap appends a truncation notice. Further output continues to the normal shell consumer but not the log. PID files are retired on finish; logs remain subject to the cache policy. A disk write error also stops logging without interrupting command execution; bounded logs never promise completeness.
|
|
432
|
+
|
|
433
|
+
Reader checkpoints are lossless live state: they are **never pressure-evicted**. Dispose/finalization removes them normally. New marked scratch left by a killed host can be recovered only six hours after housekeeping first observes a dead owner; shell scratch additionally preserves a live recorded child PID. PID reuse and permission uncertainty preserve data. Sweeps are asynchronous, coalesced and throttled to once per minute on actual scratch allocation/close, with no idle startup scan. Nothing expires until a later storage use triggers housekeeping. Directory identity, file metadata and owner/child liveness are rechecked before removal; hardlinked files are excluded. `sweepScratch({ tempRoot, dryRun: true })` reports `eligible` and first-observed `orphaned` directories without deleting or updating markers.
|
|
434
|
+
|
|
435
|
+
**Conservative recovery limits:** legacy unmarked output/shell/checkpoint artifacts are not automatically deleted. Shared recursion budget ledgers lack descendant ownership leases, and temporary actor roots may contain shared/adopted work; crash orphans of those two classes are deliberately left alone, not deleted merely because a parent PID is dead or old. Normal owned-budget/ephemeral-actor close cleanup remains in place (budget initialization failures now remove their partial allocation). Persistent/caller-owned actor roots are not cache sweep targets. Unverifiable legacy incomplete runs, unknown files, malformed markers, and symlinks likewise require an operator's ownership/liveness review; do not use a broad prefix deletion.
|
|
423
436
|
|
|
424
437
|
## Agents
|
|
425
438
|
|
|
@@ -486,6 +499,7 @@ See the [TypeScript MCP reference](../skillsets/typescript/fabric-exec/reference
|
|
|
486
499
|
## UI
|
|
487
500
|
|
|
488
501
|
- `ui.widget` is `auto`, `always`, or `hidden`. `auto` shows active or retained Fabric runs and worker activity. Active one-shot agents and actor workers occupy rows. Their recent nested tools appear beneath them when enabled.
|
|
502
|
+
- `ui.maxRows` defaults to `6` and clamps the widget to `1..20` rows. The effective budget is also bounded by half the live terminal height, so a short pane or a tmux split cannot let the animated box fill the viewport and keep pi's scroll region moving under the editor. Rows beyond the budget collapse into a dim `+N` marker on the last line.
|
|
489
503
|
- `ui.showAgentToolPreview` defaults to `true` and controls the child-agent and actor tool rows in both the parent `fabric_exec` card and the widget. Recursive agents render their full descendant tree, bounded by the preview depth/node budget. The version 2 config migration renamed this key from `ui.showNestedToolCalls`.
|
|
490
504
|
- `ui.toolDisplay` is `"compact"` (default) or `"full"`. Compact elevates the declared display name and description and keeps bounded nested tool detail visible; full retains the outer Fabric program transcript. Pi's tool-expand keybinding (`ctrl+o` by default) expands a compact card to the full transcript and collapses it again. Invalid values fall back to `"compact"`. If configuration fails to load, rendering falls back to full so a degraded startup never hides the transcript. Change it under `/fabric settings` → **UI**; successful changes apply immediately to live and completed cards.
|
|
491
505
|
- `ui.updateDebounceMs` defaults to `100`. It applies one execution-wide coalescing interval to every live `fabric_exec` card update: nested calls, progress text, and agent tool previews. Continuous streams emit at most once per interval, so a long call no longer postpones every render until completion. Set it to `0` to emit every update. Accepted values clamp to `0..2000`. The version 3 config migration renamed this key from `ui.nestedToolDebounceMs`.
|
package/docs/entropy.md
CHANGED
|
@@ -58,7 +58,23 @@ rate across a selected window, not a guaranteed downward ratchet.
|
|
|
58
58
|
- Catalog repair rows are separate compatibility mappings and diagnostic input;
|
|
59
59
|
they do not authorize schema restrictions.
|
|
60
60
|
|
|
61
|
-
Session scans reuse bounded evidence caches and appended-file cursors.
|
|
61
|
+
Session scans reuse bounded evidence caches and appended-file cursors.
|
|
62
|
+
Background compilation also caches per-session trace aggregates and observation
|
|
63
|
+
summaries: unchanged snapshots do not reprocess old operations, appends only
|
|
64
|
+
accumulate new evidence, and replacement/truncation rebuilds the affected cache.
|
|
65
|
+
Schema-derived plans are cached by the declared surface digest; schema and repair
|
|
66
|
+
changes still update the report. These caches are session-owned, retain at most
|
|
67
|
+
16 windows, and are discarded on session start/shutdown. Cached snapshot inputs
|
|
68
|
+
must not be mutated by callers.
|
|
69
|
+
|
|
70
|
+
Background machine-wide discovery runs at most once per 30 seconds, with the
|
|
71
|
+
active session file included on every compile. Selected files are still checked
|
|
72
|
+
for changes each time. Explicit `/fabric entropy` inspection remains immediately
|
|
73
|
+
fresh. Advisory enum/overload/sequence analysis runs only on the inspection path,
|
|
74
|
+
not in background compilation. No normalizations or historical outcomes change.
|
|
75
|
+
`bun run benchmark:turn-cpu` compares cached/uncached source paths using synthetic
|
|
76
|
+
evidence and reports process CPU separately from wall time.
|
|
77
|
+
The
|
|
62
78
|
machine-wide value observation pool retains per-session deltas and per-value
|
|
63
79
|
multiplicity, avoiding inflation when unchanged sessions are reread. Pooling is
|
|
64
80
|
**advisory only**: observations never authorize capability loss or new semantic
|
package/docs/jev.md
CHANGED
|
@@ -30,9 +30,9 @@ The command uses argv, not a shell. It runs only when inference needs a key, wit
|
|
|
30
30
|
|
|
31
31
|
## Auto-mode tool safety
|
|
32
32
|
|
|
33
|
-
Jev can also serve as the host's auto-approval classifier, independently of programs and observers. Choose **Approvals → Auto model → Jev (TypeSafe safety classifier)** in `/fabric settings`, or set `approvals.model` to `"
|
|
33
|
+
Jev can also serve as the host's auto-approval classifier, independently of programs and observers. Choose **Approvals → Auto model → Jev (TypeSafe safety classifier)** in `/fabric settings`, or set `approvals.model` to `"pi-fabric/typesafe/jev-latest"` (or pin `"pi-fabric/typesafe/jev-1.13"`) and the relevant risk policies to `"auto"`. Authenticate with `/login jev`, `TYPESAFE_API_KEY`, or the trusted credential command above.
|
|
34
34
|
|
|
35
|
-
The host uses a typed Noul safety judgment, not generated text or a chat-model adapter.
|
|
35
|
+
The host uses a typed Noul safety judgment, not generated text or a chat-model adapter. Probabilities at or above `jev.autoApprovalThreshold` auto-allow (default **0.50**); lower scores and errors require explicit approval. When a Jev model is selected, **Approvals → Jev minimum probability** lets you enter any finite value from 0 to 1. Higher values are more conservative; 0 allows every valid judgment. This is a probabilistic advisor, not a hard security boundary or a correctness guarantee. Read [auto approval configuration](configuration.md#jev-as-the-auto-mode-classifier) for the bounded current-turn evidence, outbound data disclosure, credential behavior, timeout and usage rules. Jev remains absent from ordinary chat-model pickers.
|
|
36
36
|
|
|
37
37
|
## Direct judgments
|
|
38
38
|
|
|
@@ -135,6 +135,71 @@ Foreground cancellation cancels the run. Cancelling a `wait` only cancels that w
|
|
|
135
135
|
|
|
136
136
|
Status retains the latest 64 events (4 KiB each); use `sequence` and `nextSequence` to detect gaps. Logs are capped at 4 KiB; program input and final JSON output are each capped at 32 KiB. Terminal runs are retained in a bounded in-memory history; old IDs eventually expire. There is no unlimited hidden transcript or per-tick reasoning agent.
|
|
137
137
|
|
|
138
|
+
## Realtime loops
|
|
139
|
+
|
|
140
|
+
A realtime controller is one program: observe, judge, act, pace, repeat. Two decision shapes cover the published realtime examples: [Jev Ultrafast](https://github.com/browser-use/jev-ultrafast) and [jev-doom-agent](https://github.com/lukaske/jev-doom-agent).
|
|
141
|
+
|
|
142
|
+
- **Operation plus speculative targets.** One request asks which operation to run and, separately, which target each operation would use. Code applies only the target head matching the chosen operation. This is the browser-agent shape: a dynamic element table, one network round trip, one executed action.
|
|
143
|
+
- **Factorized control axes.** One request asks several independent questions whose answers execute together, for example movement / view / trigger / interaction. This is the shape of the browser-native Doom example.
|
|
144
|
+
|
|
145
|
+
Both are ordinary `jev.evaluate` batches: keep independent questions in one request, and keep the mapping from answers to effects in code. A counterfactual head that is not executed is still a judgment; never let unused heads write state.
|
|
146
|
+
|
|
147
|
+
### Observation stays structured state
|
|
148
|
+
|
|
149
|
+
Read the application's own state — a page bridge through `browser.cdp` and `Runtime.evaluate`, or a small application-specific provider — and project it into a compact object with a revision. Include the facts the judgment needs and nothing else: player/entity/environment fields, the previous action, and bounded history are usually enough. Screenshots are not part of the typed request contract; keep pixels out of `state`, and never send secrets.
|
|
150
|
+
|
|
151
|
+
### Code owns the motor layer
|
|
152
|
+
|
|
153
|
+
Jev selects a tactic; code decides how to execute it. A timed pulse with an epoch guard is what survives a realtime loop: apply an input mask, hold it for a bounded interval, release it only while it is still the newest pulse, then re-observe.
|
|
154
|
+
|
|
155
|
+
```ts
|
|
156
|
+
let epoch = 0;
|
|
157
|
+
async function pulse(mask: string, durationMs: number) {
|
|
158
|
+
const mine = ++epoch;
|
|
159
|
+
await tools.call({ ref: "app.control", args: { mask, epoch: mine } });
|
|
160
|
+
await program.sleep(durationMs);
|
|
161
|
+
if (mine === epoch) await tools.call({ ref: "app.release", args: { epoch: mine } });
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Revalidate the revision you decided from before applying anything. A rejected or stale action means re-observe and re-decide, not retry blindly.
|
|
166
|
+
|
|
167
|
+
### Degraded mode must be labeled
|
|
168
|
+
|
|
169
|
+
A realtime loop needs a deterministic fallback for every degraded decision: a failed request, an invalid response, or confidence below your threshold. Compute the fallback in code, replace the judgment, and record it, so the UI and telemetry never present it as a model decision.
|
|
170
|
+
|
|
171
|
+
```ts
|
|
172
|
+
let degraded = false;
|
|
173
|
+
try {
|
|
174
|
+
const decision = await jev.evaluate({ state, questions });
|
|
175
|
+
if (decision.answers.action.confidence < 0.5) degraded = true;
|
|
176
|
+
else frame = decision.answers.action.choice;
|
|
177
|
+
} catch { degraded = true; }
|
|
178
|
+
if (degraded) { frame = deterministicFallback(state); await program.emit({ fallback: true, frame }); }
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Confidence is neither truth nor authorization; a low-confidence answer is a reason to fall back, not a reason to act. Fabric validates the response before it returns it — an invalid choice, probability set, or confidence rejects the evaluation instead of surfacing a partial answer, so `catch` is part of the loop.
|
|
182
|
+
|
|
183
|
+
### Budget arithmetic for sustained loops
|
|
184
|
+
|
|
185
|
+
Default per-run limits are 60 seconds, 100 evaluations, 1,000 host calls, and 100,000 reported tokens. `program.sleep` and `program.emit` are host calls and count against `maxToolCalls`, so a paced loop spends budget even when it is not touching the world. At 10 Hz with observe, evaluate, control, release, and sleep, that is five host calls per tick: the default 1,000 host calls last about 20 seconds, and the default 100 evaluations about 10 seconds. A sustained run needs explicit limits and a raised host ceiling:
|
|
186
|
+
|
|
187
|
+
```json
|
|
188
|
+
{
|
|
189
|
+
"jev": { "maxDurationMs": 3600000, "maxEvaluations": 100000, "maxToolCalls": 1000000, "maxTokens": 100000000 }
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Per-program `limits` are clamped to these ceilings (24 hours, 100,000 evaluations, 1,000,000 host calls). Duration and evaluation count are the real liveness bounds; the wall-clock deadline and terminal state are always reported in the run envelope.
|
|
194
|
+
|
|
195
|
+
### Telemetry and shutdown
|
|
196
|
+
|
|
197
|
+
Spawn the loop with `jev.spawn` so Main stays responsive and can inspect it. The event ring holds the latest 64 events (4 KiB each) — roughly six seconds at 10 Hz — so drain it with `jev.status({ id, after })` from the supervising turn or persist it host-side; terminal runs live only in a bounded history. At most one evaluation may be in flight per program, so batch independent questions instead of hedging decisions, and run two engines as two programs (`jev.maxConcurrentRuns`).
|
|
198
|
+
|
|
199
|
+
Stop a loop with `jev.stop({ id })`, provider reload/unload, or a code-owned terminal rule such as death, goal reached, or a no-match judgment. Cancellation aborts in-flight inference and host calls, but it is not rollback of effects already issued.
|
|
200
|
+
|
|
201
|
+
`tests/jev-realtime-loop.test.ts` is the deterministic reference for both shapes, the pulse/epoch pattern, labeled degraded mode, a death stop, and status/stop on a paced run.
|
|
202
|
+
|
|
138
203
|
## Main-turn advisors and supervisors
|
|
139
204
|
|
|
140
205
|
`jev.spawn({program,input,observe})` can subscribe to the owning Main session. This is an **event-driven sidecar**, not another reasoning agent or a polling loop. It works with mesh disabled. It is not a mesh participant, a cross-session subscription, or restart-durable storage; do not pass its run ID to `agents.subscribe`.
|
|
@@ -284,6 +349,6 @@ PI_FABRIC_JEV_LIVE=1 PI_FABRIC_JEV_LOCALTERM=1 bunx vitest run tests/jev-live.te
|
|
|
284
349
|
|
|
285
350
|
After `bun run build`, `bun run test:jev:dist` checks the compiled public entry point, auth-only registration, foreground CDP composition with a simulated session, and background stop/wait, agent/Jev join aliases, and event-driven Main advice.
|
|
286
351
|
|
|
287
|
-
No real browser state or secrets are printed by these probes. Live tests exercise all three primitives, foreground/background inference loops, and a feedback controller using changing synthetic screen observations and source control IDs. Unit tests exercise the Browser Harness adapter with an injected session; they do not attach to a personal browser.
|
|
352
|
+
No real browser state or secrets are printed by these probes. Live tests exercise all three primitives, foreground/background inference loops, and a feedback controller using changing synthetic screen observations and source control IDs. `tests/jev-realtime-loop.test.ts` replays both realtime shapes offline: batched target heads with one request per tick, factorized control axes with pulse/epoch motor control, labeled degraded decisions, a death stop, and status/stop on a paced loop. Unit tests exercise the Browser Harness adapter with an injected session; they do not attach to a personal browser.
|
|
288
353
|
|
|
289
354
|
Public host APIs and types are exported from `pi-fabric/jev`. Fabric lifecycle and trust semantics are detailed in [components.md](components.md). Current TypeSafe contracts: [API](https://docs.typesafe.ai/api), [Choice](https://docs.typesafe.ai/primitives/choice), [Noul](https://docs.typesafe.ai/primitives/noul), [Score](https://docs.typesafe.ai/primitives/score), and [confidence](https://docs.typesafe.ai/confidence).
|
package/docs/memory-recall.md
CHANGED
|
@@ -287,6 +287,27 @@ regex result never counts as an authoritative no-match.
|
|
|
287
287
|
|
|
288
288
|
## Tiers, refresh, and work budgets
|
|
289
289
|
|
|
290
|
+
Pi's built-in filesystem memory provider runs recall, expansion, and session
|
|
291
|
+
listing in one lazy worker thread. Discovery, source hashing, JSON parsing,
|
|
292
|
+
cache maintenance, and ranking do not run on Pi's input/render thread. A
|
|
293
|
+
burst of calls shares a FIFO queue (at most 64 outstanding requests), rather
|
|
294
|
+
than spawning a CPU-heavy worker for every recall. Aborting an active call
|
|
295
|
+
terminates its worker; queued calls can be cancelled independently. Idle
|
|
296
|
+
workers are unreferenced and released after 30 seconds, and provider teardown
|
|
297
|
+
terminates outstanding work. A missing worker artifact is an error, not a
|
|
298
|
+
silent fallback to blocking execution.
|
|
299
|
+
|
|
300
|
+
Live-session branch snapshots carry entry IDs only, are taken when each
|
|
301
|
+
queued request starts, and are checked again before returning its result.
|
|
302
|
+
Navigation during retrieval rejects the request instead of returning evidence
|
|
303
|
+
from a different live branch. Registered host-backed adapters remain in their
|
|
304
|
+
authorized owning host and keep their existing cancellation contracts.
|
|
305
|
+
|
|
306
|
+
`bun run benchmark:memory-recall` exercises a burst of 13 cold-session recalls
|
|
307
|
+
and reports both retrieval time and host event-loop heartbeat gaps. Pass
|
|
308
|
+
`--inline` directly to `node scripts/benchmark-memory-recall.mjs` to compare
|
|
309
|
+
with the synchronous engine used internally by the worker.
|
|
310
|
+
|
|
290
311
|
The `memory.hotSessions` most recently modified sessions stay hot. Every
|
|
291
312
|
older session is cold. Once a session crosses the boundary, Fabric drops
|
|
292
313
|
the old derived tier record after building the replacement. Explicit
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e4779/pi-fabric",
|
|
3
|
-
"version": "0.92.
|
|
3
|
+
"version": "0.92.28-fork.5",
|
|
4
4
|
"description": "A programmable tool and agent runtime for Pi",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -46,15 +46,18 @@
|
|
|
46
46
|
"test:jev:dist": "node scripts/smoke-jev.mjs",
|
|
47
47
|
"test:changed": "node scripts/test-affected.mjs",
|
|
48
48
|
"test:affected": "node scripts/test-affected.mjs --base $PI_TEST_BASE",
|
|
49
|
-
"test:smoke": "vitest run tests/script-runtime.test.ts tests/pi-binary.test.ts tests/host-compatibility.test.ts tests/output-budget.test.ts tests/actor-mesh-monitor.test.ts tests/handoff.test.ts tests/config-migrations.test.ts tests/monty-payload-preflight.test.ts tests/bundled-binary-spawn.test.ts tests/conversation-native-reader-suspension.test.ts",
|
|
49
|
+
"test:smoke": "vitest run tests/optional-preview-startup.test.ts tests/script-runtime.test.ts tests/pi-binary.test.ts tests/host-compatibility.test.ts tests/output-budget.test.ts tests/actor-mesh-monitor.test.ts tests/handoff.test.ts tests/config-migrations.test.ts tests/monty-payload-preflight.test.ts tests/bundled-binary-spawn.test.ts tests/conversation-native-reader-suspension.test.ts",
|
|
50
50
|
"test:related": "vitest related --run",
|
|
51
51
|
"check:fast": "bun run typecheck && bun run test:changed",
|
|
52
52
|
"certify:context": "bun run build && node scripts/certify-context.mjs",
|
|
53
53
|
"certify:entropy": "bun run build && node scripts/certify-entropy.mjs",
|
|
54
54
|
"benchmark:real-resume": "bun run build && node scripts/benchmark-real-resume.mjs",
|
|
55
55
|
"benchmark:memory-heads": "bun run build && node scripts/benchmark-memory-heads.mjs",
|
|
56
|
+
"benchmark:memory-recall": "bun run build && node scripts/benchmark-memory-recall.mjs",
|
|
56
57
|
"benchmark:conversation": "bun run build && node --expose-gc scripts/benchmark-conversation.mjs",
|
|
57
58
|
"benchmark:activity": "node --expose-gc scripts/benchmark-activity.mjs",
|
|
59
|
+
"benchmark:turn-cpu": "node scripts/benchmark-turn-cpu.mjs",
|
|
60
|
+
"benchmark:startup": "node scripts/benchmark-startup.mjs",
|
|
58
61
|
"lint:dead": "knip --no-gitignore",
|
|
59
62
|
"assert:lazy-graph": "node scripts/assert-lazy-graph-host-free.mjs",
|
|
60
63
|
"assert:build-artifacts": "node scripts/assert-build-artifacts.mjs",
|
|
@@ -63,3 +63,5 @@ return await agents.create(name="auth-supervisor", instructions="Watch until the
|
|
|
63
63
|
Use `await agents.run(task="...", runner="pi", recursive=True)` only for oversized context; plain children handle bounded leaves. Host maxDepth (0 disables spawning), approvals, concurrency, and budget limits remain active. Recursion delegates agent risk only, not filesystem/network/execute permissions. Keep durable context in mesh keys or project-relative files plus digests, not whole-corpus child prompts.
|
|
64
64
|
|
|
65
65
|
`agents.handoff` without a predicate schedules an explicit Pi-to-Pi trajectory handoff at the completed outer fabric_exec boundary; later calls in the program still run. It is not a subroutine result. Use host schemas and a canonical target model; no Python guest predicate callbacks. Preserve successful effects rather than retrying the original program blindly.
|
|
66
|
+
|
|
67
|
+
A running trajectory executor may receive one hidden `pi-fabric-handoff-continuation` after a failed nested handoff. Finish the original assignment directly in the same workspace, preserve completed work, and verify the remainder instead of returning only a failure report. Do not retry delegation, spawn a replacement, or raise limits. Fabric cancels the local Prewalk arm and preserves the failed boundary, original deadline, permissions, and token accounting. Explicit stops, cancellation, timeouts, and token-limit termination stay terminal. Main continues to report terminal failures and propose a next step; it does not take over unprompted.
|
|
@@ -21,7 +21,7 @@ Keep outer `fabric_exec.code` in Python. Call Jev using `await tools.call(ref="j
|
|
|
21
21
|
|
|
22
22
|
## Host auto-approval classifier
|
|
23
23
|
|
|
24
|
-
For user-selected tool safety classification (not a program loop), `/fabric settings` → **Approvals → Auto model** offers Jev. Set the relevant risk policies to `auto`; the stored model key is `
|
|
24
|
+
For user-selected tool safety classification (not a program loop), `/fabric settings` → **Approvals → Auto model** offers Jev. Set the relevant risk policies to `auto`; the stored model key is `pi-fabric/typesafe/jev-latest` (or the pinned `pi-fabric/typesafe/jev-1.13`). Legacy `jev/<model-id>` settings remain compatible. Authentication is shared, but no chat model is registered. The host sends bounded current-user-turn evidence and exact arguments to TypeSafe, auto-allows a typed safety probability at or above `jev.autoApprovalThreshold` (default 0.50, editable through **Approvals → Jev minimum probability** when Jev is selected), and otherwise requires explicit approval. This is a probabilistic advisor, not a hard security boundary; retain `ask`/`deny` where needed. Never enable it or change approval policies or the threshold without the user's permission. See the auto-mode section in `docs/jev.md` via the hard pointer above.
|
|
25
25
|
|
|
26
26
|
## Judgment and loop design
|
|
27
27
|
|
|
@@ -80,7 +80,11 @@ All calls return promises. Fields ending in `?` are optional; `unknown` marks pr
|
|
|
80
80
|
| `schema.verify(args)` | `{verified,hypothesisId,certificate?,issuedAt?,expiresAt?,reason?,results}` |
|
|
81
81
|
| `schema.commit(args)` | `{outcome,transactionId,generation?,paths?,postconditions?,complexityReductionCertified?,stateTransition?,error?,rollbackError?}` |
|
|
82
82
|
| `schema.abort(args)` | `{aborted:true,hypothesisId}` |
|
|
83
|
-
| `components.list()` | `{definitions:
|
|
83
|
+
| `components.list()` | `{definitions,components,configuration:{sources,warnings,sessionOverrides,removalPolicy,error?}}`; ignored trust layers and live-reconcile failures are explicit |
|
|
84
|
+
| `components.describe({component})` | Definition metadata, optional `configSchema`, and instances; works before activation |
|
|
85
|
+
| `components.plan({scope?,entries?,remove?,reset?})` | `{revision,request,changes,warnings,sources}`; validates without activation or writes |
|
|
86
|
+
| `components.apply({...plan.request,expectedRevision:plan.revision})` | Applies immediately; session scope by default, persistence only with explicit global/project scope; unrestricted host callers only |
|
|
87
|
+
| `components.reconcile()` | Re-reads trusted component config without host reload; session overrides remain |
|
|
84
88
|
| `components.status({id})` | `FabricComponentInfo` with state, requirements, provisions, targetDigest?, error?, cleanupErrors? |
|
|
85
89
|
| `components.graph()` | `{components:FabricComponentInfo[],edges:Array<{from,to,ref}>,cycles:string[][]}` |
|
|
86
90
|
| `components.reload({id?}?)` | `{components:FabricComponentInfo[]}`; rolls back activation failure when cleanup succeeds |
|
|
@@ -103,6 +103,8 @@ The guest result is `{ scheduled: true, status: "deferred", boundary: "fabric_ex
|
|
|
103
103
|
|
|
104
104
|
After the executor settles, a visible `pi-fabric-handoff-complete` follow-up reports its identity, status, and bounded conclusion, then wakes Main. Summarize the outcome and reported checks, preserving concrete identifiers; do not redo completed work. If the handoff failed, stopped, or timed out, explain the outcome and propose the next step without retrying or taking over unprompted. This is a queued follow-up, not steering.
|
|
105
105
|
|
|
106
|
+
Exception for an already-running trajectory executor: a failed nested handoff can queue one hidden `pi-fabric-handoff-continuation` per executor run. On that message, finish your original assignment directly in the same workspace, preserve completed work, and verify the remainder rather than returning only the failed-handoff report. Do not retry delegation, spawn a replacement, or raise limits. Fabric cancels the local Prewalk arm, keeps the boundary marked failed, and preserves the run's deadline and token accounting. Explicit stops, cancellation, timeouts, and token-limit termination never trigger this fallback. If genuinely blocked, report the blocker honestly. Main still reports terminal failures instead of taking over unprompted.
|
|
107
|
+
|
|
106
108
|
## Automatic prewalk
|
|
107
109
|
|
|
108
110
|
`/fabric prewalk [task]` arms one automatic continuation when a Fabric invocation contains a successful `pi.edit`, `pi.write`, or `schema.commit`. With a task it submits immediately; without one it captures the next user input. The executor comes from `prewalk.model` or an interactive choice, and its reasoning effort from `prewalk.thinking` (inheriting `agents.thinking` when unset). `prewalk.alwaysRearm` keeps the controller armed until `/fabric prewalk --off`. That command cancels only the session arm; `/fabric prewalk --disable` persists the master switch and survives restarts, while `--enable` restores it.
|
|
@@ -205,6 +207,8 @@ Mailbox:
|
|
|
205
207
|
- `agents.setDeliveryPolicy({ id, delivery, triggerTurn, scope? })` replaces the explicit project/global continuation policy without recreating the actor. In the dashboard, press `y` on an actor/template for the same control.
|
|
206
208
|
- `agents.messages({ id, limit? })` returns the actor mailbox history. Create the actor with `scope: "session"` when its history must be private to one root Pi session.
|
|
207
209
|
- `agents.remove({ id })` returns `{ removed }`. Session actors require the local owner. Durable actor removal routes to the resident owner.
|
|
210
|
+
- `agents.import({ id?, name?, as? })` stamps a global template into the current project as a fresh live actor with no inherited history (no messages, session, or run logs). Identify the template by `id` or `name`; `as` renames the imported actor so it cannot collide with a live one. From the TUI: `/fabric import`.
|
|
211
|
+
- `agents.export({ id, overwrite? })` writes a live project actor's definition to the global registry as a project-independent template, again without history. A name collision throws unless `overwrite` is `true`.
|
|
208
212
|
- `agents.log({ id, type?, lines?, runId? })` reads the shared actor log or a locally owned one-shot run. `type` is `session` (the actor's `session.jsonl` transcript — every user/assistant turn and tool call), `run` (the last retained run's `events.jsonl` event stream), or `all` (both; default `session` for actors). Actors retain their last `MAX_RETAINED_RUNS` runs so logs survive after success. Returns `{ actorId, actorName, sessionFile, logDir, session, run?, retainedRuns }` (actors) or `{ id, runDirectory, logFile, status?, events }` (one-shot runs). Use this to inspect what an "offending" actor actually sent to its model. From the TUI: `/fabric log <id>` previews, `/fabric export-log <id> [path]` writes the raw `session.jsonl` + retained `runs/` to disk.
|
|
209
213
|
|
|
210
214
|
## Recursive queries
|
|
@@ -19,7 +19,7 @@ Code owns the workflow; Jev supplies typed judgments, not generated prose. Run t
|
|
|
19
19
|
|
|
20
20
|
## Host auto-approval classifier
|
|
21
21
|
|
|
22
|
-
For user-selected tool safety classification (not a program loop), `/fabric settings` → **Approvals → Auto model** offers Jev. Set the relevant risk policies to `auto`; the stored model key is `
|
|
22
|
+
For user-selected tool safety classification (not a program loop), `/fabric settings` → **Approvals → Auto model** offers Jev. Set the relevant risk policies to `auto`; the stored model key is `pi-fabric/typesafe/jev-latest` (or the pinned `pi-fabric/typesafe/jev-1.13`). Legacy `jev/<model-id>` settings remain compatible. Authentication is shared, but no chat model is registered. The host sends bounded current-user-turn evidence and exact arguments to TypeSafe, auto-allows a typed safety probability at or above `jev.autoApprovalThreshold` (default 0.50, editable through **Approvals → Jev minimum probability** when Jev is selected), and otherwise requires explicit approval. This is a probabilistic advisor, not a hard security boundary; retain `ask`/`deny` where needed. Never enable it or change approval policies or the threshold without the user's permission. See the auto-mode section in `docs/jev.md` via the hard pointer above.
|
|
23
23
|
|
|
24
24
|
## Design a bounded judgment loop
|
|
25
25
|
|