pi-fabric 0.132.9 → 0.134.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/README.md +8 -0
- package/dist/chunks/{chunk-NSV7WTCT.js → chunk-2PGWCW3U.js} +3 -3
- package/dist/chunks/{chunk-DGUXJSYA.js → chunk-4OATUM7F.js} +57 -1
- package/dist/chunks/{chunk-DGUXJSYA.js.map → chunk-4OATUM7F.js.map} +3 -3
- package/dist/chunks/{chunk-6NSPFTXC.js → chunk-DJBPECJL.js} +26 -6
- package/dist/chunks/chunk-DJBPECJL.js.map +7 -0
- package/dist/chunks/{chunk-2RWNVCFD.js → chunk-MPFBOVOD.js} +1 -1
- package/dist/chunks/{chunk-2RWNVCFD.js.map → chunk-MPFBOVOD.js.map} +1 -1
- package/dist/chunks/{chunk-MGFSQXAJ.js → chunk-O46NF3MN.js} +5 -4
- package/dist/chunks/chunk-O46NF3MN.js.map +7 -0
- package/dist/chunks/{chunk-6ZPEPRUV.js → chunk-ODJJFAJV.js} +9 -5
- package/dist/chunks/{chunk-6ZPEPRUV.js.map → chunk-ODJJFAJV.js.map} +2 -2
- package/dist/chunks/{chunk-F6GIK5GO.js → chunk-S7NXPQDM.js} +1 -1
- package/dist/chunks/{chunk-JWERGULW.js → chunk-Y5G7FIMS.js} +6 -6
- package/dist/core/action-registry.d.ts.map +1 -1
- package/dist/core/action-registry.js +2 -2
- package/dist/core/pasted-images.d.ts +12 -0
- package/dist/core/pasted-images.d.ts.map +1 -0
- package/dist/core/pasted-images.js +139 -0
- package/dist/core/pasted-images.js.map +7 -0
- package/dist/core/prompt-guidance.js +1 -1
- package/dist/core/prompt-guidance.js.map +2 -2
- package/dist/durable-extension.js +1 -1
- package/dist/durable-extension.js.map +1 -1
- package/dist/execution-service.d.ts.map +1 -1
- package/dist/extension-bootstrap.js +4 -4
- package/dist/extension.d.ts.map +1 -1
- package/dist/fabric-runtime-state.js +9 -6
- package/dist/fabric-runtime-state.js.map +2 -2
- package/dist/index.js +4 -4
- package/dist/jev.js +1 -1
- package/dist/managed-host.d.ts +4 -0
- package/dist/managed-host.d.ts.map +1 -1
- package/dist/protocol.d.ts +5 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +1 -1
- package/dist/providers/jev-provider.js +1 -1
- package/dist/residency/host.js +4 -4
- package/dist/residency/pi-entry.js +4 -4
- package/dist/runtime/node-process-runtime.js +1 -1
- package/dist/runtime/typescript-kernel.js +3 -3
- package/dist/ui/dashboard.js +1 -1
- package/dist/ui/structured.d.ts.map +1 -1
- package/dist/verified/execution.d.ts +7 -0
- package/dist/verified/execution.d.ts.map +1 -0
- package/dist/verified/generated/execution.d.ts +5 -0
- package/dist/verified/generated/execution.js +32 -0
- package/dist/verified/generated/manifest.json +14 -2
- package/docs/architecture.md +13 -0
- package/docs/providers.md +24 -1
- package/docs/verified-kernels.md +24 -0
- package/package.json +1 -1
- package/proofs/execution.ts +48 -0
- package/proofs/index.ts +2 -0
- package/scripts/verified-kernels.ts +1 -1
- package/dist/chunks/chunk-6NSPFTXC.js.map +0 -7
- package/dist/chunks/chunk-MGFSQXAJ.js.map +0 -7
- /package/dist/chunks/{chunk-NSV7WTCT.js.map → chunk-2PGWCW3U.js.map} +0 -0
- /package/dist/chunks/{chunk-F6GIK5GO.js.map → chunk-S7NXPQDM.js.map} +0 -0
- /package/dist/chunks/{chunk-JWERGULW.js.map → chunk-Y5G7FIMS.js.map} +0 -0
package/README.md
CHANGED
|
@@ -146,6 +146,14 @@ Pi loads advanced patterns after direct user invocation. Run `/skill:fabric-guid
|
|
|
146
146
|
|
|
147
147
|
Execution references stay progressive: the model loads the selected kernel's skill after argument-shape errors or when exact advanced contracts are needed. Kernel changes reload Pi so execution and the selected physical skill tree switch together; see [kernel-specific skills](docs/kernels.md#kernel-specific-skills-and-guidance).
|
|
148
148
|
|
|
149
|
+
## Pasted images
|
|
150
|
+
|
|
151
|
+
Clipboard screenshots are attached when you submit the prompt. The model can inspect them on its first response without a separate `read` turn. Fabric recognizes Pi-generated `pi-clipboard-<uuid>` image files directly in the OS temporary directory and keeps `[Attached image: <path>]` as provenance. Existing image attachments are preserved and duplicate bytes are attached only once.
|
|
152
|
+
|
|
153
|
+
Native vision models receive the image directly. With [pi-vision-handoff](https://github.com/monotykamary/pi-vision-handoff), text-only models receive its description before their first request. Install the companion extension and configure a describer for that route; Fabric does not make its own vision-model calls.
|
|
154
|
+
|
|
155
|
+
This runs only for interactive input, including queued steering/follow-up prompts, not RPC or extension-injected text. Ordinary image paths, inline/fenced code, and arbitrary temporary files still require an explicit read. Missing, unsupported, oversized, or symlinked clipboard files stay as paths with a warning. Automatic attachments are limited to 8 images, 20 MiB per file and 32 MiB of raw image bytes per message; Pi applies its own normalization and model limits afterwards. Image handling loads only at first use, not at startup.
|
|
156
|
+
|
|
149
157
|
## Agent conversations
|
|
150
158
|
|
|
151
159
|
Press **↓** in an empty editor and **Enter** on an agent in the list at the bottom of the screen, or run **`/fabric chat <agent-id-or-name>`**, to open a live, full-screen child conversation with a multiline editor. Send steering or follow-ups directly, switch between nested agents, and return to Main without stopping its work. Drafts and scroll positions stay with each conversation. Completed one-shot agents are read-only; persistent actors accept further messages. Drag to select transcript text, use `/copy` or `/copy selection`, and type `/help` for the small set of preview-local commands with slash completion. See [focused conversations](docs/interface.md#focused-conversations) for controls and current limitations.
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
agentParticipantRecords,
|
|
9
9
|
loadModelUsage,
|
|
10
10
|
useBudgetLedger
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-Y5G7FIMS.js";
|
|
12
12
|
import {
|
|
13
13
|
cancelOrphanedChildQuestions,
|
|
14
14
|
routeChildQuestion
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
import {
|
|
37
37
|
parseFabricOwnedModelGuidance,
|
|
38
38
|
resolveFabricModelGuidance
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-MPFBOVOD.js";
|
|
40
40
|
import {
|
|
41
41
|
lifecycleSourceIdentity,
|
|
42
42
|
resolvePiModelSelector
|
|
@@ -840,4 +840,4 @@ export {
|
|
|
840
840
|
residentIdleDecision,
|
|
841
841
|
runResidentHostFromConfigPath
|
|
842
842
|
};
|
|
843
|
-
//# sourceMappingURL=chunk-
|
|
843
|
+
//# sourceMappingURL=chunk-2PGWCW3U.js.map
|
|
@@ -1807,6 +1807,60 @@ var expandSkillDirMarkersForRead = (content, args, cwd) => {
|
|
|
1807
1807
|
return expandSkillDirMarkers(content, path2.dirname(requestedPath));
|
|
1808
1808
|
};
|
|
1809
1809
|
|
|
1810
|
+
// src/verified/generated/execution.js
|
|
1811
|
+
function $n(v, what) {
|
|
1812
|
+
if (typeof v !== "number" || !Number.isSafeInteger(v) || v < 0) throw new RangeError(what + " must be a natural below 2^53, not " + v);
|
|
1813
|
+
return v;
|
|
1814
|
+
}
|
|
1815
|
+
var outputCeiling = /* @__PURE__ */ (() => {
|
|
1816
|
+
function init(params) {
|
|
1817
|
+
const env = {}, s = {};
|
|
1818
|
+
return { scalars: { "out.accepted": 0, "out.limit": 0 }, maps: {} };
|
|
1819
|
+
}
|
|
1820
|
+
function step(params, state, input) {
|
|
1821
|
+
const env = { "present": $n(input["present"], "input present"), "valid": $n(input["valid"], "input valid"), "requested": $n(input["requested"], "input requested"), "fallback": $n(input["fallback"], "input fallback") }, s = state.scalars, dft = { ...state.defaults }, maps = state.maps;
|
|
1822
|
+
if (!(env["present"] <= 1 && env["valid"] <= 1)) throw new RangeError("host output ceiling: the request fails the rule's assumption, so no proof covers the step it would take");
|
|
1823
|
+
const scalars = { ...s, "out.accepted": !(env["present"] === 1) || env["valid"] === 1 && 0 < env["requested"] ? 1 : 0, "out.limit": env["present"] === 1 && env["valid"] === 1 && 0 < env["requested"] ? env["requested"] : env["fallback"] };
|
|
1824
|
+
return Object.keys(dft).length ? { scalars, maps: state.maps, defaults: dft } : { scalars, maps: state.maps };
|
|
1825
|
+
}
|
|
1826
|
+
return { init, step };
|
|
1827
|
+
})();
|
|
1828
|
+
var humanWaitAdmission = /* @__PURE__ */ (() => {
|
|
1829
|
+
function init(params) {
|
|
1830
|
+
const env = {}, s = {};
|
|
1831
|
+
return { scalars: { "out.allowed": 0 }, maps: {} };
|
|
1832
|
+
}
|
|
1833
|
+
function step(params, state, input) {
|
|
1834
|
+
const env = { "available": $n(input["available"], "input available"), "hardDeadline": $n(input["hardDeadline"], "input hardDeadline") }, s = state.scalars, dft = { ...state.defaults }, maps = state.maps;
|
|
1835
|
+
if (!(env["available"] <= 1 && env["hardDeadline"] <= 1)) throw new RangeError("provider human wait admission: the request fails the rule's assumption, so no proof covers the step it would take");
|
|
1836
|
+
const scalars = { ...s, "out.allowed": env["available"] === 1 && !(env["hardDeadline"] === 1) ? 1 : 0 };
|
|
1837
|
+
return Object.keys(dft).length ? { scalars, maps: state.maps, defaults: dft } : { scalars, maps: state.maps };
|
|
1838
|
+
}
|
|
1839
|
+
return { init, step };
|
|
1840
|
+
})();
|
|
1841
|
+
|
|
1842
|
+
// src/verified/execution.ts
|
|
1843
|
+
var bit = (value) => value ? 1 : 0;
|
|
1844
|
+
var hostOutputCeiling = (requested, fallback, label) => {
|
|
1845
|
+
if (!Number.isSafeInteger(fallback) || fallback <= 0) throw new Error(`Invalid default for ${label}`);
|
|
1846
|
+
const valid = typeof requested === "number" && Number.isSafeInteger(requested) && requested > 0;
|
|
1847
|
+
const result = outputCeiling.step({}, outputCeiling.init({}), {
|
|
1848
|
+
present: bit(requested !== void 0 && requested !== null),
|
|
1849
|
+
valid: bit(valid),
|
|
1850
|
+
requested: valid ? requested : 0,
|
|
1851
|
+
fallback
|
|
1852
|
+
}).scalars;
|
|
1853
|
+
if (result["out.accepted"] !== 1) throw new Error(`${label} must be a positive safe integer`);
|
|
1854
|
+
return result["out.limit"];
|
|
1855
|
+
};
|
|
1856
|
+
var providerHumanWait = (callback, hardTimeoutMs) => {
|
|
1857
|
+
const result = humanWaitAdmission.step({}, humanWaitAdmission.init({}), {
|
|
1858
|
+
available: bit(callback !== void 0),
|
|
1859
|
+
hardDeadline: bit(hardTimeoutMs !== void 0)
|
|
1860
|
+
}).scalars;
|
|
1861
|
+
return result["out.allowed"] === 1 ? callback : void 0;
|
|
1862
|
+
};
|
|
1863
|
+
|
|
1810
1864
|
// src/agents/handoff-completion.ts
|
|
1811
1865
|
var HANDOFF_COMPLETION_MESSAGE_TYPE = "pi-fabric-handoff-complete";
|
|
1812
1866
|
var queueHandoffCompletion = (extension, args, result) => {
|
|
@@ -1869,9 +1923,11 @@ export {
|
|
|
1869
1923
|
createProviderComponent,
|
|
1870
1924
|
builtinModelGuidance,
|
|
1871
1925
|
PrewalkDriftTracker,
|
|
1926
|
+
hostOutputCeiling,
|
|
1927
|
+
providerHumanWait,
|
|
1872
1928
|
HANDOFF_COMPLETION_MESSAGE_TYPE,
|
|
1873
1929
|
queueHandoffCompletion,
|
|
1874
1930
|
captureLoadedFileIdentity,
|
|
1875
1931
|
runtimeIdentityStatus
|
|
1876
1932
|
};
|
|
1877
|
-
//# sourceMappingURL=chunk-
|
|
1933
|
+
//# sourceMappingURL=chunk-4OATUM7F.js.map
|