palbase 0.64.0 → 0.66.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 +4 -0
- 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/{ZO7BWXF3.js → 243727GR.js} +2 -2
- package/dist/chunks/{KRYGPGVB.js → 2DGYQO2K.js} +2 -2
- package/dist/chunks/{U6S2T2FE.js → 47OT2TAE.js} +2 -2
- package/dist/chunks/{ZZLCBUNM.js → 4DOKNJUJ.js} +2 -2
- package/dist/chunks/{TTDCC4FL.js → 7JAVCOPA.js} +1 -1
- package/dist/chunks/{7WLAMFND.js → FFRCUMXB.js} +2 -2
- package/dist/chunks/GS7AQ2KQ.js +2 -0
- package/dist/chunks/GVC6OZMF.js +13 -0
- package/dist/chunks/{2FPPZ3A3.js → GYB7XBYV.js} +2 -2
- package/dist/chunks/{TNY6UGJZ.js → HECZUS65.js} +2 -2
- package/dist/chunks/{B6FEEB5R.js → L5DVXXH3.js} +1 -1
- package/dist/chunks/{AUCNHNPD.js → MTOW4UUP.js} +2 -2
- package/dist/chunks/PQ23MXWT.js +18 -0
- package/dist/chunks/{XDGXREXS.js → PZXACOXA.js} +1 -1
- package/dist/chunks/{D2Z5R7ZP.js → QKAKVJLA.js} +1 -1
- package/dist/chunks/{MVHF5I2L.js → QT7PHIRR.js} +2 -2
- package/dist/chunks/{RCV4YOM6.js → REON7CA7.js} +1 -1
- package/dist/chunks/UZERPL37.js +2 -0
- package/dist/chunks/V7X2RHTR.js +21 -0
- package/dist/chunks/{MUHCCKSS.js → YO7F2OI2.js} +1 -1
- package/dist/chunks/ZA5NYGQH.js +22 -0
- package/dist/chunks/{XIHO4HVO.js → ZV6WG4DE.js} +1 -1
- package/dist/chunks/ZY6P5WKM.js +2 -0
- package/dist/cli.js +356 -371
- package/dist/cloud/index.js +2 -2
- package/dist/refuse/ai-sdk.js +2 -0
- 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/paywall.js +2 -2
- package/dist/web/push-sw.js +1 -1
- package/dist/web/ssr.js +2 -2
- package/dist/web/vite.js +4 -3
- package/package.json +14 -2
- package/types/ai/src/ai.d.ts +55 -29
- package/types/ai/src/chats.d.ts +163 -171
- package/types/ai/src/index.d.ts +5 -5
- package/types/ai/src/pools.d.ts +17 -7
- package/types/ai/src/tools.d.ts +6 -64
- package/types/ai-sdk/src/index.d.ts +166 -0
- package/types/backend/src/decorators.d.ts +2 -1
- package/types/backend/src/services.d.ts +2 -2
- package/types/backend/src/stack.d.ts +2 -4
- package/types/backend/src/upload.d.ts +2 -1
- package/types/cloud/src/generated/project.d.ts +2 -1
- package/types/internal/src/chat.d.ts +56 -2
- package/types/internal/src/modules/ai.d.ts +960 -1140
- package/types/internal/src/modules/events.d.ts +4 -3
- package/types/internal/src/modules/index.d.ts +1 -0
- package/types/internal/src/modules/storage.d.ts +1 -1
- package/types/internal/src/modules/workspaces.d.ts +626 -0
- package/types/server/src/server.d.ts +5 -0
- package/types/web/src/chat.d.ts +30 -4
- package/types/web/src/client.d.ts +7 -7
- package/types/web/src/index.d.ts +2 -1
- package/types/web/src/vite.d.ts +8 -0
- package/dist/chunks/47YRZOKH.js +0 -2
- package/dist/chunks/73CKSYD7.js +0 -21
- package/dist/chunks/HWDOVTN4.js +0 -22
- package/dist/chunks/K4E27V7K.js +0 -2
- package/dist/chunks/QDAQJXBR.js +0 -18
- package/dist/chunks/SKPSBDXT.js +0 -2
- package/dist/chunks/UAD4XPIB.js +0 -13
|
@@ -90,7 +90,7 @@ export type AgentDefinition = {
|
|
|
90
90
|
*/
|
|
91
91
|
effort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
|
|
92
92
|
/**
|
|
93
|
-
* The agent's own variables (names: upper-case letters, digits and _, not
|
|
93
|
+
* The agent's own variables (names: upper-case letters, digits and _, not PALBASE_AI_…; 64 at most; a value 32 KiB at most): every command of its sessions has them, on every pool, beside the project's (PUT /ai/env/{key}), masked in a transcript. Each is its value, or {value, hosts, inject, open, secret, acknowledge_open, acknowledge_guessable}: what the secret says of itself, as PUT /ai/env/{key} takes it. A value is never answered again: a definition read back says each name with an empty value (an object where it says more than its value), and a name written with an empty value keeps the value it has — written as a bare string, what it says of itself too.
|
|
94
94
|
*/
|
|
95
95
|
env?: {
|
|
96
96
|
[key: string]: AgentEnvValue | AgentEnvEntry;
|
|
@@ -147,6 +147,43 @@ export type AgentDraftRequest = {
|
|
|
147
147
|
*/
|
|
148
148
|
name?: string;
|
|
149
149
|
};
|
|
150
|
+
/**
|
|
151
|
+
* A variable's value and what the secret says of itself. A value kept from the definition written over ("") keeps what it said there unless a person changes it (403 person_required); a sealed value given is held to the value rules of PUT /ai/env/{key}, and a kept value made sealed (open or no secret before) is given with it (400 value_required). A write that gives any value is a change: the draft's revision moves.
|
|
152
|
+
*/
|
|
153
|
+
export type AgentEnvEntry = {
|
|
154
|
+
/**
|
|
155
|
+
* Said with open: true where the secret becomes open, and with secret: false where a secret becomes none (it was not so in the definition written over): you read that the agent reads it as it is.
|
|
156
|
+
*/
|
|
157
|
+
acknowledge_open?: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* The hosts a request may carry it to, as PUT /ai/env/{key} takes them.
|
|
160
|
+
*/
|
|
161
|
+
hosts?: string[];
|
|
162
|
+
/**
|
|
163
|
+
* Where in such a request it may be put: header (the default), query, body.
|
|
164
|
+
*/
|
|
165
|
+
inject?: ("header" | "query" | "body")[];
|
|
166
|
+
/**
|
|
167
|
+
* The agent reads it as it is: no hosts, no inject.
|
|
168
|
+
*/
|
|
169
|
+
open?: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Its value ("": keep the value it has).
|
|
172
|
+
*/
|
|
173
|
+
value?: string;
|
|
174
|
+
/**
|
|
175
|
+
* Said with a sealed value a person may have chosen (fewer than 16 characters, or one kind of character only).
|
|
176
|
+
*/
|
|
177
|
+
acknowledge_guessable?: boolean;
|
|
178
|
+
/**
|
|
179
|
+
* Whether it is a secret (the default); false: a plain variable the agent reads as it is, with no hosts and no class.
|
|
180
|
+
*/
|
|
181
|
+
secret?: boolean;
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* A variable's value alone ("" read back, and written to keep the value it has).
|
|
185
|
+
*/
|
|
186
|
+
export type AgentEnvValue = string;
|
|
150
187
|
/**
|
|
151
188
|
* The project's agents.
|
|
152
189
|
*/
|
|
@@ -223,6 +260,17 @@ export type AgentVersionList = {
|
|
|
223
260
|
*/
|
|
224
261
|
versions: AgentVersion[];
|
|
225
262
|
};
|
|
263
|
+
export type AutoFailoverPolicy = ({
|
|
264
|
+
/**
|
|
265
|
+
* Seconds a target machine must stay offline before automatic handoff triggers.
|
|
266
|
+
*/
|
|
267
|
+
after_offline_seconds: number;
|
|
268
|
+
to: ExecutionTarget;
|
|
269
|
+
/**
|
|
270
|
+
* Wait for a clean workspace publish before cutting over.
|
|
271
|
+
*/
|
|
272
|
+
require_workspace_clean_before_cut?: boolean;
|
|
273
|
+
}) | null;
|
|
226
274
|
/**
|
|
227
275
|
* A conversation of the project's users with one of its agents.
|
|
228
276
|
*/
|
|
@@ -271,7 +319,33 @@ export type Chat = {
|
|
|
271
319
|
*/
|
|
272
320
|
title: string;
|
|
273
321
|
voice?: VoiceSession;
|
|
274
|
-
|
|
322
|
+
/**
|
|
323
|
+
* Standalone workspaces module id (ws_<24hex>).
|
|
324
|
+
*/
|
|
325
|
+
workspace_id?: string;
|
|
326
|
+
target?: ExecutionTarget;
|
|
327
|
+
target_generation?: number;
|
|
328
|
+
auto_failover?: AutoFailoverPolicy;
|
|
329
|
+
/**
|
|
330
|
+
* Realtime channel topic streaming this chat live.
|
|
331
|
+
*/
|
|
332
|
+
topic?: string;
|
|
333
|
+
run_status?: "idle" | "running" | "awaiting_approval" | "awaiting_tool" | "offline_parked";
|
|
334
|
+
active_run_id?: string;
|
|
335
|
+
target_summary?: TargetSummary;
|
|
336
|
+
};
|
|
337
|
+
export type ChatExecution = {
|
|
338
|
+
chat_id: string;
|
|
339
|
+
target: ExecutionTarget;
|
|
340
|
+
target_generation: number;
|
|
341
|
+
workspace_id?: string;
|
|
342
|
+
workspace_seq: number;
|
|
343
|
+
machine_status?: "online" | "offline" | "waking";
|
|
344
|
+
machine_name?: string;
|
|
345
|
+
harnesses?: MachineHarness[];
|
|
346
|
+
auto_failover?: AutoFailoverPolicy;
|
|
347
|
+
failover_at?: string | null;
|
|
348
|
+
pending_handoff?: PendingHandoff;
|
|
275
349
|
};
|
|
276
350
|
/**
|
|
277
351
|
* Where a forked chat came from.
|
|
@@ -501,19 +575,6 @@ export type ChatPipeResult = {
|
|
|
501
575
|
*/
|
|
502
576
|
topic: string;
|
|
503
577
|
};
|
|
504
|
-
/**
|
|
505
|
-
* One repository of a chat's workspace.
|
|
506
|
-
*/
|
|
507
|
-
export type ChatRepo = {
|
|
508
|
-
/**
|
|
509
|
-
* The branch it is checked out at and pushed to (the repository's default unless said).
|
|
510
|
-
*/
|
|
511
|
-
branch?: string;
|
|
512
|
-
/**
|
|
513
|
-
* The project's name for the repository (PUT /ai/repos/{name}).
|
|
514
|
-
*/
|
|
515
|
-
repo: string;
|
|
516
|
-
};
|
|
517
578
|
/**
|
|
518
579
|
* A chat to start: the project's server's alone.
|
|
519
580
|
*/
|
|
@@ -541,7 +602,16 @@ export type ChatRequest = {
|
|
|
541
602
|
* Its title (256 bytes at most).
|
|
542
603
|
*/
|
|
543
604
|
title?: string;
|
|
544
|
-
|
|
605
|
+
/**
|
|
606
|
+
* Standalone workspaces module id (ws_<24hex>).
|
|
607
|
+
*/
|
|
608
|
+
workspace_id?: string;
|
|
609
|
+
target?: ExecutionTarget;
|
|
610
|
+
auto_failover?: AutoFailoverPolicy;
|
|
611
|
+
/**
|
|
612
|
+
* Attach a Realtime pipe automatically at creation (defaults to settings.auto_pipe_chats).
|
|
613
|
+
*/
|
|
614
|
+
live?: boolean;
|
|
545
615
|
};
|
|
546
616
|
/**
|
|
547
617
|
* Stops the chat's turn.
|
|
@@ -597,35 +667,23 @@ export type ChatToolCall = {
|
|
|
597
667
|
*/
|
|
598
668
|
status: string;
|
|
599
669
|
};
|
|
600
|
-
|
|
601
|
-
* The project's repositories a chat works in, each at a branch: its turns run on a machine of the platform's with them checked out, and what its agent commits is pushed to that branch.
|
|
602
|
-
*/
|
|
603
|
-
export type ChatWorkspace = {
|
|
604
|
-
/**
|
|
605
|
-
* Lets the agent push its commits to the branches without a person's yes — the server's choice for the chat: its members' messages then reach the repository. Without it a push waits for a member's approval.
|
|
606
|
-
*/
|
|
607
|
-
auto_push?: boolean;
|
|
670
|
+
export type ComputeTarget = {
|
|
608
671
|
/**
|
|
609
|
-
*
|
|
672
|
+
* Where the session runs.
|
|
610
673
|
*/
|
|
611
|
-
|
|
674
|
+
kind: "serverless" | "cloud" | "pool" | "machine";
|
|
612
675
|
/**
|
|
613
|
-
*
|
|
676
|
+
* Runner pool id or name when kind is pool or machine.
|
|
614
677
|
*/
|
|
615
|
-
|
|
616
|
-
};
|
|
617
|
-
/**
|
|
618
|
-
* A git trailer each of the chat's commits carries at its message's end.
|
|
619
|
-
*/
|
|
620
|
-
export type CommitTrailer = {
|
|
678
|
+
pool_id?: string;
|
|
621
679
|
/**
|
|
622
|
-
*
|
|
680
|
+
* Specific enrolled runner machine id when kind is machine.
|
|
623
681
|
*/
|
|
624
|
-
|
|
682
|
+
machine_id?: string;
|
|
625
683
|
/**
|
|
626
|
-
*
|
|
684
|
+
* Optional hosted cloud environment profile name.
|
|
627
685
|
*/
|
|
628
|
-
|
|
686
|
+
environment?: string;
|
|
629
687
|
};
|
|
630
688
|
/**
|
|
631
689
|
* A decision made.
|
|
@@ -807,6 +865,15 @@ export type EndpointRequest = {
|
|
|
807
865
|
*/
|
|
808
866
|
workspace?: boolean;
|
|
809
867
|
};
|
|
868
|
+
/**
|
|
869
|
+
* A host the secret may go to: the owner's Allow.
|
|
870
|
+
*/
|
|
871
|
+
export type EnvHostRequest = {
|
|
872
|
+
/**
|
|
873
|
+
* An exact DNS name or *. and one, as hosts takes them.
|
|
874
|
+
*/
|
|
875
|
+
host: string;
|
|
876
|
+
};
|
|
810
877
|
/**
|
|
811
878
|
* The project's variables.
|
|
812
879
|
*/
|
|
@@ -854,7 +921,7 @@ export type EnvRequest = {
|
|
|
854
921
|
*/
|
|
855
922
|
export type EnvVar = {
|
|
856
923
|
/**
|
|
857
|
-
* The hosts it may go to ([]: none
|
|
924
|
+
* The hosts it may go to ([]: none — it goes to no host: a request carries its placeholder, and the host is asked about; always [] for an open secret or one that is no secret).
|
|
858
925
|
*/
|
|
859
926
|
hosts: string[];
|
|
860
927
|
/**
|
|
@@ -878,6 +945,182 @@ export type EnvVar = {
|
|
|
878
945
|
*/
|
|
879
946
|
updated_at: string;
|
|
880
947
|
};
|
|
948
|
+
/**
|
|
949
|
+
* A first-class project runtime environment for AI agents.
|
|
950
|
+
*/
|
|
951
|
+
export type Environment = {
|
|
952
|
+
/**
|
|
953
|
+
* Unique environment name within the project.
|
|
954
|
+
*/
|
|
955
|
+
name: string;
|
|
956
|
+
runtime: EnvironmentRuntime;
|
|
957
|
+
/**
|
|
958
|
+
* Lifecycle mode: ephemeral (auto-parks when idle) or always_on (pinned warm, never auto-parked).
|
|
959
|
+
*/
|
|
960
|
+
mode: "ephemeral" | "always_on";
|
|
961
|
+
/**
|
|
962
|
+
* Minimum sandbox isolation posture.
|
|
963
|
+
*/
|
|
964
|
+
isolation: "strict" | "relaxed";
|
|
965
|
+
resources: EnvironmentResources;
|
|
966
|
+
scaling: EnvironmentScaling;
|
|
967
|
+
network: EnvironmentNetwork;
|
|
968
|
+
/**
|
|
969
|
+
* Creation timestamp (RFC 3339).
|
|
970
|
+
*/
|
|
971
|
+
created_at: string;
|
|
972
|
+
/**
|
|
973
|
+
* Last update timestamp (RFC 3339).
|
|
974
|
+
*/
|
|
975
|
+
updated_at: string;
|
|
976
|
+
};
|
|
977
|
+
/**
|
|
978
|
+
* An immutable pre-bake build record for a runtime environment.
|
|
979
|
+
*/
|
|
980
|
+
export type EnvironmentBuild = {
|
|
981
|
+
/**
|
|
982
|
+
* Unique build identifier (envb_...).
|
|
983
|
+
*/
|
|
984
|
+
build_id: string;
|
|
985
|
+
/**
|
|
986
|
+
* Name of the environment being built.
|
|
987
|
+
*/
|
|
988
|
+
environment_name: string;
|
|
989
|
+
/**
|
|
990
|
+
* Current build state.
|
|
991
|
+
*/
|
|
992
|
+
status: "queued" | "building" | "ready" | "failed";
|
|
993
|
+
/**
|
|
994
|
+
* Resulting immutable OCI image digest when ready.
|
|
995
|
+
*/
|
|
996
|
+
image_digest?: string;
|
|
997
|
+
/**
|
|
998
|
+
* SHA-256 digest of the runtime specification.
|
|
999
|
+
*/
|
|
1000
|
+
setup_digest: string;
|
|
1001
|
+
/**
|
|
1002
|
+
* Tail of build logs, if available.
|
|
1003
|
+
*/
|
|
1004
|
+
log_excerpt?: string;
|
|
1005
|
+
/**
|
|
1006
|
+
* Failure detail if status is failed.
|
|
1007
|
+
*/
|
|
1008
|
+
error_message?: string;
|
|
1009
|
+
/**
|
|
1010
|
+
* Creation timestamp (RFC 3339).
|
|
1011
|
+
*/
|
|
1012
|
+
created_at: string;
|
|
1013
|
+
/**
|
|
1014
|
+
* Last update timestamp (RFC 3339).
|
|
1015
|
+
*/
|
|
1016
|
+
updated_at: string;
|
|
1017
|
+
/**
|
|
1018
|
+
* Completion timestamp (RFC 3339), if finished.
|
|
1019
|
+
*/
|
|
1020
|
+
completed_at?: string | null;
|
|
1021
|
+
};
|
|
1022
|
+
/**
|
|
1023
|
+
* The project's runtime environments.
|
|
1024
|
+
*/
|
|
1025
|
+
export type EnvironmentList = {
|
|
1026
|
+
/**
|
|
1027
|
+
* Environments ordered by name.
|
|
1028
|
+
*/
|
|
1029
|
+
environments: Environment[];
|
|
1030
|
+
};
|
|
1031
|
+
/**
|
|
1032
|
+
* Outbound network egress policy and Palbase DB connectivity.
|
|
1033
|
+
*/
|
|
1034
|
+
export type EnvironmentNetwork = {
|
|
1035
|
+
/**
|
|
1036
|
+
* Outbound network policy.
|
|
1037
|
+
*/
|
|
1038
|
+
egress?: "default" | "restricted" | "none";
|
|
1039
|
+
/**
|
|
1040
|
+
* Whether sandboxes in this environment may reach project Palbase Postgres databases via the TLS/SSLRequest egress proxy.
|
|
1041
|
+
*/
|
|
1042
|
+
allow_palbase_db?: boolean;
|
|
1043
|
+
/**
|
|
1044
|
+
* Additional allowlisted hostnames when egress is restricted.
|
|
1045
|
+
*/
|
|
1046
|
+
allow_hosts?: string[];
|
|
1047
|
+
};
|
|
1048
|
+
/**
|
|
1049
|
+
* Configuration for creating or updating a project runtime environment.
|
|
1050
|
+
*/
|
|
1051
|
+
export type EnvironmentRequest = {
|
|
1052
|
+
/**
|
|
1053
|
+
* Environment name (required on POST /ai/environments; ignored when provided in the path on PUT).
|
|
1054
|
+
*/
|
|
1055
|
+
name?: string;
|
|
1056
|
+
runtime?: EnvironmentRuntime;
|
|
1057
|
+
/**
|
|
1058
|
+
* Lifecycle mode: ephemeral or always_on.
|
|
1059
|
+
*/
|
|
1060
|
+
mode?: "ephemeral" | "always_on";
|
|
1061
|
+
/**
|
|
1062
|
+
* Sandbox isolation posture.
|
|
1063
|
+
*/
|
|
1064
|
+
isolation?: "strict" | "relaxed";
|
|
1065
|
+
resources?: EnvironmentResources;
|
|
1066
|
+
scaling?: EnvironmentScaling;
|
|
1067
|
+
network?: EnvironmentNetwork;
|
|
1068
|
+
};
|
|
1069
|
+
/**
|
|
1070
|
+
* Compute and idle lifecycle limits for an environment.
|
|
1071
|
+
*/
|
|
1072
|
+
export type EnvironmentResources = {
|
|
1073
|
+
/**
|
|
1074
|
+
* Virtual CPU count.
|
|
1075
|
+
*/
|
|
1076
|
+
cpu?: number;
|
|
1077
|
+
/**
|
|
1078
|
+
* Memory limit in MiB.
|
|
1079
|
+
*/
|
|
1080
|
+
memory_mb?: number;
|
|
1081
|
+
/**
|
|
1082
|
+
* Encrypted workspace disk budget in MiB.
|
|
1083
|
+
*/
|
|
1084
|
+
disk_mb?: number;
|
|
1085
|
+
/**
|
|
1086
|
+
* Idle timeout before parking in seconds (always 0 for always_on environments).
|
|
1087
|
+
*/
|
|
1088
|
+
idle_timeout_seconds?: number;
|
|
1089
|
+
};
|
|
1090
|
+
/**
|
|
1091
|
+
* Container image, Dockerfile, Mac VM profile, and pre-install setup commands for an environment.
|
|
1092
|
+
*/
|
|
1093
|
+
export type EnvironmentRuntime = {
|
|
1094
|
+
/**
|
|
1095
|
+
* Base OCI container image (defaults to ubuntu:24.04 when dockerfile and vm_profile are omitted).
|
|
1096
|
+
*/
|
|
1097
|
+
image?: string;
|
|
1098
|
+
/**
|
|
1099
|
+
* Optional inline Dockerfile content for custom environment builds.
|
|
1100
|
+
*/
|
|
1101
|
+
dockerfile?: string;
|
|
1102
|
+
/**
|
|
1103
|
+
* Optional Virtualization.framework VM profile for native Xcode or Linux microVM execution.
|
|
1104
|
+
*/
|
|
1105
|
+
vm_profile?: "macos-xcode" | "linux-vm";
|
|
1106
|
+
/**
|
|
1107
|
+
* Shell setup commands executed when baking or initializing the environment.
|
|
1108
|
+
*/
|
|
1109
|
+
setup?: string[];
|
|
1110
|
+
};
|
|
1111
|
+
/**
|
|
1112
|
+
* Warm pool and concurrency scaling bounds.
|
|
1113
|
+
*/
|
|
1114
|
+
export type EnvironmentScaling = {
|
|
1115
|
+
/**
|
|
1116
|
+
* Minimum number of pre-warmed instances.
|
|
1117
|
+
*/
|
|
1118
|
+
min_warm?: number;
|
|
1119
|
+
/**
|
|
1120
|
+
* Maximum concurrent instances.
|
|
1121
|
+
*/
|
|
1122
|
+
max_instances?: number;
|
|
1123
|
+
};
|
|
881
1124
|
export type ErrorResponse = {
|
|
882
1125
|
/**
|
|
883
1126
|
* Machine-readable error code (snake_case)
|
|
@@ -900,6 +1143,28 @@ export type ErrorResponse = {
|
|
|
900
1143
|
*/
|
|
901
1144
|
status: number;
|
|
902
1145
|
};
|
|
1146
|
+
export type ExecutionTarget = {
|
|
1147
|
+
compute: ComputeTarget;
|
|
1148
|
+
executor: ExecutorTarget;
|
|
1149
|
+
};
|
|
1150
|
+
export type ExecutorTarget = {
|
|
1151
|
+
/**
|
|
1152
|
+
* Execution runtime: Palbase single engine or local ACP CLI adapter.
|
|
1153
|
+
*/
|
|
1154
|
+
kind: "palbase" | "acp";
|
|
1155
|
+
/**
|
|
1156
|
+
* Official local ACP CLI harness when kind is acp.
|
|
1157
|
+
*/
|
|
1158
|
+
harness?: "claude-code" | "codex" | "gemini-cli";
|
|
1159
|
+
/**
|
|
1160
|
+
* Optional default model override.
|
|
1161
|
+
*/
|
|
1162
|
+
model?: string;
|
|
1163
|
+
/**
|
|
1164
|
+
* Optional default reasoning effort override.
|
|
1165
|
+
*/
|
|
1166
|
+
effort?: string;
|
|
1167
|
+
};
|
|
903
1168
|
/**
|
|
904
1169
|
* Where to fork a chat.
|
|
905
1170
|
*/
|
|
@@ -917,6 +1182,12 @@ export type ForkRequest = {
|
|
|
917
1182
|
*/
|
|
918
1183
|
title?: string;
|
|
919
1184
|
};
|
|
1185
|
+
/**
|
|
1186
|
+
* OpenAI or Anthropic wire-compatible JSON payload.
|
|
1187
|
+
*/
|
|
1188
|
+
export type GatewayJSON = {
|
|
1189
|
+
[key: string]: unknown;
|
|
1190
|
+
};
|
|
920
1191
|
/**
|
|
921
1192
|
* A chat's goal.
|
|
922
1193
|
*/
|
|
@@ -1101,6 +1372,29 @@ export type GoalUsage = {
|
|
|
1101
1372
|
*/
|
|
1102
1373
|
verifications: number;
|
|
1103
1374
|
};
|
|
1375
|
+
export type HandoffRequest = {
|
|
1376
|
+
to: ExecutionTarget;
|
|
1377
|
+
/**
|
|
1378
|
+
* When to cut over: idle (default), after_turn, or now.
|
|
1379
|
+
*/
|
|
1380
|
+
when?: "idle" | "after_turn" | "now";
|
|
1381
|
+
/**
|
|
1382
|
+
* Grace window in seconds for parking an active turn when when=now.
|
|
1383
|
+
*/
|
|
1384
|
+
grace_seconds?: number;
|
|
1385
|
+
/**
|
|
1386
|
+
* Caller idempotency key so retries return the same generation without double-teleporting.
|
|
1387
|
+
*/
|
|
1388
|
+
idempotency_key?: string;
|
|
1389
|
+
};
|
|
1390
|
+
export type HandoffResponse = {
|
|
1391
|
+
chat_id: string;
|
|
1392
|
+
target_generation: number;
|
|
1393
|
+
target: ExecutionTarget;
|
|
1394
|
+
workspace_seq: number;
|
|
1395
|
+
active_run_action: "none" | "queued_after_turn" | "parked_and_resumed";
|
|
1396
|
+
resumed_response_id?: string;
|
|
1397
|
+
};
|
|
1104
1398
|
/**
|
|
1105
1399
|
* A picture job.
|
|
1106
1400
|
*/
|
|
@@ -1309,6 +1603,34 @@ export type LongContextPrice = {
|
|
|
1309
1603
|
*/
|
|
1310
1604
|
output_usd_per_mtok: number;
|
|
1311
1605
|
};
|
|
1606
|
+
export type MachineHarness = {
|
|
1607
|
+
name: "claude-code" | "codex" | "gemini-cli";
|
|
1608
|
+
acp_version?: string;
|
|
1609
|
+
cli_version?: string;
|
|
1610
|
+
status: "ready" | "unauthenticated" | "not_installed";
|
|
1611
|
+
};
|
|
1612
|
+
/**
|
|
1613
|
+
* 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.
|
|
1614
|
+
*/
|
|
1615
|
+
export type MachineSealKey = ({
|
|
1616
|
+
/**
|
|
1617
|
+
* Why it is not registered: the module's closed reason for refused (refused_stale, refused_future, refused_retired, refused_elsewhere, refused_pinned, refused_statement, refused_shape), what failed for pending.
|
|
1618
|
+
*/
|
|
1619
|
+
reason?: string;
|
|
1620
|
+
/**
|
|
1621
|
+
* registered (secrets may be sealed to it), pending (being registered; retried), refused (see reason), stale (a statement too old to register: the machine states again at its next renewal), or held (a hosted machine's, waiting for its first lease).
|
|
1622
|
+
*/
|
|
1623
|
+
state: "registered" | "pending" | "refused" | "stale" | "held";
|
|
1624
|
+
}) | null;
|
|
1625
|
+
export type MediaModel = {
|
|
1626
|
+
id: string;
|
|
1627
|
+
name: string;
|
|
1628
|
+
provider: string;
|
|
1629
|
+
modality: string;
|
|
1630
|
+
default: boolean;
|
|
1631
|
+
price_usd: number;
|
|
1632
|
+
unit: string;
|
|
1633
|
+
};
|
|
1312
1634
|
/**
|
|
1313
1635
|
* A user in a chat.
|
|
1314
1636
|
*/
|
|
@@ -1530,6 +1852,9 @@ export type Models = {
|
|
|
1530
1852
|
* The providers whose models could not be listed just now: their models are missing from chat until they answer.
|
|
1531
1853
|
*/
|
|
1532
1854
|
unavailable: string[];
|
|
1855
|
+
videos?: MediaModel[];
|
|
1856
|
+
stt?: MediaModel[];
|
|
1857
|
+
tts?: MediaModel[];
|
|
1533
1858
|
};
|
|
1534
1859
|
/**
|
|
1535
1860
|
* A user to put in a chat as it starts.
|
|
@@ -1552,6 +1877,17 @@ export type NewMember = {
|
|
|
1552
1877
|
*/
|
|
1553
1878
|
user_id: string;
|
|
1554
1879
|
};
|
|
1880
|
+
export type PatchExecutionRequest = {
|
|
1881
|
+
auto_failover?: AutoFailoverPolicy;
|
|
1882
|
+
model?: string;
|
|
1883
|
+
effort?: string;
|
|
1884
|
+
};
|
|
1885
|
+
export type PendingHandoff = {
|
|
1886
|
+
to: ExecutionTarget;
|
|
1887
|
+
reason: string;
|
|
1888
|
+
idempotency_key?: string;
|
|
1889
|
+
requested_at: string;
|
|
1890
|
+
};
|
|
1555
1891
|
/**
|
|
1556
1892
|
* A runner pool of the project's.
|
|
1557
1893
|
*/
|
|
@@ -1603,7 +1939,7 @@ export type PoolKey = {
|
|
|
1603
1939
|
created_at?: string;
|
|
1604
1940
|
enroll?: PoolKeyEnroll;
|
|
1605
1941
|
/**
|
|
1606
|
-
* The enrolment address (enroll.url), said with the key as it is minted: `
|
|
1942
|
+
* The enrolment address (enroll.url), said with the key as it is minted: `palbase-agent enroll --url`.
|
|
1607
1943
|
*/
|
|
1608
1944
|
enroll_url?: string;
|
|
1609
1945
|
/**
|
|
@@ -1615,7 +1951,7 @@ export type PoolKey = {
|
|
|
1615
1951
|
*/
|
|
1616
1952
|
id: string;
|
|
1617
1953
|
/**
|
|
1618
|
-
* The key, said once — as it is minted, never again: saved to a file on the machine, `
|
|
1954
|
+
* The key, said once — as it is minted, never again: saved to a file on the machine, `palbase-agent enroll --url <enroll_url> --key-file <file> --capacity <n>`.
|
|
1619
1955
|
*/
|
|
1620
1956
|
key?: string;
|
|
1621
1957
|
/**
|
|
@@ -1632,19 +1968,19 @@ export type PoolKey = {
|
|
|
1632
1968
|
revoked_at?: string;
|
|
1633
1969
|
};
|
|
1634
1970
|
/**
|
|
1635
|
-
* Where a machine enrols with it, said with the key as it is minted (never in a list): `
|
|
1971
|
+
* Where a machine enrols with it, said with the key as it is minted (never in a list): `palbase-agent enroll --url <url> --key-file <file>`, with `--server-name <server_name>` when the door's certificate names another host, and `--ca-file <file>` holding ca_certificate when the door's certificate is not publicly trusted.
|
|
1636
1972
|
*/
|
|
1637
1973
|
export type PoolKeyEnroll = {
|
|
1638
1974
|
/**
|
|
1639
|
-
* The CA the door's certificate is signed by (PEM), when it is not publicly trusted: saved to a file, `
|
|
1975
|
+
* The CA the door's certificate is signed by (PEM), when it is not publicly trusted: saved to a file, `palbase-agent enroll --ca-file`.
|
|
1640
1976
|
*/
|
|
1641
1977
|
ca_certificate?: string;
|
|
1642
1978
|
/**
|
|
1643
|
-
* The name the door's certificate carries, when it differs from the address's host: `
|
|
1979
|
+
* The name the door's certificate carries, when it differs from the address's host: `palbase-agent enroll --server-name`.
|
|
1644
1980
|
*/
|
|
1645
1981
|
server_name?: string;
|
|
1646
1982
|
/**
|
|
1647
|
-
* The enrolment address: `
|
|
1983
|
+
* The enrolment address: `palbase-agent enroll --url`.
|
|
1648
1984
|
*/
|
|
1649
1985
|
url: string;
|
|
1650
1986
|
};
|
|
@@ -1711,6 +2047,7 @@ export type PoolMachine = {
|
|
|
1711
2047
|
* When it enrolled.
|
|
1712
2048
|
*/
|
|
1713
2049
|
registered_at?: string | null;
|
|
2050
|
+
seal_key?: MachineSealKey;
|
|
1714
2051
|
/**
|
|
1715
2052
|
* online, offline, or cordoned (it takes no new session).
|
|
1716
2053
|
*/
|
|
@@ -1719,6 +2056,10 @@ export type PoolMachine = {
|
|
|
1719
2056
|
* How many it holds now.
|
|
1720
2057
|
*/
|
|
1721
2058
|
used: number;
|
|
2059
|
+
/**
|
|
2060
|
+
* Locally probed official ACP CLI harnesses reported by palbase-agent (no credentials).
|
|
2061
|
+
*/
|
|
2062
|
+
harnesses?: MachineHarness[];
|
|
1722
2063
|
};
|
|
1723
2064
|
/**
|
|
1724
2065
|
* A runner pool to make: of one type.
|
|
@@ -1815,79 +2156,6 @@ export type ProviderList = {
|
|
|
1815
2156
|
*/
|
|
1816
2157
|
providers: Provider[];
|
|
1817
2158
|
};
|
|
1818
|
-
/**
|
|
1819
|
-
* A commit a push brought to its branch.
|
|
1820
|
-
*/
|
|
1821
|
-
export type PushedCommit = {
|
|
1822
|
-
/**
|
|
1823
|
-
* Its author's address.
|
|
1824
|
-
*/
|
|
1825
|
-
author_email: string;
|
|
1826
|
-
/**
|
|
1827
|
-
* Its author: the member the turn was for, when the server said who they are.
|
|
1828
|
-
*/
|
|
1829
|
-
author_name: string;
|
|
1830
|
-
/**
|
|
1831
|
-
* The commit.
|
|
1832
|
-
*/
|
|
1833
|
-
sha: string;
|
|
1834
|
-
/**
|
|
1835
|
-
* Its message's first line.
|
|
1836
|
-
*/
|
|
1837
|
-
subject: string;
|
|
1838
|
-
};
|
|
1839
|
-
/**
|
|
1840
|
-
* A GitHub repository the project's chats work in, by the project's name for it; the project's backend gives its tokens (the framework's ai.repo), asked at each clone and each push.
|
|
1841
|
-
*/
|
|
1842
|
-
export type Repo = {
|
|
1843
|
-
/**
|
|
1844
|
-
* The project's machine that gives its tokens.
|
|
1845
|
-
*/
|
|
1846
|
-
backend: string;
|
|
1847
|
-
/**
|
|
1848
|
-
* When it was put first.
|
|
1849
|
-
*/
|
|
1850
|
-
created_at: string;
|
|
1851
|
-
/**
|
|
1852
|
-
* The branch a workspace takes when it names none.
|
|
1853
|
-
*/
|
|
1854
|
-
default_branch: string;
|
|
1855
|
-
/**
|
|
1856
|
-
* The project's name for it.
|
|
1857
|
-
*/
|
|
1858
|
-
name: string;
|
|
1859
|
-
/**
|
|
1860
|
-
* The GitHub repository, owner/name.
|
|
1861
|
-
*/
|
|
1862
|
-
repository: string;
|
|
1863
|
-
};
|
|
1864
|
-
/**
|
|
1865
|
-
* The project's repositories, by name, a page at a time.
|
|
1866
|
-
*/
|
|
1867
|
-
export type RepoPage = {
|
|
1868
|
-
/**
|
|
1869
|
-
* The next page's cursor; absent on the last page.
|
|
1870
|
-
*/
|
|
1871
|
-
next_cursor?: string;
|
|
1872
|
-
repos: Repo[];
|
|
1873
|
-
};
|
|
1874
|
-
/**
|
|
1875
|
-
* A repository the project's chats work in.
|
|
1876
|
-
*/
|
|
1877
|
-
export type RepoRequest = {
|
|
1878
|
-
/**
|
|
1879
|
-
* The project's machine whose framework gives the repository's tokens (backend unless said).
|
|
1880
|
-
*/
|
|
1881
|
-
backend?: string;
|
|
1882
|
-
/**
|
|
1883
|
-
* The branch a workspace takes when it names none (main unless said).
|
|
1884
|
-
*/
|
|
1885
|
-
default_branch?: string;
|
|
1886
|
-
/**
|
|
1887
|
-
* The GitHub repository, owner/name.
|
|
1888
|
-
*/
|
|
1889
|
-
repository: string;
|
|
1890
|
-
};
|
|
1891
2159
|
/**
|
|
1892
2160
|
* A response.
|
|
1893
2161
|
*/
|
|
@@ -2139,6 +2407,139 @@ export type RunStopped = {
|
|
|
2139
2407
|
*/
|
|
2140
2408
|
run_id: string;
|
|
2141
2409
|
};
|
|
2410
|
+
/**
|
|
2411
|
+
* A host an agent's own secret may go to beside its definition's: an owner's Allow.
|
|
2412
|
+
*/
|
|
2413
|
+
export type SecretHostAllowance = {
|
|
2414
|
+
/**
|
|
2415
|
+
* The agent whose own secret it is.
|
|
2416
|
+
*/
|
|
2417
|
+
agent: string;
|
|
2418
|
+
/**
|
|
2419
|
+
* The allowance (sha_…).
|
|
2420
|
+
*/
|
|
2421
|
+
allowance_id: string;
|
|
2422
|
+
/**
|
|
2423
|
+
* When it was allowed.
|
|
2424
|
+
*/
|
|
2425
|
+
allowed_at: string;
|
|
2426
|
+
/**
|
|
2427
|
+
* The person who allowed it (their user id).
|
|
2428
|
+
*/
|
|
2429
|
+
allowed_by: string;
|
|
2430
|
+
/**
|
|
2431
|
+
* The registrable domain the host is under — its public suffix and one label more (evil.io for api.stripe.com.evil.io); under palbase.studio or palbase.app, the name itself. What an Allow hands over: whoever holds the domain runs every name under it.
|
|
2432
|
+
*/
|
|
2433
|
+
domain: string;
|
|
2434
|
+
/**
|
|
2435
|
+
* The host.
|
|
2436
|
+
*/
|
|
2437
|
+
host: string;
|
|
2438
|
+
/**
|
|
2439
|
+
* The secret's name.
|
|
2440
|
+
*/
|
|
2441
|
+
key: string;
|
|
2442
|
+
/**
|
|
2443
|
+
* Whose definition the agent's is: kept (an agent the project keeps), chat (a chat's own definition), backend (its backend's, at each turn). An ask and an Allow are the agent's of that origin alone: a chat's own definition under a kept agent's name is another's.
|
|
2444
|
+
*/
|
|
2445
|
+
origin: "kept" | "chat" | "backend";
|
|
2446
|
+
};
|
|
2447
|
+
/**
|
|
2448
|
+
* The project's allowances, newest first.
|
|
2449
|
+
*/
|
|
2450
|
+
export type SecretHostAllowanceList = {
|
|
2451
|
+
/**
|
|
2452
|
+
* The allowances.
|
|
2453
|
+
*/
|
|
2454
|
+
allowances: SecretHostAllowance[];
|
|
2455
|
+
};
|
|
2456
|
+
/**
|
|
2457
|
+
* A sealed secret an agent sent to a host it is not allowed for: the placeholder went as it is, and its owner is asked.
|
|
2458
|
+
*/
|
|
2459
|
+
export type SecretHostRequest = {
|
|
2460
|
+
/**
|
|
2461
|
+
* The agent whose own secret it is (its definition's env); null: one of the project's variables.
|
|
2462
|
+
*/
|
|
2463
|
+
agent: string | null;
|
|
2464
|
+
/**
|
|
2465
|
+
* How many times it was sent there.
|
|
2466
|
+
*/
|
|
2467
|
+
asks: number;
|
|
2468
|
+
/**
|
|
2469
|
+
* When it was allowed or dismissed; null: not yet.
|
|
2470
|
+
*/
|
|
2471
|
+
decided_at: string | null;
|
|
2472
|
+
/**
|
|
2473
|
+
* The registrable domain the host is under — its public suffix and one label more (evil.io for api.stripe.com.evil.io); under palbase.studio or palbase.app, the name itself. What an Allow hands over: whoever holds the domain runs every name under it.
|
|
2474
|
+
*/
|
|
2475
|
+
domain: string;
|
|
2476
|
+
/**
|
|
2477
|
+
* When it was first sent there.
|
|
2478
|
+
*/
|
|
2479
|
+
first_asked_at: string;
|
|
2480
|
+
/**
|
|
2481
|
+
* The host it was sent to. Nobody has checked who runs it.
|
|
2482
|
+
*/
|
|
2483
|
+
host: string;
|
|
2484
|
+
/**
|
|
2485
|
+
* The secret's name.
|
|
2486
|
+
*/
|
|
2487
|
+
key: string;
|
|
2488
|
+
/**
|
|
2489
|
+
* When it was last sent there.
|
|
2490
|
+
*/
|
|
2491
|
+
last_asked_at: string;
|
|
2492
|
+
/**
|
|
2493
|
+
* Whose definition the agent's is: kept (an agent the project keeps), chat (a chat's own definition), backend (its backend's, at each turn). An ask and an Allow are the agent's of that origin alone: a chat's own definition under a kept agent's name is another's. Null: one of the project's variables.
|
|
2494
|
+
*/
|
|
2495
|
+
origin: string | null;
|
|
2496
|
+
/**
|
|
2497
|
+
* The ask (shr_…).
|
|
2498
|
+
*/
|
|
2499
|
+
request_id: string;
|
|
2500
|
+
/**
|
|
2501
|
+
* asked, allowed or dismissed.
|
|
2502
|
+
*/
|
|
2503
|
+
status: string;
|
|
2504
|
+
};
|
|
2505
|
+
/**
|
|
2506
|
+
* The asks of one status, newest first (500 at most: all a project keeps of it).
|
|
2507
|
+
*/
|
|
2508
|
+
export type SecretHostRequestList = {
|
|
2509
|
+
/**
|
|
2510
|
+
* The asks.
|
|
2511
|
+
*/
|
|
2512
|
+
requests: SecretHostRequest[];
|
|
2513
|
+
};
|
|
2514
|
+
/**
|
|
2515
|
+
* ai.secret_host_requested: an agent sent a sealed secret to a host it is not allowed for.
|
|
2516
|
+
*/
|
|
2517
|
+
export type SecretHostRequested = {
|
|
2518
|
+
/**
|
|
2519
|
+
* The agent whose own secret it is; null: one of the project's variables.
|
|
2520
|
+
*/
|
|
2521
|
+
agent: string | null;
|
|
2522
|
+
/**
|
|
2523
|
+
* When it was sent there.
|
|
2524
|
+
*/
|
|
2525
|
+
asked_at: string;
|
|
2526
|
+
/**
|
|
2527
|
+
* The host it was sent to. Nobody has checked who runs it.
|
|
2528
|
+
*/
|
|
2529
|
+
host: string;
|
|
2530
|
+
/**
|
|
2531
|
+
* The secret's name.
|
|
2532
|
+
*/
|
|
2533
|
+
key: string;
|
|
2534
|
+
/**
|
|
2535
|
+
* The project whose secret it is: Palbase's own copy names the customer's.
|
|
2536
|
+
*/
|
|
2537
|
+
project_id: string;
|
|
2538
|
+
/**
|
|
2539
|
+
* The ask: allow or dismiss it (GET /ai/env/host-requests).
|
|
2540
|
+
*/
|
|
2541
|
+
request_id: string;
|
|
2542
|
+
};
|
|
2142
2543
|
/**
|
|
2143
2544
|
* What the project allows its chats.
|
|
2144
2545
|
*/
|
|
@@ -2167,6 +2568,14 @@ export type Settings = {
|
|
|
2167
2568
|
* Whether the work an app's user starts (a member's message, goal or voice) has the project's open secrets. Off (the default), only the work the project's developers and its server start does.
|
|
2168
2569
|
*/
|
|
2169
2570
|
open_secrets_for_app_users: boolean;
|
|
2571
|
+
/**
|
|
2572
|
+
* Allow signed-in app users to trigger POST /ai/chats/{chat_id}/handoff directly (default false).
|
|
2573
|
+
*/
|
|
2574
|
+
allow_client_handoff?: boolean;
|
|
2575
|
+
/**
|
|
2576
|
+
* Automatically attach a live Realtime pipe (chat:<chat_id>) when creating a new chat (default true).
|
|
2577
|
+
*/
|
|
2578
|
+
auto_pipe_chats?: boolean;
|
|
2170
2579
|
};
|
|
2171
2580
|
/**
|
|
2172
2581
|
* A change of what the project allows its chats; a field left out is left as it is.
|
|
@@ -2192,6 +2601,22 @@ export type SettingsRequest = {
|
|
|
2192
2601
|
* Let the work an app's user starts have the project's open secrets: anyone who signs in to the app can then drive an agent to read them. A person's alone: an owner or an admin of the organization signed in, never a key or a token, the secret key included (403 person_required; an environment's token, token_out_of_scope).
|
|
2193
2602
|
*/
|
|
2194
2603
|
open_secrets_for_app_users?: boolean;
|
|
2604
|
+
/**
|
|
2605
|
+
* Allow signed-in app users to trigger session handoffs (default false).
|
|
2606
|
+
*/
|
|
2607
|
+
allow_client_handoff?: boolean;
|
|
2608
|
+
/**
|
|
2609
|
+
* Default automatic Realtime piping on new chats (default true).
|
|
2610
|
+
*/
|
|
2611
|
+
auto_pipe_chats?: boolean;
|
|
2612
|
+
};
|
|
2613
|
+
export type SpeechRequest = {
|
|
2614
|
+
model?: string;
|
|
2615
|
+
input: string;
|
|
2616
|
+
voice?: string;
|
|
2617
|
+
response_format?: "mp3" | "opus" | "wav" | "pcm" | "aac" | "flac";
|
|
2618
|
+
format?: "mp3" | "opus" | "wav" | "pcm" | "aac" | "flac";
|
|
2619
|
+
speed?: number;
|
|
2195
2620
|
};
|
|
2196
2621
|
/**
|
|
2197
2622
|
* What the project's use of Palbase's models (the platform's provider keys) has cost this month, and what it may still spend. A month brings every project a dollar of it free. Past it a Free project uses its own provider keys; a Pay as you go one is charged for it, at the provider's price and 10%.
|
|
@@ -2285,404 +2710,208 @@ export type Subagent = {
|
|
|
2285
2710
|
tools?: ToolRef[];
|
|
2286
2711
|
};
|
|
2287
2712
|
/**
|
|
2288
|
-
*
|
|
2289
|
-
*/
|
|
2290
|
-
export type SyncChange = {
|
|
2291
|
-
now?: SyncEntry;
|
|
2292
|
-
/**
|
|
2293
|
-
* The path.
|
|
2294
|
-
*/
|
|
2295
|
-
path: string;
|
|
2296
|
-
previous?: SyncEntry;
|
|
2297
|
-
};
|
|
2298
|
-
/**
|
|
2299
|
-
* A writer's changes.
|
|
2713
|
+
* The support line's answer: what to do, and whether it was logged as something Palbase lacks — then with the case it was logged under.
|
|
2300
2714
|
*/
|
|
2301
|
-
export type
|
|
2715
|
+
export type SupportAnswer = {
|
|
2302
2716
|
/**
|
|
2303
|
-
*
|
|
2717
|
+
* The answer, in the question's language, naming the documentation it is taken from.
|
|
2304
2718
|
*/
|
|
2305
|
-
|
|
2719
|
+
answer: string;
|
|
2306
2720
|
/**
|
|
2307
|
-
* The
|
|
2721
|
+
* The case's id (sup_…), given only when the question was logged: what the asker holds of it, and what the mail sent when it is closed names. An answer that logged nothing has no case.
|
|
2308
2722
|
*/
|
|
2309
|
-
|
|
2723
|
+
case?: string;
|
|
2310
2724
|
/**
|
|
2311
|
-
*
|
|
2725
|
+
* Whether the question was logged as something Palbase lacks: the asker is mailed when it is closed.
|
|
2312
2726
|
*/
|
|
2313
|
-
|
|
2727
|
+
logged: boolean;
|
|
2314
2728
|
};
|
|
2315
2729
|
/**
|
|
2316
|
-
*
|
|
2730
|
+
* A question to Palbase's support line.
|
|
2317
2731
|
*/
|
|
2318
|
-
export type
|
|
2732
|
+
export type SupportQuestion = {
|
|
2319
2733
|
/**
|
|
2320
|
-
*
|
|
2734
|
+
* What the asker's project shows (at most 32768 characters): its machines, their last builds, a failed build's log. Credential-shaped values are masked before the model or anyone else reads it.
|
|
2321
2735
|
*/
|
|
2322
|
-
|
|
2736
|
+
context?: string;
|
|
2323
2737
|
/**
|
|
2324
|
-
*
|
|
2738
|
+
* The question, in any language. Credential-shaped values are masked before the model or anyone else reads it.
|
|
2325
2739
|
*/
|
|
2326
|
-
|
|
2740
|
+
question: string;
|
|
2741
|
+
};
|
|
2742
|
+
export type TargetSummary = {
|
|
2743
|
+
compute: "mac" | "cloud" | "linux" | "serverless";
|
|
2744
|
+
machine_id?: string;
|
|
2745
|
+
machine_name?: string;
|
|
2746
|
+
machine_online?: boolean;
|
|
2747
|
+
executor: "palbase" | "acp";
|
|
2748
|
+
harness?: string;
|
|
2749
|
+
};
|
|
2750
|
+
/**
|
|
2751
|
+
* A tool an agent of the project's may be given, as a ToolRef names it.
|
|
2752
|
+
*/
|
|
2753
|
+
export type Tool = {
|
|
2327
2754
|
/**
|
|
2328
|
-
*
|
|
2755
|
+
* Every call waits for a person's yes.
|
|
2329
2756
|
*/
|
|
2330
|
-
|
|
2757
|
+
approval: boolean;
|
|
2331
2758
|
/**
|
|
2332
|
-
*
|
|
2759
|
+
* What it does.
|
|
2333
2760
|
*/
|
|
2334
|
-
|
|
2761
|
+
description: string;
|
|
2335
2762
|
/**
|
|
2336
|
-
*
|
|
2763
|
+
* backend, client: the machine whose build declares it.
|
|
2337
2764
|
*/
|
|
2338
|
-
|
|
2765
|
+
machine?: string;
|
|
2339
2766
|
/**
|
|
2340
|
-
*
|
|
2767
|
+
* Its name.
|
|
2341
2768
|
*/
|
|
2342
|
-
|
|
2769
|
+
name: string;
|
|
2343
2770
|
/**
|
|
2344
|
-
*
|
|
2771
|
+
* What it takes, as a JSON Schema (an MCP server says its own when it is called).
|
|
2345
2772
|
*/
|
|
2346
|
-
|
|
2773
|
+
parameters?: {
|
|
2774
|
+
[key: string]: unknown;
|
|
2775
|
+
};
|
|
2347
2776
|
/**
|
|
2348
|
-
*
|
|
2777
|
+
* backend: the backend's function; client: the app answers it; https, mcp: an endpoint of the project's; platform: the platform's.
|
|
2349
2778
|
*/
|
|
2350
|
-
|
|
2779
|
+
source: "backend" | "client" | "https" | "mcp" | "platform";
|
|
2351
2780
|
};
|
|
2352
2781
|
/**
|
|
2353
|
-
*
|
|
2782
|
+
* A part of what a tool returned.
|
|
2354
2783
|
*/
|
|
2355
|
-
export type
|
|
2356
|
-
/**
|
|
2357
|
-
* Each changed path, as it is at the head.
|
|
2358
|
-
*/
|
|
2359
|
-
changes?: SyncPathState[];
|
|
2360
|
-
/**
|
|
2361
|
-
* since is older than the kept history (or 0): changes is the whole tree.
|
|
2362
|
-
*/
|
|
2363
|
-
full?: boolean;
|
|
2364
|
-
/**
|
|
2365
|
-
* The head's tree.
|
|
2366
|
-
*/
|
|
2367
|
-
manifest_id: string;
|
|
2784
|
+
export type ToolContent = {
|
|
2368
2785
|
/**
|
|
2369
|
-
*
|
|
2786
|
+
* An image as base64 (5 MiB at most).
|
|
2370
2787
|
*/
|
|
2371
|
-
|
|
2788
|
+
data?: string;
|
|
2372
2789
|
/**
|
|
2373
|
-
*
|
|
2790
|
+
* An image's type: image/png, image/jpeg, image/webp or image/gif.
|
|
2374
2791
|
*/
|
|
2375
|
-
|
|
2792
|
+
media_type?: string;
|
|
2376
2793
|
/**
|
|
2377
|
-
* The
|
|
2794
|
+
* The text.
|
|
2378
2795
|
*/
|
|
2379
|
-
|
|
2796
|
+
text?: string;
|
|
2380
2797
|
/**
|
|
2381
|
-
*
|
|
2798
|
+
* text or image.
|
|
2382
2799
|
*/
|
|
2383
|
-
|
|
2800
|
+
type: "text" | "image";
|
|
2384
2801
|
};
|
|
2385
2802
|
/**
|
|
2386
|
-
*
|
|
2803
|
+
* The tools the project's agents may be given.
|
|
2387
2804
|
*/
|
|
2388
|
-
export type
|
|
2389
|
-
/**
|
|
2390
|
-
* The conflict: read it by it (GET /ai/workspace-sync/conflicts/{conflict_id}).
|
|
2391
|
-
*/
|
|
2392
|
-
id: string;
|
|
2393
|
-
lost?: SyncEntry;
|
|
2805
|
+
export type ToolList = {
|
|
2394
2806
|
/**
|
|
2395
|
-
* The
|
|
2807
|
+
* The backend's (its builds that serve), the project's endpoints, then the platform's.
|
|
2396
2808
|
*/
|
|
2397
|
-
|
|
2398
|
-
winner?: SyncEntry;
|
|
2809
|
+
tools: Tool[];
|
|
2399
2810
|
};
|
|
2400
2811
|
/**
|
|
2401
|
-
*
|
|
2812
|
+
* What an app's tool returned (1 MiB of text and 4 images at most).
|
|
2402
2813
|
*/
|
|
2403
|
-
export type
|
|
2404
|
-
/**
|
|
2405
|
-
* When it lost.
|
|
2406
|
-
*/
|
|
2407
|
-
created_at?: string;
|
|
2814
|
+
export type ToolOutput = {
|
|
2408
2815
|
/**
|
|
2409
|
-
* The
|
|
2816
|
+
* The member the project's server acts as: held to that member's rules — their turn (403 not_your_turn) (the server's alone: a user sending it is answered 400; one who is not a member of the chat, 403 not_a_member). Left out, the server acts as itself.
|
|
2410
2817
|
*/
|
|
2411
|
-
|
|
2412
|
-
lost?: SyncEntry;
|
|
2818
|
+
as?: string;
|
|
2413
2819
|
/**
|
|
2414
|
-
* The
|
|
2820
|
+
* The tool failed; the output says why.
|
|
2415
2821
|
*/
|
|
2416
|
-
|
|
2822
|
+
is_error?: boolean;
|
|
2417
2823
|
/**
|
|
2418
|
-
*
|
|
2824
|
+
* Text and images: the agent is shown both.
|
|
2419
2825
|
*/
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2826
|
+
output: ToolContent[];
|
|
2827
|
+
workspace_tree?: WorkspaceTree;
|
|
2828
|
+
};
|
|
2829
|
+
/**
|
|
2830
|
+
* An app's answer the turn was given.
|
|
2831
|
+
*/
|
|
2832
|
+
export type ToolOutputAccepted = {
|
|
2423
2833
|
/**
|
|
2424
|
-
*
|
|
2834
|
+
* The tool call.
|
|
2425
2835
|
*/
|
|
2426
|
-
|
|
2836
|
+
call_id: string;
|
|
2427
2837
|
};
|
|
2428
2838
|
/**
|
|
2429
|
-
*
|
|
2839
|
+
* A tool an agent is given, by where it runs: backend (a function of the project's backend, the framework's ai.tool, on its machine), https (an endpoint the project put), mcp (an MCP server the project put: its tools, or the ones named in only), client (code of the app the chat is open in: the turn waits for its answer), or platform (one of the platform's own, by name: web.search, web.fetch, workspace.fetch_archive — the agent's alone; its subagents work with the agent's).
|
|
2430
2840
|
*/
|
|
2431
|
-
export type
|
|
2841
|
+
export type ToolRef = {
|
|
2432
2842
|
/**
|
|
2433
|
-
* A
|
|
2843
|
+
* A call waits for a person's yes (a member of the chat, or the server); one denied is told to the agent with the reason.
|
|
2434
2844
|
*/
|
|
2435
|
-
|
|
2845
|
+
approval?: boolean;
|
|
2436
2846
|
/**
|
|
2437
|
-
*
|
|
2847
|
+
* What it does: the agent reads it to choose (backend and client tools; an endpoint says its own).
|
|
2438
2848
|
*/
|
|
2439
|
-
|
|
2849
|
+
description?: string;
|
|
2440
2850
|
/**
|
|
2441
|
-
*
|
|
2851
|
+
* The machine a backend tool runs on (default backend).
|
|
2442
2852
|
*/
|
|
2443
|
-
|
|
2853
|
+
machine?: string;
|
|
2444
2854
|
/**
|
|
2445
|
-
*
|
|
2855
|
+
* The tool (backend, client), the endpoint's name (https, mcp), or the platform's tool: web.search (the web searched), web.fetch (a page of it read), workspace.fetch_archive (an archive at a URL unpacked into the chat's workspace).
|
|
2446
2856
|
*/
|
|
2447
|
-
|
|
2448
|
-
};
|
|
2449
|
-
/**
|
|
2450
|
-
* One presigned request.
|
|
2451
|
-
*/
|
|
2452
|
-
export type SyncGrant = {
|
|
2857
|
+
name: string;
|
|
2453
2858
|
/**
|
|
2454
|
-
* The
|
|
2859
|
+
* The MCP server's tools to offer (none: all).
|
|
2455
2860
|
*/
|
|
2456
|
-
|
|
2457
|
-
[key: string]: string;
|
|
2458
|
-
};
|
|
2861
|
+
only?: string[];
|
|
2459
2862
|
/**
|
|
2460
|
-
*
|
|
2863
|
+
* A JSON Schema of type object: what the tool takes.
|
|
2461
2864
|
*/
|
|
2462
|
-
|
|
2865
|
+
parameters?: {
|
|
2866
|
+
[key: string]: unknown;
|
|
2867
|
+
};
|
|
2463
2868
|
/**
|
|
2464
|
-
*
|
|
2869
|
+
* backend, https, mcp, client or platform.
|
|
2465
2870
|
*/
|
|
2466
|
-
|
|
2871
|
+
source: "backend" | "https" | "mcp" | "client" | "platform";
|
|
2467
2872
|
};
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
*/
|
|
2475
|
-
get?: string[];
|
|
2476
|
-
/**
|
|
2477
|
-
* Blobs the writer will upload.
|
|
2478
|
-
*/
|
|
2479
|
-
put?: string[];
|
|
2480
|
-
};
|
|
2481
|
-
/**
|
|
2482
|
-
* Each digest asked for, and its grant (a put the store holds already is absent).
|
|
2483
|
-
*/
|
|
2484
|
-
export type SyncGrants = {
|
|
2485
|
-
/**
|
|
2486
|
-
* Reads, by digest.
|
|
2487
|
-
*/
|
|
2488
|
-
get?: {
|
|
2489
|
-
[key: string]: SyncGrant;
|
|
2490
|
-
};
|
|
2491
|
-
/**
|
|
2492
|
-
* Uploads, by digest.
|
|
2493
|
-
*/
|
|
2494
|
-
put?: {
|
|
2495
|
-
[key: string]: SyncGrant;
|
|
2496
|
-
};
|
|
2497
|
-
};
|
|
2498
|
-
/**
|
|
2499
|
-
* A path as it is at a head (state null: absent).
|
|
2500
|
-
*/
|
|
2501
|
-
export type SyncPathState = {
|
|
2502
|
-
/**
|
|
2503
|
-
* The path, relative to the workspace's root.
|
|
2504
|
-
*/
|
|
2505
|
-
path: string;
|
|
2506
|
-
state: SyncEntry;
|
|
2507
|
-
};
|
|
2508
|
-
/**
|
|
2509
|
-
* The store's refusal (RFC 9457).
|
|
2510
|
-
*/
|
|
2511
|
-
export type SyncProblem = {
|
|
2512
|
-
/**
|
|
2513
|
-
* Its stable code.
|
|
2514
|
-
*/
|
|
2515
|
-
code?: string;
|
|
2516
|
-
/**
|
|
2517
|
-
* Its sentence.
|
|
2518
|
-
*/
|
|
2519
|
-
detail?: string;
|
|
2520
|
-
/**
|
|
2521
|
-
* Its status.
|
|
2522
|
-
*/
|
|
2523
|
-
status?: number;
|
|
2524
|
-
/**
|
|
2525
|
-
* Its title.
|
|
2526
|
-
*/
|
|
2527
|
-
title?: string;
|
|
2528
|
-
/**
|
|
2529
|
-
* Its type.
|
|
2530
|
-
*/
|
|
2531
|
-
type?: string;
|
|
2532
|
-
[key: string]: unknown;
|
|
2533
|
-
};
|
|
2534
|
-
/**
|
|
2535
|
-
* The support line's answer: what to do, and whether it was logged as something Palbase lacks — then with the case it was logged under.
|
|
2536
|
-
*/
|
|
2537
|
-
export type SupportAnswer = {
|
|
2538
|
-
/**
|
|
2539
|
-
* The answer, in the question's language, naming the documentation it is taken from.
|
|
2540
|
-
*/
|
|
2541
|
-
answer: string;
|
|
2542
|
-
/**
|
|
2543
|
-
* The case's id (sup_…), given only when the question was logged: what the asker holds of it, and what the mail sent when it is closed names. An answer that logged nothing has no case.
|
|
2544
|
-
*/
|
|
2545
|
-
case?: string;
|
|
2546
|
-
/**
|
|
2547
|
-
* Whether the question was logged as something Palbase lacks: the asker is mailed when it is closed.
|
|
2548
|
-
*/
|
|
2549
|
-
logged: boolean;
|
|
2550
|
-
};
|
|
2551
|
-
/**
|
|
2552
|
-
* A question to Palbase's support line.
|
|
2553
|
-
*/
|
|
2554
|
-
export type SupportQuestion = {
|
|
2555
|
-
/**
|
|
2556
|
-
* What the asker's project shows (at most 32768 characters): its machines, their last builds, a failed build's log. Credential-shaped values are masked before the model or anyone else reads it.
|
|
2557
|
-
*/
|
|
2558
|
-
context?: string;
|
|
2559
|
-
/**
|
|
2560
|
-
* The question, in any language. Credential-shaped values are masked before the model or anyone else reads it.
|
|
2561
|
-
*/
|
|
2562
|
-
question: string;
|
|
2563
|
-
};
|
|
2564
|
-
/**
|
|
2565
|
-
* A tool an agent of the project's may be given, as a ToolRef names it.
|
|
2566
|
-
*/
|
|
2567
|
-
export type Tool = {
|
|
2568
|
-
/**
|
|
2569
|
-
* Every call waits for a person's yes.
|
|
2570
|
-
*/
|
|
2571
|
-
approval: boolean;
|
|
2572
|
-
/**
|
|
2573
|
-
* What it does.
|
|
2574
|
-
*/
|
|
2575
|
-
description: string;
|
|
2576
|
-
/**
|
|
2577
|
-
* backend, client: the machine whose build declares it.
|
|
2578
|
-
*/
|
|
2579
|
-
machine?: string;
|
|
2580
|
-
/**
|
|
2581
|
-
* Its name.
|
|
2582
|
-
*/
|
|
2583
|
-
name: string;
|
|
2584
|
-
/**
|
|
2585
|
-
* What it takes, as a JSON Schema (an MCP server says its own when it is called).
|
|
2586
|
-
*/
|
|
2587
|
-
parameters?: {
|
|
2588
|
-
[key: string]: unknown;
|
|
2589
|
-
};
|
|
2590
|
-
/**
|
|
2591
|
-
* backend: the backend's function; client: the app answers it; https, mcp: an endpoint of the project's; platform: the platform's.
|
|
2592
|
-
*/
|
|
2593
|
-
source: "backend" | "client" | "https" | "mcp" | "platform";
|
|
2594
|
-
};
|
|
2595
|
-
/**
|
|
2596
|
-
* A part of what a tool returned.
|
|
2597
|
-
*/
|
|
2598
|
-
export type ToolContent = {
|
|
2599
|
-
/**
|
|
2600
|
-
* An image as base64 (5 MiB at most).
|
|
2601
|
-
*/
|
|
2602
|
-
data?: string;
|
|
2603
|
-
/**
|
|
2604
|
-
* An image's type: image/png, image/jpeg, image/webp or image/gif.
|
|
2605
|
-
*/
|
|
2873
|
+
export type TranscriptionRequest = {
|
|
2874
|
+
model?: string;
|
|
2875
|
+
storage_bucket?: string;
|
|
2876
|
+
storage_path?: string;
|
|
2877
|
+
language?: string;
|
|
2878
|
+
diarization?: boolean;
|
|
2606
2879
|
media_type?: string;
|
|
2607
|
-
/**
|
|
2608
|
-
* The text.
|
|
2609
|
-
*/
|
|
2610
|
-
text?: string;
|
|
2611
|
-
/**
|
|
2612
|
-
* text or image.
|
|
2613
|
-
*/
|
|
2614
|
-
type: "text" | "image";
|
|
2615
|
-
};
|
|
2616
|
-
/**
|
|
2617
|
-
* The tools the project's agents may be given.
|
|
2618
|
-
*/
|
|
2619
|
-
export type ToolList = {
|
|
2620
|
-
/**
|
|
2621
|
-
* The backend's (its builds that serve), the project's endpoints, then the platform's.
|
|
2622
|
-
*/
|
|
2623
|
-
tools: Tool[];
|
|
2624
2880
|
};
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
as?: string;
|
|
2633
|
-
/**
|
|
2634
|
-
* The tool failed; the output says why.
|
|
2635
|
-
*/
|
|
2636
|
-
is_error?: boolean;
|
|
2637
|
-
/**
|
|
2638
|
-
* Text and images: the agent is shown both.
|
|
2639
|
-
*/
|
|
2640
|
-
output: ToolContent[];
|
|
2641
|
-
workspace_tree?: WorkspaceTree;
|
|
2881
|
+
export type TranscriptionResponse = {
|
|
2882
|
+
model: string;
|
|
2883
|
+
text: string;
|
|
2884
|
+
language?: string;
|
|
2885
|
+
duration_seconds: number;
|
|
2886
|
+
segments?: TranscriptionSegment[];
|
|
2887
|
+
cost_nano_usd: number;
|
|
2642
2888
|
};
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
* The tool call.
|
|
2649
|
-
*/
|
|
2650
|
-
call_id: string;
|
|
2889
|
+
export type TranscriptionSegment = {
|
|
2890
|
+
speaker?: string;
|
|
2891
|
+
start: number;
|
|
2892
|
+
end: number;
|
|
2893
|
+
text: string;
|
|
2651
2894
|
};
|
|
2652
2895
|
/**
|
|
2653
|
-
*
|
|
2896
|
+
* What the agent's advisor spent reading the turn so far: inside the turn's totals and its run's, said apart. Absent when the agent has no advisor, or it has spent nothing yet.
|
|
2654
2897
|
*/
|
|
2655
|
-
export type
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
*/
|
|
2659
|
-
approval?: boolean;
|
|
2660
|
-
/**
|
|
2661
|
-
* What it does: the agent reads it to choose (backend and client tools; an endpoint says its own).
|
|
2662
|
-
*/
|
|
2663
|
-
description?: string;
|
|
2664
|
-
/**
|
|
2665
|
-
* The machine a backend tool runs on (default backend).
|
|
2666
|
-
*/
|
|
2667
|
-
machine?: string;
|
|
2668
|
-
/**
|
|
2669
|
-
* The tool (backend, client), the endpoint's name (https, mcp), or the platform's tool: web.search (the web searched), web.fetch (a page of it read), workspace.fetch_archive (an archive at a URL unpacked into the chat's workspace).
|
|
2670
|
-
*/
|
|
2671
|
-
name: string;
|
|
2898
|
+
export type TurnAdvisorCost = {
|
|
2899
|
+
cache_read_tokens: number;
|
|
2900
|
+
cache_write_tokens: number;
|
|
2672
2901
|
/**
|
|
2673
|
-
*
|
|
2902
|
+
* What its calls cost, in billionths of a US dollar.
|
|
2674
2903
|
*/
|
|
2675
|
-
|
|
2904
|
+
cost_nano_usd: number;
|
|
2905
|
+
input_tokens: number;
|
|
2906
|
+
output_tokens: number;
|
|
2676
2907
|
/**
|
|
2677
|
-
*
|
|
2908
|
+
* Its model has no price: the cost is a lower bound.
|
|
2678
2909
|
*/
|
|
2679
|
-
|
|
2680
|
-
[key: string]: unknown;
|
|
2681
|
-
};
|
|
2910
|
+
unpriced: boolean;
|
|
2682
2911
|
/**
|
|
2683
|
-
*
|
|
2912
|
+
* cost_nano_usd in dollars.
|
|
2684
2913
|
*/
|
|
2685
|
-
|
|
2914
|
+
usd: number;
|
|
2686
2915
|
};
|
|
2687
2916
|
/**
|
|
2688
2917
|
* One artifact a turn's agent published.
|
|
@@ -2728,27 +2957,6 @@ export type TurnBudget = {
|
|
|
2728
2957
|
*/
|
|
2729
2958
|
max_cost_usd: number;
|
|
2730
2959
|
};
|
|
2731
|
-
/**
|
|
2732
|
-
* What the agent's advisor spent reading the turn so far: inside the turn's totals and its run's, said apart. Absent when the agent has no advisor, or it has spent nothing yet.
|
|
2733
|
-
*/
|
|
2734
|
-
export type TurnAdvisorCost = {
|
|
2735
|
-
cache_read_tokens: number;
|
|
2736
|
-
cache_write_tokens: number;
|
|
2737
|
-
/**
|
|
2738
|
-
* What its calls cost, in billionths of a US dollar.
|
|
2739
|
-
*/
|
|
2740
|
-
cost_nano_usd: number;
|
|
2741
|
-
input_tokens: number;
|
|
2742
|
-
output_tokens: number;
|
|
2743
|
-
/**
|
|
2744
|
-
* Its model has no price: the cost is a lower bound.
|
|
2745
|
-
*/
|
|
2746
|
-
unpriced: boolean;
|
|
2747
|
-
/**
|
|
2748
|
-
* cost_nano_usd in dollars.
|
|
2749
|
-
*/
|
|
2750
|
-
usd: number;
|
|
2751
|
-
};
|
|
2752
2960
|
/**
|
|
2753
2961
|
* What one turn of a chat cost so far: its model calls and its subagents', at the engine's frozen rates.
|
|
2754
2962
|
*/
|
|
@@ -2966,6 +3174,38 @@ export type Use = {
|
|
|
2966
3174
|
*/
|
|
2967
3175
|
response_id: string | null;
|
|
2968
3176
|
};
|
|
3177
|
+
export type VideoCancelResult = {
|
|
3178
|
+
id: string;
|
|
3179
|
+
status: "canceled";
|
|
3180
|
+
};
|
|
3181
|
+
export type VideoJob = {
|
|
3182
|
+
id: string;
|
|
3183
|
+
model: string;
|
|
3184
|
+
vendor: string;
|
|
3185
|
+
status: "queued" | "running" | "completed" | "failed" | "canceled";
|
|
3186
|
+
output_url?: string;
|
|
3187
|
+
output_storage_path?: string;
|
|
3188
|
+
result?: {
|
|
3189
|
+
[key: string]: unknown;
|
|
3190
|
+
};
|
|
3191
|
+
error?: ResponseError;
|
|
3192
|
+
cost_nano_usd: number;
|
|
3193
|
+
created_at: string;
|
|
3194
|
+
completed_at?: string | null;
|
|
3195
|
+
};
|
|
3196
|
+
export type VideoRequest = {
|
|
3197
|
+
model?: string;
|
|
3198
|
+
prompt: string;
|
|
3199
|
+
image_url?: string;
|
|
3200
|
+
duration_seconds?: number;
|
|
3201
|
+
resolution?: "720p" | "1080p";
|
|
3202
|
+
aspect_ratio?: string;
|
|
3203
|
+
save_to_storage?: VideoSaveTarget;
|
|
3204
|
+
};
|
|
3205
|
+
export type VideoSaveTarget = {
|
|
3206
|
+
bucket: string;
|
|
3207
|
+
path: string;
|
|
3208
|
+
};
|
|
2969
3209
|
/**
|
|
2970
3210
|
* Text for the voice.
|
|
2971
3211
|
*/
|
|
@@ -3153,488 +3393,28 @@ export type VoiceSession = {
|
|
|
3153
3393
|
user_id: string | null;
|
|
3154
3394
|
};
|
|
3155
3395
|
/**
|
|
3156
|
-
*
|
|
3396
|
+
* The tree the tool's writes left the chat's workspace at, as a write of it answered them (PUT /ai/chats/{chat_id}/workspace/files): its manifest, its place in the workspace's history, either or both. A call that answered later names it as one answered at once does (workspace_tree): the agent's next command waits for the session's machine to have it. Left out: the tool wrote nothing there.
|
|
3157
3397
|
*/
|
|
3158
|
-
export type
|
|
3159
|
-
/**
|
|
3160
|
-
* added, modified (its bytes or its mode) or removed.
|
|
3161
|
-
*/
|
|
3162
|
-
change: string;
|
|
3398
|
+
export type WorkspaceTree = {
|
|
3163
3399
|
/**
|
|
3164
|
-
* The
|
|
3400
|
+
* The tree's manifest (a write's manifest_id).
|
|
3165
3401
|
*/
|
|
3166
|
-
|
|
3402
|
+
manifest_id?: string;
|
|
3167
3403
|
/**
|
|
3168
|
-
* Its
|
|
3404
|
+
* Its place in the workspace's history (a write's seq).
|
|
3169
3405
|
*/
|
|
3170
|
-
|
|
3406
|
+
seq?: number;
|
|
3171
3407
|
};
|
|
3172
|
-
/**
|
|
3173
|
-
|
|
3174
|
-
*/
|
|
3175
|
-
export type WorkspaceConflict = {
|
|
3408
|
+
/** The events this module sends the project's webhooks (x-palbase-events), by type: each one's payload, the event's data. */
|
|
3409
|
+
export interface Events {
|
|
3176
3410
|
/**
|
|
3177
|
-
*
|
|
3411
|
+
* ai.goal.updated: a chat's goal was set, its status changed (paused, resumed, blocked, out of budget or turns, achieved), or it was cleared.
|
|
3178
3412
|
*/
|
|
3179
|
-
|
|
3180
|
-
lost: WorkspaceEntry;
|
|
3413
|
+
"ai.goal.updated": GoalEvent;
|
|
3181
3414
|
/**
|
|
3182
|
-
*
|
|
3415
|
+
* ai.response.completed: a response started with background: true completed — read its answer by its id — or a chat's turn completed.
|
|
3183
3416
|
*/
|
|
3184
|
-
|
|
3185
|
-
winner: WorkspaceEntry;
|
|
3186
|
-
};
|
|
3187
|
-
/**
|
|
3188
|
-
* A writer's change of the chat's workspace that lost: the path had changed in the store since the writer saw it — the first to reach the store wins.
|
|
3189
|
-
*/
|
|
3190
|
-
export type WorkspaceConflictEvent = {
|
|
3191
|
-
/**
|
|
3192
|
-
* The chat.
|
|
3193
|
-
*/
|
|
3194
|
-
chat_id: string;
|
|
3195
|
-
conflict: WorkspaceConflict;
|
|
3196
|
-
/**
|
|
3197
|
-
* The tree the store was at when it kept the change aside.
|
|
3198
|
-
*/
|
|
3199
|
-
manifest_id: string;
|
|
3200
|
-
/**
|
|
3201
|
-
* The chat's labels.
|
|
3202
|
-
*/
|
|
3203
|
-
metadata: {
|
|
3204
|
-
[key: string]: string;
|
|
3205
|
-
};
|
|
3206
|
-
/**
|
|
3207
|
-
* Its sequence.
|
|
3208
|
-
*/
|
|
3209
|
-
seq: number;
|
|
3210
|
-
/**
|
|
3211
|
-
* Who wrote the version that lost: the session's machine, a machine syncing the workspace (its token's label), the project's backend.
|
|
3212
|
-
*/
|
|
3213
|
-
writer: string;
|
|
3214
|
-
};
|
|
3215
|
-
/**
|
|
3216
|
-
* What a path is in a tree: a file or a directory (null: absent).
|
|
3217
|
-
*/
|
|
3218
|
-
export type WorkspaceEntry = {
|
|
3219
|
-
/**
|
|
3220
|
-
* A file's digest (sha256:<hex>).
|
|
3221
|
-
*/
|
|
3222
|
-
digest?: string;
|
|
3223
|
-
/**
|
|
3224
|
-
* file or dir.
|
|
3225
|
-
*/
|
|
3226
|
-
kind: string;
|
|
3227
|
-
/**
|
|
3228
|
-
* A file's mode.
|
|
3229
|
-
*/
|
|
3230
|
-
mode?: number;
|
|
3231
|
-
/**
|
|
3232
|
-
* A file's size in bytes.
|
|
3233
|
-
*/
|
|
3234
|
-
size?: number;
|
|
3235
|
-
};
|
|
3236
|
-
/**
|
|
3237
|
-
* A file's bytes.
|
|
3238
|
-
*/
|
|
3239
|
-
export type WorkspaceFileBytes = Blob;
|
|
3240
|
-
/**
|
|
3241
|
-
* What a write of a workspace's file left.
|
|
3242
|
-
*/
|
|
3243
|
-
export type WorkspaceFileWritten = {
|
|
3244
|
-
/**
|
|
3245
|
-
* The tree the workspace is at now: read a file of it by it (GET …/workspace/files?manifest=).
|
|
3246
|
-
*/
|
|
3247
|
-
manifest_id: string;
|
|
3248
|
-
/**
|
|
3249
|
-
* The file.
|
|
3250
|
-
*/
|
|
3251
|
-
path: string;
|
|
3252
|
-
/**
|
|
3253
|
-
* Its place in the workspace's history.
|
|
3254
|
-
*/
|
|
3255
|
-
seq: number;
|
|
3256
|
-
};
|
|
3257
|
-
/**
|
|
3258
|
-
* A tree the chat's workspace published: its machine publishes whenever the files are quiet for a moment — mid-turn, as a build writes its product — and once more as it lets the workspace go.
|
|
3259
|
-
*/
|
|
3260
|
-
export type WorkspacePublishedEvent = {
|
|
3261
|
-
/**
|
|
3262
|
-
* What changed against the tree it replaced, sorted by path: 1000 at most (changed_truncated).
|
|
3263
|
-
*/
|
|
3264
|
-
changed: WorkspaceChange[];
|
|
3265
|
-
/**
|
|
3266
|
-
* How many files changed.
|
|
3267
|
-
*/
|
|
3268
|
-
changed_count: number;
|
|
3269
|
-
/**
|
|
3270
|
-
* More changed than changed names.
|
|
3271
|
-
*/
|
|
3272
|
-
changed_truncated: boolean;
|
|
3273
|
-
/**
|
|
3274
|
-
* The chat.
|
|
3275
|
-
*/
|
|
3276
|
-
chat_id: string;
|
|
3277
|
-
/**
|
|
3278
|
-
* The tree: a file of it is read by it (GET /ai/chats/{chat_id}/workspace/files?manifest=), whatever the workspace published after it.
|
|
3279
|
-
*/
|
|
3280
|
-
manifest_id: string;
|
|
3281
|
-
/**
|
|
3282
|
-
* The chat's labels.
|
|
3283
|
-
*/
|
|
3284
|
-
metadata: {
|
|
3285
|
-
[key: string]: string;
|
|
3286
|
-
};
|
|
3287
|
-
/**
|
|
3288
|
-
* The tree it replaced; absent for none.
|
|
3289
|
-
*/
|
|
3290
|
-
previous_manifest_id?: string;
|
|
3291
|
-
};
|
|
3292
|
-
/**
|
|
3293
|
-
* A push the chat's agent made: to the chat's branch, the only one a turn's work is pushed to.
|
|
3294
|
-
*/
|
|
3295
|
-
export type WorkspacePushedEvent = {
|
|
3296
|
-
/**
|
|
3297
|
-
* The branch it was pushed to.
|
|
3298
|
-
*/
|
|
3299
|
-
branch: string;
|
|
3300
|
-
/**
|
|
3301
|
-
* The chat.
|
|
3302
|
-
*/
|
|
3303
|
-
chat_id: string;
|
|
3304
|
-
/**
|
|
3305
|
-
* What the push brought to the branch, the oldest first: 100 at most (commits_truncated); none when the branch was there already.
|
|
3306
|
-
*/
|
|
3307
|
-
commits: PushedCommit[];
|
|
3308
|
-
/**
|
|
3309
|
-
* It brought more than commits names.
|
|
3310
|
-
*/
|
|
3311
|
-
commits_truncated: boolean;
|
|
3312
|
-
/**
|
|
3313
|
-
* The commit the branch is at now.
|
|
3314
|
-
*/
|
|
3315
|
-
head_sha: string;
|
|
3316
|
-
/**
|
|
3317
|
-
* The chat's labels.
|
|
3318
|
-
*/
|
|
3319
|
-
metadata: {
|
|
3320
|
-
[key: string]: string;
|
|
3321
|
-
};
|
|
3322
|
-
/**
|
|
3323
|
-
* The project's name of the repository (PUT /ai/repos/{name}).
|
|
3324
|
-
*/
|
|
3325
|
-
repo: string;
|
|
3326
|
-
/**
|
|
3327
|
-
* The GitHub repository, owner/name.
|
|
3328
|
-
*/
|
|
3329
|
-
repository: string;
|
|
3330
|
-
/**
|
|
3331
|
-
* The turn — or a subagent's work in it — that pushed.
|
|
3332
|
-
*/
|
|
3333
|
-
response_id: string;
|
|
3334
|
-
/**
|
|
3335
|
-
* The member the turn was for; null: the server's.
|
|
3336
|
-
*/
|
|
3337
|
-
user_id: string | null;
|
|
3338
|
-
};
|
|
3339
|
-
/**
|
|
3340
|
-
* A repository put in an open chat's workspace.
|
|
3341
|
-
*/
|
|
3342
|
-
export type WorkspaceRepoRequest = {
|
|
3343
|
-
/**
|
|
3344
|
-
* The branch it is checked out at and pushed to (the repository's default unless said).
|
|
3345
|
-
*/
|
|
3346
|
-
branch?: string;
|
|
3347
|
-
/**
|
|
3348
|
-
* The project's name for the repository (PUT /ai/repos/{name}): one put at work's moment too.
|
|
3349
|
-
*/
|
|
3350
|
-
repo: string;
|
|
3351
|
-
};
|
|
3352
|
-
/**
|
|
3353
|
-
* A workspace token, not said.
|
|
3354
|
-
*/
|
|
3355
|
-
export type WorkspaceToken = {
|
|
3356
|
-
/**
|
|
3357
|
-
* read or write.
|
|
3358
|
-
*/
|
|
3359
|
-
access: string;
|
|
3360
|
-
/**
|
|
3361
|
-
* When it expires.
|
|
3362
|
-
*/
|
|
3363
|
-
expires_at: string;
|
|
3364
|
-
/**
|
|
3365
|
-
* Its id: revoke it by it.
|
|
3366
|
-
*/
|
|
3367
|
-
id: string;
|
|
3368
|
-
/**
|
|
3369
|
-
* What it is for.
|
|
3370
|
-
*/
|
|
3371
|
-
label?: string;
|
|
3372
|
-
/**
|
|
3373
|
-
* The workspace's id in the store.
|
|
3374
|
-
*/
|
|
3375
|
-
workspace_id: string;
|
|
3376
|
-
};
|
|
3377
|
-
/**
|
|
3378
|
-
* A chat's workspace's tokens.
|
|
3379
|
-
*/
|
|
3380
|
-
export type WorkspaceTokenList = {
|
|
3381
|
-
/**
|
|
3382
|
-
* The tokens, none said.
|
|
3383
|
-
*/
|
|
3384
|
-
tokens: WorkspaceToken[];
|
|
3385
|
-
};
|
|
3386
|
-
/**
|
|
3387
|
-
* A workspace token as it is minted: said once.
|
|
3388
|
-
*/
|
|
3389
|
-
export type WorkspaceTokenMinted = {
|
|
3390
|
-
/**
|
|
3391
|
-
* read or write.
|
|
3392
|
-
*/
|
|
3393
|
-
access: string;
|
|
3394
|
-
/**
|
|
3395
|
-
* When it expires.
|
|
3396
|
-
*/
|
|
3397
|
-
expires_at: string;
|
|
3398
|
-
/**
|
|
3399
|
-
* Its id: revoke it by it.
|
|
3400
|
-
*/
|
|
3401
|
-
id: string;
|
|
3402
|
-
/**
|
|
3403
|
-
* What it is for.
|
|
3404
|
-
*/
|
|
3405
|
-
label?: string;
|
|
3406
|
-
/**
|
|
3407
|
-
* Where the workspace's token routes are, at the project's own address: `palai workspace sync --url <sync_url> <dir>`.
|
|
3408
|
-
*/
|
|
3409
|
-
sync_url: string;
|
|
3410
|
-
/**
|
|
3411
|
-
* The token, said once: given `palai workspace sync` in its environment (PALAI_WORKSPACE_TOKEN) or on its standard input (--token-file -), never on its command line.
|
|
3412
|
-
*/
|
|
3413
|
-
token: string;
|
|
3414
|
-
/**
|
|
3415
|
-
* The workspace's id in the store.
|
|
3416
|
-
*/
|
|
3417
|
-
workspace_id: string;
|
|
3418
|
-
};
|
|
3419
|
-
/**
|
|
3420
|
-
* A workspace token to mint.
|
|
3421
|
-
*/
|
|
3422
|
-
export type WorkspaceTokenRequest = {
|
|
3423
|
-
/**
|
|
3424
|
-
* read: the workspace followed; write: followed and written, both ways.
|
|
3425
|
-
*/
|
|
3426
|
-
access: "read" | "write";
|
|
3427
|
-
/**
|
|
3428
|
-
* What it is for — the machine's name, say: a conflict names its writer by it. 128 bytes of UTF-8 at most (maxLength counts characters, so a label of fewer may still be too long), with no control character, no format character (a bidi override or isolate, a zero-width space or joiner, a byte order mark) and no line or paragraph separator — a label is shown as it was written.
|
|
3429
|
-
*/
|
|
3430
|
-
label?: string;
|
|
3431
|
-
/**
|
|
3432
|
-
* How long it lives: 1 to 604800 (none: an hour) — a member's 1 to 3600; no longer than an environment's token it is minted with.
|
|
3433
|
-
*/
|
|
3434
|
-
ttl_seconds?: number;
|
|
3435
|
-
};
|
|
3436
|
-
/**
|
|
3437
|
-
* The tree the tool's writes left the chat's workspace at, as a write of it answered them (PUT /ai/chats/{chat_id}/workspace/files): its manifest, its place in the workspace's history, either or both. A call that answered later names it as one answered at once does (workspace_tree): the agent's next command waits for the session's machine to have it. Left out: the tool wrote nothing there.
|
|
3438
|
-
*/
|
|
3439
|
-
export type WorkspaceTree = {
|
|
3440
|
-
/**
|
|
3441
|
-
* The tree's manifest (a write's manifest_id).
|
|
3442
|
-
*/
|
|
3443
|
-
manifest_id?: string;
|
|
3444
|
-
/**
|
|
3445
|
-
* Its place in the workspace's history (a write's seq).
|
|
3446
|
-
*/
|
|
3447
|
-
seq?: number;
|
|
3448
|
-
};
|
|
3449
|
-
/**
|
|
3450
|
-
* A host the secret may go to: the owner's Allow.
|
|
3451
|
-
*/
|
|
3452
|
-
export type EnvHostRequest = {
|
|
3453
|
-
/**
|
|
3454
|
-
* An exact DNS name or *. and one, as hosts takes them.
|
|
3455
|
-
*/
|
|
3456
|
-
host: string;
|
|
3457
|
-
};
|
|
3458
|
-
/**
|
|
3459
|
-
* A sealed secret an agent sent to a host it is not allowed for: the placeholder went as it is, and its owner is asked.
|
|
3460
|
-
*/
|
|
3461
|
-
export type SecretHostRequest = {
|
|
3462
|
-
/**
|
|
3463
|
-
* The agent whose own secret it is (its definition's env); null: one of the project's variables.
|
|
3464
|
-
*/
|
|
3465
|
-
agent: string | null;
|
|
3466
|
-
/**
|
|
3467
|
-
* How many times it was sent there.
|
|
3468
|
-
*/
|
|
3469
|
-
asks: number;
|
|
3470
|
-
/**
|
|
3471
|
-
* When it was allowed or dismissed; null: not yet.
|
|
3472
|
-
*/
|
|
3473
|
-
decided_at: string | null;
|
|
3474
|
-
/**
|
|
3475
|
-
* The registrable domain the host is under — its public suffix and one label more (evil.io for api.stripe.com.evil.io); under palbase.studio or palbase.app, the name itself. What an Allow hands over: whoever holds the domain runs every name under it.
|
|
3476
|
-
*/
|
|
3477
|
-
domain: string;
|
|
3478
|
-
/**
|
|
3479
|
-
* When it was first sent there.
|
|
3480
|
-
*/
|
|
3481
|
-
first_asked_at: string;
|
|
3482
|
-
/**
|
|
3483
|
-
* The host it was sent to. Nobody has checked who runs it.
|
|
3484
|
-
*/
|
|
3485
|
-
host: string;
|
|
3486
|
-
/**
|
|
3487
|
-
* The secret's name.
|
|
3488
|
-
*/
|
|
3489
|
-
key: string;
|
|
3490
|
-
/**
|
|
3491
|
-
* When it was last sent there.
|
|
3492
|
-
*/
|
|
3493
|
-
last_asked_at: string;
|
|
3494
|
-
/**
|
|
3495
|
-
* Whose definition the agent's is: kept (an agent the project keeps), chat (a chat's own definition), backend (its backend's, at each turn). An ask and an Allow are the agent's of that origin alone: a chat's own definition under a kept agent's name is another's. Null: one of the project's variables.
|
|
3496
|
-
*/
|
|
3497
|
-
origin: string | null;
|
|
3498
|
-
/**
|
|
3499
|
-
* The ask (shr_…).
|
|
3500
|
-
*/
|
|
3501
|
-
request_id: string;
|
|
3502
|
-
/**
|
|
3503
|
-
* asked, allowed or dismissed.
|
|
3504
|
-
*/
|
|
3505
|
-
status: string;
|
|
3506
|
-
};
|
|
3507
|
-
/**
|
|
3508
|
-
* The asks of one status, newest first (500 at most: all a project keeps of it).
|
|
3509
|
-
*/
|
|
3510
|
-
export type SecretHostRequestList = {
|
|
3511
|
-
/**
|
|
3512
|
-
* The asks.
|
|
3513
|
-
*/
|
|
3514
|
-
requests: SecretHostRequest[];
|
|
3515
|
-
};
|
|
3516
|
-
/**
|
|
3517
|
-
* ai.secret_host_requested: an agent sent a sealed secret to a host it is not allowed for.
|
|
3518
|
-
*/
|
|
3519
|
-
export type SecretHostRequested = {
|
|
3520
|
-
/**
|
|
3521
|
-
* The agent whose own secret it is; null: one of the project's variables.
|
|
3522
|
-
*/
|
|
3523
|
-
agent: string | null;
|
|
3524
|
-
/**
|
|
3525
|
-
* When it was sent there.
|
|
3526
|
-
*/
|
|
3527
|
-
asked_at: string;
|
|
3528
|
-
/**
|
|
3529
|
-
* The host it was sent to. Nobody has checked who runs it.
|
|
3530
|
-
*/
|
|
3531
|
-
host: string;
|
|
3532
|
-
/**
|
|
3533
|
-
* The secret's name.
|
|
3534
|
-
*/
|
|
3535
|
-
key: string;
|
|
3536
|
-
/**
|
|
3537
|
-
* The project whose secret it is: Palbase's own copy names the customer's.
|
|
3538
|
-
*/
|
|
3539
|
-
project_id: string;
|
|
3540
|
-
/**
|
|
3541
|
-
* The ask: allow or dismiss it (GET /ai/env/host-requests).
|
|
3542
|
-
*/
|
|
3543
|
-
request_id: string;
|
|
3544
|
-
};
|
|
3545
|
-
/**
|
|
3546
|
-
* A variable's value alone ("" read back, and written to keep the value it has).
|
|
3547
|
-
*/
|
|
3548
|
-
export type AgentEnvValue = string;
|
|
3549
|
-
/**
|
|
3550
|
-
* A variable's value and what the secret says of itself. A value kept from the definition written over ("") keeps what it said there unless a person changes it (403 person_required); a sealed value given is held to the value rules of PUT /ai/env/{key}, and a kept value made sealed (open or no secret before) is given with it (400 value_required). A write that gives any value is a change: the draft's revision moves.
|
|
3551
|
-
*/
|
|
3552
|
-
export type AgentEnvEntry = {
|
|
3553
|
-
/**
|
|
3554
|
-
* Said with open: true where the secret becomes open, and with secret: false where a secret becomes none (it was not so in the definition written over): you read that the agent reads it as it is.
|
|
3555
|
-
*/
|
|
3556
|
-
acknowledge_open?: boolean;
|
|
3557
|
-
/**
|
|
3558
|
-
* The hosts a request may carry it to, as PUT /ai/env/{key} takes them.
|
|
3559
|
-
*/
|
|
3560
|
-
hosts?: string[];
|
|
3561
|
-
/**
|
|
3562
|
-
* Where in such a request it may be put: header (the default), query, body.
|
|
3563
|
-
*/
|
|
3564
|
-
inject?: ("header" | "query" | "body")[];
|
|
3565
|
-
/**
|
|
3566
|
-
* The agent reads it as it is: no hosts, no inject.
|
|
3567
|
-
*/
|
|
3568
|
-
open?: boolean;
|
|
3569
|
-
/**
|
|
3570
|
-
* Its value ("": keep the value it has).
|
|
3571
|
-
*/
|
|
3572
|
-
value?: string;
|
|
3573
|
-
/**
|
|
3574
|
-
* Said with a sealed value a person may have chosen (fewer than 16 characters, or one kind of character only).
|
|
3575
|
-
*/
|
|
3576
|
-
acknowledge_guessable?: boolean;
|
|
3577
|
-
/**
|
|
3578
|
-
* Whether it is a secret (the default); false: a plain variable the agent reads as it is, with no hosts and no class.
|
|
3579
|
-
*/
|
|
3580
|
-
secret?: boolean;
|
|
3581
|
-
};
|
|
3582
|
-
/**
|
|
3583
|
-
* A host an agent's own secret may go to beside its definition's: an owner's Allow.
|
|
3584
|
-
*/
|
|
3585
|
-
export type SecretHostAllowance = {
|
|
3586
|
-
/**
|
|
3587
|
-
* The agent whose own secret it is.
|
|
3588
|
-
*/
|
|
3589
|
-
agent: string;
|
|
3590
|
-
/**
|
|
3591
|
-
* The allowance (sha_…).
|
|
3592
|
-
*/
|
|
3593
|
-
allowance_id: string;
|
|
3594
|
-
/**
|
|
3595
|
-
* When it was allowed.
|
|
3596
|
-
*/
|
|
3597
|
-
allowed_at: string;
|
|
3598
|
-
/**
|
|
3599
|
-
* The person who allowed it (their user id).
|
|
3600
|
-
*/
|
|
3601
|
-
allowed_by: string;
|
|
3602
|
-
/**
|
|
3603
|
-
* The registrable domain the host is under — its public suffix and one label more (evil.io for api.stripe.com.evil.io); under palbase.studio or palbase.app, the name itself. What an Allow hands over: whoever holds the domain runs every name under it.
|
|
3604
|
-
*/
|
|
3605
|
-
domain: string;
|
|
3606
|
-
/**
|
|
3607
|
-
* The host.
|
|
3608
|
-
*/
|
|
3609
|
-
host: string;
|
|
3610
|
-
/**
|
|
3611
|
-
* The secret's name.
|
|
3612
|
-
*/
|
|
3613
|
-
key: string;
|
|
3614
|
-
/**
|
|
3615
|
-
* Whose definition the agent's is: kept (an agent the project keeps), chat (a chat's own definition), backend (its backend's, at each turn). An ask and an Allow are the agent's of that origin alone: a chat's own definition under a kept agent's name is another's.
|
|
3616
|
-
*/
|
|
3617
|
-
origin: "kept" | "chat" | "backend";
|
|
3618
|
-
};
|
|
3619
|
-
/**
|
|
3620
|
-
* The project's allowances, newest first.
|
|
3621
|
-
*/
|
|
3622
|
-
export type SecretHostAllowanceList = {
|
|
3623
|
-
/**
|
|
3624
|
-
* The allowances.
|
|
3625
|
-
*/
|
|
3626
|
-
allowances: SecretHostAllowance[];
|
|
3627
|
-
};
|
|
3628
|
-
/** The events this module sends the project's webhooks (x-palbase-events), by type: each one's payload, the event's data. */
|
|
3629
|
-
export interface Events {
|
|
3630
|
-
/**
|
|
3631
|
-
* ai.goal.updated: a chat's goal was set, its status changed (paused, resumed, blocked, out of budget or turns, achieved), or it was cleared.
|
|
3632
|
-
*/
|
|
3633
|
-
"ai.goal.updated": GoalEvent;
|
|
3634
|
-
/**
|
|
3635
|
-
* ai.response.completed: a response started with background: true completed — read its answer by its id — or a chat's turn completed.
|
|
3636
|
-
*/
|
|
3637
|
-
"ai.response.completed": ResponseEvent;
|
|
3417
|
+
"ai.response.completed": ResponseEvent;
|
|
3638
3418
|
/**
|
|
3639
3419
|
* ai.response.failed: a response started with background: true ended without completing (failed, canceled, timed out, over its budget), or a chat's turn did (failed, stopped, budget_exceeded).
|
|
3640
3420
|
*/
|
|
@@ -3650,23 +3430,11 @@ export interface Events {
|
|
|
3650
3430
|
/**
|
|
3651
3431
|
* ai.voice.delegated: a person asked a voice of delegation events for something out loud; the backend answers with the voice's speak, naming the delegation.
|
|
3652
3432
|
*/
|
|
3653
|
-
"ai.voice.delegated": VoiceDelegatedEvent;
|
|
3654
|
-
/**
|
|
3655
|
-
* ai.voice.started: a chat's voice began.
|
|
3656
|
-
*/
|
|
3657
|
-
"ai.voice.started": VoiceEvent;
|
|
3658
|
-
/**
|
|
3659
|
-
* ai.workspace.conflict: a writer's change of a chat's workspace lost — the path had changed since the writer saw it; the version that lost is kept 30 days in the workspace's history.
|
|
3660
|
-
*/
|
|
3661
|
-
"ai.workspace.conflict": WorkspaceConflictEvent;
|
|
3662
|
-
/**
|
|
3663
|
-
* ai.workspace.published: a chat's workspace published a tree — what its files are now, with the files it changed; read one of them by the tree (GET /ai/chats/{chat_id}/workspace/files?manifest=).
|
|
3664
|
-
*/
|
|
3665
|
-
"ai.workspace.published": WorkspacePublishedEvent;
|
|
3433
|
+
"ai.voice.delegated": VoiceDelegatedEvent;
|
|
3666
3434
|
/**
|
|
3667
|
-
* ai.
|
|
3435
|
+
* ai.voice.started: a chat's voice began.
|
|
3668
3436
|
*/
|
|
3669
|
-
"ai.
|
|
3437
|
+
"ai.voice.started": VoiceEvent;
|
|
3670
3438
|
/**
|
|
3671
3439
|
* ai.secret_host_requested: an agent sent a sealed secret to a host it is not allowed for — the placeholder went as it is, and the owners are asked to allow or dismiss it. Told to the project and to Palbase's own (whose Studio emails the organization's owners), at most once a day a secret and host, and at most 10 a project a day.
|
|
3672
3440
|
*/
|
|
@@ -3767,6 +3535,24 @@ export declare function client(t: Transport): {
|
|
|
3767
3535
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
3768
3536
|
signal?: AbortSignal;
|
|
3769
3537
|
}): Promise<Reply<200, AgentVersionList>>;
|
|
3538
|
+
/**
|
|
3539
|
+
* Synthesize speech from text
|
|
3540
|
+
*
|
|
3541
|
+
* Streams synthesized audio from OpenAI or ElevenLabs.
|
|
3542
|
+
*/
|
|
3543
|
+
createAudioSpeech(input: {
|
|
3544
|
+
body: SpeechRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
3545
|
+
signal?: AbortSignal;
|
|
3546
|
+
}): Promise<Reply<200, Response>>;
|
|
3547
|
+
/**
|
|
3548
|
+
* Transcribe audio to text
|
|
3549
|
+
*
|
|
3550
|
+
* Transcribes uploaded audio or a stored audio file via Deepgram or OpenAI with optional timestamps and diarization.
|
|
3551
|
+
*/
|
|
3552
|
+
createAudioTranscription(input: {
|
|
3553
|
+
body: TranscriptionRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
3554
|
+
signal?: AbortSignal;
|
|
3555
|
+
}): Promise<Reply<200, TranscriptionResponse>>;
|
|
3770
3556
|
/**
|
|
3771
3557
|
* The chats
|
|
3772
3558
|
*
|
|
@@ -3777,7 +3563,8 @@ export declare function client(t: Transport): {
|
|
|
3777
3563
|
member?: string; /** How many (1 to 100, default 100). */
|
|
3778
3564
|
limit?: number; /** next_cursor of the page before. */
|
|
3779
3565
|
cursor?: string; /** A label the chats have, key:value (its metadata); given again, every label named: metadata=project_id:p_123. */
|
|
3780
|
-
metadata?: string[];
|
|
3566
|
+
metadata?: string[]; /** Filter chats by live execution status (active returns only chats with a running or waiting turn). */
|
|
3567
|
+
status?: "active" | "all";
|
|
3781
3568
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
3782
3569
|
signal?: AbortSignal;
|
|
3783
3570
|
}): Promise<Reply<200, ChatList>>;
|
|
@@ -3825,6 +3612,29 @@ export declare function client(t: Transport): {
|
|
|
3825
3612
|
body: DecisionRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
3826
3613
|
signal?: AbortSignal;
|
|
3827
3614
|
}): Promise<Reply<200, Decision>>;
|
|
3615
|
+
/**
|
|
3616
|
+
* Read a chat session's live execution target and machine state
|
|
3617
|
+
*
|
|
3618
|
+
* Returns the chat's active execution target, target_generation, workspace_seq, target machine online/offline state, probed ACP harnesses, and auto_failover status.
|
|
3619
|
+
*/
|
|
3620
|
+
getChatExecution(input: {
|
|
3621
|
+
path: {
|
|
3622
|
+
chat_id: string;
|
|
3623
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
3624
|
+
signal?: AbortSignal;
|
|
3625
|
+
}): Promise<Reply<200, ChatExecution>>;
|
|
3626
|
+
/**
|
|
3627
|
+
* Update a chat session's auto-failover policy or default model/effort
|
|
3628
|
+
*
|
|
3629
|
+
* Server-only update for auto_failover policy or default model/effort without incrementing target_generation or triggering a teleport.
|
|
3630
|
+
*/
|
|
3631
|
+
patchChatExecution(input: {
|
|
3632
|
+
path: {
|
|
3633
|
+
chat_id: string;
|
|
3634
|
+
};
|
|
3635
|
+
body: PatchExecutionRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
3636
|
+
signal?: AbortSignal;
|
|
3637
|
+
}): Promise<Reply<200, ChatExecution>>;
|
|
3828
3638
|
/**
|
|
3829
3639
|
* Fork a chat before a message
|
|
3830
3640
|
*
|
|
@@ -3889,6 +3699,18 @@ export declare function client(t: Transport): {
|
|
|
3889
3699
|
body: GoalPatch; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
3890
3700
|
signal?: AbortSignal;
|
|
3891
3701
|
}): Promise<Reply<200, Goal>>;
|
|
3702
|
+
/**
|
|
3703
|
+
* Teleport a chat session to a new execution target
|
|
3704
|
+
*
|
|
3705
|
+
* Atomically moves the chat session to a new compute/executor target (serverless, cloud, pool, or machine; palbase or acp), increments target_generation to fence superseded runners, and broadcasts session.handed_off.
|
|
3706
|
+
*/
|
|
3707
|
+
handoffChat(input: {
|
|
3708
|
+
path: {
|
|
3709
|
+
chat_id: string;
|
|
3710
|
+
};
|
|
3711
|
+
body: HandoffRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
3712
|
+
signal?: AbortSignal;
|
|
3713
|
+
}): Promise<Reply<200, HandoffResponse>>;
|
|
3892
3714
|
/**
|
|
3893
3715
|
* Put a user in a chat
|
|
3894
3716
|
*
|
|
@@ -4076,7 +3898,7 @@ export declare function client(t: Transport): {
|
|
|
4076
3898
|
/**
|
|
4077
3899
|
* A turn's artifacts
|
|
4078
3900
|
*
|
|
4079
|
-
* What the turn's agent published as its output (
|
|
3901
|
+
* What the turn's agent published as its output (palbase.artifact.publish) — a build's product, a screenshot, a report — kept in the project's own storage. The chat's members and the project's server read it, as they read the chat.
|
|
4080
3902
|
*/
|
|
4081
3903
|
listChatTurnArtifacts(input: {
|
|
4082
3904
|
path: {
|
|
@@ -4166,168 +3988,214 @@ export declare function client(t: Transport): {
|
|
|
4166
3988
|
signal?: AbortSignal;
|
|
4167
3989
|
}): Promise<Reply<202, VoiceSession>>;
|
|
4168
3990
|
/**
|
|
4169
|
-
*
|
|
3991
|
+
* Turn texts into vectors
|
|
3992
|
+
*
|
|
3993
|
+
* One vector per text, in the order of the input. Up to 1,024 texts per request — a longer list is several requests, and the SDK cuts it; the platform splits a request over the provider's own limits.
|
|
3994
|
+
*/
|
|
3995
|
+
createEmbeddings(input: {
|
|
3996
|
+
body: EmbeddingsRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
3997
|
+
signal?: AbortSignal;
|
|
3998
|
+
}): Promise<Reply<200, Embeddings>>;
|
|
3999
|
+
/**
|
|
4000
|
+
* The project's tool endpoints
|
|
4001
|
+
*
|
|
4002
|
+
* Its HTTPS tools and MCP servers, by name (their secrets are not said again). To an environment's token each url is shown only where it is — its scheme, its host and its path's first segment — and the rest of its path, its query and its fragment each as ***: an MCP server's or a tool's key may be anywhere after the host, and an agent is not shown again a secret it did not just set (the answer to its own PUT shows it so too). A person and the project's key see each url whole.
|
|
4003
|
+
*/
|
|
4004
|
+
listEndpoints(input?: {
|
|
4005
|
+
signal?: AbortSignal;
|
|
4006
|
+
}): Promise<Reply<200, EndpointList>>;
|
|
4007
|
+
/**
|
|
4008
|
+
* Put a tool endpoint
|
|
4170
4009
|
*
|
|
4171
|
-
* A
|
|
4010
|
+
* A tool at an HTTPS address of the project's — called with a signed POST {tool, call_id, input, context: {chat_id, agent, user, metadata, turn_id, run_id, subagent, workspace} — the turn, the run that called: the agent's own, or a subagent's at work (subagent names which, null for the agent), and, in a chat that works in a workspace, the workspace as the session last wrote it, flushed before the call: workspace {chat_id, manifest_id, seq} (read its files at that tree, GET /ai/chats/{chat_id}/workspace/files?manifest=)} — and answered {output, is_error, workspace_tree?} or plain text: a tool that wrote the workspace (PUT /ai/chats/{chat_id}/workspace/files) answers workspace_tree {manifest_id, seq} — the tree its writes left, either or both — and the agent's next command sees it — or an MCP server, whose tools an agent may use: when the project says it is its own (workspace: true), told the same tree in its tools/call's _meta (palbase/workspace), answering it in its result's _meta (palbase/workspace_tree); a third party's server is told nothing of a chat or its workspace. The answer says an https tool's signing secret, once.
|
|
4172
4011
|
*/
|
|
4173
|
-
|
|
4012
|
+
putEndpoint(input: {
|
|
4174
4013
|
path: {
|
|
4175
|
-
|
|
4014
|
+
name: string;
|
|
4176
4015
|
};
|
|
4177
|
-
|
|
4178
|
-
path: string; /** The tree to read it from: an ai.workspace.published event's manifest_id (none: the tree the workspace is at now). */
|
|
4179
|
-
manifest?: string;
|
|
4180
|
-
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4016
|
+
body: EndpointRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4181
4017
|
signal?: AbortSignal;
|
|
4182
|
-
}): Promise<Reply<200,
|
|
4018
|
+
}): Promise<Reply<200, Endpoint>>;
|
|
4183
4019
|
/**
|
|
4184
|
-
*
|
|
4020
|
+
* Forget a tool endpoint
|
|
4185
4021
|
*
|
|
4186
|
-
*
|
|
4022
|
+
* An agent naming it can no longer start a turn until it is put again.
|
|
4187
4023
|
*/
|
|
4188
|
-
|
|
4024
|
+
deleteEndpoint(input: {
|
|
4189
4025
|
path: {
|
|
4190
|
-
|
|
4191
|
-
};
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4026
|
+
name: string;
|
|
4027
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4028
|
+
signal?: AbortSignal;
|
|
4029
|
+
}): Promise<Reply<204, undefined>>;
|
|
4030
|
+
/**
|
|
4031
|
+
* The project's variables
|
|
4032
|
+
*
|
|
4033
|
+
* Their names, whether each is a secret, the hosts a secret may go to, where it may be put, whether it is open, and when each was set: never a value.
|
|
4034
|
+
*/
|
|
4035
|
+
listEnv(input?: {
|
|
4036
|
+
signal?: AbortSignal;
|
|
4037
|
+
}): Promise<Reply<200, EnvList>>;
|
|
4038
|
+
/**
|
|
4039
|
+
* The agents' secrets' allowances
|
|
4040
|
+
*
|
|
4041
|
+
* The hosts the project's agents' own secrets are allowed beside their definitions': each an owner's Allow of an ask, newest first (500 at most), with whose agent (origin) and the host's registrable domain. A new value keeps them. One goes with its key: an agent the project keeps, once neither its draft nor its version published has the key (deleted, every one); a chat's own definition, with the last chat whose definition has it; a backend's agent, after 30 days with no turn.
|
|
4042
|
+
*/
|
|
4043
|
+
listEnvAllowances(input?: {
|
|
4197
4044
|
signal?: AbortSignal;
|
|
4198
|
-
}): Promise<Reply<200,
|
|
4045
|
+
}): Promise<Reply<200, SecretHostAllowanceList>>;
|
|
4199
4046
|
/**
|
|
4200
|
-
*
|
|
4047
|
+
* Take an allowance away
|
|
4201
4048
|
*
|
|
4202
|
-
* The
|
|
4049
|
+
* The host taken away from the agent's secret: an ask for it is asked again. A person's alone: an owner or an admin of the organization signed in, never a key or a token, the secret key included (403 person_required; an environment's token, token_out_of_scope).
|
|
4203
4050
|
*/
|
|
4204
|
-
|
|
4051
|
+
deleteEnvAllowance(input: {
|
|
4205
4052
|
path: {
|
|
4206
|
-
|
|
4207
|
-
};
|
|
4208
|
-
|
|
4209
|
-
|
|
4053
|
+
allowance_id: string;
|
|
4054
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4055
|
+
signal?: AbortSignal;
|
|
4056
|
+
}): Promise<Reply<204, undefined>>;
|
|
4057
|
+
/**
|
|
4058
|
+
* The hosts the project's secrets asked for
|
|
4059
|
+
*
|
|
4060
|
+
* The hosts the project's sealed secrets were sent to that they are not allowed for: each secret and host once, with how many times, newest first — its host and the registrable domain it is under (an Allow hands the secret to whoever holds that domain), and whose secret it is (a project variable, or an agent's own of an origin). The project's owners are emailed a link at most once a day for each, at most 3 a day for one secret and 10 a project a day, counted where no ask lowers the count. A project keeps 500 asked, 50 of them a secret and 100 an agent's own secrets: an ask past one forgets an asked one alone — the secret's own oldest, else the oldest of the secret that holds the most, the one asked last among equals — never a dismissed or an allowed one; it keeps 500 dismissed and 500 allowed, a decision past them forgetting the oldest of its kind. A variable removed takes its asks with it, and a key that leaves an agent its own.
|
|
4061
|
+
*/
|
|
4062
|
+
listEnvHostRequests(input?: {
|
|
4063
|
+
query?: {
|
|
4064
|
+
status?: "asked" | "allowed" | "dismissed";
|
|
4210
4065
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4211
4066
|
signal?: AbortSignal;
|
|
4212
|
-
}): Promise<Reply<200,
|
|
4067
|
+
}): Promise<Reply<200, SecretHostRequestList>>;
|
|
4213
4068
|
/**
|
|
4214
|
-
*
|
|
4069
|
+
* Allow an ask
|
|
4215
4070
|
*
|
|
4216
|
-
*
|
|
4071
|
+
* The owner's Allow, for any ask: its host is added to the variable's hosts (one of the project's), or to the agent's allowances (an agent's own secret: GET /ai/env/allowances), and the asks it now allows are marked allowed. A person's alone: an owner or an admin of the organization signed in, never a key or a token, the secret key included (403 person_required; an environment's token, token_out_of_scope).
|
|
4217
4072
|
*/
|
|
4218
|
-
|
|
4073
|
+
allowEnvHostRequest(input: {
|
|
4219
4074
|
path: {
|
|
4220
|
-
|
|
4221
|
-
};
|
|
4222
|
-
body: WorkspaceRepoRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4075
|
+
request_id: string;
|
|
4076
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4223
4077
|
signal?: AbortSignal;
|
|
4224
|
-
}): Promise<Reply<200,
|
|
4078
|
+
}): Promise<Reply<200, SecretHostRequest>>;
|
|
4225
4079
|
/**
|
|
4226
|
-
*
|
|
4080
|
+
* Dismiss an ask
|
|
4227
4081
|
*
|
|
4228
|
-
*
|
|
4082
|
+
* The owner's Dismiss: the ask is never told again (it is still counted). One allowed is not undone here: its host is the secret's (PUT /ai/env/{key} with hosts, or DELETE /ai/env/allowances/{allowance_id}, takes it away) — 409 already_allowed. A person's alone: an owner or an admin of the organization signed in, never a key or a token, the secret key included (403 person_required; an environment's token, token_out_of_scope).
|
|
4229
4083
|
*/
|
|
4230
|
-
|
|
4084
|
+
dismissEnvHostRequest(input: {
|
|
4231
4085
|
path: {
|
|
4232
|
-
|
|
4086
|
+
request_id: string;
|
|
4233
4087
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4234
4088
|
signal?: AbortSignal;
|
|
4235
|
-
}): Promise<Reply<200,
|
|
4089
|
+
}): Promise<Reply<200, SecretHostRequest>>;
|
|
4236
4090
|
/**
|
|
4237
|
-
*
|
|
4091
|
+
* Set a variable
|
|
4238
4092
|
*
|
|
4239
|
-
*
|
|
4093
|
+
* One of the project's variables or secrets, set or set anew: every command of every session of its agents begun from now has it — on the platform's Linux machines and on the project's own pools, Linux and Mac — beside the agent's own (its definition's env), masked wherever a transcript would show it. The value is sealed where the sessions run and never answered, nor logged; a refusal never repeats it. A secret also says where it may go (hosts), where in a request it may be put (inject) and whether the agent reads it as it is (open); a field left out keeps what the variable has. A write that carries the value says them as its caller's role allows. A variable set before may leave out its value to change them alone (404 for one never set): a person's change only — an owner or an admin of the organization signed in, never a key or a token, the secret key included (403 person_required). open: true, and a secret made no secret, need acknowledge_open: true (400 open_not_acknowledged); a variable that stays no secret is refused hosts, inject and open (409 not_a_secret). A sealed value is at least 8 bytes with no line break or NUL (400 secret_unusable), and one a person may have chosen (fewer than 16 characters, or one kind of character only) needs acknowledge_guessable: true (400 secret_guessable) — the request's own value is judged, never one kept: an open secret or a variable that is no secret made sealed takes its value in the same request (400 value_required). A sealed secret is a placeholder in a session: the proxy beside the machine puts the value in only on a request to one of its hosts, and a machine with no proxy beside it (a Mac, or a Linux machine whose agent does not run it) gets no sealed secret.
|
|
4240
4094
|
*/
|
|
4241
|
-
|
|
4095
|
+
putEnv(input: {
|
|
4242
4096
|
path: {
|
|
4243
|
-
|
|
4097
|
+
key: string;
|
|
4244
4098
|
};
|
|
4245
|
-
body:
|
|
4099
|
+
body: EnvRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4246
4100
|
signal?: AbortSignal;
|
|
4247
|
-
}): Promise<Reply<
|
|
4101
|
+
}): Promise<Reply<200, EnvVar>>;
|
|
4248
4102
|
/**
|
|
4249
|
-
*
|
|
4103
|
+
* Remove a variable
|
|
4250
4104
|
*
|
|
4251
|
-
*
|
|
4105
|
+
* Sessions begun from now no longer have it.
|
|
4252
4106
|
*/
|
|
4253
|
-
|
|
4107
|
+
deleteEnv(input: {
|
|
4254
4108
|
path: {
|
|
4255
|
-
|
|
4256
|
-
token: string;
|
|
4109
|
+
key: string;
|
|
4257
4110
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4258
4111
|
signal?: AbortSignal;
|
|
4259
4112
|
}): Promise<Reply<204, undefined>>;
|
|
4260
4113
|
/**
|
|
4261
|
-
*
|
|
4114
|
+
* Allow a secret a host
|
|
4262
4115
|
*
|
|
4263
|
-
*
|
|
4116
|
+
* The owner's Allow, for one of the project's variables: the host is added to a sealed secret's hosts (32 at most), and the asks it now allows are marked allowed. A sealed secret sent to it from the proxy's next renewal carries the value. Allow only a host you know the secret belongs to: an agent can be led to send a secret anywhere. A person's alone: an owner or an admin of the organization signed in, never a key or a token, the secret key included (403 person_required; an environment's token, token_out_of_scope).
|
|
4264
4117
|
*/
|
|
4265
|
-
|
|
4266
|
-
|
|
4118
|
+
allowEnvHost(input: {
|
|
4119
|
+
path: {
|
|
4120
|
+
key: string;
|
|
4121
|
+
};
|
|
4122
|
+
body: EnvHostRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4267
4123
|
signal?: AbortSignal;
|
|
4268
|
-
}): Promise<Reply<200,
|
|
4124
|
+
}): Promise<Reply<200, EnvVar>>;
|
|
4269
4125
|
/**
|
|
4270
|
-
*
|
|
4126
|
+
* List runtime environments
|
|
4271
4127
|
*
|
|
4272
|
-
*
|
|
4128
|
+
* Lists the project's configured runtime environments ordered by name.
|
|
4273
4129
|
*/
|
|
4274
|
-
|
|
4130
|
+
listEnvironments(input?: {
|
|
4275
4131
|
signal?: AbortSignal;
|
|
4276
|
-
}): Promise<Reply<200,
|
|
4132
|
+
}): Promise<Reply<200, EnvironmentList>>;
|
|
4277
4133
|
/**
|
|
4278
|
-
*
|
|
4134
|
+
* Create a runtime environment
|
|
4279
4135
|
*
|
|
4280
|
-
*
|
|
4136
|
+
* Creates a new runtime environment (ephemeral or always_on) for the project.
|
|
4281
4137
|
*/
|
|
4282
|
-
|
|
4138
|
+
createEnvironment(input: {
|
|
4139
|
+
body: EnvironmentRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4140
|
+
signal?: AbortSignal;
|
|
4141
|
+
}): Promise<Reply<201, Environment>>;
|
|
4142
|
+
/**
|
|
4143
|
+
* Get a runtime environment
|
|
4144
|
+
*
|
|
4145
|
+
* Returns a single runtime environment by name.
|
|
4146
|
+
*/
|
|
4147
|
+
getEnvironment(input: {
|
|
4283
4148
|
path: {
|
|
4284
4149
|
name: string;
|
|
4285
|
-
};
|
|
4286
|
-
body: EndpointRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4150
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4287
4151
|
signal?: AbortSignal;
|
|
4288
|
-
}): Promise<Reply<200,
|
|
4152
|
+
}): Promise<Reply<200, Environment>>;
|
|
4289
4153
|
/**
|
|
4290
|
-
*
|
|
4154
|
+
* Create or update a runtime environment
|
|
4291
4155
|
*
|
|
4292
|
-
*
|
|
4156
|
+
* Upserts a runtime environment by name.
|
|
4293
4157
|
*/
|
|
4294
|
-
|
|
4158
|
+
putEnvironment(input: {
|
|
4295
4159
|
path: {
|
|
4296
4160
|
name: string;
|
|
4297
|
-
};
|
|
4161
|
+
};
|
|
4162
|
+
body: EnvironmentRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4298
4163
|
signal?: AbortSignal;
|
|
4299
|
-
}): Promise<Reply<
|
|
4164
|
+
}): Promise<Reply<200, Environment>>;
|
|
4300
4165
|
/**
|
|
4301
|
-
*
|
|
4166
|
+
* Delete a runtime environment
|
|
4302
4167
|
*
|
|
4303
|
-
*
|
|
4168
|
+
* Deletes a runtime environment and its build records.
|
|
4304
4169
|
*/
|
|
4305
|
-
|
|
4170
|
+
deleteEnvironment(input: {
|
|
4171
|
+
path: {
|
|
4172
|
+
name: string;
|
|
4173
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4306
4174
|
signal?: AbortSignal;
|
|
4307
|
-
}): Promise<Reply<
|
|
4175
|
+
}): Promise<Reply<204, undefined>>;
|
|
4308
4176
|
/**
|
|
4309
|
-
*
|
|
4177
|
+
* Queue an environment build
|
|
4310
4178
|
*
|
|
4311
|
-
*
|
|
4179
|
+
* Queues a new immutable pre-bake build for the named environment.
|
|
4312
4180
|
*/
|
|
4313
|
-
|
|
4181
|
+
createEnvironmentBuild(input: {
|
|
4314
4182
|
path: {
|
|
4315
|
-
|
|
4316
|
-
};
|
|
4317
|
-
body: EnvRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4183
|
+
name: string;
|
|
4184
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4318
4185
|
signal?: AbortSignal;
|
|
4319
|
-
}): Promise<Reply<
|
|
4186
|
+
}): Promise<Reply<201, EnvironmentBuild>>;
|
|
4320
4187
|
/**
|
|
4321
|
-
*
|
|
4188
|
+
* Get an environment build
|
|
4322
4189
|
*
|
|
4323
|
-
*
|
|
4190
|
+
* Returns the status and metadata of a specific environment build.
|
|
4324
4191
|
*/
|
|
4325
|
-
|
|
4192
|
+
getEnvironmentBuild(input: {
|
|
4326
4193
|
path: {
|
|
4327
|
-
|
|
4194
|
+
name: string; /** The build's identifier. */
|
|
4195
|
+
build_id: string;
|
|
4328
4196
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4329
4197
|
signal?: AbortSignal;
|
|
4330
|
-
}): Promise<Reply<
|
|
4198
|
+
}): Promise<Reply<200, EnvironmentBuild>>;
|
|
4331
4199
|
/**
|
|
4332
4200
|
* Make pictures
|
|
4333
4201
|
*
|
|
@@ -4366,7 +4234,7 @@ export declare function client(t: Transport): {
|
|
|
4366
4234
|
/**
|
|
4367
4235
|
* Delete a machine
|
|
4368
4236
|
*
|
|
4369
|
-
* A cordoned machine that holds no session leaves its pool; its `
|
|
4237
|
+
* 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.
|
|
4370
4238
|
*/
|
|
4371
4239
|
deleteMachine(input: {
|
|
4372
4240
|
path: {
|
|
@@ -4426,7 +4294,7 @@ export declare function client(t: Transport): {
|
|
|
4426
4294
|
/**
|
|
4427
4295
|
* Make a runner pool
|
|
4428
4296
|
*
|
|
4429
|
-
* A pool of one type — its machines' operating system (linux or macos) and architecture (amd64 or arm64) — that the project's own machines enrol into with
|
|
4297
|
+
* A pool of one type — its machines' operating system (linux or macos) and architecture (amd64 or arm64) — that the project's own machines enrol into with `palbase-agent` and a single-use key (POST /ai/pools/{pool}/keys). A chat that names it (POST /ai/chats {pool}) runs its workspace's sessions there. Managed through the API, the SDK and the CLI (palbase ai pools): the project scales it itself, reading its state (GET /ai/pools/{pool}/state). A name taken already: 409 pool_exists.
|
|
4430
4298
|
*/
|
|
4431
4299
|
createPool(input: {
|
|
4432
4300
|
body: PoolRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
@@ -4457,7 +4325,7 @@ export declare function client(t: Transport): {
|
|
|
4457
4325
|
/**
|
|
4458
4326
|
* Mint an enrolment key
|
|
4459
4327
|
*
|
|
4460
|
-
* A single-use key a machine of the project's enrols into the pool with (saved to a file on the machine: `
|
|
4328
|
+
* A single-use key a machine of the project's enrols into the pool with (saved to a file on the machine: `palbase-agent enroll --key-file <file> --capacity <n>` — never on a command line), said once, here. A machine enrolled with it serves the project's sessions once whoever minted it is gone: never minted for an environment's token.
|
|
4461
4329
|
*/
|
|
4462
4330
|
createPoolKey(input: {
|
|
4463
4331
|
path: {
|
|
@@ -4508,41 +4376,6 @@ export declare function client(t: Transport): {
|
|
|
4508
4376
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4509
4377
|
signal?: AbortSignal;
|
|
4510
4378
|
}): Promise<Reply<204, undefined>>;
|
|
4511
|
-
/**
|
|
4512
|
-
* The project's repositories
|
|
4513
|
-
*
|
|
4514
|
-
* The repositories the project's chats work in, by name, a page at a time (a project puts 10000 at most).
|
|
4515
|
-
*/
|
|
4516
|
-
listRepos(input?: {
|
|
4517
|
-
query?: {
|
|
4518
|
-
limit?: number; /** next_cursor of the page before. */
|
|
4519
|
-
cursor?: string;
|
|
4520
|
-
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4521
|
-
signal?: AbortSignal;
|
|
4522
|
-
}): Promise<Reply<200, RepoPage>>;
|
|
4523
|
-
/**
|
|
4524
|
-
* Put a repository
|
|
4525
|
-
*
|
|
4526
|
-
* Puts a GitHub repository the project's chats work in. Its tokens come from the project's backend (the framework's ai.repo), asked at each clone and each push — none is kept.
|
|
4527
|
-
*/
|
|
4528
|
-
putRepo(input: {
|
|
4529
|
-
path: {
|
|
4530
|
-
name: string;
|
|
4531
|
-
};
|
|
4532
|
-
body: RepoRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4533
|
-
signal?: AbortSignal;
|
|
4534
|
-
}): Promise<Reply<200, Repo>>;
|
|
4535
|
-
/**
|
|
4536
|
-
* Delete a repository
|
|
4537
|
-
*
|
|
4538
|
-
* A chat's workspace checks it out no more.
|
|
4539
|
-
*/
|
|
4540
|
-
deleteRepo(input: {
|
|
4541
|
-
path: {
|
|
4542
|
-
name: string;
|
|
4543
|
-
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4544
|
-
signal?: AbortSignal;
|
|
4545
|
-
}): Promise<Reply<204, undefined>>;
|
|
4546
4379
|
/**
|
|
4547
4380
|
* Ask a model
|
|
4548
4381
|
*
|
|
@@ -4642,130 +4475,117 @@ export declare function client(t: Transport): {
|
|
|
4642
4475
|
query?: {
|
|
4643
4476
|
limit?: number; /** The next_cursor of the previous page. */
|
|
4644
4477
|
cursor?: string; /** Only uses of this kind: text, embedding or image. */
|
|
4645
|
-
kind?: "text" | "embedding" | "image"; /** Labels each use listed carries, as a JSON object ({"product":"p1"}): a product's spend, a task's. */
|
|
4478
|
+
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. */
|
|
4646
4479
|
metadata?: string;
|
|
4647
4480
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4648
4481
|
signal?: AbortSignal;
|
|
4649
4482
|
}): Promise<Reply<200, UsagePage>>;
|
|
4650
4483
|
/**
|
|
4651
|
-
*
|
|
4484
|
+
* OpenAI-compatible text-to-speech
|
|
4652
4485
|
*
|
|
4653
|
-
*
|
|
4486
|
+
* Streams synthesized audio via OpenAI or ElevenLabs.
|
|
4654
4487
|
*/
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
since?: number;
|
|
4658
|
-
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4659
|
-
signal?: AbortSignal;
|
|
4660
|
-
}): Promise<Reply<200, SyncChanges>>;
|
|
4661
|
-
/**
|
|
4662
|
-
* Publish the writer's changes
|
|
4663
|
-
*
|
|
4664
|
-
* The writer's changes, each with what it last knew of its path (previous): applied only while the path still is that — the first to reach the store wins; a change that lost is kept aside as a conflict, in the workspace's history for 30 days (ai.workspace.conflict) — answered with the head, what was applied, what lost, and what changed since known_seq that the writer has not seen (catch_up). A write token's alone. Called with the workspace token alone (Authorization: Bearer), at the project's own address — forwarded as it came to the workspace's store, whose answer it is (its refusals are its own problem documents, application/problem+json); a token this project did not mint, revoked or expired is refused here (401 invalid_token). This is the wire `palai workspace sync` speaks: its shapes are the store's.
|
|
4665
|
-
*/
|
|
4666
|
-
createWorkspaceSyncChangeSet(input: {
|
|
4667
|
-
body: SyncChangeSet; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4488
|
+
gatewayAudioSpeech(input: {
|
|
4489
|
+
body: SpeechRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4668
4490
|
signal?: AbortSignal;
|
|
4669
|
-
}): Promise<Reply<200,
|
|
4491
|
+
}): Promise<Reply<200, Response>>;
|
|
4670
4492
|
/**
|
|
4671
|
-
*
|
|
4493
|
+
* OpenAI-compatible audio transcription
|
|
4672
4494
|
*
|
|
4673
|
-
*
|
|
4495
|
+
* Transcribes audio via OpenAI or Deepgram.
|
|
4674
4496
|
*/
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
conflict_id: string;
|
|
4678
|
-
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4497
|
+
gatewayAudioTranscriptions(input: {
|
|
4498
|
+
body: GatewayJSON; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4679
4499
|
signal?: AbortSignal;
|
|
4680
|
-
}): Promise<Reply<200,
|
|
4500
|
+
}): Promise<Reply<200, GatewayJSON>>;
|
|
4681
4501
|
/**
|
|
4682
|
-
*
|
|
4502
|
+
* OpenAI-compatible chat completions
|
|
4683
4503
|
*
|
|
4684
|
-
*
|
|
4504
|
+
* Routes to any direct-to-source text model in fast stateless mode or stateful single-engine mode when X-Palbase-Session-Id is provided.
|
|
4685
4505
|
*/
|
|
4686
|
-
|
|
4506
|
+
gatewayChatCompletions(input: {
|
|
4507
|
+
body: GatewayJSON; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4687
4508
|
signal?: AbortSignal;
|
|
4688
|
-
}): Promise<Reply<200,
|
|
4509
|
+
}): Promise<Reply<200, GatewayJSON>>;
|
|
4689
4510
|
/**
|
|
4690
|
-
*
|
|
4511
|
+
* OpenAI-compatible embeddings
|
|
4691
4512
|
*
|
|
4692
|
-
*
|
|
4513
|
+
* Generates text embeddings across OpenAI, Google Gemini, Mistral, and Fireworks.
|
|
4693
4514
|
*/
|
|
4694
|
-
|
|
4695
|
-
body:
|
|
4515
|
+
gatewayEmbeddings(input: {
|
|
4516
|
+
body: GatewayJSON; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4696
4517
|
signal?: AbortSignal;
|
|
4697
|
-
}): Promise<Reply<200,
|
|
4518
|
+
}): Promise<Reply<200, GatewayJSON>>;
|
|
4698
4519
|
/**
|
|
4699
|
-
*
|
|
4520
|
+
* OpenAI-compatible image generation
|
|
4700
4521
|
*
|
|
4701
|
-
*
|
|
4522
|
+
* Generates images across OpenAI, Google Imagen, and Black Forest Labs Flux.
|
|
4702
4523
|
*/
|
|
4703
|
-
|
|
4524
|
+
gatewayImagesGenerations(input: {
|
|
4525
|
+
body: GatewayJSON; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4704
4526
|
signal?: AbortSignal;
|
|
4705
|
-
}): Promise<Reply<200,
|
|
4527
|
+
}): Promise<Reply<200, GatewayJSON>>;
|
|
4706
4528
|
/**
|
|
4707
|
-
*
|
|
4529
|
+
* Anthropic-compatible messages
|
|
4708
4530
|
*
|
|
4709
|
-
*
|
|
4531
|
+
* Anthropic Messages wire routing to any direct-to-source text model in fast stateless mode or stateful single-engine mode.
|
|
4710
4532
|
*/
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
key: string;
|
|
4714
|
-
};
|
|
4715
|
-
body: EnvHostRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4533
|
+
gatewayAnthropicMessages(input: {
|
|
4534
|
+
body: GatewayJSON; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4716
4535
|
signal?: AbortSignal;
|
|
4717
|
-
}): Promise<Reply<200,
|
|
4536
|
+
}): Promise<Reply<200, GatewayJSON>>;
|
|
4718
4537
|
/**
|
|
4719
|
-
*
|
|
4538
|
+
* List live models (OpenAI-compatible)
|
|
4720
4539
|
*
|
|
4721
|
-
*
|
|
4540
|
+
* Returns the live DB-backed model catalog in OpenAI-compatible list format.
|
|
4722
4541
|
*/
|
|
4723
|
-
|
|
4542
|
+
gatewayListModels(input?: {
|
|
4724
4543
|
query?: {
|
|
4725
|
-
|
|
4544
|
+
modality?: "text" | "embedding" | "image" | "video" | "stt" | "tts" | "voice_live";
|
|
4545
|
+
vendor?: string;
|
|
4546
|
+
include_deprecated?: boolean;
|
|
4726
4547
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4727
4548
|
signal?: AbortSignal;
|
|
4728
|
-
}): Promise<Reply<200,
|
|
4549
|
+
}): Promise<Reply<200, GatewayJSON>>;
|
|
4729
4550
|
/**
|
|
4730
|
-
*
|
|
4551
|
+
* OpenAI Responses wire
|
|
4731
4552
|
*
|
|
4732
|
-
*
|
|
4553
|
+
* Routes OpenAI Responses requests directly through Palbase single engine.
|
|
4733
4554
|
*/
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
request_id: string;
|
|
4737
|
-
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4555
|
+
gatewayResponses(input: {
|
|
4556
|
+
body: GatewayJSON; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4738
4557
|
signal?: AbortSignal;
|
|
4739
|
-
}): Promise<Reply<200,
|
|
4558
|
+
}): Promise<Reply<200, GatewayJSON>>;
|
|
4740
4559
|
/**
|
|
4741
|
-
*
|
|
4560
|
+
* Start an asynchronous video generation job
|
|
4742
4561
|
*
|
|
4743
|
-
*
|
|
4562
|
+
* Starts a durable asynchronous video generation job on Google Veo or Kling.
|
|
4744
4563
|
*/
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
request_id: string;
|
|
4748
|
-
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4564
|
+
createVideo(input: {
|
|
4565
|
+
body: VideoRequest; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4749
4566
|
signal?: AbortSignal;
|
|
4750
|
-
}): Promise<Reply<
|
|
4567
|
+
}): Promise<Reply<202, VideoJob>>;
|
|
4751
4568
|
/**
|
|
4752
|
-
*
|
|
4569
|
+
* Read a video generation job
|
|
4753
4570
|
*
|
|
4754
|
-
*
|
|
4571
|
+
* Returns the status, output URL, storage path, and billed cost of a video job.
|
|
4755
4572
|
*/
|
|
4756
|
-
|
|
4573
|
+
getVideo(input: {
|
|
4574
|
+
path: {
|
|
4575
|
+
video_id: string;
|
|
4576
|
+
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4757
4577
|
signal?: AbortSignal;
|
|
4758
|
-
}): Promise<Reply<200,
|
|
4578
|
+
}): Promise<Reply<200, VideoJob>>;
|
|
4759
4579
|
/**
|
|
4760
|
-
*
|
|
4580
|
+
* Cancel a running video generation job
|
|
4761
4581
|
*
|
|
4762
|
-
*
|
|
4582
|
+
* Cancels a queued or running video job.
|
|
4763
4583
|
*/
|
|
4764
|
-
|
|
4584
|
+
cancelVideo(input: {
|
|
4765
4585
|
path: {
|
|
4766
|
-
|
|
4586
|
+
video_id: string;
|
|
4767
4587
|
}; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
|
|
4768
4588
|
signal?: AbortSignal;
|
|
4769
|
-
}): Promise<Reply<
|
|
4589
|
+
}): Promise<Reply<200, VideoCancelResult>>;
|
|
4770
4590
|
};
|
|
4771
4591
|
export type Client = ReturnType<typeof client>;
|