@sylphx/sdk 0.32.0 → 0.32.1
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/README.md +20 -0
- package/dist/access.d.ts +34 -0
- package/dist/access.js +14 -2
- package/dist/access.js.map +1 -1
- package/dist/agents.d.ts +1564 -0
- package/dist/agents.js +1096 -0
- package/dist/agents.js.map +1 -0
- package/dist/ai.js +1 -1
- package/dist/artifacts.js +1 -1
- package/dist/assets.js +1 -1
- package/dist/auth/client.js +1 -1
- package/dist/auth/end-user-keys-mock.d.ts +83 -0
- package/dist/auth/end-user-keys-mock.js +427 -0
- package/dist/auth/end-user-keys-mock.js.map +1 -0
- package/dist/auth/end-user-keys.d.ts +219 -0
- package/dist/auth/end-user-keys.js +240 -0
- package/dist/auth/end-user-keys.js.map +1 -0
- package/dist/auth/verify.js +1 -1
- package/dist/auth.d.ts +201 -2
- package/dist/auth.js +148 -2
- package/dist/auth.js.map +1 -1
- package/dist/billing.d.ts +86 -8
- package/dist/billing.js +39 -1
- package/dist/billing.js.map +1 -1
- package/dist/broker.js +1 -1
- package/dist/build.d.ts +361 -28
- package/dist/build.js +302 -10
- package/dist/build.js.map +1 -1
- package/dist/common.js +1 -1
- package/dist/config/flags.js +1 -1
- package/dist/config.js +1 -1
- package/dist/connections.js +1 -1
- package/dist/data.d.ts +52 -0
- package/dist/data.js +57 -1
- package/dist/data.js.map +1 -1
- package/dist/entitlement.js +1 -1
- package/dist/events/realtime.js +1 -1
- package/dist/events/webhooks.js +1 -1
- package/dist/events.js +1 -1
- package/dist/flags.d.ts +18 -0
- package/dist/flags.js +44 -0
- package/dist/flags.js.map +1 -0
- package/dist/hosting.js +1 -1
- package/dist/ids.d.ts +152 -2
- package/dist/ids.js +32 -2
- package/dist/ids.js.map +1 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +20 -2
- package/dist/index.js.map +1 -1
- package/dist/keys.js +1 -1
- package/dist/knowledge.d.ts +1192 -0
- package/dist/knowledge.js +1002 -0
- package/dist/knowledge.js.map +1 -0
- package/dist/localization.js +1 -1
- package/dist/methods.js +1563 -40
- package/dist/methods.js.map +1 -1
- package/dist/money.d.ts +1687 -7
- package/dist/money.js +1269 -1
- package/dist/money.js.map +1 -1
- package/dist/network.js +1 -1
- package/dist/notify.d.ts +346 -1
- package/dist/notify.js +249 -1
- package/dist/notify.js.map +1 -1
- package/dist/observability.d.ts +138 -0
- package/dist/observability.js +89 -1
- package/dist/observability.js.map +1 -1
- package/dist/realtime.d.ts +404 -0
- package/dist/realtime.js +312 -0
- package/dist/realtime.js.map +1 -0
- package/dist/release.js +1 -1
- package/dist/runners.js +1 -1
- package/dist/runtime.js +1 -1
- package/dist/sandboxes.js +1 -1
- package/dist/secrets.d.ts +336 -0
- package/dist/secrets.js +268 -1
- package/dist/secrets.js.map +1 -1
- package/dist/workflows.d.ts +119 -3
- package/dist/workflows.js +144 -4
- package/dist/workflows.js.map +1 -1
- package/package.json +2 -2
package/dist/agents.d.ts
ADDED
|
@@ -0,0 +1,1564 @@
|
|
|
1
|
+
import * as runtime from './runtime.js';
|
|
2
|
+
import './common.js';
|
|
3
|
+
import type * as common from './common.js';
|
|
4
|
+
import './sandboxes.js';
|
|
5
|
+
import type * as sandboxes from './sandboxes.js';
|
|
6
|
+
/**
|
|
7
|
+
* An Agent is a versioned agent definition: model, instructions, tools, MCP
|
|
8
|
+
* servers, skills, memory stores, tool policy and budget. Each create or
|
|
9
|
+
* update that changes `spec` mints a new immutable AgentVersion; a session
|
|
10
|
+
* pins the version it started on, so a change never alters a running
|
|
11
|
+
* conversation.
|
|
12
|
+
*/
|
|
13
|
+
export interface Agent {
|
|
14
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/agents/{agent}`. */
|
|
15
|
+
name?: string;
|
|
16
|
+
/** `agt_<cell><ulid>`; never reused. */
|
|
17
|
+
readonly uid?: string;
|
|
18
|
+
/** Resource metadata. */
|
|
19
|
+
meta?: common.ResourceMeta;
|
|
20
|
+
/** Desired state: the definition the next version takes. */
|
|
21
|
+
spec?: AgentSpec;
|
|
22
|
+
/** Observed state. */
|
|
23
|
+
readonly status?: AgentStatus;
|
|
24
|
+
}
|
|
25
|
+
/** AgentBudget caps what one turn and one session may spend. */
|
|
26
|
+
export interface AgentBudget {
|
|
27
|
+
/** Model and tool steps per turn, 1 to 1000; default 100. */
|
|
28
|
+
maxStepsPerTurn?: number;
|
|
29
|
+
/** One turn's wall-clock deadline, 10s to 24h; default 30m. */
|
|
30
|
+
turnTimeout?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Spend per session in micro-USD, models and tools together; 0 is the
|
|
33
|
+
* project's spend limit only.
|
|
34
|
+
*/
|
|
35
|
+
maxSessionSpendMicros?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* An AgentSession is a durable conversation with one pinned AgentVersion.
|
|
39
|
+
* Its conversation is its SessionEvent log. Each turn runs as one Sylphx
|
|
40
|
+
* Workflows Run, and each model call and tool call is a step keyed by
|
|
41
|
+
* `(session, turn, step)`, assigned by the runtime and never taken from the
|
|
42
|
+
* model's tool-call id. An idle session holds no Run and no compute.
|
|
43
|
+
*/
|
|
44
|
+
export interface AgentSession {
|
|
45
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/agent_sessions/{agent_session}`. */
|
|
46
|
+
name?: string;
|
|
47
|
+
/** `ases_<cell><ulid>`; never reused. */
|
|
48
|
+
readonly uid?: string;
|
|
49
|
+
/** Resource metadata. */
|
|
50
|
+
meta?: common.ResourceMeta;
|
|
51
|
+
/** The Agent the session talks to. */
|
|
52
|
+
agent?: string;
|
|
53
|
+
/**
|
|
54
|
+
* The AgentVersion the session pinned; the Agent's current version when
|
|
55
|
+
* unset at create.
|
|
56
|
+
*/
|
|
57
|
+
agentVersion?: string;
|
|
58
|
+
/**
|
|
59
|
+
* The Sylphx Auth end user the session belongs to, set from the caller's
|
|
60
|
+
* end-user session; empty for a session a secret key started. An end user
|
|
61
|
+
* reads and changes only their own sessions.
|
|
62
|
+
*/
|
|
63
|
+
readonly endUser?: string;
|
|
64
|
+
/** A short title; set by the caller or summarised by the runtime. */
|
|
65
|
+
title?: string;
|
|
66
|
+
/** The session's state. */
|
|
67
|
+
readonly state?: SessionState;
|
|
68
|
+
/** The number of turns started, from 0. */
|
|
69
|
+
readonly turnCount?: string;
|
|
70
|
+
/** The sequence of the newest event, from 0. */
|
|
71
|
+
readonly lastEventSequence?: string;
|
|
72
|
+
/** When the session was created. */
|
|
73
|
+
readonly createTime?: string;
|
|
74
|
+
/** When the last event was appended. */
|
|
75
|
+
readonly updateTime?: string;
|
|
76
|
+
/** What the session has used so far. */
|
|
77
|
+
readonly usage?: SessionUsage;
|
|
78
|
+
/** The Sylphx Sandboxes lease attached to the session, while it has one. */
|
|
79
|
+
readonly environmentLease?: string;
|
|
80
|
+
/**
|
|
81
|
+
* The immutable effective environment for this session. RunAgent resolves it
|
|
82
|
+
* from the pinned AgentVersion's frozen default and selected request overrides.
|
|
83
|
+
* For CreateAgentSession, omission inherits the pinned default; an explicit
|
|
84
|
+
* environment replaces it.
|
|
85
|
+
*/
|
|
86
|
+
environment?: EnvironmentSpec;
|
|
87
|
+
/**
|
|
88
|
+
* Session-scoped credential bindings, keyed by the tool or MCP credential
|
|
89
|
+
* name. Values are references or opaque handles, never secret values.
|
|
90
|
+
*/
|
|
91
|
+
credentials?: Record<string, CredentialBinding>;
|
|
92
|
+
/**
|
|
93
|
+
* Granted platform Profiles to mount when the session starts, each by
|
|
94
|
+
* resource name and mode. The runtime never puts profile values in events.
|
|
95
|
+
*/
|
|
96
|
+
profiles?: ProfileMount[];
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* AgentSpec is the caller-writable definition of an Agent. An AgentVersion
|
|
100
|
+
* holds a frozen copy of it.
|
|
101
|
+
*/
|
|
102
|
+
export interface AgentSpec {
|
|
103
|
+
/**
|
|
104
|
+
* The exact Sylphx AI catalog id (`ai_models`), set per Agent through the
|
|
105
|
+
* API as runtime state, never code or a deployed file. Agents in the same
|
|
106
|
+
* environment may use different models; the harness never remaps this id.
|
|
107
|
+
*/
|
|
108
|
+
model?: string;
|
|
109
|
+
/** The system instructions, at most 256 KiB. */
|
|
110
|
+
instructions?: string;
|
|
111
|
+
/** The tools the agent may call, at most 128, each `name` once. */
|
|
112
|
+
tools?: Tool[];
|
|
113
|
+
/** The MCP servers whose tools the agent may call, at most 32. */
|
|
114
|
+
mcpServers?: McpServer[];
|
|
115
|
+
/** Skills: instruction packs the agent loads when relevant, at most 64. */
|
|
116
|
+
skills?: Skill[];
|
|
117
|
+
/**
|
|
118
|
+
* The memory stores the agent recalls from and writes to, as MemoryStore
|
|
119
|
+
* names; at most 8.
|
|
120
|
+
*/
|
|
121
|
+
memoryStores?: string[];
|
|
122
|
+
/** The policy every tool call passes before it runs. */
|
|
123
|
+
toolPolicy?: ToolPolicy;
|
|
124
|
+
/** Spend and time limits per turn and per session. */
|
|
125
|
+
budget?: AgentBudget;
|
|
126
|
+
/**
|
|
127
|
+
* Whether end-user session access is intended for this agent. Reserved
|
|
128
|
+
* until the backend enforces end-user ownership; all contract methods
|
|
129
|
+
* currently require a secret key.
|
|
130
|
+
*/
|
|
131
|
+
endUserAccess?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Default session environment (shell, files, browser, computer use), frozen
|
|
134
|
+
* in each AgentVersion. RunAgent overlays only its selected environment
|
|
135
|
+
* fields on that pinned default and requires a valid fresh finite lease.
|
|
136
|
+
*/
|
|
137
|
+
environment?: EnvironmentSpec;
|
|
138
|
+
/**
|
|
139
|
+
* The execution harness, independent of `model`: `runtime` (default),
|
|
140
|
+
* `claude_code` or `codex`. It is part of the immutable version, not an
|
|
141
|
+
* environment-wide setting. An omitted or empty value means `runtime`.
|
|
142
|
+
*/
|
|
143
|
+
harness?: string;
|
|
144
|
+
}
|
|
145
|
+
/** AgentStatus is the observed state of an Agent. */
|
|
146
|
+
export interface AgentStatus {
|
|
147
|
+
/** The generation this status was computed from. */
|
|
148
|
+
readonly observedGeneration?: string;
|
|
149
|
+
/** Ready, Reconciling, Stalled. */
|
|
150
|
+
readonly conditions?: common.Condition[];
|
|
151
|
+
/** The newest version, which new sessions pin unless they name another. */
|
|
152
|
+
readonly currentVersion?: string;
|
|
153
|
+
/** The number of the newest version, from 1. */
|
|
154
|
+
readonly currentVersionNumber?: string;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* An AgentVersion is one immutable snapshot of an Agent's definition. It is
|
|
158
|
+
* written by the create or update that changed the Agent's spec, and never
|
|
159
|
+
* changed after.
|
|
160
|
+
*/
|
|
161
|
+
export interface AgentVersion {
|
|
162
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/agents/{agent}/agent_versions/{agent_version}`. */
|
|
163
|
+
name?: string;
|
|
164
|
+
/** `agv_<cell><ulid>`; never reused. */
|
|
165
|
+
readonly uid?: string;
|
|
166
|
+
/** Resource metadata. */
|
|
167
|
+
meta?: common.ResourceMeta;
|
|
168
|
+
/** The version number within the agent, from 1, with no gaps. */
|
|
169
|
+
readonly versionNumber?: string;
|
|
170
|
+
/** The definition, frozen. */
|
|
171
|
+
readonly spec?: AgentSpec;
|
|
172
|
+
/** The Agent generation that minted it. */
|
|
173
|
+
readonly agentGeneration?: string;
|
|
174
|
+
/** When it was minted. */
|
|
175
|
+
readonly createTime?: string;
|
|
176
|
+
}
|
|
177
|
+
/** An Approval is a tool call the policy sent to a person, and its answer. */
|
|
178
|
+
export interface Approval {
|
|
179
|
+
/** The ToolCall's `id`. */
|
|
180
|
+
readonly callId?: string;
|
|
181
|
+
/** The answer, once given; unset while it waits. */
|
|
182
|
+
readonly decision?: ApprovalDecision;
|
|
183
|
+
/**
|
|
184
|
+
* Whether the answer covers later calls of the same tool in this session
|
|
185
|
+
* ("always allow").
|
|
186
|
+
*/
|
|
187
|
+
readonly remember?: boolean;
|
|
188
|
+
/** Who answered. */
|
|
189
|
+
readonly principal?: string;
|
|
190
|
+
/** The reason given, if any. */
|
|
191
|
+
readonly reason?: string;
|
|
192
|
+
}
|
|
193
|
+
/** A BuiltinTool is a tool the platform provides. */
|
|
194
|
+
export interface BuiltinTool {
|
|
195
|
+
/** The built-in tool's id. */
|
|
196
|
+
id?: string;
|
|
197
|
+
/** Tool-specific settings, at most 16 KiB of JSON. */
|
|
198
|
+
config?: Record<string, unknown>;
|
|
199
|
+
}
|
|
200
|
+
/** Caller-owned grant capture; only opaque metadata is returned. */
|
|
201
|
+
export interface CaptureCredentialRequest {
|
|
202
|
+
/** The environment in which the caller holds the existing grant. */
|
|
203
|
+
parent: string;
|
|
204
|
+
/** The prospective or existing session to bind this handle to. */
|
|
205
|
+
session: string;
|
|
206
|
+
/** The turn allowed to use the execution credential. */
|
|
207
|
+
turn: string;
|
|
208
|
+
/** The existing caller-owned credential, stored encrypted and never logged. */
|
|
209
|
+
credential: string;
|
|
210
|
+
/** The issuer-provided expiry of the captured credential. */
|
|
211
|
+
expiresAt: string;
|
|
212
|
+
/** Pinned tool names allowed to inject this credential. */
|
|
213
|
+
allowedTools: string[];
|
|
214
|
+
/** execution, completion, or runtime; runtime handles never enter the guest. */
|
|
215
|
+
purpose: string;
|
|
216
|
+
}
|
|
217
|
+
/** A tool description embedded in a session catalog, not a named resource. */
|
|
218
|
+
export interface CatalogTool {
|
|
219
|
+
/** The tool name in the pinned agent version. */
|
|
220
|
+
name?: string;
|
|
221
|
+
/** The tool description presented to the agent harness. */
|
|
222
|
+
description?: string;
|
|
223
|
+
/** The JSON Schema of the tool's validated input. */
|
|
224
|
+
inputSchema?: Record<string, unknown>;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* A ClientTool is a tool the client runs: the session waits for its result
|
|
228
|
+
* in state `AWAITING_CLIENT`.
|
|
229
|
+
*/
|
|
230
|
+
export interface ClientTool {
|
|
231
|
+
/**
|
|
232
|
+
* How long the session waits for the result before the call fails, 1s to
|
|
233
|
+
* 24h; default 10m.
|
|
234
|
+
*/
|
|
235
|
+
timeout?: string;
|
|
236
|
+
}
|
|
237
|
+
/** Completion uses a tool in the pinned version, never a caller-supplied URL. */
|
|
238
|
+
export interface CompletionCall {
|
|
239
|
+
/** The authorized tool name in the pinned agent version. */
|
|
240
|
+
tool?: string;
|
|
241
|
+
/** Immutable literal tool input, excluding credentials and mapped result fields. */
|
|
242
|
+
arguments?: Record<string, unknown>;
|
|
243
|
+
/** Destination argument names mapped to runtime-produced result selectors. */
|
|
244
|
+
resultFields?: Record<string, ResultField>;
|
|
245
|
+
}
|
|
246
|
+
/** A ContentPart is one piece of a message. */
|
|
247
|
+
export interface ContentPart {
|
|
248
|
+
/** Text. */
|
|
249
|
+
text?: string;
|
|
250
|
+
/** A file, by Sylphx Data object URL or an https URL. */
|
|
251
|
+
file?: FileRef;
|
|
252
|
+
}
|
|
253
|
+
/** The request of CreateAgent. */
|
|
254
|
+
export interface CreateAgentRequest {
|
|
255
|
+
/** The parent to create in. */
|
|
256
|
+
parent: string;
|
|
257
|
+
/**
|
|
258
|
+
* The agent id, the final name segment; the server assigns one when
|
|
259
|
+
* empty.
|
|
260
|
+
*/
|
|
261
|
+
agentId?: string;
|
|
262
|
+
/** The agent to create; only caller-writable fields are read. */
|
|
263
|
+
agent: Agent;
|
|
264
|
+
/** Validate and return the result without writing anything. */
|
|
265
|
+
validateOnly?: boolean;
|
|
266
|
+
}
|
|
267
|
+
/** The request of CreateAgentSession. */
|
|
268
|
+
export interface CreateAgentSessionRequest {
|
|
269
|
+
/** The parent to create in. */
|
|
270
|
+
parent: string;
|
|
271
|
+
/**
|
|
272
|
+
* The session id, the final name segment; the server assigns one when
|
|
273
|
+
* empty.
|
|
274
|
+
*/
|
|
275
|
+
agentSessionId?: string;
|
|
276
|
+
/** The session to create; only caller-writable fields are read. */
|
|
277
|
+
agentSession: AgentSession;
|
|
278
|
+
/** Validate and return the result without writing anything. */
|
|
279
|
+
validateOnly?: boolean;
|
|
280
|
+
}
|
|
281
|
+
/** The request of CreateMemory. */
|
|
282
|
+
export interface CreateMemoryRequest {
|
|
283
|
+
/** The memory store to create in. */
|
|
284
|
+
parent: string;
|
|
285
|
+
/**
|
|
286
|
+
* The memory id, the final name segment; the server assigns one when
|
|
287
|
+
* empty.
|
|
288
|
+
*/
|
|
289
|
+
memoryId?: string;
|
|
290
|
+
/** The memory to create; only caller-writable fields are read. */
|
|
291
|
+
memory: Memory;
|
|
292
|
+
/** Validate and return the result without writing anything. */
|
|
293
|
+
validateOnly?: boolean;
|
|
294
|
+
}
|
|
295
|
+
/** The request of CreateMemoryStore. */
|
|
296
|
+
export interface CreateMemoryStoreRequest {
|
|
297
|
+
/** The parent to create in. */
|
|
298
|
+
parent: string;
|
|
299
|
+
/**
|
|
300
|
+
* The memory store id, the final name segment; the server assigns one when
|
|
301
|
+
* empty.
|
|
302
|
+
*/
|
|
303
|
+
memoryStoreId?: string;
|
|
304
|
+
/** The memory store to create; only caller-writable fields are read. */
|
|
305
|
+
memoryStore: MemoryStore;
|
|
306
|
+
/** Validate and return the result without writing anything. */
|
|
307
|
+
validateOnly?: boolean;
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* A CredentialBinding names where the gateway takes a credential from. The
|
|
311
|
+
* value is resolved at egress only; the model, the event log and traces see
|
|
312
|
+
* the binding, never the value.
|
|
313
|
+
*/
|
|
314
|
+
export interface CredentialBinding {
|
|
315
|
+
/** A Kernel Secret of this environment, by name. */
|
|
316
|
+
secret?: string;
|
|
317
|
+
/** A Kernel Connection (a third-party OAuth installation), by name. */
|
|
318
|
+
connection?: string;
|
|
319
|
+
/**
|
|
320
|
+
* The end user's own grant in Sylphx Auth's agent token vault, by
|
|
321
|
+
* provider id; the session's end user must hold it.
|
|
322
|
+
*/
|
|
323
|
+
endUserProvider?: string;
|
|
324
|
+
/**
|
|
325
|
+
* How the value is sent: `bearer` (default), `header:<Name>` or
|
|
326
|
+
* `query:<name>`.
|
|
327
|
+
*/
|
|
328
|
+
placement?: string;
|
|
329
|
+
/**
|
|
330
|
+
* An opaque credential handle issued for this session, resolved only at
|
|
331
|
+
* egress. This is never a credential value.
|
|
332
|
+
*/
|
|
333
|
+
handle?: string;
|
|
334
|
+
}
|
|
335
|
+
/** An opaque session-bound reference to a captured grant, not a CRUD resource. */
|
|
336
|
+
export interface CredentialHandle {
|
|
337
|
+
/** The opaque handle; it never reveals the captured credential. */
|
|
338
|
+
readonly handle?: string;
|
|
339
|
+
/** The current fencing generation of the captured handle. */
|
|
340
|
+
readonly generation?: string;
|
|
341
|
+
/** The issuer-provided expiry of the captured credential. */
|
|
342
|
+
readonly expiresAt?: string;
|
|
343
|
+
}
|
|
344
|
+
/** The request of DecideAgentSessionApproval. */
|
|
345
|
+
export interface DecideAgentSessionApprovalRequest {
|
|
346
|
+
/** The name of the session. */
|
|
347
|
+
name: string;
|
|
348
|
+
/** The waiting ToolCall's `id`. */
|
|
349
|
+
callId: string;
|
|
350
|
+
/** The answer. */
|
|
351
|
+
decision: ApprovalDecision;
|
|
352
|
+
/**
|
|
353
|
+
* Also allow later calls of the same tool in this session without asking
|
|
354
|
+
* ("always allow"); only with APPROVE.
|
|
355
|
+
*/
|
|
356
|
+
remember?: boolean;
|
|
357
|
+
/** Why, at most 500 characters; the agent reads it with a rejection. */
|
|
358
|
+
reason?: string;
|
|
359
|
+
}
|
|
360
|
+
/** The request of DeleteAgent. */
|
|
361
|
+
export interface DeleteAgentRequest {
|
|
362
|
+
/** The name of the agent to delete. */
|
|
363
|
+
name: string;
|
|
364
|
+
/** Delete only if the current etag matches. */
|
|
365
|
+
etag?: string;
|
|
366
|
+
/** Succeed when the agent does not exist. */
|
|
367
|
+
allowMissing?: boolean;
|
|
368
|
+
/** Validate without deleting anything. */
|
|
369
|
+
validateOnly?: boolean;
|
|
370
|
+
/**
|
|
371
|
+
* Also delete the agent's sessions; without it, an agent with sessions
|
|
372
|
+
* is refused with `INVALID_STATE`.
|
|
373
|
+
*/
|
|
374
|
+
force?: boolean;
|
|
375
|
+
}
|
|
376
|
+
/** The request of DeleteAgentSession. */
|
|
377
|
+
export interface DeleteAgentSessionRequest {
|
|
378
|
+
/** The name of the session to delete. */
|
|
379
|
+
name: string;
|
|
380
|
+
/** Delete only if the current etag matches. */
|
|
381
|
+
etag?: string;
|
|
382
|
+
/** Succeed when the session does not exist. */
|
|
383
|
+
allowMissing?: boolean;
|
|
384
|
+
/** Validate without deleting anything. */
|
|
385
|
+
validateOnly?: boolean;
|
|
386
|
+
/**
|
|
387
|
+
* Interrupt a running turn and delete; without it, a running session is
|
|
388
|
+
* refused with `INVALID_STATE`.
|
|
389
|
+
*/
|
|
390
|
+
force?: boolean;
|
|
391
|
+
}
|
|
392
|
+
/** The request of DeleteMemory. */
|
|
393
|
+
export interface DeleteMemoryRequest {
|
|
394
|
+
/** The name of the memory to delete. */
|
|
395
|
+
name: string;
|
|
396
|
+
/** Delete only if the current etag matches. */
|
|
397
|
+
etag?: string;
|
|
398
|
+
/** Succeed when the memory does not exist. */
|
|
399
|
+
allowMissing?: boolean;
|
|
400
|
+
/** Validate without deleting anything. */
|
|
401
|
+
validateOnly?: boolean;
|
|
402
|
+
}
|
|
403
|
+
/** The request of DeleteMemoryStore. */
|
|
404
|
+
export interface DeleteMemoryStoreRequest {
|
|
405
|
+
/** The name of the memory store to delete. */
|
|
406
|
+
name: string;
|
|
407
|
+
/** Delete only if the current etag matches. */
|
|
408
|
+
etag?: string;
|
|
409
|
+
/** Succeed when the memory store does not exist. */
|
|
410
|
+
allowMissing?: boolean;
|
|
411
|
+
/** Validate without deleting anything. */
|
|
412
|
+
validateOnly?: boolean;
|
|
413
|
+
/**
|
|
414
|
+
* Also delete the store's memories; without it, a store with memories is
|
|
415
|
+
* refused with `INVALID_STATE`.
|
|
416
|
+
*/
|
|
417
|
+
force?: boolean;
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* EnvironmentSpec describes a session's Sandboxes environment. The pinned
|
|
421
|
+
* AgentVersion may provide a default. RunAgent overlays selected fields using
|
|
422
|
+
* RunAgentRequest.environment_mask; an explicit environment on
|
|
423
|
+
* CreateAgentSession replaces the default instead.
|
|
424
|
+
*/
|
|
425
|
+
export interface EnvironmentSpec {
|
|
426
|
+
/** A Sylphx Sandboxes shape; empty gives sessions no environment. */
|
|
427
|
+
shape?: string;
|
|
428
|
+
/**
|
|
429
|
+
* Put the environment in standby after this long idle, 1m to 24h; default
|
|
430
|
+
* 10m.
|
|
431
|
+
*/
|
|
432
|
+
idleStandby?: string;
|
|
433
|
+
/**
|
|
434
|
+
* The Sandboxes image: `template:<name>` or an artifact image by digest,
|
|
435
|
+
* passed unchanged to the lease's `image` field.
|
|
436
|
+
*/
|
|
437
|
+
template?: string;
|
|
438
|
+
/** The repository to prepare inside the fresh lease, if any. */
|
|
439
|
+
repo?: RepositorySpec;
|
|
440
|
+
/** The lease's outbound policy, using the Sandboxes network contract. */
|
|
441
|
+
egress?: sandboxes.LeaseNetwork;
|
|
442
|
+
/** The lease's CPU and cost ceiling, separate from model and tool spend. */
|
|
443
|
+
budget?: sandboxes.LeaseBudget;
|
|
444
|
+
/**
|
|
445
|
+
* The lease's maximum wall time, passed to Sandboxes as `ttl`. The lease
|
|
446
|
+
* is released when the session ends even if this bound has not been reached.
|
|
447
|
+
*/
|
|
448
|
+
ttl?: string;
|
|
449
|
+
}
|
|
450
|
+
/** ErrorEvent is a step or harness failure, without credential values. */
|
|
451
|
+
export interface ErrorEvent {
|
|
452
|
+
/** The registry error code or harness error kind. */
|
|
453
|
+
readonly kind?: string;
|
|
454
|
+
/** A safe error description. */
|
|
455
|
+
readonly message?: string;
|
|
456
|
+
}
|
|
457
|
+
/** FileChange is a file changed by a step's harness. */
|
|
458
|
+
export interface FileChange {
|
|
459
|
+
/** The path relative to the session's repository root. */
|
|
460
|
+
readonly path?: string;
|
|
461
|
+
/** `added`, `modified`, `deleted`, `renamed` or `copied`. */
|
|
462
|
+
readonly change?: string;
|
|
463
|
+
/** Lines added, when reported by the harness. */
|
|
464
|
+
readonly added?: string;
|
|
465
|
+
/** Lines removed, when reported by the harness. */
|
|
466
|
+
readonly removed?: string;
|
|
467
|
+
/** The previous path, for a rename or copy. */
|
|
468
|
+
readonly oldPath?: string;
|
|
469
|
+
/** `edit` for an incremental edit or `final` for the turn's final diff. */
|
|
470
|
+
readonly source?: string;
|
|
471
|
+
}
|
|
472
|
+
/** A FileRef names a file attached to a message. */
|
|
473
|
+
export interface FileRef {
|
|
474
|
+
/** Where the file is. */
|
|
475
|
+
uri?: string;
|
|
476
|
+
/** Its media type, for example `image/png`. */
|
|
477
|
+
mediaType?: string;
|
|
478
|
+
/** Its display name. */
|
|
479
|
+
filename?: string;
|
|
480
|
+
}
|
|
481
|
+
/** A FunctionTool is a tool whose logic is the app's own server code. */
|
|
482
|
+
export interface FunctionTool {
|
|
483
|
+
/**
|
|
484
|
+
* The HTTPS endpoint the gateway calls, a Hosting route or a verified
|
|
485
|
+
* Network Domain of this project.
|
|
486
|
+
*/
|
|
487
|
+
uri?: string;
|
|
488
|
+
/** One call's deadline, 1s to 15m; default 60s. */
|
|
489
|
+
timeout?: string;
|
|
490
|
+
}
|
|
491
|
+
/** The request of GetAgent. */
|
|
492
|
+
export interface GetAgentRequest {
|
|
493
|
+
/** The name of the agent to get. */
|
|
494
|
+
name: string;
|
|
495
|
+
}
|
|
496
|
+
/** The request of GetAgentSession. */
|
|
497
|
+
export interface GetAgentSessionRequest {
|
|
498
|
+
/** The name of the session to get. */
|
|
499
|
+
name: string;
|
|
500
|
+
}
|
|
501
|
+
/** The request of GetAgentVersion. */
|
|
502
|
+
export interface GetAgentVersionRequest {
|
|
503
|
+
/** The name of the agent version to get. */
|
|
504
|
+
name: string;
|
|
505
|
+
}
|
|
506
|
+
/** The request of GetMemory. */
|
|
507
|
+
export interface GetMemoryRequest {
|
|
508
|
+
/** The name of the memory to get. */
|
|
509
|
+
name: string;
|
|
510
|
+
}
|
|
511
|
+
/** The request of GetMemoryStore. */
|
|
512
|
+
export interface GetMemoryStoreRequest {
|
|
513
|
+
/** The name of the memory store to get. */
|
|
514
|
+
name: string;
|
|
515
|
+
}
|
|
516
|
+
/** The request of GetSessionEvent. */
|
|
517
|
+
export interface GetSessionEventRequest {
|
|
518
|
+
/** The name of the session event to get. */
|
|
519
|
+
name: string;
|
|
520
|
+
}
|
|
521
|
+
/** An HttpTool is an HTTP API the gateway calls on the agent's behalf. */
|
|
522
|
+
export interface HttpTool {
|
|
523
|
+
/** An HTTPS URL of an OpenAPI 3 document. */
|
|
524
|
+
openapiUri?: string;
|
|
525
|
+
/** An OpenAPI 3 document, at most 1 MiB of JSON. */
|
|
526
|
+
openapi?: Record<string, unknown>;
|
|
527
|
+
/**
|
|
528
|
+
* The operation the tool calls; empty exposes every operation as its own
|
|
529
|
+
* tool named `<tool>_<operationId>`.
|
|
530
|
+
*/
|
|
531
|
+
operationId?: string;
|
|
532
|
+
/** The credential the gateway injects at egress; the model never sees it. */
|
|
533
|
+
credential?: CredentialBinding;
|
|
534
|
+
}
|
|
535
|
+
/** The request of InterruptAgentSession. */
|
|
536
|
+
export interface InterruptAgentSessionRequest {
|
|
537
|
+
/** The name of the session. */
|
|
538
|
+
name: string;
|
|
539
|
+
/** Why, recorded on the status event; at most 500 characters. */
|
|
540
|
+
reason?: string;
|
|
541
|
+
}
|
|
542
|
+
/** The request to execute one pinned tool through the session gateway. */
|
|
543
|
+
export interface InvokeToolRequest {
|
|
544
|
+
/** The name of the session whose pinned tools are used. */
|
|
545
|
+
name: string;
|
|
546
|
+
/** The live turn whose execution capability authorizes the call. */
|
|
547
|
+
turn: string;
|
|
548
|
+
/** The tool name in the session's pinned agent version. */
|
|
549
|
+
tool: string;
|
|
550
|
+
/** The tool input, validated against its pinned input schema. */
|
|
551
|
+
arguments: Record<string, unknown>;
|
|
552
|
+
/** The stable operation identifier, reused for idempotent tool-call retries. */
|
|
553
|
+
opId: string;
|
|
554
|
+
}
|
|
555
|
+
/** The request of ListAgentSessions. */
|
|
556
|
+
export interface ListAgentSessionsRequest {
|
|
557
|
+
/** The parent to list in. */
|
|
558
|
+
parent: string;
|
|
559
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
560
|
+
pageSize?: number;
|
|
561
|
+
/** `next_page_token` of the previous page. */
|
|
562
|
+
pageToken?: string;
|
|
563
|
+
/** AIP-160 filter, limited to `agent`, `end_user` and `state`. */
|
|
564
|
+
filter?: string;
|
|
565
|
+
}
|
|
566
|
+
/** The response of ListAgentSessions. */
|
|
567
|
+
export interface ListAgentSessionsResponse {
|
|
568
|
+
/** The page. */
|
|
569
|
+
agentSessions?: AgentSession[];
|
|
570
|
+
/** The token of the next page; empty on the last page. */
|
|
571
|
+
nextPageToken?: string;
|
|
572
|
+
}
|
|
573
|
+
/** The request of ListAgentVersions. */
|
|
574
|
+
export interface ListAgentVersionsRequest {
|
|
575
|
+
/** The agent to list in. */
|
|
576
|
+
parent: string;
|
|
577
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
578
|
+
pageSize?: number;
|
|
579
|
+
/** `next_page_token` of the previous page. */
|
|
580
|
+
pageToken?: string;
|
|
581
|
+
/** AIP-160 filter, limited to `version_number`. */
|
|
582
|
+
filter?: string;
|
|
583
|
+
}
|
|
584
|
+
/** The response of ListAgentVersions. */
|
|
585
|
+
export interface ListAgentVersionsResponse {
|
|
586
|
+
/** The page. */
|
|
587
|
+
agentVersions?: AgentVersion[];
|
|
588
|
+
/** The token of the next page; empty on the last page. */
|
|
589
|
+
nextPageToken?: string;
|
|
590
|
+
}
|
|
591
|
+
/** The request of ListAgents. */
|
|
592
|
+
export interface ListAgentsRequest {
|
|
593
|
+
/** The parent to list in. */
|
|
594
|
+
parent: string;
|
|
595
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
596
|
+
pageSize?: number;
|
|
597
|
+
/** `next_page_token` of the previous page. */
|
|
598
|
+
pageToken?: string;
|
|
599
|
+
/** AIP-160 filter over labels and filterable fields. */
|
|
600
|
+
filter?: string;
|
|
601
|
+
/** AIP-132 ordering over filterable fields. */
|
|
602
|
+
orderBy?: string;
|
|
603
|
+
}
|
|
604
|
+
/** The response of ListAgents. */
|
|
605
|
+
export interface ListAgentsResponse {
|
|
606
|
+
/** The page. */
|
|
607
|
+
agents?: Agent[];
|
|
608
|
+
/** The token of the next page; empty on the last page. */
|
|
609
|
+
nextPageToken?: string;
|
|
610
|
+
}
|
|
611
|
+
/** The request of ListMemories. */
|
|
612
|
+
export interface ListMemoriesRequest {
|
|
613
|
+
/** The memory store to list in. */
|
|
614
|
+
parent: string;
|
|
615
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
616
|
+
pageSize?: number;
|
|
617
|
+
/** `next_page_token` of the previous page. */
|
|
618
|
+
pageToken?: string;
|
|
619
|
+
/** AIP-160 filter, limited to `end_user` and `agent`. */
|
|
620
|
+
filter?: string;
|
|
621
|
+
}
|
|
622
|
+
/** The response of ListMemories. */
|
|
623
|
+
export interface ListMemoriesResponse {
|
|
624
|
+
/** The page. */
|
|
625
|
+
memories?: Memory[];
|
|
626
|
+
/** The token of the next page; empty on the last page. */
|
|
627
|
+
nextPageToken?: string;
|
|
628
|
+
}
|
|
629
|
+
/** The request of ListMemoryStores. */
|
|
630
|
+
export interface ListMemoryStoresRequest {
|
|
631
|
+
/** The parent to list in. */
|
|
632
|
+
parent: string;
|
|
633
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
634
|
+
pageSize?: number;
|
|
635
|
+
/** `next_page_token` of the previous page. */
|
|
636
|
+
pageToken?: string;
|
|
637
|
+
/** AIP-160 filter over labels and filterable fields. */
|
|
638
|
+
filter?: string;
|
|
639
|
+
/** AIP-132 ordering over filterable fields. */
|
|
640
|
+
orderBy?: string;
|
|
641
|
+
}
|
|
642
|
+
/** The response of ListMemoryStores. */
|
|
643
|
+
export interface ListMemoryStoresResponse {
|
|
644
|
+
/** The page. */
|
|
645
|
+
memoryStores?: MemoryStore[];
|
|
646
|
+
/** The token of the next page; empty on the last page. */
|
|
647
|
+
nextPageToken?: string;
|
|
648
|
+
}
|
|
649
|
+
/** The request of ListSessionEvents. */
|
|
650
|
+
export interface ListSessionEventsRequest {
|
|
651
|
+
/** The session to list in. */
|
|
652
|
+
parent: string;
|
|
653
|
+
/** At most this many; default 50, clamped to 1000. */
|
|
654
|
+
pageSize?: number;
|
|
655
|
+
/** `next_page_token` of the previous page. */
|
|
656
|
+
pageToken?: string;
|
|
657
|
+
/**
|
|
658
|
+
* AIP-160 filter, limited to `type` and `sequence`; for example
|
|
659
|
+
* `sequence > 42`.
|
|
660
|
+
*/
|
|
661
|
+
filter?: string;
|
|
662
|
+
/**
|
|
663
|
+
* When no event matches the filter, wait up to this long for one, at most
|
|
664
|
+
* 60s; unset answers at once.
|
|
665
|
+
*/
|
|
666
|
+
wait?: string;
|
|
667
|
+
}
|
|
668
|
+
/** The response of ListSessionEvents. */
|
|
669
|
+
export interface ListSessionEventsResponse {
|
|
670
|
+
/** The page. */
|
|
671
|
+
sessionEvents?: SessionEvent[];
|
|
672
|
+
/** The token of the next page; empty on the last page. */
|
|
673
|
+
nextPageToken?: string;
|
|
674
|
+
}
|
|
675
|
+
/** An McpServer is a remote MCP server whose tools the agent may call. */
|
|
676
|
+
export interface McpServer {
|
|
677
|
+
/** The label its tools are prefixed with, unique within the agent. */
|
|
678
|
+
label?: string;
|
|
679
|
+
/** The server's Streamable HTTP endpoint. */
|
|
680
|
+
uri?: string;
|
|
681
|
+
/** Only these of its tools; empty allows every tool it lists. */
|
|
682
|
+
allowedTools?: string[];
|
|
683
|
+
/** The credential the gateway presents to the server. */
|
|
684
|
+
credential?: CredentialBinding;
|
|
685
|
+
}
|
|
686
|
+
/** A Memory is one long-term memory record: a fact with its provenance. */
|
|
687
|
+
export interface Memory {
|
|
688
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/memory_stores/{memory_store}/memories/{memory}`. */
|
|
689
|
+
name?: string;
|
|
690
|
+
/** `mem_<cell><ulid>`; never reused. */
|
|
691
|
+
readonly uid?: string;
|
|
692
|
+
/** Resource metadata. */
|
|
693
|
+
meta?: common.ResourceMeta;
|
|
694
|
+
/** The memory, at most 16 KiB of text. */
|
|
695
|
+
content?: string;
|
|
696
|
+
/** The end user it is about, for a store scoped to end users. */
|
|
697
|
+
endUser?: string;
|
|
698
|
+
/** The agent it belongs to, for a store scoped to agents. */
|
|
699
|
+
agent?: string;
|
|
700
|
+
/** Where it came from. */
|
|
701
|
+
readonly provenance?: MemoryProvenance;
|
|
702
|
+
/** When it was written. */
|
|
703
|
+
readonly createTime?: string;
|
|
704
|
+
/** When it was last changed. */
|
|
705
|
+
readonly updateTime?: string;
|
|
706
|
+
}
|
|
707
|
+
/** A MemoryMatch is one recalled memory and how well it matched. */
|
|
708
|
+
export interface MemoryMatch {
|
|
709
|
+
/** The memory. */
|
|
710
|
+
memory?: Memory;
|
|
711
|
+
/** The relevance, 0 to 1. */
|
|
712
|
+
score?: number;
|
|
713
|
+
}
|
|
714
|
+
/** MemoryProvenance records where a memory came from. */
|
|
715
|
+
export interface MemoryProvenance {
|
|
716
|
+
/** Who wrote it. */
|
|
717
|
+
readonly source?: MemorySource;
|
|
718
|
+
/** The session it was learned in, when an agent wrote it. */
|
|
719
|
+
readonly session?: string;
|
|
720
|
+
/** The event it was learned from, when an agent wrote it. */
|
|
721
|
+
readonly event?: string;
|
|
722
|
+
/** The principal that wrote it, when a caller did. */
|
|
723
|
+
readonly principal?: string;
|
|
724
|
+
}
|
|
725
|
+
/**
|
|
726
|
+
* A MemoryStore holds long-term memory records with provenance, recalled by
|
|
727
|
+
* hybrid full-text and vector search. Agents name the stores they use; a
|
|
728
|
+
* store may be shared by many agents.
|
|
729
|
+
*/
|
|
730
|
+
export interface MemoryStore {
|
|
731
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/memory_stores/{memory_store}`. */
|
|
732
|
+
name?: string;
|
|
733
|
+
/** `mst_<cell><ulid>`; never reused. */
|
|
734
|
+
readonly uid?: string;
|
|
735
|
+
/** Resource metadata. */
|
|
736
|
+
meta?: common.ResourceMeta;
|
|
737
|
+
/** Desired state. */
|
|
738
|
+
spec?: MemoryStoreSpec;
|
|
739
|
+
/** Observed state. */
|
|
740
|
+
readonly status?: MemoryStoreStatus;
|
|
741
|
+
}
|
|
742
|
+
/** MemoryStoreSpec is the caller-writable state of a MemoryStore. */
|
|
743
|
+
export interface MemoryStoreSpec {
|
|
744
|
+
/** What the store is for, shown to agents; at most 1024 characters. */
|
|
745
|
+
description?: string;
|
|
746
|
+
/** Whose memories are kept apart. */
|
|
747
|
+
scope?: MemoryScope;
|
|
748
|
+
/**
|
|
749
|
+
* Memories older than this since their last update are deleted, 1d to
|
|
750
|
+
* 3650d; unset keeps them until deleted.
|
|
751
|
+
*/
|
|
752
|
+
retention?: string;
|
|
753
|
+
/**
|
|
754
|
+
* Whether agents write memories themselves after each turn; otherwise
|
|
755
|
+
* only callers write them.
|
|
756
|
+
*/
|
|
757
|
+
agentWrites?: boolean;
|
|
758
|
+
}
|
|
759
|
+
/** MemoryStoreStatus is the observed state of a MemoryStore. */
|
|
760
|
+
export interface MemoryStoreStatus {
|
|
761
|
+
/** The generation this status was computed from. */
|
|
762
|
+
readonly observedGeneration?: string;
|
|
763
|
+
/** Ready, Reconciling, Stalled. */
|
|
764
|
+
readonly conditions?: common.Condition[];
|
|
765
|
+
/** The number of memories. */
|
|
766
|
+
readonly memoryCount?: string;
|
|
767
|
+
/** Bytes stored, content and index together; the billed quantity. */
|
|
768
|
+
readonly storedBytes?: string;
|
|
769
|
+
}
|
|
770
|
+
/** A Message is text and files from a user or the agent. */
|
|
771
|
+
export interface Message {
|
|
772
|
+
/** The content, in order; 1 to 64 parts. */
|
|
773
|
+
parts?: ContentPart[];
|
|
774
|
+
}
|
|
775
|
+
/** ProfileMount attaches a platform Profile by name, never its sign-in values. */
|
|
776
|
+
export interface ProfileMount {
|
|
777
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/profiles/{profile}`. */
|
|
778
|
+
name?: string;
|
|
779
|
+
/**
|
|
780
|
+
* `read_only` (default) or `write_back`. Only a write_back grant saves
|
|
781
|
+
* changes at session end while its lease still answers; empty is read_only.
|
|
782
|
+
*/
|
|
783
|
+
mode?: string;
|
|
784
|
+
}
|
|
785
|
+
/** A pinned tool called periodically while the accepted task owns its grant. */
|
|
786
|
+
export interface RenewalCall {
|
|
787
|
+
/** The authorized renewal tool name in the pinned agent version. */
|
|
788
|
+
tool?: string;
|
|
789
|
+
/** Immutable literal renewal-tool input, with credential injection by the gateway. */
|
|
790
|
+
arguments?: Record<string, unknown>;
|
|
791
|
+
/** Positive interval, from five seconds to five minutes. */
|
|
792
|
+
interval?: string;
|
|
793
|
+
/** JSON pointers into the tool response; no domain-specific field names. */
|
|
794
|
+
cancelField?: string;
|
|
795
|
+
/** A response JSON pointer selecting the cancellation reason. */
|
|
796
|
+
reasonField?: string;
|
|
797
|
+
/** Credential binding alias to a response JSON pointer for its replacement. */
|
|
798
|
+
credentialUpdates?: Record<string, string>;
|
|
799
|
+
/** Matching aliases to issuer-returned RFC3339 expiry response pointers. */
|
|
800
|
+
credentialExpiries?: Record<string, string>;
|
|
801
|
+
/**
|
|
802
|
+
* Top-level argument receiving a stable per-tick runtime idempotency key.
|
|
803
|
+
* Omit this argument from literal input; retries reuse it, later ticks change it.
|
|
804
|
+
*/
|
|
805
|
+
idempotencyArgument?: string;
|
|
806
|
+
}
|
|
807
|
+
/** RepositorySpec identifies the source to prepare in a session's lease. */
|
|
808
|
+
export interface RepositorySpec {
|
|
809
|
+
/** The repository URI. Access uses the session's bound credential handles. */
|
|
810
|
+
uri?: string;
|
|
811
|
+
/** The commit or ref to check out; empty uses the repository's default branch. */
|
|
812
|
+
revision?: string;
|
|
813
|
+
}
|
|
814
|
+
/** The request to revoke a captured credential handle. */
|
|
815
|
+
export interface RevokeCredentialRequest {
|
|
816
|
+
/** The environment that owns the captured handle. */
|
|
817
|
+
parent: string;
|
|
818
|
+
/** The opaque handle to revoke; repeated revocation is harmless. */
|
|
819
|
+
handle: string;
|
|
820
|
+
}
|
|
821
|
+
/** The request to rotate a captured credential without changing its handle. */
|
|
822
|
+
export interface RotateCredentialRequest {
|
|
823
|
+
/** The environment that owns the captured handle. */
|
|
824
|
+
parent: string;
|
|
825
|
+
/** The opaque handle whose captured credential is being replaced. */
|
|
826
|
+
handle: string;
|
|
827
|
+
/** The current handle generation; stale rotations are refused. */
|
|
828
|
+
generation: string;
|
|
829
|
+
/** The replacement issuer-provided credential, stored encrypted. */
|
|
830
|
+
credential: string;
|
|
831
|
+
/** The issuer-provided expiry of the replacement credential. */
|
|
832
|
+
expiresAt: string;
|
|
833
|
+
}
|
|
834
|
+
/** Immutable task-attempt input; the caller pins its own task/profile context. */
|
|
835
|
+
export interface RunAgentRequest {
|
|
836
|
+
/** The name of the agent to run under the caller's environment grant. */
|
|
837
|
+
name: string;
|
|
838
|
+
/** The immutable agent version pinned for this task attempt. */
|
|
839
|
+
agentVersion: string;
|
|
840
|
+
/** The stable session identifier; reusing it for another attempt is refused. */
|
|
841
|
+
agentSessionId: string;
|
|
842
|
+
/** The initial task message appended atomically with session acceptance. */
|
|
843
|
+
message: Message;
|
|
844
|
+
/**
|
|
845
|
+
* Optional overrides of the environment in the pinned AgentVersion's frozen
|
|
846
|
+
* spec, never the Agent's current head. Omitted or empty with no mask keeps
|
|
847
|
+
* that default unchanged. Only selected fields are overlaid; see
|
|
848
|
+
* environment_mask. The effective environment must have a supported shape,
|
|
849
|
+
* finite positive TTL and valid repository, network and budget before admission.
|
|
850
|
+
*/
|
|
851
|
+
environment?: EnvironmentSpec;
|
|
852
|
+
/** Captured credential bindings by alias; credentials never enter context. */
|
|
853
|
+
credentials?: Record<string, CredentialBinding>;
|
|
854
|
+
/** Granted profile mounts for the fresh session lease. */
|
|
855
|
+
profiles?: ProfileMount[];
|
|
856
|
+
/** The pinned tool call used by the runtime to deliver the terminal result. */
|
|
857
|
+
completion: CompletionCall;
|
|
858
|
+
/** Opaque, claim-pinned workspace knowledge, including its rendered instruction. */
|
|
859
|
+
workspaceKnowledge?: Record<string, unknown>;
|
|
860
|
+
/** Caller-owned opaque reference, not interpreted by Agents. */
|
|
861
|
+
taskRef?: string;
|
|
862
|
+
/** Optional pinned grant-renewal call, owned by the runtime after acceptance. */
|
|
863
|
+
renewal?: RenewalCall;
|
|
864
|
+
/**
|
|
865
|
+
* Same-session handle to a caller-owned scoped Access credential. Runtime only,
|
|
866
|
+
* never installed in the guest or sent to the model.
|
|
867
|
+
*/
|
|
868
|
+
runtimeCredentialHandle: string;
|
|
869
|
+
/**
|
|
870
|
+
* Fields of environment to overlay, relative to EnvironmentSpec, using proto
|
|
871
|
+
* snake_case paths such as ttl, repo.uri, repo.revision,
|
|
872
|
+
* egress.allowed_domains and budget.max_cost_micros. The wire value is a
|
|
873
|
+
* comma-separated string; SDK property naming does not change these paths.
|
|
874
|
+
* Omitted or empty infers populated serialized leaf fields recursively,
|
|
875
|
+
* preserving unselected siblings from the pinned version. Proto defaults
|
|
876
|
+
* (including empty lists) need an explicit mask to reset a selected field.
|
|
877
|
+
* Selected lists replace, rather than append to, the inherited list.
|
|
878
|
+
* The sole path "*" replaces the whole environment, resetting unpopulated
|
|
879
|
+
* fields. Unknown, invalid and output-only paths are rejected, as is a
|
|
880
|
+
* nonempty mask without environment. Effective validation also applies to
|
|
881
|
+
* explicit resets and whole-environment replacement.
|
|
882
|
+
*/
|
|
883
|
+
environmentMask?: string;
|
|
884
|
+
}
|
|
885
|
+
/** Durable acceptance, not task completion or sandbox readiness. */
|
|
886
|
+
export interface RunAgentResponse {
|
|
887
|
+
/** The durably accepted session; acceptance is not task completion. */
|
|
888
|
+
readonly session?: AgentSession;
|
|
889
|
+
/** The initial message event committed with the session and pending turn. */
|
|
890
|
+
readonly initialEvent?: SessionEvent;
|
|
891
|
+
/** Result-delivery progress, independent of lease cleanup. */
|
|
892
|
+
readonly delivery?: string;
|
|
893
|
+
/** Lease-cleanup progress; released requires terminal lease evidence. */
|
|
894
|
+
readonly cleanup?: string;
|
|
895
|
+
}
|
|
896
|
+
/** The request of SearchMemories. */
|
|
897
|
+
export interface SearchMemoriesRequest {
|
|
898
|
+
/** The memory store to search. */
|
|
899
|
+
parent: string;
|
|
900
|
+
/** What to recall, 1 to 2000 characters. */
|
|
901
|
+
query: string;
|
|
902
|
+
/** Only memories about this end user. */
|
|
903
|
+
endUser?: string;
|
|
904
|
+
/** Only memories of this agent. */
|
|
905
|
+
agent?: string;
|
|
906
|
+
/** At most this many; default 10, clamped to 100. */
|
|
907
|
+
pageSize?: number;
|
|
908
|
+
/** `next_page_token` of the previous page. */
|
|
909
|
+
pageToken?: string;
|
|
910
|
+
}
|
|
911
|
+
/** The response of SearchMemories. */
|
|
912
|
+
export interface SearchMemoriesResponse {
|
|
913
|
+
/** The matches, best first. */
|
|
914
|
+
matches?: MemoryMatch[];
|
|
915
|
+
/** The token of the next page; empty on the last page. */
|
|
916
|
+
nextPageToken?: string;
|
|
917
|
+
}
|
|
918
|
+
/** The request of SendAgentSessionMessage. */
|
|
919
|
+
export interface SendAgentSessionMessageRequest {
|
|
920
|
+
/** The name of the session. */
|
|
921
|
+
name: string;
|
|
922
|
+
/** The message, 1 to 64 parts. */
|
|
923
|
+
message: Message;
|
|
924
|
+
}
|
|
925
|
+
/**
|
|
926
|
+
* A SessionEvent is one entry of a session's append-only log: a user
|
|
927
|
+
* message, model output, a tool call or result, an approval, or a status
|
|
928
|
+
* change. Events are never changed or reordered; `sequence` is their order.
|
|
929
|
+
*/
|
|
930
|
+
export interface SessionEvent {
|
|
931
|
+
/** `orgs/{org}/projects/{project}/envs/{env}/agent_sessions/{agent_session}/session_events/{session_event}`. */
|
|
932
|
+
name?: string;
|
|
933
|
+
/** `sevt_<cell><ulid>`; never reused. */
|
|
934
|
+
readonly uid?: string;
|
|
935
|
+
/** Resource metadata. */
|
|
936
|
+
meta?: common.ResourceMeta;
|
|
937
|
+
/** The position in the session's log, from 1, with no gaps. */
|
|
938
|
+
readonly sequence?: string;
|
|
939
|
+
/** What the event is. */
|
|
940
|
+
readonly type?: SessionEventType;
|
|
941
|
+
/** The turn it belongs to, from 1; 0 for an event outside a turn. */
|
|
942
|
+
readonly turn?: string;
|
|
943
|
+
/**
|
|
944
|
+
* The step within the turn, from 1, assigned by the runtime; 0 for an
|
|
945
|
+
* event that is not a step.
|
|
946
|
+
*/
|
|
947
|
+
readonly step?: string;
|
|
948
|
+
/** When it was appended. */
|
|
949
|
+
readonly createTime?: string;
|
|
950
|
+
/** For USER_MESSAGE, STEER and AGENT_MESSAGE. */
|
|
951
|
+
message?: Message;
|
|
952
|
+
/** For TOOL_CALL. */
|
|
953
|
+
toolCall?: ToolCall;
|
|
954
|
+
/** For TOOL_RESULT. */
|
|
955
|
+
toolResult?: ToolResult;
|
|
956
|
+
/** For APPROVAL_REQUESTED and APPROVAL_DECIDED. */
|
|
957
|
+
approval?: Approval;
|
|
958
|
+
/** For STATUS. */
|
|
959
|
+
statusChange?: StatusChange;
|
|
960
|
+
/** For THOUGHT: a reasoning summary, never private model reasoning. */
|
|
961
|
+
thought?: Message;
|
|
962
|
+
/** For FILE_CHANGE. */
|
|
963
|
+
fileChange?: FileChange;
|
|
964
|
+
/** For RESPONSE: the completed turn's answer and usage. */
|
|
965
|
+
response?: TurnResult;
|
|
966
|
+
/** For ERROR. */
|
|
967
|
+
error?: ErrorEvent;
|
|
968
|
+
}
|
|
969
|
+
/**
|
|
970
|
+
* SessionUsage is what a session has used. Model tokens are on the Sylphx AI
|
|
971
|
+
* meter; this is the Agents part.
|
|
972
|
+
*/
|
|
973
|
+
export interface SessionUsage {
|
|
974
|
+
/** Time turns were active. */
|
|
975
|
+
readonly activeTurnDuration?: string;
|
|
976
|
+
/** Tool calls made through the gateway. */
|
|
977
|
+
readonly gatewayCalls?: string;
|
|
978
|
+
/** Spend so far in micro-USD, models and tools together. */
|
|
979
|
+
readonly spendMicros?: string;
|
|
980
|
+
}
|
|
981
|
+
/**
|
|
982
|
+
* A Skill is an instruction pack the agent loads when its description
|
|
983
|
+
* matches the task.
|
|
984
|
+
*/
|
|
985
|
+
export interface Skill {
|
|
986
|
+
/** The skill's name, unique within the agent. */
|
|
987
|
+
name?: string;
|
|
988
|
+
/** When to use it, shown to the model; at most 1024 characters. */
|
|
989
|
+
description?: string;
|
|
990
|
+
/** The instructions it loads, at most 256 KiB. */
|
|
991
|
+
instructions?: string;
|
|
992
|
+
}
|
|
993
|
+
/** A StatusChange is the session moving to a new state. */
|
|
994
|
+
export interface StatusChange {
|
|
995
|
+
/** The state after the change. */
|
|
996
|
+
readonly state?: SessionState;
|
|
997
|
+
/** Why, for FAILED and INTERRUPTED: a registry error code and message. */
|
|
998
|
+
readonly reason?: string;
|
|
999
|
+
}
|
|
1000
|
+
/** The request of SteerAgentSession. */
|
|
1001
|
+
export interface SteerAgentSessionRequest {
|
|
1002
|
+
/** The name of the session. */
|
|
1003
|
+
name: string;
|
|
1004
|
+
/** The message, 1 to 64 parts. */
|
|
1005
|
+
message: Message;
|
|
1006
|
+
}
|
|
1007
|
+
/** The request of SubmitAgentSessionToolResult. */
|
|
1008
|
+
export interface SubmitAgentSessionToolResultRequest {
|
|
1009
|
+
/** The name of the session. */
|
|
1010
|
+
name: string;
|
|
1011
|
+
/** The waiting client ToolCall's `id`. */
|
|
1012
|
+
callId: string;
|
|
1013
|
+
/** The result, at most 1 MiB of JSON. */
|
|
1014
|
+
output: unknown;
|
|
1015
|
+
/** Whether the call failed; `output` then holds the error. */
|
|
1016
|
+
error?: boolean;
|
|
1017
|
+
}
|
|
1018
|
+
/**
|
|
1019
|
+
* A Tool is one tool an agent may call. Every call goes through the tool
|
|
1020
|
+
* gateway: the policy check, credential injection at egress (the model, the
|
|
1021
|
+
* event log and traces see a handle, never the value), the egress guard, and
|
|
1022
|
+
* one usage record and trace span per call.
|
|
1023
|
+
*/
|
|
1024
|
+
export interface Tool {
|
|
1025
|
+
/** The name the model calls, unique within the agent. */
|
|
1026
|
+
name?: string;
|
|
1027
|
+
/** What the tool does, shown to the model; at most 4096 characters. */
|
|
1028
|
+
description?: string;
|
|
1029
|
+
/** The JSON Schema of the tool's input. Built-in tools carry their own. */
|
|
1030
|
+
inputSchema?: Record<string, unknown>;
|
|
1031
|
+
/**
|
|
1032
|
+
* A platform tool: `shell`, `files`, `browser`, `computer`, `web_fetch`,
|
|
1033
|
+
* `web_search` or `memory`.
|
|
1034
|
+
*/
|
|
1035
|
+
builtin?: BuiltinTool;
|
|
1036
|
+
/** An HTTP API described by OpenAPI. */
|
|
1037
|
+
http?: HttpTool;
|
|
1038
|
+
/**
|
|
1039
|
+
* The app's own server code: the gateway calls it with a short-lived
|
|
1040
|
+
* signed token bound to the session, turn and step.
|
|
1041
|
+
*/
|
|
1042
|
+
appFunction?: FunctionTool;
|
|
1043
|
+
/**
|
|
1044
|
+
* Run by the client: the app executes it and returns the result as an
|
|
1045
|
+
* event (`:submitToolResult`).
|
|
1046
|
+
*/
|
|
1047
|
+
client?: ClientTool;
|
|
1048
|
+
}
|
|
1049
|
+
/**
|
|
1050
|
+
* A ToolCall is the agent asking to call a tool. `id` is assigned by the
|
|
1051
|
+
* runtime; the model's own tool-call id is kept only as `model_call_id`, so
|
|
1052
|
+
* a model that repeats an id never collides two calls.
|
|
1053
|
+
*/
|
|
1054
|
+
export interface ToolCall {
|
|
1055
|
+
/** The call's id within the session, `(turn, step)` based. */
|
|
1056
|
+
readonly id?: string;
|
|
1057
|
+
/** The tool name. */
|
|
1058
|
+
readonly tool?: string;
|
|
1059
|
+
/** The input, as the model sent it. */
|
|
1060
|
+
readonly input?: Record<string, unknown>;
|
|
1061
|
+
/** The model's own id for the call, as sent; never used as a key. */
|
|
1062
|
+
readonly modelCallId?: string;
|
|
1063
|
+
/** Whether the client runs it (a ClientTool). */
|
|
1064
|
+
readonly client?: boolean;
|
|
1065
|
+
}
|
|
1066
|
+
/** The request for the tools available to a session execution capability. */
|
|
1067
|
+
export interface ToolCatalogRequest {
|
|
1068
|
+
/** The name of the session whose pinned tool catalog is requested. */
|
|
1069
|
+
name: string;
|
|
1070
|
+
}
|
|
1071
|
+
/** The tool catalog visible to the authorized session execution capability. */
|
|
1072
|
+
export interface ToolCatalogResponse {
|
|
1073
|
+
/** The tools in the session's pinned version, with no credential values. */
|
|
1074
|
+
tools?: CatalogTool[];
|
|
1075
|
+
}
|
|
1076
|
+
/**
|
|
1077
|
+
* A ToolPolicy decides each tool call before it runs. A grant is the
|
|
1078
|
+
* authorization: the policy asks a person only for a call no existing grant
|
|
1079
|
+
* covers. An OAuth scope, a credential bound to the tool, or an earlier
|
|
1080
|
+
* "always allow" is that grant.
|
|
1081
|
+
*/
|
|
1082
|
+
export interface ToolPolicy {
|
|
1083
|
+
/** The decision for a call no rule matches; default allow. */
|
|
1084
|
+
defaultDecision?: PolicyDecision;
|
|
1085
|
+
/** Rules in order; the first match decides. At most 256. */
|
|
1086
|
+
rules?: ToolPolicyRule[];
|
|
1087
|
+
/**
|
|
1088
|
+
* How long a call waits for a person's answer before it is denied, 1m to
|
|
1089
|
+
* 7d; default 24h.
|
|
1090
|
+
*/
|
|
1091
|
+
approvalTimeout?: string;
|
|
1092
|
+
/**
|
|
1093
|
+
* Hosts every network call of the agent's tools may reach, beyond the
|
|
1094
|
+
* tools' own endpoints; `*.example.com` matches subdomains. Private and
|
|
1095
|
+
* internal addresses are refused whatever this says.
|
|
1096
|
+
*/
|
|
1097
|
+
egressAllowHosts?: string[];
|
|
1098
|
+
}
|
|
1099
|
+
/** A ToolPolicyRule matches tool calls by tool name. */
|
|
1100
|
+
export interface ToolPolicyRule {
|
|
1101
|
+
/**
|
|
1102
|
+
* A tool name, `<mcp label>__<tool>` for an MCP tool; `*` matches any
|
|
1103
|
+
* characters.
|
|
1104
|
+
*/
|
|
1105
|
+
tool?: string;
|
|
1106
|
+
/** The decision. */
|
|
1107
|
+
decision?: PolicyDecision;
|
|
1108
|
+
/**
|
|
1109
|
+
* A CEL condition over the call's `input`, the session's `end_user` and
|
|
1110
|
+
* `labels`; the rule matches only when it is true. Empty always matches.
|
|
1111
|
+
*/
|
|
1112
|
+
condition?: string;
|
|
1113
|
+
}
|
|
1114
|
+
/** A ToolResult is the outcome of one tool call. */
|
|
1115
|
+
export interface ToolResult {
|
|
1116
|
+
/** The ToolCall's `id`. */
|
|
1117
|
+
readonly callId?: string;
|
|
1118
|
+
/** The output. */
|
|
1119
|
+
readonly output?: unknown;
|
|
1120
|
+
/** Whether the call failed; `output` then holds the error. */
|
|
1121
|
+
readonly error?: boolean;
|
|
1122
|
+
/** How long the call took. */
|
|
1123
|
+
readonly duration?: string;
|
|
1124
|
+
}
|
|
1125
|
+
/** TurnResult is a completed turn's response, usage and duration. */
|
|
1126
|
+
export interface TurnResult {
|
|
1127
|
+
/** The final response's text. */
|
|
1128
|
+
readonly text?: string;
|
|
1129
|
+
/** Whether the turn ended with an error. */
|
|
1130
|
+
readonly isError?: boolean;
|
|
1131
|
+
/** Model token usage reported by the harness. */
|
|
1132
|
+
readonly usage?: TurnTokenUsage;
|
|
1133
|
+
/** The reported cost, in micro-USD. */
|
|
1134
|
+
readonly costMicros?: string;
|
|
1135
|
+
/** How long the turn ran. */
|
|
1136
|
+
readonly duration?: string;
|
|
1137
|
+
}
|
|
1138
|
+
/** TurnTokenUsage is the model token usage reported for a completed turn. */
|
|
1139
|
+
export interface TurnTokenUsage {
|
|
1140
|
+
/** Input tokens. */
|
|
1141
|
+
readonly inputTokens?: string;
|
|
1142
|
+
/** Output tokens. */
|
|
1143
|
+
readonly outputTokens?: string;
|
|
1144
|
+
/** Input tokens read from the model's cache. */
|
|
1145
|
+
readonly cacheReadTokens?: string;
|
|
1146
|
+
/** Input tokens written to the model's cache. */
|
|
1147
|
+
readonly cacheWriteTokens?: string;
|
|
1148
|
+
}
|
|
1149
|
+
/** The request of UpdateAgent. */
|
|
1150
|
+
export interface UpdateAgentRequest {
|
|
1151
|
+
/** The agent to update; `name` identifies it. */
|
|
1152
|
+
agent: Agent;
|
|
1153
|
+
/** The fields to write; unset writes every populated field. */
|
|
1154
|
+
updateMask?: string;
|
|
1155
|
+
/** Create the agent when it does not exist (declarative upsert). */
|
|
1156
|
+
allowMissing?: boolean;
|
|
1157
|
+
/** Validate and return the result without writing anything. */
|
|
1158
|
+
validateOnly?: boolean;
|
|
1159
|
+
}
|
|
1160
|
+
/** The request of UpdateMemory. */
|
|
1161
|
+
export interface UpdateMemoryRequest {
|
|
1162
|
+
/** The memory to update; `name` identifies it. */
|
|
1163
|
+
memory: Memory;
|
|
1164
|
+
/** The fields to write; unset writes every populated field. */
|
|
1165
|
+
updateMask?: string;
|
|
1166
|
+
/** Validate and return the result without writing anything. */
|
|
1167
|
+
validateOnly?: boolean;
|
|
1168
|
+
}
|
|
1169
|
+
/** The request of UpdateMemoryStore. */
|
|
1170
|
+
export interface UpdateMemoryStoreRequest {
|
|
1171
|
+
/** The memory store to update; `name` identifies it. */
|
|
1172
|
+
memoryStore: MemoryStore;
|
|
1173
|
+
/** The fields to write; unset writes every populated field. */
|
|
1174
|
+
updateMask?: string;
|
|
1175
|
+
/** Create the memory store when it does not exist (declarative upsert). */
|
|
1176
|
+
allowMissing?: boolean;
|
|
1177
|
+
/** Validate and return the result without writing anything. */
|
|
1178
|
+
validateOnly?: boolean;
|
|
1179
|
+
}
|
|
1180
|
+
/** ApprovalDecision is a person's answer to an approval. */
|
|
1181
|
+
export type ApprovalDecision = 'approve' | 'reject' | (string & {});
|
|
1182
|
+
/** MemoryScope is whose memories a store keeps apart. */
|
|
1183
|
+
export type MemoryScope = 'project' | 'agent' | 'end_user' | (string & {});
|
|
1184
|
+
/** MemorySource is who wrote a memory. */
|
|
1185
|
+
export type MemorySource = 'agent' | 'api' | 'import' | (string & {});
|
|
1186
|
+
/** PolicyDecision is what the tool policy does with a call. */
|
|
1187
|
+
export type PolicyDecision = 'allow' | 'deny' | 'ask' | (string & {});
|
|
1188
|
+
/** Runtime-produced fields mapped into an authorized completion tool call. */
|
|
1189
|
+
export type ResultField = 'text' | 'done' | 'next' | 'where' | 'outcome' | (string & {});
|
|
1190
|
+
/** SessionEventType is what a session event records. */
|
|
1191
|
+
export type SessionEventType = 'user_message' | 'steer' | 'agent_message' | 'tool_call' | 'tool_result' | 'approval_requested' | 'approval_decided' | 'status' | 'compaction' | 'thought' | 'file_change' | 'response' | 'error' | (string & {});
|
|
1192
|
+
/** SessionState is where a session is. */
|
|
1193
|
+
export type SessionState = 'idle' | 'running' | 'awaiting_approval' | 'awaiting_client' | 'failed' | (string & {});
|
|
1194
|
+
/**
|
|
1195
|
+
* AgentsService is Sylphx Agents, the platform's hosted agent runtime
|
|
1196
|
+
* (ADR-01M495TCCBZGSQ68A4P4G428H2). Apps call it instead of building their
|
|
1197
|
+
* own agent loop, session store, memory and credential handling.
|
|
1198
|
+
*
|
|
1199
|
+
* Scopes: `agents:read` and `agents:write` manage agents, versions and
|
|
1200
|
+
* memory stores with a secret key. `agents:sessions` runs sessions and reads
|
|
1201
|
+
* and deletes session and memory records. All methods currently require a
|
|
1202
|
+
* secret key. Publishable-key access is deferred until the backend enforces
|
|
1203
|
+
* end-user ownership of sessions and memories and `end_user_access` on Agents.
|
|
1204
|
+
* Credential actions capture existing grants; handles are not CRUD resources.
|
|
1205
|
+
*
|
|
1206
|
+
* Namespace of Sylphx Agents on `Sylphx`.
|
|
1207
|
+
*/
|
|
1208
|
+
export declare class AgentsApi {
|
|
1209
|
+
/** The `agents` collection. */
|
|
1210
|
+
readonly agents: AgentsCollection;
|
|
1211
|
+
/** The `agent_versions` collection. */
|
|
1212
|
+
readonly agentVersions: AgentVersionsCollection;
|
|
1213
|
+
/** The `agent_sessions` collection. */
|
|
1214
|
+
readonly agentSessions: AgentSessionsCollection;
|
|
1215
|
+
/** The `session_events` collection. */
|
|
1216
|
+
readonly sessionEvents: SessionEventsCollection;
|
|
1217
|
+
/** The `memory_stores` collection. */
|
|
1218
|
+
readonly memoryStores: MemoryStoresCollection;
|
|
1219
|
+
/** The `memories` collection. */
|
|
1220
|
+
readonly memories: MemoriesCollection;
|
|
1221
|
+
constructor(client: runtime.Client);
|
|
1222
|
+
}
|
|
1223
|
+
/** `agents` of Sylphx Agents: Resource type `agents.sylphx.com/Agent`. */
|
|
1224
|
+
export declare class AgentsCollection {
|
|
1225
|
+
private readonly client;
|
|
1226
|
+
constructor(client: runtime.Client);
|
|
1227
|
+
/**
|
|
1228
|
+
* Captures an existing grant for one session and purpose; never issues a key.
|
|
1229
|
+
*
|
|
1230
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/agents:capture-credential` · permission `agents:sessions` · effect `write`
|
|
1231
|
+
*
|
|
1232
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
|
|
1233
|
+
*/
|
|
1234
|
+
captureCredential(request: CaptureCredentialRequest): Promise<CredentialHandle>;
|
|
1235
|
+
/**
|
|
1236
|
+
* Rotates the captured value under the same handle with generation fencing.
|
|
1237
|
+
*
|
|
1238
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/agents:rotate-credential` · permission `agents:sessions` · effect `write`
|
|
1239
|
+
*
|
|
1240
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
|
|
1241
|
+
*/
|
|
1242
|
+
rotateCredential(request: RotateCredentialRequest): Promise<CredentialHandle>;
|
|
1243
|
+
/**
|
|
1244
|
+
* Revokes one captured handle. Repeating the revocation is harmless.
|
|
1245
|
+
*
|
|
1246
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/agents:revoke-credential` · permission `agents:sessions` · effect `write`
|
|
1247
|
+
*
|
|
1248
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
|
|
1249
|
+
*/
|
|
1250
|
+
revokeCredential(request: RevokeCredentialRequest): Promise<Record<string, never>>;
|
|
1251
|
+
/**
|
|
1252
|
+
* Gets an agent.
|
|
1253
|
+
*
|
|
1254
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/agents/*}` · permission `agents:read` · effect `read`
|
|
1255
|
+
*
|
|
1256
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
1257
|
+
*/
|
|
1258
|
+
get(request: GetAgentRequest): Promise<Agent>;
|
|
1259
|
+
/**
|
|
1260
|
+
* Lists agents.
|
|
1261
|
+
*
|
|
1262
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/agents` · permission `agents:read` · effect `read`
|
|
1263
|
+
*
|
|
1264
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
1265
|
+
*/
|
|
1266
|
+
list(request: ListAgentsRequest): Promise<ListAgentsResponse>;
|
|
1267
|
+
/** Every item of every page of `list`. */
|
|
1268
|
+
listAll(request: ListAgentsRequest): AsyncGenerator<Agent>;
|
|
1269
|
+
/**
|
|
1270
|
+
* Creates an agent and its version 1.
|
|
1271
|
+
*
|
|
1272
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/agents` · permission `agents:write` · effect `write`
|
|
1273
|
+
*
|
|
1274
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
|
|
1275
|
+
*/
|
|
1276
|
+
create(request: CreateAgentRequest): Promise<Agent>;
|
|
1277
|
+
/**
|
|
1278
|
+
* Updates an agent. A change to `spec` mints the next AgentVersion;
|
|
1279
|
+
* sessions already started keep the version they pinned.
|
|
1280
|
+
*
|
|
1281
|
+
* `PATCH /v1/{agent.name=orgs/*\/projects/*\/envs/*\/agents/*}` · permission `agents:write` · effect `write`
|
|
1282
|
+
*
|
|
1283
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1284
|
+
*/
|
|
1285
|
+
update(request: UpdateAgentRequest): Promise<Agent>;
|
|
1286
|
+
/**
|
|
1287
|
+
* Deletes an agent and its versions. An agent with sessions is refused
|
|
1288
|
+
* with `INVALID_STATE` unless `force` is set, which deletes them too.
|
|
1289
|
+
*
|
|
1290
|
+
* `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/agents/*}` · permission `agents:write` · effect `destructive`
|
|
1291
|
+
*
|
|
1292
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1293
|
+
*/
|
|
1294
|
+
delete(request: DeleteAgentRequest): Promise<Record<string, never>>;
|
|
1295
|
+
/**
|
|
1296
|
+
* Atomically admits a pinned task session, initial event and pending turn.
|
|
1297
|
+
*
|
|
1298
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agents/*}:run` · permission `agents:sessions` · effect `write`
|
|
1299
|
+
*
|
|
1300
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`, `SPEND_LIMIT_REACHED`.
|
|
1301
|
+
*/
|
|
1302
|
+
run(request: RunAgentRequest): Promise<RunAgentResponse>;
|
|
1303
|
+
}
|
|
1304
|
+
/** `agent_versions` of Sylphx Agents: Resource type `agents.sylphx.com/AgentVersion`. */
|
|
1305
|
+
export declare class AgentVersionsCollection {
|
|
1306
|
+
private readonly client;
|
|
1307
|
+
constructor(client: runtime.Client);
|
|
1308
|
+
/**
|
|
1309
|
+
* Gets an agent version.
|
|
1310
|
+
*
|
|
1311
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/agents/*\/agent_versions/*}` · permission `agents:read` · effect `read`
|
|
1312
|
+
*
|
|
1313
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
1314
|
+
*/
|
|
1315
|
+
get(request: GetAgentVersionRequest): Promise<AgentVersion>;
|
|
1316
|
+
/**
|
|
1317
|
+
* Lists an agent's versions, newest first.
|
|
1318
|
+
*
|
|
1319
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/agents/*}/agent_versions` · permission `agents:read` · effect `read`
|
|
1320
|
+
*
|
|
1321
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
1322
|
+
*/
|
|
1323
|
+
list(request: ListAgentVersionsRequest): Promise<ListAgentVersionsResponse>;
|
|
1324
|
+
/** Every item of every page of `list`. */
|
|
1325
|
+
listAll(request: ListAgentVersionsRequest): AsyncGenerator<AgentVersion>;
|
|
1326
|
+
}
|
|
1327
|
+
/** `agent_sessions` of Sylphx Agents: Resource type `agents.sylphx.com/AgentSession`. */
|
|
1328
|
+
export declare class AgentSessionsCollection {
|
|
1329
|
+
private readonly client;
|
|
1330
|
+
constructor(client: runtime.Client);
|
|
1331
|
+
/**
|
|
1332
|
+
* Guest execution capability authentication, not an Access management key.
|
|
1333
|
+
* Preserve any JSON tool result, including scalars and arrays.
|
|
1334
|
+
*
|
|
1335
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:invoke-tool` · permission `agents:sessions` · effect `write`
|
|
1336
|
+
*
|
|
1337
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
|
|
1338
|
+
*/
|
|
1339
|
+
invokeTool(request: InvokeToolRequest): Promise<unknown>;
|
|
1340
|
+
/**
|
|
1341
|
+
* The immutable pinned HTTP-tool catalog exposed to the guest's MCP bridge.
|
|
1342
|
+
*
|
|
1343
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:tool-catalog` · permission `agents:sessions` · effect `read`
|
|
1344
|
+
*
|
|
1345
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
|
|
1346
|
+
*/
|
|
1347
|
+
toolCatalog(request: ToolCatalogRequest): Promise<ToolCatalogResponse>;
|
|
1348
|
+
/**
|
|
1349
|
+
* Starts a session of an agent, pinned to its current version unless
|
|
1350
|
+
* `agent_version` names another. Requires a secret key until end-user
|
|
1351
|
+
* ownership is implemented. The session starts idle; `:send` starts its
|
|
1352
|
+
* first turn.
|
|
1353
|
+
*
|
|
1354
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/agent_sessions` · permission `agents:sessions` · effect `write`
|
|
1355
|
+
*
|
|
1356
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`, `SPEND_LIMIT_REACHED`.
|
|
1357
|
+
*/
|
|
1358
|
+
create(request: CreateAgentSessionRequest): Promise<AgentSession>;
|
|
1359
|
+
/**
|
|
1360
|
+
* Gets a session.
|
|
1361
|
+
*
|
|
1362
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}` · permission `agents:sessions` · effect `read`
|
|
1363
|
+
*
|
|
1364
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
1365
|
+
*/
|
|
1366
|
+
get(request: GetAgentSessionRequest): Promise<AgentSession>;
|
|
1367
|
+
/**
|
|
1368
|
+
* Lists sessions, newest first. With a publishable key, only the caller's
|
|
1369
|
+
* end user's sessions.
|
|
1370
|
+
*
|
|
1371
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/agent_sessions` · permission `agents:sessions` · effect `read`
|
|
1372
|
+
*
|
|
1373
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
1374
|
+
*/
|
|
1375
|
+
list(request: ListAgentSessionsRequest): Promise<ListAgentSessionsResponse>;
|
|
1376
|
+
/** Every item of every page of `list`. */
|
|
1377
|
+
listAll(request: ListAgentSessionsRequest): AsyncGenerator<AgentSession>;
|
|
1378
|
+
/**
|
|
1379
|
+
* Deletes a session and its events. A session whose turn is running is
|
|
1380
|
+
* refused with `INVALID_STATE` unless `force` is set, which interrupts it
|
|
1381
|
+
* first.
|
|
1382
|
+
*
|
|
1383
|
+
* `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}` · permission `agents:sessions` · effect `destructive`
|
|
1384
|
+
*
|
|
1385
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1386
|
+
*/
|
|
1387
|
+
delete(request: DeleteAgentSessionRequest): Promise<Record<string, never>>;
|
|
1388
|
+
/**
|
|
1389
|
+
* Sends a user message. On an idle or failed session it starts a new turn;
|
|
1390
|
+
* while a turn runs it is refused with `INVALID_STATE` (use `:steer`).
|
|
1391
|
+
* The same `Idempotency-Key` returns the same event.
|
|
1392
|
+
*
|
|
1393
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:send` · permission `agents:sessions` · effect `write`
|
|
1394
|
+
*
|
|
1395
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `SPEND_LIMIT_REACHED`.
|
|
1396
|
+
*/
|
|
1397
|
+
send(request: SendAgentSessionMessageRequest): Promise<SessionEvent>;
|
|
1398
|
+
/**
|
|
1399
|
+
* Sends a message into the running turn; the agent reads it at its next
|
|
1400
|
+
* step. On an idle session it is the same as `:send`.
|
|
1401
|
+
*
|
|
1402
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:steer` · permission `agents:sessions` · effect `write`
|
|
1403
|
+
*
|
|
1404
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1405
|
+
*/
|
|
1406
|
+
steer(request: SteerAgentSessionRequest): Promise<SessionEvent>;
|
|
1407
|
+
/**
|
|
1408
|
+
* Stops the running turn at its current step. Calls already made keep
|
|
1409
|
+
* their results; the session becomes idle. A no-op on an idle session.
|
|
1410
|
+
*
|
|
1411
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:interrupt` · permission `agents:sessions` · effect `write`
|
|
1412
|
+
*
|
|
1413
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1414
|
+
*/
|
|
1415
|
+
interrupt(request: InterruptAgentSessionRequest): Promise<AgentSession>;
|
|
1416
|
+
/**
|
|
1417
|
+
* Answers a tool call waiting for approval; the turn continues.
|
|
1418
|
+
*
|
|
1419
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:decideApproval` · permission `agents:sessions` · effect `write`
|
|
1420
|
+
*
|
|
1421
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1422
|
+
*/
|
|
1423
|
+
decideApproval(request: DecideAgentSessionApprovalRequest): Promise<SessionEvent>;
|
|
1424
|
+
/**
|
|
1425
|
+
* Returns the result of a client tool call; the turn continues.
|
|
1426
|
+
*
|
|
1427
|
+
* `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:submitToolResult` · permission `agents:sessions` · effect `write`
|
|
1428
|
+
*
|
|
1429
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1430
|
+
*/
|
|
1431
|
+
submitToolResult(request: SubmitAgentSessionToolResultRequest): Promise<SessionEvent>;
|
|
1432
|
+
}
|
|
1433
|
+
/** `session_events` of Sylphx Agents: Resource type `agents.sylphx.com/SessionEvent`. */
|
|
1434
|
+
export declare class SessionEventsCollection {
|
|
1435
|
+
private readonly client;
|
|
1436
|
+
constructor(client: runtime.Client);
|
|
1437
|
+
/**
|
|
1438
|
+
* Gets a session event.
|
|
1439
|
+
*
|
|
1440
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*\/session_events/*}` · permission `agents:sessions` · effect `read`
|
|
1441
|
+
*
|
|
1442
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
1443
|
+
*/
|
|
1444
|
+
get(request: GetSessionEventRequest): Promise<SessionEvent>;
|
|
1445
|
+
/**
|
|
1446
|
+
* Lists a session's events in sequence order. To follow a session, call
|
|
1447
|
+
* again with the filter `sequence > N`, N the last sequence read; `wait`
|
|
1448
|
+
* holds the call open until a newer event is appended or the wait ends.
|
|
1449
|
+
*
|
|
1450
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/agent_sessions/*}/session_events` · permission `agents:sessions` · effect `read`
|
|
1451
|
+
*
|
|
1452
|
+
* Errors: `RESOURCE_NOT_FOUND`, `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
1453
|
+
*/
|
|
1454
|
+
list(request: ListSessionEventsRequest): Promise<ListSessionEventsResponse>;
|
|
1455
|
+
/** Every item of every page of `list`. */
|
|
1456
|
+
listAll(request: ListSessionEventsRequest): AsyncGenerator<SessionEvent>;
|
|
1457
|
+
}
|
|
1458
|
+
/** `memory_stores` of Sylphx Agents: Resource type `agents.sylphx.com/MemoryStore`. */
|
|
1459
|
+
export declare class MemoryStoresCollection {
|
|
1460
|
+
private readonly client;
|
|
1461
|
+
constructor(client: runtime.Client);
|
|
1462
|
+
/**
|
|
1463
|
+
* Gets a memory store.
|
|
1464
|
+
*
|
|
1465
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/memory_stores/*}` · permission `agents:read` · effect `read`
|
|
1466
|
+
*
|
|
1467
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
1468
|
+
*/
|
|
1469
|
+
get(request: GetMemoryStoreRequest): Promise<MemoryStore>;
|
|
1470
|
+
/**
|
|
1471
|
+
* Lists memory stores.
|
|
1472
|
+
*
|
|
1473
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/memory_stores` · permission `agents:read` · effect `read`
|
|
1474
|
+
*
|
|
1475
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
1476
|
+
*/
|
|
1477
|
+
list(request: ListMemoryStoresRequest): Promise<ListMemoryStoresResponse>;
|
|
1478
|
+
/** Every item of every page of `list`. */
|
|
1479
|
+
listAll(request: ListMemoryStoresRequest): AsyncGenerator<MemoryStore>;
|
|
1480
|
+
/**
|
|
1481
|
+
* Creates a memory store.
|
|
1482
|
+
*
|
|
1483
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/memory_stores` · permission `agents:write` · effect `write`
|
|
1484
|
+
*
|
|
1485
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
|
|
1486
|
+
*/
|
|
1487
|
+
create(request: CreateMemoryStoreRequest): Promise<MemoryStore>;
|
|
1488
|
+
/**
|
|
1489
|
+
* Updates a memory store.
|
|
1490
|
+
*
|
|
1491
|
+
* `PATCH /v1/{memory_store.name=orgs/*\/projects/*\/envs/*\/memory_stores/*}` · permission `agents:write` · effect `write`
|
|
1492
|
+
*
|
|
1493
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1494
|
+
*/
|
|
1495
|
+
update(request: UpdateMemoryStoreRequest): Promise<MemoryStore>;
|
|
1496
|
+
/**
|
|
1497
|
+
* Deletes a memory store. A store an agent names is refused with
|
|
1498
|
+
* `RESOURCE_IN_USE`; a store with memories is refused with `INVALID_STATE`
|
|
1499
|
+
* unless `force` is set, which deletes them too.
|
|
1500
|
+
*
|
|
1501
|
+
* `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/memory_stores/*}` · permission `agents:write` · effect `destructive`
|
|
1502
|
+
*
|
|
1503
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `RESOURCE_IN_USE`.
|
|
1504
|
+
*/
|
|
1505
|
+
delete(request: DeleteMemoryStoreRequest): Promise<Record<string, never>>;
|
|
1506
|
+
}
|
|
1507
|
+
/** `memories` of Sylphx Agents: Resource type `agents.sylphx.com/Memory`. */
|
|
1508
|
+
export declare class MemoriesCollection {
|
|
1509
|
+
private readonly client;
|
|
1510
|
+
constructor(client: runtime.Client);
|
|
1511
|
+
/**
|
|
1512
|
+
* Gets a memory.
|
|
1513
|
+
*
|
|
1514
|
+
* `GET /v1/{name=orgs/*\/projects/*\/envs/*\/memory_stores/*\/memories/*}` · permission `agents:sessions` · effect `read`
|
|
1515
|
+
*
|
|
1516
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
|
|
1517
|
+
*/
|
|
1518
|
+
get(request: GetMemoryRequest): Promise<Memory>;
|
|
1519
|
+
/**
|
|
1520
|
+
* Lists a store's memories, newest first. With a publishable key, only the
|
|
1521
|
+
* caller's end user's memories.
|
|
1522
|
+
*
|
|
1523
|
+
* `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/memory_stores/*}/memories` · permission `agents:sessions` · effect `read`
|
|
1524
|
+
*
|
|
1525
|
+
* Errors: `RESOURCE_NOT_FOUND`, `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
|
|
1526
|
+
*/
|
|
1527
|
+
list(request: ListMemoriesRequest): Promise<ListMemoriesResponse>;
|
|
1528
|
+
/** Every item of every page of `list`. */
|
|
1529
|
+
listAll(request: ListMemoriesRequest): AsyncGenerator<Memory>;
|
|
1530
|
+
/**
|
|
1531
|
+
* Writes a memory.
|
|
1532
|
+
*
|
|
1533
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*\/memory_stores/*}/memories` · permission `agents:write` · effect `write`
|
|
1534
|
+
*
|
|
1535
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
|
|
1536
|
+
*/
|
|
1537
|
+
create(request: CreateMemoryRequest): Promise<Memory>;
|
|
1538
|
+
/**
|
|
1539
|
+
* Changes a memory's content.
|
|
1540
|
+
*
|
|
1541
|
+
* `PATCH /v1/{memory.name=orgs/*\/projects/*\/envs/*\/memory_stores/*\/memories/*}` · permission `agents:write` · effect `write`
|
|
1542
|
+
*
|
|
1543
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1544
|
+
*/
|
|
1545
|
+
update(request: UpdateMemoryRequest): Promise<Memory>;
|
|
1546
|
+
/**
|
|
1547
|
+
* Deletes a memory. An end user may delete their own.
|
|
1548
|
+
*
|
|
1549
|
+
* `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/memory_stores/*\/memories/*}` · permission `agents:sessions` · effect `destructive`
|
|
1550
|
+
*
|
|
1551
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
|
|
1552
|
+
*/
|
|
1553
|
+
delete(request: DeleteMemoryRequest): Promise<Record<string, never>>;
|
|
1554
|
+
/**
|
|
1555
|
+
* Recalls the memories that best match a query, by hybrid full-text and
|
|
1556
|
+
* vector search. With a publishable key, only the caller's end user's
|
|
1557
|
+
* memories. A read with a request body, like a query.
|
|
1558
|
+
*
|
|
1559
|
+
* `POST /v1/{parent=orgs/*\/projects/*\/envs/*\/memory_stores/*}/memories:search` · permission `agents:sessions` · effect `read`
|
|
1560
|
+
*
|
|
1561
|
+
* Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`.
|
|
1562
|
+
*/
|
|
1563
|
+
search(request: SearchMemoriesRequest): Promise<SearchMemoriesResponse>;
|
|
1564
|
+
}
|