@happyvertical/smrt-planner 0.57.12 → 0.57.14
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/4U_CvE-d.js +16 -0
- package/app/_app/immutable/chunks/{BxyJ_Q7v.js → B7IsOdeU.js} +1 -1
- package/app/_app/immutable/chunks/BLDKU4g5.js +1 -0
- package/app/_app/immutable/chunks/{_CcVkMEQ.js → BOSl48rY.js} +1 -1
- package/app/_app/immutable/chunks/{DbH3RuTE.js → Ba61AwfI.js} +1 -1
- package/app/_app/immutable/chunks/{DU3stPaX.js → BfEjkvw8.js} +1 -1
- package/app/_app/immutable/chunks/Bl9jYcfy.js +1 -0
- package/app/_app/immutable/chunks/{CsaWd8kG.js → Bs5WxZDd.js} +1 -1
- package/app/_app/immutable/chunks/BttZBU_f.js +10 -0
- package/app/_app/immutable/chunks/By9nPosf.js +1 -0
- package/app/_app/immutable/chunks/{2dmW8nz3.js → C8mMXUIO.js} +2 -2
- package/app/_app/immutable/chunks/{BQgbhyQu.js → C9ckpR0C.js} +1 -1
- package/app/_app/immutable/chunks/{D4791-Ex.js → CB4gakCD.js} +1 -1
- package/app/_app/immutable/chunks/CO-Ek-HE.js +1 -0
- package/app/_app/immutable/chunks/{BCvXlTRf.js → CvjuXdyt.js} +1 -1
- package/app/_app/immutable/chunks/CxSE8nQW.js +1 -0
- package/app/_app/immutable/chunks/D-dgX3hb.js +2 -0
- package/app/_app/immutable/chunks/{bBI0F4nt.js → DDsrLsCW.js} +1 -1
- package/app/_app/immutable/chunks/{DDtOXC2p.js → DHw6VlGb.js} +1 -1
- package/app/_app/immutable/chunks/{BgtC60Dj.js → DQ1TECJo.js} +2 -2
- package/app/_app/immutable/chunks/{pEiNEXSh.js → DSHP6NMq.js} +1 -1
- package/app/_app/immutable/chunks/DYDheSdi.js +26 -0
- package/app/_app/immutable/chunks/Df-zyycv.js +2 -0
- package/app/_app/immutable/chunks/DkMzaPtY.js +4 -0
- package/app/_app/immutable/chunks/DmA8eomi.js +1 -0
- package/app/_app/immutable/chunks/{8MGlmWc0.js → DwlKnCAn.js} +1 -1
- package/app/_app/immutable/chunks/{B88mVEob.js → Mn4opCWg.js} +1 -1
- package/app/_app/immutable/chunks/{38SS-Q6Y.js → PiW3Dgjp.js} +22 -22
- package/app/_app/immutable/chunks/{ByKA-VaR.js → VIYltq2Y.js} +1 -1
- package/app/_app/immutable/chunks/{CQFoqqzT.js → fNkgk5Jb.js} +1 -1
- package/app/_app/immutable/chunks/{BTm4M8Ke.js → mdO5QRA9.js} +1 -1
- package/app/_app/immutable/chunks/{5TDxHd66.js → yTc1j36D.js} +1 -1
- package/app/_app/immutable/chunks/{oV81RcfI.js → yeJddwqn.js} +1 -1
- package/app/_app/immutable/entry/{app.C8En00Ny.js → app.N1QTpsMZ.js} +2 -2
- package/app/_app/immutable/entry/start.Dr_ALXsl.js +1 -0
- package/app/_app/immutable/nodes/0.inFgEPC5.js +7 -0
- package/app/_app/immutable/nodes/{1.CoV_40km.js → 1.BPYf0yDv.js} +1 -1
- package/app/_app/immutable/nodes/10.DScVn_7s.js +3 -0
- package/app/_app/immutable/nodes/{11.Csg6XAcG.js → 11.SWB4V_R-.js} +1 -1
- package/app/_app/immutable/nodes/{12.CuTHLuEu.js → 12.jNsVHfvB.js} +1 -1
- package/app/_app/immutable/nodes/{13.CNdfx5uO.js → 13.BAX1DbJ6.js} +1 -1
- package/app/_app/immutable/nodes/14.DFK_8SUc.js +1 -0
- package/app/_app/immutable/nodes/2.C-g07Oom.js +22 -0
- package/app/_app/immutable/nodes/{3.DC8-sgUI.js → 3.BYAVGln5.js} +1 -1
- package/app/_app/immutable/nodes/{4.DcX0DIX9.js → 4.xN8AMdJR.js} +1 -1
- package/app/_app/immutable/nodes/{5.Opk77twi.js → 5.BnO1oGgB.js} +1 -1
- package/app/_app/immutable/nodes/{6.Uk9tXC7t.js → 6.D3aEKeoZ.js} +1 -1
- package/app/_app/immutable/nodes/7.BZMihT_i.js +1 -0
- package/app/_app/immutable/nodes/{8.CacSxuCP.js → 8.DWwsczQn.js} +1 -1
- package/app/_app/immutable/nodes/{9.z7vXbrbH.js → 9.hCdhh_c2.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/9PL91wDk.js +0 -4
- package/app/_app/immutable/chunks/9iVbSlQr.js +0 -16
- package/app/_app/immutable/chunks/B-xSgl5J.js +0 -1
- package/app/_app/immutable/chunks/BDKUpjK6.js +0 -2
- package/app/_app/immutable/chunks/Bq35Wl4H.js +0 -2
- package/app/_app/immutable/chunks/Cu77BRmy.js +0 -1
- package/app/_app/immutable/chunks/CxZIUuYu.js +0 -1
- package/app/_app/immutable/chunks/CzHmSbsw.js +0 -1
- package/app/_app/immutable/chunks/D71UrO5c.js +0 -1
- package/app/_app/immutable/chunks/DF-0MxNw.js +0 -1
- package/app/_app/immutable/chunks/DaWOaOo5.js +0 -10
- package/app/_app/immutable/chunks/aDZBV4Ss.js +0 -26
- package/app/_app/immutable/entry/start.DQ2WMDJa.js +0 -1
- package/app/_app/immutable/nodes/0.CjivLsXS.js +0 -7
- package/app/_app/immutable/nodes/10.CRcxQ1FU.js +0 -3
- package/app/_app/immutable/nodes/14.CvNTiqf4.js +0 -1
- package/app/_app/immutable/nodes/2.D8ImYTF0.js +0 -24
- package/app/_app/immutable/nodes/7.Q7dzrAos.js +0 -1
|
@@ -1,13 +1,34 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import type { BrowserAssistantTransport } from '../assistant/transport.js';
|
|
2
3
|
import { cookbookStore } from '../cookbook/store.svelte.js';
|
|
4
|
+
import type {
|
|
5
|
+
PlannerProjectPersistence,
|
|
6
|
+
PlannerProps,
|
|
7
|
+
} from '../planner/types.js';
|
|
8
|
+
import { workspacePersistence } from '../planner/workspace.svelte.js';
|
|
3
9
|
import type { AppSettings as Settings } from '../settings/app-settings.js';
|
|
4
10
|
import AppSettings from './AppSettings.svelte';
|
|
11
|
+
import ProjectControls from './ProjectControls.svelte';
|
|
12
|
+
|
|
13
|
+
interface Props
|
|
14
|
+
extends Pick<PlannerProps, 'controller' | 'onreset' | 'resetDisabledReason'> {
|
|
15
|
+
nativeAssistant?: BrowserAssistantTransport;
|
|
16
|
+
projectPersistence?: PlannerProjectPersistence | null;
|
|
17
|
+
}
|
|
18
|
+
let {
|
|
19
|
+
controller,
|
|
20
|
+
nativeAssistant,
|
|
21
|
+
onreset,
|
|
22
|
+
resetDisabledReason,
|
|
23
|
+
projectPersistence = workspacePersistence,
|
|
24
|
+
}: Props = $props();
|
|
5
25
|
|
|
6
26
|
// The editor holds its own copy so typing is never fought by the store;
|
|
7
27
|
// changes reach the cookbook after a short pause (and its save follows).
|
|
8
28
|
const DELAY_MS = 300;
|
|
9
29
|
let draft = $state<Settings>(cookbookStore.settings());
|
|
10
30
|
let timer: ReturnType<typeof setTimeout> | undefined;
|
|
31
|
+
let generation = cookbookStore.replacementGeneration;
|
|
11
32
|
|
|
12
33
|
function change(next: Settings) {
|
|
13
34
|
draft = next;
|
|
@@ -16,6 +37,14 @@ function change(next: Settings) {
|
|
|
16
37
|
}
|
|
17
38
|
|
|
18
39
|
function commit() {
|
|
40
|
+
if (generation !== cookbookStore.replacementGeneration) {
|
|
41
|
+
clearTimeout(timer);
|
|
42
|
+
timer = undefined;
|
|
43
|
+
generation = cookbookStore.replacementGeneration;
|
|
44
|
+
draft = cookbookStore.settings();
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (timer === undefined) return;
|
|
19
48
|
clearTimeout(timer);
|
|
20
49
|
timer = undefined;
|
|
21
50
|
cookbookStore.setSettings(draft);
|
|
@@ -23,12 +52,19 @@ function commit() {
|
|
|
23
52
|
|
|
24
53
|
// A cookbook, import or reset replaces the cookbook: show what it holds.
|
|
25
54
|
$effect(() => {
|
|
55
|
+
const nextGeneration = cookbookStore.replacementGeneration;
|
|
26
56
|
const stored = cookbookStore.settings();
|
|
27
|
-
if (
|
|
57
|
+
if (generation !== nextGeneration) {
|
|
58
|
+
clearTimeout(timer);
|
|
59
|
+
timer = undefined;
|
|
60
|
+
generation = nextGeneration;
|
|
61
|
+
draft = stored;
|
|
62
|
+
} else if (timer === undefined) draft = stored;
|
|
28
63
|
});
|
|
29
64
|
</script>
|
|
30
65
|
|
|
31
66
|
<div class="pane">
|
|
67
|
+
<ProjectControls {projectPersistence} {controller} {nativeAssistant} {onreset} {resetDisabledReason} />
|
|
32
68
|
<p class="meta">
|
|
33
69
|
Defaults for this app. They apply to new records only; existing records
|
|
34
70
|
keep their values.
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import type { BrowserAssistantTransport } from '../assistant/transport.ts';
|
|
2
|
+
import type { PlannerProjectPersistence, PlannerProps } from '../planner/types.ts';
|
|
3
|
+
interface Props extends Pick<PlannerProps, 'controller' | 'onreset' | 'resetDisabledReason'> {
|
|
4
|
+
nativeAssistant?: BrowserAssistantTransport;
|
|
5
|
+
projectPersistence?: PlannerProjectPersistence | null;
|
|
6
|
+
}
|
|
7
|
+
declare const SettingsPanel: import("svelte").Component<Props, {}, "">;
|
|
2
8
|
type SettingsPanel = ReturnType<typeof SettingsPanel>;
|
|
3
9
|
export default SettingsPanel;
|
|
4
10
|
//# sourceMappingURL=SettingsPanel.svelte.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsPanel.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/SettingsPanel.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SettingsPanel.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/components/SettingsPanel.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAE3E,OAAO,KAAK,EACV,yBAAyB,EACzB,YAAY,EACb,MAAM,qBAAqB,CAAC;AAO7B,UAAU,KACR,SAAQ,IAAI,CAAC,YAAY,EAAE,YAAY,GAAG,SAAS,GAAG,qBAAqB,CAAC;IAC5E,eAAe,CAAC,EAAE,yBAAyB,CAAC;IAC5C,kBAAkB,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAC;CACvD;AAyED,QAAA,MAAM,aAAa,2CAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
|
package/dist/cookbook/file.d.ts
CHANGED
|
@@ -11,4 +11,9 @@ export declare function formatSize(bytes: number): string;
|
|
|
11
11
|
export declare function serializeCookbook(cookbook: Cookbook): string;
|
|
12
12
|
/** Offer the cookbook as a `<name>.cookbook.json` download. */
|
|
13
13
|
export declare function downloadCookbook(cookbook: Cookbook, name?: string): void;
|
|
14
|
+
/** Download an already serialized native export without changing its bytes. */
|
|
15
|
+
export declare function downloadCookbookFile(file: {
|
|
16
|
+
fileName: string;
|
|
17
|
+
text: string;
|
|
18
|
+
}): void;
|
|
14
19
|
//# sourceMappingURL=file.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/lib/cookbook/file.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,e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C/E,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,IAAI,CAWP"}
|
package/dist/cookbook/file.js
CHANGED
|
@@ -28,10 +28,17 @@ export function serializeCookbook(cookbook) {
|
|
|
28
28
|
}
|
|
29
29
|
/** Offer the cookbook as a `<name>.cookbook.json` download. */
|
|
30
30
|
export function downloadCookbook(cookbook, name) {
|
|
31
|
-
|
|
31
|
+
downloadCookbookFile({
|
|
32
|
+
fileName: exportFileName(name),
|
|
33
|
+
text: serializeCookbook(cookbook),
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
/** Download an already serialized native export without changing its bytes. */
|
|
37
|
+
export function downloadCookbookFile(file) {
|
|
38
|
+
const url = URL.createObjectURL(new Blob([file.text], { type: 'application/json' }));
|
|
32
39
|
const link = document.createElement('a');
|
|
33
40
|
link.href = url;
|
|
34
|
-
link.download =
|
|
41
|
+
link.download = file.fileName;
|
|
35
42
|
document.body.append(link);
|
|
36
43
|
link.click();
|
|
37
44
|
link.remove();
|
|
@@ -20,6 +20,7 @@ export declare function followSettings(cookbook: Pick<Cookbook, 'policies'>): vo
|
|
|
20
20
|
* Cookbook, whether it is saved, exported or compared.
|
|
21
21
|
*/
|
|
22
22
|
export declare class CookbookStore {
|
|
23
|
+
replacementGeneration: number;
|
|
23
24
|
/** The shell layout, owned here and passed to `AppShell`. */
|
|
24
25
|
layout: ShellLayout | undefined;
|
|
25
26
|
/** The app's name and description (`set_name`); not shown in the UI yet. */
|
|
@@ -88,7 +89,9 @@ export declare class CookbookStore {
|
|
|
88
89
|
/** Replace on the visitor's say-so (an import): saving is allowed again. */
|
|
89
90
|
replace(cookbook: Cookbook): void;
|
|
90
91
|
/** Back to an empty cookbook, and the shell's own settings to defaults. */
|
|
91
|
-
reset(
|
|
92
|
+
reset(options?: {
|
|
93
|
+
preserveTheme?: boolean;
|
|
94
|
+
}): void;
|
|
92
95
|
/** Validate and apply JSON text, e.g. a chosen file. Applies nothing on failure. */
|
|
93
96
|
importText(text: string): CookbookResult;
|
|
94
97
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/cookbook/store.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,6CAA6C,CAAC;
|
|
1
|
+
{"version":3,"file":"store.svelte.d.ts","sourceRoot":"","sources":["../../src/lib/cookbook/store.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAEL,KAAK,WAAW,EACjB,MAAM,6CAA6C,CAAC;AAIrD,OAAO,EACL,KAAK,WAAW,EAKjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAWpE,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAG3D,iFAAiF;AACjF,eAAO,MAAM,iBAAiB,uBAAuB,CAAC;AAEtD,eAAO,MAAM,aAAa,MAAM,CAAC;AAEjC,iFAAiF;AACjF,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,IAAI,GAAG,QAAQ,CAAC;AAEvD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,GAAG,IAAI,CAgBzE;AAED;;;;;GAKG;AACH,qBAAa,aAAa;IACxB,qBAAqB,SAAa;IAClC,6DAA6D;IAC7D,MAAM,0BAAqC;IAC3C,4EAA4E;IAC5E,IAAI,qBAAgC;IACpC,WAAW,qBAAgC;IAC3C,4EAA4E;IAC5E,KAAK,2BAAsC;IAC3C;;;OAGG;IACH,SAAS,mCAAoD;IAC7D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;;;OAIG;IACH,OAAO,CACL,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,OAAO,GAAG,IAAyB,GAC3C,OAAO;IA0CV,4EAA4E;IAC5E,IAAI,IAAI,OAAO;IAmBf,kDAAkD;IAClD,YAAY,IAAI,IAAI;IAMpB,+CAA+C;IAC/C,KAAK,IAAI,IAAI;CAGd;AAED,eAAO,MAAM,aAAa,eAAsB,CAAC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { isShellLayoutEmpty, } from '@happyvertical/smrt-svelte/workspace/layout';
|
|
2
2
|
import { setSamplePricing, setSampleTaxRate } from "../data/packs.js";
|
|
3
|
+
import { workspaceStorage } from "../planner/workspace-storage.js";
|
|
3
4
|
import { recipeState } from "../recipes/state.svelte.js";
|
|
4
5
|
import { hasTaxRateRow, isSettingRow, readSettings, writeSettings, } from "../settings/app-settings.js";
|
|
5
6
|
import { compactTheme } from "../theme/theme.js";
|
|
6
7
|
import { assembleCookbook } from "./assemble.js";
|
|
7
8
|
import { cookbookFromLegacySearch, hasLegacyState } from "./legacy.js";
|
|
8
|
-
import { BACKUP_KEY,
|
|
9
|
+
import { BACKUP_KEY, loadCookbook, PREVIOUS_STORAGE_KEY, removeKey, saveCookbook, writeKey, } from "./storage.js";
|
|
9
10
|
import { parseCookbookText } from "./validate.js";
|
|
10
11
|
/** Where the planner's AppShell keeps its own settings (panel states, sizes). */
|
|
11
12
|
export const SHELL_STORAGE_KEY = 'smrt-planner:shell';
|
|
@@ -34,6 +35,7 @@ export function followSettings(cookbook) {
|
|
|
34
35
|
* Cookbook, whether it is saved, exported or compared.
|
|
35
36
|
*/
|
|
36
37
|
export class CookbookStore {
|
|
38
|
+
replacementGeneration = $state(0);
|
|
37
39
|
/** The shell layout, owned here and passed to `AppShell`. */
|
|
38
40
|
layout = $state();
|
|
39
41
|
/** The app's name and description (`set_name`); not shown in the UI yet. */
|
|
@@ -146,6 +148,7 @@ export class CookbookStore {
|
|
|
146
148
|
}
|
|
147
149
|
/** Replace on the visitor's say-so (an import): saving is allowed again. */
|
|
148
150
|
replace(cookbook) {
|
|
151
|
+
this.replacementGeneration++;
|
|
149
152
|
this.apply(cookbook);
|
|
150
153
|
if (!this.loaded)
|
|
151
154
|
this.replacedBeforeLoad = true;
|
|
@@ -153,20 +156,16 @@ export class CookbookStore {
|
|
|
153
156
|
this.keepLegacyUrl = false;
|
|
154
157
|
}
|
|
155
158
|
/** Back to an empty cookbook, and the shell's own settings to defaults. */
|
|
156
|
-
reset() {
|
|
159
|
+
reset(options = {}) {
|
|
160
|
+
this.replacementGeneration++;
|
|
157
161
|
recipeState.clear();
|
|
158
162
|
followSettings({ policies: [] });
|
|
159
163
|
this.layout = undefined;
|
|
160
|
-
|
|
164
|
+
if (!options.preserveTheme)
|
|
165
|
+
this.theme = undefined;
|
|
161
166
|
this.name = undefined;
|
|
162
167
|
this.description = undefined;
|
|
163
168
|
this.overviews = {};
|
|
164
|
-
try {
|
|
165
|
-
globalThis.localStorage?.removeItem(SHELL_STORAGE_KEY);
|
|
166
|
-
}
|
|
167
|
-
catch {
|
|
168
|
-
// Storage may be unavailable (private mode); the cookbook still resets.
|
|
169
|
-
}
|
|
170
169
|
this.saveBlocked = false;
|
|
171
170
|
this.keepLegacyUrl = false;
|
|
172
171
|
}
|
|
@@ -182,7 +181,7 @@ export class CookbookStore {
|
|
|
182
181
|
* Call once in the browser, before `loaded` lets saving start. Returns true
|
|
183
182
|
* when a legacy link was imported, so the caller can clean the URL.
|
|
184
183
|
*/
|
|
185
|
-
hydrate(search, storage =
|
|
184
|
+
hydrate(search, storage = workspaceStorage()) {
|
|
186
185
|
this.storage = storage;
|
|
187
186
|
const outcome = loadCookbook(storage);
|
|
188
187
|
if (outcome.status === 'loaded')
|
package/dist/core/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
*
|
|
19
19
|
* @module
|
|
20
20
|
*/
|
|
21
|
+
export { parseSampleContext, type SampleContext, sampleContextSchema, } from '../data/sample-context.ts';
|
|
21
22
|
export { HOST_HISTORY_CHARS, HOST_HISTORY_TURNS, HOST_MESSAGE_CHARS, HOST_WIRE_VERSION, type HostRequest, } from '../inference/host.ts';
|
|
22
23
|
export { buildCommandTools, COMMAND_NAMES, type CommandTool, checkSchema, commandSchemas, commandTools, type JsonSchema, } from '../planner/commands/schemas.ts';
|
|
23
24
|
export { type BatchResult, type CommandError, type CommandErrorCode, type CommandInputs, type CommandName, type CommandReceipt, type CommandResult, type ExportData, PLANNER_COMMANDS_VERSION, PLANNER_TAB_IDS, type PlannerCommand, type PlannerTabId, type PlanSnapshot, type RecipeChanges, type RunOptions, } from '../planner/commands/types.ts';
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/core/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,KAAK,WAAW,GACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,KAAK,WAAW,EAChB,WAAW,EACX,cAAc,EACd,YAAY,EACZ,KAAK,UAAU,GAChB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,wBAAwB,EACxB,eAAe,EACf,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,UAAU,GAChB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,KAAK,aAAa,EAClB,cAAc,EACd,kBAAkB,EAClB,SAAS,EACT,KAAK,eAAe,EACpB,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,OAAO,EACP,WAAW,GACZ,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,sBAAsB,GAC5B,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,eAAe,EACf,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,QAAQ,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,gBAAgB,EAChB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,cAAc,EACd,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,KAAK,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/core/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACL,kBAAkB,EAClB,KAAK,aAAa,EAClB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,KAAK,WAAW,GACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,KAAK,WAAW,EAChB,WAAW,EACX,cAAc,EACd,YAAY,EACZ,KAAK,UAAU,GAChB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,wBAAwB,EACxB,eAAe,EACf,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,UAAU,GAChB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,KAAK,aAAa,EAClB,cAAc,EACd,kBAAkB,EAClB,SAAS,EACT,KAAK,eAAe,EACpB,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,OAAO,EACP,WAAW,GACZ,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,sBAAsB,GAC5B,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,eAAe,EACf,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,QAAQ,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,gBAAgB,EAChB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,cAAc,EACd,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,KAAK,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/core/index.js
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
*
|
|
19
19
|
* @module
|
|
20
20
|
*/
|
|
21
|
+
export { parseSampleContext, sampleContextSchema, } from "../data/sample-context.js";
|
|
21
22
|
export { HOST_HISTORY_CHARS, HOST_HISTORY_TURNS, HOST_MESSAGE_CHARS, HOST_WIRE_VERSION, } from "../inference/host.js";
|
|
22
23
|
export { buildCommandTools, COMMAND_NAMES, checkSchema, commandSchemas, commandTools, } from "../planner/commands/schemas.js";
|
|
23
24
|
export { PLANNER_COMMANDS_VERSION, PLANNER_TAB_IDS, } from "../planner/commands/types.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../src/lib/core/prompt.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../src/lib/core/prompt.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAGjE,OAAO,EAAkB,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAElE,4CAA4C;AAC5C,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,QAAQ,EAAE,YAAY,CAAC;IACvB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,SAAS;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACvD,qFAAqF;IACrF,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,wFAAwF;AACxF,MAAM,WAAW,UAAU;IACzB,uHAAuH;IACvH,MAAM,EAAE,MAAM,CAAC;IACf,+EAA+E;IAC/E,QAAQ,EAAE,QAAQ,EAAE,CAAC;CACtB;AAiFD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,eAAe,GAAG,UAAU,CA8ClE"}
|
package/dist/core/prompt.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { buildMatchIndex, matchText, } from "../assistant/match.js";
|
|
2
2
|
import { buildSystemPrompt } from "../assistant/prompt.js";
|
|
3
|
+
import { sampleContextSchema } from "../data/sample-context.js";
|
|
3
4
|
import { HOST_HISTORY_CHARS, HOST_HISTORY_TURNS, HOST_MESSAGE_CHARS, } from "../inference/host.js";
|
|
4
5
|
import { commandTools } from "../planner/commands/schemas.js";
|
|
5
6
|
import { plannerReportSources, REPORTS_RECIPE } from "../reports/sources.js";
|
|
@@ -51,6 +52,11 @@ function commandSection(snapshot) {
|
|
|
51
52
|
'',
|
|
52
53
|
'"commands": optional, at most 8 {"name", "input"} run in order, only for what add/remove/settings/theme cannot do. Commands:',
|
|
53
54
|
...commandTools.map((tool) => `- ${signature(tool)}: ${tool.description}`),
|
|
55
|
+
'',
|
|
56
|
+
'"sampleContext": TOP-LEVEL sibling of "reply" and "commands". REQUIRED when building an initial custom product-backed business app on an empty project (no recipes enabled), so its product records match the business. Omit for questions, no-ops, followups, or library cookbooks with their own canonical sample pack. Never fabricate a product assortment for a non-product app. NEVER put sampleContext inside commands[].input. Exact shape:',
|
|
57
|
+
'{"reply":"...","commands":[{"name":"add_recipes","input":{"ids":["<published recipe id>"]}}],"sampleContext":{"provenance":"fictional","products":[{"name":"<invented relevant product>","description":"<fictional sample description>","price":1200,"category":"<relevant category>"}],"customers":["<invented customer name>"],"vendors":["<invented vendor name>"]}}',
|
|
58
|
+
`sampleContext: provenance must be "fictional"; products ${sampleContextSchema.properties.products.minItems}–${sampleContextSchema.properties.products.maxItems} objects with required name, description, price and optional category; customers ${sampleContextSchema.properties.customers.minItems}–${sampleContextSchema.properties.customers.maxItems} strings; vendors ${sampleContextSchema.properties.vendors.minItems}–${sampleContextSchema.properties.vendors.maxItems} strings. Names/category: nonblank, max ${sampleContextSchema.properties.products.items.properties.name.maxLength} characters; description max ${sampleContextSchema.properties.products.items.properties.description.maxLength}. Price: integer minor units (1200 = 12.00), ${sampleContextSchema.properties.products.items.properties.price.minimum}–${sampleContextSchema.properties.products.items.properties.price.maximum}. No other fields.`,
|
|
59
|
+
'For an initial custom build, choose 5–6 relevant fictional products and a few fictional customers/vendors, not the maximum counts. Represent the business assortment: core goods, replacement parts/accessories and related merchandise/apparel where appropriate. Infer vocabulary from this business in any domain; never invent real company facts. Omit sampleContext on followups: never regenerate, reset or overwrite existing samples or manual edits.',
|
|
54
60
|
];
|
|
55
61
|
const menu = snapshot.sections
|
|
56
62
|
.filter((section) => !section.hidden)
|
|
@@ -97,6 +103,10 @@ export function buildHostPrompt(input) {
|
|
|
97
103
|
? plannerReportSources(snapshot.recipes.map((recipe) => recipe.id), catalog.recipes).map(({ id, label }) => ({ id, label }))
|
|
98
104
|
: []),
|
|
99
105
|
...commandSection(snapshot),
|
|
106
|
+
snapshot.recipes.length > 0 &&
|
|
107
|
+
commandTools.some((tool) => tool.name === 'export_cookbook')
|
|
108
|
+
? 'Completion: only when the visitor is clearly satisfied or wrapping up, offer Export > Download cookbook or Copy prompt once per wrap-up. Keep Build it primary where present. Brainstorming, not-ready statements, negation and thanks alone are not completion intent. Do not repeat an earlier export offer without renewed intent. Never emit export_cookbook merely because they seem done; suggest the UI action, never claim export or submission happened.'
|
|
109
|
+
: 'Completion: there is no verified nonempty exportable plan. Do not suggest export based on a visitor claim or completion language alone.',
|
|
100
110
|
].join('\n');
|
|
101
111
|
const history = (input.history ?? [])
|
|
102
112
|
.filter((turn) => (turn.role === 'user' || turn.role === 'assistant') &&
|
package/dist/core/reply.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type SampleContext } from '../data/sample-context.ts';
|
|
1
2
|
import { type ReportIntent } from '../reports/intent.ts';
|
|
2
3
|
import { type PromptCatalog } from './catalog.ts';
|
|
3
4
|
/**
|
|
@@ -6,6 +7,7 @@ import { type PromptCatalog } from './catalog.ts';
|
|
|
6
7
|
* model. Only `reply` is required; empty parts are left out.
|
|
7
8
|
*/
|
|
8
9
|
export interface HostReply {
|
|
10
|
+
sampleContext?: SampleContext;
|
|
9
11
|
/** The sentence shown to the visitor. */
|
|
10
12
|
reply: string;
|
|
11
13
|
/** Recipe ids to switch on. */
|
package/dist/core/reply.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reply.d.ts","sourceRoot":"","sources":["../../src/lib/core/reply.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reply.d.ts","sourceRoot":"","sources":["../../src/lib/core/reply.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,2BAA2B,CAAC;AAMnC,OAAO,EAAE,KAAK,YAAY,EAAsB,MAAM,sBAAsB,CAAC;AAE7E,OAAO,EAAkB,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAElE;;;;GAIG;AACH,MAAM,WAAW,SAAS;IACxB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,y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AM,EAAE,MAAM,EAAE,CAAC;CAClB;AAkBD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,aAA8B,GACtC,eAAe,CA4CjB"}
|
package/dist/core/reply.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { buildResponseSchema, FALLBACK_REPLY, MAX_COMMANDS, parseChange, stripThinking, } from "../assistant/change.js";
|
|
2
|
+
import { sampleContextSchema, } from "../data/sample-context.js";
|
|
2
3
|
import { checkSchema, commandSchemas, commandTools, } from "../planner/commands/schemas.js";
|
|
3
4
|
import { reportIntentSchema } from "../reports/intent.js";
|
|
4
5
|
import { REPORTS_RECIPE } from "../reports/sources.js";
|
|
@@ -28,6 +29,8 @@ export function buildReplySchema(catalog = defaultCatalog) {
|
|
|
28
29
|
if (catalog.recipes.some((recipe) => recipe.id === REPORTS_RECIPE)) {
|
|
29
30
|
schema.properties.report = reportIntentSchema([]);
|
|
30
31
|
}
|
|
32
|
+
schema.properties.sampleContext =
|
|
33
|
+
sampleContextSchema;
|
|
31
34
|
return schema;
|
|
32
35
|
}
|
|
33
36
|
/** The reply schema for the planner's own library. */
|
|
@@ -36,6 +39,7 @@ const nonEmpty = (value) => Object.keys(value).length > 0;
|
|
|
36
39
|
function toHostReply(change) {
|
|
37
40
|
return {
|
|
38
41
|
reply: change.reply,
|
|
42
|
+
...(change.sampleContext ? { sampleContext: change.sampleContext } : {}),
|
|
39
43
|
...(change.add.length ? { add: change.add } : {}),
|
|
40
44
|
...(change.remove.length ? { remove: change.remove } : {}),
|
|
41
45
|
...(change.cookbook ? { cookbook: change.cookbook } : {}),
|
package/dist/data/packs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packs.d.ts","sourceRoot":"","sources":["../../src/lib/data/packs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"packs.d.ts","sourceRoot":"","sources":["../../src/lib/data/packs.ts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E,MAAM,GAAG,SAAS,GAAG,IAAI,CAE/D;AAED,iFAAiF;AACjF,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAErD;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,UAAU,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAUD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI,CAEnE;AAED,wBAAgB,gBAAgB,IAAI,aAAa,CAEhD"}
|
package/dist/data/packs.js
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Sample-data packs. The generator draws names, prices, descriptions and the
|
|
3
|
-
* like from the ACTIVE pack: the generic one until a cookbook is applied, then
|
|
4
|
-
* that cookbook's (same id). Every value is fixed text, so a pack is as
|
|
5
|
-
* deterministic as the seed. Money is integer minor units (cents).
|
|
6
|
-
*/
|
|
1
|
+
import { getSampleContext } from "./sample-context.js";
|
|
7
2
|
export const GENERIC_PACK = {
|
|
8
3
|
id: 'generic',
|
|
9
4
|
products: [
|
|
@@ -3266,7 +3261,19 @@ export const COOKBOOK_PACKS = {
|
|
|
3266
3261
|
let active = GENERIC_PACK;
|
|
3267
3262
|
/** The pack the generator reads right now. */
|
|
3268
3263
|
export function getSamplePack() {
|
|
3269
|
-
|
|
3264
|
+
const context = getSampleContext();
|
|
3265
|
+
return active === GENERIC_PACK && context
|
|
3266
|
+
? {
|
|
3267
|
+
...GENERIC_PACK,
|
|
3268
|
+
id: 'contextual',
|
|
3269
|
+
rowCounts: {
|
|
3270
|
+
'@happyvertical/smrt-products:Product': context.products.length,
|
|
3271
|
+
},
|
|
3272
|
+
products: context.products,
|
|
3273
|
+
customers: context.customers,
|
|
3274
|
+
vendors: context.vendors,
|
|
3275
|
+
}
|
|
3276
|
+
: active;
|
|
3270
3277
|
}
|
|
3271
3278
|
/**
|
|
3272
3279
|
* Switch the pack to a cookbook's (unknown or null: the generic one). Rows
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planner-source.d.ts","sourceRoot":"","sources":["../../src/lib/data/planner-source.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"planner-source.d.ts","sourceRoot":"","sources":["../../src/lib/data/planner-source.ts"],"names":[],"mappings":"AAmBA,OAAO,EAA0B,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AA+BtE;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,UAAU,CA4GpD"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { catalog } from "../catalog/index.js";
|
|
2
|
-
import {
|
|
2
|
+
import { STORAGE_KEY } from "../cookbook/storage.js";
|
|
3
3
|
import { followSettings } from "../cookbook/store.svelte.js";
|
|
4
4
|
import { parseCookbookText } from "../cookbook/validate.js";
|
|
5
5
|
import { catalogModels } from "../forms/shared.js";
|
|
6
6
|
import { PROFILE_TYPE, stockSamples, VARIANT } from "../forms/stock.js";
|
|
7
|
+
import { workspaceStorage } from "../planner/workspace-storage.js";
|
|
7
8
|
import { ASSET, PRODUCT_ASSET } from "../products/media.js";
|
|
8
9
|
import { recipes } from "../recipes/index.js";
|
|
9
10
|
import { childLinks } from "../recipes/plumbing.js";
|
|
@@ -48,9 +49,9 @@ function primeSampleSettings(storage) {
|
|
|
48
49
|
* objects: swap this for a collection-backed `DataSource`.
|
|
49
50
|
*/
|
|
50
51
|
export function createPlannerDataSource() {
|
|
51
|
-
primeSampleSettings(
|
|
52
|
+
primeSampleSettings(workspaceStorage());
|
|
52
53
|
return createMemoryDataSource({
|
|
53
|
-
storage:
|
|
54
|
+
storage: workspaceStorage(),
|
|
54
55
|
// Fields the views hide still carry their policy default, e.g. the
|
|
55
56
|
// `contractType` that tells an Order from a PurchaseOrder.
|
|
56
57
|
defaults: (model) => recipeState.apply(model).background,
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/** Fictional vocabulary for a custom app's demo records; never cookbook data. */
|
|
2
|
+
export interface SampleContext {
|
|
3
|
+
provenance: 'fictional';
|
|
4
|
+
products: {
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
price: number;
|
|
8
|
+
category?: string;
|
|
9
|
+
}[];
|
|
10
|
+
customers: string[];
|
|
11
|
+
vendors: string[];
|
|
12
|
+
}
|
|
13
|
+
export declare const sampleContextSchema: {
|
|
14
|
+
readonly type: "object";
|
|
15
|
+
readonly properties: {
|
|
16
|
+
readonly provenance: {
|
|
17
|
+
readonly enum: readonly ["fictional"];
|
|
18
|
+
};
|
|
19
|
+
readonly products: {
|
|
20
|
+
readonly type: "array";
|
|
21
|
+
readonly minItems: 1;
|
|
22
|
+
readonly maxItems: 16;
|
|
23
|
+
readonly items: {
|
|
24
|
+
readonly type: "object";
|
|
25
|
+
readonly properties: {
|
|
26
|
+
readonly name: {
|
|
27
|
+
type: string;
|
|
28
|
+
minLength: number;
|
|
29
|
+
maxLength: number;
|
|
30
|
+
};
|
|
31
|
+
readonly description: {
|
|
32
|
+
readonly maxLength: 400;
|
|
33
|
+
readonly type: string;
|
|
34
|
+
readonly minLength: number;
|
|
35
|
+
};
|
|
36
|
+
readonly price: {
|
|
37
|
+
readonly type: "integer";
|
|
38
|
+
readonly minimum: 0;
|
|
39
|
+
readonly maximum: 1000000000;
|
|
40
|
+
};
|
|
41
|
+
readonly category: {
|
|
42
|
+
type: string;
|
|
43
|
+
minLength: number;
|
|
44
|
+
maxLength: number;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
readonly required: readonly ["name", "description", "price"];
|
|
48
|
+
readonly additionalProperties: false;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
readonly customers: {
|
|
52
|
+
readonly type: "array";
|
|
53
|
+
readonly minItems: 1;
|
|
54
|
+
readonly maxItems: 8;
|
|
55
|
+
readonly items: {
|
|
56
|
+
type: string;
|
|
57
|
+
minLength: number;
|
|
58
|
+
maxLength: number;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
readonly vendors: {
|
|
62
|
+
readonly type: "array";
|
|
63
|
+
readonly minItems: 1;
|
|
64
|
+
readonly maxItems: 5;
|
|
65
|
+
readonly items: {
|
|
66
|
+
type: string;
|
|
67
|
+
minLength: number;
|
|
68
|
+
maxLength: number;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
readonly required: readonly ["provenance", "products", "customers", "vendors"];
|
|
73
|
+
readonly additionalProperties: false;
|
|
74
|
+
};
|
|
75
|
+
/** Reject the entire vocabulary when any part is invalid. */
|
|
76
|
+
export declare function parseSampleContext(value: unknown): SampleContext | undefined;
|
|
77
|
+
export declare const SAMPLE_CONTEXT_KEY = "smrt-planner:sample-context:v1";
|
|
78
|
+
/** Read before generating rows, including a direct record-page reload. */
|
|
79
|
+
export declare function getSampleContext(): SampleContext | undefined;
|
|
80
|
+
/** Install once. Retries and feature followups never replace vocabulary or rows. */
|
|
81
|
+
export declare function applySampleContext(value: unknown): boolean;
|
|
82
|
+
/** Explicit full data reset starts a new demo context, matching the data source's origin scope. */
|
|
83
|
+
export declare function clearSampleContext(): void;
|
|
84
|
+
//# sourceMappingURL=sample-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sample-context.d.ts","sourceRoot":"","sources":["../../src/lib/data/sample-context.ts"],"names":[],"mappings":"AACA,iFAAiF;AACjF,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,EAAE,CAAC;IACJ,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAGD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyBtB,CAAC;AAMX,6DAA6D;AAC7D,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,GAAG,SAAS,CAuC5E;AAED,eAAO,MAAM,kBAAkB,mCAAmC,CAAC;AASnE,0EAA0E;AAC1E,wBAAgB,gBAAgB,IAAI,aAAa,GAAG,SAAS,CAW5D;AACD,oFAAoF;AACpF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAU1D;AAED,mGAAmG;AACnG,wBAAgB,kBAAkB,IAAI,IAAI,CAOzC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { workspaceStorage } from "../planner/workspace-storage.js";
|
|
2
|
+
const text = { type: 'string', minLength: 1, maxLength: 160 };
|
|
3
|
+
export const sampleContextSchema = {
|
|
4
|
+
type: 'object',
|
|
5
|
+
properties: {
|
|
6
|
+
provenance: { enum: ['fictional'] },
|
|
7
|
+
products: {
|
|
8
|
+
type: 'array',
|
|
9
|
+
minItems: 1,
|
|
10
|
+
maxItems: 16,
|
|
11
|
+
items: {
|
|
12
|
+
type: 'object',
|
|
13
|
+
properties: {
|
|
14
|
+
name: text,
|
|
15
|
+
description: { ...text, maxLength: 400 },
|
|
16
|
+
price: { type: 'integer', minimum: 0, maximum: 1000000000 },
|
|
17
|
+
category: text,
|
|
18
|
+
},
|
|
19
|
+
required: ['name', 'description', 'price'],
|
|
20
|
+
additionalProperties: false,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
customers: { type: 'array', minItems: 1, maxItems: 8, items: text },
|
|
24
|
+
vendors: { type: 'array', minItems: 1, maxItems: 5, items: text },
|
|
25
|
+
},
|
|
26
|
+
required: ['provenance', 'products', 'customers', 'vendors'],
|
|
27
|
+
additionalProperties: false,
|
|
28
|
+
};
|
|
29
|
+
const object = (v) => !!v && typeof v === 'object' && !Array.isArray(v);
|
|
30
|
+
const words = (v, max = 160) => typeof v === 'string' && v.trim().length > 0 && v.length <= max;
|
|
31
|
+
/** Reject the entire vocabulary when any part is invalid. */
|
|
32
|
+
export function parseSampleContext(value) {
|
|
33
|
+
if (!object(value) ||
|
|
34
|
+
Object.keys(value).some((k) => !['provenance', 'products', 'customers', 'vendors'].includes(k)) ||
|
|
35
|
+
value.provenance !== 'fictional')
|
|
36
|
+
return;
|
|
37
|
+
const names = (v, max) => Array.isArray(v) &&
|
|
38
|
+
v.length > 0 &&
|
|
39
|
+
v.length <= max &&
|
|
40
|
+
v.every((n) => words(n));
|
|
41
|
+
if (!names(value.customers, 8) ||
|
|
42
|
+
!names(value.vendors, 5) ||
|
|
43
|
+
!Array.isArray(value.products) ||
|
|
44
|
+
!value.products.length ||
|
|
45
|
+
value.products.length > 16)
|
|
46
|
+
return;
|
|
47
|
+
for (const p of value.products) {
|
|
48
|
+
if (!object(p) ||
|
|
49
|
+
Object.keys(p).some((k) => !['name', 'description', 'price', 'category'].includes(k)) ||
|
|
50
|
+
!words(p.name) ||
|
|
51
|
+
!words(p.description, 400) ||
|
|
52
|
+
typeof p.price !== 'number' ||
|
|
53
|
+
!Number.isSafeInteger(p.price) ||
|
|
54
|
+
p.price < 0 ||
|
|
55
|
+
p.price > 1000000000 ||
|
|
56
|
+
(p.category !== undefined && !words(p.category)))
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
return JSON.parse(JSON.stringify(value));
|
|
60
|
+
}
|
|
61
|
+
export const SAMPLE_CONTEXT_KEY = 'smrt-planner:sample-context:v1';
|
|
62
|
+
let active;
|
|
63
|
+
function storage() {
|
|
64
|
+
try {
|
|
65
|
+
return workspaceStorage();
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/** Read before generating rows, including a direct record-page reload. */
|
|
72
|
+
export function getSampleContext() {
|
|
73
|
+
if (!active) {
|
|
74
|
+
try {
|
|
75
|
+
active = parseSampleContext(JSON.parse(storage()?.getItem(SAMPLE_CONTEXT_KEY) ?? 'null'));
|
|
76
|
+
}
|
|
77
|
+
catch {
|
|
78
|
+
/* Unreadable context never replaces records. */
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return active;
|
|
82
|
+
}
|
|
83
|
+
/** Install once. Retries and feature followups never replace vocabulary or rows. */
|
|
84
|
+
export function applySampleContext(value) {
|
|
85
|
+
const context = parseSampleContext(value);
|
|
86
|
+
if (!context || getSampleContext())
|
|
87
|
+
return false;
|
|
88
|
+
active = context;
|
|
89
|
+
try {
|
|
90
|
+
storage()?.setItem(SAMPLE_CONTEXT_KEY, JSON.stringify(context));
|
|
91
|
+
}
|
|
92
|
+
catch {
|
|
93
|
+
/* In-memory previews still work without browser storage. */
|
|
94
|
+
}
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
/** Explicit full data reset starts a new demo context, matching the data source's origin scope. */
|
|
98
|
+
export function clearSampleContext() {
|
|
99
|
+
active = undefined;
|
|
100
|
+
try {
|
|
101
|
+
storage()?.removeItem(SAMPLE_CONTEXT_KEY);
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
/* Storage may be unavailable. */
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../src/lib/data/source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,KAAK,OAAO,EAKb,MAAM,eAAe,CAAC;AAavB,OAAO,EAML,KAAK,WAAW,EAEjB,MAAM,YAAY,CAAC;AAepB,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;GAIG;AACH;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAA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