palbase 0.73.1 → 0.75.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/ai/index.js +2 -2
  2. package/dist/ai-sdk/index.js +2 -2
  3. package/dist/backend/engine.js +2 -2
  4. package/dist/backend/env.js +1 -1
  5. package/dist/backend/index.js +3 -3
  6. package/dist/backend/stack.js +1 -1
  7. package/dist/backend/test.js +2 -2
  8. package/dist/chunks/{HYPCFC4K.js → 2SVWIAAD.js} +1 -1
  9. package/dist/chunks/3GR5ZPYK.js +18 -0
  10. package/dist/chunks/{SQNAPFXW.js → 5NZNKECX.js} +2 -2
  11. package/dist/chunks/{DNSLYLU6.js → 7BSFT4SH.js} +1 -1
  12. package/dist/chunks/{4E4ABCSD.js → 7R5TMAGP.js} +2 -2
  13. package/dist/chunks/{SS2RVI27.js → EFDYHDIB.js} +1 -1
  14. package/dist/chunks/{5N5GHLUU.js → FJVUDV4I.js} +2 -2
  15. package/dist/chunks/{HRWVZ4PC.js → G37YLKYL.js} +2 -2
  16. package/dist/chunks/{3KCV4F4F.js → GMCROKBB.js} +2 -2
  17. package/dist/chunks/{5N6QKGPA.js → GSY2E764.js} +2 -2
  18. package/dist/chunks/HT6TR6AZ.js +2 -0
  19. package/dist/chunks/{MB7MHOQO.js → KWVOOFCB.js} +1 -1
  20. package/dist/chunks/{2TKZTIMD.js → LGXI36R6.js} +2 -2
  21. package/dist/chunks/MT22R56P.js +2 -0
  22. package/dist/chunks/P6LK5BD6.js +23 -0
  23. package/dist/chunks/{AXANFT2A.js → POURMU7G.js} +2 -2
  24. package/dist/chunks/{U3H6HER3.js → RBZI2C7M.js} +1 -1
  25. package/dist/chunks/{GWWU2FJ7.js → SPMFD3LH.js} +2 -2
  26. package/dist/chunks/{GTKPHG5F.js → UKONQ2R4.js} +2 -2
  27. package/dist/chunks/{YU3GFTZV.js → UPJGT3BN.js} +1 -1
  28. package/dist/chunks/{W2KD2I4Q.js → XUEBLD7V.js} +1 -1
  29. package/dist/chunks/{UOJVMV42.js → XZSXLA3N.js} +2 -2
  30. package/dist/chunks/{IVJOWYRE.js → YEZCBT5I.js} +2 -2
  31. package/dist/chunks/{MFSC4OJV.js → ZWASHVNO.js} +2 -2
  32. package/dist/cli.js +162 -162
  33. package/dist/cloud/index.js +2 -2
  34. package/dist/refuse/ai-sdk.js +1 -1
  35. package/dist/refuse/ai.js +1 -1
  36. package/dist/refuse/backend.js +1 -1
  37. package/dist/refuse/cloud.js +1 -1
  38. package/dist/refuse/server.js +1 -1
  39. package/dist/server/index.js +2 -2
  40. package/dist/server/testing.js +2 -2
  41. package/dist/web/index.js +2 -2
  42. package/dist/web/message.js +2 -2
  43. package/dist/web/palbe.js +2 -2
  44. package/dist/web/payments-ui.js +2 -2
  45. package/dist/web/paywall.js +2 -2
  46. package/dist/web/push-sw.js +1 -1
  47. package/dist/web/ssr.js +2 -2
  48. package/dist/web/vite.js +2 -2
  49. package/package.json +2 -2
  50. package/types/ai/src/index.d.ts +1 -1
  51. package/types/ai/src/tools.d.ts +18 -0
  52. package/types/cloud/src/generated/project.d.ts +1 -1
  53. package/types/internal/src/modules/ai.d.ts +8 -0
  54. package/types/internal/src/modules/commerce.d.ts +2810 -533
  55. package/types/internal/src/modules/events.d.ts +2 -2
  56. package/types/server/src/commerce.d.ts +172 -3
  57. package/types/server/src/index.d.ts +1 -1
  58. package/types/web/src/commerce.d.ts +460 -20
  59. package/types/web/src/index.d.ts +1 -1
  60. package/types/web/src/session.d.ts +15 -1
  61. package/types/web/src/ssr.d.ts +1 -1
  62. package/dist/chunks/SEICTPQP.js +0 -2
  63. package/dist/chunks/TR2IPX2A.js +0 -23
  64. package/dist/chunks/UXHNXE3J.js +0 -2
  65. package/dist/chunks/VCL3SAQL.js +0 -18
@@ -226,6 +226,11 @@ export type Tool = BackendTool<StandardSchema> | ClientTool | HttpsToolRef | Mcp
226
226
  export type Effort = NonNullable<AgentDefinition['effort']>;
227
227
  /** Whether a model's reasoning is shown in the chat's stream (thinking parts) or not asked for at all. */
228
228
  export type Thinking = NonNullable<AgentDefinition['thinking']>;
229
+ /**
230
+ * When what a tool answered some steps ago leaves the conversation the model is sent: as it ages (aged), or only once
231
+ * the conversation nears the window the turn works in (window).
232
+ */
233
+ export type ToolOutputs = NonNullable<AgentDefinition['tool_outputs']>;
229
234
  export interface SubagentDefinition {
230
235
  /** Unique among the agent's subagents. */
231
236
  name: string;
@@ -242,6 +247,8 @@ export interface SubagentDefinition {
242
247
  contextWindow?: number;
243
248
  /** Left out: the agent's. Its reasoning is never in the chat's stream: only the turn's own is. */
244
249
  thinking?: Thinking;
250
+ /** When what a tool answered it some steps ago leaves the conversation its model is sent. Left out: the agent's, whatever model it runs on. */
251
+ toolOutputs?: ToolOutputs;
245
252
  }
246
253
  /**
247
254
  * An agent's advisor: a second model that reads what the agent does after every step — its messages, the reasoning
@@ -349,6 +356,17 @@ export interface AgentDefinitionInput {
349
356
  contextWindow?: number;
350
357
  /** visible: the model's reasoning is in the chat's stream, as thinking parts (the turn's own); hidden: not asked for. Left out: the platform's. */
351
358
  thinking?: Thinking;
359
+ /**
360
+ * When what a tool answered some steps ago leaves the conversation the model is sent, in a chat's turns. aged (the
361
+ * default): on every step, an output past 4 KiB that is four messages old is cut to its first three and last five
362
+ * lines, with where the whole of it is kept (the chat's stream says so: a context.offloaded part) — a coding
363
+ * turn's prompts stay small. window: none is cut until the conversation nears the window the turn works in
364
+ * (contextWindow) — the mark at which the platform compacts it, about three quarters of the window — and past it
365
+ * they are cut before anything is summarised: for an agent that reads material and reproduces it. What it read
366
+ * stays before the model as it was read, and every step's prompt is billed for it. Its subagents take it unless
367
+ * they say their own.
368
+ */
369
+ toolOutputs?: ToolOutputs;
352
370
  /** The language of the person the turn works for, a BCP 47 tag (tr, en-GB): the model writes to them in it on every step, and so do its subagents. */
353
371
  language?: string;
354
372
  /**
@@ -7,7 +7,7 @@ export interface Project {
7
7
  auth: Pick<modules.auth.Client, "adminVerifyDeviceAssertion" | "adminGetAttestPolicy" | "adminGetAttestObservations" | "adminRecordAttestObservations" | "adminListAuditEvents" | "adminExportAuditEvents" | "adminVerifyAuditTrail" | "adminGetAuthSettings" | "adminUpdateAuthSettings" | "adminGetBreachWatch" | "adminListHooks" | "adminCreateHook" | "adminUpdateHook" | "adminDeleteHook" | "adminListHookExecutions" | "adminListIntegrations" | "adminPutIntegration" | "adminDeleteIntegration" | "adminListOAuthClients" | "adminCreateOAuthClient" | "adminGetOAuthClient" | "adminDeleteOAuthClient" | "adminUpdateOAuthClient" | "adminListProviders" | "adminGetPhoneSettings" | "adminUpdatePhoneSettings" | "adminToggleProvider" | "adminListRoles" | "adminUpsertRole" | "adminDeleteRole" | "adminListServiceAccounts" | "adminCreateServiceAccount" | "adminGetServiceAccount" | "adminRevokeServiceAccount" | "adminRotateServiceAccount" | "adminListSessions" | "adminRevokeSession" | "adminListSigningKeys" | "adminRotateSigningKey" | "socialAdminConfig" | "socialCredentialPut" | "socialCredentialDelete" | "socialProviderPatch" | "adminGetStats" | "adminSendTestTemplate" | "adminListTestUsers" | "adminCreateTestUsers" | "adminSetTestUserPhone" | "adminCreateTestSignupAddress" | "adminDeleteTestUser" | "adminCreateCustomToken" | "adminListUsers" | "adminCreateUser" | "adminImportUsers" | "adminGetUser" | "adminDeleteUser" | "adminUpdateUser" | "adminBanUser" | "adminGetUserConsents" | "adminRevokeUserCredentials" | "adminExportUser" | "adminListUserMfaFactors" | "adminResetUserMfa" | "adminResetUserPassword" | "adminListUserRoles" | "adminAssignUserRole" | "adminRevokeUserRole" | "adminRevokeUserSessions" | "adminUnbanUser" | "adminGetInstallationConsents" | "adminRefuseConsents" | "adminInviteUser">;
8
8
  calls: Pick<modules.calls.Client, "adminListCalls" | "adminGetCall" | "adminEndCall" | "createCallTicket" | "adminGetCallTranscription" | "adminStartCallTranscription" | "adminStopCallTranscription" | "adminIngestCallTranscriptionAudio" | "getCallSettings" | "putCallSettings" | "rotateCallHookSecret">;
9
9
  campaigns: Pick<modules.campaigns.Client, "listBroadcasts" | "createBroadcast" | "recordBroadcastConversion" | "getBroadcast" | "updateBroadcast" | "deleteBroadcast" | "cancelBroadcast" | "pauseBroadcast" | "startBroadcast" | "getBroadcastStats" | "listTrackingLinks" | "createTrackingLink" | "attributeLinkConversion" | "getTrackingLink" | "updateTrackingLink" | "deleteTrackingLink" | "getTrackingLinkStats" | "listOnSiteCampaigns" | "createOnSiteCampaign" | "createOnSiteImpression" | "recordOnSiteEvent" | "listOnSiteMessages" | "getOnSiteSettings" | "putOnSiteSettings" | "listOnSiteTemplates" | "getOnSiteCampaign" | "updateOnSiteCampaign" | "deleteOnSiteCampaign" | "getOnSiteCampaignStats">;
10
- commerce: Pick<modules.commerce.Client, "listBrands" | "createBrand" | "createCart" | "getCart" | "updateCart" | "checkoutCart" | "addCartItem" | "deleteCartItem" | "updateCartItem" | "applyCartPromoCode" | "removeCartPromoCode" | "selectCartShipping" | "storefrontListBrands" | "storefrontListCategories" | "storefrontListChannels" | "storefrontListCollections" | "storefrontListProducts" | "storefrontGetProduct" | "storefrontListRegions" | "storefrontListStores" | "storefrontGetStore" | "listCategories" | "createCategory" | "listChannels" | "createChannel" | "attachChannelRegion" | "attachChannelStore" | "detachChannelStore" | "listCollections" | "createCollection" | "addCollectionProduct" | "removeCollectionProduct" | "createDigitalAsset" | "updateFulfillment" | "addShipmentEvent" | "listHooks" | "upsertHook" | "deleteHook" | "listInventory" | "adjustInventory" | "bulkSyncInventory" | "listInventoryMovements" | "listInvoices" | "createInvoice" | "updateInvoice" | "listListings" | "createListing" | "updateListing" | "importLicenseKeys" | "upsertPrice" | "createMediaAsset" | "listOrders" | "getGuestOrder" | "getOrder" | "markOrderPaid" | "listPriceLists" | "createPriceList" | "listProducts" | "createProduct" | "createQuickProduct" | "getProduct" | "updateProduct" | "approveProduct" | "upsertProductOption" | "createVariant" | "listRegions" | "createRegion" | "updateRegion" | "listReturns" | "approveReturn" | "completeReturn" | "receiveReturn" | "getCommerceSettings" | "updateCommerceSettings" | "listSettlements" | "generateSettlement" | "markSettlementPaid" | "listShippingOptions" | "createShippingOption" | "listShippingProfiles" | "createShippingProfile" | "listStockLocations" | "createStockLocation" | "listStoreOrders" | "getStoreOrder" | "cancelStoreOrder" | "createFulfillment" | "createReturn" | "listStores" | "createStore" | "getStore" | "updateStore" | "sellerUpdateFulfillment" | "sellerAddShipmentEvent" | "sellerListInventory" | "sellerAdjustInventory" | "sellerBulkSyncInventory" | "sellerListListings" | "sellerCreateListing" | "sellerUpdateListing" | "sellerImportLicenseKeys" | "sellerUpsertPrice" | "sellerListStockLocations" | "sellerCreateStockLocation" | "addStoreMember" | "removeStoreMember" | "sellerGetMetrics" | "sellerListStoreOrders" | "sellerGetStoreOrder" | "sellerCancelStoreOrder" | "sellerCreateFulfillment" | "onboardStorePaymentAccount" | "sellerOnboardPayouts" | "sellerOnboardingLink" | "sellerListProducts" | "sellerCreateProduct" | "sellerCreateQuickProduct" | "sellerCreatePromotionRule" | "sellerListReturns" | "sellerApproveReturn" | "sellerCompleteReturn" | "sellerReceiveReturn" | "sellerListSettlements" | "sellerCreateShippingOption" | "listTaxRates" | "upsertTaxRate" | "updateVariant" | "setBundleItems" | "recomputeVariantBuyBox" | "revokePromotionCode" | "evaluatePromotions" | "holdPromotions" | "commitPromotionHold" | "releasePromotionHold" | "listPromotionRedemptions" | "reversePromotionRedemption" | "listPromotionRules" | "createPromotionRule" | "getPromotionRule" | "archivePromotionRule" | "updatePromotionRule" | "upsertPromotionBudget" | "listPromotionCodes" | "createPromotionCode" | "generatePromotionCodeBatch">;
10
+ commerce: Pick<modules.commerce.Client, "listBrands" | "createBrand" | "createCart" | "getCart" | "updateCart" | "checkoutCart" | "addCartItem" | "deleteCartItem" | "updateCartItem" | "applyCartPromoCode" | "removeCartPromoCode" | "selectCartShipping" | "storefrontListBrands" | "storefrontListCategories" | "storefrontListChannels" | "storefrontListCollections" | "storefrontListProducts" | "storefrontSearchProducts" | "storefrontSuggest" | "storefrontRecommendProducts" | "storefrontProductRecommendations" | "storefrontGetProduct" | "storefrontListProductReviews" | "storefrontListRegions" | "storefrontListStores" | "storefrontGetStore" | "storefrontListStoreReviews" | "listCategories" | "createCategory" | "listChannels" | "createChannel" | "attachChannelRegion" | "attachChannelStore" | "detachChannelStore" | "listCollections" | "createCollection" | "addCollectionProduct" | "removeCollectionProduct" | "createDigitalAsset" | "updateFulfillment" | "addShipmentEvent" | "listDiscoveryStrategies" | "createDiscoveryStrategy" | "getDiscoveryStrategy" | "deleteDiscoveryStrategy" | "updateDiscoveryStrategy" | "listMerchandisingRules" | "createMerchandisingRule" | "getMerchandisingRule" | "deleteMerchandisingRule" | "updateMerchandisingRule" | "listSearchSynonyms" | "createSearchSynonym" | "deleteSearchSynonym" | "refreshDiscoverySignals" | "listHooks" | "upsertHook" | "deleteHook" | "listInventory" | "adjustInventory" | "bulkSyncInventory" | "listInventoryMovements" | "listInvoices" | "createInvoice" | "updateInvoice" | "listListings" | "createListing" | "updateListing" | "importLicenseKeys" | "upsertPrice" | "createMediaAsset" | "listOrders" | "getGuestOrder" | "getOrder" | "markOrderPaid" | "listPriceLists" | "createPriceList" | "listProducts" | "createProduct" | "createQuickProduct" | "getProduct" | "updateProduct" | "approveProduct" | "upsertProductOption" | "createVariant" | "listRegions" | "createRegion" | "updateRegion" | "listReturns" | "approveReturn" | "completeReturn" | "receiveReturn" | "adminListReviews" | "adminDeleteReview" | "adminModerateReview" | "getCommerceSettings" | "updateCommerceSettings" | "listSettlements" | "generateSettlement" | "markSettlementPaid" | "listShippingOptions" | "createShippingOption" | "listShippingProfiles" | "createShippingProfile" | "listStockLocations" | "createStockLocation" | "listStoreOrders" | "getStoreOrder" | "cancelStoreOrder" | "createFulfillment" | "createReturn" | "listStores" | "createStore" | "getStore" | "updateStore" | "sellerUpdateFulfillment" | "sellerAddShipmentEvent" | "sellerListInventory" | "sellerAdjustInventory" | "sellerBulkSyncInventory" | "sellerListListings" | "sellerCreateListing" | "sellerUpdateListing" | "sellerImportLicenseKeys" | "sellerUpsertPrice" | "sellerListStockLocations" | "sellerCreateStockLocation" | "addStoreMember" | "removeStoreMember" | "sellerGetMetrics" | "sellerListStoreOrders" | "sellerGetStoreOrder" | "sellerCancelStoreOrder" | "sellerCreateFulfillment" | "onboardStorePaymentAccount" | "sellerOnboardPayouts" | "sellerOnboardingLink" | "sellerListProducts" | "sellerCreateProduct" | "sellerCreateQuickProduct" | "sellerCreatePromotionRule" | "sellerListReturns" | "sellerApproveReturn" | "sellerCompleteReturn" | "sellerReceiveReturn" | "sellerListReviews" | "sellerReplyReview" | "sellerListSettlements" | "sellerCreateShippingOption" | "listTaxRates" | "upsertTaxRate" | "updateVariant" | "setBundleItems" | "recomputeVariantBuyBox" | "revokePromotionCode" | "evaluatePromotions" | "holdPromotions" | "commitPromotionHold" | "releasePromotionHold" | "listPromotionRedemptions" | "reversePromotionRedemption" | "listPromotionRules" | "createPromotionRule" | "getPromotionRule" | "archivePromotionRule" | "updatePromotionRule" | "upsertPromotionBudget" | "listPromotionCodes" | "createPromotionCode" | "generatePromotionCodeBatch">;
11
11
  flags: Pick<modules.flags.Client, "getValues" | "batchUserValues" | "getDelta" | "getEvaluations" | "listExperiments" | "startExperiment" | "getExperiment" | "getExperimentResults" | "stopExperiment" | "declareExperimentWinner" | "getCurrentInstallations" | "getInstallationsDaily" | "getSnapshot" | "listDefinitions" | "getDefinition" | "putDefinition" | "deleteDefinition" | "activateTemplates" | "getActiveTemplate" | "getTemplateCapabilities" | "getTemplateDraft" | "createTemplateDraft" | "discardTemplateDraft" | "putTemplateParameter" | "removeTemplateParameter" | "reviewTemplateDraft" | "publishTemplate" | "getPublishReceipt" | "restoreTemplateVersion" | "listTemplateVersions" | "getTemplateVersion" | "getUserValues" | "putUserValues" | "deleteUserValues" | "putUserValue" | "deleteUserValue">;
12
12
  iap: Pick<modules.iap.Client, "getAppleAccount" | "disconnectApple" | "createAppleGrant" | "getAppleReadiness" | "setXcodeCertificate" | "clearXcodeCertificate" | "setXcodeOfferKey" | "getCatalog" | "saveCatalog" | "planCatalog" | "getCatalogPlan" | "confirmCatalogPlan" | "declineCatalogPlan" | "listCatalogRevisions" | "getCatalogRevision" | "restoreCatalogRevision" | "validateCatalog" | "listCharts" | "getChartsOverview" | "getChart" | "createCheckout" | "createCheckoutRedemption" | "listCoupons" | "createCoupon" | "getCoupon" | "revokeCoupon" | "listCouponCodes" | "searchCustomers" | "getCustomer" | "grantCredits" | "listCreditEntries" | "forgiveCredits" | "listCustomerGrants" | "grantEntitlement" | "revokeGrant" | "getCustomerHistory" | "holdSpend" | "setCustomerLimit" | "clearCustomerLimit" | "grantLimit" | "spend" | "commitSpend" | "extendHold" | "releaseSpend" | "reverseSpend" | "cancelSubscription" | "extendSubscription" | "refundSubscription" | "listExperiments" | "startExperiment" | "getExperiment" | "getExperimentResults" | "stopExperiment" | "declareExperimentWinner" | "getGoogleAccount" | "connectGoogle" | "disconnectGoogle" | "getOfferings" | "getOfferStats" | "listPaywalls" | "createPaywall" | "listPaywallAssets" | "registerPaywallAsset" | "deletePaywallAsset" | "listPaywallTemplates" | "getPaywallTemplateAsset" | "validatePaywall" | "getPaywall" | "deletePaywall" | "savePaywallDraft" | "publishPaywall" | "listPaywallVersions" | "getPaywallVersion" | "listPlacements" | "listAttributeKeys" | "setPlacement" | "deletePlacement" | "recordPaywallExposure" | "getPlacementPaywall" | "previewPlacement" | "getPlacementResults" | "getPlacementRules" | "setPlacementRules" | "getSettings" | "updateSettings">;
13
13
  journeys: Pick<modules.journeys.Client, "listJourneys" | "createJourney" | "listBlueprints" | "listPersonRuns" | "simulateJourney" | "listStoreBlueprints" | "activateStoreBlueprint" | "deleteStoreBlueprint" | "validateJourney" | "getJourney" | "updateJourney" | "deleteJourney" | "copyJourney" | "publishJourney" | "listJourneyRuns" | "getJourneyStats" | "stopJourney" | "testJourney">;
@@ -129,6 +129,10 @@ export type AgentDefinition = {
129
129
  * Whether the model's reasoning is shown in the chat's stream (visible: thinking parts) or not asked for at all (hidden). Left out: the platform's.
130
130
  */
131
131
  thinking?: "visible" | "hidden";
132
+ /**
133
+ * When what a tool answered some steps ago leaves the conversation the model is sent, in a chat's turns. aged (the default): on every step, an output past 4 KiB that is four messages old is cut to its first three and last five lines, with where the whole of it is kept (the chat's stream says so: a context.offloaded part) — a coding turn's prompts stay small. window: none is cut until the conversation nears the window the turn works in (context_window) — the mark at which the platform compacts it, about three quarters of the window — and past it they are cut before anything is summarised: for an agent that reads material and reproduces it, at the prompt tokens that costs. Its subagents take it unless they say their own.
134
+ */
135
+ tool_outputs?: "aged" | "window";
132
136
  /**
133
137
  * Its tools (64 at most, with its MCP servers').
134
138
  */
@@ -2760,6 +2764,10 @@ export type Subagent = {
2760
2764
  * Whether its model's reasoning is asked for to show (visible) or not at all (hidden). Left out: the agent's.
2761
2765
  */
2762
2766
  thinking?: "visible" | "hidden";
2767
+ /**
2768
+ * When what a tool answered it some steps ago leaves the conversation its model is sent: aged or window, as the agent's. Left out: the agent's, whatever model it runs on.
2769
+ */
2770
+ tool_outputs?: "aged" | "window";
2763
2771
  /**
2764
2772
  * Its tools.
2765
2773
  */