@adecore/agent-contracts 0.29.3 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent.d.ts +8 -22
- package/dist/agent.js +16 -3
- package/dist/chat.d.ts +17 -119
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/model.d.ts +7 -14
- package/dist/model.js +3 -0
- package/dist/protocol.d.ts +24 -161
- package/dist/provider-accounts.d.ts +3 -21
- package/package.json +2 -2
- package/src/agent.ts +21 -4
- package/src/index.ts +4 -0
- package/src/model.ts +3 -0
package/dist/agent.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}>;
|
|
9
|
-
export type AgentKind = z.infer<typeof AgentKindSchema>;
|
|
2
|
+
export declare const KNOWN_AGENT_KINDS: readonly ['claude', 'codex', 'gemini', 'copilot', 'apple'];
|
|
3
|
+
export type KnownAgentKind = (typeof KNOWN_AGENT_KINDS)[number];
|
|
4
|
+
export declare const AGENT_KIND_MAX_LENGTH = 32;
|
|
5
|
+
export declare const AgentKindSchema: z.ZodString;
|
|
6
|
+
export type AgentKind = KnownAgentKind | (string & {});
|
|
7
|
+
export declare function isKnownAgentKind(kind: string): kind is KnownAgentKind;
|
|
10
8
|
export declare const AgentStatusSchema: z.ZodEnum<{
|
|
11
9
|
error: "error";
|
|
12
10
|
exited: "exited";
|
|
@@ -31,13 +29,7 @@ export declare const AgentRequestSchema: z.ZodObject<{
|
|
|
31
29
|
}, z.core.$strip>;
|
|
32
30
|
export type AgentRequest = z.infer<typeof AgentRequestSchema>;
|
|
33
31
|
export declare const AgentInfoSchema: z.ZodObject<{
|
|
34
|
-
kind: z.
|
|
35
|
-
apple: "apple";
|
|
36
|
-
claude: "claude";
|
|
37
|
-
codex: "codex";
|
|
38
|
-
copilot: "copilot";
|
|
39
|
-
gemini: "gemini";
|
|
40
|
-
}>;
|
|
32
|
+
kind: z.ZodString;
|
|
41
33
|
agentSessionId: z.ZodString;
|
|
42
34
|
transcriptPath: z.ZodNullable<z.ZodString>;
|
|
43
35
|
suggestedTitle: z.ZodOptional<z.ZodString>;
|
|
@@ -67,13 +59,7 @@ export type AgentInfo = z.infer<typeof AgentInfoSchema>;
|
|
|
67
59
|
export declare const SessionStatusEventSchema: z.ZodObject<{
|
|
68
60
|
sessionId: z.ZodString;
|
|
69
61
|
agent: z.ZodNullable<z.ZodObject<{
|
|
70
|
-
kind: z.
|
|
71
|
-
apple: "apple";
|
|
72
|
-
claude: "claude";
|
|
73
|
-
codex: "codex";
|
|
74
|
-
copilot: "copilot";
|
|
75
|
-
gemini: "gemini";
|
|
76
|
-
}>;
|
|
62
|
+
kind: z.ZodString;
|
|
77
63
|
agentSessionId: z.ZodString;
|
|
78
64
|
transcriptPath: z.ZodNullable<z.ZodString>;
|
|
79
65
|
suggestedTitle: z.ZodOptional<z.ZodString>;
|
package/dist/agent.js
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { SessionIdSchema } from './ids.js';
|
|
3
|
-
// The
|
|
4
|
-
// on its provider, not a second list: a CLI without hooks still opens as a terminal agent.
|
|
5
|
-
export const
|
|
3
|
+
// The agent CLIs this version knows by name. Whether one has a chat backend or a hook normalizer is a
|
|
4
|
+
// capability on its provider, not a second list: a CLI without hooks still opens as a terminal agent.
|
|
5
|
+
export const KNOWN_AGENT_KINDS = ['claude', 'codex', 'gemini', 'copilot', 'apple'];
|
|
6
|
+
export const AGENT_KIND_MAX_LENGTH = 32;
|
|
7
|
+
/*
|
|
8
|
+
* Open, so a host can offer a CLI this version never heard of and an older client still reads a reply
|
|
9
|
+
* that names it. Bounded to an identifier, since a kind ends up in ids, paths and command lines.
|
|
10
|
+
*/
|
|
11
|
+
export const AgentKindSchema = z
|
|
12
|
+
.string()
|
|
13
|
+
.min(1)
|
|
14
|
+
.max(AGENT_KIND_MAX_LENGTH)
|
|
15
|
+
.regex(/^[a-z][a-z0-9-]*$/);
|
|
16
|
+
export function isKnownAgentKind(kind) {
|
|
17
|
+
return KNOWN_AGENT_KINDS.includes(kind);
|
|
18
|
+
}
|
|
6
19
|
// `exited` is the daemon's own reading, not a hook's: the CLI went down with its shell without
|
|
7
20
|
// ever reporting an end, so the node offers a resume instead of a status that stays on running.
|
|
8
21
|
export const AgentStatusSchema = z.enum(['running', 'needs-you', 'idle', 'error', 'exited']);
|
package/dist/chat.d.ts
CHANGED
|
@@ -242,13 +242,7 @@ export declare const ChatRequestSummarySchema: z.ZodObject<{
|
|
|
242
242
|
export type ChatRequestSummary = z.infer<typeof ChatRequestSummarySchema>;
|
|
243
243
|
export declare const ChatInfoSchema: z.ZodObject<{
|
|
244
244
|
chatId: z.ZodString;
|
|
245
|
-
provider: z.
|
|
246
|
-
apple: "apple";
|
|
247
|
-
claude: "claude";
|
|
248
|
-
codex: "codex";
|
|
249
|
-
copilot: "copilot";
|
|
250
|
-
gemini: "gemini";
|
|
251
|
-
}>;
|
|
245
|
+
provider: z.ZodString;
|
|
252
246
|
account: z.ZodOptional<z.ZodString>;
|
|
253
247
|
cwd: z.ZodString;
|
|
254
248
|
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
@@ -1808,13 +1802,7 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1808
1802
|
type: z.ZodLiteral<"info">;
|
|
1809
1803
|
info: z.ZodObject<{
|
|
1810
1804
|
chatId: z.ZodString;
|
|
1811
|
-
provider: z.
|
|
1812
|
-
apple: "apple";
|
|
1813
|
-
claude: "claude";
|
|
1814
|
-
codex: "codex";
|
|
1815
|
-
copilot: "copilot";
|
|
1816
|
-
gemini: "gemini";
|
|
1817
|
-
}>;
|
|
1805
|
+
provider: z.ZodString;
|
|
1818
1806
|
account: z.ZodOptional<z.ZodString>;
|
|
1819
1807
|
cwd: z.ZodString;
|
|
1820
1808
|
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
@@ -1978,13 +1966,7 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1978
1966
|
type: z.ZodLiteral<"reset">;
|
|
1979
1967
|
info: z.ZodObject<{
|
|
1980
1968
|
chatId: z.ZodString;
|
|
1981
|
-
provider: z.
|
|
1982
|
-
apple: "apple";
|
|
1983
|
-
claude: "claude";
|
|
1984
|
-
codex: "codex";
|
|
1985
|
-
copilot: "copilot";
|
|
1986
|
-
gemini: "gemini";
|
|
1987
|
-
}>;
|
|
1969
|
+
provider: z.ZodString;
|
|
1988
1970
|
account: z.ZodOptional<z.ZodString>;
|
|
1989
1971
|
cwd: z.ZodString;
|
|
1990
1972
|
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
@@ -2895,13 +2877,7 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
|
|
|
2895
2877
|
type: z.ZodLiteral<"info">;
|
|
2896
2878
|
info: z.ZodObject<{
|
|
2897
2879
|
chatId: z.ZodString;
|
|
2898
|
-
provider: z.
|
|
2899
|
-
apple: "apple";
|
|
2900
|
-
claude: "claude";
|
|
2901
|
-
codex: "codex";
|
|
2902
|
-
copilot: "copilot";
|
|
2903
|
-
gemini: "gemini";
|
|
2904
|
-
}>;
|
|
2880
|
+
provider: z.ZodString;
|
|
2905
2881
|
account: z.ZodOptional<z.ZodString>;
|
|
2906
2882
|
cwd: z.ZodString;
|
|
2907
2883
|
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
@@ -3065,13 +3041,7 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
|
|
|
3065
3041
|
type: z.ZodLiteral<"reset">;
|
|
3066
3042
|
info: z.ZodObject<{
|
|
3067
3043
|
chatId: z.ZodString;
|
|
3068
|
-
provider: z.
|
|
3069
|
-
apple: "apple";
|
|
3070
|
-
claude: "claude";
|
|
3071
|
-
codex: "codex";
|
|
3072
|
-
copilot: "copilot";
|
|
3073
|
-
gemini: "gemini";
|
|
3074
|
-
}>;
|
|
3044
|
+
provider: z.ZodString;
|
|
3075
3045
|
account: z.ZodOptional<z.ZodString>;
|
|
3076
3046
|
cwd: z.ZodString;
|
|
3077
3047
|
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
@@ -3574,13 +3544,7 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
|
|
|
3574
3544
|
export type ChatEventEnvelope = z.infer<typeof ChatEventEnvelopeSchema>;
|
|
3575
3545
|
export declare const ChatCreatePayloadSchema: z.ZodObject<{
|
|
3576
3546
|
chatId: z.ZodString;
|
|
3577
|
-
provider: z.ZodOptional<z.
|
|
3578
|
-
apple: "apple";
|
|
3579
|
-
claude: "claude";
|
|
3580
|
-
codex: "codex";
|
|
3581
|
-
copilot: "copilot";
|
|
3582
|
-
gemini: "gemini";
|
|
3583
|
-
}>>;
|
|
3547
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
3584
3548
|
account: z.ZodOptional<z.ZodString>;
|
|
3585
3549
|
cwd: z.ZodOptional<z.ZodString>;
|
|
3586
3550
|
resume: z.ZodOptional<z.ZodString>;
|
|
@@ -3625,23 +3589,11 @@ export declare const ChatPreferencesPayloadSchema: z.ZodObject<{
|
|
|
3625
3589
|
"full-access": "full-access";
|
|
3626
3590
|
supervised: "supervised";
|
|
3627
3591
|
}>>;
|
|
3628
|
-
selections: z.ZodOptional<z.ZodRecord<z.
|
|
3629
|
-
apple: "apple";
|
|
3630
|
-
claude: "claude";
|
|
3631
|
-
codex: "codex";
|
|
3632
|
-
copilot: "copilot";
|
|
3633
|
-
gemini: "gemini";
|
|
3634
|
-
}> & z.core.$partial, z.ZodObject<{
|
|
3592
|
+
selections: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodObject<{
|
|
3635
3593
|
model: z.ZodString;
|
|
3636
3594
|
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
3637
3595
|
}, z.core.$strip>>>;
|
|
3638
|
-
accounts: z.ZodOptional<z.ZodRecord<z.
|
|
3639
|
-
apple: "apple";
|
|
3640
|
-
claude: "claude";
|
|
3641
|
-
codex: "codex";
|
|
3642
|
-
copilot: "copilot";
|
|
3643
|
-
gemini: "gemini";
|
|
3644
|
-
}> & z.core.$partial, z.ZodString>>;
|
|
3596
|
+
accounts: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodString>>;
|
|
3645
3597
|
changedAt: z.ZodOptional<z.ZodNumber>;
|
|
3646
3598
|
}, z.core.$strip>;
|
|
3647
3599
|
export type ChatPreferencesPayload = z.infer<typeof ChatPreferencesPayloadSchema>;
|
|
@@ -4453,13 +4405,7 @@ export declare const ChatSubagentResultSchema: z.ZodObject<{
|
|
|
4453
4405
|
"codex-thread": "codex-thread";
|
|
4454
4406
|
}>;
|
|
4455
4407
|
context: z.ZodOptional<z.ZodObject<{
|
|
4456
|
-
provider: z.
|
|
4457
|
-
apple: "apple";
|
|
4458
|
-
claude: "claude";
|
|
4459
|
-
codex: "codex";
|
|
4460
|
-
copilot: "copilot";
|
|
4461
|
-
gemini: "gemini";
|
|
4462
|
-
}>;
|
|
4408
|
+
provider: z.ZodString;
|
|
4463
4409
|
cwd: z.ZodString;
|
|
4464
4410
|
chatId: z.ZodOptional<z.ZodString>;
|
|
4465
4411
|
}, z.core.$strip>>;
|
|
@@ -4470,13 +4416,7 @@ export declare const ChatStatusEventSchema: z.ZodObject<{
|
|
|
4470
4416
|
chatId: z.ZodString;
|
|
4471
4417
|
info: z.ZodObject<{
|
|
4472
4418
|
chatId: z.ZodString;
|
|
4473
|
-
provider: z.
|
|
4474
|
-
apple: "apple";
|
|
4475
|
-
claude: "claude";
|
|
4476
|
-
codex: "codex";
|
|
4477
|
-
copilot: "copilot";
|
|
4478
|
-
gemini: "gemini";
|
|
4479
|
-
}>;
|
|
4419
|
+
provider: z.ZodString;
|
|
4480
4420
|
account: z.ZodOptional<z.ZodString>;
|
|
4481
4421
|
cwd: z.ZodString;
|
|
4482
4422
|
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
@@ -4738,13 +4678,7 @@ export type ChatVisualsEvent = z.infer<typeof ChatVisualsEventSchema>;
|
|
|
4738
4678
|
export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
4739
4679
|
info: z.ZodObject<{
|
|
4740
4680
|
chatId: z.ZodString;
|
|
4741
|
-
provider: z.
|
|
4742
|
-
apple: "apple";
|
|
4743
|
-
claude: "claude";
|
|
4744
|
-
codex: "codex";
|
|
4745
|
-
copilot: "copilot";
|
|
4746
|
-
gemini: "gemini";
|
|
4747
|
-
}>;
|
|
4681
|
+
provider: z.ZodString;
|
|
4748
4682
|
account: z.ZodOptional<z.ZodString>;
|
|
4749
4683
|
cwd: z.ZodString;
|
|
4750
4684
|
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
@@ -5993,13 +5927,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
5993
5927
|
type: z.ZodLiteral<"info">;
|
|
5994
5928
|
info: z.ZodObject<{
|
|
5995
5929
|
chatId: z.ZodString;
|
|
5996
|
-
provider: z.
|
|
5997
|
-
apple: "apple";
|
|
5998
|
-
claude: "claude";
|
|
5999
|
-
codex: "codex";
|
|
6000
|
-
copilot: "copilot";
|
|
6001
|
-
gemini: "gemini";
|
|
6002
|
-
}>;
|
|
5930
|
+
provider: z.ZodString;
|
|
6003
5931
|
account: z.ZodOptional<z.ZodString>;
|
|
6004
5932
|
cwd: z.ZodString;
|
|
6005
5933
|
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
@@ -6163,13 +6091,7 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
6163
6091
|
type: z.ZodLiteral<"reset">;
|
|
6164
6092
|
info: z.ZodObject<{
|
|
6165
6093
|
chatId: z.ZodString;
|
|
6166
|
-
provider: z.
|
|
6167
|
-
apple: "apple";
|
|
6168
|
-
claude: "claude";
|
|
6169
|
-
codex: "codex";
|
|
6170
|
-
copilot: "copilot";
|
|
6171
|
-
gemini: "gemini";
|
|
6172
|
-
}>;
|
|
6094
|
+
provider: z.ZodString;
|
|
6173
6095
|
account: z.ZodOptional<z.ZodString>;
|
|
6174
6096
|
cwd: z.ZodString;
|
|
6175
6097
|
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
@@ -6885,13 +6807,7 @@ export declare const ChatForkPayloadSchema: z.ZodObject<{
|
|
|
6885
6807
|
branch: z.ZodOptional<z.ZodString>;
|
|
6886
6808
|
}, z.core.$strip>>;
|
|
6887
6809
|
filesAfterTurn: z.ZodOptional<z.ZodBoolean>;
|
|
6888
|
-
provider: z.ZodOptional<z.
|
|
6889
|
-
apple: "apple";
|
|
6890
|
-
claude: "claude";
|
|
6891
|
-
codex: "codex";
|
|
6892
|
-
copilot: "copilot";
|
|
6893
|
-
gemini: "gemini";
|
|
6894
|
-
}>>;
|
|
6810
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
6895
6811
|
selection: z.ZodOptional<z.ZodObject<{
|
|
6896
6812
|
model: z.ZodString;
|
|
6897
6813
|
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
@@ -6902,13 +6818,7 @@ export type ChatForkPayload = z.infer<typeof ChatForkPayloadSchema>;
|
|
|
6902
6818
|
export declare const ChatForkResultSchema: z.ZodObject<{
|
|
6903
6819
|
info: z.ZodObject<{
|
|
6904
6820
|
chatId: z.ZodString;
|
|
6905
|
-
provider: z.
|
|
6906
|
-
apple: "apple";
|
|
6907
|
-
claude: "claude";
|
|
6908
|
-
codex: "codex";
|
|
6909
|
-
copilot: "copilot";
|
|
6910
|
-
gemini: "gemini";
|
|
6911
|
-
}>;
|
|
6821
|
+
provider: z.ZodString;
|
|
6912
6822
|
account: z.ZodOptional<z.ZodString>;
|
|
6913
6823
|
cwd: z.ZodString;
|
|
6914
6824
|
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
@@ -7103,13 +7013,7 @@ export declare const ChatContinueOnResultSchema: z.ZodObject<{
|
|
|
7103
7013
|
fork: z.ZodOptional<z.ZodObject<{
|
|
7104
7014
|
info: z.ZodObject<{
|
|
7105
7015
|
chatId: z.ZodString;
|
|
7106
|
-
provider: z.
|
|
7107
|
-
apple: "apple";
|
|
7108
|
-
claude: "claude";
|
|
7109
|
-
codex: "codex";
|
|
7110
|
-
copilot: "copilot";
|
|
7111
|
-
gemini: "gemini";
|
|
7112
|
-
}>;
|
|
7016
|
+
provider: z.ZodString;
|
|
7113
7017
|
account: z.ZodOptional<z.ZodString>;
|
|
7114
7018
|
cwd: z.ZodString;
|
|
7115
7019
|
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
@@ -7318,13 +7222,7 @@ export type ChatForkInfoResult = z.infer<typeof ChatForkInfoResultSchema>;
|
|
|
7318
7222
|
export declare const ChatListResultSchema: z.ZodObject<{
|
|
7319
7223
|
chats: z.ZodArray<z.ZodObject<{
|
|
7320
7224
|
chatId: z.ZodString;
|
|
7321
|
-
provider: z.
|
|
7322
|
-
apple: "apple";
|
|
7323
|
-
claude: "claude";
|
|
7324
|
-
codex: "codex";
|
|
7325
|
-
copilot: "copilot";
|
|
7326
|
-
gemini: "gemini";
|
|
7327
|
-
}>;
|
|
7225
|
+
provider: z.ZodString;
|
|
7328
7226
|
account: z.ZodOptional<z.ZodString>;
|
|
7329
7227
|
cwd: z.ZodString;
|
|
7330
7228
|
agentSessionId: z.ZodNullable<z.ZodString>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { AgentKindSchema, type AgentKind, AgentStatusSchema, type AgentStatus, SUGGESTED_TITLE_LIMIT, SuggestedTitleSchema, AgentRequestSchema, type AgentRequest, AgentInfoSchema, type AgentInfo, SessionStatusEventSchema, type SessionStatusEvent, AgentResumePayloadSchema, type AgentResumePayload, ApprovalChoiceSchema, type ApprovalChoice, ApprovalRequestSchema, type ApprovalRequest, SessionApprovalsEventSchema, type SessionApprovalsEvent, ApprovalAnswerPayloadSchema, type ApprovalAnswerPayload, ApprovalAnswerResultSchema, type ApprovalAnswerResult, ApprovalPreferencePayloadSchema, type ApprovalPreferencePayload } from './agent.ts';
|
|
1
|
+
export { KNOWN_AGENT_KINDS, type KnownAgentKind, AGENT_KIND_MAX_LENGTH, AgentKindSchema, type AgentKind, isKnownAgentKind, AgentStatusSchema, type AgentStatus, SUGGESTED_TITLE_LIMIT, SuggestedTitleSchema, AgentRequestSchema, type AgentRequest, AgentInfoSchema, type AgentInfo, SessionStatusEventSchema, type SessionStatusEvent, AgentResumePayloadSchema, type AgentResumePayload, ApprovalChoiceSchema, type ApprovalChoice, ApprovalRequestSchema, type ApprovalRequest, SessionApprovalsEventSchema, type SessionApprovalsEvent, ApprovalAnswerPayloadSchema, type ApprovalAnswerPayload, ApprovalAnswerResultSchema, type ApprovalAnswerResult, ApprovalPreferencePayloadSchema, type ApprovalPreferencePayload } from './agent.ts';
|
|
2
2
|
export { ChatIdSchema, type ChatId, ChatContextBreakdownSchema, type ChatContextBreakdown, ChatUsageSchema, type ChatUsage, CHAT_ATTACHMENTS_MAX_BYTES, CHAT_ATTACHMENT_MAX_BYTES, CHAT_ATTACHMENTS_MAX_COUNT, attachmentBytes, attachmentImageMime, ChatAttachmentUploadSchema, type ChatAttachmentUpload, ChatAttachmentUploadsSchema, ChatAttachmentSchema, type ChatAttachment, ChatUiChoiceOriginSchema, type ChatUiChoiceOrigin, ChatUiAnswerSchema, type ChatUiAnswer, ChatQuoteSourceSchema, type ChatQuoteSource, ChatQueuedMessageSchema, type ChatQueuedMessage, ChatBackgroundTaskSchema, type ChatBackgroundTask, ChatTurnLimitSchema, type ChatTurnLimit, ChatGoalStatusSchema, type ChatGoalStatus, ChatGoalSchema, type ChatGoal, ChatQuestionSchema, type ChatQuestion, ChatRequestKindSchema, type ChatRequestKind, CHAT_REQUEST_LIMITS, ChatRequestApprovalSchema, type ChatRequestApproval, ChatRequestSummarySchema, type ChatRequestSummary, ChatInfoSchema, type ChatInfo, ChatSkillSourceSchema, type ChatSkillSource, ChatSkillSchema, type ChatSkill, SkillsListPayloadSchema, type SkillsListPayload, SkillsListResultSchema, type SkillsListResult, ChatUserItemSchema, ChatUiQueryReadingSchema, type ChatUiQueryReading, ChatUiLinkReadingSchema, type ChatUiLinkReading, ChatUiPlaceReadingSchema, type ChatUiPlaceReading, ChatUiQueryStateSchema, type ChatUiQueryState, ChatAssistantItemSchema, ChatThinkingItemSchema, ChatToolStateSchema, type ChatToolState, ChatToolProgressSchema, type ChatToolProgress, ChatFileChangeSchema, type ChatFileChange, ChatSubagentStatusSchema, type ChatSubagentStatus, ChatWorkflowPhaseSchema, type ChatWorkflowPhase, ChatWorkflowAgentSchema, type ChatWorkflowAgent, ChatWorkflowSchema, type ChatWorkflow, workflowAgentRef, workflowAgentIdOf, ChatToolItemSchema, ChatSubagentUsageSchema, type ChatSubagentUsage, HOST_TASK_ORIGIN, ChatSubagentItemSchema, ChatApprovalDecisionSchema, type ChatApprovalDecision, ChatApprovalItemSchema, ChatQuestionItemSchema, ChatCheckpointFileSchema, type ChatCheckpointFile, ChatCheckpointDiffSchema, type ChatCheckpointDiff, ChatTurnItemSchema, notResumedNote, abortedByMachine, ENDED_NOTE_PREFIX, abortedByEnd, activeSubagents, WAITING_NOTE_PREFIX, ChatNoteItemSchema, ChatCompactionItemSchema, ChatItemSchema, type ChatItem, type ChatUserItem, type ChatAssistantItem, type ChatThinkingItem, type ChatToolItem, type ChatSubagentItem, type ChatApprovalItem, type ChatQuestionItem, type ChatTurnItem, type ChatNoteItem, type ChatCompactionItem, ChatEventSchema, type ChatEvent, ChatEventEnvelopeSchema, type ChatEventEnvelope, ChatCreatePayloadSchema, type ChatCreatePayload, ChatConfigurePayloadSchema, type ChatConfigurePayload, ChatPreferencesPayloadSchema, type ChatPreferencesPayload, ChatTargetPayloadSchema, type ChatTargetPayload, ChatClearPayloadSchema, type ChatClearPayload, ChatCancelPayloadSchema, type ChatCancelPayload, ChatAttachPayloadSchema, ChatHistoryPayloadSchema, ChatHistoryPageSchema, ChatHistoryResultSchema, type ChatHistoryResult, ChatSubagentPayloadSchema, type ChatSubagentPayload, ChatStopSubagentPayloadSchema, type ChatStopSubagentPayload, ChatGoalActionSchema, type ChatGoalAction, ChatGoalPayloadSchema, type ChatGoalPayload, ChatStopTaskPayloadSchema, type ChatStopTaskPayload, ChatSubagentPageSchema, ChatSubagentSourceSchema, type ChatSubagentSource, ChatSubagentResultSchema, type ChatSubagentResult, ChatStatusEventSchema, type ChatStatusEvent, ChatSubagentChangedEventSchema, type ChatSubagentChangedEvent, CHAT_BOOKMARK_LIMITS, ChatBookmarkSchema, type ChatBookmark, ChatBookmarksSchema, ChatAddBookmarkPayloadSchema, type ChatAddBookmarkPayload, ChatRenameBookmarkPayloadSchema, type ChatRenameBookmarkPayload, ChatRemoveBookmarkPayloadSchema, type ChatRemoveBookmarkPayload, ChatBookmarksResultSchema, type ChatBookmarksResult, ChatBookmarksEventSchema, type ChatBookmarksEvent, ChatRemoveVisualPayloadSchema, type ChatRemoveVisualPayload, ChatVisualsResultSchema, type ChatVisualsResult, ChatVisualsEventSchema, type ChatVisualsEvent, ChatAttachResultSchema, type ChatAttachResult, ChatDeliverySchema, type ChatDelivery, ChatSendPayloadSchema, type ChatSendPayload, ChatSendResultSchema, type ChatSendResult, ChatUiChoicePayloadSchema, type ChatUiChoicePayload, ChatUiQueryPayloadSchema, type ChatUiQueryPayload, ChatUiLinkPayloadSchema, type ChatUiLinkPayload, ChatQueuePayloadSchema, type ChatQueuePayload, ChatUnqueueResultSchema, type ChatUnqueueResult, ChatApprovePayloadSchema, type ChatApprovePayload, ChatDismissPayloadSchema, type ChatDismissPayload, ChatAnswerPayloadSchema, type ChatAnswerPayload, ChatTurnDiffPayloadSchema, type ChatTurnDiffPayload, ChatTurnDiffResultSchema, type ChatTurnDiffResult, CHAT_FORK_TITLE_MAX, ChatForkPayloadSchema, type ChatForkPayload, ChatForkResultSchema, type ChatForkResult, ChatContinueOnPayloadSchema, type ChatContinueOnPayload, ChatContinueOnResultSchema, type ChatContinueOnResult, ChatSummarizePayloadSchema, type ChatSummarizePayload, ChatSummarizeResultSchema, type ChatSummarizeResult, ChatForkInfoPayloadSchema, type ChatForkInfoPayload, ChatForkInfoResultSchema, type ChatForkInfoResult, ChatListResultSchema, type ChatListResult, GeneratedImageInputSchema, type GeneratedImageInput, generatedImageAttachment } from './chat.ts';
|
|
3
3
|
export { ErrorSchema, type WireError, RequestSchema, type Request, ReplyOkSchema, type ReplyOk, ReplyErrorSchema, type ReplyError, ReplySchema, type Reply, EventSchema, type Event, ServerFrameSchema, type ServerFrame, type ParseResult, parseRequest, parseServerFrame } from './envelope.ts';
|
|
4
4
|
export { SessionIdSchema, type SessionId } from './ids.ts';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Public API: exports.test.ts snapshots this list, so a name added or dropped here is an API change.
|
|
2
|
-
export { AgentKindSchema, AgentStatusSchema, SUGGESTED_TITLE_LIMIT, SuggestedTitleSchema, AgentRequestSchema, AgentInfoSchema, SessionStatusEventSchema, AgentResumePayloadSchema, ApprovalChoiceSchema, ApprovalRequestSchema, SessionApprovalsEventSchema, ApprovalAnswerPayloadSchema, ApprovalAnswerResultSchema, ApprovalPreferencePayloadSchema } from './agent.js';
|
|
2
|
+
export { KNOWN_AGENT_KINDS, AGENT_KIND_MAX_LENGTH, AgentKindSchema, isKnownAgentKind, AgentStatusSchema, SUGGESTED_TITLE_LIMIT, SuggestedTitleSchema, AgentRequestSchema, AgentInfoSchema, SessionStatusEventSchema, AgentResumePayloadSchema, ApprovalChoiceSchema, ApprovalRequestSchema, SessionApprovalsEventSchema, ApprovalAnswerPayloadSchema, ApprovalAnswerResultSchema, ApprovalPreferencePayloadSchema } from './agent.js';
|
|
3
3
|
export { ChatIdSchema, ChatContextBreakdownSchema, ChatUsageSchema, CHAT_ATTACHMENTS_MAX_BYTES, CHAT_ATTACHMENT_MAX_BYTES, CHAT_ATTACHMENTS_MAX_COUNT, attachmentBytes, attachmentImageMime, ChatAttachmentUploadSchema, ChatAttachmentUploadsSchema, ChatAttachmentSchema, ChatUiChoiceOriginSchema, ChatUiAnswerSchema, ChatQuoteSourceSchema, ChatQueuedMessageSchema, ChatBackgroundTaskSchema, ChatTurnLimitSchema, ChatGoalStatusSchema, ChatGoalSchema, ChatQuestionSchema, ChatRequestKindSchema, CHAT_REQUEST_LIMITS, ChatRequestApprovalSchema, ChatRequestSummarySchema, ChatInfoSchema, ChatSkillSourceSchema, ChatSkillSchema, SkillsListPayloadSchema, SkillsListResultSchema, ChatUserItemSchema, ChatUiQueryReadingSchema, ChatUiLinkReadingSchema, ChatUiPlaceReadingSchema, ChatUiQueryStateSchema, ChatAssistantItemSchema, ChatThinkingItemSchema, ChatToolStateSchema, ChatToolProgressSchema, ChatFileChangeSchema, ChatSubagentStatusSchema, ChatWorkflowPhaseSchema, ChatWorkflowAgentSchema, ChatWorkflowSchema, workflowAgentRef, workflowAgentIdOf, ChatToolItemSchema, ChatSubagentUsageSchema, HOST_TASK_ORIGIN, ChatSubagentItemSchema, ChatApprovalDecisionSchema, ChatApprovalItemSchema, ChatQuestionItemSchema, ChatCheckpointFileSchema, ChatCheckpointDiffSchema, ChatTurnItemSchema, notResumedNote, abortedByMachine, ENDED_NOTE_PREFIX, abortedByEnd, activeSubagents, WAITING_NOTE_PREFIX, ChatNoteItemSchema, ChatCompactionItemSchema, ChatItemSchema, ChatEventSchema, ChatEventEnvelopeSchema, ChatCreatePayloadSchema, ChatConfigurePayloadSchema, ChatPreferencesPayloadSchema, ChatTargetPayloadSchema, ChatClearPayloadSchema, ChatCancelPayloadSchema, ChatAttachPayloadSchema, ChatHistoryPayloadSchema, ChatHistoryPageSchema, ChatHistoryResultSchema, ChatSubagentPayloadSchema, ChatStopSubagentPayloadSchema, ChatGoalActionSchema, ChatGoalPayloadSchema, ChatStopTaskPayloadSchema, ChatSubagentPageSchema, ChatSubagentSourceSchema, ChatSubagentResultSchema, ChatStatusEventSchema, ChatSubagentChangedEventSchema, CHAT_BOOKMARK_LIMITS, ChatBookmarkSchema, ChatBookmarksSchema, ChatAddBookmarkPayloadSchema, ChatRenameBookmarkPayloadSchema, ChatRemoveBookmarkPayloadSchema, ChatBookmarksResultSchema, ChatBookmarksEventSchema, ChatRemoveVisualPayloadSchema, ChatVisualsResultSchema, ChatVisualsEventSchema, ChatAttachResultSchema, ChatDeliverySchema, ChatSendPayloadSchema, ChatSendResultSchema, ChatUiChoicePayloadSchema, ChatUiQueryPayloadSchema, ChatUiLinkPayloadSchema, ChatQueuePayloadSchema, ChatUnqueueResultSchema, ChatApprovePayloadSchema, ChatDismissPayloadSchema, ChatAnswerPayloadSchema, ChatTurnDiffPayloadSchema, ChatTurnDiffResultSchema, CHAT_FORK_TITLE_MAX, ChatForkPayloadSchema, ChatForkResultSchema, ChatContinueOnPayloadSchema, ChatContinueOnResultSchema, ChatSummarizePayloadSchema, ChatSummarizeResultSchema, ChatForkInfoPayloadSchema, ChatForkInfoResultSchema, ChatListResultSchema, GeneratedImageInputSchema, generatedImageAttachment } from './chat.js';
|
|
4
4
|
export { ErrorSchema, RequestSchema, ReplyOkSchema, ReplyErrorSchema, ReplySchema, EventSchema, ServerFrameSchema, parseRequest, parseServerFrame } from './envelope.js';
|
|
5
5
|
export { SessionIdSchema } from './ids.js';
|
package/dist/model.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export declare const ModelInfoSchema: z.ZodObject<{
|
|
|
27
27
|
slug: z.ZodString;
|
|
28
28
|
name: z.ZodString;
|
|
29
29
|
badge: z.ZodOptional<z.ZodString>;
|
|
30
|
+
vendor: z.ZodOptional<z.ZodString>;
|
|
30
31
|
legacy: z.ZodBoolean;
|
|
31
32
|
isDefault: z.ZodBoolean;
|
|
32
33
|
options: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -79,6 +80,7 @@ export declare const ModelCatalogEntrySchema: z.ZodObject<{
|
|
|
79
80
|
slug: z.ZodString;
|
|
80
81
|
name: z.ZodString;
|
|
81
82
|
badge: z.ZodOptional<z.ZodString>;
|
|
83
|
+
vendor: z.ZodOptional<z.ZodString>;
|
|
82
84
|
profile: z.ZodString;
|
|
83
85
|
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
84
86
|
legacy: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -112,6 +114,7 @@ export declare const ModelCatalogDataSchema: z.ZodObject<{
|
|
|
112
114
|
slug: z.ZodString;
|
|
113
115
|
name: z.ZodString;
|
|
114
116
|
badge: z.ZodOptional<z.ZodString>;
|
|
117
|
+
vendor: z.ZodOptional<z.ZodString>;
|
|
115
118
|
profile: z.ZodString;
|
|
116
119
|
aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
117
120
|
legacy: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -158,13 +161,7 @@ export declare const ProviderCapabilitiesSchema: z.ZodObject<{
|
|
|
158
161
|
}, z.core.$strip>;
|
|
159
162
|
export type ProviderCapabilities = z.infer<typeof ProviderCapabilitiesSchema>;
|
|
160
163
|
export declare const ProviderInfoSchema: z.ZodObject<{
|
|
161
|
-
kind: z.
|
|
162
|
-
apple: "apple";
|
|
163
|
-
claude: "claude";
|
|
164
|
-
codex: "codex";
|
|
165
|
-
copilot: "copilot";
|
|
166
|
-
gemini: "gemini";
|
|
167
|
-
}>;
|
|
164
|
+
kind: z.ZodString;
|
|
168
165
|
name: z.ZodString;
|
|
169
166
|
installed: z.ZodBoolean;
|
|
170
167
|
version: z.ZodNullable<z.ZodString>;
|
|
@@ -172,6 +169,7 @@ export declare const ProviderInfoSchema: z.ZodObject<{
|
|
|
172
169
|
slug: z.ZodString;
|
|
173
170
|
name: z.ZodString;
|
|
174
171
|
badge: z.ZodOptional<z.ZodString>;
|
|
172
|
+
vendor: z.ZodOptional<z.ZodString>;
|
|
175
173
|
legacy: z.ZodBoolean;
|
|
176
174
|
isDefault: z.ZodBoolean;
|
|
177
175
|
options: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -229,13 +227,7 @@ export declare const ProviderInfoSchema: z.ZodObject<{
|
|
|
229
227
|
export type ProviderInfo = z.infer<typeof ProviderInfoSchema>;
|
|
230
228
|
export declare const ProviderListResultSchema: z.ZodObject<{
|
|
231
229
|
providers: z.ZodArray<z.ZodObject<{
|
|
232
|
-
kind: z.
|
|
233
|
-
apple: "apple";
|
|
234
|
-
claude: "claude";
|
|
235
|
-
codex: "codex";
|
|
236
|
-
copilot: "copilot";
|
|
237
|
-
gemini: "gemini";
|
|
238
|
-
}>;
|
|
230
|
+
kind: z.ZodString;
|
|
239
231
|
name: z.ZodString;
|
|
240
232
|
installed: z.ZodBoolean;
|
|
241
233
|
version: z.ZodNullable<z.ZodString>;
|
|
@@ -243,6 +235,7 @@ export declare const ProviderListResultSchema: z.ZodObject<{
|
|
|
243
235
|
slug: z.ZodString;
|
|
244
236
|
name: z.ZodString;
|
|
245
237
|
badge: z.ZodOptional<z.ZodString>;
|
|
238
|
+
vendor: z.ZodOptional<z.ZodString>;
|
|
246
239
|
legacy: z.ZodBoolean;
|
|
247
240
|
isDefault: z.ZodBoolean;
|
|
248
241
|
options: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
package/dist/model.js
CHANGED
|
@@ -28,6 +28,8 @@ export const ModelInfoSchema = z.object({
|
|
|
28
28
|
slug: z.string().min(1),
|
|
29
29
|
name: z.string(),
|
|
30
30
|
badge: z.string().optional(),
|
|
31
|
+
// Who made the model, for a provider that offers many: the picker groups by it. Absent when the provider does not say.
|
|
32
|
+
vendor: z.string().optional(),
|
|
31
33
|
legacy: z.boolean(),
|
|
32
34
|
isDefault: z.boolean(),
|
|
33
35
|
options: z.array(ModelOptionDescriptorSchema),
|
|
@@ -49,6 +51,7 @@ export const ModelCatalogEntrySchema = z.object({
|
|
|
49
51
|
slug: ModelSlugSchema,
|
|
50
52
|
name: z.string().min(1),
|
|
51
53
|
badge: z.string().optional(),
|
|
54
|
+
vendor: z.string().optional(),
|
|
52
55
|
profile: z.string().min(1),
|
|
53
56
|
aliases: z.array(z.string().min(1)).optional(),
|
|
54
57
|
legacy: z.boolean().optional(),
|
package/dist/protocol.d.ts
CHANGED
|
@@ -4,13 +4,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
4
4
|
readonly 'chat.create': {
|
|
5
5
|
readonly payload: z.ZodObject<{
|
|
6
6
|
chatId: z.ZodString;
|
|
7
|
-
provider: z.ZodOptional<z.
|
|
8
|
-
apple: "apple";
|
|
9
|
-
claude: "claude";
|
|
10
|
-
codex: "codex";
|
|
11
|
-
copilot: "copilot";
|
|
12
|
-
gemini: "gemini";
|
|
13
|
-
}>>;
|
|
7
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
14
8
|
account: z.ZodOptional<z.ZodString>;
|
|
15
9
|
cwd: z.ZodOptional<z.ZodString>;
|
|
16
10
|
resume: z.ZodOptional<z.ZodString>;
|
|
@@ -27,13 +21,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
27
21
|
}, z.core.$strip>;
|
|
28
22
|
readonly result: z.ZodObject<{
|
|
29
23
|
chatId: z.ZodString;
|
|
30
|
-
provider: z.
|
|
31
|
-
apple: "apple";
|
|
32
|
-
claude: "claude";
|
|
33
|
-
codex: "codex";
|
|
34
|
-
copilot: "copilot";
|
|
35
|
-
gemini: "gemini";
|
|
36
|
-
}>;
|
|
24
|
+
provider: z.ZodString;
|
|
37
25
|
account: z.ZodOptional<z.ZodString>;
|
|
38
26
|
cwd: z.ZodString;
|
|
39
27
|
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
@@ -553,13 +541,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
553
541
|
readonly result: z.ZodObject<{
|
|
554
542
|
info: z.ZodObject<{
|
|
555
543
|
chatId: z.ZodString;
|
|
556
|
-
provider: z.
|
|
557
|
-
apple: "apple";
|
|
558
|
-
claude: "claude";
|
|
559
|
-
codex: "codex";
|
|
560
|
-
copilot: "copilot";
|
|
561
|
-
gemini: "gemini";
|
|
562
|
-
}>;
|
|
544
|
+
provider: z.ZodString;
|
|
563
545
|
account: z.ZodOptional<z.ZodString>;
|
|
564
546
|
cwd: z.ZodString;
|
|
565
547
|
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
@@ -1808,13 +1790,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1808
1790
|
type: z.ZodLiteral<"info">;
|
|
1809
1791
|
info: z.ZodObject<{
|
|
1810
1792
|
chatId: z.ZodString;
|
|
1811
|
-
provider: z.
|
|
1812
|
-
apple: "apple";
|
|
1813
|
-
claude: "claude";
|
|
1814
|
-
codex: "codex";
|
|
1815
|
-
copilot: "copilot";
|
|
1816
|
-
gemini: "gemini";
|
|
1817
|
-
}>;
|
|
1793
|
+
provider: z.ZodString;
|
|
1818
1794
|
account: z.ZodOptional<z.ZodString>;
|
|
1819
1795
|
cwd: z.ZodString;
|
|
1820
1796
|
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
@@ -1978,13 +1954,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1978
1954
|
type: z.ZodLiteral<"reset">;
|
|
1979
1955
|
info: z.ZodObject<{
|
|
1980
1956
|
chatId: z.ZodString;
|
|
1981
|
-
provider: z.
|
|
1982
|
-
apple: "apple";
|
|
1983
|
-
claude: "claude";
|
|
1984
|
-
codex: "codex";
|
|
1985
|
-
copilot: "copilot";
|
|
1986
|
-
gemini: "gemini";
|
|
1987
|
-
}>;
|
|
1957
|
+
provider: z.ZodString;
|
|
1988
1958
|
account: z.ZodOptional<z.ZodString>;
|
|
1989
1959
|
cwd: z.ZodString;
|
|
1990
1960
|
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
@@ -2750,13 +2720,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
2750
2720
|
}, z.core.$strip>;
|
|
2751
2721
|
readonly result: z.ZodObject<{
|
|
2752
2722
|
chatId: z.ZodString;
|
|
2753
|
-
provider: z.
|
|
2754
|
-
apple: "apple";
|
|
2755
|
-
claude: "claude";
|
|
2756
|
-
codex: "codex";
|
|
2757
|
-
copilot: "copilot";
|
|
2758
|
-
gemini: "gemini";
|
|
2759
|
-
}>;
|
|
2723
|
+
provider: z.ZodString;
|
|
2760
2724
|
account: z.ZodOptional<z.ZodString>;
|
|
2761
2725
|
cwd: z.ZodString;
|
|
2762
2726
|
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
@@ -2931,23 +2895,11 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
2931
2895
|
"full-access": "full-access";
|
|
2932
2896
|
supervised: "supervised";
|
|
2933
2897
|
}>>;
|
|
2934
|
-
selections: z.ZodOptional<z.ZodRecord<z.
|
|
2935
|
-
apple: "apple";
|
|
2936
|
-
claude: "claude";
|
|
2937
|
-
codex: "codex";
|
|
2938
|
-
copilot: "copilot";
|
|
2939
|
-
gemini: "gemini";
|
|
2940
|
-
}> & z.core.$partial, z.ZodObject<{
|
|
2898
|
+
selections: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodObject<{
|
|
2941
2899
|
model: z.ZodString;
|
|
2942
2900
|
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
2943
2901
|
}, z.core.$strip>>>;
|
|
2944
|
-
accounts: z.ZodOptional<z.ZodRecord<z.
|
|
2945
|
-
apple: "apple";
|
|
2946
|
-
claude: "claude";
|
|
2947
|
-
codex: "codex";
|
|
2948
|
-
copilot: "copilot";
|
|
2949
|
-
gemini: "gemini";
|
|
2950
|
-
}> & z.core.$partial, z.ZodString>>;
|
|
2902
|
+
accounts: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodString>>;
|
|
2951
2903
|
changedAt: z.ZodOptional<z.ZodNumber>;
|
|
2952
2904
|
}, z.core.$strip>;
|
|
2953
2905
|
readonly result: z.ZodObject<{}, z.core.$strip>;
|
|
@@ -3002,13 +2954,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
3002
2954
|
branch: z.ZodOptional<z.ZodString>;
|
|
3003
2955
|
}, z.core.$strip>>;
|
|
3004
2956
|
filesAfterTurn: z.ZodOptional<z.ZodBoolean>;
|
|
3005
|
-
provider: z.ZodOptional<z.
|
|
3006
|
-
apple: "apple";
|
|
3007
|
-
claude: "claude";
|
|
3008
|
-
codex: "codex";
|
|
3009
|
-
copilot: "copilot";
|
|
3010
|
-
gemini: "gemini";
|
|
3011
|
-
}>>;
|
|
2957
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
3012
2958
|
selection: z.ZodOptional<z.ZodObject<{
|
|
3013
2959
|
model: z.ZodString;
|
|
3014
2960
|
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
@@ -3018,13 +2964,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
3018
2964
|
readonly result: z.ZodObject<{
|
|
3019
2965
|
info: z.ZodObject<{
|
|
3020
2966
|
chatId: z.ZodString;
|
|
3021
|
-
provider: z.
|
|
3022
|
-
apple: "apple";
|
|
3023
|
-
claude: "claude";
|
|
3024
|
-
codex: "codex";
|
|
3025
|
-
copilot: "copilot";
|
|
3026
|
-
gemini: "gemini";
|
|
3027
|
-
}>;
|
|
2967
|
+
provider: z.ZodString;
|
|
3028
2968
|
account: z.ZodOptional<z.ZodString>;
|
|
3029
2969
|
cwd: z.ZodString;
|
|
3030
2970
|
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
@@ -3219,13 +3159,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
3219
3159
|
fork: z.ZodOptional<z.ZodObject<{
|
|
3220
3160
|
info: z.ZodObject<{
|
|
3221
3161
|
chatId: z.ZodString;
|
|
3222
|
-
provider: z.
|
|
3223
|
-
apple: "apple";
|
|
3224
|
-
claude: "claude";
|
|
3225
|
-
codex: "codex";
|
|
3226
|
-
copilot: "copilot";
|
|
3227
|
-
gemini: "gemini";
|
|
3228
|
-
}>;
|
|
3162
|
+
provider: z.ZodString;
|
|
3229
3163
|
account: z.ZodOptional<z.ZodString>;
|
|
3230
3164
|
cwd: z.ZodString;
|
|
3231
3165
|
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
@@ -3833,13 +3767,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
3833
3767
|
"codex-thread": "codex-thread";
|
|
3834
3768
|
}>;
|
|
3835
3769
|
context: z.ZodOptional<z.ZodObject<{
|
|
3836
|
-
provider: z.
|
|
3837
|
-
apple: "apple";
|
|
3838
|
-
claude: "claude";
|
|
3839
|
-
codex: "codex";
|
|
3840
|
-
copilot: "copilot";
|
|
3841
|
-
gemini: "gemini";
|
|
3842
|
-
}>;
|
|
3770
|
+
provider: z.ZodString;
|
|
3843
3771
|
cwd: z.ZodString;
|
|
3844
3772
|
chatId: z.ZodOptional<z.ZodString>;
|
|
3845
3773
|
}, z.core.$strip>>;
|
|
@@ -3956,13 +3884,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
3956
3884
|
readonly payload: z.ZodObject<{}, z.core.$strip>;
|
|
3957
3885
|
readonly result: z.ZodObject<{
|
|
3958
3886
|
providers: z.ZodArray<z.ZodObject<{
|
|
3959
|
-
kind: z.
|
|
3960
|
-
apple: "apple";
|
|
3961
|
-
claude: "claude";
|
|
3962
|
-
codex: "codex";
|
|
3963
|
-
copilot: "copilot";
|
|
3964
|
-
gemini: "gemini";
|
|
3965
|
-
}>;
|
|
3887
|
+
kind: z.ZodString;
|
|
3966
3888
|
name: z.ZodString;
|
|
3967
3889
|
installed: z.ZodBoolean;
|
|
3968
3890
|
version: z.ZodNullable<z.ZodString>;
|
|
@@ -3970,6 +3892,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
3970
3892
|
slug: z.ZodString;
|
|
3971
3893
|
name: z.ZodString;
|
|
3972
3894
|
badge: z.ZodOptional<z.ZodString>;
|
|
3895
|
+
vendor: z.ZodOptional<z.ZodString>;
|
|
3973
3896
|
legacy: z.ZodBoolean;
|
|
3974
3897
|
isDefault: z.ZodBoolean;
|
|
3975
3898
|
options: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -4065,13 +3988,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
4065
3988
|
checkedAt: z.ZodNumber;
|
|
4066
3989
|
}, z.core.$strip>>;
|
|
4067
3990
|
secretsAvailable: z.ZodOptional<z.ZodBoolean>;
|
|
4068
|
-
loginCommands: z.ZodOptional<z.ZodRecord<z.
|
|
4069
|
-
apple: "apple";
|
|
4070
|
-
claude: "claude";
|
|
4071
|
-
codex: "codex";
|
|
4072
|
-
copilot: "copilot";
|
|
4073
|
-
gemini: "gemini";
|
|
4074
|
-
}> & z.core.$partial, z.ZodString>>;
|
|
3991
|
+
loginCommands: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodString>>;
|
|
4075
3992
|
}, z.core.$strip>;
|
|
4076
3993
|
};
|
|
4077
3994
|
readonly 'accounts.save': {
|
|
@@ -4128,13 +4045,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
4128
4045
|
checkedAt: z.ZodNumber;
|
|
4129
4046
|
}, z.core.$strip>>;
|
|
4130
4047
|
secretsAvailable: z.ZodOptional<z.ZodBoolean>;
|
|
4131
|
-
loginCommands: z.ZodOptional<z.ZodRecord<z.
|
|
4132
|
-
apple: "apple";
|
|
4133
|
-
claude: "claude";
|
|
4134
|
-
codex: "codex";
|
|
4135
|
-
copilot: "copilot";
|
|
4136
|
-
gemini: "gemini";
|
|
4137
|
-
}> & z.core.$partial, z.ZodString>>;
|
|
4048
|
+
loginCommands: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodString>>;
|
|
4138
4049
|
}, z.core.$strip>;
|
|
4139
4050
|
};
|
|
4140
4051
|
readonly 'accounts.refresh': {
|
|
@@ -4176,24 +4087,12 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
4176
4087
|
checkedAt: z.ZodNumber;
|
|
4177
4088
|
}, z.core.$strip>>;
|
|
4178
4089
|
secretsAvailable: z.ZodOptional<z.ZodBoolean>;
|
|
4179
|
-
loginCommands: z.ZodOptional<z.ZodRecord<z.
|
|
4180
|
-
apple: "apple";
|
|
4181
|
-
claude: "claude";
|
|
4182
|
-
codex: "codex";
|
|
4183
|
-
copilot: "copilot";
|
|
4184
|
-
gemini: "gemini";
|
|
4185
|
-
}> & z.core.$partial, z.ZodString>>;
|
|
4090
|
+
loginCommands: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodString>>;
|
|
4186
4091
|
}, z.core.$strip>;
|
|
4187
4092
|
};
|
|
4188
4093
|
readonly 'accounts.create': {
|
|
4189
4094
|
readonly payload: z.ZodObject<{
|
|
4190
|
-
kind: z.
|
|
4191
|
-
apple: "apple";
|
|
4192
|
-
claude: "claude";
|
|
4193
|
-
codex: "codex";
|
|
4194
|
-
copilot: "copilot";
|
|
4195
|
-
gemini: "gemini";
|
|
4196
|
-
}>;
|
|
4095
|
+
kind: z.ZodString;
|
|
4197
4096
|
label: z.ZodString;
|
|
4198
4097
|
color: z.ZodOptional<z.ZodString>;
|
|
4199
4098
|
}, z.core.$strip>;
|
|
@@ -4234,13 +4133,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
4234
4133
|
checkedAt: z.ZodNumber;
|
|
4235
4134
|
}, z.core.$strip>>;
|
|
4236
4135
|
secretsAvailable: z.ZodOptional<z.ZodBoolean>;
|
|
4237
|
-
loginCommands: z.ZodOptional<z.ZodRecord<z.
|
|
4238
|
-
apple: "apple";
|
|
4239
|
-
claude: "claude";
|
|
4240
|
-
codex: "codex";
|
|
4241
|
-
copilot: "copilot";
|
|
4242
|
-
gemini: "gemini";
|
|
4243
|
-
}> & z.core.$partial, z.ZodString>>;
|
|
4136
|
+
loginCommands: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodString>>;
|
|
4244
4137
|
id: z.ZodString;
|
|
4245
4138
|
}, z.core.$strip>;
|
|
4246
4139
|
};
|
|
@@ -4502,13 +4395,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
4502
4395
|
readonly result: z.ZodObject<{
|
|
4503
4396
|
chats: z.ZodArray<z.ZodObject<{
|
|
4504
4397
|
chatId: z.ZodString;
|
|
4505
|
-
provider: z.
|
|
4506
|
-
apple: "apple";
|
|
4507
|
-
claude: "claude";
|
|
4508
|
-
codex: "codex";
|
|
4509
|
-
copilot: "copilot";
|
|
4510
|
-
gemini: "gemini";
|
|
4511
|
-
}>;
|
|
4398
|
+
provider: z.ZodString;
|
|
4512
4399
|
account: z.ZodOptional<z.ZodString>;
|
|
4513
4400
|
cwd: z.ZodString;
|
|
4514
4401
|
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
@@ -5084,13 +4971,7 @@ export declare const AGENT_EVENT_SCHEMAS: {
|
|
|
5084
4971
|
type: z.ZodLiteral<"info">;
|
|
5085
4972
|
info: z.ZodObject<{
|
|
5086
4973
|
chatId: z.ZodString;
|
|
5087
|
-
provider: z.
|
|
5088
|
-
apple: "apple";
|
|
5089
|
-
claude: "claude";
|
|
5090
|
-
codex: "codex";
|
|
5091
|
-
copilot: "copilot";
|
|
5092
|
-
gemini: "gemini";
|
|
5093
|
-
}>;
|
|
4974
|
+
provider: z.ZodString;
|
|
5094
4975
|
account: z.ZodOptional<z.ZodString>;
|
|
5095
4976
|
cwd: z.ZodString;
|
|
5096
4977
|
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
@@ -5254,13 +5135,7 @@ export declare const AGENT_EVENT_SCHEMAS: {
|
|
|
5254
5135
|
type: z.ZodLiteral<"reset">;
|
|
5255
5136
|
info: z.ZodObject<{
|
|
5256
5137
|
chatId: z.ZodString;
|
|
5257
|
-
provider: z.
|
|
5258
|
-
apple: "apple";
|
|
5259
|
-
claude: "claude";
|
|
5260
|
-
codex: "codex";
|
|
5261
|
-
copilot: "copilot";
|
|
5262
|
-
gemini: "gemini";
|
|
5263
|
-
}>;
|
|
5138
|
+
provider: z.ZodString;
|
|
5264
5139
|
account: z.ZodOptional<z.ZodString>;
|
|
5265
5140
|
cwd: z.ZodString;
|
|
5266
5141
|
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
@@ -5764,13 +5639,7 @@ export declare const AGENT_EVENT_SCHEMAS: {
|
|
|
5764
5639
|
chatId: z.ZodString;
|
|
5765
5640
|
info: z.ZodObject<{
|
|
5766
5641
|
chatId: z.ZodString;
|
|
5767
|
-
provider: z.
|
|
5768
|
-
apple: "apple";
|
|
5769
|
-
claude: "claude";
|
|
5770
|
-
codex: "codex";
|
|
5771
|
-
copilot: "copilot";
|
|
5772
|
-
gemini: "gemini";
|
|
5773
|
-
}>;
|
|
5642
|
+
provider: z.ZodString;
|
|
5774
5643
|
account: z.ZodOptional<z.ZodString>;
|
|
5775
5644
|
cwd: z.ZodString;
|
|
5776
5645
|
agentSessionId: z.ZodNullable<z.ZodString>;
|
|
@@ -6043,13 +5912,7 @@ export declare const AGENT_EVENT_SCHEMAS: {
|
|
|
6043
5912
|
checkedAt: z.ZodNumber;
|
|
6044
5913
|
}, z.core.$strip>>;
|
|
6045
5914
|
secretsAvailable: z.ZodOptional<z.ZodBoolean>;
|
|
6046
|
-
loginCommands: z.ZodOptional<z.ZodRecord<z.
|
|
6047
|
-
apple: "apple";
|
|
6048
|
-
claude: "claude";
|
|
6049
|
-
codex: "codex";
|
|
6050
|
-
copilot: "copilot";
|
|
6051
|
-
gemini: "gemini";
|
|
6052
|
-
}> & z.core.$partial, z.ZodString>>;
|
|
5915
|
+
loginCommands: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodString>>;
|
|
6053
5916
|
}, z.core.$strip>;
|
|
6054
5917
|
};
|
|
6055
5918
|
export type AgentRequestType = keyof typeof AGENT_REQUEST_SCHEMAS;
|
|
@@ -108,13 +108,7 @@ export declare const ProviderAccountsSchema: z.ZodObject<{
|
|
|
108
108
|
checkedAt: z.ZodNumber;
|
|
109
109
|
}, z.core.$strip>>;
|
|
110
110
|
secretsAvailable: z.ZodOptional<z.ZodBoolean>;
|
|
111
|
-
loginCommands: z.ZodOptional<z.ZodRecord<z.
|
|
112
|
-
apple: "apple";
|
|
113
|
-
claude: "claude";
|
|
114
|
-
codex: "codex";
|
|
115
|
-
copilot: "copilot";
|
|
116
|
-
gemini: "gemini";
|
|
117
|
-
}> & z.core.$partial, z.ZodString>>;
|
|
111
|
+
loginCommands: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodString>>;
|
|
118
112
|
}, z.core.$strip>;
|
|
119
113
|
export type ProviderAccounts = z.infer<typeof ProviderAccountsSchema>;
|
|
120
114
|
export declare const ProviderAccountsSavePayloadSchema: z.ZodObject<{
|
|
@@ -135,13 +129,7 @@ export declare const ProviderAccountsSavePayloadSchema: z.ZodObject<{
|
|
|
135
129
|
}, z.core.$strip>;
|
|
136
130
|
export type ProviderAccountsSavePayload = z.infer<typeof ProviderAccountsSavePayloadSchema>;
|
|
137
131
|
export declare const ProviderAccountCreatePayloadSchema: z.ZodObject<{
|
|
138
|
-
kind: z.
|
|
139
|
-
apple: "apple";
|
|
140
|
-
claude: "claude";
|
|
141
|
-
codex: "codex";
|
|
142
|
-
copilot: "copilot";
|
|
143
|
-
gemini: "gemini";
|
|
144
|
-
}>;
|
|
132
|
+
kind: z.ZodString;
|
|
145
133
|
label: z.ZodString;
|
|
146
134
|
color: z.ZodOptional<z.ZodString>;
|
|
147
135
|
}, z.core.$strip>;
|
|
@@ -183,13 +171,7 @@ export declare const ProviderAccountCreateResultSchema: z.ZodObject<{
|
|
|
183
171
|
checkedAt: z.ZodNumber;
|
|
184
172
|
}, z.core.$strip>>;
|
|
185
173
|
secretsAvailable: z.ZodOptional<z.ZodBoolean>;
|
|
186
|
-
loginCommands: z.ZodOptional<z.ZodRecord<z.
|
|
187
|
-
apple: "apple";
|
|
188
|
-
claude: "claude";
|
|
189
|
-
codex: "codex";
|
|
190
|
-
copilot: "copilot";
|
|
191
|
-
gemini: "gemini";
|
|
192
|
-
}> & z.core.$partial, z.ZodString>>;
|
|
174
|
+
loginCommands: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodString>>;
|
|
193
175
|
id: z.ZodString;
|
|
194
176
|
}, z.core.$strip>;
|
|
195
177
|
export type ProviderAccountCreateResult = z.infer<typeof ProviderAccountCreateResultSchema>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adecore/agent-contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.30.0",
|
|
4
4
|
"description": "Schemas and port contracts for agent chats, provider accounts, models and usage.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"test": "bun --conditions=source test"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"@adecore/intelligent-ui": "0.
|
|
89
|
+
"@adecore/intelligent-ui": "0.30.0",
|
|
90
90
|
"zod": "^4.6.5"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
package/src/agent.ts
CHANGED
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { SessionIdSchema } from './ids.ts';
|
|
3
3
|
|
|
4
|
-
// The
|
|
5
|
-
// on its provider, not a second list: a CLI without hooks still opens as a terminal agent.
|
|
6
|
-
export const
|
|
7
|
-
export type
|
|
4
|
+
// The agent CLIs this version knows by name. Whether one has a chat backend or a hook normalizer is a
|
|
5
|
+
// capability on its provider, not a second list: a CLI without hooks still opens as a terminal agent.
|
|
6
|
+
export const KNOWN_AGENT_KINDS = ['claude', 'codex', 'gemini', 'copilot', 'apple'] as const;
|
|
7
|
+
export type KnownAgentKind = (typeof KNOWN_AGENT_KINDS)[number];
|
|
8
|
+
|
|
9
|
+
export const AGENT_KIND_MAX_LENGTH = 32;
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* Open, so a host can offer a CLI this version never heard of and an older client still reads a reply
|
|
13
|
+
* that names it. Bounded to an identifier, since a kind ends up in ids, paths and command lines.
|
|
14
|
+
*/
|
|
15
|
+
export const AgentKindSchema = z
|
|
16
|
+
.string()
|
|
17
|
+
.min(1)
|
|
18
|
+
.max(AGENT_KIND_MAX_LENGTH)
|
|
19
|
+
.regex(/^[a-z][a-z0-9-]*$/);
|
|
20
|
+
export type AgentKind = KnownAgentKind | (string & {});
|
|
21
|
+
|
|
22
|
+
export function isKnownAgentKind(kind: string): kind is KnownAgentKind {
|
|
23
|
+
return (KNOWN_AGENT_KINDS as readonly string[]).includes(kind);
|
|
24
|
+
}
|
|
8
25
|
|
|
9
26
|
// `exited` is the daemon's own reading, not a hook's: the CLI went down with its shell without
|
|
10
27
|
// ever reporting an end, so the node offers a resume instead of a status that stays on running.
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
// Public API: exports.test.ts snapshots this list, so a name added or dropped here is an API change.
|
|
2
2
|
export {
|
|
3
|
+
KNOWN_AGENT_KINDS,
|
|
4
|
+
type KnownAgentKind,
|
|
5
|
+
AGENT_KIND_MAX_LENGTH,
|
|
3
6
|
AgentKindSchema,
|
|
4
7
|
type AgentKind,
|
|
8
|
+
isKnownAgentKind,
|
|
5
9
|
AgentStatusSchema,
|
|
6
10
|
type AgentStatus,
|
|
7
11
|
SUGGESTED_TITLE_LIMIT,
|
package/src/model.ts
CHANGED
|
@@ -33,6 +33,8 @@ export const ModelInfoSchema = z.object({
|
|
|
33
33
|
slug: z.string().min(1),
|
|
34
34
|
name: z.string(),
|
|
35
35
|
badge: z.string().optional(),
|
|
36
|
+
// Who made the model, for a provider that offers many: the picker groups by it. Absent when the provider does not say.
|
|
37
|
+
vendor: z.string().optional(),
|
|
36
38
|
legacy: z.boolean(),
|
|
37
39
|
isDefault: z.boolean(),
|
|
38
40
|
options: z.array(ModelOptionDescriptorSchema),
|
|
@@ -61,6 +63,7 @@ export const ModelCatalogEntrySchema = z.object({
|
|
|
61
63
|
slug: ModelSlugSchema,
|
|
62
64
|
name: z.string().min(1),
|
|
63
65
|
badge: z.string().optional(),
|
|
66
|
+
vendor: z.string().optional(),
|
|
64
67
|
profile: z.string().min(1),
|
|
65
68
|
aliases: z.array(z.string().min(1)).optional(),
|
|
66
69
|
legacy: z.boolean().optional(),
|