@nervekit/shared 0.1.0 → 0.2.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.
Files changed (135) hide show
  1. package/dist/core/index.d.ts +1 -0
  2. package/dist/core/index.d.ts.map +1 -1
  3. package/dist/core/index.js +1 -0
  4. package/dist/core/index.js.map +1 -1
  5. package/dist/core/inline-commands.d.ts +28 -0
  6. package/dist/core/inline-commands.d.ts.map +1 -0
  7. package/dist/core/inline-commands.js +104 -0
  8. package/dist/core/inline-commands.js.map +1 -0
  9. package/dist/domains/agents/agent.schema.d.ts +8 -8
  10. package/dist/domains/completions/completion.schema.d.ts +3 -3
  11. package/dist/domains/conversations/tree.schema.d.ts +6 -6
  12. package/dist/domains/filesystem/filesystem.schema.d.ts +4 -4
  13. package/dist/domains/git/git.schema.d.ts +14 -14
  14. package/dist/domains/logs/logs.schema.d.ts +6 -6
  15. package/dist/domains/plans/plan-review.schema.d.ts +2 -2
  16. package/dist/domains/providers/providers.schema.d.ts +4 -4
  17. package/dist/domains/settings/settings.schema.d.ts +2 -2
  18. package/dist/domains/status/status.schema.d.ts +2 -2
  19. package/dist/domains/storage/storage.schema.d.ts +24 -24
  20. package/dist/domains/tasks/task.schema.d.ts +15 -15
  21. package/dist/domains/tools/records.schema.d.ts +4 -4
  22. package/dist/domains/tools/tool-results.schema.d.ts +36 -36
  23. package/package.json +1 -1
  24. package/dist/agent-worker.d.ts +0 -66
  25. package/dist/agent-worker.d.ts.map +0 -1
  26. package/dist/agent-worker.js +0 -45
  27. package/dist/agent-worker.js.map +0 -1
  28. package/dist/agents.d.ts +0 -211
  29. package/dist/agents.d.ts.map +0 -1
  30. package/dist/agents.js +0 -105
  31. package/dist/agents.js.map +0 -1
  32. package/dist/api-errors.d.ts +0 -10
  33. package/dist/api-errors.d.ts.map +0 -1
  34. package/dist/api-errors.js +0 -9
  35. package/dist/api-errors.js.map +0 -1
  36. package/dist/auth.d.ts +0 -110
  37. package/dist/auth.d.ts.map +0 -1
  38. package/dist/auth.js +0 -82
  39. package/dist/auth.js.map +0 -1
  40. package/dist/conversation-title.d.ts +0 -2
  41. package/dist/conversation-title.d.ts.map +0 -1
  42. package/dist/conversation-title.js +0 -244
  43. package/dist/conversation-title.js.map +0 -1
  44. package/dist/conversation.d.ts +0 -269
  45. package/dist/conversation.d.ts.map +0 -1
  46. package/dist/conversation.js +0 -26
  47. package/dist/conversation.js.map +0 -1
  48. package/dist/conversations.d.ts +0 -219
  49. package/dist/conversations.d.ts.map +0 -1
  50. package/dist/conversations.js +0 -88
  51. package/dist/conversations.js.map +0 -1
  52. package/dist/core.d.ts +0 -4
  53. package/dist/core.d.ts.map +0 -1
  54. package/dist/core.js +0 -34
  55. package/dist/core.js.map +0 -1
  56. package/dist/domains/completions/completions.schema.d.ts +0 -21
  57. package/dist/domains/completions/completions.schema.d.ts.map +0 -1
  58. package/dist/domains/completions/completions.schema.js +0 -22
  59. package/dist/domains/completions/completions.schema.js.map +0 -1
  60. package/dist/domains/processes/index.d.ts +0 -2
  61. package/dist/domains/processes/index.d.ts.map +0 -1
  62. package/dist/domains/processes/index.js +0 -2
  63. package/dist/domains/processes/index.js.map +0 -1
  64. package/dist/domains/processes/process.schema.d.ts +0 -241
  65. package/dist/domains/processes/process.schema.d.ts.map +0 -1
  66. package/dist/domains/processes/process.schema.js +0 -106
  67. package/dist/domains/processes/process.schema.js.map +0 -1
  68. package/dist/events.d.ts +0 -17
  69. package/dist/events.d.ts.map +0 -1
  70. package/dist/events.js +0 -10
  71. package/dist/events.js.map +0 -1
  72. package/dist/filesystem.d.ts +0 -95
  73. package/dist/filesystem.d.ts.map +0 -1
  74. package/dist/filesystem.js +0 -56
  75. package/dist/filesystem.js.map +0 -1
  76. package/dist/git.d.ts +0 -386
  77. package/dist/git.d.ts.map +0 -1
  78. package/dist/git.js +0 -167
  79. package/dist/git.js.map +0 -1
  80. package/dist/logs.d.ts +0 -186
  81. package/dist/logs.d.ts.map +0 -1
  82. package/dist/logs.js +0 -84
  83. package/dist/logs.js.map +0 -1
  84. package/dist/models.d.ts +0 -49
  85. package/dist/models.d.ts.map +0 -1
  86. package/dist/models.js +0 -38
  87. package/dist/models.js.map +0 -1
  88. package/dist/pinned-commands.d.ts +0 -30
  89. package/dist/pinned-commands.d.ts.map +0 -1
  90. package/dist/pinned-commands.js +0 -19
  91. package/dist/pinned-commands.js.map +0 -1
  92. package/dist/plans.d.ts +0 -40
  93. package/dist/plans.d.ts.map +0 -1
  94. package/dist/plans.js +0 -34
  95. package/dist/plans.js.map +0 -1
  96. package/dist/processes.d.ts +0 -195
  97. package/dist/processes.d.ts.map +0 -1
  98. package/dist/processes.js +0 -86
  99. package/dist/processes.js.map +0 -1
  100. package/dist/projects.d.ts +0 -50
  101. package/dist/projects.d.ts.map +0 -1
  102. package/dist/projects.js +0 -38
  103. package/dist/projects.js.map +0 -1
  104. package/dist/settings.d.ts +0 -136
  105. package/dist/settings.d.ts.map +0 -1
  106. package/dist/settings.js +0 -124
  107. package/dist/settings.js.map +0 -1
  108. package/dist/status.d.ts +0 -39
  109. package/dist/status.d.ts.map +0 -1
  110. package/dist/status.js +0 -38
  111. package/dist/status.js.map +0 -1
  112. package/dist/suspensions.d.ts +0 -55
  113. package/dist/suspensions.d.ts.map +0 -1
  114. package/dist/suspensions.js +0 -38
  115. package/dist/suspensions.js.map +0 -1
  116. package/dist/tool-results.d.ts +0 -369
  117. package/dist/tool-results.d.ts.map +0 -1
  118. package/dist/tool-results.js +0 -117
  119. package/dist/tool-results.js.map +0 -1
  120. package/dist/tools.d.ts +0 -277
  121. package/dist/tools.d.ts.map +0 -1
  122. package/dist/tools.js +0 -127
  123. package/dist/tools.js.map +0 -1
  124. package/dist/transcription.d.ts +0 -8
  125. package/dist/transcription.d.ts.map +0 -1
  126. package/dist/transcription.js +0 -7
  127. package/dist/transcription.js.map +0 -1
  128. package/dist/usage.d.ts +0 -70
  129. package/dist/usage.d.ts.map +0 -1
  130. package/dist/usage.js +0 -35
  131. package/dist/usage.js.map +0 -1
  132. package/dist/workers.d.ts +0 -36
  133. package/dist/workers.d.ts.map +0 -1
  134. package/dist/workers.js +0 -22
  135. package/dist/workers.js.map +0 -1
package/dist/status.d.ts DELETED
@@ -1,39 +0,0 @@
1
- import { z } from "zod";
2
- export declare const statusResponseSchema: z.ZodObject<{
3
- daemonId: z.ZodString;
4
- version: z.ZodString;
5
- startedAt: z.ZodString;
6
- dataDir: z.ZodString;
7
- storage: z.ZodObject<{
8
- home: z.ZodString;
9
- sqlitePath: z.ZodString;
10
- indexHealthy: z.ZodBoolean;
11
- }, z.core.$strip>;
12
- }, z.core.$strip>;
13
- export type StatusResponse = z.infer<typeof statusResponseSchema>;
14
- export declare const daemonFileSchema: z.ZodObject<{
15
- daemonId: z.ZodString;
16
- pid: z.ZodNumber;
17
- host: z.ZodString;
18
- port: z.ZodNumber;
19
- url: z.ZodString;
20
- startedAt: z.ZodString;
21
- dataDir: z.ZodString;
22
- version: z.ZodString;
23
- }, z.core.$strip>;
24
- export type DaemonFile = z.infer<typeof daemonFileSchema>;
25
- export declare const storageInfoSchema: z.ZodObject<{
26
- dataDir: z.ZodString;
27
- sqlitePath: z.ZodString;
28
- configPath: z.ZodString;
29
- counts: z.ZodOptional<z.ZodObject<{
30
- projects: z.ZodNumber;
31
- conversations: z.ZodNumber;
32
- agents: z.ZodNumber;
33
- events: z.ZodNumber;
34
- processes: z.ZodNumber;
35
- workers: z.ZodNumber;
36
- }, z.core.$strip>>;
37
- }, z.core.$strip>;
38
- export type StorageInfo = z.infer<typeof storageInfoSchema>;
39
- //# sourceMappingURL=status.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,oBAAoB;;;;;;;;;;iBAU/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,gBAAgB;;;;;;;;;iBAS3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;iBAc5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
package/dist/status.js DELETED
@@ -1,38 +0,0 @@
1
- import { z } from "zod";
2
- export const statusResponseSchema = z.object({
3
- daemonId: z.string().startsWith("daemon_"),
4
- version: z.string(),
5
- startedAt: z.string().datetime(),
6
- dataDir: z.string(),
7
- storage: z.object({
8
- home: z.string(),
9
- sqlitePath: z.string(),
10
- indexHealthy: z.boolean(),
11
- }),
12
- });
13
- export const daemonFileSchema = z.object({
14
- daemonId: z.string().startsWith("daemon_"),
15
- pid: z.number().int().positive(),
16
- host: z.string(),
17
- port: z.number().int().positive(),
18
- url: z.string().url(),
19
- startedAt: z.string().datetime(),
20
- dataDir: z.string(),
21
- version: z.string(),
22
- });
23
- export const storageInfoSchema = z.object({
24
- dataDir: z.string(),
25
- sqlitePath: z.string(),
26
- configPath: z.string(),
27
- counts: z
28
- .object({
29
- projects: z.number().int().nonnegative(),
30
- conversations: z.number().int().nonnegative(),
31
- agents: z.number().int().nonnegative(),
32
- events: z.number().int().nonnegative(),
33
- processes: z.number().int().nonnegative(),
34
- workers: z.number().int().nonnegative(),
35
- })
36
- .optional(),
37
- });
38
- //# sourceMappingURL=status.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"status.js","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,C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WAAW,EAAE;QACxC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;QAC7C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;QACtC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;QACtC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;QACzC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;KACxC,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAC"}
@@ -1,55 +0,0 @@
1
- import { z } from "zod";
2
- export declare const suspensionStatusSchema: z.ZodEnum<{
3
- error: "error";
4
- cancelled: "cancelled";
5
- pending: "pending";
6
- resuming: "resuming";
7
- resumed: "resumed";
8
- }>;
9
- export type SuspensionStatus = z.infer<typeof suspensionStatusSchema>;
10
- export declare const suspendedToolNameSchema: z.ZodEnum<{
11
- ask_user: "ask_user";
12
- plan_mode_present: "plan_mode_present";
13
- }>;
14
- export type SuspendedToolName = z.infer<typeof suspendedToolNameSchema>;
15
- export declare const remainingToolCallSchema: z.ZodObject<{
16
- id: z.ZodString;
17
- name: z.ZodString;
18
- arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
19
- }, z.core.$strip>;
20
- export type RemainingToolCall = z.infer<typeof remainingToolCallSchema>;
21
- export declare const agentSuspensionRecordSchema: z.ZodObject<{
22
- id: z.ZodString;
23
- agentId: z.ZodString;
24
- conversationId: z.ZodString;
25
- projectId: z.ZodString;
26
- runId: z.ZodString;
27
- turnId: z.ZodOptional<z.ZodString>;
28
- liveMessageId: z.ZodOptional<z.ZodString>;
29
- assistantEntryId: z.ZodOptional<z.ZodString>;
30
- toolCallId: z.ZodString;
31
- providerToolCallId: z.ZodString;
32
- toolName: z.ZodEnum<{
33
- ask_user: "ask_user";
34
- plan_mode_present: "plan_mode_present";
35
- }>;
36
- remainingToolCalls: z.ZodDefault<z.ZodArray<z.ZodObject<{
37
- id: z.ZodString;
38
- name: z.ZodString;
39
- arguments: z.ZodRecord<z.ZodString, z.ZodUnknown>;
40
- }, z.core.$strip>>>;
41
- status: z.ZodEnum<{
42
- error: "error";
43
- cancelled: "cancelled";
44
- pending: "pending";
45
- resuming: "resuming";
46
- resumed: "resumed";
47
- }>;
48
- reason: z.ZodString;
49
- createdAt: z.ZodString;
50
- updatedAt: z.ZodString;
51
- resolvedAt: z.ZodOptional<z.ZodString>;
52
- error: z.ZodOptional<z.ZodString>;
53
- }, z.core.$strip>;
54
- export type AgentSuspensionRecord = z.infer<typeof agentSuspensionRecordSchema>;
55
- //# sourceMappingURL=suspensions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"suspensions.d.ts","sourceRoot":"","sources":["../src/suspensions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,sBAAsB;;;;;;EAMjC,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,uBAAuB;;;EAGlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,uBAAuB;;;;iBAIlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmBtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
@@ -1,38 +0,0 @@
1
- import { z } from "zod";
2
- export const suspensionStatusSchema = z.enum([
3
- "pending",
4
- "resuming",
5
- "resumed",
6
- "cancelled",
7
- "error",
8
- ]);
9
- export const suspendedToolNameSchema = z.enum([
10
- "ask_user",
11
- "plan_mode_present",
12
- ]);
13
- export const remainingToolCallSchema = z.object({
14
- id: z.string().min(1),
15
- name: z.string().min(1),
16
- arguments: z.record(z.string(), z.unknown()),
17
- });
18
- export const agentSuspensionRecordSchema = z.object({
19
- id: z.string().startsWith("susp_"),
20
- agentId: z.string().startsWith("agent_"),
21
- conversationId: z.string().startsWith("conv_"),
22
- projectId: z.string().startsWith("proj_"),
23
- runId: z.string().startsWith("run_"),
24
- turnId: z.string().startsWith("turn_").optional(),
25
- liveMessageId: z.string().startsWith("msg_").optional(),
26
- assistantEntryId: z.string().startsWith("entry_").optional(),
27
- toolCallId: z.string().startsWith("tool_"),
28
- providerToolCallId: z.string().min(1),
29
- toolName: suspendedToolNameSchema,
30
- remainingToolCalls: z.array(remainingToolCallSchema).default([]),
31
- status: suspensionStatusSchema,
32
- reason: z.string(),
33
- createdAt: z.string().datetime(),
34
- updatedAt: z.string().datetime(),
35
- resolvedAt: z.string().datetime().optional(),
36
- error: z.string().optional(),
37
- });
38
- //# sourceMappingURL=suspensions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"suspensions.js","sourceRoot":"","sources":["../src/suspensions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC3C,SAAS;IACT,UAAU;IACV,SAAS;IACT,WAAW;IACX,OAAO;CACR,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC5C,UAAU;IACV,mBAAmB;CACpB,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,EAAE,EAAE,CAAC,C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AsB;IAC9B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC5C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC,CAAC"}
@@ -1,369 +0,0 @@
1
- import { z } from "zod";
2
- /**
3
- * Result contracts shared between the `@nerve/tools` executors (producers) and the
4
- * web UI (consumers). The persisted `toolCallRecordSchema.result` stays `z.unknown()`
5
- * because results are heterogeneous across tools; these schemas let consumers narrow
6
- * a result per tool via `safeParse` without throwing on partial/legacy payloads.
7
- */
8
- export declare const toolTextContentSchema: z.ZodObject<{
9
- type: z.ZodLiteral<"text">;
10
- text: z.ZodString;
11
- }, z.core.$strip>;
12
- export type ToolTextContentPayload = z.infer<typeof toolTextContentSchema>;
13
- export declare const toolImageContentSchema: z.ZodObject<{
14
- type: z.ZodLiteral<"image">;
15
- data: z.ZodString;
16
- mimeType: z.ZodString;
17
- }, z.core.$strip>;
18
- export type ToolImageContentPayload = z.infer<typeof toolImageContentSchema>;
19
- export declare const toolContentBlockSchema: z.ZodUnion<readonly [z.ZodObject<{
20
- type: z.ZodLiteral<"text">;
21
- text: z.ZodString;
22
- }, z.core.$strip>, z.ZodObject<{
23
- type: z.ZodLiteral<"image">;
24
- data: z.ZodString;
25
- mimeType: z.ZodString;
26
- }, z.core.$strip>]>;
27
- export type ToolContentBlockPayload = z.infer<typeof toolContentBlockSchema>;
28
- /** Loose envelope covering the `details.truncation` shapes emitted by file tools. */
29
- export declare const truncationDetailsSchema: z.ZodObject<{
30
- truncated: z.ZodOptional<z.ZodBoolean>;
31
- omittedLines: z.ZodOptional<z.ZodNumber>;
32
- nextOffset: z.ZodOptional<z.ZodNumber>;
33
- maxLines: z.ZodOptional<z.ZodNumber>;
34
- }, z.core.$loose>;
35
- export type TruncationDetails = z.infer<typeof truncationDetailsSchema>;
36
- export declare const editResultDetailsSchema: z.ZodObject<{
37
- diff: z.ZodString;
38
- firstChangedLine: z.ZodOptional<z.ZodNumber>;
39
- lineEnding: z.ZodUnion<readonly [z.ZodLiteral<"\n">, z.ZodLiteral<"\r\n">]>;
40
- bom: z.ZodBoolean;
41
- }, z.core.$strip>;
42
- export type EditResultDetails = z.infer<typeof editResultDetailsSchema>;
43
- export declare const bashResultDetailsSchema: z.ZodObject<{
44
- truncation: z.ZodOptional<z.ZodObject<{
45
- truncated: z.ZodOptional<z.ZodBoolean>;
46
- omittedLines: z.ZodOptional<z.ZodNumber>;
47
- nextOffset: z.ZodOptional<z.ZodNumber>;
48
- maxLines: z.ZodOptional<z.ZodNumber>;
49
- }, z.core.$loose>>;
50
- fullOutputPath: z.ZodOptional<z.ZodString>;
51
- signal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
52
- }, z.core.$loose>;
53
- export type BashResultDetails = z.infer<typeof bashResultDetailsSchema>;
54
- export declare const fileEntrySchema: z.ZodObject<{
55
- path: z.ZodString;
56
- kind: z.ZodEnum<{
57
- file: "file";
58
- directory: "directory";
59
- other: "other";
60
- }>;
61
- }, z.core.$strip>;
62
- export type FileEntry = z.infer<typeof fileEntrySchema>;
63
- export declare const grepMatchSchema: z.ZodObject<{
64
- path: z.ZodString;
65
- line: z.ZodNumber;
66
- text: z.ZodString;
67
- }, z.core.$strip>;
68
- export type GrepMatch = z.infer<typeof grepMatchSchema>;
69
- export declare const webSearchResultDetailsSchema: z.ZodObject<{
70
- query: z.ZodString;
71
- answer: z.ZodOptional<z.ZodString>;
72
- results: z.ZodArray<z.ZodObject<{
73
- title: z.ZodString;
74
- url: z.ZodString;
75
- }, z.core.$strip>>;
76
- }, z.core.$strip>;
77
- export type WebSearchResultDetails = z.infer<typeof webSearchResultDetailsSchema>;
78
- export declare const webFetchResultDetailsSchema: z.ZodObject<{
79
- url: z.ZodString;
80
- status: z.ZodNumber;
81
- contentType: z.ZodString;
82
- size: z.ZodNumber;
83
- savedTo: z.ZodOptional<z.ZodString>;
84
- converted: z.ZodBoolean;
85
- }, z.core.$strip>;
86
- export type WebFetchResultDetails = z.infer<typeof webFetchResultDetailsSchema>;
87
- /** File-tool result envelope (read/write/edit/grep/find/ls/bash/web_fetch/web_search). */
88
- export declare const toolExecutionResultSchema: z.ZodObject<{
89
- content: z.ZodOptional<z.ZodString>;
90
- contentBlocks: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
91
- type: z.ZodLiteral<"text">;
92
- text: z.ZodString;
93
- }, z.core.$strip>, z.ZodObject<{
94
- type: z.ZodLiteral<"image">;
95
- data: z.ZodString;
96
- mimeType: z.ZodString;
97
- }, z.core.$strip>]>>>;
98
- details: z.ZodOptional<z.ZodUnknown>;
99
- path: z.ZodOptional<z.ZodString>;
100
- entries: z.ZodOptional<z.ZodArray<z.ZodObject<{
101
- path: z.ZodString;
102
- kind: z.ZodEnum<{
103
- file: "file";
104
- directory: "directory";
105
- other: "other";
106
- }>;
107
- }, z.core.$strip>>>;
108
- matches: z.ZodOptional<z.ZodArray<z.ZodObject<{
109
- path: z.ZodString;
110
- line: z.ZodNumber;
111
- text: z.ZodString;
112
- }, z.core.$strip>>>;
113
- stdout: z.ZodOptional<z.ZodString>;
114
- stderr: z.ZodOptional<z.ZodString>;
115
- exitCode: z.ZodOptional<z.ZodNumber>;
116
- }, z.core.$strip>;
117
- export type ToolExecutionResultPayload = z.infer<typeof toolExecutionResultSchema>;
118
- /** Result of process_start / process_stop / process_restart. */
119
- export declare const processActionResultSchema: z.ZodObject<{
120
- process: z.ZodObject<{
121
- id: z.ZodString;
122
- name: z.ZodOptional<z.ZodString>;
123
- workerId: z.ZodOptional<z.ZodString>;
124
- projectId: z.ZodOptional<z.ZodString>;
125
- conversationId: z.ZodOptional<z.ZodString>;
126
- agentId: z.ZodOptional<z.ZodString>;
127
- cwd: z.ZodString;
128
- command: z.ZodString;
129
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
130
- status: z.ZodEnum<{
131
- error: "error";
132
- running: "running";
133
- starting: "starting";
134
- ready: "ready";
135
- stopping: "stopping";
136
- stopped: "stopped";
137
- exited: "exited";
138
- orphaned: "orphaned";
139
- }>;
140
- readiness: z.ZodObject<{
141
- readyOnUrl: z.ZodOptional<z.ZodBoolean>;
142
- readyPattern: z.ZodOptional<z.ZodString>;
143
- timeoutMs: z.ZodOptional<z.ZodNumber>;
144
- outcome: z.ZodEnum<{
145
- ready: "ready";
146
- exited: "exited";
147
- pending: "pending";
148
- timeout: "timeout";
149
- none: "none";
150
- }>;
151
- matched: z.ZodOptional<z.ZodString>;
152
- readyAt: z.ZodOptional<z.ZodString>;
153
- }, z.core.$strip>;
154
- stdoutPath: z.ZodString;
155
- stderrPath: z.ZodString;
156
- logsPath: z.ZodString;
157
- startedAt: z.ZodString;
158
- updatedAt: z.ZodString;
159
- exitedAt: z.ZodOptional<z.ZodString>;
160
- exitCode: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
161
- signal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
162
- error: z.ZodOptional<z.ZodString>;
163
- restartedFromProcessId: z.ZodOptional<z.ZodString>;
164
- }, z.core.$strip>;
165
- }, z.core.$strip>;
166
- export type ProcessActionResult = z.infer<typeof processActionResultSchema>;
167
- /** Result of process_list. */
168
- export declare const processListResultSchema: z.ZodObject<{
169
- processes: z.ZodArray<z.ZodObject<{
170
- id: z.ZodString;
171
- name: z.ZodOptional<z.ZodString>;
172
- workerId: z.ZodOptional<z.ZodString>;
173
- projectId: z.ZodOptional<z.ZodString>;
174
- conversationId: z.ZodOptional<z.ZodString>;
175
- agentId: z.ZodOptional<z.ZodString>;
176
- cwd: z.ZodString;
177
- command: z.ZodString;
178
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
179
- status: z.ZodEnum<{
180
- error: "error";
181
- running: "running";
182
- starting: "starting";
183
- ready: "ready";
184
- stopping: "stopping";
185
- stopped: "stopped";
186
- exited: "exited";
187
- orphaned: "orphaned";
188
- }>;
189
- readiness: z.ZodObject<{
190
- readyOnUrl: z.ZodOptional<z.ZodBoolean>;
191
- readyPattern: z.ZodOptional<z.ZodString>;
192
- timeoutMs: z.ZodOptional<z.ZodNumber>;
193
- outcome: z.ZodEnum<{
194
- ready: "ready";
195
- exited: "exited";
196
- pending: "pending";
197
- timeout: "timeout";
198
- none: "none";
199
- }>;
200
- matched: z.ZodOptional<z.ZodString>;
201
- readyAt: z.ZodOptional<z.ZodString>;
202
- }, z.core.$strip>;
203
- stdoutPath: z.ZodString;
204
- stderrPath: z.ZodString;
205
- logsPath: z.ZodString;
206
- startedAt: z.ZodString;
207
- updatedAt: z.ZodString;
208
- exitedAt: z.ZodOptional<z.ZodString>;
209
- exitCode: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
210
- signal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
211
- error: z.ZodOptional<z.ZodString>;
212
- restartedFromProcessId: z.ZodOptional<z.ZodString>;
213
- }, z.core.$strip>>;
214
- }, z.core.$strip>;
215
- export type ProcessListResult = z.infer<typeof processListResultSchema>;
216
- /** Result of process_logs (re-export of the existing query response shape). */
217
- export declare const processLogsResultSchema: z.ZodObject<{
218
- process: z.ZodObject<{
219
- id: z.ZodString;
220
- name: z.ZodOptional<z.ZodString>;
221
- workerId: z.ZodOptional<z.ZodString>;
222
- projectId: z.ZodOptional<z.ZodString>;
223
- conversationId: z.ZodOptional<z.ZodString>;
224
- agentId: z.ZodOptional<z.ZodString>;
225
- cwd: z.ZodString;
226
- command: z.ZodString;
227
- env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
228
- status: z.ZodEnum<{
229
- error: "error";
230
- running: "running";
231
- starting: "starting";
232
- ready: "ready";
233
- stopping: "stopping";
234
- stopped: "stopped";
235
- exited: "exited";
236
- orphaned: "orphaned";
237
- }>;
238
- readiness: z.ZodObject<{
239
- readyOnUrl: z.ZodOptional<z.ZodBoolean>;
240
- readyPattern: z.ZodOptional<z.ZodString>;
241
- timeoutMs: z.ZodOptional<z.ZodNumber>;
242
- outcome: z.ZodEnum<{
243
- ready: "ready";
244
- exited: "exited";
245
- pending: "pending";
246
- timeout: "timeout";
247
- none: "none";
248
- }>;
249
- matched: z.ZodOptional<z.ZodString>;
250
- readyAt: z.ZodOptional<z.ZodString>;
251
- }, z.core.$strip>;
252
- stdoutPath: z.ZodString;
253
- stderrPath: z.ZodString;
254
- logsPath: z.ZodString;
255
- startedAt: z.ZodString;
256
- updatedAt: z.ZodString;
257
- exitedAt: z.ZodOptional<z.ZodString>;
258
- exitCode: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
259
- signal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
260
- error: z.ZodOptional<z.ZodString>;
261
- restartedFromProcessId: z.ZodOptional<z.ZodString>;
262
- }, z.core.$strip>;
263
- events: z.ZodArray<z.ZodObject<{
264
- seq: z.ZodNumber;
265
- ts: z.ZodString;
266
- stream: z.ZodEnum<{
267
- stdout: "stdout";
268
- stderr: "stderr";
269
- }>;
270
- level: z.ZodEnum<{
271
- info: "info";
272
- warn: "warn";
273
- error: "error";
274
- }>;
275
- line: z.ZodString;
276
- }, z.core.$strip>>;
277
- nextCursor: z.ZodNumber;
278
- mode: z.ZodString;
279
- }, z.core.$strip>;
280
- export type ProcessLogsResult = z.infer<typeof processLogsResultSchema>;
281
- /** Result of subagent_run. */
282
- export declare const subagentRunResultSchema: z.ZodObject<{
283
- agent: z.ZodObject<{
284
- id: z.ZodString;
285
- conversationId: z.ZodString;
286
- projectId: z.ZodString;
287
- projectDir: z.ZodString;
288
- workerId: z.ZodOptional<z.ZodString>;
289
- parentAgentId: z.ZodOptional<z.ZodString>;
290
- rootAgentId: z.ZodString;
291
- mode: z.ZodEnum<{
292
- planning: "planning";
293
- coding: "coding";
294
- }>;
295
- permissionLevel: z.ZodEnum<{
296
- autonomous: "autonomous";
297
- supervised: "supervised";
298
- read_only: "read_only";
299
- }>;
300
- workspaceScope: z.ZodObject<{
301
- roots: z.ZodArray<z.ZodString>;
302
- readonly: z.ZodOptional<z.ZodBoolean>;
303
- }, z.core.$strip>;
304
- budget: z.ZodDefault<z.ZodObject<{
305
- depth: z.ZodDefault<z.ZodNumber>;
306
- maxDepth: z.ZodDefault<z.ZodNumber>;
307
- maxRuns: z.ZodDefault<z.ZodNumber>;
308
- usedRuns: z.ZodDefault<z.ZodNumber>;
309
- }, z.core.$strip>>;
310
- model: z.ZodOptional<z.ZodObject<{
311
- provider: z.ZodString;
312
- modelId: z.ZodString;
313
- }, z.core.$strip>>;
314
- thinkingLevel: z.ZodDefault<z.ZodEnum<{
315
- off: "off";
316
- minimal: "minimal";
317
- low: "low";
318
- medium: "medium";
319
- high: "high";
320
- xhigh: "xhigh";
321
- }>>;
322
- status: z.ZodEnum<{
323
- error: "error";
324
- idle: "idle";
325
- running: "running";
326
- awaiting_user: "awaiting_user";
327
- aborted: "aborted";
328
- }>;
329
- createdAt: z.ZodString;
330
- updatedAt: z.ZodString;
331
- }, z.core.$strip>;
332
- summary: z.ZodString;
333
- }, z.core.$strip>;
334
- export type SubagentRunResultPayload = z.infer<typeof subagentRunResultSchema>;
335
- /** Result of ask_user (resolved question). */
336
- export declare const askUserResultSchema: z.ZodObject<{
337
- question: z.ZodString;
338
- context: z.ZodOptional<z.ZodString>;
339
- recommendation: z.ZodOptional<z.ZodString>;
340
- response: z.ZodOptional<z.ZodString>;
341
- dismissed: z.ZodOptional<z.ZodBoolean>;
342
- dismissedReason: z.ZodOptional<z.ZodString>;
343
- }, z.core.$strip>;
344
- export type AskUserResult = z.infer<typeof askUserResultSchema>;
345
- /** Todo item shape shared by todos_set / todos_get. */
346
- export declare const todoItemSchema: z.ZodObject<{
347
- todo: z.ZodString;
348
- done: z.ZodBoolean;
349
- }, z.core.$strip>;
350
- export type TodoItem = z.infer<typeof todoItemSchema>;
351
- /** Result of todos_set / todos_get. */
352
- export declare const todosResultSchema: z.ZodObject<{
353
- contentBlocks: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
354
- type: z.ZodLiteral<"text">;
355
- text: z.ZodString;
356
- }, z.core.$strip>, z.ZodObject<{
357
- type: z.ZodLiteral<"image">;
358
- data: z.ZodString;
359
- mimeType: z.ZodString;
360
- }, z.core.$strip>]>>>;
361
- details: z.ZodOptional<z.ZodObject<{
362
- todos: z.ZodArray<z.ZodObject<{
363
- todo: z.ZodString;
364
- done: z.ZodBoolean;
365
- }, z.core.$strip>>;
366
- }, z.core.$strip>>;
367
- }, z.core.$strip>;
368
- export type TodosResult = z.infer<typeof todosResultSchema>;
369
- //# sourceMappingURL=tool-results.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tool-results.d.ts","sourceRoot":"","sources":["../src/tool-results.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB;;;;;GAKG;AAEH,eAAO,MAAM,qBAAqB;;;iBAGhC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE3E,eAAO,MAAM,sBAAsB;;;;iBAIjC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE7E,eAAO,MAAM,sBAAsB;;;;;;;mBAGjC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE7E,qFAAqF;AACrF,eAAO,MAAM,uBAAuB;;;;;iBAOpB,CAAC;AACjB,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,uBAAuB;;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