palbase 0.77.0 → 0.78.1
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/dist/ai/index.js +2 -2
- package/dist/ai-sdk/index.js +2 -2
- package/dist/backend/engine.js +2 -2
- package/dist/backend/env.js +1 -1
- package/dist/backend/index.js +3 -3
- package/dist/backend/stack.js +1 -1
- package/dist/backend/test.js +2 -2
- package/dist/chunks/{34HGL5FX.js → 25KG2TVU.js} +1 -1
- package/dist/chunks/{GFBWGJW3.js → 2T3EX52E.js} +1 -1
- package/dist/chunks/{VOLGPAPR.js → 35KQJQ77.js} +2 -2
- package/dist/chunks/{ES24JS2D.js → 3TJFV35H.js} +2 -2
- package/dist/chunks/{FN5763FR.js → 3XF644A5.js} +2 -2
- package/dist/chunks/426QPZNS.js +13 -0
- package/dist/chunks/{U4VX7NKX.js → 4XE4HLPK.js} +2 -2
- package/dist/chunks/{WXT24CE5.js → 5KGMQFET.js} +1 -1
- package/dist/chunks/6Y4ICGZ7.js +2 -0
- package/dist/chunks/{G3PH5T6N.js → EUMY6SCM.js} +1 -1
- package/dist/chunks/{IZVBCAKH.js → FCCX2OTM.js} +2 -2
- package/dist/chunks/{RQJ4MX2H.js → IO5HB5B6.js} +2 -2
- package/dist/chunks/{AUOFL6RB.js → JY7YG3BO.js} +2 -2
- package/dist/chunks/{RRS7TQKX.js → L63FWRZX.js} +2 -2
- package/dist/chunks/{ONLXIZ6E.js → LONPNPNX.js} +2 -2
- package/dist/chunks/{DENZSXKJ.js → LXS7JHPJ.js} +2 -2
- package/dist/chunks/{QWXF6KWI.js → QWKOKJKM.js} +1 -1
- package/dist/chunks/{7RTPVUIH.js → RB4JQXKZ.js} +2 -2
- package/dist/chunks/{BDHVYVWT.js → ROV6TJZK.js} +1 -1
- package/dist/chunks/{KLK7HZZ7.js → TFPVJ3C3.js} +3 -3
- package/dist/chunks/{JOVXELK5.js → UUDOMSKW.js} +2 -2
- package/dist/chunks/{FE7ZBADH.js → VNUCKM7H.js} +1 -1
- package/dist/chunks/{ZZNNCI6A.js → WTFMJKDB.js} +2 -2
- package/dist/chunks/{F6OGRDZB.js → ZBTOHVML.js} +2 -2
- package/dist/chunks/{CYNLRAAW.js → ZIHVYOXE.js} +2 -2
- package/dist/cli.js +7 -3
- package/dist/cloud/index.js +2 -2
- package/dist/refuse/ai-sdk.js +1 -1
- package/dist/refuse/ai.js +1 -1
- package/dist/refuse/backend.js +1 -1
- package/dist/refuse/cloud.js +1 -1
- package/dist/refuse/server.js +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/testing.js +2 -2
- package/dist/web/index.js +2 -2
- package/dist/web/message.js +2 -2
- package/dist/web/palbe.js +2 -2
- package/dist/web/payments-ui.js +2 -2
- package/dist/web/paywall.js +2 -2
- package/dist/web/push-sw.js +1 -1
- package/dist/web/ssr.js +2 -2
- package/dist/web/vite.js +2 -2
- package/package.json +2 -2
- package/types/ai/src/chats.d.ts +7 -0
- package/types/backend/src/gateways.d.ts +2 -1
- package/types/cloud/src/generated/project.d.ts +1 -1
- package/types/internal/src/chat.d.ts +28 -0
- package/types/internal/src/modules/ai.d.ts +11 -7
- package/types/internal/src/modules/payments.d.ts +366 -24
- package/types/web/src/chat.d.ts +20 -0
- package/types/web/src/index.d.ts +1 -1
- package/dist/chunks/4M4GEXJS.js +0 -13
- package/dist/chunks/6WCN7VAZ.js +0 -2
|
@@ -14,7 +14,7 @@ export interface Project {
|
|
|
14
14
|
machines: Pick<modules.machines.Client, "listMachines" | "createMachine" | "listMachineSizes" | "getMachineNetwork" | "connectGitHub" | "listInstallations" | "linkInstallation" | "shareInstallation" | "unlinkInstallation" | "listRepositories" | "getMachine" | "deleteMachine" | "updateMachine" | "listBuilds" | "deployMachine" | "listMachinePreviews" | "putMachinePreview" | "deleteMachinePreview" | "listMachineDomains" | "addMachineDomain" | "deleteMachineDomain" | "updateMachineDomain" | "getBuild" | "getBuildLog" | "rollbackMachine" | "listDatabases" | "createDatabase" | "listDatabaseSizes" | "getDatabase" | "deleteDatabase" | "updateDatabase" | "undeleteDatabase" | "purgeDatabase" | "getDatabaseCredentials" | "changeDatabasePassword" | "readMachineLogs" | "execInMachine" | "listMachineExecs" | "getMachineMetrics" | "getMachineContract" | "restoreDatabase" | "getDatabaseSchema" | "getDatabaseMetrics" | "queryDatabase" | "listCrons" | "listCronRuns" | "runCron" | "pauseCron" | "resumeCron" | "listTasks" | "enqueueTask" | "getTask" | "cancelTask" | "retryTask" | "listTaskTypes" | "makeTemplatedTestUsers" | "templateTestUser" | "deleteTemplatedTestUser" | "listSites" | "createSite" | "getSite" | "deleteSite" | "updateSite" | "listSiteReleases" | "createSiteRelease" | "uploadSiteFile" | "finishSiteRelease" | "rollbackSite" | "listSiteBuilds" | "deploySite" | "listSitePreviews" | "listSiteDomains" | "addSiteDomain" | "deleteSiteDomain" | "updateSiteDomain" | "getSiteBuild" | "authorizeSitePreview" | "authorizeMachinePreview" | "openMachinePreview" | "moveMachine" | "moveSite" | "moveDatabase" | "cancelSiteBuild" | "cancelBuild" | "listSiteHooks" | "createSiteHook" | "deleteSiteHook" | "listMachineHooks" | "createMachineHook" | "deleteMachineHook" | "detectProject" | "createPreviewPass" | "listPreviewLinks" | "createPreviewLink" | "deletePreviewLink" | "listEnvironmentDomains" | "addEnvironmentDomain" | "deleteEnvironmentDomain" | "setEnvironmentSignInDomain">;
|
|
15
15
|
messaging: Pick<modules.messaging.Client, "adminAccessLog" | "adminListConversations" | "adminCreateConversation" | "adminGetConversation" | "adminDeleteConversation" | "adminUpdateConversation" | "adminAddMembers" | "adminRemoveMember" | "adminListMessages" | "adminSendMessage" | "adminDeleteMessage" | "adminFileUrl" | "adminPutProfile" | "adminListReports" | "adminGetReport" | "adminReportFileUrl" | "adminResolveReport" | "getSettings" | "putSettings" | "rotateHookSecret">;
|
|
16
16
|
notify: Pick<modules.notify.Client, "getDeliverability" | "listDevices" | "getDeviceStats" | "deleteMyDevice" | "sendEmail" | "listInAppCampaigns" | "createInAppCampaign" | "getInAppCampaign" | "putInAppCampaign" | "deleteInAppCampaign" | "getInAppCampaignStats" | "listInAppTemplates" | "sendInbox" | "listInboxMessages" | "listNotifyMessages" | "getNotifyMessage" | "cancelMessage" | "getMetricsSummary" | "listNotifyProviders" | "putNotifyProvider" | "deleteNotifyProvider" | "sendPush" | "getNotifySettings" | "putNotifySettings" | "sendSms" | "listEmailTemplates" | "getEmailTemplate" | "putEmailTemplate" | "deleteEmailTemplate" | "listPushTemplates" | "getPushTemplate" | "putPushTemplate" | "deletePushTemplate" | "listSmsTemplates" | "getSmsTemplate" | "putSmsTemplate" | "deleteSmsTemplate" | "listWhatsAppTemplates" | "getWhatsAppTemplate" | "putWhatsAppTemplate" | "deleteWhatsAppTemplate" | "listTestUserMessages" | "listTopics" | "createTopic" | "deleteTopic" | "changeTopic" | "addTopicSubscribers" | "removeTopicSubscriber" | "listUserDevices" | "getUserPreferences" | "setUserPreferences" | "startVerification" | "checkVerification" | "getWebPushStatus" | "sendWhatsApp" | "listWhatsAppInbound">;
|
|
17
|
-
payments: Pick<modules.payments.Client, "auditCashFlow" | "auditDrift" | "auditLedger" | "exportAuditLedgerCsv" | "getCapabilities" | "listChannels" | "connectChannel" | "createChannelGrant" | "getChannel" | "deleteChannel" | "checkChannel" | "setDefaultChannel" | "listDisputes" | "lookupInstallments" | "listIntents" | "createIntent" | "getIntent" | "listIntentAttempts" | "cancelIntent" | "settlePendingRefund" | "captureIntent" | "confirmIntent" | "submitIntentOtp" | "listRefunds" | "createRefund" | "listRoutingRules" | "replaceRoutingRules" | "getSellerAccount" | "listSellerLedger" | "getSettings" | "updateSettings" | "listPaymentSplits" | "updatePaymentSplit" | "approvePaymentSplit" | "disapprovePaymentSplit" | "refundPaymentSplit" | "createStripeAppGrant" | "listSubMerchants" | "upsertSubMerchant" | "getSubMerchant" | "createSubMerchantOnboardingLink" | "syncSubMerchant" | "listSubscriptions" | "createSubscription" | "cancelSubscription" | "extendSubscription" | "listWallets" | "upsertWallet" | "chargeWallet" | "creditWallet" | "getCustomerWallets" | "freezeWallet" | "createWalletHold" | "commitWalletHold" | "releaseWalletHold" | "voidPendingWalletCredits" | "transferWallet">;
|
|
17
|
+
payments: Pick<modules.payments.Client, "auditCashFlow" | "auditDrift" | "auditLedger" | "exportAuditLedgerCsv" | "getCapabilities" | "listChannels" | "connectChannel" | "createChannelGrant" | "getChannel" | "deleteChannel" | "checkChannel" | "setDefaultChannel" | "listDisputes" | "lookupInstallments" | "listIntents" | "createIntent" | "getIntent" | "listIntentAttempts" | "cancelIntent" | "settlePendingRefund" | "captureIntent" | "confirmIntent" | "submitIntentOtp" | "listRefunds" | "createRefund" | "listRoutingRules" | "replaceRoutingRules" | "getSellerAccount" | "listSellerLedger" | "getSettings" | "updateSettings" | "listPaymentSplits" | "updatePaymentSplit" | "approvePaymentSplit" | "disapprovePaymentSplit" | "refundPaymentSplit" | "createStripeAppGrant" | "listSubMerchants" | "upsertSubMerchant" | "getSubMerchant" | "createSubMerchantOnboardingLink" | "syncSubMerchant" | "listSubscriptions" | "createSubscription" | "cancelSubscription" | "extendSubscription" | "listWallets" | "upsertWallet" | "chargeWallet" | "creditWallet" | "getCustomerWallets" | "freezeWallet" | "createWalletHold" | "commitWalletHold" | "releaseWalletHold" | "voidPendingWalletCredits" | "transferWallet" | "getCustomer" | "updateCustomer" | "deleteCustomer" | "listCustomerMethods" | "addCustomerMethod" | "deleteCustomerMethod" | "setCustomerDefaultMethod" | "createCustomerPortal">;
|
|
18
18
|
realtime: Pick<modules.realtime.Client, "broadcast" | "getChannels" | "putChannels" | "getLimits" | "putLimits" | "revalidate" | "writeState" | "getStats">;
|
|
19
19
|
secrets: Pick<modules.secrets.Client, "listSecretAudit" | "listFieldKeys" | "getFieldKeys" | "openFields" | "sealPlaceholder" | "rotateFieldKeys" | "listTransitKeys" | "getTransitKeys" | "getTransitPublicKeys" | "rotateTransitKeys" | "retireTransitKey" | "listSecrets" | "getEnvironmentValues" | "getSecret" | "putSecret" | "deleteSecret" | "rollbackSecret" | "listSecretVersions">;
|
|
20
20
|
storage: Pick<modules.storage.Client, "listBuckets" | "getBucket" | "putBucket" | "deleteBucket" | "copyObject" | "moveObject" | "listObjects" | "getObject" | "putObject" | "deleteObject" | "headObject" | "createSignedUrl" | "createUploadUrl" | "getStorageStats">;
|
|
@@ -26,6 +26,8 @@ export interface Publication {
|
|
|
26
26
|
/** A member's (or the server's) message, as the agent got it. */
|
|
27
27
|
export interface MessageEvent {
|
|
28
28
|
type: 'message';
|
|
29
|
+
/** When it happened, as the journal took it (RFC 3339, UTC, to the microsecond; a voice's end: when its record says it ended) — absent for an answer's text read ahead of the journal, and from a module before it said. */
|
|
30
|
+
at?: string;
|
|
29
31
|
/** The journal's sequence. */
|
|
30
32
|
seq: number;
|
|
31
33
|
message: ChatMessage;
|
|
@@ -33,6 +35,8 @@ export interface MessageEvent {
|
|
|
33
35
|
/** A turn's state: started, waiting (and why), or ended. */
|
|
34
36
|
export interface TurnEvent {
|
|
35
37
|
type: 'turn';
|
|
38
|
+
/** When it happened, as the journal took it (RFC 3339, UTC, to the microsecond; a voice's end: when its record says it ended) — absent for an answer's text read ahead of the journal, and from a module before it said. */
|
|
39
|
+
at?: string;
|
|
36
40
|
seq: number;
|
|
37
41
|
response_id: string;
|
|
38
42
|
/** The member who started it; null: the project's server's turn, or one the engine started from late messages. */
|
|
@@ -75,6 +79,8 @@ export interface TurnEvent {
|
|
|
75
79
|
/** The agent's answer as it is written: new text only, at its byte offset. */
|
|
76
80
|
export interface TextEvent {
|
|
77
81
|
type: 'text';
|
|
82
|
+
/** When it happened, as the journal took it (RFC 3339, UTC, to the microsecond; a voice's end: when its record says it ended) — absent for an answer's text read ahead of the journal, and from a module before it said. */
|
|
83
|
+
at?: string;
|
|
78
84
|
response_id: string;
|
|
79
85
|
/** Where the text goes, in bytes of the answer (UTF-8). */
|
|
80
86
|
offset: number;
|
|
@@ -83,6 +89,8 @@ export interface TextEvent {
|
|
|
83
89
|
/** Discard the answer past offset (bytes): the model went back. */
|
|
84
90
|
export interface ResetEvent {
|
|
85
91
|
type: 'reset';
|
|
92
|
+
/** When it happened, as the journal took it (RFC 3339, UTC, to the microsecond; a voice's end: when its record says it ended) — absent for an answer's text read ahead of the journal, and from a module before it said. */
|
|
93
|
+
at?: string;
|
|
86
94
|
response_id: string;
|
|
87
95
|
offset: number;
|
|
88
96
|
}
|
|
@@ -92,6 +100,8 @@ export interface ResetEvent {
|
|
|
92
100
|
*/
|
|
93
101
|
export interface ThinkingEvent {
|
|
94
102
|
type: 'thinking';
|
|
103
|
+
/** When it happened, as the journal took it (RFC 3339, UTC, to the microsecond; a voice's end: when its record says it ended) — absent for an answer's text read ahead of the journal, and from a module before it said. */
|
|
104
|
+
at?: string;
|
|
95
105
|
seq: number;
|
|
96
106
|
response_id: string;
|
|
97
107
|
run_id: string;
|
|
@@ -110,6 +120,8 @@ export type GoalKind = 'set' | 'updated' | 'turn_started' | 'judged' | 'verified
|
|
|
110
120
|
/** A word of the chat's goal: set, changed, a turn of it begun, a turn judged, a claimed completion checked, its status, cleared. */
|
|
111
121
|
export interface GoalEvent {
|
|
112
122
|
type: 'goal';
|
|
123
|
+
/** When it happened, as the journal took it (RFC 3339, UTC, to the microsecond; a voice's end: when its record says it ended) — absent for an answer's text read ahead of the journal, and from a module before it said. */
|
|
124
|
+
at?: string;
|
|
113
125
|
/** The journal's sequence. */
|
|
114
126
|
seq: number;
|
|
115
127
|
goal_id: string;
|
|
@@ -175,6 +187,8 @@ export interface HistoryEvent {
|
|
|
175
187
|
/** A tool call, each time its state changes. */
|
|
176
188
|
export interface ToolEvent {
|
|
177
189
|
type: 'tool';
|
|
190
|
+
/** When it happened, as the journal took it (RFC 3339, UTC, to the microsecond; a voice's end: when its record says it ended) — absent for an answer's text read ahead of the journal, and from a module before it said. */
|
|
191
|
+
at?: string;
|
|
178
192
|
seq: number;
|
|
179
193
|
response_id: string;
|
|
180
194
|
/** The subagent's run that made it; absent or null: the agent's own. */
|
|
@@ -208,6 +222,8 @@ export interface ToolEvent {
|
|
|
208
222
|
/** A subagent at work — or one the agent asked for and was refused (status denied, with its reason). */
|
|
209
223
|
export interface AgentEvent {
|
|
210
224
|
type: 'agent';
|
|
225
|
+
/** When it happened, as the journal took it (RFC 3339, UTC, to the microsecond; a voice's end: when its record says it ended) — absent for an answer's text read ahead of the journal, and from a module before it said. */
|
|
226
|
+
at?: string;
|
|
211
227
|
seq: number;
|
|
212
228
|
/** The subagent's run; '' for a refused one, which never ran. */
|
|
213
229
|
run_id: string;
|
|
@@ -226,6 +242,8 @@ export interface AgentEvent {
|
|
|
226
242
|
/** The chat's live voice began, or ended: whose it is, what becomes of what is asked of it, how long it lasted, why it ended. */
|
|
227
243
|
export interface VoiceEvent {
|
|
228
244
|
type: 'voice';
|
|
245
|
+
/** When it happened, as the journal took it (RFC 3339, UTC, to the microsecond; a voice's end: when its record says it ended) — absent for an answer's text read ahead of the journal, and from a module before it said. */
|
|
246
|
+
at?: string;
|
|
229
247
|
/** The journal's sequence of its start; 0 for its end, told from the module's record under the voice's id. */
|
|
230
248
|
seq: number;
|
|
231
249
|
voice_id: string;
|
|
@@ -241,6 +259,8 @@ export interface VoiceEvent {
|
|
|
241
259
|
/** A line said in the chat's voice — the person's (user) or the voice's (assistant): a message of kind voice of its history. */
|
|
242
260
|
export interface TranscriptEvent {
|
|
243
261
|
type: 'transcript';
|
|
262
|
+
/** When it happened, as the journal took it (RFC 3339, UTC, to the microsecond; a voice's end: when its record says it ended) — absent for an answer's text read ahead of the journal, and from a module before it said. */
|
|
263
|
+
at?: string;
|
|
244
264
|
seq: number;
|
|
245
265
|
/** The line's id: its message's in the chat's history. */
|
|
246
266
|
id: string;
|
|
@@ -256,6 +276,8 @@ export interface TranscriptEvent {
|
|
|
256
276
|
/** A session teleported to a new compute or executor target: generation advanced atomically. */
|
|
257
277
|
export interface SessionHandedOffEvent {
|
|
258
278
|
type: 'session.handed_off';
|
|
279
|
+
/** When it happened, as the journal took it (RFC 3339, UTC, to the microsecond; a voice's end: when its record says it ended) — absent for an answer's text read ahead of the journal, and from a module before it said. */
|
|
280
|
+
at?: string;
|
|
259
281
|
seq: number;
|
|
260
282
|
chat_id: string;
|
|
261
283
|
generation: number;
|
|
@@ -267,6 +289,8 @@ export interface SessionHandedOffEvent {
|
|
|
267
289
|
/** A target machine went online, offline, or waking — with failover_at when auto-failover is counting down. */
|
|
268
290
|
export interface SessionMachineStatusEvent {
|
|
269
291
|
type: 'session.machine_status';
|
|
292
|
+
/** When it happened, as the journal took it (RFC 3339, UTC, to the microsecond; a voice's end: when its record says it ended) — absent for an answer's text read ahead of the journal, and from a module before it said. */
|
|
293
|
+
at?: string;
|
|
270
294
|
seq: number;
|
|
271
295
|
chat_id: string;
|
|
272
296
|
machine_id: string;
|
|
@@ -276,6 +300,8 @@ export interface SessionMachineStatusEvent {
|
|
|
276
300
|
/** Tier 1 compaction offloaded a bulky tool output to workspace/artifact storage and replaced it with a compact stub. */
|
|
277
301
|
export interface ContextOffloadedEvent {
|
|
278
302
|
type: 'context.offloaded';
|
|
303
|
+
/** When it happened, as the journal took it (RFC 3339, UTC, to the microsecond; a voice's end: when its record says it ended) — absent for an answer's text read ahead of the journal, and from a module before it said. */
|
|
304
|
+
at?: string;
|
|
279
305
|
seq: number;
|
|
280
306
|
call_id: string;
|
|
281
307
|
storage?: string;
|
|
@@ -286,6 +312,8 @@ export interface ContextOffloadedEvent {
|
|
|
286
312
|
/** Tier 3 compaction anchored earlier history into a structured summary while preserving project directives and attachments. */
|
|
287
313
|
export interface ContextCompactedEvent {
|
|
288
314
|
type: 'context.compacted';
|
|
315
|
+
/** When it happened, as the journal took it (RFC 3339, UTC, to the microsecond; a voice's end: when its record says it ended) — absent for an answer's text read ahead of the journal, and from a module before it said. */
|
|
316
|
+
at?: string;
|
|
289
317
|
seq: number;
|
|
290
318
|
format?: string;
|
|
291
319
|
messages_compacted?: number;
|
|
@@ -541,6 +541,10 @@ export type ChatPart = {
|
|
|
541
541
|
data: {
|
|
542
542
|
[key: string]: unknown;
|
|
543
543
|
};
|
|
544
|
+
/**
|
|
545
|
+
* When it happened, as the journal took it (a voice's end: when its record says it ended), the same as its channel told it: RFC 3339 in UTC, to the microsecond, at a fixed width — 2026-11-28T06:36:15.321369Z — so its text sorts as its time: kept as this text, never parsed and written again. Absent for a fork's history and an answer's start a page puts first.
|
|
546
|
+
*/
|
|
547
|
+
at?: string;
|
|
544
548
|
/**
|
|
545
549
|
* The journal's sequence it was told at; absent for an answer's text, placed by its offset.
|
|
546
550
|
*/
|
|
@@ -1261,7 +1265,7 @@ export type Goal = {
|
|
|
1261
1265
|
usage: GoalUsage;
|
|
1262
1266
|
};
|
|
1263
1267
|
/**
|
|
1264
|
-
* What a goal may cost at most, all its turns and their subagents together; null: no limit.
|
|
1268
|
+
* What a goal may cost at most, all its turns and their subagents together, their model calls and their web searches; null: no limit.
|
|
1265
1269
|
*/
|
|
1266
1270
|
export type GoalBudget = ({
|
|
1267
1271
|
/**
|
|
@@ -3017,7 +3021,7 @@ export type TurnArtifacts = {
|
|
|
3017
3021
|
artifacts: TurnArtifact[];
|
|
3018
3022
|
};
|
|
3019
3023
|
/**
|
|
3020
|
-
* What the turn a message starts may cost at most, its subagents' spend counted (the server's alone): past it the engine stops the turn. A message delivered into a turn already running takes that turn's.
|
|
3024
|
+
* What the turn a message starts may cost at most, its subagents' spend counted, their model calls and their web searches (the server's alone): past it the engine stops the turn. A message delivered into a turn already running takes that turn's.
|
|
3021
3025
|
*/
|
|
3022
3026
|
export type TurnBudget = {
|
|
3023
3027
|
/**
|
|
@@ -4944,7 +4948,7 @@ export declare function client(t: Transport): {
|
|
|
4944
4948
|
/**
|
|
4945
4949
|
* The chat's past
|
|
4946
4950
|
*
|
|
4947
|
-
* The chat's past as its stream told it, a page at a time from its newest end back: the members' messages, the turns, the answers as text at their offsets, the tools and the subagents, the goal's and the voice's words — each page in the order it was told, each part under the id its channel told it (part_id), so an app holding the channel's parts and a page of these keeps each once. A page reads limit of the chat's events before the cursor, or before the oldest part the app holds of the chat's channel (before: that part's id), so the first page does not read again the day the channel told; with neither, from its newest end. Given both, the call is refused (400). A page read by turns (turns=n) ends where the chat's n-th turn before the cursor (or the newest end) opens — a goal's turn at the goal's turn_started, any other at its start, the messages that began it right after — so turns=1 is the last turn whole, and its cursor's turns=1 the turn before; a page that would read more than 5000 of the chat's events ends there, its turns saying how many it opened, its cursor going on. The page that reaches the chat's start begins with where a fork began. A voice's end is under the id its channel told it (vclosed:<voice>); a voice the engine lost, its end said by no journal, has it right after its last part. Reading a page records nothing. A call's answer is by its end, as the stream shows it. Read by the chat's members and the project's server.
|
|
4951
|
+
* The chat's past as its stream told it, a page at a time from its newest end back: the members' messages, the turns, the answers as text at their offsets, the tools and the subagents, the goal's and the voice's words — each page in the order it was told, each part under the id its channel told it (part_id) and at the time it happened (at: when the journal took it, as the channel told it — a call's end minus its start is how long it ran), so an app holding the channel's parts and a page of these keeps each once. A page reads limit of the chat's events before the cursor, or before the oldest part the app holds of the chat's channel (before: that part's id), so the first page does not read again the day the channel told; with neither, from its newest end. Given both, the call is refused (400). A page read by turns (turns=n) ends where the chat's n-th turn before the cursor (or the newest end) opens — a goal's turn at the goal's turn_started, any other at its start, the messages that began it right after — so turns=1 is the last turn whole, and its cursor's turns=1 the turn before; a page that would read more than 5000 of the chat's events ends there, its turns saying how many it opened, its cursor going on. The page that reaches the chat's start begins with where a fork began. A voice's end is under the id its channel told it (vclosed:<voice>); a voice the engine lost, its end said by no journal, has it right after its last part. Reading a page records nothing. A call's answer is by its end, as the stream shows it. Read by the chat's members and the project's server.
|
|
4948
4952
|
*/
|
|
4949
4953
|
listChatParts(input: {
|
|
4950
4954
|
path: {
|
|
@@ -4961,7 +4965,7 @@ export declare function client(t: Transport): {
|
|
|
4961
4965
|
/**
|
|
4962
4966
|
* Pipe the chat into a channel
|
|
4963
4967
|
*
|
|
4964
|
-
* Writes the chat's stream into a channel of the project's realtime from now on — a gateway's, durable — as the platform: the members' messages, the turns, the answer as it is written (gathered into a few writes a second), the tools and subagents, each the channel's event `chat` {type, id?, data}, under an id of its own so a retry is kept once. The types: `message` (a ChatMessage, as the agent got it), `turn` ({response_id, status: running|waiting|completed|failed|canceled|timed_out|budget_exceeded, user_id, solo, goal: {goal_id, role: work|verify, seq} — a turn of the chat's goal, waiting: {reason: approval|tool_output|subagents|message, text_offset, approval_id, tool_call_id, tool_name, input, publication}, end: completed|failed|stopped|budget_exceeded — as the turn's event says it, error: {code, message, retryable}}), `text` ({response_id, offset, text}: the agent's answer as it is written, at its byte offset), `reset` ({response_id, offset}: discard the answer past offset), `thinking` ({response_id, run_id, step_id, text}: the model's reasoning as it thinks, when the agent shows it — thinking: visible), `tool` ({response_id, run_id, call_id, name, status: running|awaiting_output|awaiting_approval|approved|denied|expired|completed|failed|canceled, text_offset, input, output, image_count, is_error, approval_id, agent_response_id, …}), `agent` ({run_id, response_id, parent_response_id, name, required, status, text_offset}: a subagent at work), `advisor` ({response_id, run_id, seq, kind: step|final|ask, verdict: none|heads_up|answer|unreadable, rule, message, question, told}: the agent's advisor read its work — after a step, at its answer, which waits for it, or because the agent asked; told: the agent was told at its next step), `goal` ({goal_id, kind: set|updated|turn_started|judged|verified|status_changed|cleared, goal: {objective, rubric, status, stop_code, stop_reason, phase, max_turns, max_cost_usd}, role, seq, response_id, run_id, verdict, reason, missing, from, to, code}: the chat's goal's words), `voice` ({voice_id, user_id, delegation, status: started|closed, seconds, close_reason}: the chat's live voice began or ended), `transcript` ({id, voice_id, role: user|assistant, user_id, author_name, text, final, created_at}: a line it said either way — the chat's history's message of kind voice, by its id), `seen` (the journal moved past what was handed already), and — first, in a fork's channel — `history` ({forked_from: {chat_id, before_message}, part, parts, items: [{role: user|assistant, message_id, client_id, author, author_name, text, metadata, created_at, response_id, text_truncated, attachments}]}: what the fork began with, a few items a part, a long text cut in its part, its id h and the part's place). Every type but text and reset has the journal's sequence as its id; text_offset says where in the answer a tool or subagent part happened. The project's backend is not in the stream: the gateway's members hear the chat from realtime, and one that was away is given what it missed there. Put again with the same channel it goes on where it is — one realtime refused is tried again; with another, from the chat's start, and nothing more is written into the one before. The project's server's alone.
|
|
4968
|
+
* Writes the chat's stream into a channel of the project's realtime from now on — a gateway's, durable — as the platform: the members' messages, the turns, the answer as it is written (gathered into a few writes a second), the tools and subagents, each the channel's event `chat` {type, id?, at?, data}, under an id of its own so a retry is kept once. The types: `message` (a ChatMessage, as the agent got it), `turn` ({response_id, status: running|waiting|completed|failed|canceled|timed_out|budget_exceeded, user_id, solo, goal: {goal_id, role: work|verify, seq} — a turn of the chat's goal, waiting: {reason: approval|tool_output|subagents|message, text_offset, approval_id, tool_call_id, tool_name, input, publication}, end: completed|failed|stopped|budget_exceeded — as the turn's event says it, error: {code, message, retryable}}), `text` ({response_id, offset, text}: the agent's answer as it is written, at its byte offset), `reset` ({response_id, offset}: discard the answer past offset), `thinking` ({response_id, run_id, step_id, text}: the model's reasoning as it thinks, when the agent shows it — thinking: visible), `tool` ({response_id, run_id, call_id, name, status: running|awaiting_output|awaiting_approval|approved|denied|expired|completed|failed|canceled, text_offset, input, output, image_count, is_error, approval_id, agent_response_id, …}), `agent` ({run_id, response_id, parent_response_id, name, required, status, text_offset}: a subagent at work), `advisor` ({response_id, run_id, seq, kind: step|final|ask, verdict: none|heads_up|answer|unreadable, rule, message, question, told}: the agent's advisor read its work — after a step, at its answer, which waits for it, or because the agent asked; told: the agent was told at its next step), `goal` ({goal_id, kind: set|updated|turn_started|judged|verified|status_changed|cleared, goal: {objective, rubric, status, stop_code, stop_reason, phase, max_turns, max_cost_usd}, role, seq, response_id, run_id, verdict, reason, missing, from, to, code}: the chat's goal's words), `voice` ({voice_id, user_id, delegation, status: started|closed, seconds, close_reason}: the chat's live voice began or ended), `transcript` ({id, voice_id, role: user|assistant, user_id, author_name, text, final, created_at}: a line it said either way — the chat's history's message of kind voice, by its id), `seen` ({response_id, offset, bytes}: the journal moved past what was handed already — it took those bytes of the answer then, the time of the text handed ahead of it), and — first, in a fork's channel — `history` ({forked_from: {chat_id, before_message}, part, parts, items: [{role: user|assistant, message_id, client_id, author, author_name, text, metadata, created_at, response_id, text_truncated, attachments}]}: what the fork began with, a few items a part, a long text cut in its part, its id h and the part's place). Every type but text and reset has the journal's sequence as its id; every part of the journal its time (at: when the journal took it, RFC 3339 in UTC to the microsecond at a fixed width, 2026-11-28T06:36:15.321369Z, so its text sorts as its time — a voice's end: when its record says it ended), the same on a page of the chat's past; an answer's text read from the replica writing it, ahead of the journal, has none (the seen part after it does), and a fork's history none; text_offset says where in the answer a tool or subagent part happened. The project's backend is not in the stream: the gateway's members hear the chat from realtime, and one that was away is given what it missed there. Put again with the same channel it goes on where it is — one realtime refused is tried again; with another, from the chat's start, and nothing more is written into the one before. The project's server's alone.
|
|
4965
4969
|
*/
|
|
4966
4970
|
putChatPipe(input: {
|
|
4967
4971
|
path: {
|
|
@@ -5625,13 +5629,13 @@ export declare function client(t: Transport): {
|
|
|
5625
5629
|
/**
|
|
5626
5630
|
* What the project's use of models cost
|
|
5627
5631
|
*
|
|
5628
|
-
* Every use, newest first: a response's tokens, an embeddings call, a picture job — with its cost at the provider's list price and whose connection paid. A use under the project's own key is billed by the provider, not by Palbase.
|
|
5632
|
+
* Every use, newest first: a response's tokens, the web searches its turn ran, a chat's voice, an embeddings call, a picture job, a video, speech to text and back, a machine's minutes — with its cost at the provider's list price and whose connection paid. A use under the project's own key is billed by the provider, not by Palbase.
|
|
5629
5633
|
*/
|
|
5630
5634
|
listUsage(input?: {
|
|
5631
5635
|
query?: {
|
|
5632
5636
|
limit?: number; /** The next_cursor of the previous page. */
|
|
5633
|
-
cursor?: string; /** Only uses of this kind
|
|
5634
|
-
kind?: "text" | "embedding" | "image" | "video" | "stt" | "tts" | "voice" | "web_search" | "machine"; /** Labels each use listed carries, as a JSON object ({"product":"p1"}): a product's spend, a task's. */
|
|
5637
|
+
cursor?: string; /** Only uses of this kind. */
|
|
5638
|
+
kind?: "text" | "embedding" | "image" | "video" | "stt" | "tts" | "voice" | "web_search" | "machine"; /** Labels each use listed carries, as a JSON object ({"product":"p1"}): a product's spend, a task's. A turn's use carries its labels and, for a chat's turn, its chat's labels and the chat, frozen as the turn ends; so do the web searches the turn ran. A chat's voice carries its chat's labels and the chat, frozen as it starts. A machine's minutes are its workspace's, which serves many turns, and carry none. */
|
|
5635
5639
|
metadata?: string;
|
|
5636
5640
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
5637
5641
|
signal?: AbortSignal;
|