@tangle-network/agent-app 0.61.3 → 0.62.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/{DesignCanvas-L6J72JQ2.js → DesignCanvas-IQKYAEC4.js} +3 -2
- package/dist/{DesignCanvasEditor-QFQD63MR.js → DesignCanvasEditor-O7OCZTGC.js} +5 -4
- package/dist/{TimelineEditor-7KBPJQLT.js → TimelineEditor-VB2UJ34D.js} +4 -2
- package/dist/VaultPane-AYW7CO33.js +8 -0
- package/dist/agent-profiles/d1.js +1 -1
- package/dist/agent-profiles/index.d.ts +0 -82
- package/dist/agent-profiles/index.js +1 -21
- package/dist/agent-profiles/self-management.d.ts +0 -55
- package/dist/alerting/index.d.ts +1 -1
- package/dist/alerting/index.js +1 -3
- package/dist/alerting/slack.d.ts +6 -79
- package/dist/app-auth/drizzle.d.ts +17 -271
- package/dist/app-auth/drizzle.js +6 -2
- package/dist/app-auth/drizzle.js.map +1 -1
- package/dist/app-auth/index.js +3 -3
- package/dist/assets/types.d.ts +2 -1
- package/dist/assistant/AssistantPanel.d.ts +1 -1
- package/dist/assistant/index.js +635 -392
- package/dist/assistant/index.js.map +1 -1
- package/dist/billing/identity-locks.d.ts +5 -0
- package/dist/billing/index.js +1 -1
- package/dist/brand-extraction/index.js.map +1 -1
- package/dist/brand-extraction/types.d.ts +2 -1
- package/dist/chat-react/index.js +6 -5
- package/dist/chat-routes/attachment-write-safety.d.ts +4 -0
- package/dist/chat-routes/draft-persistence.d.ts +2 -14
- package/dist/chat-routes/index.d.ts +1 -0
- package/dist/chat-routes/index.js +853 -773
- package/dist/chat-routes/index.js.map +1 -1
- package/dist/chat-routes/sandbox-model-source.d.ts +20 -0
- package/dist/chat-routes/stored-attachments.d.ts +18 -0
- package/dist/chat-routes/turn-admission.d.ts +1 -1
- package/dist/chat-routes/turn-execution.d.ts +2 -2
- package/dist/chat-routes/turn-route-contracts.d.ts +3 -29
- package/dist/chat-store/core.d.ts +19 -1
- package/dist/chat-store/index.js.map +1 -1
- package/dist/chat-store/store.d.ts +3 -29
- package/dist/{chunk-ATQQCG4I.js → chunk-2VJLLRVV.js} +2 -2
- package/dist/{chunk-R4X5474U.js → chunk-52SDU43B.js} +12 -27
- package/dist/chunk-52SDU43B.js.map +1 -0
- package/dist/{chunk-MDRH3SDA.js → chunk-54YIL7WM.js} +3 -3
- package/dist/{chunk-6QJ3GB3A.js → chunk-5GSZGTPJ.js} +2 -2
- package/dist/{chunk-5IM2CLYX.js → chunk-6JEDSKFH.js} +232 -218
- package/dist/chunk-6JEDSKFH.js.map +1 -0
- package/dist/{chunk-6PRQ45QE.js → chunk-6OG4244Y.js} +1 -1
- package/dist/chunk-6OG4244Y.js.map +1 -0
- package/dist/{chunk-ZDPUC6CM.js → chunk-6ZVSMA4T.js} +3 -3
- package/dist/{chunk-TXUAGSFR.js → chunk-76MPX7JQ.js} +47 -1
- package/dist/chunk-76MPX7JQ.js.map +1 -0
- package/dist/{chunk-BOQ4HVVH.js → chunk-7ISHKBAD.js} +61 -52
- package/dist/chunk-7ISHKBAD.js.map +1 -0
- package/dist/chunk-7PULOECS.js +22 -0
- package/dist/chunk-7PULOECS.js.map +1 -0
- package/dist/{chunk-KJODHPWM.js → chunk-CPVGRQ43.js} +511 -339
- package/dist/chunk-CPVGRQ43.js.map +1 -0
- package/dist/{chunk-LO6VQ35O.js → chunk-CQZVJVME.js} +2 -2
- package/dist/{chunk-Y43PXON2.js → chunk-EFQUAWWF.js} +577 -546
- package/dist/chunk-EFQUAWWF.js.map +1 -0
- package/dist/{chunk-FPNZMIAW.js → chunk-ELX5YITO.js} +1 -1
- package/dist/chunk-ELX5YITO.js.map +1 -0
- package/dist/chunk-FGAROAUF.js +19 -0
- package/dist/chunk-FGAROAUF.js.map +1 -0
- package/dist/{chunk-HN6MZ2XL.js → chunk-FTNGGR37.js} +641 -466
- package/dist/chunk-FTNGGR37.js.map +1 -0
- package/dist/{chunk-G4F2NWZH.js → chunk-FZ3ZFVAC.js} +4 -4
- package/dist/{chunk-UCCSJX64.js → chunk-GIEUZBQQ.js} +1112 -644
- package/dist/chunk-GIEUZBQQ.js.map +1 -0
- package/dist/{chunk-MEKOWH5E.js → chunk-IVBREL7A.js} +785 -526
- package/dist/chunk-IVBREL7A.js.map +1 -0
- package/dist/{chunk-WSEXFTN4.js → chunk-JBXNU5WD.js} +26 -26
- package/dist/chunk-JBXNU5WD.js.map +1 -0
- package/dist/{chunk-F2VX6TTJ.js → chunk-JRCZHDRG.js} +2 -41
- package/dist/chunk-JRCZHDRG.js.map +1 -0
- package/dist/{chunk-LXYQOOXU.js → chunk-JRW6LCIA.js} +552 -302
- package/dist/chunk-JRW6LCIA.js.map +1 -0
- package/dist/{chunk-TVPH5T4F.js → chunk-KS4I7KVC.js} +16 -22
- package/dist/{chunk-TVPH5T4F.js.map → chunk-KS4I7KVC.js.map} +1 -1
- package/dist/{chunk-J2BBYVGF.js → chunk-MRZP65DZ.js} +1 -117
- package/dist/chunk-MRZP65DZ.js.map +1 -0
- package/dist/{chunk-4ZSLX3LY.js → chunk-OODZCBSM.js} +1 -1
- package/dist/chunk-OODZCBSM.js.map +1 -0
- package/dist/chunk-P4RRC4AO.js +47 -0
- package/dist/chunk-P4RRC4AO.js.map +1 -0
- package/dist/{chunk-ORQD4AUO.js → chunk-PCAY23GS.js} +1 -6
- package/dist/chunk-PCAY23GS.js.map +1 -0
- package/dist/{chunk-NMZUW6VJ.js → chunk-PEJ5OP5B.js} +3 -3
- package/dist/chunk-PEJ5OP5B.js.map +1 -0
- package/dist/{chunk-NHYRIM4I.js → chunk-PIPNDZ6H.js} +304 -194
- package/dist/chunk-PIPNDZ6H.js.map +1 -0
- package/dist/{chunk-DJIN3YUJ.js → chunk-TCJ4TMOW.js} +83 -47
- package/dist/{chunk-DJIN3YUJ.js.map → chunk-TCJ4TMOW.js.map} +1 -1
- package/dist/chunk-UHSUY6H6.js +79 -0
- package/dist/chunk-UHSUY6H6.js.map +1 -0
- package/dist/{chunk-PDD5A43Y.js → chunk-UTL6TEN6.js} +3 -3
- package/dist/{chunk-VJBFCNAU.js → chunk-UW2DKTEM.js} +123 -130
- package/dist/chunk-UW2DKTEM.js.map +1 -0
- package/dist/{chunk-S27DKRI6.js → chunk-VDYEVCQQ.js} +2 -2
- package/dist/{chunk-UFQM46NV.js → chunk-VK3F4N4U.js} +2 -2
- package/dist/{chunk-6ZIC6OG5.js → chunk-VYBTQK25.js} +126 -122
- package/dist/chunk-VYBTQK25.js.map +1 -0
- package/dist/{chunk-RL3Z747H.js → chunk-W2BV2XOC.js} +1491 -700
- package/dist/chunk-W2BV2XOC.js.map +1 -0
- package/dist/{chunk-FUZETA6Z.js → chunk-X6SZGQTK.js} +2 -2
- package/dist/{chunk-CD2LQXY6.js → chunk-XOHE6SKU.js} +14 -16
- package/dist/{chunk-CD2LQXY6.js.map → chunk-XOHE6SKU.js.map} +1 -1
- package/dist/{chunk-ZBB5KQ6B.js → chunk-Y3GO6SG3.js} +73 -66
- package/dist/chunk-Y3GO6SG3.js.map +1 -0
- package/dist/chunk-ZAMHLXNS.js +56 -0
- package/dist/chunk-ZAMHLXNS.js.map +1 -0
- package/dist/{chunk-RHFN7TUV.js → chunk-ZDHCV462.js} +47 -44
- package/dist/{chunk-RHFN7TUV.js.map → chunk-ZDHCV462.js.map} +1 -1
- package/dist/chunk-ZOS3D26Z.js +72 -0
- package/dist/chunk-ZOS3D26Z.js.map +1 -0
- package/dist/design-canvas/index.js +32 -32
- package/dist/design-canvas/index.js.map +1 -1
- package/dist/design-canvas-react/components/DesignCanvas.d.ts +1 -1
- package/dist/design-canvas-react/components/Workspace.d.ts +1 -1
- package/dist/design-canvas-react/components/glyphs.d.ts +31 -40
- package/dist/design-canvas-react/components/transform-math.d.ts +0 -8
- package/dist/design-canvas-react/components/use-workspace-keyboard.d.ts +2 -2
- package/dist/design-canvas-react/contracts.d.ts +2 -2
- package/dist/design-canvas-react/engine.js +1 -1
- package/dist/design-canvas-react/index.js +9 -7
- package/dist/design-canvas-react/index.js.map +1 -1
- package/dist/design-canvas-react/lazy.js +1 -1
- package/dist/eval/calibration.d.ts +1 -38
- package/dist/eval/index.d.ts +2 -4
- package/dist/eval/index.js +0 -84
- package/dist/eval/index.js.map +1 -1
- package/dist/harness/index.d.ts +1 -1
- package/dist/harness/index.js +1 -1
- package/dist/harness/session-selection.d.ts +2 -2
- package/dist/hub-approvals/index.js +1 -1
- package/dist/hub-approvals/result.d.ts +1 -1
- package/dist/hub-approvals-react/index.js +4 -4
- package/dist/hub-approvals-react/index.js.map +1 -1
- package/dist/hub-approvals-react/parts.d.ts +1 -1
- package/dist/launch-invariants/cli.js +4 -4
- package/dist/launch-invariants/index.js +3 -3
- package/dist/launch-invariants/testing.js +4 -4
- package/dist/legibility/cli.js +1 -1
- package/dist/legibility/index.js +1 -1
- package/dist/{mention-editor-B23OMFT2.js → mention-editor-4BKBMWIK.js} +83 -57
- package/dist/mention-editor-4BKBMWIK.js.map +1 -0
- package/dist/missions/index.js +144 -137
- package/dist/missions/index.js.map +1 -1
- package/dist/operator/index.js +1 -1
- package/dist/peer-floors/check.js +1 -1
- package/dist/peer-floors/cli.js +6 -14
- package/dist/peer-floors/cli.js.map +1 -1
- package/dist/peer-floors/source-entries.d.ts +6 -0
- package/dist/platform/index.js +10 -10
- package/dist/preset-cloudflare/index.js +1 -1
- package/dist/profile/index.d.ts +0 -1
- package/dist/profile/index.js +1 -422
- package/dist/profile/index.js.map +1 -1
- package/dist/profile-editor/server.d.ts +0 -1
- package/dist/profile-editor/server.js +0 -1
- package/dist/profile-editor/server.js.map +1 -1
- package/dist/public-consultation/index.d.ts +2 -2
- package/dist/public-consultation/index.js +6 -6
- package/dist/record/drizzle.js +156 -148
- package/dist/record/drizzle.js.map +1 -1
- package/dist/runtime/index.js +4 -4
- package/dist/runtime/router-turn.js +3 -3
- package/dist/sandbox/box-health.d.ts +1 -1
- package/dist/sandbox/index.js +5 -5
- package/dist/sequences/drizzle.js +5 -15
- package/dist/sequences/drizzle.js.map +1 -1
- package/dist/sequences/index.d.ts +1 -0
- package/dist/sequences/index.js +18 -14
- package/dist/sequences/index.js.map +1 -1
- package/dist/sequences/row-mapping.d.ts +7 -0
- package/dist/sequences-react/components/TimelineEditor.d.ts +0 -40
- package/dist/sequences-react/components/TimelineHistory.d.ts +31 -0
- package/dist/sequences-react/components/glyphs.d.ts +12 -21
- package/dist/sequences-react/components/index.d.ts +0 -2
- package/dist/sequences-react/components/interaction-math.d.ts +3 -3
- package/dist/sequences-react/contracts.d.ts +1 -1
- package/dist/sequences-react/engine/snap.d.ts +2 -2
- package/dist/sequences-react/index.js +4 -4
- package/dist/sequences-react/index.js.map +1 -1
- package/dist/settings-react/index.js +13 -30
- package/dist/settings-react/index.js.map +1 -1
- package/dist/settings-react/timezone-picker.d.ts +0 -6
- package/dist/signoff/browser-budget.d.ts +6 -1
- package/dist/signoff/cli.d.ts +0 -7
- package/dist/signoff/cli.js +1 -2
- package/dist/signoff/cli.js.map +1 -1
- package/dist/signoff/index.js +1 -1
- package/dist/skills/index.d.ts +1 -1
- package/dist/skills/index.js +5 -25
- package/dist/skills/marketplace.d.ts +1 -75
- package/dist/skills-placement/box.js +3 -4
- package/dist/skills-placement/box.js.map +1 -1
- package/dist/skills-placement/index.js +3 -4
- package/dist/spend/cli-args.d.ts +1 -1
- package/dist/spend/cli.js +3 -3
- package/dist/spend/cli.js.map +1 -1
- package/dist/spend/index.js +1 -1
- package/dist/stories/design-canvas/fixtures.d.ts +1 -14
- package/dist/stream/index.js +17 -17
- package/dist/studio/generation.d.ts +1 -1
- package/dist/studio/index.js +1 -1
- package/dist/studio-react/index.js +353 -184
- package/dist/studio-react/index.js.map +1 -1
- package/dist/studio-react/studio-composer.d.ts +1 -5
- package/dist/studio-react/studio-history-screen.d.ts +1 -1
- package/dist/teams/invitations-api.d.ts +3 -3
- package/dist/teams/invitations-api.js +74 -72
- package/dist/teams/invitations-api.js.map +1 -1
- package/dist/teams/member-sync.d.ts +2 -0
- package/dist/teams/members-api.d.ts +2 -2
- package/dist/teams/members-api.js +1 -1
- package/dist/teams-react/index.js +28 -45
- package/dist/teams-react/index.js.map +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/mcp-arguments.d.ts +1 -1
- package/dist/trace/index.d.ts +1 -18
- package/dist/trace/index.js +1 -36
- package/dist/trace/index.js.map +1 -1
- package/dist/trace/mission-flow.d.ts +1 -59
- package/dist/turn-health/index.d.ts +1 -1
- package/dist/turn-health/index.js +2 -2
- package/dist/turn-health/sink.d.ts +2 -1
- package/dist/turn-trace/index.js +2 -4
- package/dist/turn-trace/recorder.d.ts +0 -2
- package/dist/vault/VaultPane.d.ts +0 -20
- package/dist/vault/VaultPaneOperations.d.ts +318 -0
- package/dist/vault/index.js +2 -1
- package/dist/vault/index.js.map +1 -1
- package/dist/vault/lazy.js +1 -1
- package/dist/web-react/agent-profile-editor.d.ts +1 -2
- package/dist/web-react/agent-profile-editor.js +6 -5
- package/dist/web-react/chat-composer.d.ts +1 -1
- package/dist/web-react/durable-plan-flow.d.ts +6 -1
- package/dist/web-react/editor-glyphs.d.ts +12 -0
- package/dist/web-react/focus-navigation.d.ts +12 -0
- package/dist/web-react/history-controls.d.ts +37 -0
- package/dist/web-react/index.js +36 -34
- package/dist/web-react/interaction-question-card.d.ts +1 -1
- package/dist/web-react/record-grid-writes.d.ts +31 -0
- package/dist/web-react/record-grid.d.ts +1 -48
- package/dist/web-react/session-history-panel.d.ts +1 -9
- package/dist/web-react/use-document-dark.d.ts +1 -0
- package/dist/workspace-export/engine.d.ts +1 -6
- package/dist/workspace-export/index.js +198 -185
- package/dist/workspace-export/index.js.map +1 -1
- package/dist/workspace-export/routes.d.ts +1 -1
- package/dist/workspace-react/index.js +9 -8
- package/dist/workspace-react/index.js.map +1 -1
- package/package.json +7 -17
- package/dist/VaultPane-RXL3WLA2.js +0 -7
- package/dist/agent-profiles/reaper.d.ts +0 -31
- package/dist/agent-profiles/reaper.js +0 -29
- package/dist/agent-profiles/reaper.js.map +0 -1
- package/dist/chunk-4ZSLX3LY.js.map +0 -1
- package/dist/chunk-5IM2CLYX.js.map +0 -1
- package/dist/chunk-6OSJNJA2.js +0 -251
- package/dist/chunk-6OSJNJA2.js.map +0 -1
- package/dist/chunk-6PRQ45QE.js.map +0 -1
- package/dist/chunk-6ZIC6OG5.js.map +0 -1
- package/dist/chunk-BDEBQ4WO.js +0 -38
- package/dist/chunk-BDEBQ4WO.js.map +0 -1
- package/dist/chunk-BOQ4HVVH.js.map +0 -1
- package/dist/chunk-F2VX6TTJ.js.map +0 -1
- package/dist/chunk-FPNZMIAW.js.map +0 -1
- package/dist/chunk-HN6MZ2XL.js.map +0 -1
- package/dist/chunk-J2BBYVGF.js.map +0 -1
- package/dist/chunk-KJODHPWM.js.map +0 -1
- package/dist/chunk-LTWJYNEC.js +0 -100
- package/dist/chunk-LTWJYNEC.js.map +0 -1
- package/dist/chunk-LXYQOOXU.js.map +0 -1
- package/dist/chunk-MEKOWH5E.js.map +0 -1
- package/dist/chunk-NHYRIM4I.js.map +0 -1
- package/dist/chunk-NMZUW6VJ.js.map +0 -1
- package/dist/chunk-ORQD4AUO.js.map +0 -1
- package/dist/chunk-R4X5474U.js.map +0 -1
- package/dist/chunk-RL3Z747H.js.map +0 -1
- package/dist/chunk-TXUAGSFR.js.map +0 -1
- package/dist/chunk-UCCSJX64.js.map +0 -1
- package/dist/chunk-VJBFCNAU.js.map +0 -1
- package/dist/chunk-WSEXFTN4.js.map +0 -1
- package/dist/chunk-Y43PXON2.js.map +0 -1
- package/dist/chunk-ZBB5KQ6B.js.map +0 -1
- package/dist/eval/parity.d.ts +0 -74
- package/dist/mention-editor-B23OMFT2.js.map +0 -1
- package/dist/profile/humanizer-skill.d.ts +0 -23
- package/dist/profile/humanizer-skill.vendored.d.ts +0 -4
- package/dist/sequences-react/components/BrandMark.d.ts +0 -10
- package/dist/skills/marketplace-drizzle.d.ts +0 -121
- package/dist/skills/marketplace-drizzle.js +0 -34
- package/dist/skills/marketplace-drizzle.js.map +0 -1
- package/dist/teams-react/components/BrandMark.d.ts +0 -10
- /package/dist/{DesignCanvas-L6J72JQ2.js.map → DesignCanvas-IQKYAEC4.js.map} +0 -0
- /package/dist/{DesignCanvasEditor-QFQD63MR.js.map → DesignCanvasEditor-O7OCZTGC.js.map} +0 -0
- /package/dist/{TimelineEditor-7KBPJQLT.js.map → TimelineEditor-VB2UJ34D.js.map} +0 -0
- /package/dist/{VaultPane-RXL3WLA2.js.map → VaultPane-AYW7CO33.js.map} +0 -0
- /package/dist/{chunk-ATQQCG4I.js.map → chunk-2VJLLRVV.js.map} +0 -0
- /package/dist/{chunk-MDRH3SDA.js.map → chunk-54YIL7WM.js.map} +0 -0
- /package/dist/{chunk-6QJ3GB3A.js.map → chunk-5GSZGTPJ.js.map} +0 -0
- /package/dist/{chunk-ZDPUC6CM.js.map → chunk-6ZVSMA4T.js.map} +0 -0
- /package/dist/{chunk-LO6VQ35O.js.map → chunk-CQZVJVME.js.map} +0 -0
- /package/dist/{chunk-G4F2NWZH.js.map → chunk-FZ3ZFVAC.js.map} +0 -0
- /package/dist/{chunk-PDD5A43Y.js.map → chunk-UTL6TEN6.js.map} +0 -0
- /package/dist/{chunk-S27DKRI6.js.map → chunk-VDYEVCQQ.js.map} +0 -0
- /package/dist/{chunk-UFQM46NV.js.map → chunk-VK3F4N4U.js.map} +0 -0
- /package/dist/{chunk-FUZETA6Z.js.map → chunk-X6SZGQTK.js.map} +0 -0
|
@@ -1,33 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Delegation → FlowSpan converters — render what a mission's delegated agent
|
|
3
|
-
* runs actually did as ONE FlowTrace, drawable by the existing
|
|
4
|
-
* `renderWaterfall` (or any viewer that consumes FlowSpans).
|
|
5
|
-
*
|
|
6
|
-
* Two fidelities, one tree:
|
|
7
|
-
* - COARSE: `delegationActivityToFlowSpans` draws one 'tool' span per
|
|
8
|
-
* delegation from the StepAgentActivity snapshot (startedAt/durationMs) —
|
|
9
|
-
* available live, from the step's journaled lane.
|
|
10
|
-
* - FINE: `loopTraceEventsToFlowSpans` reconstructs agent-runtime's
|
|
11
|
-
* loop → round → iteration hierarchy from the LoopTraceEvent journal a
|
|
12
|
-
* delegation persists. Stable ids carry the hierarchy; descriptive names
|
|
13
|
-
* retain context in the ASCII waterfall as well.
|
|
14
|
-
*
|
|
15
|
-
* `composeMissionFlowTrace` lays a whole mission out: one 'pipeline' span per
|
|
16
|
-
* step, each step's delegations beneath it. Pure data transforms — the
|
|
17
|
-
* structural `LoopTraceEventLike` keeps this module free of the optional
|
|
18
|
-
* agent-runtime peer.
|
|
19
|
-
*/
|
|
1
|
+
/** Convert journaled step delegations into the flow trace shown by the mission activity lane. */
|
|
20
2
|
import type { StepAgentActivity } from '../missions/agent-activity';
|
|
21
3
|
import type { FlowSpan, FlowTrace } from '@tangle-network/charts';
|
|
22
|
-
/** Structural mirror of agent-runtime's `LoopTraceEvent` — same fields, no
|
|
23
|
-
* import, so journals parsed from JSON feed straight in. */
|
|
24
|
-
export interface LoopTraceEventLike {
|
|
25
|
-
kind: string;
|
|
26
|
-
runId: string;
|
|
27
|
-
/** Epoch ms. */
|
|
28
|
-
timestamp: number;
|
|
29
|
-
payload: object;
|
|
30
|
-
}
|
|
31
4
|
/**
|
|
32
5
|
* One 'tool' FlowSpan per delegation, positioned relative to `turnStartMs`
|
|
33
6
|
* (the epoch-ms origin of the trace — usually the step or mission start).
|
|
@@ -39,14 +12,6 @@ export interface LoopTraceEventLike {
|
|
|
39
12
|
export declare function delegationActivityToFlowSpans(activity: StepAgentActivity[], turnStartMs: number, opts?: {
|
|
40
13
|
nowMs?: number;
|
|
41
14
|
}): FlowSpan[];
|
|
42
|
-
/**
|
|
43
|
-
* Reconstruct one delegation's loop → round → iteration tree from its
|
|
44
|
-
* journaled LoopTraceEvents, as FlowSpans relative to `loop.started` (or the
|
|
45
|
-
* first event). Mirrors agent-runtime's `buildLoopOtelSpans` topology:
|
|
46
|
-
* rounds open on `loop.plan` and flush on the next plan / `loop.decision` /
|
|
47
|
-
* `loop.ended`; iterations span `loop.iteration.started` → `.ended`.
|
|
48
|
-
*/
|
|
49
|
-
export declare function loopTraceEventsToFlowSpans(events: LoopTraceEventLike[]): FlowSpan[];
|
|
50
15
|
/**
|
|
51
16
|
* A single step's activity lane as its own FlowTrace — what a per-step
|
|
52
17
|
* drill-in renders. Origin defaults to the earliest delegation start so the
|
|
@@ -56,26 +21,3 @@ export declare function stepActivityFlowTrace(activity: StepAgentActivity[], opt
|
|
|
56
21
|
startedAt?: number;
|
|
57
22
|
nowMs?: number;
|
|
58
23
|
}): FlowTrace;
|
|
59
|
-
/** Define a step in a mission flow with id, intent, optional status, start time, and duration */
|
|
60
|
-
export interface MissionFlowStep {
|
|
61
|
-
id: string;
|
|
62
|
-
intent: string;
|
|
63
|
-
status?: string;
|
|
64
|
-
/** Epoch ms the step attempt started. Absent → laid out sequentially after
|
|
65
|
-
* the previous step (missions run steps in order), `approx` flagged. */
|
|
66
|
-
startedAt?: number;
|
|
67
|
-
durationMs?: number;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Compose a mission-wide FlowTrace: one 'pipeline' span per step, the step's
|
|
71
|
-
* delegated runs ('tool' spans, from `activity[stepId]`) beneath it. A step
|
|
72
|
-
* span always covers its delegations' extent. Cost is the sum of delegation
|
|
73
|
-
* `costUsd`; token counts are not knowable from the activity lane and stay 0.
|
|
74
|
-
*/
|
|
75
|
-
export declare function composeMissionFlowTrace(input: {
|
|
76
|
-
steps: MissionFlowStep[];
|
|
77
|
-
/** Delegated-run snapshots keyed by step id (the step's `agentActivity`). */
|
|
78
|
-
activity?: Record<string, StepAgentActivity[]>;
|
|
79
|
-
/** Epoch-ms origin. Default: the earliest known step/delegation start. */
|
|
80
|
-
startedAt?: number;
|
|
81
|
-
}): FlowTrace;
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
*/
|
|
27
27
|
export { classifyTurnOutcome, describeReason, type TurnHealthReason, type TurnHealthSeverity, type TurnHealthVerdict, type TurnOutcomeInput, } from './classify.js';
|
|
28
28
|
export { createTurnHealthLifecycle, type TurnHealthCompleteInfo, type TurnHealthErrorInfo, type TurnHealthLifecycle, type TurnHealthLifecycleOptions, } from './lifecycle.js';
|
|
29
|
-
export { type AlertSink, type AlertThrottleStore, createConsoleAlertSink, createGuardedAlertSink, createMemoryThrottleStore, createMultiAlertSink, createSlackBotAlertSink, createThrottledAlertSink, createWebhookAlertSink, type
|
|
29
|
+
export { type AlertSink, type AlertThrottleStore, createConsoleAlertSink, createGuardedAlertSink, createMemoryThrottleStore, createMultiAlertSink, createSlackBotAlertSink, createThrottledAlertSink, createWebhookAlertSink, type TurnHealthAlert, turnAlert, } from './sink.js';
|
|
30
30
|
export { createD1TurnHealthSource, type D1LikeForHealth, SHELL_ERROR_REPLY_PREFIXES, type PersistedTurnRow, sweepSilentFailures, type SweepOptions, type SweepResult, type TurnHealthSource, type UnansweredThread, } from './sweep.js';
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
createWebhookAlertSink,
|
|
14
14
|
describeReason,
|
|
15
15
|
turnAlert
|
|
16
|
-
} from "../chunk-
|
|
17
|
-
import "../chunk-
|
|
16
|
+
} from "../chunk-XOHE6SKU.js";
|
|
17
|
+
import "../chunk-JRCZHDRG.js";
|
|
18
18
|
|
|
19
19
|
// src/turn-health/lifecycle.ts
|
|
20
20
|
function errorText(error) {
|
|
@@ -44,7 +44,7 @@ export declare function turnAlert(input: {
|
|
|
44
44
|
}): TurnHealthAlert;
|
|
45
45
|
/** Minimal structural fetch, so this module has no lib-dom dependency and can
|
|
46
46
|
* be driven by a fake in tests. */
|
|
47
|
-
|
|
47
|
+
type FetchLike = (url: string, init: {
|
|
48
48
|
method: string;
|
|
49
49
|
headers: Record<string, string>;
|
|
50
50
|
body: string;
|
|
@@ -120,3 +120,4 @@ export declare function createThrottledAlertSink(inner: AlertSink, options: {
|
|
|
120
120
|
* cron run should go red.
|
|
121
121
|
*/
|
|
122
122
|
export declare function createGuardedAlertSink(inner: AlertSink, onError?: (error: unknown) => void): AlertSink;
|
|
123
|
+
export {};
|
package/dist/turn-trace/index.js
CHANGED
|
@@ -1,28 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
2
|
nextCallIndex,
|
|
3
3
|
tracedModelFetch
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-VK3F4N4U.js";
|
|
5
5
|
import {
|
|
6
6
|
TURN_SPAN_KINDS,
|
|
7
7
|
buildTurnTraceOtelSpans,
|
|
8
8
|
createIntelligenceTurnTraceSink,
|
|
9
9
|
createTurnTrace,
|
|
10
10
|
formatServerTiming,
|
|
11
|
-
isTraceId,
|
|
12
11
|
otlpTraceId,
|
|
13
12
|
parseServerTiming,
|
|
14
13
|
resolveIngestKey,
|
|
15
14
|
serverTimingAttrs,
|
|
16
15
|
summarizeTurnSpans,
|
|
17
16
|
turnTraceId
|
|
18
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-PCAY23GS.js";
|
|
19
18
|
export {
|
|
20
19
|
TURN_SPAN_KINDS,
|
|
21
20
|
buildTurnTraceOtelSpans,
|
|
22
21
|
createIntelligenceTurnTraceSink,
|
|
23
22
|
createTurnTrace,
|
|
24
23
|
formatServerTiming,
|
|
25
|
-
isTraceId,
|
|
26
24
|
nextCallIndex,
|
|
27
25
|
otlpTraceId,
|
|
28
26
|
parseServerTiming,
|
|
@@ -133,8 +133,6 @@ export interface CreateTurnTraceOptions {
|
|
|
133
133
|
readonly queries: number;
|
|
134
134
|
};
|
|
135
135
|
}
|
|
136
|
-
/** True when the Router and the Sandbox API keep this id as a `x-tangle-trace-id`. */
|
|
137
|
-
export declare function isTraceId(value: string): boolean;
|
|
138
136
|
/**
|
|
139
137
|
* The turn's execution id as a trace id. Execution ids carry `:` (`app:session:turn`),
|
|
140
138
|
* which the Router drops from `x-tangle-trace-id`, so every character outside
|
|
@@ -1,22 +1,2 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The shared 3-pane vault: tree | artifact viewer | optional agent dock. This is
|
|
3
|
-
* shell mechanism — selection, the dirty-guard + pending-nav state machine,
|
|
4
|
-
* rich/source editor modes, create/delete/refresh, skeletons, and an error
|
|
5
|
-
* boundary — plus the vault's tree (sandbox-ui's `VaultTree`) in a contained surface. It
|
|
6
|
-
* renders no artifact viewer of its own: that arrives through the
|
|
7
|
-
* `renderArtifact` / `renderDock` seams, and `renderTree` can replace the tree.
|
|
8
|
-
*
|
|
9
|
-
* Data flows exclusively through `port` (a `VaultDataPort`). The pane never
|
|
10
|
-
* imports a fetch client, a router, a toast system, or a markdown library — the
|
|
11
|
-
* optional `codec` seam supplies rich/source parsing (identity passthrough by
|
|
12
|
-
* default). Chrome uses the shared theme tokens (bg-card, border-border, …).
|
|
13
|
-
*/
|
|
14
1
|
import type { VaultPaneHandle, VaultPaneProps } from './contracts';
|
|
15
|
-
/**
|
|
16
|
-
* Browse and edit files in the available pane width.
|
|
17
|
-
* Below 60rem, Files and the selected document share one pane, so an open
|
|
18
|
-
* document gets the whole width: beside a 23rem tree, a narrower pane left a
|
|
19
|
-
* GTM call sheet's table about 385px and hid its third column.
|
|
20
|
-
* Switching panes keeps the editor mounted and preserves unsaved changes.
|
|
21
|
-
*/
|
|
22
2
|
export declare const VaultPane: import("react").ForwardRefExoticComponent<VaultPaneProps & import("react").RefAttributes<VaultPaneHandle>>;
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
import { collectTreePaths } from './vault-tree-paths';
|
|
2
|
+
import type { VaultEditorMode, VaultFile, VaultMarkdownCodec, VaultOperation, VaultOperationFailure, VaultOperationPhase, VaultPaneProps, VaultRichParts, VaultTreeNode } from './contracts';
|
|
3
|
+
export interface VaultSaveScope {
|
|
4
|
+
key: object;
|
|
5
|
+
port: VaultPaneProps['port'];
|
|
6
|
+
path: string | null;
|
|
7
|
+
canWrite: boolean;
|
|
8
|
+
historyOpen: boolean;
|
|
9
|
+
}
|
|
10
|
+
export type VaultPendingNavigation = {
|
|
11
|
+
path: string;
|
|
12
|
+
request?: VaultPendingOpen;
|
|
13
|
+
} | null;
|
|
14
|
+
export type VaultPendingOpen = {
|
|
15
|
+
path: string;
|
|
16
|
+
fromPath: string | null;
|
|
17
|
+
resolve: (opened: boolean) => void;
|
|
18
|
+
loaded: boolean;
|
|
19
|
+
selected: boolean;
|
|
20
|
+
};
|
|
21
|
+
export interface VaultTreeRefreshContext {
|
|
22
|
+
operation: Extract<VaultOperation, 'list' | 'create' | 'delete'>;
|
|
23
|
+
phase: VaultOperationPhase;
|
|
24
|
+
path?: string;
|
|
25
|
+
selectAfterRecovery?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface VaultTreeFailureState {
|
|
28
|
+
failure: VaultOperationFailure;
|
|
29
|
+
context: VaultTreeRefreshContext;
|
|
30
|
+
}
|
|
31
|
+
export declare function finishVaultPendingOpen(opened: boolean, clearNavigation: boolean | undefined, { pendingOpenRef, setPendingNav }: {
|
|
32
|
+
pendingOpenRef: {
|
|
33
|
+
current: VaultPendingOpen | null;
|
|
34
|
+
};
|
|
35
|
+
setPendingNav: (value: VaultPendingNavigation | ((current: VaultPendingNavigation) => VaultPendingNavigation)) => void;
|
|
36
|
+
}): void;
|
|
37
|
+
export declare function commitVaultPath(next: string | null, { controlled, onSelectedPathChange, setInternalPath }: {
|
|
38
|
+
controlled: boolean;
|
|
39
|
+
onSelectedPathChange: VaultPaneProps['onSelectedPathChange'];
|
|
40
|
+
setInternalPath: (value: string | null | ((current: string | null) => string | null)) => void;
|
|
41
|
+
}): boolean;
|
|
42
|
+
export declare function reportVaultOperationFailure(operation: VaultOperation, phase: VaultOperationPhase, error: unknown, fallback: string, path: string | undefined, { onOperationErrorRef }: {
|
|
43
|
+
onOperationErrorRef: {
|
|
44
|
+
current: VaultPaneProps['onOperationError'];
|
|
45
|
+
};
|
|
46
|
+
}): VaultOperationFailure;
|
|
47
|
+
export declare function refreshVaultTree(context: VaultTreeRefreshContext | undefined, { treeRequestRef, setTreeLoading, setTreeError, port, setTree, setTreeLoaded, reportFailure, label }: {
|
|
48
|
+
treeRequestRef: {
|
|
49
|
+
current: number;
|
|
50
|
+
};
|
|
51
|
+
setTreeLoading: (value: boolean | ((current: boolean) => boolean)) => void;
|
|
52
|
+
setTreeError: (value: VaultTreeFailureState | null | ((current: VaultTreeFailureState | null) => VaultTreeFailureState | null)) => void;
|
|
53
|
+
port: VaultPaneProps['port'];
|
|
54
|
+
setTree: (value: VaultTreeNode[] | ((current: VaultTreeNode[]) => VaultTreeNode[])) => void;
|
|
55
|
+
setTreeLoaded: (value: boolean | ((current: boolean) => boolean)) => void;
|
|
56
|
+
reportFailure: (operation: VaultOperation, phase: VaultOperationPhase, error: unknown, fallback: string, path?: string) => VaultOperationFailure;
|
|
57
|
+
label: string;
|
|
58
|
+
}): Promise<boolean>;
|
|
59
|
+
export declare function openVaultFile(rawPath: string, resolve: ((opened: boolean) => void) | undefined, { treePaths, finishPendingOpen, setPendingNav, selectedPath, selectedFile, displayReadyPath, showDocument, pendingOpenRef, fileLoading, readError, treeError, treeLoaded, setReloadNonce, isDirty, commitPath }: {
|
|
60
|
+
treePaths: ReturnType<typeof collectTreePaths>;
|
|
61
|
+
finishPendingOpen: (opened: boolean, clearNavigation?: boolean) => void;
|
|
62
|
+
setPendingNav: (value: VaultPendingNavigation | ((current: VaultPendingNavigation) => VaultPendingNavigation)) => void;
|
|
63
|
+
selectedPath: string | null;
|
|
64
|
+
selectedFile: VaultFile | null;
|
|
65
|
+
displayReadyPath: string | null;
|
|
66
|
+
showDocument: () => void;
|
|
67
|
+
pendingOpenRef: {
|
|
68
|
+
current: VaultPendingOpen | null;
|
|
69
|
+
};
|
|
70
|
+
fileLoading: boolean;
|
|
71
|
+
readError: string | null;
|
|
72
|
+
treeError: VaultTreeFailureState | null;
|
|
73
|
+
treeLoaded: boolean;
|
|
74
|
+
setReloadNonce: (value: number | ((current: number) => number)) => void;
|
|
75
|
+
isDirty: boolean;
|
|
76
|
+
commitPath: (next: string | null) => boolean;
|
|
77
|
+
}): void;
|
|
78
|
+
export declare function discardVaultDraft({ pendingNav, setPendingNav, pendingOpenRef, commitPath, finishPendingOpen, setIsDirty, showDocument }: {
|
|
79
|
+
pendingNav: VaultPendingNavigation;
|
|
80
|
+
setPendingNav: (value: VaultPendingNavigation | ((current: VaultPendingNavigation) => VaultPendingNavigation)) => void;
|
|
81
|
+
pendingOpenRef: {
|
|
82
|
+
current: VaultPendingOpen | null;
|
|
83
|
+
};
|
|
84
|
+
commitPath: (next: string | null) => boolean;
|
|
85
|
+
finishPendingOpen: (opened: boolean, clearNavigation?: boolean) => void;
|
|
86
|
+
setIsDirty: (value: boolean | ((current: boolean) => boolean)) => void;
|
|
87
|
+
showDocument: () => void;
|
|
88
|
+
}): void;
|
|
89
|
+
export declare function showVaultRichMode({ setEditorMode, activeCodec, sourceDraft, draftContentRef, dirtyRef, savedContentRef, editorModeRef, setRichDraft, setIsDirty }: {
|
|
90
|
+
setEditorMode: (value: VaultEditorMode | ((current: VaultEditorMode) => VaultEditorMode)) => void;
|
|
91
|
+
activeCodec: VaultMarkdownCodec;
|
|
92
|
+
sourceDraft: string;
|
|
93
|
+
draftContentRef: {
|
|
94
|
+
current: string;
|
|
95
|
+
};
|
|
96
|
+
dirtyRef: {
|
|
97
|
+
current: boolean;
|
|
98
|
+
};
|
|
99
|
+
savedContentRef: {
|
|
100
|
+
current: string;
|
|
101
|
+
};
|
|
102
|
+
editorModeRef: {
|
|
103
|
+
current: VaultEditorMode;
|
|
104
|
+
};
|
|
105
|
+
setRichDraft: (value: VaultRichParts | ((current: VaultRichParts) => VaultRichParts)) => void;
|
|
106
|
+
setIsDirty: (value: boolean | ((current: boolean) => boolean)) => void;
|
|
107
|
+
}): void;
|
|
108
|
+
export declare function showVaultSourceMode({ setEditorMode, isDirty, activeCodec, richDraft, savedContentRef, draftContentRef, dirtyRef, editorModeRef, setSourceDraft, setIsDirty }: {
|
|
109
|
+
setEditorMode: (value: VaultEditorMode | ((current: VaultEditorMode) => VaultEditorMode)) => void;
|
|
110
|
+
isDirty: boolean;
|
|
111
|
+
activeCodec: VaultMarkdownCodec;
|
|
112
|
+
richDraft: VaultRichParts;
|
|
113
|
+
savedContentRef: {
|
|
114
|
+
current: string;
|
|
115
|
+
};
|
|
116
|
+
draftContentRef: {
|
|
117
|
+
current: string;
|
|
118
|
+
};
|
|
119
|
+
dirtyRef: {
|
|
120
|
+
current: boolean;
|
|
121
|
+
};
|
|
122
|
+
editorModeRef: {
|
|
123
|
+
current: VaultEditorMode;
|
|
124
|
+
};
|
|
125
|
+
setSourceDraft: (value: string | ((current: string) => string)) => void;
|
|
126
|
+
setIsDirty: (value: boolean | ((current: boolean) => boolean)) => void;
|
|
127
|
+
}): void;
|
|
128
|
+
export declare function changeVaultSource(next: string, { mountedRef, editorModeRef, saveScopeRef, saveScopeKey, draftContentRef, dirtyRef, savedContentRef, setSourceDraft, setIsDirty }: {
|
|
129
|
+
mountedRef: {
|
|
130
|
+
current: boolean;
|
|
131
|
+
};
|
|
132
|
+
editorModeRef: {
|
|
133
|
+
current: VaultEditorMode;
|
|
134
|
+
};
|
|
135
|
+
saveScopeRef: {
|
|
136
|
+
current: VaultSaveScope;
|
|
137
|
+
};
|
|
138
|
+
saveScopeKey: object;
|
|
139
|
+
draftContentRef: {
|
|
140
|
+
current: string;
|
|
141
|
+
};
|
|
142
|
+
dirtyRef: {
|
|
143
|
+
current: boolean;
|
|
144
|
+
};
|
|
145
|
+
savedContentRef: {
|
|
146
|
+
current: string;
|
|
147
|
+
};
|
|
148
|
+
setSourceDraft: (value: string | ((current: string) => string)) => void;
|
|
149
|
+
setIsDirty: (value: boolean | ((current: boolean) => boolean)) => void;
|
|
150
|
+
}): void;
|
|
151
|
+
export declare function changeVaultRichDraft(next: VaultRichParts, { mountedRef, editorModeRef, saveScopeRef, saveScopeKey, draftContentRef, activeCodec, dirtyRef, savedContentRef, setRichDraft, setIsDirty }: {
|
|
152
|
+
mountedRef: {
|
|
153
|
+
current: boolean;
|
|
154
|
+
};
|
|
155
|
+
editorModeRef: {
|
|
156
|
+
current: VaultEditorMode;
|
|
157
|
+
};
|
|
158
|
+
saveScopeRef: {
|
|
159
|
+
current: VaultSaveScope;
|
|
160
|
+
};
|
|
161
|
+
saveScopeKey: object;
|
|
162
|
+
draftContentRef: {
|
|
163
|
+
current: string;
|
|
164
|
+
};
|
|
165
|
+
activeCodec: VaultMarkdownCodec;
|
|
166
|
+
dirtyRef: {
|
|
167
|
+
current: boolean;
|
|
168
|
+
};
|
|
169
|
+
savedContentRef: {
|
|
170
|
+
current: string;
|
|
171
|
+
};
|
|
172
|
+
setRichDraft: (value: VaultRichParts | ((current: VaultRichParts) => VaultRichParts)) => void;
|
|
173
|
+
setIsDirty: (value: boolean | ((current: boolean) => boolean)) => void;
|
|
174
|
+
}): void;
|
|
175
|
+
export declare function saveVaultFile({ saveScopeRef, mountedRef, selectedFile, dirtyRef, saveScopeKey, port, saveRequestRef, draftContentRef, setSaving, setSaveError, savedContentRef, savedResultRef, setSelectedFile, setIsDirty, setSourceDraft, setRichDraft, activeCodec, reportFailure, loadedPathRef }: {
|
|
176
|
+
saveScopeRef: {
|
|
177
|
+
current: VaultSaveScope;
|
|
178
|
+
};
|
|
179
|
+
mountedRef: {
|
|
180
|
+
current: boolean;
|
|
181
|
+
};
|
|
182
|
+
selectedFile: VaultFile | null;
|
|
183
|
+
dirtyRef: {
|
|
184
|
+
current: boolean;
|
|
185
|
+
};
|
|
186
|
+
saveScopeKey: object;
|
|
187
|
+
port: VaultPaneProps['port'];
|
|
188
|
+
saveRequestRef: {
|
|
189
|
+
current: object | null;
|
|
190
|
+
};
|
|
191
|
+
draftContentRef: {
|
|
192
|
+
current: string;
|
|
193
|
+
};
|
|
194
|
+
setSaving: (value: boolean | ((current: boolean) => boolean)) => void;
|
|
195
|
+
setSaveError: (value: VaultOperationFailure | null | ((current: VaultOperationFailure | null) => VaultOperationFailure | null)) => void;
|
|
196
|
+
savedContentRef: {
|
|
197
|
+
current: string;
|
|
198
|
+
};
|
|
199
|
+
savedResultRef: {
|
|
200
|
+
current: VaultFile | null;
|
|
201
|
+
};
|
|
202
|
+
setSelectedFile: (value: VaultFile | null | ((current: VaultFile | null) => VaultFile | null)) => void;
|
|
203
|
+
setIsDirty: (value: boolean | ((current: boolean) => boolean)) => void;
|
|
204
|
+
setSourceDraft: (value: string | ((current: string) => string)) => void;
|
|
205
|
+
setRichDraft: (value: VaultRichParts | ((current: VaultRichParts) => VaultRichParts)) => void;
|
|
206
|
+
activeCodec: VaultMarkdownCodec;
|
|
207
|
+
reportFailure: (operation: VaultOperation, phase: VaultOperationPhase, error: unknown, fallback: string, path?: string) => VaultOperationFailure;
|
|
208
|
+
loadedPathRef: {
|
|
209
|
+
current: string | null;
|
|
210
|
+
};
|
|
211
|
+
}): Promise<void>;
|
|
212
|
+
export declare function createVaultFile({ newPath, setCreating, setCreateError, port, setCreateOpen, setNewPath, refresh, commitPath, reportFailure }: {
|
|
213
|
+
newPath: string;
|
|
214
|
+
setCreating: (value: boolean | ((current: boolean) => boolean)) => void;
|
|
215
|
+
setCreateError: (value: VaultOperationFailure | null | ((current: VaultOperationFailure | null) => VaultOperationFailure | null)) => void;
|
|
216
|
+
port: VaultPaneProps['port'];
|
|
217
|
+
setCreateOpen: (value: boolean | ((current: boolean) => boolean)) => void;
|
|
218
|
+
setNewPath: (value: string | ((current: string) => string)) => void;
|
|
219
|
+
refresh: (context?: VaultTreeRefreshContext) => Promise<boolean>;
|
|
220
|
+
commitPath: (next: string | null) => boolean;
|
|
221
|
+
reportFailure: (operation: VaultOperation, phase: VaultOperationPhase, error: unknown, fallback: string, path?: string) => VaultOperationFailure;
|
|
222
|
+
}): Promise<void>;
|
|
223
|
+
export declare function deleteVaultFile({ selectedFile, setDeleting, setDeleteError, port, setDeleteOpen, setIsDirty, commitPath, setSelectedFile, refresh, reportFailure }: {
|
|
224
|
+
selectedFile: VaultFile | null;
|
|
225
|
+
setDeleting: (value: boolean | ((current: boolean) => boolean)) => void;
|
|
226
|
+
setDeleteError: (value: VaultOperationFailure | null | ((current: VaultOperationFailure | null) => VaultOperationFailure | null)) => void;
|
|
227
|
+
port: VaultPaneProps['port'];
|
|
228
|
+
setDeleteOpen: (value: boolean | ((current: boolean) => boolean)) => void;
|
|
229
|
+
setIsDirty: (value: boolean | ((current: boolean) => boolean)) => void;
|
|
230
|
+
commitPath: (next: string | null) => boolean;
|
|
231
|
+
setSelectedFile: (value: VaultFile | null | ((current: VaultFile | null) => VaultFile | null)) => void;
|
|
232
|
+
refresh: (context?: VaultTreeRefreshContext) => Promise<boolean>;
|
|
233
|
+
reportFailure: (operation: VaultOperation, phase: VaultOperationPhase, error: unknown, fallback: string, path?: string) => VaultOperationFailure;
|
|
234
|
+
}): Promise<void>;
|
|
235
|
+
export declare function restoreVaultRevision(content: string, { saveScopeRef, mountedRef, selectedFile, saveScopeKey, port, dirtyRef, saveRequestRef, setSaving, setHistoryOpen, setReloadNonce }: {
|
|
236
|
+
saveScopeRef: {
|
|
237
|
+
current: VaultSaveScope;
|
|
238
|
+
};
|
|
239
|
+
mountedRef: {
|
|
240
|
+
current: boolean;
|
|
241
|
+
};
|
|
242
|
+
selectedFile: VaultFile | null;
|
|
243
|
+
saveScopeKey: object;
|
|
244
|
+
port: VaultPaneProps['port'];
|
|
245
|
+
dirtyRef: {
|
|
246
|
+
current: boolean;
|
|
247
|
+
};
|
|
248
|
+
saveRequestRef: {
|
|
249
|
+
current: object | null;
|
|
250
|
+
};
|
|
251
|
+
setSaving: (value: boolean | ((current: boolean) => boolean)) => void;
|
|
252
|
+
setHistoryOpen: (value: boolean | ((current: boolean) => boolean)) => void;
|
|
253
|
+
setReloadNonce: (value: number | ((current: number) => number)) => void;
|
|
254
|
+
}): Promise<void>;
|
|
255
|
+
export declare function readVaultSelectedFile({ selectedPath, setSelectedFile, setFileLoading, setReadError, loadedPathRef, treeError, pendingOpenRef, treeLoading, treeLoaded, isDirty, saving, resolvedSelectedPath, finishPendingOpen, commitPath, port, dirtyRef, reportFailure }: {
|
|
256
|
+
selectedPath: string | null;
|
|
257
|
+
setSelectedFile: (value: VaultFile | null | ((current: VaultFile | null) => VaultFile | null)) => void;
|
|
258
|
+
setFileLoading: (value: boolean | ((current: boolean) => boolean)) => void;
|
|
259
|
+
setReadError: (value: string | null | ((current: string | null) => string | null)) => void;
|
|
260
|
+
loadedPathRef: {
|
|
261
|
+
current: string | null;
|
|
262
|
+
};
|
|
263
|
+
treeError: VaultTreeFailureState | null;
|
|
264
|
+
pendingOpenRef: {
|
|
265
|
+
current: VaultPendingOpen | null;
|
|
266
|
+
};
|
|
267
|
+
treeLoading: boolean;
|
|
268
|
+
treeLoaded: boolean;
|
|
269
|
+
isDirty: boolean;
|
|
270
|
+
saving: boolean;
|
|
271
|
+
resolvedSelectedPath: string | null;
|
|
272
|
+
finishPendingOpen: (opened: boolean, clearNavigation?: boolean) => void;
|
|
273
|
+
commitPath: (next: string | null) => boolean;
|
|
274
|
+
port: VaultPaneProps['port'];
|
|
275
|
+
dirtyRef: {
|
|
276
|
+
current: boolean;
|
|
277
|
+
};
|
|
278
|
+
reportFailure: (operation: VaultOperation, phase: VaultOperationPhase, error: unknown, fallback: string, path?: string) => VaultOperationFailure;
|
|
279
|
+
}): (() => void) | undefined;
|
|
280
|
+
export declare function reconcileVaultSelectedFile({ selectedFile, loadedPathRef, setDisplayReadyPath, savedContentRef, draftContentRef, setRichDraft, setSourceDraft, setEditorMode, setIsDirty, setSaveError, savedResultRef, activeCodec, setDockOpen }: {
|
|
281
|
+
selectedFile: VaultFile | null;
|
|
282
|
+
loadedPathRef: {
|
|
283
|
+
current: string | null;
|
|
284
|
+
};
|
|
285
|
+
setDisplayReadyPath: (value: string | null | ((current: string | null) => string | null)) => void;
|
|
286
|
+
savedContentRef: {
|
|
287
|
+
current: string;
|
|
288
|
+
};
|
|
289
|
+
draftContentRef: {
|
|
290
|
+
current: string;
|
|
291
|
+
};
|
|
292
|
+
setRichDraft: (value: VaultRichParts | ((current: VaultRichParts) => VaultRichParts)) => void;
|
|
293
|
+
setSourceDraft: (value: string | ((current: string) => string)) => void;
|
|
294
|
+
setEditorMode: (value: VaultEditorMode | ((current: VaultEditorMode) => VaultEditorMode)) => void;
|
|
295
|
+
setIsDirty: (value: boolean | ((current: boolean) => boolean)) => void;
|
|
296
|
+
setSaveError: (value: VaultOperationFailure | null | ((current: VaultOperationFailure | null) => VaultOperationFailure | null)) => void;
|
|
297
|
+
savedResultRef: {
|
|
298
|
+
current: VaultFile | null;
|
|
299
|
+
};
|
|
300
|
+
activeCodec: VaultMarkdownCodec;
|
|
301
|
+
setDockOpen: (value: boolean | ((current: boolean) => boolean)) => void;
|
|
302
|
+
}): void;
|
|
303
|
+
export declare function completeVaultPendingOpen({ pendingOpenRef, selectedPath, selectedFile, displayReadyPath, sourceDraft, fileLoading, finishPendingOpen }: {
|
|
304
|
+
pendingOpenRef: {
|
|
305
|
+
current: VaultPendingOpen | null;
|
|
306
|
+
};
|
|
307
|
+
selectedPath: string | null;
|
|
308
|
+
selectedFile: VaultFile | null;
|
|
309
|
+
displayReadyPath: string | null;
|
|
310
|
+
sourceDraft: string;
|
|
311
|
+
fileLoading: boolean;
|
|
312
|
+
finishPendingOpen: (opened: boolean, clearNavigation?: boolean) => void;
|
|
313
|
+
}): void;
|
|
314
|
+
export declare function retryVaultTreeRefresh({ treeError, refresh, commitPath }: {
|
|
315
|
+
treeError: VaultTreeFailureState | null;
|
|
316
|
+
refresh: (context?: VaultTreeRefreshContext) => Promise<boolean>;
|
|
317
|
+
commitPath: (next: string | null) => boolean;
|
|
318
|
+
}): Promise<void>;
|
package/dist/vault/index.js
CHANGED
package/dist/vault/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/vault/index.ts"],"sourcesContent":["/**\n * `@tangle-network/agent-app/vault` — the shared 3-pane VaultPane (tree |\n * artifact viewer | optional agent dock) every Tangle agent product otherwise\n * hand-rolls: selection, the dirty-guard state machine, rich/source editor\n * modes, create/delete, skeletons, an error boundary, and the vault's file tree\n * (`VaultTree`, owned by `@tangle-network/sandbox-ui/vault-tree` and re-exported here). The product supplies the data (`VaultDataPort`) and the artifact\n * renderer; the pane imports no artifact viewer and no dialog library.\n *\n * Never re-exported from the package root barrel — `react` is an optional peer\n * and DOM access begins only inside component render. A `React.lazy` code-split\n * entry lives at `./vault/lazy`.\n */\nexport * from './contracts'\nexport { VaultPane } from './VaultPane'\nexport { VaultTree, VAULT_TREE_CHILD_PAGE, type VaultTreeProps } from '@tangle-network/sandbox-ui/vault-tree'\nexport { ConfirmDialog, type ConfirmDialogProps } from './ConfirmDialog'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/vault/index.ts"],"sourcesContent":["/**\n * `@tangle-network/agent-app/vault` — the shared 3-pane VaultPane (tree |\n * artifact viewer | optional agent dock) every Tangle agent product otherwise\n * hand-rolls: selection, the dirty-guard state machine, rich/source editor\n * modes, create/delete, skeletons, an error boundary, and the vault's file tree\n * (`VaultTree`, owned by `@tangle-network/sandbox-ui/vault-tree` and re-exported here). The product supplies the data (`VaultDataPort`) and the artifact\n * renderer; the pane imports no artifact viewer and no dialog library.\n *\n * Never re-exported from the package root barrel — `react` is an optional peer\n * and DOM access begins only inside component render. A `React.lazy` code-split\n * entry lives at `./vault/lazy`.\n */\nexport * from './contracts'\nexport { VaultPane } from './VaultPane'\nexport { VaultTree, VAULT_TREE_CHILD_PAGE, type VaultTreeProps } from '@tangle-network/sandbox-ui/vault-tree'\nexport { ConfirmDialog, type ConfirmDialogProps } from './ConfirmDialog'\n"],"mappings":";;;;;;;AAcA,SAAS,WAAW,6BAAkD;","names":[]}
|
package/dist/vault/lazy.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/vault/lazy.tsx
|
|
2
2
|
import { lazy } from "react";
|
|
3
3
|
var VaultPaneLazy = lazy(
|
|
4
|
-
() => import("../VaultPane-
|
|
4
|
+
() => import("../VaultPane-AYW7CO33.js").then((m) => ({ default: m.VaultPane }))
|
|
5
5
|
);
|
|
6
6
|
export {
|
|
7
7
|
VaultPaneLazy
|
|
@@ -101,5 +101,4 @@ export interface AgentProfileEditorProps {
|
|
|
101
101
|
/** Host-supplied registry discovery (agent-app#776). Omit to hide catalog search entirely. */
|
|
102
102
|
registry?: AgentProfileRegistryPort;
|
|
103
103
|
}
|
|
104
|
-
|
|
105
|
-
export declare function AgentProfileEditor({ value, onChange, disabled, className, config, allowedResourceKinds, filePathPrefix, allowExecutableFiles, requireGitHubCommitSha, requireUniqueSkillNames, showToolsAndPermissions, publicHttpsMcpOnly, registry, onSaveStateChange }: AgentProfileEditorProps): import("react").JSX.Element;
|
|
104
|
+
export declare function AgentProfileEditor(props: AgentProfileEditorProps): import("react").JSX.Element;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AGENT_PROFILE_EDITOR_SECTIONS,
|
|
3
3
|
AgentProfileEditor
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-FTNGGR37.js";
|
|
5
|
+
import "../chunk-FZ3ZFVAC.js";
|
|
6
|
+
import "../chunk-X6SZGQTK.js";
|
|
7
|
+
import "../chunk-52SDU43B.js";
|
|
8
|
+
import "../chunk-ZAMHLXNS.js";
|
|
8
9
|
import "../chunk-RASGKEAL.js";
|
|
9
10
|
import "../chunk-B7CL7ENS.js";
|
|
10
11
|
import "../chunk-AMUXRAUO.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-ELX5YITO.js";
|
|
12
13
|
import "../chunk-PV33JZKV.js";
|
|
13
14
|
export {
|
|
14
15
|
AGENT_PROFILE_EDITOR_SECTIONS,
|
|
@@ -36,4 +36,4 @@
|
|
|
36
36
|
*/
|
|
37
37
|
import type { ChatComposerProps } from './chat-composer-types';
|
|
38
38
|
export * from './chat-composer-types';
|
|
39
|
-
export declare function ChatComposer(
|
|
39
|
+
export declare function ChatComposer(props: ChatComposerProps): import("react").JSX.Element;
|
|
@@ -58,7 +58,9 @@ export interface UseDurablePlanFlowOptions {
|
|
|
58
58
|
plan: ChatPlan;
|
|
59
59
|
client: DurablePlanDecisionClient;
|
|
60
60
|
/** Must be idempotent by receipt.receiptId. */
|
|
61
|
-
attachFollowUp?: (receipt: DurablePlanFollowUpReceipt) => Promise<void> | void;
|
|
61
|
+
attachFollowUp?: (receipt: DurablePlanFollowUpReceipt, plan: ChatPlan, decision: DurablePlanDecision) => Promise<void> | void;
|
|
62
|
+
/** Restore an already-decided plan and bound failed follow-up attachment attempts. */
|
|
63
|
+
autoRestore?: boolean;
|
|
62
64
|
onUpdated?: (plan: ChatPlan) => void;
|
|
63
65
|
}
|
|
64
66
|
/** Define the result and actions for managing a durable plan flow including decisions, restoration, and error handling */
|
|
@@ -70,6 +72,9 @@ export interface UseDurablePlanFlowResult {
|
|
|
70
72
|
decide: (decision: DurablePlanDecision, feedback?: string) => Promise<DurablePlanDecisionResult | null>;
|
|
71
73
|
restore: () => Promise<DurablePlanDecisionResult | null>;
|
|
72
74
|
clearError: () => void;
|
|
75
|
+
effectPending: boolean;
|
|
76
|
+
attachError: string | null;
|
|
77
|
+
retryAttach: () => void;
|
|
73
78
|
}
|
|
74
79
|
/** Shared plan decision controller. It coalesces only concurrent attachment
|
|
75
80
|
* attempts; a later retry/restore calls the consumer's idempotent transport
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Shared SVG frame and identical editor glyphs; React is the only peer. */
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export interface EditorGlyphProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function createEditorGlyph(paths: ReactNode): ({ className }: EditorGlyphProps) => import("react").JSX.Element;
|
|
7
|
+
export declare const UndoGlyph: ({ className }: EditorGlyphProps) => import("react").JSX.Element;
|
|
8
|
+
export declare const RedoGlyph: ({ className }: EditorGlyphProps) => import("react").JSX.Element;
|
|
9
|
+
export declare const LockGlyph: ({ className }: EditorGlyphProps) => import("react").JSX.Element;
|
|
10
|
+
export declare const PlusGlyph: ({ className }: EditorGlyphProps) => import("react").JSX.Element;
|
|
11
|
+
export declare const MinusGlyph: ({ className }: EditorGlyphProps) => import("react").JSX.Element;
|
|
12
|
+
export declare const MagnetGlyph: ({ className }: EditorGlyphProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Keep a modal's Tab navigation inside its current controls. No UI runtime dependency. */
|
|
2
|
+
export declare function containDialogTab(event: Pick<KeyboardEvent, 'key' | 'shiftKey' | 'preventDefault'>, panel: HTMLElement | null): void;
|
|
3
|
+
/** Native-button navigation shared by the model and time-zone search popovers. */
|
|
4
|
+
export declare function bindSearchPickerNavigation({ panel, input, trigger, onClose, buttonSelector, homeEnd, activateFirst }: {
|
|
5
|
+
panel: HTMLElement;
|
|
6
|
+
input: () => HTMLInputElement | null;
|
|
7
|
+
trigger: () => HTMLElement | null;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
buttonSelector: string;
|
|
10
|
+
homeEnd?: boolean;
|
|
11
|
+
activateFirst?: boolean;
|
|
12
|
+
}): () => void;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** Cursor histories share retry, reload, cancellation and their visible loading projection. */
|
|
2
|
+
export declare function useHistoryControls<T>({ items, nextCursor, phase, loadMore }: {
|
|
3
|
+
items: T[];
|
|
4
|
+
nextCursor: string | null;
|
|
5
|
+
phase: 'idle' | 'loadingFirst' | 'loadingMore' | 'error';
|
|
6
|
+
loadMore: () => void;
|
|
7
|
+
}, { lastOpRef, setReloadKey, resetAbortRef, loadMoreAbortRef }: {
|
|
8
|
+
lastOpRef: {
|
|
9
|
+
current: 'first' | 'more';
|
|
10
|
+
};
|
|
11
|
+
setReloadKey: (update: (current: number) => number) => void;
|
|
12
|
+
resetAbortRef: {
|
|
13
|
+
current: AbortController | null;
|
|
14
|
+
};
|
|
15
|
+
loadMoreAbortRef: {
|
|
16
|
+
current: AbortController | null;
|
|
17
|
+
};
|
|
18
|
+
}): {
|
|
19
|
+
items: T[];
|
|
20
|
+
hasMore: boolean;
|
|
21
|
+
isLoadingFirst: boolean;
|
|
22
|
+
isLoadingMore: boolean;
|
|
23
|
+
isError: boolean;
|
|
24
|
+
loadMore: () => void;
|
|
25
|
+
retry: () => void;
|
|
26
|
+
reload: () => void;
|
|
27
|
+
};
|
|
28
|
+
/** Apply a page only to the view that requested it; cancellation and failures share one policy. */
|
|
29
|
+
export declare function loadHistoryPage<T>(request: () => Promise<T>, onPage: (page: T) => void, { controller, seq, seqRef, setPhase, onSettled }: {
|
|
30
|
+
controller: AbortController;
|
|
31
|
+
seq: number;
|
|
32
|
+
seqRef: {
|
|
33
|
+
current: number;
|
|
34
|
+
};
|
|
35
|
+
setPhase: (phase: 'idle' | 'loadingFirst' | 'loadingMore' | 'error') => void;
|
|
36
|
+
onSettled?: () => void;
|
|
37
|
+
}): Promise<void>;
|