@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.
- package/README.md +136 -0
- package/agents/assistant.md +49 -0
- package/agents/commands.md +2 -2
- package/agents/cookbook.md +3 -1
- package/agents/shell.md +9 -7
- package/app/404.html +21 -21
- package/app/_app/immutable/assets/2.D3Ee82Nk.css +1 -0
- package/app/_app/immutable/assets/AppShell.Y0ysizZK.css +1 -0
- package/app/_app/immutable/assets/{icons.BDx21rPt.css → icons.DFiHs25V.css} +1 -1
- package/app/_app/immutable/chunks/3dpUaAuL.js +1 -0
- package/app/_app/immutable/chunks/{BxyJ_Q7v.js → B7IsOdeU.js} +1 -1
- package/app/_app/immutable/chunks/{C26hsvAf.js → BErRmq61.js} +1 -1
- package/app/_app/immutable/chunks/BFzGVZ83.js +1 -0
- package/app/_app/immutable/chunks/{CUhs1G9L.js → BLDa0UGj.js} +1 -1
- package/app/_app/immutable/chunks/BMXU0KTB.js +1 -0
- package/app/_app/immutable/chunks/{D-G7Teh9.js → B_D0zDev.js} +1 -1
- package/app/_app/immutable/chunks/{DdoIOUTJ.js → BmSVFsOo.js} +2 -2
- package/app/_app/immutable/chunks/{CsaWd8kG.js → Bs5WxZDd.js} +1 -1
- package/app/_app/immutable/chunks/By9nPosf.js +1 -0
- package/app/_app/immutable/chunks/CB9iikrD.js +4 -0
- package/app/_app/immutable/chunks/{DJxCUhtq.js → CBxjHrPs.js} +1 -1
- package/app/_app/immutable/chunks/CO-Ek-HE.js +1 -0
- package/app/_app/immutable/chunks/{XqNh9vZm.js → COQfu_Wm.js} +1 -1
- package/app/_app/immutable/chunks/{Bxy7okxu.js → CQ3bytDT.js} +1 -1
- package/app/_app/immutable/chunks/{BA7oEUVv.js → CQOJdp0U.js} +1 -1
- package/app/_app/immutable/chunks/{YhY72Uhf.js → CT1UgNrl.js} +1 -1
- package/app/_app/immutable/chunks/{mzvl-05K.js → CrMrQCWf.js} +1 -1
- package/app/_app/immutable/chunks/{CMoev5sM.js → CwTLkgbW.js} +1 -1
- package/app/_app/immutable/chunks/{DgQFYubu.js → CyuTEXp6.js} +1 -1
- package/app/_app/immutable/chunks/CzqXjCHa.js +16 -0
- package/app/_app/immutable/chunks/DMDdJExi.js +10 -0
- package/app/_app/immutable/chunks/{CN11a3UB.js → DPbSjNti.js} +1 -1
- package/app/_app/immutable/chunks/{BpZyWfxI.js → DSKWzY3b.js} +2 -2
- package/app/_app/immutable/chunks/{Cv4-Km2e.js → DcYfN1RJ.js} +1 -1
- package/app/_app/immutable/chunks/KILEpkAY.js +26 -0
- package/app/_app/immutable/chunks/Uwmgg65i.js +1 -0
- package/app/_app/immutable/chunks/XcCBLn0p.js +2 -0
- package/app/_app/immutable/chunks/{CXgA0Uxg.js → aqYPhamJ.js} +1 -1
- package/app/_app/immutable/chunks/{BFJgNGCw.js → c4Y8im5f.js} +22 -22
- package/app/_app/immutable/chunks/{DnAGA0N-.js → gObjQOc6.js} +1 -1
- package/app/_app/immutable/chunks/{Cc_ZlCEA.js → jY83yXmZ.js} +1 -1
- package/app/_app/immutable/chunks/k-HWowNp.js +2 -0
- package/app/_app/immutable/entry/{app.C8ZDox8Z.js → app.BFvVYIAu.js} +2 -2
- package/app/_app/immutable/entry/start.CjnnBAhi.js +1 -0
- package/app/_app/immutable/nodes/0.BV0A9Ub7.js +7 -0
- package/app/_app/immutable/nodes/{1.BiH6Jnil.js → 1.B8lnDjjl.js} +1 -1
- package/app/_app/immutable/nodes/10.Dga6nV_M.js +3 -0
- package/app/_app/immutable/nodes/{11.DFy1XrHB.js → 11.SN8IoTqm.js} +1 -1
- package/app/_app/immutable/nodes/{12.1ZLx0UOF.js → 12.CmhheIVU.js} +1 -1
- package/app/_app/immutable/nodes/{13.XPn_VuBW.js → 13.Eh2aPgMP.js} +1 -1
- package/app/_app/immutable/nodes/14.ReLktgLz.js +1 -0
- package/app/_app/immutable/nodes/2.Dc32ZcWd.js +22 -0
- package/app/_app/immutable/nodes/{3.wBVp_ZTI.js → 3.CuIErDvM.js} +1 -1
- package/app/_app/immutable/nodes/{4.BlCuYUUW.js → 4.62S4SMa5.js} +1 -1
- package/app/_app/immutable/nodes/{5.CPPegUVU.js → 5.DZx2uQQp.js} +1 -1
- package/app/_app/immutable/nodes/{6.CJiT2vuV.js → 6.Dzh2j8Eu.js} +1 -1
- package/app/_app/immutable/nodes/7.BndE5mEj.js +1 -0
- package/app/_app/immutable/nodes/{8.CrS_Sgnk.js → 8.B79dJpLW.js} +1 -1
- package/app/_app/immutable/nodes/{9.DrSeLPdB.js → 9.Di1DpDGF.js} +1 -1
- package/app/_app/version.json +1 -1
- package/app/advanced-styles/index.html +24 -24
- package/app/ai/index.html +28 -28
- package/app/blueprint/index.html +22 -22
- package/app/cookbook/index.html +22 -22
- package/app/index.html +38 -40
- package/app/m/ads/AdDeliveryTier/index.html +27 -27
- package/app/m/ads/AdEvent/index.html +27 -27
- package/app/m/ads/AdFormat/index.html +27 -27
- package/app/m/ads/AdGroup/index.html +27 -27
- package/app/m/ads/AdVariation/index.html +27 -27
- package/app/m/analytics/AnalyticsDataStream/index.html +27 -27
- package/app/m/analytics/AnalyticsEvent/index.html +27 -27
- package/app/m/analytics/AnalyticsProperty/index.html +27 -27
- package/app/m/analytics/AnalyticsReport/index.html +27 -27
- package/app/m/approvals/ApprovalEvent/index.html +27 -27
- package/app/m/approvals/ApprovalPolicy/index.html +27 -27
- package/app/m/approvals/ApprovalRequest/index.html +27 -27
- package/app/m/assets/Asset/attachments/index.html +28 -28
- package/app/m/assets/Asset/index.html +27 -27
- package/app/m/assets/AssetAssociation/index.html +27 -27
- package/app/m/assets/AssetMetafield/index.html +27 -27
- package/app/m/assets/AssetStatus/index.html +27 -27
- package/app/m/assets/AssetType/index.html +27 -27
- package/app/m/assets/Folder/index.html +27 -27
- package/app/m/chat/AgentSession/index.html +27 -27
- package/app/m/chat/ChatMessage/index.html +27 -27
- package/app/m/chat/ChatParticipant/index.html +27 -27
- package/app/m/chat/ChatReaction/index.html +27 -27
- package/app/m/chat/ChatRoom/index.html +27 -27
- package/app/m/chat/ChatThread/index.html +27 -27
- package/app/m/chat/VoiceGatewayTurn/index.html +27 -27
- package/app/m/chat/VoiceSession/index.html +27 -27
- package/app/m/commerce/Agreement/index.html +27 -27
- package/app/m/commerce/Cart/index.html +27 -27
- package/app/m/commerce/Contract/index.html +27 -27
- package/app/m/commerce/ContractLineItem/index.html +27 -27
- package/app/m/commerce/Customer/index.html +27 -27
- package/app/m/commerce/DocumentTax/index.html +27 -27
- package/app/m/commerce/Estimate/index.html +27 -27
- package/app/m/commerce/Fulfillment/index.html +27 -27
- package/app/m/commerce/FulfillmentLineItem/index.html +27 -27
- package/app/m/commerce/HistoricalCustomerFunds/index.html +27 -27
- package/app/m/commerce/HistoricalCustomerFundsAllocation/index.html +27 -27
- package/app/m/commerce/HistoricalSalesLine/index.html +27 -27
- package/app/m/commerce/Invoice/index.html +27 -27
- package/app/m/commerce/InvoiceLineItem/index.html +27 -27
- package/app/m/commerce/Lease/index.html +27 -27
- package/app/m/commerce/LicenseSale/index.html +27 -27
- package/app/m/commerce/Order/index.html +27 -27
- package/app/m/commerce/Payment/index.html +27 -27
- package/app/m/commerce/PaymentAllocation/index.html +27 -27
- package/app/m/commerce/PaymentInstrument/index.html +27 -27
- package/app/m/commerce/PaymentIntent/index.html +27 -27
- package/app/m/commerce/Payout/index.html +27 -27
- package/app/m/commerce/ProductionOrder/index.html +27 -27
- package/app/m/commerce/PurchaseContract/index.html +27 -27
- package/app/m/commerce/PurchaseOrder/index.html +27 -27
- package/app/m/commerce/SalesContract/index.html +27 -27
- package/app/m/commerce/SupplierQuote/index.html +27 -27
- package/app/m/commerce/TaxCode/index.html +27 -27
- package/app/m/commerce/TaxComponent/index.html +27 -27
- package/app/m/commerce/TaxSettings/index.html +27 -27
- package/app/m/commerce/TaxSummaryReport/index.html +27 -27
- package/app/m/commerce/TenantPaymentAccount/index.html +27 -27
- package/app/m/commerce/Vendor/index.html +27 -27
- package/app/m/commerce/WholesaleOrder/index.html +27 -27
- package/app/m/content/Content/index.html +27 -27
- package/app/m/content/ContentContribution/index.html +27 -27
- package/app/m/content/ContentContributionAttachment/index.html +27 -27
- package/app/m/content/ContentContributionRevision/index.html +27 -27
- package/app/m/content/ContentContributionType/index.html +27 -27
- package/app/m/content/ContentContributor/index.html +27 -27
- package/app/m/content/ContentCorrection/index.html +27 -27
- package/app/m/content/ContentFeedSource/index.html +27 -27
- package/app/m/content/ContentGovernanceAssignment/index.html +27 -27
- package/app/m/content/ContentGovernancePolicy/index.html +27 -27
- package/app/m/content/ContentGovernanceProfile/index.html +27 -27
- package/app/m/content/ContentReference/index.html +27 -27
- package/app/m/content/ContentReview/index.html +27 -27
- package/app/m/content/ContentVersion/index.html +27 -27
- package/app/m/events/Event/index.html +27 -27
- package/app/m/events/EventParticipant/index.html +27 -27
- package/app/m/events/EventSeries/index.html +27 -27
- package/app/m/events/EventType/index.html +27 -27
- package/app/m/expenses/Expense/index.html +27 -27
- package/app/m/facts/Fact/index.html +27 -27
- package/app/m/facts/FactContent/index.html +27 -27
- package/app/m/facts/FactEvidence/index.html +27 -27
- package/app/m/facts/FactSource/index.html +27 -27
- package/app/m/facts/FactSubject/index.html +27 -27
- package/app/m/facts/FactTag/index.html +27 -27
- package/app/m/fields/FieldPolicy/index.html +27 -27
- package/app/m/fields/FieldPolicySuggestion/index.html +27 -27
- package/app/m/fields/FieldUsageCounter/index.html +27 -27
- package/app/m/images/Image/index.html +27 -27
- package/app/m/inventory/InventoryLocation/index.html +27 -27
- package/app/m/inventory/StockLevel/index.html +27 -27
- package/app/m/inventory/StockMovement/index.html +27 -27
- package/app/m/ledgers/Account/index.html +27 -27
- package/app/m/ledgers/Journal/index.html +27 -27
- package/app/m/ledgers/JournalEntry/index.html +27 -27
- package/app/m/ledgers/Ledger/index.html +27 -27
- package/app/m/manufacturing/Assembly/index.html +27 -27
- package/app/m/manufacturing/BillOfMaterials/index.html +27 -27
- package/app/m/manufacturing/BomLine/index.html +27 -27
- package/app/m/manufacturing/Operation/index.html +27 -27
- package/app/m/manufacturing/ProductionRun/index.html +27 -27
- package/app/m/manufacturing/ProductionRunCompletion/index.html +27 -27
- package/app/m/manufacturing/RoutingStep/index.html +27 -27
- package/app/m/marketing/Campaign/index.html +27 -27
- package/app/m/marketing/CampaignChannel/index.html +27 -27
- package/app/m/marketing/CampaignMetricSnapshot/index.html +27 -27
- package/app/m/messages/Account/index.html +27 -27
- package/app/m/messages/Attachment/index.html +27 -27
- package/app/m/messages/Blacklist/index.html +27 -27
- package/app/m/messages/Email/failed-sends/index.html +28 -28
- package/app/m/messages/Email/index.html +27 -27
- package/app/m/messages/Email/mailbox/index.html +28 -28
- package/app/m/messages/EmailAccount/index.html +27 -27
- package/app/m/messages/EmailAttachment/index.html +27 -27
- package/app/m/messages/EmailFolder/index.html +27 -27
- package/app/m/messages/Message/index.html +27 -27
- package/app/m/messages/MessagingEndpoint/index.html +27 -27
- package/app/m/messages/PersonaMessageRoute/index.html +27 -27
- package/app/m/messages/SlackAccount/index.html +27 -27
- package/app/m/messages/SlackMessage/index.html +27 -27
- package/app/m/messages/TelegramAccount/index.html +27 -27
- package/app/m/messages/Tweet/index.html +27 -27
- package/app/m/messages/TwitterAccount/index.html +27 -27
- package/app/m/messages/Whitelist/index.html +27 -27
- package/app/m/messages/ZulipAccount/index.html +27 -27
- package/app/m/places/Place/index.html +27 -27
- package/app/m/places/PlaceType/index.html +27 -27
- package/app/m/products/Category/index.html +27 -27
- package/app/m/products/Material/index.html +27 -27
- package/app/m/products/Product/index.html +27 -27
- package/app/m/products/Product/ingredients/index.html +28 -28
- package/app/m/products/ProductVariant/index.html +27 -27
- package/app/m/products/Sku/index.html +27 -27
- package/app/m/profiles/ApiKey/index.html +27 -27
- package/app/m/profiles/Bot/index.html +27 -27
- package/app/m/profiles/MagicLinkToken/index.html +27 -27
- package/app/m/profiles/NostrIdentity/index.html +27 -27
- package/app/m/profiles/OidcIdentity/index.html +27 -27
- package/app/m/profiles/Organization/index.html +27 -27
- package/app/m/profiles/Person/index.html +27 -27
- package/app/m/profiles/Profile/index.html +27 -27
- package/app/m/profiles/ProfileMetadata/index.html +27 -27
- package/app/m/profiles/ProfileMetafield/index.html +27 -27
- package/app/m/profiles/ProfileRelationship/index.html +27 -27
- package/app/m/profiles/ProfileRelationshipTerm/index.html +27 -27
- package/app/m/profiles/ProfileRelationshipType/index.html +27 -27
- package/app/m/profiles/ProfileType/index.html +27 -27
- package/app/m/projects/Comment/index.html +27 -27
- package/app/m/projects/Issue/index.html +27 -27
- package/app/m/projects/Label/index.html +27 -27
- package/app/m/projects/Project/index.html +27 -27
- package/app/m/projects/ProjectIntegration/index.html +27 -27
- package/app/m/projects/PullRequest/index.html +27 -27
- package/app/m/projects/Repository/index.html +27 -27
- package/app/m/properties/Property/index.html +27 -27
- package/app/m/properties/Zone/index.html +27 -27
- package/app/m/reports/RuntimeReport/index.html +27 -27
- package/app/m/reports/SmrtPrincipalReportRefreshTask/index.html +27 -27
- package/app/m/reports/SmrtReportLock/index.html +27 -27
- package/app/m/reports/SmrtReportRefreshTask/index.html +27 -27
- package/app/m/reports/SmrtReportRun/index.html +27 -27
- package/app/m/reports/SmrtReportSchedule/index.html +27 -27
- package/app/m/reports/SmrtReportWatermark/index.html +27 -27
- package/app/m/sales/Agreement/index.html +27 -27
- package/app/m/sales/AttributionException/index.html +27 -27
- package/app/m/sales/AttributionPolicy/index.html +27 -27
- package/app/m/sales/Commission/index.html +27 -27
- package/app/m/sales/CommissionAdjustment/index.html +27 -27
- package/app/m/sales/CommissionPayout/index.html +27 -27
- package/app/m/sales/CommissionPlan/index.html +27 -27
- package/app/m/sales/Earner/index.html +27 -27
- package/app/m/sales/EarnerSourceAttribution/index.html +27 -27
- package/app/m/sales/EarningEvent/index.html +27 -27
- package/app/m/sales/ExecutedAgreement/index.html +27 -27
- package/app/m/sales/Lead/index.html +27 -27
- package/app/m/sales/Opportunity/index.html +27 -27
- package/app/m/sales/OpportunityConversion/index.html +27 -27
- package/app/m/sales/PipelineDefinition/index.html +27 -27
- package/app/m/sales/PipelineStage/index.html +27 -27
- package/app/m/sales/Referral/index.html +27 -27
- package/app/m/sales/ReferralAgreement/index.html +27 -27
- package/app/m/sales/ReferralLink/index.html +27 -27
- package/app/m/sales/ReferralProgram/index.html +27 -27
- package/app/m/sales/ReferralTermSnapshot/index.html +27 -27
- package/app/m/sales/ReferralTouch/index.html +27 -27
- package/app/m/sales/Referrer/index.html +27 -27
- package/app/m/sales/SalesActivity/index.html +27 -27
- package/app/m/sales/SalesRepresentative/index.html +27 -27
- package/app/m/sites/Site/index.html +27 -27
- package/app/m/sites/SiteAgentBinding/index.html +27 -27
- package/app/m/social/OAuthState/index.html +27 -27
- package/app/m/social/SocialAccount/index.html +27 -27
- package/app/m/social/SocialPost/index.html +27 -27
- package/app/m/social/SocialPostAnalyticsSnapshot/index.html +27 -27
- package/app/m/subscriptions/BillingAdjustment/index.html +27 -27
- package/app/m/subscriptions/ClientCharge/index.html +27 -27
- package/app/m/subscriptions/CreditGrant/index.html +27 -27
- package/app/m/subscriptions/PricingRule/index.html +27 -27
- package/app/m/subscriptions/RetailCharge/index.html +27 -27
- package/app/m/subscriptions/SpendingPolicy/index.html +27 -27
- package/app/m/subscriptions/SubscriptionPlan/index.html +27 -27
- package/app/m/subscriptions/SubscriptionPlanVersion/index.html +27 -27
- package/app/m/subscriptions/TenantSubscription/index.html +27 -27
- package/app/m/subscriptions/TenantUsageMetric/index.html +27 -27
- package/app/m/support/ServiceTimeEntry/index.html +27 -27
- package/app/m/support/SupportAiRun/index.html +27 -27
- package/app/m/support/SupportAvailability/index.html +27 -27
- package/app/m/support/SupportCase/index.html +27 -27
- package/app/m/support/SupportCaseEvent/index.html +27 -27
- package/app/m/support/SupportChannelBinding/index.html +27 -27
- package/app/m/support/SupportCharge/index.html +27 -27
- package/app/m/support/SupportCompensation/index.html +27 -27
- package/app/m/support/SupportCompensationPlan/index.html +27 -27
- package/app/m/support/SupportEscalation/index.html +27 -27
- package/app/m/support/SupportInteraction/index.html +27 -27
- package/app/m/support/SupportPlan/index.html +27 -27
- package/app/m/support/SupportPolicy/index.html +27 -27
- package/app/m/support/SupportQualification/index.html +27 -27
- package/app/m/support/SupportServiceTarget/index.html +27 -27
- package/app/m/support/SupportSpecialist/index.html +27 -27
- package/app/m/support/SupportWorkLink/index.html +27 -27
- package/app/m/tags/Tag/index.html +27 -27
- package/app/m/tags/TagAlias/index.html +27 -27
- package/app/m/timesheets/AttendanceBreak/index.html +27 -27
- package/app/m/timesheets/AttendancePunch/index.html +27 -27
- package/app/m/timesheets/AttendanceSegment/index.html +27 -27
- package/app/m/timesheets/ServiceChargeSnapshot/index.html +27 -27
- package/app/m/timesheets/ServiceCompensationSnapshot/index.html +27 -27
- package/app/m/timesheets/ServiceTimeEntry/index.html +27 -27
- package/app/m/users/Group/index.html +27 -27
- package/app/m/users/GroupMember/index.html +27 -27
- package/app/m/users/GroupRole/index.html +27 -27
- package/app/m/users/Membership/index.html +27 -27
- package/app/m/users/MembershipOverride/index.html +27 -27
- package/app/m/users/Permission/index.html +27 -27
- package/app/m/users/Role/index.html +27 -27
- package/app/m/users/RolePermission/index.html +27 -27
- package/app/m/users/Session/index.html +27 -27
- package/app/m/users/Tenant/index.html +27 -27
- package/app/m/users/TenantIntegration/index.html +27 -27
- package/app/m/users/TenantPermissionOverride/index.html +27 -27
- package/app/m/users/User/index.html +27 -27
- package/app/m/video/Character/index.html +27 -27
- package/app/m/video/CharacterAsset/index.html +27 -27
- package/app/m/video/CompositeJob/index.html +27 -27
- package/app/m/video/Performer/index.html +27 -27
- package/app/m/video/PerformerAsset/index.html +27 -27
- package/app/m/video/Scene/index.html +27 -27
- package/app/m/video/SceneAsset/index.html +27 -27
- package/app/m/video/VideoComposition/index.html +27 -27
- package/app/m/video/VideoCompositionAsset/index.html +27 -27
- package/app/m/video/VideoSequence/index.html +27 -27
- package/app/m/video/VideoSequenceAsset/index.html +27 -27
- package/app/m/video/VideoShot/index.html +27 -27
- package/app/m/video/VideoShotAsset/index.html +27 -27
- package/app/m/video/VideoShotCharacter/index.html +27 -27
- package/app/m/video/VideoWorkflow/index.html +27 -27
- package/app/m/voice/VoiceOutput/index.html +27 -27
- package/app/m/voice/VoiceProfile/index.html +27 -27
- package/app/m/voice/VoiceSample/index.html +27 -27
- package/app/mcp.html +2 -2
- package/app/packages/ads/index.html +24 -24
- package/app/packages/analytics/index.html +24 -24
- package/app/packages/approvals/index.html +24 -24
- package/app/packages/assets/index.html +24 -24
- package/app/packages/chat/index.html +24 -24
- package/app/packages/comments/index.html +24 -24
- package/app/packages/commerce/index.html +24 -24
- package/app/packages/content/index.html +24 -24
- package/app/packages/events/index.html +24 -24
- package/app/packages/expenses/index.html +24 -24
- package/app/packages/facts/index.html +24 -24
- package/app/packages/fields/index.html +24 -24
- package/app/packages/human-resources/index.html +24 -24
- package/app/packages/images/index.html +24 -24
- package/app/packages/index.html +23 -23
- package/app/packages/ingestion/index.html +24 -24
- package/app/packages/inventory/index.html +24 -24
- package/app/packages/ledgers/index.html +24 -24
- package/app/packages/manufacturing/index.html +24 -24
- package/app/packages/marketing/index.html +24 -24
- package/app/packages/messages/index.html +24 -24
- package/app/packages/places/index.html +24 -24
- package/app/packages/preferences/index.html +24 -24
- package/app/packages/products/index.html +24 -24
- package/app/packages/profiles/index.html +24 -24
- package/app/packages/projects/index.html +24 -24
- package/app/packages/properties/index.html +24 -24
- package/app/packages/reports/index.html +24 -24
- package/app/packages/sales/index.html +24 -24
- package/app/packages/sites/index.html +24 -24
- package/app/packages/social/index.html +24 -24
- package/app/packages/subscriptions/index.html +24 -24
- package/app/packages/support/index.html +24 -24
- package/app/packages/tags/index.html +24 -24
- package/app/packages/timesheets/index.html +24 -24
- package/app/packages/users/index.html +24 -24
- package/app/packages/video/index.html +24 -24
- package/app/packages/voice/index.html +24 -24
- package/app/packages/webhooks/index.html +24 -24
- package/app/recipes/account-access/help/index.html +24 -24
- package/app/recipes/account-access/index.html +26 -26
- package/app/recipes/activity/help/index.html +24 -24
- package/app/recipes/activity/index.html +26 -26
- package/app/recipes/agreements/help/index.html +24 -24
- package/app/recipes/agreements/index.html +26 -26
- package/app/recipes/analytics.reports/help/index.html +24 -24
- package/app/recipes/analytics.reports/index.html +26 -26
- package/app/recipes/assets/help/index.html +24 -24
- package/app/recipes/assets/index.html +26 -26
- package/app/recipes/billing/help/index.html +24 -24
- package/app/recipes/billing/index.html +26 -26
- package/app/recipes/chat.assistant/help/index.html +24 -24
- package/app/recipes/chat.assistant/index.html +26 -26
- package/app/recipes/comments/help/index.html +24 -24
- package/app/recipes/comments/index.html +26 -26
- package/app/recipes/commerce.customers/help/index.html +24 -24
- package/app/recipes/commerce.customers/index.html +26 -26
- package/app/recipes/commerce.estimates/help/index.html +24 -24
- package/app/recipes/commerce.estimates/index.html +26 -26
- package/app/recipes/commerce.purchases/help/index.html +24 -24
- package/app/recipes/commerce.purchases/index.html +26 -26
- package/app/recipes/commerce.sales/help/index.html +24 -24
- package/app/recipes/commerce.sales/index.html +26 -26
- package/app/recipes/commerce.vendors/help/index.html +24 -24
- package/app/recipes/commerce.vendors/index.html +26 -26
- package/app/recipes/commerce.wholesale/help/index.html +24 -24
- package/app/recipes/commerce.wholesale/index.html +26 -26
- package/app/recipes/events.calendar/help/index.html +24 -24
- package/app/recipes/events.calendar/index.html +26 -26
- package/app/recipes/expenses.tracking/help/index.html +24 -24
- package/app/recipes/expenses.tracking/index.html +26 -26
- package/app/recipes/fields.form-customization/help/index.html +24 -24
- package/app/recipes/fields.form-customization/index.html +26 -26
- package/app/recipes/ingestion/help/index.html +24 -24
- package/app/recipes/ingestion/index.html +26 -26
- package/app/recipes/integrations/help/index.html +24 -24
- package/app/recipes/integrations/index.html +26 -26
- package/app/recipes/inventory.stock/help/index.html +24 -24
- package/app/recipes/inventory.stock/index.html +26 -26
- package/app/recipes/ledgers.bookkeeping/help/index.html +24 -24
- package/app/recipes/ledgers.bookkeeping/index.html +26 -26
- package/app/recipes/messages/help/index.html +24 -24
- package/app/recipes/messages/index.html +26 -26
- package/app/recipes/products/help/index.html +24 -24
- package/app/recipes/products/index.html +26 -26
- package/app/recipes/projects.tracker/help/index.html +24 -24
- package/app/recipes/projects.tracker/index.html +26 -26
- package/app/recipes/reports.materialized/help/index.html +24 -24
- package/app/recipes/reports.materialized/index.html +26 -26
- package/app/recipes/reports.runtime/help/index.html +24 -24
- package/app/recipes/reports.runtime/index.html +26 -26
- package/app/recipes/sales.pipeline/help/index.html +24 -24
- package/app/recipes/sales.pipeline/index.html +26 -26
- package/app/recipes/tags.taxonomy/help/index.html +24 -24
- package/app/recipes/tags.taxonomy/index.html +26 -26
- package/app/recipes/team-collaboration/help/index.html +24 -24
- package/app/recipes/team-collaboration/index.html +26 -26
- package/app/recipes/timesheets.time-entries/help/index.html +24 -24
- package/app/recipes/timesheets.time-entries/index.html +26 -26
- package/app/s/custom-accounts/index.html +23 -23
- package/app/s/custom-appointments/index.html +23 -23
- package/app/s/custom-billing/index.html +23 -23
- package/app/s/custom-bookings/index.html +23 -23
- package/app/s/custom-buying/index.html +23 -23
- package/app/s/custom-checkout/index.html +23 -23
- package/app/s/custom-classes/index.html +23 -23
- package/app/s/custom-clients/index.html +23 -23
- package/app/s/custom-events/index.html +23 -23
- package/app/s/custom-fleet/index.html +23 -23
- package/app/s/custom-gigs/index.html +23 -23
- package/app/s/custom-giving/index.html +23 -23
- package/app/s/custom-instruments/index.html +23 -23
- package/app/s/custom-jobs/index.html +23 -23
- package/app/s/custom-kitchen/index.html +23 -23
- package/app/s/custom-lessons/index.html +23 -23
- package/app/s/custom-material/index.html +23 -23
- package/app/s/custom-meetings/index.html +23 -23
- package/app/s/custom-members/index.html +23 -23
- package/app/s/custom-merch/index.html +23 -23
- package/app/s/custom-money/index.html +23 -23
- package/app/s/custom-paint/index.html +23 -23
- package/app/s/custom-parts/index.html +23 -23
- package/app/s/custom-rentals/index.html +23 -23
- package/app/s/custom-roastery/index.html +23 -23
- package/app/s/custom-schedule/index.html +23 -23
- package/app/s/custom-shelf/index.html +23 -23
- package/app/s/custom-shop/index.html +23 -23
- package/app/s/custom-students/index.html +23 -23
- package/app/s/custom-wholesale/index.html +23 -23
- package/app/s/custom-work/index.html +23 -23
- package/app/s/custom-yard/index.html +23 -23
- package/app/s/section-access-control/index.html +23 -23
- package/app/s/section-account-security/index.html +23 -23
- package/app/s/section-accounting/index.html +23 -23
- package/app/s/section-activity/index.html +23 -23
- package/app/s/section-agreements/index.html +23 -23
- package/app/s/section-analytics/index.html +23 -23
- package/app/s/section-assets/index.html +23 -23
- package/app/s/section-billing/index.html +23 -23
- package/app/s/section-calendar/index.html +23 -23
- package/app/s/section-catalog/index.html +23 -23
- package/app/s/section-chat.assistant/index.html +23 -23
- package/app/s/section-comments/index.html +23 -23
- package/app/s/section-fields.form-customization/index.html +23 -23
- package/app/s/section-ingestion/index.html +23 -23
- package/app/s/section-integrations/index.html +23 -23
- package/app/s/section-messages/index.html +23 -23
- package/app/s/section-more/index.html +23 -23
- package/app/s/section-operations/index.html +23 -23
- package/app/s/section-projects/index.html +23 -23
- package/app/s/section-purchasing/index.html +23 -23
- package/app/s/section-reports.materialized/index.html +23 -23
- package/app/s/section-reports.runtime/index.html +23 -23
- package/app/s/section-sales/index.html +23 -23
- package/app/s/section-taxonomy/index.html +23 -23
- package/app/s/section-team/index.html +23 -23
- package/app/s/section-work/index.html +23 -23
- package/dist/ai/instance.d.ts.map +1 -1
- package/dist/ai/instance.js +2 -0
- package/dist/assistant/change.d.ts +2 -0
- package/dist/assistant/change.d.ts.map +1 -1
- package/dist/assistant/change.js +5 -0
- package/dist/assistant/coaching.d.ts +7 -0
- package/dist/assistant/coaching.d.ts.map +1 -0
- package/dist/assistant/coaching.js +42 -0
- package/dist/assistant/prompt.d.ts.map +1 -1
- package/dist/assistant/prompt.js +1 -0
- package/dist/assistant/session.svelte.d.ts +4 -1
- package/dist/assistant/session.svelte.d.ts.map +1 -1
- package/dist/assistant/session.svelte.js +5 -1
- package/dist/assistant/starters.d.ts +7 -0
- package/dist/assistant/starters.d.ts.map +1 -0
- package/dist/assistant/starters.js +33 -0
- package/dist/assistant/transport.d.ts +37 -2
- package/dist/assistant/transport.d.ts.map +1 -1
- package/dist/assistant/transport.js +257 -56
- package/dist/catalog/catalog.json +38 -38
- package/dist/components/BrowserAssistant.svelte +20 -0
- package/dist/components/BrowserAssistant.svelte.d.ts.map +1 -1
- package/dist/components/ExportPanel.svelte +176 -118
- package/dist/components/ExportPanel.svelte.d.ts +8 -0
- package/dist/components/ExportPanel.svelte.d.ts.map +1 -1
- package/dist/components/HeaderIconLink.svelte +8 -0
- package/dist/components/HeaderIconLink.svelte.d.ts +1 -0
- package/dist/components/HeaderIconLink.svelte.d.ts.map +1 -1
- package/dist/components/ProjectControls.svelte +133 -0
- package/dist/components/ProjectControls.svelte.d.ts +15 -0
- package/dist/components/ProjectControls.svelte.d.ts.map +1 -0
- package/dist/components/SectionOverview.svelte +4 -5
- package/dist/components/SectionOverview.svelte.d.ts +1 -1
- package/dist/components/SectionOverview.svelte.d.ts.map +1 -1
- package/dist/components/SettingsPanel.svelte +37 -1
- package/dist/components/SettingsPanel.svelte.d.ts +7 -1
- package/dist/components/SettingsPanel.svelte.d.ts.map +1 -1
- package/dist/cookbook/file.d.ts +5 -0
- package/dist/cookbook/file.d.ts.map +1 -1
- package/dist/cookbook/file.js +9 -2
- package/dist/cookbook/store.svelte.d.ts +4 -1
- package/dist/cookbook/store.svelte.d.ts.map +1 -1
- package/dist/cookbook/store.svelte.js +9 -10
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -0
- package/dist/core/prompt.d.ts.map +1 -1
- package/dist/core/prompt.js +10 -0
- package/dist/core/reply.d.ts +2 -0
- package/dist/core/reply.d.ts.map +1 -1
- package/dist/core/reply.js +4 -0
- package/dist/data/packs.d.ts.map +1 -1
- package/dist/data/packs.js +14 -7
- package/dist/data/planner-source.d.ts.map +1 -1
- package/dist/data/planner-source.js +4 -3
- package/dist/data/sample-context.d.ts +84 -0
- package/dist/data/sample-context.d.ts.map +1 -0
- package/dist/data/sample-context.js +106 -0
- package/dist/data/source.d.ts.map +1 -1
- package/dist/data/source.js +2 -0
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/library/state.svelte.d.ts.map +1 -1
- package/dist/library/state.svelte.js +3 -3
- package/dist/overviews/definitions.d.ts +2 -2
- package/dist/overviews/definitions.d.ts.map +1 -1
- package/dist/overviews/definitions.js +19 -31
- package/dist/overviews/page.d.ts.map +1 -1
- package/dist/overviews/page.js +4 -1
- package/dist/overviews/registry.d.ts +1 -1
- package/dist/overviews/registry.js +3 -3
- package/dist/overviews/validate.d.ts.map +1 -1
- package/dist/overviews/validate.js +15 -2
- package/dist/planner/Planner.svelte +46 -4
- package/dist/planner/Planner.svelte.d.ts.map +1 -1
- package/dist/planner/PlannerControls.svelte +18 -2
- package/dist/planner/PlannerControls.svelte.d.ts +2 -0
- package/dist/planner/PlannerControls.svelte.d.ts.map +1 -1
- package/dist/planner/PlannerHostAction.svelte +61 -0
- package/dist/planner/PlannerHostAction.svelte.d.ts +12 -0
- package/dist/planner/PlannerHostAction.svelte.d.ts.map +1 -0
- package/dist/planner/PlannerLifecycle.svelte +75 -5
- package/dist/planner/PlannerLifecycle.svelte.d.ts +2 -1
- package/dist/planner/PlannerLifecycle.svelte.d.ts.map +1 -1
- package/dist/planner/bridge.d.ts +73 -0
- package/dist/planner/bridge.d.ts.map +1 -0
- package/dist/planner/bridge.js +303 -0
- package/dist/planner/commands/adapter.d.ts +2 -0
- package/dist/planner/commands/adapter.d.ts.map +1 -1
- package/dist/planner/commands/adapter.js +19 -0
- package/dist/planner/export-context.d.ts +6 -0
- package/dist/planner/export-context.d.ts.map +1 -0
- package/dist/planner/export-context.js +14 -0
- package/dist/planner/guide.d.ts +69 -0
- package/dist/planner/guide.d.ts.map +1 -0
- package/dist/planner/guide.js +115 -0
- package/dist/planner/host-reply.d.ts +22 -0
- package/dist/planner/host-reply.d.ts.map +1 -0
- package/dist/planner/host-reply.js +71 -0
- package/dist/planner/shell.d.ts +6 -0
- package/dist/planner/shell.d.ts.map +1 -1
- package/dist/planner/shell.js +2 -0
- package/dist/planner/types.d.ts +39 -1
- package/dist/planner/types.d.ts.map +1 -1
- package/dist/planner/workspace-storage.d.ts +29 -0
- package/dist/planner/workspace-storage.d.ts.map +1 -0
- package/dist/planner/workspace-storage.js +355 -0
- package/dist/planner/workspace.svelte.d.ts +19 -0
- package/dist/planner/workspace.svelte.d.ts.map +1 -0
- package/dist/planner/workspace.svelte.js +52 -0
- package/dist/smrt-version.d.ts +1 -1
- package/dist/smrt-version.js +1 -1
- package/package.json +54 -54
- package/app/_app/immutable/assets/2.CdEXvRg0.css +0 -1
- package/app/_app/immutable/assets/AppShell.BkKNrxND.css +0 -1
- package/app/_app/immutable/chunks/B2hfN2VL.js +0 -10
- package/app/_app/immutable/chunks/BFBrKYIZ.js +0 -26
- package/app/_app/immutable/chunks/BPIRT1pR.js +0 -4
- package/app/_app/immutable/chunks/Cq7I_-C0.js +0 -1
- package/app/_app/immutable/chunks/Cye6FWwy.js +0 -1
- package/app/_app/immutable/chunks/D0ibYqDu.js +0 -2
- package/app/_app/immutable/chunks/D71UrO5c.js +0 -1
- package/app/_app/immutable/chunks/DF-0MxNw.js +0 -1
- package/app/_app/immutable/chunks/DN0-Cx7Y.js +0 -1
- package/app/_app/immutable/chunks/DS1ApqxJ.js +0 -16
- package/app/_app/immutable/chunks/DSxP4IQt.js +0 -1
- package/app/_app/immutable/chunks/Dx1VzWCD.js +0 -2
- package/app/_app/immutable/entry/start.Dg2NiCvD.js +0 -1
- package/app/_app/immutable/nodes/0.DE5huPD8.js +0 -7
- package/app/_app/immutable/nodes/10.C_KB8ejn.js +0 -3
- package/app/_app/immutable/nodes/14.Ercp5Yal.js +0 -1
- package/app/_app/immutable/nodes/2.D_BYCG3U.js +0 -24
- package/app/_app/immutable/nodes/7.-bKoHvi1.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/lib/assistant/transport.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/lib/assistant/transport.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ASSISTANT_QUESTION_KIND, matchAssistantQuestionText, validateAssistantQuestionAnswer, } from '@happyvertical/smrt-chat/svelte';
|
|
2
2
|
import { resolveRuntimeReportTimeRange } from '@happyvertical/smrt-reports/spec';
|
|
3
|
+
import { applySampleContext } from "../data/sample-context.js";
|
|
3
4
|
import { createSliceController, } from "../planner/commands/index.js";
|
|
4
5
|
import { sourceFollowUp, whichSourceQuestion, } from "../reports/intent.js";
|
|
5
6
|
import { buildResponseSchema, describeChange, parseChange, } from "./change.js";
|
|
7
|
+
import { appliedCoaching } from "./coaching.js";
|
|
6
8
|
import { buildMatchIndex, matchText } from "./match.js";
|
|
7
9
|
import { buildSystemPrompt, REPORTS_RECIPE, } from "./prompt.js";
|
|
8
10
|
const THREAD_TITLE = 'Plan your app';
|
|
@@ -27,8 +29,10 @@ const runSummary = (controller, name, input) => runCommand(controller, name, inp
|
|
|
27
29
|
*/
|
|
28
30
|
function runCommands(controller, calls) {
|
|
29
31
|
const lines = [];
|
|
32
|
+
const results = [];
|
|
30
33
|
for (const call of calls) {
|
|
31
34
|
const result = controller.run(call);
|
|
35
|
+
results.push(result);
|
|
32
36
|
if (!result.ok) {
|
|
33
37
|
lines.push(`The server's ${call.name} was refused: ${result.error.message}`);
|
|
34
38
|
break;
|
|
@@ -36,7 +40,7 @@ function runCommands(controller, calls) {
|
|
|
36
40
|
if (result.receipt.summary)
|
|
37
41
|
lines.push(result.receipt.summary);
|
|
38
42
|
}
|
|
39
|
-
return lines.join(' ');
|
|
43
|
+
return { summary: lines.join(' '), results };
|
|
40
44
|
}
|
|
41
45
|
/** Said when a turn changed nothing and the model's sentence was not a question. */
|
|
42
46
|
export const NOTHING_CHANGED = 'Nothing in the app changed.';
|
|
@@ -228,7 +232,32 @@ export function createBrowserAssistantTransport(options) {
|
|
|
228
232
|
};
|
|
229
233
|
const messages = [];
|
|
230
234
|
const seen = new Map();
|
|
235
|
+
const seeds = new Set();
|
|
236
|
+
const listeners = new Set();
|
|
237
|
+
let busy = false;
|
|
238
|
+
let sent = false;
|
|
239
|
+
let generation = 0;
|
|
240
|
+
const conversation = () => structuredClone(messages);
|
|
241
|
+
const persist = () => {
|
|
242
|
+
try {
|
|
243
|
+
options.conversationStorage?.setItem('smrt-planner:conversation:v1', JSON.stringify({ version: 1, messages, sent, counter }));
|
|
244
|
+
options.conversationStorage?.setItem('smrt-planner:conversation-seed:v1', JSON.stringify([...seeds]));
|
|
245
|
+
}
|
|
246
|
+
catch {
|
|
247
|
+
/* A blocked or full browser store must not break a turn. */
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
const notify = () => {
|
|
251
|
+
persist();
|
|
252
|
+
for (const listener of listeners)
|
|
253
|
+
listener(conversation());
|
|
254
|
+
};
|
|
255
|
+
const cookbooksForTurn = () => typeof options.cookbooks === 'function'
|
|
256
|
+
? options.cookbooks()
|
|
257
|
+
: (options.cookbooks ?? []);
|
|
231
258
|
let controller = null;
|
|
259
|
+
const owns = (operation) => operation.epoch === generation && controller === operation.controller;
|
|
260
|
+
const active = (operation) => owns(operation) && !operation.controller.signal.aborted;
|
|
232
261
|
/**
|
|
233
262
|
* The report follow-up waiting for an answer: the intent so far, the
|
|
234
263
|
* question asked (its options from the source descriptor), and the words
|
|
@@ -242,8 +271,10 @@ export function createBrowserAssistantTransport(options) {
|
|
|
242
271
|
* identical question twice is never done: the sensible default is taken
|
|
243
272
|
* and the reply says so.
|
|
244
273
|
*/
|
|
245
|
-
async function buildReport(reports, intent, text, previous) {
|
|
274
|
+
async function buildReport(reports, intent, text, previous, current) {
|
|
246
275
|
const defined = await reports.define(intent, text);
|
|
276
|
+
if (!current())
|
|
277
|
+
return { added: [], text: 'Stopped.' };
|
|
247
278
|
if (defined.ok) {
|
|
248
279
|
pending = null;
|
|
249
280
|
// Reports must be on to keep the report; turning it on is a command
|
|
@@ -269,7 +300,9 @@ export function createBrowserAssistantTransport(options) {
|
|
|
269
300
|
if (previous && sameFollowUp(previous, followUp)) {
|
|
270
301
|
const pick = followUp.options.find((o) => o.value === followUp.default);
|
|
271
302
|
if (pick) {
|
|
272
|
-
const next = await buildReport(reports, mergeIntent(intent, pick.apply), text, followUp);
|
|
303
|
+
const next = await buildReport(reports, mergeIntent(intent, pick.apply), text, followUp, current);
|
|
304
|
+
if (!current())
|
|
305
|
+
return { added: [], text: 'Stopped.' };
|
|
273
306
|
return { ...next, text: `I went with ${pick.label}. ${next.text}` };
|
|
274
307
|
}
|
|
275
308
|
}
|
|
@@ -284,11 +317,13 @@ export function createBrowserAssistantTransport(options) {
|
|
|
284
317
|
return followUp.options.find((o) => o.value === value);
|
|
285
318
|
}
|
|
286
319
|
/** Continue a pending report with a picked option, with no model turn. */
|
|
287
|
-
async function answerPending(reports, option, reply
|
|
320
|
+
async function answerPending(reports, option, reply, isCurrent) {
|
|
288
321
|
const current = pending;
|
|
289
322
|
if (!current)
|
|
290
323
|
return { content: '' };
|
|
291
|
-
const built = await buildReport(reports, mergeIntent(current.intent, option.apply), `${current.text} ${reply}`.trim(), current.followUp);
|
|
324
|
+
const built = await buildReport(reports, mergeIntent(current.intent, option.apply), `${current.text} ${reply}`.trim(), current.followUp, isCurrent);
|
|
325
|
+
if (!isCurrent())
|
|
326
|
+
return { content: 'Stopped.' };
|
|
292
327
|
const content = [
|
|
293
328
|
describeChange({ added: built.added, removed: [], kept: [] }, options.recipes),
|
|
294
329
|
built.text,
|
|
@@ -302,7 +337,7 @@ export function createBrowserAssistantTransport(options) {
|
|
|
302
337
|
const reportsHost = () => options.recipes.some((r) => r.id === REPORTS_RECIPE)
|
|
303
338
|
? (options.reports?.() ?? null)
|
|
304
339
|
: null;
|
|
305
|
-
const push = (role, content, clientRequestId, toolCallData) => {
|
|
340
|
+
const push = (role, content, clientRequestId, toolCallData, notifyChange = true) => {
|
|
306
341
|
const message = {
|
|
307
342
|
id: id('m'),
|
|
308
343
|
threadId: thread.id,
|
|
@@ -316,6 +351,8 @@ export function createBrowserAssistantTransport(options) {
|
|
|
316
351
|
messages.push(message);
|
|
317
352
|
thread.messageCount = messages.length;
|
|
318
353
|
thread.lastMessageAt = message.createdAt;
|
|
354
|
+
if (notifyChange)
|
|
355
|
+
notify();
|
|
319
356
|
return message;
|
|
320
357
|
};
|
|
321
358
|
const planner = options.controller ??
|
|
@@ -324,11 +361,87 @@ export function createBrowserAssistantTransport(options) {
|
|
|
324
361
|
settings: options.settings,
|
|
325
362
|
theme: options.theme,
|
|
326
363
|
});
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
364
|
+
let greeting = push('assistant', GREETING, undefined, undefined, false);
|
|
365
|
+
try {
|
|
366
|
+
const raw = options.conversationStorage?.getItem('smrt-planner:conversation:v1');
|
|
367
|
+
const stored = raw && raw.length <= 2_000_000 ? JSON.parse(raw) : null;
|
|
368
|
+
if (stored?.version === 1 &&
|
|
369
|
+
Array.isArray(stored.messages) &&
|
|
370
|
+
stored.messages.length <= 2000 &&
|
|
371
|
+
stored.messages.every((m) => m &&
|
|
372
|
+
typeof m.id === 'string' &&
|
|
373
|
+
['user', 'assistant'].includes(m.role) &&
|
|
374
|
+
typeof m.content === 'string' &&
|
|
375
|
+
m.content.length <= 100_000) &&
|
|
376
|
+
Number.isSafeInteger(stored.counter) &&
|
|
377
|
+
stored.counter >= stored.messages.length &&
|
|
378
|
+
typeof stored.sent === 'boolean') {
|
|
379
|
+
messages.splice(0, messages.length, ...structuredClone(stored.messages));
|
|
380
|
+
counter = stored.counter;
|
|
381
|
+
sent = stored.sent;
|
|
382
|
+
greeting = messages[0] ?? push('assistant', GREETING);
|
|
383
|
+
const ids = JSON.parse(options.conversationStorage?.getItem('smrt-planner:conversation-seed:v1') ?? '[]');
|
|
384
|
+
if (Array.isArray(ids) &&
|
|
385
|
+
ids.length <= 2000 &&
|
|
386
|
+
ids.every((value) => typeof value === 'string' && value.length <= 200))
|
|
387
|
+
for (const value of ids)
|
|
388
|
+
seeds.add(value);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
catch {
|
|
392
|
+
/* Invalid saved data carries no authority and is ignored. */
|
|
393
|
+
}
|
|
394
|
+
async function send(input, host) {
|
|
395
|
+
const cached = seen.get(input.clientRequestId);
|
|
396
|
+
if (cached)
|
|
397
|
+
return cached;
|
|
398
|
+
if (busy)
|
|
399
|
+
throw new Error('The assistant is still answering.');
|
|
400
|
+
sent = true;
|
|
401
|
+
busy = true;
|
|
402
|
+
const operation = { epoch: generation, controller: new AbortController() };
|
|
403
|
+
controller = operation.controller;
|
|
404
|
+
try {
|
|
405
|
+
const userMessage = push('user', input.content, input.clientRequestId);
|
|
406
|
+
let reply = null;
|
|
407
|
+
if (!host && options.hostTurn) {
|
|
408
|
+
try {
|
|
409
|
+
reply = await options.hostTurn({
|
|
410
|
+
userMessage: structuredClone(userMessage),
|
|
411
|
+
conversation: conversation(),
|
|
412
|
+
signal: operation.controller.signal,
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
catch {
|
|
416
|
+
reply = {
|
|
417
|
+
content: 'Your request could not be confirmed. Please retry the same request.',
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
if (!owns(operation))
|
|
421
|
+
return { inProgress: false };
|
|
422
|
+
if (operation.controller.signal.aborted)
|
|
423
|
+
reply = { content: 'Stopped.' };
|
|
424
|
+
}
|
|
425
|
+
reply ??= await turn(input.content, operation);
|
|
426
|
+
if (!owns(operation))
|
|
427
|
+
return { inProgress: false };
|
|
428
|
+
const result = {
|
|
429
|
+
inProgress: false,
|
|
430
|
+
userMessage,
|
|
431
|
+
assistantMessage: push('assistant', reply.content, undefined, reply.refs),
|
|
432
|
+
};
|
|
433
|
+
seen.set(input.clientRequestId, result);
|
|
434
|
+
return result;
|
|
435
|
+
}
|
|
436
|
+
finally {
|
|
437
|
+
if (owns(operation)) {
|
|
438
|
+
controller = null;
|
|
439
|
+
busy = false;
|
|
440
|
+
notify();
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
async function turn(text, operation) {
|
|
332
445
|
// A typed answer to the pending report question resolves against its
|
|
333
446
|
// options in code: no model turn, and "the date month" means the date by
|
|
334
447
|
// month whatever the model would have made of it.
|
|
@@ -337,7 +450,7 @@ export function createBrowserAssistantTransport(options) {
|
|
|
337
450
|
const option = directAnswer(pending.followUp, pending.question, text);
|
|
338
451
|
// The reply's own time words ("status last month") still count.
|
|
339
452
|
if (option)
|
|
340
|
-
return answerPending(pendingReports, option, text);
|
|
453
|
+
return answerPending(pendingReports, option, text, () => active(operation));
|
|
341
454
|
}
|
|
342
455
|
const model = options.model();
|
|
343
456
|
if (!model) {
|
|
@@ -348,9 +461,11 @@ export function createBrowserAssistantTransport(options) {
|
|
|
348
461
|
'Download a model first, then I can help. The cards on the Planner page work without one.',
|
|
349
462
|
};
|
|
350
463
|
}
|
|
351
|
-
controller = new AbortController();
|
|
352
464
|
try {
|
|
353
|
-
const cookbooks =
|
|
465
|
+
const cookbooks = cookbooksForTurn();
|
|
466
|
+
const index = buildMatchIndex(options.recipes, cookbooks, {
|
|
467
|
+
theme: !!options.theme,
|
|
468
|
+
});
|
|
354
469
|
const prior = messages
|
|
355
470
|
.filter((m) => m !== greeting)
|
|
356
471
|
.slice(0, -1)
|
|
@@ -365,6 +480,14 @@ export function createBrowserAssistantTransport(options) {
|
|
|
365
480
|
const reports = reportsHost();
|
|
366
481
|
const reportSources = reports?.sources() ?? [];
|
|
367
482
|
const asked = pending;
|
|
483
|
+
// Hosted structured replies describe this exact app revision. Local
|
|
484
|
+
// providers may perform their own supported tool work during message().
|
|
485
|
+
const hosted = typeof options.acceptCommands === 'function'
|
|
486
|
+
? options.acceptCommands()
|
|
487
|
+
: options.acceptCommands;
|
|
488
|
+
const inferenceRevision = hosted
|
|
489
|
+
? planner.snapshot().revision
|
|
490
|
+
: undefined;
|
|
368
491
|
const raw = await model.message(text, {
|
|
369
492
|
history: [
|
|
370
493
|
{
|
|
@@ -382,8 +505,17 @@ export function createBrowserAssistantTransport(options) {
|
|
|
382
505
|
responseSchema: buildResponseSchema(options.recipes, cookbooks, !!options.settings, !!options.theme, menu.map((section) => section.id), reportSources.map((source) => source.id)),
|
|
383
506
|
temperature: 0,
|
|
384
507
|
maxTokens: MAX_REPLY_TOKENS,
|
|
385
|
-
signal: controller.signal,
|
|
508
|
+
signal: operation.controller.signal,
|
|
386
509
|
});
|
|
510
|
+
// A provider may resolve after abort instead of rejecting. Never apply it.
|
|
511
|
+
if (!active(operation))
|
|
512
|
+
return { content: 'Stopped.' };
|
|
513
|
+
if (inferenceRevision !== undefined &&
|
|
514
|
+
planner.snapshot().revision !== inferenceRevision) {
|
|
515
|
+
return {
|
|
516
|
+
content: 'The app changed while I was preparing that reply. I have kept your newer changes and applied nothing from this reply. Please try again.',
|
|
517
|
+
};
|
|
518
|
+
}
|
|
387
519
|
const change = parseChange(raw, options.recipes, cookbooks, {
|
|
388
520
|
commands: typeof options.acceptCommands === 'function'
|
|
389
521
|
? options.acceptCommands()
|
|
@@ -399,6 +531,7 @@ export function createBrowserAssistantTransport(options) {
|
|
|
399
531
|
change.remove = [];
|
|
400
532
|
delete change.open;
|
|
401
533
|
}
|
|
534
|
+
const beforeCommands = planner.snapshot();
|
|
402
535
|
const applied = applyRecipes(planner, change);
|
|
403
536
|
const settingsText = options.settings && hasKeys(change.settings)
|
|
404
537
|
? runSummary(planner, 'set_settings', change.settings)
|
|
@@ -410,9 +543,17 @@ export function createBrowserAssistantTransport(options) {
|
|
|
410
543
|
const undo = themed?.undoId && options.themeUndos
|
|
411
544
|
? options.themeUndos.record(previousTheme, themed.undoId)
|
|
412
545
|
: undefined;
|
|
413
|
-
const
|
|
546
|
+
const commandRun = (change.commands ?? []).length
|
|
414
547
|
? runCommands(planner, change.commands ?? [])
|
|
415
|
-
: '';
|
|
548
|
+
: { summary: '', results: [] };
|
|
549
|
+
if (change.sampleContext &&
|
|
550
|
+
commandRun.results.length === change.commands?.length &&
|
|
551
|
+
commandRun.results.every((result) => result.ok) &&
|
|
552
|
+
commandRun.results.some((result) => result.ok && result.receipt.changed)) {
|
|
553
|
+
applySampleContext(change.sampleContext);
|
|
554
|
+
}
|
|
555
|
+
const commandText = commandRun.summary;
|
|
556
|
+
const coaching = appliedCoaching(beforeCommands, planner.snapshot(), commandRun.results, options.recipes);
|
|
416
557
|
// A request for a report or a summary of the data (the keyword match
|
|
417
558
|
// finds reports.runtime) goes to Reports or nowhere: an `open` of any
|
|
418
559
|
// other section (the product catalogue, say) is dropped.
|
|
@@ -447,7 +588,9 @@ export function createBrowserAssistantTransport(options) {
|
|
|
447
588
|
!!openText ||
|
|
448
589
|
!!change.cookbook;
|
|
449
590
|
if (reports && reportIntent) {
|
|
450
|
-
const built = await buildReport(reports, reportIntent, reportWords, asked?.followUp ?? null);
|
|
591
|
+
const built = await buildReport(reports, reportIntent, reportWords, asked?.followUp ?? null, () => active(operation));
|
|
592
|
+
if (!active(operation))
|
|
593
|
+
return { content: 'Stopped.' };
|
|
451
594
|
applied.added.push(...built.added);
|
|
452
595
|
reportText = built.text;
|
|
453
596
|
reportRef = built.ref;
|
|
@@ -456,7 +599,9 @@ export function createBrowserAssistantTransport(options) {
|
|
|
456
599
|
// A second miss: never the identical question again.
|
|
457
600
|
const pick = asked.followUp.options.find((o) => o.value === asked.followUp.default);
|
|
458
601
|
if (pick) {
|
|
459
|
-
const built = await buildReport(reports, mergeIntent(asked.intent, pick.apply), asked.text, asked.followUp);
|
|
602
|
+
const built = await buildReport(reports, mergeIntent(asked.intent, pick.apply), asked.text, asked.followUp, () => active(operation));
|
|
603
|
+
if (!active(operation))
|
|
604
|
+
return { content: 'Stopped.' };
|
|
460
605
|
applied.added.push(...built.added);
|
|
461
606
|
reportText = `I went with ${pick.label}. ${built.text}`;
|
|
462
607
|
reportRef = built.ref;
|
|
@@ -515,7 +660,9 @@ export function createBrowserAssistantTransport(options) {
|
|
|
515
660
|
? cookbooks.find((c) => c.id === cookbookId)
|
|
516
661
|
: undefined;
|
|
517
662
|
const line = change.reply || (offered ? `Set up ${offered.name}?` : '');
|
|
518
|
-
const reply = honestReply(line, summary, !!offer)
|
|
663
|
+
const reply = [honestReply(line, summary, !!offer), coaching]
|
|
664
|
+
.filter(Boolean)
|
|
665
|
+
.join(' ');
|
|
519
666
|
if (reply)
|
|
520
667
|
options.onReply?.(reply);
|
|
521
668
|
// One ref renders as is; several in one turn (a cookbook offer, a theme
|
|
@@ -525,16 +672,43 @@ export function createBrowserAssistantTransport(options) {
|
|
|
525
672
|
return { content: reply, refs };
|
|
526
673
|
}
|
|
527
674
|
catch (error) {
|
|
528
|
-
if (
|
|
675
|
+
if (!active(operation))
|
|
529
676
|
return { content: 'Stopped.' };
|
|
530
677
|
const detail = error instanceof Error ? error.message : String(error);
|
|
531
678
|
return { content: `Sorry, the model could not answer: ${detail}` };
|
|
532
679
|
}
|
|
533
|
-
finally {
|
|
534
|
-
controller = null;
|
|
535
|
-
}
|
|
536
680
|
}
|
|
537
681
|
return {
|
|
682
|
+
conversation,
|
|
683
|
+
get resetRevision() {
|
|
684
|
+
return generation;
|
|
685
|
+
},
|
|
686
|
+
get busy() {
|
|
687
|
+
return busy;
|
|
688
|
+
},
|
|
689
|
+
subscribeConversation(listener) {
|
|
690
|
+
listeners.add(listener);
|
|
691
|
+
listener(conversation());
|
|
692
|
+
return () => listeners.delete(listener);
|
|
693
|
+
},
|
|
694
|
+
seed(input) {
|
|
695
|
+
if (!input ||
|
|
696
|
+
typeof input.id !== 'string' ||
|
|
697
|
+
!input.id.trim() ||
|
|
698
|
+
!Array.isArray(input.messages) ||
|
|
699
|
+
input.messages.some((message) => !message ||
|
|
700
|
+
!['user', 'assistant'].includes(message.role) ||
|
|
701
|
+
typeof message.content !== 'string') ||
|
|
702
|
+
seeds.has(input.id) ||
|
|
703
|
+
busy ||
|
|
704
|
+
sent)
|
|
705
|
+
return false;
|
|
706
|
+
seeds.add(input.id);
|
|
707
|
+
for (const message of input.messages)
|
|
708
|
+
push(message.role, message.content, undefined, undefined, false);
|
|
709
|
+
notify();
|
|
710
|
+
return true;
|
|
711
|
+
},
|
|
538
712
|
async listThreads() {
|
|
539
713
|
return [thread];
|
|
540
714
|
},
|
|
@@ -544,19 +718,25 @@ export function createBrowserAssistantTransport(options) {
|
|
|
544
718
|
async loadMessages() {
|
|
545
719
|
return [...messages];
|
|
546
720
|
},
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
721
|
+
sendMessage(input) {
|
|
722
|
+
return send(input, false);
|
|
723
|
+
},
|
|
724
|
+
sendHostMessage(input) {
|
|
725
|
+
return send(input, true);
|
|
726
|
+
},
|
|
727
|
+
reset() {
|
|
728
|
+
generation += 1;
|
|
729
|
+
controller?.abort();
|
|
730
|
+
controller = null;
|
|
731
|
+
pending = null;
|
|
732
|
+
messages.splice(0);
|
|
733
|
+
seen.clear();
|
|
734
|
+
seeds.clear();
|
|
735
|
+
sent = false;
|
|
736
|
+
busy = false;
|
|
737
|
+
counter = 0;
|
|
738
|
+
greeting = push('assistant', GREETING);
|
|
739
|
+
notify();
|
|
560
740
|
},
|
|
561
741
|
/**
|
|
562
742
|
* The report follow-up's form, submitted: its pick merges into the
|
|
@@ -567,6 +747,8 @@ export function createBrowserAssistantTransport(options) {
|
|
|
567
747
|
const cached = seen.get(input.clientRequestId);
|
|
568
748
|
if (cached)
|
|
569
749
|
return cached;
|
|
750
|
+
if (busy)
|
|
751
|
+
throw new Error('The assistant is still answering.');
|
|
570
752
|
const reports = reportsHost();
|
|
571
753
|
if (!pending || !reports || pending.question.id !== input.questionId) {
|
|
572
754
|
throw new Error('That question is no longer open. Ask again?');
|
|
@@ -577,27 +759,45 @@ export function createBrowserAssistantTransport(options) {
|
|
|
577
759
|
: undefined;
|
|
578
760
|
if (!values || !option)
|
|
579
761
|
throw new Error('Choose one of the options.');
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
762
|
+
sent = true;
|
|
763
|
+
busy = true;
|
|
764
|
+
const operation = {
|
|
765
|
+
epoch: generation,
|
|
766
|
+
controller: new AbortController(),
|
|
767
|
+
};
|
|
768
|
+
controller = operation.controller;
|
|
769
|
+
try {
|
|
770
|
+
const asked = messages.find((m) => m.id === input.messageId);
|
|
771
|
+
if (asked) {
|
|
772
|
+
const mark = (ref) => {
|
|
773
|
+
const item = ref;
|
|
774
|
+
return item?.kind === ASSISTANT_QUESTION_KIND &&
|
|
775
|
+
item.id === input.questionId
|
|
776
|
+
? { ...item, answer: values }
|
|
777
|
+
: ref;
|
|
778
|
+
};
|
|
779
|
+
asked.toolCallData = Array.isArray(asked.toolCallData)
|
|
780
|
+
? asked.toolCallData.map(mark)
|
|
781
|
+
: mark(asked.toolCallData);
|
|
782
|
+
}
|
|
783
|
+
const reply = await answerPending(reports, option, '', () => active(operation));
|
|
784
|
+
if (!owns(operation))
|
|
785
|
+
return { inProgress: false };
|
|
786
|
+
const result = {
|
|
787
|
+
inProgress: false,
|
|
788
|
+
...(asked ? { messages: [asked] } : {}),
|
|
789
|
+
assistantMessage: push('assistant', reply.content, undefined, reply.refs),
|
|
588
790
|
};
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
791
|
+
seen.set(input.clientRequestId, result);
|
|
792
|
+
return result;
|
|
793
|
+
}
|
|
794
|
+
finally {
|
|
795
|
+
if (owns(operation)) {
|
|
796
|
+
controller = null;
|
|
797
|
+
busy = false;
|
|
798
|
+
notify();
|
|
799
|
+
}
|
|
592
800
|
}
|
|
593
|
-
const reply = await answerPending(reports, option);
|
|
594
|
-
const result = {
|
|
595
|
-
inProgress: false,
|
|
596
|
-
...(asked ? { messages: [asked] } : {}),
|
|
597
|
-
assistantMessage: push('assistant', reply.content, undefined, reply.refs),
|
|
598
|
-
};
|
|
599
|
-
seen.set(input.clientRequestId, result);
|
|
600
|
-
return result;
|
|
601
801
|
},
|
|
602
802
|
recordReportOutcome(specHash, outcome) {
|
|
603
803
|
for (const message of messages) {
|
|
@@ -612,6 +812,7 @@ export function createBrowserAssistantTransport(options) {
|
|
|
612
812
|
}
|
|
613
813
|
}
|
|
614
814
|
}
|
|
815
|
+
notify();
|
|
615
816
|
},
|
|
616
817
|
async uploadAttachment(file) {
|
|
617
818
|
throw new Error(`The assistant cannot take attachments (${file.name}).`);
|