@nervekit/shared 0.3.0 → 0.4.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/domains/agents/agent.schema.d.ts +8 -8
- package/dist/domains/auth/auth.schema.d.ts +4 -4
- package/dist/domains/completions/completion.schema.d.ts +3 -3
- package/dist/domains/conversations/tree.schema.d.ts +3 -3
- package/dist/domains/filesystem/filesystem.schema.d.ts +1 -1
- package/dist/domains/plans/plan-review.schema.d.ts +2 -2
- package/dist/domains/prompt-suggestions/index.d.ts +2 -0
- package/dist/domains/prompt-suggestions/index.d.ts.map +1 -0
- package/dist/domains/prompt-suggestions/index.js +2 -0
- package/dist/domains/prompt-suggestions/index.js.map +1 -0
- package/dist/domains/prompt-suggestions/prompt-suggestion.schema.d.ts +185 -0
- package/dist/domains/prompt-suggestions/prompt-suggestion.schema.d.ts.map +1 -0
- package/dist/domains/prompt-suggestions/prompt-suggestion.schema.js +73 -0
- package/dist/domains/prompt-suggestions/prompt-suggestion.schema.js.map +1 -0
- package/dist/domains/providers/providers.schema.d.ts +4 -4
- package/dist/domains/settings/settings.schema.d.ts +34 -0
- package/dist/domains/settings/settings.schema.d.ts.map +1 -1
- package/dist/domains/settings/settings.schema.js +28 -0
- package/dist/domains/settings/settings.schema.js.map +1 -1
- package/dist/domains/suspensions/suspension.schema.d.ts +2 -2
- package/dist/domains/tasks/task.schema.d.ts +9 -9
- package/dist/domains/tools/records.schema.d.ts +61 -13
- package/dist/domains/tools/records.schema.d.ts.map +1 -1
- package/dist/domains/tools/records.schema.js +12 -0
- package/dist/domains/tools/records.schema.js.map +1 -1
- package/dist/domains/tools/tool-results.schema.d.ts +119 -22
- package/dist/domains/tools/tool-results.schema.d.ts.map +1 -1
- package/dist/domains/tools/tool-results.schema.js +64 -0
- package/dist/domains/tools/tool-results.schema.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -30,10 +30,10 @@ export declare const updateAgentRequestSchema: z.ZodObject<{
|
|
|
30
30
|
export type UpdateAgentRequest = z.infer<typeof updateAgentRequestSchema>;
|
|
31
31
|
export declare const agentStatusSchema: z.ZodEnum<{
|
|
32
32
|
error: "error";
|
|
33
|
-
idle: "idle";
|
|
34
33
|
running: "running";
|
|
35
|
-
awaiting_user: "awaiting_user";
|
|
36
34
|
aborted: "aborted";
|
|
35
|
+
idle: "idle";
|
|
36
|
+
awaiting_user: "awaiting_user";
|
|
37
37
|
}>;
|
|
38
38
|
export type AgentStatus = z.infer<typeof agentStatusSchema>;
|
|
39
39
|
export declare const agentBudgetSchema: z.ZodObject<{
|
|
@@ -92,10 +92,10 @@ export declare const agentRecordSchema: z.ZodObject<{
|
|
|
92
92
|
}>>;
|
|
93
93
|
status: z.ZodEnum<{
|
|
94
94
|
error: "error";
|
|
95
|
-
idle: "idle";
|
|
96
95
|
running: "running";
|
|
97
|
-
awaiting_user: "awaiting_user";
|
|
98
96
|
aborted: "aborted";
|
|
97
|
+
idle: "idle";
|
|
98
|
+
awaiting_user: "awaiting_user";
|
|
99
99
|
}>;
|
|
100
100
|
createdAt: z.ZodString;
|
|
101
101
|
updatedAt: z.ZodString;
|
|
@@ -174,11 +174,11 @@ export declare const continueFromFailureRequestSchema: z.ZodObject<{
|
|
|
174
174
|
}, z.core.$strip>;
|
|
175
175
|
export type ContinueFromFailureRequest = z.infer<typeof continueFromFailureRequestSchema>;
|
|
176
176
|
export declare const queuedPromptStatusSchema: z.ZodEnum<{
|
|
177
|
+
failed: "failed";
|
|
178
|
+
cancelled: "cancelled";
|
|
177
179
|
queued: "queued";
|
|
178
180
|
accepted: "accepted";
|
|
179
181
|
delivered: "delivered";
|
|
180
|
-
cancelled: "cancelled";
|
|
181
|
-
failed: "failed";
|
|
182
182
|
}>;
|
|
183
183
|
export type QueuedPromptStatus = z.infer<typeof queuedPromptStatusSchema>;
|
|
184
184
|
export declare const queuedPromptRecordSchema: z.ZodObject<{
|
|
@@ -198,11 +198,11 @@ export declare const queuedPromptRecordSchema: z.ZodObject<{
|
|
|
198
198
|
mimeType: z.ZodString;
|
|
199
199
|
}, z.core.$strip>>>;
|
|
200
200
|
status: z.ZodEnum<{
|
|
201
|
+
failed: "failed";
|
|
202
|
+
cancelled: "cancelled";
|
|
201
203
|
queued: "queued";
|
|
202
204
|
accepted: "accepted";
|
|
203
205
|
delivered: "delivered";
|
|
204
|
-
cancelled: "cancelled";
|
|
205
|
-
failed: "failed";
|
|
206
206
|
}>;
|
|
207
207
|
createdAt: z.ZodString;
|
|
208
208
|
updatedAt: z.ZodString;
|
|
@@ -54,9 +54,9 @@ export declare const startOAuthFlowRequestSchema: z.ZodObject<{
|
|
|
54
54
|
}, z.core.$strip>;
|
|
55
55
|
export type StartOAuthFlowRequest = z.infer<typeof startOAuthFlowRequestSchema>;
|
|
56
56
|
export declare const oauthFlowStatusSchema: z.ZodEnum<{
|
|
57
|
-
cancelled: "cancelled";
|
|
58
|
-
failed: "failed";
|
|
59
57
|
starting: "starting";
|
|
58
|
+
failed: "failed";
|
|
59
|
+
cancelled: "cancelled";
|
|
60
60
|
select: "select";
|
|
61
61
|
auth_url: "auth_url";
|
|
62
62
|
device_code: "device_code";
|
|
@@ -70,9 +70,9 @@ export declare const oauthFlowInfoSchema: z.ZodObject<{
|
|
|
70
70
|
provider: z.ZodString;
|
|
71
71
|
providerName: z.ZodString;
|
|
72
72
|
status: z.ZodEnum<{
|
|
73
|
-
cancelled: "cancelled";
|
|
74
|
-
failed: "failed";
|
|
75
73
|
starting: "starting";
|
|
74
|
+
failed: "failed";
|
|
75
|
+
cancelled: "cancelled";
|
|
76
76
|
select: "select";
|
|
77
77
|
auth_url: "auth_url";
|
|
78
78
|
device_code: "device_code";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const completionKindSchema: z.ZodEnum<{
|
|
3
3
|
file: "file";
|
|
4
|
-
slash: "slash";
|
|
5
4
|
directory: "directory";
|
|
5
|
+
slash: "slash";
|
|
6
6
|
}>;
|
|
7
7
|
export type CompletionKind = z.infer<typeof completionKindSchema>;
|
|
8
8
|
export declare const completionMatchRangeSchema: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
|
|
@@ -13,8 +13,8 @@ export declare const completionItemSchema: z.ZodObject<{
|
|
|
13
13
|
info: z.ZodOptional<z.ZodString>;
|
|
14
14
|
kind: z.ZodEnum<{
|
|
15
15
|
file: "file";
|
|
16
|
-
slash: "slash";
|
|
17
16
|
directory: "directory";
|
|
17
|
+
slash: "slash";
|
|
18
18
|
}>;
|
|
19
19
|
apply: z.ZodOptional<z.ZodString>;
|
|
20
20
|
displayLabel: z.ZodOptional<z.ZodString>;
|
|
@@ -29,8 +29,8 @@ export declare const completionResponseSchema: z.ZodObject<{
|
|
|
29
29
|
info: z.ZodOptional<z.ZodString>;
|
|
30
30
|
kind: z.ZodEnum<{
|
|
31
31
|
file: "file";
|
|
32
|
-
slash: "slash";
|
|
33
32
|
directory: "directory";
|
|
33
|
+
slash: "slash";
|
|
34
34
|
}>;
|
|
35
35
|
apply: z.ZodOptional<z.ZodString>;
|
|
36
36
|
displayLabel: z.ZodOptional<z.ZodString>;
|
|
@@ -99,8 +99,8 @@ export declare const conversationEntrySchema: z.ZodObject<{
|
|
|
99
99
|
liveMessageId: z.ZodOptional<z.ZodString>;
|
|
100
100
|
parentEntryId: z.ZodOptional<z.ZodString>;
|
|
101
101
|
role: z.ZodEnum<{
|
|
102
|
-
system: "system";
|
|
103
102
|
assistant: "assistant";
|
|
103
|
+
system: "system";
|
|
104
104
|
user: "user";
|
|
105
105
|
}>;
|
|
106
106
|
kind: z.ZodDefault<z.ZodEnum<{
|
|
@@ -138,8 +138,8 @@ export declare const conversationTreeNodeSchema: z.ZodObject<{
|
|
|
138
138
|
liveMessageId: z.ZodOptional<z.ZodString>;
|
|
139
139
|
parentEntryId: z.ZodOptional<z.ZodString>;
|
|
140
140
|
role: z.ZodEnum<{
|
|
141
|
-
system: "system";
|
|
142
141
|
assistant: "assistant";
|
|
142
|
+
system: "system";
|
|
143
143
|
user: "user";
|
|
144
144
|
}>;
|
|
145
145
|
kind: z.ZodDefault<z.ZodEnum<{
|
|
@@ -183,8 +183,8 @@ export declare const conversationTreeSchema: z.ZodObject<{
|
|
|
183
183
|
liveMessageId: z.ZodOptional<z.ZodString>;
|
|
184
184
|
parentEntryId: z.ZodOptional<z.ZodString>;
|
|
185
185
|
role: z.ZodEnum<{
|
|
186
|
-
system: "system";
|
|
187
186
|
assistant: "assistant";
|
|
187
|
+
system: "system";
|
|
188
188
|
user: "user";
|
|
189
189
|
}>;
|
|
190
190
|
kind: z.ZodDefault<z.ZodEnum<{
|
|
@@ -3,8 +3,8 @@ import { type ModelSelection, type ThinkingLevel } from "../models/index.js";
|
|
|
3
3
|
export declare const planSlugSchema: z.ZodString;
|
|
4
4
|
export type PlanSlug = z.infer<typeof planSlugSchema>;
|
|
5
5
|
export declare const planReviewStatusSchema: z.ZodEnum<{
|
|
6
|
-
accepted: "accepted";
|
|
7
6
|
pending: "pending";
|
|
7
|
+
accepted: "accepted";
|
|
8
8
|
accepted_in_new_chat: "accepted_in_new_chat";
|
|
9
9
|
changes_requested: "changes_requested";
|
|
10
10
|
discarded: "discarded";
|
|
@@ -23,8 +23,8 @@ export declare const planReviewRecordSchema: z.ZodObject<{
|
|
|
23
23
|
planPath: z.ZodString;
|
|
24
24
|
content: z.ZodOptional<z.ZodString>;
|
|
25
25
|
status: z.ZodEnum<{
|
|
26
|
-
accepted: "accepted";
|
|
27
26
|
pending: "pending";
|
|
27
|
+
accepted: "accepted";
|
|
28
28
|
accepted_in_new_chat: "accepted_in_new_chat";
|
|
29
29
|
changes_requested: "changes_requested";
|
|
30
30
|
discarded: "discarded";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domains/prompt-suggestions/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domains/prompt-suggestions/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const promptSuggestionSourceKindSchema: z.ZodEnum<{
|
|
3
|
+
project: "project";
|
|
4
|
+
user: "user";
|
|
5
|
+
}>;
|
|
6
|
+
export type PromptSuggestionSourceKind = z.infer<typeof promptSuggestionSourceKindSchema>;
|
|
7
|
+
export declare const promptSuggestionTrustStatusSchema: z.ZodEnum<{
|
|
8
|
+
denied: "denied";
|
|
9
|
+
unset: "unset";
|
|
10
|
+
allowed: "allowed";
|
|
11
|
+
not_required: "not_required";
|
|
12
|
+
stale: "stale";
|
|
13
|
+
}>;
|
|
14
|
+
export type PromptSuggestionTrustStatus = z.infer<typeof promptSuggestionTrustStatusSchema>;
|
|
15
|
+
export declare const promptSuggestionSourceSchema: z.ZodObject<{
|
|
16
|
+
kind: z.ZodEnum<{
|
|
17
|
+
project: "project";
|
|
18
|
+
user: "user";
|
|
19
|
+
}>;
|
|
20
|
+
path: z.ZodString;
|
|
21
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
export type PromptSuggestionSource = z.infer<typeof promptSuggestionSourceSchema>;
|
|
24
|
+
export declare const promptSuggestionSchema: z.ZodObject<{
|
|
25
|
+
id: z.ZodString;
|
|
26
|
+
name: z.ZodString;
|
|
27
|
+
label: z.ZodString;
|
|
28
|
+
description: z.ZodOptional<z.ZodString>;
|
|
29
|
+
prompt: z.ZodString;
|
|
30
|
+
order: z.ZodNumber;
|
|
31
|
+
source: z.ZodObject<{
|
|
32
|
+
kind: z.ZodEnum<{
|
|
33
|
+
project: "project";
|
|
34
|
+
user: "user";
|
|
35
|
+
}>;
|
|
36
|
+
path: z.ZodString;
|
|
37
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
requiresTrust: z.ZodBoolean;
|
|
40
|
+
trustStatus: z.ZodEnum<{
|
|
41
|
+
denied: "denied";
|
|
42
|
+
unset: "unset";
|
|
43
|
+
allowed: "allowed";
|
|
44
|
+
not_required: "not_required";
|
|
45
|
+
stale: "stale";
|
|
46
|
+
}>;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
export type PromptSuggestion = z.infer<typeof promptSuggestionSchema>;
|
|
49
|
+
export declare const promptSuggestionTrustRequestSchema: z.ZodObject<{
|
|
50
|
+
trustId: z.ZodString;
|
|
51
|
+
name: z.ZodString;
|
|
52
|
+
label: z.ZodString;
|
|
53
|
+
description: z.ZodOptional<z.ZodString>;
|
|
54
|
+
path: z.ZodString;
|
|
55
|
+
sourceKind: z.ZodEnum<{
|
|
56
|
+
project: "project";
|
|
57
|
+
user: "user";
|
|
58
|
+
}>;
|
|
59
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
60
|
+
predicateHash: z.ZodString;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
export type PromptSuggestionTrustRequest = z.infer<typeof promptSuggestionTrustRequestSchema>;
|
|
63
|
+
export declare const promptSuggestionStatusSchema: z.ZodObject<{
|
|
64
|
+
trustId: z.ZodOptional<z.ZodString>;
|
|
65
|
+
name: z.ZodString;
|
|
66
|
+
label: z.ZodString;
|
|
67
|
+
description: z.ZodOptional<z.ZodString>;
|
|
68
|
+
path: z.ZodString;
|
|
69
|
+
sourceKind: z.ZodEnum<{
|
|
70
|
+
project: "project";
|
|
71
|
+
user: "user";
|
|
72
|
+
}>;
|
|
73
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
74
|
+
requiresTrust: z.ZodBoolean;
|
|
75
|
+
status: z.ZodEnum<{
|
|
76
|
+
denied: "denied";
|
|
77
|
+
unset: "unset";
|
|
78
|
+
allowed: "allowed";
|
|
79
|
+
not_required: "not_required";
|
|
80
|
+
stale: "stale";
|
|
81
|
+
}>;
|
|
82
|
+
predicateHash: z.ZodOptional<z.ZodString>;
|
|
83
|
+
stale: z.ZodOptional<z.ZodBoolean>;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
export type PromptSuggestionStatus = z.infer<typeof promptSuggestionStatusSchema>;
|
|
86
|
+
export declare const promptSuggestionDiagnosticSchema: z.ZodObject<{
|
|
87
|
+
type: z.ZodLiteral<"warning">;
|
|
88
|
+
code: z.ZodString;
|
|
89
|
+
message: z.ZodString;
|
|
90
|
+
path: z.ZodString;
|
|
91
|
+
}, z.core.$strip>;
|
|
92
|
+
export type PromptSuggestionDiagnostic = z.infer<typeof promptSuggestionDiagnosticSchema>;
|
|
93
|
+
export declare const promptSuggestionListResponseSchema: z.ZodObject<{
|
|
94
|
+
suggestions: z.ZodArray<z.ZodObject<{
|
|
95
|
+
id: z.ZodString;
|
|
96
|
+
name: z.ZodString;
|
|
97
|
+
label: z.ZodString;
|
|
98
|
+
description: z.ZodOptional<z.ZodString>;
|
|
99
|
+
prompt: z.ZodString;
|
|
100
|
+
order: z.ZodNumber;
|
|
101
|
+
source: z.ZodObject<{
|
|
102
|
+
kind: z.ZodEnum<{
|
|
103
|
+
project: "project";
|
|
104
|
+
user: "user";
|
|
105
|
+
}>;
|
|
106
|
+
path: z.ZodString;
|
|
107
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
108
|
+
}, z.core.$strip>;
|
|
109
|
+
requiresTrust: z.ZodBoolean;
|
|
110
|
+
trustStatus: z.ZodEnum<{
|
|
111
|
+
denied: "denied";
|
|
112
|
+
unset: "unset";
|
|
113
|
+
allowed: "allowed";
|
|
114
|
+
not_required: "not_required";
|
|
115
|
+
stale: "stale";
|
|
116
|
+
}>;
|
|
117
|
+
}, z.core.$strip>>;
|
|
118
|
+
trustRequests: z.ZodArray<z.ZodObject<{
|
|
119
|
+
trustId: z.ZodString;
|
|
120
|
+
name: z.ZodString;
|
|
121
|
+
label: z.ZodString;
|
|
122
|
+
description: z.ZodOptional<z.ZodString>;
|
|
123
|
+
path: z.ZodString;
|
|
124
|
+
sourceKind: z.ZodEnum<{
|
|
125
|
+
project: "project";
|
|
126
|
+
user: "user";
|
|
127
|
+
}>;
|
|
128
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
129
|
+
predicateHash: z.ZodString;
|
|
130
|
+
}, z.core.$strip>>;
|
|
131
|
+
statuses: z.ZodArray<z.ZodObject<{
|
|
132
|
+
trustId: z.ZodOptional<z.ZodString>;
|
|
133
|
+
name: z.ZodString;
|
|
134
|
+
label: z.ZodString;
|
|
135
|
+
description: z.ZodOptional<z.ZodString>;
|
|
136
|
+
path: z.ZodString;
|
|
137
|
+
sourceKind: z.ZodEnum<{
|
|
138
|
+
project: "project";
|
|
139
|
+
user: "user";
|
|
140
|
+
}>;
|
|
141
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
142
|
+
requiresTrust: z.ZodBoolean;
|
|
143
|
+
status: z.ZodEnum<{
|
|
144
|
+
denied: "denied";
|
|
145
|
+
unset: "unset";
|
|
146
|
+
allowed: "allowed";
|
|
147
|
+
not_required: "not_required";
|
|
148
|
+
stale: "stale";
|
|
149
|
+
}>;
|
|
150
|
+
predicateHash: z.ZodOptional<z.ZodString>;
|
|
151
|
+
stale: z.ZodOptional<z.ZodBoolean>;
|
|
152
|
+
}, z.core.$strip>>;
|
|
153
|
+
diagnostics: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
154
|
+
type: z.ZodLiteral<"warning">;
|
|
155
|
+
code: z.ZodString;
|
|
156
|
+
message: z.ZodString;
|
|
157
|
+
path: z.ZodString;
|
|
158
|
+
}, z.core.$strip>>>;
|
|
159
|
+
}, z.core.$strip>;
|
|
160
|
+
export type PromptSuggestionListResponse = z.infer<typeof promptSuggestionListResponseSchema>;
|
|
161
|
+
export declare const updatePromptSuggestionTrustRequestSchema: z.ZodObject<{
|
|
162
|
+
trustId: z.ZodString;
|
|
163
|
+
status: z.ZodEnum<{
|
|
164
|
+
denied: "denied";
|
|
165
|
+
unset: "unset";
|
|
166
|
+
allowed: "allowed";
|
|
167
|
+
}>;
|
|
168
|
+
}, z.core.$strip>;
|
|
169
|
+
export type UpdatePromptSuggestionTrustRequest = z.infer<typeof updatePromptSuggestionTrustRequestSchema>;
|
|
170
|
+
export declare const promptSuggestionWhenSchema: z.ZodObject<{
|
|
171
|
+
gitDirty: z.ZodOptional<z.ZodBoolean>;
|
|
172
|
+
hasRepos: z.ZodOptional<z.ZodBoolean>;
|
|
173
|
+
githubAuthenticated: z.ZodOptional<z.ZodBoolean>;
|
|
174
|
+
modes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
175
|
+
planning: "planning";
|
|
176
|
+
coding: "coding";
|
|
177
|
+
}>>>;
|
|
178
|
+
permissionLevels: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
179
|
+
autonomous: "autonomous";
|
|
180
|
+
supervised: "supervised";
|
|
181
|
+
read_only: "read_only";
|
|
182
|
+
}>>>;
|
|
183
|
+
}, z.core.$strip>;
|
|
184
|
+
export type PromptSuggestionWhen = z.infer<typeof promptSuggestionWhenSchema>;
|
|
185
|
+
//# sourceMappingURL=prompt-suggestion.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-suggestion.schema.d.ts","sourceRoot":"","sources":["../../../src/domains/prompt-suggestions/prompt-suggestion.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,gCAAgC;;;EAA8B,CAAC;AAC5E,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;;;EAM5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO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from "zod";
|
|
2
|
+
import { modeSchema, permissionLevelSchema } from "../settings/index.js";
|
|
3
|
+
export const promptSuggestionSourceKindSchema = z.enum(["user", "project"]);
|
|
4
|
+
export const promptSuggestionTrustStatusSchema = z.enum([
|
|
5
|
+
"unset",
|
|
6
|
+
"allowed",
|
|
7
|
+
"denied",
|
|
8
|
+
"not_required",
|
|
9
|
+
"stale",
|
|
10
|
+
]);
|
|
11
|
+
export const promptSuggestionSourceSchema = z.object({
|
|
12
|
+
kind: promptSuggestionSourceKindSchema,
|
|
13
|
+
path: z.string().min(1),
|
|
14
|
+
projectId: z.string().startsWith("proj_").optional(),
|
|
15
|
+
});
|
|
16
|
+
export const promptSuggestionSchema = z.object({
|
|
17
|
+
id: z.string().min(1),
|
|
18
|
+
name: z.string().min(1),
|
|
19
|
+
label: z.string().min(1),
|
|
20
|
+
description: z.string().optional(),
|
|
21
|
+
prompt: z.string().min(1),
|
|
22
|
+
order: z.number(),
|
|
23
|
+
source: promptSuggestionSourceSchema,
|
|
24
|
+
requiresTrust: z.boolean(),
|
|
25
|
+
trustStatus: promptSuggestionTrustStatusSchema,
|
|
26
|
+
});
|
|
27
|
+
export const promptSuggestionTrustRequestSchema = z.object({
|
|
28
|
+
trustId: z.string().min(1),
|
|
29
|
+
name: z.string().min(1),
|
|
30
|
+
label: z.string().min(1),
|
|
31
|
+
description: z.string().optional(),
|
|
32
|
+
path: z.string().min(1),
|
|
33
|
+
sourceKind: promptSuggestionSourceKindSchema,
|
|
34
|
+
projectId: z.string().startsWith("proj_").optional(),
|
|
35
|
+
predicateHash: z.string().min(1),
|
|
36
|
+
});
|
|
37
|
+
export const promptSuggestionStatusSchema = z.object({
|
|
38
|
+
trustId: z.string().min(1).optional(),
|
|
39
|
+
name: z.string().min(1),
|
|
40
|
+
label: z.string().min(1),
|
|
41
|
+
description: z.string().optional(),
|
|
42
|
+
path: z.string().min(1),
|
|
43
|
+
sourceKind: promptSuggestionSourceKindSchema,
|
|
44
|
+
projectId: z.string().startsWith("proj_").optional(),
|
|
45
|
+
requiresTrust: z.boolean(),
|
|
46
|
+
status: promptSuggestionTrustStatusSchema,
|
|
47
|
+
predicateHash: z.string().min(1).optional(),
|
|
48
|
+
stale: z.boolean().optional(),
|
|
49
|
+
});
|
|
50
|
+
export const promptSuggestionDiagnosticSchema = z.object({
|
|
51
|
+
type: z.literal("warning"),
|
|
52
|
+
code: z.string().min(1),
|
|
53
|
+
message: z.string().min(1),
|
|
54
|
+
path: z.string().min(1),
|
|
55
|
+
});
|
|
56
|
+
export const promptSuggestionListResponseSchema = z.object({
|
|
57
|
+
suggestions: z.array(promptSuggestionSchema),
|
|
58
|
+
trustRequests: z.array(promptSuggestionTrustRequestSchema),
|
|
59
|
+
statuses: z.array(promptSuggestionStatusSchema),
|
|
60
|
+
diagnostics: z.array(promptSuggestionDiagnosticSchema).optional(),
|
|
61
|
+
});
|
|
62
|
+
export const updatePromptSuggestionTrustRequestSchema = z.object({
|
|
63
|
+
trustId: z.string().min(1),
|
|
64
|
+
status: z.enum(["allowed", "denied", "unset"]),
|
|
65
|
+
});
|
|
66
|
+
export const promptSuggestionWhenSchema = z.object({
|
|
67
|
+
gitDirty: z.boolean().optional(),
|
|
68
|
+
hasRepos: z.boolean().optional(),
|
|
69
|
+
githubAuthenticated: z.boolean().optional(),
|
|
70
|
+
modes: z.array(modeSchema).optional(),
|
|
71
|
+
permissionLevels: z.array(permissionLevelSchema).optional(),
|
|
72
|
+
});
|
|
73
|
+
//# sourceMappingURL=prompt-suggestion.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-suggestion.schema.js","sourceRoot":"","sources":["../../../src/domains/prompt-suggestions/prompt-suggestion.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAEzE,MAAM,CAAC,MAAM,gCAAgC,GAAG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,CAAC,CAAC,QAAQ,EAAE;IACrC,gBAAgB,EAAE,CAAC,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE;CAC5D,CAAC,CAAC"}
|
|
@@ -17,8 +17,8 @@ export declare const piApiSchema: z.ZodEnum<{
|
|
|
17
17
|
}>;
|
|
18
18
|
export type PiApi = z.infer<typeof piApiSchema>;
|
|
19
19
|
export declare const modelInputSchema: z.ZodEnum<{
|
|
20
|
-
image: "image";
|
|
21
20
|
text: "text";
|
|
21
|
+
image: "image";
|
|
22
22
|
}>;
|
|
23
23
|
export type ModelInputModality = z.infer<typeof modelInputSchema>;
|
|
24
24
|
export declare const modelCostSchema: z.ZodObject<{
|
|
@@ -86,8 +86,8 @@ export declare const modelDefinitionSchema: z.ZodObject<{
|
|
|
86
86
|
}>>>;
|
|
87
87
|
thinkingLevelMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
|
|
88
88
|
input: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
89
|
-
image: "image";
|
|
90
89
|
text: "text";
|
|
90
|
+
image: "image";
|
|
91
91
|
}>>>;
|
|
92
92
|
cost: z.ZodDefault<z.ZodObject<{
|
|
93
93
|
input: z.ZodDefault<z.ZodNumber>;
|
|
@@ -148,8 +148,8 @@ export declare const providerCatalogSchema: z.ZodObject<{
|
|
|
148
148
|
}>>>;
|
|
149
149
|
thinkingLevelMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
|
|
150
150
|
input: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
151
|
-
image: "image";
|
|
152
151
|
text: "text";
|
|
152
|
+
image: "image";
|
|
153
153
|
}>>>;
|
|
154
154
|
cost: z.ZodDefault<z.ZodObject<{
|
|
155
155
|
input: z.ZodDefault<z.ZodNumber>;
|
|
@@ -211,8 +211,8 @@ export declare const upsertModelDefinitionRequestSchema: z.ZodObject<{
|
|
|
211
211
|
}>>>;
|
|
212
212
|
thinkingLevelMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>;
|
|
213
213
|
input: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
214
|
-
image: "image";
|
|
215
214
|
text: "text";
|
|
215
|
+
image: "image";
|
|
216
216
|
}>>>;
|
|
217
217
|
cost: z.ZodDefault<z.ZodObject<{
|
|
218
218
|
input: z.ZodDefault<z.ZodNumber>;
|
|
@@ -34,6 +34,12 @@ export declare const agentSelectionSettingsSchema: z.ZodObject<{
|
|
|
34
34
|
}>>;
|
|
35
35
|
}, z.core.$strip>;
|
|
36
36
|
export type AgentSelectionSettings = z.infer<typeof agentSelectionSettingsSchema>;
|
|
37
|
+
export declare const jiraToolSettingsSchema: z.ZodObject<{
|
|
38
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
39
|
+
siteUrl: z.ZodOptional<z.ZodString>;
|
|
40
|
+
email: z.ZodOptional<z.ZodString>;
|
|
41
|
+
defaultProjectKey: z.ZodOptional<z.ZodString>;
|
|
42
|
+
}, z.core.$strip>;
|
|
37
43
|
export declare const settingsSchema: z.ZodObject<{
|
|
38
44
|
defaultMode: z.ZodEnum<{
|
|
39
45
|
planning: "planning";
|
|
@@ -130,6 +136,20 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
130
136
|
}, z.core.$strip>;
|
|
131
137
|
runtime: z.ZodDefault<z.ZodObject<{
|
|
132
138
|
pythonExecutablePath: z.ZodOptional<z.ZodString>;
|
|
139
|
+
shellPath: z.ZodOptional<z.ZodString>;
|
|
140
|
+
}, z.core.$strip>>;
|
|
141
|
+
tools: z.ZodDefault<z.ZodObject<{
|
|
142
|
+
disabled: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
143
|
+
python: "python";
|
|
144
|
+
web_search: "web_search";
|
|
145
|
+
web_fetch: "web_fetch";
|
|
146
|
+
}>>>;
|
|
147
|
+
jira: z.ZodDefault<z.ZodObject<{
|
|
148
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
149
|
+
siteUrl: z.ZodOptional<z.ZodString>;
|
|
150
|
+
email: z.ZodOptional<z.ZodString>;
|
|
151
|
+
defaultProjectKey: z.ZodOptional<z.ZodString>;
|
|
152
|
+
}, z.core.$strip>>;
|
|
133
153
|
}, z.core.$strip>>;
|
|
134
154
|
scopedModels: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
135
155
|
provider: z.ZodString;
|
|
@@ -234,6 +254,20 @@ export declare const updateSettingsRequestSchema: z.ZodObject<{
|
|
|
234
254
|
}, z.core.$strip>>;
|
|
235
255
|
runtime: z.ZodOptional<z.ZodObject<{
|
|
236
256
|
pythonExecutablePath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
257
|
+
shellPath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
258
|
+
}, z.core.$strip>>;
|
|
259
|
+
tools: z.ZodOptional<z.ZodObject<{
|
|
260
|
+
disabled: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
261
|
+
python: "python";
|
|
262
|
+
web_search: "web_search";
|
|
263
|
+
web_fetch: "web_fetch";
|
|
264
|
+
}>>>;
|
|
265
|
+
jira: z.ZodOptional<z.ZodObject<{
|
|
266
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
267
|
+
siteUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
268
|
+
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
269
|
+
defaultProjectKey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
270
|
+
}, z.core.$strip>>;
|
|
237
271
|
}, z.core.$strip>>;
|
|
238
272
|
scopedModels: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
239
273
|
provider: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.schema.d.ts","sourceRoot":"","sources":["../../../src/domains/settings/settings.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"settings.schema.d.ts","sourceRoot":"","sources":["../../../src/domains/settings/settings.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,UAAU;;;EAAiC,CAAC;AACzD,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAE9C,eAAO,MAAM,qBAAqB;;;;EAIhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;iBAKvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AAOF,eAAO,MAAM,sBAAsB;;;;;iBAKjC,CAAC;AAOH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2CzB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,eAAe,EAAE,QAyC7B,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6EtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { applicationLogLevelSchema } from "../logs/index.js";
|
|
3
3
|
import { modelSelectionSchema, thinkingLevelSchema } from "../models/index.js";
|
|
4
|
+
import { userConfigurableToolNameSchema } from "../tools/index.js";
|
|
4
5
|
export const modeSchema = z.enum(["planning", "coding"]);
|
|
5
6
|
export const permissionLevelSchema = z.enum([
|
|
6
7
|
"autonomous",
|
|
@@ -15,6 +16,17 @@ export const agentSelectionSettingsSchema = z.object({
|
|
|
15
16
|
});
|
|
16
17
|
const runtimeSettingsSchema = z.object({
|
|
17
18
|
pythonExecutablePath: z.string().trim().min(1).optional(),
|
|
19
|
+
shellPath: z.string().trim().min(1).optional(),
|
|
20
|
+
});
|
|
21
|
+
export const jiraToolSettingsSchema = z.object({
|
|
22
|
+
enabled: z.boolean().default(false),
|
|
23
|
+
siteUrl: z.string().trim().url().optional(),
|
|
24
|
+
email: z.string().trim().email().optional(),
|
|
25
|
+
defaultProjectKey: z.string().trim().min(1).optional(),
|
|
26
|
+
});
|
|
27
|
+
const toolSettingsSchema = z.object({
|
|
28
|
+
disabled: z.array(userConfigurableToolNameSchema).default([]),
|
|
29
|
+
jira: jiraToolSettingsSchema.default({ enabled: false }),
|
|
18
30
|
});
|
|
19
31
|
export const settingsSchema = z.object({
|
|
20
32
|
defaultMode: modeSchema,
|
|
@@ -57,6 +69,7 @@ export const settingsSchema = z.object({
|
|
|
57
69
|
baseDelayMs: z.number().int().positive().default(2000),
|
|
58
70
|
}),
|
|
59
71
|
runtime: runtimeSettingsSchema.default({}),
|
|
72
|
+
tools: toolSettingsSchema.default({ disabled: [], jira: { enabled: false } }),
|
|
60
73
|
scopedModels: z.array(modelSelectionSchema).default([]),
|
|
61
74
|
});
|
|
62
75
|
export const defaultSettings = {
|
|
@@ -98,6 +111,7 @@ export const defaultSettings = {
|
|
|
98
111
|
baseDelayMs: 2000,
|
|
99
112
|
},
|
|
100
113
|
runtime: {},
|
|
114
|
+
tools: { disabled: [], jira: { enabled: false } },
|
|
101
115
|
scopedModels: [],
|
|
102
116
|
};
|
|
103
117
|
export const updateSettingsRequestSchema = z.object({
|
|
@@ -160,6 +174,20 @@ export const updateSettingsRequestSchema = z.object({
|
|
|
160
174
|
runtime: z
|
|
161
175
|
.object({
|
|
162
176
|
pythonExecutablePath: z.string().trim().min(1).nullable().optional(),
|
|
177
|
+
shellPath: z.string().trim().min(1).nullable().optional(),
|
|
178
|
+
})
|
|
179
|
+
.optional(),
|
|
180
|
+
tools: z
|
|
181
|
+
.object({
|
|
182
|
+
disabled: z.array(userConfigurableToolNameSchema).optional(),
|
|
183
|
+
jira: z
|
|
184
|
+
.object({
|
|
185
|
+
enabled: z.boolean().optional(),
|
|
186
|
+
siteUrl: z.string().trim().url().nullable().optional(),
|
|
187
|
+
email: z.string().trim().email().nullable().optional(),
|
|
188
|
+
defaultProjectKey: z.string().trim().min(1).nullable().optional(),
|
|
189
|
+
})
|
|
190
|
+
.optional(),
|
|
163
191
|
})
|
|
164
192
|
.optional(),
|
|
165
193
|
scopedModels: z.array(modelSelectionSchema).optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.schema.js","sourceRoot":"","sources":["../../../src/domains/settings/settings.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"settings.schema.js","sourceRoot":"","sources":["../../../src/domains/settings/settings.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AA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