@adecore/agent-contracts 0.20.0 → 0.21.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 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()