@e4779/pi-fabric 0.97.0-fork.13 → 0.100.0-fork.15
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/THIRD_PARTY_NOTICES.md +5 -4
- package/dist/agents/manager.d.ts.map +1 -1
- package/dist/agents/request.d.ts.map +1 -1
- package/dist/agents/types.d.ts +4 -0
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/agents.js +3 -3
- package/dist/chunks/{chunk-JCV54SSP.js → chunk-27ORW5EK.js} +41 -22
- package/dist/chunks/chunk-27ORW5EK.js.map +7 -0
- package/dist/chunks/{chunk-EQIGYLVB.js → chunk-3RFEMOJA.js} +9 -3
- package/dist/chunks/chunk-3RFEMOJA.js.map +7 -0
- package/dist/chunks/{chunk-D5GNTBV6.js → chunk-7HQKBGTL.js} +2 -2
- package/dist/chunks/{chunk-LNLQ2LX3.js → chunk-ASU53MOT.js} +2 -2
- package/dist/chunks/{chunk-V3PIO7QL.js → chunk-BUQZBG6O.js} +3 -43
- package/dist/chunks/chunk-BUQZBG6O.js.map +7 -0
- package/dist/chunks/{chunk-6K5SRGW6.js → chunk-C2DIKAOE.js} +4 -4
- package/dist/chunks/{chunk-FJSHRHOR.js → chunk-CPSPZGK4.js} +6 -6
- package/dist/chunks/{chunk-UBPFGMDQ.js → chunk-CXQF35XB.js} +4 -4
- package/dist/chunks/{chunk-3SIXBW6A.js → chunk-H4YYLQTX.js} +2 -2
- package/dist/chunks/{chunk-CSJSHBAT.js → chunk-I5VN6D5T.js} +48 -21
- package/dist/chunks/chunk-I5VN6D5T.js.map +7 -0
- package/dist/chunks/{chunk-VRYEGVHR.js → chunk-J7ZQERKA.js} +11 -8
- package/dist/chunks/chunk-J7ZQERKA.js.map +7 -0
- package/dist/chunks/{chunk-D4B4CCTA.js → chunk-JHQDS6YP.js} +2 -2
- package/dist/chunks/{chunk-OINADFEF.js → chunk-JWWGWUP7.js} +5 -5
- package/dist/chunks/{chunk-WXSELMFV.js → chunk-KFPUVFDS.js} +5 -5
- package/dist/chunks/{chunk-EPAFGT2M.js → chunk-LH2PGXSZ.js} +5 -1
- package/dist/chunks/{chunk-EPAFGT2M.js.map → chunk-LH2PGXSZ.js.map} +2 -2
- package/dist/chunks/{chunk-X3IRR7CV.js → chunk-M25A5R3F.js} +2 -2
- package/dist/chunks/chunk-MNTJX4U7.js +760 -0
- package/dist/chunks/chunk-MNTJX4U7.js.map +7 -0
- package/dist/chunks/{chunk-754HA6KO.js → chunk-NRLDV5R3.js} +7 -2
- package/dist/chunks/chunk-NRLDV5R3.js.map +7 -0
- package/dist/chunks/chunk-O4A5UOXU.js +44 -0
- package/dist/chunks/chunk-O4A5UOXU.js.map +7 -0
- package/dist/chunks/{chunk-4F27LJTS.js → chunk-OEJ6RFDO.js} +255 -72
- package/dist/chunks/chunk-OEJ6RFDO.js.map +7 -0
- package/dist/chunks/{chunk-VQGO4P7C.js → chunk-QIW7QMFI.js} +2 -2
- package/dist/chunks/{chunk-B4HECUJI.js → chunk-RUEKYUNR.js} +2 -2
- package/dist/chunks/{chunk-A4XPJESK.js → chunk-RZHXYLOY.js} +2 -2
- package/dist/chunks/{chunk-QNMMQAZ7.js → chunk-SDDBEBM4.js} +3 -3
- package/dist/chunks/{chunk-2LBC6TTP.js → chunk-UGMLWBVF.js} +390 -228
- package/dist/chunks/chunk-UGMLWBVF.js.map +7 -0
- package/dist/chunks/{chunk-5WUW727L.js → chunk-VGQ2IE7P.js} +19 -3
- package/dist/chunks/chunk-VGQ2IE7P.js.map +7 -0
- package/dist/chunks/{chunk-KBHITFTO.js → chunk-VRAGOMN4.js} +3 -1
- package/dist/chunks/chunk-VRAGOMN4.js.map +7 -0
- package/dist/chunks/{chunk-F676L43O.js → chunk-WK25T5ST.js} +11 -11
- package/dist/chunks/{chunk-IPHEM6RY.js → chunk-WQB6CVES.js} +2 -2
- package/dist/chunks/{chunk-CZSX6UG6.js → chunk-XYFOKDFM.js} +2 -2
- package/dist/chunks/{chunk-G2F2RDZI.js → chunk-YAPDV6LO.js} +2 -2
- package/dist/chunks/{chunk-Q5BMTL6A.js → chunk-YIEK7FH2.js} +4 -4
- package/dist/chunks/{chunk-KS44WKJJ.js → chunk-Z45SUO4B.js} +2 -2
- package/dist/commands/fabric.d.ts.map +1 -1
- package/dist/compaction/hook.js +6 -6
- package/dist/components/builtin-guidance.d.ts +4 -0
- package/dist/components/builtin-guidance.d.ts.map +1 -0
- package/dist/components/configuration.js +2 -2
- package/dist/config.d.ts +7 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/core/action-registry.js +7 -7
- package/dist/core/file-lock.d.ts +4 -0
- package/dist/core/file-lock.d.ts.map +1 -1
- package/dist/core/provider-operations.js +162 -51
- package/dist/core/provider-operations.js.map +2 -2
- package/dist/core/shell-timing.d.ts +11 -0
- package/dist/core/shell-timing.d.ts.map +1 -0
- package/dist/entropy/index.js +12 -10
- package/dist/entropy/pool-store.d.ts +3 -1
- package/dist/entropy/pool-store.d.ts.map +1 -1
- package/dist/fabric-runtime-state.d.ts.map +1 -1
- package/dist/fabric-runtime-state.js +138 -55
- 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 +125 -58
- package/dist/index.js.map +3 -3
- package/dist/jev/observation.js +5 -5
- package/dist/jev.js +8 -8
- package/dist/lifecycle/broker.d.ts.map +1 -1
- package/dist/memory/digest.js +2 -2
- package/dist/memory/discovery.js +6 -6
- package/dist/memory/file-worker.js +9 -9
- package/dist/memory/normalize.js +5 -5
- package/dist/memory/search.js +7 -7
- package/dist/memory/worker-provider.js +10 -10
- package/dist/memory.js +10 -10
- package/dist/prewalk/messages.d.ts +1 -1
- package/dist/prewalk/messages.d.ts.map +1 -1
- package/dist/protocol.d.ts +12 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +3 -1
- package/dist/providers/agents-actions.d.ts.map +1 -1
- package/dist/providers/agents-message-router.d.ts.map +1 -1
- package/dist/providers/agents-provider.d.ts.map +1 -1
- package/dist/providers/jev-provider.js +8 -8
- package/dist/providers/memory-provider.js +9 -9
- package/dist/providers/prewalk-provider.d.ts +3 -3
- package/dist/providers/prewalk-provider.d.ts.map +1 -1
- package/dist/residency/host.js +9 -9
- package/dist/residency/pi-entry.js +9 -9
- 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 +1 -1
- package/dist/runtime/typescript-kernel.js +2 -2
- package/dist/ui/conversation.d.ts +2 -1
- package/dist/ui/conversation.d.ts.map +1 -1
- package/dist/ui/conversation.js +41 -37
- package/dist/ui/conversation.js.map +2 -2
- package/dist/ui/dashboard.js +10 -8
- package/dist/ui/dashboard.js.map +1 -1
- package/dist/ui/fabric-model-selector.d.ts +3 -0
- package/dist/ui/fabric-model-selector.d.ts.map +1 -1
- package/dist/ui/settings.d.ts.map +1 -1
- package/dist/ui/settings.js +15 -2
- package/dist/ui/settings.js.map +2 -2
- package/dist/ui/shell-tasks.d.ts +2 -1
- package/dist/ui/shell-tasks.d.ts.map +1 -1
- package/dist/ui/shell-tasks.js +169 -81
- package/dist/ui/shell-tasks.js.map +3 -3
- package/dist/ui/snapshot.d.ts.map +1 -1
- package/dist/ui/structured.d.ts.map +1 -1
- package/dist/ui/widget.d.ts.map +1 -1
- package/dist/verified/generated/authority-kernel.js +188 -81
- package/dist/verified/generated/kernel.js +547 -265
- package/dist/verified/generated/lifecycle-kernel.d.ts +1 -1
- package/dist/verified/generated/lifecycle-kernel.js +172 -125
- package/dist/verified/generated/manifest.json +11 -11
- package/dist/verified/generated/provider-kernel.js +160 -52
- package/dist/verified/generated/storage-kernel.js +238 -69
- package/dist/worker/model-control.d.ts +1 -1
- package/dist/worker/model-control.d.ts.map +1 -1
- package/dist/worker/model-control.js +6 -3
- package/dist/worker/model-control.js.map +2 -2
- package/dist/worker/options.d.ts.map +1 -1
- package/dist/worker/options.js +15 -0
- package/dist/worker/options.js.map +2 -2
- package/dist/worker.js +3 -2
- package/dist/worker.js.map +2 -2
- package/docs/agents.md +1 -1
- package/docs/background-tasks.md +33 -0
- package/docs/configuration.md +4 -2
- package/docs/entropy.md +13 -0
- package/docs/harnesses.md +1 -1
- package/docs/interface.md +2 -0
- package/docs/jev.md +1 -1
- package/docs/prompt-cache.md +3 -3
- package/docs/provider-capabilities.md +1 -1
- package/docs/verified-kernels.md +10 -6
- package/package.json +1 -1
- package/proofs/lifecycle-spec.bend +4 -4
- package/proofs/lifecycle-types.d.ts +1 -1
- package/proofs/lifecycle.bend +6 -6
- package/scripts/test-verified-kernels.mjs +3 -3
- package/scripts/verified-kernels.mjs +53 -13
- package/skillsets/typescript/fabric-exec/references/agents.md +2 -0
- package/dist/chunks/chunk-2LBC6TTP.js.map +0 -7
- package/dist/chunks/chunk-4E63LJDD.js +0 -468
- package/dist/chunks/chunk-4E63LJDD.js.map +0 -7
- package/dist/chunks/chunk-4F27LJTS.js.map +0 -7
- package/dist/chunks/chunk-5WUW727L.js.map +0 -7
- package/dist/chunks/chunk-754HA6KO.js.map +0 -7
- package/dist/chunks/chunk-CSJSHBAT.js.map +0 -7
- package/dist/chunks/chunk-EQIGYLVB.js.map +0 -7
- package/dist/chunks/chunk-JCV54SSP.js.map +0 -7
- package/dist/chunks/chunk-KBHITFTO.js.map +0 -7
- package/dist/chunks/chunk-V3PIO7QL.js.map +0 -7
- package/dist/chunks/chunk-VRYEGVHR.js.map +0 -7
- /package/dist/chunks/{chunk-D5GNTBV6.js.map → chunk-7HQKBGTL.js.map} +0 -0
- /package/dist/chunks/{chunk-LNLQ2LX3.js.map → chunk-ASU53MOT.js.map} +0 -0
- /package/dist/chunks/{chunk-6K5SRGW6.js.map → chunk-C2DIKAOE.js.map} +0 -0
- /package/dist/chunks/{chunk-FJSHRHOR.js.map → chunk-CPSPZGK4.js.map} +0 -0
- /package/dist/chunks/{chunk-UBPFGMDQ.js.map → chunk-CXQF35XB.js.map} +0 -0
- /package/dist/chunks/{chunk-3SIXBW6A.js.map → chunk-H4YYLQTX.js.map} +0 -0
- /package/dist/chunks/{chunk-D4B4CCTA.js.map → chunk-JHQDS6YP.js.map} +0 -0
- /package/dist/chunks/{chunk-OINADFEF.js.map → chunk-JWWGWUP7.js.map} +0 -0
- /package/dist/chunks/{chunk-WXSELMFV.js.map → chunk-KFPUVFDS.js.map} +0 -0
- /package/dist/chunks/{chunk-X3IRR7CV.js.map → chunk-M25A5R3F.js.map} +0 -0
- /package/dist/chunks/{chunk-VQGO4P7C.js.map → chunk-QIW7QMFI.js.map} +0 -0
- /package/dist/chunks/{chunk-B4HECUJI.js.map → chunk-RUEKYUNR.js.map} +0 -0
- /package/dist/chunks/{chunk-A4XPJESK.js.map → chunk-RZHXYLOY.js.map} +0 -0
- /package/dist/chunks/{chunk-QNMMQAZ7.js.map → chunk-SDDBEBM4.js.map} +0 -0
- /package/dist/chunks/{chunk-F676L43O.js.map → chunk-WK25T5ST.js.map} +0 -0
- /package/dist/chunks/{chunk-IPHEM6RY.js.map → chunk-WQB6CVES.js.map} +0 -0
- /package/dist/chunks/{chunk-CZSX6UG6.js.map → chunk-XYFOKDFM.js.map} +0 -0
- /package/dist/chunks/{chunk-G2F2RDZI.js.map → chunk-YAPDV6LO.js.map} +0 -0
- /package/dist/chunks/{chunk-Q5BMTL6A.js.map → chunk-YIEK7FH2.js.map} +0 -0
- /package/dist/chunks/{chunk-KS44WKJJ.js.map → chunk-Z45SUO4B.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fabric-state.d.ts","sourceRoot":"","sources":["../src/fabric-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAGpE,OAAO,EAAE,mBAA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AI;IAYP,YAAY,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;IA0B7C,aAAa,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,gBAAgB,GAAG,IAAI;IAkBtE,YAAY,CAAC,OAAO,EAAE,gBAAgB,GAAG;QACvC,IAAI,EAAE,gBAAgB,CAAC;QACvB,MAAM,EAAE,QAAQ,GAAG,kBAAkB,CAAC;QACtC,eAAe,EAAE,MAAM,CAAC;KACzB;IAuBK,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAqIhC"}
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EAEb,MAAM,iCAAiC,CAAC;AAoKzC,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAC7C,YAAY,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAElE,wBAA8B,QAAQ,CAAC,EAAE,EAAE,YAAY,EAAE,OAAO,GAAE;IAAE,WAAW,CAAC,EAAE,wBAAwB,CAAA;CAAO,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EAEb,MAAM,iCAAiC,CAAC;AAoKzC,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAC7C,YAAY,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAElE,wBAA8B,QAAQ,CAAC,EAAE,EAAE,YAAY,EAAE,OAAO,GAAE;IAAE,WAAW,CAAC,EAAE,wBAAwB,CAAA;CAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAozBhI;AAED,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {
|
|
2
|
-
animationFitsViewport,
|
|
3
2
|
arcItemStyled,
|
|
4
3
|
captureFabricAgentPreviews,
|
|
5
4
|
captureFabricCallHeadlinePreviews,
|
|
@@ -16,7 +15,6 @@ import {
|
|
|
16
15
|
modelReadHint,
|
|
17
16
|
nestedCallBody,
|
|
18
17
|
nestedCallTitle,
|
|
19
|
-
observeAnimationRows,
|
|
20
18
|
renderAgentToolPreviewLines,
|
|
21
19
|
renderBoundedLines,
|
|
22
20
|
renderCoreToolBody,
|
|
@@ -28,10 +26,20 @@ import {
|
|
|
28
26
|
restoreFabricWritePreviews,
|
|
29
27
|
restoreLegacyBashCommands,
|
|
30
28
|
safeTerminalText,
|
|
31
|
-
singleCallProgressLine
|
|
29
|
+
singleCallProgressLine
|
|
30
|
+
} from "./chunks/chunk-BUQZBG6O.js";
|
|
31
|
+
import {
|
|
32
|
+
FabricModelSelector
|
|
33
|
+
} from "./chunks/chunk-J7ZQERKA.js";
|
|
34
|
+
import {
|
|
35
|
+
buildModelSource
|
|
36
|
+
} from "./chunks/chunk-CQFP2RCP.js";
|
|
37
|
+
import {
|
|
38
|
+
animationFitsViewport,
|
|
39
|
+
observeAnimationRows,
|
|
32
40
|
spinnerFrame,
|
|
33
41
|
updateSpinner
|
|
34
|
-
} from "./chunks/chunk-
|
|
42
|
+
} from "./chunks/chunk-O4A5UOXU.js";
|
|
35
43
|
import {
|
|
36
44
|
configureHighlighting,
|
|
37
45
|
highlightCode,
|
|
@@ -61,6 +69,7 @@ import {
|
|
|
61
69
|
PREWALK_CONTINUE_MESSAGE_TYPE,
|
|
62
70
|
PrewalkController,
|
|
63
71
|
PrewalkDriftTracker,
|
|
72
|
+
builtinModelGuidance,
|
|
64
73
|
captureLoadedFileIdentity,
|
|
65
74
|
createProviderComponent,
|
|
66
75
|
expandSkillDirMarkersForRead,
|
|
@@ -73,7 +82,7 @@ import {
|
|
|
73
82
|
resolveFabricIdentity,
|
|
74
83
|
setModelSafely,
|
|
75
84
|
withTrajectoryRearmDirective
|
|
76
|
-
} from "./chunks/chunk-
|
|
85
|
+
} from "./chunks/chunk-VGQ2IE7P.js";
|
|
77
86
|
import {
|
|
78
87
|
AgentTranscriptReader,
|
|
79
88
|
countNewlines,
|
|
@@ -83,7 +92,7 @@ import "./chunks/chunk-DLXPTBPL.js";
|
|
|
83
92
|
import {
|
|
84
93
|
GUEST_TYPE_DECLARATIONS,
|
|
85
94
|
PI_CORE_COMPATIBILITY_ARGUMENT_TYPE_NAMES
|
|
86
|
-
} from "./chunks/chunk-
|
|
95
|
+
} from "./chunks/chunk-LH2PGXSZ.js";
|
|
87
96
|
import {
|
|
88
97
|
AUTO_APPLY_PROPOSAL_KINDS,
|
|
89
98
|
BackgroundEntropyCompiler,
|
|
@@ -139,13 +148,15 @@ import {
|
|
|
139
148
|
scanEntropySessionJsonlAsync,
|
|
140
149
|
sessionWindowEvidence,
|
|
141
150
|
sessionWindowEvidenceAsync,
|
|
142
|
-
surfaceFreedomReport
|
|
143
|
-
|
|
151
|
+
surfaceFreedomReport,
|
|
152
|
+
updateObservationPoolAsync
|
|
153
|
+
} from "./chunks/chunk-I5VN6D5T.js";
|
|
144
154
|
import {
|
|
145
155
|
COMPILED_SURFACE_VERSION,
|
|
146
156
|
ENTROPY_INVOCATION_STAGES,
|
|
147
157
|
ENTROPY_METRIC_VERSION,
|
|
148
158
|
ENTROPY_WEIGHTS,
|
|
159
|
+
FileLockTimeoutError,
|
|
149
160
|
MAX_COMPILED_SURFACE_PROPOSALS,
|
|
150
161
|
applyCompiledSurface,
|
|
151
162
|
comparableCompiledSurfaceScore,
|
|
@@ -164,9 +175,9 @@ import {
|
|
|
164
175
|
saveCompiledSurface,
|
|
165
176
|
saveCompiledSurfaceAsync,
|
|
166
177
|
schemaDigest
|
|
167
|
-
} from "./chunks/chunk-
|
|
168
|
-
import "./chunks/chunk-
|
|
169
|
-
import "./chunks/chunk-
|
|
178
|
+
} from "./chunks/chunk-27ORW5EK.js";
|
|
179
|
+
import "./chunks/chunk-QIW7QMFI.js";
|
|
180
|
+
import "./chunks/chunk-KFPUVFDS.js";
|
|
170
181
|
import {
|
|
171
182
|
registerJevAuth
|
|
172
183
|
} from "./chunks/chunk-T3A5GNCW.js";
|
|
@@ -174,12 +185,12 @@ import {
|
|
|
174
185
|
ApprovalController,
|
|
175
186
|
FabricAutoApprovalClassifier,
|
|
176
187
|
FabricSessionApprovals
|
|
177
|
-
} from "./chunks/chunk-
|
|
188
|
+
} from "./chunks/chunk-JHQDS6YP.js";
|
|
178
189
|
import "./chunks/chunk-XB3RJVT4.js";
|
|
179
190
|
import {
|
|
180
191
|
getActiveRepairCompiler,
|
|
181
192
|
setActiveCompiledSurface
|
|
182
|
-
} from "./chunks/chunk-
|
|
193
|
+
} from "./chunks/chunk-Z45SUO4B.js";
|
|
183
194
|
import {
|
|
184
195
|
FABRIC_BASH_MIDDLEWARE,
|
|
185
196
|
FABRIC_COMPONENT_DISCOVER_EVENT,
|
|
@@ -190,12 +201,13 @@ import {
|
|
|
190
201
|
FABRIC_PREWALK_REQUEST_EVENT,
|
|
191
202
|
FABRIC_PROVIDER_DISCOVER_EVENT,
|
|
192
203
|
FABRIC_PROVIDER_REGISTER_EVENT,
|
|
204
|
+
FABRIC_SHELL_TIMING_EVENT,
|
|
193
205
|
FABRIC_TOOL_RESULT_PROXY_KIND,
|
|
194
206
|
readFabricPeerAwaitSettleRequestV1,
|
|
195
207
|
readFabricPeerCardsRequestV1,
|
|
196
208
|
readFabricPrewalkRequestV1,
|
|
197
209
|
readFabricToolResultProxyDetailsV1
|
|
198
|
-
} from "./chunks/chunk-
|
|
210
|
+
} from "./chunks/chunk-VRAGOMN4.js";
|
|
199
211
|
import {
|
|
200
212
|
awaitPeerSettle,
|
|
201
213
|
buildPeerCards
|
|
@@ -214,7 +226,7 @@ import {
|
|
|
214
226
|
loadFabricConfig,
|
|
215
227
|
loadFabricConfigForScope,
|
|
216
228
|
saveFabricConfig
|
|
217
|
-
} from "./chunks/chunk-
|
|
229
|
+
} from "./chunks/chunk-3RFEMOJA.js";
|
|
218
230
|
import {
|
|
219
231
|
defaultCodePreviewSettings
|
|
220
232
|
} from "./chunks/chunk-OKOHRXGF.js";
|
|
@@ -223,18 +235,18 @@ import {
|
|
|
223
235
|
fabricExecTitleHintCached,
|
|
224
236
|
normalizeRunDisplay,
|
|
225
237
|
registerCompactionHook
|
|
226
|
-
} from "./chunks/chunk-
|
|
238
|
+
} from "./chunks/chunk-YIEK7FH2.js";
|
|
227
239
|
import {
|
|
228
240
|
fabricWriteBindings
|
|
229
241
|
} from "./chunks/chunk-SZUXWOO7.js";
|
|
230
242
|
import "./chunks/chunk-KAD7UWT2.js";
|
|
231
|
-
import "./chunks/chunk-
|
|
243
|
+
import "./chunks/chunk-RUEKYUNR.js";
|
|
232
244
|
import {
|
|
233
245
|
FABRIC_ACTOR_PI_HOST_EVENTS
|
|
234
246
|
} from "./chunks/chunk-2QAOC3BO.js";
|
|
235
247
|
import "./chunks/chunk-A4VP7HDF.js";
|
|
236
248
|
import "./chunks/chunk-MGWQOKBV.js";
|
|
237
|
-
import "./chunks/chunk-
|
|
249
|
+
import "./chunks/chunk-ASU53MOT.js";
|
|
238
250
|
import "./chunks/chunk-UR2K6WK6.js";
|
|
239
251
|
import "./chunks/chunk-B54Z662X.js";
|
|
240
252
|
import {
|
|
@@ -249,7 +261,7 @@ import {
|
|
|
249
261
|
projectFabricAuditArgs,
|
|
250
262
|
projectFabricAuditResult,
|
|
251
263
|
readFabricExecutionTraceV1
|
|
252
|
-
} from "./chunks/chunk-
|
|
264
|
+
} from "./chunks/chunk-M25A5R3F.js";
|
|
253
265
|
import {
|
|
254
266
|
MAX_NORMAL_FORM_PLANS,
|
|
255
267
|
MAX_NORMAL_FORM_RULES,
|
|
@@ -267,12 +279,12 @@ import {
|
|
|
267
279
|
signatureDistance,
|
|
268
280
|
staticFreedomFromSchema,
|
|
269
281
|
trendFromScores
|
|
270
|
-
} from "./chunks/chunk-
|
|
282
|
+
} from "./chunks/chunk-JWWGWUP7.js";
|
|
271
283
|
import {
|
|
272
284
|
PI_CORE_TOOL_NAMES,
|
|
273
285
|
PI_CORE_TOOL_NAME_SET
|
|
274
286
|
} from "./chunks/chunk-YU62DDKK.js";
|
|
275
|
-
import "./chunks/chunk-
|
|
287
|
+
import "./chunks/chunk-MNTJX4U7.js";
|
|
276
288
|
import {
|
|
277
289
|
FABRIC_EXECUTION_GUIDANCE_SLOT,
|
|
278
290
|
MAX_FABRIC_MODEL_GUIDANCE_CONTENT_CHARS,
|
|
@@ -768,7 +780,7 @@ var armFabricPrewalkSession = async (state, context, pi, input) => {
|
|
|
768
780
|
customType: PREWALK_ARMED_MESSAGE_TYPE,
|
|
769
781
|
content: armedPrompt,
|
|
770
782
|
display: false,
|
|
771
|
-
details: { mode: prewalk.mode, model: input.model }
|
|
783
|
+
details: { mode: prewalk.mode, model: input.model, requirePlan: prewalk.requirePlan }
|
|
772
784
|
},
|
|
773
785
|
{ deliverAs: "nextTurn" }
|
|
774
786
|
);
|
|
@@ -996,6 +1008,23 @@ var resolvePrewalkModel = async (state, context) => {
|
|
|
996
1008
|
);
|
|
997
1009
|
return void 0;
|
|
998
1010
|
}
|
|
1011
|
+
if (typeof context.ui.custom === "function") {
|
|
1012
|
+
try {
|
|
1013
|
+
const picked = await context.ui.custom(
|
|
1014
|
+
(_tui, theme, _keybindings, done) => new FabricModelSelector({
|
|
1015
|
+
theme,
|
|
1016
|
+
source: buildModelSource(context.modelRegistry, resolveAgentDir()),
|
|
1017
|
+
currentValue: "",
|
|
1018
|
+
headerText: "Prewalk executor model. Fabric hands off at the next matching mutation boundary; Main continues on the picked model.",
|
|
1019
|
+
inheritRow: false,
|
|
1020
|
+
onSelect: (value) => done({ model: value }),
|
|
1021
|
+
onCancel: () => done({ model: void 0 })
|
|
1022
|
+
})
|
|
1023
|
+
);
|
|
1024
|
+
if (picked !== void 0) return picked.model;
|
|
1025
|
+
} catch {
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
999
1028
|
return context.ui.select("Prewalk executor model", keys);
|
|
1000
1029
|
};
|
|
1001
1030
|
var armPrewalk = async (state, context, pi, task = "") => {
|
|
@@ -2914,7 +2943,7 @@ var createFabricExecTool = (state, codePreviewSettings, pendingHandoffs, decorat
|
|
|
2914
2943
|
promptGuidelines: [
|
|
2915
2944
|
python ? "Batch independent operations in one `fabric_exec` Python program with `asyncio.gather`; await dependent/conditional steps sequentially. Coalesce independent replacements into one `await pi.edit(path=..., edits=[...])`. Return only the compact final JSON-compatible value." : "Batch independent operations in one `fabric_exec` program (`Promise.all` for parallel, sequential `await` for ordered), not one call per tool; keep dependent/conditional steps sequential. Coalesce non-dependent replacements from one file snapshot into one `pi.edit({path, edits:[...]})`; use `all:true` only for intentional repeated exact anchors. Return only the compact final value; intermediate results stay in the sandbox.",
|
|
2916
2945
|
python ? "Search before reading with `await pi.grep(pattern=..., path=...)` or `await pi.find(pattern=..., path=...)`, then `await pi.read(path=..., offset=..., limit=...)`. Use Python dict syntax, `True`/`False`/`None`, and bounded searches; unbounded reads cap at 2000 lines or 50KB. Read continuation notices when needed." : "Search before reading: use `pi.grep`/`pi.find` to locate relevant lines, then `pi.read({path, offset, limit})` that range. Escape regex metacharacters, or use `literal:true` for exact punctuated text. Keep fan-out search limits small and widen only on misses. An unbounded `pi.read` returns at most 2000 lines or 50KB and, when truncated, ends with a `Use offset=\u2026` continuation notice; reserve whole-file reads for small files you will use in full.",
|
|
2917
|
-
"
|
|
2946
|
+
"Keep the acceptance ledger in reasoning or concise progress notes (no tool call): define concrete checks, trace execution before editing, implement end to end, then run targeted tests and direct behavioral probes. Confirm requested public symbols, registrations, and configuration entries. Use the smallest checks that cover the ledger; escalate only for failures or cross-cutting risk. Inspect failures and iterate instead of rerunning unchanged passing checks. A build alone is not completion.",
|
|
2918
2947
|
python ? "For test/probe nonzero exits, use `await pi.bash(command=..., settle=True)` and inspect the returned dict: `r['ok']`, `r['output']`, and `r.get('exitCode')`. Set shell `timeout` in seconds once for long suites. Return decisions and evidence rather than raw logs." : "Amortize round trips without inflating context: batch only independent, bounded work. Keep search\u2192read and edit\u2192verify sequential when an output determines the next action. Use `settle:true` for tests or probes whose nonzero result is evidence rather than an exceptional stop; for a known long suite, set `pi.bash` `timeout` in seconds once instead of retrying a timed-out call. Filter or summarize noisy command output inside the program and return decisions, failures, and evidence\u2014not raw logs or unused intermediate results.",
|
|
2919
2948
|
"For edits/writes, pass named payloads through top-level `payloads`; each `\u03C0.key` must exactly match a key there; prefer `pi.edit`/`pi.write`. `pi.bash`: no stdin.",
|
|
2920
2949
|
"Use `display.name` and objective `display.description`; Fabric pairs them with verified outcomes in deterministic compaction.",
|
|
@@ -3917,7 +3946,7 @@ var FabricState = class {
|
|
|
3917
3946
|
return this.#current()?.componentGraph() ?? { components: [], edges: [], cycles: [] };
|
|
3918
3947
|
}
|
|
3919
3948
|
modelGuidance() {
|
|
3920
|
-
return this.#current()?.modelGuidance() ?? [];
|
|
3949
|
+
return this.#current()?.modelGuidance() ?? (this.#config ? builtinModelGuidance(this.#config) : []);
|
|
3921
3950
|
}
|
|
3922
3951
|
participantInfos(options = {}) {
|
|
3923
3952
|
return this.#current()?.participantInfos(options) ?? [];
|
|
@@ -4573,7 +4602,7 @@ var createDashboardSnapshot = (state, events, context, activityRuns, cache, immu
|
|
|
4573
4602
|
} : agent;
|
|
4574
4603
|
});
|
|
4575
4604
|
const localAgentIds = new Set(localAgents.map((agent) => agent.id));
|
|
4576
|
-
const remoteAgents = participants.filter((participant) => participant.kind === "agent" && !localAgentIds.has(participant.id)).map((participant) => ({
|
|
4605
|
+
const remoteAgents = participants.filter((participant) => participant.kind === "agent" && participant.rootId === main.id && !localAgentIds.has(participant.id)).map((participant) => ({
|
|
4577
4606
|
id: participant.id,
|
|
4578
4607
|
name: participant.name,
|
|
4579
4608
|
status: participant.status,
|
|
@@ -4670,6 +4699,7 @@ var totalTokens = (snapshot, run) => snapshot.agents.filter((agent) => run ? age
|
|
|
4670
4699
|
0
|
|
4671
4700
|
);
|
|
4672
4701
|
var totalCost = (snapshot, run) => snapshot.agents.filter((agent) => run ? agent.runId === run.id : isActiveStatus(agent.status)).reduce((sum, agent) => sum + (agent.usage?.cost ?? 0), 0);
|
|
4702
|
+
var agentRecency = (agent) => agent.finishedAt ?? agent.updatedAt ?? agent.startedAt ?? 0;
|
|
4673
4703
|
var agentLines = (theme, agent, now) => {
|
|
4674
4704
|
const status = colorStatus(theme, agent.status, statusGlyph(agent.status));
|
|
4675
4705
|
const activity = agent.currentTool ?? (agent.error ? `error: ${truncateToWidth3(safeText(agent.error), 48)}` : agent.text && !isActiveStatus(agent.status) ? `result: ${truncateToWidth3(safeText(agent.text), 48)}` : agent.status === "running" ? "thinking" : agent.status);
|
|
@@ -4756,9 +4786,8 @@ var FabricWidget = class {
|
|
|
4756
4786
|
const orderedAgents = orderAgentsByCreation(snapshot.agents);
|
|
4757
4787
|
const activeAgents = orderedAgents.filter((agent) => isActiveStatus(agent.status));
|
|
4758
4788
|
const activeAgentIds = new Set(activeAgents.map((agent) => agent.id));
|
|
4759
|
-
const
|
|
4760
|
-
|
|
4761
|
-
) : [];
|
|
4789
|
+
const dismissedAt = snapshot.widgetDismissedAt ?? 0;
|
|
4790
|
+
const terminalAgents = orderedAgents.filter((agent) => !activeAgentIds.has(agent.id) && !isActiveStatus(agent.status) && agentRecency(agent) > dismissedAt).sort((left, right) => agentRecency(right) - agentRecency(left));
|
|
4762
4791
|
const visibleActors = snapshot.actors.filter((actor) => actor.status !== "stopped");
|
|
4763
4792
|
const activeActorWorkers = visibleActors.filter((actor) => actor.worker && isActiveStatus(actor.worker.status)).map((actor) => ({ ...actor.worker, name: actor.name }));
|
|
4764
4793
|
const terminalActorWorkers = visibleActors.filter((actor) => actor.worker && !isActiveStatus(actor.worker.status)).map((actor) => ({ ...actor.worker, name: actor.name }));
|
|
@@ -5009,12 +5038,13 @@ var FabricUiController = class {
|
|
|
5009
5038
|
try {
|
|
5010
5039
|
const { ShellTasksView } = await import("./ui/shell-tasks.js");
|
|
5011
5040
|
if (epoch !== this.#epoch) return;
|
|
5012
|
-
await context.ui.custom((tui, theme,
|
|
5041
|
+
await context.ui.custom((tui, theme, keys, done) => {
|
|
5013
5042
|
this.#closeTasks = () => done();
|
|
5014
5043
|
const id = candidates[0]?.id;
|
|
5015
5044
|
this.#tasksView = new ShellTasksView({
|
|
5016
5045
|
jobs,
|
|
5017
5046
|
theme,
|
|
5047
|
+
keys,
|
|
5018
5048
|
done: () => done(),
|
|
5019
5049
|
requestRender: () => tui.requestRender(),
|
|
5020
5050
|
rows: () => tui.terminal?.rows ?? 24,
|
|
@@ -5230,8 +5260,8 @@ var FabricUiController = class {
|
|
|
5230
5260
|
if (!this.#context) this.start(context);
|
|
5231
5261
|
this.#dashboardOpen = true;
|
|
5232
5262
|
this.#refresh();
|
|
5233
|
-
const [{ FabricDashboard }, { buildClaudeModelSource, buildModelSource }] = await Promise.all([import("./ui/dashboard.js"), import("./ui/model-picker.js")]);
|
|
5234
|
-
const modelSource =
|
|
5263
|
+
const [{ FabricDashboard }, { buildClaudeModelSource, buildModelSource: buildModelSource2 }] = await Promise.all([import("./ui/dashboard.js"), import("./ui/model-picker.js")]);
|
|
5264
|
+
const modelSource = buildModelSource2(context.modelRegistry, resolveAgentDir());
|
|
5235
5265
|
let claudeModelSource;
|
|
5236
5266
|
if (this.#snapshot.actors.some((actor) => actor.runner === "claude")) {
|
|
5237
5267
|
try {
|
|
@@ -5910,6 +5940,14 @@ async function piFabric(pi, options = {}) {
|
|
|
5910
5940
|
let entropyCompileInFlight;
|
|
5911
5941
|
let entropyCompilePending;
|
|
5912
5942
|
let entropyLifecycleEpoch = 0;
|
|
5943
|
+
let entropyStopping = false;
|
|
5944
|
+
let entropyRetryTimer;
|
|
5945
|
+
let entropyRetryDelayMs = 1e3;
|
|
5946
|
+
const clearEntropyRetry = (reset = true) => {
|
|
5947
|
+
if (entropyRetryTimer) clearTimeout(entropyRetryTimer);
|
|
5948
|
+
entropyRetryTimer = void 0;
|
|
5949
|
+
if (reset) entropyRetryDelayMs = 1e3;
|
|
5950
|
+
};
|
|
5913
5951
|
const createEntropyCaches = () => ({
|
|
5914
5952
|
compiler: new BackgroundEntropyCompiler(),
|
|
5915
5953
|
observations: new SessionObservationCache(),
|
|
@@ -5918,57 +5956,67 @@ async function piFabric(pi, options = {}) {
|
|
|
5918
5956
|
let entropyCaches = createEntropyCaches();
|
|
5919
5957
|
const compileEntropyNow = async (context, epoch) => {
|
|
5920
5958
|
const current = () => epoch === entropyLifecycleEpoch && state.initialized && state.config.entropy.compile;
|
|
5921
|
-
if (!current()) return;
|
|
5959
|
+
if (!current()) return false;
|
|
5960
|
+
let retry = false;
|
|
5922
5961
|
const agentDir = resolveAgentDir();
|
|
5923
5962
|
const cwd = state.cwd ?? context.cwd;
|
|
5924
5963
|
const repairs = entropyRepairRows(state.repairs.repairs);
|
|
5925
5964
|
const caches = entropyCaches;
|
|
5926
|
-
const [files, loaded,
|
|
5965
|
+
const [files, loaded, snapshot] = await Promise.all([
|
|
5927
5966
|
caches.sessions.select(agentDir, cwd, context.sessionManager.getSessionFile?.()),
|
|
5928
5967
|
loadCompiledSurfaceAsync(agentDir),
|
|
5929
|
-
loadObservationPoolAsync(agentDir),
|
|
5930
5968
|
liveSurfaceSnapshot({ registry: state.registry, extensionContext: context, cwd })
|
|
5931
5969
|
]);
|
|
5932
|
-
if (!current() || loaded.error) return;
|
|
5970
|
+
if (!current() || loaded.error) return false;
|
|
5933
5971
|
const evidence = await sessionWindowEvidenceAsync(files, { windowsOnly: true });
|
|
5934
|
-
if (!current()) return;
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5972
|
+
if (!current()) return false;
|
|
5973
|
+
try {
|
|
5974
|
+
await updateObservationPoolAsync(agentDir, evidence.observationWindows, caches.observations);
|
|
5975
|
+
} catch (error) {
|
|
5976
|
+
if (error instanceof FileLockTimeoutError) {
|
|
5977
|
+
retry = true;
|
|
5978
|
+
} else {
|
|
5979
|
+
console.warn(`[pi-fabric] observation pool update failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
5980
|
+
}
|
|
5941
5981
|
}
|
|
5942
|
-
if (!current()) return;
|
|
5982
|
+
if (!current()) return false;
|
|
5943
5983
|
const outcome = await caches.compiler.compile({
|
|
5944
5984
|
windows: evidence.traceWindows,
|
|
5945
5985
|
surface: snapshot,
|
|
5946
5986
|
repairs,
|
|
5947
5987
|
...loaded.file ? { artifact: loaded.file } : {}
|
|
5948
5988
|
});
|
|
5949
|
-
if (!current()) return;
|
|
5989
|
+
if (!current()) return false;
|
|
5950
5990
|
if (outcome.status === "compiled" && outcome.artifact) {
|
|
5951
|
-
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
context.
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
5991
|
+
try {
|
|
5992
|
+
const saved = await saveCompiledSurfaceAsync(agentDir, outcome.artifact);
|
|
5993
|
+
if (current()) {
|
|
5994
|
+
setActiveCompiledSurface(saved.file);
|
|
5995
|
+
const previousScore = comparableCompiledSurfaceScore(loaded.file, saved.file.metricVersion);
|
|
5996
|
+
if (previousScore !== void 0 && outcome.report.score < previousScore && context.hasUI) {
|
|
5997
|
+
context.ui.notify(formatEntropyCompileNotice({
|
|
5998
|
+
beforeScore: previousScore,
|
|
5999
|
+
afterScore: outcome.report.score,
|
|
6000
|
+
normalizations: saved.file.normalizations?.length ?? 0
|
|
6001
|
+
}), "info");
|
|
6002
|
+
}
|
|
5961
6003
|
}
|
|
6004
|
+
} catch (error) {
|
|
6005
|
+
if (!(error instanceof FileLockTimeoutError)) throw error;
|
|
6006
|
+
if (current()) setActiveCompiledSurface(outcome.artifact);
|
|
6007
|
+
retry = true;
|
|
5962
6008
|
}
|
|
5963
6009
|
}
|
|
6010
|
+
return retry && current();
|
|
5964
6011
|
};
|
|
5965
6012
|
const launchEntropyCompile = (request) => {
|
|
6013
|
+
let retry = false;
|
|
5966
6014
|
const task = (async () => {
|
|
5967
6015
|
try {
|
|
5968
6016
|
if (request.delayMs > 0) {
|
|
5969
6017
|
await new Promise((resolve2) => setTimeout(resolve2, request.delayMs));
|
|
5970
6018
|
}
|
|
5971
|
-
await compileEntropyNow(request.context, request.epoch);
|
|
6019
|
+
retry = await compileEntropyNow(request.context, request.epoch);
|
|
5972
6020
|
} catch (error) {
|
|
5973
6021
|
console.warn(
|
|
5974
6022
|
`[pi-fabric] entropy compile failed: ${error instanceof Error ? error.message : String(error)}`
|
|
@@ -5981,10 +6029,22 @@ async function piFabric(pi, options = {}) {
|
|
|
5981
6029
|
entropyCompileInFlight = void 0;
|
|
5982
6030
|
const pending = entropyCompilePending;
|
|
5983
6031
|
entropyCompilePending = void 0;
|
|
5984
|
-
if (
|
|
6032
|
+
if (!retry && request.epoch === entropyLifecycleEpoch) entropyRetryDelayMs = 1e3;
|
|
6033
|
+
if (pending) {
|
|
6034
|
+
launchEntropyCompile(pending);
|
|
6035
|
+
} else if (retry && !entropyStopping && request.epoch === entropyLifecycleEpoch) {
|
|
6036
|
+
const delay = entropyRetryDelayMs * (0.5 + Math.random() * 0.5);
|
|
6037
|
+
entropyRetryDelayMs = Math.min(3e4, entropyRetryDelayMs * 2);
|
|
6038
|
+
entropyRetryTimer = setTimeout(() => {
|
|
6039
|
+
entropyRetryTimer = void 0;
|
|
6040
|
+
launchEntropyCompile({ ...request, delayMs: 0 });
|
|
6041
|
+
}, delay);
|
|
6042
|
+
entropyRetryTimer.unref();
|
|
6043
|
+
}
|
|
5985
6044
|
});
|
|
5986
6045
|
};
|
|
5987
6046
|
const scheduleEntropyCompile = (context, delayMs = 250) => {
|
|
6047
|
+
clearEntropyRetry(false);
|
|
5988
6048
|
const request = { context, delayMs, epoch: entropyLifecycleEpoch };
|
|
5989
6049
|
if (entropyCompileInFlight) {
|
|
5990
6050
|
entropyCompilePending = request;
|
|
@@ -5996,6 +6056,8 @@ async function piFabric(pi, options = {}) {
|
|
|
5996
6056
|
while (entropyCompileInFlight) await entropyCompileInFlight;
|
|
5997
6057
|
};
|
|
5998
6058
|
pi.on("session_start", async (_event, context) => {
|
|
6059
|
+
clearEntropyRetry();
|
|
6060
|
+
entropyStopping = false;
|
|
5999
6061
|
entropyLifecycleEpoch += 1;
|
|
6000
6062
|
entropyCaches = createEntropyCaches();
|
|
6001
6063
|
entropyEvidenceThisTurn = false;
|
|
@@ -6190,7 +6252,8 @@ async function piFabric(pi, options = {}) {
|
|
|
6190
6252
|
);
|
|
6191
6253
|
const planning = filterPrewalkPlanningDirectives(
|
|
6192
6254
|
continuation.messages,
|
|
6193
|
-
state.initialized && state.prewalk.isArmed(sessionId)
|
|
6255
|
+
state.initialized && state.prewalk.isArmed(sessionId),
|
|
6256
|
+
state.initialized && state.prewalk.planRequired(sessionId)
|
|
6194
6257
|
);
|
|
6195
6258
|
let changed = continuation.changed || planning.changed;
|
|
6196
6259
|
const messages = planning.messages.map((message) => {
|
|
@@ -6289,6 +6352,8 @@ ${guidance}`,
|
|
|
6289
6352
|
state.dispatchHostEvent(eventName, event, context);
|
|
6290
6353
|
});
|
|
6291
6354
|
pi.on("session_shutdown", async (_event, context) => {
|
|
6355
|
+
entropyStopping = true;
|
|
6356
|
+
clearEntropyRetry();
|
|
6292
6357
|
if (entropyEvidenceThisTurn) {
|
|
6293
6358
|
entropyEvidenceThisTurn = false;
|
|
6294
6359
|
scheduleEntropyCompile(context, 0);
|
|
@@ -6351,6 +6416,7 @@ export {
|
|
|
6351
6416
|
FABRIC_PREWALK_REQUEST_EVENT,
|
|
6352
6417
|
FABRIC_PROVIDER_DISCOVER_EVENT,
|
|
6353
6418
|
FABRIC_PROVIDER_REGISTER_EVENT,
|
|
6419
|
+
FABRIC_SHELL_TIMING_EVENT,
|
|
6354
6420
|
FABRIC_TOOL_RESULT_PROXY_KIND,
|
|
6355
6421
|
FabricExecutionTraceOperationHandle,
|
|
6356
6422
|
FabricExecutionTraceRecorder,
|
|
@@ -6456,6 +6522,7 @@ export {
|
|
|
6456
6522
|
signatureDistance,
|
|
6457
6523
|
staticFreedomFromSchema,
|
|
6458
6524
|
surfaceFreedomReport,
|
|
6459
|
-
trendFromScores
|
|
6525
|
+
trendFromScores,
|
|
6526
|
+
updateObservationPoolAsync
|
|
6460
6527
|
};
|
|
6461
6528
|
//# sourceMappingURL=index.js.map
|