@mobilerun/sdk 6.1.0 → 6.1.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/CHANGELOG.md +8 -0
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents/agents.d.mts +307 -0
- package/resources/agents/agents.d.mts.map +1 -0
- package/resources/agents/agents.d.ts +307 -0
- package/resources/agents/agents.d.ts.map +1 -0
- package/resources/agents/agents.js +56 -0
- package/resources/agents/agents.js.map +1 -0
- package/resources/agents/agents.mjs +51 -0
- package/resources/agents/agents.mjs.map +1 -0
- package/resources/agents/conversations.d.mts +110 -0
- package/resources/agents/conversations.d.mts.map +1 -0
- package/resources/agents/conversations.d.ts +110 -0
- package/resources/agents/conversations.d.ts.map +1 -0
- package/resources/agents/conversations.js +24 -0
- package/resources/agents/conversations.js.map +1 -0
- package/resources/agents/conversations.mjs +20 -0
- package/resources/agents/conversations.mjs.map +1 -0
- package/resources/agents/files.d.mts +64 -0
- package/resources/agents/files.d.mts.map +1 -0
- package/resources/agents/files.d.ts +64 -0
- package/resources/agents/files.d.ts.map +1 -0
- package/resources/agents/files.js +16 -0
- package/resources/agents/files.js.map +1 -0
- package/resources/agents/files.mjs +12 -0
- package/resources/agents/files.mjs.map +1 -0
- package/resources/agents/index.d.mts +7 -0
- package/resources/agents/index.d.mts.map +1 -0
- package/resources/agents/index.d.ts +7 -0
- package/resources/agents/index.d.ts.map +1 -0
- package/resources/agents/index.js +17 -0
- package/resources/agents/index.js.map +1 -0
- package/resources/agents/index.mjs +8 -0
- package/resources/agents/index.mjs.map +1 -0
- package/resources/agents/profile.d.mts +156 -0
- package/resources/agents/profile.d.mts.map +1 -0
- package/resources/agents/profile.d.ts +156 -0
- package/resources/agents/profile.d.ts.map +1 -0
- package/resources/agents/profile.js +19 -0
- package/resources/agents/profile.js.map +1 -0
- package/resources/agents/profile.mjs +15 -0
- package/resources/agents/profile.mjs.map +1 -0
- package/resources/agents/requests.d.mts +295 -0
- package/resources/agents/requests.d.mts.map +1 -0
- package/resources/agents/requests.d.ts +295 -0
- package/resources/agents/requests.d.ts.map +1 -0
- package/resources/agents/requests.js +42 -0
- package/resources/agents/requests.js.map +1 -0
- package/resources/agents/requests.mjs +38 -0
- package/resources/agents/requests.mjs.map +1 -0
- package/resources/agents/routines.d.mts +95 -0
- package/resources/agents/routines.d.mts.map +1 -0
- package/resources/agents/routines.d.ts +95 -0
- package/resources/agents/routines.d.ts.map +1 -0
- package/resources/agents/routines.js +26 -0
- package/resources/agents/routines.js.map +1 -0
- package/resources/agents/routines.mjs +22 -0
- package/resources/agents/routines.mjs.map +1 -0
- package/resources/agents.d.mts +2 -0
- package/resources/agents.d.mts.map +1 -0
- package/resources/agents.d.ts +2 -0
- package/resources/agents.d.ts.map +1 -0
- package/resources/agents.js +6 -0
- package/resources/agents.js.map +1 -0
- package/resources/agents.mjs +3 -0
- package/resources/agents.mjs.map +1 -0
- package/resources/assistant/conversations.d.mts +114 -38
- package/resources/assistant/conversations.d.mts.map +1 -1
- package/resources/assistant/conversations.d.ts +114 -38
- package/resources/assistant/conversations.d.ts.map +1 -1
- package/resources/assistant/conversations.js +20 -19
- package/resources/assistant/conversations.js.map +1 -1
- package/resources/assistant/conversations.mjs +20 -19
- package/resources/assistant/conversations.mjs.map +1 -1
- package/resources/devices/actions.d.mts +3 -4
- package/resources/devices/actions.d.mts.map +1 -1
- package/resources/devices/actions.d.ts +3 -4
- package/resources/devices/actions.d.ts.map +1 -1
- package/resources/devices/actions.js +3 -4
- package/resources/devices/actions.js.map +1 -1
- package/resources/devices/actions.mjs +3 -4
- package/resources/devices/actions.mjs.map +1 -1
- package/resources/devices/devices.d.mts +9 -0
- package/resources/devices/devices.d.mts.map +1 -1
- package/resources/devices/devices.d.ts +9 -0
- package/resources/devices/devices.d.ts.map +1 -1
- package/resources/devices/devices.js +8 -0
- package/resources/devices/devices.js.map +1 -1
- package/resources/devices/devices.mjs +8 -0
- package/resources/devices/devices.mjs.map +1 -1
- package/resources/devices/index.d.mts +2 -0
- package/resources/devices/index.d.mts.map +1 -1
- package/resources/devices/index.d.ts +2 -0
- package/resources/devices/index.d.ts.map +1 -1
- package/resources/devices/index.js +5 -1
- package/resources/devices/index.js.map +1 -1
- package/resources/devices/index.mjs +2 -0
- package/resources/devices/index.mjs.map +1 -1
- package/resources/devices/number-bindings.d.mts +40 -0
- package/resources/devices/number-bindings.d.mts.map +1 -0
- package/resources/devices/number-bindings.d.ts +40 -0
- package/resources/devices/number-bindings.d.ts.map +1 -0
- package/resources/devices/number-bindings.js +15 -0
- package/resources/devices/number-bindings.js.map +1 -0
- package/resources/devices/number-bindings.mjs +11 -0
- package/resources/devices/number-bindings.mjs.map +1 -0
- package/resources/devices/number.d.mts +141 -0
- package/resources/devices/number.d.mts.map +1 -0
- package/resources/devices/number.d.ts +141 -0
- package/resources/devices/number.d.ts.map +1 -0
- package/resources/devices/number.js +68 -0
- package/resources/devices/number.js.map +1 -0
- package/resources/devices/number.mjs +64 -0
- package/resources/devices/number.mjs.map +1 -0
- package/resources/files.d.mts +13 -7
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +13 -7
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +9 -7
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +9 -7
- package/resources/files.mjs.map +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/numbers/messages.d.mts +2 -1
- package/resources/numbers/messages.d.mts.map +1 -1
- package/resources/numbers/messages.d.ts +2 -1
- package/resources/numbers/messages.d.ts.map +1 -1
- package/resources/numbers/messages.js +2 -1
- package/resources/numbers/messages.js.map +1 -1
- package/resources/numbers/messages.mjs +2 -1
- package/resources/numbers/messages.mjs.map +1 -1
- package/resources/numbers/numbers.d.mts +48 -0
- package/resources/numbers/numbers.d.mts.map +1 -1
- package/resources/numbers/numbers.d.ts +48 -0
- package/resources/numbers/numbers.d.ts.map +1 -1
- package/resources/numbers/numbers.js.map +1 -1
- package/resources/numbers/numbers.mjs.map +1 -1
- package/resources/tasks/tasks.d.mts +24 -5
- package/resources/tasks/tasks.d.mts.map +1 -1
- package/resources/tasks/tasks.d.ts +24 -5
- package/resources/tasks/tasks.d.ts.map +1 -1
- package/resources/tasks/tasks.js.map +1 -1
- package/resources/tasks/tasks.mjs.map +1 -1
- package/resources/workflows/action-catalog.d.mts +56 -8
- package/resources/workflows/action-catalog.d.mts.map +1 -1
- package/resources/workflows/action-catalog.d.ts +56 -8
- package/resources/workflows/action-catalog.d.ts.map +1 -1
- package/resources/workflows/action-catalog.js +7 -5
- package/resources/workflows/action-catalog.js.map +1 -1
- package/resources/workflows/action-catalog.mjs +7 -5
- package/resources/workflows/action-catalog.mjs.map +1 -1
- package/resources/workflows/actions/actions.d.mts +22 -10
- package/resources/workflows/actions/actions.d.mts.map +1 -1
- package/resources/workflows/actions/actions.d.ts +22 -10
- package/resources/workflows/actions/actions.d.ts.map +1 -1
- package/resources/workflows/actions/actions.js +7 -5
- package/resources/workflows/actions/actions.js.map +1 -1
- package/resources/workflows/actions/actions.mjs +7 -5
- package/resources/workflows/actions/actions.mjs.map +1 -1
- package/resources/workflows/actions/index.d.mts +1 -1
- package/resources/workflows/actions/index.d.mts.map +1 -1
- package/resources/workflows/actions/index.d.ts +1 -1
- package/resources/workflows/actions/index.d.ts.map +1 -1
- package/resources/workflows/actions/index.js.map +1 -1
- package/resources/workflows/actions/index.mjs.map +1 -1
- package/resources/workflows/actions/services.d.mts +1 -1
- package/resources/workflows/actions/services.d.mts.map +1 -1
- package/resources/workflows/actions/services.d.ts +1 -1
- package/resources/workflows/actions/services.d.ts.map +1 -1
- package/resources/workflows/events.d.mts +25 -3
- package/resources/workflows/events.d.mts.map +1 -1
- package/resources/workflows/events.d.ts +25 -3
- package/resources/workflows/events.d.ts.map +1 -1
- package/resources/workflows/executions/executions.d.mts +16 -0
- package/resources/workflows/executions/executions.d.mts.map +1 -1
- package/resources/workflows/executions/executions.d.ts +16 -0
- package/resources/workflows/executions/executions.d.ts.map +1 -1
- package/resources/workflows/executions/executions.js.map +1 -1
- package/resources/workflows/executions/executions.mjs.map +1 -1
- package/resources/workflows/flows/flows.d.mts +547 -102
- package/resources/workflows/flows/flows.d.mts.map +1 -1
- package/resources/workflows/flows/flows.d.ts +547 -102
- package/resources/workflows/flows/flows.d.ts.map +1 -1
- package/resources/workflows/flows/flows.js +15 -2
- package/resources/workflows/flows/flows.js.map +1 -1
- package/resources/workflows/flows/flows.mjs +15 -2
- package/resources/workflows/flows/flows.mjs.map +1 -1
- package/resources/workflows/flows/index.d.mts +2 -1
- package/resources/workflows/flows/index.d.mts.map +1 -1
- package/resources/workflows/flows/index.d.ts +2 -1
- package/resources/workflows/flows/index.d.ts.map +1 -1
- package/resources/workflows/flows/index.js +3 -1
- package/resources/workflows/flows/index.js.map +1 -1
- package/resources/workflows/flows/index.mjs +1 -0
- package/resources/workflows/flows/index.mjs.map +1 -1
- package/resources/workflows/flows/state.d.mts +65 -0
- package/resources/workflows/flows/state.d.mts.map +1 -0
- package/resources/workflows/flows/state.d.ts +65 -0
- package/resources/workflows/flows/state.d.ts.map +1 -0
- package/resources/workflows/flows/state.js +33 -0
- package/resources/workflows/flows/state.js.map +1 -0
- package/resources/workflows/flows/state.mjs +29 -0
- package/resources/workflows/flows/state.mjs.map +1 -0
- package/resources/workflows/index.d.mts +3 -3
- package/resources/workflows/index.d.mts.map +1 -1
- package/resources/workflows/index.d.ts +3 -3
- package/resources/workflows/index.d.ts.map +1 -1
- package/resources/workflows/index.js.map +1 -1
- package/resources/workflows/index.mjs.map +1 -1
- package/resources/workflows/triggers.d.mts +40 -5
- package/resources/workflows/triggers.d.mts.map +1 -1
- package/resources/workflows/triggers.d.ts +40 -5
- package/resources/workflows/triggers.d.ts.map +1 -1
- package/resources/workflows/triggers.js +12 -3
- package/resources/workflows/triggers.js.map +1 -1
- package/resources/workflows/triggers.mjs +12 -3
- package/resources/workflows/triggers.mjs.map +1 -1
- package/resources/workflows/workflows.d.mts +6 -6
- package/resources/workflows/workflows.d.mts.map +1 -1
- package/resources/workflows/workflows.d.ts +6 -6
- package/resources/workflows/workflows.d.ts.map +1 -1
- package/resources/workflows/workflows.js.map +1 -1
- package/resources/workflows/workflows.mjs.map +1 -1
- package/src/client.ts +17 -0
- package/src/resources/agents/agents.ts +475 -0
- package/src/resources/agents/conversations.ts +205 -0
- package/src/resources/agents/files.ts +105 -0
- package/src/resources/agents/index.ts +34 -0
- package/src/resources/agents/profile.ts +225 -0
- package/src/resources/agents/requests.ts +495 -0
- package/src/resources/agents/routines.ts +156 -0
- package/src/resources/agents.ts +3 -0
- package/src/resources/assistant/conversations.ts +146 -39
- package/src/resources/devices/actions.ts +3 -4
- package/src/resources/devices/devices.ts +38 -0
- package/src/resources/devices/index.ts +14 -0
- package/src/resources/devices/number-bindings.ts +62 -0
- package/src/resources/devices/number.ts +261 -0
- package/src/resources/files.ts +17 -7
- package/src/resources/index.ts +7 -0
- package/src/resources/numbers/messages.ts +2 -1
- package/src/resources/numbers/numbers.ts +64 -0
- package/src/resources/tasks/tasks.ts +26 -5
- package/src/resources/workflows/action-catalog.ts +69 -8
- package/src/resources/workflows/actions/actions.ts +29 -10
- package/src/resources/workflows/actions/index.ts +1 -0
- package/src/resources/workflows/actions/services.ts +1 -1
- package/src/resources/workflows/events.ts +32 -2
- package/src/resources/workflows/executions/executions.ts +26 -0
- package/src/resources/workflows/flows/flows.ts +707 -97
- package/src/resources/workflows/flows/index.ts +10 -0
- package/src/resources/workflows/flows/state.ts +103 -0
- package/src/resources/workflows/index.ts +4 -0
- package/src/resources/workflows/triggers.ts +34 -5
- package/src/resources/workflows/workflows.ts +8 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
6
|
+
import { path } from '../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class Conversations extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Create a named chat session bound to one agent. Idempotent via the
|
|
11
|
+
* `Idempotency-Key` header, like the unscoped create.
|
|
12
|
+
*/
|
|
13
|
+
create(
|
|
14
|
+
agentID: string,
|
|
15
|
+
body: ConversationCreateParams,
|
|
16
|
+
options?: RequestOptions,
|
|
17
|
+
): APIPromise<ConversationCreateResponse> {
|
|
18
|
+
return this._client.post(path`/agents/${agentID}/chat/sessions`, { body, ...options });
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* List the user's named chat sessions for one agent. Supports the same `kind`,
|
|
23
|
+
* `workflowId` and `mine` filters as the unscoped list.
|
|
24
|
+
*/
|
|
25
|
+
list(
|
|
26
|
+
agentID: string,
|
|
27
|
+
query: ConversationListParams | null | undefined = {},
|
|
28
|
+
options?: RequestOptions,
|
|
29
|
+
): APIPromise<ConversationListResponse> {
|
|
30
|
+
return this._client.get(path`/agents/${agentID}/chat/sessions`, { query, ...options });
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface ConversationCreateResponse {
|
|
35
|
+
session: ConversationCreateResponse.Session;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export namespace ConversationCreateResponse {
|
|
39
|
+
export interface Session {
|
|
40
|
+
id: string;
|
|
41
|
+
|
|
42
|
+
agent: string | null;
|
|
43
|
+
|
|
44
|
+
agentId: string | null;
|
|
45
|
+
|
|
46
|
+
basePromptTokens: number | null;
|
|
47
|
+
|
|
48
|
+
contextExhaustedAt: string | null;
|
|
49
|
+
|
|
50
|
+
costCents: number;
|
|
51
|
+
|
|
52
|
+
costUsd: number;
|
|
53
|
+
|
|
54
|
+
createdAt: string;
|
|
55
|
+
|
|
56
|
+
creditsUsed: number | null;
|
|
57
|
+
|
|
58
|
+
description: string | null;
|
|
59
|
+
|
|
60
|
+
lastActiveAt: string;
|
|
61
|
+
|
|
62
|
+
peakPromptTokens: number | null;
|
|
63
|
+
|
|
64
|
+
pinned: boolean;
|
|
65
|
+
|
|
66
|
+
promptStatus: 'ready' | 'machine_replaced';
|
|
67
|
+
|
|
68
|
+
status: string;
|
|
69
|
+
|
|
70
|
+
title: string;
|
|
71
|
+
|
|
72
|
+
turnActive: boolean;
|
|
73
|
+
|
|
74
|
+
turnStartedAt: string | null;
|
|
75
|
+
|
|
76
|
+
createdBy?: string | null;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface ConversationListResponse {
|
|
81
|
+
sessions: Array<ConversationListResponse.UnionMember0 | ConversationListResponse.UnionMember1>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export namespace ConversationListResponse {
|
|
85
|
+
export interface UnionMember0 {
|
|
86
|
+
id: string;
|
|
87
|
+
|
|
88
|
+
agent: string | null;
|
|
89
|
+
|
|
90
|
+
agentId: string | null;
|
|
91
|
+
|
|
92
|
+
basePromptTokens: number | null;
|
|
93
|
+
|
|
94
|
+
contextExhaustedAt: string | null;
|
|
95
|
+
|
|
96
|
+
costCents: number;
|
|
97
|
+
|
|
98
|
+
costUsd: number;
|
|
99
|
+
|
|
100
|
+
createdAt: string;
|
|
101
|
+
|
|
102
|
+
creditsUsed: number | null;
|
|
103
|
+
|
|
104
|
+
description: string | null;
|
|
105
|
+
|
|
106
|
+
episode: number;
|
|
107
|
+
|
|
108
|
+
kind: 'chat';
|
|
109
|
+
|
|
110
|
+
lastActiveAt: string;
|
|
111
|
+
|
|
112
|
+
peakPromptTokens: number | null;
|
|
113
|
+
|
|
114
|
+
pinned: boolean;
|
|
115
|
+
|
|
116
|
+
promptStatus: 'ready' | 'machine_replaced';
|
|
117
|
+
|
|
118
|
+
sourceExecutionId: null;
|
|
119
|
+
|
|
120
|
+
status: string;
|
|
121
|
+
|
|
122
|
+
title: string;
|
|
123
|
+
|
|
124
|
+
turnActive: boolean;
|
|
125
|
+
|
|
126
|
+
turnStartedAt: string | null;
|
|
127
|
+
|
|
128
|
+
workflowId: null;
|
|
129
|
+
|
|
130
|
+
createdBy?: string | null;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface UnionMember1 {
|
|
134
|
+
id: string;
|
|
135
|
+
|
|
136
|
+
agent: string | null;
|
|
137
|
+
|
|
138
|
+
agentId: string | null;
|
|
139
|
+
|
|
140
|
+
basePromptTokens: number | null;
|
|
141
|
+
|
|
142
|
+
contextExhaustedAt: string | null;
|
|
143
|
+
|
|
144
|
+
costCents: number;
|
|
145
|
+
|
|
146
|
+
costUsd: number;
|
|
147
|
+
|
|
148
|
+
createdAt: string;
|
|
149
|
+
|
|
150
|
+
creditsUsed: number | null;
|
|
151
|
+
|
|
152
|
+
description: string | null;
|
|
153
|
+
|
|
154
|
+
episode: number;
|
|
155
|
+
|
|
156
|
+
kind: 'agent_workflow';
|
|
157
|
+
|
|
158
|
+
lastActiveAt: string;
|
|
159
|
+
|
|
160
|
+
peakPromptTokens: number | null;
|
|
161
|
+
|
|
162
|
+
pinned: boolean;
|
|
163
|
+
|
|
164
|
+
promptStatus: 'ready' | 'machine_replaced';
|
|
165
|
+
|
|
166
|
+
sourceExecutionId: string;
|
|
167
|
+
|
|
168
|
+
status: string;
|
|
169
|
+
|
|
170
|
+
title: string;
|
|
171
|
+
|
|
172
|
+
turnActive: boolean;
|
|
173
|
+
|
|
174
|
+
turnStartedAt: string | null;
|
|
175
|
+
|
|
176
|
+
workflowId: string;
|
|
177
|
+
|
|
178
|
+
createdBy?: string | null;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export interface ConversationCreateParams {
|
|
183
|
+
title: string;
|
|
184
|
+
|
|
185
|
+
agent?: string;
|
|
186
|
+
|
|
187
|
+
description?: string;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export interface ConversationListParams {
|
|
191
|
+
kind?: 'chat' | 'agent_workflow';
|
|
192
|
+
|
|
193
|
+
mine?: 'true' | 'false';
|
|
194
|
+
|
|
195
|
+
workflowId?: string;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export declare namespace Conversations {
|
|
199
|
+
export {
|
|
200
|
+
type ConversationCreateResponse as ConversationCreateResponse,
|
|
201
|
+
type ConversationListResponse as ConversationListResponse,
|
|
202
|
+
type ConversationCreateParams as ConversationCreateParams,
|
|
203
|
+
type ConversationListParams as ConversationListParams,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
6
|
+
import { path } from '../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class Files extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* List the ready files of one agent, optionally filtered by zone.
|
|
11
|
+
*/
|
|
12
|
+
list(
|
|
13
|
+
agentID: string,
|
|
14
|
+
query: FileListParams | null | undefined = {},
|
|
15
|
+
options?: RequestOptions,
|
|
16
|
+
): APIPromise<FileListResponse> {
|
|
17
|
+
return this._client.get(path`/agents/${agentID}/files`, { query, ...options });
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface FileListResponse {
|
|
22
|
+
files: Array<FileListResponse.File>;
|
|
23
|
+
|
|
24
|
+
quota: FileListResponse.Quota;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export namespace FileListResponse {
|
|
28
|
+
export interface File {
|
|
29
|
+
createdAt: string;
|
|
30
|
+
|
|
31
|
+
createdBy: 'user' | 'agent' | 'workflow';
|
|
32
|
+
|
|
33
|
+
displayName: string | null;
|
|
34
|
+
|
|
35
|
+
enabled: boolean;
|
|
36
|
+
|
|
37
|
+
fileId: string;
|
|
38
|
+
|
|
39
|
+
filename: string;
|
|
40
|
+
|
|
41
|
+
mimeType: string;
|
|
42
|
+
|
|
43
|
+
sizeBytes: number;
|
|
44
|
+
|
|
45
|
+
zone: 'user' | 'agent' | 'workflow' | 'skills';
|
|
46
|
+
|
|
47
|
+
agentId?: string;
|
|
48
|
+
|
|
49
|
+
collectionStatus?: File.UnionMember0 | File.UnionMember1;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export namespace File {
|
|
53
|
+
export interface UnionMember0 {
|
|
54
|
+
completeness: 'complete' | 'partial' | 'none' | 'unknown';
|
|
55
|
+
|
|
56
|
+
coverage: 'exhaustive' | 'bounded' | 'unknown';
|
|
57
|
+
|
|
58
|
+
endReached: boolean;
|
|
59
|
+
|
|
60
|
+
records: UnionMember0.Records;
|
|
61
|
+
|
|
62
|
+
resumable: boolean;
|
|
63
|
+
|
|
64
|
+
version: 1;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export namespace UnionMember0 {
|
|
68
|
+
export interface Records {
|
|
69
|
+
reported: number;
|
|
70
|
+
|
|
71
|
+
unit: string;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface UnionMember1 {
|
|
76
|
+
completeness: 'unknown';
|
|
77
|
+
|
|
78
|
+
coverage: 'unknown';
|
|
79
|
+
|
|
80
|
+
endReached: false;
|
|
81
|
+
|
|
82
|
+
resumable: false;
|
|
83
|
+
|
|
84
|
+
version: 1;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface Quota {
|
|
89
|
+
includedBytes: number | null;
|
|
90
|
+
|
|
91
|
+
maxBytes: number | null;
|
|
92
|
+
|
|
93
|
+
overageAllowed: boolean;
|
|
94
|
+
|
|
95
|
+
usedBytes: number;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface FileListParams {
|
|
100
|
+
zone?: 'user' | 'agent' | 'workflow' | 'skills';
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export declare namespace Files {
|
|
104
|
+
export { type FileListResponse as FileListResponse, type FileListParams as FileListParams };
|
|
105
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
Agents,
|
|
5
|
+
type AgentCreateResponse,
|
|
6
|
+
type AgentListResponse,
|
|
7
|
+
type AgentModelProfilesResponse,
|
|
8
|
+
type AgentCreateParams,
|
|
9
|
+
} from './agents';
|
|
10
|
+
export {
|
|
11
|
+
Conversations,
|
|
12
|
+
type ConversationCreateResponse,
|
|
13
|
+
type ConversationListResponse,
|
|
14
|
+
type ConversationCreateParams,
|
|
15
|
+
type ConversationListParams,
|
|
16
|
+
} from './conversations';
|
|
17
|
+
export { Files, type FileListResponse, type FileListParams } from './files';
|
|
18
|
+
export { Profile, type ProfileUpdateResponse, type ProfileUpdateParams } from './profile';
|
|
19
|
+
export {
|
|
20
|
+
Requests,
|
|
21
|
+
type RequestRetrieveResponse,
|
|
22
|
+
type RequestListResponse,
|
|
23
|
+
type RequestListForAgentResponse,
|
|
24
|
+
type RequestRetrieveBySessionResponse,
|
|
25
|
+
type RequestListParams,
|
|
26
|
+
type RequestListForAgentParams,
|
|
27
|
+
} from './requests';
|
|
28
|
+
export {
|
|
29
|
+
Routines,
|
|
30
|
+
type RoutineCreateResponse,
|
|
31
|
+
type RoutineCloneResponse,
|
|
32
|
+
type RoutineCreateParams,
|
|
33
|
+
type RoutineCloneParams,
|
|
34
|
+
} from './routines';
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
6
|
+
import { path } from '../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class Profile extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Owner-scoped partial update of `displayName`, `instructions`, `modelProfile` and
|
|
11
|
+
* the avatar. A null modelProfile uses the environment default; an unknown id
|
|
12
|
+
* returns unknown_model_profile with details.validProfiles. Returns the updated
|
|
13
|
+
* Agent; an Agent of another owner or an unknown id is a 404.
|
|
14
|
+
*/
|
|
15
|
+
update(
|
|
16
|
+
agentID: string,
|
|
17
|
+
body: ProfileUpdateParams | null | undefined = {},
|
|
18
|
+
options?: RequestOptions,
|
|
19
|
+
): APIPromise<ProfileUpdateResponse> {
|
|
20
|
+
return this._client.patch(path`/agents/${agentID}/profile`, { body, ...options });
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* An Agent of the owner: its lifecycle state, profile and runtime.
|
|
26
|
+
*/
|
|
27
|
+
export interface ProfileUpdateResponse {
|
|
28
|
+
id: string;
|
|
29
|
+
|
|
30
|
+
archivedAt: string | null;
|
|
31
|
+
|
|
32
|
+
createdAt: string;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Why a `disabled` Agent is disabled: `owner` chose it, `over-limit` the plan
|
|
36
|
+
* grants fewer Agent slots than the owner had enabled. Null while the Agent is not
|
|
37
|
+
* disabled.
|
|
38
|
+
*/
|
|
39
|
+
disabledReason: 'owner' | 'over-limit' | null;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Why provisioning failed, null otherwise. An open set: new codes can appear.
|
|
43
|
+
* Codes written today: `provision_timeout`, `agent_limit_reached`,
|
|
44
|
+
* `provision_failed`; a code the harness reports for a failed start is passed
|
|
45
|
+
* through.
|
|
46
|
+
*/
|
|
47
|
+
errorCode: string | null;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Whether this is the owner's primary Agent, the one a chat session uses when it
|
|
51
|
+
* names no `agentId`.
|
|
52
|
+
*/
|
|
53
|
+
primary: boolean;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Persona of the Agent plus its individual instructions passage; `instructions` is
|
|
57
|
+
* null when none is set.
|
|
58
|
+
*/
|
|
59
|
+
profile: ProfileUpdateResponse.Profile;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* When provisioning of the Agent completed (ISO 8601); null while a newly created
|
|
63
|
+
* Agent is still pending and after its provisioning failed.
|
|
64
|
+
*/
|
|
65
|
+
provisionedAt: string | null;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* `pending`: created but not provisioned yet, it takes no turns. `active`: ready
|
|
69
|
+
* for turns. `failed`: provisioning gave up (see `errorCode`); the Agent is
|
|
70
|
+
* archived. `archived`: read-only. `disabled`: switched off by the owner or
|
|
71
|
+
* because the plan grants fewer Agent slots; it takes no turns and holds no slot,
|
|
72
|
+
* and the owner can enable it again while a slot is free.
|
|
73
|
+
*/
|
|
74
|
+
status: 'active' | 'pending' | 'failed' | 'archived' | 'disabled';
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Newest thread excerpt (90 characters), awaits-input and timestamp, from at most
|
|
78
|
+
* 20 newest rows. Null when the thread has no rows.
|
|
79
|
+
*/
|
|
80
|
+
threadPreview: ProfileUpdateResponse.ThreadPreview | null;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Active chat on the active machine, pinned first, then session lastActiveAt DESC,
|
|
84
|
+
* id DESC. Null for pending/archived Agents or no thread.
|
|
85
|
+
*/
|
|
86
|
+
threadSessionId: string | null;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Whether this active primary Agent is still due its one-time greeting: the
|
|
90
|
+
* welcome-back for an adopted primary, or the onboarding greeting for a primary
|
|
91
|
+
* whose chat never had a message.
|
|
92
|
+
*/
|
|
93
|
+
welcomePending: boolean;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Latest activity of the Agent (newest chat session activity or live turn
|
|
97
|
+
* heartbeat), ISO 8601; null when it has never been active.
|
|
98
|
+
*/
|
|
99
|
+
lastActiveAt?: string | null;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Whether the Agent is running right now, derived from stored state only.
|
|
103
|
+
* `waking`: an active start, its machine is provisioning or a restart/rehydrate is
|
|
104
|
+
* pending and changed within the last 10 minutes (a timed-out or stalled start
|
|
105
|
+
* reads `sleeping`). `awake`: the machine is running and this Agent has been
|
|
106
|
+
* started in the current run. `sleeping`: everything else (stopped or parked
|
|
107
|
+
* machine, an Agent the running harness has not started yet, or an Agent that is
|
|
108
|
+
* not active). `awake` can lag a machine stop until the reconciler converges.
|
|
109
|
+
*/
|
|
110
|
+
runtime?: 'awake' | 'sleeping' | 'waking' | null;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export namespace ProfileUpdateResponse {
|
|
114
|
+
/**
|
|
115
|
+
* Persona of the Agent plus its individual instructions passage; `instructions` is
|
|
116
|
+
* null when none is set.
|
|
117
|
+
*/
|
|
118
|
+
export interface Profile {
|
|
119
|
+
/**
|
|
120
|
+
* Configuration of a `blob` avatar: its seed and optional user-chosen palette
|
|
121
|
+
* color. A color-only config retains the default seed fallback.
|
|
122
|
+
*/
|
|
123
|
+
avatarConfig: Profile.AvatarConfig | null;
|
|
124
|
+
|
|
125
|
+
avatarKind: 'blob' | null;
|
|
126
|
+
|
|
127
|
+
displayName: string | null;
|
|
128
|
+
|
|
129
|
+
instructions: string | null;
|
|
130
|
+
|
|
131
|
+
modelProfile: string | null;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export namespace Profile {
|
|
135
|
+
/**
|
|
136
|
+
* Configuration of a `blob` avatar: its seed and optional user-chosen palette
|
|
137
|
+
* color. A color-only config retains the default seed fallback.
|
|
138
|
+
*/
|
|
139
|
+
export interface AvatarConfig {
|
|
140
|
+
color?:
|
|
141
|
+
| 'slate'
|
|
142
|
+
| 'red'
|
|
143
|
+
| 'orange'
|
|
144
|
+
| 'amber'
|
|
145
|
+
| 'lime'
|
|
146
|
+
| 'green'
|
|
147
|
+
| 'teal'
|
|
148
|
+
| 'cyan'
|
|
149
|
+
| 'blue'
|
|
150
|
+
| 'indigo'
|
|
151
|
+
| 'violet'
|
|
152
|
+
| 'pink';
|
|
153
|
+
|
|
154
|
+
seed?: string | number;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Newest thread excerpt (90 characters), awaits-input and timestamp, from at most
|
|
160
|
+
* 20 newest rows. Null when the thread has no rows.
|
|
161
|
+
*/
|
|
162
|
+
export interface ThreadPreview {
|
|
163
|
+
awaitsInput: boolean;
|
|
164
|
+
|
|
165
|
+
excerpt: string | null;
|
|
166
|
+
|
|
167
|
+
timestamp: string | null;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export interface ProfileUpdateParams {
|
|
172
|
+
avatarConfig?: ProfileUpdateParams.AvatarConfig | null;
|
|
173
|
+
|
|
174
|
+
avatarKind?: 'blob' | null;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Set the avatar palette color without changing its seed; null removes only the
|
|
178
|
+
* color. Omitted color stays unchanged, including during a seed update.
|
|
179
|
+
*/
|
|
180
|
+
color?:
|
|
181
|
+
| 'slate'
|
|
182
|
+
| 'red'
|
|
183
|
+
| 'orange'
|
|
184
|
+
| 'amber'
|
|
185
|
+
| 'lime'
|
|
186
|
+
| 'green'
|
|
187
|
+
| 'teal'
|
|
188
|
+
| 'cyan'
|
|
189
|
+
| 'blue'
|
|
190
|
+
| 'indigo'
|
|
191
|
+
| 'violet'
|
|
192
|
+
| 'pink'
|
|
193
|
+
| null;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Single-line name shown for the Agent; surrounding whitespace is trimmed and it
|
|
197
|
+
* needs at least one letter or number.
|
|
198
|
+
*/
|
|
199
|
+
displayName?: string | null;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* The Agent's individual instructions passage; an empty or whitespace-only text
|
|
203
|
+
* clears it. Line breaks count three characters toward the rendered size limit.
|
|
204
|
+
*/
|
|
205
|
+
instructions?: string | null;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Model profile id from GET /agents/model-profiles; null uses the environment
|
|
209
|
+
* default.
|
|
210
|
+
*/
|
|
211
|
+
modelProfile?: string | null;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export namespace ProfileUpdateParams {
|
|
215
|
+
export interface AvatarConfig {
|
|
216
|
+
seed: string | number;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export declare namespace Profile {
|
|
221
|
+
export {
|
|
222
|
+
type ProfileUpdateResponse as ProfileUpdateResponse,
|
|
223
|
+
type ProfileUpdateParams as ProfileUpdateParams,
|
|
224
|
+
};
|
|
225
|
+
}
|