palbase 0.76.0 → 0.78.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/3I5XH3A3.js +13 -0
- package/dist/chunks/{MKVIRNSJ.js → 3X3ZT72M.js} +2 -2
- package/dist/chunks/{TGQGGUE6.js → 5H3UYFOC.js} +2 -2
- package/dist/chunks/5OBOVEK6.js +2 -0
- package/dist/chunks/{KEGVHELA.js → AKJC5WTU.js} +1 -1
- package/dist/chunks/{TUK6NH2Q.js → AMKY4SZU.js} +2 -2
- package/dist/chunks/B64J3E3T.js +2 -0
- package/dist/chunks/{5RNXCTOO.js → EFELMJMQ.js} +2 -2
- package/dist/chunks/{ZCMCYI2D.js → FOZVJW7G.js} +2 -2
- package/dist/chunks/{BRDO3ZPT.js → HHKRAOVG.js} +1 -1
- package/dist/chunks/{ISMWEEGW.js → HVRVTNMI.js} +1 -1
- package/dist/chunks/{SVWF7ABJ.js → JSRN4NOZ.js} +2 -2
- package/dist/chunks/{33XOVYAU.js → MA74JJUB.js} +4 -4
- package/dist/chunks/{UHN63FGH.js → MFWAOKLM.js} +2 -2
- package/dist/chunks/{PGQNRJ2C.js → NG4OMSEK.js} +2 -2
- package/dist/chunks/{5YJZAPY2.js → NQUAVRMC.js} +2 -2
- package/dist/chunks/{EXLA3A7O.js → Q3GH7I66.js} +2 -2
- package/dist/chunks/{3CN6HGTW.js → QL2UAO36.js} +1 -1
- package/dist/chunks/{DKYFIOWM.js → QOETZ4FB.js} +1 -1
- package/dist/chunks/RP2TPMXT.js +2 -0
- package/dist/chunks/S7C7NHZI.js +18 -0
- package/dist/chunks/{D6NOE76D.js → SHYJVOD2.js} +1 -1
- package/dist/chunks/{A3I7H7QN.js → VP3HFVV4.js} +1 -1
- package/dist/chunks/{UOW74IHY.js → XVJ3CMFN.js} +2 -2
- package/dist/chunks/{Q4UWBIJ6.js → YQQKZUVS.js} +2 -2
- package/dist/cli.js +243 -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 +29 -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 +29 -1
- package/types/internal/src/modules/ai.d.ts +192 -79
- 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 +21 -1
- package/types/web/src/index.d.ts +3 -1
- package/types/web/src/templates.d.ts +8 -0
- package/dist/chunks/2NEPN2ZZ.js +0 -2
- package/dist/chunks/3VGWTVKI.js +0 -2
- package/dist/chunks/ALT62XIG.js +0 -13
- package/dist/chunks/YRYPXVAJ.js +0 -18
|
@@ -118,7 +118,7 @@ export type AgentDefinition = {
|
|
|
118
118
|
[key: string]: unknown;
|
|
119
119
|
};
|
|
120
120
|
/**
|
|
121
|
-
* A shell script each of its sessions runs once at its start, before the agent's first command, on every pool (64 KiB at most).
|
|
121
|
+
* A shell script each of its sessions runs once at its start, before the agent's first command, on every pool (64 KiB at most). On a Mac of yours whose turn runs Claude Code or Codex it runs inside a sandbox of the agent on that machine: it writes the session's workspace and the session's own folders and nothing else of the machine, reads what a session's commands read, and reaches the network with no list of hosts — its files are held, its network is not. Where that sandbox cannot be applied the turn fails at its start saying so; the script is never run outside it. Each of its commands is a process group that is killed when the command ends, so nothing it started goes on writing the workspace; a process that leaves its group on purpose is not found by this. Before the CLI is started, the agent on the machine reads every repository the workspace then holds, running no git: the turn fails at its start, naming the repository and the setting, if one carries anything git would run or load (a hook, an include, an alias, a filter or driver, `core.fsmonitor`, `core.hooksPath`, `core.sshCommand`, a remote that is not `https://`, a credential helper that is not a bare program name with plain arguments, or a setting outside the ones git writes as it makes, fetches and checks out a repository).
|
|
122
122
|
*/
|
|
123
123
|
setup?: string;
|
|
124
124
|
/**
|
|
@@ -352,8 +352,14 @@ export type ChatExecution = {
|
|
|
352
352
|
target_generation: number;
|
|
353
353
|
workspace_id?: string;
|
|
354
354
|
workspace_seq: number;
|
|
355
|
-
|
|
355
|
+
/**
|
|
356
|
+
* The target machine's state. removed: the machine was deleted, or its owner's account was; the chat runs nowhere until it is handed to another target. To a member who does not own the machine, a cordoned machine reads offline.
|
|
357
|
+
*/
|
|
358
|
+
machine_status?: "online" | "offline" | "cordoned" | "waking" | "removed";
|
|
356
359
|
machine_name?: string;
|
|
360
|
+
/**
|
|
361
|
+
* The coding CLIs on the target machine. Of a machine that has an owner, only its owner and the project's server read them: to another member of the chat they are absent — that member reads the machine's name (machine_name) and whether it is online (machine_status: online or offline), not what is installed or signed in on it.
|
|
362
|
+
*/
|
|
357
363
|
harnesses?: MachineHarness[];
|
|
358
364
|
auto_failover?: AutoFailoverPolicy;
|
|
359
365
|
failover_at?: string | null;
|
|
@@ -535,6 +541,10 @@ export type ChatPart = {
|
|
|
535
541
|
data: {
|
|
536
542
|
[key: string]: unknown;
|
|
537
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;
|
|
538
548
|
/**
|
|
539
549
|
* The journal's sequence it was told at; absent for an answer's text, placed by its offset.
|
|
540
550
|
*/
|
|
@@ -658,6 +668,14 @@ export type ChatToolCall = {
|
|
|
658
668
|
* The tool.
|
|
659
669
|
*/
|
|
660
670
|
name: string;
|
|
671
|
+
/**
|
|
672
|
+
* How much of the answer came before `output` and was never kept. Only for a call the agent's harness ran itself (`origin`), whose output is kept by its end.
|
|
673
|
+
*/
|
|
674
|
+
omitted_bytes?: number;
|
|
675
|
+
/**
|
|
676
|
+
* `harness`: a call the agent's harness (a machine's own Claude Code, Codex or Gemini CLI) ran with a tool of its own, which Palbase recorded and did not run. Absent for every other call. Such a call is told by this, never by its `name`: a harness names its tools as it likes.
|
|
677
|
+
*/
|
|
678
|
+
origin?: "harness";
|
|
661
679
|
/**
|
|
662
680
|
* Its answer's text, whole; null: none yet.
|
|
663
681
|
*/
|
|
@@ -1018,51 +1036,6 @@ export type Environment = {
|
|
|
1018
1036
|
*/
|
|
1019
1037
|
updated_at: string;
|
|
1020
1038
|
};
|
|
1021
|
-
/**
|
|
1022
|
-
* An immutable pre-bake build record for a runtime environment.
|
|
1023
|
-
*/
|
|
1024
|
-
export type EnvironmentBuild = {
|
|
1025
|
-
/**
|
|
1026
|
-
* Unique build identifier (envb_...).
|
|
1027
|
-
*/
|
|
1028
|
-
build_id: string;
|
|
1029
|
-
/**
|
|
1030
|
-
* Name of the environment being built.
|
|
1031
|
-
*/
|
|
1032
|
-
environment_name: string;
|
|
1033
|
-
/**
|
|
1034
|
-
* Current build state.
|
|
1035
|
-
*/
|
|
1036
|
-
status: "queued" | "building" | "ready" | "failed";
|
|
1037
|
-
/**
|
|
1038
|
-
* Resulting immutable OCI image digest when ready.
|
|
1039
|
-
*/
|
|
1040
|
-
image_digest?: string;
|
|
1041
|
-
/**
|
|
1042
|
-
* SHA-256 digest of the runtime specification.
|
|
1043
|
-
*/
|
|
1044
|
-
setup_digest: string;
|
|
1045
|
-
/**
|
|
1046
|
-
* Tail of build logs, if available.
|
|
1047
|
-
*/
|
|
1048
|
-
log_excerpt?: string;
|
|
1049
|
-
/**
|
|
1050
|
-
* Failure detail if status is failed.
|
|
1051
|
-
*/
|
|
1052
|
-
error_message?: string;
|
|
1053
|
-
/**
|
|
1054
|
-
* Creation timestamp (RFC 3339).
|
|
1055
|
-
*/
|
|
1056
|
-
created_at: string;
|
|
1057
|
-
/**
|
|
1058
|
-
* Last update timestamp (RFC 3339).
|
|
1059
|
-
*/
|
|
1060
|
-
updated_at: string;
|
|
1061
|
-
/**
|
|
1062
|
-
* Completion timestamp (RFC 3339), if finished.
|
|
1063
|
-
*/
|
|
1064
|
-
completed_at?: string | null;
|
|
1065
|
-
};
|
|
1066
1039
|
/**
|
|
1067
1040
|
* The project's runtime environments.
|
|
1068
1041
|
*/
|
|
@@ -1144,7 +1117,7 @@ export type EnvironmentRuntime = {
|
|
|
1144
1117
|
*/
|
|
1145
1118
|
dockerfile?: string;
|
|
1146
1119
|
/**
|
|
1147
|
-
* Optional
|
|
1120
|
+
* Optional VM profile for isolated macOS Xcode or Linux sandbox execution.
|
|
1148
1121
|
*/
|
|
1149
1122
|
vm_profile?: "macos-xcode" | "linux-vm";
|
|
1150
1123
|
/**
|
|
@@ -1419,7 +1392,7 @@ export type GoalUsage = {
|
|
|
1419
1392
|
export type HandoffRequest = {
|
|
1420
1393
|
to: ExecutionTarget;
|
|
1421
1394
|
/**
|
|
1422
|
-
* When to cut over
|
|
1395
|
+
* When to cut over. `idle` (default): at once, refused with `turn_in_progress` while a turn runs. `after_turn`: at once when no turn runs; while one runs the handoff is kept (`pending_handoff` on the chat's execution) and applied when that turn has ended, and in any case before the chat's next turn starts, so that turn runs on the new target. How long that is: a message sent while the turn runs joins that turn, so the handoff waits for both; and a run Palbase starts in the chat by itself keeps the handoff pending until that run has settled. A handoff asked for again while one is pending takes its place. The target is resolved again when the handoff is applied: one that no longer resolves, such as a pool deleted since, is dropped, `pending_handoff` is cleared and the chat stays where it is. `now`: the running turn is stopped and the chat moved.
|
|
1423
1396
|
*/
|
|
1424
1397
|
when?: "idle" | "after_turn" | "now";
|
|
1425
1398
|
/**
|
|
@@ -1651,7 +1624,22 @@ export type MachineHarness = {
|
|
|
1651
1624
|
name: "claude-code" | "codex" | "gemini-cli";
|
|
1652
1625
|
acp_version?: string;
|
|
1653
1626
|
cli_version?: string;
|
|
1654
|
-
|
|
1627
|
+
/**
|
|
1628
|
+
* `outdated`: the CLI is older than the least a chat's turn can be started on (`min_cli_version`), or it did not say a version the agent could read (`cli_version` is absent then); a turn on it fails at its start saying so, until the machine's owner updates it.
|
|
1629
|
+
*/
|
|
1630
|
+
status: "ready" | "unauthenticated" | "not_installed" | "outdated";
|
|
1631
|
+
/**
|
|
1632
|
+
* The least version of the CLI a chat's turn can be started on. Present when `status` is `outdated`.
|
|
1633
|
+
*/
|
|
1634
|
+
min_cli_version?: string;
|
|
1635
|
+
/**
|
|
1636
|
+
* What holds this CLI on its machine during a turn. `workspace`: the turn holds it with the CLI's own sandbox — its file tools and commands work in the session's workspace and nowhere else of the machine owner's, reach the allowed hosts alone, and run without asking; `confinement_gaps` says what that leaves open, when anything. The hosts bound where a command reaches, not what it sends there: a host on the list takes whatever a command holds itself, under a token the turn was given or found in the workspace. What does not work inside it: a build step that fetches from a host that is not allowed (a postinstall's download), and signing with the owner's identity, for a device or an archive (their keychain is not a session's; a build signed to run locally passes). `runner`: the agent's own boundary on a Linux machine holds its files, and `confinement_gaps` says what it does not hold. `none`: nothing holds it, and `confinement_gaps` says what it lacks. Absent for a CLI that is not installed.
|
|
1637
|
+
*/
|
|
1638
|
+
confinement?: "workspace" | "runner" | "none";
|
|
1639
|
+
/**
|
|
1640
|
+
* What the CLI's confinement leaves open. `files_outside_workspace`: its commands read and write the machine owner's files outside the workspace. `hosts_unrestricted`: its commands reach any host. `workspace_settings_read`: it reads the workspace's own settings file, and what that file starts. `not_measured`: Palbase has not measured it on such a machine. `folder_names_listed`: its commands can list the names in the folders above what the turn opens, the home folder's among them, and read none of what they name. `simulators_open`: the machine's own policy opens the simulators to its commands, and what runs in a simulator runs outside the confinement. `local_network_open`: the machine's own policy lets its commands listen on, and reach, the machine's own ports. `not_started_unconfined`: the machine's own policy starts only a CLI it confines (`confined_only`), and this one is not confined there: a turn on it fails at its start saying so.
|
|
1641
|
+
*/
|
|
1642
|
+
confinement_gaps?: ("files_outside_workspace" | "hosts_unrestricted" | "workspace_settings_read" | "not_measured" | "folder_names_listed" | "simulators_open" | "local_network_open" | "not_started_unconfined")[];
|
|
1655
1643
|
};
|
|
1656
1644
|
/**
|
|
1657
1645
|
* A machine's seal key, as the engine keeps it: the key a secret is sealed to on this machine (null: it never stated one — an agent before seal keys, or a key Palbase did not mint). A machine re-states at its certificate renewal while it is not registered, with no restart.
|
|
@@ -2104,6 +2092,10 @@ export type PoolMachine = {
|
|
|
2104
2092
|
* Locally probed official ACP CLI harnesses reported by palbase-agent (no credentials).
|
|
2105
2093
|
*/
|
|
2106
2094
|
harnesses?: MachineHarness[];
|
|
2095
|
+
/**
|
|
2096
|
+
* The user the machine belongs to, when a person enrolled it (POST /ai/machine-keys); absent for a machine of the project's. A machine with an owner takes only the chats that name it.
|
|
2097
|
+
*/
|
|
2098
|
+
owner?: string;
|
|
2107
2099
|
};
|
|
2108
2100
|
/**
|
|
2109
2101
|
* A runner pool to make: of one type.
|
|
@@ -2628,6 +2620,14 @@ export type Settings = {
|
|
|
2628
2620
|
* Whether a development debug attestation secret is stored for this project.
|
|
2629
2621
|
*/
|
|
2630
2622
|
debug_attest_configured?: boolean;
|
|
2623
|
+
/**
|
|
2624
|
+
* Signed-in app users mint enrolment keys for machines of their own (POST /ai/machine-keys; default false). What a person already enrolled they read, cordon, resume and delete whatever this says.
|
|
2625
|
+
*/
|
|
2626
|
+
user_machines?: boolean;
|
|
2627
|
+
/**
|
|
2628
|
+
* How many machines one user holds at most, a key still waiting for its machine counted as one (default 3).
|
|
2629
|
+
*/
|
|
2630
|
+
user_machine_limit?: number;
|
|
2631
2631
|
};
|
|
2632
2632
|
/**
|
|
2633
2633
|
* A change of what the project allows its chats; a field left out is left as it is.
|
|
@@ -2669,6 +2669,14 @@ export type SettingsRequest = {
|
|
|
2669
2669
|
* Development-only debug attestation secret (never honored in production; empty string clears).
|
|
2670
2670
|
*/
|
|
2671
2671
|
debug_attest_token?: string;
|
|
2672
|
+
/**
|
|
2673
|
+
* Let signed-in app users enrol machines of their own (default false). Turned off, the machines people already enrolled stay theirs and keep serving; no new key is minted for a user.
|
|
2674
|
+
*/
|
|
2675
|
+
user_machines?: boolean;
|
|
2676
|
+
/**
|
|
2677
|
+
* How many machines one user holds at most (default 3). Lowered, nobody's machine is taken away: a user at or over it mints no new key.
|
|
2678
|
+
*/
|
|
2679
|
+
user_machine_limit?: number;
|
|
2672
2680
|
};
|
|
2673
2681
|
export type SpeechRequest = {
|
|
2674
2682
|
model?: string;
|
|
@@ -3140,6 +3148,10 @@ export type TurnToolCall = {
|
|
|
3140
3148
|
* The tool.
|
|
3141
3149
|
*/
|
|
3142
3150
|
name: string;
|
|
3151
|
+
/**
|
|
3152
|
+
* `harness`: a call the agent's harness ran with a tool of its own, which Palbase recorded and did not run; its result is the end of what it printed, as {output: [...], is_error, omitted_bytes}. Absent for every other call. Such a call is told by this, never by its `name`: a harness names its tools as it likes.
|
|
3153
|
+
*/
|
|
3154
|
+
origin?: "harness";
|
|
3143
3155
|
/**
|
|
3144
3156
|
* What it returned, as the engine committed it: an app's, a backend's or an endpoint's answer as {output: [...], is_error}; a platform tool's own JSON. Absent: nothing yet.
|
|
3145
3157
|
*/
|
|
@@ -4440,6 +4452,96 @@ export type ClientTemplateVoiceResponse = {
|
|
|
4440
4452
|
started_at: string;
|
|
4441
4453
|
transport: VoiceTransportView;
|
|
4442
4454
|
};
|
|
4455
|
+
/**
|
|
4456
|
+
* A machine of the project's that serves its chats: one a person enrolled is theirs (owner), one the project's server enrolled into a pool is the project's (no owner).
|
|
4457
|
+
*/
|
|
4458
|
+
export type Machine = {
|
|
4459
|
+
/**
|
|
4460
|
+
* The machine's id: what a chat's target names it by (compute.machine_id).
|
|
4461
|
+
*/
|
|
4462
|
+
id: string;
|
|
4463
|
+
/**
|
|
4464
|
+
* The name the machine gave itself when it enrolled: its host name.
|
|
4465
|
+
*/
|
|
4466
|
+
name: string;
|
|
4467
|
+
/**
|
|
4468
|
+
* The user the machine belongs to; null for a machine of the project's.
|
|
4469
|
+
*/
|
|
4470
|
+
owner?: string | null;
|
|
4471
|
+
/**
|
|
4472
|
+
* The pool it enrolled into.
|
|
4473
|
+
*/
|
|
4474
|
+
pool_id?: string;
|
|
4475
|
+
os?: string;
|
|
4476
|
+
arch?: string;
|
|
4477
|
+
/**
|
|
4478
|
+
* online: its agent was heard from in the last 90 seconds and it takes work; cordoned: it takes no new work; offline: not heard from.
|
|
4479
|
+
*/
|
|
4480
|
+
state: "online" | "offline" | "cordoned";
|
|
4481
|
+
/**
|
|
4482
|
+
* When its agent was last heard from.
|
|
4483
|
+
*/
|
|
4484
|
+
last_seen_at?: string | null;
|
|
4485
|
+
/**
|
|
4486
|
+
* When it enrolled.
|
|
4487
|
+
*/
|
|
4488
|
+
registered_at?: string | null;
|
|
4489
|
+
/**
|
|
4490
|
+
* The coding CLIs found on it and whether each is signed in, as its agent last reported them.
|
|
4491
|
+
*/
|
|
4492
|
+
harnesses?: MachineHarness[];
|
|
4493
|
+
};
|
|
4494
|
+
/**
|
|
4495
|
+
* A person's machines.
|
|
4496
|
+
*/
|
|
4497
|
+
export type MachineList = {
|
|
4498
|
+
/**
|
|
4499
|
+
* The machines, the one enrolled first first.
|
|
4500
|
+
*/
|
|
4501
|
+
machines: Machine[];
|
|
4502
|
+
};
|
|
4503
|
+
/**
|
|
4504
|
+
* An enrolment key to mint for one machine of a person's.
|
|
4505
|
+
*/
|
|
4506
|
+
export type MachineKeyRequest = {
|
|
4507
|
+
/**
|
|
4508
|
+
* The machine's operating system.
|
|
4509
|
+
*/
|
|
4510
|
+
os: "macos" | "linux";
|
|
4511
|
+
/**
|
|
4512
|
+
* The machine's processor architecture.
|
|
4513
|
+
*/
|
|
4514
|
+
arch: "arm64" | "amd64";
|
|
4515
|
+
/**
|
|
4516
|
+
* The user the machine will belong to. The project's server names one; a signed-in user's key is their own, and naming anyone else is refused.
|
|
4517
|
+
*/
|
|
4518
|
+
owner?: string;
|
|
4519
|
+
/**
|
|
4520
|
+
* What the key is for, as a pool key's label: 128 bytes of UTF-8 at most, shown as it was written.
|
|
4521
|
+
*/
|
|
4522
|
+
label?: string;
|
|
4523
|
+
};
|
|
4524
|
+
/**
|
|
4525
|
+
* A key that enrols one machine, ever, as its owner's: said once. It is saved to a file on the machine and given to its agent (`palbase-agent enroll --key-file <file> --url <enroll.url> --server-name <enroll.server_name> --ca-file <file holding enroll.ca_certificate> --state-dir <dir> --embedded`), never put on a command line.
|
|
4526
|
+
*/
|
|
4527
|
+
export type MachineKey = {
|
|
4528
|
+
id: string;
|
|
4529
|
+
/**
|
|
4530
|
+
* The key itself, said here and never again.
|
|
4531
|
+
*/
|
|
4532
|
+
key: string;
|
|
4533
|
+
/**
|
|
4534
|
+
* The user the machine it enrols will belong to.
|
|
4535
|
+
*/
|
|
4536
|
+
owner: string;
|
|
4537
|
+
/**
|
|
4538
|
+
* The pool the machine joins: the one the platform keeps for people's machines of this operating system and architecture.
|
|
4539
|
+
*/
|
|
4540
|
+
pool_id: string;
|
|
4541
|
+
label?: string;
|
|
4542
|
+
created_at?: string;
|
|
4543
|
+
enroll: PoolKeyEnroll;
|
|
4544
|
+
};
|
|
4443
4545
|
/** The events this module sends the project's webhooks (x-palbase-events), by type: each one's payload, the event's data. */
|
|
4444
4546
|
export interface Events {
|
|
4445
4547
|
/**
|
|
@@ -4846,7 +4948,7 @@ export declare function client(t: Transport): {
|
|
|
4846
4948
|
/**
|
|
4847
4949
|
* The chat's past
|
|
4848
4950
|
*
|
|
4849
|
-
* 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.
|
|
4850
4952
|
*/
|
|
4851
4953
|
listChatParts(input: {
|
|
4852
4954
|
path: {
|
|
@@ -4863,7 +4965,7 @@ export declare function client(t: Transport): {
|
|
|
4863
4965
|
/**
|
|
4864
4966
|
* Pipe the chat into a channel
|
|
4865
4967
|
*
|
|
4866
|
-
* 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.
|
|
4867
4969
|
*/
|
|
4868
4970
|
putChatPipe(input: {
|
|
4869
4971
|
path: {
|
|
@@ -5232,7 +5334,7 @@ export declare function client(t: Transport): {
|
|
|
5232
5334
|
/**
|
|
5233
5335
|
* Delete a runtime environment
|
|
5234
5336
|
*
|
|
5235
|
-
* Deletes a runtime environment
|
|
5337
|
+
* Deletes a runtime environment.
|
|
5236
5338
|
*/
|
|
5237
5339
|
deleteEnvironment(input: {
|
|
5238
5340
|
path: {
|
|
@@ -5240,29 +5342,6 @@ export declare function client(t: Transport): {
|
|
|
5240
5342
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
5241
5343
|
signal?: AbortSignal;
|
|
5242
5344
|
}): Promise<Reply<204, undefined>>;
|
|
5243
|
-
/**
|
|
5244
|
-
* Queue an environment build
|
|
5245
|
-
*
|
|
5246
|
-
* Queues a new immutable pre-bake build for the named environment.
|
|
5247
|
-
*/
|
|
5248
|
-
createEnvironmentBuild(input: {
|
|
5249
|
-
path: {
|
|
5250
|
-
name: string;
|
|
5251
|
-
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
5252
|
-
signal?: AbortSignal;
|
|
5253
|
-
}): Promise<Reply<201, EnvironmentBuild>>;
|
|
5254
|
-
/**
|
|
5255
|
-
* Get an environment build
|
|
5256
|
-
*
|
|
5257
|
-
* Returns the status and metadata of a specific environment build.
|
|
5258
|
-
*/
|
|
5259
|
-
getEnvironmentBuild(input: {
|
|
5260
|
-
path: {
|
|
5261
|
-
name: string; /** The build's identifier. */
|
|
5262
|
-
build_id: string;
|
|
5263
|
-
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
5264
|
-
signal?: AbortSignal;
|
|
5265
|
-
}): Promise<Reply<200, EnvironmentBuild>>;
|
|
5266
5345
|
/**
|
|
5267
5346
|
* Make pictures
|
|
5268
5347
|
*
|
|
@@ -5298,21 +5377,35 @@ export declare function client(t: Transport): {
|
|
|
5298
5377
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
5299
5378
|
signal?: AbortSignal;
|
|
5300
5379
|
}): Promise<Reply<200, Response>>;
|
|
5380
|
+
/**
|
|
5381
|
+
* Read a machine
|
|
5382
|
+
*
|
|
5383
|
+
* One machine: its name, its state, when it was last seen and its harnesses. The project's server reads every machine of the project. A signed-in user reads a machine that is theirs; any other — someone else's, or one of the project's own — is not there for them (404), as a machine that does not exist.
|
|
5384
|
+
*/
|
|
5385
|
+
getMachine(input: {
|
|
5386
|
+
path: {
|
|
5387
|
+
machine: string;
|
|
5388
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
5389
|
+
signal?: AbortSignal;
|
|
5390
|
+
}): Promise<Reply<200, Machine>>;
|
|
5301
5391
|
/**
|
|
5302
5392
|
* Delete a machine
|
|
5303
5393
|
*
|
|
5304
|
-
* A cordoned machine that holds no session leaves its pool; its agent (`palbase-agent`) is refused from then. One not cordoned: 409 machine_not_cordoned; one that holds a session: 409 machine_busy.
|
|
5394
|
+
* A cordoned machine that holds no session leaves its pool; its agent (`palbase-agent`) is refused from then. One not cordoned: 409 machine_not_cordoned; one that holds a session: 409 machine_busy. With now=true the machine is deleted whatever it is doing: its agent is cut off at once, a turn running on it ends failed (machine_removed), and a chat that targets it reads machine_status removed until it is handed to another target. A signed-in user deletes a machine that is theirs; any other — someone else's, or one of the project's own — is not there for them (404).
|
|
5305
5395
|
*/
|
|
5306
5396
|
deleteMachine(input: {
|
|
5307
5397
|
path: {
|
|
5308
5398
|
machine: string;
|
|
5399
|
+
};
|
|
5400
|
+
query?: {
|
|
5401
|
+
now?: boolean;
|
|
5309
5402
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
5310
5403
|
signal?: AbortSignal;
|
|
5311
5404
|
}): Promise<Reply<204, undefined>>;
|
|
5312
5405
|
/**
|
|
5313
5406
|
* Cordon a machine
|
|
5314
5407
|
*
|
|
5315
|
-
* The machine takes no new session; the sessions it holds run on. Delete it once it holds none (its state says used 0).
|
|
5408
|
+
* The machine takes no new session; the sessions it holds run on. Delete it once it holds none (its state says used 0). A signed-in user cordons a machine that is theirs; any other — someone else's, or one of the project's own — is not there for them (404).
|
|
5316
5409
|
*/
|
|
5317
5410
|
cordonMachine(input: {
|
|
5318
5411
|
path: {
|
|
@@ -5323,7 +5416,7 @@ export declare function client(t: Transport): {
|
|
|
5323
5416
|
/**
|
|
5324
5417
|
* Resume a machine
|
|
5325
5418
|
*
|
|
5326
|
-
* A cordoned machine takes sessions again.
|
|
5419
|
+
* A cordoned machine takes sessions again. A signed-in user resumes a machine that is theirs; any other — someone else's, or one of the project's own — is not there for them (404).
|
|
5327
5420
|
*/
|
|
5328
5421
|
resumeMachine(input: {
|
|
5329
5422
|
path: {
|
|
@@ -6163,5 +6256,25 @@ export declare function client(t: Transport): {
|
|
|
6163
6256
|
body: ClientTemplateVoiceRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
6164
6257
|
signal?: AbortSignal;
|
|
6165
6258
|
}): Promise<Reply<201, ClientTemplateVoiceResponse>>;
|
|
6259
|
+
/**
|
|
6260
|
+
* Mint an enrolment key for a person's own machine
|
|
6261
|
+
*
|
|
6262
|
+
* A key that enrols one machine as its owner's, said once. A signed-in user mints one for a machine of their own, with no secret key on the device, when the project's setting user_machines is on (403 user_machines_disabled otherwise; settings.clients is not asked); the project's server mints one for the user it names (owner, a user's id), whatever the setting says; a user whose account was deleted is not one (404 for the server, 403 user_deleted for a token of theirs that still stands). The key waits fifteen minutes for its machine: unused by then it enrols nothing. A user who already holds user_machine_limit machines, a key still waiting counted as one, is refused: 409 machine_limit_reached. Only the machine's owner and the project's server name it as a chat's target, read its state and its harnesses, cordon it and delete it; it takes no work but the chats that name it.
|
|
6263
|
+
*/
|
|
6264
|
+
createMachineKey(input: {
|
|
6265
|
+
body: MachineKeyRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
6266
|
+
signal?: AbortSignal;
|
|
6267
|
+
}): Promise<Reply<201, MachineKey>>;
|
|
6268
|
+
/**
|
|
6269
|
+
* List a person's machines
|
|
6270
|
+
*
|
|
6271
|
+
* A signed-in user's own machines (settings.clients is not asked: what a person enrolled is theirs to read), each with its name, its state, when it was last seen and its harnesses; the project's server reads those of the user it names (owner). A machine of someone else's is never in the list. The list changes without a call: the realtime channel ai_machines:<project ref>:<user id>, which that user alone joins and nobody but the platform writes, carries the broadcast machines.changed.v1, with no data, whenever one of the user's machines is enrolled, goes online or offline, is cordoned, resumed or removed, or reports other harnesses — read the list again then.
|
|
6272
|
+
*/
|
|
6273
|
+
listMachines(input?: {
|
|
6274
|
+
query?: {
|
|
6275
|
+
owner?: string;
|
|
6276
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
6277
|
+
signal?: AbortSignal;
|
|
6278
|
+
}): Promise<Reply<200, MachineList>>;
|
|
6166
6279
|
};
|
|
6167
6280
|
export type Client = ReturnType<typeof client>;
|
|
@@ -57,6 +57,10 @@ export type AudienceChangedEvent = {
|
|
|
57
57
|
* The person: a user's id, or the anonymous id of an app no one signed in on.
|
|
58
58
|
*/
|
|
59
59
|
person_id: string;
|
|
60
|
+
/**
|
|
61
|
+
* Whether the audience's rule reads nothing an app can say: every condition an event a module saw happen itself (a purchase, an order paid) — not a property, a place, a platform, an event of the project's own naming, one told on the app's report (a push opened), nor another audience's or a journey's. A journey gives — a coupon, a grant, a wallet credit — on a trusted audience's word only.
|
|
62
|
+
*/
|
|
63
|
+
trusted: boolean;
|
|
60
64
|
/**
|
|
61
65
|
* The user they signed in as, when they did.
|
|
62
66
|
*/
|
|
@@ -1046,7 +1050,7 @@ export type RequestLine = {
|
|
|
1046
1050
|
*/
|
|
1047
1051
|
duration_ms: number;
|
|
1048
1052
|
/**
|
|
1049
|
-
*
|
|
1053
|
+
* Optional routing outcome code when the request terminated before receiving a module response (for example auth rejection, missing route, upstream unreachable, timeout, or client disconnect).
|
|
1050
1054
|
*/
|
|
1051
1055
|
flags?: string;
|
|
1052
1056
|
/**
|
|
@@ -789,14 +789,6 @@ export type AnonymousConvertResult = {
|
|
|
789
789
|
*/
|
|
790
790
|
email: string;
|
|
791
791
|
status: "pending_verification";
|
|
792
|
-
/**
|
|
793
|
-
* The e-mail code, echoed only by a server set to expose verification secrets (development and tests); absent in production.
|
|
794
|
-
*/
|
|
795
|
-
verification_code?: string;
|
|
796
|
-
/**
|
|
797
|
-
* The link's token, under the same rule: absent in production.
|
|
798
|
-
*/
|
|
799
|
-
verification_token?: string;
|
|
800
792
|
};
|
|
801
793
|
export type AnonymousConvertVerifyRequest = {
|
|
802
794
|
/**
|
|
@@ -2739,18 +2731,9 @@ export type RelatedOrigins = {
|
|
|
2739
2731
|
origins: string[];
|
|
2740
2732
|
};
|
|
2741
2733
|
/**
|
|
2742
|
-
* Empty
|
|
2734
|
+
* Empty whoever the address belongs to — known, unknown or already verified.
|
|
2743
2735
|
*/
|
|
2744
|
-
export type ResendResult =
|
|
2745
|
-
/**
|
|
2746
|
-
* Development and tests only.
|
|
2747
|
-
*/
|
|
2748
|
-
verification_code?: string;
|
|
2749
|
-
/**
|
|
2750
|
-
* Development and tests only.
|
|
2751
|
-
*/
|
|
2752
|
-
verification_token?: string;
|
|
2753
|
-
};
|
|
2736
|
+
export type ResendResult = Record<string, never>;
|
|
2754
2737
|
export type ResendVerificationRequest = {
|
|
2755
2738
|
email: string;
|
|
2756
2739
|
};
|
|
@@ -2985,14 +2968,6 @@ export type SignupResult = {
|
|
|
2985
2968
|
refresh_token?: string;
|
|
2986
2969
|
token_type?: "Bearer";
|
|
2987
2970
|
user: User;
|
|
2988
|
-
/**
|
|
2989
|
-
* The e-mail code, under the same rule: absent in production.
|
|
2990
|
-
*/
|
|
2991
|
-
verification_code?: string;
|
|
2992
|
-
/**
|
|
2993
|
-
* The link's token, echoed only by a server set to expose verification secrets (development and tests). In production it is absent: the link reaches the address by e-mail and nowhere else.
|
|
2994
|
-
*/
|
|
2995
|
-
verification_token?: string;
|
|
2996
2971
|
};
|
|
2997
2972
|
export type SocialAdminConfig = {
|
|
2998
2973
|
credentials: SocialCredentialDescriptor[];
|
|
@@ -3931,7 +3906,7 @@ export type AdminUserInviteRequest = {
|
|
|
3931
3906
|
email: string;
|
|
3932
3907
|
metadata?: AdminUserMetadata;
|
|
3933
3908
|
/**
|
|
3934
|
-
* Where the invitation's link opens instead of Palbase's own page: a page of the app's, on the project's redirect allow-list (auth settings'
|
|
3909
|
+
* Where the invitation's link opens instead of Palbase's own page: a page of the app's, on the project's redirect allow-list (auth settings' redirect_urls). It receives ?token= and takes it, with the password the person chooses, to POST /auth/invitations/accept. Absent: the link opens Palbase's page at the project's own address — never site_url.
|
|
3935
3910
|
*/
|
|
3936
3911
|
redirect_to?: string;
|
|
3937
3912
|
/**
|