@maudecode/talaria-web-contracts 1.15.0 → 1.16.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/dist/router.d.ts +1047 -67
- package/dist/routes/automation.d.ts +21 -7
- package/dist/routes/chat.d.ts +142 -6
- package/dist/routes/core.d.ts +8 -4
- package/dist/routes/core.js +2 -0
- package/dist/routes/core.js.map +1 -1
- package/dist/routes/sessions.d.ts +872 -43
- package/dist/routes/sessions.js +12 -3
- package/dist/routes/sessions.js.map +1 -1
- package/dist/routes/settings.d.ts +153 -9
- package/dist/routes/settings.js +6 -5
- package/dist/routes/settings.js.map +1 -1
- package/dist/routes/tools.d.ts +13 -1
- package/dist/routes/workspaces.d.ts +5 -5
- package/dist/sidecar/methods.d.ts +72 -12
- package/dist/sidecar/methods.js +2 -1
- package/dist/sidecar/methods.js.map +1 -1
- package/dist/sidecar/namespaces.d.ts +112 -15
- package/dist/sidecar/namespaces.js +27 -4
- package/dist/sidecar/namespaces.js.map +1 -1
- package/dist/sidecar/version.d.ts +1 -1
- package/dist/sidecar/version.js +1 -1
- package/dist/sse.d.ts +26 -5
- package/dist/sse.js +10 -4
- package/dist/sse.js.map +1 -1
- package/dist/views.d.ts +775 -32
- package/dist/views.js +138 -24
- package/dist/views.js.map +1 -1
- package/fixtures/sidecar/plugins.json +1 -403
- package/fixtures/sidecar/rpc.json +0 -1
- package/fixtures/sidecar/runtime.json +3 -3
- package/fixtures/sidecar/text.json +0 -10
- package/fixtures/sidecar/usage.json +13 -0
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ export declare const workspacesContract: {
|
|
|
3
3
|
workspaces: {
|
|
4
4
|
list: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
|
|
5
5
|
workspaces: z.ZodArray<z.ZodObject<{
|
|
6
|
-
name: z.
|
|
6
|
+
name: z.ZodString;
|
|
7
7
|
path: z.ZodString;
|
|
8
8
|
}, z.core.$loose>>;
|
|
9
9
|
last: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -22,7 +22,7 @@ export declare const workspacesContract: {
|
|
|
22
22
|
}, z.core.$strip>, z.ZodObject<{
|
|
23
23
|
ok: z.ZodLiteral<true>;
|
|
24
24
|
workspaces: z.ZodArray<z.ZodObject<{
|
|
25
|
-
name: z.
|
|
25
|
+
name: z.ZodString;
|
|
26
26
|
path: z.ZodString;
|
|
27
27
|
}, z.core.$loose>>;
|
|
28
28
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -31,7 +31,7 @@ export declare const workspacesContract: {
|
|
|
31
31
|
}, z.core.$strip>, z.ZodObject<{
|
|
32
32
|
ok: z.ZodLiteral<true>;
|
|
33
33
|
workspaces: z.ZodArray<z.ZodObject<{
|
|
34
|
-
name: z.
|
|
34
|
+
name: z.ZodString;
|
|
35
35
|
path: z.ZodString;
|
|
36
36
|
}, z.core.$loose>>;
|
|
37
37
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -41,7 +41,7 @@ export declare const workspacesContract: {
|
|
|
41
41
|
}, z.core.$strip>, z.ZodObject<{
|
|
42
42
|
ok: z.ZodLiteral<true>;
|
|
43
43
|
workspaces: z.ZodArray<z.ZodObject<{
|
|
44
|
-
name: z.
|
|
44
|
+
name: z.ZodString;
|
|
45
45
|
path: z.ZodString;
|
|
46
46
|
}, z.core.$loose>>;
|
|
47
47
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -50,7 +50,7 @@ export declare const workspacesContract: {
|
|
|
50
50
|
}, z.core.$strip>, z.ZodObject<{
|
|
51
51
|
ok: z.ZodLiteral<true>;
|
|
52
52
|
workspaces: z.ZodArray<z.ZodObject<{
|
|
53
|
-
name: z.
|
|
53
|
+
name: z.ZodString;
|
|
54
54
|
path: z.ZodString;
|
|
55
55
|
}, z.core.$loose>>;
|
|
56
56
|
}, z.core.$strip>, Record<never, never>, Record<never, never>>;
|
|
@@ -35,7 +35,9 @@ export declare const SIDECAR_METHODS: {
|
|
|
35
35
|
messages: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
36
36
|
final_response: z.ZodString;
|
|
37
37
|
error: z.ZodNullable<z.ZodString>;
|
|
38
|
-
|
|
38
|
+
failed: z.ZodBoolean;
|
|
39
|
+
partial: z.ZodBoolean;
|
|
40
|
+
compression_exhausted: z.ZodBoolean;
|
|
39
41
|
tool_limit_reached: z.ZodBoolean;
|
|
40
42
|
usage: z.ZodObject<{
|
|
41
43
|
prompt_tokens: z.ZodNumber;
|
|
@@ -102,6 +104,13 @@ export declare const SIDECAR_METHODS: {
|
|
|
102
104
|
}, z.core.$strip>, z.ZodObject<{
|
|
103
105
|
event: z.ZodLiteral<"clarify_resolved">;
|
|
104
106
|
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
107
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
108
|
+
event: z.ZodLiteral<"approval_resolved">;
|
|
109
|
+
data: z.ZodObject<{
|
|
110
|
+
approval_id: z.ZodString;
|
|
111
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
112
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
113
|
+
}, z.core.$loose>;
|
|
105
114
|
}, z.core.$strip>, z.ZodObject<{
|
|
106
115
|
event: z.ZodLiteral<"compressing">;
|
|
107
116
|
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
@@ -209,6 +218,7 @@ export declare const SIDECAR_METHODS: {
|
|
|
209
218
|
readonly 'chat.evict_agent': {
|
|
210
219
|
readonly params: z.ZodObject<{
|
|
211
220
|
session_id: z.ZodString;
|
|
221
|
+
clear_session: z.ZodOptional<z.ZodBoolean>;
|
|
212
222
|
}, z.core.$strip>;
|
|
213
223
|
readonly result: z.ZodObject<{
|
|
214
224
|
evicted: z.ZodBoolean;
|
|
@@ -491,15 +501,6 @@ export declare const SIDECAR_METHODS: {
|
|
|
491
501
|
text: z.ZodString;
|
|
492
502
|
}, z.core.$strip>;
|
|
493
503
|
};
|
|
494
|
-
readonly 'text.redact': {
|
|
495
|
-
readonly params: z.ZodObject<{
|
|
496
|
-
text: z.ZodString;
|
|
497
|
-
force: z.ZodOptional<z.ZodBoolean>;
|
|
498
|
-
}, z.core.$strip>;
|
|
499
|
-
readonly result: z.ZodObject<{
|
|
500
|
-
text: z.ZodString;
|
|
501
|
-
}, z.core.$strip>;
|
|
502
|
-
};
|
|
503
504
|
readonly 'text.image_mode': {
|
|
504
505
|
readonly params: z.ZodObject<{
|
|
505
506
|
profile_home: z.ZodString;
|
|
@@ -565,6 +566,59 @@ export declare const SIDECAR_METHODS: {
|
|
|
565
566
|
error: z.ZodOptional<z.ZodString>;
|
|
566
567
|
}, z.core.$strip>;
|
|
567
568
|
};
|
|
569
|
+
readonly 'oauth.start': {
|
|
570
|
+
readonly params: z.ZodObject<{
|
|
571
|
+
profile_home: z.ZodString;
|
|
572
|
+
provider: z.ZodString;
|
|
573
|
+
}, z.core.$strip>;
|
|
574
|
+
readonly result: z.ZodObject<{
|
|
575
|
+
flow_id: z.ZodString;
|
|
576
|
+
provider: z.ZodString;
|
|
577
|
+
status: z.ZodLiteral<"pending">;
|
|
578
|
+
user_code: z.ZodString;
|
|
579
|
+
verification_url: z.ZodString;
|
|
580
|
+
expires_in: z.ZodNumber;
|
|
581
|
+
interval: z.ZodNumber;
|
|
582
|
+
}, z.core.$strip>;
|
|
583
|
+
};
|
|
584
|
+
readonly 'oauth.poll': {
|
|
585
|
+
readonly params: z.ZodObject<{
|
|
586
|
+
profile_home: z.ZodString;
|
|
587
|
+
flow_id: z.ZodString;
|
|
588
|
+
}, z.core.$strip>;
|
|
589
|
+
readonly result: z.ZodObject<{
|
|
590
|
+
flow_id: z.ZodString;
|
|
591
|
+
provider: z.ZodString;
|
|
592
|
+
status: z.ZodEnum<{
|
|
593
|
+
error: "error";
|
|
594
|
+
cancelled: "cancelled";
|
|
595
|
+
pending: "pending";
|
|
596
|
+
approved: "approved";
|
|
597
|
+
denied: "denied";
|
|
598
|
+
expired: "expired";
|
|
599
|
+
}>;
|
|
600
|
+
error: z.ZodNullable<z.ZodString>;
|
|
601
|
+
}, z.core.$strip>;
|
|
602
|
+
};
|
|
603
|
+
readonly 'oauth.cancel': {
|
|
604
|
+
readonly params: z.ZodObject<{
|
|
605
|
+
profile_home: z.ZodString;
|
|
606
|
+
flow_id: z.ZodString;
|
|
607
|
+
}, z.core.$strip>;
|
|
608
|
+
readonly result: z.ZodObject<{
|
|
609
|
+
flow_id: z.ZodString;
|
|
610
|
+
provider: z.ZodString;
|
|
611
|
+
status: z.ZodEnum<{
|
|
612
|
+
error: "error";
|
|
613
|
+
cancelled: "cancelled";
|
|
614
|
+
pending: "pending";
|
|
615
|
+
approved: "approved";
|
|
616
|
+
denied: "denied";
|
|
617
|
+
expired: "expired";
|
|
618
|
+
}>;
|
|
619
|
+
error: z.ZodNullable<z.ZodString>;
|
|
620
|
+
}, z.core.$strip>;
|
|
621
|
+
};
|
|
568
622
|
readonly 'providers.registry': {
|
|
569
623
|
readonly params: z.ZodObject<{
|
|
570
624
|
profile_home: z.ZodString;
|
|
@@ -1467,8 +1521,14 @@ export declare const SIDECAR_METHODS: {
|
|
|
1467
1521
|
providers: z.ZodArray<z.ZodObject<{
|
|
1468
1522
|
name: z.ZodString;
|
|
1469
1523
|
display_name: z.ZodString;
|
|
1470
|
-
|
|
1471
|
-
|
|
1524
|
+
auth_type: z.ZodString;
|
|
1525
|
+
setup: z.ZodEnum<{
|
|
1526
|
+
ready: "ready";
|
|
1527
|
+
missing_cli: "missing_cli";
|
|
1528
|
+
needs_setup: "needs_setup";
|
|
1529
|
+
not_loaded: "not_loaded";
|
|
1530
|
+
unavailable: "unavailable";
|
|
1531
|
+
}>;
|
|
1472
1532
|
}, z.core.$strip>>;
|
|
1473
1533
|
}, z.core.$strip>;
|
|
1474
1534
|
};
|
package/dist/sidecar/methods.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { AUX_METHODS, COMMANDS_METHODS, CRON_METHODS, GATEWAY_METHODS, GOALS_METHODS, KANBAN_METHODS, MCP_METHODS, PROCESS_METHODS, PROFILES_METHODS, PROVIDERS_METHODS, SKILLS_METHODS, STATE_DB_METHODS, STT_METHODS, TEXT_METHODS, USAGE_METHODS, WORKTREE_METHODS, CHAT_METHODS, CONFIG_METHODS, } from './namespaces.js';
|
|
2
|
+
import { AUX_METHODS, COMMANDS_METHODS, CRON_METHODS, GATEWAY_METHODS, GOALS_METHODS, KANBAN_METHODS, MCP_METHODS, PROCESS_METHODS, PROFILES_METHODS, PROVIDERS_METHODS, SKILLS_METHODS, STATE_DB_METHODS, STT_METHODS, OAUTH_METHODS, TEXT_METHODS, USAGE_METHODS, WORKTREE_METHODS, CHAT_METHODS, CONFIG_METHODS, } from './namespaces.js';
|
|
3
3
|
import { OkResultSchema, RpcCancelParamsSchema, RpcCancelResultSchema, RpcMethodsResultSchema, RuntimeDescribeSchema, RuntimeEnsureCurrentResultSchema, RuntimeEnvParamsSchema, RuntimeHandshakeParamsSchema, RuntimeShutdownParamsSchema, } from './runtime.js';
|
|
4
4
|
const Empty = z.object({});
|
|
5
5
|
/**
|
|
@@ -25,6 +25,7 @@ export const SIDECAR_METHODS = {
|
|
|
25
25
|
...STT_METHODS,
|
|
26
26
|
...CRON_METHODS,
|
|
27
27
|
...PROVIDERS_METHODS,
|
|
28
|
+
...OAUTH_METHODS,
|
|
28
29
|
...AUX_METHODS,
|
|
29
30
|
...TEXT_METHODS,
|
|
30
31
|
...PROCESS_METHODS,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"methods.js","sourceRoot":"","sources":["../../src/sidecar/methods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EACL,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,gBAAgB,EAC3I,iBAAiB,EAAE,cAAc,EAAE,gBAAgB,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,YAAY,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"methods.js","sourceRoot":"","sources":["../../src/sidecar/methods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EACL,WAAW,EAAE,gBAAgB,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,gBAAgB,EAC3I,iBAAiB,EAAE,cAAc,EAAE,gBAAgB,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,YAAY,EAAE,cAAc,GAC7J,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,cAAc,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,qBAAqB,EAC3G,gCAAgC,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,2BAA2B,GACpH,MAAM,cAAc,CAAA;AAErB,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;AAE1B;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,YAAY,EAAE,EAAE,MAAM,EAAE,qBAAqB,EAAE,MAAM,EAAE,qBAAqB,EAAE;IAC9E,aAAa,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,sBAAsB,EAAE;IAChE,mBAAmB,EAAE,EAAE,MAAM,EAAE,4BAA4B,EAAE,MAAM,EAAE,qBAAqB,EAAE;IAC5F,gBAAgB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,qBAAqB,EAAE;IAClE,wBAAwB,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,gCAAgC,EAAE;IACrF,kBAAkB,EAAE,EAAE,MAAM,EAAE,2BAA2B,EAAE,MAAM,EAAE,cAAc,EAAE;IACnF,aAAa,EAAE,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,EAAE,cAAc,EAAE;IACzE,GAAG,aAAa;IAChB,GAAG,gBAAgB;IACnB,GAAG,cAAc;IACjB,GAAG,gBAAgB;IACnB,GAAG,gBAAgB;IACnB,GAAG,cAAc;IACjB,GAAG,WAAW;IACd,GAAG,WAAW;IACd,GAAG,YAAY;IACf,GAAG,iBAAiB;IACpB,GAAG,aAAa;IAChB,GAAG,WAAW;IACd,GAAG,YAAY;IACf,GAAG,eAAe;IAClB,GAAG,aAAa;IAChB,GAAG,eAAe;IAClB,GAAG,gBAAgB;IACnB,GAAG,cAAc;IACjB,GAAG,YAAY;CACP,CAAA;AAQV,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,IAAI,CAAC,eAAe,CAAwB,CAAA"}
|
|
@@ -176,11 +176,22 @@ export declare const CommandSchema: z.ZodObject<{
|
|
|
176
176
|
cli_only: z.ZodBoolean;
|
|
177
177
|
gateway_only: z.ZodBoolean;
|
|
178
178
|
}, z.core.$strip>;
|
|
179
|
+
/**
|
|
180
|
+
* A model-provider plugin installed and enabled in the profile (TAL-288); bundled providers are built-ins. `setup` is the Agent's
|
|
181
|
+
* own verdict without spawning the plugin's CLI: `not_loaded` means the installed plugin could not be loaded (import failure, or its
|
|
182
|
+
* provider id or directory name is taken by another profile's plugin in this process-wide registry).
|
|
183
|
+
*/
|
|
179
184
|
export declare const PluginProviderSchema: z.ZodObject<{
|
|
180
185
|
name: z.ZodString;
|
|
181
186
|
display_name: z.ZodString;
|
|
182
|
-
|
|
183
|
-
|
|
187
|
+
auth_type: z.ZodString;
|
|
188
|
+
setup: z.ZodEnum<{
|
|
189
|
+
ready: "ready";
|
|
190
|
+
missing_cli: "missing_cli";
|
|
191
|
+
needs_setup: "needs_setup";
|
|
192
|
+
not_loaded: "not_loaded";
|
|
193
|
+
unavailable: "unavailable";
|
|
194
|
+
}>;
|
|
184
195
|
}, z.core.$strip>;
|
|
185
196
|
export declare const COMMANDS_METHODS: {
|
|
186
197
|
readonly 'commands.registry': {
|
|
@@ -230,8 +241,14 @@ export declare const COMMANDS_METHODS: {
|
|
|
230
241
|
providers: z.ZodArray<z.ZodObject<{
|
|
231
242
|
name: z.ZodString;
|
|
232
243
|
display_name: z.ZodString;
|
|
233
|
-
|
|
234
|
-
|
|
244
|
+
auth_type: z.ZodString;
|
|
245
|
+
setup: z.ZodEnum<{
|
|
246
|
+
ready: "ready";
|
|
247
|
+
missing_cli: "missing_cli";
|
|
248
|
+
needs_setup: "needs_setup";
|
|
249
|
+
not_loaded: "not_loaded";
|
|
250
|
+
unavailable: "unavailable";
|
|
251
|
+
}>;
|
|
235
252
|
}, z.core.$strip>>;
|
|
236
253
|
}, z.core.$strip>;
|
|
237
254
|
};
|
|
@@ -1232,6 +1249,75 @@ export declare const PROVIDERS_METHODS: {
|
|
|
1232
1249
|
}, z.core.$strip>;
|
|
1233
1250
|
};
|
|
1234
1251
|
};
|
|
1252
|
+
/**
|
|
1253
|
+
* TAL-398: an Agent device-code sign-in (Nous Portal, OpenAI Codex, xAI, MiniMax) the sidecar runs for one profile home.
|
|
1254
|
+
* `oauth.start` answers the code to show; a sidecar thread polls the provider and writes the credential through the
|
|
1255
|
+
* Agent's own auth store. A flow belongs to the profile home that started it: poll and cancel from another home do not
|
|
1256
|
+
* find it. `error` is the Agent's reason for a flow that ended without a credential.
|
|
1257
|
+
*/
|
|
1258
|
+
export declare const OAuthFlowStatusSchema: z.ZodEnum<{
|
|
1259
|
+
error: "error";
|
|
1260
|
+
cancelled: "cancelled";
|
|
1261
|
+
pending: "pending";
|
|
1262
|
+
approved: "approved";
|
|
1263
|
+
denied: "denied";
|
|
1264
|
+
expired: "expired";
|
|
1265
|
+
}>;
|
|
1266
|
+
export declare const OAUTH_METHODS: {
|
|
1267
|
+
readonly 'oauth.start': {
|
|
1268
|
+
readonly params: z.ZodObject<{
|
|
1269
|
+
profile_home: z.ZodString;
|
|
1270
|
+
provider: z.ZodString;
|
|
1271
|
+
}, z.core.$strip>;
|
|
1272
|
+
readonly result: z.ZodObject<{
|
|
1273
|
+
flow_id: z.ZodString;
|
|
1274
|
+
provider: z.ZodString;
|
|
1275
|
+
status: z.ZodLiteral<"pending">;
|
|
1276
|
+
user_code: z.ZodString;
|
|
1277
|
+
verification_url: z.ZodString;
|
|
1278
|
+
expires_in: z.ZodNumber;
|
|
1279
|
+
interval: z.ZodNumber;
|
|
1280
|
+
}, z.core.$strip>;
|
|
1281
|
+
};
|
|
1282
|
+
readonly 'oauth.poll': {
|
|
1283
|
+
readonly params: z.ZodObject<{
|
|
1284
|
+
profile_home: z.ZodString;
|
|
1285
|
+
flow_id: z.ZodString;
|
|
1286
|
+
}, z.core.$strip>;
|
|
1287
|
+
readonly result: z.ZodObject<{
|
|
1288
|
+
flow_id: z.ZodString;
|
|
1289
|
+
provider: z.ZodString;
|
|
1290
|
+
status: z.ZodEnum<{
|
|
1291
|
+
error: "error";
|
|
1292
|
+
cancelled: "cancelled";
|
|
1293
|
+
pending: "pending";
|
|
1294
|
+
approved: "approved";
|
|
1295
|
+
denied: "denied";
|
|
1296
|
+
expired: "expired";
|
|
1297
|
+
}>;
|
|
1298
|
+
error: z.ZodNullable<z.ZodString>;
|
|
1299
|
+
}, z.core.$strip>;
|
|
1300
|
+
};
|
|
1301
|
+
readonly 'oauth.cancel': {
|
|
1302
|
+
readonly params: z.ZodObject<{
|
|
1303
|
+
profile_home: z.ZodString;
|
|
1304
|
+
flow_id: z.ZodString;
|
|
1305
|
+
}, z.core.$strip>;
|
|
1306
|
+
readonly result: z.ZodObject<{
|
|
1307
|
+
flow_id: z.ZodString;
|
|
1308
|
+
provider: z.ZodString;
|
|
1309
|
+
status: z.ZodEnum<{
|
|
1310
|
+
error: "error";
|
|
1311
|
+
cancelled: "cancelled";
|
|
1312
|
+
pending: "pending";
|
|
1313
|
+
approved: "approved";
|
|
1314
|
+
denied: "denied";
|
|
1315
|
+
expired: "expired";
|
|
1316
|
+
}>;
|
|
1317
|
+
error: z.ZodNullable<z.ZodString>;
|
|
1318
|
+
}, z.core.$strip>;
|
|
1319
|
+
};
|
|
1320
|
+
};
|
|
1235
1321
|
export declare const AuxUsageSchema: z.ZodObject<{
|
|
1236
1322
|
prompt_tokens: z.ZodOptional<z.ZodNumber>;
|
|
1237
1323
|
completion_tokens: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1278,15 +1364,6 @@ export declare const AUX_METHODS: {
|
|
|
1278
1364
|
};
|
|
1279
1365
|
};
|
|
1280
1366
|
export declare const TEXT_METHODS: {
|
|
1281
|
-
readonly 'text.redact': {
|
|
1282
|
-
readonly params: z.ZodObject<{
|
|
1283
|
-
text: z.ZodString;
|
|
1284
|
-
force: z.ZodOptional<z.ZodBoolean>;
|
|
1285
|
-
}, z.core.$strip>;
|
|
1286
|
-
readonly result: z.ZodObject<{
|
|
1287
|
-
text: z.ZodString;
|
|
1288
|
-
}, z.core.$strip>;
|
|
1289
|
-
};
|
|
1290
1367
|
readonly 'text.image_mode': {
|
|
1291
1368
|
readonly params: z.ZodObject<{
|
|
1292
1369
|
profile_home: z.ZodString;
|
|
@@ -1541,6 +1618,7 @@ export declare const ChatUsageSchema: z.ZodObject<{
|
|
|
1541
1618
|
cache_write_tokens: z.ZodNumber;
|
|
1542
1619
|
estimated_cost_usd: z.ZodNullable<z.ZodNumber>;
|
|
1543
1620
|
}, z.core.$strip>;
|
|
1621
|
+
/** `failed`, `partial`, and `compression_exhausted` are the Agent's own turn-result flags, forwarded as sent; `failed` also sets `status: 'error'`. */
|
|
1544
1622
|
export declare const ChatStartResultSchema: z.ZodObject<{
|
|
1545
1623
|
status: z.ZodEnum<{
|
|
1546
1624
|
error: "error";
|
|
@@ -1550,7 +1628,9 @@ export declare const ChatStartResultSchema: z.ZodObject<{
|
|
|
1550
1628
|
messages: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1551
1629
|
final_response: z.ZodString;
|
|
1552
1630
|
error: z.ZodNullable<z.ZodString>;
|
|
1553
|
-
|
|
1631
|
+
failed: z.ZodBoolean;
|
|
1632
|
+
partial: z.ZodBoolean;
|
|
1633
|
+
compression_exhausted: z.ZodBoolean;
|
|
1554
1634
|
tool_limit_reached: z.ZodBoolean;
|
|
1555
1635
|
usage: z.ZodObject<{
|
|
1556
1636
|
prompt_tokens: z.ZodNumber;
|
|
@@ -1617,6 +1697,13 @@ export declare const ChatStreamSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1617
1697
|
}, z.core.$strip>, z.ZodObject<{
|
|
1618
1698
|
event: z.ZodLiteral<"clarify_resolved">;
|
|
1619
1699
|
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1700
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1701
|
+
event: z.ZodLiteral<"approval_resolved">;
|
|
1702
|
+
data: z.ZodObject<{
|
|
1703
|
+
approval_id: z.ZodString;
|
|
1704
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
1705
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1706
|
+
}, z.core.$loose>;
|
|
1620
1707
|
}, z.core.$strip>, z.ZodObject<{
|
|
1621
1708
|
event: z.ZodLiteral<"compressing">;
|
|
1622
1709
|
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
@@ -1658,7 +1745,9 @@ export declare const CHAT_METHODS: {
|
|
|
1658
1745
|
messages: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1659
1746
|
final_response: z.ZodString;
|
|
1660
1747
|
error: z.ZodNullable<z.ZodString>;
|
|
1661
|
-
|
|
1748
|
+
failed: z.ZodBoolean;
|
|
1749
|
+
partial: z.ZodBoolean;
|
|
1750
|
+
compression_exhausted: z.ZodBoolean;
|
|
1662
1751
|
tool_limit_reached: z.ZodBoolean;
|
|
1663
1752
|
usage: z.ZodObject<{
|
|
1664
1753
|
prompt_tokens: z.ZodNumber;
|
|
@@ -1725,6 +1814,13 @@ export declare const CHAT_METHODS: {
|
|
|
1725
1814
|
}, z.core.$strip>, z.ZodObject<{
|
|
1726
1815
|
event: z.ZodLiteral<"clarify_resolved">;
|
|
1727
1816
|
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1817
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1818
|
+
event: z.ZodLiteral<"approval_resolved">;
|
|
1819
|
+
data: z.ZodObject<{
|
|
1820
|
+
approval_id: z.ZodString;
|
|
1821
|
+
session_id: z.ZodOptional<z.ZodString>;
|
|
1822
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1823
|
+
}, z.core.$loose>;
|
|
1728
1824
|
}, z.core.$strip>, z.ZodObject<{
|
|
1729
1825
|
event: z.ZodLiteral<"compressing">;
|
|
1730
1826
|
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
@@ -1850,6 +1946,7 @@ export declare const CHAT_METHODS: {
|
|
|
1850
1946
|
readonly 'chat.evict_agent': {
|
|
1851
1947
|
readonly params: z.ZodObject<{
|
|
1852
1948
|
session_id: z.ZodString;
|
|
1949
|
+
clear_session: z.ZodOptional<z.ZodBoolean>;
|
|
1853
1950
|
}, z.core.$strip>;
|
|
1854
1951
|
readonly result: z.ZodObject<{
|
|
1855
1952
|
evicted: z.ZodBoolean;
|
|
@@ -32,7 +32,12 @@ export const CommandSchema = z.object({
|
|
|
32
32
|
name: z.string(), description: z.string(), category: z.string(), aliases: z.array(z.string()), args_hint: z.string(), subcommands: z.array(z.string()),
|
|
33
33
|
cli_only: z.boolean(), gateway_only: z.boolean(),
|
|
34
34
|
});
|
|
35
|
-
|
|
35
|
+
/**
|
|
36
|
+
* A model-provider plugin installed and enabled in the profile (TAL-288); bundled providers are built-ins. `setup` is the Agent's
|
|
37
|
+
* own verdict without spawning the plugin's CLI: `not_loaded` means the installed plugin could not be loaded (import failure, or its
|
|
38
|
+
* provider id or directory name is taken by another profile's plugin in this process-wide registry).
|
|
39
|
+
*/
|
|
40
|
+
export const PluginProviderSchema = z.object({ name: z.string(), display_name: z.string(), auth_type: z.string(), setup: z.enum(['ready', 'missing_cli', 'needs_setup', 'not_loaded', 'unavailable']) });
|
|
36
41
|
export const COMMANDS_METHODS = {
|
|
37
42
|
'commands.registry': { params: ProfileHomeParams, result: z.object({ commands: z.array(CommandSchema) }) },
|
|
38
43
|
'commands.exec': { params: ProfileHomeParams.extend({ command: z.string().min(1) }), result: z.object({ output: z.string(), source: z.enum(['agent', 'plugin']) }) },
|
|
@@ -155,6 +160,21 @@ export const PROVIDERS_METHODS = {
|
|
|
155
160
|
'models.estimate_tokens': { params: z.object({ messages: z.array(Loose) }), result: z.object({ tokens: z.number().int() }) },
|
|
156
161
|
'models.capabilities': { params: ProfileHomeParams.extend({ provider: z.string(), model: z.string() }), result: z.object({ capabilities: Loose.nullable() }) },
|
|
157
162
|
};
|
|
163
|
+
// ── oauth ──────────────────────────────────────────────────────────────
|
|
164
|
+
/**
|
|
165
|
+
* TAL-398: an Agent device-code sign-in (Nous Portal, OpenAI Codex, xAI, MiniMax) the sidecar runs for one profile home.
|
|
166
|
+
* `oauth.start` answers the code to show; a sidecar thread polls the provider and writes the credential through the
|
|
167
|
+
* Agent's own auth store. A flow belongs to the profile home that started it: poll and cancel from another home do not
|
|
168
|
+
* find it. `error` is the Agent's reason for a flow that ended without a credential.
|
|
169
|
+
*/
|
|
170
|
+
export const OAuthFlowStatusSchema = z.enum(['pending', 'approved', 'denied', 'expired', 'cancelled', 'error']);
|
|
171
|
+
const OAuthFlow = z.object({ flow_id: z.string(), provider: z.string(), status: OAuthFlowStatusSchema, error: z.string().nullable() });
|
|
172
|
+
const OAuthFlowParams = ProfileHomeParams.extend({ flow_id: z.string().min(1) });
|
|
173
|
+
export const OAUTH_METHODS = {
|
|
174
|
+
'oauth.start': { params: ProfileHomeParams.extend({ provider: z.string().min(1) }), result: z.object({ flow_id: z.string(), provider: z.string(), status: z.literal('pending'), user_code: z.string(), verification_url: z.string(), expires_in: z.number().int(), interval: z.number().int() }) },
|
|
175
|
+
'oauth.poll': { params: OAuthFlowParams, result: OAuthFlow },
|
|
176
|
+
'oauth.cancel': { params: OAuthFlowParams, result: OAuthFlow },
|
|
177
|
+
};
|
|
158
178
|
// ── aux / text / process / usage / gateway ─────────────────────────────
|
|
159
179
|
export const AuxUsageSchema = z.object({ prompt_tokens: z.number().int().optional(), completion_tokens: z.number().int().optional(), total_tokens: z.number().int().optional() });
|
|
160
180
|
export const AUX_METHODS = {
|
|
@@ -162,7 +182,6 @@ export const AUX_METHODS = {
|
|
|
162
182
|
'aux.resolve': { params: ProfileHomeParams.extend({ task: z.string().min(1), main_runtime: Loose.nullable().optional() }), result: z.object({ configured: z.boolean(), model: z.string().nullable(), error: z.string().optional() }) },
|
|
163
183
|
};
|
|
164
184
|
export const TEXT_METHODS = {
|
|
165
|
-
'text.redact': { params: z.object({ text: z.string(), force: z.boolean().optional() }), result: z.object({ text: z.string() }) },
|
|
166
185
|
'text.image_mode': { params: ProfileHomeParams.extend({ provider: z.string(), model: z.string(), cfg: Loose.nullable().optional(), requested_provider: z.string().optional() }), result: z.object({ mode: z.enum(['native', 'text']), reason: z.string(), supports_vision: z.boolean().nullable() }) },
|
|
167
186
|
'text.portal_tags': { params: ProfileHomeParams, result: z.object({ client_tag: z.string().nullable(), conversation_tag: z.string().nullable(), tags: z.union([z.array(z.string()), Loose]) }) },
|
|
168
187
|
};
|
|
@@ -212,8 +231,10 @@ export const WORKTREE_METHODS = {
|
|
|
212
231
|
};
|
|
213
232
|
// ── chat / approval / clarify ──────────────────────────────────────────
|
|
214
233
|
export const ChatUsageSchema = z.object({ prompt_tokens: z.number().int(), completion_tokens: z.number().int(), cache_read_tokens: z.number().int(), cache_write_tokens: z.number().int(), estimated_cost_usd: z.number().nullable() });
|
|
234
|
+
/** `failed`, `partial`, and `compression_exhausted` are the Agent's own turn-result flags, forwarded as sent; `failed` also sets `status: 'error'`. */
|
|
215
235
|
export const ChatStartResultSchema = z.object({
|
|
216
|
-
status: z.enum(['completed', 'cancelled', 'error']), messages: z.array(Loose), final_response: z.string(), error: z.string().nullable(),
|
|
236
|
+
status: z.enum(['completed', 'cancelled', 'error']), messages: z.array(Loose), final_response: z.string(), error: z.string().nullable(),
|
|
237
|
+
failed: z.boolean(), partial: z.boolean(), compression_exhausted: z.boolean(),
|
|
217
238
|
tool_limit_reached: z.boolean(), usage: ChatUsageSchema, context: Loose, model: z.string(), provider: z.string(), compressed: z.boolean(), agent_session_id: z.string(),
|
|
218
239
|
token_sent: z.boolean(), pending_steer: z.string(), live_tool_calls: z.array(Loose),
|
|
219
240
|
});
|
|
@@ -234,6 +255,8 @@ export const ChatStreamSchema = z.discriminatedUnion('event', [
|
|
|
234
255
|
z.object({ event: z.literal('approval'), data: Loose }),
|
|
235
256
|
z.object({ event: z.literal('clarify'), data: Loose }),
|
|
236
257
|
z.object({ event: z.literal('clarify_resolved'), data: Loose }),
|
|
258
|
+
/** The Agent stopped waiting on an approval: `reason` is its settle cause (`resolved`, `timeout`, `interrupted`, `session_closed`). */
|
|
259
|
+
z.object({ event: z.literal('approval_resolved'), data: z.looseObject({ approval_id: z.string(), session_id: z.string().optional(), reason: z.string().optional() }) }),
|
|
237
260
|
z.object({ event: z.literal('compressing'), data: Loose }),
|
|
238
261
|
z.object({ event: z.literal('warning'), data: Loose }),
|
|
239
262
|
z.object({ event: z.literal('status'), data: Loose }),
|
|
@@ -291,7 +314,7 @@ export const CHAT_METHODS = {
|
|
|
291
314
|
},
|
|
292
315
|
/** TAL-255: second phase of `chat.compress`; `finalized: false` when the token is unknown or already expired. */
|
|
293
316
|
'chat.compress_finalize': { params: z.object({ commit_token: z.string().min(1), committed: z.boolean() }), result: z.object({ finalized: z.boolean() }) },
|
|
294
|
-
'chat.evict_agent': { params: z.object({ session_id: z.string().min(1) }), result: z.object({ evicted: z.boolean() }) },
|
|
317
|
+
'chat.evict_agent': { params: z.object({ session_id: z.string().min(1), clear_session: z.boolean().optional() }), result: z.object({ evicted: z.boolean() }) },
|
|
295
318
|
'chat.commit_memory': { params: z.object({ session_id: z.string().min(1) }), result: z.object({ committed: z.boolean() }) },
|
|
296
319
|
'approval.respond': { params: ProfileHomeParams.extend({ session_id: z.string().min(1), choice: z.enum(['once', 'session', 'always', 'deny']), request_id: z.string().nullable().optional() }), result: z.object({ ok: z.boolean(), resolved: z.number().int(), choice: z.string() }) },
|
|
297
320
|
'approval.pending': { params: z.object({ session_id: z.string().min(1) }), result: z.object({ pending: z.array(Loose) }) },
|