@happyvertical/smrt-planner 0.0.0-stage → 0.0.2
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/LICENSE +21 -0
- package/README.md +170 -2
- package/app/404.html +80 -0
- package/app/_app/immutable/assets/0.B5zXkXe_.css +1 -0
- package/app/_app/immutable/assets/10.hpcnxvK1.css +1 -0
- package/app/_app/immutable/assets/11.D7zoXfVV.css +1 -0
- package/app/_app/immutable/assets/12.CPobm1ED.css +1 -0
- package/app/_app/immutable/assets/2.CyaWdRdI.css +1 -0
- package/app/_app/immutable/assets/3.BlPQOes8.css +1 -0
- package/app/_app/immutable/assets/8.2gQeKBp_.css +1 -0
- package/app/_app/immutable/assets/9.HOPT4xtg.css +1 -0
- package/app/_app/immutable/assets/AiSetup.Cb22AigN.css +1 -0
- package/app/_app/immutable/assets/Button.DkP0qkG9.css +1 -0
- package/app/_app/immutable/assets/ConnectTools.BgIJOOGW.css +1 -0
- package/app/_app/immutable/assets/FieldMapForm.BCU-4pO4.css +1 -0
- package/app/_app/immutable/assets/ModelPage.Dd3LcMta.css +1 -0
- package/app/_app/immutable/assets/SectionActions.CTkVuNMF.css +1 -0
- package/app/_app/immutable/assets/SectionIcons.5Udq9vN-.css +1 -0
- package/app/_app/immutable/assets/SegmentedControl.B8SrQacd.css +1 -0
- package/app/_app/immutable/assets/dist.C5nHBk_O.css +1 -0
- package/app/_app/immutable/assets/feedback.BVKAwFck.css +1 -0
- package/app/_app/immutable/assets/forms.BChZ2RWM.css +1 -0
- package/app/_app/immutable/assets/inter-latin-ext.B_-bZUTo.woff2 +0 -0
- package/app/_app/immutable/assets/inter-latin.8kRkwJBP.woff2 +0 -0
- package/app/_app/immutable/assets/jetbrains-mono-latin-ext.Bnd2h4Br.woff2 +0 -0
- package/app/_app/immutable/assets/jetbrains-mono-latin.Db4Uuiha.woff2 +0 -0
- package/app/_app/immutable/assets/ort-wasm-simd-threaded.asyncify.CxOG5pUO.wasm +0 -0
- package/app/_app/immutable/assets/percent.LH0z-ozZ.css +1 -0
- package/app/_app/immutable/assets/space-grotesk-latin-ext.wJGaI8U0.woff2 +0 -0
- package/app/_app/immutable/assets/space-grotesk-latin.DPT1xrvW.woff2 +0 -0
- package/app/_app/immutable/assets/store.CGDwHkkF.css +1 -0
- package/app/_app/immutable/assets/ui.B1A1Zl2p.css +1 -0
- package/app/_app/immutable/assets/workspace.BIMkuZDb.css +1 -0
- package/app/_app/immutable/chunks/1okeBSoq.js +1 -0
- package/app/_app/immutable/chunks/2jFBkS1C.js +1 -0
- package/app/_app/immutable/chunks/6P9zxrzU.js +1 -0
- package/app/_app/immutable/chunks/B32EWqI8.js +9 -0
- package/app/_app/immutable/chunks/B4Kevpe0.js +1 -0
- package/app/_app/immutable/chunks/BJfAXhak.js +3 -0
- package/app/_app/immutable/chunks/BKwRT_1p.js +1 -0
- package/app/_app/immutable/chunks/BQxY8kkL.js +1 -0
- package/app/_app/immutable/chunks/BS4h9ES-.js +1 -0
- package/app/_app/immutable/chunks/BWPhGFHl.js +1 -0
- package/app/_app/immutable/chunks/BYcBM-fh.js +1 -0
- package/app/_app/immutable/chunks/BegKiy2G.js +1 -0
- package/app/_app/immutable/chunks/Bjy-W4x2.js +81 -0
- package/app/_app/immutable/chunks/BnRri03M.js +1 -0
- package/app/_app/immutable/chunks/C7zBd-pD.js +1 -0
- package/app/_app/immutable/chunks/CA-A9Ngs.js +1 -0
- package/app/_app/immutable/chunks/CMhpRMKg.js +1 -0
- package/app/_app/immutable/chunks/CPRHZZeW.js +1 -0
- package/app/_app/immutable/chunks/CRQ1Pmzr.js +1 -0
- package/app/_app/immutable/chunks/CWtfVMDz.js +1 -0
- package/app/_app/immutable/chunks/CgAkqYsL.js +1 -0
- package/app/_app/immutable/chunks/Chyo8rdT.js +3 -0
- package/app/_app/immutable/chunks/Ci0DUht6.js +34 -0
- package/app/_app/immutable/chunks/CmmuWmp6.js +2 -0
- package/app/_app/immutable/chunks/CrFNLK0f.js +1 -0
- package/app/_app/immutable/chunks/CrO3W89x.js +1 -0
- package/app/_app/immutable/chunks/CsprTb3f.js +2 -0
- package/app/_app/immutable/chunks/CyUMm_Wp.js +1 -0
- package/app/_app/immutable/chunks/CygC84VT.js +2 -0
- package/app/_app/immutable/chunks/D0VgZnk1.js +1 -0
- package/app/_app/immutable/chunks/D71UrO5c.js +1 -0
- package/app/_app/immutable/chunks/D7hhQvDO.js +1 -0
- package/app/_app/immutable/chunks/DD7gpKb2.js +1 -0
- package/app/_app/immutable/chunks/DNRgqfTx.js +1 -0
- package/app/_app/immutable/chunks/DRByVC-c.js +1 -0
- package/app/_app/immutable/chunks/DVRKjN-E.js +1 -0
- package/app/_app/immutable/chunks/D_J_XtJy.js +846 -0
- package/app/_app/immutable/chunks/Dbjm4OuC.js +1 -0
- package/app/_app/immutable/chunks/Dc4q22LH.js +42 -0
- package/app/_app/immutable/chunks/Dd_uD5pT.js +1 -0
- package/app/_app/immutable/chunks/DkR8_Ws6.js +2 -0
- package/app/_app/immutable/chunks/Dp9GVO-9.js +1 -0
- package/app/_app/immutable/chunks/DqcD-WtP.js +1 -0
- package/app/_app/immutable/chunks/Dt-HX3Vu.js +1 -0
- package/app/_app/immutable/chunks/FbOxj-PF.js +69 -0
- package/app/_app/immutable/chunks/QukgIHDX.js +1 -0
- package/app/_app/immutable/chunks/WxSPP8QW.js +4 -0
- package/app/_app/immutable/chunks/Xp1g1t4n.js +3 -0
- package/app/_app/immutable/chunks/iET62IRm.js +2 -0
- package/app/_app/immutable/chunks/leQCwW2d.js +1 -0
- package/app/_app/immutable/chunks/p6bgzXiY.js +1 -0
- package/app/_app/immutable/chunks/uBIymjUX.js +1 -0
- package/app/_app/immutable/chunks/xihTtKlq.js +1 -0
- package/app/_app/immutable/entry/app.IZIJXhgq.js +2 -0
- package/app/_app/immutable/entry/start.BuaYHD1N.js +1 -0
- package/app/_app/immutable/nodes/0.m_U8WC7E.js +10 -0
- package/app/_app/immutable/nodes/1.Crw8ULhB.js +1 -0
- package/app/_app/immutable/nodes/10.1nQxyH9H.js +4 -0
- package/app/_app/immutable/nodes/11.Cw0JnQF3.js +1 -0
- package/app/_app/immutable/nodes/12.BIocA1aI.js +1 -0
- package/app/_app/immutable/nodes/2.CR5BwGnt.js +17 -0
- package/app/_app/immutable/nodes/3.1B56hgAG.js +1 -0
- package/app/_app/immutable/nodes/4.SSIC7sUh.js +1 -0
- package/app/_app/immutable/nodes/5.DgdwleDQ.js +1 -0
- package/app/_app/immutable/nodes/6.DmD9rqLU.js +1 -0
- package/app/_app/immutable/nodes/7.DdngsBmo.js +1 -0
- package/app/_app/immutable/nodes/8.D2Mszsua.js +3 -0
- package/app/_app/immutable/nodes/9.CLYsywul.js +1 -0
- package/app/_app/immutable/workers/assets/ort-wasm-simd-threaded.asyncify-CxOG5pUO.wasm +0 -0
- package/app/_app/immutable/workers/llm.worker-wfCOG_uk.js +69 -0
- package/app/_app/immutable/workers/local-speech.worker-DWbfmFUk.js +51 -0
- package/app/_app/version.json +1 -0
- package/app/ai/index.html +89 -0
- package/app/blueprint/index.html +87 -0
- package/app/cookbook/index.html +87 -0
- package/app/index.html +103 -0
- package/app/m/ads/AdDeliveryTier/index.html +96 -0
- package/app/m/ads/AdEvent/index.html +96 -0
- package/app/m/ads/AdFormat/index.html +96 -0
- package/app/m/ads/AdGroup/index.html +96 -0
- package/app/m/ads/AdVariation/index.html +96 -0
- package/app/m/analytics/AnalyticsDataStream/index.html +96 -0
- package/app/m/analytics/AnalyticsEvent/index.html +96 -0
- package/app/m/analytics/AnalyticsProperty/index.html +96 -0
- package/app/m/analytics/AnalyticsReport/index.html +96 -0
- package/app/m/approvals/ApprovalEvent/index.html +96 -0
- package/app/m/approvals/ApprovalPolicy/index.html +96 -0
- package/app/m/approvals/ApprovalRequest/index.html +96 -0
- package/app/m/assets/Asset/index.html +96 -0
- package/app/m/assets/AssetAssociation/index.html +97 -0
- package/app/m/assets/AssetMetafield/index.html +96 -0
- package/app/m/assets/AssetStatus/index.html +96 -0
- package/app/m/assets/AssetType/index.html +96 -0
- package/app/m/assets/Folder/index.html +96 -0
- package/app/m/chat/AgentSession/index.html +96 -0
- package/app/m/chat/ChatMessage/index.html +97 -0
- package/app/m/chat/ChatParticipant/index.html +97 -0
- package/app/m/chat/ChatReaction/index.html +96 -0
- package/app/m/chat/ChatRoom/index.html +96 -0
- package/app/m/chat/ChatThread/index.html +97 -0
- package/app/m/chat/VoiceGatewayTurn/index.html +96 -0
- package/app/m/chat/VoiceSession/index.html +96 -0
- package/app/m/commerce/Agreement/index.html +96 -0
- package/app/m/commerce/Cart/index.html +96 -0
- package/app/m/commerce/Contract/index.html +96 -0
- package/app/m/commerce/ContractLineItem/index.html +97 -0
- package/app/m/commerce/Customer/index.html +96 -0
- package/app/m/commerce/Estimate/index.html +96 -0
- package/app/m/commerce/Fulfillment/index.html +96 -0
- package/app/m/commerce/FulfillmentLineItem/index.html +97 -0
- package/app/m/commerce/Invoice/index.html +96 -0
- package/app/m/commerce/InvoiceLineItem/index.html +97 -0
- package/app/m/commerce/Lease/index.html +96 -0
- package/app/m/commerce/LicenseSale/index.html +96 -0
- package/app/m/commerce/Order/index.html +96 -0
- package/app/m/commerce/Payment/index.html +96 -0
- package/app/m/commerce/PaymentAllocation/index.html +97 -0
- package/app/m/commerce/PaymentInstrument/index.html +96 -0
- package/app/m/commerce/PaymentIntent/index.html +96 -0
- package/app/m/commerce/Payout/index.html +96 -0
- package/app/m/commerce/ProductionOrder/index.html +96 -0
- package/app/m/commerce/PurchaseOrder/index.html +96 -0
- package/app/m/commerce/Vendor/index.html +96 -0
- package/app/m/commerce/WholesaleOrder/index.html +96 -0
- package/app/m/content/Content/index.html +96 -0
- package/app/m/content/ContentContribution/index.html +96 -0
- package/app/m/content/ContentContributionAttachment/index.html +96 -0
- package/app/m/content/ContentContributionRevision/index.html +96 -0
- package/app/m/content/ContentContributionType/index.html +96 -0
- package/app/m/content/ContentContributor/index.html +96 -0
- package/app/m/content/ContentCorrection/index.html +96 -0
- package/app/m/content/ContentFeedSource/index.html +96 -0
- package/app/m/content/ContentGovernanceAssignment/index.html +96 -0
- package/app/m/content/ContentGovernancePolicy/index.html +96 -0
- package/app/m/content/ContentGovernanceProfile/index.html +96 -0
- package/app/m/content/ContentReference/index.html +96 -0
- package/app/m/content/ContentReview/index.html +96 -0
- package/app/m/content/ContentVersion/index.html +96 -0
- package/app/m/content/Contents/index.html +96 -0
- package/app/m/events/Event/index.html +96 -0
- package/app/m/events/EventParticipant/index.html +97 -0
- package/app/m/events/EventSeries/index.html +96 -0
- package/app/m/events/EventType/index.html +96 -0
- package/app/m/facts/Fact/index.html +96 -0
- package/app/m/facts/FactContent/index.html +96 -0
- package/app/m/facts/FactEvidence/index.html +96 -0
- package/app/m/facts/FactSource/index.html +96 -0
- package/app/m/facts/FactSubject/index.html +96 -0
- package/app/m/facts/FactTag/index.html +96 -0
- package/app/m/fields/FieldPolicy/index.html +96 -0
- package/app/m/fields/FieldPolicySuggestion/index.html +96 -0
- package/app/m/fields/FieldUsageCounter/index.html +96 -0
- package/app/m/images/Image/index.html +96 -0
- package/app/m/inventory/InventoryLocation/index.html +96 -0
- package/app/m/inventory/StockLevel/index.html +96 -0
- package/app/m/inventory/StockMovement/index.html +96 -0
- package/app/m/ledgers/Account/index.html +96 -0
- package/app/m/ledgers/Journal/index.html +96 -0
- package/app/m/ledgers/JournalEntry/index.html +97 -0
- package/app/m/manufacturing/Assembly/index.html +96 -0
- package/app/m/manufacturing/BillOfMaterials/index.html +96 -0
- package/app/m/manufacturing/BomLine/index.html +96 -0
- package/app/m/manufacturing/Operation/index.html +96 -0
- package/app/m/manufacturing/ProductionRun/index.html +96 -0
- package/app/m/manufacturing/ProductionRunCompletion/index.html +96 -0
- package/app/m/manufacturing/RoutingStep/index.html +96 -0
- package/app/m/marketing/Campaign/index.html +96 -0
- package/app/m/marketing/CampaignChannel/index.html +96 -0
- package/app/m/marketing/CampaignMetricSnapshot/index.html +96 -0
- package/app/m/messages/Account/index.html +96 -0
- package/app/m/messages/Attachment/index.html +96 -0
- package/app/m/messages/Blacklist/index.html +96 -0
- package/app/m/messages/Email/failed-sends/index.html +96 -0
- package/app/m/messages/Email/index.html +96 -0
- package/app/m/messages/Email/mailbox/index.html +96 -0
- package/app/m/messages/EmailAccount/index.html +96 -0
- package/app/m/messages/EmailFolder/index.html +96 -0
- package/app/m/messages/Message/index.html +96 -0
- package/app/m/messages/MessagingEndpoint/index.html +96 -0
- package/app/m/messages/PersonaMessageRoute/index.html +96 -0
- package/app/m/messages/SlackAccount/index.html +96 -0
- package/app/m/messages/SlackMessage/index.html +96 -0
- package/app/m/messages/TelegramAccount/index.html +96 -0
- package/app/m/messages/Tweet/index.html +96 -0
- package/app/m/messages/TwitterAccount/index.html +96 -0
- package/app/m/messages/Whitelist/index.html +96 -0
- package/app/m/messages/ZulipAccount/index.html +96 -0
- package/app/m/places/Place/index.html +96 -0
- package/app/m/places/PlaceType/index.html +96 -0
- package/app/m/preferences/UiPreferenceRecord/index.html +96 -0
- package/app/m/products/Category/index.html +96 -0
- package/app/m/products/Material/index.html +96 -0
- package/app/m/products/Product/index.html +96 -0
- package/app/m/products/Product/ingredients/index.html +96 -0
- package/app/m/products/ProductVariant/index.html +97 -0
- package/app/m/products/Sku/index.html +97 -0
- package/app/m/profiles/ApiKey/index.html +96 -0
- package/app/m/profiles/Bot/index.html +96 -0
- package/app/m/profiles/MagicLinkToken/index.html +96 -0
- package/app/m/profiles/NostrIdentity/index.html +96 -0
- package/app/m/profiles/OidcIdentity/index.html +96 -0
- package/app/m/profiles/Organization/index.html +96 -0
- package/app/m/profiles/Person/index.html +96 -0
- package/app/m/profiles/Profile/index.html +96 -0
- package/app/m/profiles/ProfileMetadata/index.html +96 -0
- package/app/m/profiles/ProfileMetafield/index.html +96 -0
- package/app/m/profiles/ProfileRelationship/index.html +96 -0
- package/app/m/profiles/ProfileRelationshipTerm/index.html +96 -0
- package/app/m/profiles/ProfileRelationshipType/index.html +96 -0
- package/app/m/profiles/ProfileType/index.html +96 -0
- package/app/m/projects/Comment/index.html +97 -0
- package/app/m/projects/Issue/index.html +96 -0
- package/app/m/projects/Label/index.html +96 -0
- package/app/m/projects/Project/index.html +96 -0
- package/app/m/projects/ProjectIntegration/index.html +96 -0
- package/app/m/projects/PullRequest/index.html +96 -0
- package/app/m/projects/Repository/index.html +96 -0
- package/app/m/properties/Property/index.html +96 -0
- package/app/m/properties/Zone/index.html +96 -0
- package/app/m/reports/RuntimeReport/index.html +96 -0
- package/app/m/reports/SmrtPrincipalReportRefreshTask/index.html +96 -0
- package/app/m/reports/SmrtReportLock/index.html +96 -0
- package/app/m/reports/SmrtReportRefreshTask/index.html +96 -0
- package/app/m/reports/SmrtReportRun/index.html +96 -0
- package/app/m/reports/SmrtReportSchedule/index.html +96 -0
- package/app/m/reports/SmrtReportWatermark/index.html +96 -0
- package/app/m/sales/AttributionException/index.html +96 -0
- package/app/m/sales/AttributionPolicy/index.html +96 -0
- package/app/m/sales/Commission/index.html +96 -0
- package/app/m/sales/CommissionAdjustment/index.html +96 -0
- package/app/m/sales/CommissionPayout/index.html +96 -0
- package/app/m/sales/CommissionPlan/index.html +96 -0
- package/app/m/sales/Earner/index.html +96 -0
- package/app/m/sales/EarnerSourceAttribution/index.html +96 -0
- package/app/m/sales/EarningEvent/index.html +96 -0
- package/app/m/sales/ExecutedAgreement/index.html +96 -0
- package/app/m/sales/Lead/index.html +96 -0
- package/app/m/sales/Opportunity/index.html +96 -0
- package/app/m/sales/OpportunityConversion/index.html +96 -0
- package/app/m/sales/PipelineDefinition/index.html +96 -0
- package/app/m/sales/PipelineStage/index.html +97 -0
- package/app/m/sales/Referral/index.html +96 -0
- package/app/m/sales/ReferralAgreement/index.html +96 -0
- package/app/m/sales/ReferralLink/index.html +96 -0
- package/app/m/sales/ReferralProgram/index.html +96 -0
- package/app/m/sales/ReferralTermSnapshot/index.html +96 -0
- package/app/m/sales/ReferralTouch/index.html +96 -0
- package/app/m/sales/Referrer/index.html +96 -0
- package/app/m/sales/SalesActivity/index.html +96 -0
- package/app/m/sales/SalesRepresentative/index.html +96 -0
- package/app/m/sites/Site/index.html +96 -0
- package/app/m/sites/SiteAgentBinding/index.html +96 -0
- package/app/m/social/OAuthState/index.html +96 -0
- package/app/m/social/SocialAccount/index.html +96 -0
- package/app/m/social/SocialPost/index.html +96 -0
- package/app/m/social/SocialPostAnalyticsSnapshot/index.html +96 -0
- package/app/m/subscriptions/BillingAdjustment/index.html +96 -0
- package/app/m/subscriptions/ClientCharge/index.html +96 -0
- package/app/m/subscriptions/CreditGrant/index.html +96 -0
- package/app/m/subscriptions/PricingRule/index.html +96 -0
- package/app/m/subscriptions/RetailCharge/index.html +96 -0
- package/app/m/subscriptions/SpendingPolicy/index.html +96 -0
- package/app/m/subscriptions/SubscriptionPlan/index.html +96 -0
- package/app/m/subscriptions/TenantSubscription/index.html +96 -0
- package/app/m/subscriptions/TenantUsageMetric/index.html +96 -0
- package/app/m/support/ServiceTimeEntry/index.html +96 -0
- package/app/m/support/SupportAiRun/index.html +96 -0
- package/app/m/support/SupportAvailability/index.html +96 -0
- package/app/m/support/SupportCase/index.html +96 -0
- package/app/m/support/SupportCaseEvent/index.html +96 -0
- package/app/m/support/SupportChannelBinding/index.html +96 -0
- package/app/m/support/SupportCharge/index.html +96 -0
- package/app/m/support/SupportCompensation/index.html +96 -0
- package/app/m/support/SupportCompensationPlan/index.html +96 -0
- package/app/m/support/SupportEscalation/index.html +96 -0
- package/app/m/support/SupportInteraction/index.html +96 -0
- package/app/m/support/SupportPlan/index.html +96 -0
- package/app/m/support/SupportPolicy/index.html +96 -0
- package/app/m/support/SupportQualification/index.html +96 -0
- package/app/m/support/SupportServiceTarget/index.html +96 -0
- package/app/m/support/SupportSpecialist/index.html +96 -0
- package/app/m/support/SupportWorkLink/index.html +96 -0
- package/app/m/tags/Tag/index.html +96 -0
- package/app/m/tags/TagAlias/index.html +96 -0
- package/app/m/timesheets/AttendanceBreak/index.html +96 -0
- package/app/m/timesheets/AttendancePunch/index.html +96 -0
- package/app/m/timesheets/ServiceChargeSnapshot/index.html +96 -0
- package/app/m/timesheets/ServiceCompensationSnapshot/index.html +96 -0
- package/app/m/timesheets/ServiceTimeEntry/index.html +96 -0
- package/app/m/users/AccessRequest/index.html +96 -0
- package/app/m/users/Group/index.html +96 -0
- package/app/m/users/GroupMember/index.html +96 -0
- package/app/m/users/GroupRole/index.html +96 -0
- package/app/m/users/Membership/index.html +97 -0
- package/app/m/users/MembershipOverride/index.html +96 -0
- package/app/m/users/Permission/index.html +96 -0
- package/app/m/users/ResourceGrant/index.html +96 -0
- package/app/m/users/Role/index.html +96 -0
- package/app/m/users/RolePermission/index.html +96 -0
- package/app/m/users/Session/index.html +96 -0
- package/app/m/users/Tenant/index.html +96 -0
- package/app/m/users/TenantIntegration/index.html +96 -0
- package/app/m/users/TenantPermissionOverride/index.html +96 -0
- package/app/m/users/User/index.html +96 -0
- package/app/m/users/UsersCliAuthRequest/index.html +96 -0
- package/app/m/users/UsersMagicLinkToken/index.html +96 -0
- package/app/m/video/Character/index.html +96 -0
- package/app/m/video/CharacterAsset/index.html +96 -0
- package/app/m/video/CompositeJob/index.html +96 -0
- package/app/m/video/Performer/index.html +96 -0
- package/app/m/video/PerformerAsset/index.html +96 -0
- package/app/m/video/Scene/index.html +96 -0
- package/app/m/video/SceneAsset/index.html +96 -0
- package/app/m/video/VideoComposition/index.html +96 -0
- package/app/m/video/VideoCompositionAsset/index.html +96 -0
- package/app/m/video/VideoSequence/index.html +96 -0
- package/app/m/video/VideoSequenceAsset/index.html +96 -0
- package/app/m/video/VideoShot/index.html +96 -0
- package/app/m/video/VideoShotAsset/index.html +96 -0
- package/app/m/video/VideoShotCharacter/index.html +96 -0
- package/app/m/video/VideoWorkflow/index.html +96 -0
- package/app/m/voice/VoiceOutput/index.html +96 -0
- package/app/m/voice/VoiceProfile/index.html +96 -0
- package/app/m/voice/VoiceSample/index.html +96 -0
- package/app/packages/ads/index.html +92 -0
- package/app/packages/analytics/index.html +92 -0
- package/app/packages/approvals/index.html +92 -0
- package/app/packages/assets/index.html +92 -0
- package/app/packages/chat/index.html +92 -0
- package/app/packages/comments/index.html +92 -0
- package/app/packages/commerce/index.html +92 -0
- package/app/packages/content/index.html +92 -0
- package/app/packages/events/index.html +92 -0
- package/app/packages/expenses/index.html +92 -0
- package/app/packages/facts/index.html +92 -0
- package/app/packages/fields/index.html +92 -0
- package/app/packages/human-resources/index.html +92 -0
- package/app/packages/images/index.html +92 -0
- package/app/packages/index.html +90 -0
- package/app/packages/inventory/index.html +92 -0
- package/app/packages/ledgers/index.html +92 -0
- package/app/packages/manufacturing/index.html +92 -0
- package/app/packages/marketing/index.html +92 -0
- package/app/packages/messages/index.html +92 -0
- package/app/packages/places/index.html +92 -0
- package/app/packages/preferences/index.html +92 -0
- package/app/packages/products/index.html +92 -0
- package/app/packages/profiles/index.html +92 -0
- package/app/packages/projects/index.html +92 -0
- package/app/packages/properties/index.html +92 -0
- package/app/packages/reports/index.html +92 -0
- package/app/packages/sales/index.html +92 -0
- package/app/packages/sites/index.html +92 -0
- package/app/packages/social/index.html +92 -0
- package/app/packages/subscriptions/index.html +92 -0
- package/app/packages/support/index.html +92 -0
- package/app/packages/tags/index.html +92 -0
- package/app/packages/timesheets/index.html +92 -0
- package/app/packages/users/index.html +92 -0
- package/app/packages/video/index.html +92 -0
- package/app/packages/voice/index.html +92 -0
- package/app/recipes/account-access/help/index.html +93 -0
- package/app/recipes/account-access/index.html +95 -0
- package/app/recipes/activity/help/index.html +93 -0
- package/app/recipes/activity/index.html +94 -0
- package/app/recipes/agreements/help/index.html +93 -0
- package/app/recipes/agreements/index.html +96 -0
- package/app/recipes/analytics.reports/help/index.html +93 -0
- package/app/recipes/analytics.reports/index.html +94 -0
- package/app/recipes/assets/help/index.html +93 -0
- package/app/recipes/assets/index.html +95 -0
- package/app/recipes/billing/help/index.html +93 -0
- package/app/recipes/billing/index.html +95 -0
- package/app/recipes/chat.assistant/help/index.html +93 -0
- package/app/recipes/chat.assistant/index.html +94 -0
- package/app/recipes/comments/help/index.html +93 -0
- package/app/recipes/comments/index.html +94 -0
- package/app/recipes/commerce.customers/help/index.html +93 -0
- package/app/recipes/commerce.customers/index.html +94 -0
- package/app/recipes/commerce.estimates/help/index.html +93 -0
- package/app/recipes/commerce.estimates/index.html +94 -0
- package/app/recipes/commerce.purchases/help/index.html +93 -0
- package/app/recipes/commerce.purchases/index.html +94 -0
- package/app/recipes/commerce.sales/help/index.html +93 -0
- package/app/recipes/commerce.sales/index.html +94 -0
- package/app/recipes/commerce.vendors/help/index.html +93 -0
- package/app/recipes/commerce.vendors/index.html +94 -0
- package/app/recipes/commerce.wholesale/help/index.html +93 -0
- package/app/recipes/commerce.wholesale/index.html +94 -0
- package/app/recipes/events.calendar/help/index.html +93 -0
- package/app/recipes/events.calendar/index.html +94 -0
- package/app/recipes/fields.form-customization/help/index.html +93 -0
- package/app/recipes/fields.form-customization/index.html +94 -0
- package/app/recipes/inventory.stock/help/index.html +93 -0
- package/app/recipes/inventory.stock/index.html +94 -0
- package/app/recipes/ledgers.bookkeeping/help/index.html +93 -0
- package/app/recipes/ledgers.bookkeeping/index.html +94 -0
- package/app/recipes/messages/help/index.html +93 -0
- package/app/recipes/messages/index.html +95 -0
- package/app/recipes/products/help/index.html +93 -0
- package/app/recipes/products/index.html +96 -0
- package/app/recipes/projects.tracker/help/index.html +93 -0
- package/app/recipes/projects.tracker/index.html +94 -0
- package/app/recipes/reports.materialized/help/index.html +93 -0
- package/app/recipes/reports.materialized/index.html +94 -0
- package/app/recipes/sales.pipeline/help/index.html +93 -0
- package/app/recipes/sales.pipeline/index.html +94 -0
- package/app/recipes/tags.taxonomy/help/index.html +93 -0
- package/app/recipes/tags.taxonomy/index.html +94 -0
- package/app/recipes/team-collaboration/help/index.html +93 -0
- package/app/recipes/team-collaboration/index.html +94 -0
- package/app/s/custom-billing/index.html +89 -0
- package/app/s/custom-buying/index.html +89 -0
- package/app/s/custom-classes/index.html +89 -0
- package/app/s/custom-jobs/index.html +89 -0
- package/app/s/custom-kitchen/index.html +89 -0
- package/app/s/custom-material/index.html +89 -0
- package/app/s/custom-members/index.html +89 -0
- package/app/s/custom-parts/index.html +89 -0
- package/app/s/custom-schedule/index.html +89 -0
- package/app/s/custom-shop/index.html +89 -0
- package/app/s/custom-wholesale/index.html +89 -0
- package/app/s/section-access-control/index.html +89 -0
- package/app/s/section-account-security/index.html +89 -0
- package/app/s/section-accounting/index.html +89 -0
- package/app/s/section-activity/index.html +89 -0
- package/app/s/section-agreements/index.html +89 -0
- package/app/s/section-analytics/index.html +89 -0
- package/app/s/section-assets/index.html +89 -0
- package/app/s/section-billing/index.html +89 -0
- package/app/s/section-calendar/index.html +89 -0
- package/app/s/section-catalog/index.html +89 -0
- package/app/s/section-chat.assistant/index.html +89 -0
- package/app/s/section-comments/index.html +89 -0
- package/app/s/section-fields.form-customization/index.html +89 -0
- package/app/s/section-messages/index.html +89 -0
- package/app/s/section-more/index.html +89 -0
- package/app/s/section-operations/index.html +89 -0
- package/app/s/section-projects/index.html +89 -0
- package/app/s/section-purchasing/index.html +89 -0
- package/app/s/section-reports.materialized/index.html +89 -0
- package/app/s/section-sales/index.html +89 -0
- package/app/s/section-taxonomy/index.html +89 -0
- package/app/s/section-team/index.html +89 -0
- package/dist/ai/echo-gate.d.ts +13 -0
- package/dist/ai/echo-gate.js +21 -0
- package/dist/ai/icons.d.ts +9 -0
- package/dist/ai/icons.js +9 -0
- package/dist/ai/instance.d.ts +3 -0
- package/dist/ai/instance.js +25 -0
- package/dist/ai/state.svelte.d.ts +130 -0
- package/dist/ai/state.svelte.js +316 -0
- package/dist/ai/status.d.ts +67 -0
- package/dist/ai/status.js +125 -0
- package/dist/assets/smrt-mark.svg +38 -0
- package/dist/assistant/change.d.ts +101 -0
- package/dist/assistant/change.js +209 -0
- package/dist/assistant/engine.d.ts +20 -0
- package/dist/assistant/engine.js +43 -0
- package/dist/assistant/llm.worker.d.ts +1 -0
- package/dist/assistant/llm.worker.js +7 -0
- package/dist/assistant/match.d.ts +59 -0
- package/dist/assistant/match.js +271 -0
- package/dist/assistant/models.d.ts +38 -0
- package/dist/assistant/models.js +57 -0
- package/dist/assistant/offers.svelte.d.ts +36 -0
- package/dist/assistant/offers.svelte.js +59 -0
- package/dist/assistant/prefs.d.ts +14 -0
- package/dist/assistant/prefs.js +32 -0
- package/dist/assistant/prompt.d.ts +23 -0
- package/dist/assistant/prompt.js +163 -0
- package/dist/assistant/session.svelte.d.ts +74 -0
- package/dist/assistant/session.svelte.js +181 -0
- package/dist/assistant/theme-undo.svelte.d.ts +38 -0
- package/dist/assistant/theme-undo.svelte.js +50 -0
- package/dist/assistant/transport.d.ts +73 -0
- package/dist/assistant/transport.js +231 -0
- package/dist/assistant/voice-host.d.ts +10 -0
- package/dist/assistant/voice-host.js +17 -0
- package/dist/assistant/voice.svelte.d.ts +107 -0
- package/dist/assistant/voice.svelte.js +261 -0
- package/dist/catalog/catalog.json +89663 -0
- package/dist/catalog/generate/build.d.ts +33 -0
- package/dist/catalog/generate/build.js +131 -0
- package/dist/catalog/generate/exclusions.d.ts +18 -0
- package/dist/catalog/generate/exclusions.js +33 -0
- package/dist/catalog/generate/extract.d.ts +90 -0
- package/dist/catalog/generate/extract.js +326 -0
- package/dist/catalog/generate/local.d.ts +8 -0
- package/dist/catalog/generate/local.js +45 -0
- package/dist/catalog/generate/recipe-demo.d.ts +11 -0
- package/dist/catalog/generate/recipe-demo.js +29 -0
- package/dist/catalog/generate/recipe-metadata.d.ts +12 -0
- package/dist/catalog/generate/recipe-metadata.js +138 -0
- package/dist/catalog/generate/registry.d.ts +14 -0
- package/dist/catalog/generate/registry.js +83 -0
- package/dist/catalog/index.d.ts +21 -0
- package/dist/catalog/index.js +53 -0
- package/dist/catalog/types.d.ts +141 -0
- package/dist/catalog/types.js +8 -0
- package/dist/components/AiSetup.svelte +528 -0
- package/dist/components/AiSetup.svelte.d.ts +8 -0
- package/dist/components/AiStatusIcons.svelte +86 -0
- package/dist/components/AiStatusIcons.svelte.d.ts +18 -0
- package/dist/components/AppSettings.svelte +100 -0
- package/dist/components/AppSettings.svelte.d.ts +10 -0
- package/dist/components/BrowserAssistant.svelte +318 -0
- package/dist/components/BrowserAssistant.svelte.d.ts +8 -0
- package/dist/components/ChildRecords.svelte +331 -0
- package/dist/components/ChildRecords.svelte.d.ts +15 -0
- package/dist/components/ConnectTools.svelte +145 -0
- package/dist/components/ConnectTools.svelte.d.ts +8 -0
- package/dist/components/CookbooksPanel.svelte +308 -0
- package/dist/components/CookbooksPanel.svelte.d.ts +3 -0
- package/dist/components/ExportPanel.svelte +217 -0
- package/dist/components/ExportPanel.svelte.d.ts +3 -0
- package/dist/components/FeatureCard.svelte +197 -0
- package/dist/components/FeatureCard.svelte.d.ts +13 -0
- package/dist/components/FeaturesPanel.svelte +155 -0
- package/dist/components/FeaturesPanel.svelte.d.ts +3 -0
- package/dist/components/FieldInput.svelte +307 -0
- package/dist/components/FieldInput.svelte.d.ts +24 -0
- package/dist/components/FieldMapForm.svelte +173 -0
- package/dist/components/FieldMapForm.svelte.d.ts +18 -0
- package/dist/components/FormWorkspace.svelte +274 -0
- package/dist/components/FormWorkspace.svelte.d.ts +19 -0
- package/dist/components/HelpView.svelte +129 -0
- package/dist/components/HelpView.svelte.d.ts +12 -0
- package/dist/components/ModelOptions.svelte +239 -0
- package/dist/components/ModelOptions.svelte.d.ts +12 -0
- package/dist/components/ModelPage.svelte +295 -0
- package/dist/components/ModelPage.svelte.d.ts +9 -0
- package/dist/components/ModelWorkspace.svelte +488 -0
- package/dist/components/ModelWorkspace.svelte.d.ts +32 -0
- package/dist/components/PlannerEditBridge.svelte +36 -0
- package/dist/components/PlannerEditBridge.svelte.d.ts +3 -0
- package/dist/components/PlannerPalette.svelte +38 -0
- package/dist/components/PlannerPalette.svelte.d.ts +18 -0
- package/dist/components/RecipeCards.svelte +145 -0
- package/dist/components/RecipeCards.svelte.d.ts +3 -0
- package/dist/components/RecipeHelp.svelte +54 -0
- package/dist/components/RecipeHelp.svelte.d.ts +9 -0
- package/dist/components/RecipeOptions.svelte +160 -0
- package/dist/components/RecipeOptions.svelte.d.ts +9 -0
- package/dist/components/RecordFeatures.svelte +240 -0
- package/dist/components/RecordFeatures.svelte.d.ts +3 -0
- package/dist/components/RelationField.svelte +175 -0
- package/dist/components/RelationField.svelte.d.ts +16 -0
- package/dist/components/SectionActions.svelte +91 -0
- package/dist/components/SectionActions.svelte.d.ts +12 -0
- package/dist/components/SectionIcons.svelte +98 -0
- package/dist/components/SectionIcons.svelte.d.ts +15 -0
- package/dist/components/SectionOverview.svelte +65 -0
- package/dist/components/SectionOverview.svelte.d.ts +14 -0
- package/dist/components/SectionPage.svelte +230 -0
- package/dist/components/SectionPage.svelte.d.ts +7 -0
- package/dist/components/SettingsPanel.svelte +60 -0
- package/dist/components/SettingsPanel.svelte.d.ts +7 -0
- package/dist/components/ThemeBridge.svelte +56 -0
- package/dist/components/ThemeBridge.svelte.d.ts +3 -0
- package/dist/components/ThemeSection.svelte +167 -0
- package/dist/components/ThemeSection.svelte.d.ts +11 -0
- package/dist/components/VariantGridForm.svelte +309 -0
- package/dist/components/VariantGridForm.svelte.d.ts +12 -0
- package/dist/components/VoiceTyping.svelte +108 -0
- package/dist/components/VoiceTyping.svelte.d.ts +7 -0
- package/dist/cookbook/assemble.d.ts +16 -0
- package/dist/cookbook/assemble.js +29 -0
- package/dist/cookbook/file.d.ts +7 -0
- package/dist/cookbook/file.js +25 -0
- package/dist/cookbook/legacy.d.ts +9 -0
- package/dist/cookbook/legacy.js +87 -0
- package/dist/cookbook/migrate.d.ts +22 -0
- package/dist/cookbook/migrate.js +106 -0
- package/dist/cookbook/parse.d.ts +16 -0
- package/dist/cookbook/parse.js +246 -0
- package/dist/cookbook/storage.d.ts +45 -0
- package/dist/cookbook/storage.js +98 -0
- package/dist/cookbook/store.svelte.d.ts +94 -0
- package/dist/cookbook/store.svelte.js +231 -0
- package/dist/cookbook/types.d.ts +76 -0
- package/dist/cookbook/types.js +11 -0
- package/dist/cookbook/validate.d.ts +14 -0
- package/dist/cookbook/validate.js +29 -0
- package/dist/core/app.d.ts +37 -0
- package/dist/core/app.js +119 -0
- package/dist/core/catalog.d.ts +19 -0
- package/dist/core/catalog.js +9 -0
- package/dist/core/headless.d.ts +52 -0
- package/dist/core/headless.js +39 -0
- package/dist/core/index.d.ts +28 -0
- package/dist/core/index.js +28 -0
- package/dist/core/prompt.d.ts +38 -0
- package/dist/core/prompt.js +95 -0
- package/dist/core/reply.d.ts +60 -0
- package/dist/core/reply.js +89 -0
- package/dist/core/request.d.ts +15 -0
- package/dist/core/request.js +55 -0
- package/dist/data/children.d.ts +20 -0
- package/dist/data/children.js +80 -0
- package/dist/data/columns.d.ts +56 -0
- package/dist/data/columns.js +150 -0
- package/dist/data/context.d.ts +8 -0
- package/dist/data/context.js +19 -0
- package/dist/data/derived.d.ts +79 -0
- package/dist/data/derived.js +139 -0
- package/dist/data/display.d.ts +23 -0
- package/dist/data/display.js +84 -0
- package/dist/data/fakes.d.ts +52 -0
- package/dist/data/fakes.js +443 -0
- package/dist/data/format.d.ts +48 -0
- package/dist/data/format.js +121 -0
- package/dist/data/labels.d.ts +45 -0
- package/dist/data/labels.js +179 -0
- package/dist/data/packs.d.ts +95 -0
- package/dist/data/packs.js +830 -0
- package/dist/data/payments.d.ts +17 -0
- package/dist/data/payments.js +60 -0
- package/dist/data/planner-source.d.ts +7 -0
- package/dist/data/planner-source.js +32 -0
- package/dist/data/source.d.ts +119 -0
- package/dist/data/source.js +432 -0
- package/dist/features/catalogue.d.ts +96 -0
- package/dist/features/catalogue.js +225 -0
- package/dist/features/demo.d.ts +36 -0
- package/dist/features/demo.js +66 -0
- package/dist/features/palette.d.ts +39 -0
- package/dist/features/palette.js +53 -0
- package/dist/fields/address.d.ts +23 -0
- package/dist/fields/address.js +39 -0
- package/dist/fields/invalid.d.ts +2 -0
- package/dist/fields/invalid.js +8 -0
- package/dist/fields/modal.d.ts +7 -0
- package/dist/fields/modal.js +14 -0
- package/dist/fields/percent.d.ts +8 -0
- package/dist/fields/percent.js +16 -0
- package/dist/fields/renderer.d.ts +17 -0
- package/dist/fields/renderer.js +43 -0
- package/dist/forms/active.d.ts +16 -0
- package/dist/forms/active.js +24 -0
- package/dist/forms/fieldMap.d.ts +44 -0
- package/dist/forms/fieldMap.js +134 -0
- package/dist/forms/shared.d.ts +41 -0
- package/dist/forms/shared.js +138 -0
- package/dist/forms/stock.d.ts +28 -0
- package/dist/forms/stock.js +104 -0
- package/dist/forms/variantGrid.d.ts +83 -0
- package/dist/forms/variantGrid.js +283 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +16 -0
- package/dist/inference/byo.svelte.d.ts +90 -0
- package/dist/inference/byo.svelte.js +295 -0
- package/dist/inference/config.d.ts +77 -0
- package/dist/inference/config.js +205 -0
- package/dist/inference/host.d.ts +40 -0
- package/dist/inference/host.js +57 -0
- package/dist/inference/openai.d.ts +59 -0
- package/dist/inference/openai.js +207 -0
- package/dist/inference/presets.d.ts +5 -0
- package/dist/inference/presets.js +46 -0
- package/dist/kitchen/client.d.ts +39 -0
- package/dist/kitchen/client.js +115 -0
- package/dist/kitchen/fragment.d.ts +30 -0
- package/dist/kitchen/fragment.js +49 -0
- package/dist/kitchen/state.svelte.d.ts +26 -0
- package/dist/kitchen/state.svelte.js +45 -0
- package/dist/library/apply.d.ts +17 -0
- package/dist/library/apply.js +32 -0
- package/dist/library/document.d.ts +12 -0
- package/dist/library/document.js +27 -0
- package/dist/library/icons.d.ts +6 -0
- package/dist/library/icons.js +26 -0
- package/dist/library/index.d.ts +8 -0
- package/dist/library/index.js +12 -0
- package/dist/library/library.json +788 -0
- package/dist/library/menu.d.ts +18 -0
- package/dist/library/menu.js +72 -0
- package/dist/library/state.svelte.d.ts +10 -0
- package/dist/library/state.svelte.js +28 -0
- package/dist/library/types.d.ts +57 -0
- package/dist/library/types.js +1 -0
- package/dist/overviews/definitions.d.ts +24 -0
- package/dist/overviews/definitions.js +97 -0
- package/dist/overviews/page.d.ts +21 -0
- package/dist/overviews/page.js +36 -0
- package/dist/overviews/registry.d.ts +44 -0
- package/dist/overviews/registry.js +191 -0
- package/dist/overviews/validate.d.ts +32 -0
- package/dist/overviews/validate.js +91 -0
- package/dist/planner/Planner.svelte +204 -0
- package/dist/planner/Planner.svelte.d.ts +4 -0
- package/dist/planner/app.svelte.d.ts +6 -0
- package/dist/planner/app.svelte.js +23 -0
- package/dist/planner/assistant.d.ts +46 -0
- package/dist/planner/assistant.js +122 -0
- package/dist/planner/commands/adapter.d.ts +121 -0
- package/dist/planner/commands/adapter.js +597 -0
- package/dist/planner/commands/catalog.d.ts +19 -0
- package/dist/planner/commands/catalog.js +54 -0
- package/dist/planner/commands/controller.svelte.d.ts +13 -0
- package/dist/planner/commands/controller.svelte.js +77 -0
- package/dist/planner/commands/index.d.ts +15 -0
- package/dist/planner/commands/index.js +15 -0
- package/dist/planner/commands/schemas.d.ts +25 -0
- package/dist/planner/commands/schemas.js +67 -0
- package/dist/planner/commands/slices.d.ts +18 -0
- package/dist/planner/commands/slices.js +49 -0
- package/dist/planner/commands/types.d.ts +80 -0
- package/dist/planner/commands/types.js +18 -0
- package/dist/planner/create.d.ts +4 -0
- package/dist/planner/create.js +22 -0
- package/dist/planner/instance.d.ts +15 -0
- package/dist/planner/instance.js +22 -0
- package/dist/planner/query.d.ts +16 -0
- package/dist/planner/query.js +28 -0
- package/dist/planner/selection.d.ts +15 -0
- package/dist/planner/selection.js +38 -0
- package/dist/planner/selection.svelte.d.ts +29 -0
- package/dist/planner/selection.svelte.js +54 -0
- package/dist/planner/tab.svelte.d.ts +11 -0
- package/dist/planner/tab.svelte.js +22 -0
- package/dist/planner/types.d.ts +41 -0
- package/dist/planner/types.js +1 -0
- package/dist/recipes/cards.d.ts +55 -0
- package/dist/recipes/cards.js +80 -0
- package/dist/recipes/features.d.ts +53 -0
- package/dist/recipes/features.js +97 -0
- package/dist/recipes/help/descriptions.json +373 -0
- package/dist/recipes/help.d.ts +121 -0
- package/dist/recipes/help.js +262 -0
- package/dist/recipes/index.d.ts +65 -0
- package/dist/recipes/index.js +95 -0
- package/dist/recipes/merge.d.ts +26 -0
- package/dist/recipes/merge.js +21 -0
- package/dist/recipes/overlay.json +409 -0
- package/dist/recipes/plan-data.d.ts +41 -0
- package/dist/recipes/plan-data.js +97 -0
- package/dist/recipes/plumbing.d.ts +70 -0
- package/dist/recipes/plumbing.js +185 -0
- package/dist/recipes/policy.d.ts +118 -0
- package/dist/recipes/policy.js +268 -0
- package/dist/recipes/resolve.d.ts +19 -0
- package/dist/recipes/resolve.js +65 -0
- package/dist/recipes/scope.d.ts +25 -0
- package/dist/recipes/scope.js +31 -0
- package/dist/recipes/sections.d.ts +49 -0
- package/dist/recipes/sections.js +84 -0
- package/dist/recipes/state.svelte.d.ts +67 -0
- package/dist/recipes/state.svelte.js +112 -0
- package/dist/recipes/types.d.ts +322 -0
- package/dist/recipes/types.js +8 -0
- package/dist/sections/entries.d.ts +30 -0
- package/dist/sections/entries.js +57 -0
- package/dist/sections/info.d.ts +16 -0
- package/dist/sections/info.js +39 -0
- package/dist/sections/path.d.ts +12 -0
- package/dist/sections/path.js +18 -0
- package/dist/settings/app-settings.d.ts +44 -0
- package/dist/settings/app-settings.js +138 -0
- package/dist/settings/currencies.d.ts +2 -0
- package/dist/settings/currencies.js +8 -0
- package/dist/theme/runtime.d.ts +14 -0
- package/dist/theme/runtime.js +27 -0
- package/dist/theme/theme.d.ts +47 -0
- package/dist/theme/theme.js +122 -0
- package/dist/upstream/CustomerSelect.svelte +60 -0
- package/dist/upstream/CustomerSelect.svelte.d.ts +17 -0
- package/dist/upstream/VendorSelect.svelte +60 -0
- package/dist/upstream/VendorSelect.svelte.d.ts +17 -0
- package/dist/upstream/overlay.d.ts +10 -0
- package/dist/upstream/overlay.js +49 -0
- package/dist/upstream/partySelect.d.ts +8 -0
- package/dist/upstream/partySelect.js +21 -0
- package/dist/upstream/partyTypes.d.ts +64 -0
- package/dist/upstream/partyTypes.js +8 -0
- package/dist/upstream/relations.d.ts +2 -0
- package/dist/upstream/relations.js +24 -0
- package/dist/upstream/selects.d.ts +26 -0
- package/dist/upstream/selects.js +20 -0
- package/dist/upstream/widgets.d.ts +20 -0
- package/dist/upstream/widgets.js +30 -0
- package/package.json +81 -3
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The planner without a UI: what a Node server needs to implement the host
|
|
3
|
+
* contract (`docs/inference-host.md`). Rune-free and importable by plain Node,
|
|
4
|
+
* no Vite and no Svelte compiler.
|
|
5
|
+
*
|
|
6
|
+
* - command tool schemas and input types, and the `PlanSnapshot` type;
|
|
7
|
+
* - `buildHostPrompt`: the system prompt and messages for one chat call;
|
|
8
|
+
* - `replySchema` / `buildReplySchema`: the JSON Schema of the model's answer;
|
|
9
|
+
* - `parseHostReply`: validate that answer into the response body;
|
|
10
|
+
* - `parseHostRequest`: validate the request body;
|
|
11
|
+
* - the library catalog (recipes and cookbooks) the prompt is built from;
|
|
12
|
+
* - `createHeadlessPlanner`: the command set over a plain-object plan (many may
|
|
13
|
+
* coexist): smrt's cookbook command engine behind the planner's names, the
|
|
14
|
+
* same commands, validation and snapshots as the browser controller.
|
|
15
|
+
*
|
|
16
|
+
* The browser controller (`createPlannerController`) is not here: it drives
|
|
17
|
+
* the UI's stores and lives in `./commands` (Svelte source).
|
|
18
|
+
*
|
|
19
|
+
* @module
|
|
20
|
+
*/
|
|
21
|
+
export { HOST_HISTORY_CHARS, HOST_HISTORY_TURNS, HOST_MESSAGE_CHARS, HOST_WIRE_VERSION, type HostRequest, } from '../inference/host.ts';
|
|
22
|
+
export { buildCommandTools, COMMAND_NAMES, type CommandTool, checkSchema, commandSchemas, commandTools, type JsonSchema, } from '../planner/commands/schemas.ts';
|
|
23
|
+
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';
|
|
24
|
+
export { type CookbookBrief, defaultCatalog, getLibraryCookbook, getRecipe, type LibraryCookbook, libraryCookbooks, type PromptCatalog, type Recipe, recipes, recipesById, } from './catalog.ts';
|
|
25
|
+
export { createHeadlessPlanner, type HeadlessPlanner, type HeadlessPlannerOptions, } from './headless.ts';
|
|
26
|
+
export { buildHostPrompt, type HostPrompt, type HostPromptInput, type HostTurn, } from './prompt.ts';
|
|
27
|
+
export { buildReplySchema, type HostReply, type ParsedHostReply, parseHostReply, replySchema, } from './reply.ts';
|
|
28
|
+
export { type HostRequestParse, parseHostRequest } from './request.ts';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The planner without a UI: what a Node server needs to implement the host
|
|
3
|
+
* contract (`docs/inference-host.md`). Rune-free and importable by plain Node,
|
|
4
|
+
* no Vite and no Svelte compiler.
|
|
5
|
+
*
|
|
6
|
+
* - command tool schemas and input types, and the `PlanSnapshot` type;
|
|
7
|
+
* - `buildHostPrompt`: the system prompt and messages for one chat call;
|
|
8
|
+
* - `replySchema` / `buildReplySchema`: the JSON Schema of the model's answer;
|
|
9
|
+
* - `parseHostReply`: validate that answer into the response body;
|
|
10
|
+
* - `parseHostRequest`: validate the request body;
|
|
11
|
+
* - the library catalog (recipes and cookbooks) the prompt is built from;
|
|
12
|
+
* - `createHeadlessPlanner`: the command set over a plain-object plan (many may
|
|
13
|
+
* coexist): smrt's cookbook command engine behind the planner's names, the
|
|
14
|
+
* same commands, validation and snapshots as the browser controller.
|
|
15
|
+
*
|
|
16
|
+
* The browser controller (`createPlannerController`) is not here: it drives
|
|
17
|
+
* the UI's stores and lives in `./commands` (Svelte source).
|
|
18
|
+
*
|
|
19
|
+
* @module
|
|
20
|
+
*/
|
|
21
|
+
export { HOST_HISTORY_CHARS, HOST_HISTORY_TURNS, HOST_MESSAGE_CHARS, HOST_WIRE_VERSION, } from "../inference/host.js";
|
|
22
|
+
export { buildCommandTools, COMMAND_NAMES, checkSchema, commandSchemas, commandTools, } from "../planner/commands/schemas.js";
|
|
23
|
+
export { PLANNER_COMMANDS_VERSION, PLANNER_TAB_IDS, } from "../planner/commands/types.js";
|
|
24
|
+
export { defaultCatalog, getLibraryCookbook, getRecipe, libraryCookbooks, recipes, recipesById, } from "./catalog.js";
|
|
25
|
+
export { createHeadlessPlanner, } from "./headless.js";
|
|
26
|
+
export { buildHostPrompt, } from "./prompt.js";
|
|
27
|
+
export { buildReplySchema, parseHostReply, replySchema, } from "./reply.js";
|
|
28
|
+
export { parseHostRequest } from "./request.js";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { PlanSnapshot } from '../planner/commands/types.ts';
|
|
2
|
+
import { type PromptCatalog } from './catalog.ts';
|
|
3
|
+
/** One earlier turn of the conversation. */
|
|
4
|
+
export interface HostTurn {
|
|
5
|
+
role: 'user' | 'assistant';
|
|
6
|
+
content: string;
|
|
7
|
+
}
|
|
8
|
+
export interface HostPromptInput {
|
|
9
|
+
/** The visitor's text (clipped to the contract's 2000 characters). */
|
|
10
|
+
message: string;
|
|
11
|
+
/** The plan as the planner reports it. */
|
|
12
|
+
snapshot: PlanSnapshot;
|
|
13
|
+
/** Recent turns, oldest first. Anything but user or assistant is ignored. */
|
|
14
|
+
history?: readonly {
|
|
15
|
+
role: string;
|
|
16
|
+
content: string;
|
|
17
|
+
}[];
|
|
18
|
+
/** The recipes and cookbooks the model may use; the planner's library by default. */
|
|
19
|
+
catalog?: PromptCatalog;
|
|
20
|
+
}
|
|
21
|
+
/** A chat call's input: `system` apart, so it fits OpenAI- and Anthropic-style APIs. */
|
|
22
|
+
export interface HostPrompt {
|
|
23
|
+
/** The system prompt. OpenAI-style: send it as a leading `system` message. Anthropic-style: the `system` parameter. */
|
|
24
|
+
system: string;
|
|
25
|
+
/** The conversation, oldest first; the last entry is the visitor's message. */
|
|
26
|
+
messages: HostTurn[];
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The chat call for one host-mode turn. The system prompt is the browser
|
|
30
|
+
* assistant's own (`buildSystemPrompt`: same wording, worked examples, focused
|
|
31
|
+
* recipe lines for what the message matches, settings and theme from the
|
|
32
|
+
* snapshot), plus the host-only `commands` section. The messages are the recent
|
|
33
|
+
* history and then the visitor's message.
|
|
34
|
+
*
|
|
35
|
+
* Ask the model for JSON matching `buildReplySchema()` and read the answer with
|
|
36
|
+
* `parseHostReply`.
|
|
37
|
+
*/
|
|
38
|
+
export declare function buildHostPrompt(input: HostPromptInput): HostPrompt;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { buildMatchIndex, matchText, } from "../assistant/match.js";
|
|
2
|
+
import { buildSystemPrompt } from "../assistant/prompt.js";
|
|
3
|
+
import { HOST_HISTORY_CHARS, HOST_HISTORY_TURNS, HOST_MESSAGE_CHARS, } from "../inference/host.js";
|
|
4
|
+
import { commandTools } from "../planner/commands/schemas.js";
|
|
5
|
+
import { defaultCatalog } from "./catalog.js";
|
|
6
|
+
const indexes = new WeakMap();
|
|
7
|
+
function indexOf(catalog) {
|
|
8
|
+
let index = indexes.get(catalog);
|
|
9
|
+
if (!index) {
|
|
10
|
+
index = buildMatchIndex(catalog.recipes, catalog.cookbooks, {
|
|
11
|
+
theme: true,
|
|
12
|
+
});
|
|
13
|
+
indexes.set(catalog, index);
|
|
14
|
+
}
|
|
15
|
+
return index;
|
|
16
|
+
}
|
|
17
|
+
/** The snapshot's theme as the setting the prompt describes. */
|
|
18
|
+
function themeOf(snapshot) {
|
|
19
|
+
const { preset, primary, colorScheme } = snapshot.theme;
|
|
20
|
+
const theme = {};
|
|
21
|
+
if (preset)
|
|
22
|
+
theme.preset = preset;
|
|
23
|
+
if (primary)
|
|
24
|
+
theme.custom = { primary };
|
|
25
|
+
if (colorScheme && colorScheme !== 'system') {
|
|
26
|
+
theme.colorScheme = colorScheme;
|
|
27
|
+
}
|
|
28
|
+
return Object.keys(theme).length ? theme : undefined;
|
|
29
|
+
}
|
|
30
|
+
/** `rename_item(id, label)`: required inputs bare, optional ones with `?`. */
|
|
31
|
+
function signature(tool) {
|
|
32
|
+
const schema = tool.inputSchema;
|
|
33
|
+
const required = new Set(schema.required ?? []);
|
|
34
|
+
const keys = Object.keys(schema.properties ?? {}).map((key) => required.has(key) ? key : `${key}?`);
|
|
35
|
+
return `${tool.name}(${keys.join(', ')})`;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* What only a host server adds to the browser prompt: the `commands` field and
|
|
39
|
+
* the menu ids it needs. Everything above it is the browser assistant's prompt.
|
|
40
|
+
*/
|
|
41
|
+
function commandSection(snapshot) {
|
|
42
|
+
const out = [
|
|
43
|
+
'',
|
|
44
|
+
'"commands": optional, at most 8 {"name", "input"} run in order, only for what add/remove/settings/theme cannot do. Commands:',
|
|
45
|
+
...commandTools.map((tool) => `- ${signature(tool)}: ${tool.description}`),
|
|
46
|
+
];
|
|
47
|
+
const menu = snapshot.sections
|
|
48
|
+
.filter((section) => !section.hidden)
|
|
49
|
+
.map((section) => {
|
|
50
|
+
const items = section.items
|
|
51
|
+
.filter((item) => !item.hidden)
|
|
52
|
+
.map((item) => `${item.id} (${item.label})`);
|
|
53
|
+
return `- ${section.id} (${section.label})${items.length ? `: ${items.join(', ')}` : ''}`;
|
|
54
|
+
});
|
|
55
|
+
if (menu.length) {
|
|
56
|
+
out.push('', 'Menu ids for rename/hide/show/focus:', ...menu);
|
|
57
|
+
}
|
|
58
|
+
if (snapshot.undo.length) {
|
|
59
|
+
out.push('', `Undo ids available: ${snapshot.undo.join(', ')}.`);
|
|
60
|
+
}
|
|
61
|
+
return out;
|
|
62
|
+
}
|
|
63
|
+
const clip = (text, max) => text.length > max ? text.slice(0, max) : text;
|
|
64
|
+
/**
|
|
65
|
+
* The chat call for one host-mode turn. The system prompt is the browser
|
|
66
|
+
* assistant's own (`buildSystemPrompt`: same wording, worked examples, focused
|
|
67
|
+
* recipe lines for what the message matches, settings and theme from the
|
|
68
|
+
* snapshot), plus the host-only `commands` section. The messages are the recent
|
|
69
|
+
* history and then the visitor's message.
|
|
70
|
+
*
|
|
71
|
+
* Ask the model for JSON matching `buildReplySchema()` and read the answer with
|
|
72
|
+
* `parseHostReply`.
|
|
73
|
+
*/
|
|
74
|
+
export function buildHostPrompt(input) {
|
|
75
|
+
const catalog = input.catalog ?? defaultCatalog;
|
|
76
|
+
const { snapshot } = input;
|
|
77
|
+
const message = clip(input.message, HOST_MESSAGE_CHARS);
|
|
78
|
+
const system = [
|
|
79
|
+
buildSystemPrompt(catalog.recipes, snapshot.recipes.map((recipe) => recipe.id), catalog.cookbooks, {
|
|
80
|
+
currency: snapshot.settings.currency,
|
|
81
|
+
taxRate: Number((snapshot.settings.taxRate / 100).toFixed(6)),
|
|
82
|
+
paymentTerms: snapshot.settings.paymentTerms,
|
|
83
|
+
}, matchText(indexOf(catalog), message), { current: themeOf(snapshot) }),
|
|
84
|
+
...commandSection(snapshot),
|
|
85
|
+
].join('\n');
|
|
86
|
+
const history = (input.history ?? [])
|
|
87
|
+
.filter((turn) => (turn.role === 'user' || turn.role === 'assistant') &&
|
|
88
|
+
typeof turn.content === 'string')
|
|
89
|
+
.slice(-HOST_HISTORY_TURNS)
|
|
90
|
+
.map((turn) => ({
|
|
91
|
+
role: turn.role,
|
|
92
|
+
content: clip(turn.content, HOST_HISTORY_CHARS),
|
|
93
|
+
}));
|
|
94
|
+
return { system, messages: [...history, { role: 'user', content: message }] };
|
|
95
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { type PromptCatalog } from './catalog.ts';
|
|
2
|
+
/**
|
|
3
|
+
* The body a host answers the planner with (wire version 1, see
|
|
4
|
+
* `docs/inference-host.md`): the action JSON the browser assistant reads from a
|
|
5
|
+
* model. Only `reply` is required; empty parts are left out.
|
|
6
|
+
*/
|
|
7
|
+
export interface HostReply {
|
|
8
|
+
/** The sentence shown to the visitor. */
|
|
9
|
+
reply: string;
|
|
10
|
+
/** Recipe ids to switch on. */
|
|
11
|
+
add?: string[];
|
|
12
|
+
/** Recipe ids to switch off. */
|
|
13
|
+
remove?: string[];
|
|
14
|
+
/** A library cookbook to offer. */
|
|
15
|
+
cookbook?: string;
|
|
16
|
+
/** Settings to change; `taxRate` in percent. */
|
|
17
|
+
settings?: {
|
|
18
|
+
currency?: string;
|
|
19
|
+
taxRate?: number;
|
|
20
|
+
paymentTerms?: string;
|
|
21
|
+
};
|
|
22
|
+
/** Theme tokens: a preset or `#rrggbb`, and light or dark. */
|
|
23
|
+
theme?: {
|
|
24
|
+
preset?: string;
|
|
25
|
+
primary?: string;
|
|
26
|
+
colorScheme?: string;
|
|
27
|
+
};
|
|
28
|
+
/** Up to 8 planner commands, run in order by the planner. */
|
|
29
|
+
commands?: {
|
|
30
|
+
name: string;
|
|
31
|
+
input: unknown;
|
|
32
|
+
}[];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* The JSON Schema of one model turn in host mode: `reply`, `add`, `remove`,
|
|
36
|
+
* `cookbook`, `settings`, `theme` and `commands`. Recipe and cookbook ids are
|
|
37
|
+
* enums, so constrained decoding cannot invent one. Pass it as the response
|
|
38
|
+
* format of an OpenAI-style call; `commands[].input` is checked afterwards
|
|
39
|
+
* against `commandSchemas` by `parseHostReply`.
|
|
40
|
+
*/
|
|
41
|
+
export declare function buildReplySchema(catalog?: PromptCatalog): Record<string, unknown>;
|
|
42
|
+
/** The reply schema for the planner's own library. */
|
|
43
|
+
export declare const replySchema: Record<string, unknown>;
|
|
44
|
+
export interface ParsedHostReply {
|
|
45
|
+
/** False when the model's text was not a JSON object (the reply is a fallback or its prose). */
|
|
46
|
+
ok: boolean;
|
|
47
|
+
/** Safe to send back to the planner as the response body. */
|
|
48
|
+
reply: HostReply;
|
|
49
|
+
/** What was dropped or repaired, for the server's log. Never shown to the visitor. */
|
|
50
|
+
issues: string[];
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Read a model's text into a reply the planner accepts, with the same rules the
|
|
54
|
+
* browser assistant applies: thinking tags are dropped, unknown recipe and
|
|
55
|
+
* cookbook ids are removed, settings and theme are cut to valid values, and
|
|
56
|
+
* malformed JSON still yields its `reply` text (never raw model output).
|
|
57
|
+
* Commands are checked here against their input schemas; an unknown or invalid
|
|
58
|
+
* one is dropped and listed in `issues`. The planner validates again.
|
|
59
|
+
*/
|
|
60
|
+
export declare function parseHostReply(text: string, catalog?: PromptCatalog): ParsedHostReply;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { buildResponseSchema, FALLBACK_REPLY, MAX_COMMANDS, parseChange, stripThinking, } from "../assistant/change.js";
|
|
2
|
+
import { checkSchema, commandSchemas, commandTools, } from "../planner/commands/schemas.js";
|
|
3
|
+
import { defaultCatalog } from "./catalog.js";
|
|
4
|
+
/**
|
|
5
|
+
* The JSON Schema of one model turn in host mode: `reply`, `add`, `remove`,
|
|
6
|
+
* `cookbook`, `settings`, `theme` and `commands`. Recipe and cookbook ids are
|
|
7
|
+
* enums, so constrained decoding cannot invent one. Pass it as the response
|
|
8
|
+
* format of an OpenAI-style call; `commands[].input` is checked afterwards
|
|
9
|
+
* against `commandSchemas` by `parseHostReply`.
|
|
10
|
+
*/
|
|
11
|
+
export function buildReplySchema(catalog = defaultCatalog) {
|
|
12
|
+
const schema = buildResponseSchema(catalog.recipes, catalog.cookbooks, true, true);
|
|
13
|
+
schema.properties.commands = {
|
|
14
|
+
type: 'array',
|
|
15
|
+
maxItems: MAX_COMMANDS,
|
|
16
|
+
items: {
|
|
17
|
+
type: 'object',
|
|
18
|
+
properties: {
|
|
19
|
+
name: { enum: commandTools.map((tool) => tool.name) },
|
|
20
|
+
input: { type: 'object' },
|
|
21
|
+
},
|
|
22
|
+
required: ['name', 'input'],
|
|
23
|
+
additionalProperties: false,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
return schema;
|
|
27
|
+
}
|
|
28
|
+
/** The reply schema for the planner's own library. */
|
|
29
|
+
export const replySchema = buildReplySchema();
|
|
30
|
+
const nonEmpty = (value) => Object.keys(value).length > 0;
|
|
31
|
+
function toHostReply(change) {
|
|
32
|
+
return {
|
|
33
|
+
reply: change.reply,
|
|
34
|
+
...(change.add.length ? { add: change.add } : {}),
|
|
35
|
+
...(change.remove.length ? { remove: change.remove } : {}),
|
|
36
|
+
...(change.cookbook ? { cookbook: change.cookbook } : {}),
|
|
37
|
+
...(nonEmpty(change.settings) ? { settings: change.settings } : {}),
|
|
38
|
+
...(nonEmpty(change.theme) ? { theme: change.theme } : {}),
|
|
39
|
+
...(change.commands?.length ? { commands: change.commands } : {}),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Read a model's text into a reply the planner accepts, with the same rules the
|
|
44
|
+
* browser assistant applies: thinking tags are dropped, unknown recipe and
|
|
45
|
+
* cookbook ids are removed, settings and theme are cut to valid values, and
|
|
46
|
+
* malformed JSON still yields its `reply` text (never raw model output).
|
|
47
|
+
* Commands are checked here against their input schemas; an unknown or invalid
|
|
48
|
+
* one is dropped and listed in `issues`. The planner validates again.
|
|
49
|
+
*/
|
|
50
|
+
export function parseHostReply(text, catalog = defaultCatalog) {
|
|
51
|
+
const issues = [];
|
|
52
|
+
const change = parseChange(text, catalog.recipes, catalog.cookbooks, {
|
|
53
|
+
commands: true,
|
|
54
|
+
});
|
|
55
|
+
let ok = true;
|
|
56
|
+
try {
|
|
57
|
+
const value = JSON.parse(stripThinking(text));
|
|
58
|
+
ok = typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
ok = false;
|
|
62
|
+
}
|
|
63
|
+
if (!ok)
|
|
64
|
+
issues.push('the reply was not a JSON object');
|
|
65
|
+
if (!change.reply) {
|
|
66
|
+
change.reply = FALLBACK_REPLY;
|
|
67
|
+
issues.push('the reply had no "reply" sentence');
|
|
68
|
+
}
|
|
69
|
+
if (change.commands) {
|
|
70
|
+
const valid = [];
|
|
71
|
+
for (const call of change.commands) {
|
|
72
|
+
const schema = Object.hasOwn(commandSchemas, call.name)
|
|
73
|
+
? commandSchemas[call.name]
|
|
74
|
+
: undefined;
|
|
75
|
+
if (!schema) {
|
|
76
|
+
issues.push(`dropped unknown command "${call.name}"`);
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
const problem = checkSchema(schema, call.input);
|
|
80
|
+
if (problem) {
|
|
81
|
+
issues.push(`dropped ${call.name}: ${problem}`);
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
valid.push(call);
|
|
85
|
+
}
|
|
86
|
+
change.commands = valid;
|
|
87
|
+
}
|
|
88
|
+
return { ok, reply: toHostReply(change), issues };
|
|
89
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type HostRequest } from '../inference/host.ts';
|
|
2
|
+
export type HostRequestParse = {
|
|
3
|
+
ok: true;
|
|
4
|
+
request: HostRequest;
|
|
5
|
+
} | {
|
|
6
|
+
ok: false;
|
|
7
|
+
error: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Check the JSON body the planner POSTs in host mode. Strict about the shape
|
|
11
|
+
* (version, a non-empty message, a snapshot object of a known version, history
|
|
12
|
+
* of user and assistant turns only), and clips lengths to the contract's limits
|
|
13
|
+
* rather than refusing. The result feeds `buildHostPrompt`.
|
|
14
|
+
*/
|
|
15
|
+
export declare function parseHostRequest(body: unknown): HostRequestParse;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { HOST_HISTORY_CHARS, HOST_HISTORY_TURNS, HOST_MESSAGE_CHARS, HOST_WIRE_VERSION, } from "../inference/host.js";
|
|
2
|
+
import { PLANNER_COMMANDS_VERSION, } from "../planner/commands/types.js";
|
|
3
|
+
const isObject = (value) => typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
4
|
+
/**
|
|
5
|
+
* Check the JSON body the planner POSTs in host mode. Strict about the shape
|
|
6
|
+
* (version, a non-empty message, a snapshot object of a known version, history
|
|
7
|
+
* of user and assistant turns only), and clips lengths to the contract's limits
|
|
8
|
+
* rather than refusing. The result feeds `buildHostPrompt`.
|
|
9
|
+
*/
|
|
10
|
+
export function parseHostRequest(body) {
|
|
11
|
+
if (!isObject(body))
|
|
12
|
+
return { ok: false, error: 'the body must be an object' };
|
|
13
|
+
if (body.version !== HOST_WIRE_VERSION) {
|
|
14
|
+
return {
|
|
15
|
+
ok: false,
|
|
16
|
+
error: `unsupported version (this server speaks ${HOST_WIRE_VERSION})`,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
if (typeof body.message !== 'string' || !body.message.trim()) {
|
|
20
|
+
return { ok: false, error: '"message" must be a non-empty string' };
|
|
21
|
+
}
|
|
22
|
+
const snapshot = body.snapshot;
|
|
23
|
+
if (!isObject(snapshot) || snapshot.version !== PLANNER_COMMANDS_VERSION) {
|
|
24
|
+
return { ok: false, error: '"snapshot" must be a version-1 plan snapshot' };
|
|
25
|
+
}
|
|
26
|
+
const history = [];
|
|
27
|
+
if (body.history !== undefined) {
|
|
28
|
+
if (!Array.isArray(body.history)) {
|
|
29
|
+
return { ok: false, error: '"history" must be an array' };
|
|
30
|
+
}
|
|
31
|
+
for (const turn of body.history.slice(-HOST_HISTORY_TURNS)) {
|
|
32
|
+
if (!isObject(turn) ||
|
|
33
|
+
(turn.role !== 'user' && turn.role !== 'assistant') ||
|
|
34
|
+
typeof turn.content !== 'string') {
|
|
35
|
+
return {
|
|
36
|
+
ok: false,
|
|
37
|
+
error: '"history" entries need role user or assistant and content',
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
history.push({
|
|
41
|
+
role: turn.role,
|
|
42
|
+
content: turn.content.slice(0, HOST_HISTORY_CHARS),
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
ok: true,
|
|
48
|
+
request: {
|
|
49
|
+
version: HOST_WIRE_VERSION,
|
|
50
|
+
message: body.message.slice(0, HOST_MESSAGE_CHARS),
|
|
51
|
+
snapshot: snapshot,
|
|
52
|
+
...(history.length ? { history } : {}),
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CatalogModel } from '../catalog/types.ts';
|
|
2
|
+
import { type ModelRecord } from './fakes.ts';
|
|
3
|
+
/** A child model and the field holding its parent's id (see `childLinks`). */
|
|
4
|
+
export interface ChildOf {
|
|
5
|
+
model: CatalogModel;
|
|
6
|
+
fk: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Sample child rows for one parent record: one to four (journals, an even
|
|
10
|
+
* number of balanced entries), each pointing at the parent through `fk`. Ids
|
|
11
|
+
* and values are seeded from the parent's id, so the same parent always gets
|
|
12
|
+
* the same children. A line item's `amount` is `quantity * unitPrice` so it
|
|
13
|
+
* reads right next to the parent's totals.
|
|
14
|
+
*/
|
|
15
|
+
export declare function fakeChildrenOf(child: CatalogModel, fk: string, parent: ModelRecord, seed: number): ModelRecord[];
|
|
16
|
+
/**
|
|
17
|
+
* Bring a parent's totals in line with the line items just generated for it
|
|
18
|
+
* (see `withTotals`).
|
|
19
|
+
*/
|
|
20
|
+
export declare function syncTotals(parent: ModelRecord, parentModel: CatalogModel, items: readonly ModelRecord[]): void;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { isLineModel, settleLine, withTotals } from "./derived.js";
|
|
2
|
+
import { createRandom, fakeId, fakeRecord, hashString, packLine, } from "./fakes.js";
|
|
3
|
+
import { getSamplePack } from "./packs.js";
|
|
4
|
+
const MAX_CHILDREN = 4;
|
|
5
|
+
const hasField = (model, name) => model.fields.some((f) => f.name === name);
|
|
6
|
+
/**
|
|
7
|
+
* Sample child rows for one parent record: one to four (journals, an even
|
|
8
|
+
* number of balanced entries), each pointing at the parent through `fk`. Ids
|
|
9
|
+
* and values are seeded from the parent's id, so the same parent always gets
|
|
10
|
+
* the same children. A line item's `amount` is `quantity * unitPrice` so it
|
|
11
|
+
* reads right next to the parent's totals.
|
|
12
|
+
*/
|
|
13
|
+
export function fakeChildrenOf(child, fk, parent, seed) {
|
|
14
|
+
const random = createRandom(hashString(`${seed}:${child.id}:${parent.id}`));
|
|
15
|
+
const ledger = hasField(child, 'debit') && hasField(child, 'credit');
|
|
16
|
+
const count = ledger
|
|
17
|
+
? 2 * (1 + Math.floor(random() * 2))
|
|
18
|
+
: 1 + Math.floor(random() * MAX_CHILDREN);
|
|
19
|
+
const lines = isLineModel(child);
|
|
20
|
+
const balance = 1000 * (1 + Math.floor(random() * 90));
|
|
21
|
+
return Array.from({ length: count }, (_, i) => {
|
|
22
|
+
const index = hashString(`${parent.id}:${i}`) % 997;
|
|
23
|
+
const record = {
|
|
24
|
+
...fakeRecord(child, index, seed),
|
|
25
|
+
id: fakeId(`${child.id}:${parent.id}:${i}`),
|
|
26
|
+
[fk]: parent.id,
|
|
27
|
+
};
|
|
28
|
+
if (hasField(child, 'sortOrder'))
|
|
29
|
+
record.sortOrder = i;
|
|
30
|
+
if (lines) {
|
|
31
|
+
// A line pointing at a product reads as that product, at its price.
|
|
32
|
+
const productField = child.fields.find((f) => f.related?.endsWith(':Product') && f.name in record);
|
|
33
|
+
const pack = getSamplePack();
|
|
34
|
+
const { products } = pack;
|
|
35
|
+
const item = products[(index % 5) % products.length];
|
|
36
|
+
const described = packLine(index);
|
|
37
|
+
if (described) {
|
|
38
|
+
// Labour and fabrication are not products: no product to point at.
|
|
39
|
+
if (hasField(child, 'description')) {
|
|
40
|
+
record.description = described.description;
|
|
41
|
+
}
|
|
42
|
+
record.unitPrice = described.price;
|
|
43
|
+
if (productField)
|
|
44
|
+
record[productField.name] = '';
|
|
45
|
+
}
|
|
46
|
+
else if (productField && item) {
|
|
47
|
+
if (hasField(child, 'description'))
|
|
48
|
+
record.description = item.name;
|
|
49
|
+
record.unitPrice = item.price;
|
|
50
|
+
}
|
|
51
|
+
// How many a line sells is the pack's call: one membership, a few hours
|
|
52
|
+
// of labour, a handful of parts. The draw is always taken so a pack
|
|
53
|
+
// without ranges leaves the rest of the stream as it was.
|
|
54
|
+
const [low, high] = described?.quantity ??
|
|
55
|
+
item?.quantity ??
|
|
56
|
+
pack.lineQuantity ?? [1, 5];
|
|
57
|
+
const quantity = low + Math.floor(random() * (high - low + 1));
|
|
58
|
+
if (hasField(child, 'quantity'))
|
|
59
|
+
record.quantity = quantity;
|
|
60
|
+
if (hasField(child, 'discount'))
|
|
61
|
+
record.discount = 0;
|
|
62
|
+
record.amount = settleLine(record).amount;
|
|
63
|
+
}
|
|
64
|
+
if (ledger) {
|
|
65
|
+
const debit = i % 2 === 0;
|
|
66
|
+
record.debit = debit ? balance / 100 : 0;
|
|
67
|
+
record.credit = debit ? 0 : balance / 100;
|
|
68
|
+
}
|
|
69
|
+
return record;
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Bring a parent's totals in line with the line items just generated for it
|
|
74
|
+
* (see `withTotals`).
|
|
75
|
+
*/
|
|
76
|
+
export function syncTotals(parent, parentModel, items) {
|
|
77
|
+
if (!items.length || !items.every((r) => 'unitPrice' in r))
|
|
78
|
+
return;
|
|
79
|
+
Object.assign(parent, withTotals(parentModel, parent, items));
|
|
80
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { CatalogModel } from '../catalog/types.ts';
|
|
2
|
+
import type { ViewField } from '../recipes/policy.ts';
|
|
3
|
+
/** A list column: a field, or a value worked out from the row (Amount due). */
|
|
4
|
+
export interface ListColumn extends ViewField {
|
|
5
|
+
/** A datetime that shows its time of day, not only the date (a class start). */
|
|
6
|
+
showTime?: boolean;
|
|
7
|
+
derive?: (row: Readonly<Record<string, unknown>>) => unknown;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The columns of a list: what names the row, who it is for, its status, its
|
|
11
|
+
* money and its dates first; then the other numeric/boolean/date fields and
|
|
12
|
+
* choices so a row reads like a record, not a wall of text. A record that
|
|
13
|
+
* tracks payments (`totalAmount` and `amountPaid`) also gets "Amount due".
|
|
14
|
+
*/
|
|
15
|
+
export declare function listColumns(fields: readonly ViewField[], max?: number): ListColumn[];
|
|
16
|
+
/** The value a list cell shows for a row. */
|
|
17
|
+
export declare function cellValue(column: ListColumn, row: Readonly<Record<string, unknown>>): unknown;
|
|
18
|
+
/** The rows whose foreign key points at the parent record. */
|
|
19
|
+
export declare function rowsOf<T extends Record<string, unknown>>(rows: readonly T[], fk: string, parentId: string): T[];
|
|
20
|
+
/**
|
|
21
|
+
* The value a new record starts with: the field's default; an enumeration with
|
|
22
|
+
* none (a `status`, or a required choice) starts at "draft" or its first value
|
|
23
|
+
* rather than empty.
|
|
24
|
+
*/
|
|
25
|
+
export declare function blankValue(field: ViewField): unknown;
|
|
26
|
+
/** Starting values for a new record of the fields shown. */
|
|
27
|
+
export declare function blankRecord(fields: readonly ViewField[]): Record<string, unknown>;
|
|
28
|
+
/** Starting values for a new child row: field defaults, the foreign key preset. */
|
|
29
|
+
export declare function blankChild(fields: readonly ViewField[], fk: string, parentId: string): Record<string, unknown>;
|
|
30
|
+
/**
|
|
31
|
+
* Required fields without a value, as `{ name: message }`. A switch always has
|
|
32
|
+
* a value; fields in `skip` (derived or preset ones) are not asked for.
|
|
33
|
+
*/
|
|
34
|
+
export declare function missingRequired(fields: readonly ViewField[], values: Readonly<Record<string, unknown>>, skip?: ReadonlySet<string>): Record<string, string>;
|
|
35
|
+
/**
|
|
36
|
+
* One line for near the Save button: which fields still need a value.
|
|
37
|
+
* Empty when nothing is missing, so it clears itself as the errors do.
|
|
38
|
+
*/
|
|
39
|
+
export declare function errorSummary(fields: readonly {
|
|
40
|
+
name: string;
|
|
41
|
+
label: string;
|
|
42
|
+
}[], errors: Readonly<Record<string, string>>): string;
|
|
43
|
+
/**
|
|
44
|
+
* What names a record to a person (see `recordName`): its label, else its
|
|
45
|
+
* number and who it is for ("WIL-1133 · Lantern Collective"), else the record
|
|
46
|
+
* it points at plus its reference.
|
|
47
|
+
*/
|
|
48
|
+
export declare function recordTitle(model: CatalogModel, fields: readonly ViewField[], row: Readonly<Record<string, unknown>>, labels: ReadonlyMap<string, string>): string;
|
|
49
|
+
/** A child table shown inside its parent's record view. */
|
|
50
|
+
export interface ChildTable {
|
|
51
|
+
model: CatalogModel;
|
|
52
|
+
fields: ViewField[];
|
|
53
|
+
/** The child's field holding the parent record's id. */
|
|
54
|
+
fk: string;
|
|
55
|
+
title: string;
|
|
56
|
+
}
|