palbase 0.62.0 → 0.64.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/ai/index.js +2 -2
  2. package/dist/backend/engine.js +2 -2
  3. package/dist/backend/env.js +1 -1
  4. package/dist/backend/index.js +3 -3
  5. package/dist/backend/stack.js +1 -1
  6. package/dist/backend/test.js +2 -2
  7. package/dist/chunks/{WJXZYXL6.js → 2FPPZ3A3.js} +2 -2
  8. package/dist/chunks/{S3YODXG5.js → 47YRZOKH.js} +2 -2
  9. package/dist/chunks/{PYL5JMWN.js → 73CKSYD7.js} +2 -2
  10. package/dist/chunks/{7J3HTVFX.js → 7WLAMFND.js} +2 -2
  11. package/dist/chunks/{LXAR6WWQ.js → AUCNHNPD.js} +2 -2
  12. package/dist/chunks/{SCUAN3L3.js → B6FEEB5R.js} +1 -1
  13. package/dist/chunks/{HXKBPLL2.js → D2Z5R7ZP.js} +1 -1
  14. package/dist/chunks/{IPAVEV75.js → HWDOVTN4.js} +2 -2
  15. package/dist/chunks/K4E27V7K.js +2 -0
  16. package/dist/chunks/{ECVNYWWT.js → KRYGPGVB.js} +2 -2
  17. package/dist/chunks/{P3QFV5EA.js → MUHCCKSS.js} +1 -1
  18. package/dist/chunks/{PQ627JVJ.js → MVHF5I2L.js} +2 -2
  19. package/dist/chunks/QDAQJXBR.js +18 -0
  20. package/dist/chunks/{WBKZLJ66.js → RCV4YOM6.js} +1 -1
  21. package/dist/chunks/{ZVDYTR3S.js → SKPSBDXT.js} +2 -2
  22. package/dist/chunks/{EEGVWOER.js → TNY6UGJZ.js} +2 -2
  23. package/dist/chunks/{LDLYOQAV.js → TTDCC4FL.js} +1 -1
  24. package/dist/chunks/{LUVYYNMK.js → U6S2T2FE.js} +2 -2
  25. package/dist/chunks/{M6KUVE4B.js → UAD4XPIB.js} +2 -2
  26. package/dist/chunks/{3KEWWFIC.js → XDGXREXS.js} +1 -1
  27. package/dist/chunks/{KUSZFTJK.js → XIHO4HVO.js} +1 -1
  28. package/dist/chunks/{USL5YRDX.js → ZO7BWXF3.js} +2 -2
  29. package/dist/chunks/{WEMTQPSH.js → ZZLCBUNM.js} +2 -2
  30. package/dist/cli.js +10802 -349
  31. package/dist/cloud/index.js +2 -2
  32. package/dist/refuse/ai.js +1 -1
  33. package/dist/refuse/backend.js +1 -1
  34. package/dist/refuse/cloud.js +1 -1
  35. package/dist/refuse/server.js +1 -1
  36. package/dist/server/index.js +2 -2
  37. package/dist/server/testing.js +2 -2
  38. package/dist/web/index.js +2 -2
  39. package/dist/web/message.js +2 -2
  40. package/dist/web/palbe.js +2 -2
  41. package/dist/web/paywall.js +2 -2
  42. package/dist/web/push-sw.js +1 -1
  43. package/dist/web/ssr.js +2 -2
  44. package/dist/web/vite.js +2 -2
  45. package/package.json +2 -2
  46. package/types/ai/src/chats.d.ts +20 -2
  47. package/types/ai/src/index.d.ts +2 -2
  48. package/types/ai/src/pools.d.ts +158 -9
  49. package/types/ai/src/tools.d.ts +83 -2
  50. package/types/cloud/src/generated/project.d.ts +1 -1
  51. package/types/cloud/src/generated/studio.d.ts +67 -8
  52. package/types/internal/src/modules/ai.d.ts +306 -11
  53. package/types/internal/src/modules/analytics.d.ts +7 -7
  54. package/types/internal/src/modules/auth.d.ts +41 -30
  55. package/types/internal/src/modules/events.d.ts +2 -2
  56. package/types/internal/src/modules/notify.d.ts +1 -1
  57. package/types/internal/src/modules/purchases.d.ts +19 -7
  58. package/types/internal/src/modules/stores.d.ts +3 -3
  59. package/types/web/src/screen/resolve.d.ts +2 -1
  60. package/dist/chunks/DCWPUWZE.js +0 -18
  61. package/dist/chunks/ZWSYEBRO.js +0 -2
@@ -90,10 +90,10 @@ export type AgentDefinition = {
90
90
  */
91
91
  effort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max";
92
92
  /**
93
- * The agent's own variables, name → value (names: upper-case letters, digits and _, not PALAI_…; 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. A value is never answered again: a definition read back says each name with an empty value, and a name written with an empty value keeps the value it has.
93
+ * The agent's own variables (names: upper-case letters, digits and _, not PALAI_…; 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
- [key: string]: string;
96
+ [key: string]: AgentEnvValue | AgentEnvEntry;
97
97
  };
98
98
  /**
99
99
  * Its instructions.
@@ -817,26 +817,58 @@ export type EnvList = {
817
817
  variables: EnvVar[];
818
818
  };
819
819
  /**
820
- * A variable's value.
820
+ * A variable's value, and what it says of itself; a field left out keeps what the variable has.
821
821
  */
822
822
  export type EnvRequest = {
823
823
  /**
824
- * Whether it is a secret (the default): said so in the list. Every value is masked in a transcript either way.
824
+ * Said with open: true, and to make a secret no secret (secret: false): you read that the agent then reads it as it is, so anyone who can drive the project's agents (an app's user where the project lets them, a prompt the agent reads) can get its value.
825
+ */
826
+ acknowledge_open?: boolean;
827
+ /**
828
+ * The hosts a request may carry the secret to (32 at most): an exact DNS name (api.stripe.com) or *. and one (*.stripe.com: one label more). Lower-case ASCII, punycode for another script; no IP address, port, single-label name, public suffix (com, co.uk, github.io) or wildcard over one, and no wildcard over palbase.studio. Given, the secret is sealed. [] takes them all away.
829
+ */
830
+ hosts?: string[];
831
+ /**
832
+ * Where in a request to one of its hosts the secret may be put: header (the default), query, body — at least one. Never over plain http.
833
+ */
834
+ inject?: ("header" | "query" | "body")[];
835
+ /**
836
+ * true: the agent reads it as it is (no hosts, no inject), set with acknowledge_open; false: sealed, a placeholder the proxy swaps for the value only on a request to one of its hosts. Work an app's user starts gets an open secret only where the project lets it (settings.open_secrets_for_app_users).
837
+ */
838
+ open?: boolean;
839
+ /**
840
+ * Whether it is a secret (the default on a write of its value). One that is not (false) is given to the agent as it is, with no hosts and no class; a secret made none needs acknowledge_open. Every value is masked in a transcript either way.
825
841
  */
826
842
  secret?: boolean;
827
843
  /**
828
- * Its value: 1 byte to 32 KiB, no NUL. Sealed, never answered, never logged.
844
+ * Its value: 1 byte to 32 KiB, no NUL (a sealed one: 8 bytes or more, no line break). Sealed, never answered, never logged. Required to set a new variable; left out, a variable set before keeps it.
829
845
  */
830
- value: string;
846
+ value?: string;
847
+ /**
848
+ * Said with a sealed value a person may have chosen (fewer than 16 characters, or one kind of character only): you read that the proxy hides a value an allowed host echoes back, which lets an agent confirm a guess there.
849
+ */
850
+ acknowledge_guessable?: boolean;
831
851
  };
832
852
  /**
833
- * One of the project's variables: its name, never its value.
853
+ * One of the project's variables: its name and what it says of itself, never its value.
834
854
  */
835
855
  export type EnvVar = {
856
+ /**
857
+ * The hosts it may go to ([]: none yet — delivered as it is today; always [] for an open secret or one that is no secret).
858
+ */
859
+ hosts: string[];
860
+ /**
861
+ * Where in a request it may be put: header, query, body.
862
+ */
863
+ inject: string[];
836
864
  /**
837
865
  * Its name.
838
866
  */
839
867
  key: string;
868
+ /**
869
+ * Whether the agent reads it as it is (an open secret).
870
+ */
871
+ open: boolean;
840
872
  /**
841
873
  * Whether it is a secret.
842
874
  */
@@ -931,7 +963,7 @@ export type Goal = {
931
963
  */
932
964
  status: string;
933
965
  /**
934
- * Why it last left active, as a stable code (empty while active): paused_by_person, paused_by_client, turn_stopped, turns_failed, no_progress, judge_unreadable, check_unreadable, needs_person, credit_hold, not_admitted, budget_spent, turns_used, time_used, achieved.
966
+ * Why it last left active, as a stable code (empty while active): paused_by_person, paused_by_client, turn_stopped, turns_failed, no_progress, judge_unreadable, check_unreadable, needs_person, not_admitted, budget_spent, turns_used, time_used, achieved.
935
967
  */
936
968
  stop_code: string;
937
969
  /**
@@ -2131,6 +2163,10 @@ export type Settings = {
2131
2163
  * How many messages one user sends a minute (default 20).
2132
2164
  */
2133
2165
  user_messages_per_minute: number;
2166
+ /**
2167
+ * 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
+ */
2169
+ open_secrets_for_app_users: boolean;
2134
2170
  };
2135
2171
  /**
2136
2172
  * A change of what the project allows its chats; a field left out is left as it is.
@@ -2152,6 +2188,10 @@ export type SettingsRequest = {
2152
2188
  * 1 to 600.
2153
2189
  */
2154
2190
  user_messages_per_minute?: number;
2191
+ /**
2192
+ * 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
+ */
2194
+ open_secrets_for_app_users?: boolean;
2155
2195
  };
2156
2196
  /**
2157
2197
  * 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%.
@@ -2292,6 +2332,10 @@ export type SyncChangeSetResult = {
2292
2332
  * The changes that lost.
2293
2333
  */
2294
2334
  conflicts?: SyncConflict[];
2335
+ /**
2336
+ * The head the history holds at known_seq, which catch_up (or its absence) starts from. Absent only when catch_up is the whole tree (catch_up_full), or from a plane of a release before it. A writer whose own head at known_seq is another one has a history the store no longer has (restored from a backup): it takes neither and syncs again from scratch.
2337
+ */
2338
+ known_manifest_id?: string;
2295
2339
  /**
2296
2340
  * The head's tree now.
2297
2341
  */
@@ -2329,6 +2373,10 @@ export type SyncChanges = {
2329
2373
  * The sequence asked from.
2330
2374
  */
2331
2375
  since?: number;
2376
+ /**
2377
+ * The head the history holds at since, which changes starts from. Absent only with full, or from a plane of a release before it. A writer whose own head at since is another one has a history the store no longer has (restored from a backup): it syncs again from scratch instead of taking changes.
2378
+ */
2379
+ since_manifest_id?: string;
2332
2380
  /**
2333
2381
  * The head's tree's checksum.
2334
2382
  */
@@ -3398,6 +3446,185 @@ export type WorkspaceTree = {
3398
3446
  */
3399
3447
  seq?: number;
3400
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
+ };
3401
3628
  /** The events this module sends the project's webhooks (x-palbase-events), by type: each one's payload, the event's data. */
3402
3629
  export interface Events {
3403
3630
  /**
@@ -3440,6 +3667,10 @@ export interface Events {
3440
3667
  * ai.workspace.pushed: a chat's agent pushed its work to the chat's branch, with the commits it brought.
3441
3668
  */
3442
3669
  "ai.workspace.pushed": WorkspacePushedEvent;
3670
+ /**
3671
+ * 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
+ */
3673
+ "ai.secret_host_requested": SecretHostRequested;
3443
3674
  }
3444
3675
  /** Palbase ai */
3445
3676
  export declare function client(t: Transport): {
@@ -4069,7 +4300,7 @@ export declare function client(t: Transport): {
4069
4300
  /**
4070
4301
  * The project's variables
4071
4302
  *
4072
- * Their names, whether each is a secret, and when each was set: never a value.
4303
+ * 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.
4073
4304
  */
4074
4305
  listEnv(input?: {
4075
4306
  signal?: AbortSignal;
@@ -4077,7 +4308,7 @@ export declare function client(t: Transport): {
4077
4308
  /**
4078
4309
  * Set a variable
4079
4310
  *
4080
- * 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.
4311
+ * 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). Nothing of how a value is delivered changes until the proxy beside the machines swaps a sealed secret in only on a request to one of its hosts.
4081
4312
  */
4082
4313
  putEnv(input: {
4083
4314
  path: {
@@ -4363,7 +4594,7 @@ export declare function client(t: Transport): {
4363
4594
  /**
4364
4595
  * What the project allows its chats
4365
4596
  *
4366
- * Whether its app's users talk to its agents themselves, how many messages one sends a minute, and how much history it keeps.
4597
+ * Whether its app's users talk to its agents themselves, how many messages one sends a minute, how much history it keeps, its monthly budget, and whether its app's users' work has its open secrets.
4367
4598
  */
4368
4599
  getSettings(input?: {
4369
4600
  signal?: AbortSignal;
@@ -4472,5 +4703,69 @@ export declare function client(t: Transport): {
4472
4703
  getWorkspaceSyncHead(input?: {
4473
4704
  signal?: AbortSignal;
4474
4705
  }): Promise<Reply<200, SyncChanges>>;
4706
+ /**
4707
+ * Allow a secret a host
4708
+ *
4709
+ * 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).
4710
+ */
4711
+ allowEnvHost(input: {
4712
+ path: {
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. */
4716
+ signal?: AbortSignal;
4717
+ }): Promise<Reply<200, EnvVar>>;
4718
+ /**
4719
+ * The hosts the project's secrets asked for
4720
+ *
4721
+ * 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.
4722
+ */
4723
+ listEnvHostRequests(input?: {
4724
+ query?: {
4725
+ status?: "asked" | "allowed" | "dismissed";
4726
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
4727
+ signal?: AbortSignal;
4728
+ }): Promise<Reply<200, SecretHostRequestList>>;
4729
+ /**
4730
+ * Dismiss an ask
4731
+ *
4732
+ * 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).
4733
+ */
4734
+ dismissEnvHostRequest(input: {
4735
+ path: {
4736
+ request_id: string;
4737
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
4738
+ signal?: AbortSignal;
4739
+ }): Promise<Reply<200, SecretHostRequest>>;
4740
+ /**
4741
+ * Allow an ask
4742
+ *
4743
+ * 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).
4744
+ */
4745
+ allowEnvHostRequest(input: {
4746
+ path: {
4747
+ request_id: string;
4748
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
4749
+ signal?: AbortSignal;
4750
+ }): Promise<Reply<200, SecretHostRequest>>;
4751
+ /**
4752
+ * The agents' secrets' allowances
4753
+ *
4754
+ * 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.
4755
+ */
4756
+ listEnvAllowances(input?: {
4757
+ signal?: AbortSignal;
4758
+ }): Promise<Reply<200, SecretHostAllowanceList>>;
4759
+ /**
4760
+ * Take an allowance away
4761
+ *
4762
+ * 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).
4763
+ */
4764
+ deleteEnvAllowance(input: {
4765
+ path: {
4766
+ allowance_id: string;
4767
+ }; /** Stops the call: the request in flight, a wait before a retry, a proof-of-work being solved. */
4768
+ signal?: AbortSignal;
4769
+ }): Promise<Reply<204, undefined>>;
4475
4770
  };
4476
4771
  export type Client = ReturnType<typeof client>;
@@ -218,7 +218,7 @@ export type AudienceWithin = {
218
218
  };
219
219
  export type AliasRequest = {
220
220
  /**
221
- * One id.
221
+ * One id. An app (the publishable key) names its signed-in user's id and its own anonymous ids (anon_…, as the SDKs make them) only: any other id is someone else's and is refused (400 distinct_id_not_yours); the project's server names whom it means.
222
222
  */
223
223
  from: string;
224
224
  /**
@@ -230,7 +230,7 @@ export type AliasRequest = {
230
230
  */
231
231
  timestamp?: number;
232
232
  /**
233
- * The other: the event is under it.
233
+ * The other: the event is under it. An app (the publishable key) names its signed-in user's id and its own anonymous ids (anon_…, as the SDKs make them) only: any other id is someone else's and is refused (400 distinct_id_not_yours); the project's server names whom it means.
234
234
  */
235
235
  to: string;
236
236
  };
@@ -298,7 +298,7 @@ export type CaptureRequest = {
298
298
  */
299
299
  app_version?: string;
300
300
  /**
301
- * Who did it (256 characters at most). With a user's token, the user's id instead; with user_id, the user's id. Required unless user_id names the user.
301
+ * Who did it (256 characters at most). With a user's token, the user's id instead; with user_id, the user's id. Required unless user_id names the user. An app (the publishable key) names its signed-in user's id and its own anonymous ids (anon_…, as the SDKs make them) only: any other id is someone else's and is refused (400 distinct_id_not_yours); the project's server names whom it means.
302
302
  */
303
303
  distinct_id?: string;
304
304
  /**
@@ -634,11 +634,11 @@ export type FunnelStep = {
634
634
  };
635
635
  export type IdentifyRequest = {
636
636
  /**
637
- * The anonymous id they had.
637
+ * The anonymous id they had. An app (the publishable key) names its signed-in user's id and its own anonymous ids (anon_…, as the SDKs make them) only: any other id is someone else's and is refused (400 distinct_id_not_yours); the project's server names whom it means.
638
638
  */
639
639
  anonymous_id?: string;
640
640
  /**
641
- * The user's id.
641
+ * The user's id: with a user's token, theirs whatever this says. An app (the publishable key) names its signed-in user's id and its own anonymous ids (anon_…, as the SDKs make them) only: any other id is someone else's and is refused (400 distinct_id_not_yours); the project's server names whom it means.
642
642
  */
643
643
  distinct_id: string;
644
644
  /**
@@ -729,7 +729,7 @@ export type PeopleRequest = {
729
729
  [key: string]: unknown;
730
730
  };
731
731
  /**
732
- * Whose properties: the anonymous id with no one signed in; the person the server means.
732
+ * Whose properties: the anonymous id with no one signed in; the person the server means. An app (the publishable key) names its signed-in user's id and its own anonymous ids (anon_…, as the SDKs make them) only: any other id is someone else's and is refused (400 distinct_id_not_yours); the project's server names whom it means.
733
733
  */
734
734
  distinct_id?: string;
735
735
  /**
@@ -1327,7 +1327,7 @@ export type TraceRequest = {
1327
1327
  [key: string]: unknown;
1328
1328
  };
1329
1329
  /**
1330
- * Whose (the signed-in user's when absent).
1330
+ * Whose (the signed-in user's when absent). An app (the publishable key) names its signed-in user's id and its own anonymous ids (anon_…, as the SDKs make them) only: any other id is someone else's and is refused (400 distinct_id_not_yours); the project's server names whom it means.
1331
1331
  */
1332
1332
  distinct_id?: string;
1333
1333
  /**