@happyvertical/smrt-planner 0.57.11 → 0.57.13

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.
Files changed (618) hide show
  1. package/README.md +136 -0
  2. package/agents/assistant.md +49 -0
  3. package/agents/commands.md +2 -2
  4. package/agents/cookbook.md +3 -1
  5. package/agents/shell.md +9 -7
  6. package/app/404.html +21 -21
  7. package/app/_app/immutable/assets/2.D3Ee82Nk.css +1 -0
  8. package/app/_app/immutable/assets/AppShell.Y0ysizZK.css +1 -0
  9. package/app/_app/immutable/assets/{icons.BDx21rPt.css → icons.DFiHs25V.css} +1 -1
  10. package/app/_app/immutable/chunks/3dpUaAuL.js +1 -0
  11. package/app/_app/immutable/chunks/{BxyJ_Q7v.js → B7IsOdeU.js} +1 -1
  12. package/app/_app/immutable/chunks/{C26hsvAf.js → BErRmq61.js} +1 -1
  13. package/app/_app/immutable/chunks/BFzGVZ83.js +1 -0
  14. package/app/_app/immutable/chunks/{CUhs1G9L.js → BLDa0UGj.js} +1 -1
  15. package/app/_app/immutable/chunks/BMXU0KTB.js +1 -0
  16. package/app/_app/immutable/chunks/{D-G7Teh9.js → B_D0zDev.js} +1 -1
  17. package/app/_app/immutable/chunks/{DdoIOUTJ.js → BmSVFsOo.js} +2 -2
  18. package/app/_app/immutable/chunks/{CsaWd8kG.js → Bs5WxZDd.js} +1 -1
  19. package/app/_app/immutable/chunks/By9nPosf.js +1 -0
  20. package/app/_app/immutable/chunks/CB9iikrD.js +4 -0
  21. package/app/_app/immutable/chunks/{DJxCUhtq.js → CBxjHrPs.js} +1 -1
  22. package/app/_app/immutable/chunks/CO-Ek-HE.js +1 -0
  23. package/app/_app/immutable/chunks/{XqNh9vZm.js → COQfu_Wm.js} +1 -1
  24. package/app/_app/immutable/chunks/{Bxy7okxu.js → CQ3bytDT.js} +1 -1
  25. package/app/_app/immutable/chunks/{BA7oEUVv.js → CQOJdp0U.js} +1 -1
  26. package/app/_app/immutable/chunks/{YhY72Uhf.js → CT1UgNrl.js} +1 -1
  27. package/app/_app/immutable/chunks/{mzvl-05K.js → CrMrQCWf.js} +1 -1
  28. package/app/_app/immutable/chunks/{CMoev5sM.js → CwTLkgbW.js} +1 -1
  29. package/app/_app/immutable/chunks/{DgQFYubu.js → CyuTEXp6.js} +1 -1
  30. package/app/_app/immutable/chunks/CzqXjCHa.js +16 -0
  31. package/app/_app/immutable/chunks/DMDdJExi.js +10 -0
  32. package/app/_app/immutable/chunks/{CN11a3UB.js → DPbSjNti.js} +1 -1
  33. package/app/_app/immutable/chunks/{BpZyWfxI.js → DSKWzY3b.js} +2 -2
  34. package/app/_app/immutable/chunks/{Cv4-Km2e.js → DcYfN1RJ.js} +1 -1
  35. package/app/_app/immutable/chunks/KILEpkAY.js +26 -0
  36. package/app/_app/immutable/chunks/Uwmgg65i.js +1 -0
  37. package/app/_app/immutable/chunks/XcCBLn0p.js +2 -0
  38. package/app/_app/immutable/chunks/{CXgA0Uxg.js → aqYPhamJ.js} +1 -1
  39. package/app/_app/immutable/chunks/{BFJgNGCw.js → c4Y8im5f.js} +22 -22
  40. package/app/_app/immutable/chunks/{DnAGA0N-.js → gObjQOc6.js} +1 -1
  41. package/app/_app/immutable/chunks/{Cc_ZlCEA.js → jY83yXmZ.js} +1 -1
  42. package/app/_app/immutable/chunks/k-HWowNp.js +2 -0
  43. package/app/_app/immutable/entry/{app.C8ZDox8Z.js → app.BFvVYIAu.js} +2 -2
  44. package/app/_app/immutable/entry/start.CjnnBAhi.js +1 -0
  45. package/app/_app/immutable/nodes/0.BV0A9Ub7.js +7 -0
  46. package/app/_app/immutable/nodes/{1.BiH6Jnil.js → 1.B8lnDjjl.js} +1 -1
  47. package/app/_app/immutable/nodes/10.Dga6nV_M.js +3 -0
  48. package/app/_app/immutable/nodes/{11.DFy1XrHB.js → 11.SN8IoTqm.js} +1 -1
  49. package/app/_app/immutable/nodes/{12.1ZLx0UOF.js → 12.CmhheIVU.js} +1 -1
  50. package/app/_app/immutable/nodes/{13.XPn_VuBW.js → 13.Eh2aPgMP.js} +1 -1
  51. package/app/_app/immutable/nodes/14.ReLktgLz.js +1 -0
  52. package/app/_app/immutable/nodes/2.Dc32ZcWd.js +22 -0
  53. package/app/_app/immutable/nodes/{3.wBVp_ZTI.js → 3.CuIErDvM.js} +1 -1
  54. package/app/_app/immutable/nodes/{4.BlCuYUUW.js → 4.62S4SMa5.js} +1 -1
  55. package/app/_app/immutable/nodes/{5.CPPegUVU.js → 5.DZx2uQQp.js} +1 -1
  56. package/app/_app/immutable/nodes/{6.CJiT2vuV.js → 6.Dzh2j8Eu.js} +1 -1
  57. package/app/_app/immutable/nodes/7.BndE5mEj.js +1 -0
  58. package/app/_app/immutable/nodes/{8.CrS_Sgnk.js → 8.B79dJpLW.js} +1 -1
  59. package/app/_app/immutable/nodes/{9.DrSeLPdB.js → 9.Di1DpDGF.js} +1 -1
  60. package/app/_app/version.json +1 -1
  61. package/app/advanced-styles/index.html +24 -24
  62. package/app/ai/index.html +28 -28
  63. package/app/blueprint/index.html +22 -22
  64. package/app/cookbook/index.html +22 -22
  65. package/app/index.html +38 -40
  66. package/app/m/ads/AdDeliveryTier/index.html +27 -27
  67. package/app/m/ads/AdEvent/index.html +27 -27
  68. package/app/m/ads/AdFormat/index.html +27 -27
  69. package/app/m/ads/AdGroup/index.html +27 -27
  70. package/app/m/ads/AdVariation/index.html +27 -27
  71. package/app/m/analytics/AnalyticsDataStream/index.html +27 -27
  72. package/app/m/analytics/AnalyticsEvent/index.html +27 -27
  73. package/app/m/analytics/AnalyticsProperty/index.html +27 -27
  74. package/app/m/analytics/AnalyticsReport/index.html +27 -27
  75. package/app/m/approvals/ApprovalEvent/index.html +27 -27
  76. package/app/m/approvals/ApprovalPolicy/index.html +27 -27
  77. package/app/m/approvals/ApprovalRequest/index.html +27 -27
  78. package/app/m/assets/Asset/attachments/index.html +28 -28
  79. package/app/m/assets/Asset/index.html +27 -27
  80. package/app/m/assets/AssetAssociation/index.html +27 -27
  81. package/app/m/assets/AssetMetafield/index.html +27 -27
  82. package/app/m/assets/AssetStatus/index.html +27 -27
  83. package/app/m/assets/AssetType/index.html +27 -27
  84. package/app/m/assets/Folder/index.html +27 -27
  85. package/app/m/chat/AgentSession/index.html +27 -27
  86. package/app/m/chat/ChatMessage/index.html +27 -27
  87. package/app/m/chat/ChatParticipant/index.html +27 -27
  88. package/app/m/chat/ChatReaction/index.html +27 -27
  89. package/app/m/chat/ChatRoom/index.html +27 -27
  90. package/app/m/chat/ChatThread/index.html +27 -27
  91. package/app/m/chat/VoiceGatewayTurn/index.html +27 -27
  92. package/app/m/chat/VoiceSession/index.html +27 -27
  93. package/app/m/commerce/Agreement/index.html +27 -27
  94. package/app/m/commerce/Cart/index.html +27 -27
  95. package/app/m/commerce/Contract/index.html +27 -27
  96. package/app/m/commerce/ContractLineItem/index.html +27 -27
  97. package/app/m/commerce/Customer/index.html +27 -27
  98. package/app/m/commerce/DocumentTax/index.html +27 -27
  99. package/app/m/commerce/Estimate/index.html +27 -27
  100. package/app/m/commerce/Fulfillment/index.html +27 -27
  101. package/app/m/commerce/FulfillmentLineItem/index.html +27 -27
  102. package/app/m/commerce/HistoricalCustomerFunds/index.html +27 -27
  103. package/app/m/commerce/HistoricalCustomerFundsAllocation/index.html +27 -27
  104. package/app/m/commerce/HistoricalSalesLine/index.html +27 -27
  105. package/app/m/commerce/Invoice/index.html +27 -27
  106. package/app/m/commerce/InvoiceLineItem/index.html +27 -27
  107. package/app/m/commerce/Lease/index.html +27 -27
  108. package/app/m/commerce/LicenseSale/index.html +27 -27
  109. package/app/m/commerce/Order/index.html +27 -27
  110. package/app/m/commerce/Payment/index.html +27 -27
  111. package/app/m/commerce/PaymentAllocation/index.html +27 -27
  112. package/app/m/commerce/PaymentInstrument/index.html +27 -27
  113. package/app/m/commerce/PaymentIntent/index.html +27 -27
  114. package/app/m/commerce/Payout/index.html +27 -27
  115. package/app/m/commerce/ProductionOrder/index.html +27 -27
  116. package/app/m/commerce/PurchaseContract/index.html +27 -27
  117. package/app/m/commerce/PurchaseOrder/index.html +27 -27
  118. package/app/m/commerce/SalesContract/index.html +27 -27
  119. package/app/m/commerce/SupplierQuote/index.html +27 -27
  120. package/app/m/commerce/TaxCode/index.html +27 -27
  121. package/app/m/commerce/TaxComponent/index.html +27 -27
  122. package/app/m/commerce/TaxSettings/index.html +27 -27
  123. package/app/m/commerce/TaxSummaryReport/index.html +27 -27
  124. package/app/m/commerce/TenantPaymentAccount/index.html +27 -27
  125. package/app/m/commerce/Vendor/index.html +27 -27
  126. package/app/m/commerce/WholesaleOrder/index.html +27 -27
  127. package/app/m/content/Content/index.html +27 -27
  128. package/app/m/content/ContentContribution/index.html +27 -27
  129. package/app/m/content/ContentContributionAttachment/index.html +27 -27
  130. package/app/m/content/ContentContributionRevision/index.html +27 -27
  131. package/app/m/content/ContentContributionType/index.html +27 -27
  132. package/app/m/content/ContentContributor/index.html +27 -27
  133. package/app/m/content/ContentCorrection/index.html +27 -27
  134. package/app/m/content/ContentFeedSource/index.html +27 -27
  135. package/app/m/content/ContentGovernanceAssignment/index.html +27 -27
  136. package/app/m/content/ContentGovernancePolicy/index.html +27 -27
  137. package/app/m/content/ContentGovernanceProfile/index.html +27 -27
  138. package/app/m/content/ContentReference/index.html +27 -27
  139. package/app/m/content/ContentReview/index.html +27 -27
  140. package/app/m/content/ContentVersion/index.html +27 -27
  141. package/app/m/events/Event/index.html +27 -27
  142. package/app/m/events/EventParticipant/index.html +27 -27
  143. package/app/m/events/EventSeries/index.html +27 -27
  144. package/app/m/events/EventType/index.html +27 -27
  145. package/app/m/expenses/Expense/index.html +27 -27
  146. package/app/m/facts/Fact/index.html +27 -27
  147. package/app/m/facts/FactContent/index.html +27 -27
  148. package/app/m/facts/FactEvidence/index.html +27 -27
  149. package/app/m/facts/FactSource/index.html +27 -27
  150. package/app/m/facts/FactSubject/index.html +27 -27
  151. package/app/m/facts/FactTag/index.html +27 -27
  152. package/app/m/fields/FieldPolicy/index.html +27 -27
  153. package/app/m/fields/FieldPolicySuggestion/index.html +27 -27
  154. package/app/m/fields/FieldUsageCounter/index.html +27 -27
  155. package/app/m/images/Image/index.html +27 -27
  156. package/app/m/inventory/InventoryLocation/index.html +27 -27
  157. package/app/m/inventory/StockLevel/index.html +27 -27
  158. package/app/m/inventory/StockMovement/index.html +27 -27
  159. package/app/m/ledgers/Account/index.html +27 -27
  160. package/app/m/ledgers/Journal/index.html +27 -27
  161. package/app/m/ledgers/JournalEntry/index.html +27 -27
  162. package/app/m/ledgers/Ledger/index.html +27 -27
  163. package/app/m/manufacturing/Assembly/index.html +27 -27
  164. package/app/m/manufacturing/BillOfMaterials/index.html +27 -27
  165. package/app/m/manufacturing/BomLine/index.html +27 -27
  166. package/app/m/manufacturing/Operation/index.html +27 -27
  167. package/app/m/manufacturing/ProductionRun/index.html +27 -27
  168. package/app/m/manufacturing/ProductionRunCompletion/index.html +27 -27
  169. package/app/m/manufacturing/RoutingStep/index.html +27 -27
  170. package/app/m/marketing/Campaign/index.html +27 -27
  171. package/app/m/marketing/CampaignChannel/index.html +27 -27
  172. package/app/m/marketing/CampaignMetricSnapshot/index.html +27 -27
  173. package/app/m/messages/Account/index.html +27 -27
  174. package/app/m/messages/Attachment/index.html +27 -27
  175. package/app/m/messages/Blacklist/index.html +27 -27
  176. package/app/m/messages/Email/failed-sends/index.html +28 -28
  177. package/app/m/messages/Email/index.html +27 -27
  178. package/app/m/messages/Email/mailbox/index.html +28 -28
  179. package/app/m/messages/EmailAccount/index.html +27 -27
  180. package/app/m/messages/EmailAttachment/index.html +27 -27
  181. package/app/m/messages/EmailFolder/index.html +27 -27
  182. package/app/m/messages/Message/index.html +27 -27
  183. package/app/m/messages/MessagingEndpoint/index.html +27 -27
  184. package/app/m/messages/PersonaMessageRoute/index.html +27 -27
  185. package/app/m/messages/SlackAccount/index.html +27 -27
  186. package/app/m/messages/SlackMessage/index.html +27 -27
  187. package/app/m/messages/TelegramAccount/index.html +27 -27
  188. package/app/m/messages/Tweet/index.html +27 -27
  189. package/app/m/messages/TwitterAccount/index.html +27 -27
  190. package/app/m/messages/Whitelist/index.html +27 -27
  191. package/app/m/messages/ZulipAccount/index.html +27 -27
  192. package/app/m/places/Place/index.html +27 -27
  193. package/app/m/places/PlaceType/index.html +27 -27
  194. package/app/m/products/Category/index.html +27 -27
  195. package/app/m/products/Material/index.html +27 -27
  196. package/app/m/products/Product/index.html +27 -27
  197. package/app/m/products/Product/ingredients/index.html +28 -28
  198. package/app/m/products/ProductVariant/index.html +27 -27
  199. package/app/m/products/Sku/index.html +27 -27
  200. package/app/m/profiles/ApiKey/index.html +27 -27
  201. package/app/m/profiles/Bot/index.html +27 -27
  202. package/app/m/profiles/MagicLinkToken/index.html +27 -27
  203. package/app/m/profiles/NostrIdentity/index.html +27 -27
  204. package/app/m/profiles/OidcIdentity/index.html +27 -27
  205. package/app/m/profiles/Organization/index.html +27 -27
  206. package/app/m/profiles/Person/index.html +27 -27
  207. package/app/m/profiles/Profile/index.html +27 -27
  208. package/app/m/profiles/ProfileMetadata/index.html +27 -27
  209. package/app/m/profiles/ProfileMetafield/index.html +27 -27
  210. package/app/m/profiles/ProfileRelationship/index.html +27 -27
  211. package/app/m/profiles/ProfileRelationshipTerm/index.html +27 -27
  212. package/app/m/profiles/ProfileRelationshipType/index.html +27 -27
  213. package/app/m/profiles/ProfileType/index.html +27 -27
  214. package/app/m/projects/Comment/index.html +27 -27
  215. package/app/m/projects/Issue/index.html +27 -27
  216. package/app/m/projects/Label/index.html +27 -27
  217. package/app/m/projects/Project/index.html +27 -27
  218. package/app/m/projects/ProjectIntegration/index.html +27 -27
  219. package/app/m/projects/PullRequest/index.html +27 -27
  220. package/app/m/projects/Repository/index.html +27 -27
  221. package/app/m/properties/Property/index.html +27 -27
  222. package/app/m/properties/Zone/index.html +27 -27
  223. package/app/m/reports/RuntimeReport/index.html +27 -27
  224. package/app/m/reports/SmrtPrincipalReportRefreshTask/index.html +27 -27
  225. package/app/m/reports/SmrtReportLock/index.html +27 -27
  226. package/app/m/reports/SmrtReportRefreshTask/index.html +27 -27
  227. package/app/m/reports/SmrtReportRun/index.html +27 -27
  228. package/app/m/reports/SmrtReportSchedule/index.html +27 -27
  229. package/app/m/reports/SmrtReportWatermark/index.html +27 -27
  230. package/app/m/sales/Agreement/index.html +27 -27
  231. package/app/m/sales/AttributionException/index.html +27 -27
  232. package/app/m/sales/AttributionPolicy/index.html +27 -27
  233. package/app/m/sales/Commission/index.html +27 -27
  234. package/app/m/sales/CommissionAdjustment/index.html +27 -27
  235. package/app/m/sales/CommissionPayout/index.html +27 -27
  236. package/app/m/sales/CommissionPlan/index.html +27 -27
  237. package/app/m/sales/Earner/index.html +27 -27
  238. package/app/m/sales/EarnerSourceAttribution/index.html +27 -27
  239. package/app/m/sales/EarningEvent/index.html +27 -27
  240. package/app/m/sales/ExecutedAgreement/index.html +27 -27
  241. package/app/m/sales/Lead/index.html +27 -27
  242. package/app/m/sales/Opportunity/index.html +27 -27
  243. package/app/m/sales/OpportunityConversion/index.html +27 -27
  244. package/app/m/sales/PipelineDefinition/index.html +27 -27
  245. package/app/m/sales/PipelineStage/index.html +27 -27
  246. package/app/m/sales/Referral/index.html +27 -27
  247. package/app/m/sales/ReferralAgreement/index.html +27 -27
  248. package/app/m/sales/ReferralLink/index.html +27 -27
  249. package/app/m/sales/ReferralProgram/index.html +27 -27
  250. package/app/m/sales/ReferralTermSnapshot/index.html +27 -27
  251. package/app/m/sales/ReferralTouch/index.html +27 -27
  252. package/app/m/sales/Referrer/index.html +27 -27
  253. package/app/m/sales/SalesActivity/index.html +27 -27
  254. package/app/m/sales/SalesRepresentative/index.html +27 -27
  255. package/app/m/sites/Site/index.html +27 -27
  256. package/app/m/sites/SiteAgentBinding/index.html +27 -27
  257. package/app/m/social/OAuthState/index.html +27 -27
  258. package/app/m/social/SocialAccount/index.html +27 -27
  259. package/app/m/social/SocialPost/index.html +27 -27
  260. package/app/m/social/SocialPostAnalyticsSnapshot/index.html +27 -27
  261. package/app/m/subscriptions/BillingAdjustment/index.html +27 -27
  262. package/app/m/subscriptions/ClientCharge/index.html +27 -27
  263. package/app/m/subscriptions/CreditGrant/index.html +27 -27
  264. package/app/m/subscriptions/PricingRule/index.html +27 -27
  265. package/app/m/subscriptions/RetailCharge/index.html +27 -27
  266. package/app/m/subscriptions/SpendingPolicy/index.html +27 -27
  267. package/app/m/subscriptions/SubscriptionPlan/index.html +27 -27
  268. package/app/m/subscriptions/SubscriptionPlanVersion/index.html +27 -27
  269. package/app/m/subscriptions/TenantSubscription/index.html +27 -27
  270. package/app/m/subscriptions/TenantUsageMetric/index.html +27 -27
  271. package/app/m/support/ServiceTimeEntry/index.html +27 -27
  272. package/app/m/support/SupportAiRun/index.html +27 -27
  273. package/app/m/support/SupportAvailability/index.html +27 -27
  274. package/app/m/support/SupportCase/index.html +27 -27
  275. package/app/m/support/SupportCaseEvent/index.html +27 -27
  276. package/app/m/support/SupportChannelBinding/index.html +27 -27
  277. package/app/m/support/SupportCharge/index.html +27 -27
  278. package/app/m/support/SupportCompensation/index.html +27 -27
  279. package/app/m/support/SupportCompensationPlan/index.html +27 -27
  280. package/app/m/support/SupportEscalation/index.html +27 -27
  281. package/app/m/support/SupportInteraction/index.html +27 -27
  282. package/app/m/support/SupportPlan/index.html +27 -27
  283. package/app/m/support/SupportPolicy/index.html +27 -27
  284. package/app/m/support/SupportQualification/index.html +27 -27
  285. package/app/m/support/SupportServiceTarget/index.html +27 -27
  286. package/app/m/support/SupportSpecialist/index.html +27 -27
  287. package/app/m/support/SupportWorkLink/index.html +27 -27
  288. package/app/m/tags/Tag/index.html +27 -27
  289. package/app/m/tags/TagAlias/index.html +27 -27
  290. package/app/m/timesheets/AttendanceBreak/index.html +27 -27
  291. package/app/m/timesheets/AttendancePunch/index.html +27 -27
  292. package/app/m/timesheets/AttendanceSegment/index.html +27 -27
  293. package/app/m/timesheets/ServiceChargeSnapshot/index.html +27 -27
  294. package/app/m/timesheets/ServiceCompensationSnapshot/index.html +27 -27
  295. package/app/m/timesheets/ServiceTimeEntry/index.html +27 -27
  296. package/app/m/users/Group/index.html +27 -27
  297. package/app/m/users/GroupMember/index.html +27 -27
  298. package/app/m/users/GroupRole/index.html +27 -27
  299. package/app/m/users/Membership/index.html +27 -27
  300. package/app/m/users/MembershipOverride/index.html +27 -27
  301. package/app/m/users/Permission/index.html +27 -27
  302. package/app/m/users/Role/index.html +27 -27
  303. package/app/m/users/RolePermission/index.html +27 -27
  304. package/app/m/users/Session/index.html +27 -27
  305. package/app/m/users/Tenant/index.html +27 -27
  306. package/app/m/users/TenantIntegration/index.html +27 -27
  307. package/app/m/users/TenantPermissionOverride/index.html +27 -27
  308. package/app/m/users/User/index.html +27 -27
  309. package/app/m/video/Character/index.html +27 -27
  310. package/app/m/video/CharacterAsset/index.html +27 -27
  311. package/app/m/video/CompositeJob/index.html +27 -27
  312. package/app/m/video/Performer/index.html +27 -27
  313. package/app/m/video/PerformerAsset/index.html +27 -27
  314. package/app/m/video/Scene/index.html +27 -27
  315. package/app/m/video/SceneAsset/index.html +27 -27
  316. package/app/m/video/VideoComposition/index.html +27 -27
  317. package/app/m/video/VideoCompositionAsset/index.html +27 -27
  318. package/app/m/video/VideoSequence/index.html +27 -27
  319. package/app/m/video/VideoSequenceAsset/index.html +27 -27
  320. package/app/m/video/VideoShot/index.html +27 -27
  321. package/app/m/video/VideoShotAsset/index.html +27 -27
  322. package/app/m/video/VideoShotCharacter/index.html +27 -27
  323. package/app/m/video/VideoWorkflow/index.html +27 -27
  324. package/app/m/voice/VoiceOutput/index.html +27 -27
  325. package/app/m/voice/VoiceProfile/index.html +27 -27
  326. package/app/m/voice/VoiceSample/index.html +27 -27
  327. package/app/mcp.html +2 -2
  328. package/app/packages/ads/index.html +24 -24
  329. package/app/packages/analytics/index.html +24 -24
  330. package/app/packages/approvals/index.html +24 -24
  331. package/app/packages/assets/index.html +24 -24
  332. package/app/packages/chat/index.html +24 -24
  333. package/app/packages/comments/index.html +24 -24
  334. package/app/packages/commerce/index.html +24 -24
  335. package/app/packages/content/index.html +24 -24
  336. package/app/packages/events/index.html +24 -24
  337. package/app/packages/expenses/index.html +24 -24
  338. package/app/packages/facts/index.html +24 -24
  339. package/app/packages/fields/index.html +24 -24
  340. package/app/packages/human-resources/index.html +24 -24
  341. package/app/packages/images/index.html +24 -24
  342. package/app/packages/index.html +23 -23
  343. package/app/packages/ingestion/index.html +24 -24
  344. package/app/packages/inventory/index.html +24 -24
  345. package/app/packages/ledgers/index.html +24 -24
  346. package/app/packages/manufacturing/index.html +24 -24
  347. package/app/packages/marketing/index.html +24 -24
  348. package/app/packages/messages/index.html +24 -24
  349. package/app/packages/places/index.html +24 -24
  350. package/app/packages/preferences/index.html +24 -24
  351. package/app/packages/products/index.html +24 -24
  352. package/app/packages/profiles/index.html +24 -24
  353. package/app/packages/projects/index.html +24 -24
  354. package/app/packages/properties/index.html +24 -24
  355. package/app/packages/reports/index.html +24 -24
  356. package/app/packages/sales/index.html +24 -24
  357. package/app/packages/sites/index.html +24 -24
  358. package/app/packages/social/index.html +24 -24
  359. package/app/packages/subscriptions/index.html +24 -24
  360. package/app/packages/support/index.html +24 -24
  361. package/app/packages/tags/index.html +24 -24
  362. package/app/packages/timesheets/index.html +24 -24
  363. package/app/packages/users/index.html +24 -24
  364. package/app/packages/video/index.html +24 -24
  365. package/app/packages/voice/index.html +24 -24
  366. package/app/packages/webhooks/index.html +24 -24
  367. package/app/recipes/account-access/help/index.html +24 -24
  368. package/app/recipes/account-access/index.html +26 -26
  369. package/app/recipes/activity/help/index.html +24 -24
  370. package/app/recipes/activity/index.html +26 -26
  371. package/app/recipes/agreements/help/index.html +24 -24
  372. package/app/recipes/agreements/index.html +26 -26
  373. package/app/recipes/analytics.reports/help/index.html +24 -24
  374. package/app/recipes/analytics.reports/index.html +26 -26
  375. package/app/recipes/assets/help/index.html +24 -24
  376. package/app/recipes/assets/index.html +26 -26
  377. package/app/recipes/billing/help/index.html +24 -24
  378. package/app/recipes/billing/index.html +26 -26
  379. package/app/recipes/chat.assistant/help/index.html +24 -24
  380. package/app/recipes/chat.assistant/index.html +26 -26
  381. package/app/recipes/comments/help/index.html +24 -24
  382. package/app/recipes/comments/index.html +26 -26
  383. package/app/recipes/commerce.customers/help/index.html +24 -24
  384. package/app/recipes/commerce.customers/index.html +26 -26
  385. package/app/recipes/commerce.estimates/help/index.html +24 -24
  386. package/app/recipes/commerce.estimates/index.html +26 -26
  387. package/app/recipes/commerce.purchases/help/index.html +24 -24
  388. package/app/recipes/commerce.purchases/index.html +26 -26
  389. package/app/recipes/commerce.sales/help/index.html +24 -24
  390. package/app/recipes/commerce.sales/index.html +26 -26
  391. package/app/recipes/commerce.vendors/help/index.html +24 -24
  392. package/app/recipes/commerce.vendors/index.html +26 -26
  393. package/app/recipes/commerce.wholesale/help/index.html +24 -24
  394. package/app/recipes/commerce.wholesale/index.html +26 -26
  395. package/app/recipes/events.calendar/help/index.html +24 -24
  396. package/app/recipes/events.calendar/index.html +26 -26
  397. package/app/recipes/expenses.tracking/help/index.html +24 -24
  398. package/app/recipes/expenses.tracking/index.html +26 -26
  399. package/app/recipes/fields.form-customization/help/index.html +24 -24
  400. package/app/recipes/fields.form-customization/index.html +26 -26
  401. package/app/recipes/ingestion/help/index.html +24 -24
  402. package/app/recipes/ingestion/index.html +26 -26
  403. package/app/recipes/integrations/help/index.html +24 -24
  404. package/app/recipes/integrations/index.html +26 -26
  405. package/app/recipes/inventory.stock/help/index.html +24 -24
  406. package/app/recipes/inventory.stock/index.html +26 -26
  407. package/app/recipes/ledgers.bookkeeping/help/index.html +24 -24
  408. package/app/recipes/ledgers.bookkeeping/index.html +26 -26
  409. package/app/recipes/messages/help/index.html +24 -24
  410. package/app/recipes/messages/index.html +26 -26
  411. package/app/recipes/products/help/index.html +24 -24
  412. package/app/recipes/products/index.html +26 -26
  413. package/app/recipes/projects.tracker/help/index.html +24 -24
  414. package/app/recipes/projects.tracker/index.html +26 -26
  415. package/app/recipes/reports.materialized/help/index.html +24 -24
  416. package/app/recipes/reports.materialized/index.html +26 -26
  417. package/app/recipes/reports.runtime/help/index.html +24 -24
  418. package/app/recipes/reports.runtime/index.html +26 -26
  419. package/app/recipes/sales.pipeline/help/index.html +24 -24
  420. package/app/recipes/sales.pipeline/index.html +26 -26
  421. package/app/recipes/tags.taxonomy/help/index.html +24 -24
  422. package/app/recipes/tags.taxonomy/index.html +26 -26
  423. package/app/recipes/team-collaboration/help/index.html +24 -24
  424. package/app/recipes/team-collaboration/index.html +26 -26
  425. package/app/recipes/timesheets.time-entries/help/index.html +24 -24
  426. package/app/recipes/timesheets.time-entries/index.html +26 -26
  427. package/app/s/custom-accounts/index.html +23 -23
  428. package/app/s/custom-appointments/index.html +23 -23
  429. package/app/s/custom-billing/index.html +23 -23
  430. package/app/s/custom-bookings/index.html +23 -23
  431. package/app/s/custom-buying/index.html +23 -23
  432. package/app/s/custom-checkout/index.html +23 -23
  433. package/app/s/custom-classes/index.html +23 -23
  434. package/app/s/custom-clients/index.html +23 -23
  435. package/app/s/custom-events/index.html +23 -23
  436. package/app/s/custom-fleet/index.html +23 -23
  437. package/app/s/custom-gigs/index.html +23 -23
  438. package/app/s/custom-giving/index.html +23 -23
  439. package/app/s/custom-instruments/index.html +23 -23
  440. package/app/s/custom-jobs/index.html +23 -23
  441. package/app/s/custom-kitchen/index.html +23 -23
  442. package/app/s/custom-lessons/index.html +23 -23
  443. package/app/s/custom-material/index.html +23 -23
  444. package/app/s/custom-meetings/index.html +23 -23
  445. package/app/s/custom-members/index.html +23 -23
  446. package/app/s/custom-merch/index.html +23 -23
  447. package/app/s/custom-money/index.html +23 -23
  448. package/app/s/custom-paint/index.html +23 -23
  449. package/app/s/custom-parts/index.html +23 -23
  450. package/app/s/custom-rentals/index.html +23 -23
  451. package/app/s/custom-roastery/index.html +23 -23
  452. package/app/s/custom-schedule/index.html +23 -23
  453. package/app/s/custom-shelf/index.html +23 -23
  454. package/app/s/custom-shop/index.html +23 -23
  455. package/app/s/custom-students/index.html +23 -23
  456. package/app/s/custom-wholesale/index.html +23 -23
  457. package/app/s/custom-work/index.html +23 -23
  458. package/app/s/custom-yard/index.html +23 -23
  459. package/app/s/section-access-control/index.html +23 -23
  460. package/app/s/section-account-security/index.html +23 -23
  461. package/app/s/section-accounting/index.html +23 -23
  462. package/app/s/section-activity/index.html +23 -23
  463. package/app/s/section-agreements/index.html +23 -23
  464. package/app/s/section-analytics/index.html +23 -23
  465. package/app/s/section-assets/index.html +23 -23
  466. package/app/s/section-billing/index.html +23 -23
  467. package/app/s/section-calendar/index.html +23 -23
  468. package/app/s/section-catalog/index.html +23 -23
  469. package/app/s/section-chat.assistant/index.html +23 -23
  470. package/app/s/section-comments/index.html +23 -23
  471. package/app/s/section-fields.form-customization/index.html +23 -23
  472. package/app/s/section-ingestion/index.html +23 -23
  473. package/app/s/section-integrations/index.html +23 -23
  474. package/app/s/section-messages/index.html +23 -23
  475. package/app/s/section-more/index.html +23 -23
  476. package/app/s/section-operations/index.html +23 -23
  477. package/app/s/section-projects/index.html +23 -23
  478. package/app/s/section-purchasing/index.html +23 -23
  479. package/app/s/section-reports.materialized/index.html +23 -23
  480. package/app/s/section-reports.runtime/index.html +23 -23
  481. package/app/s/section-sales/index.html +23 -23
  482. package/app/s/section-taxonomy/index.html +23 -23
  483. package/app/s/section-team/index.html +23 -23
  484. package/app/s/section-work/index.html +23 -23
  485. package/dist/ai/instance.d.ts.map +1 -1
  486. package/dist/ai/instance.js +2 -0
  487. package/dist/assistant/change.d.ts +2 -0
  488. package/dist/assistant/change.d.ts.map +1 -1
  489. package/dist/assistant/change.js +5 -0
  490. package/dist/assistant/coaching.d.ts +7 -0
  491. package/dist/assistant/coaching.d.ts.map +1 -0
  492. package/dist/assistant/coaching.js +42 -0
  493. package/dist/assistant/prompt.d.ts.map +1 -1
  494. package/dist/assistant/prompt.js +1 -0
  495. package/dist/assistant/session.svelte.d.ts +4 -1
  496. package/dist/assistant/session.svelte.d.ts.map +1 -1
  497. package/dist/assistant/session.svelte.js +5 -1
  498. package/dist/assistant/starters.d.ts +7 -0
  499. package/dist/assistant/starters.d.ts.map +1 -0
  500. package/dist/assistant/starters.js +33 -0
  501. package/dist/assistant/transport.d.ts +37 -2
  502. package/dist/assistant/transport.d.ts.map +1 -1
  503. package/dist/assistant/transport.js +257 -56
  504. package/dist/catalog/catalog.json +38 -38
  505. package/dist/components/BrowserAssistant.svelte +20 -0
  506. package/dist/components/BrowserAssistant.svelte.d.ts.map +1 -1
  507. package/dist/components/ExportPanel.svelte +176 -118
  508. package/dist/components/ExportPanel.svelte.d.ts +8 -0
  509. package/dist/components/ExportPanel.svelte.d.ts.map +1 -1
  510. package/dist/components/HeaderIconLink.svelte +8 -0
  511. package/dist/components/HeaderIconLink.svelte.d.ts +1 -0
  512. package/dist/components/HeaderIconLink.svelte.d.ts.map +1 -1
  513. package/dist/components/ProjectControls.svelte +133 -0
  514. package/dist/components/ProjectControls.svelte.d.ts +15 -0
  515. package/dist/components/ProjectControls.svelte.d.ts.map +1 -0
  516. package/dist/components/SectionOverview.svelte +4 -5
  517. package/dist/components/SectionOverview.svelte.d.ts +1 -1
  518. package/dist/components/SectionOverview.svelte.d.ts.map +1 -1
  519. package/dist/components/SettingsPanel.svelte +37 -1
  520. package/dist/components/SettingsPanel.svelte.d.ts +7 -1
  521. package/dist/components/SettingsPanel.svelte.d.ts.map +1 -1
  522. package/dist/cookbook/file.d.ts +5 -0
  523. package/dist/cookbook/file.d.ts.map +1 -1
  524. package/dist/cookbook/file.js +9 -2
  525. package/dist/cookbook/store.svelte.d.ts +4 -1
  526. package/dist/cookbook/store.svelte.d.ts.map +1 -1
  527. package/dist/cookbook/store.svelte.js +9 -10
  528. package/dist/core/index.d.ts +1 -0
  529. package/dist/core/index.d.ts.map +1 -1
  530. package/dist/core/index.js +1 -0
  531. package/dist/core/prompt.d.ts.map +1 -1
  532. package/dist/core/prompt.js +10 -0
  533. package/dist/core/reply.d.ts +2 -0
  534. package/dist/core/reply.d.ts.map +1 -1
  535. package/dist/core/reply.js +4 -0
  536. package/dist/data/packs.d.ts.map +1 -1
  537. package/dist/data/packs.js +14 -7
  538. package/dist/data/planner-source.d.ts.map +1 -1
  539. package/dist/data/planner-source.js +4 -3
  540. package/dist/data/sample-context.d.ts +84 -0
  541. package/dist/data/sample-context.d.ts.map +1 -0
  542. package/dist/data/sample-context.js +106 -0
  543. package/dist/data/source.d.ts.map +1 -1
  544. package/dist/data/source.js +2 -0
  545. package/dist/index.d.ts +8 -1
  546. package/dist/index.d.ts.map +1 -1
  547. package/dist/index.js +3 -0
  548. package/dist/library/state.svelte.d.ts.map +1 -1
  549. package/dist/library/state.svelte.js +3 -3
  550. package/dist/overviews/definitions.d.ts +2 -2
  551. package/dist/overviews/definitions.d.ts.map +1 -1
  552. package/dist/overviews/definitions.js +19 -31
  553. package/dist/overviews/page.d.ts.map +1 -1
  554. package/dist/overviews/page.js +4 -1
  555. package/dist/overviews/registry.d.ts +1 -1
  556. package/dist/overviews/registry.js +3 -3
  557. package/dist/overviews/validate.d.ts.map +1 -1
  558. package/dist/overviews/validate.js +15 -2
  559. package/dist/planner/Planner.svelte +46 -4
  560. package/dist/planner/Planner.svelte.d.ts.map +1 -1
  561. package/dist/planner/PlannerControls.svelte +18 -2
  562. package/dist/planner/PlannerControls.svelte.d.ts +2 -0
  563. package/dist/planner/PlannerControls.svelte.d.ts.map +1 -1
  564. package/dist/planner/PlannerHostAction.svelte +61 -0
  565. package/dist/planner/PlannerHostAction.svelte.d.ts +12 -0
  566. package/dist/planner/PlannerHostAction.svelte.d.ts.map +1 -0
  567. package/dist/planner/PlannerLifecycle.svelte +75 -5
  568. package/dist/planner/PlannerLifecycle.svelte.d.ts +2 -1
  569. package/dist/planner/PlannerLifecycle.svelte.d.ts.map +1 -1
  570. package/dist/planner/bridge.d.ts +73 -0
  571. package/dist/planner/bridge.d.ts.map +1 -0
  572. package/dist/planner/bridge.js +303 -0
  573. package/dist/planner/commands/adapter.d.ts +2 -0
  574. package/dist/planner/commands/adapter.d.ts.map +1 -1
  575. package/dist/planner/commands/adapter.js +19 -0
  576. package/dist/planner/export-context.d.ts +6 -0
  577. package/dist/planner/export-context.d.ts.map +1 -0
  578. package/dist/planner/export-context.js +14 -0
  579. package/dist/planner/guide.d.ts +69 -0
  580. package/dist/planner/guide.d.ts.map +1 -0
  581. package/dist/planner/guide.js +115 -0
  582. package/dist/planner/host-reply.d.ts +22 -0
  583. package/dist/planner/host-reply.d.ts.map +1 -0
  584. package/dist/planner/host-reply.js +71 -0
  585. package/dist/planner/shell.d.ts +6 -0
  586. package/dist/planner/shell.d.ts.map +1 -1
  587. package/dist/planner/shell.js +2 -0
  588. package/dist/planner/types.d.ts +39 -1
  589. package/dist/planner/types.d.ts.map +1 -1
  590. package/dist/planner/workspace-storage.d.ts +29 -0
  591. package/dist/planner/workspace-storage.d.ts.map +1 -0
  592. package/dist/planner/workspace-storage.js +355 -0
  593. package/dist/planner/workspace.svelte.d.ts +19 -0
  594. package/dist/planner/workspace.svelte.d.ts.map +1 -0
  595. package/dist/planner/workspace.svelte.js +52 -0
  596. package/dist/smrt-version.d.ts +1 -1
  597. package/dist/smrt-version.js +1 -1
  598. package/package.json +54 -54
  599. package/app/_app/immutable/assets/2.CdEXvRg0.css +0 -1
  600. package/app/_app/immutable/assets/AppShell.BkKNrxND.css +0 -1
  601. package/app/_app/immutable/chunks/B2hfN2VL.js +0 -10
  602. package/app/_app/immutable/chunks/BFBrKYIZ.js +0 -26
  603. package/app/_app/immutable/chunks/BPIRT1pR.js +0 -4
  604. package/app/_app/immutable/chunks/Cq7I_-C0.js +0 -1
  605. package/app/_app/immutable/chunks/Cye6FWwy.js +0 -1
  606. package/app/_app/immutable/chunks/D0ibYqDu.js +0 -2
  607. package/app/_app/immutable/chunks/D71UrO5c.js +0 -1
  608. package/app/_app/immutable/chunks/DF-0MxNw.js +0 -1
  609. package/app/_app/immutable/chunks/DN0-Cx7Y.js +0 -1
  610. package/app/_app/immutable/chunks/DS1ApqxJ.js +0 -16
  611. package/app/_app/immutable/chunks/DSxP4IQt.js +0 -1
  612. package/app/_app/immutable/chunks/Dx1VzWCD.js +0 -2
  613. package/app/_app/immutable/entry/start.Dg2NiCvD.js +0 -1
  614. package/app/_app/immutable/nodes/0.DE5huPD8.js +0 -7
  615. package/app/_app/immutable/nodes/10.C_KB8ejn.js +0 -3
  616. package/app/_app/immutable/nodes/14.Ercp5Yal.js +0 -1
  617. package/app/_app/immutable/nodes/2.D_BYCG3U.js +0 -24
  618. package/app/_app/immutable/nodes/7.-bKoHvi1.js +0 -1
@@ -1,7 +1,10 @@
1
1
  <script lang="ts">
2
- import { onMount } from 'svelte';
2
+ import {
3
+ tryUseAdminShell,
4
+ tryUseShellTargets,
5
+ } from '@happyvertical/smrt-svelte/workspace';
6
+ import { onMount, tick } from 'svelte';
3
7
  import { aiState } from '../ai/instance.js';
4
- import { browserStorage } from '../cookbook/storage.js';
5
8
  import { cookbookStore } from '../cookbook/store.svelte.js';
6
9
  import { provideDataSource, tryUseDataSource } from '../data/context.js';
7
10
  import { createPlannerDataSource } from '../data/planner-source.js';
@@ -10,8 +13,10 @@ import { libraryState } from '../library/state.svelte.js';
10
13
  import { recipeState } from '../recipes/state.svelte.js';
11
14
  import { type LinkMode, setBasePath } from './app.svelte.js';
12
15
  import { createPlannerAssistant } from './assistant.js';
16
+ import { createPlannerGuide } from './guide.js';
13
17
  import { plannerController, plannerRuntime } from './instance.js';
14
18
  import type { PlannerProps } from './types.js';
19
+ import { workspaceStorage } from './workspace-storage.js';
15
20
 
16
21
  let {
17
22
  controller = plannerController,
@@ -19,15 +24,29 @@ let {
19
24
  inference,
20
25
  persistence = 'self',
21
26
  onready,
27
+ initialConversation,
28
+ cookbookOffers = true,
29
+ conversationalAction,
30
+ nativeAssistant = false,
22
31
  links = 'path',
23
32
  }: Pick<
24
33
  PlannerProps,
25
- 'controller' | 'basePath' | 'inference' | 'persistence' | 'onready'
34
+ | 'controller'
35
+ | 'basePath'
36
+ | 'inference'
37
+ | 'persistence'
38
+ | 'onready'
39
+ | 'initialConversation'
40
+ | 'cookbookOffers'
41
+ | 'conversationalAction'
26
42
  > & {
43
+ nativeAssistant?: boolean;
27
44
  /** `'hash'` in the complete `Planner`, whose pages are fragment routes. */
28
45
  links?: LinkMode;
29
46
  } = $props();
30
47
 
48
+ const shell = tryUseAdminShell();
49
+ const targets = tryUseShellTargets();
31
50
  const dataSource =
32
51
  tryUseDataSource() ?? provideDataSource(createPlannerDataSource());
33
52
 
@@ -38,11 +57,19 @@ $effect.pre(() => {
38
57
  });
39
58
 
40
59
  onMount(() => {
60
+ let mounted = true;
61
+ const guide = nativeAssistant
62
+ ? createPlannerGuide({
63
+ targets,
64
+ isMounted: () => mounted,
65
+ revealMenu: () => shell?.expandPanel('left'),
66
+ })
67
+ : undefined;
41
68
  const previous = plannerRuntime.onReplaced;
42
69
  plannerRuntime.onReplaced = () => dataSource.reset?.();
43
70
  if (persistence === 'self' && !cookbookStore.loaded) {
44
71
  libraryState.load();
45
- cookbookStore.hydrate('', browserStorage());
72
+ cookbookStore.hydrate('', workspaceStorage());
46
73
  }
47
74
  const assistant = inference
48
75
  ? createPlannerAssistant(controller, inference)
@@ -57,9 +84,52 @@ onMount(() => {
57
84
  recipeState.ids.length > 0 || recipeState.features.length > 0,
58
85
  );
59
86
  }
60
- onready?.({ controller, ...(assistant ? { assistant } : {}) });
87
+ // Guide lifetime observes the private epoch even without an inference UI.
88
+ // Only an enabled assistant grants public conversation/export capabilities.
89
+ const privateNative = nativeAssistant ? aiState.session.transport : undefined;
90
+ const native = inference ? privateNative : undefined;
91
+ let nativeEpoch = privateNative?.resetRevision;
92
+ const stopGuideReset = privateNative?.subscribeConversation(() => {
93
+ if (privateNative.resetRevision !== nativeEpoch) {
94
+ nativeEpoch = privateNative.resetRevision;
95
+ guide?.dismiss();
96
+ }
97
+ });
98
+ const previousOffers = aiState.session.cookbookOffers;
99
+ const previousHostTurn = aiState.session.hostTurn;
100
+ if (native) {
101
+ aiState.session.cookbookOffers = cookbookOffers;
102
+ aiState.session.hostTurn = conversationalAction;
103
+ if (initialConversation) native.seed(initialConversation);
104
+ }
105
+ onready?.({
106
+ controller,
107
+ ...(guide ? { guide } : {}),
108
+ workspaceStorage: workspaceStorage(),
109
+ ...(assistant ? { assistant } : {}),
110
+ ...(native
111
+ ? {
112
+ nativeAssistant: native,
113
+ openAssistant: async () => {
114
+ await tick();
115
+ return (
116
+ mounted &&
117
+ aiState.assistantReady &&
118
+ (shell?.openDockTool('assistant') ?? false)
119
+ );
120
+ },
121
+ }
122
+ : {}),
123
+ });
61
124
  return () => {
125
+ mounted = false;
126
+ guide?.dismiss();
127
+ stopGuideReset?.();
62
128
  plannerRuntime.onReplaced = previous;
129
+ if (native) {
130
+ aiState.session.cookbookOffers = previousOffers;
131
+ aiState.session.hostTurn = previousHostTurn;
132
+ }
63
133
  };
64
134
  });
65
135
 
@@ -1,6 +1,7 @@
1
1
  import { type LinkMode } from './app.svelte.ts';
2
2
  import type { PlannerProps } from './types.ts';
3
- type $$ComponentProps = Pick<PlannerProps, 'controller' | 'basePath' | 'inference' | 'persistence' | 'onready'> & {
3
+ type $$ComponentProps = Pick<PlannerProps, 'controller' | 'basePath' | 'inference' | 'persistence' | 'onready' | 'initialConversation' | 'cookbookOffers' | 'conversationalAction'> & {
4
+ nativeAssistant?: boolean;
4
5
  /** `'hash'` in the complete `Planner`, whose pages are fragment routes. */
5
6
  links?: LinkMode;
6
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"PlannerLifecycle.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/planner/PlannerLifecycle.svelte.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,QAAQ,EAAe,MAAM,iBAAiB,CAAC;AAG7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE9C,KAAK,gBAAgB,GAAI,IAAI,CAC5B,YAAY,EACZ,YAAY,GAAG,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,SAAS,CACpE,GAAG;IACF,2EAA2E;IAC3E,KAAK,CAAC,EAAE,QAAQ,CAAC;CAClB,CAAC;AAuEF,QAAA,MAAM,gBAAgB,sDAAwC,CAAC;AAC/D,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC5D,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"PlannerLifecycle.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/planner/PlannerLifecycle.svelte.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,KAAK,QAAQ,EAAe,MAAM,iBAAiB,CAAC;AAI7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG9C,KAAK,gBAAgB,GAAI,IAAI,CAC5B,YAAY,EACV,YAAY,GACZ,UAAU,GACV,WAAW,GACX,aAAa,GACb,SAAS,GACT,qBAAqB,GACrB,gBAAgB,GAChB,sBAAsB,CACzB,GAAG;IACF,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,2EAA2E;IAC3E,KAAK,CAAC,EAAE,QAAQ,CAAC;CAClB,CAAC;AAkIF,QAAA,MAAM,gBAAgB,sDAAwC,CAAC;AAC/D,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC5D,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,73 @@
1
+ import { type PromptCatalog } from '../core/catalog.ts';
2
+ import type { BatchResult, CommandName, PlannerController, PlanSnapshot } from './commands/index.ts';
3
+ import { type CommandTool } from './commands/schemas.ts';
4
+ import type { PlannerGuideControl, PlannerGuideHandle, PlannerGuideResult } from './guide.ts';
5
+ export interface PlannerBridgeSnapshot {
6
+ generation: string;
7
+ snapshot: PlanSnapshot;
8
+ }
9
+ export interface PlannerBridgeContext extends PlannerBridgeSnapshot {
10
+ catalog: PromptCatalog;
11
+ tools: readonly CommandTool[];
12
+ }
13
+ export interface PlannerBridgeRequest {
14
+ id: string;
15
+ generation: string;
16
+ expectedRevision: number;
17
+ }
18
+ export interface PlannerBridgeExecute extends PlannerBridgeRequest {
19
+ commands: readonly {
20
+ name: string;
21
+ input: unknown;
22
+ }[];
23
+ }
24
+ export interface PlannerBridgeApplyReply extends PlannerBridgeRequest {
25
+ reply: unknown;
26
+ }
27
+ export type PlannerBridgeResult = PlannerBridgeSnapshot & {
28
+ ok: boolean;
29
+ source: string;
30
+ id?: string;
31
+ result?: BatchResult;
32
+ content?: string;
33
+ spokenContent?: string;
34
+ sampleContextApplied?: boolean;
35
+ error?: {
36
+ code: string;
37
+ message: string;
38
+ };
39
+ };
40
+ export interface PlannerCommandPortClient {
41
+ snapshot(): Promise<PlannerBridgeSnapshot>;
42
+ context(): Promise<PlannerBridgeContext>;
43
+ subscribe(listener: (state: PlannerBridgeSnapshot) => void): () => void;
44
+ execute(input: PlannerBridgeExecute): Promise<PlannerBridgeResult>;
45
+ applyReply(input: PlannerBridgeApplyReply): Promise<PlannerBridgeResult>;
46
+ guide(input: {
47
+ generation: string;
48
+ kind: 'arrival' | 'addition' | 'control';
49
+ control?: PlannerGuideControl;
50
+ requestId?: string;
51
+ }): Promise<PlannerGuideResult>;
52
+ dismissGuide(input: {
53
+ generation: string;
54
+ }): Promise<{
55
+ ok: boolean;
56
+ }>;
57
+ dispose(): void;
58
+ }
59
+ /** Bind a dedicated, already-authorized port to the actual mounted controller. */
60
+ export declare function bindPlannerCommandPort(options: {
61
+ port: MessagePort;
62
+ controller: PlannerController;
63
+ allowedCommands: readonly CommandName[];
64
+ /** Host-assigned provenance; never accepted from a model/request. */
65
+ source: string;
66
+ guide?: PlannerGuideHandle;
67
+ }): {
68
+ invalidate(): void;
69
+ dispose(): void;
70
+ };
71
+ /** Client for a dedicated port; the host owns exact origin/source handshake checks. */
72
+ export declare function connectPlannerCommandPort(port: MessagePort): PlannerCommandPortClient;
73
+ //# sourceMappingURL=bridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge.d.ts","sourceRoot":"","s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W,GAChB,wBAAwB,CA4F1B"}
@@ -0,0 +1,303 @@
1
+ import { defaultCatalog } from "../core/catalog.js";
2
+ import { COMMAND_NAMES, commandTools, } from "./commands/schemas.js";
3
+ import { applyPlannerHostReply } from "./host-reply.js";
4
+ const PROTOCOL = 'smrt-planner-commands';
5
+ const VERSION = 1;
6
+ const MAX_BYTES = 32768;
7
+ const MAX_COMMANDS = 16;
8
+ const MAX_RECEIPTS = 256;
9
+ const object = (value) => !!value && typeof value === 'object' && !Array.isArray(value);
10
+ /** Bind a dedicated, already-authorized port to the actual mounted controller. */
11
+ export function bindPlannerCommandPort(options) {
12
+ const { port, controller, source } = options;
13
+ if (!source ||
14
+ source.length > 128 ||
15
+ options.allowedCommands.some((name) => !COMMAND_NAMES.includes(name)))
16
+ throw new Error('Invalid Planner command port policy.');
17
+ const allowed = new Set(options.allowedCommands);
18
+ let generation = crypto.randomUUID();
19
+ let disposed = false;
20
+ const receipts = new Map();
21
+ const state = () => ({
22
+ generation,
23
+ snapshot: controller.snapshot(),
24
+ });
25
+ const send = (message) => {
26
+ if (!disposed)
27
+ port.postMessage({
28
+ protocol: PROTOCOL,
29
+ version: VERSION,
30
+ ...message,
31
+ });
32
+ };
33
+ const fail = (code, message, id) => ({
34
+ ...state(),
35
+ ok: false,
36
+ source,
37
+ ...(id ? { id } : {}),
38
+ error: { code, message },
39
+ content: message,
40
+ });
41
+ function execute(raw, mode) {
42
+ if (!object(raw) ||
43
+ Object.keys(raw).some((key) => ![
44
+ 'id',
45
+ 'generation',
46
+ 'expectedRevision',
47
+ mode === 'execute' ? 'commands' : 'reply',
48
+ ].includes(key)) ||
49
+ typeof raw.id !== 'string' ||
50
+ !raw.id ||
51
+ raw.id.length > 128 ||
52
+ typeof raw.generation !== 'string' ||
53
+ !Number.isSafeInteger(raw.expectedRevision) ||
54
+ Number(raw.expectedRevision) < 0)
55
+ return fail('invalid_input', 'Invalid Planner command envelope.');
56
+ const id = raw.id;
57
+ if (raw.generation !== generation)
58
+ return fail('stale_generation', 'This request belongs to an earlier Planner workspace.', id);
59
+ const fingerprint = JSON.stringify({ mode, ...raw });
60
+ const cached = receipts.get(id);
61
+ if (cached)
62
+ return cached.fingerprint === fingerprint
63
+ ? structuredClone(cached.value)
64
+ : fail('conflict', 'This request id was already used for different input.', id);
65
+ if (receipts.size >= MAX_RECEIPTS)
66
+ return fail('limit_reached', 'This command connection has reached its receipt limit. Reconnect before continuing.', id);
67
+ const before = controller.snapshot();
68
+ let value;
69
+ const commandId = `${generation}:${id}`;
70
+ if (mode === 'applyReply') {
71
+ const applied = applyPlannerHostReply({
72
+ controller,
73
+ allowedCommands: [...allowed],
74
+ id: commandId,
75
+ expectedRevision: raw.expectedRevision,
76
+ reply: raw.reply,
77
+ });
78
+ value = { ...state(), source, id, ...applied };
79
+ }
80
+ else {
81
+ const commands = raw.commands;
82
+ if (!Array.isArray(commands) ||
83
+ commands.length === 0 ||
84
+ commands.length > MAX_COMMANDS ||
85
+ commands.some((command) => !object(command) ||
86
+ Object.keys(command).some((key) => !['name', 'input'].includes(key)) ||
87
+ typeof command.name !== 'string' ||
88
+ !allowed.has(command.name)))
89
+ return fail('forbidden', 'The request contains a command this host does not allow.', id);
90
+ const result = controller.batch({
91
+ id: commandId,
92
+ expectedRevision: raw.expectedRevision,
93
+ commands,
94
+ });
95
+ value = {
96
+ ...state(),
97
+ source,
98
+ id,
99
+ ok: result.ok,
100
+ result,
101
+ ...(!result.ok
102
+ ? { error: result.error, content: result.error.message }
103
+ : {}),
104
+ };
105
+ }
106
+ receipts.set(id, { fingerprint, value: structuredClone(value), before });
107
+ return value;
108
+ }
109
+ const listener = async (event) => {
110
+ const raw = event.data;
111
+ if (disposed ||
112
+ !object(raw) ||
113
+ raw.protocol !== PROTOCOL ||
114
+ !Number.isSafeInteger(raw.requestId))
115
+ return;
116
+ let value;
117
+ const requestGeneration = generation;
118
+ try {
119
+ if (new TextEncoder().encode(JSON.stringify(raw)).length > MAX_BYTES)
120
+ value = fail('invalid_input', 'Planner command message is too large.');
121
+ else if (raw.version !== VERSION)
122
+ value = fail('unsupported_version', 'Unsupported Planner command protocol.');
123
+ else if (raw.type === 'snapshot')
124
+ value = state();
125
+ else if (raw.type === 'context')
126
+ value = { ...state(), catalog: defaultCatalog, tools: commandTools };
127
+ else if (raw.type === 'guide') {
128
+ const input = raw.input;
129
+ if (!object(input) ||
130
+ Object.keys(input).some((key) => !['generation', 'kind', 'requestId', 'control'].includes(key)) ||
131
+ input.generation !== generation ||
132
+ !['arrival', 'addition', 'control'].includes(String(input.kind)) ||
133
+ (input.kind === 'control' &&
134
+ !['build', 'export', 'chef', 'edit'].includes(String(input.control))) ||
135
+ (input.kind !== 'control' && input.control !== undefined) ||
136
+ !options.guide)
137
+ value = {
138
+ ok: false,
139
+ reason: 'Guidance is unavailable for this workspace.',
140
+ };
141
+ else if (input.kind === 'control')
142
+ value = await options.guide.highlight({
143
+ kind: 'control',
144
+ control: input.control,
145
+ });
146
+ else if (input.kind === 'arrival')
147
+ value = await options.guide.highlight({ kind: 'arrival' });
148
+ else {
149
+ const receipt = typeof input.requestId === 'string'
150
+ ? receipts.get(input.requestId)
151
+ : undefined;
152
+ if (!receipt?.value.ok ||
153
+ !receipt.value.result?.ok ||
154
+ receipt.guided ||
155
+ receipt.value.snapshot.revision !== controller.snapshot().revision)
156
+ value = {
157
+ ok: false,
158
+ reason: 'No current unshown successful addition receipt is available.',
159
+ };
160
+ else {
161
+ value = await options.guide.highlight({
162
+ kind: 'addition',
163
+ before: receipt.before,
164
+ result: receipt.value.result,
165
+ });
166
+ if (value.ok)
167
+ receipt.guided = true;
168
+ }
169
+ }
170
+ }
171
+ else if (raw.type === 'dismissGuide') {
172
+ if (object(raw.input) && raw.input.generation === generation) {
173
+ options.guide?.dismiss();
174
+ value = { ok: true };
175
+ }
176
+ else
177
+ value = { ok: false };
178
+ }
179
+ else if (raw.type === 'execute' || raw.type === 'applyReply')
180
+ value = execute(raw.input, raw.type);
181
+ else
182
+ value = fail('invalid_input', 'Unknown Planner command operation.');
183
+ }
184
+ catch {
185
+ value = fail('invalid_input', 'The Planner command could not be processed.');
186
+ }
187
+ if (raw.type === 'guide' && requestGeneration !== generation)
188
+ value = {
189
+ ok: false,
190
+ reason: 'The workspace changed before guidance was ready.',
191
+ };
192
+ send({ type: 'response', requestId: raw.requestId, value });
193
+ };
194
+ port.addEventListener('message', listener);
195
+ port.start();
196
+ const unsubscribe = controller.subscribe((snapshot) => send({ type: 'state', value: { generation, snapshot } }));
197
+ return {
198
+ invalidate() {
199
+ if (disposed)
200
+ return;
201
+ generation = crypto.randomUUID();
202
+ receipts.clear();
203
+ options.guide?.dismiss();
204
+ send({ type: 'state', value: state() });
205
+ },
206
+ dispose() {
207
+ if (disposed)
208
+ return;
209
+ disposed = true;
210
+ options.guide?.dismiss();
211
+ unsubscribe();
212
+ port.removeEventListener('message', listener);
213
+ port.close();
214
+ receipts.clear();
215
+ },
216
+ };
217
+ }
218
+ /** Client for a dedicated port; the host owns exact origin/source handshake checks. */
219
+ export function connectPlannerCommandPort(port) {
220
+ let next = 0;
221
+ let disposed = false;
222
+ let current;
223
+ const listeners = new Set();
224
+ const pending = new Map();
225
+ const listener = (event) => {
226
+ const message = event.data;
227
+ if (disposed ||
228
+ !object(message) ||
229
+ message.protocol !== PROTOCOL ||
230
+ message.version !== VERSION)
231
+ return;
232
+ if (message.type === 'response' && typeof message.requestId === 'number') {
233
+ const call = pending.get(message.requestId);
234
+ if (!call)
235
+ return;
236
+ clearTimeout(call.timer);
237
+ pending.delete(message.requestId);
238
+ call.resolve(message.value);
239
+ }
240
+ else if (message.type === 'state' && object(message.value)) {
241
+ current = message.value;
242
+ for (const subscriber of listeners)
243
+ subscriber(structuredClone(current));
244
+ }
245
+ };
246
+ port.addEventListener('message', listener);
247
+ port.start();
248
+ const request = (type, input) => {
249
+ if (disposed)
250
+ return Promise.reject(new Error('Planner command connection is disposed.'));
251
+ if (pending.size >= 32)
252
+ return Promise.reject(new Error('Too many pending Planner commands.'));
253
+ return new Promise((resolve, reject) => {
254
+ const requestId = ++next;
255
+ const timer = setTimeout(() => {
256
+ pending.delete(requestId);
257
+ reject(new Error('Planner command connection timed out.'));
258
+ }, 10000);
259
+ pending.set(requestId, { resolve, reject, timer });
260
+ try {
261
+ port.postMessage({
262
+ protocol: PROTOCOL,
263
+ version: VERSION,
264
+ requestId,
265
+ type,
266
+ ...(input === undefined ? {} : { input }),
267
+ });
268
+ }
269
+ catch (error) {
270
+ clearTimeout(timer);
271
+ pending.delete(requestId);
272
+ reject(error);
273
+ }
274
+ });
275
+ };
276
+ return {
277
+ snapshot: () => request('snapshot'),
278
+ context: () => request('context'),
279
+ execute: (input) => request('execute', input),
280
+ applyReply: (input) => request('applyReply', input),
281
+ guide: (input) => request('guide', input),
282
+ dismissGuide: (input) => request('dismissGuide', input),
283
+ subscribe(subscriber) {
284
+ listeners.add(subscriber);
285
+ if (current)
286
+ subscriber(structuredClone(current));
287
+ return () => listeners.delete(subscriber);
288
+ },
289
+ dispose() {
290
+ if (disposed)
291
+ return;
292
+ disposed = true;
293
+ port.removeEventListener('message', listener);
294
+ port.close();
295
+ listeners.clear();
296
+ for (const call of pending.values()) {
297
+ clearTimeout(call.timer);
298
+ call.reject(new Error('Planner command connection is disposed.'));
299
+ }
300
+ pending.clear();
301
+ },
302
+ };
303
+ }
@@ -70,6 +70,8 @@ export interface AdapterEnv {
70
70
  * all drive the app through this one seam.
71
71
  */
72
72
  export interface PlannerController {
73
+ /** Forget project command history after an explicit workspace reset. */
74
+ resetWorkspace?(): void;
73
75
  /**
74
76
  * Run one command. Never throws: a bad command, unknown id or refused edit
75
77
  * comes back as `{ ok: false, error }` and leaves the app unchanged.
@@ -1 +1 @@
1
- {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../src/lib/planner/commands/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAGnB,KAAK,aAAa,EAElB,KAAK,WAAW,EAEjB,MAAM,0CAA0C,CA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
  return {
568
+ resetWorkspace() {
569
+ sync();
570
+ const revision = engine.state().revision + 1;
571
+ engine = createCookbookEngine({
572
+ catalog,
573
+ state: {
574
+ version: 1,
575
+ revision,
576
+ applied: resolvedApplied(),
577
+ cookbook: (port?.read?.() ?? engine.cookbook()),
578
+ journal: [],
579
+ },
580
+ });
581
+ outward.clear();
582
+ inward.clear();
583
+ syncError = null;
584
+ lastKey = signature(port?.read?.() ?? engine.cookbook(), resolvedApplied());
585
+ deliver();
586
+ },
568
587
  run: runWithUndo,
569
588
  batch,
570
589
  snapshot() {
@@ -0,0 +1,6 @@
1
+ import type { BrowserAssistantTransport } from '../assistant/transport.ts';
2
+ import type { PlannerController } from './commands/index.ts';
3
+ import type { PlannerExportContext } from './types.ts';
4
+ /** Synchronous capture: no user edit or model completion can interleave it. */
5
+ export declare function capturePlannerExport(controller: PlannerController, nativeAssistant?: BrowserAssistantTransport): PlannerExportContext;
6
+ //# sourceMappingURL=export-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export-context.d.ts","sourceRoot":"","sources":["../../src/lib/planner/export-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,KAAK,EAAc,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD,+EAA+E;AAC/E,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,iBAAiB,EAC7B,eAAe,CAAC,EAAE,yBAAyB,GAC1C,oBAAoB,CAatB"}
@@ -0,0 +1,14 @@
1
+ /** Synchronous capture: no user edit or model completion can interleave it. */
2
+ export function capturePlannerExport(controller, nativeAssistant) {
3
+ if (nativeAssistant?.busy) {
4
+ throw new Error('Wait for the assistant to finish, or stop it, then try again.');
5
+ }
6
+ const result = controller.run({ name: 'export_cookbook', input: {} });
7
+ if (!result.ok)
8
+ throw new Error(result.error.message);
9
+ return structuredClone({
10
+ export: result.data,
11
+ revision: result.snapshot.revision,
12
+ conversation: nativeAssistant?.conversation() ?? [],
13
+ });
14
+ }
@@ -0,0 +1,69 @@
1
+ import type { ShellTargets } from '@happyvertical/smrt-svelte/workspace';
2
+ import type { BatchResult, PlanSnapshot } from './commands/index.ts';
3
+ export type PlannerGuideControl = 'build' | 'export' | 'chef' | 'edit';
4
+ export declare const PLANNER_GUIDE_CONTROLS: {
5
+ build: {
6
+ targetId: string;
7
+ label: string;
8
+ description: string;
9
+ };
10
+ export: {
11
+ targetId: string;
12
+ label: string;
13
+ description: string;
14
+ };
15
+ chef: {
16
+ targetId: string;
17
+ label: string;
18
+ description: string;
19
+ };
20
+ edit: {
21
+ targetId: string;
22
+ label: string;
23
+ description: string;
24
+ };
25
+ };
26
+ export interface PlannerGuideResult {
27
+ ok: boolean;
28
+ targetId?: string;
29
+ label?: string;
30
+ description?: string;
31
+ reason?: string;
32
+ }
33
+ export interface PlannerGuideHandle {
34
+ highlight(input: {
35
+ kind: 'arrival';
36
+ } | {
37
+ kind: 'control';
38
+ control: PlannerGuideControl;
39
+ } | {
40
+ kind: 'addition';
41
+ before: PlanSnapshot;
42
+ result: BatchResult;
43
+ }): Promise<PlannerGuideResult>;
44
+ dismiss(): void;
45
+ }
46
+ /** Semantic target choice is based on actual before/after execution, never catalog order. */
47
+ export declare function additionGuideTarget(before: PlanSnapshot, result: BatchResult): {
48
+ section: {
49
+ id: string;
50
+ label: string;
51
+ hidden: boolean;
52
+ items: {
53
+ id: string;
54
+ label: string;
55
+ hidden: boolean;
56
+ }[];
57
+ };
58
+ item: {
59
+ id: string;
60
+ label: string;
61
+ hidden: boolean;
62
+ };
63
+ } | undefined;
64
+ export declare function createPlannerGuide(options: {
65
+ targets?: ShellTargets;
66
+ isMounted: () => boolean;
67
+ revealMenu?: () => void;
68
+ }): PlannerGuideHandle;
69
+ //# sourceMappingURL=guide.d.ts.map