@tangle-network/agent-app 0.43.55 → 0.43.57
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-UNL34LS2.js +12 -0
- package/dist/DesignCanvasEditor-FJIVYOA2.js +13 -0
- package/dist/IntakeInterview-3ZIQMZS6.js +8 -0
- package/dist/InvitationsPanel-CJ7DR4F7.js +8 -0
- package/dist/MembersPanel-BB4OD2KB.js +8 -0
- package/dist/{TimelineEditor-I35SJJAJ.js → TimelineEditor-2ECKSU6P.js} +3 -3
- package/dist/{VaultPane-DrQ_tH6c.d.ts → VaultPane-BDP6SB_K.d.ts} +1 -0
- package/dist/{access-BZ81Btt5.d.ts → access-490O6aOU.d.ts} +16 -1
- package/dist/app-auth/index.d.ts +6 -1
- package/dist/app-auth/index.js +3 -3
- package/dist/app-auth/index.js.map +1 -1
- package/dist/{apply-Gk4raT2j.d.ts → apply-6wlMOLf8.d.ts} +30 -1
- package/dist/assets/index.d.ts +41 -0
- package/dist/assets/index.js +1 -1
- package/dist/assistant/index.d.ts +26 -6
- package/dist/assistant/index.js +13 -12
- package/dist/assistant/index.js.map +1 -1
- package/dist/{attachment-validation-D0csjCvz.d.ts → attachment-validation-tPRp-PP1.d.ts} +7 -1
- package/dist/{auth-DuptSkWh.d.ts → auth-_FU8w01b.d.ts} +4 -1
- package/dist/billing/index.d.ts +8 -0
- package/dist/billing/index.js +1 -1
- package/dist/brand/index.d.ts +2 -0
- package/dist/brand/index.js.map +1 -1
- package/dist/brand-extraction/index.d.ts +3 -0
- package/dist/brand-extraction/index.js.map +1 -1
- package/dist/catalog/index.d.ts +2 -0
- package/dist/catalog/index.js +1 -1
- package/dist/chat-routes/index.d.ts +41 -10
- package/dist/chat-routes/index.js +15 -15
- package/dist/chat-routes/index.js.map +1 -1
- package/dist/chat-store/index.d.ts +18 -4
- package/dist/chat-store/index.js +4 -4
- package/dist/chat-store/index.js.map +1 -1
- package/dist/{chunk-H5FM75MR.js → chunk-22GLESKE.js} +3 -3
- package/dist/chunk-22GLESKE.js.map +1 -0
- package/dist/{chunk-WEBBJBDH.js → chunk-2DRYTJHI.js} +1 -1
- package/dist/chunk-2DRYTJHI.js.map +1 -0
- package/dist/{chunk-7EVZUIHW.js → chunk-3EJ6SFJI.js} +1 -1
- package/dist/chunk-3EJ6SFJI.js.map +1 -0
- package/dist/{chunk-HRJJH3RX.js → chunk-3OFQFW5K.js} +4 -4
- package/dist/chunk-3OFQFW5K.js.map +1 -0
- package/dist/{chunk-7SUPA2YT.js → chunk-4KKXZQPT.js} +2 -2
- package/dist/chunk-4KKXZQPT.js.map +1 -0
- package/dist/{chunk-5PTGEJZL.js → chunk-5SD6HT2V.js} +1 -1
- package/dist/chunk-5SD6HT2V.js.map +1 -0
- package/dist/{chunk-7C64WKAH.js → chunk-5SXS3YAB.js} +2 -2
- package/dist/{chunk-L2TG5DBW.js → chunk-5TESA4SN.js} +1 -1
- package/dist/chunk-5TESA4SN.js.map +1 -0
- package/dist/{chunk-63CE7FEZ.js → chunk-6XIAPIW6.js} +1 -1
- package/dist/chunk-6XIAPIW6.js.map +1 -0
- package/dist/{chunk-MFRCM32T.js → chunk-7CTIUCQ4.js} +1 -1
- package/dist/chunk-7CTIUCQ4.js.map +1 -0
- package/dist/{chunk-6KVH5SP5.js → chunk-7YW6EBDX.js} +2 -2
- package/dist/chunk-7YW6EBDX.js.map +1 -0
- package/dist/{chunk-ZXNXAQAH.js → chunk-AP2UXKUK.js} +1 -1
- package/dist/chunk-AP2UXKUK.js.map +1 -0
- package/dist/{chunk-K63OWUDJ.js → chunk-BPSV5AA2.js} +2 -2
- package/dist/chunk-BPSV5AA2.js.map +1 -0
- package/dist/{chunk-MFI4ZM7W.js → chunk-BT4QFCTB.js} +1 -1
- package/dist/chunk-BT4QFCTB.js.map +1 -0
- package/dist/{chunk-ZYBWGSAZ.js → chunk-BVKQKGRK.js} +1 -1
- package/dist/chunk-BVKQKGRK.js.map +1 -0
- package/dist/{chunk-RVUISYUE.js → chunk-C3NSB66C.js} +7 -7
- package/dist/chunk-C3NSB66C.js.map +1 -0
- package/dist/{chunk-BQV42AFK.js → chunk-CCVWR33L.js} +1 -1
- package/dist/chunk-CCVWR33L.js.map +1 -0
- package/dist/{chunk-MCJSS6SM.js → chunk-CQZSAR77.js} +1 -1
- package/dist/chunk-CQZSAR77.js.map +1 -0
- package/dist/{chunk-3SVAA3MA.js → chunk-DJ4VJIH5.js} +1 -1
- package/dist/chunk-DJ4VJIH5.js.map +1 -0
- package/dist/{chunk-XKBIYSSM.js → chunk-DTSPS2HV.js} +3 -3
- package/dist/chunk-DTSPS2HV.js.map +1 -0
- package/dist/{chunk-4QN75UHX.js → chunk-E7N67FYI.js} +8 -8
- package/dist/chunk-E7N67FYI.js.map +1 -0
- package/dist/{chunk-2QI7XV2T.js → chunk-FBVLEGEG.js} +1 -1
- package/dist/{chunk-2QI7XV2T.js.map → chunk-FBVLEGEG.js.map} +1 -1
- package/dist/{chunk-5RMIUJDI.js → chunk-FKCB5FTD.js} +1 -1
- package/dist/chunk-FKCB5FTD.js.map +1 -0
- package/dist/{chunk-EEPJGZJW.js → chunk-GPBRL2XR.js} +1 -1
- package/dist/chunk-GPBRL2XR.js.map +1 -0
- package/dist/{chunk-G3HCU7TA.js → chunk-GXE6KHTS.js} +1 -1
- package/dist/chunk-GXE6KHTS.js.map +1 -0
- package/dist/{chunk-65P3HJY3.js → chunk-HCOROIRT.js} +1 -1
- package/dist/chunk-HCOROIRT.js.map +1 -0
- package/dist/{chunk-54GSK2KK.js → chunk-HYTIHYNV.js} +2 -2
- package/dist/chunk-HYTIHYNV.js.map +1 -0
- package/dist/{chunk-5MG74GVQ.js → chunk-IG46XCZM.js} +3 -3
- package/dist/chunk-IG46XCZM.js.map +1 -0
- package/dist/{chunk-ND3XEGBE.js → chunk-JDEGS53O.js} +1 -1
- package/dist/chunk-JDEGS53O.js.map +1 -0
- package/dist/{chunk-7W5XSTUF.js → chunk-JML7WKWU.js} +1 -1
- package/dist/chunk-JML7WKWU.js.map +1 -0
- package/dist/{chunk-Q4TKVF3L.js → chunk-JTLYXUEV.js} +1 -1
- package/dist/chunk-JTLYXUEV.js.map +1 -0
- package/dist/{chunk-CCRVDLV3.js → chunk-JWBZ74TW.js} +2 -2
- package/dist/chunk-JWBZ74TW.js.map +1 -0
- package/dist/{chunk-ZU5GNSOJ.js → chunk-K3LIPKFV.js} +3 -3
- package/dist/chunk-K3LIPKFV.js.map +1 -0
- package/dist/{chunk-GQRL6VNU.js → chunk-LGBO24FL.js} +1 -1
- package/dist/chunk-LGBO24FL.js.map +1 -0
- package/dist/{chunk-SWUVTGMR.js → chunk-MEUNTJL5.js} +3 -3
- package/dist/{chunk-SWUVTGMR.js.map → chunk-MEUNTJL5.js.map} +1 -1
- package/dist/{chunk-YNALYIQ3.js → chunk-NLSSFLLS.js} +1 -1
- package/dist/chunk-NLSSFLLS.js.map +1 -0
- package/dist/{chunk-HFC4BTWJ.js → chunk-PTUMBMVH.js} +1 -1
- package/dist/chunk-PTUMBMVH.js.map +1 -0
- package/dist/{chunk-R4NOKZMD.js → chunk-ROLFDOMJ.js} +3 -3
- package/dist/{chunk-NYATNLRK.js → chunk-RT5RKAFX.js} +1 -1
- package/dist/chunk-RT5RKAFX.js.map +1 -0
- package/dist/{chunk-GNL3MG5J.js → chunk-S564OFTL.js} +2 -2
- package/dist/{chunk-GUSCYE3S.js → chunk-TQOFR6XY.js} +1 -1
- package/dist/chunk-TQOFR6XY.js.map +1 -0
- package/dist/{chunk-47C6PJCW.js → chunk-TZO3SOUL.js} +1 -1
- package/dist/chunk-TZO3SOUL.js.map +1 -0
- package/dist/{chunk-YGUNTIT5.js → chunk-UKTYKG57.js} +1 -1
- package/dist/chunk-UKTYKG57.js.map +1 -0
- package/dist/{chunk-23LUHHHN.js → chunk-VCOD5AOR.js} +1 -1
- package/dist/chunk-VCOD5AOR.js.map +1 -0
- package/dist/{chunk-5I72FRZY.js → chunk-VOJB7MVG.js} +2 -2
- package/dist/{chunk-XWJXZ6WE.js → chunk-VTWKH4YU.js} +2 -2
- package/dist/chunk-VTWKH4YU.js.map +1 -0
- package/dist/{chunk-4K7BZYO7.js → chunk-VWAEWOWK.js} +3 -3
- package/dist/chunk-VWAEWOWK.js.map +1 -0
- package/dist/{chunk-M2EBUDZ7.js → chunk-VWOPOLVO.js} +2 -2
- package/dist/chunk-VWOPOLVO.js.map +1 -0
- package/dist/{chunk-BN2USWIR.js → chunk-VYECQAGM.js} +2 -2
- package/dist/chunk-VYECQAGM.js.map +1 -0
- package/dist/{chunk-SIXYZ2FB.js → chunk-YJMCRXQQ.js} +1 -1
- package/dist/chunk-YJMCRXQQ.js.map +1 -0
- package/dist/{chunk-PJC4NXPA.js → chunk-YKBDH2UY.js} +3 -3
- package/dist/chunk-YKBDH2UY.js.map +1 -0
- package/dist/{chunk-XAWFPMAR.js → chunk-YKOM4ZLQ.js} +1 -1
- package/dist/chunk-YKOM4ZLQ.js.map +1 -0
- package/dist/{chunk-TKVJE63N.js → chunk-YRMLYFVR.js} +3 -3
- package/dist/chunk-YRMLYFVR.js.map +1 -0
- package/dist/{chunk-USYXHDKE.js → chunk-YZ6KQULN.js} +2 -2
- package/dist/{command-stack-B_-WNfZU.d.ts → command-stack-TNPWJCzW.d.ts} +14 -2
- package/dist/{completion-Kaqp_tWk.d.ts → completion-CvcNUz07.d.ts} +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/{contract-KfqJh_au.d.ts → contract-TjB68uqA.d.ts} +17 -0
- package/dist/design-canvas/drizzle.d.ts +10 -2
- package/dist/design-canvas/drizzle.js.map +1 -1
- package/dist/design-canvas/index.d.ts +29 -11
- package/dist/design-canvas/index.js +1070 -17
- package/dist/design-canvas/index.js.map +1 -1
- package/dist/design-canvas-react/engine.d.ts +42 -6
- package/dist/design-canvas-react/engine.js +4 -4
- package/dist/design-canvas-react/index.d.ts +12 -7
- package/dist/design-canvas-react/index.js +11 -11
- package/dist/design-canvas-react/index.js.map +1 -1
- package/dist/design-canvas-react/lazy.d.ts +4 -4
- package/dist/design-canvas-react/lazy.js +1 -1
- package/dist/durable-chat/index.d.ts +46 -1
- package/dist/durable-chat/index.js +3 -3
- package/dist/eval/index.d.ts +1 -1
- package/dist/{export-presets-DAsU5Wal.d.ts → export-presets-mgVulRaV.d.ts} +10 -1
- package/dist/{flow-types-Cb_AblZs.d.ts → flow-types-CqomVAUN.d.ts} +1 -0
- package/dist/harness/index.d.ts +5 -0
- package/dist/harness/index.js +1 -1
- package/dist/index.d.ts +10 -18
- package/dist/index.js +30 -231
- package/dist/intakes/api.d.ts +3 -2
- package/dist/intakes/api.js +3 -3
- package/dist/intakes/api.js.map +1 -1
- package/dist/intakes/drizzle.d.ts +10 -2
- package/dist/intakes/drizzle.js +3 -3
- package/dist/intakes/drizzle.js.map +1 -1
- package/dist/intakes/index.d.ts +2 -2
- package/dist/intakes/index.js +2 -2
- package/dist/intakes-react/index.d.ts +2 -1
- package/dist/intakes-react/index.js +2 -2
- package/dist/intakes-react/lazy.d.ts +2 -1
- package/dist/intakes-react/lazy.js +1 -1
- package/dist/intakes-react/lazy.js.map +1 -1
- package/dist/integrations/index.d.ts +4 -0
- package/dist/integrations/index.js +1 -1
- package/dist/interactions/index.d.ts +13 -2
- package/dist/interactions/index.js +2 -2
- package/dist/{invitations-CZ5G2tIn.d.ts → invitations-DoYMvXea.d.ts} +11 -1
- package/dist/{invitations-schema-DaMO4hZE.d.ts → invitations-schema-_fI7HkJP.d.ts} +5 -1
- package/dist/knowledge/index.d.ts +2 -0
- package/dist/knowledge/index.js +1 -1
- package/dist/knowledge-loop/index.d.ts +4 -1
- package/dist/knowledge-loop/index.js +1 -1
- package/dist/{lazy-C7LiVeFt.d.ts → lazy-DrkVyDpe.d.ts} +2 -2
- package/dist/{mcp-BHfIoGLW.d.ts → mcp-BjPqQ-3C.d.ts} +4 -2
- package/dist/{mcp-rpc-DLw_r9PQ.d.ts → mcp-rpc-BfUOsalw.d.ts} +3 -0
- package/dist/missions/index.d.ts +25 -0
- package/dist/missions/index.js +1 -1
- package/dist/{model-Bzi5i63l.d.ts → model-C8U0HZxL.d.ts} +1 -0
- package/dist/{model-dF2h4xT9.d.ts → model-DmdkIteM.d.ts} +19 -0
- package/dist/{model-BBwyOuWG.d.ts → model-DnfO_PdJ.d.ts} +25 -1
- package/dist/model-resolution/index.d.ts +10 -0
- package/dist/model-resolution/index.js.map +1 -1
- package/dist/{operations-DLIvvD00.d.ts → operations-ByJ6yXOW.d.ts} +20 -2
- package/dist/{parts-1sRYSPjF.d.ts → parts-n9XUon0a.d.ts} +29 -1
- package/dist/plans/index.d.ts +6 -0
- package/dist/plans/index.js +1 -1
- package/dist/platform/index.d.ts +24 -2
- package/dist/platform/index.js +3 -3
- package/dist/platform/index.js.map +1 -1
- package/dist/preflight/index.d.ts +3 -0
- package/dist/preflight/index.js +1 -1
- package/dist/preset-cloudflare/index.d.ts +4 -1
- package/dist/preset-cloudflare/index.js +2 -2
- package/dist/redact/index.d.ts +5 -0
- package/dist/redact/index.js +1 -1
- package/dist/{roles-BC1n4t37.d.ts → roles-B4nU3jDi.d.ts} +12 -0
- package/dist/run/index.d.ts +3 -0
- package/dist/run/index.js +1 -1
- package/dist/run/index.js.map +1 -1
- package/dist/runtime/index.d.ts +11 -4
- package/dist/runtime/index.js +4 -4
- package/dist/sandbox/index.d.ts +96 -3
- package/dist/sandbox/index.js +6 -6
- package/dist/{sandbox-terminal-BIIC__CP.d.ts → sandbox-terminal-ChNEdHF8.d.ts} +5 -0
- package/dist/sequences/drizzle.d.ts +11 -1
- package/dist/sequences/drizzle.js +1 -1
- package/dist/sequences/drizzle.js.map +1 -1
- package/dist/sequences/index.d.ts +32 -7
- package/dist/sequences/index.js +1562 -47
- package/dist/sequences/index.js.map +1 -1
- package/dist/sequences-react/index.d.ts +32 -2
- package/dist/sequences-react/index.js +3 -3
- package/dist/sequences-react/index.js.map +1 -1
- package/dist/{sso-CNOsARMJ.d.ts → sso-Cm00S61u.d.ts} +13 -0
- package/dist/{stale-turn-lock-C8Na1cFZ.d.ts → stale-turn-lock-DucQzvXu.d.ts} +2 -0
- package/dist/store/index.d.ts +5 -0
- package/dist/store/index.js.map +1 -1
- package/dist/{store-gckrNq-g.d.ts → store-B7LLlk9p.d.ts} +22 -1
- package/dist/{store-CFyxgTlD.d.ts → store-CqfDtnPQ.d.ts} +8 -2
- package/dist/stream/index.d.ts +10 -4
- package/dist/stream/index.js +4 -4
- package/dist/{stream-normalizer-DWvtmY6F.d.ts → stream-normalizer-C3M--r6y.d.ts} +17 -1
- package/dist/studio/index.d.ts +37 -0
- package/dist/studio/index.js +1 -1
- package/dist/studio-react/index.d.ts +3 -0
- package/dist/studio-react/index.js +1 -1
- package/dist/studio-react/index.js.map +1 -1
- package/dist/tangle/index.d.ts +3 -0
- package/dist/tangle/index.js +1 -1
- package/dist/teams/drizzle.d.ts +8 -4
- package/dist/teams/drizzle.js +1 -1
- package/dist/teams/drizzle.js.map +1 -1
- package/dist/teams/index.d.ts +4 -2
- package/dist/teams/index.js +3 -3
- package/dist/teams/invitations-api.d.ts +10 -4
- package/dist/teams/invitations-api.js +4 -4
- package/dist/teams/invitations-api.js.map +1 -1
- package/dist/teams/members-api.d.ts +4 -2
- package/dist/teams/members-api.js +3 -3
- package/dist/teams/resend.d.ts +5 -4
- package/dist/teams/resend.js +1 -1
- package/dist/teams/resend.js.map +1 -1
- package/dist/teams-react/index.d.ts +7 -2
- package/dist/teams-react/index.js +3 -3
- package/dist/teams-react/lazy.d.ts +5 -2
- package/dist/teams-react/lazy.js +2 -2
- package/dist/teams-react/lazy.js.map +1 -1
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/index.js +1 -1
- package/dist/theme/tailwind-preset.d.ts +1 -0
- package/dist/theme/tailwind-preset.js.map +1 -1
- package/dist/theme-contract/cli.js +1 -1
- package/dist/theme-contract/index.d.ts +3 -0
- package/dist/theme-contract/index.js +1 -1
- package/dist/tools/index.d.ts +13 -6
- package/dist/tools/index.js +3 -3
- package/dist/trace/index.d.ts +6 -1
- package/dist/trace/index.js +2 -2
- package/dist/{turn-buffer-C9mEgoop.d.ts → turn-buffer-DGnAPKwa.d.ts} +6 -0
- package/dist/turn-stream/index.d.ts +28 -2
- package/dist/turn-stream/index.js +1 -1
- package/dist/turn-stream/index.js.map +1 -1
- package/dist/{types-BEOvc_ue.d.ts → types-CBRyqijY.d.ts} +10 -0
- package/dist/vault/index.d.ts +1 -1
- package/dist/vault/lazy.d.ts +3 -2
- package/dist/vault/lazy.js.map +1 -1
- package/dist/web/index.d.ts +4 -0
- package/dist/web/index.js +1 -1
- package/dist/web-react/index.d.ts +51 -8
- package/dist/web-react/index.js +9 -9
- package/dist/web-react/terminal.d.ts +2 -2
- package/dist/web-react/terminal.js +1 -1
- package/package.json +3 -2
- package/dist/DesignCanvas-5DJAFDNC.js +0 -12
- package/dist/DesignCanvasEditor-XUJZARSN.js +0 -13
- package/dist/IntakeInterview-WHVKMNQW.js +0 -8
- package/dist/InvitationsPanel-XUUWZBPV.js +0 -8
- package/dist/MembersPanel-FOVHWUQ3.js +0 -8
- package/dist/chunk-23LUHHHN.js.map +0 -1
- package/dist/chunk-3SVAA3MA.js.map +0 -1
- package/dist/chunk-47C6PJCW.js.map +0 -1
- package/dist/chunk-4K7BZYO7.js.map +0 -1
- package/dist/chunk-4QN75UHX.js.map +0 -1
- package/dist/chunk-54GSK2KK.js.map +0 -1
- package/dist/chunk-5MG74GVQ.js.map +0 -1
- package/dist/chunk-5PTGEJZL.js.map +0 -1
- package/dist/chunk-5RMIUJDI.js.map +0 -1
- package/dist/chunk-63CE7FEZ.js.map +0 -1
- package/dist/chunk-65P3HJY3.js.map +0 -1
- package/dist/chunk-6KVH5SP5.js.map +0 -1
- package/dist/chunk-7EVZUIHW.js.map +0 -1
- package/dist/chunk-7SUPA2YT.js.map +0 -1
- package/dist/chunk-7W5XSTUF.js.map +0 -1
- package/dist/chunk-BN2USWIR.js.map +0 -1
- package/dist/chunk-BQV42AFK.js.map +0 -1
- package/dist/chunk-CCRVDLV3.js.map +0 -1
- package/dist/chunk-EEPJGZJW.js.map +0 -1
- package/dist/chunk-G3HCU7TA.js.map +0 -1
- package/dist/chunk-GQRL6VNU.js.map +0 -1
- package/dist/chunk-GUSCYE3S.js.map +0 -1
- package/dist/chunk-H5FM75MR.js.map +0 -1
- package/dist/chunk-HFC4BTWJ.js.map +0 -1
- package/dist/chunk-HRJJH3RX.js.map +0 -1
- package/dist/chunk-K63OWUDJ.js.map +0 -1
- package/dist/chunk-L2TG5DBW.js.map +0 -1
- package/dist/chunk-M2EBUDZ7.js.map +0 -1
- package/dist/chunk-MCJSS6SM.js.map +0 -1
- package/dist/chunk-MFI4ZM7W.js.map +0 -1
- package/dist/chunk-MFRCM32T.js.map +0 -1
- package/dist/chunk-ND3XEGBE.js.map +0 -1
- package/dist/chunk-NEOV2NQ3.js +0 -1617
- package/dist/chunk-NEOV2NQ3.js.map +0 -1
- package/dist/chunk-NYATNLRK.js.map +0 -1
- package/dist/chunk-PJC4NXPA.js.map +0 -1
- package/dist/chunk-Q4TKVF3L.js.map +0 -1
- package/dist/chunk-RVUISYUE.js.map +0 -1
- package/dist/chunk-SIXYZ2FB.js.map +0 -1
- package/dist/chunk-TKVJE63N.js.map +0 -1
- package/dist/chunk-WEBBJBDH.js.map +0 -1
- package/dist/chunk-WFMUDX5J.js +0 -1092
- package/dist/chunk-WFMUDX5J.js.map +0 -1
- package/dist/chunk-XAWFPMAR.js.map +0 -1
- package/dist/chunk-XKBIYSSM.js.map +0 -1
- package/dist/chunk-XWJXZ6WE.js.map +0 -1
- package/dist/chunk-YGUNTIT5.js.map +0 -1
- package/dist/chunk-YNALYIQ3.js.map +0 -1
- package/dist/chunk-ZU5GNSOJ.js.map +0 -1
- package/dist/chunk-ZXNXAQAH.js.map +0 -1
- package/dist/chunk-ZYBWGSAZ.js.map +0 -1
- /package/dist/{DesignCanvas-5DJAFDNC.js.map → DesignCanvas-UNL34LS2.js.map} +0 -0
- /package/dist/{DesignCanvasEditor-XUJZARSN.js.map → DesignCanvasEditor-FJIVYOA2.js.map} +0 -0
- /package/dist/{IntakeInterview-WHVKMNQW.js.map → IntakeInterview-3ZIQMZS6.js.map} +0 -0
- /package/dist/{InvitationsPanel-XUUWZBPV.js.map → InvitationsPanel-CJ7DR4F7.js.map} +0 -0
- /package/dist/{MembersPanel-FOVHWUQ3.js.map → MembersPanel-BB4OD2KB.js.map} +0 -0
- /package/dist/{TimelineEditor-I35SJJAJ.js.map → TimelineEditor-2ECKSU6P.js.map} +0 -0
- /package/dist/{chunk-7C64WKAH.js.map → chunk-5SXS3YAB.js.map} +0 -0
- /package/dist/{chunk-R4NOKZMD.js.map → chunk-ROLFDOMJ.js.map} +0 -0
- /package/dist/{chunk-GNL3MG5J.js.map → chunk-S564OFTL.js.map} +0 -0
- /package/dist/{chunk-5I72FRZY.js.map → chunk-VOJB7MVG.js.map} +0 -0
- /package/dist/{chunk-USYXHDKE.js.map → chunk-YZ6KQULN.js.map} +0 -0
package/dist/missions/index.d.ts
CHANGED
|
@@ -21,7 +21,9 @@ export { W as WithAgentActivity, s as stepAgentActivity } from '../agent-activit
|
|
|
21
21
|
* silent clobber, never a stale overwrite.
|
|
22
22
|
*/
|
|
23
23
|
type MissionStatus = 'scheduled' | 'running' | 'paused' | 'waiting_approval' | 'blocked' | 'succeeded' | 'failed' | 'aborted' | 'cancelled';
|
|
24
|
+
/** Define possible statuses for a mission step during its execution lifecycle */
|
|
24
25
|
type MissionStepStatus = 'pending' | 'running' | 'waiting_approval' | 'done' | 'failed';
|
|
26
|
+
/** Define the structure and state details of a mission step within a workflow system */
|
|
25
27
|
interface MissionStep {
|
|
26
28
|
id: string;
|
|
27
29
|
/** What the step should accomplish — an intent, never an implementation. */
|
|
@@ -39,6 +41,7 @@ interface MissionStep {
|
|
|
39
41
|
* full payload. */
|
|
40
42
|
resultRef?: string;
|
|
41
43
|
}
|
|
44
|
+
/** Define the structure for tracking mission token usage, cost, duration, and LLM call counts */
|
|
42
45
|
interface MissionCostLedger {
|
|
43
46
|
tokensIn: number;
|
|
44
47
|
tokensOut: number;
|
|
@@ -146,6 +149,7 @@ declare function isMissionTerminal(status: MissionStatus): boolean;
|
|
|
146
149
|
/** The cooperative kill switch: a stop request rides metadata so it survives
|
|
147
150
|
* any status and is honored by the engine before the next side effect. */
|
|
148
151
|
declare function isMissionStopRequested(mission: MissionRecord): boolean;
|
|
152
|
+
/** Define input parameters for creating a mission including optional deterministic id and unique plan steps */
|
|
149
153
|
interface CreateMissionInput {
|
|
150
154
|
/** Explicit row id. Omit to use the service's id generator. Pass a
|
|
151
155
|
* DETERMINISTIC id (derived from the originating turn) when the caller may
|
|
@@ -175,6 +179,7 @@ interface CreateMissionInput {
|
|
|
175
179
|
*/
|
|
176
180
|
extras?: Record<string, unknown>;
|
|
177
181
|
}
|
|
182
|
+
/** Define a patch to update the status and optional metadata of a step in a process */
|
|
178
183
|
interface SetStepStatusPatch {
|
|
179
184
|
sublabel?: string;
|
|
180
185
|
resultRef?: string;
|
|
@@ -192,10 +197,12 @@ interface SetStepStatusPatch {
|
|
|
192
197
|
ledgerDelta?: Partial<MissionCostLedger>;
|
|
193
198
|
};
|
|
194
199
|
}
|
|
200
|
+
/** Define input parameters to complete a mission with status and optional summary */
|
|
195
201
|
interface CompleteMissionInput {
|
|
196
202
|
ok: boolean;
|
|
197
203
|
summary?: string;
|
|
198
204
|
}
|
|
205
|
+
/** Define methods to create, retrieve, and update missions with controlled engine binding and metadata merging */
|
|
199
206
|
interface MissionService {
|
|
200
207
|
createMission(input: CreateMissionInput): Promise<MissionRecord>;
|
|
201
208
|
getMission(id: string): Promise<MissionRecord | null>;
|
|
@@ -226,6 +233,7 @@ interface MissionService {
|
|
|
226
233
|
markWaitingApproval(id: string, stepId: string): Promise<MissionOutcome<MissionRecord>>;
|
|
227
234
|
complete(id: string, input: CompleteMissionInput): Promise<MissionOutcome<MissionRecord>>;
|
|
228
235
|
}
|
|
236
|
+
/** Define options for configuring mission service behavior including storage, time, and ID generation */
|
|
229
237
|
interface MissionServiceOptions {
|
|
230
238
|
store: MissionStorePort;
|
|
231
239
|
/** Injectable clock (epoch ms). Default `Date.now`. */
|
|
@@ -240,7 +248,9 @@ interface MissionServiceOptions {
|
|
|
240
248
|
*/
|
|
241
249
|
generateId?: () => string;
|
|
242
250
|
}
|
|
251
|
+
/** Create a mission service that manages mission records and audit events with customizable options */
|
|
243
252
|
declare function createMissionService(options: MissionServiceOptions): MissionService;
|
|
253
|
+
/** Define an in-memory mission store that tracks events and allows direct record writes */
|
|
244
254
|
interface InMemoryMissionStore extends MissionStorePort {
|
|
245
255
|
/** The full audit trail, append order. */
|
|
246
256
|
events(): MissionAuditEvent[];
|
|
@@ -276,6 +286,7 @@ declare function createInMemoryMissionStore(): InMemoryMissionStore;
|
|
|
276
286
|
* The sink itself does no dedupe.
|
|
277
287
|
*/
|
|
278
288
|
|
|
289
|
+
/** Handle mission stream events by processing emitted MissionStreamEvent objects */
|
|
279
290
|
interface MissionEventSink {
|
|
280
291
|
emit(event: MissionStreamEvent): void;
|
|
281
292
|
}
|
|
@@ -294,7 +305,9 @@ interface MissionStreamStep {
|
|
|
294
305
|
kind: string;
|
|
295
306
|
status: MissionStreamStepStatus;
|
|
296
307
|
}
|
|
308
|
+
/** Define possible status values for a mission stream step */
|
|
297
309
|
type MissionStreamStepStatus = 'pending' | 'running' | 'done' | 'failed' | 'waiting_approval';
|
|
310
|
+
/** Define possible statuses representing the current state of a mission stream */
|
|
298
311
|
type MissionStreamStatus = 'scheduled' | 'running' | 'paused' | 'waiting_approval' | 'succeeded' | 'aborted' | 'cancelled' | 'failed';
|
|
299
312
|
/**
|
|
300
313
|
* Discriminated union of every live mission event. Every member carries
|
|
@@ -483,11 +496,13 @@ declare function reduceMissionEvents(events: MissionStreamEvent[], seed?: Map<st
|
|
|
483
496
|
* storage and only the resultRef is returned.
|
|
484
497
|
*/
|
|
485
498
|
type SandboxDispatch = (input: SandboxDispatchInput) => Promise<SandboxDispatchResult>;
|
|
499
|
+
/** Define input parameters for dispatching a mission step in the sandbox environment */
|
|
486
500
|
interface SandboxDispatchInput {
|
|
487
501
|
mission: MissionRecord;
|
|
488
502
|
step: MissionStep;
|
|
489
503
|
stepIndex: number;
|
|
490
504
|
}
|
|
505
|
+
/** Define the result of a completed sandbox dispatch including artifact reference and optional cost details */
|
|
491
506
|
interface SandboxDispatchDoneResult {
|
|
492
507
|
kind?: 'done';
|
|
493
508
|
/** Small pointer at the produced artifact/output (vault path, asset id, exec
|
|
@@ -515,6 +530,7 @@ interface SandboxDispatchInProgressResult {
|
|
|
515
530
|
pollAfterMs: number;
|
|
516
531
|
sublabel?: string;
|
|
517
532
|
}
|
|
533
|
+
/** Resolve the result of a sandbox dispatch as done or in progress */
|
|
518
534
|
type SandboxDispatchResult = SandboxDispatchDoneResult | SandboxDispatchInProgressResult;
|
|
519
535
|
/** Outcome of running a single step. `cached` distinguishes a replay/skip
|
|
520
536
|
* (step was already done) from a fresh execution so the engine and its tests
|
|
@@ -560,6 +576,7 @@ type PlanOutcome = {
|
|
|
560
576
|
} | {
|
|
561
577
|
kind: 'not-found';
|
|
562
578
|
};
|
|
579
|
+
/** Define options to control mission plan execution with optional pre-step veto logic */
|
|
563
580
|
interface MissionPlanRunOptions {
|
|
564
581
|
/** Pre-step veto (kill switch, schedule window). A non-null return pauses the
|
|
565
582
|
* mission with that reason before the step's side effect starts. */
|
|
@@ -586,6 +603,7 @@ declare class RetryableStepError extends Error {
|
|
|
586
603
|
/** Resolution states a gate proposal can be in. `approved`/`executed` unblock
|
|
587
604
|
* the gated step; everything else keeps the mission parked. */
|
|
588
605
|
type MissionProposalResolution = 'pending' | 'approved' | 'rejected' | 'executed' | 'ignored';
|
|
606
|
+
/** Define mission gate categories as step, budget, or volume */
|
|
589
607
|
type MissionGateKind = 'step' | 'budget' | 'volume';
|
|
590
608
|
/** Product classification of one step. Returned by
|
|
591
609
|
* {@link MissionGateOptions.classifyStep}; the matching rules (regexes, intent
|
|
@@ -635,6 +653,7 @@ interface MissionApprovalsPort {
|
|
|
635
653
|
* `externalAction: true` — the denominator of the volume cap. */
|
|
636
654
|
countExternalActionProposals(missionId: string): Promise<number>;
|
|
637
655
|
}
|
|
656
|
+
/** Define configuration options for mission gating including approvals, step classification, and action limits */
|
|
638
657
|
interface MissionGateOptions {
|
|
639
658
|
approvals: MissionApprovalsPort;
|
|
640
659
|
/** Which steps need human approval, and as what. Return null for an ungated
|
|
@@ -644,6 +663,7 @@ interface MissionGateOptions {
|
|
|
644
663
|
* required to request another. Default 5. */
|
|
645
664
|
externalActionCap?: number;
|
|
646
665
|
}
|
|
666
|
+
/** Define configuration options for initializing and controlling the mission engine behavior */
|
|
647
667
|
interface MissionEngineOptions {
|
|
648
668
|
service: MissionService;
|
|
649
669
|
/** Per-step USD estimate. Load-bearing twice: the budget gate parks on it
|
|
@@ -665,6 +685,7 @@ interface MissionEngineOptions {
|
|
|
665
685
|
* Default `['optional', 'best-effort']`. */
|
|
666
686
|
nonFatalStepKinds?: readonly string[];
|
|
667
687
|
}
|
|
688
|
+
/** Resolve mission plan steps with concurrency control and durable state management */
|
|
668
689
|
interface MissionEngine {
|
|
669
690
|
/** Run exactly one plan step. Idempotent: re-invoking for a step already
|
|
670
691
|
* `done` returns the cached pointer without re-dispatching. A lost guarded
|
|
@@ -690,6 +711,7 @@ declare function stepGateProposalId(missionId: string, stepId: string): string;
|
|
|
690
711
|
declare function budgetGateProposalId(missionId: string, stepId: string): string;
|
|
691
712
|
/** Deterministic proposal id for an external-action volume-cap override. */
|
|
692
713
|
declare function volumeGateProposalId(missionId: string, stepId: string): string;
|
|
714
|
+
/** Create a mission engine configured with options to manage mission execution and error handling */
|
|
693
715
|
declare function createMissionEngine(options: MissionEngineOptions): MissionEngine;
|
|
694
716
|
|
|
695
717
|
/**
|
|
@@ -711,15 +733,18 @@ declare function createMissionEngine(options: MissionEngineOptions): MissionEngi
|
|
|
711
733
|
* non-fatal kind (a failure does not abort the mission); the rest are
|
|
712
734
|
* fatal-on-failure agent sub-tasks. */
|
|
713
735
|
declare const DEFAULT_MISSION_STEP_KINDS: readonly string[];
|
|
736
|
+
/** Define the structure representing a parsed mission step with id, kind, and intent fields */
|
|
714
737
|
interface ParsedMissionStep {
|
|
715
738
|
id: string;
|
|
716
739
|
kind: string;
|
|
717
740
|
intent: string;
|
|
718
741
|
}
|
|
742
|
+
/** Describe a mission with a title and an ordered list of parsed steps */
|
|
719
743
|
interface ParsedMission {
|
|
720
744
|
title: string;
|
|
721
745
|
steps: ParsedMissionStep[];
|
|
722
746
|
}
|
|
747
|
+
/** Define options to specify allowed lowercase step kinds for parsing mission blocks */
|
|
723
748
|
interface ParseMissionBlocksOptions {
|
|
724
749
|
/** Allowed step kinds (lowercase). Default {@link DEFAULT_MISSION_STEP_KINDS}. */
|
|
725
750
|
kinds?: readonly string[];
|
package/dist/missions/index.js
CHANGED
|
@@ -70,6 +70,7 @@ interface IntakeGraph {
|
|
|
70
70
|
}
|
|
71
71
|
/** The reason an answer failed validation. */
|
|
72
72
|
type AnswerRejectionReason = 'required' | 'wrong-type' | 'too-short' | 'too-long' | 'too-small' | 'too-large' | 'not-an-option' | 'invalid-url' | 'invalid-email' | 'unknown-question';
|
|
73
|
+
/** Describe validation outcome of an answer including success status and optional rejection reason */
|
|
73
74
|
interface AnswerValidationResult {
|
|
74
75
|
ok: boolean;
|
|
75
76
|
reason?: AnswerRejectionReason;
|
|
@@ -15,15 +15,20 @@ interface TangleModelConfig {
|
|
|
15
15
|
apiKey: string;
|
|
16
16
|
baseUrl: string;
|
|
17
17
|
}
|
|
18
|
+
/** Define the environment context for executing Tangle operations */
|
|
18
19
|
type TangleExecutionEnvironment = 'development' | 'staging' | 'production' | 'test';
|
|
20
|
+
/** Resolve the source of the Tangle execution key as either local environment or user input */
|
|
19
21
|
type TangleExecutionKeySource = 'local-env' | 'user';
|
|
22
|
+
/** Define error codes for Tangle execution key issues related to API key and account connection */
|
|
20
23
|
type TangleExecutionKeyErrorCode = 'local_tangle_api_key_required' | 'tangle_account_not_connected';
|
|
24
|
+
/** Resolve options for model configuration including environment variables and default router base URL */
|
|
21
25
|
interface ResolveModelOptions {
|
|
22
26
|
/** Env to read (defaults to process.env). */
|
|
23
27
|
env?: Record<string, string | undefined>;
|
|
24
28
|
/** Router base URL default when `TANGLE_ROUTER_BASE_URL` is unset. */
|
|
25
29
|
defaultRouterBaseUrl?: string;
|
|
26
30
|
}
|
|
31
|
+
/** Resolve options for retrieving user API keys within a specific Tangle execution environment */
|
|
27
32
|
interface ResolveUserTangleExecutionKeyOptions {
|
|
28
33
|
/** Deployment context. Only local development may fall back to env keys. */
|
|
29
34
|
environment?: TangleExecutionEnvironment;
|
|
@@ -32,16 +37,19 @@ interface ResolveUserTangleExecutionKeyOptions {
|
|
|
32
37
|
/** App-owned lookup for the caller's linked platform API key. */
|
|
33
38
|
getUserApiKey: () => string | null | undefined | Promise<string | null | undefined>;
|
|
34
39
|
}
|
|
40
|
+
/** Resolve options for retrieving a user's Tangle execution key with environment and API key access parameters */
|
|
35
41
|
interface ResolveUserTangleExecutionKeyForUserOptions<UserId = string> {
|
|
36
42
|
userId: UserId;
|
|
37
43
|
environment?: TangleExecutionEnvironment;
|
|
38
44
|
env?: Record<string, string | undefined>;
|
|
39
45
|
getUserApiKey: (userId: UserId) => string | null | undefined | Promise<string | null | undefined>;
|
|
40
46
|
}
|
|
47
|
+
/** Define a resolved key combining an API key with its Tangle execution source */
|
|
41
48
|
interface ResolvedTangleExecutionKey {
|
|
42
49
|
apiKey: string;
|
|
43
50
|
source: TangleExecutionKeySource;
|
|
44
51
|
}
|
|
52
|
+
/** Resolve options for retrieving a Tangle developer or user API key based on environment and context */
|
|
45
53
|
interface ResolveTangleDevOrUserKeyOptions {
|
|
46
54
|
/** Deployment context. Only local development may use the env key. */
|
|
47
55
|
environment?: TangleExecutionEnvironment;
|
|
@@ -50,6 +58,7 @@ interface ResolveTangleDevOrUserKeyOptions {
|
|
|
50
58
|
/** App-owned lookup for the caller's linked platform API key. */
|
|
51
59
|
getUserApiKey: () => string | null | undefined | Promise<string | null | undefined>;
|
|
52
60
|
}
|
|
61
|
+
/** Represent HTTP error response containing status, error message, and specific error code */
|
|
53
62
|
interface TangleExecutionKeyHttpError {
|
|
54
63
|
status: number;
|
|
55
64
|
body: {
|
|
@@ -57,11 +66,13 @@ interface TangleExecutionKeyHttpError {
|
|
|
57
66
|
code: TangleExecutionKeyErrorCode;
|
|
58
67
|
};
|
|
59
68
|
}
|
|
69
|
+
/** Define configuration options for creating a Tangle router model including API key and model details */
|
|
60
70
|
interface CreateTangleRouterModelConfigOptions {
|
|
61
71
|
apiKey: string;
|
|
62
72
|
model: string;
|
|
63
73
|
baseUrl?: string;
|
|
64
74
|
}
|
|
75
|
+
/** Define options for configuring billing enforcement environment variables and overrides */
|
|
65
76
|
interface TangleBillingEnforcementOptions {
|
|
66
77
|
/** Env to read (defaults to process.env). */
|
|
67
78
|
env?: Record<string, string | undefined>;
|
|
@@ -71,15 +82,21 @@ interface TangleBillingEnforcementOptions {
|
|
|
71
82
|
*/
|
|
72
83
|
enforcementEnvVar?: string;
|
|
73
84
|
}
|
|
85
|
+
/** Provide the default base URL for the Tangle router API endpoint */
|
|
74
86
|
declare const DEFAULT_TANGLE_ROUTER_BASE_URL = "https://router.tangle.tools/v1";
|
|
87
|
+
/** Define the default environment variable name for Tangle billing enforcement */
|
|
75
88
|
declare const DEFAULT_TANGLE_BILLING_ENFORCEMENT_ENV_VAR = "TANGLE_BILLING_ENFORCEMENT";
|
|
89
|
+
/** Resolve a string by trimming whitespace or returning null if empty or undefined */
|
|
76
90
|
declare function trimOrNull(value: string | null | undefined): string | null;
|
|
91
|
+
/** Represent execution key errors with specific codes and HTTP status information */
|
|
77
92
|
declare class TangleExecutionKeyError extends Error {
|
|
78
93
|
readonly code: TangleExecutionKeyErrorCode;
|
|
79
94
|
readonly status: number;
|
|
80
95
|
constructor(code: TangleExecutionKeyErrorCode, message: string, status: number);
|
|
81
96
|
}
|
|
97
|
+
/** Identify whether an error is a TangleExecutionKeyError based on its properties and type */
|
|
82
98
|
declare function isTangleExecutionKeyError(error: unknown): error is TangleExecutionKeyError;
|
|
99
|
+
/** Resolve the current Tangle execution environment based on provided or process environment variables */
|
|
83
100
|
declare function resolveTangleExecutionEnvironment(env?: Record<string, string | undefined>): TangleExecutionEnvironment;
|
|
84
101
|
/**
|
|
85
102
|
* Shared policy for agent products that bill through the Tangle Platform.
|
|
@@ -91,6 +108,7 @@ declare function resolveTangleExecutionEnvironment(env?: Record<string, string |
|
|
|
91
108
|
* `TANGLE_BILLING_ENFORCEMENT`.
|
|
92
109
|
*/
|
|
93
110
|
declare function isTangleBillingEnforcementDisabled(opts?: TangleBillingEnforcementOptions): boolean;
|
|
111
|
+
/** Resolve and format TangleExecutionKey HTTP errors into a standardized error object or return null */
|
|
94
112
|
declare function tangleExecutionKeyHttpError(error: unknown): TangleExecutionKeyHttpError | null;
|
|
95
113
|
/**
|
|
96
114
|
* Shared dev-aware Tangle key resolution. Local development may use a server
|
|
@@ -107,6 +125,7 @@ declare function resolveTangleDevOrUserKey(opts: ResolveTangleDevOrUserKeyOption
|
|
|
107
125
|
* model execution, billing, and account ownership aligned across products.
|
|
108
126
|
*/
|
|
109
127
|
declare function resolveUserTangleExecutionKey(opts: ResolveUserTangleExecutionKeyOptions): Promise<ResolvedTangleExecutionKey>;
|
|
128
|
+
/** Resolve the Tangle execution key for a specified user using provided environment and API key options */
|
|
110
129
|
declare function resolveUserTangleExecutionKeyForUser<UserId = string>(opts: ResolveUserTangleExecutionKeyForUserOptions<UserId>): Promise<ResolvedTangleExecutionKey>;
|
|
111
130
|
/**
|
|
112
131
|
* Build an OpenAI-compatible Tangle Router model config from an already
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
* conversion factor for bleed/trim-aware exports. Angles are degrees.
|
|
13
13
|
* Nothing here touches Konva, React, or a database.
|
|
14
14
|
*/
|
|
15
|
+
/** Define the current version number of the scene schema */
|
|
15
16
|
declare const SCENE_SCHEMA_VERSION = 1;
|
|
17
|
+
/** Define the structure and properties of a scene document including version, title, pages, settings, and metadata */
|
|
16
18
|
interface SceneDocument {
|
|
17
19
|
schemaVersion: typeof SCENE_SCHEMA_VERSION;
|
|
18
20
|
title: string;
|
|
@@ -20,6 +22,7 @@ interface SceneDocument {
|
|
|
20
22
|
settings: SceneSettings;
|
|
21
23
|
metadata: Record<string, unknown>;
|
|
22
24
|
}
|
|
25
|
+
/** Define settings for scene export including print conversion factor for unit calculations */
|
|
23
26
|
interface SceneSettings {
|
|
24
27
|
/** Print conversion factor for mm↔px math at export; 96 = CSS default. */
|
|
25
28
|
dpi: number;
|
|
@@ -37,6 +40,7 @@ interface PageGuides {
|
|
|
37
40
|
vertical: number[];
|
|
38
41
|
horizontal: number[];
|
|
39
42
|
}
|
|
43
|
+
/** Define the structure and properties of a scene page including layout, background, and elements */
|
|
40
44
|
interface ScenePage {
|
|
41
45
|
id: string;
|
|
42
46
|
name: string;
|
|
@@ -64,6 +68,7 @@ interface SceneElementBase {
|
|
|
64
68
|
visible: boolean;
|
|
65
69
|
slot?: string;
|
|
66
70
|
}
|
|
71
|
+
/** Define a rectangular scene element with size, fill, optional stroke, and corner radius properties */
|
|
67
72
|
interface RectElement extends SceneElementBase {
|
|
68
73
|
kind: 'rect';
|
|
69
74
|
width: number;
|
|
@@ -73,6 +78,7 @@ interface RectElement extends SceneElementBase {
|
|
|
73
78
|
strokeWidth?: number;
|
|
74
79
|
cornerRadius?: number;
|
|
75
80
|
}
|
|
81
|
+
/** Define properties for an ellipse element including dimensions, fill, and optional stroke details */
|
|
76
82
|
interface EllipseElement extends SceneElementBase {
|
|
77
83
|
kind: 'ellipse';
|
|
78
84
|
width: number;
|
|
@@ -81,6 +87,7 @@ interface EllipseElement extends SceneElementBase {
|
|
|
81
87
|
stroke?: string;
|
|
82
88
|
strokeWidth?: number;
|
|
83
89
|
}
|
|
90
|
+
/** Define a line element with points, stroke, stroke width, and optional dash pattern */
|
|
84
91
|
interface LineElement extends SceneElementBase {
|
|
85
92
|
kind: 'line';
|
|
86
93
|
/** Flat [x0, y0, x1, y1, ...] relative to (x, y); ≥ 2 points. */
|
|
@@ -89,6 +96,7 @@ interface LineElement extends SceneElementBase {
|
|
|
89
96
|
strokeWidth: number;
|
|
90
97
|
dash?: number[];
|
|
91
98
|
}
|
|
99
|
+
/** Define properties for a text element including content, style, alignment, and layout parameters */
|
|
92
100
|
interface TextElement extends SceneElementBase {
|
|
93
101
|
kind: 'text';
|
|
94
102
|
text: string;
|
|
@@ -102,6 +110,7 @@ interface TextElement extends SceneElementBase {
|
|
|
102
110
|
lineHeight: number;
|
|
103
111
|
letterSpacing: number;
|
|
104
112
|
}
|
|
113
|
+
/** Define properties for an image element including source, dimensions, and fit mode */
|
|
105
114
|
interface ImageElement extends SceneElementBase {
|
|
106
115
|
kind: 'image';
|
|
107
116
|
width: number;
|
|
@@ -121,13 +130,18 @@ interface VideoElement extends SceneElementBase {
|
|
|
121
130
|
src: string;
|
|
122
131
|
posterSrc?: string;
|
|
123
132
|
}
|
|
133
|
+
/** Define a group element that contains multiple child scene elements */
|
|
124
134
|
interface GroupElement extends SceneElementBase {
|
|
125
135
|
kind: 'group';
|
|
126
136
|
children: SceneElement[];
|
|
127
137
|
}
|
|
138
|
+
/** Represent a graphical element in a scene including shapes, text, media, or groups */
|
|
128
139
|
type SceneElement = RectElement | EllipseElement | LineElement | TextElement | ImageElement | VideoElement | GroupElement;
|
|
140
|
+
/** Extract the kind property from a SceneElement to identify its element type */
|
|
129
141
|
type SceneElementKind = SceneElement['kind'];
|
|
142
|
+
/** Define all valid kinds of scene elements used in the application */
|
|
130
143
|
declare const SCENE_ELEMENT_KINDS: readonly SceneElementKind[];
|
|
144
|
+
/** Define rectangular boundaries with position and size properties */
|
|
131
145
|
interface Bounds {
|
|
132
146
|
x: number;
|
|
133
147
|
y: number;
|
|
@@ -139,11 +153,14 @@ declare function elementExtent(element: SceneElement): {
|
|
|
139
153
|
width: number;
|
|
140
154
|
height: number;
|
|
141
155
|
};
|
|
156
|
+
/** Estimate the height of multiline text based on font size and line height */
|
|
142
157
|
declare function estimateTextHeight(element: Pick<TextElement, 'text' | 'fontSize' | 'lineHeight'>): number;
|
|
143
158
|
/** Axis-aligned bounding box in the parent's coordinate space, accounting for
|
|
144
159
|
* rotation about the element's top-left origin. */
|
|
145
160
|
declare function elementAabb(element: SceneElement): Bounds;
|
|
161
|
+
/** Determine if two rectangular bounds overlap or intersect each other */
|
|
146
162
|
declare function boundsIntersect(a: Bounds, b: Bounds): boolean;
|
|
163
|
+
/** Resolve and return a page by ID from a document or throw an error if not found */
|
|
147
164
|
declare function requirePage(document: SceneDocument, pageId: string): ScenePage;
|
|
148
165
|
/** Depth-first search across a page including group children. Returns the
|
|
149
166
|
* element and the array that owns it (page.elements or a group's children),
|
|
@@ -153,6 +170,7 @@ declare function findElement(page: ScenePage, elementId: string): {
|
|
|
153
170
|
owner: SceneElement[];
|
|
154
171
|
index: number;
|
|
155
172
|
} | null;
|
|
173
|
+
/** Resolve and return the element, its owner array, and index from the page by element ID */
|
|
156
174
|
declare function requireElement(page: ScenePage, elementId: string): {
|
|
157
175
|
element: SceneElement;
|
|
158
176
|
owner: SceneElement[];
|
|
@@ -165,16 +183,22 @@ declare function collectSlots(document: SceneDocument): Map<string, {
|
|
|
165
183
|
elementId: string;
|
|
166
184
|
kind: SceneElementKind;
|
|
167
185
|
}>;
|
|
186
|
+
/** Define options to configure a new page including name, dimensions, and background color */
|
|
168
187
|
interface NewPageOptions {
|
|
169
188
|
name?: string;
|
|
170
189
|
width?: number;
|
|
171
190
|
height?: number;
|
|
172
191
|
background?: string;
|
|
173
192
|
}
|
|
193
|
+
/** Create a new empty SceneDocument with a title and optional initial page settings */
|
|
174
194
|
declare function createEmptyDocument(title: string, page?: NewPageOptions): SceneDocument;
|
|
195
|
+
/** Create a new ScenePage with specified options and a unique identifier */
|
|
175
196
|
declare function createPage(options: NewPageOptions, id: string): ScenePage;
|
|
197
|
+
/** Assert that a value is a positive finite number and throw an error with a label if not */
|
|
176
198
|
declare function assertPositiveFinite(value: number, label: string): void;
|
|
199
|
+
/** Assert that a value is a finite number and throw an error with a label if not */
|
|
177
200
|
declare function assertFinite(value: number, label: string): void;
|
|
201
|
+
/** Validate that a string is a hex, rgb(a), or 'transparent' color and throw an error if not */
|
|
178
202
|
declare function assertColor(value: string, label: string): void;
|
|
179
203
|
/** Media boundary rule shared with sequences: remote http(s) or a rooted
|
|
180
204
|
* /api/ path — never sandbox-local files or data:/blob: blobs. Delegates to the
|
|
@@ -182,4 +206,4 @@ declare function assertColor(value: string, label: string): void;
|
|
|
182
206
|
* rule (trims, named-rejects local/inline schemes) so they cannot drift. */
|
|
183
207
|
declare function assertSceneMediaSrc(value: string, label: string): void;
|
|
184
208
|
|
|
185
|
-
export { type Bounds as B, type EllipseElement as E, type GroupElement as G, type ImageElement as I, type LineElement as L, type NewPageOptions as N, type PageBleed as P, type RectElement as R,
|
|
209
|
+
export { type Bounds as B, type EllipseElement as E, type GroupElement as G, type ImageElement as I, type LineElement as L, type NewPageOptions as N, type PageBleed as P, type RectElement as R, type ScenePage as S, type TextElement as T, type VideoElement as V, type SceneElement as a, type PageGuides as b, type SceneDocument as c, type SceneElementKind as d, SCENE_ELEMENT_KINDS as e, SCENE_SCHEMA_VERSION as f, type SceneElementBase as g, type SceneSettings as h, assertColor as i, assertFinite as j, assertPositiveFinite as k, assertSceneMediaSrc as l, boundsIntersect as m, collectSlots as n, createEmptyDocument as o, createPage as p, elementAabb as q, elementExtent as r, estimateTextHeight as s, findElement as t, requireElement as u, requirePage as v };
|
|
@@ -23,22 +23,28 @@ interface ModelInfo {
|
|
|
23
23
|
_provider?: string;
|
|
24
24
|
provider?: string;
|
|
25
25
|
}
|
|
26
|
+
/** Define possible origins for the chat model configuration values */
|
|
26
27
|
type ChatModelSource = 'request' | 'workspace' | 'env' | 'default';
|
|
28
|
+
/** Resolve a chat model with its identifier and source information */
|
|
27
29
|
interface ResolvedChatModel {
|
|
28
30
|
model: string;
|
|
29
31
|
source: ChatModelSource;
|
|
30
32
|
}
|
|
33
|
+
/** Represent successful chat model validation with a true status and a validated string value */
|
|
31
34
|
interface ChatModelValidationSuccess {
|
|
32
35
|
succeeded: true;
|
|
33
36
|
value: string;
|
|
34
37
|
}
|
|
38
|
+
/** Describe a failed chat model validation result with an error message */
|
|
35
39
|
interface ChatModelValidationFailure {
|
|
36
40
|
succeeded: false;
|
|
37
41
|
error: string;
|
|
38
42
|
}
|
|
43
|
+
/** Resolve the outcome of validating a chat model as either success or failure */
|
|
39
44
|
type ChatModelValidationResult = ChatModelValidationSuccess | ChatModelValidationFailure;
|
|
40
45
|
/** The catalog-fetch boundary: maps a router base URL to the raw model list. */
|
|
41
46
|
type LoadModels = (routerBaseUrl: string) => Promise<ModelInfo[]>;
|
|
47
|
+
/** Resolve the effective chat model input by prioritizing request, workspace, environment, and default models */
|
|
42
48
|
interface ResolveChatModelInput {
|
|
43
49
|
/** Per-request override (highest precedence). */
|
|
44
50
|
requestModel?: string;
|
|
@@ -53,6 +59,7 @@ interface ResolveChatModelInput {
|
|
|
53
59
|
/** Resolve the chat-turn model by the one canonical precedence. Blank values are
|
|
54
60
|
* treated as absent. */
|
|
55
61
|
declare function resolveChatModel(input: ResolveChatModelInput): ResolvedChatModel;
|
|
62
|
+
/** Define input parameters for validating chat model IDs with optional allowlist and catalog access details */
|
|
56
63
|
interface ValidateChatModelIdInput {
|
|
57
64
|
/** Ids accepted without a catalog round-trip (defaults + operator-trusted). */
|
|
58
65
|
allowlist?: Iterable<string>;
|
|
@@ -71,8 +78,11 @@ interface ValidateChatModelIdInput {
|
|
|
71
78
|
* rather than silently assigned a provider.
|
|
72
79
|
*/
|
|
73
80
|
declare function validateChatModelId(modelId: unknown, input: ValidateChatModelIdInput): Promise<ChatModelValidationResult>;
|
|
81
|
+
/** Resolve and return a trimmed string model ID or undefined for invalid or empty input */
|
|
74
82
|
declare function cleanModelId(value: unknown): string | undefined;
|
|
83
|
+
/** Validate if a model ID string conforms to length and character format requirements */
|
|
75
84
|
declare function isWellFormedModelId(modelId: string): boolean;
|
|
85
|
+
/** Resolve unique catalog IDs associated with a given model including its canonical form if applicable */
|
|
76
86
|
declare function catalogIdsForModel(model: ModelInfo): string[];
|
|
77
87
|
|
|
78
88
|
export { type ChatModelSource, type ChatModelValidationFailure, type ChatModelValidationResult, type ChatModelValidationSuccess, type LoadModels, type ModelInfo, type ResolveChatModelInput, type ResolvedChatModel, type ValidateChatModelIdInput, catalogIdsForModel, cleanModelId, isWellFormedModelId, resolveChatModel, validateChatModelId };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/model-resolution/index.ts"],"sourcesContent":["/**\n * Canonical chat-model resolution — identical across every agent app.\n *\n * The ONLY per-app inputs are DATA, never logic: the default model, the\n * allowlist, the env value the deployment set, and the catalog-fetch loader.\n * The logic is one precedence ladder + one fail-closed validator that every\n * product uses the same way — there is no per-product variant, no env-var name\n * baked in, and no backend dimension (router-vs-sandbox is the harness/dispatch\n * concern, not model resolution; a sandbox's provider default lives in the\n * sandbox subpath).\n *\n * - resolveChatModel: request > workspace > env > default. The product reads its\n * own deploy env var and passes the VALUE as `envModel`; the shell knows no\n * env-var names. Source is canonical: 'request' | 'workspace' | 'env' | 'default'.\n * - validateChatModelId: fail-closed. Admit an id that is in the allowlist, or\n * equals the operator-set env model, or is served by the live router catalog\n * (exact, or a bare id resolved to its canonical id when the suffix is unique).\n */\n\n/** The router /v1/models entry shape this module reads. Minimal on purpose. */\nexport interface ModelInfo {\n id: string\n name?: string\n _provider?: string\n provider?: string\n}\n\n/** Canonical (provider-prefixed) id for a catalog entry: pass through an id that\n * already carries a provider, else prefix the entry's provider when present. */\nfunction canonicalModelId(model: ModelInfo): string {\n if (model.id.includes('/')) return model.id\n const provider = model._provider ?? model.provider\n return provider ? `${provider}/${model.id}` : model.id\n}\n\nexport type ChatModelSource = 'request' | 'workspace' | 'env' | 'default'\n\nexport interface ResolvedChatModel {\n model: string\n source: ChatModelSource\n}\n\nexport interface ChatModelValidationSuccess {\n succeeded: true\n value: string\n}\n\nexport interface ChatModelValidationFailure {\n succeeded: false\n error: string\n}\n\nexport type ChatModelValidationResult = ChatModelValidationSuccess | ChatModelValidationFailure\n\n/** The catalog-fetch boundary: maps a router base URL to the raw model list. */\nexport type LoadModels = (routerBaseUrl: string) => Promise<ModelInfo[]>\n\nexport interface ResolveChatModelInput {\n /** Per-request override (highest precedence). */\n requestModel?: string\n /** Persisted workspace-pinned model. */\n workspaceModel?: string\n /** The value the deployment's model env var holds (the product reads its own\n * var name and passes the value — the shell stays env-var-name agnostic). */\n envModel?: string\n /** Final fallback (the product's default, typically profile.model.default). */\n defaultModel: string\n}\n\n/** Resolve the chat-turn model by the one canonical precedence. Blank values are\n * treated as absent. */\nexport function resolveChatModel(input: ResolveChatModelInput): ResolvedChatModel {\n const request = cleanModelId(input.requestModel)\n if (request) return { model: request, source: 'request' }\n const workspace = cleanModelId(input.workspaceModel)\n if (workspace) return { model: workspace, source: 'workspace' }\n const env = cleanModelId(input.envModel)\n if (env) return { model: env, source: 'env' }\n return { model: input.defaultModel, source: 'default' }\n}\n\nexport interface ValidateChatModelIdInput {\n /** Ids accepted without a catalog round-trip (defaults + operator-trusted). */\n allowlist?: Iterable<string>\n /** The operator-set env model value — always admitted (operator-trusted). */\n envModel?: string\n /** Catalog loader; required to reach the catalog path. */\n loadModels?: LoadModels\n /** Catalog endpoint base; required to reach the catalog path. */\n routerBaseUrl?: string\n}\n\n/**\n * Fail-closed model-id validation. Accepts an id only when it is well-formed AND\n * (in the allowlist, or equals the operator-set env model, or served by the live\n * catalog). A bare id (no provider prefix) resolves to its canonical id only when\n * the suffix is unique across the catalog — an ambiguous suffix is rejected\n * rather than silently assigned a provider.\n */\nexport async function validateChatModelId(\n modelId: unknown,\n input: ValidateChatModelIdInput,\n): Promise<ChatModelValidationResult> {\n const cleaned = cleanModelId(modelId)\n if (!cleaned) return { succeeded: false, error: 'Model id must be a non-empty string.' }\n if (!isWellFormedModelId(cleaned)) return { succeeded: false, error: `Model id is malformed: ${cleaned}` }\n\n const allowed = new Set(input.allowlist ?? [])\n if (allowed.has(cleaned)) return { succeeded: true, value: cleaned }\n\n // The operator-set env model is trusted without a catalog round-trip.\n if (cleanModelId(input.envModel) === cleaned) return { succeeded: true, value: cleaned }\n\n if (!input.loadModels || typeof input.routerBaseUrl !== 'string' || input.routerBaseUrl.length === 0) {\n return { succeeded: false, error: `Model is not available: ${cleaned}` }\n }\n\n let catalog: ModelInfo[]\n try {\n catalog = await input.loadModels(input.routerBaseUrl)\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err)\n return { succeeded: false, error: `Could not validate model catalog: ${message}` }\n }\n\n const ids = new Set(catalog.flatMap(catalogIdsForModel))\n if (ids.has(cleaned)) return { succeeded: true, value: cleaned }\n\n if (!cleaned.includes('/')) {\n const canonicalBySuffix = new Map<string, string[]>()\n for (const model of catalog) {\n if (typeof model.id !== 'string' || !model.id.trim()) continue\n const canonical = canonicalModelId(model)\n if (!canonical.includes('/')) continue\n const suffix = canonical.split('/').slice(1).join('/')\n const entries = canonicalBySuffix.get(suffix)\n if (entries) entries.push(canonical)\n else canonicalBySuffix.set(suffix, [canonical])\n }\n const matches = canonicalBySuffix.get(cleaned)\n if (matches && matches.length === 1) return { succeeded: true, value: matches[0]! }\n }\n\n return { succeeded: false, error: `Model is not available: ${cleaned}` }\n}\n\nexport function cleanModelId(value: unknown): string | undefined {\n if (typeof value !== 'string') return undefined\n const trimmed = value.trim()\n return trimmed.length > 0 ? trimmed : undefined\n}\n\nexport function isWellFormedModelId(modelId: string): boolean {\n if (modelId.length > 200) return false\n return /^[A-Za-z0-9._/@:-]+$/.test(modelId)\n}\n\nexport function catalogIdsForModel(model: ModelInfo): string[] {\n const ids = new Set<string>()\n if (typeof model.id === 'string' && model.id.trim()) ids.add(model.id.trim())\n if (typeof model.id === 'string' && model.id.trim() && !model.id.includes('/')) {\n const canonical = canonicalModelId(model)\n if (canonical.includes('/')) ids.add(canonical)\n }\n return [...ids]\n}\n"],"mappings":"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","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/model-resolution/index.ts"],"sourcesContent":["/**\n * Canonical chat-model resolution — identical across every agent app.\n *\n * The ONLY per-app inputs are DATA, never logic: the default model, the\n * allowlist, the env value the deployment set, and the catalog-fetch loader.\n * The logic is one precedence ladder + one fail-closed validator that every\n * product uses the same way — there is no per-product variant, no env-var name\n * baked in, and no backend dimension (router-vs-sandbox is the harness/dispatch\n * concern, not model resolution; a sandbox's provider default lives in the\n * sandbox subpath).\n *\n * - resolveChatModel: request > workspace > env > default. The product reads its\n * own deploy env var and passes the VALUE as `envModel`; the shell knows no\n * env-var names. Source is canonical: 'request' | 'workspace' | 'env' | 'default'.\n * - validateChatModelId: fail-closed. Admit an id that is in the allowlist, or\n * equals the operator-set env model, or is served by the live router catalog\n * (exact, or a bare id resolved to its canonical id when the suffix is unique).\n */\n\n/** The router /v1/models entry shape this module reads. Minimal on purpose. */\nexport interface ModelInfo {\n id: string\n name?: string\n _provider?: string\n provider?: string\n}\n\n/** Canonical (provider-prefixed) id for a catalog entry: pass through an id that\n * already carries a provider, else prefix the entry's provider when present. */\nfunction canonicalModelId(model: ModelInfo): string {\n if (model.id.includes('/')) return model.id\n const provider = model._provider ?? model.provider\n return provider ? `${provider}/${model.id}` : model.id\n}\n\n/** Define possible origins for the chat model configuration values */\nexport type ChatModelSource = 'request' | 'workspace' | 'env' | 'default'\n\n/** Resolve a chat model with its identifier and source information */\nexport interface ResolvedChatModel {\n model: string\n source: ChatModelSource\n}\n\n/** Represent successful chat model validation with a true status and a validated string value */\nexport interface ChatModelValidationSuccess {\n succeeded: true\n value: string\n}\n\n/** Describe a failed chat model validation result with an error message */\nexport interface ChatModelValidationFailure {\n succeeded: false\n error: string\n}\n\n/** Resolve the outcome of validating a chat model as either success or failure */\nexport type ChatModelValidationResult = ChatModelValidationSuccess | ChatModelValidationFailure\n\n/** The catalog-fetch boundary: maps a router base URL to the raw model list. */\nexport type LoadModels = (routerBaseUrl: string) => Promise<ModelInfo[]>\n\n/** Resolve the effective chat model input by prioritizing request, workspace, environment, and default models */\nexport interface ResolveChatModelInput {\n /** Per-request override (highest precedence). */\n requestModel?: string\n /** Persisted workspace-pinned model. */\n workspaceModel?: string\n /** The value the deployment's model env var holds (the product reads its own\n * var name and passes the value — the shell stays env-var-name agnostic). */\n envModel?: string\n /** Final fallback (the product's default, typically profile.model.default). */\n defaultModel: string\n}\n\n/** Resolve the chat-turn model by the one canonical precedence. Blank values are\n * treated as absent. */\nexport function resolveChatModel(input: ResolveChatModelInput): ResolvedChatModel {\n const request = cleanModelId(input.requestModel)\n if (request) return { model: request, source: 'request' }\n const workspace = cleanModelId(input.workspaceModel)\n if (workspace) return { model: workspace, source: 'workspace' }\n const env = cleanModelId(input.envModel)\n if (env) return { model: env, source: 'env' }\n return { model: input.defaultModel, source: 'default' }\n}\n\n/** Define input parameters for validating chat model IDs with optional allowlist and catalog access details */\nexport interface ValidateChatModelIdInput {\n /** Ids accepted without a catalog round-trip (defaults + operator-trusted). */\n allowlist?: Iterable<string>\n /** The operator-set env model value — always admitted (operator-trusted). */\n envModel?: string\n /** Catalog loader; required to reach the catalog path. */\n loadModels?: LoadModels\n /** Catalog endpoint base; required to reach the catalog path. */\n routerBaseUrl?: string\n}\n\n/**\n * Fail-closed model-id validation. Accepts an id only when it is well-formed AND\n * (in the allowlist, or equals the operator-set env model, or served by the live\n * catalog). A bare id (no provider prefix) resolves to its canonical id only when\n * the suffix is unique across the catalog — an ambiguous suffix is rejected\n * rather than silently assigned a provider.\n */\nexport async function validateChatModelId(\n modelId: unknown,\n input: ValidateChatModelIdInput,\n): Promise<ChatModelValidationResult> {\n const cleaned = cleanModelId(modelId)\n if (!cleaned) return { succeeded: false, error: 'Model id must be a non-empty string.' }\n if (!isWellFormedModelId(cleaned)) return { succeeded: false, error: `Model id is malformed: ${cleaned}` }\n\n const allowed = new Set(input.allowlist ?? [])\n if (allowed.has(cleaned)) return { succeeded: true, value: cleaned }\n\n // The operator-set env model is trusted without a catalog round-trip.\n if (cleanModelId(input.envModel) === cleaned) return { succeeded: true, value: cleaned }\n\n if (!input.loadModels || typeof input.routerBaseUrl !== 'string' || input.routerBaseUrl.length === 0) {\n return { succeeded: false, error: `Model is not available: ${cleaned}` }\n }\n\n let catalog: ModelInfo[]\n try {\n catalog = await input.loadModels(input.routerBaseUrl)\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err)\n return { succeeded: false, error: `Could not validate model catalog: ${message}` }\n }\n\n const ids = new Set(catalog.flatMap(catalogIdsForModel))\n if (ids.has(cleaned)) return { succeeded: true, value: cleaned }\n\n if (!cleaned.includes('/')) {\n const canonicalBySuffix = new Map<string, string[]>()\n for (const model of catalog) {\n if (typeof model.id !== 'string' || !model.id.trim()) continue\n const canonical = canonicalModelId(model)\n if (!canonical.includes('/')) continue\n const suffix = canonical.split('/').slice(1).join('/')\n const entries = canonicalBySuffix.get(suffix)\n if (entries) entries.push(canonical)\n else canonicalBySuffix.set(suffix, [canonical])\n }\n const matches = canonicalBySuffix.get(cleaned)\n if (matches && matches.length === 1) return { succeeded: true, value: matches[0]! }\n }\n\n return { succeeded: false, error: `Model is not available: ${cleaned}` }\n}\n\n/** Resolve and return a trimmed string model ID or undefined for invalid or empty input */\nexport function cleanModelId(value: unknown): string | undefined {\n if (typeof value !== 'string') return undefined\n const trimmed = value.trim()\n return trimmed.length > 0 ? trimmed : undefined\n}\n\n/** Validate if a model ID string conforms to length and character format requirements */\nexport function isWellFormedModelId(modelId: string): boolean {\n if (modelId.length > 200) return false\n return /^[A-Za-z0-9._/@:-]+$/.test(modelId)\n}\n\n/** Resolve unique catalog IDs associated with a given model including its canonical form if applicable */\nexport function catalogIdsForModel(model: ModelInfo): string[] {\n const ids = new Set<string>()\n if (typeof model.id === 'string' && model.id.trim()) ids.add(model.id.trim())\n if (typeof model.id === 'string' && model.id.trim() && !model.id.includes('/')) {\n const canonical = canonicalModelId(model)\n if (canonical.includes('/')) ids.add(canonical)\n }\n return [...ids]\n}\n"],"mappings":"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","names":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as SceneElement, N as NewPageOptions, P as PageBleed, b as PageGuides } from './model-DnfO_PdJ.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* The design-canvas operation union — the ONE mutation vocabulary shared by
|
|
@@ -35,6 +35,7 @@ type SceneAttrsPatch = Partial<Omit<SceneElement, 'id' | 'kind' | 'children'>> &
|
|
|
35
35
|
posterSrc?: string;
|
|
36
36
|
fit?: 'fill' | 'cover' | 'contain';
|
|
37
37
|
};
|
|
38
|
+
/** Define an operation to add a scene element to a page with optional index and parent group */
|
|
38
39
|
interface AddElementOperation {
|
|
39
40
|
type: 'add_element';
|
|
40
41
|
pageId: string;
|
|
@@ -46,12 +47,14 @@ interface AddElementOperation {
|
|
|
46
47
|
/** Parent group; omitted → page root. */
|
|
47
48
|
parentGroupId?: string;
|
|
48
49
|
}
|
|
50
|
+
/** Define an operation to update attributes of a specific element on a page */
|
|
49
51
|
interface SetAttrsOperation {
|
|
50
52
|
type: 'set_attrs';
|
|
51
53
|
pageId: string;
|
|
52
54
|
elementId: string;
|
|
53
55
|
attrs: SceneAttrsPatch;
|
|
54
56
|
}
|
|
57
|
+
/** Resolve an operation to reorder an element within its current owner by specifying the target index */
|
|
55
58
|
interface ReorderElementOperation {
|
|
56
59
|
type: 'reorder_element';
|
|
57
60
|
pageId: string;
|
|
@@ -59,11 +62,13 @@ interface ReorderElementOperation {
|
|
|
59
62
|
/** Target index within the element's CURRENT owner (page root or group). */
|
|
60
63
|
toIndex: number;
|
|
61
64
|
}
|
|
65
|
+
/** Resolve deletion of a specific element from a page by its identifiers */
|
|
62
66
|
interface DeleteElementOperation {
|
|
63
67
|
type: 'delete_element';
|
|
64
68
|
pageId: string;
|
|
65
69
|
elementId: string;
|
|
66
70
|
}
|
|
71
|
+
/** Group elements by grouping two or more sibling elements in their current z-order under a new group ID */
|
|
67
72
|
interface GroupElementsOperation {
|
|
68
73
|
type: 'group_elements';
|
|
69
74
|
pageId: string;
|
|
@@ -73,11 +78,13 @@ interface GroupElementsOperation {
|
|
|
73
78
|
groupId: string;
|
|
74
79
|
name?: string;
|
|
75
80
|
}
|
|
81
|
+
/** Resolve an operation to ungroup elements within a specified page and group context */
|
|
76
82
|
interface UngroupElementOperation {
|
|
77
83
|
type: 'ungroup_element';
|
|
78
84
|
pageId: string;
|
|
79
85
|
groupId: string;
|
|
80
86
|
}
|
|
87
|
+
/** Define an operation to add a new page with an optional position and caller-minted page ID */
|
|
81
88
|
interface AddPageOperation {
|
|
82
89
|
type: 'add_page';
|
|
83
90
|
/** Caller-minted page id. */
|
|
@@ -86,21 +93,25 @@ interface AddPageOperation {
|
|
|
86
93
|
/** Position in the page list; omitted → end. */
|
|
87
94
|
index?: number;
|
|
88
95
|
}
|
|
96
|
+
/** Define an operation to duplicate a page with a new caller-specified page ID */
|
|
89
97
|
interface DuplicatePageOperation {
|
|
90
98
|
type: 'duplicate_page';
|
|
91
99
|
sourcePageId: string;
|
|
92
100
|
/** Caller-minted id for the copy; element ids are re-minted server-side. */
|
|
93
101
|
pageId: string;
|
|
94
102
|
}
|
|
103
|
+
/** Represent a delete page operation with a specified page identifier */
|
|
95
104
|
interface DeletePageOperation {
|
|
96
105
|
type: 'delete_page';
|
|
97
106
|
pageId: string;
|
|
98
107
|
}
|
|
108
|
+
/** Represent an operation to reorder a page by moving it to a specified index */
|
|
99
109
|
interface ReorderPageOperation {
|
|
100
110
|
type: 'reorder_page';
|
|
101
111
|
pageId: string;
|
|
102
112
|
toIndex: number;
|
|
103
113
|
}
|
|
114
|
+
/** Define an operation to set or update properties of a page including size, background, and bleed */
|
|
104
115
|
interface SetPagePropsOperation {
|
|
105
116
|
type: 'set_page_props';
|
|
106
117
|
pageId: string;
|
|
@@ -111,11 +122,13 @@ interface SetPagePropsOperation {
|
|
|
111
122
|
/** null clears bleed; omitted leaves unchanged. */
|
|
112
123
|
bleed?: PageBleed | null;
|
|
113
124
|
}
|
|
125
|
+
/** Resolve an operation to set guides on a specific page by its identifier */
|
|
114
126
|
interface SetPageGuidesOperation {
|
|
115
127
|
type: 'set_page_guides';
|
|
116
128
|
pageId: string;
|
|
117
129
|
guides: PageGuides;
|
|
118
130
|
}
|
|
131
|
+
/** Define an operation to bind or unbind a unique slot to an element on a specific page */
|
|
119
132
|
interface BindSlotOperation {
|
|
120
133
|
type: 'bind_slot';
|
|
121
134
|
pageId: string;
|
|
@@ -129,16 +142,21 @@ interface ApplyDataOperation {
|
|
|
129
142
|
type: 'apply_data';
|
|
130
143
|
bindings: Record<string, string>;
|
|
131
144
|
}
|
|
145
|
+
/** Define an operation to set the document title to a specified string */
|
|
132
146
|
interface SetDocumentTitleOperation {
|
|
133
147
|
type: 'set_document_title';
|
|
134
148
|
title: string;
|
|
135
149
|
}
|
|
150
|
+
/** Represent operations that modify scenes by adding, updating, reordering, grouping, or deleting elements and pages */
|
|
136
151
|
type SceneOperation = AddElementOperation | SetAttrsOperation | ReorderElementOperation | DeleteElementOperation | GroupElementsOperation | UngroupElementOperation | AddPageOperation | DuplicatePageOperation | DeletePageOperation | ReorderPageOperation | SetPagePropsOperation | SetPageGuidesOperation | BindSlotOperation | ApplyDataOperation | SetDocumentTitleOperation;
|
|
152
|
+
/** Define a plan summarizing a scene with its description and associated operations */
|
|
137
153
|
interface ScenePlan {
|
|
138
154
|
summary: string;
|
|
139
155
|
operations: SceneOperation[];
|
|
140
156
|
}
|
|
157
|
+
/** Extract the type property from a SceneOperation to represent its operation type */
|
|
141
158
|
type SceneOperationType = SceneOperation['type'];
|
|
159
|
+
/** Define all valid operation types for scene manipulation in the application */
|
|
142
160
|
declare const SCENE_OPERATION_TYPES: readonly SceneOperationType[];
|
|
143
161
|
|
|
144
|
-
export { type AddElementOperation as A, type BindSlotOperation as B, type DeleteElementOperation as D, type GroupElementsOperation as G, type ReorderElementOperation as R,
|
|
162
|
+
export { type AddElementOperation as A, type BindSlotOperation as B, type DeleteElementOperation as D, type GroupElementsOperation as G, type ReorderElementOperation as R, type SceneOperation as S, type UngroupElementOperation as U, type ScenePlan as a, type AddPageOperation as b, type ApplyDataOperation as c, type DeletePageOperation as d, type DuplicatePageOperation as e, type ReorderPageOperation as f, SCENE_OPERATION_TYPES as g, type SceneAttrsPatch as h, type SceneOperationType as i, type SetAttrsOperation as j, type SetDocumentTitleOperation as k, type SetPageGuidesOperation as l, type SetPagePropsOperation as m };
|