@adecore/agent-contracts 0.19.0 → 0.20.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/agent.d.ts CHANGED
@@ -17,6 +17,19 @@ export declare const AgentStatusSchema: z.ZodEnum<{
17
17
  export type AgentStatus = z.infer<typeof AgentStatusSchema>;
18
18
  export declare const SUGGESTED_TITLE_LIMIT = 80;
19
19
  export declare const SuggestedTitleSchema: z.ZodString;
20
+ export declare const AgentRequestSchema: z.ZodObject<{
21
+ id: z.ZodString;
22
+ source: z.ZodString;
23
+ kind: z.ZodEnum<{
24
+ approval: "approval";
25
+ question: "question";
26
+ }>;
27
+ toolName: z.ZodString;
28
+ title: z.ZodNullable<z.ZodString>;
29
+ text: z.ZodString;
30
+ createdAt: z.ZodNumber;
31
+ }, z.core.$strip>;
32
+ export type AgentRequest = z.infer<typeof AgentRequestSchema>;
20
33
  export declare const AgentInfoSchema: z.ZodObject<{
21
34
  kind: z.ZodEnum<{
22
35
  apple: "apple";
@@ -35,6 +48,18 @@ export declare const AgentInfoSchema: z.ZodObject<{
35
48
  "needs-you": "needs-you";
36
49
  running: "running";
37
50
  }>;
51
+ requests: z.ZodOptional<z.ZodArray<z.ZodObject<{
52
+ id: z.ZodString;
53
+ source: z.ZodString;
54
+ kind: z.ZodEnum<{
55
+ approval: "approval";
56
+ question: "question";
57
+ }>;
58
+ toolName: z.ZodString;
59
+ title: z.ZodNullable<z.ZodString>;
60
+ text: z.ZodString;
61
+ createdAt: z.ZodNumber;
62
+ }, z.core.$strip>>>;
38
63
  live: z.ZodBoolean;
39
64
  updatedAt: z.ZodNumber;
40
65
  }, z.core.$strip>;
@@ -59,6 +84,18 @@ export declare const SessionStatusEventSchema: z.ZodObject<{
59
84
  "needs-you": "needs-you";
60
85
  running: "running";
61
86
  }>;
87
+ requests: z.ZodOptional<z.ZodArray<z.ZodObject<{
88
+ id: z.ZodString;
89
+ source: z.ZodString;
90
+ kind: z.ZodEnum<{
91
+ approval: "approval";
92
+ question: "question";
93
+ }>;
94
+ toolName: z.ZodString;
95
+ title: z.ZodNullable<z.ZodString>;
96
+ text: z.ZodString;
97
+ createdAt: z.ZodNumber;
98
+ }, z.core.$strip>>>;
62
99
  live: z.ZodBoolean;
63
100
  updatedAt: z.ZodNumber;
64
101
  }, z.core.$strip>>;
package/dist/agent.js CHANGED
@@ -10,6 +10,15 @@ export const AgentStatusSchema = z.enum(['running', 'needs-you', 'idle', 'error'
10
10
  export const SUGGESTED_TITLE_LIMIT = 80;
11
11
  // Written by a model, so a node shows it as plain text and nothing reads it as an instruction.
12
12
  export const SuggestedTitleSchema = z.string().min(1).max(SUGGESTED_TITLE_LIMIT);
13
+ export const AgentRequestSchema = z.object({
14
+ id: z.string().min(1),
15
+ source: z.string(),
16
+ kind: z.enum(['approval', 'question']),
17
+ toolName: z.string(),
18
+ title: z.string().nullable(),
19
+ text: z.string(),
20
+ createdAt: z.number()
21
+ });
13
22
  export const AgentInfoSchema = z.object({
14
23
  kind: AgentKindSchema,
15
24
  // The CLI's own session id, what `--resume` takes.
@@ -18,6 +27,7 @@ export const AgentInfoSchema = z.object({
18
27
  // The name the CLI wrote down for the session; Claude Code and the Codex TUI write one.
19
28
  suggestedTitle: SuggestedTitleSchema.optional(),
20
29
  status: AgentStatusSchema,
30
+ requests: z.array(AgentRequestSchema).optional(),
21
31
  // False once the daemon came back after a restart: the CLI is gone but its session can be resumed.
22
32
  live: z.boolean(),
23
33
  updatedAt: z.number()
package/dist/chat.d.ts CHANGED
@@ -4833,9 +4833,18 @@ export declare const ChatAttachResultSchema: z.ZodObject<{
4833
4833
  }, z.core.$strip>>>;
4834
4834
  }, z.core.$strip>;
4835
4835
  export type ChatAttachResult = z.infer<typeof ChatAttachResultSchema>;
4836
+ export declare const ChatDeliverySchema: z.ZodEnum<{
4837
+ queue: "queue";
4838
+ steer: "steer";
4839
+ }>;
4840
+ export type ChatDelivery = z.infer<typeof ChatDeliverySchema>;
4836
4841
  export declare const ChatSendPayloadSchema: z.ZodObject<{
4837
4842
  chatId: z.ZodString;
4838
4843
  text: z.ZodString;
4844
+ delivery: z.ZodOptional<z.ZodEnum<{
4845
+ queue: "queue";
4846
+ steer: "steer";
4847
+ }>>;
4839
4848
  mentions: z.ZodOptional<z.ZodArray<z.ZodString>>;
4840
4849
  skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
4841
4850
  chats: z.ZodOptional<z.ZodArray<z.ZodString>>;
package/dist/chat.js CHANGED
@@ -636,10 +636,12 @@ export const ChatAttachResultSchema = z.object({
636
636
  // Absent from a host that keeps no visuals.
637
637
  visuals: ChatVisualsSchema.optional()
638
638
  });
639
+ export const ChatDeliverySchema = z.enum(['steer', 'queue']);
639
640
  export const ChatSendPayloadSchema = z
640
641
  .object({
641
642
  chatId: ChatIdSchema,
642
643
  text: z.string(),
644
+ delivery: ChatDeliverySchema.optional(),
643
645
  mentions: z.array(z.string().min(1)).max(64).optional(),
644
646
  skills: z.array(z.string().min(1)).max(16).optional(),
645
647
  chats: z.array(ChatIdSchema).max(16).optional(),
@@ -1858,6 +1858,10 @@ export declare const AGENT_REQUEST_SCHEMAS: {
1858
1858
  readonly payload: z.ZodObject<{
1859
1859
  chatId: z.ZodString;
1860
1860
  text: z.ZodString;
1861
+ delivery: z.ZodOptional<z.ZodEnum<{
1862
+ queue: "queue";
1863
+ steer: "steer";
1864
+ }>>;
1861
1865
  mentions: z.ZodOptional<z.ZodArray<z.ZodString>>;
1862
1866
  skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
1863
1867
  chats: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -30,7 +30,7 @@ window.addEventListener('message', function (event) {
30
30
  }
31
31
  if (!next || !Number.isFinite(next.top) || next.top < 0 || !Number.isFinite(next.height) || next.height <= 0) { return; }
32
32
  if (viewport === null) {
33
- style.textContent = 'html{overflow:hidden!important;scroll-behavior:auto!important;overflow-anchor:none!important}';
33
+ style.textContent = 'html{overflow-x:auto!important;overflow-y:hidden!important;scroll-behavior:auto!important;overflow-anchor:none!important}';
34
34
  }
35
35
  viewport = next;
36
36
  apply(next.top);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adecore/agent-contracts",
3
- "version": "0.19.0",
3
+ "version": "0.20.1",
4
4
  "description": "Schemas and port contracts for agent chats, provider accounts, models and usage.",
5
5
  "type": "module",
6
6
  "exports": {
package/src/agent.ts CHANGED
@@ -17,6 +17,17 @@ export const SUGGESTED_TITLE_LIMIT = 80;
17
17
  // Written by a model, so a node shows it as plain text and nothing reads it as an instruction.
18
18
  export const SuggestedTitleSchema = z.string().min(1).max(SUGGESTED_TITLE_LIMIT);
19
19
 
20
+ export const AgentRequestSchema = z.object({
21
+ id: z.string().min(1),
22
+ source: z.string(),
23
+ kind: z.enum(['approval', 'question']),
24
+ toolName: z.string(),
25
+ title: z.string().nullable(),
26
+ text: z.string(),
27
+ createdAt: z.number()
28
+ });
29
+ export type AgentRequest = z.infer<typeof AgentRequestSchema>;
30
+
20
31
  export const AgentInfoSchema = z.object({
21
32
  kind: AgentKindSchema,
22
33
  // The CLI's own session id, what `--resume` takes.
@@ -25,6 +36,7 @@ export const AgentInfoSchema = z.object({
25
36
  // The name the CLI wrote down for the session; Claude Code and the Codex TUI write one.
26
37
  suggestedTitle: SuggestedTitleSchema.optional(),
27
38
  status: AgentStatusSchema,
39
+ requests: z.array(AgentRequestSchema).optional(),
28
40
  // False once the daemon came back after a restart: the CLI is gone but its session can be resumed.
29
41
  live: z.boolean(),
30
42
  updatedAt: z.number()
package/src/chat.ts CHANGED
@@ -789,10 +789,14 @@ export const ChatAttachResultSchema = z.object({
789
789
  });
790
790
  export type ChatAttachResult = z.infer<typeof ChatAttachResultSchema>;
791
791
 
792
+ export const ChatDeliverySchema = z.enum(['steer', 'queue']);
793
+ export type ChatDelivery = z.infer<typeof ChatDeliverySchema>;
794
+
792
795
  export const ChatSendPayloadSchema = z
793
796
  .object({
794
797
  chatId: ChatIdSchema,
795
798
  text: z.string(),
799
+ delivery: ChatDeliverySchema.optional(),
796
800
  mentions: z.array(z.string().min(1)).max(64).optional(),
797
801
  skills: z.array(z.string().min(1)).max(16).optional(),
798
802
  chats: z.array(ChatIdSchema).max(16).optional(),
@@ -30,7 +30,7 @@ window.addEventListener('message', function (event) {
30
30
  }
31
31
  if (!next || !Number.isFinite(next.top) || next.top < 0 || !Number.isFinite(next.height) || next.height <= 0) { return; }
32
32
  if (viewport === null) {
33
- style.textContent = 'html{overflow:hidden!important;scroll-behavior:auto!important;overflow-anchor:none!important}';
33
+ style.textContent = 'html{overflow-x:auto!important;overflow-y:hidden!important;scroll-behavior:auto!important;overflow-anchor:none!important}';
34
34
  }
35
35
  viewport = next;
36
36
  apply(next.top);