palbase 0.32.1 → 0.33.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 (49) hide show
  1. package/dist/ai/index.js +2 -2
  2. package/dist/backend/engine.js +2 -2
  3. package/dist/backend/env.js +1 -1
  4. package/dist/backend/index.js +3 -3
  5. package/dist/backend/stack.js +1 -1
  6. package/dist/backend/test.js +2 -2
  7. package/dist/chunks/{VVEFYBL2.js → 24U4NDH6.js} +2 -2
  8. package/dist/chunks/{GLQSFPDP.js → 2TNGTQX6.js} +2 -2
  9. package/dist/chunks/{CYVDM52S.js → 5U6L3QNV.js} +1 -1
  10. package/dist/chunks/{MYO4NTVQ.js → 6D5QSXFP.js} +2 -2
  11. package/dist/chunks/{DHI6EIYN.js → 7KKXGZP6.js} +1 -1
  12. package/dist/chunks/{FYRXV2SV.js → 7MEZ7I4T.js} +2 -2
  13. package/dist/chunks/{KKRFDTTG.js → AKE3ARBQ.js} +1 -1
  14. package/dist/chunks/{EFXXXNO2.js → BJ4U62LX.js} +2 -2
  15. package/dist/chunks/{L6YOR3QZ.js → D4P4XLMT.js} +1 -1
  16. package/dist/chunks/{GMH6MCXU.js → ECVJH7GC.js} +2 -2
  17. package/dist/chunks/{NWYIDVMD.js → GVR2PSNL.js} +2 -2
  18. package/dist/chunks/{GSLXEXTS.js → HKUBQA4K.js} +1 -1
  19. package/dist/chunks/{KEQSDOPL.js → HLESDZU4.js} +2 -2
  20. package/dist/chunks/{2PGS7DYV.js → KMWZK74K.js} +2 -2
  21. package/dist/chunks/{YJ2Q5HKO.js → L5JYBOI3.js} +2 -2
  22. package/dist/chunks/{KQPEQLGE.js → NAHDBHAC.js} +2 -2
  23. package/dist/chunks/{CEZTHZAV.js → OBLZE7OG.js} +2 -2
  24. package/dist/chunks/{ZFG4PBFW.js → PCOLUMJ2.js} +2 -2
  25. package/dist/chunks/{YXQ7M62L.js → S4UAMADF.js} +2 -2
  26. package/dist/chunks/{UWNRC3CL.js → STM6MJLC.js} +1 -1
  27. package/dist/chunks/{DNUDAS5M.js → W5YFK4GY.js} +1 -1
  28. package/dist/chunks/{ATEDA4UC.js → WBYKUJPE.js} +2 -2
  29. package/dist/chunks/{KUQHUWPG.js → WRGRQURQ.js} +2 -2
  30. package/dist/cli.js +137 -137
  31. package/dist/cloud/index.js +2 -2
  32. package/dist/refuse/ai.js +1 -1
  33. package/dist/refuse/backend.js +1 -1
  34. package/dist/refuse/cloud.js +1 -1
  35. package/dist/refuse/server.js +1 -1
  36. package/dist/server/index.js +2 -2
  37. package/dist/server/testing.js +2 -2
  38. package/dist/web/calls-ui.js +2 -2
  39. package/dist/web/index.js +2 -2
  40. package/dist/web/message.js +2 -2
  41. package/dist/web/palbe.js +2 -2
  42. package/dist/web/paywall.js +2 -2
  43. package/dist/web/push-sw.js +1 -1
  44. package/dist/web/ssr.js +2 -2
  45. package/dist/web/vite.js +2 -2
  46. package/package.json +2 -2
  47. package/types/cloud/src/cloud.d.ts +4 -1
  48. package/types/cloud/src/generated/studio.d.ts +195 -117
  49. package/types/internal/src/modules/ai.d.ts +8 -4
@@ -38,6 +38,21 @@ export declare function client(t: Transport): {
38
38
  created_at: string;
39
39
  })[];
40
40
  }>>;
41
+ create(input: {
42
+ headers?: {
43
+ "Idempotency-Key"?: string;
44
+ };
45
+ body: {
46
+ name: string;
47
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
48
+ signal?: AbortSignal;
49
+ }): Promise<Reply<200, {
50
+ id: string;
51
+ name: string;
52
+ role: "owner" | "admin" | "member";
53
+ created_by: string | null;
54
+ created_at: string;
55
+ }>>;
41
56
  get(input: {
42
57
  path: {
43
58
  id: string;
@@ -50,6 +65,33 @@ export declare function client(t: Transport): {
50
65
  created_by: string | null;
51
66
  created_at: string;
52
67
  }>>;
68
+ takeAway(input: {
69
+ path: {
70
+ id: string;
71
+ };
72
+ headers?: {
73
+ "Idempotency-Key"?: string;
74
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
75
+ signal?: AbortSignal;
76
+ }): Promise<Reply<204, undefined>>;
77
+ rename(input: {
78
+ path: {
79
+ id: string;
80
+ };
81
+ headers?: {
82
+ "Idempotency-Key"?: string;
83
+ };
84
+ body: {
85
+ name: string;
86
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
87
+ signal?: AbortSignal;
88
+ }): Promise<Reply<200, {
89
+ id: string;
90
+ name: string;
91
+ role: "owner" | "admin" | "member";
92
+ created_by: string | null;
93
+ created_at: string;
94
+ }>>;
53
95
  members(input: {
54
96
  path: {
55
97
  id: string;
@@ -287,9 +329,6 @@ export declare function client(t: Transport): {
287
329
  path: {
288
330
  id: string;
289
331
  };
290
- query?: {
291
- move_credit_to?: string;
292
- };
293
332
  headers?: {
294
333
  "Idempotency-Key"?: string;
295
334
  }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
@@ -363,9 +402,6 @@ export declare function client(t: Transport): {
363
402
  path: {
364
403
  ref: string;
365
404
  };
366
- query?: {
367
- move_credit_to?: string;
368
- };
369
405
  headers?: {
370
406
  "Idempotency-Key"?: string;
371
407
  }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
@@ -1306,6 +1342,11 @@ export declare function client(t: Transport): {
1306
1342
  organization_id: string;
1307
1343
  exempt: boolean;
1308
1344
  has_account: boolean;
1345
+ paid_by: ({
1346
+ organization_id: string;
1347
+ name: string;
1348
+ held: boolean;
1349
+ }) | null;
1309
1350
  paying: boolean;
1310
1351
  enforced: boolean;
1311
1352
  account: ({
@@ -1313,11 +1354,18 @@ export declare function client(t: Transport): {
1313
1354
  payment_method: string | null;
1314
1355
  terms_version: string | null;
1315
1356
  terms_accepted_at: string | null;
1357
+ threshold_micros: number;
1358
+ owed_micros: number;
1359
+ unpaid_micros: number;
1360
+ past_due_since: string | null;
1361
+ free_on: string | null;
1362
+ held: ("unpaid" | "disputed") | null;
1363
+ paid_organizations: number;
1316
1364
  }) | null;
1317
1365
  period: string;
1318
1366
  charged_micros?: number;
1319
1367
  gross_micros?: number;
1320
- taken_micros?: number;
1368
+ owed_micros?: number;
1321
1369
  projects: ({
1322
1370
  project_id: string;
1323
1371
  ref: string;
@@ -1328,19 +1376,10 @@ export declare function client(t: Transport): {
1328
1376
  at_limit: boolean;
1329
1377
  gone: boolean;
1330
1378
  deleted: boolean;
1331
- wallet?: {
1332
- balance_micros: number;
1333
- auto_topup: boolean;
1334
- auto_threshold_micros: number;
1335
- auto_amount_micros: number;
1336
- monthly_limit_micros: number | null;
1337
- low_balance_days: number;
1338
- exhausted: boolean;
1339
- topup_failures: number;
1340
- };
1379
+ monthly_limit_micros?: number | null;
1341
1380
  charged_micros?: number;
1342
1381
  gross_micros?: number;
1343
- taken_micros?: number;
1382
+ owed_micros?: number;
1344
1383
  items: ({
1345
1384
  item: string;
1346
1385
  units: number;
@@ -1359,7 +1398,6 @@ export declare function client(t: Transport): {
1359
1398
  }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1360
1399
  signal?: AbortSignal;
1361
1400
  }): Promise<Reply<200, {
1362
- paid: boolean;
1363
1401
  saved: boolean;
1364
1402
  }>>;
1365
1403
  cards(input: {
@@ -1503,7 +1541,7 @@ export declare function client(t: Transport): {
1503
1541
  project_name: string;
1504
1542
  }) | null;
1505
1543
  })[];
1506
- taken_micros: {
1544
+ owed_micros: {
1507
1545
  [key: string]: number;
1508
1546
  };
1509
1547
  }>>;
@@ -1527,7 +1565,7 @@ export declare function client(t: Transport): {
1527
1565
  }): Promise<Reply<200, {
1528
1566
  invoices: ({
1529
1567
  id: string;
1530
- kind: "checkout" | "auto" | "card" | "bank_transfer";
1568
+ kind: "month" | "threshold" | "checkout" | "auto" | "card" | "bank_transfer";
1531
1569
  project_id: string | null;
1532
1570
  project_ref: string | null;
1533
1571
  project_name: string | null;
@@ -1548,7 +1586,7 @@ export declare function client(t: Transport): {
1548
1586
  }) | null;
1549
1587
  })[];
1550
1588
  }>>;
1551
- transfer(input: {
1589
+ payer(input: {
1552
1590
  path: {
1553
1591
  id: string;
1554
1592
  };
@@ -1556,16 +1594,141 @@ export declare function client(t: Transport): {
1556
1594
  "Idempotency-Key"?: string;
1557
1595
  };
1558
1596
  body: {
1559
- from: string;
1560
- to: string;
1561
- amount_micros?: number;
1597
+ account: string | null;
1598
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1599
+ signal?: AbortSignal;
1600
+ }): Promise<Reply<200, {
1601
+ environments: ({
1602
+ platform_id: string;
1603
+ ref: string;
1604
+ name: string;
1605
+ project_id: string;
1606
+ project_name: string;
1607
+ })[];
1608
+ organization_id: string;
1609
+ exempt: boolean;
1610
+ has_account: boolean;
1611
+ paid_by: ({
1612
+ organization_id: string;
1613
+ name: string;
1614
+ held: boolean;
1615
+ }) | null;
1616
+ paying: boolean;
1617
+ enforced: boolean;
1618
+ account: ({
1619
+ stripe_mode: "live" | "test";
1620
+ payment_method: string | null;
1621
+ terms_version: string | null;
1622
+ terms_accepted_at: string | null;
1623
+ threshold_micros: number;
1624
+ owed_micros: number;
1625
+ unpaid_micros: number;
1626
+ past_due_since: string | null;
1627
+ free_on: string | null;
1628
+ held: ("unpaid" | "disputed") | null;
1629
+ paid_organizations: number;
1630
+ }) | null;
1631
+ period: string;
1632
+ charged_micros?: number;
1633
+ gross_micros?: number;
1634
+ owed_micros?: number;
1635
+ projects: ({
1636
+ project_id: string;
1637
+ ref: string;
1638
+ name: string;
1639
+ plan: "free" | "pay_as_you_go";
1640
+ paid: boolean;
1641
+ frozen: boolean;
1642
+ at_limit: boolean;
1643
+ gone: boolean;
1644
+ deleted: boolean;
1645
+ monthly_limit_micros?: number | null;
1646
+ charged_micros?: number;
1647
+ gross_micros?: number;
1648
+ owed_micros?: number;
1649
+ items: ({
1650
+ item: string;
1651
+ units: number;
1652
+ gross_micros?: number;
1653
+ micros?: number;
1654
+ })[];
1655
+ })[];
1656
+ }>>;
1657
+ paid(input: {
1658
+ path: {
1659
+ id: string;
1660
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1661
+ signal?: AbortSignal;
1662
+ }): Promise<Reply<200, {
1663
+ organizations: ({
1664
+ organization_id: string;
1665
+ name: string;
1666
+ environments: number;
1667
+ pay_as_you_go: number;
1668
+ })[];
1669
+ }>>;
1670
+ stopPaying(input: {
1671
+ path: {
1672
+ id: string;
1673
+ org: string;
1674
+ };
1675
+ headers?: {
1676
+ "Idempotency-Key"?: string;
1677
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1678
+ signal?: AbortSignal;
1679
+ }): Promise<Reply<204, undefined>>;
1680
+ report(input: {
1681
+ path: {
1682
+ id: string;
1683
+ };
1684
+ query?: {
1685
+ period?: string;
1562
1686
  }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1563
1687
  signal?: AbortSignal;
1564
1688
  }): Promise<Reply<200, {
1565
- moved_micros: number;
1566
- from: string;
1567
- to: string;
1689
+ account: string;
1690
+ period: string;
1691
+ owed_micros: number;
1692
+ charged_micros: number;
1693
+ gross_micros: number;
1694
+ organizations: ({
1695
+ organization_id: string;
1696
+ name: string;
1697
+ owed_micros: number;
1698
+ charged_micros: number;
1699
+ gross_micros: number;
1700
+ environments: ({
1701
+ project_id: string;
1702
+ ref: string;
1703
+ name: string;
1704
+ owed_micros: number;
1705
+ charged_micros: number;
1706
+ gross_micros: number;
1707
+ items: ({
1708
+ item: string;
1709
+ units: number;
1710
+ gross_micros: number;
1711
+ micros: number;
1712
+ })[];
1713
+ environment: ({
1714
+ platform_id: string;
1715
+ ref: string;
1716
+ name: string;
1717
+ project_id: string;
1718
+ project_name: string;
1719
+ }) | null;
1720
+ })[];
1721
+ })[];
1568
1722
  }>>;
1723
+ reportCsv(input: {
1724
+ path: {
1725
+ id: string;
1726
+ };
1727
+ query?: {
1728
+ period?: string;
1729
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1730
+ signal?: AbortSignal;
1731
+ }): Promise<Reply<number, Response>>;
1569
1732
  environment(input: {
1570
1733
  path: {
1571
1734
  id: string;
@@ -1582,19 +1745,10 @@ export declare function client(t: Transport): {
1582
1745
  at_limit: boolean;
1583
1746
  gone: boolean;
1584
1747
  deleted: boolean;
1585
- wallet?: {
1586
- balance_micros: number;
1587
- auto_topup: boolean;
1588
- auto_threshold_micros: number;
1589
- auto_amount_micros: number;
1590
- monthly_limit_micros: number | null;
1591
- low_balance_days: number;
1592
- exhausted: boolean;
1593
- topup_failures: number;
1594
- };
1748
+ monthly_limit_micros?: number | null;
1595
1749
  charged_micros?: number;
1596
1750
  gross_micros?: number;
1597
- taken_micros?: number;
1751
+ owed_micros?: number;
1598
1752
  items: ({
1599
1753
  item: string;
1600
1754
  units: number;
@@ -1621,10 +1775,6 @@ export declare function client(t: Transport): {
1621
1775
  plan?: "free" | "pay_as_you_go";
1622
1776
  frozen?: boolean;
1623
1777
  monthly_limit_micros?: number | null;
1624
- auto_topup?: boolean;
1625
- auto_threshold_micros?: number;
1626
- auto_amount_micros?: number;
1627
- low_balance_days?: number;
1628
1778
  }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1629
1779
  signal?: AbortSignal;
1630
1780
  }): Promise<Reply<200, {
@@ -1637,19 +1787,10 @@ export declare function client(t: Transport): {
1637
1787
  at_limit: boolean;
1638
1788
  gone: boolean;
1639
1789
  deleted: boolean;
1640
- wallet?: {
1641
- balance_micros: number;
1642
- auto_topup: boolean;
1643
- auto_threshold_micros: number;
1644
- auto_amount_micros: number;
1645
- monthly_limit_micros: number | null;
1646
- low_balance_days: number;
1647
- exhausted: boolean;
1648
- topup_failures: number;
1649
- };
1790
+ monthly_limit_micros?: number | null;
1650
1791
  charged_micros?: number;
1651
1792
  gross_micros?: number;
1652
- taken_micros?: number;
1793
+ owed_micros?: number;
1653
1794
  items: ({
1654
1795
  item: string;
1655
1796
  units: number;
@@ -1664,69 +1805,6 @@ export declare function client(t: Transport): {
1664
1805
  project_name: string;
1665
1806
  };
1666
1807
  }>>;
1667
- topUp(input: {
1668
- path: {
1669
- id: string;
1670
- ref: string;
1671
- };
1672
- headers?: {
1673
- "Idempotency-Key"?: string;
1674
- };
1675
- body: {
1676
- amount_micros: number;
1677
- payment_method?: string;
1678
- plan?: "pay_as_you_go";
1679
- }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1680
- signal?: AbortSignal;
1681
- }): Promise<Reply<200, {
1682
- invoice_id: string;
1683
- status: string;
1684
- hosted_url?: string;
1685
- }>>;
1686
- bankTransfer(input: {
1687
- path: {
1688
- id: string;
1689
- ref: string;
1690
- };
1691
- headers?: {
1692
- "Idempotency-Key"?: string;
1693
- };
1694
- body: {
1695
- amount_micros: number;
1696
- }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1697
- signal?: AbortSignal;
1698
- }): Promise<Reply<200, {
1699
- invoice_id: string;
1700
- status: string;
1701
- hosted_url?: string;
1702
- }>>;
1703
- ledger(input: {
1704
- path: {
1705
- id: string;
1706
- ref: string;
1707
- };
1708
- query?: {
1709
- before?: number;
1710
- kind?: string;
1711
- }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
1712
- signal?: AbortSignal;
1713
- }): Promise<Reply<200, {
1714
- lines: ({
1715
- from_environment?: string | null;
1716
- to_environment?: string | null;
1717
- id: number;
1718
- kind: "topup" | "bonus" | "usage" | "expiry" | "refund" | "adjustment" | "transfer" | "forfeit";
1719
- amount_micros: number;
1720
- ref: string;
1721
- remaining_micros: number | null;
1722
- expires_at: string | null;
1723
- created_at: string;
1724
- via: string | null;
1725
- invoice: string | null;
1726
- from_project?: string;
1727
- to_project?: string;
1728
- })[];
1729
- }>>;
1730
1808
  };
1731
1809
  accessRequests: {
1732
1810
  request(input: {
@@ -1256,7 +1256,7 @@ export type MessageAttachment = {
1256
1256
  */
1257
1257
  content_type: string;
1258
1258
  /**
1259
- * image: a picture the model is shown with the message; file: a file put in the chat's workspace.
1259
+ * image: a picture the model is shown with the message; file: a file the agent is given as read_as says, and put in the chat's workspace when it has one.
1260
1260
  */
1261
1261
  kind: "image" | "file";
1262
1262
  /**
@@ -1276,12 +1276,16 @@ export type MessageAttachment = {
1276
1276
  */
1277
1277
  size: number;
1278
1278
  /**
1279
- * Where a file is in the chat's workspace: .palbase/attachments/<message id>/<name>.
1279
+ * How the agent's model is given a file: picture (shown), document (a PDF, given whole), text (its text, drawn out of a Word, Excel or PowerPoint file, or a text file). None: a file of the chat's workspace alone.
1280
+ */
1281
+ read_as?: "picture" | "document" | "text";
1282
+ /**
1283
+ * Where a file is in the chat's workspace: .palbase/attachments/<message id>/<name>. None in a chat that works in no workspace.
1280
1284
  */
1281
1285
  workspace_path?: string;
1282
1286
  };
1283
1287
  /**
1284
- * A file of the project's storage a message puts in its chat's workspace.
1288
+ * A file of the project's storage a message gives its chat's agent, and puts in its workspace when it has one.
1285
1289
  */
1286
1290
  export type MessageFileRequest = {
1287
1291
  /**
@@ -1349,7 +1353,7 @@ export type MessageRequest = {
1349
1353
  */
1350
1354
  delivery?: "next" | "now";
1351
1355
  /**
1352
- * Files of the project's storage put in the chat's workspace before the agent reads the message, at .palbase/attachments/<message id>/<filename>, and the agent is told where (8 at most, 15 MiB each at most). A chat that works in no workspace takes none (409 no_workspace). Copied for the chat, and who may attach which, as images; an object the message names twice — a picture of it and a file of it too — is read once.
1356
+ * Files of the project's storage given to the agent with the message (8 at most, 50 MB each at most), by what their bytes are: a PDF whole, each page as its text and as a picture; a picture (png, jpeg, webp or gif, 5 MiB at most) shown, while the message shows fewer than 4; a Word, Excel or PowerPoint file (.docx, .xlsx, .pptx) or a text file as its text, drawn out by the platform (400,000 bytes of it at most). In a chat that works in a workspace each is also put in it before the agent reads the message, at .palbase/attachments/<message id>/<filename>, and the agent is told where. A chat that works in no workspace refuses a file its agent is given nothing of (415, 413 or 422 unreadable_attachment). Copied for the chat, and who may attach which, as images; an object the message names twice — a picture of it and a file of it too — is read once.
1353
1357
  */
1354
1358
  files?: MessageFileRequest[];
1355
1359
  /**