@tangle-network/agent-app 0.43.56 → 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 +9 -9
- 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/intakes/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/intakes/api.ts"],"sourcesContent":["/**\n * Framework-neutral intake API: the get-current / save-answer / complete logic,\n * lifted out of any one app's route file. Each app mounts these in its own\n * route with its own auth — the handlers take an already-resolved store (the\n * caller built it from `createUserIntakeStore` / `createProjectIntakeStore`\n * after running RBAC), the intake graph, and the parsed inputs. They return\n * web-standard `Response`s (available in Workers, Node 18+, Deno, browsers), so\n * \"framework-neutral\" is literal: no Remix/React-Router/Express import anywhere.\n *\n * The handlers own the graph→HTTP mapping the UI needs: `getCurrentIntake`\n * returns the loaded state PLUS the next question to ask (the question-graph\n * traversal from the `./intakes` leaf) and the progress counter, so the client\n * renders one question at a time without re-deriving the graph. Store\n * `IntakeError`s map to typed 4xx codes, never a generic 500 — an invalid\n * answer is a 400, an incomplete-complete is a 409, never a silent success.\n *\n * Imports `drizzle-orm` transitively (through the store types), so this is a\n * subpath, never re-exported from root.\n */\n\nimport {\n type IntakeAnswerValue,\n type IntakeGraph,\n type IntakeQuestion,\n intakeProgress,\n nextQuestion,\n} from './model'\nimport { type IntakeStore, IntakeError } from './drizzle/store'\n\n/** What the client renders: the saved state, the next prompt, and progress. */\nexport interface CurrentIntakeView {\n graphId: string\n title: string\n description?: string\n answers: Record<string, IntakeAnswerValue>\n /** The next question to ask, or null when the interview is done. */\n nextQuestion: IntakeQuestion | null\n completed: boolean\n completedAt: string | null\n progress: { answered: number; total: number }\n}\n\nexport interface IntakeApiOptions {\n store: IntakeStore\n graph: IntakeGraph\n}\n\n/**\n * Build the intake API bound to one store + graph. Returns three handlers; an\n * app maps its route methods onto them (GET→getCurrentIntake, POST→saveAnswer,\n * a complete action→completeIntake).\n */\nexport function createIntakeApi(opts: IntakeApiOptions) {\n const { store, graph } = opts\n\n function view(state: Awaited<ReturnType<IntakeStore['get']>>): CurrentIntakeView {\n return {\n graphId: graph.id,\n title: graph.title,\n ...(graph.description ? { description: graph.description } : {}),\n answers: state.payload.answers,\n nextQuestion: nextQuestion(graph, state.payload.answers),\n completed: state.completed,\n completedAt: state.completedAt ? state.completedAt.toISOString() : null,\n progress: intakeProgress(graph, state.payload.answers),\n }\n }\n\n async function getCurrentIntake(): Promise<Response> {\n const state = await store.get()\n return Response.json(view(state))\n }\n\n async function saveAnswer(input: { questionId?: string; value?: IntakeAnswerValue }): Promise<Response> {\n if (!input.questionId) return Response.json({ error: 'Missing questionId' }, { status: 400 })\n try {\n const state = await store.save(input.questionId, input.value ?? null)\n return Response.json(view(state))\n } catch (err) {\n return intakeErrorResponse(err)\n }\n }\n\n async function completeIntake(): Promise<Response> {\n try {\n const state = await store.complete()\n return Response.json(view(state))\n } catch (err) {\n return intakeErrorResponse(err)\n }\n }\n\n return { getCurrentIntake, saveAnswer, completeIntake }\n}\n\nconst ERROR_STATUS: Record<string, number> = {\n 'invalid-answer': 400,\n 'unknown-question': 404,\n incomplete: 409,\n 'stale-graph': 409,\n}\n\nfunction intakeErrorResponse(err: unknown): Response {\n if (err instanceof IntakeError) {\n return Response.json({ error: err.message, code: err.code }, { status: ERROR_STATUS[err.code] ?? 400 })\n }\n throw err\n}\n"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"sources":["../../src/intakes/api.ts"],"sourcesContent":["/**\n * Framework-neutral intake API: the get-current / save-answer / complete logic,\n * lifted out of any one app's route file. Each app mounts these in its own\n * route with its own auth — the handlers take an already-resolved store (the\n * caller built it from `createUserIntakeStore` / `createProjectIntakeStore`\n * after running RBAC), the intake graph, and the parsed inputs. They return\n * web-standard `Response`s (available in Workers, Node 18+, Deno, browsers), so\n * \"framework-neutral\" is literal: no Remix/React-Router/Express import anywhere.\n *\n * The handlers own the graph→HTTP mapping the UI needs: `getCurrentIntake`\n * returns the loaded state PLUS the next question to ask (the question-graph\n * traversal from the `./intakes` leaf) and the progress counter, so the client\n * renders one question at a time without re-deriving the graph. Store\n * `IntakeError`s map to typed 4xx codes, never a generic 500 — an invalid\n * answer is a 400, an incomplete-complete is a 409, never a silent success.\n *\n * Imports `drizzle-orm` transitively (through the store types), so this is a\n * subpath, never re-exported from root.\n */\n\nimport {\n type IntakeAnswerValue,\n type IntakeGraph,\n type IntakeQuestion,\n intakeProgress,\n nextQuestion,\n} from './model'\nimport { type IntakeStore, IntakeError } from './drizzle/store'\n\n/** What the client renders: the saved state, the next prompt, and progress. */\nexport interface CurrentIntakeView {\n graphId: string\n title: string\n description?: string\n answers: Record<string, IntakeAnswerValue>\n /** The next question to ask, or null when the interview is done. */\n nextQuestion: IntakeQuestion | null\n completed: boolean\n completedAt: string | null\n progress: { answered: number; total: number }\n}\n\n/** Define configuration options for initializing the intake API with store and graph components */\nexport interface IntakeApiOptions {\n store: IntakeStore\n graph: IntakeGraph\n}\n\n/**\n * Build the intake API bound to one store + graph. Returns three handlers; an\n * app maps its route methods onto them (GET→getCurrentIntake, POST→saveAnswer,\n * a complete action→completeIntake).\n */\nexport function createIntakeApi(opts: IntakeApiOptions) {\n const { store, graph } = opts\n\n function view(state: Awaited<ReturnType<IntakeStore['get']>>): CurrentIntakeView {\n return {\n graphId: graph.id,\n title: graph.title,\n ...(graph.description ? { description: graph.description } : {}),\n answers: state.payload.answers,\n nextQuestion: nextQuestion(graph, state.payload.answers),\n completed: state.completed,\n completedAt: state.completedAt ? state.completedAt.toISOString() : null,\n progress: intakeProgress(graph, state.payload.answers),\n }\n }\n\n async function getCurrentIntake(): Promise<Response> {\n const state = await store.get()\n return Response.json(view(state))\n }\n\n async function saveAnswer(input: { questionId?: string; value?: IntakeAnswerValue }): Promise<Response> {\n if (!input.questionId) return Response.json({ error: 'Missing questionId' }, { status: 400 })\n try {\n const state = await store.save(input.questionId, input.value ?? null)\n return Response.json(view(state))\n } catch (err) {\n return intakeErrorResponse(err)\n }\n }\n\n async function completeIntake(): Promise<Response> {\n try {\n const state = await store.complete()\n return Response.json(view(state))\n } catch (err) {\n return intakeErrorResponse(err)\n }\n }\n\n return { getCurrentIntake, saveAnswer, completeIntake }\n}\n\nconst ERROR_STATUS: Record<string, number> = {\n 'invalid-answer': 400,\n 'unknown-question': 404,\n incomplete: 409,\n 'stale-graph': 409,\n}\n\nfunction intakeErrorResponse(err: unknown): Response {\n if (err instanceof IntakeError) {\n return Response.json({ error: err.message, code: err.code }, { status: ERROR_STATUS[err.code] ?? 400 })\n }\n throw err\n}\n"],"mappings":";;;;;;;;;;AAqDO,SAAS,gBAAgB,MAAwB;AACtD,QAAM,EAAE,OAAO,MAAM,IAAI;AAEzB,WAAS,KAAK,OAAmE;AAC/E,WAAO;AAAA,MACL,SAAS,MAAM;AAAA,MACf,OAAO,MAAM;AAAA,MACb,GAAI,MAAM,cAAc,EAAE,aAAa,MAAM,YAAY,IAAI,CAAC;AAAA,MAC9D,SAAS,MAAM,QAAQ;AAAA,MACvB,cAAc,aAAa,OAAO,MAAM,QAAQ,OAAO;AAAA,MACvD,WAAW,MAAM;AAAA,MACjB,aAAa,MAAM,cAAc,MAAM,YAAY,YAAY,IAAI;AAAA,MACnE,UAAU,eAAe,OAAO,MAAM,QAAQ,OAAO;AAAA,IACvD;AAAA,EACF;AAEA,iBAAe,mBAAsC;AACnD,UAAM,QAAQ,MAAM,MAAM,IAAI;AAC9B,WAAO,SAAS,KAAK,KAAK,KAAK,CAAC;AAAA,EAClC;AAEA,iBAAe,WAAW,OAA8E;AACtG,QAAI,CAAC,MAAM,WAAY,QAAO,SAAS,KAAK,EAAE,OAAO,qBAAqB,GAAG,EAAE,QAAQ,IAAI,CAAC;AAC5F,QAAI;AACF,YAAM,QAAQ,MAAM,MAAM,KAAK,MAAM,YAAY,MAAM,SAAS,IAAI;AACpE,aAAO,SAAS,KAAK,KAAK,KAAK,CAAC;AAAA,IAClC,SAAS,KAAK;AACZ,aAAO,oBAAoB,GAAG;AAAA,IAChC;AAAA,EACF;AAEA,iBAAe,iBAAoC;AACjD,QAAI;AACF,YAAM,QAAQ,MAAM,MAAM,SAAS;AACnC,aAAO,SAAS,KAAK,KAAK,KAAK,CAAC;AAAA,IAClC,SAAS,KAAK;AACZ,aAAO,oBAAoB,GAAG;AAAA,IAChC;AAAA,EACF;AAEA,SAAO,EAAE,kBAAkB,YAAY,eAAe;AACxD;AAEA,IAAM,eAAuC;AAAA,EAC3C,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,YAAY;AAAA,EACZ,eAAe;AACjB;AAEA,SAAS,oBAAoB,KAAwB;AACnD,MAAI,eAAe,aAAa;AAC9B,WAAO,SAAS,KAAK,EAAE,OAAO,IAAI,SAAS,MAAM,IAAI,KAAK,GAAG,EAAE,QAAQ,aAAa,IAAI,IAAI,KAAK,IAAI,CAAC;AAAA,EACxG;AACA,QAAM;AACR;","names":[]}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
|
|
2
2
|
import { AnySQLiteTable, AnySQLiteColumn, BaseSQLiteDatabase } from 'drizzle-orm/sqlite-core';
|
|
3
|
-
import { I as IntakeAnswerValue, b as IntakeGraph } from '../model-
|
|
4
|
-
import { I as IntakePayload } from '../completion-
|
|
3
|
+
import { I as IntakeAnswerValue, b as IntakeGraph } from '../model-C8U0HZxL.js';
|
|
4
|
+
import { I as IntakePayload } from '../completion-CvcNUz07.js';
|
|
5
5
|
|
|
6
6
|
/** A product table referenced by FK — only the `id` column is touched. */
|
|
7
7
|
type IntakeParentTable = AnySQLiteTable & {
|
|
8
8
|
id: AnySQLiteColumn;
|
|
9
9
|
};
|
|
10
|
+
/** Define options for creating intake tables including user and optional workspace references */
|
|
10
11
|
interface CreateIntakeTablesOptions {
|
|
11
12
|
/** The product's user table — user-intake rows reference `userTable.id`. */
|
|
12
13
|
userTable: IntakeParentTable;
|
|
@@ -289,7 +290,9 @@ declare function createProjectIntakeTable(workspaceTable: IntakeParentTable): dr
|
|
|
289
290
|
* workspace table cannot reference a table that does not exist.
|
|
290
291
|
*/
|
|
291
292
|
declare function createIntakeTables<O extends CreateIntakeTablesOptions>(opts: O): IntakeTables<O>;
|
|
293
|
+
/** Resolve the structure and data of a user intake table based on the createUserIntakeTable function */
|
|
292
294
|
type UserIntakeTable = ReturnType<typeof createUserIntakeTable>;
|
|
295
|
+
/** Resolve the structure and data of the project intake table from the factory function */
|
|
293
296
|
type ProjectIntakeTable = ReturnType<typeof createProjectIntakeTable>;
|
|
294
297
|
/**
|
|
295
298
|
* The tables returned for a given options shape: `projectIntake` is present in
|
|
@@ -309,7 +312,9 @@ type AnyIntakeTables = {
|
|
|
309
312
|
userIntake: UserIntakeTable;
|
|
310
313
|
projectIntake?: ProjectIntakeTable;
|
|
311
314
|
};
|
|
315
|
+
/** Infer and represent a selected row from the UserIntakeTable data structure */
|
|
312
316
|
type UserIntakeRow = UserIntakeTable['$inferSelect'];
|
|
317
|
+
/** Resolve the selected data structure for a project intake table row */
|
|
313
318
|
type ProjectIntakeRow = ProjectIntakeTable['$inferSelect'];
|
|
314
319
|
|
|
315
320
|
/**
|
|
@@ -345,6 +350,7 @@ interface IntakeState {
|
|
|
345
350
|
completed: boolean;
|
|
346
351
|
completedAt: Date | null;
|
|
347
352
|
}
|
|
353
|
+
/** Define error codes representing specific intake validation failures */
|
|
348
354
|
type IntakeErrorCode = 'invalid-answer' | 'unknown-question' | 'incomplete' | 'stale-graph';
|
|
349
355
|
/** Thrown by store mutations on a refused write — callers map it to a 4xx. */
|
|
350
356
|
declare class IntakeError extends Error {
|
|
@@ -360,6 +366,7 @@ interface IntakeStore {
|
|
|
360
366
|
/** Stamp the intake complete; throws IntakeError when not yet completable. */
|
|
361
367
|
complete(): Promise<IntakeState>;
|
|
362
368
|
}
|
|
369
|
+
/** Define options required to create a user intake store for onboarding data collection */
|
|
363
370
|
interface CreateUserIntakeStoreOptions {
|
|
364
371
|
db: IntakeDatabase;
|
|
365
372
|
/** The user-intake table from createIntakeTables. */
|
|
@@ -371,6 +378,7 @@ interface CreateUserIntakeStoreOptions {
|
|
|
371
378
|
}
|
|
372
379
|
/** Build the per-user onboarding store, scoped to one userId. */
|
|
373
380
|
declare function createUserIntakeStore(opts: CreateUserIntakeStoreOptions): IntakeStore;
|
|
381
|
+
/** Define options required to create a project intake store including database, table, graph, and workspace ID */
|
|
374
382
|
interface CreateProjectIntakeStoreOptions {
|
|
375
383
|
db: IntakeDatabase;
|
|
376
384
|
/** The project-intake table from createIntakeTables (workspace scope). */
|
package/dist/intakes/drizzle.js
CHANGED
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
IntakeError,
|
|
3
3
|
createProjectIntakeStore,
|
|
4
4
|
createUserIntakeStore
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-VWAEWOWK.js";
|
|
6
|
+
import "../chunk-YZ6KQULN.js";
|
|
7
|
+
import "../chunk-JDEGS53O.js";
|
|
8
8
|
|
|
9
9
|
// src/intakes/drizzle/schema.ts
|
|
10
10
|
import { sql } from "drizzle-orm";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/intakes/drizzle/schema.ts"],"sourcesContent":["/**\n * Drizzle schema factory for the intake tables. The product owns the user (and\n * optionally workspace) tables; this factory creates the intake tables and\n * wires their foreign keys into the passed-in tables so the whole graph lives\n * in one drizzle schema with real cascade semantics.\n *\n * Two tables, two scopes:\n * - `user_intake` — the one-time onboarding interview, keyed on `user.id`\n * (UNIQUE per user: one onboarding payload per user). ALWAYS created.\n * - `project_intake` — the structured intake attached to a workspace, keyed\n * on `workspace.id` (UNIQUE per workspace). Created ONLY when a\n * `workspaceTable` is passed.\n *\n * `workspaceTable` is OPTIONAL by design: a non-workspace app (a single-user\n * tool, tax-without-workspaces) adopts per-user onboarding alone with zero\n * teams and zero workspace concept. When omitted, `createIntakeTables` returns\n * `{ userIntake }` and no `projectIntake` — the FK to a workspace table that\n * does not exist is never created.\n *\n * Imports `drizzle-orm` at module top — that is WHY this lives behind the\n * `/intakes/drizzle` sub-subpath. The pure `./intakes` leaf imports none of\n * this, so a consumer that never touches the DB never pulls the optional peer.\n */\n\nimport { sql } from 'drizzle-orm'\nimport { index, integer, sqliteTable, text, uniqueIndex } from 'drizzle-orm/sqlite-core'\nimport type { AnySQLiteColumn, AnySQLiteTable } from 'drizzle-orm/sqlite-core'\n\n/** A product table referenced by FK — only the `id` column is touched. */\nexport type IntakeParentTable = AnySQLiteTable & { id: AnySQLiteColumn }\n\nexport interface CreateIntakeTablesOptions {\n /** The product's user table — user-intake rows reference `userTable.id`. */\n userTable: IntakeParentTable\n /**\n * The product's workspace table — project-intake rows reference\n * `workspaceTable.id`. OPTIONAL: omit it for a single-user / non-workspace\n * app that wants per-user onboarding only. When omitted, no `projectIntake`\n * table is created.\n */\n workspaceTable?: IntakeParentTable\n}\n\nconst hexId = () => text('id').primaryKey().default(sql`(lower(hex(randomblob(16))))`)\n\nconst createdAt = () => integer('created_at', { mode: 'timestamp' }).notNull().default(sql`(unixepoch())`)\n\nconst updatedAt = () => integer('updated_at', { mode: 'timestamp' }).notNull().default(sql`(unixepoch())`)\n\nfunction createUserIntakeTable(userTable: IntakeParentTable) {\n return sqliteTable('user_intake', {\n id: hexId(),\n userId: text('user_id').notNull().references(() => userTable.id, { onDelete: 'cascade' }),\n /** The intake definition id the payload was collected against. */\n graphId: text('graph_id').notNull(),\n /** The IntakePayload JSON blob. */\n payload: text('payload', { mode: 'json' }).notNull(),\n /** Set when the user finishes the onboarding interview; null while open. */\n completedAt: integer('completed_at', { mode: 'timestamp' }),\n createdAt: createdAt(),\n updatedAt: updatedAt(),\n }, (table) => [\n uniqueIndex('uniq_user_intake_user').on(table.userId),\n ])\n}\n\nfunction createProjectIntakeTable(workspaceTable: IntakeParentTable) {\n return sqliteTable('project_intake', {\n id: hexId(),\n workspaceId: text('workspace_id').notNull().references(() => workspaceTable.id, { onDelete: 'cascade' }),\n graphId: text('graph_id').notNull(),\n payload: text('payload', { mode: 'json' }).notNull(),\n completedAt: integer('completed_at', { mode: 'timestamp' }),\n createdAt: createdAt(),\n updatedAt: updatedAt(),\n }, (table) => [\n uniqueIndex('uniq_project_intake_workspace').on(table.workspaceId),\n index('idx_project_intake_graph').on(table.graphId),\n ])\n}\n\n/**\n * Build the intake tables wired to the product's tables. Always returns\n * `userIntake`; returns `projectIntake` only when `workspaceTable` is passed.\n * The return type carries `projectIntake?` so a consumer that passes no\n * workspace table cannot reference a table that does not exist.\n */\nexport function createIntakeTables<O extends CreateIntakeTablesOptions>(\n opts: O,\n): IntakeTables<O> {\n const userIntake = createUserIntakeTable(opts.userTable)\n const result: { userIntake: ReturnType<typeof createUserIntakeTable>; projectIntake?: ReturnType<typeof createProjectIntakeTable> } = {\n userIntake,\n }\n if (opts.workspaceTable) {\n result.projectIntake = createProjectIntakeTable(opts.workspaceTable)\n }\n return result as IntakeTables<O>\n}\n\nexport type UserIntakeTable = ReturnType<typeof createUserIntakeTable>\nexport type ProjectIntakeTable = ReturnType<typeof createProjectIntakeTable>\n\n/**\n * The tables returned for a given options shape: `projectIntake` is present in\n * the type exactly when `workspaceTable` was provided.\n */\nexport type IntakeTables<O extends CreateIntakeTablesOptions> =\n O extends { workspaceTable: IntakeParentTable }\n ? { userIntake: UserIntakeTable; projectIntake: ProjectIntakeTable }\n : { userIntake: UserIntakeTable; projectIntake?: ProjectIntakeTable }\n\n/** The union table shape, for code that handles either scope generically. */\nexport type AnyIntakeTables = { userIntake: UserIntakeTable; projectIntake?: ProjectIntakeTable }\n\nexport type UserIntakeRow = UserIntakeTable['$inferSelect']\nexport type ProjectIntakeRow = ProjectIntakeTable['$inferSelect']\n"],"mappings":";;;;;;;;;AAwBA,SAAS,WAAW;AACpB,SAAS,OAAO,SAAS,aAAa,MAAM,mBAAmB;
|
|
1
|
+
{"version":3,"sources":["../../src/intakes/drizzle/schema.ts"],"sourcesContent":["/**\n * Drizzle schema factory for the intake tables. The product owns the user (and\n * optionally workspace) tables; this factory creates the intake tables and\n * wires their foreign keys into the passed-in tables so the whole graph lives\n * in one drizzle schema with real cascade semantics.\n *\n * Two tables, two scopes:\n * - `user_intake` — the one-time onboarding interview, keyed on `user.id`\n * (UNIQUE per user: one onboarding payload per user). ALWAYS created.\n * - `project_intake` — the structured intake attached to a workspace, keyed\n * on `workspace.id` (UNIQUE per workspace). Created ONLY when a\n * `workspaceTable` is passed.\n *\n * `workspaceTable` is OPTIONAL by design: a non-workspace app (a single-user\n * tool, tax-without-workspaces) adopts per-user onboarding alone with zero\n * teams and zero workspace concept. When omitted, `createIntakeTables` returns\n * `{ userIntake }` and no `projectIntake` — the FK to a workspace table that\n * does not exist is never created.\n *\n * Imports `drizzle-orm` at module top — that is WHY this lives behind the\n * `/intakes/drizzle` sub-subpath. The pure `./intakes` leaf imports none of\n * this, so a consumer that never touches the DB never pulls the optional peer.\n */\n\nimport { sql } from 'drizzle-orm'\nimport { index, integer, sqliteTable, text, uniqueIndex } from 'drizzle-orm/sqlite-core'\nimport type { AnySQLiteColumn, AnySQLiteTable } from 'drizzle-orm/sqlite-core'\n\n/** A product table referenced by FK — only the `id` column is touched. */\nexport type IntakeParentTable = AnySQLiteTable & { id: AnySQLiteColumn }\n\n/** Define options for creating intake tables including user and optional workspace references */\nexport interface CreateIntakeTablesOptions {\n /** The product's user table — user-intake rows reference `userTable.id`. */\n userTable: IntakeParentTable\n /**\n * The product's workspace table — project-intake rows reference\n * `workspaceTable.id`. OPTIONAL: omit it for a single-user / non-workspace\n * app that wants per-user onboarding only. When omitted, no `projectIntake`\n * table is created.\n */\n workspaceTable?: IntakeParentTable\n}\n\nconst hexId = () => text('id').primaryKey().default(sql`(lower(hex(randomblob(16))))`)\n\nconst createdAt = () => integer('created_at', { mode: 'timestamp' }).notNull().default(sql`(unixepoch())`)\n\nconst updatedAt = () => integer('updated_at', { mode: 'timestamp' }).notNull().default(sql`(unixepoch())`)\n\nfunction createUserIntakeTable(userTable: IntakeParentTable) {\n return sqliteTable('user_intake', {\n id: hexId(),\n userId: text('user_id').notNull().references(() => userTable.id, { onDelete: 'cascade' }),\n /** The intake definition id the payload was collected against. */\n graphId: text('graph_id').notNull(),\n /** The IntakePayload JSON blob. */\n payload: text('payload', { mode: 'json' }).notNull(),\n /** Set when the user finishes the onboarding interview; null while open. */\n completedAt: integer('completed_at', { mode: 'timestamp' }),\n createdAt: createdAt(),\n updatedAt: updatedAt(),\n }, (table) => [\n uniqueIndex('uniq_user_intake_user').on(table.userId),\n ])\n}\n\nfunction createProjectIntakeTable(workspaceTable: IntakeParentTable) {\n return sqliteTable('project_intake', {\n id: hexId(),\n workspaceId: text('workspace_id').notNull().references(() => workspaceTable.id, { onDelete: 'cascade' }),\n graphId: text('graph_id').notNull(),\n payload: text('payload', { mode: 'json' }).notNull(),\n completedAt: integer('completed_at', { mode: 'timestamp' }),\n createdAt: createdAt(),\n updatedAt: updatedAt(),\n }, (table) => [\n uniqueIndex('uniq_project_intake_workspace').on(table.workspaceId),\n index('idx_project_intake_graph').on(table.graphId),\n ])\n}\n\n/**\n * Build the intake tables wired to the product's tables. Always returns\n * `userIntake`; returns `projectIntake` only when `workspaceTable` is passed.\n * The return type carries `projectIntake?` so a consumer that passes no\n * workspace table cannot reference a table that does not exist.\n */\nexport function createIntakeTables<O extends CreateIntakeTablesOptions>(\n opts: O,\n): IntakeTables<O> {\n const userIntake = createUserIntakeTable(opts.userTable)\n const result: { userIntake: ReturnType<typeof createUserIntakeTable>; projectIntake?: ReturnType<typeof createProjectIntakeTable> } = {\n userIntake,\n }\n if (opts.workspaceTable) {\n result.projectIntake = createProjectIntakeTable(opts.workspaceTable)\n }\n return result as IntakeTables<O>\n}\n\n/** Resolve the structure and data of a user intake table based on the createUserIntakeTable function */\nexport type UserIntakeTable = ReturnType<typeof createUserIntakeTable>\n/** Resolve the structure and data of the project intake table from the factory function */\nexport type ProjectIntakeTable = ReturnType<typeof createProjectIntakeTable>\n\n/**\n * The tables returned for a given options shape: `projectIntake` is present in\n * the type exactly when `workspaceTable` was provided.\n */\nexport type IntakeTables<O extends CreateIntakeTablesOptions> =\n O extends { workspaceTable: IntakeParentTable }\n ? { userIntake: UserIntakeTable; projectIntake: ProjectIntakeTable }\n : { userIntake: UserIntakeTable; projectIntake?: ProjectIntakeTable }\n\n/** The union table shape, for code that handles either scope generically. */\nexport type AnyIntakeTables = { userIntake: UserIntakeTable; projectIntake?: ProjectIntakeTable }\n\n/** Infer and represent a selected row from the UserIntakeTable data structure */\nexport type UserIntakeRow = UserIntakeTable['$inferSelect']\n/** Resolve the selected data structure for a project intake table row */\nexport type ProjectIntakeRow = ProjectIntakeTable['$inferSelect']\n"],"mappings":";;;;;;;;;AAwBA,SAAS,WAAW;AACpB,SAAS,OAAO,SAAS,aAAa,MAAM,mBAAmB;AAmB/D,IAAM,QAAQ,MAAM,KAAK,IAAI,EAAE,WAAW,EAAE,QAAQ,iCAAiC;AAErF,IAAM,YAAY,MAAM,QAAQ,cAAc,EAAE,MAAM,YAAY,CAAC,EAAE,QAAQ,EAAE,QAAQ,kBAAkB;AAEzG,IAAM,YAAY,MAAM,QAAQ,cAAc,EAAE,MAAM,YAAY,CAAC,EAAE,QAAQ,EAAE,QAAQ,kBAAkB;AAEzG,SAAS,sBAAsB,WAA8B;AAC3D,SAAO,YAAY,eAAe;AAAA,IAChC,IAAI,MAAM;AAAA,IACV,QAAQ,KAAK,SAAS,EAAE,QAAQ,EAAE,WAAW,MAAM,UAAU,IAAI,EAAE,UAAU,UAAU,CAAC;AAAA;AAAA,IAExF,SAAS,KAAK,UAAU,EAAE,QAAQ;AAAA;AAAA,IAElC,SAAS,KAAK,WAAW,EAAE,MAAM,OAAO,CAAC,EAAE,QAAQ;AAAA;AAAA,IAEnD,aAAa,QAAQ,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAAA,IAC1D,WAAW,UAAU;AAAA,IACrB,WAAW,UAAU;AAAA,EACvB,GAAG,CAAC,UAAU;AAAA,IACZ,YAAY,uBAAuB,EAAE,GAAG,MAAM,MAAM;AAAA,EACtD,CAAC;AACH;AAEA,SAAS,yBAAyB,gBAAmC;AACnE,SAAO,YAAY,kBAAkB;AAAA,IACnC,IAAI,MAAM;AAAA,IACV,aAAa,KAAK,cAAc,EAAE,QAAQ,EAAE,WAAW,MAAM,eAAe,IAAI,EAAE,UAAU,UAAU,CAAC;AAAA,IACvG,SAAS,KAAK,UAAU,EAAE,QAAQ;AAAA,IAClC,SAAS,KAAK,WAAW,EAAE,MAAM,OAAO,CAAC,EAAE,QAAQ;AAAA,IACnD,aAAa,QAAQ,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAAA,IAC1D,WAAW,UAAU;AAAA,IACrB,WAAW,UAAU;AAAA,EACvB,GAAG,CAAC,UAAU;AAAA,IACZ,YAAY,+BAA+B,EAAE,GAAG,MAAM,WAAW;AAAA,IACjE,MAAM,0BAA0B,EAAE,GAAG,MAAM,OAAO;AAAA,EACpD,CAAC;AACH;AAQO,SAAS,mBACd,MACiB;AACjB,QAAM,aAAa,sBAAsB,KAAK,SAAS;AACvD,QAAM,SAAgI;AAAA,IACpI;AAAA,EACF;AACA,MAAI,KAAK,gBAAgB;AACvB,WAAO,gBAAgB,yBAAyB,KAAK,cAAc;AAAA,EACrE;AACA,SAAO;AACT;","names":[]}
|
package/dist/intakes/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as AnswerRejectionReason, c as AnswerValidationResult, d as IntakeAnswerType, I as IntakeAnswerValue, e as IntakeAnswers, b as IntakeGraph, f as IntakeOption, a as IntakeQuestion, g as getQuestion, h as hasAnswer, i as intakeProgress, j as isComplete, n as nextQuestion, r as reachableQuestions, v as validateAnswer } from '../model-
|
|
2
|
-
export { I as IntakePayload, e as emptyPayload, m as markComplete, p as payloadComplete, a as payloadIsStale, w as withAnswer } from '../completion-
|
|
1
|
+
export { A as AnswerRejectionReason, c as AnswerValidationResult, d as IntakeAnswerType, I as IntakeAnswerValue, e as IntakeAnswers, b as IntakeGraph, f as IntakeOption, a as IntakeQuestion, g as getQuestion, h as hasAnswer, i as intakeProgress, j as isComplete, n as nextQuestion, r as reachableQuestions, v as validateAnswer } from '../model-C8U0HZxL.js';
|
|
2
|
+
export { I as IntakePayload, e as emptyPayload, m as markComplete, p as payloadComplete, a as payloadIsStale, w as withAnswer } from '../completion-CvcNUz07.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Pure context-sufficiency floor + conversational-gather scaffold — the
|
package/dist/intakes/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
payloadComplete,
|
|
5
5
|
payloadIsStale,
|
|
6
6
|
withAnswer
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-YZ6KQULN.js";
|
|
8
8
|
import {
|
|
9
9
|
getQuestion,
|
|
10
10
|
hasAnswer,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
nextQuestion,
|
|
14
14
|
reachableQuestions,
|
|
15
15
|
validateAnswer
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-JDEGS53O.js";
|
|
17
17
|
|
|
18
18
|
// src/intakes/context-sufficiency.ts
|
|
19
19
|
function presentValue(value) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as IntakeAnswerValue, a as IntakeQuestion } from '../model-
|
|
1
|
+
import { I as IntakeAnswerValue, a as IntakeQuestion } from '../model-C8U0HZxL.js';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -22,6 +22,7 @@ interface IntakeView {
|
|
|
22
22
|
total: number;
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
+
/** Define properties and callbacks for managing the intake interview flow and user interactions */
|
|
25
26
|
interface IntakeInterviewProps {
|
|
26
27
|
view: IntakeView;
|
|
27
28
|
/**
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { IntakeInterview } from './index.js';
|
|
3
3
|
export { IntakeInterviewProps } from './index.js';
|
|
4
|
-
import '../model-
|
|
4
|
+
import '../model-C8U0HZxL.js';
|
|
5
5
|
|
|
6
|
+
/** Load IntakeInterview component lazily to optimize initial application rendering */
|
|
6
7
|
declare const IntakeInterviewLazy: react.LazyExoticComponent<typeof IntakeInterview>;
|
|
7
8
|
|
|
8
9
|
export { IntakeInterviewLazy };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/intakes-react/lazy.tsx
|
|
2
2
|
import { lazy } from "react";
|
|
3
3
|
var IntakeInterviewLazy = lazy(
|
|
4
|
-
() => import("../IntakeInterview-
|
|
4
|
+
() => import("../IntakeInterview-3ZIQMZS6.js").then((m) => ({ default: m.IntakeInterview }))
|
|
5
5
|
);
|
|
6
6
|
export {
|
|
7
7
|
IntakeInterviewLazy
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/intakes-react/lazy.tsx"],"sourcesContent":["/**\n * Code-split entry for the intakes React surface. Products that don't need the\n * interview UI on initial load import this `React.lazy` handle instead of the\n * component directly, so the interview chunk loads on first render. Mount inside\n * a `<Suspense>` boundary; the product provides the fallback.\n */\n\nimport { lazy } from 'react'\nimport type { IntakeInterviewProps } from './contracts'\n\nexport type { IntakeInterviewProps }\n\nexport const IntakeInterviewLazy = lazy(\n () => import('./components/IntakeInterview').then((m) => ({ default: m.IntakeInterview })),\n)\n"],"mappings":";AAOA,SAAS,YAAY;
|
|
1
|
+
{"version":3,"sources":["../../src/intakes-react/lazy.tsx"],"sourcesContent":["/**\n * Code-split entry for the intakes React surface. Products that don't need the\n * interview UI on initial load import this `React.lazy` handle instead of the\n * component directly, so the interview chunk loads on first render. Mount inside\n * a `<Suspense>` boundary; the product provides the fallback.\n */\n\nimport { lazy } from 'react'\nimport type { IntakeInterviewProps } from './contracts'\n\nexport type { IntakeInterviewProps }\n\n/** Load IntakeInterview component lazily to optimize initial application rendering */\nexport const IntakeInterviewLazy = lazy(\n () => import('./components/IntakeInterview').then((m) => ({ default: m.IntakeInterview })),\n)\n"],"mappings":";AAOA,SAAS,YAAY;AAMd,IAAM,sBAAsB;AAAA,EACjC,MAAM,OAAO,gCAA8B,EAAE,KAAK,CAAC,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE;AAC3F;","names":[]}
|
|
@@ -12,6 +12,7 @@ type HubExecResult = {
|
|
|
12
12
|
message: string;
|
|
13
13
|
approval?: unknown;
|
|
14
14
|
};
|
|
15
|
+
/** Define configuration options for initializing a Hub execution client */
|
|
15
16
|
interface HubExecClientOptions {
|
|
16
17
|
/** Platform base URL (e.g. `TANGLE_PLATFORM_URL`). */
|
|
17
18
|
baseUrl: string;
|
|
@@ -53,16 +54,19 @@ declare class HubExecClient {
|
|
|
53
54
|
}): Promise<HubExecResult>;
|
|
54
55
|
private readEnvelope;
|
|
55
56
|
}
|
|
57
|
+
/** Define input parameters for invoking a hub tool with user ID, tool name, and optional arguments */
|
|
56
58
|
interface HubInvokeInput {
|
|
57
59
|
userId: string;
|
|
58
60
|
/** The MCP tool name the agent called (`int_<provider>_<connector>_<action>`). */
|
|
59
61
|
toolName: string;
|
|
60
62
|
args?: Record<string, unknown>;
|
|
61
63
|
}
|
|
64
|
+
/** Describe the outcome of a hub invocation including status and response body */
|
|
62
65
|
interface HubInvokeOutcome {
|
|
63
66
|
status: number;
|
|
64
67
|
body: Record<string, unknown>;
|
|
65
68
|
}
|
|
69
|
+
/** Define dependencies for invoking hub operations including API key resolution and optional configuration */
|
|
66
70
|
interface HubInvokeDeps {
|
|
67
71
|
/** Resolve the user's Tangle API key (the hub principal bearer). Required —
|
|
68
72
|
* the product binds its own session-key resolver. Null → user not linked. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as InteractionRequestWire } from '../contract-
|
|
2
|
-
export { C as ChatInteraction, a as ChatInteractionField, b as ChatInteractionStatus, c as ChatSelectField, d as ComposerAnswerDelivery, I as INTERACTION_CANCEL_EVENT, e as INTERACTION_EVENT, f as INTERACTION_RESOLVED_EVENT, g as InteractionAnswerValue, h as InteractionAnswers, i as InteractionCancelData, j as InteractionPersistedPart, N as NoticeKind, l as NoticePersistedPart, P as ParseInteractionAnswersResult, m as ParseInteractionResult, n as canTransitionInteractionStatus, o as cancelStatusFor, p as composerAnswerData, q as composerAnswerDeliveries, r as dedupeQuestionInteractionsByContent, s as fieldAcceptsFreeText, t as interactionFromWireRequest, u as interactionPartKey, v as interactionToPersistedPart, w as isRenderableInteractionKind, x as isSafeInteractionFieldKey, y as isTerminalInteractionStatus, z as noticePart, A as noticePartKey, B as parseInteractionAnswers, D as parseInteractionCancel, E as parseInteractionRequest, F as persistedPartToInteraction, G as questionInteractionContentSignature, H as stampInteractionAnswers } from '../contract-
|
|
1
|
+
import { k as InteractionRequestWire } from '../contract-TjB68uqA.js';
|
|
2
|
+
export { C as ChatInteraction, a as ChatInteractionField, b as ChatInteractionStatus, c as ChatSelectField, d as ComposerAnswerDelivery, I as INTERACTION_CANCEL_EVENT, e as INTERACTION_EVENT, f as INTERACTION_RESOLVED_EVENT, g as InteractionAnswerValue, h as InteractionAnswers, i as InteractionCancelData, j as InteractionPersistedPart, N as NoticeKind, l as NoticePersistedPart, P as ParseInteractionAnswersResult, m as ParseInteractionResult, n as canTransitionInteractionStatus, o as cancelStatusFor, p as composerAnswerData, q as composerAnswerDeliveries, r as dedupeQuestionInteractionsByContent, s as fieldAcceptsFreeText, t as interactionFromWireRequest, u as interactionPartKey, v as interactionToPersistedPart, w as isRenderableInteractionKind, x as isSafeInteractionFieldKey, y as isTerminalInteractionStatus, z as noticePart, A as noticePartKey, B as parseInteractionAnswers, D as parseInteractionCancel, E as parseInteractionRequest, F as persistedPartToInteraction, G as questionInteractionContentSignature, H as stampInteractionAnswers } from '../contract-TjB68uqA.js';
|
|
3
3
|
import { InteractionOutcome, InteractionData } from '@tangle-network/agent-interface';
|
|
4
4
|
export { InteractionData, InteractionOutcome, InteractionRequest } from '@tangle-network/agent-interface';
|
|
5
5
|
|
|
@@ -15,12 +15,14 @@ export { InteractionData, InteractionOutcome, InteractionRequest } from '@tangle
|
|
|
15
15
|
* session id) — no sandbox-SDK import, so any box-resolution strategy works.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
+
/** Describe error details including code, message, and upstream HTTP status for sidecar interactions */
|
|
18
19
|
interface SidecarInteractionsError {
|
|
19
20
|
code: string;
|
|
20
21
|
message: string;
|
|
21
22
|
/** Upstream HTTP status; 0 when the sidecar was unreachable. */
|
|
22
23
|
status: number;
|
|
23
24
|
}
|
|
25
|
+
/** Represent the outcome of sidecar interactions with success or error details */
|
|
24
26
|
type SidecarInteractionsResult<T> = {
|
|
25
27
|
succeeded: true;
|
|
26
28
|
value: T;
|
|
@@ -79,7 +81,9 @@ declare function respondToSessionInteraction(connection: SidecarInteractionsConn
|
|
|
79
81
|
* router import anywhere.
|
|
80
82
|
*/
|
|
81
83
|
|
|
84
|
+
/** Define possible outcomes for an interaction client as accepted or declined */
|
|
82
85
|
type InteractionClientOutcome = 'accepted' | 'declined';
|
|
86
|
+
/** Validate interaction answer body and return success with data or failure with error message */
|
|
83
87
|
type InteractionAnswerBodyValidation = {
|
|
84
88
|
ok: true;
|
|
85
89
|
id: string;
|
|
@@ -92,6 +96,7 @@ type InteractionAnswerBodyValidation = {
|
|
|
92
96
|
/** Validates the client POST body: `{ id, outcome, data? }` with
|
|
93
97
|
* identifier-safe field keys and primitive/string-array values only. */
|
|
94
98
|
declare function validateInteractionAnswerBody(body: Record<string, unknown>): InteractionAnswerBodyValidation;
|
|
99
|
+
/** Provide logging methods for warnings and errors in interaction routes */
|
|
95
100
|
type InteractionRouteLogger = Pick<Console, 'warn' | 'error'>;
|
|
96
101
|
/** Sidecar error → the client-actionable contract. Every "the ask is gone"
|
|
97
102
|
* shape maps to 410 so the card flips to its expired state — a raw 404/409
|
|
@@ -111,6 +116,7 @@ type InteractionConnectionResolution = {
|
|
|
111
116
|
ok: false;
|
|
112
117
|
unavailable: string;
|
|
113
118
|
};
|
|
119
|
+
/** Define arguments required to resolve interaction connections based on request and intent */
|
|
114
120
|
interface ResolveInteractionConnectionArgs {
|
|
115
121
|
request: Request;
|
|
116
122
|
intent: 'list' | 'answer';
|
|
@@ -118,6 +124,7 @@ interface ResolveInteractionConnectionArgs {
|
|
|
118
124
|
* read product routing fields (workspaceId/threadId) without re-parsing. */
|
|
119
125
|
body?: Record<string, unknown>;
|
|
120
126
|
}
|
|
127
|
+
/** Describe the arguments provided before processing an interaction answer including request, body, and connection details */
|
|
121
128
|
interface BeforeInteractionAnswerArgs {
|
|
122
129
|
request: Request;
|
|
123
130
|
/** Original parsed body, including product routing fields. */
|
|
@@ -133,6 +140,7 @@ interface BeforeInteractionAnswerArgs {
|
|
|
133
140
|
/** Content-identical questions that the shared route will also answer. */
|
|
134
141
|
duplicateRequests: InteractionRequestWire[];
|
|
135
142
|
}
|
|
143
|
+
/** Define arguments for durable interaction routes including a stable caller-created attempt key */
|
|
136
144
|
interface DurableInteractionRouteArgs extends BeforeInteractionAnswerArgs {
|
|
137
145
|
/** Caller-created opaque identifier, stable across an ambiguous retry. */
|
|
138
146
|
attemptKey: string;
|
|
@@ -167,6 +175,7 @@ interface DurableInteractionRoutePersistence<TPrepared = unknown> {
|
|
|
167
175
|
error: unknown;
|
|
168
176
|
}): void | Promise<void>;
|
|
169
177
|
}
|
|
178
|
+
/** Define options to authenticate, authorize, and manage persistence for interaction answer routes */
|
|
170
179
|
interface InteractionAnswerRouteOptions {
|
|
171
180
|
/** Authenticate + authorize the caller and resolve the sidecar connection.
|
|
172
181
|
* This is the only product-supplied step: session auth, workspace/thread
|
|
@@ -180,6 +189,7 @@ interface InteractionAnswerRouteOptions {
|
|
|
180
189
|
durable?: DurableInteractionRoutePersistence;
|
|
181
190
|
logger?: InteractionRouteLogger;
|
|
182
191
|
}
|
|
192
|
+
/** Define routes to list outstanding interactions and resolve answers for live turns */
|
|
183
193
|
interface InteractionAnswerRoute {
|
|
184
194
|
/** GET — outstanding interactions for a live turn. Failures return an empty
|
|
185
195
|
* list with an explicit `unavailable` code: the caller is a best-effort
|
|
@@ -191,6 +201,7 @@ interface InteractionAnswerRoute {
|
|
|
191
201
|
* actually unblocked. */
|
|
192
202
|
answer: (request: Request) => Promise<Response>;
|
|
193
203
|
}
|
|
204
|
+
/** Create an interaction answer route that handles listing and resolving interaction requests */
|
|
194
205
|
declare function createInteractionAnswerRoute(options: InteractionAnswerRouteOptions): InteractionAnswerRoute;
|
|
195
206
|
|
|
196
207
|
export { type BeforeInteractionAnswerArgs, type DurableInteractionRouteArgs, type DurableInteractionRoutePersistence, type InteractionAnswerBodyValidation, type InteractionAnswerRoute, type InteractionAnswerRouteOptions, type InteractionClientOutcome, type InteractionConnectionResolution, InteractionRequestWire, type InteractionRouteLogger, type ResolveInteractionConnectionArgs, type SidecarInteractionsConnection, type SidecarInteractionsError, type SidecarInteractionsResult, createInteractionAnswerRoute, listSessionInteractions, mapInteractionRespondFailure, respondToSessionInteraction, validateInteractionAnswerBody };
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
mapInteractionRespondFailure,
|
|
6
6
|
respondToSessionInteraction,
|
|
7
7
|
validateInteractionAnswerBody
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-7YW6EBDX.js";
|
|
9
9
|
import {
|
|
10
10
|
INTERACTION_CANCEL_EVENT,
|
|
11
11
|
INTERACTION_EVENT,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
persistedPartToInteraction,
|
|
31
31
|
questionInteractionContentSignature,
|
|
32
32
|
stampInteractionAnswers
|
|
33
|
-
} from "../chunk-
|
|
33
|
+
} from "../chunk-YKOM4ZLQ.js";
|
|
34
34
|
export {
|
|
35
35
|
INTERACTION_CANCEL_EVENT,
|
|
36
36
|
INTERACTION_EVENT,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AssignableWorkspaceRole } from './roles-
|
|
1
|
+
import { A as AssignableWorkspaceRole } from './roles-B4nU3jDi.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Pure invitation helpers + email-template renderer for the teams capability.
|
|
@@ -15,11 +15,17 @@ import { A as AssignableWorkspaceRole } from './roles-BC1n4t37.js';
|
|
|
15
15
|
|
|
16
16
|
/** The role an invitation grants — the assignable workspace ladder (never owner). */
|
|
17
17
|
type InvitationPermission = AssignableWorkspaceRole;
|
|
18
|
+
/** Define possible states for an invitation's lifecycle including pending, accepted, expired, and revoked */
|
|
18
19
|
type InvitationStatus = 'pending' | 'accepted' | 'expired' | 'revoked';
|
|
20
|
+
/** Define possible statuses for the sending state of an invitation email */
|
|
19
21
|
type InvitationEmailStatus = 'not_sent' | 'sent' | 'failed';
|
|
22
|
+
/** Define the number of days before an invitation expires */
|
|
20
23
|
declare const INVITATION_EXPIRY_DAYS = 7;
|
|
24
|
+
/** Normalize an invitation email by trimming whitespace and converting to lowercase */
|
|
21
25
|
declare function normalizeInvitationEmail(email: string): string;
|
|
26
|
+
/** Resolve invitation permission from a string or return null if invalid */
|
|
22
27
|
declare function parseInvitationPermission(value: string | undefined): InvitationPermission | null;
|
|
28
|
+
/** Calculate the expiration date of an invitation based on the given or current date */
|
|
23
29
|
declare function getInvitationExpiresAt(now?: Date): Date;
|
|
24
30
|
/**
|
|
25
31
|
* A cryptographically-random, URL-safe invitation token. `inv_`-prefixed so a
|
|
@@ -27,7 +33,9 @@ declare function getInvitationExpiresAt(now?: Date): Date;
|
|
|
27
33
|
* tokens minted by `members-api` (`generateInviteToken`).
|
|
28
34
|
*/
|
|
29
35
|
declare function generateInvitationToken(): string;
|
|
36
|
+
/** Generate an invite URL by combining the origin with an encoded token */
|
|
30
37
|
declare function inviteUrlForToken(origin: string, token: string): string;
|
|
38
|
+
/** Define input data required to render an invitation email template */
|
|
31
39
|
interface RenderInvitationEmailInput {
|
|
32
40
|
to: string;
|
|
33
41
|
workspaceName: string;
|
|
@@ -36,10 +44,12 @@ interface RenderInvitationEmailInput {
|
|
|
36
44
|
inviteUrl: string;
|
|
37
45
|
expiresAt: Date;
|
|
38
46
|
}
|
|
47
|
+
/** Define the structure for an invitation email brand including the RFC-5322 From header */
|
|
39
48
|
interface InvitationEmailBrand {
|
|
40
49
|
/** RFC-5322 From header, e.g. `GTM Agent <noreply@gtm.tangle.tools>`. */
|
|
41
50
|
fromAddress: string;
|
|
42
51
|
}
|
|
52
|
+
/** Define the structure of a fully rendered invitation email with sender, subject, and content fields */
|
|
43
53
|
interface RenderedInvitationEmail {
|
|
44
54
|
from: string;
|
|
45
55
|
subject: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
|
|
2
|
-
import { g as TeamParentTable } from './access-
|
|
2
|
+
import { g as TeamParentTable } from './access-490O6aOU.js';
|
|
3
3
|
|
|
4
|
+
/** Define options for creating a workspace invitation table with user, workspace, and organization references */
|
|
4
5
|
interface CreateWorkspaceInvitationTableOptions {
|
|
5
6
|
/** The product's user table — `invitedByUserId` references `userTable.id`. */
|
|
6
7
|
userTable: TeamParentTable;
|
|
@@ -9,6 +10,7 @@ interface CreateWorkspaceInvitationTableOptions {
|
|
|
9
10
|
/** The `organizations` table from `createTeamTables` — `organizationId` references it. */
|
|
10
11
|
organizationTable: TeamParentTable;
|
|
11
12
|
}
|
|
13
|
+
/** Build a workspace invitation table with defined columns and foreign key constraints */
|
|
12
14
|
declare function createWorkspaceInvitationTable(opts: CreateWorkspaceInvitationTableOptions): {
|
|
13
15
|
workspaceInvitations: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
14
16
|
name: "workspace_invitation";
|
|
@@ -274,7 +276,9 @@ declare function createWorkspaceInvitationTable(opts: CreateWorkspaceInvitationT
|
|
|
274
276
|
dialect: "sqlite";
|
|
275
277
|
}>;
|
|
276
278
|
};
|
|
279
|
+
/** Resolve the structure of workspace invitation tables from the creation function */
|
|
277
280
|
type WorkspaceInvitationTables = ReturnType<typeof createWorkspaceInvitationTable>;
|
|
281
|
+
/** Resolve the structure of a workspace invitation row from the workspaceInvitations table */
|
|
278
282
|
type WorkspaceInvitationRow = WorkspaceInvitationTables['workspaceInvitations']['$inferSelect'];
|
|
279
283
|
|
|
280
284
|
export { type CreateWorkspaceInvitationTableOptions as C, type WorkspaceInvitationRow as W, type WorkspaceInvitationTables as a, createWorkspaceInvitationTable as c };
|
|
@@ -40,6 +40,7 @@ type SatisfiedByRule =
|
|
|
40
40
|
} | {
|
|
41
41
|
allOf: SatisfiedByRule[];
|
|
42
42
|
};
|
|
43
|
+
/** Define the criteria and conditions required to satisfy a specific knowledge requirement */
|
|
43
44
|
interface KnowledgeRequirementSpec {
|
|
44
45
|
id: string;
|
|
45
46
|
description: string;
|
|
@@ -70,6 +71,7 @@ interface KnowledgeStateAccessor {
|
|
|
70
71
|
statusIn?: string[];
|
|
71
72
|
}) => number | Promise<number>;
|
|
72
73
|
}
|
|
74
|
+
/** Define a signal representing knowledge with confidence level and optional supporting evidence */
|
|
73
75
|
interface KnowledgeSignal {
|
|
74
76
|
confidence: number;
|
|
75
77
|
evidence?: string;
|
package/dist/knowledge/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { KnowledgeResearchLoopContext, AddSourceTextInput, SourceAdapter, RunKno
|
|
|
2
2
|
import { KnowledgeSourceSpec, AgentKnowledgeConfig } from '../config/index.js';
|
|
3
3
|
import '../knowledge/index.js';
|
|
4
4
|
import '@tangle-network/agent-eval';
|
|
5
|
-
import '../model-
|
|
5
|
+
import '../model-DmdkIteM.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* `@tangle-network/agent-app/knowledge-loop` — wire the declarative
|
|
@@ -99,6 +99,7 @@ interface KnowledgeGateVerdict {
|
|
|
99
99
|
interface KnowledgeDecider {
|
|
100
100
|
(input: KnowledgeDeciderInput): Promise<KnowledgeDecision> | KnowledgeDecision;
|
|
101
101
|
}
|
|
102
|
+
/** Define the input parameters required to decide knowledge proposals within an agent-knowledge loop */
|
|
102
103
|
interface KnowledgeDeciderInput {
|
|
103
104
|
/** The agent-knowledge loop context for this iteration. */
|
|
104
105
|
context: KnowledgeResearchLoopContext;
|
|
@@ -113,6 +114,7 @@ interface KnowledgeDeciderInput {
|
|
|
113
114
|
/** The agent-runtime turn driver, if one was supplied to the loop. */
|
|
114
115
|
driver?: KnowledgeLoopDriver;
|
|
115
116
|
}
|
|
117
|
+
/** Define a decision containing a candidate and the gate's verdict on that candidate */
|
|
116
118
|
interface KnowledgeDecision {
|
|
117
119
|
/** The candidate the policy produced (may be empty to end the loop). */
|
|
118
120
|
candidate: KnowledgeCandidate;
|
|
@@ -134,6 +136,7 @@ interface KnowledgeLoopDriver {
|
|
|
134
136
|
finalText: string;
|
|
135
137
|
}>;
|
|
136
138
|
}
|
|
139
|
+
/** Define dependencies required to create and run a knowledge processing loop */
|
|
137
140
|
interface CreateKnowledgeLoopDeps {
|
|
138
141
|
/**
|
|
139
142
|
* The knowledge-base root the loop reads/writes (an agent-knowledge layout).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { c as SceneDocument } from './model-
|
|
3
|
-
import { D as DesignCanvasProps, c as createSceneCommandStack, E as ExportTriggerOptions } from './command-stack-
|
|
2
|
+
import { c as SceneDocument } from './model-DnfO_PdJ.js';
|
|
3
|
+
import { D as DesignCanvasProps, c as createSceneCommandStack, E as ExportTriggerOptions } from './command-stack-TNPWJCzW.js';
|
|
4
4
|
|
|
5
5
|
/** Callers inject a workspace renderer so this chrome stays Konva-free. The
|
|
6
6
|
* workspace occupies the scrollable area between the rulers and the bottom bar. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as AppToolContext, f as AppToolName, d as AppToolDefinition } from './types-
|
|
2
|
-
import { a as ToolHeaderNames } from './auth-
|
|
1
|
+
import { c as AppToolContext, f as AppToolName, d as AppToolDefinition } from './types-CBRyqijY.js';
|
|
2
|
+
import { a as ToolHeaderNames } from './auth-_FU8w01b.js';
|
|
3
3
|
|
|
4
4
|
/** Default route path each app tool is served at. A product mounts its routes
|
|
5
5
|
* at these paths (or supplies its own via {@link BuildMcpServerOptions.paths}). */
|
|
@@ -16,6 +16,7 @@ interface AppToolMcpServer {
|
|
|
16
16
|
description: string;
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
+
/** Define configuration options for building an HTTP MCP server including path, baseUrl, token, context, and description */
|
|
19
20
|
interface BuildHttpMcpServerOptions {
|
|
20
21
|
/** Route path on the app the sandbox POSTs to (e.g. `/api/tools/propose`). */
|
|
21
22
|
path: string;
|
|
@@ -73,6 +74,7 @@ declare function buildScopedMcpServerEntry(opts: ScopedMcpServerEntryOptions & {
|
|
|
73
74
|
label: string;
|
|
74
75
|
defaultDescription: string;
|
|
75
76
|
}): AppToolMcpServer;
|
|
77
|
+
/** Define configuration options required to build an MCP server including tool, baseUrl, token, and context */
|
|
76
78
|
interface BuildMcpServerOptions {
|
|
77
79
|
/** A built-in app tool name, or a product-registered {@link AppToolDefinition}.
|
|
78
80
|
* A custom tool supplies its route via `AppToolDefinition.path` (or `paths`). */
|
|
@@ -17,7 +17,9 @@
|
|
|
17
17
|
* retries. Protocol misuse becomes a JSON-RPC error object.
|
|
18
18
|
*/
|
|
19
19
|
declare const MCP_PROTOCOL_VERSIONS: readonly ["2025-06-18", "2025-03-26", "2024-11-05"];
|
|
20
|
+
/** Resolve a valid protocol version from the predefined MCP_PROTOCOL_VERSIONS array */
|
|
20
21
|
type McpProtocolVersion = (typeof MCP_PROTOCOL_VERSIONS)[number];
|
|
22
|
+
/** Describe the structure of server information including name and version */
|
|
21
23
|
interface McpServerInfo {
|
|
22
24
|
name: string;
|
|
23
25
|
version: string;
|
|
@@ -32,6 +34,7 @@ interface McpToolDefinition<TEnv = Record<string, never>> {
|
|
|
32
34
|
* surface an isError result — never throw for protocol/framing issues. */
|
|
33
35
|
run(args: Record<string, unknown>, env: TEnv): Promise<unknown>;
|
|
34
36
|
}
|
|
37
|
+
/** Define options for creating a handler that manages MCP tools with environment support */
|
|
35
38
|
interface CreateMcpToolHandlerOptions<TEnv = Record<string, never>> {
|
|
36
39
|
serverInfo: McpServerInfo;
|
|
37
40
|
/** Full tool list; order IS the tools/list order. */
|