@adecore/agent-contracts 0.53.2 → 0.54.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/chat.d.ts +52 -0
- package/dist/chat.js +4 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/protocol.d.ts +36 -0
- package/dist/visual.js +1 -1
- package/package.json +3 -7
- package/src/chat.ts +4 -2
- package/src/index.ts +0 -1
- package/src/visual.ts +1 -1
- package/dist/record.d.ts +0 -1
- package/dist/record.js +0 -4
- package/src/record.ts +0 -4
package/dist/chat.d.ts
CHANGED
|
@@ -991,6 +991,10 @@ export declare const ChatTurnItemSchema: z.ZodObject<{
|
|
|
991
991
|
agent: "agent";
|
|
992
992
|
user: "user";
|
|
993
993
|
}>>;
|
|
994
|
+
selection: z.ZodOptional<z.ZodObject<{
|
|
995
|
+
model: z.ZodString;
|
|
996
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
997
|
+
}, z.core.$strip>>;
|
|
994
998
|
label: z.ZodOptional<z.ZodString>;
|
|
995
999
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
996
1000
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -1384,6 +1388,10 @@ export declare const ChatItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1384
1388
|
agent: "agent";
|
|
1385
1389
|
user: "user";
|
|
1386
1390
|
}>>;
|
|
1391
|
+
selection: z.ZodOptional<z.ZodObject<{
|
|
1392
|
+
model: z.ZodString;
|
|
1393
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
1394
|
+
}, z.core.$strip>>;
|
|
1387
1395
|
label: z.ZodOptional<z.ZodString>;
|
|
1388
1396
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
1389
1397
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -1765,6 +1773,10 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1765
1773
|
agent: "agent";
|
|
1766
1774
|
user: "user";
|
|
1767
1775
|
}>>;
|
|
1776
|
+
selection: z.ZodOptional<z.ZodObject<{
|
|
1777
|
+
model: z.ZodString;
|
|
1778
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
1779
|
+
}, z.core.$strip>>;
|
|
1768
1780
|
label: z.ZodOptional<z.ZodString>;
|
|
1769
1781
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
1770
1782
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -2528,6 +2540,10 @@ export declare const ChatEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
2528
2540
|
agent: "agent";
|
|
2529
2541
|
user: "user";
|
|
2530
2542
|
}>>;
|
|
2543
|
+
selection: z.ZodOptional<z.ZodObject<{
|
|
2544
|
+
model: z.ZodString;
|
|
2545
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
2546
|
+
}, z.core.$strip>>;
|
|
2531
2547
|
label: z.ZodOptional<z.ZodString>;
|
|
2532
2548
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
2533
2549
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -2896,6 +2912,10 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
|
|
|
2896
2912
|
agent: "agent";
|
|
2897
2913
|
user: "user";
|
|
2898
2914
|
}>>;
|
|
2915
|
+
selection: z.ZodOptional<z.ZodObject<{
|
|
2916
|
+
model: z.ZodString;
|
|
2917
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
2918
|
+
}, z.core.$strip>>;
|
|
2899
2919
|
label: z.ZodOptional<z.ZodString>;
|
|
2900
2920
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
2901
2921
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -3659,6 +3679,10 @@ export declare const ChatEventEnvelopeSchema: z.ZodObject<{
|
|
|
3659
3679
|
agent: "agent";
|
|
3660
3680
|
user: "user";
|
|
3661
3681
|
}>>;
|
|
3682
|
+
selection: z.ZodOptional<z.ZodObject<{
|
|
3683
|
+
model: z.ZodString;
|
|
3684
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
3685
|
+
}, z.core.$strip>>;
|
|
3662
3686
|
label: z.ZodOptional<z.ZodString>;
|
|
3663
3687
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
3664
3688
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -4109,6 +4133,10 @@ export declare const ChatHistoryResultSchema: z.ZodObject<{
|
|
|
4109
4133
|
agent: "agent";
|
|
4110
4134
|
user: "user";
|
|
4111
4135
|
}>>;
|
|
4136
|
+
selection: z.ZodOptional<z.ZodObject<{
|
|
4137
|
+
model: z.ZodString;
|
|
4138
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
4139
|
+
}, z.core.$strip>>;
|
|
4112
4140
|
label: z.ZodOptional<z.ZodString>;
|
|
4113
4141
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
4114
4142
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -4520,6 +4548,10 @@ export declare const ChatSubagentResultSchema: z.ZodObject<{
|
|
|
4520
4548
|
agent: "agent";
|
|
4521
4549
|
user: "user";
|
|
4522
4550
|
}>>;
|
|
4551
|
+
selection: z.ZodOptional<z.ZodObject<{
|
|
4552
|
+
model: z.ZodString;
|
|
4553
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
4554
|
+
}, z.core.$strip>>;
|
|
4523
4555
|
label: z.ZodOptional<z.ZodString>;
|
|
4524
4556
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
4525
4557
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -5377,6 +5409,10 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
5377
5409
|
agent: "agent";
|
|
5378
5410
|
user: "user";
|
|
5379
5411
|
}>>;
|
|
5412
|
+
selection: z.ZodOptional<z.ZodObject<{
|
|
5413
|
+
model: z.ZodString;
|
|
5414
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
5415
|
+
}, z.core.$strip>>;
|
|
5380
5416
|
label: z.ZodOptional<z.ZodString>;
|
|
5381
5417
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
5382
5418
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -5743,6 +5779,10 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
5743
5779
|
agent: "agent";
|
|
5744
5780
|
user: "user";
|
|
5745
5781
|
}>>;
|
|
5782
|
+
selection: z.ZodOptional<z.ZodObject<{
|
|
5783
|
+
model: z.ZodString;
|
|
5784
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
5785
|
+
}, z.core.$strip>>;
|
|
5746
5786
|
label: z.ZodOptional<z.ZodString>;
|
|
5747
5787
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
5748
5788
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -6108,6 +6148,10 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
6108
6148
|
agent: "agent";
|
|
6109
6149
|
user: "user";
|
|
6110
6150
|
}>>;
|
|
6151
|
+
selection: z.ZodOptional<z.ZodObject<{
|
|
6152
|
+
model: z.ZodString;
|
|
6153
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
6154
|
+
}, z.core.$strip>>;
|
|
6111
6155
|
label: z.ZodOptional<z.ZodString>;
|
|
6112
6156
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
6113
6157
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -6871,6 +6915,10 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
6871
6915
|
agent: "agent";
|
|
6872
6916
|
user: "user";
|
|
6873
6917
|
}>>;
|
|
6918
|
+
selection: z.ZodOptional<z.ZodObject<{
|
|
6919
|
+
model: z.ZodString;
|
|
6920
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
6921
|
+
}, z.core.$strip>>;
|
|
6874
6922
|
label: z.ZodOptional<z.ZodString>;
|
|
6875
6923
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
6876
6924
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -7355,6 +7403,10 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
|
|
|
7355
7403
|
agent: "agent";
|
|
7356
7404
|
user: "user";
|
|
7357
7405
|
}>>;
|
|
7406
|
+
selection: z.ZodOptional<z.ZodObject<{
|
|
7407
|
+
model: z.ZodString;
|
|
7408
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
7409
|
+
}, z.core.$strip>>;
|
|
7358
7410
|
label: z.ZodOptional<z.ZodString>;
|
|
7359
7411
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
7360
7412
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
package/dist/chat.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { UiLinkResolutionSchema } from '@adecore/intelligent-ui/links';
|
|
2
|
-
import { z } from 'zod';
|
|
3
2
|
import { UiBlocksSchema } from '@adecore/intelligent-ui/protocol';
|
|
3
|
+
import { z } from 'zod';
|
|
4
4
|
import { AgentKindSchema, AgentStatusSchema, SuggestedTitleSchema } from './agent.js';
|
|
5
|
-
import { WorktreeSchema } from './worktree.js';
|
|
6
5
|
import { ModelSelectionSchema, RuntimeModeSchema } from './model.js';
|
|
7
6
|
import { ProviderAccountIdSchema } from './provider-accounts.js';
|
|
8
7
|
import { ChatVisualsSchema } from './visual.js';
|
|
8
|
+
import { WorktreeSchema } from './worktree.js';
|
|
9
9
|
// The client picks the id (its node id), like a terminal session.
|
|
10
10
|
export const ChatIdSchema = z.string().min(1);
|
|
11
11
|
// The daemon's estimate of what `contextTokens` is made of, scaled to add up to it; `system` is whatever the thread cannot account for.
|
|
@@ -538,6 +538,8 @@ export const ChatTurnItemSchema = z.object({
|
|
|
538
538
|
state: z.enum(['running', 'done', 'aborted', 'error']),
|
|
539
539
|
// Who started the turn. Absent means the person did, which is what every turn written before this field was.
|
|
540
540
|
origin: z.enum(['user', 'agent']).optional(),
|
|
541
|
+
// The model and options the turn ran on, so a client can mark where they changed. Absent on turns from before this field.
|
|
542
|
+
selection: ModelSelectionSchema.optional(),
|
|
541
543
|
// What the CLI woke up about (the summary of a background task that settled); only an agent turn has one.
|
|
542
544
|
label: z.string().optional(),
|
|
543
545
|
// The Agent call the CLI woke up about, so the header can point at the subagent row it belongs to.
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ export { ModelOptionChoiceSchema, type ModelOptionChoice, ModelOptionDescriptorS
|
|
|
6
6
|
export type { FramePort } from './port.ts';
|
|
7
7
|
export { EmptySchema, AGENT_REQUEST_SCHEMAS, AGENT_EVENT_SCHEMAS, type AgentRequestType, type AgentEventType } from './protocol.ts';
|
|
8
8
|
export { ProviderAccountIdSchema, type ProviderAccountId, ProviderAccountVariableSchema, type ProviderAccountVariable, ProviderAccountSchema, type ProviderAccount, ProviderAccountStateSchema, type ProviderAccountState, ProviderAccountStatusSchema, type ProviderAccountStatus, ProviderAccountMapSchema, type ProviderAccountMap, ProviderAccountsSchema, type ProviderAccounts, ProviderAccountsSavePayloadSchema, type ProviderAccountsSavePayload, ProviderAccountCreatePayloadSchema, type ProviderAccountCreatePayload, ProviderAccountCreateResultSchema, type ProviderAccountCreateResult, ProviderAccountWatchLoginPayloadSchema, type ProviderAccountWatchLoginPayload, ProviderAccountsReorderPayloadSchema, type ProviderAccountsReorderPayload, orderedAccountIds, topAccountOf } from './provider-accounts.ts';
|
|
9
|
-
export { isRecord } from './record.ts';
|
|
10
9
|
export { TaskStatusSchema, type TaskStatus, TaskResultSchema, type TaskResult, TaskSchema, type Task, TaskChangedEventSchema, type TaskChangedEvent } from './task.ts';
|
|
11
10
|
export { clipText, TOOL_OUTPUT_TAIL, appendToolOutput } from './text.ts';
|
|
12
11
|
export { UsageProviderSchema, type UsageProvider, USAGE_PROVIDERS, UsageResolutionSchema, type UsageResolution, UsageTotalsSchema, type UsageTotals, EMPTY_TOTALS, totalTokensOf, addTotals, UsageAccountSchema, type UsageAccount, UsageBucketSchema, type UsageBucket, UsagePriceBasisSchema, type UsagePriceBasis, UsageModelSchema, type UsageModel, UsageProjectSchema, type UsageProject, UsageSummaryPayloadSchema, type UsageSummaryPayload, UsageScanSchema, type UsageScan, UsagePricingSchema, type UsagePricing, UsageRootSchema, type UsageRoot, UsageRateSchema, type UsageRate, UsageSummaryResultSchema, type UsageSummaryResult, UsageChangedEventSchema, type UsageChangedEvent, UsageWindowSchema, type UsageWindow, type PaceStanding, type EvenPace, evenPace, UsageLimitsProviderSchema, type UsageLimitsProvider, UsageLimitsSnapshotSchema, type UsageLimitsSnapshot } from './usage.ts';
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,6 @@ export { SessionIdSchema } from './ids.js';
|
|
|
6
6
|
export { ModelOptionChoiceSchema, ModelOptionDescriptorSchema, ModelInfoSchema, ModelSelectionSchema, ModelCatalogProfileSchema, ModelCatalogEntrySchema, ModelCatalogDataSchema, RuntimeModeSchema, ProviderCapabilitiesSchema, ProviderPlatformSchema, ProviderSignInSchema, ProviderInstallSchema, ProviderInfoSchema, FRONTIER_PROVIDER_KINDS, API_PROVIDER_KINDS, providerGroupOf, pickerGroupsOf, ProviderListResultSchema, resumeCommandFor } from './model.js';
|
|
7
7
|
export { EmptySchema, AGENT_REQUEST_SCHEMAS, AGENT_EVENT_SCHEMAS } from './protocol.js';
|
|
8
8
|
export { ProviderAccountIdSchema, ProviderAccountVariableSchema, ProviderAccountSchema, ProviderAccountStateSchema, ProviderAccountStatusSchema, ProviderAccountMapSchema, ProviderAccountsSchema, ProviderAccountsSavePayloadSchema, ProviderAccountCreatePayloadSchema, ProviderAccountCreateResultSchema, ProviderAccountWatchLoginPayloadSchema, ProviderAccountsReorderPayloadSchema, orderedAccountIds, topAccountOf } from './provider-accounts.js';
|
|
9
|
-
export { isRecord } from './record.js';
|
|
10
9
|
export { TaskStatusSchema, TaskResultSchema, TaskSchema, TaskChangedEventSchema } from './task.js';
|
|
11
10
|
export { clipText, TOOL_OUTPUT_TAIL, appendToolOutput } from './text.js';
|
|
12
11
|
export { UsageProviderSchema, USAGE_PROVIDERS, UsageResolutionSchema, UsageTotalsSchema, EMPTY_TOTALS, totalTokensOf, addTotals, UsageAccountSchema, UsageBucketSchema, UsagePriceBasisSchema, UsageModelSchema, UsageProjectSchema, UsageSummaryPayloadSchema, UsageScanSchema, UsagePricingSchema, UsageRootSchema, UsageRateSchema, UsageSummaryResultSchema, UsageChangedEventSchema, UsageWindowSchema, evenPace, UsageLimitsProviderSchema, UsageLimitsSnapshotSchema } from './usage.js';
|
package/dist/protocol.d.ts
CHANGED
|
@@ -477,6 +477,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
477
477
|
agent: "agent";
|
|
478
478
|
user: "user";
|
|
479
479
|
}>>;
|
|
480
|
+
selection: z.ZodOptional<z.ZodObject<{
|
|
481
|
+
model: z.ZodString;
|
|
482
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
483
|
+
}, z.core.$strip>>;
|
|
480
484
|
label: z.ZodOptional<z.ZodString>;
|
|
481
485
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
482
486
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -1017,6 +1021,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1017
1021
|
agent: "agent";
|
|
1018
1022
|
user: "user";
|
|
1019
1023
|
}>>;
|
|
1024
|
+
selection: z.ZodOptional<z.ZodObject<{
|
|
1025
|
+
model: z.ZodString;
|
|
1026
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
1027
|
+
}, z.core.$strip>>;
|
|
1020
1028
|
label: z.ZodOptional<z.ZodString>;
|
|
1021
1029
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
1022
1030
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -1383,6 +1391,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1383
1391
|
agent: "agent";
|
|
1384
1392
|
user: "user";
|
|
1385
1393
|
}>>;
|
|
1394
|
+
selection: z.ZodOptional<z.ZodObject<{
|
|
1395
|
+
model: z.ZodString;
|
|
1396
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
1397
|
+
}, z.core.$strip>>;
|
|
1386
1398
|
label: z.ZodOptional<z.ZodString>;
|
|
1387
1399
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
1388
1400
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -1748,6 +1760,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
1748
1760
|
agent: "agent";
|
|
1749
1761
|
user: "user";
|
|
1750
1762
|
}>>;
|
|
1763
|
+
selection: z.ZodOptional<z.ZodObject<{
|
|
1764
|
+
model: z.ZodString;
|
|
1765
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
1766
|
+
}, z.core.$strip>>;
|
|
1751
1767
|
label: z.ZodOptional<z.ZodString>;
|
|
1752
1768
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
1753
1769
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -2511,6 +2527,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
2511
2527
|
agent: "agent";
|
|
2512
2528
|
user: "user";
|
|
2513
2529
|
}>>;
|
|
2530
|
+
selection: z.ZodOptional<z.ZodObject<{
|
|
2531
|
+
model: z.ZodString;
|
|
2532
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
2533
|
+
}, z.core.$strip>>;
|
|
2514
2534
|
label: z.ZodOptional<z.ZodString>;
|
|
2515
2535
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
2516
2536
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -2995,6 +3015,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
2995
3015
|
agent: "agent";
|
|
2996
3016
|
user: "user";
|
|
2997
3017
|
}>>;
|
|
3018
|
+
selection: z.ZodOptional<z.ZodObject<{
|
|
3019
|
+
model: z.ZodString;
|
|
3020
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
3021
|
+
}, z.core.$strip>>;
|
|
2998
3022
|
label: z.ZodOptional<z.ZodString>;
|
|
2999
3023
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
3000
3024
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -4241,6 +4265,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
|
|
|
4241
4265
|
agent: "agent";
|
|
4242
4266
|
user: "user";
|
|
4243
4267
|
}>>;
|
|
4268
|
+
selection: z.ZodOptional<z.ZodObject<{
|
|
4269
|
+
model: z.ZodString;
|
|
4270
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
4271
|
+
}, z.core.$strip>>;
|
|
4244
4272
|
label: z.ZodOptional<z.ZodString>;
|
|
4245
4273
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
4246
4274
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -5566,6 +5594,10 @@ export declare const AGENT_EVENT_SCHEMAS: {
|
|
|
5566
5594
|
agent: "agent";
|
|
5567
5595
|
user: "user";
|
|
5568
5596
|
}>>;
|
|
5597
|
+
selection: z.ZodOptional<z.ZodObject<{
|
|
5598
|
+
model: z.ZodString;
|
|
5599
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
5600
|
+
}, z.core.$strip>>;
|
|
5569
5601
|
label: z.ZodOptional<z.ZodString>;
|
|
5570
5602
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
5571
5603
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
|
@@ -6329,6 +6361,10 @@ export declare const AGENT_EVENT_SCHEMAS: {
|
|
|
6329
6361
|
agent: "agent";
|
|
6330
6362
|
user: "user";
|
|
6331
6363
|
}>>;
|
|
6364
|
+
selection: z.ZodOptional<z.ZodObject<{
|
|
6365
|
+
model: z.ZodString;
|
|
6366
|
+
options: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
6367
|
+
}, z.core.$strip>>;
|
|
6332
6368
|
label: z.ZodOptional<z.ZodString>;
|
|
6333
6369
|
taskToolUseId: z.ZodOptional<z.ZodString>;
|
|
6334
6370
|
endedAt: z.ZodNullable<z.ZodNumber>;
|
package/dist/visual.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { isRecord } from '@adecore/utils/record';
|
|
1
2
|
import { z } from 'zod';
|
|
2
|
-
import { isRecord } from './record.js';
|
|
3
3
|
import { visualViewportScript } from './visual-viewport.js';
|
|
4
4
|
/*
|
|
5
5
|
* What a host accepts when an agent publishes a visual. The schemas below check shapes only, so a
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adecore/agent-contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.54.0",
|
|
4
4
|
"description": "Schemas and port contracts for agent chats, provider accounts, models and usage.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -49,11 +49,6 @@
|
|
|
49
49
|
"types": "./dist/provider-accounts.d.ts",
|
|
50
50
|
"default": "./dist/provider-accounts.js"
|
|
51
51
|
},
|
|
52
|
-
"./record": {
|
|
53
|
-
"source": "./src/record.ts",
|
|
54
|
-
"types": "./dist/record.d.ts",
|
|
55
|
-
"default": "./dist/record.js"
|
|
56
|
-
},
|
|
57
52
|
"./task": {
|
|
58
53
|
"source": "./src/task.ts",
|
|
59
54
|
"types": "./dist/task.d.ts",
|
|
@@ -86,7 +81,8 @@
|
|
|
86
81
|
"test": "bun --conditions=source test"
|
|
87
82
|
},
|
|
88
83
|
"dependencies": {
|
|
89
|
-
"@adecore/intelligent-ui": "0.
|
|
84
|
+
"@adecore/intelligent-ui": "0.54.0",
|
|
85
|
+
"@adecore/utils": "0.54.0",
|
|
90
86
|
"zod": "^4.6.7"
|
|
91
87
|
},
|
|
92
88
|
"devDependencies": {
|
package/src/chat.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { UiLinkResolutionSchema } from '@adecore/intelligent-ui/links';
|
|
2
|
-
import { z } from 'zod';
|
|
3
2
|
import { UiBlocksSchema } from '@adecore/intelligent-ui/protocol';
|
|
3
|
+
import { z } from 'zod';
|
|
4
4
|
import { AgentKindSchema, AgentStatusSchema, SuggestedTitleSchema } from './agent.ts';
|
|
5
|
-
import { WorktreeSchema } from './worktree.ts';
|
|
6
5
|
import { ModelSelectionSchema, RuntimeModeSchema } from './model.ts';
|
|
7
6
|
import { ProviderAccountIdSchema } from './provider-accounts.ts';
|
|
8
7
|
import { ChatVisualsSchema } from './visual.ts';
|
|
8
|
+
import { WorktreeSchema } from './worktree.ts';
|
|
9
9
|
|
|
10
10
|
// The client picks the id (its node id), like a terminal session.
|
|
11
11
|
export const ChatIdSchema = z.string().min(1);
|
|
@@ -645,6 +645,8 @@ export const ChatTurnItemSchema = z.object({
|
|
|
645
645
|
state: z.enum(['running', 'done', 'aborted', 'error']),
|
|
646
646
|
// Who started the turn. Absent means the person did, which is what every turn written before this field was.
|
|
647
647
|
origin: z.enum(['user', 'agent']).optional(),
|
|
648
|
+
// The model and options the turn ran on, so a client can mark where they changed. Absent on turns from before this field.
|
|
649
|
+
selection: ModelSelectionSchema.optional(),
|
|
648
650
|
// What the CLI woke up about (the summary of a background task that settled); only an agent turn has one.
|
|
649
651
|
label: z.string().optional(),
|
|
650
652
|
// The Agent call the CLI woke up about, so the header can point at the subagent row it belongs to.
|
package/src/index.ts
CHANGED
package/src/visual.ts
CHANGED
package/dist/record.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
package/dist/record.js
DELETED
package/src/record.ts
DELETED