palbase 0.63.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.
- package/dist/ai/index.js +2 -2
- package/dist/backend/engine.js +2 -2
- package/dist/backend/env.js +1 -1
- package/dist/backend/index.js +3 -3
- package/dist/backend/stack.js +1 -1
- package/dist/backend/test.js +2 -2
- package/dist/chunks/{COXA3LDU.js → 2FPPZ3A3.js} +2 -2
- package/dist/chunks/{5KIV2VHK.js → 47YRZOKH.js} +2 -2
- package/dist/chunks/{VHTT6VB5.js → 73CKSYD7.js} +2 -2
- package/dist/chunks/{T74PPGHJ.js → 7WLAMFND.js} +2 -2
- package/dist/chunks/{XPKA7LAF.js → AUCNHNPD.js} +2 -2
- package/dist/chunks/{G4UNJNUL.js → B6FEEB5R.js} +1 -1
- package/dist/chunks/{BVR7H5RY.js → D2Z5R7ZP.js} +1 -1
- package/dist/chunks/{WXOQLEUW.js → HWDOVTN4.js} +2 -2
- package/dist/chunks/K4E27V7K.js +2 -0
- package/dist/chunks/{LGGBVI33.js → KRYGPGVB.js} +2 -2
- package/dist/chunks/{EJ7YD4YY.js → MUHCCKSS.js} +1 -1
- package/dist/chunks/{IX4TWJ7J.js → MVHF5I2L.js} +2 -2
- package/dist/chunks/QDAQJXBR.js +18 -0
- package/dist/chunks/{UDS4W77D.js → RCV4YOM6.js} +1 -1
- package/dist/chunks/{SWB2U22R.js → SKPSBDXT.js} +2 -2
- package/dist/chunks/{IXFSQYJA.js → TNY6UGJZ.js} +2 -2
- package/dist/chunks/{ZG2LQB5B.js → TTDCC4FL.js} +1 -1
- package/dist/chunks/{7YRDXDVI.js → U6S2T2FE.js} +2 -2
- package/dist/chunks/{XHTUT6AV.js → UAD4XPIB.js} +2 -2
- package/dist/chunks/{RFRPB2IR.js → XDGXREXS.js} +1 -1
- package/dist/chunks/{YWG7F44Q.js → XIHO4HVO.js} +1 -1
- package/dist/chunks/{KGP3V3IA.js → ZO7BWXF3.js} +2 -2
- package/dist/chunks/{WUQWOSEI.js → ZZLCBUNM.js} +2 -2
- package/dist/cli.js +10802 -349
- package/dist/cloud/index.js +2 -2
- 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 +2 -2
- package/package.json +2 -2
- package/types/ai/src/chats.d.ts +20 -2
- package/types/ai/src/index.d.ts +2 -2
- package/types/ai/src/pools.d.ts +158 -9
- package/types/ai/src/tools.d.ts +83 -2
- package/types/cloud/src/generated/project.d.ts +1 -1
- package/types/internal/src/modules/ai.d.ts +305 -10
- package/types/internal/src/modules/events.d.ts +2 -2
- package/dist/chunks/5TXSFJYI.js +0 -18
- package/dist/chunks/BP35TQMR.js +0 -2
package/types/ai/src/pools.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type * as modules from '../../internal/src/modules/index.js';
|
|
2
|
+
import { type EnvInject, type SecretDescription } from './tools.js';
|
|
2
3
|
type Module = ReturnType<typeof modules.ai.client>;
|
|
3
4
|
/** A runner pool of the project's: its machines of one type — an operating system and an architecture. */
|
|
4
5
|
export interface Pool {
|
|
@@ -142,32 +143,180 @@ export interface PoolMachines {
|
|
|
142
143
|
signal?: AbortSignal;
|
|
143
144
|
}): Promise<void>;
|
|
144
145
|
}
|
|
145
|
-
/** One of the project's variables: its name, never its value. */
|
|
146
|
+
/** One of the project's variables: its name and what it says of itself, never its value. */
|
|
146
147
|
export interface EnvVariable {
|
|
147
148
|
key: string;
|
|
148
|
-
/** Whether it is a secret
|
|
149
|
+
/** Whether it is a secret; every value is masked in a transcript either way. */
|
|
149
150
|
secret: boolean;
|
|
151
|
+
/**
|
|
152
|
+
* The hosts a request may carry it to ([]: none yet — delivered as it is; always [] for an open secret or one that is
|
|
153
|
+
* no secret).
|
|
154
|
+
*/
|
|
155
|
+
hosts: string[];
|
|
156
|
+
/** Where in a request to one of its hosts it may be put: header, query, body. */
|
|
157
|
+
inject: (EnvInject | (string & {}))[];
|
|
158
|
+
/** Whether the agent reads it as it is (an open secret). */
|
|
159
|
+
open: boolean;
|
|
150
160
|
updatedAt: string;
|
|
151
161
|
}
|
|
162
|
+
/**
|
|
163
|
+
* What a set says of the variable beside its value: whether it is a secret, and what the secret says of itself — and the
|
|
164
|
+
* acknowledgements the platform asks for (acknowledgeOpen for an open secret or a secret made none, acknowledgeGuessable
|
|
165
|
+
* for a sealed value a person may have chosen).
|
|
166
|
+
*/
|
|
167
|
+
export interface EnvVariableOptions extends SecretDescription {
|
|
168
|
+
/**
|
|
169
|
+
* A secret unless false — one that is not is given to the agent as it is: no hosts, not open. A secret made one that
|
|
170
|
+
* is not is said with acknowledgeOpen: true (400 open_not_acknowledged); a new variable made none needs it not.
|
|
171
|
+
*/
|
|
172
|
+
secret?: boolean;
|
|
173
|
+
signal?: AbortSignal;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* A sealed secret an agent sent to a host it is not allowed for: the placeholder went as it is, and its owners are
|
|
177
|
+
* asked — allowed (hostRequests.allow, for any ask) or dismissed.
|
|
178
|
+
*/
|
|
179
|
+
export interface SecretHostRequest {
|
|
180
|
+
/** The ask (shr_…): allowed or dismissed by it. */
|
|
181
|
+
requestId: string;
|
|
182
|
+
/** The secret's name. */
|
|
183
|
+
key: string;
|
|
184
|
+
/** The agent whose own secret it is (its definition's env); null: one of the project's variables. */
|
|
185
|
+
agent: string | null;
|
|
186
|
+
/**
|
|
187
|
+
* Whose definition the agent's is — kept (an agent the project keeps), chat (a chat's own definition), backend (its
|
|
188
|
+
* backend's, at each turn) —; null: one of the project's variables. An ask and its Allow are that agent's alone.
|
|
189
|
+
*/
|
|
190
|
+
origin: 'kept' | 'chat' | 'backend' | (string & {}) | null;
|
|
191
|
+
/** The host it was sent to. Nobody has checked who runs it. */
|
|
192
|
+
host: string;
|
|
193
|
+
/**
|
|
194
|
+
* The registrable domain the host is under (evil.io for api.stripe.com.evil.io): what an Allow hands the secret to,
|
|
195
|
+
* whoever holds it.
|
|
196
|
+
*/
|
|
197
|
+
domain: string;
|
|
198
|
+
status: 'asked' | 'allowed' | 'dismissed' | (string & {});
|
|
199
|
+
/** How many times it was sent there. */
|
|
200
|
+
asks: number;
|
|
201
|
+
firstAskedAt: string;
|
|
202
|
+
lastAskedAt: string;
|
|
203
|
+
/** When it was allowed or dismissed; null: not yet. */
|
|
204
|
+
decidedAt: string | null;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* The hosts the project's sealed secrets were sent to that they are not allowed for: its owners' to allow or dismiss.
|
|
208
|
+
* Allow and Dismiss are a person's alone — an owner or an admin of the organization signed in to Studio (AI › Secrets)
|
|
209
|
+
* or to the CLI as themselves (palbase ai:env:hosts:allow, :dismiss) — never a key or a token, the project's secret key
|
|
210
|
+
* included (403 person_required): with the secret key, the asks are read.
|
|
211
|
+
*/
|
|
212
|
+
export interface SecretHostRequests {
|
|
213
|
+
/**
|
|
214
|
+
* Those of one status — asked (the default), allowed, dismissed — newest first: each secret and host once, with how
|
|
215
|
+
* many times. A project keeps 500 asked (50 a secret, 100 an agent's own secrets: an ask past them forgets an asked one
|
|
216
|
+
* alone, never a decision), 500 dismissed and 500 allowed. Its owners are told at most 3 a day of one secret's, 10 of
|
|
217
|
+
* the project's.
|
|
218
|
+
*/
|
|
219
|
+
list(options?: {
|
|
220
|
+
status?: 'asked' | 'allowed' | 'dismissed';
|
|
221
|
+
signal?: AbortSignal;
|
|
222
|
+
}): Promise<SecretHostRequest[]>;
|
|
223
|
+
/**
|
|
224
|
+
* The owner's Allow, for any ask: its host is added to the variable's hosts (one of the project's: 32 at most), or to
|
|
225
|
+
* the project's allowances (an agent's own secret: allowances.list(), 500 at most), and the asks it now allows are
|
|
226
|
+
* marked allowed. Allow only a host you know the secret belongs to: an agent can be led to send a secret anywhere.
|
|
227
|
+
* A person's alone (403 person_required); 409 not_a_sealed_secret, too_many_hosts.
|
|
228
|
+
*/
|
|
229
|
+
allow(requestId: string, options?: {
|
|
230
|
+
signal?: AbortSignal;
|
|
231
|
+
}): Promise<SecretHostRequest>;
|
|
232
|
+
/**
|
|
233
|
+
* It is never told again (still counted). One allowed is not undone here (409 already_allowed): its host is the
|
|
234
|
+
* secret's — a project's variable's hosts said again (set(key, value, { hosts }), with its value), an agent's taken
|
|
235
|
+
* away from the allowances (a person's: allowances.remove). A person's alone (403 person_required).
|
|
236
|
+
*/
|
|
237
|
+
dismiss(requestId: string, options?: {
|
|
238
|
+
signal?: AbortSignal;
|
|
239
|
+
}): Promise<SecretHostRequest>;
|
|
240
|
+
}
|
|
241
|
+
/** A host an agent's own secret may go to beside its definition's: an owner's Allow of an ask. */
|
|
242
|
+
export interface SecretHostAllowance {
|
|
243
|
+
/** The allowance (sha_…): taken away by it. */
|
|
244
|
+
allowanceId: string;
|
|
245
|
+
/** Whose definition the agent's is: kept, chat or backend (SecretHostRequest.origin). */
|
|
246
|
+
origin: 'kept' | 'chat' | 'backend' | (string & {});
|
|
247
|
+
/** The agent whose own secret it is. */
|
|
248
|
+
agent: string;
|
|
249
|
+
/** The secret's name. */
|
|
250
|
+
key: string;
|
|
251
|
+
/** The host. */
|
|
252
|
+
host: string;
|
|
253
|
+
/** The registrable domain the host is under. */
|
|
254
|
+
domain: string;
|
|
255
|
+
allowedAt: string;
|
|
256
|
+
/** The person who allowed it (their user id). */
|
|
257
|
+
allowedBy: string;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* The hosts the project's agents' own secrets are allowed beside their definitions': each an owner's Allow of an ask.
|
|
261
|
+
* A new value keeps them; one goes with its key — a kept agent's once neither its draft nor its version published has
|
|
262
|
+
* it, a chat's own definition's with the last chat that has it, a backend's agent's after 30 days with no turn.
|
|
263
|
+
*/
|
|
264
|
+
export interface SecretHostAllowances {
|
|
265
|
+
/** Newest first (500 at most). */
|
|
266
|
+
list(options?: {
|
|
267
|
+
signal?: AbortSignal;
|
|
268
|
+
}): Promise<SecretHostAllowance[]>;
|
|
269
|
+
/**
|
|
270
|
+
* The host taken away from the agent's secret: a request carrying it there is asked again. A person's alone (403
|
|
271
|
+
* person_required): never a key or a token, the project's secret key included.
|
|
272
|
+
*/
|
|
273
|
+
remove(allowanceId: string, options?: {
|
|
274
|
+
signal?: AbortSignal;
|
|
275
|
+
}): Promise<void>;
|
|
276
|
+
}
|
|
152
277
|
/**
|
|
153
278
|
* The project's variables: every command of every session of its agents begun from now has them — on the platform's
|
|
154
279
|
* Linux machines and on its own pools — beside an agent's own (its definition's env), masked in a transcript. A value
|
|
155
|
-
* is sealed where the sessions run: never answered, never logged.
|
|
280
|
+
* is sealed where the sessions run: never answered, never logged. A secret says where it may go (hosts), where in a
|
|
281
|
+
* request it may be put (inject) and whether the agent reads it as it is (open); a field left out keeps what it has.
|
|
282
|
+
* A sealed value is held to the platform's value rules (SecretDescription): 8 bytes or more on one line
|
|
283
|
+
* (secret_unusable), not one a person may have chosen unless acknowledgeGuessable (secret_guessable).
|
|
156
284
|
*/
|
|
157
285
|
export interface EnvVariables {
|
|
158
|
-
/**
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
286
|
+
/**
|
|
287
|
+
* Sets one, or sets it anew: a value of 1 byte to 32 KiB, no NUL; a secret unless secret: false — a value that is no
|
|
288
|
+
* secret (a region, a scheme) says so, or a short one is refused (secret_unusable). Hosts, inject and open left out
|
|
289
|
+
* keep what it says; open: true is said with acknowledgeOpen: true, and so is a secret made none.
|
|
290
|
+
*/
|
|
291
|
+
set(key: string, value: string, options?: EnvVariableOptions): Promise<EnvVariable>;
|
|
292
|
+
/**
|
|
293
|
+
* Changes what a variable set before says of itself — whether it is a secret, its hosts, where it is put, whether it
|
|
294
|
+
* is open — and keeps its value (404 for one never set). A person's change alone: an owner or an admin of the
|
|
295
|
+
* organization signed in to Studio or to the CLI as themselves, never a key or a token, the project's secret key
|
|
296
|
+
* included (403 person_required) — with the secret key, they are said with the value (set).
|
|
297
|
+
*/
|
|
298
|
+
update(key: string, change: EnvVariableOptions): Promise<EnvVariable>;
|
|
163
299
|
/** Sessions begun from now no longer have it. */
|
|
164
300
|
unset(key: string, options?: {
|
|
165
301
|
signal?: AbortSignal;
|
|
166
302
|
}): Promise<void>;
|
|
167
|
-
/** Their names, sorted — whether each is a secret, and when it was set: never a value. */
|
|
303
|
+
/** Their names, sorted — whether each is a secret, what it says of itself, and when it was set: never a value. */
|
|
168
304
|
list(options?: {
|
|
169
305
|
signal?: AbortSignal;
|
|
170
306
|
}): Promise<EnvVariable[]>;
|
|
307
|
+
/**
|
|
308
|
+
* The owner's Allow, for one of the project's variables: the host is added to a sealed secret's hosts (32 at most),
|
|
309
|
+
* and the asks it allows are marked allowed. Allow only a host you know the secret belongs to: an agent can be led to
|
|
310
|
+
* send a secret anywhere. A person's alone (403 person_required, the project's secret key included); 409
|
|
311
|
+
* not_a_sealed_secret, too_many_hosts (a variable's 32), too_many_allowances (an agent's secret's, 500 a project).
|
|
312
|
+
*/
|
|
313
|
+
allowHost(key: string, host: string, options?: {
|
|
314
|
+
signal?: AbortSignal;
|
|
315
|
+
}): Promise<EnvVariable>;
|
|
316
|
+
/** The hosts its sealed secrets were sent to that they are not allowed for. */
|
|
317
|
+
readonly hostRequests: SecretHostRequests;
|
|
318
|
+
/** The hosts its agents' own secrets are allowed beside their definitions'. */
|
|
319
|
+
readonly allowances: SecretHostAllowances;
|
|
171
320
|
}
|
|
172
321
|
export declare function poolsOf(module: Module): {
|
|
173
322
|
pools: Pools;
|
package/types/ai/src/tools.d.ts
CHANGED
|
@@ -267,6 +267,60 @@ export interface PreparedOutput {
|
|
|
267
267
|
readonly name: string;
|
|
268
268
|
readonly prepared: PreparedSchema<unknown>;
|
|
269
269
|
}
|
|
270
|
+
/** Where in a request to one of its hosts a sealed secret may be put: a header (the default), the query, the body. */
|
|
271
|
+
export type EnvInject = 'header' | 'query' | 'body';
|
|
272
|
+
/**
|
|
273
|
+
* What a secret says of itself beside its value — a project's variable's (ai.env) and an agent's own (its env). A
|
|
274
|
+
* sealed secret (the default) is a placeholder the proxy beside the machines swaps for its value only on a request to
|
|
275
|
+
* one of its hosts; an open one the agent reads as it is. Nothing of how a value is delivered changes until that proxy
|
|
276
|
+
* does: a secret with no host yet is delivered as it is.
|
|
277
|
+
*
|
|
278
|
+
* A sealed value is 8 bytes or more on one line — no CR, LF or NUL (400 secret_unusable) — and one a person may have
|
|
279
|
+
* chosen (fewer than 16 characters, or one kind of character only: digits, lower-case, upper-case or other) is said
|
|
280
|
+
* with acknowledgeGuessable: true (400 secret_guessable); the platform decides, on every write of a value. An open
|
|
281
|
+
* secret's value and one that is no secret's are the agent's to read anyway: neither is held to them.
|
|
282
|
+
*
|
|
283
|
+
* Said without its value, a change of where a secret goes — its hosts, inject, open, secret — is a person's alone: an
|
|
284
|
+
* owner or an admin of the organization signed in (Studio, or the CLI signed in as themselves), never a key or a token,
|
|
285
|
+
* the project's secret key included (403 person_required). With its value, it is said as before.
|
|
286
|
+
*/
|
|
287
|
+
export interface SecretDescription {
|
|
288
|
+
/**
|
|
289
|
+
* The hosts a request may carry it to (32 at most): an exact DNS name (api.stripe.com) or *. and one (*.stripe.com:
|
|
290
|
+
* one label more) — lower-case ASCII, punycode for another script; no IP address, port, single-label name, public
|
|
291
|
+
* suffix or wildcard over one, and no wildcard over palbase.studio (the platform says which it refuses). Given, the
|
|
292
|
+
* secret is sealed, and they are its hosts; [] takes them all away.
|
|
293
|
+
*/
|
|
294
|
+
hosts?: string[];
|
|
295
|
+
/** Where in a request to one of its hosts it may be put: header (the default), query, body — at least one. Never over plain http. */
|
|
296
|
+
inject?: EnvInject[];
|
|
297
|
+
/** true: the agent reads it as it is — no hosts, no inject — said with acknowledgeOpen; false: sealed. */
|
|
298
|
+
open?: boolean;
|
|
299
|
+
/**
|
|
300
|
+
* A secret unless false: one that is not is a plain variable the agent reads as it is — no hosts, no inject, never
|
|
301
|
+
* open. A secret made one that is not is said with acknowledgeOpen.
|
|
302
|
+
*/
|
|
303
|
+
secret?: boolean;
|
|
304
|
+
/**
|
|
305
|
+
* Said with open: true, and with secret: false where a secret becomes none — you read that the agent then reads it as
|
|
306
|
+
* it is, so anyone who can drive the project's agents (an app's user where the project lets them, a prompt the agent
|
|
307
|
+
* reads) can get its value.
|
|
308
|
+
*/
|
|
309
|
+
acknowledgeOpen?: boolean;
|
|
310
|
+
/**
|
|
311
|
+
* Said with a sealed value a person may have chosen (fewer than 16 characters, or one kind of character only): you
|
|
312
|
+
* read that the proxy hides a sealed value an allowed host echoes back, which lets an agent confirm a guess there.
|
|
313
|
+
*/
|
|
314
|
+
acknowledgeGuessable?: boolean;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* One of an agent's own variables with what the secret says of itself: its value ('' or left out keeps the one it has).
|
|
318
|
+
* A value that is no secret — a scheme, a region — is { value, secret: false }: a bare value is a sealed secret, held to
|
|
319
|
+
* the value rules.
|
|
320
|
+
*/
|
|
321
|
+
export interface AgentEnvEntry extends SecretDescription {
|
|
322
|
+
value?: string;
|
|
323
|
+
}
|
|
270
324
|
/** What an agent is: for a chat's turn, and for its one-shot answers (ai.generate({ agent })). */
|
|
271
325
|
export interface AgentDefinitionInput {
|
|
272
326
|
/**
|
|
@@ -302,9 +356,15 @@ export interface AgentDefinitionInput {
|
|
|
302
356
|
* The agent's own variables, name → value (64 at most; a name upper-case letters, digits and _, a letter first, not
|
|
303
357
|
* PALAI_…; a value 32 KiB at most): every command of its sessions has them, on every pool, beside the project's
|
|
304
358
|
* (ai.env.set), masked in a transcript. A value is never read back — a definition read says each name with '' — and a
|
|
305
|
-
* name written with '' keeps the value it has.
|
|
359
|
+
* name written with '' keeps the value it has. A secret may say more of itself — the hosts it may go to, where in a
|
|
360
|
+
* request it may be put, whether the agent reads it as it is, whether it is a secret at all — as { value, hosts,
|
|
361
|
+
* inject, open, secret, acknowledgeOpen, acknowledgeGuessable } (AgentEnvEntry); written as a bare value, it keeps
|
|
362
|
+
* what it said. A bare value is a sealed secret: 8 bytes or more on one line, not one a person may have chosen
|
|
363
|
+
* (secret_unusable, secret_guessable) — a value that is no secret is { value, secret: false }. A value kept ('')
|
|
364
|
+
* that says itself otherwise than the definition it is written over is a person's change (403 person_required for
|
|
365
|
+
* the project's secret key): give its value with it.
|
|
306
366
|
*/
|
|
307
|
-
env?: Record<string, string>;
|
|
367
|
+
env?: Record<string, string | AgentEnvEntry>;
|
|
308
368
|
/** A shell script each of its sessions runs once at its start, before the agent's first command, on every pool (64 KiB at most). */
|
|
309
369
|
setup?: string;
|
|
310
370
|
/**
|
|
@@ -442,6 +502,27 @@ export declare const ENV_KEY: RegExp;
|
|
|
442
502
|
export declare const MAX_ENV_VALUE_BYTES: number;
|
|
443
503
|
/** Whether a name is one a variable may have: never one of PALAI_…, the engine's own. */
|
|
444
504
|
export declare function envKeyOk(key: unknown): key is string;
|
|
505
|
+
/** The most hosts a secret is allowed for. */
|
|
506
|
+
export declare const MAX_SECRET_HOSTS = 32;
|
|
507
|
+
/** What a secret says of itself as the module takes it — field by field, in its words: it refuses a field it does not know. */
|
|
508
|
+
export interface WireSecretDescription {
|
|
509
|
+
hosts?: string[];
|
|
510
|
+
inject?: EnvInject[];
|
|
511
|
+
open?: boolean;
|
|
512
|
+
secret?: boolean;
|
|
513
|
+
acknowledge_open?: boolean;
|
|
514
|
+
acknowledge_guessable?: boolean;
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* What a secret says of itself as the module takes it, refused here where its shape is wrong. Which host the module
|
|
518
|
+
* takes is its own to say; a refusal names a host by its place, never by what was written there — a value pasted where
|
|
519
|
+
* a host goes is not repeated.
|
|
520
|
+
*/
|
|
521
|
+
export declare function secretDescriptionOf(d: SecretDescription, what: string): WireSecretDescription;
|
|
522
|
+
/** A refusal of a secret's write said in the SDK's words (what: the call, as its caller wrote it); anything else as it was. */
|
|
523
|
+
export declare function secretRefusal(e: unknown, what: string): unknown;
|
|
524
|
+
/** The same promise, a refusal of a secret's write said as secretRefusal says it. */
|
|
525
|
+
export declare function secretTold<T>(p: Promise<T>, what: string): Promise<T>;
|
|
445
526
|
/** The shape of an agent's one-shot answers as the module takes it: the JSON Schema generate's schema is sent as. */
|
|
446
527
|
export declare function outputOf(v: StandardSchema | PreparedOutput, what: string): Record<string, unknown>;
|
|
447
528
|
/** A definition's bound on its tool calls, refused here as the module would refuse it. */
|
|
@@ -2,7 +2,7 @@ import * as modules from '../../../internal/src/modules/index.js';
|
|
|
2
2
|
import type { Transport } from '../../../internal/src/transport.js';
|
|
3
3
|
/** A project's environment as an access token reaches it: each module's operations under the paths the edge opens to one, a server's calls. */
|
|
4
4
|
export interface Project {
|
|
5
|
-
ai: Pick<modules.ai.Client, "draftAgent" | "listAgents" | "getAgent" | "putAgent" | "deleteAgent" | "publishAgent" | "rollbackAgent" | "listAgentVersions" | "listChats" | "createChat" | "getChat" | "deleteChat" | "decideChatApproval" | "forkChat" | "getChatGoal" | "setChatGoal" | "clearChatGoal" | "updateChatGoal" | "putChatMember" | "deleteChatMember" | "listChatMessages" | "sendChatMessage" | "getChatMessageAttachment" | "listChatParts" | "putChatPipe" | "deleteChatPipe" | "sendSubagentMessage" | "stopSubagent" | "stopChat" | "listTurnToolCalls" | "getChatToolCall" | "answerChatToolCall" | "listChatTurnArtifacts" | "getChatTurnArtifact" | "getChatTurnCost" | "startChatVoice" | "getChatVoice" | "closeChatVoice" | "commandChatVoice" | "getChatWorkspaceFile" | "putChatWorkspaceFile" | "deleteChatWorkspaceFile" | "addChatWorkspaceRepo" | "listChatWorkspaceTokens" | "createChatWorkspaceToken" | "revokeChatWorkspaceToken" | "createEmbeddings" | "listEndpoints" | "putEndpoint" | "deleteEndpoint" | "listEnv" | "putEnv" | "deleteEnv" | "createImage" | "getImage" | "getImageFile" | "deleteMachine" | "cordonMachine" | "resumeMachine" | "listModels" | "revokePoolKey" | "listPools" | "createPool" | "deletePool" | "listPoolKeys" | "createPoolKey" | "getPoolState" | "listProviders" | "connectProvider" | "disconnectProvider" | "listRepos" | "putRepo" | "deleteRepo" | "createResponse" | "getResponse" | "cancelResponse" | "followResponse" | "getSettings" | "putSettings" | "getSpend" | "askSupport" | "listTools" | "listUsage">;
|
|
5
|
+
ai: Pick<modules.ai.Client, "draftAgent" | "listAgents" | "getAgent" | "putAgent" | "deleteAgent" | "publishAgent" | "rollbackAgent" | "listAgentVersions" | "listChats" | "createChat" | "getChat" | "deleteChat" | "decideChatApproval" | "forkChat" | "getChatGoal" | "setChatGoal" | "clearChatGoal" | "updateChatGoal" | "putChatMember" | "deleteChatMember" | "listChatMessages" | "sendChatMessage" | "getChatMessageAttachment" | "listChatParts" | "putChatPipe" | "deleteChatPipe" | "sendSubagentMessage" | "stopSubagent" | "stopChat" | "listTurnToolCalls" | "getChatToolCall" | "answerChatToolCall" | "listChatTurnArtifacts" | "getChatTurnArtifact" | "getChatTurnCost" | "startChatVoice" | "getChatVoice" | "closeChatVoice" | "commandChatVoice" | "getChatWorkspaceFile" | "putChatWorkspaceFile" | "deleteChatWorkspaceFile" | "addChatWorkspaceRepo" | "listChatWorkspaceTokens" | "createChatWorkspaceToken" | "revokeChatWorkspaceToken" | "createEmbeddings" | "listEndpoints" | "putEndpoint" | "deleteEndpoint" | "listEnv" | "putEnv" | "deleteEnv" | "createImage" | "getImage" | "getImageFile" | "deleteMachine" | "cordonMachine" | "resumeMachine" | "listModels" | "revokePoolKey" | "listPools" | "createPool" | "deletePool" | "listPoolKeys" | "createPoolKey" | "getPoolState" | "listProviders" | "connectProvider" | "disconnectProvider" | "listRepos" | "putRepo" | "deleteRepo" | "createResponse" | "getResponse" | "cancelResponse" | "followResponse" | "getSettings" | "putSettings" | "getSpend" | "askSupport" | "listTools" | "listUsage" | "allowEnvHost" | "listEnvHostRequests" | "dismissEnvHostRequest" | "allowEnvHostRequest" | "listEnvAllowances" | "deleteEnvAllowance">;
|
|
6
6
|
analytics: Pick<modules.analytics.Client, "listAudiences" | "createAudience" | "previewAudience" | "getAudience" | "deleteAudience" | "updateAudience" | "listAudienceMembers" | "alias" | "batch" | "getEventBreakdown" | "capture" | "sendConsoleHistory" | "getConsoleConfig" | "listConsoleRecords" | "listEventNames" | "listEvents" | "getEventTimeline" | "runFunnel" | "identify" | "page" | "sendPerf" | "listPerfGroups" | "getPerfConfig" | "getPerfTimeline" | "listRequestLines" | "getMachineTraffic" | "runRetention" | "screen" | "getSettings" | "putSettings" | "getSummary" | "listTraces" | "sendTrace" | "sendTraceBatch" | "getTraceHops" | "listSessionTraces" | "getTraceSummary" | "getTraceTimeline" | "searchPeople" | "setPersonProperties" | "getPerson" | "listPersonEvents" | "getEventCatalog" | "defineEvent">;
|
|
7
7
|
auth: Pick<modules.auth.Client, "adminVerifyDeviceAssertion" | "adminGetAttestPolicy" | "adminGetAttestObservations" | "adminRecordAttestObservations" | "adminListAuditEvents" | "adminExportAuditEvents" | "adminVerifyAuditTrail" | "adminGetAuthSettings" | "adminUpdateAuthSettings" | "adminGetBreachWatch" | "adminListHooks" | "adminCreateHook" | "adminUpdateHook" | "adminDeleteHook" | "adminListHookExecutions" | "adminListIntegrations" | "adminPutIntegration" | "adminDeleteIntegration" | "adminListOAuthClients" | "adminCreateOAuthClient" | "adminGetOAuthClient" | "adminDeleteOAuthClient" | "adminUpdateOAuthClient" | "adminListProviders" | "adminGetPhoneSettings" | "adminUpdatePhoneSettings" | "adminToggleProvider" | "adminListRoles" | "adminUpsertRole" | "adminDeleteRole" | "adminListServiceAccounts" | "adminCreateServiceAccount" | "adminGetServiceAccount" | "adminRevokeServiceAccount" | "adminRotateServiceAccount" | "adminListSessions" | "adminRevokeSession" | "adminListSigningKeys" | "adminRotateSigningKey" | "socialAdminConfig" | "socialCredentialPut" | "socialCredentialDelete" | "socialProviderPatch" | "adminGetStats" | "adminSendTestTemplate" | "adminListTestUsers" | "adminCreateTestUsers" | "adminSetTestUserPhone" | "adminCreateTestSignupAddress" | "adminDeleteTestUser" | "adminCreateCustomToken" | "adminListUsers" | "adminCreateUser" | "adminImportUsers" | "adminGetUser" | "adminDeleteUser" | "adminUpdateUser" | "adminBanUser" | "adminGetUserConsents" | "adminRevokeUserCredentials" | "adminExportUser" | "adminListUserMfaFactors" | "adminResetUserMfa" | "adminResetUserPassword" | "adminListUserRoles" | "adminAssignUserRole" | "adminRevokeUserRole" | "adminRevokeUserSessions" | "adminUnbanUser" | "adminGetInstallationConsents" | "adminRefuseConsents" | "adminInviteUser">;
|
|
8
8
|
calls: Pick<modules.calls.Client, "adminListCalls" | "adminGetCall" | "adminEndCall" | "createCallTicket" | "getCallSettings" | "putCallSettings" | "rotateCallHookSecret">;
|