pi-fabric 0.130.2 → 0.131.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/dist/activity/store.d.ts +2 -1
- package/dist/activity/store.d.ts.map +1 -1
- package/dist/actors/directory.d.ts.map +1 -1
- package/dist/actors/global-registry.d.ts.map +1 -1
- package/dist/actors/manager.d.ts +4 -3
- package/dist/actors/manager.d.ts.map +1 -1
- package/dist/actors/mesh-monitor.d.ts +2 -0
- package/dist/actors/mesh-monitor.d.ts.map +1 -1
- package/dist/actors/name-policy.d.ts +3 -0
- package/dist/actors/name-policy.d.ts.map +1 -0
- package/dist/actors/registry-store.d.ts +1 -1
- package/dist/actors/registry-store.d.ts.map +1 -1
- package/dist/agents/agent-files.d.ts +8 -0
- package/dist/agents/agent-files.d.ts.map +1 -1
- package/dist/agents/agent-files.js +48 -3
- package/dist/agents/agent-files.js.map +2 -2
- package/dist/agents/child-skills.d.ts +60 -0
- package/dist/agents/child-skills.d.ts.map +1 -0
- package/dist/agents/child-skills.js +94 -0
- package/dist/agents/child-skills.js.map +7 -0
- package/dist/agents/clone-first-worktree.d.ts +6 -0
- package/dist/agents/clone-first-worktree.d.ts.map +1 -1
- package/dist/agents/cow-clone.d.ts.map +1 -1
- package/dist/agents/handoff.d.ts +12 -2
- package/dist/agents/handoff.d.ts.map +1 -1
- package/dist/agents/manager.d.ts +4 -1
- package/dist/agents/manager.d.ts.map +1 -1
- package/dist/agents/model-pin-guard.d.ts +27 -0
- package/dist/agents/model-pin-guard.d.ts.map +1 -0
- package/dist/agents/model-pin-guard.js +86 -0
- package/dist/agents/model-pin-guard.js.map +7 -0
- package/dist/agents/model-pin.d.ts +25 -0
- package/dist/agents/model-pin.d.ts.map +1 -0
- package/dist/agents/provider-bridge.d.ts +5 -4
- package/dist/agents/provider-bridge.d.ts.map +1 -1
- package/dist/agents/provider-bridge.js +32 -4
- package/dist/agents/provider-bridge.js.map +3 -3
- package/dist/agents/request.d.ts.map +1 -1
- package/dist/agents/service-schema.d.ts.map +1 -1
- package/dist/agents/types.d.ts +25 -0
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/agents/worktree-manager.d.ts.map +1 -1
- package/dist/agents.js +6 -5
- package/dist/agents.js.map +2 -2
- package/dist/audit/details.d.ts +4 -0
- package/dist/audit/details.d.ts.map +1 -1
- package/dist/chunks/{chunk-SBAROA4Y.js → chunk-2RWNVCFD.js} +17 -1
- package/dist/chunks/{chunk-SBAROA4Y.js.map → chunk-2RWNVCFD.js.map} +2 -2
- package/dist/chunks/{chunk-6O6UWMBO.js → chunk-36XQFTEN.js} +2 -2
- package/dist/chunks/chunk-3PKZSIRA.js +1312 -0
- package/dist/chunks/chunk-3PKZSIRA.js.map +7 -0
- package/dist/chunks/{chunk-JJXUOXI5.js → chunk-4KX6BIPL.js} +17 -2
- package/dist/chunks/chunk-4KX6BIPL.js.map +7 -0
- package/dist/chunks/{chunk-EYHTTMSM.js → chunk-4PBW54I2.js} +5 -5
- package/dist/chunks/{chunk-WTIF3MIM.js → chunk-56NMRVTV.js} +8 -8
- package/dist/chunks/{chunk-WQFG7ZVC.js → chunk-5BOTHX47.js} +48 -13
- package/dist/chunks/chunk-5BOTHX47.js.map +7 -0
- package/dist/chunks/chunk-5QJFDKPN.js +179 -0
- package/dist/chunks/chunk-5QJFDKPN.js.map +7 -0
- package/dist/chunks/chunk-6HO2IUQ5.js +104 -0
- package/dist/chunks/chunk-6HO2IUQ5.js.map +7 -0
- package/dist/chunks/{chunk-NF6W327N.js → chunk-7CIES6X2.js} +9 -2
- package/dist/chunks/chunk-7CIES6X2.js.map +7 -0
- package/dist/chunks/{chunk-KDX3762L.js → chunk-DGERP4VL.js} +4 -4
- package/dist/chunks/{chunk-K3ZWBUUL.js → chunk-IOGDTIGN.js} +13 -13
- package/dist/chunks/chunk-IOGDTIGN.js.map +7 -0
- package/dist/chunks/{chunk-UXIBKMUM.js → chunk-KIFOEBYJ.js} +4 -4
- package/dist/chunks/{chunk-D5224P2R.js → chunk-LKYLD5SN.js} +7 -7
- package/dist/chunks/chunk-NENQZCGW.js +45 -0
- package/dist/chunks/chunk-NENQZCGW.js.map +7 -0
- package/dist/chunks/{chunk-YTYLKL3Z.js → chunk-OJ4HAALD.js} +8 -8
- package/dist/chunks/{chunk-TBB7F7WS.js → chunk-PQVUMJ5J.js} +84 -18
- package/dist/chunks/chunk-PQVUMJ5J.js.map +7 -0
- package/dist/chunks/chunk-UD7LFV43.js +28 -0
- package/dist/chunks/chunk-UD7LFV43.js.map +7 -0
- package/dist/chunks/{chunk-CH2QMORW.js → chunk-UFMYN5TA.js} +2 -2
- package/dist/chunks/chunk-V4OW2ULC.js +422 -0
- package/dist/chunks/chunk-V4OW2ULC.js.map +7 -0
- package/dist/chunks/{chunk-6C2DMTQC.js → chunk-VNWQIGQL.js} +552 -145
- package/dist/chunks/chunk-VNWQIGQL.js.map +7 -0
- package/dist/chunks/{chunk-OA5SJT2T.js → chunk-WGMCNCP6.js} +183 -82
- package/dist/chunks/chunk-WGMCNCP6.js.map +7 -0
- package/dist/chunks/{chunk-HAHRJMWY.js → chunk-WWTGWGH7.js} +6 -6
- package/dist/chunks/{chunk-F4HL6KJR.js → chunk-X7QETPBC.js} +7 -7
- package/dist/chunks/{chunk-SSRSCT2M.js → chunk-XFOSUGLU.js} +4 -4
- package/dist/chunks/{chunk-4VGB6HMU.js → chunk-ZFWICFNJ.js} +23 -18
- package/dist/chunks/{chunk-4VGB6HMU.js.map → chunk-ZFWICFNJ.js.map} +2 -2
- package/dist/commands/fabric-handler.d.ts.map +1 -1
- package/dist/commands/fabric-handler.js +43 -7
- package/dist/commands/fabric-handler.js.map +2 -2
- package/dist/compaction/claim-events.js +2 -2
- package/dist/components/configuration.js +3 -3
- package/dist/config.d.ts +9 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/core/action-registry.js +4 -4
- package/dist/core/model-aliases.d.ts +22 -0
- package/dist/core/model-aliases.d.ts.map +1 -0
- package/dist/core/model-resolution.d.ts +41 -20
- package/dist/core/model-resolution.d.ts.map +1 -1
- package/dist/core/prompt-guidance.js +9 -4
- package/dist/core/prompt-guidance.js.map +2 -2
- package/dist/core/system-guidance.d.ts.map +1 -1
- package/dist/decisions/command.d.ts +2 -1
- package/dist/decisions/command.d.ts.map +1 -1
- package/dist/decisions/command.js +31 -11
- package/dist/decisions/command.js.map +2 -2
- package/dist/decisions/events.js +2 -1
- package/dist/decisions/events.js.map +1 -1
- package/dist/decisions/host.d.ts +8 -0
- package/dist/decisions/host.d.ts.map +1 -1
- package/dist/decisions/render.d.ts +44 -0
- package/dist/decisions/render.d.ts.map +1 -0
- package/dist/durable/agent.d.ts +6 -0
- package/dist/durable/agent.d.ts.map +1 -1
- package/dist/durable/worker-host.d.ts.map +1 -1
- package/dist/durable/worker-host.js +7 -1283
- package/dist/durable/worker-host.js.map +4 -4
- package/dist/durable/worker-options.d.ts +2 -0
- package/dist/durable/worker-options.d.ts.map +1 -1
- package/dist/durable/worker-role-seed.d.ts +82 -0
- package/dist/durable/worker-role-seed.d.ts.map +1 -0
- package/dist/durable/worker.js +10 -1
- package/dist/durable/worker.js.map +2 -2
- package/dist/durable-extension.d.ts +1 -1
- package/dist/durable-extension.js +1 -1
- package/dist/durable-extension.js.map +1 -1
- package/dist/durable-host.d.ts +8 -0
- package/dist/durable-host.d.ts.map +1 -0
- package/dist/durable-host.js +20 -0
- package/dist/durable-host.js.map +7 -0
- package/dist/entropy/index.js +1 -1
- package/dist/execution-service.d.ts.map +1 -1
- package/dist/extension-bootstrap.d.ts.map +1 -1
- package/dist/extension-bootstrap.js +16 -16
- package/dist/extension.d.ts.map +1 -1
- package/dist/fabric-exec-tool.d.ts.map +1 -1
- package/dist/fabric-runtime-state.d.ts +2 -0
- package/dist/fabric-runtime-state.d.ts.map +1 -1
- package/dist/fabric-runtime-state.js +203 -124
- package/dist/fabric-runtime-state.js.map +2 -2
- package/dist/fabric-state.d.ts +26 -1
- package/dist/fabric-state.d.ts.map +1 -1
- package/dist/index.js +20 -16
- package/dist/index.js.map +1 -1
- package/dist/jev/client.js +2 -2
- package/dist/jev/observation.js +3 -3
- package/dist/jev.js +7 -7
- package/dist/protocol.d.ts +84 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +5 -1
- package/dist/providers/agents-actions.d.ts.map +1 -1
- package/dist/providers/agents-provider.d.ts +3 -0
- package/dist/providers/agents-provider.d.ts.map +1 -1
- package/dist/providers/jev-provider.js +7 -7
- package/dist/residency/host.d.ts.map +1 -1
- package/dist/residency/host.js +13 -10
- package/dist/residency/pi-entry.js +13 -10
- package/dist/residency/pi-entry.js.map +1 -1
- package/dist/runtime/core-override-guest-types.js +2 -2
- package/dist/runtime/cpython-runtime.js +3 -3
- package/dist/runtime/exec-journal.js +3 -3
- 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 +6 -6
- package/dist/runtime/node-process-runtime.js +5 -5
- package/dist/runtime/quickjs-runtime.js +3 -3
- package/dist/runtime/typescript-kernel.js +11 -11
- package/dist/storage/retention.d.ts.map +1 -1
- package/dist/type-error-guidance.js +1 -1
- package/dist/ui/conversation-chrome.js +2 -2
- package/dist/ui/conversation.js +10 -10
- package/dist/ui/dashboard.d.ts.map +1 -1
- package/dist/ui/dashboard.js +14 -12
- package/dist/ui/dashboard.js.map +2 -2
- package/dist/ui/settings-sections-presentation.d.ts.map +1 -1
- package/dist/ui/settings.js +12 -9
- package/dist/ui/settings.js.map +2 -2
- package/dist/ui/widget.d.ts.map +1 -1
- package/dist/verified/generated/actor-name.d.ts +4 -0
- package/dist/verified/generated/actor-name.js +17 -0
- package/dist/verified/generated/manifest.json +11 -3
- package/dist/worker/options.d.ts.map +1 -1
- package/dist/worker/options.js +20 -0
- package/dist/worker/options.js.map +2 -2
- package/dist/worker.js +57 -8
- package/dist/worker.js.map +2 -2
- package/docs/actor-name-policy-handoff.md +5 -0
- package/docs/agents.md +64 -5
- package/docs/audit-trace.md +2 -1
- package/docs/components.md +1 -1
- package/docs/configuration.md +7 -4
- package/docs/decisions.md +47 -2
- package/docs/durable-pi.md +162 -2
- package/docs/interface.md +1 -1
- package/docs/providers.md +1 -1
- package/docs/verified-kernels.md +1 -0
- package/package.json +5 -1
- package/proofs/actor-name.ts +27 -0
- package/proofs/index.ts +2 -0
- package/scripts/verified-kernels.ts +1 -1
- package/skillsets/python/fabric-exec/references/agents.md +6 -4
- package/skillsets/typescript/fabric-exec/references/agents.md +6 -3
- package/dist/chunks/chunk-6C2DMTQC.js.map +0 -7
- package/dist/chunks/chunk-JJXUOXI5.js.map +0 -7
- package/dist/chunks/chunk-K3ZWBUUL.js.map +0 -7
- package/dist/chunks/chunk-KJZAOENY.js +0 -212
- package/dist/chunks/chunk-KJZAOENY.js.map +0 -7
- package/dist/chunks/chunk-NF6W327N.js.map +0 -7
- package/dist/chunks/chunk-OA5SJT2T.js.map +0 -7
- package/dist/chunks/chunk-TBB7F7WS.js.map +0 -7
- package/dist/chunks/chunk-WQFG7ZVC.js.map +0 -7
- package/dist/chunks/chunk-ZLNJDTCN.js +0 -226
- package/dist/chunks/chunk-ZLNJDTCN.js.map +0 -7
- /package/dist/chunks/{chunk-6O6UWMBO.js.map → chunk-36XQFTEN.js.map} +0 -0
- /package/dist/chunks/{chunk-EYHTTMSM.js.map → chunk-4PBW54I2.js.map} +0 -0
- /package/dist/chunks/{chunk-WTIF3MIM.js.map → chunk-56NMRVTV.js.map} +0 -0
- /package/dist/chunks/{chunk-KDX3762L.js.map → chunk-DGERP4VL.js.map} +0 -0
- /package/dist/chunks/{chunk-UXIBKMUM.js.map → chunk-KIFOEBYJ.js.map} +0 -0
- /package/dist/chunks/{chunk-D5224P2R.js.map → chunk-LKYLD5SN.js.map} +0 -0
- /package/dist/chunks/{chunk-YTYLKL3Z.js.map → chunk-OJ4HAALD.js.map} +0 -0
- /package/dist/chunks/{chunk-CH2QMORW.js.map → chunk-UFMYN5TA.js.map} +0 -0
- /package/dist/chunks/{chunk-HAHRJMWY.js.map → chunk-WWTGWGH7.js.map} +0 -0
- /package/dist/chunks/{chunk-F4HL6KJR.js.map → chunk-X7QETPBC.js.map} +0 -0
- /package/dist/chunks/{chunk-SSRSCT2M.js.map → chunk-XFOSUGLU.js.map} +0 -0
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
diffLineNumberWidth,
|
|
3
|
-
formatDiffLineNumber,
|
|
4
|
-
parseDiffLine
|
|
5
|
-
} from "./chunk-F2LGSRIN.js";
|
|
6
1
|
import {
|
|
7
2
|
ansi256ToRgb,
|
|
8
3
|
effectiveShikiThemeIsLight,
|
|
@@ -14,6 +9,11 @@ import {
|
|
|
14
9
|
observedThemeVariant,
|
|
15
10
|
shikiLanguages
|
|
16
11
|
} from "./chunk-QNMQJNXE.js";
|
|
12
|
+
import {
|
|
13
|
+
diffLineNumberWidth,
|
|
14
|
+
formatDiffLineNumber,
|
|
15
|
+
parseDiffLine
|
|
16
|
+
} from "./chunk-F2LGSRIN.js";
|
|
17
17
|
import {
|
|
18
18
|
countContentLines,
|
|
19
19
|
headlineArg,
|
|
@@ -2614,4 +2614,4 @@ export {
|
|
|
2614
2614
|
formatJsonAsYaml,
|
|
2615
2615
|
formatFabricValue
|
|
2616
2616
|
};
|
|
2617
|
-
//# sourceMappingURL=chunk-
|
|
2617
|
+
//# sourceMappingURL=chunk-WWTGWGH7.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
JevClient,
|
|
3
3
|
JevCredentials
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KIFOEBYJ.js";
|
|
5
5
|
import {
|
|
6
6
|
checkObserve,
|
|
7
7
|
jevObserveSchema
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XFOSUGLU.js";
|
|
9
9
|
import {
|
|
10
10
|
JevBilledError,
|
|
11
11
|
checkSchema,
|
|
@@ -20,10 +20,7 @@ import {
|
|
|
20
20
|
ApprovalController,
|
|
21
21
|
FabricAutoApprovalClassifier,
|
|
22
22
|
FabricSessionApprovals
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import {
|
|
25
|
-
runAbortable
|
|
26
|
-
} from "./chunk-7TB7NXSL.js";
|
|
23
|
+
} from "./chunk-4PBW54I2.js";
|
|
27
24
|
import {
|
|
28
25
|
DECISION_APIS,
|
|
29
26
|
DECISION_MAX_BYTES
|
|
@@ -31,6 +28,9 @@ import {
|
|
|
31
28
|
import {
|
|
32
29
|
resolveJevModelRoute
|
|
33
30
|
} from "./chunk-G54PEZ44.js";
|
|
31
|
+
import {
|
|
32
|
+
runAbortable
|
|
33
|
+
} from "./chunk-7TB7NXSL.js";
|
|
34
34
|
|
|
35
35
|
// src/providers/jev-provider.ts
|
|
36
36
|
import { Type as Type2 } from "typebox";
|
|
@@ -867,4 +867,4 @@ export {
|
|
|
867
867
|
JEV_ACTION_DESCRIPTORS,
|
|
868
868
|
JevProvider
|
|
869
869
|
};
|
|
870
|
-
//# sourceMappingURL=chunk-
|
|
870
|
+
//# sourceMappingURL=chunk-X7QETPBC.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
prepareFabricActorHostPayload
|
|
3
|
-
} from "./chunk-4XMXFHAR.js";
|
|
4
1
|
import {
|
|
5
2
|
object
|
|
6
3
|
} from "./chunk-FSYAGCGA.js";
|
|
4
|
+
import {
|
|
5
|
+
prepareFabricActorHostPayload
|
|
6
|
+
} from "./chunk-4XMXFHAR.js";
|
|
7
7
|
import {
|
|
8
8
|
validationMessage
|
|
9
9
|
} from "./chunk-7N7IC3Z2.js";
|
|
@@ -283,4 +283,4 @@ export {
|
|
|
283
283
|
JevObservationHost,
|
|
284
284
|
JevSubscription
|
|
285
285
|
};
|
|
286
|
-
//# sourceMappingURL=chunk-
|
|
286
|
+
//# sourceMappingURL=chunk-XFOSUGLU.js.map
|
|
@@ -790,15 +790,16 @@ var labelForCall = (ref, args) => {
|
|
|
790
790
|
const target = headlineArg(args, MAX_NAME_CHARS);
|
|
791
791
|
return target ? `${ref} \xB7 ${target}` : ref;
|
|
792
792
|
};
|
|
793
|
+
var finiteCount = (value) => typeof value === "number" && Number.isFinite(value) ? Math.max(0, value) : void 0;
|
|
793
794
|
var metricsFrom = (value) => {
|
|
794
795
|
if (typeof value !== "object" || value === null || Array.isArray(value)) return void 0;
|
|
795
796
|
const record = value;
|
|
796
797
|
const usage = typeof record.usage === "object" && record.usage !== null && !Array.isArray(record.usage) ? record.usage : void 0;
|
|
797
|
-
const input =
|
|
798
|
-
const output =
|
|
798
|
+
const input = finiteCount(usage?.input) ?? 0;
|
|
799
|
+
const output = finiteCount(usage?.output) ?? 0;
|
|
799
800
|
const tokens = input + output;
|
|
800
|
-
const toolCalls =
|
|
801
|
-
const cost =
|
|
801
|
+
const toolCalls = finiteCount(record.toolCalls);
|
|
802
|
+
const cost = finiteCount(usage?.cost);
|
|
802
803
|
if (tokens <= 0 && toolCalls === void 0 && cost === void 0) return void 0;
|
|
803
804
|
return {
|
|
804
805
|
...tokens > 0 ? { tokens } : {},
|
|
@@ -806,10 +807,11 @@ var metricsFrom = (value) => {
|
|
|
806
807
|
...cost !== void 0 ? { cost } : {}
|
|
807
808
|
};
|
|
808
809
|
};
|
|
809
|
-
var
|
|
810
|
-
if (typeof value !== "object" || value === null || Array.isArray(value)) return
|
|
810
|
+
var resultStatus = (value) => {
|
|
811
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) return void 0;
|
|
811
812
|
const status = value.status;
|
|
812
|
-
|
|
813
|
+
if (status === "stopped") return "stopped";
|
|
814
|
+
return status === "failed" || status === "timed_out" ? "failed" : void 0;
|
|
813
815
|
};
|
|
814
816
|
var freezeProjection = (value) => {
|
|
815
817
|
const pending = [value];
|
|
@@ -965,8 +967,8 @@ var FabricActivityStore = class {
|
|
|
965
967
|
const label = cleanText(input.label, MAX_NAME_CHARS);
|
|
966
968
|
if (!label) throw new Error("Workflow activity item label must not be empty");
|
|
967
969
|
const now = Date.now();
|
|
968
|
-
const status = input.status ?? "running";
|
|
969
970
|
let item = run.items.find((candidate) => candidate.id === id);
|
|
971
|
+
const status = input.status ?? item?.status ?? "running";
|
|
970
972
|
const phaseId = input.phase !== void 0 ? this.#resolvePhaseId(run, input.phase) : item?.phaseId ?? run.currentPhaseId;
|
|
971
973
|
const detail = cleanText(input.detail, MAX_DETAIL_CHARS);
|
|
972
974
|
const current = cleanText(input.current, MAX_DETAIL_CHARS);
|
|
@@ -1101,16 +1103,19 @@ var FabricActivityStore = class {
|
|
|
1101
1103
|
const message = cleanText(update.message, MAX_DETAIL_CHARS);
|
|
1102
1104
|
if (message) call.progress = message;
|
|
1103
1105
|
} else if (update.type === "entity") {
|
|
1104
|
-
call.entityId = cleanId(update.id, update.id);
|
|
1106
|
+
call.entityId = cleanId(update.id, update.id.slice(0, 160));
|
|
1105
1107
|
call.entityKind = update.kind;
|
|
1106
1108
|
const name = cleanText(update.name, MAX_NAME_CHARS);
|
|
1107
1109
|
if (name) call.label = name;
|
|
1108
1110
|
} else if (update.type === "metrics") {
|
|
1111
|
+
const tokens = finiteCount(update.tokens);
|
|
1112
|
+
const toolCalls = finiteCount(update.toolCalls);
|
|
1113
|
+
const cost = finiteCount(update.cost);
|
|
1109
1114
|
call.metrics = {
|
|
1110
1115
|
...call.metrics ?? {},
|
|
1111
|
-
...
|
|
1112
|
-
...
|
|
1113
|
-
...
|
|
1116
|
+
...tokens !== void 0 ? { tokens } : {},
|
|
1117
|
+
...toolCalls !== void 0 ? { toolCalls } : {},
|
|
1118
|
+
...cost !== void 0 ? { cost } : {}
|
|
1114
1119
|
};
|
|
1115
1120
|
}
|
|
1116
1121
|
if (before.progress === call.progress && before.entityId === call.entityId && before.entityKind === call.entityKind && before.label === call.label && Object.is(before.metrics?.tokens, call.metrics?.tokens) && Object.is(before.metrics?.toolCalls, call.metrics?.toolCalls) && Object.is(before.metrics?.cost, call.metrics?.cost)) {
|
|
@@ -1128,8 +1133,8 @@ var FabricActivityStore = class {
|
|
|
1128
1133
|
const call = this.#callIndex.get(runId)?.get(callId);
|
|
1129
1134
|
if (!call) return;
|
|
1130
1135
|
const now = Date.now();
|
|
1131
|
-
const
|
|
1132
|
-
call.status = input.success
|
|
1136
|
+
const reported = resultStatus(input.result);
|
|
1137
|
+
call.status = !input.success ? "failed" : reported ?? "completed";
|
|
1133
1138
|
call.updatedAt = now;
|
|
1134
1139
|
call.finishedAt = now;
|
|
1135
1140
|
const error = cleanText(input.error, MAX_DETAIL_CHARS);
|
|
@@ -1148,7 +1153,7 @@ var FabricActivityStore = class {
|
|
|
1148
1153
|
}
|
|
1149
1154
|
if (typeof input.result === "object" && input.result !== null && !Array.isArray(input.result)) {
|
|
1150
1155
|
const record = input.result;
|
|
1151
|
-
if (typeof record.id === "string") call.entityId = cleanId(record.id, record.id);
|
|
1156
|
+
if (typeof record.id === "string") call.entityId = cleanId(record.id, record.id.slice(0, 160));
|
|
1152
1157
|
if (call.kind === "agent") call.entityKind = "agent";
|
|
1153
1158
|
if (call.kind === "actor") call.entityKind = "actor";
|
|
1154
1159
|
if (!error && typeof record.error === "string") {
|
|
@@ -1159,11 +1164,11 @@ var FabricActivityStore = class {
|
|
|
1159
1164
|
run.updatedAt = now;
|
|
1160
1165
|
this.#emit(run, call);
|
|
1161
1166
|
}
|
|
1162
|
-
|
|
1167
|
+
/** `cancelled` comes from the caller's abort signal, never from error text. */
|
|
1168
|
+
finish(runId, success, error, cancelled = false) {
|
|
1163
1169
|
const run = this.#runs.get(runId);
|
|
1164
1170
|
if (!run || run.status !== "running") return;
|
|
1165
1171
|
const now = Date.now();
|
|
1166
|
-
const cancelled = Boolean(error && /cancel(?:led|ed)/i.test(error));
|
|
1167
1172
|
run.status = success ? "completed" : cancelled ? "cancelled" : "failed";
|
|
1168
1173
|
run.updatedAt = now;
|
|
1169
1174
|
run.finishedAt = now;
|
|
@@ -1845,4 +1850,4 @@ export {
|
|
|
1845
1850
|
captureLoadedFileIdentity,
|
|
1846
1851
|
runtimeIdentityStatus
|
|
1847
1852
|
};
|
|
1848
|
-
//# sourceMappingURL=chunk-
|
|
1853
|
+
//# sourceMappingURL=chunk-ZFWICFNJ.js.map
|