palbase 0.76.0 → 0.77.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.
- 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/{A3I7H7QN.js → 34HGL5FX.js} +1 -1
- package/dist/chunks/{ALT62XIG.js → 4M4GEXJS.js} +2 -2
- package/dist/chunks/{2NEPN2ZZ.js → 6WCN7VAZ.js} +2 -2
- package/dist/chunks/{ZCMCYI2D.js → 7RTPVUIH.js} +2 -2
- package/dist/chunks/{5RNXCTOO.js → AUOFL6RB.js} +2 -2
- package/dist/chunks/{KEGVHELA.js → BDHVYVWT.js} +1 -1
- package/dist/chunks/CYNLRAAW.js +2 -0
- package/dist/chunks/{5YJZAPY2.js → DENZSXKJ.js} +2 -2
- package/dist/chunks/ES24JS2D.js +2 -0
- package/dist/chunks/{Q4UWBIJ6.js → F6OGRDZB.js} +2 -2
- package/dist/chunks/{D6NOE76D.js → FE7ZBADH.js} +1 -1
- package/dist/chunks/{SVWF7ABJ.js → FN5763FR.js} +2 -2
- package/dist/chunks/{DKYFIOWM.js → G3PH5T6N.js} +1 -1
- package/dist/chunks/{ISMWEEGW.js → GFBWGJW3.js} +1 -1
- package/dist/chunks/{EXLA3A7O.js → IZVBCAKH.js} +2 -2
- package/dist/chunks/{TGQGGUE6.js → JOVXELK5.js} +2 -2
- package/dist/chunks/KLK7HZZ7.js +18 -0
- package/dist/chunks/{MKVIRNSJ.js → ONLXIZ6E.js} +2 -2
- package/dist/chunks/{BRDO3ZPT.js → QWXF6KWI.js} +1 -1
- package/dist/chunks/{UHN63FGH.js → RQJ4MX2H.js} +2 -2
- package/dist/chunks/{PGQNRJ2C.js → RRS7TQKX.js} +2 -2
- package/dist/chunks/{33XOVYAU.js → U4VX7NKX.js} +4 -4
- package/dist/chunks/{UOW74IHY.js → VOLGPAPR.js} +2 -2
- package/dist/chunks/{3CN6HGTW.js → WXT24CE5.js} +1 -1
- package/dist/chunks/{TUK6NH2Q.js → ZZNNCI6A.js} +2 -2
- package/dist/cli.js +241 -187
- 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/ai.d.ts +6 -2
- package/types/ai/src/chats.d.ts +22 -10
- package/types/ai/src/index.d.ts +2 -2
- package/types/ai/src/pools.d.ts +15 -24
- package/types/cloud/src/generated/project.d.ts +3 -3
- package/types/cloud/src/generated/studio.d.ts +4 -6
- package/types/internal/src/ai-machines.d.ts +120 -0
- package/types/internal/src/chat.d.ts +1 -1
- package/types/internal/src/modules/ai.d.ts +186 -77
- package/types/internal/src/modules/analytics.d.ts +5 -1
- package/types/internal/src/modules/auth.d.ts +3 -28
- package/types/internal/src/modules/commerce.d.ts +92 -13
- package/types/internal/src/modules/events.d.ts +2 -2
- package/types/internal/src/modules/iap.d.ts +2 -2
- package/types/internal/src/modules/journeys.d.ts +2 -2
- package/types/internal/src/modules/machines.d.ts +33 -33
- package/types/internal/src/modules/notify.d.ts +2 -2
- package/types/internal/src/modules/payments.d.ts +83 -14
- package/types/internal/src/modules/stores.d.ts +3 -3
- package/types/internal/src/modules/workspaces.d.ts +5 -5
- package/types/web/src/ai-machines.d.ts +76 -0
- package/types/web/src/chat.d.ts +1 -1
- package/types/web/src/index.d.ts +2 -0
- package/types/web/src/templates.d.ts +8 -0
- package/dist/chunks/3VGWTVKI.js +0 -2
- package/dist/chunks/YRYPXVAJ.js +0 -18
|
@@ -577,7 +577,7 @@ export declare function client(t: Transport): {
|
|
|
577
577
|
/**
|
|
578
578
|
* Request direct presigned blob upload URLs
|
|
579
579
|
*
|
|
580
|
-
* Returns presigned PUT URLs directly to managed
|
|
580
|
+
* Returns presigned PUT URLs directly to managed object storage or BYOS S3 for missing content-addressed blobs or chunks.
|
|
581
581
|
*/
|
|
582
582
|
requestSyncUploadGrants(input: {
|
|
583
583
|
body: UploadGrantRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
@@ -586,7 +586,7 @@ export declare function client(t: Transport): {
|
|
|
586
586
|
/**
|
|
587
587
|
* Request direct presigned blob download URLs
|
|
588
588
|
*
|
|
589
|
-
* Returns presigned GET URLs directly to managed
|
|
589
|
+
* Returns presigned GET URLs directly to managed object storage or BYOS S3 for project blobs or chunks.
|
|
590
590
|
*/
|
|
591
591
|
requestSyncDownloadGrants(input: {
|
|
592
592
|
body: DownloadGrantRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
@@ -595,7 +595,7 @@ export declare function client(t: Transport): {
|
|
|
595
595
|
/**
|
|
596
596
|
* Download a decrypted blob via a short-lived signed grant URL
|
|
597
597
|
*
|
|
598
|
-
* Reads
|
|
598
|
+
* Reads encrypted blob ciphertext from managed object storage or BYOS S3, authenticates and decrypts it with the workspace's dedicated key, and streams verified plaintext.
|
|
599
599
|
*/
|
|
600
600
|
downloadSignedSyncBlob(input: {
|
|
601
601
|
path: {
|
|
@@ -604,9 +604,9 @@ export declare function client(t: Transport): {
|
|
|
604
604
|
signal?: AbortSignal;
|
|
605
605
|
}): Promise<Reply<200, undefined>>;
|
|
606
606
|
/**
|
|
607
|
-
* Upload a blob via a short-lived signed grant URL
|
|
607
|
+
* Upload a blob via a short-lived signed grant URL with transparent workspace encryption
|
|
608
608
|
*
|
|
609
|
-
* Accepts plaintext bytes matching the HMAC-signed grant URL, encrypts them with the workspace's
|
|
609
|
+
* Accepts plaintext bytes matching the HMAC-signed grant URL, encrypts them with the workspace's dedicated encryption key, and writes ciphertext to managed object storage or BYOS S3.
|
|
610
610
|
*/
|
|
611
611
|
uploadSignedSyncBlob(input: {
|
|
612
612
|
path: {
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { type Machine, type Machines } from '../../internal/src/ai-machines.js';
|
|
2
|
+
import { type Transport } from '../../internal/src/transport.js';
|
|
3
|
+
import { type SessionManager } from './session.js';
|
|
4
|
+
import type { RealtimeSocket } from './socket.js';
|
|
5
|
+
/** The broadcast the platform sends on a person's machines channel when their list changed: it carries no data. */
|
|
6
|
+
export declare const MACHINES_CHANGED = "machines.changed.v1";
|
|
7
|
+
/** The floor: a watch reads the list again this often whatever its channel does, in ms. */
|
|
8
|
+
export declare const MACHINES_FLOOR_MS = 60000;
|
|
9
|
+
/** The signed-in person's own machines: their session's calls, and the list kept current (watch). */
|
|
10
|
+
export interface WebMachines extends Machines {
|
|
11
|
+
/**
|
|
12
|
+
* The person's machines now, then again each time the list changes — `for await (const machines of
|
|
13
|
+
* pb.ai.machines.watch())`; break out of the loop (or abort signal) to stop: the channel is left, nothing more is
|
|
14
|
+
* read or told. The first list is read before anything else; when that read fails the iteration throws its error.
|
|
15
|
+
* Later reads that fail are let be — the next change, join or minute reads again — except a refusal of the person
|
|
16
|
+
* (401, 403), which end the iteration with it. The channel never ends it: a join refused is asked again as the
|
|
17
|
+
* socket asks, and without the channel the list is read every minute. It is one person's: once they sign out it
|
|
18
|
+
* ends with 401 not_signed_in, and once someone else signs in with SessionChangedError — at once, and a list read
|
|
19
|
+
* for them that comes back after is never told. Needs a signed-in person (401 not_signed_in otherwise).
|
|
20
|
+
*/
|
|
21
|
+
watch(options?: {
|
|
22
|
+
signal?: AbortSignal;
|
|
23
|
+
}): AsyncIterableIterator<Machine[]>;
|
|
24
|
+
}
|
|
25
|
+
/** What a watch reads with and hears from: the list, and the channel's "read again". */
|
|
26
|
+
export interface MachineWatchSource {
|
|
27
|
+
/** The person's list: GET /ai/machines, no owner. */
|
|
28
|
+
read(signal: AbortSignal): Promise<Machine[]>;
|
|
29
|
+
/** Hears each "read again" — a broadcast, a join — until the returned function is called. */
|
|
30
|
+
follow(readAgain: () => void): () => void;
|
|
31
|
+
/** How often the list is read whatever the channel does, in ms. */
|
|
32
|
+
floorMs: number;
|
|
33
|
+
/** Why the watch is no longer its person's — nobody signed in, or someone else — or undefined while it is. */
|
|
34
|
+
gone(): unknown;
|
|
35
|
+
/** Hears the session change away from the watch's person (told why) until the returned function is called. */
|
|
36
|
+
onGone(end: (why: unknown) => void): () => void;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* One watch. Reads are never concurrent: a "read again" heard while one is on its way is one more read after it,
|
|
40
|
+
* however many were heard. A list equal to the last one told (every field, in order) is not told again; a list not yet
|
|
41
|
+
* taken is replaced by a newer one — or dropped, when the newer one is the list the app already holds.
|
|
42
|
+
*/
|
|
43
|
+
export declare class MachineWatch implements AsyncIterableIterator<Machine[]> {
|
|
44
|
+
private started;
|
|
45
|
+
private done;
|
|
46
|
+
private reading;
|
|
47
|
+
private again;
|
|
48
|
+
private taken;
|
|
49
|
+
private told;
|
|
50
|
+
private pending;
|
|
51
|
+
private failure;
|
|
52
|
+
private waiter;
|
|
53
|
+
private unfollow;
|
|
54
|
+
private offSession;
|
|
55
|
+
private floor;
|
|
56
|
+
private readonly abort;
|
|
57
|
+
private readonly source;
|
|
58
|
+
constructor(source: () => Promise<MachineWatchSource>, signal?: AbortSignal);
|
|
59
|
+
[Symbol.asyncIterator](): this;
|
|
60
|
+
next(): Promise<IteratorResult<Machine[]>>;
|
|
61
|
+
/** Stops it: the channel left, the floor stopped, nothing told from now — a next() waiting is told it is done. */
|
|
62
|
+
return(): Promise<IteratorResult<Machine[]>>;
|
|
63
|
+
private stop;
|
|
64
|
+
private start;
|
|
65
|
+
private readAgain;
|
|
66
|
+
private pump;
|
|
67
|
+
/** Whether the session is no longer the watch's person's: the watch is ended then, with why. */
|
|
68
|
+
private leftBy;
|
|
69
|
+
private tell;
|
|
70
|
+
private fail;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* pb.ai.machines: the calls with the person's session, and watches of their list — each watch's reads pinned to the
|
|
74
|
+
* person who started it, and every watch of one person hearing one channel (joined once, left with the last watch).
|
|
75
|
+
*/
|
|
76
|
+
export declare function webMachines(transport: Transport, userTransport: (user: string) => Transport, session: SessionManager, socket: RealtimeSocket, ref: string, floorMs?: number): WebMachines;
|
package/types/web/src/chat.d.ts
CHANGED
|
@@ -198,7 +198,7 @@ export interface ChatExecutionState {
|
|
|
198
198
|
generation: number;
|
|
199
199
|
workspaceSeq: number;
|
|
200
200
|
machineId: string | null;
|
|
201
|
-
machineStatus: 'online' | 'offline' | 'waking' | (string & {}) | null;
|
|
201
|
+
machineStatus: 'online' | 'offline' | 'cordoned' | 'waking' | 'removed' | (string & {}) | null;
|
|
202
202
|
failoverAt: string | null;
|
|
203
203
|
lastHandoff: SessionHandedOffEvent | null;
|
|
204
204
|
compactions: ContextCompactedEvent[];
|
package/types/web/src/index.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export { sessionSummary } from './chat.js';
|
|
|
9
9
|
export type { AgentEvent, ChatAttachment, ChatEvent, ChatExecutionState, ChatGoal, ChatItem, ChatMessageView, ChatPart, ChatPartsPage, ChatPartsQuery, ChatResponse, ChatState, ChatStreamPart, ChatThinking, ChatToolCall, ChatVoice, ContextCompactedEvent, ContextOffloadedEvent, GatewayChat, GoalEvent, HistoryEvent, HistoryItem, Publication, SessionHandedOffEvent, SessionMachineStatusEvent, SessionSummaryEvent, ThinkingEvent, ToolEvent, TranscriptEvent, TurnEnd, TurnEvent, VoiceEvent, } from './chat.js';
|
|
10
10
|
export { connectVoice, type StartedVoice, type VoiceConnection, type VoiceOptions } from './voice.js';
|
|
11
11
|
export { ClientTemplates, type TemplateAttachment, type TemplateRunOptions, type TemplateRunResult, type TemplateRunUsage, type TemplateStreamChunk, type TemplateVoiceOptions, type TemplateVoiceResult, type WebAI, } from './templates.js';
|
|
12
|
+
export { MACHINES_CHANGED, type WebMachines } from './ai-machines.js';
|
|
13
|
+
export type { Machine, MachineHarness, MachineKey, MachineKeyEnroll, Machines } from '../../internal/src/ai-machines.js';
|
|
12
14
|
export { Iap, redemptionToken, type CheckoutSource, type CustomerInfo, type CustomerInfoListener, type GrantInfo, type MergeGrant, type OfferView, type Offerings, type Redeemed, type RedemptionLink, type RefundDataConsent, } from './iap.js';
|
|
13
15
|
export { Payments, TERMINAL_INTENT_STATUSES, declineMessage, isTerminalIntentStatus, mountEmbedFrame, parseCallbackMessage, type Address, type Buyer, type CancelSubscriptionResponse, type Capabilities, type CapabilitiesResponse, type ConfirmIntentOptions, type InstallmentConfig, type InstallmentOption, type InstallmentTable, type IntentView, type MasterpassAction, type NextAction, type OtpPromptContext, type PaymentCallbackMessage, type PaymentRealtimeEvent, type PaymentRealtimeListener, type PresentIntentOptions, type PresentableIntent, type ProviderOptions, type SavedMethodView, type SpendToken, type SubmitOtpOptions, type SubscriptionListResponse, type SubscriptionSummary, type TopUpWalletOptions, type WaitForIntentOptions, type WalletBalance, type WalletBalancesListener, } from './payments.js';
|
|
14
16
|
export { COMMERCE_DISCOVERY_EVENTS, Commerce, SellerPortal, type AppliedRuleSummary, type AttributeFacetBucketList, type AttributeFacetMap, type BrandFacetBucket, type BrandSummary, type BuyBoxSummary, type Cart, type CartAuthOptions, type CartComplementaryOptions, type CategoryFacetBucket, type CategorySummary, type CheckoutResponse, type CommerceDiscoveryEvent, type CommerceTracker, type ContextRecommendationOptions, type CreateProductReviewInput, type CreateStoreReviewInput, type DiscoveryStrategyKey, type ExperimentAssignment, type MintReviewUploadUrlInput, type OfferCondition, type Order, type OrderDetail, type OrderDownloads, type OrderList, type PriceRangeFacet, type PrimaryMedia, type Product, type ProductDetail, type ProductFacetGroup, type ProductKind, type ProductList, type ProductListQuery, type ProductRecommendationHelperOptions, type ProductRecommendationsQuery, type ProductReview, type ProductReviewListQuery, type ProductReviewListResponse, type ProductReviewSummary, type ProductSearchHit, type ProductSearchRequest, type ProductSearchResponse, type ProductSort, type RatingFacetBucket, type RecommendOptions, type RecommendRequest, type RecommendResponse, type ReturnList, type ReturnRecord, type ReviewDeleteResponse, type ReviewKind, type ReviewMedia, type ReviewMediaInput, type ReviewModerationResponse, type ReviewReplyResponse, type ReviewSort, type ReviewUploadURLResponse, type ReviewVoteResponse, type ReviewsBundle, type SearchFacets, type SellerProductListQuery, type SellerReplyReviewInput, type Store, type StoreList, type StoreMetrics, type StoreOrder, type StoreOrderDetail, type StoreOrderList, type StoreReview, type StoreReviewListQuery, type StoreReviewListResponse, type StoreReviewSummary, type SuggestProductHit, type SuggestQuery, type SuggestResponse, type TermFacetBucket, type TrackCartItemAddedInput, type TrackProductClickedInput, type TrackProductViewedInput, type TrackRecommendationClickedInput, type TrackSearchPerformedInput, type VoteReviewInput, } from './commerce.js';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { WebMachines } from './ai-machines.js';
|
|
1
2
|
import { type Fetch } from '../../internal/src/transport.js';
|
|
2
3
|
import type { SessionManager } from './session.js';
|
|
3
4
|
import type { Installation } from './installation.js';
|
|
@@ -55,6 +56,13 @@ export interface TemplateVoiceResult {
|
|
|
55
56
|
export interface WebAI {
|
|
56
57
|
/** Guardrailed direct server-locked AI templates (`pb.ai.templates`). */
|
|
57
58
|
readonly templates: ClientTemplates;
|
|
59
|
+
/**
|
|
60
|
+
* The signed-in person's own machines (`pb.ai.machines`): an enrolment key for a Mac or a Linux box of theirs,
|
|
61
|
+
* minted with their session when the project lets its users enrol machines (settings userMachines) — said once, into
|
|
62
|
+
* a file on the machine, never on a command line — their machines read, cordoned, resumed and deleted, and the list
|
|
63
|
+
* kept current (watch). Someone else's machine, or one of the project's own, is not there for them (404).
|
|
64
|
+
*/
|
|
65
|
+
readonly machines: WebMachines;
|
|
58
66
|
}
|
|
59
67
|
export declare class ClientTemplates {
|
|
60
68
|
private readonly origin;
|