@adecore/agent-contracts 0.55.3 → 0.56.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/index.d.ts CHANGED
@@ -5,7 +5,7 @@ export { SessionIdSchema, type SessionId } from './ids.ts';
5
5
  export { ModelOptionChoiceSchema, type ModelOptionChoice, ModelOptionDescriptorSchema, type ModelOptionDescriptor, ModelInfoSchema, type ModelInfo, ModelSelectionSchema, type ModelSelection, ModelCatalogProfileSchema, type ModelCatalogProfile, ModelCatalogEntrySchema, type ModelCatalogEntry, ModelCatalogDataSchema, type ModelCatalogData, RuntimeModeSchema, type RuntimeMode, ProviderCapabilitiesSchema, type ProviderCapabilities, ProviderPlatformSchema, type ProviderPlatform, ProviderSignInSchema, type ProviderSignIn, ProviderInstallSchema, type ProviderInstall, ProviderInfoSchema, type ProviderInfo, FRONTIER_PROVIDER_KINDS, API_PROVIDER_KINDS, type ProviderPickerGroup, type ProviderPickerGroups, providerGroupOf, pickerGroupsOf, ProviderListResultSchema, type ProviderListResult, resumeCommandFor } from './model.ts';
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
- 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';
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, ProviderAccountsShareConfigPayloadSchema, type ProviderAccountsShareConfigPayload, orderedAccountIds, topAccountOf } from './provider-accounts.ts';
9
9
  export { TaskStatusSchema, type TaskStatus, TaskResultSchema, type TaskResult, TaskSchema, type Task, TaskChangedEventSchema, type TaskChangedEvent } from './task.ts';
10
10
  export { clipText, TOOL_OUTPUT_TAIL, appendToolOutput } from './text.ts';
11
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
@@ -5,7 +5,7 @@ export { ErrorSchema, RequestSchema, ReplyOkSchema, ReplyErrorSchema, ReplySchem
5
5
  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
- export { ProviderAccountIdSchema, ProviderAccountVariableSchema, ProviderAccountSchema, ProviderAccountStateSchema, ProviderAccountStatusSchema, ProviderAccountMapSchema, ProviderAccountsSchema, ProviderAccountsSavePayloadSchema, ProviderAccountCreatePayloadSchema, ProviderAccountCreateResultSchema, ProviderAccountWatchLoginPayloadSchema, ProviderAccountsReorderPayloadSchema, orderedAccountIds, topAccountOf } from './provider-accounts.js';
8
+ export { ProviderAccountIdSchema, ProviderAccountVariableSchema, ProviderAccountSchema, ProviderAccountStateSchema, ProviderAccountStatusSchema, ProviderAccountMapSchema, ProviderAccountsSchema, ProviderAccountsSavePayloadSchema, ProviderAccountCreatePayloadSchema, ProviderAccountCreateResultSchema, ProviderAccountWatchLoginPayloadSchema, ProviderAccountsReorderPayloadSchema, ProviderAccountsShareConfigPayloadSchema, orderedAccountIds, topAccountOf } from './provider-accounts.js';
9
9
  export { TaskStatusSchema, TaskResultSchema, TaskSchema, TaskChangedEventSchema } from './task.js';
10
10
  export { clipText, TOOL_OUTPUT_TAIL, appendToolOutput } from './text.js';
11
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';
@@ -4641,6 +4641,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4641
4641
  valueRedacted: z.ZodOptional<z.ZodBoolean>;
4642
4642
  }, z.core.$strip>>>;
4643
4643
  order: z.ZodOptional<z.ZodNumber>;
4644
+ shareConfig: z.ZodOptional<z.ZodBoolean>;
4644
4645
  }, z.core.$strip>>;
4645
4646
  statuses: z.ZodArray<z.ZodObject<{
4646
4647
  id: z.ZodString;
@@ -4667,6 +4668,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4667
4668
  loginCommands: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodString>>;
4668
4669
  chatLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4669
4670
  silentLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4671
+ sharedConfigKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
4670
4672
  }, z.core.$strip>;
4671
4673
  };
4672
4674
  readonly 'accounts.save': {
@@ -4685,6 +4687,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4685
4687
  valueRedacted: z.ZodOptional<z.ZodBoolean>;
4686
4688
  }, z.core.$strip>>>;
4687
4689
  order: z.ZodOptional<z.ZodNumber>;
4690
+ shareConfig: z.ZodOptional<z.ZodBoolean>;
4688
4691
  }, z.core.$strip>>;
4689
4692
  }, z.core.$strip>;
4690
4693
  readonly result: z.ZodObject<{
@@ -4702,6 +4705,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4702
4705
  valueRedacted: z.ZodOptional<z.ZodBoolean>;
4703
4706
  }, z.core.$strip>>>;
4704
4707
  order: z.ZodOptional<z.ZodNumber>;
4708
+ shareConfig: z.ZodOptional<z.ZodBoolean>;
4705
4709
  }, z.core.$strip>>;
4706
4710
  statuses: z.ZodArray<z.ZodObject<{
4707
4711
  id: z.ZodString;
@@ -4728,6 +4732,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4728
4732
  loginCommands: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodString>>;
4729
4733
  chatLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4730
4734
  silentLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4735
+ sharedConfigKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
4731
4736
  }, z.core.$strip>;
4732
4737
  };
4733
4738
  readonly 'accounts.refresh': {
@@ -4747,6 +4752,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4747
4752
  valueRedacted: z.ZodOptional<z.ZodBoolean>;
4748
4753
  }, z.core.$strip>>>;
4749
4754
  order: z.ZodOptional<z.ZodNumber>;
4755
+ shareConfig: z.ZodOptional<z.ZodBoolean>;
4750
4756
  }, z.core.$strip>>;
4751
4757
  statuses: z.ZodArray<z.ZodObject<{
4752
4758
  id: z.ZodString;
@@ -4773,6 +4779,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4773
4779
  loginCommands: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodString>>;
4774
4780
  chatLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4775
4781
  silentLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4782
+ sharedConfigKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
4776
4783
  }, z.core.$strip>;
4777
4784
  };
4778
4785
  readonly 'accounts.create': {
@@ -4796,6 +4803,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4796
4803
  valueRedacted: z.ZodOptional<z.ZodBoolean>;
4797
4804
  }, z.core.$strip>>>;
4798
4805
  order: z.ZodOptional<z.ZodNumber>;
4806
+ shareConfig: z.ZodOptional<z.ZodBoolean>;
4799
4807
  }, z.core.$strip>>;
4800
4808
  statuses: z.ZodArray<z.ZodObject<{
4801
4809
  id: z.ZodString;
@@ -4822,6 +4830,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4822
4830
  loginCommands: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodString>>;
4823
4831
  chatLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4824
4832
  silentLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4833
+ sharedConfigKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
4825
4834
  id: z.ZodString;
4826
4835
  }, z.core.$strip>;
4827
4836
  };
@@ -4851,6 +4860,7 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4851
4860
  valueRedacted: z.ZodOptional<z.ZodBoolean>;
4852
4861
  }, z.core.$strip>>>;
4853
4862
  order: z.ZodOptional<z.ZodNumber>;
4863
+ shareConfig: z.ZodOptional<z.ZodBoolean>;
4854
4864
  }, z.core.$strip>>;
4855
4865
  statuses: z.ZodArray<z.ZodObject<{
4856
4866
  id: z.ZodString;
@@ -4877,6 +4887,57 @@ export declare const AGENT_REQUEST_SCHEMAS: {
4877
4887
  loginCommands: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodString>>;
4878
4888
  chatLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4879
4889
  silentLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4890
+ sharedConfigKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
4891
+ }, z.core.$strip>;
4892
+ };
4893
+ readonly 'accounts.shareConfig': {
4894
+ readonly payload: z.ZodObject<{
4895
+ id: z.ZodString;
4896
+ shared: z.ZodBoolean;
4897
+ }, z.core.$strip>;
4898
+ readonly result: z.ZodObject<{
4899
+ accounts: z.ZodRecord<z.ZodString, z.ZodObject<{
4900
+ kind: z.ZodString;
4901
+ label: z.ZodOptional<z.ZodString>;
4902
+ color: z.ZodOptional<z.ZodString>;
4903
+ enabled: z.ZodOptional<z.ZodBoolean>;
4904
+ home: z.ZodOptional<z.ZodString>;
4905
+ shadowHome: z.ZodOptional<z.ZodString>;
4906
+ env: z.ZodOptional<z.ZodArray<z.ZodObject<{
4907
+ name: z.ZodString;
4908
+ value: z.ZodString;
4909
+ sensitive: z.ZodBoolean;
4910
+ valueRedacted: z.ZodOptional<z.ZodBoolean>;
4911
+ }, z.core.$strip>>>;
4912
+ order: z.ZodOptional<z.ZodNumber>;
4913
+ shareConfig: z.ZodOptional<z.ZodBoolean>;
4914
+ }, z.core.$strip>>;
4915
+ statuses: z.ZodArray<z.ZodObject<{
4916
+ id: z.ZodString;
4917
+ kind: z.ZodString;
4918
+ state: z.ZodEnum<{
4919
+ checking: "checking";
4920
+ disabled: "disabled";
4921
+ failed: "failed";
4922
+ "folder-missing": "folder-missing";
4923
+ "not-found": "not-found";
4924
+ ready: "ready";
4925
+ "signed-out": "signed-out";
4926
+ unavailable: "unavailable";
4927
+ }>;
4928
+ email: z.ZodNullable<z.ZodString>;
4929
+ plan: z.ZodNullable<z.ZodString>;
4930
+ organization: z.ZodNullable<z.ZodString>;
4931
+ home: z.ZodString;
4932
+ transcripts: z.ZodOptional<z.ZodString>;
4933
+ message: z.ZodNullable<z.ZodString>;
4934
+ checkedAt: z.ZodNumber;
4935
+ }, z.core.$strip>>;
4936
+ secretsAvailable: z.ZodOptional<z.ZodBoolean>;
4937
+ loginCommands: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodString>>;
4938
+ chatLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4939
+ silentLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
4940
+ sharedConfigKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
4880
4941
  }, z.core.$strip>;
4881
4942
  };
4882
4943
  readonly 'usage.summary': {
@@ -6738,6 +6799,7 @@ export declare const AGENT_EVENT_SCHEMAS: {
6738
6799
  valueRedacted: z.ZodOptional<z.ZodBoolean>;
6739
6800
  }, z.core.$strip>>>;
6740
6801
  order: z.ZodOptional<z.ZodNumber>;
6802
+ shareConfig: z.ZodOptional<z.ZodBoolean>;
6741
6803
  }, z.core.$strip>>;
6742
6804
  statuses: z.ZodArray<z.ZodObject<{
6743
6805
  id: z.ZodString;
@@ -6764,6 +6826,7 @@ export declare const AGENT_EVENT_SCHEMAS: {
6764
6826
  loginCommands: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodString>>;
6765
6827
  chatLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
6766
6828
  silentLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
6829
+ sharedConfigKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
6767
6830
  }, z.core.$strip>;
6768
6831
  };
6769
6832
  export type AgentRequestType = keyof typeof AGENT_REQUEST_SCHEMAS;
package/dist/protocol.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  import { ChatAddBookmarkPayloadSchema, ChatAnswerPayloadSchema, ChatApprovePayloadSchema, ChatAttachPayloadSchema, ChatAttachResultSchema, ChatBookmarksEventSchema, ChatBookmarksResultSchema, ChatCancelPayloadSchema, ChatClearPayloadSchema, ChatConfigurePayloadSchema, ChatContinueOnPayloadSchema, ChatContinueOnResultSchema, ChatCreatePayloadSchema, ChatDismissPayloadSchema, ChatEventEnvelopeSchema, ChatForkInfoPayloadSchema, ChatForkInfoResultSchema, ChatForkPayloadSchema, ChatForkResultSchema, ChatGoalPayloadSchema, ChatHistoryPayloadSchema, ChatHistoryResultSchema, ChatInfoSchema, ChatListResultSchema, ChatPreferencesPayloadSchema, ChatQueuePayloadSchema, ChatRemoveBookmarkPayloadSchema, ChatRemoveVisualPayloadSchema, ChatRenameBookmarkPayloadSchema, ChatSendPayloadSchema, ChatSendResultSchema, ChatUiChoicePayloadSchema, ChatUiLinkPayloadSchema, ChatUiLinkReadingSchema, ChatUiQueryPayloadSchema, ChatUiQueryReadingSchema, ChatStatusEventSchema, ChatStopSubagentPayloadSchema, ChatStopTaskPayloadSchema, ChatSubagentChangedEventSchema, ChatSubagentPayloadSchema, ChatSubagentResultSchema, ChatSummarizePayloadSchema, ChatSummarizeResultSchema, ChatTargetPayloadSchema, ChatTurnDiffPayloadSchema, ChatTurnDiffResultSchema, ChatToolOutputPayloadSchema, ChatToolOutputResultSchema, ChatUnqueueResultSchema, ChatVisualsEventSchema, ChatVisualsResultSchema, SkillsListPayloadSchema, SkillsListResultSchema } from './chat.js';
3
3
  import { ProviderListResultSchema } from './model.js';
4
- import { ProviderAccountCreatePayloadSchema, ProviderAccountCreateResultSchema, ProviderAccountWatchLoginPayloadSchema, ProviderAccountsReorderPayloadSchema, ProviderAccountsSavePayloadSchema, ProviderAccountsSchema } from './provider-accounts.js';
4
+ import { ProviderAccountCreatePayloadSchema, ProviderAccountCreateResultSchema, ProviderAccountWatchLoginPayloadSchema, ProviderAccountsReorderPayloadSchema, ProviderAccountsSavePayloadSchema, ProviderAccountsSchema, ProviderAccountsShareConfigPayloadSchema } from './provider-accounts.js';
5
5
  import { UsageChangedEventSchema, UsageLimitsSnapshotSchema, UsageSummaryPayloadSchema, UsageSummaryResultSchema } from './usage.js';
6
6
  export const EmptySchema = z.object({});
7
7
  /*
@@ -52,6 +52,7 @@ export const AGENT_REQUEST_SCHEMAS = {
52
52
  // Answers at once; what the CLI says arrives as `accounts.changed`.
53
53
  'accounts.watchLogin': { payload: ProviderAccountWatchLoginPayloadSchema, result: EmptySchema },
54
54
  'accounts.reorder': { payload: ProviderAccountsReorderPayloadSchema, result: ProviderAccountsSchema },
55
+ 'accounts.shareConfig': { payload: ProviderAccountsShareConfigPayloadSchema, result: ProviderAccountsSchema },
55
56
  'usage.summary': { payload: UsageSummaryPayloadSchema, result: UsageSummaryResultSchema },
56
57
  'usage.subscribe': { payload: EmptySchema, result: EmptySchema },
57
58
  'usage.unsubscribe': { payload: EmptySchema, result: EmptySchema },
@@ -22,6 +22,7 @@ export declare const ProviderAccountSchema: z.ZodObject<{
22
22
  valueRedacted: z.ZodOptional<z.ZodBoolean>;
23
23
  }, z.core.$strip>>>;
24
24
  order: z.ZodOptional<z.ZodNumber>;
25
+ shareConfig: z.ZodOptional<z.ZodBoolean>;
25
26
  }, z.core.$strip>;
26
27
  export type ProviderAccount = z.infer<typeof ProviderAccountSchema>;
27
28
  export declare const ProviderAccountStateSchema: z.ZodEnum<{
@@ -71,6 +72,7 @@ export declare const ProviderAccountMapSchema: z.ZodRecord<z.ZodString, z.ZodObj
71
72
  valueRedacted: z.ZodOptional<z.ZodBoolean>;
72
73
  }, z.core.$strip>>>;
73
74
  order: z.ZodOptional<z.ZodNumber>;
75
+ shareConfig: z.ZodOptional<z.ZodBoolean>;
74
76
  }, z.core.$strip>>;
75
77
  export type ProviderAccountMap = z.infer<typeof ProviderAccountMapSchema>;
76
78
  export declare const ProviderAccountsSchema: z.ZodObject<{
@@ -88,6 +90,7 @@ export declare const ProviderAccountsSchema: z.ZodObject<{
88
90
  valueRedacted: z.ZodOptional<z.ZodBoolean>;
89
91
  }, z.core.$strip>>>;
90
92
  order: z.ZodOptional<z.ZodNumber>;
93
+ shareConfig: z.ZodOptional<z.ZodBoolean>;
91
94
  }, z.core.$strip>>;
92
95
  statuses: z.ZodArray<z.ZodObject<{
93
96
  id: z.ZodString;
@@ -114,6 +117,7 @@ export declare const ProviderAccountsSchema: z.ZodObject<{
114
117
  loginCommands: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodString>>;
115
118
  chatLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
116
119
  silentLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
120
+ sharedConfigKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
117
121
  }, z.core.$strip>;
118
122
  export type ProviderAccounts = z.infer<typeof ProviderAccountsSchema>;
119
123
  export declare const ProviderAccountsSavePayloadSchema: z.ZodObject<{
@@ -131,6 +135,7 @@ export declare const ProviderAccountsSavePayloadSchema: z.ZodObject<{
131
135
  valueRedacted: z.ZodOptional<z.ZodBoolean>;
132
136
  }, z.core.$strip>>>;
133
137
  order: z.ZodOptional<z.ZodNumber>;
138
+ shareConfig: z.ZodOptional<z.ZodBoolean>;
134
139
  }, z.core.$strip>>;
135
140
  }, z.core.$strip>;
136
141
  export type ProviderAccountsSavePayload = z.infer<typeof ProviderAccountsSavePayloadSchema>;
@@ -139,6 +144,11 @@ export declare const ProviderAccountsReorderPayloadSchema: z.ZodObject<{
139
144
  ids: z.ZodArray<z.ZodString>;
140
145
  }, z.core.$strip>;
141
146
  export type ProviderAccountsReorderPayload = z.infer<typeof ProviderAccountsReorderPayloadSchema>;
147
+ export declare const ProviderAccountsShareConfigPayloadSchema: z.ZodObject<{
148
+ id: z.ZodString;
149
+ shared: z.ZodBoolean;
150
+ }, z.core.$strip>;
151
+ export type ProviderAccountsShareConfigPayload = z.infer<typeof ProviderAccountsShareConfigPayloadSchema>;
142
152
  export declare function orderedAccountIds(accounts: ProviderAccountMap, kind: string): string[];
143
153
  export declare function topAccountOf(accounts: ProviderAccountMap, kind: string): string;
144
154
  export declare const ProviderAccountCreatePayloadSchema: z.ZodObject<{
@@ -162,6 +172,7 @@ export declare const ProviderAccountCreateResultSchema: z.ZodObject<{
162
172
  valueRedacted: z.ZodOptional<z.ZodBoolean>;
163
173
  }, z.core.$strip>>>;
164
174
  order: z.ZodOptional<z.ZodNumber>;
175
+ shareConfig: z.ZodOptional<z.ZodBoolean>;
165
176
  }, z.core.$strip>>;
166
177
  statuses: z.ZodArray<z.ZodObject<{
167
178
  id: z.ZodString;
@@ -188,6 +199,7 @@ export declare const ProviderAccountCreateResultSchema: z.ZodObject<{
188
199
  loginCommands: z.ZodOptional<z.ZodRecord<z.ZodString & z.core.$partial, z.ZodString>>;
189
200
  chatLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
190
201
  silentLogins: z.ZodOptional<z.ZodArray<z.ZodString>>;
202
+ sharedConfigKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
191
203
  id: z.ZodString;
192
204
  }, z.core.$strip>;
193
205
  export type ProviderAccountCreateResult = z.infer<typeof ProviderAccountCreateResultSchema>;
@@ -33,7 +33,9 @@ export const ProviderAccountSchema = z.object({
33
33
  // Set on the CLI's environment after the login variables are taken off, so a key here is one a person chose.
34
34
  env: z.array(ProviderAccountVariableSchema).optional(),
35
35
  // Its place among the accounts of its CLI, lowest first; only `accounts.reorder` sets it, and a save without it keeps it.
36
- order: z.number().int().nonnegative().optional()
36
+ order: z.number().int().nonnegative().optional(),
37
+ // Absent is off. Whether this extra account reads the default account's instructions, skills, agents and commands; only `accounts.shareConfig` sets it, and a save without it keeps it.
38
+ shareConfig: z.boolean().optional()
37
39
  });
38
40
  export const ProviderAccountStateSchema = z.enum([
39
41
  'checking',
@@ -75,7 +77,9 @@ export const ProviderAccountsSchema = z.object({
75
77
  // The agent kinds that keep accounts in folders of their own but sign in from a chat, with no command to type.
76
78
  chatLogins: z.array(AgentKindSchema).optional(),
77
79
  // The agent kinds of `loginCommands` whose CLI cannot say who is signed in, so nothing notices a login end.
78
- silentLogins: z.array(AgentKindSchema).optional()
80
+ silentLogins: z.array(AgentKindSchema).optional(),
81
+ // The agent kinds whose extra accounts can share the default account's setup (`accounts.shareConfig`).
82
+ sharedConfigKinds: z.array(AgentKindSchema).optional()
79
83
  });
80
84
  /* The whole map: an id left out is removed, and its folder stays where it is. */
81
85
  export const ProviderAccountsSavePayloadSchema = z.object({
@@ -86,6 +90,11 @@ export const ProviderAccountsReorderPayloadSchema = z.object({
86
90
  kind: AgentKindSchema,
87
91
  ids: z.array(ProviderAccountIdSchema)
88
92
  });
93
+ /* Turns the sharing of the default account's setup on or off for one extra account. Refused for a default account and for a CLI that shares nothing. */
94
+ export const ProviderAccountsShareConfigPayloadSchema = z.object({
95
+ id: ProviderAccountIdSchema,
96
+ shared: z.boolean()
97
+ });
89
98
  /*
90
99
  * The ids of the accounts of one CLI in a person's order: the ordered ones first, then the default
91
100
  * account, then the rest by id, so a machine where nobody reordered keeps the default on top.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adecore/agent-contracts",
3
- "version": "0.55.3",
3
+ "version": "0.56.1",
4
4
  "description": "Schemas and port contracts for agent chats, provider accounts, models and usage.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -81,8 +81,8 @@
81
81
  "test": "bun --conditions=source test"
82
82
  },
83
83
  "dependencies": {
84
- "@adecore/intelligent-ui": "0.55.3",
85
- "@adecore/utils": "0.55.3",
84
+ "@adecore/intelligent-ui": "0.56.1",
85
+ "@adecore/utils": "0.56.1",
86
86
  "zod": "^4.6.7"
87
87
  },
88
88
  "devDependencies": {
package/src/index.ts CHANGED
@@ -353,6 +353,8 @@ export {
353
353
  type ProviderAccountWatchLoginPayload,
354
354
  ProviderAccountsReorderPayloadSchema,
355
355
  type ProviderAccountsReorderPayload,
356
+ ProviderAccountsShareConfigPayloadSchema,
357
+ type ProviderAccountsShareConfigPayload,
356
358
  orderedAccountIds,
357
359
  topAccountOf
358
360
  } from './provider-accounts.ts';
package/src/protocol.ts CHANGED
@@ -62,7 +62,8 @@ import {
62
62
  ProviderAccountWatchLoginPayloadSchema,
63
63
  ProviderAccountsReorderPayloadSchema,
64
64
  ProviderAccountsSavePayloadSchema,
65
- ProviderAccountsSchema
65
+ ProviderAccountsSchema,
66
+ ProviderAccountsShareConfigPayloadSchema
66
67
  } from './provider-accounts.ts';
67
68
  import { UsageChangedEventSchema, UsageLimitsSnapshotSchema, UsageSummaryPayloadSchema, UsageSummaryResultSchema } from './usage.ts';
68
69
 
@@ -116,6 +117,7 @@ export const AGENT_REQUEST_SCHEMAS = {
116
117
  // Answers at once; what the CLI says arrives as `accounts.changed`.
117
118
  'accounts.watchLogin': { payload: ProviderAccountWatchLoginPayloadSchema, result: EmptySchema },
118
119
  'accounts.reorder': { payload: ProviderAccountsReorderPayloadSchema, result: ProviderAccountsSchema },
120
+ 'accounts.shareConfig': { payload: ProviderAccountsShareConfigPayloadSchema, result: ProviderAccountsSchema },
119
121
  'usage.summary': { payload: UsageSummaryPayloadSchema, result: UsageSummaryResultSchema },
120
122
  'usage.subscribe': { payload: EmptySchema, result: EmptySchema },
121
123
  'usage.unsubscribe': { payload: EmptySchema, result: EmptySchema },
@@ -39,7 +39,9 @@ export const ProviderAccountSchema = z.object({
39
39
  // Set on the CLI's environment after the login variables are taken off, so a key here is one a person chose.
40
40
  env: z.array(ProviderAccountVariableSchema).optional(),
41
41
  // Its place among the accounts of its CLI, lowest first; only `accounts.reorder` sets it, and a save without it keeps it.
42
- order: z.number().int().nonnegative().optional()
42
+ order: z.number().int().nonnegative().optional(),
43
+ // Absent is off. Whether this extra account reads the default account's instructions, skills, agents and commands; only `accounts.shareConfig` sets it, and a save without it keeps it.
44
+ shareConfig: z.boolean().optional()
43
45
  });
44
46
  export type ProviderAccount = z.infer<typeof ProviderAccountSchema>;
45
47
 
@@ -89,7 +91,9 @@ export const ProviderAccountsSchema = z.object({
89
91
  // The agent kinds that keep accounts in folders of their own but sign in from a chat, with no command to type.
90
92
  chatLogins: z.array(AgentKindSchema).optional(),
91
93
  // The agent kinds of `loginCommands` whose CLI cannot say who is signed in, so nothing notices a login end.
92
- silentLogins: z.array(AgentKindSchema).optional()
94
+ silentLogins: z.array(AgentKindSchema).optional(),
95
+ // The agent kinds whose extra accounts can share the default account's setup (`accounts.shareConfig`).
96
+ sharedConfigKinds: z.array(AgentKindSchema).optional()
93
97
  });
94
98
  export type ProviderAccounts = z.infer<typeof ProviderAccountsSchema>;
95
99
 
@@ -106,6 +110,13 @@ export const ProviderAccountsReorderPayloadSchema = z.object({
106
110
  });
107
111
  export type ProviderAccountsReorderPayload = z.infer<typeof ProviderAccountsReorderPayloadSchema>;
108
112
 
113
+ /* Turns the sharing of the default account's setup on or off for one extra account. Refused for a default account and for a CLI that shares nothing. */
114
+ export const ProviderAccountsShareConfigPayloadSchema = z.object({
115
+ id: ProviderAccountIdSchema,
116
+ shared: z.boolean()
117
+ });
118
+ export type ProviderAccountsShareConfigPayload = z.infer<typeof ProviderAccountsShareConfigPayloadSchema>;
119
+
109
120
  /*
110
121
  * The ids of the accounts of one CLI in a person's order: the ordered ones first, then the default
111
122
  * account, then the rest by id, so a machine where nobody reordered keeps the default on top.