onecli-sdk 0.1.0__py3-none-any.whl
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.
- onecli/__init__.py +97 -0
- onecli/_agent_env.py +238 -0
- onecli/_async/__init__.py +1 -0
- onecli/_async/_client.py +431 -0
- onecli/_async/_connected_agent.py +184 -0
- onecli/_async/_http.py +330 -0
- onecli/_async/_io.py +118 -0
- onecli/_async/_resources.py +1293 -0
- onecli/_errors.py +106 -0
- onecli/_js.py +122 -0
- onecli/_keys.py +101 -0
- onecli/_lifetime.py +110 -0
- onecli/_retry.py +116 -0
- onecli/_sync/__init__.py +1 -0
- onecli/_sync/_client.py +426 -0
- onecli/_sync/_connected_agent.py +185 -0
- onecli/_sync/_http.py +329 -0
- onecli/_sync/_io.py +110 -0
- onecli/_sync/_resources.py +1286 -0
- onecli/_url.py +264 -0
- onecli/_version.py +19 -0
- onecli/_wire.py +469 -0
- onecli/gateway.py +454 -0
- onecli/py.typed +0 -0
- onecli/types/__init__.py +229 -0
- onecli/types/_base.py +42 -0
- onecli/types/_openapi.py +1590 -0
- onecli_sdk-0.1.0.dist-info/METADATA +354 -0
- onecli_sdk-0.1.0.dist-info/RECORD +31 -0
- onecli_sdk-0.1.0.dist-info/WHEEL +4 -0
- onecli_sdk-0.1.0.dist-info/licenses/LICENSE +21 -0
onecli/types/_openapi.py
ADDED
|
@@ -0,0 +1,1590 @@
|
|
|
1
|
+
# Made by scripts/gen_types.py from openapi/v2.json. Do not edit: run
|
|
2
|
+
# `uv run python scripts/gen_types.py` after the spec changes.
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
from typing import Annotated, Any, Literal
|
|
7
|
+
|
|
8
|
+
from pydantic import Field, RootModel
|
|
9
|
+
|
|
10
|
+
from onecli.types._base import Model, OpenEnum
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class Activity(Model):
|
|
14
|
+
agent_id: Annotated[str, Field(alias="agentId")]
|
|
15
|
+
agent_name: Annotated[str | None, Field(alias="agentName")]
|
|
16
|
+
"""
|
|
17
|
+
null: the agent was removed since.
|
|
18
|
+
"""
|
|
19
|
+
created_at: Annotated[str, Field(alias="createdAt")]
|
|
20
|
+
"""
|
|
21
|
+
ISO 8601.
|
|
22
|
+
"""
|
|
23
|
+
host: str
|
|
24
|
+
id: str
|
|
25
|
+
item_ids: Annotated[list[str], Field(alias="itemIds")]
|
|
26
|
+
"""
|
|
27
|
+
The items the request used. Ids only.
|
|
28
|
+
"""
|
|
29
|
+
items: list[ActivityItem]
|
|
30
|
+
"""
|
|
31
|
+
The names of the request's items you can use now. An item you cannot use, or a deleted one, is left out.
|
|
32
|
+
"""
|
|
33
|
+
latency_ms: Annotated[int, Field(alias="latencyMs")]
|
|
34
|
+
method: str
|
|
35
|
+
path: str
|
|
36
|
+
"""
|
|
37
|
+
The request path, without its query string.
|
|
38
|
+
"""
|
|
39
|
+
provider: str
|
|
40
|
+
"""
|
|
41
|
+
The app the request was for, else the host.
|
|
42
|
+
"""
|
|
43
|
+
result: Annotated[Literal["allowed", "blocked", "approval", "rate_limited"], OpenEnum] | None
|
|
44
|
+
"""
|
|
45
|
+
What the rules did with the request. null: an older row, written before this was kept.
|
|
46
|
+
"""
|
|
47
|
+
status: int
|
|
48
|
+
"""
|
|
49
|
+
The HTTP status the agent received.
|
|
50
|
+
"""
|
|
51
|
+
vault_id: Annotated[str, Field(alias="vaultId")]
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class ActivityItem(Model):
|
|
55
|
+
id: str
|
|
56
|
+
name: str
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class AddedBy(Model):
|
|
60
|
+
"""
|
|
61
|
+
Who added the key. null: an app, not known, or that person is no longer in the organization.
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
name: str
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class Agent(Model):
|
|
68
|
+
created_at: Annotated[str, Field(alias="createdAt")]
|
|
69
|
+
"""
|
|
70
|
+
ISO 8601.
|
|
71
|
+
"""
|
|
72
|
+
created_by: Annotated[AgentCreatedBy | None, Field(alias="createdBy")]
|
|
73
|
+
expires_at: Annotated[str | None, Field(alias="expiresAt")]
|
|
74
|
+
"""
|
|
75
|
+
ISO 8601. When the agent's credential stops by itself. null: it stops only when the agent is disconnected.
|
|
76
|
+
"""
|
|
77
|
+
id: str
|
|
78
|
+
kind: str | None
|
|
79
|
+
"""
|
|
80
|
+
Which agent this is, as it said itself when it connected: a short lowercase label such as claude, codex or cursor. It never decides access. null: not known.
|
|
81
|
+
"""
|
|
82
|
+
last_seen_at: Annotated[str | None, Field(alias="lastSeenAt")]
|
|
83
|
+
"""
|
|
84
|
+
ISO 8601. The agent's newest request through the gateway in the last 30 days. null: none in that time.
|
|
85
|
+
"""
|
|
86
|
+
name: str
|
|
87
|
+
provider: str | None
|
|
88
|
+
"""
|
|
89
|
+
The agent's provider: a short lowercase label. It never decides access. null: not known.
|
|
90
|
+
"""
|
|
91
|
+
runtime: str | None
|
|
92
|
+
"""
|
|
93
|
+
What the agent runs on. null: not known yet.
|
|
94
|
+
"""
|
|
95
|
+
status: Annotated[Literal["active", "expired"], OpenEnum]
|
|
96
|
+
"""
|
|
97
|
+
expired: the credential's expiry has passed. The agent stays listed.
|
|
98
|
+
"""
|
|
99
|
+
vault: AgentVault
|
|
100
|
+
vault_id: Annotated[str, Field(alias="vaultId")]
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
class AgentCheck(Model):
|
|
104
|
+
code: str | None
|
|
105
|
+
"""
|
|
106
|
+
Set when a usage limit refuses the call: the error code the call itself would be answered with. null: no usage limit refuses it.
|
|
107
|
+
"""
|
|
108
|
+
decision: Annotated[
|
|
109
|
+
Literal["allowed", "blocked", "needs_approval", "no_item", "destination_refused"], OpenEnum
|
|
110
|
+
]
|
|
111
|
+
"""
|
|
112
|
+
allowed: it would be sent with your item. blocked: a rule or a usage limit refuses it. needs_approval: a person must approve it first. no_item: nothing of yours serves it, so it would be sent with no credential. destination_refused: the gateway does not send there.
|
|
113
|
+
"""
|
|
114
|
+
item: AgentCheckItem | None
|
|
115
|
+
"""
|
|
116
|
+
The item the call would use, by its id in your list of items. null: none.
|
|
117
|
+
"""
|
|
118
|
+
reason: str
|
|
119
|
+
"""
|
|
120
|
+
The decision in words, with what it could not take into account.
|
|
121
|
+
"""
|
|
122
|
+
rule: AgentCheckRule | None
|
|
123
|
+
"""
|
|
124
|
+
The rule that decided. null: no rule did, or the rule is set above your vault and does not block.
|
|
125
|
+
"""
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
class AgentCheckItem(Model):
|
|
129
|
+
"""
|
|
130
|
+
The item the call would use, by its id in your list of items. null: none.
|
|
131
|
+
"""
|
|
132
|
+
|
|
133
|
+
id: str
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
class AgentCheckRequest(Model):
|
|
137
|
+
method: str
|
|
138
|
+
"""
|
|
139
|
+
The HTTP method of the call you plan.
|
|
140
|
+
"""
|
|
141
|
+
url: str
|
|
142
|
+
"""
|
|
143
|
+
The full address of the call you plan.
|
|
144
|
+
"""
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
class AgentCheckRule(Model):
|
|
148
|
+
"""
|
|
149
|
+
The rule that decided. null: no rule did, or the rule is set above your vault and does not block.
|
|
150
|
+
"""
|
|
151
|
+
|
|
152
|
+
id: str | None
|
|
153
|
+
"""
|
|
154
|
+
null for a rule set above your vault.
|
|
155
|
+
"""
|
|
156
|
+
name: str
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
class AgentCheckUnknown(Model):
|
|
160
|
+
decision: Literal["unknown"] = "unknown"
|
|
161
|
+
reason: str
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
class AgentCreatedBy(Model):
|
|
165
|
+
"""
|
|
166
|
+
Who made the agent. null: an agent from before 3.0.
|
|
167
|
+
"""
|
|
168
|
+
|
|
169
|
+
key_name: Annotated[str | None, Field(alias="keyName")]
|
|
170
|
+
"""
|
|
171
|
+
The API key's name: for key, and for connect when a key made the token. null otherwise.
|
|
172
|
+
"""
|
|
173
|
+
person: str | None
|
|
174
|
+
"""
|
|
175
|
+
The member's name, else their email. For connect: the person who made the token. null: not known.
|
|
176
|
+
"""
|
|
177
|
+
via: Annotated[Literal["key", "session", "connect", "signup"], OpenEnum]
|
|
178
|
+
"""
|
|
179
|
+
key: an API key. session: a person in the dashboard. connect: a connect token. signup: a sign-up the agent started.
|
|
180
|
+
"""
|
|
181
|
+
your_key: Annotated[AgentCreatedByYourKey | None, Field(alias="yourKey")]
|
|
182
|
+
"""
|
|
183
|
+
For key, when that key is your own. null otherwise, so another person's key id is never told.
|
|
184
|
+
"""
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
class AgentCreatedByYourKey(Model):
|
|
188
|
+
"""
|
|
189
|
+
For key, when that key is your own. null otherwise, so another person's key id is never told.
|
|
190
|
+
"""
|
|
191
|
+
|
|
192
|
+
agent_kind: Annotated[str | None, Field(alias="agentKind")]
|
|
193
|
+
"""
|
|
194
|
+
For a key `onecli login` made: which agent signed in (claude, codex, ...), as the CLI said. A label only. null: unknown.
|
|
195
|
+
"""
|
|
196
|
+
id: str
|
|
197
|
+
live: bool
|
|
198
|
+
"""
|
|
199
|
+
true: the key still works, not revoked and not expired. Its holder can connect the agent again until you revoke it (DELETE /v2/keys/{id}).
|
|
200
|
+
"""
|
|
201
|
+
login: bool
|
|
202
|
+
"""
|
|
203
|
+
true: the key was made by `onecli login`.
|
|
204
|
+
"""
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
class AgentGateway(Model):
|
|
208
|
+
"""
|
|
209
|
+
Where the agent reaches the gateway. Build the proxy URL from this and decide nothing yourself.
|
|
210
|
+
"""
|
|
211
|
+
|
|
212
|
+
address: str
|
|
213
|
+
"""
|
|
214
|
+
The gateway's host and port, with no scheme.
|
|
215
|
+
"""
|
|
216
|
+
scheme: Annotated[Literal["http", "https"], OpenEnum]
|
|
217
|
+
"""
|
|
218
|
+
The scheme of the proxy URL the agent uses: https where the gateway ends TLS for agents, else http. Use it as given.
|
|
219
|
+
"""
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
class AgentItem(Model):
|
|
223
|
+
allows: list[Annotated[Literal["read", "write"], OpenEnum]]
|
|
224
|
+
"""
|
|
225
|
+
What you may do with the item: read, write, both, or nothing (empty).
|
|
226
|
+
"""
|
|
227
|
+
example: str | None
|
|
228
|
+
"""
|
|
229
|
+
A ready call through the gateway, with your access named by its variable. null when the item names no single host.
|
|
230
|
+
"""
|
|
231
|
+
hosts: list[str]
|
|
232
|
+
"""
|
|
233
|
+
The hosts the gateway uses this item for.
|
|
234
|
+
"""
|
|
235
|
+
id: str
|
|
236
|
+
kind: Annotated[Literal["app", "api_key", "llm_key"], OpenEnum]
|
|
237
|
+
name: str
|
|
238
|
+
needs_approval: Annotated[bool, Field(alias="needsApproval")]
|
|
239
|
+
"""
|
|
240
|
+
Some of what it allows waits for a person to approve the call.
|
|
241
|
+
"""
|
|
242
|
+
service: str | None
|
|
243
|
+
"""
|
|
244
|
+
The app or LLM provider, for example github or anthropic. null for a plain API key.
|
|
245
|
+
"""
|
|
246
|
+
state: Annotated[Literal["working", "needs_reconnecting", "expired"], OpenEnum]
|
|
247
|
+
"""
|
|
248
|
+
working, needs_reconnecting (a person must connect it again) or expired.
|
|
249
|
+
"""
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
class AgentSelf(Model):
|
|
253
|
+
expires_at: Annotated[str | None, Field(alias="expiresAt")]
|
|
254
|
+
"""
|
|
255
|
+
ISO 8601. When this access stops by itself. null: it stops only when the agent is disconnected.
|
|
256
|
+
"""
|
|
257
|
+
gateway: AgentGateway
|
|
258
|
+
id: str
|
|
259
|
+
name: str
|
|
260
|
+
provider: str | None
|
|
261
|
+
"""
|
|
262
|
+
The agent's provider: a short lowercase label. It never decides access. null: not known.
|
|
263
|
+
"""
|
|
264
|
+
runtime: str | None
|
|
265
|
+
"""
|
|
266
|
+
What the agent runs on. null: not known.
|
|
267
|
+
"""
|
|
268
|
+
vault: AgentSelfVault
|
|
269
|
+
"""
|
|
270
|
+
The one vault this agent draws from.
|
|
271
|
+
"""
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
class AgentSelfVault(Model):
|
|
275
|
+
"""
|
|
276
|
+
The one vault this agent draws from.
|
|
277
|
+
"""
|
|
278
|
+
|
|
279
|
+
id: str
|
|
280
|
+
name: str
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
class AgentSignup(Model):
|
|
284
|
+
expires_at: Annotated[str, Field(alias="expiresAt")]
|
|
285
|
+
"""
|
|
286
|
+
ISO 8601.
|
|
287
|
+
"""
|
|
288
|
+
id: str
|
|
289
|
+
name: str | None
|
|
290
|
+
"""
|
|
291
|
+
The name the agent asked for. null: the server picks one.
|
|
292
|
+
"""
|
|
293
|
+
runtime: str
|
|
294
|
+
"""
|
|
295
|
+
What the agent runs on.
|
|
296
|
+
"""
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
class AgentVault(Model):
|
|
300
|
+
"""
|
|
301
|
+
The agent's vault: its vaultId, with the name the vault list shows.
|
|
302
|
+
"""
|
|
303
|
+
|
|
304
|
+
id: str
|
|
305
|
+
logo_url: Annotated[str | None, Field(alias="logoUrl")]
|
|
306
|
+
"""
|
|
307
|
+
The URL of the vault's image, as the vault's own answer gives it. null: it has none.
|
|
308
|
+
"""
|
|
309
|
+
name: str
|
|
310
|
+
personal: bool
|
|
311
|
+
"""
|
|
312
|
+
Whether it is your personal vault. Nobody sees another person's.
|
|
313
|
+
"""
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
class ApiKeyCreate(Model):
|
|
317
|
+
host_pattern: Annotated[str, Field(alias="hostPattern")]
|
|
318
|
+
injection_config: Annotated[
|
|
319
|
+
HeaderInjection | QueryParamInjection | PathTemplateInjection | PathRegexInjection | None,
|
|
320
|
+
Field(alias="injectionConfig"),
|
|
321
|
+
] = None
|
|
322
|
+
kind: Literal["api_key"] = "api_key"
|
|
323
|
+
name: str
|
|
324
|
+
path_pattern: Annotated[str | None, Field(alias="pathPattern")] = None
|
|
325
|
+
value: str
|
|
326
|
+
"""
|
|
327
|
+
The key itself. Stored encrypted. No answer ever carries it back.
|
|
328
|
+
"""
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
class App(Model):
|
|
332
|
+
available: bool
|
|
333
|
+
"""
|
|
334
|
+
Whether the organization lets this vault connect the app. Always true without ?vault=, and in an organization that limits no app.
|
|
335
|
+
"""
|
|
336
|
+
connection: Annotated[Literal["oauth", "api_key", "credentials_import"], OpenEnum]
|
|
337
|
+
"""
|
|
338
|
+
How it connects: a sign-in with the app (oauth), a pasted key (api_key) or pasted account details (credentials_import).
|
|
339
|
+
"""
|
|
340
|
+
dark_icon: Annotated[str | None, Field(alias="darkIcon")]
|
|
341
|
+
"""
|
|
342
|
+
The icon for a dark background. null: use icon.
|
|
343
|
+
"""
|
|
344
|
+
database: bool
|
|
345
|
+
"""
|
|
346
|
+
A database. Agents reach it with a database client through the gateway, not over HTTP.
|
|
347
|
+
"""
|
|
348
|
+
description: str
|
|
349
|
+
icon: str
|
|
350
|
+
"""
|
|
351
|
+
A path on the dashboard's own site, for example /icons/github.svg.
|
|
352
|
+
"""
|
|
353
|
+
id: str
|
|
354
|
+
"""
|
|
355
|
+
The app's id, for example github. An item names it.
|
|
356
|
+
"""
|
|
357
|
+
name: str
|
|
358
|
+
setup: Annotated[Literal["ready", "needs_setup"], OpenEnum]
|
|
359
|
+
"""
|
|
360
|
+
needs_setup: the app signs in with OAuth and this organization has no OAuth app for it yet. Otherwise ready.
|
|
361
|
+
"""
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
class AppItemCreate(Model):
|
|
365
|
+
"""
|
|
366
|
+
Not made here: answers 422. Connect an app in its flow.
|
|
367
|
+
"""
|
|
368
|
+
|
|
369
|
+
kind: Literal["app"] = "app"
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
class AppTarget(Model):
|
|
373
|
+
connection_scope: Annotated[
|
|
374
|
+
Annotated[Literal["organization", "workspace"], OpenEnum] | None,
|
|
375
|
+
Field(alias="connectionScope"),
|
|
376
|
+
] = None
|
|
377
|
+
kind: Literal["app"] = "app"
|
|
378
|
+
provider: str
|
|
379
|
+
tools: list[str] | None = None
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
class Approval(Model):
|
|
383
|
+
agent_id: Annotated[str | None, Field(alias="agentId")]
|
|
384
|
+
agent_name: Annotated[str | None, Field(alias="agentName")]
|
|
385
|
+
app: str | None
|
|
386
|
+
"""
|
|
387
|
+
The app the request is for. null: not a known app.
|
|
388
|
+
"""
|
|
389
|
+
created_at: Annotated[str | None, Field(alias="createdAt")]
|
|
390
|
+
"""
|
|
391
|
+
ISO 8601.
|
|
392
|
+
"""
|
|
393
|
+
expires_at: Annotated[str | None, Field(alias="expiresAt")]
|
|
394
|
+
"""
|
|
395
|
+
ISO 8601. After this the request is refused unanswered.
|
|
396
|
+
"""
|
|
397
|
+
id: str
|
|
398
|
+
item_id: Annotated[str | None, Field(alias="itemId")]
|
|
399
|
+
"""
|
|
400
|
+
The item whose permission held the request. null: no single permission did, and always_allow is refused.
|
|
401
|
+
"""
|
|
402
|
+
request: ApprovalRequest
|
|
403
|
+
status: Literal["pending"] = "pending"
|
|
404
|
+
tool: str | None
|
|
405
|
+
"""
|
|
406
|
+
The tool of that item the request uses. null with itemId.
|
|
407
|
+
"""
|
|
408
|
+
vault_id: Annotated[str, Field(alias="vaultId")]
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
class ApprovalDecided(Model):
|
|
412
|
+
id: str
|
|
413
|
+
status: Annotated[Literal["approved", "denied"], OpenEnum]
|
|
414
|
+
vault_id: Annotated[str, Field(alias="vaultId")]
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
class ApprovalDecision(Model):
|
|
418
|
+
decision: Annotated[Literal["approve", "deny", "always_allow"], OpenEnum]
|
|
419
|
+
"""
|
|
420
|
+
approve: let this request through. deny: refuse it. always_allow: let it through and stop asking for this tool on this item.
|
|
421
|
+
"""
|
|
422
|
+
vault: str
|
|
423
|
+
"""
|
|
424
|
+
The vault the request waits on: its vaultId in the list.
|
|
425
|
+
"""
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
class ApprovalRequest(Model):
|
|
429
|
+
action: str | None
|
|
430
|
+
"""
|
|
431
|
+
One line for what the request does.
|
|
432
|
+
"""
|
|
433
|
+
details: list[ApprovalRequestDetail]
|
|
434
|
+
"""
|
|
435
|
+
What the request would do, as rows to read before answering. Never a header, and never the body as it was sent.
|
|
436
|
+
"""
|
|
437
|
+
host: str
|
|
438
|
+
method: str
|
|
439
|
+
path: str
|
|
440
|
+
"""
|
|
441
|
+
The path the agent asked for, as it sent it.
|
|
442
|
+
"""
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
class ApprovalRequestDetail(Model):
|
|
446
|
+
label: str
|
|
447
|
+
text: str
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
class ApproveAgentSignup(Model):
|
|
451
|
+
user_code: Annotated[str, Field(alias="userCode")]
|
|
452
|
+
"""
|
|
453
|
+
The code the agent showed, with or without its dash.
|
|
454
|
+
"""
|
|
455
|
+
vault_id: Annotated[str, Field(alias="vaultId")]
|
|
456
|
+
"""
|
|
457
|
+
The vault to connect the agent to. One you can use.
|
|
458
|
+
"""
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
class AuditEntry(Model):
|
|
462
|
+
action: str
|
|
463
|
+
actor: AuditEntryActor | None
|
|
464
|
+
"""
|
|
465
|
+
The person who acted. null on a service row.
|
|
466
|
+
"""
|
|
467
|
+
actor_kind: Annotated[Annotated[Literal["user", "service"], OpenEnum], Field(alias="actorKind")]
|
|
468
|
+
"""
|
|
469
|
+
user: a person acted. service: the platform acted on its own, named by serviceActor.
|
|
470
|
+
"""
|
|
471
|
+
created_at: Annotated[str, Field(alias="createdAt")]
|
|
472
|
+
id: str
|
|
473
|
+
metadata: Any | None = None
|
|
474
|
+
"""
|
|
475
|
+
What the action was about: ids and names, never a value.
|
|
476
|
+
"""
|
|
477
|
+
service: str
|
|
478
|
+
service_actor: Annotated[str | None, Field(alias="serviceActor")]
|
|
479
|
+
source: str
|
|
480
|
+
status: str
|
|
481
|
+
vault_id: Annotated[str | None, Field(alias="vaultId")]
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
class AuditEntryActor(Model):
|
|
485
|
+
"""
|
|
486
|
+
The person who acted. null on a service row.
|
|
487
|
+
"""
|
|
488
|
+
|
|
489
|
+
email: str
|
|
490
|
+
user_id: Annotated[str, Field(alias="userId")]
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
class CollectedAgentSignup(Model):
|
|
494
|
+
created_at: Annotated[str, Field(alias="createdAt")]
|
|
495
|
+
"""
|
|
496
|
+
ISO 8601.
|
|
497
|
+
"""
|
|
498
|
+
credential: Annotated[str, Field(repr=False)]
|
|
499
|
+
"""
|
|
500
|
+
The agent's credential (oc_agent_...). Shown here once. Store it now: it cannot be read again.
|
|
501
|
+
"""
|
|
502
|
+
expires_at: Annotated[str | None, Field(alias="expiresAt")]
|
|
503
|
+
"""
|
|
504
|
+
ISO 8601. When the agent's credential stops by itself. null: it stops only when the agent is disconnected.
|
|
505
|
+
"""
|
|
506
|
+
gateway: AgentGateway
|
|
507
|
+
id: str
|
|
508
|
+
kind: str | None
|
|
509
|
+
"""
|
|
510
|
+
Which agent this is, as it said itself when it connected: a short lowercase label such as claude, codex or cursor. It never decides access. null: not known.
|
|
511
|
+
"""
|
|
512
|
+
name: str
|
|
513
|
+
provider: str | None
|
|
514
|
+
"""
|
|
515
|
+
The agent's provider: a short lowercase label. It never decides access. null: not known.
|
|
516
|
+
"""
|
|
517
|
+
runtime: str | None
|
|
518
|
+
"""
|
|
519
|
+
What the agent runs on. null: not known yet.
|
|
520
|
+
"""
|
|
521
|
+
vault_id: Annotated[str, Field(alias="vaultId")]
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
class ConfirmIdentity(Model):
|
|
525
|
+
password: str
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
class ConnectToken(Model):
|
|
529
|
+
created_at: Annotated[str | None, Field(alias="createdAt")]
|
|
530
|
+
"""
|
|
531
|
+
ISO 8601. When it was made. null: it is off.
|
|
532
|
+
"""
|
|
533
|
+
enabled: bool
|
|
534
|
+
"""
|
|
535
|
+
Whether the vault's connect command works.
|
|
536
|
+
"""
|
|
537
|
+
last_used_at: Annotated[str | None, Field(alias="lastUsedAt")]
|
|
538
|
+
"""
|
|
539
|
+
ISO 8601, to the minute. When it last connected an agent. null: never, or it is off.
|
|
540
|
+
"""
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
class ConnectionTarget(Model):
|
|
544
|
+
connection_id: Annotated[str, Field(alias="connectionId")]
|
|
545
|
+
kind: Literal["connection"] = "connection"
|
|
546
|
+
tools: list[str] | None = None
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
class Counts(Model):
|
|
550
|
+
agents: int
|
|
551
|
+
"""
|
|
552
|
+
The agents on those vaults.
|
|
553
|
+
"""
|
|
554
|
+
agents_never_seen: Annotated[int, Field(alias="agentsNeverSeen")]
|
|
555
|
+
"""
|
|
556
|
+
Of those, the ones /v2/agents lists with no lastSeenAt: not connected yet.
|
|
557
|
+
"""
|
|
558
|
+
item_vaults: Annotated[int, Field(alias="itemVaults")]
|
|
559
|
+
"""
|
|
560
|
+
How many of those vaults hold at least one live item.
|
|
561
|
+
"""
|
|
562
|
+
items: int
|
|
563
|
+
"""
|
|
564
|
+
Live items in those vaults. Deleted items are not counted.
|
|
565
|
+
"""
|
|
566
|
+
shared_vaults: Annotated[int, Field(alias="sharedVaults")]
|
|
567
|
+
"""
|
|
568
|
+
Of those, the ones more than one person, or a group, can use.
|
|
569
|
+
"""
|
|
570
|
+
vaults: int
|
|
571
|
+
"""
|
|
572
|
+
The vaults you can use.
|
|
573
|
+
"""
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
class CreateAgent(Model):
|
|
577
|
+
expires_at: Annotated[str | None, Field(alias="expiresAt")] = None
|
|
578
|
+
"""
|
|
579
|
+
ISO 8601, at least 5 minutes and at most 90 days ahead. Unset: no expiry.
|
|
580
|
+
"""
|
|
581
|
+
host: str | None = None
|
|
582
|
+
"""
|
|
583
|
+
The machine's host name. With no name, the agent is named after it (with 4 hex characters added when that name is taken on the vault).
|
|
584
|
+
"""
|
|
585
|
+
kind: str | None = None
|
|
586
|
+
"""
|
|
587
|
+
Which agent this is: a short lowercase label such as claude, codex or cursor. It never decides access.
|
|
588
|
+
"""
|
|
589
|
+
name: str | None = None
|
|
590
|
+
"""
|
|
591
|
+
1 to 64 characters. Unset: the server names the agent after host, or from the runtime and 4 hex characters. With a one-use connect token that fixes a name, the token's is used.
|
|
592
|
+
"""
|
|
593
|
+
provider: str | None = None
|
|
594
|
+
"""
|
|
595
|
+
The agent's provider: a short lowercase label that never decides access. With a one-use connect token that fixes a provider, the token's is used.
|
|
596
|
+
"""
|
|
597
|
+
replace: bool | None = None
|
|
598
|
+
"""
|
|
599
|
+
Used only when the OneCLI-Agent-Credential header names an agent on another vault. true: disconnect that agent and connect a new one here.
|
|
600
|
+
"""
|
|
601
|
+
runtime: Annotated[Literal["docker", "linux", "macos", "windows"], OpenEnum] | None = None
|
|
602
|
+
"""
|
|
603
|
+
What the agent runs on: docker for a container, else the machine's system. Default: linux.
|
|
604
|
+
"""
|
|
605
|
+
vault_id: Annotated[str | None, Field(alias="vaultId")] = None
|
|
606
|
+
"""
|
|
607
|
+
The vault to connect to. Required with a key or a session. Not taken with a connect token, whose vault is fixed.
|
|
608
|
+
"""
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
class CreateKey(Model):
|
|
612
|
+
expires_in_days: Annotated[int | None, Field(alias="expiresInDays")] = None
|
|
613
|
+
"""
|
|
614
|
+
1 to 365. Unset: 90 days. null: no expiry.
|
|
615
|
+
"""
|
|
616
|
+
name: str
|
|
617
|
+
permissions: list[Annotated[Literal["manage", "approve"], OpenEnum]] | None = None
|
|
618
|
+
"""
|
|
619
|
+
Default: manage only.
|
|
620
|
+
"""
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
class CreateOneUseConnectToken(Model):
|
|
624
|
+
expires_in_minutes: Annotated[int | None, Field(alias="expiresInMinutes")] = None
|
|
625
|
+
"""
|
|
626
|
+
How long the token works. 1 to 60. Default: 15.
|
|
627
|
+
"""
|
|
628
|
+
name: str | None = None
|
|
629
|
+
"""
|
|
630
|
+
The name the agent gets, 1 to 64 characters. It wins over a name the connecting place sends. Unset: that place names the agent.
|
|
631
|
+
"""
|
|
632
|
+
provider: str | None = None
|
|
633
|
+
"""
|
|
634
|
+
The provider the agent gets: a short lowercase label that never decides access. It wins over one the connecting place sends.
|
|
635
|
+
"""
|
|
636
|
+
|
|
637
|
+
|
|
638
|
+
class CreatedAgent(Model):
|
|
639
|
+
created_at: Annotated[str, Field(alias="createdAt")]
|
|
640
|
+
"""
|
|
641
|
+
ISO 8601.
|
|
642
|
+
"""
|
|
643
|
+
credential: Annotated[str, Field(repr=False)]
|
|
644
|
+
"""
|
|
645
|
+
The agent's credential (oc_agent_...). Shown here once. Store it now: it cannot be read again.
|
|
646
|
+
"""
|
|
647
|
+
expires_at: Annotated[str | None, Field(alias="expiresAt")]
|
|
648
|
+
"""
|
|
649
|
+
ISO 8601. When the agent's credential stops by itself. null: it stops only when the agent is disconnected.
|
|
650
|
+
"""
|
|
651
|
+
gateway: AgentGateway
|
|
652
|
+
id: str
|
|
653
|
+
kind: str | None
|
|
654
|
+
"""
|
|
655
|
+
Which agent this is, as it said itself when it connected: a short lowercase label such as claude, codex or cursor. It never decides access. null: not known.
|
|
656
|
+
"""
|
|
657
|
+
name: str
|
|
658
|
+
provider: str | None
|
|
659
|
+
"""
|
|
660
|
+
The agent's provider: a short lowercase label. It never decides access. null: not known.
|
|
661
|
+
"""
|
|
662
|
+
runtime: str | None
|
|
663
|
+
"""
|
|
664
|
+
What the agent runs on. null: not known yet.
|
|
665
|
+
"""
|
|
666
|
+
vault_id: Annotated[str, Field(alias="vaultId")]
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
class CreatedConnectToken(ConnectToken):
|
|
670
|
+
connect_token: Annotated[str, Field(alias="connectToken", repr=False)]
|
|
671
|
+
"""
|
|
672
|
+
The connect token itself (oc_connect_...). Shown here once. Put it in the connect command now: it cannot be read again.
|
|
673
|
+
"""
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
class CreatedOrganization(Model):
|
|
677
|
+
organization: Organization
|
|
678
|
+
vault_id: Annotated[str, Field(alias="vaultId")]
|
|
679
|
+
"""
|
|
680
|
+
The new organization's first vault.
|
|
681
|
+
"""
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
class Error(Model):
|
|
685
|
+
error: ErrorError
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
class ErrorDetail(Model):
|
|
689
|
+
field: str
|
|
690
|
+
"""
|
|
691
|
+
Where the problem is.
|
|
692
|
+
"""
|
|
693
|
+
issue: str
|
|
694
|
+
"""
|
|
695
|
+
What kind of problem.
|
|
696
|
+
"""
|
|
697
|
+
message: str
|
|
698
|
+
"""
|
|
699
|
+
The problem in words.
|
|
700
|
+
"""
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
class ErrorError(Model):
|
|
704
|
+
code: Annotated[
|
|
705
|
+
Literal[
|
|
706
|
+
"bad_request",
|
|
707
|
+
"validation_failed",
|
|
708
|
+
"unauthenticated",
|
|
709
|
+
"forbidden",
|
|
710
|
+
"not_found",
|
|
711
|
+
"conflict",
|
|
712
|
+
"gone",
|
|
713
|
+
"idempotency_conflict",
|
|
714
|
+
"precondition_required",
|
|
715
|
+
"rate_limited",
|
|
716
|
+
"authorization_pending",
|
|
717
|
+
"slow_down",
|
|
718
|
+
"access_denied",
|
|
719
|
+
"expired_token",
|
|
720
|
+
"internal",
|
|
721
|
+
"unavailable",
|
|
722
|
+
],
|
|
723
|
+
OpenEnum,
|
|
724
|
+
]
|
|
725
|
+
details: list[ErrorDetail]
|
|
726
|
+
message: str
|
|
727
|
+
request_id: Annotated[str | None, Field(alias="requestId")]
|
|
728
|
+
"""
|
|
729
|
+
The X-Request-Id of this call, to quote when asking.
|
|
730
|
+
"""
|
|
731
|
+
|
|
732
|
+
|
|
733
|
+
class GroupRuleIdentity(Model):
|
|
734
|
+
id: str
|
|
735
|
+
type: Literal["group"] = "group"
|
|
736
|
+
|
|
737
|
+
|
|
738
|
+
class HeaderInjection(Model):
|
|
739
|
+
header_name: Annotated[str, Field(alias="headerName")]
|
|
740
|
+
value_format: Annotated[str | None, Field(alias="valueFormat")] = None
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
class Health(Model):
|
|
744
|
+
status: Literal["ok"] = "ok"
|
|
745
|
+
timestamp: str
|
|
746
|
+
"""
|
|
747
|
+
Server time, ISO 8601.
|
|
748
|
+
"""
|
|
749
|
+
version: str
|
|
750
|
+
"""
|
|
751
|
+
The server's version.
|
|
752
|
+
"""
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
class Item(Model):
|
|
756
|
+
allow_plain_http: Annotated[bool, Field(alias="allowPlainHttp")]
|
|
757
|
+
"""
|
|
758
|
+
The gateway may send this item over plain http://. Off unless a person turns it on.
|
|
759
|
+
"""
|
|
760
|
+
created_at: Annotated[str, Field(alias="createdAt")]
|
|
761
|
+
"""
|
|
762
|
+
ISO 8601.
|
|
763
|
+
"""
|
|
764
|
+
deleted_at: Annotated[str | None, Field(alias="deletedAt")]
|
|
765
|
+
"""
|
|
766
|
+
ISO 8601. When it was deleted. null: a live item. A deleted item is listed only with deleted=true.
|
|
767
|
+
"""
|
|
768
|
+
enabled: bool
|
|
769
|
+
"""
|
|
770
|
+
Off: the gateway does not use the item for any agent, whatever its permissions say. Requests to its hosts go out with no credential.
|
|
771
|
+
"""
|
|
772
|
+
hosts: list[str]
|
|
773
|
+
"""
|
|
774
|
+
The hosts the gateway uses this item for.
|
|
775
|
+
"""
|
|
776
|
+
id: str
|
|
777
|
+
kind: Annotated[Literal["app", "api_key", "llm_key"], OpenEnum]
|
|
778
|
+
last_used_at: Annotated[str | None, Field(alias="lastUsedAt")]
|
|
779
|
+
"""
|
|
780
|
+
ISO 8601. When the gateway last used it for a request, to the hour. null: never used.
|
|
781
|
+
"""
|
|
782
|
+
name: str
|
|
783
|
+
permission_summary: Annotated[PermissionSummary, Field(alias="permissionSummary")]
|
|
784
|
+
purge_at: Annotated[str | None, Field(alias="purgeAt")]
|
|
785
|
+
"""
|
|
786
|
+
ISO 8601. When a deleted item is destroyed for good, unless restored first. null: a live item.
|
|
787
|
+
"""
|
|
788
|
+
rotated_at: Annotated[str, Field(alias="rotatedAt")]
|
|
789
|
+
"""
|
|
790
|
+
ISO 8601. When the value was last set: made, given a new value, or refreshed by the gateway.
|
|
791
|
+
"""
|
|
792
|
+
service: str | None
|
|
793
|
+
"""
|
|
794
|
+
The app or LLM provider, for example github or anthropic. null for a plain API key.
|
|
795
|
+
"""
|
|
796
|
+
state: Annotated[Literal["ready", "reauth_required", "disconnected"], OpenEnum]
|
|
797
|
+
"""
|
|
798
|
+
ready, reauth_required (the app must be signed in again) or disconnected.
|
|
799
|
+
"""
|
|
800
|
+
vault_id: Annotated[str, Field(alias="vaultId")]
|
|
801
|
+
version: int
|
|
802
|
+
"""
|
|
803
|
+
A key's current version, for If-Match on a change. 0 for an app, which has no versions.
|
|
804
|
+
"""
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
class ItemDetails(Item):
|
|
808
|
+
added_by: Annotated[AddedBy | None, Field(alias="addedBy")]
|
|
809
|
+
"""
|
|
810
|
+
Who added the key. null: an app, not known, or that person is no longer in the organization.
|
|
811
|
+
"""
|
|
812
|
+
sent_as: Annotated[str | None, Field(alias="sentAs")]
|
|
813
|
+
"""
|
|
814
|
+
How the gateway sends a key, the value as dots: a header, a query parameter or a path. Built from the stored config, never from the value. null: an app, or not known.
|
|
815
|
+
"""
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
class ItemMove(Model):
|
|
819
|
+
vault_id: Annotated[str, Field(alias="vaultId")]
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
class ItemOnOff(Model):
|
|
823
|
+
enabled: bool
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
class ItemPermissions(Model):
|
|
827
|
+
item: Annotated[Literal["allow", "ask", "never"], OpenEnum] | None
|
|
828
|
+
"""
|
|
829
|
+
allow: always allowed. ask: needs approval. never: refused. null: not set on this vault yet (until the move to vaults, an agent's own access still decides).
|
|
830
|
+
"""
|
|
831
|
+
tools: list[ToolPermission]
|
|
832
|
+
"""
|
|
833
|
+
One row per tool of the app. Empty for a key.
|
|
834
|
+
"""
|
|
835
|
+
|
|
836
|
+
|
|
837
|
+
class ItemPermissionsWrite(Model):
|
|
838
|
+
item: Annotated[Literal["allow", "ask", "never"], OpenEnum] | None
|
|
839
|
+
tools: list[ToolPermissionWrite] | None = None
|
|
840
|
+
|
|
841
|
+
|
|
842
|
+
class ItemPlainHttp(Model):
|
|
843
|
+
allow_plain_http: Annotated[bool, Field(alias="allowPlainHttp")]
|
|
844
|
+
|
|
845
|
+
|
|
846
|
+
class ItemRename(Model):
|
|
847
|
+
name: str
|
|
848
|
+
|
|
849
|
+
|
|
850
|
+
class ItemUpdate(RootModel[ItemRename | ItemMove | ItemPlainHttp | ItemOnOff]):
|
|
851
|
+
root: ItemRename | ItemMove | ItemPlainHttp | ItemOnOff
|
|
852
|
+
"""
|
|
853
|
+
Exactly one of name (rename), vaultId (move a key to another vault), allowPlainHttp (let the gateway send the item over plain http://) or enabled (turn the item on or off for agents).
|
|
854
|
+
"""
|
|
855
|
+
|
|
856
|
+
|
|
857
|
+
class ItemVersion(Model):
|
|
858
|
+
created_at: Annotated[str, Field(alias="createdAt")]
|
|
859
|
+
"""
|
|
860
|
+
ISO 8601.
|
|
861
|
+
"""
|
|
862
|
+
created_by_user_id: Annotated[str | None, Field(alias="createdByUserId")]
|
|
863
|
+
"""
|
|
864
|
+
Who set it. null: that person was removed.
|
|
865
|
+
"""
|
|
866
|
+
current: bool
|
|
867
|
+
hosts: list[str]
|
|
868
|
+
source: Annotated[Literal["inline", "onepassword"], OpenEnum]
|
|
869
|
+
"""
|
|
870
|
+
inline: a value kept here. onepassword: a 1Password reference, read when used.
|
|
871
|
+
"""
|
|
872
|
+
version: int
|
|
873
|
+
|
|
874
|
+
|
|
875
|
+
class ItemVersionRestored(Model):
|
|
876
|
+
from_version: Annotated[int, Field(alias="fromVersion")]
|
|
877
|
+
item: Item
|
|
878
|
+
restored_created_at: Annotated[str, Field(alias="restoredCreatedAt")]
|
|
879
|
+
"""
|
|
880
|
+
ISO 8601. When the restored version was first set. Older than the item's rotatedAt: an old value is back.
|
|
881
|
+
"""
|
|
882
|
+
version: int
|
|
883
|
+
"""
|
|
884
|
+
The new version.
|
|
885
|
+
"""
|
|
886
|
+
|
|
887
|
+
|
|
888
|
+
class KeptAgent(Model):
|
|
889
|
+
created_at: Annotated[str, Field(alias="createdAt")]
|
|
890
|
+
"""
|
|
891
|
+
ISO 8601.
|
|
892
|
+
"""
|
|
893
|
+
expires_at: Annotated[str | None, Field(alias="expiresAt")]
|
|
894
|
+
"""
|
|
895
|
+
ISO 8601. When the agent's credential stops by itself. null: it stops only when the agent is disconnected.
|
|
896
|
+
"""
|
|
897
|
+
gateway: AgentGateway
|
|
898
|
+
id: str
|
|
899
|
+
kind: str | None
|
|
900
|
+
"""
|
|
901
|
+
Which agent this is, as it said itself when it connected: a short lowercase label such as claude, codex or cursor. It never decides access. null: not known.
|
|
902
|
+
"""
|
|
903
|
+
name: str
|
|
904
|
+
provider: str | None
|
|
905
|
+
"""
|
|
906
|
+
The agent's provider: a short lowercase label. It never decides access. null: not known.
|
|
907
|
+
"""
|
|
908
|
+
runtime: str | None
|
|
909
|
+
"""
|
|
910
|
+
What the agent runs on. null: not known yet.
|
|
911
|
+
"""
|
|
912
|
+
vault_id: Annotated[str, Field(alias="vaultId")]
|
|
913
|
+
|
|
914
|
+
|
|
915
|
+
class Key(Model):
|
|
916
|
+
agent_kind: Annotated[str | None, Field(alias="agentKind")]
|
|
917
|
+
"""
|
|
918
|
+
For a key `onecli login` made: which agent signed in (claude, codex, ...), as the CLI said. A label only. null: unknown.
|
|
919
|
+
"""
|
|
920
|
+
created_at: Annotated[str, Field(alias="createdAt")]
|
|
921
|
+
"""
|
|
922
|
+
ISO 8601.
|
|
923
|
+
"""
|
|
924
|
+
created_via: Annotated[
|
|
925
|
+
Annotated[Literal["dashboard", "api", "cli_login", "migrated"], OpenEnum],
|
|
926
|
+
Field(alias="createdVia"),
|
|
927
|
+
]
|
|
928
|
+
expires_at: Annotated[str | None, Field(alias="expiresAt")]
|
|
929
|
+
"""
|
|
930
|
+
ISO 8601. null: no expiry.
|
|
931
|
+
"""
|
|
932
|
+
id: str
|
|
933
|
+
last_used_at: Annotated[str | None, Field(alias="lastUsedAt")]
|
|
934
|
+
"""
|
|
935
|
+
ISO 8601, to the minute. null: never used.
|
|
936
|
+
"""
|
|
937
|
+
name: str
|
|
938
|
+
permissions: list[Annotated[Literal["manage", "approve"], OpenEnum]]
|
|
939
|
+
|
|
940
|
+
|
|
941
|
+
class CreatedKey(Key):
|
|
942
|
+
key: Annotated[str, Field(repr=False)]
|
|
943
|
+
"""
|
|
944
|
+
The key itself (oc_key_...). Shown here once. Store it now: it cannot be read again.
|
|
945
|
+
"""
|
|
946
|
+
|
|
947
|
+
|
|
948
|
+
class LlmKeyCreate(Model):
|
|
949
|
+
kind: Literal["llm_key"] = "llm_key"
|
|
950
|
+
name: str | None = None
|
|
951
|
+
"""
|
|
952
|
+
Left out, the API names the key by its kind: "Anthropic API key" for an API key, "Claude account" or "ChatGPT account" for a subscription's credential, or "Anthropic API key 2" and so on when that name is taken. A name you send must be free.
|
|
953
|
+
"""
|
|
954
|
+
provider: Annotated[Literal["anthropic", "openai"], OpenEnum]
|
|
955
|
+
value: str
|
|
956
|
+
"""
|
|
957
|
+
The key itself. Stored encrypted. No answer ever carries it back.
|
|
958
|
+
"""
|
|
959
|
+
|
|
960
|
+
|
|
961
|
+
class ItemCreate(RootModel[ApiKeyCreate | LlmKeyCreate | AppItemCreate]):
|
|
962
|
+
root: ApiKeyCreate | LlmKeyCreate | AppItemCreate
|
|
963
|
+
|
|
964
|
+
|
|
965
|
+
class Me(Model):
|
|
966
|
+
active_organization_id: Annotated[str | None, Field(alias="activeOrganizationId")]
|
|
967
|
+
"""
|
|
968
|
+
The organization this call is scoped to. Null when the call named none: a signed-in person with no X-Organization-Id or X-Workspace-Id.
|
|
969
|
+
"""
|
|
970
|
+
organizations: list[MeOrganization]
|
|
971
|
+
"""
|
|
972
|
+
Your active memberships, oldest first.
|
|
973
|
+
"""
|
|
974
|
+
user: MeAccount
|
|
975
|
+
|
|
976
|
+
|
|
977
|
+
class MeAccount(Model):
|
|
978
|
+
email: str
|
|
979
|
+
id: str
|
|
980
|
+
name: str | None
|
|
981
|
+
signs_in_with_email: Annotated[bool, Field(alias="signsInWithEmail")]
|
|
982
|
+
"""
|
|
983
|
+
Whether you sign in with an email and a password of your own (self-hosted). False for an account that only ever used another sign-in.
|
|
984
|
+
"""
|
|
985
|
+
|
|
986
|
+
|
|
987
|
+
class MeName(Model):
|
|
988
|
+
name: str
|
|
989
|
+
|
|
990
|
+
|
|
991
|
+
class MeOrganization(Model):
|
|
992
|
+
id: str
|
|
993
|
+
logo_url: Annotated[str | None, Field(alias="logoUrl")]
|
|
994
|
+
"""
|
|
995
|
+
The organization's logo, an image URL that needs no credential. Null when it has none.
|
|
996
|
+
"""
|
|
997
|
+
name: str
|
|
998
|
+
role: Annotated[Literal["owner", "admin", "member"], OpenEnum]
|
|
999
|
+
slug: str
|
|
1000
|
+
|
|
1001
|
+
|
|
1002
|
+
class MeUser(Model):
|
|
1003
|
+
email: str
|
|
1004
|
+
id: str
|
|
1005
|
+
name: str | None
|
|
1006
|
+
|
|
1007
|
+
|
|
1008
|
+
class NetworkTarget(Model):
|
|
1009
|
+
host_pattern: Annotated[str, Field(alias="hostPattern")]
|
|
1010
|
+
kind: Literal["network"] = "network"
|
|
1011
|
+
method: Annotated[Literal["GET", "POST", "PUT", "PATCH", "DELETE"], OpenEnum] | None = None
|
|
1012
|
+
path_pattern: Annotated[str | None, Field(alias="pathPattern")] = None
|
|
1013
|
+
|
|
1014
|
+
|
|
1015
|
+
class OneUseConnectToken(Model):
|
|
1016
|
+
created_at: Annotated[str, Field(alias="createdAt")]
|
|
1017
|
+
"""
|
|
1018
|
+
ISO 8601.
|
|
1019
|
+
"""
|
|
1020
|
+
expires_at: Annotated[str, Field(alias="expiresAt")]
|
|
1021
|
+
"""
|
|
1022
|
+
ISO 8601. When the token stops by itself.
|
|
1023
|
+
"""
|
|
1024
|
+
id: str
|
|
1025
|
+
"""
|
|
1026
|
+
The token's id. Use it to turn the token off.
|
|
1027
|
+
"""
|
|
1028
|
+
name: str | None
|
|
1029
|
+
"""
|
|
1030
|
+
The name the agent gets. null: the connecting place names it.
|
|
1031
|
+
"""
|
|
1032
|
+
provider: str | None
|
|
1033
|
+
"""
|
|
1034
|
+
The provider the agent gets: a short lowercase label. null: the connecting place may send one.
|
|
1035
|
+
"""
|
|
1036
|
+
vault_id: Annotated[str, Field(alias="vaultId")]
|
|
1037
|
+
|
|
1038
|
+
|
|
1039
|
+
class CreatedOneUseConnectToken(OneUseConnectToken):
|
|
1040
|
+
connect_token: Annotated[str, Field(alias="connectToken", repr=False)]
|
|
1041
|
+
"""
|
|
1042
|
+
The connect token itself (oc_connect_...). Shown here once. It connects one agent and then stops.
|
|
1043
|
+
"""
|
|
1044
|
+
|
|
1045
|
+
|
|
1046
|
+
class OrgApp(Model):
|
|
1047
|
+
configured: bool
|
|
1048
|
+
"""
|
|
1049
|
+
Whether the organization saved settings for this app.
|
|
1050
|
+
"""
|
|
1051
|
+
dependents: OrgAppDependents
|
|
1052
|
+
"""
|
|
1053
|
+
The connected accounts a change or a removal would disconnect.
|
|
1054
|
+
"""
|
|
1055
|
+
enabled: bool
|
|
1056
|
+
has_client_secret: Annotated[bool, Field(alias="hasClientSecret")]
|
|
1057
|
+
"""
|
|
1058
|
+
Whether a secret is stored. The secret is never answered.
|
|
1059
|
+
"""
|
|
1060
|
+
provider: str
|
|
1061
|
+
settings: dict[str, str]
|
|
1062
|
+
"""
|
|
1063
|
+
The settings that are not secret, by field name. For example the client id.
|
|
1064
|
+
"""
|
|
1065
|
+
|
|
1066
|
+
|
|
1067
|
+
class OrgAppBody(Model):
|
|
1068
|
+
fields: dict[str, str]
|
|
1069
|
+
"""
|
|
1070
|
+
The app's settings by field name, as the app declares them. A secret field left out or empty keeps the stored secret.
|
|
1071
|
+
"""
|
|
1072
|
+
|
|
1073
|
+
|
|
1074
|
+
class OrgAppDependents(Model):
|
|
1075
|
+
"""
|
|
1076
|
+
The connected accounts a change or a removal would disconnect.
|
|
1077
|
+
"""
|
|
1078
|
+
|
|
1079
|
+
org_connections: Annotated[int, Field(alias="orgConnections")]
|
|
1080
|
+
workspace_connections: Annotated[int, Field(alias="workspaceConnections")]
|
|
1081
|
+
|
|
1082
|
+
|
|
1083
|
+
class OrgAppField(Model):
|
|
1084
|
+
default_value: Annotated[str | None, Field(alias="defaultValue")]
|
|
1085
|
+
"""
|
|
1086
|
+
The id of the choice to start from, for a field with options.
|
|
1087
|
+
"""
|
|
1088
|
+
description: str | None
|
|
1089
|
+
is_secret: Annotated[bool, Field(alias="isSecret")]
|
|
1090
|
+
"""
|
|
1091
|
+
Whether the field is written and never answered, like a client secret.
|
|
1092
|
+
"""
|
|
1093
|
+
label: str
|
|
1094
|
+
name: str
|
|
1095
|
+
"""
|
|
1096
|
+
The key of this field in a saved body's fields.
|
|
1097
|
+
"""
|
|
1098
|
+
options: list[OrgAppFieldOption] | None
|
|
1099
|
+
"""
|
|
1100
|
+
The only choices this field takes. null: the field takes text.
|
|
1101
|
+
"""
|
|
1102
|
+
placeholder: str | None
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+
class OrgAppFieldOption(Model):
|
|
1106
|
+
id: str
|
|
1107
|
+
"""
|
|
1108
|
+
What to send for this choice when saving.
|
|
1109
|
+
"""
|
|
1110
|
+
label: str
|
|
1111
|
+
warning: str | None
|
|
1112
|
+
|
|
1113
|
+
|
|
1114
|
+
class OrgAppSummary(Model):
|
|
1115
|
+
configured: bool
|
|
1116
|
+
"""
|
|
1117
|
+
Whether the organization saved settings for this app.
|
|
1118
|
+
"""
|
|
1119
|
+
dark_icon: Annotated[str | None, Field(alias="darkIcon")]
|
|
1120
|
+
"""
|
|
1121
|
+
The icon for a dark background. null: use icon.
|
|
1122
|
+
"""
|
|
1123
|
+
enabled: bool
|
|
1124
|
+
fields: list[OrgAppField]
|
|
1125
|
+
"""
|
|
1126
|
+
The settings the app takes. Never what was saved in them.
|
|
1127
|
+
"""
|
|
1128
|
+
group: OrgAppSummaryGroup | None
|
|
1129
|
+
"""
|
|
1130
|
+
Apps of one group share one OAuth app: saving it for one saves it for all of them. null: the app has its own.
|
|
1131
|
+
"""
|
|
1132
|
+
has_client_secret: Annotated[bool, Field(alias="hasClientSecret")]
|
|
1133
|
+
"""
|
|
1134
|
+
Whether a secret is stored. The secret is never answered.
|
|
1135
|
+
"""
|
|
1136
|
+
hint: str | None
|
|
1137
|
+
"""
|
|
1138
|
+
Where to make the OAuth app, in a sentence.
|
|
1139
|
+
"""
|
|
1140
|
+
icon: str
|
|
1141
|
+
"""
|
|
1142
|
+
A path on the dashboard's own site, for example /icons/github.svg.
|
|
1143
|
+
"""
|
|
1144
|
+
name: str
|
|
1145
|
+
provider: str
|
|
1146
|
+
"""
|
|
1147
|
+
The app's id, for example github.
|
|
1148
|
+
"""
|
|
1149
|
+
server_app: Annotated[bool, Field(alias="serverApp")]
|
|
1150
|
+
"""
|
|
1151
|
+
Whether this server has an OAuth app of its own for the app, used when the organization saved none.
|
|
1152
|
+
"""
|
|
1153
|
+
|
|
1154
|
+
|
|
1155
|
+
class OrgAppSummaryGroup(Model):
|
|
1156
|
+
"""
|
|
1157
|
+
Apps of one group share one OAuth app: saving it for one saves it for all of them. null: the app has its own.
|
|
1158
|
+
"""
|
|
1159
|
+
|
|
1160
|
+
id: str
|
|
1161
|
+
name: str
|
|
1162
|
+
|
|
1163
|
+
|
|
1164
|
+
class OrgRule(Model):
|
|
1165
|
+
action: str
|
|
1166
|
+
conditions: list[OrgRuleCondition] | dict[str, list[str]] | None
|
|
1167
|
+
created_at: Annotated[str, Field(alias="createdAt")]
|
|
1168
|
+
description: str | None
|
|
1169
|
+
enabled: bool
|
|
1170
|
+
id: str
|
|
1171
|
+
identities: list[OrgRuleIdentity]
|
|
1172
|
+
name: str
|
|
1173
|
+
priority: int
|
|
1174
|
+
"""
|
|
1175
|
+
The rule's place in the order. The lowest is read first.
|
|
1176
|
+
"""
|
|
1177
|
+
rate_limit: Annotated[int | None, Field(alias="rateLimit")]
|
|
1178
|
+
rate_limit_window: Annotated[str | None, Field(alias="rateLimitWindow")]
|
|
1179
|
+
require_approval: Annotated[bool, Field(alias="requireApproval")]
|
|
1180
|
+
source: str
|
|
1181
|
+
"""
|
|
1182
|
+
Where the rule came from. A rule made here is custom.
|
|
1183
|
+
"""
|
|
1184
|
+
targets: list[
|
|
1185
|
+
OrgRuleAppTarget | OrgRuleConnectionTarget | OrgRuleSecretTarget | OrgRuleNetworkTarget
|
|
1186
|
+
]
|
|
1187
|
+
|
|
1188
|
+
|
|
1189
|
+
class OrgRuleAppTarget(Model):
|
|
1190
|
+
connection_scope: Annotated[
|
|
1191
|
+
Annotated[Literal["organization", "workspace"], OpenEnum] | None,
|
|
1192
|
+
Field(alias="connectionScope"),
|
|
1193
|
+
]
|
|
1194
|
+
kind: Literal["app"] = "app"
|
|
1195
|
+
provider: str
|
|
1196
|
+
tools: list[str]
|
|
1197
|
+
|
|
1198
|
+
|
|
1199
|
+
class OrgRuleCondition(Model):
|
|
1200
|
+
key: str | None = None
|
|
1201
|
+
operator: Literal["contains"] = "contains"
|
|
1202
|
+
target: Literal["body"] = "body"
|
|
1203
|
+
text: str
|
|
1204
|
+
|
|
1205
|
+
|
|
1206
|
+
class OrgRuleConnectionTarget(Model):
|
|
1207
|
+
connection_id: Annotated[str, Field(alias="connectionId")]
|
|
1208
|
+
kind: Literal["connection"] = "connection"
|
|
1209
|
+
tools: list[str]
|
|
1210
|
+
|
|
1211
|
+
|
|
1212
|
+
class OrgRuleCreate(Model):
|
|
1213
|
+
action: Annotated[Literal["allow", "block"], OpenEnum]
|
|
1214
|
+
conditions: list[OrgRuleCondition] | None = None
|
|
1215
|
+
description: str | None = None
|
|
1216
|
+
enabled: bool | None = None
|
|
1217
|
+
identities: list[UserRuleIdentity | GroupRuleIdentity | VaultRuleIdentity] | None = None
|
|
1218
|
+
"""
|
|
1219
|
+
Who the rule is for: people, groups or vaults of the organization. Left out or empty: every vault.
|
|
1220
|
+
"""
|
|
1221
|
+
name: str
|
|
1222
|
+
rate_limit: Annotated[int | None, Field(alias="rateLimit")] = None
|
|
1223
|
+
rate_limit_window: Annotated[
|
|
1224
|
+
Annotated[Literal["minute", "hour", "day"], OpenEnum] | None, Field(alias="rateLimitWindow")
|
|
1225
|
+
] = None
|
|
1226
|
+
require_approval: Annotated[bool | None, Field(alias="requireApproval")] = None
|
|
1227
|
+
targets: list[AppTarget | ConnectionTarget | SecretTarget | NetworkTarget] | None = None
|
|
1228
|
+
"""
|
|
1229
|
+
What the rule is about. A rule needs at least one.
|
|
1230
|
+
"""
|
|
1231
|
+
|
|
1232
|
+
|
|
1233
|
+
class OrgRuleIdentity(Model):
|
|
1234
|
+
id: str
|
|
1235
|
+
type: Annotated[Literal["user", "group", "vault", "agent"], OpenEnum]
|
|
1236
|
+
|
|
1237
|
+
|
|
1238
|
+
class OrgRuleNetworkTarget(Model):
|
|
1239
|
+
host_pattern: Annotated[str, Field(alias="hostPattern")]
|
|
1240
|
+
kind: Literal["network"] = "network"
|
|
1241
|
+
method: str | None
|
|
1242
|
+
path_pattern: Annotated[str | None, Field(alias="pathPattern")]
|
|
1243
|
+
|
|
1244
|
+
|
|
1245
|
+
class OrgRuleSecretTarget(Model):
|
|
1246
|
+
kind: Literal["secret"] = "secret"
|
|
1247
|
+
secret_id: Annotated[str | None, Field(alias="secretId")]
|
|
1248
|
+
secret_scope: Annotated[
|
|
1249
|
+
Annotated[Literal["organization", "workspace"], OpenEnum] | None, Field(alias="secretScope")
|
|
1250
|
+
]
|
|
1251
|
+
|
|
1252
|
+
|
|
1253
|
+
class OrgRuleUpdate(Model):
|
|
1254
|
+
action: Annotated[Literal["allow", "block"], OpenEnum] | None = None
|
|
1255
|
+
conditions: list[OrgRuleCondition] | None = None
|
|
1256
|
+
description: str | None = None
|
|
1257
|
+
enabled: bool | None = None
|
|
1258
|
+
identities: list[UserRuleIdentity | GroupRuleIdentity | VaultRuleIdentity] | None = None
|
|
1259
|
+
"""
|
|
1260
|
+
Who the rule is for: people, groups or vaults of the organization. Left out or empty: every vault.
|
|
1261
|
+
"""
|
|
1262
|
+
name: str | None = None
|
|
1263
|
+
rate_limit: Annotated[int | None, Field(alias="rateLimit")] = None
|
|
1264
|
+
rate_limit_window: Annotated[
|
|
1265
|
+
Annotated[Literal["minute", "hour", "day"], OpenEnum] | None, Field(alias="rateLimitWindow")
|
|
1266
|
+
] = None
|
|
1267
|
+
require_approval: Annotated[bool | None, Field(alias="requireApproval")] = None
|
|
1268
|
+
targets: list[AppTarget | ConnectionTarget | SecretTarget | NetworkTarget] | None = None
|
|
1269
|
+
"""
|
|
1270
|
+
What the rule is about. A rule needs at least one.
|
|
1271
|
+
"""
|
|
1272
|
+
|
|
1273
|
+
|
|
1274
|
+
class Organization(Model):
|
|
1275
|
+
id: str
|
|
1276
|
+
name: str
|
|
1277
|
+
slug: str
|
|
1278
|
+
|
|
1279
|
+
|
|
1280
|
+
class OrganizationLogo(Model):
|
|
1281
|
+
logo_url: Annotated[str, Field(alias="logoUrl")]
|
|
1282
|
+
"""
|
|
1283
|
+
The logo's URL, which needs no credential. It changes on every upload.
|
|
1284
|
+
"""
|
|
1285
|
+
|
|
1286
|
+
|
|
1287
|
+
class OrganizationName(Model):
|
|
1288
|
+
name: str
|
|
1289
|
+
|
|
1290
|
+
|
|
1291
|
+
class PathRegexInjection(Model):
|
|
1292
|
+
path_regex: Annotated[str, Field(alias="pathRegex")]
|
|
1293
|
+
path_replacement: Annotated[str, Field(alias="pathReplacement")]
|
|
1294
|
+
|
|
1295
|
+
|
|
1296
|
+
class PathTemplateInjection(Model):
|
|
1297
|
+
path_template: Annotated[str, Field(alias="pathTemplate")]
|
|
1298
|
+
|
|
1299
|
+
|
|
1300
|
+
class PermissionSummary(Model):
|
|
1301
|
+
allow: int
|
|
1302
|
+
"""
|
|
1303
|
+
Tools always allowed.
|
|
1304
|
+
"""
|
|
1305
|
+
ask: int
|
|
1306
|
+
"""
|
|
1307
|
+
Tools that need approval.
|
|
1308
|
+
"""
|
|
1309
|
+
item: Annotated[Literal["allow", "ask", "never"], OpenEnum] | None
|
|
1310
|
+
"""
|
|
1311
|
+
allow: always allowed. ask: needs approval. never: refused. null: not set on this vault yet (until the move to vaults, an agent's own access still decides).
|
|
1312
|
+
"""
|
|
1313
|
+
never: int
|
|
1314
|
+
"""
|
|
1315
|
+
Tools refused.
|
|
1316
|
+
"""
|
|
1317
|
+
|
|
1318
|
+
|
|
1319
|
+
class PollAgentSignup(Model):
|
|
1320
|
+
poll_token: Annotated[str, Field(alias="pollToken")]
|
|
1321
|
+
|
|
1322
|
+
|
|
1323
|
+
class QueryParamInjection(Model):
|
|
1324
|
+
param_format: Annotated[str | None, Field(alias="paramFormat")] = None
|
|
1325
|
+
param_name: Annotated[str, Field(alias="paramName")]
|
|
1326
|
+
|
|
1327
|
+
|
|
1328
|
+
class RenameAgent(Model):
|
|
1329
|
+
name: str
|
|
1330
|
+
"""
|
|
1331
|
+
The new name. 1 to 64 characters.
|
|
1332
|
+
"""
|
|
1333
|
+
|
|
1334
|
+
|
|
1335
|
+
class ReplaceItemValue(Model):
|
|
1336
|
+
value: str
|
|
1337
|
+
"""
|
|
1338
|
+
The key's new value. Stored encrypted. No answer ever carries it back.
|
|
1339
|
+
"""
|
|
1340
|
+
|
|
1341
|
+
|
|
1342
|
+
class SecretTarget(Model):
|
|
1343
|
+
kind: Literal["secret"] = "secret"
|
|
1344
|
+
secret_id: Annotated[str | None, Field(alias="secretId")] = None
|
|
1345
|
+
secret_scope: Annotated[
|
|
1346
|
+
Annotated[Literal["organization", "workspace"], OpenEnum] | None, Field(alias="secretScope")
|
|
1347
|
+
] = None
|
|
1348
|
+
|
|
1349
|
+
|
|
1350
|
+
class Source(Model):
|
|
1351
|
+
created_at: Annotated[str, Field(alias="createdAt")]
|
|
1352
|
+
"""
|
|
1353
|
+
ISO 8601.
|
|
1354
|
+
"""
|
|
1355
|
+
id: str
|
|
1356
|
+
last_connected_at: Annotated[str | None, Field(alias="lastConnectedAt")]
|
|
1357
|
+
"""
|
|
1358
|
+
ISO 8601. null: not recorded. Nothing records it today.
|
|
1359
|
+
"""
|
|
1360
|
+
name: str | None
|
|
1361
|
+
"""
|
|
1362
|
+
The name the password manager gave, when it gave one.
|
|
1363
|
+
"""
|
|
1364
|
+
provider: str
|
|
1365
|
+
"""
|
|
1366
|
+
The password manager, for example bitwarden.
|
|
1367
|
+
"""
|
|
1368
|
+
status: str
|
|
1369
|
+
"""
|
|
1370
|
+
The pairing's state, as the gateway wrote it. Today always "paired": unpairing removes the row.
|
|
1371
|
+
"""
|
|
1372
|
+
|
|
1373
|
+
|
|
1374
|
+
class StartAgentSignup(Model):
|
|
1375
|
+
kind: str | None = None
|
|
1376
|
+
"""
|
|
1377
|
+
Which agent this is: a short lowercase label such as claude, codex or cursor. It never decides access.
|
|
1378
|
+
"""
|
|
1379
|
+
name: str | None = None
|
|
1380
|
+
"""
|
|
1381
|
+
1 to 64 characters. Unset: the server picks one from the runtime and 4 hex characters.
|
|
1382
|
+
"""
|
|
1383
|
+
runtime: Annotated[Literal["docker", "linux", "macos", "windows"], OpenEnum] | None = None
|
|
1384
|
+
"""
|
|
1385
|
+
What the agent runs on: docker for a container, else the machine's system. Default: linux.
|
|
1386
|
+
"""
|
|
1387
|
+
|
|
1388
|
+
|
|
1389
|
+
class StartedAgentSignup(Model):
|
|
1390
|
+
expires_at: Annotated[str, Field(alias="expiresAt")]
|
|
1391
|
+
"""
|
|
1392
|
+
ISO 8601. The sign-up ends then, approved or not.
|
|
1393
|
+
"""
|
|
1394
|
+
id: str
|
|
1395
|
+
interval: int
|
|
1396
|
+
"""
|
|
1397
|
+
Seconds to leave between two polls.
|
|
1398
|
+
"""
|
|
1399
|
+
poll_token: Annotated[str, Field(alias="pollToken", repr=False)]
|
|
1400
|
+
"""
|
|
1401
|
+
Yours alone: send it when you poll. Shown here once. Never show it to anyone.
|
|
1402
|
+
"""
|
|
1403
|
+
user_code: Annotated[str, Field(alias="userCode")]
|
|
1404
|
+
"""
|
|
1405
|
+
Show this to your person. They type it at verificationUrl. 8 letters in two groups of four.
|
|
1406
|
+
"""
|
|
1407
|
+
verification_url: Annotated[str, Field(alias="verificationUrl")]
|
|
1408
|
+
"""
|
|
1409
|
+
Where your person signs in and types the code.
|
|
1410
|
+
"""
|
|
1411
|
+
|
|
1412
|
+
|
|
1413
|
+
class ToolPermission(Model):
|
|
1414
|
+
class_: Annotated[Annotated[Literal["read", "write"], OpenEnum], Field(alias="class")]
|
|
1415
|
+
description: str
|
|
1416
|
+
"""
|
|
1417
|
+
What the tool does, from the app's catalog. Empty when the catalog has none.
|
|
1418
|
+
"""
|
|
1419
|
+
level: Annotated[Literal["allow", "ask", "never"], OpenEnum] | None
|
|
1420
|
+
"""
|
|
1421
|
+
allow: always allowed. ask: needs approval. never: refused. null: not set on this vault yet (until the move to vaults, an agent's own access still decides).
|
|
1422
|
+
"""
|
|
1423
|
+
name: str
|
|
1424
|
+
"""
|
|
1425
|
+
Human label from the app's catalog, e.g. "Search messages". The tool id when the catalog has none.
|
|
1426
|
+
"""
|
|
1427
|
+
tool: str
|
|
1428
|
+
|
|
1429
|
+
|
|
1430
|
+
class ToolPermissionWrite(Model):
|
|
1431
|
+
level: Annotated[Literal["allow", "ask", "never"], OpenEnum]
|
|
1432
|
+
tool: str
|
|
1433
|
+
|
|
1434
|
+
|
|
1435
|
+
class Usage(Model):
|
|
1436
|
+
by_agent: Annotated[list[UsageByAgentItem], Field(alias="byAgent")]
|
|
1437
|
+
by_day: Annotated[list[UsageByDayItem], Field(alias="byDay")]
|
|
1438
|
+
"""
|
|
1439
|
+
One entry per day, oldest first, today last. A day with no request is there with 0.
|
|
1440
|
+
"""
|
|
1441
|
+
by_item: Annotated[list[UsageByItemItem], Field(alias="byItem")]
|
|
1442
|
+
"""
|
|
1443
|
+
Today's (UTC) most used items, at most 5, most first. Only live items in vaults you can use now. A request counts once for each item it used.
|
|
1444
|
+
"""
|
|
1445
|
+
by_result: Annotated[list[UsageByResultItem], Field(alias="byResult")]
|
|
1446
|
+
by_vault: Annotated[list[UsageByVaultItem], Field(alias="byVault")]
|
|
1447
|
+
days: int
|
|
1448
|
+
"""
|
|
1449
|
+
4, 14 or 30.
|
|
1450
|
+
"""
|
|
1451
|
+
extra: dict[str, int]
|
|
1452
|
+
"""
|
|
1453
|
+
More counts by name, when the server has any to add. Empty otherwise.
|
|
1454
|
+
"""
|
|
1455
|
+
total: int
|
|
1456
|
+
|
|
1457
|
+
|
|
1458
|
+
class UsageByAgentItem(Model):
|
|
1459
|
+
agent_id: Annotated[str, Field(alias="agentId")]
|
|
1460
|
+
agent_name: Annotated[str | None, Field(alias="agentName")]
|
|
1461
|
+
"""
|
|
1462
|
+
null: the agent was removed since.
|
|
1463
|
+
"""
|
|
1464
|
+
count: int
|
|
1465
|
+
|
|
1466
|
+
|
|
1467
|
+
class UsageByDayItem(Model):
|
|
1468
|
+
by_result: Annotated[UsageByDayItemByResult, Field(alias="byResult")]
|
|
1469
|
+
"""
|
|
1470
|
+
The day's requests by result. approval: asked first. blocked includes rate_limited. Older rows with no result are in count only.
|
|
1471
|
+
"""
|
|
1472
|
+
count: int
|
|
1473
|
+
date: str
|
|
1474
|
+
"""
|
|
1475
|
+
A UTC day, YYYY-MM-DD.
|
|
1476
|
+
"""
|
|
1477
|
+
|
|
1478
|
+
|
|
1479
|
+
class UsageByDayItemByResult(Model):
|
|
1480
|
+
"""
|
|
1481
|
+
The day's requests by result. approval: asked first. blocked includes rate_limited. Older rows with no result are in count only.
|
|
1482
|
+
"""
|
|
1483
|
+
|
|
1484
|
+
allowed: int
|
|
1485
|
+
approval: int
|
|
1486
|
+
blocked: int
|
|
1487
|
+
|
|
1488
|
+
|
|
1489
|
+
class UsageByItemItem(Model):
|
|
1490
|
+
count: int
|
|
1491
|
+
item_id: Annotated[str, Field(alias="itemId")]
|
|
1492
|
+
name: str
|
|
1493
|
+
|
|
1494
|
+
|
|
1495
|
+
class UsageByResultItem(Model):
|
|
1496
|
+
count: int
|
|
1497
|
+
result: Annotated[Literal["allowed", "blocked", "approval", "rate_limited"], OpenEnum] | None
|
|
1498
|
+
"""
|
|
1499
|
+
null: older rows, written before this was kept.
|
|
1500
|
+
"""
|
|
1501
|
+
|
|
1502
|
+
|
|
1503
|
+
class UsageByVaultItem(Model):
|
|
1504
|
+
count: int
|
|
1505
|
+
vault_id: Annotated[str, Field(alias="vaultId")]
|
|
1506
|
+
|
|
1507
|
+
|
|
1508
|
+
class UserRuleIdentity(Model):
|
|
1509
|
+
id: str
|
|
1510
|
+
type: Literal["user"] = "user"
|
|
1511
|
+
|
|
1512
|
+
|
|
1513
|
+
class Vault(Model):
|
|
1514
|
+
agent_count: Annotated[int, Field(alias="agentCount")]
|
|
1515
|
+
created_at: Annotated[str, Field(alias="createdAt")]
|
|
1516
|
+
"""
|
|
1517
|
+
ISO 8601.
|
|
1518
|
+
"""
|
|
1519
|
+
id: str
|
|
1520
|
+
item_count: Annotated[int, Field(alias="itemCount")]
|
|
1521
|
+
last_used_at: Annotated[str | None, Field(alias="lastUsedAt")]
|
|
1522
|
+
"""
|
|
1523
|
+
ISO 8601. The newest use of any item in the vault that is not deleted. null: never used.
|
|
1524
|
+
"""
|
|
1525
|
+
logo_url: Annotated[str | None, Field(alias="logoUrl")]
|
|
1526
|
+
"""
|
|
1527
|
+
The URL of the vault's image, drawn in place of its lock or initials. It needs no credential, and changes on every upload. null: it has none.
|
|
1528
|
+
"""
|
|
1529
|
+
member_count: Annotated[int, Field(alias="memberCount")]
|
|
1530
|
+
"""
|
|
1531
|
+
How many people can use the vault, counting past the 5 listed.
|
|
1532
|
+
"""
|
|
1533
|
+
members: list[VaultMember]
|
|
1534
|
+
"""
|
|
1535
|
+
The first few people who can use the vault, oldest access first: the people it is shared with and the members of groups it is shared with. At most 5. A personal vault lists its person only.
|
|
1536
|
+
"""
|
|
1537
|
+
name: str
|
|
1538
|
+
personal: bool
|
|
1539
|
+
"""
|
|
1540
|
+
Whether the vault is your personal vault: only you and your agents use it. It cannot be renamed, deleted or shared, and it goes when you leave the organization. Nobody sees another person's personal vault.
|
|
1541
|
+
"""
|
|
1542
|
+
slug: str | None
|
|
1543
|
+
|
|
1544
|
+
|
|
1545
|
+
class VaultLogo(Model):
|
|
1546
|
+
logo_url: Annotated[str, Field(alias="logoUrl")]
|
|
1547
|
+
"""
|
|
1548
|
+
The image's URL, which needs no credential. It changes on every upload.
|
|
1549
|
+
"""
|
|
1550
|
+
|
|
1551
|
+
|
|
1552
|
+
class VaultMember(Model):
|
|
1553
|
+
email: str
|
|
1554
|
+
id: str
|
|
1555
|
+
image: str | None
|
|
1556
|
+
"""
|
|
1557
|
+
Avatar URL.
|
|
1558
|
+
"""
|
|
1559
|
+
name: str
|
|
1560
|
+
"""
|
|
1561
|
+
The person's name, or their email when they have none.
|
|
1562
|
+
"""
|
|
1563
|
+
|
|
1564
|
+
|
|
1565
|
+
class VaultName(Model):
|
|
1566
|
+
name: str
|
|
1567
|
+
|
|
1568
|
+
|
|
1569
|
+
class VaultRuleIdentity(Model):
|
|
1570
|
+
id: str
|
|
1571
|
+
"""
|
|
1572
|
+
A vault's id. Never a personal vault.
|
|
1573
|
+
"""
|
|
1574
|
+
type: Literal["vault"] = "vault"
|
|
1575
|
+
|
|
1576
|
+
|
|
1577
|
+
class VerifyAgentSignup(Model):
|
|
1578
|
+
user_code: Annotated[str, Field(alias="userCode")]
|
|
1579
|
+
"""
|
|
1580
|
+
The code the agent showed, with or without its dash.
|
|
1581
|
+
"""
|
|
1582
|
+
|
|
1583
|
+
|
|
1584
|
+
def _rebuild_all() -> None:
|
|
1585
|
+
for value in list(globals().values()):
|
|
1586
|
+
if isinstance(value, type) and issubclass(value, Model) and value is not Model:
|
|
1587
|
+
value.model_rebuild()
|
|
1588
|
+
|
|
1589
|
+
|
|
1590
|
+
_rebuild_all()
|