@adecore/agent-contracts 0.31.1 → 0.31.3

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.
@@ -4008,6 +4008,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4008
4008
  secretsAvailable: z.ZodOptional<z.ZodBoolean>;
4009
4009
  loginCommands: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodString>>;
4010
4010
  chatLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4011
+ silentLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4011
4012
  }, z.core.$strip>;
4012
4013
  };
4013
4014
  readonly 'accounts.save': {
@@ -4066,6 +4067,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4066
4067
  secretsAvailable: z.ZodOptional<z.ZodBoolean>;
4067
4068
  loginCommands: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodString>>;
4068
4069
  chatLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4070
+ silentLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4069
4071
  }, z.core.$strip>;
4070
4072
  };
4071
4073
  readonly 'accounts.refresh': {
@@ -4109,6 +4111,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4109
4111
  secretsAvailable: z.ZodOptional<z.ZodBoolean>;
4110
4112
  loginCommands: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodString>>;
4111
4113
  chatLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4114
+ silentLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4112
4115
  }, z.core.$strip>;
4113
4116
  };
4114
4117
  readonly 'accounts.create': {
@@ -4156,6 +4159,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4156
4159
  secretsAvailable: z.ZodOptional<z.ZodBoolean>;
4157
4160
  loginCommands: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodString>>;
4158
4161
  chatLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4162
+ silentLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4159
4163
  id: z.ZodString;
4160
4164
  }, z.core.$strip>;
4161
4165
  };
@@ -4189,6 +4193,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4189
4193
  provider: z.ZodEnum<{
4190
4194
  claude: "claude";
4191
4195
  codex: "codex";
4196
+ grok: "grok";
4192
4197
  nanogpt: "nanogpt";
4193
4198
  }>;
4194
4199
  model: z.ZodString;
@@ -4210,6 +4215,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4210
4215
  provider: z.ZodEnum<{
4211
4216
  claude: "claude";
4212
4217
  codex: "codex";
4218
+ grok: "grok";
4213
4219
  nanogpt: "nanogpt";
4214
4220
  }>;
4215
4221
  model: z.ZodString;
@@ -4239,6 +4245,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4239
4245
  byProvider: z.ZodRecord<z.ZodEnum<{
4240
4246
  claude: "claude";
4241
4247
  codex: "codex";
4248
+ grok: "grok";
4242
4249
  nanogpt: "nanogpt";
4243
4250
  }> & z.core.$partial, z.ZodObject<{
4244
4251
  costUsd: z.ZodNumber;
@@ -4283,6 +4290,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4283
4290
  provider: z.ZodEnum<{
4284
4291
  claude: "claude";
4285
4292
  codex: "codex";
4293
+ grok: "grok";
4286
4294
  nanogpt: "nanogpt";
4287
4295
  }>;
4288
4296
  path: z.ZodString;
@@ -4298,6 +4306,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4298
4306
  kind: z.ZodEnum<{
4299
4307
  claude: "claude";
4300
4308
  codex: "codex";
4309
+ grok: "grok";
4301
4310
  nanogpt: "nanogpt";
4302
4311
  }>;
4303
4312
  label: z.ZodString;
@@ -4320,6 +4329,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4320
4329
  kind: z.ZodEnum<{
4321
4330
  claude: "claude";
4322
4331
  codex: "codex";
4332
+ grok: "grok";
4323
4333
  nanogpt: "nanogpt";
4324
4334
  }>;
4325
4335
  account: z.ZodOptional<z.ZodObject<{
@@ -4367,6 +4377,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4367
4377
  kind: z.ZodEnum<{
4368
4378
  claude: "claude";
4369
4379
  codex: "codex";
4380
+ grok: "grok";
4370
4381
  nanogpt: "nanogpt";
4371
4382
  }>;
4372
4383
  account: z.ZodOptional<z.ZodObject<{
@@ -5866,6 +5877,7 @@ export declare const AGENT_EVENT_SCHEMAS: {
5866
5877
  kind: z.ZodEnum<{
5867
5878
  claude: "claude";
5868
5879
  codex: "codex";
5880
+ grok: "grok";
5869
5881
  nanogpt: "nanogpt";
5870
5882
  }>;
5871
5883
  account: z.ZodOptional<z.ZodObject<{
@@ -5944,6 +5956,7 @@ export declare const AGENT_EVENT_SCHEMAS: {
5944
5956
  secretsAvailable: z.ZodOptional<z.ZodBoolean>;
5945
5957
  loginCommands: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodString>>;
5946
5958
  chatLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
5959
+ silentLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
5947
5960
  }, z.core.$strip>;
5948
5961
  };
5949
5962
  export type AgentRequestType = keyof typeof AGENT_REQUEST_SCHEMAS;
@@ -110,6 +110,7 @@ export declare const ProviderAccountsSchema: z.ZodObject<{
110
110
  secretsAvailable: z.ZodOptional<z.ZodBoolean>;
111
111
  loginCommands: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodString>>;
112
112
  chatLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
113
+ silentLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
113
114
  }, z.core.$strip>;
114
115
  export type ProviderAccounts = z.infer<typeof ProviderAccountsSchema>;
115
116
  export declare const ProviderAccountsSavePayloadSchema: z.ZodObject<{
@@ -174,6 +175,7 @@ export declare const ProviderAccountCreateResultSchema: z.ZodObject<{
174
175
  secretsAvailable: z.ZodOptional<z.ZodBoolean>;
175
176
  loginCommands: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodString>>;
176
177
  chatLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
178
+ silentLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
177
179
  id: z.ZodString;
178
180
  }, z.core.$strip>;
179
181
  export type ProviderAccountCreateResult = z.infer<typeof ProviderAccountCreateResultSchema>;
@@ -71,7 +71,9 @@ export const ProviderAccountsSchema = z.object({
71
71
  // Per agent kind, what a terminal types to sign that CLI in under an account, which the account's environment points at.
72
72
  loginCommands: z.partialRecord(AgentKindSchema, z.string()).optional(),
73
73
  // The agent kinds that keep accounts in folders of their own but sign in from a chat, with no command to type.
74
- chatLogins: z.array(AgentKindSchema).optional()
74
+ chatLogins: z.array(AgentKindSchema).optional(),
75
+ // The agent kinds of `loginCommands` whose CLI cannot say who is signed in, so nothing notices a login end.
76
+ silentLogins: z.array(AgentKindSchema).optional()
75
77
  });
76
78
  /* The whole map: an id left out is removed, and its folder stays where it is. */
77
79
  export const ProviderAccountsSavePayloadSchema = z.object({
package/dist/usage.d.ts CHANGED
@@ -2,10 +2,11 @@ import { z } from 'zod';
2
2
  export declare const UsageProviderSchema: z.ZodEnum<{
3
3
  claude: "claude";
4
4
  codex: "codex";
5
+ grok: "grok";
5
6
  nanogpt: "nanogpt";
6
7
  }>;
7
8
  export type UsageProvider = z.infer<typeof UsageProviderSchema>;
8
- export declare const USAGE_PROVIDERS: ("claude" | "codex" | "nanogpt")[];
9
+ export declare const USAGE_PROVIDERS: ("claude" | "codex" | "grok" | "nanogpt")[];
9
10
  export declare const UsageResolutionSchema: z.ZodEnum<{
10
11
  day: "day";
11
12
  hour: "hour";
@@ -29,6 +30,7 @@ export declare const UsageAccountSchema: z.ZodObject<{
29
30
  kind: z.ZodEnum<{
30
31
  claude: "claude";
31
32
  codex: "codex";
33
+ grok: "grok";
32
34
  nanogpt: "nanogpt";
33
35
  }>;
34
36
  label: z.ZodString;
@@ -40,6 +42,7 @@ export declare const UsageBucketSchema: z.ZodObject<{
40
42
  provider: z.ZodEnum<{
41
43
  claude: "claude";
42
44
  codex: "codex";
45
+ grok: "grok";
43
46
  nanogpt: "nanogpt";
44
47
  }>;
45
48
  model: z.ZodString;
@@ -69,6 +72,7 @@ export declare const UsageModelSchema: z.ZodObject<{
69
72
  provider: z.ZodEnum<{
70
73
  claude: "claude";
71
74
  codex: "codex";
75
+ grok: "grok";
72
76
  nanogpt: "nanogpt";
73
77
  }>;
74
78
  model: z.ZodString;
@@ -99,6 +103,7 @@ export declare const UsageProjectSchema: z.ZodObject<{
99
103
  byProvider: z.ZodRecord<z.ZodEnum<{
100
104
  claude: "claude";
101
105
  codex: "codex";
106
+ grok: "grok";
102
107
  nanogpt: "nanogpt";
103
108
  }> & z.core.$partial, z.ZodObject<{
104
109
  costUsd: z.ZodNumber;
@@ -150,6 +155,7 @@ export declare const UsageRootSchema: z.ZodObject<{
150
155
  provider: z.ZodEnum<{
151
156
  claude: "claude";
152
157
  codex: "codex";
158
+ grok: "grok";
153
159
  nanogpt: "nanogpt";
154
160
  }>;
155
161
  path: z.ZodString;
@@ -181,6 +187,7 @@ export declare const UsageSummaryResultSchema: z.ZodObject<{
181
187
  provider: z.ZodEnum<{
182
188
  claude: "claude";
183
189
  codex: "codex";
190
+ grok: "grok";
184
191
  nanogpt: "nanogpt";
185
192
  }>;
186
193
  model: z.ZodString;
@@ -202,6 +209,7 @@ export declare const UsageSummaryResultSchema: z.ZodObject<{
202
209
  provider: z.ZodEnum<{
203
210
  claude: "claude";
204
211
  codex: "codex";
212
+ grok: "grok";
205
213
  nanogpt: "nanogpt";
206
214
  }>;
207
215
  model: z.ZodString;
@@ -231,6 +239,7 @@ export declare const UsageSummaryResultSchema: z.ZodObject<{
231
239
  byProvider: z.ZodRecord<z.ZodEnum<{
232
240
  claude: "claude";
233
241
  codex: "codex";
242
+ grok: "grok";
234
243
  nanogpt: "nanogpt";
235
244
  }> & z.core.$partial, z.ZodObject<{
236
245
  costUsd: z.ZodNumber;
@@ -275,6 +284,7 @@ export declare const UsageSummaryResultSchema: z.ZodObject<{
275
284
  provider: z.ZodEnum<{
276
285
  claude: "claude";
277
286
  codex: "codex";
287
+ grok: "grok";
278
288
  nanogpt: "nanogpt";
279
289
  }>;
280
290
  path: z.ZodString;
@@ -290,6 +300,7 @@ export declare const UsageSummaryResultSchema: z.ZodObject<{
290
300
  kind: z.ZodEnum<{
291
301
  claude: "claude";
292
302
  codex: "codex";
303
+ grok: "grok";
293
304
  nanogpt: "nanogpt";
294
305
  }>;
295
306
  label: z.ZodString;
@@ -319,6 +330,7 @@ export declare const UsageLimitsProviderSchema: z.ZodObject<{
319
330
  kind: z.ZodEnum<{
320
331
  claude: "claude";
321
332
  codex: "codex";
333
+ grok: "grok";
322
334
  nanogpt: "nanogpt";
323
335
  }>;
324
336
  account: z.ZodOptional<z.ZodObject<{
@@ -363,6 +375,7 @@ export declare const UsageLimitsSnapshotSchema: z.ZodObject<{
363
375
  kind: z.ZodEnum<{
364
376
  claude: "claude";
365
377
  codex: "codex";
378
+ grok: "grok";
366
379
  nanogpt: "nanogpt";
367
380
  }>;
368
381
  account: z.ZodOptional<z.ZodObject<{
package/dist/usage.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { ProviderAccountIdSchema } from './provider-accounts.js';
3
- /* The providers whose usage the daemon reads: the CLIs' transcripts, and the log of a subscription API it calls itself. A subset of `AgentKindSchema`: it grows with the readers. */
4
- export const UsageProviderSchema = z.enum(['claude', 'codex', 'nanogpt']);
3
+ /* The providers whose usage the daemon reads: the CLIs' own records, and the log a host keeps of what it calls itself. A subset of `AgentKindSchema`: it grows with the readers. */
4
+ export const UsageProviderSchema = z.enum(['claude', 'codex', 'nanogpt', 'grok']);
5
5
  export const USAGE_PROVIDERS = UsageProviderSchema.options;
6
6
  export const UsageResolutionSchema = z.enum(['hour', 'day']);
7
7
  /* Token kinds are disjoint, so a total is their sum. Reasoning is a part of output and never counted twice. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adecore/agent-contracts",
3
- "version": "0.31.1",
3
+ "version": "0.31.3",
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.31.1",
89
+ "@adecore/intelligent-ui": "0.31.3",
90
90
  "zod": "^4.6.5"
91
91
  },
92
92
  "devDependencies": {
@@ -85,7 +85,9 @@ export const ProviderAccountsSchema = z.object({
85
85
  // Per agent kind, what a terminal types to sign that CLI in under an account, which the account's environment points at.
86
86
  loginCommands: z.partialRecord(AgentKindSchema, z.string()).optional(),
87
87
  // The agent kinds that keep accounts in folders of their own but sign in from a chat, with no command to type.
88
- chatLogins: z.array(AgentKindSchema).optional()
88
+ chatLogins: z.array(AgentKindSchema).optional(),
89
+ // The agent kinds of `loginCommands` whose CLI cannot say who is signed in, so nothing notices a login end.
90
+ silentLogins: z.array(AgentKindSchema).optional()
89
91
  });
90
92
  export type ProviderAccounts = z.infer<typeof ProviderAccountsSchema>;
91
93
 
package/src/usage.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  import { ProviderAccountIdSchema } from './provider-accounts.ts';
3
3
 
4
- /* The providers whose usage the daemon reads: the CLIs' transcripts, and the log of a subscription API it calls itself. A subset of `AgentKindSchema`: it grows with the readers. */
5
- export const UsageProviderSchema = z.enum(['claude', 'codex', 'nanogpt']);
4
+ /* The providers whose usage the daemon reads: the CLIs' own records, and the log a host keeps of what it calls itself. A subset of `AgentKindSchema`: it grows with the readers. */
5
+ export const UsageProviderSchema = z.enum(['claude', 'codex', 'nanogpt', 'grok']);
6
6
  export type UsageProvider = z.infer<typeof UsageProviderSchema>;
7
7
  export const USAGE_PROVIDERS = UsageProviderSchema.options;
8
8