@harness-control/protocol 0.2.0 → 0.3.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/index.d.ts +50 -0
- package/dist/index.js +6 -0
- package/package.json +1 -1
- package/schemas/hcp-message.schema.json +85 -0
package/dist/index.d.ts
CHANGED
|
@@ -885,10 +885,15 @@ export declare const hcpMcpStdioProfileSnapshotSchema: z.ZodObject<{
|
|
|
885
885
|
export declare const hcpWorkspaceManagementSchema: z.ZodObject<{
|
|
886
886
|
revision: z.ZodString;
|
|
887
887
|
allowed_roots: z.ZodArray<z.ZodString>;
|
|
888
|
+
directory_browsing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
888
889
|
}, z.core.$strict>;
|
|
889
890
|
export type HcpWorkspaceManagement = z.infer<typeof hcpWorkspaceManagementSchema>;
|
|
890
891
|
export declare const hcpWorkspaceOperationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
891
892
|
kind: z.ZodLiteral<"list">;
|
|
893
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
894
|
+
kind: z.ZodLiteral<"browse">;
|
|
895
|
+
path: z.ZodOptional<z.ZodString>;
|
|
896
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
892
897
|
}, z.core.$strict>, z.ZodObject<{
|
|
893
898
|
kind: z.ZodLiteral<"add">;
|
|
894
899
|
path: z.ZodString;
|
|
@@ -907,6 +912,10 @@ export declare const hcpWorkspacesRequestPayloadSchema: z.ZodObject<{
|
|
|
907
912
|
expires_at: z.ZodString;
|
|
908
913
|
operation: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
909
914
|
kind: z.ZodLiteral<"list">;
|
|
915
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
916
|
+
kind: z.ZodLiteral<"browse">;
|
|
917
|
+
path: z.ZodOptional<z.ZodString>;
|
|
918
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
910
919
|
}, z.core.$strict>, z.ZodObject<{
|
|
911
920
|
kind: z.ZodLiteral<"add">;
|
|
912
921
|
path: z.ZodString;
|
|
@@ -925,6 +934,15 @@ export declare const hcpWorkspacesResultPayloadSchema: z.ZodObject<{
|
|
|
925
934
|
request_id: z.ZodString;
|
|
926
935
|
outcome: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
927
936
|
kind: z.ZodLiteral<"success">;
|
|
937
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
938
|
+
kind: z.ZodLiteral<"directory">;
|
|
939
|
+
path: z.ZodString;
|
|
940
|
+
parent: z.ZodOptional<z.ZodString>;
|
|
941
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
942
|
+
name: z.ZodString;
|
|
943
|
+
path: z.ZodString;
|
|
944
|
+
}, z.core.$strict>>;
|
|
945
|
+
next_cursor: z.ZodOptional<z.ZodString>;
|
|
928
946
|
}, z.core.$strict>, z.ZodObject<{
|
|
929
947
|
kind: z.ZodLiteral<"error">;
|
|
930
948
|
message: z.ZodString;
|
|
@@ -932,6 +950,7 @@ export declare const hcpWorkspacesResultPayloadSchema: z.ZodObject<{
|
|
|
932
950
|
management: z.ZodObject<{
|
|
933
951
|
revision: z.ZodString;
|
|
934
952
|
allowed_roots: z.ZodArray<z.ZodString>;
|
|
953
|
+
directory_browsing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
935
954
|
}, z.core.$strict>;
|
|
936
955
|
workspaces: z.ZodArray<z.ZodObject<{
|
|
937
956
|
id: z.ZodString;
|
|
@@ -1053,6 +1072,7 @@ export declare const hcpHostCapabilitiesUpdatedPayloadSchema: z.ZodObject<{
|
|
|
1053
1072
|
workspace_management: z.ZodOptional<z.ZodObject<{
|
|
1054
1073
|
revision: z.ZodString;
|
|
1055
1074
|
allowed_roots: z.ZodArray<z.ZodString>;
|
|
1075
|
+
directory_browsing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1056
1076
|
}, z.core.$strict>>;
|
|
1057
1077
|
mcp_stdio_profiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1058
1078
|
id: z.ZodString;
|
|
@@ -3551,6 +3571,7 @@ export declare const hcpHostCapabilitiesUpdatedMessageSchema: z.ZodObject<{
|
|
|
3551
3571
|
workspace_management: z.ZodOptional<z.ZodObject<{
|
|
3552
3572
|
revision: z.ZodString;
|
|
3553
3573
|
allowed_roots: z.ZodArray<z.ZodString>;
|
|
3574
|
+
directory_browsing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
3554
3575
|
}, z.core.$strict>>;
|
|
3555
3576
|
mcp_stdio_profiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3556
3577
|
id: z.ZodString;
|
|
@@ -4995,6 +5016,10 @@ export declare const hcpWorkspacesRequestMessageSchema: z.ZodObject<{
|
|
|
4995
5016
|
expires_at: z.ZodString;
|
|
4996
5017
|
operation: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
4997
5018
|
kind: z.ZodLiteral<"list">;
|
|
5019
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
5020
|
+
kind: z.ZodLiteral<"browse">;
|
|
5021
|
+
path: z.ZodOptional<z.ZodString>;
|
|
5022
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
4998
5023
|
}, z.core.$strict>, z.ZodObject<{
|
|
4999
5024
|
kind: z.ZodLiteral<"add">;
|
|
5000
5025
|
path: z.ZodString;
|
|
@@ -5019,6 +5044,15 @@ export declare const hcpWorkspacesResultMessageSchema: z.ZodObject<{
|
|
|
5019
5044
|
request_id: z.ZodString;
|
|
5020
5045
|
outcome: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5021
5046
|
kind: z.ZodLiteral<"success">;
|
|
5047
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
5048
|
+
kind: z.ZodLiteral<"directory">;
|
|
5049
|
+
path: z.ZodString;
|
|
5050
|
+
parent: z.ZodOptional<z.ZodString>;
|
|
5051
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
5052
|
+
name: z.ZodString;
|
|
5053
|
+
path: z.ZodString;
|
|
5054
|
+
}, z.core.$strict>>;
|
|
5055
|
+
next_cursor: z.ZodOptional<z.ZodString>;
|
|
5022
5056
|
}, z.core.$strict>, z.ZodObject<{
|
|
5023
5057
|
kind: z.ZodLiteral<"error">;
|
|
5024
5058
|
message: z.ZodString;
|
|
@@ -5026,6 +5060,7 @@ export declare const hcpWorkspacesResultMessageSchema: z.ZodObject<{
|
|
|
5026
5060
|
management: z.ZodObject<{
|
|
5027
5061
|
revision: z.ZodString;
|
|
5028
5062
|
allowed_roots: z.ZodArray<z.ZodString>;
|
|
5063
|
+
directory_browsing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
5029
5064
|
}, z.core.$strict>;
|
|
5030
5065
|
workspaces: z.ZodArray<z.ZodObject<{
|
|
5031
5066
|
id: z.ZodString;
|
|
@@ -5046,6 +5081,10 @@ export declare const hcpMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
5046
5081
|
expires_at: z.ZodString;
|
|
5047
5082
|
operation: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5048
5083
|
kind: z.ZodLiteral<"list">;
|
|
5084
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
5085
|
+
kind: z.ZodLiteral<"browse">;
|
|
5086
|
+
path: z.ZodOptional<z.ZodString>;
|
|
5087
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
5049
5088
|
}, z.core.$strict>, z.ZodObject<{
|
|
5050
5089
|
kind: z.ZodLiteral<"add">;
|
|
5051
5090
|
path: z.ZodString;
|
|
@@ -5069,6 +5108,15 @@ export declare const hcpMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
5069
5108
|
request_id: z.ZodString;
|
|
5070
5109
|
outcome: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
5071
5110
|
kind: z.ZodLiteral<"success">;
|
|
5111
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
5112
|
+
kind: z.ZodLiteral<"directory">;
|
|
5113
|
+
path: z.ZodString;
|
|
5114
|
+
parent: z.ZodOptional<z.ZodString>;
|
|
5115
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
5116
|
+
name: z.ZodString;
|
|
5117
|
+
path: z.ZodString;
|
|
5118
|
+
}, z.core.$strict>>;
|
|
5119
|
+
next_cursor: z.ZodOptional<z.ZodString>;
|
|
5072
5120
|
}, z.core.$strict>, z.ZodObject<{
|
|
5073
5121
|
kind: z.ZodLiteral<"error">;
|
|
5074
5122
|
message: z.ZodString;
|
|
@@ -5076,6 +5124,7 @@ export declare const hcpMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
5076
5124
|
management: z.ZodObject<{
|
|
5077
5125
|
revision: z.ZodString;
|
|
5078
5126
|
allowed_roots: z.ZodArray<z.ZodString>;
|
|
5127
|
+
directory_browsing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
5079
5128
|
}, z.core.$strict>;
|
|
5080
5129
|
workspaces: z.ZodArray<z.ZodObject<{
|
|
5081
5130
|
id: z.ZodString;
|
|
@@ -5290,6 +5339,7 @@ export declare const hcpMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
5290
5339
|
workspace_management: z.ZodOptional<z.ZodObject<{
|
|
5291
5340
|
revision: z.ZodString;
|
|
5292
5341
|
allowed_roots: z.ZodArray<z.ZodString>;
|
|
5342
|
+
directory_browsing: z.ZodOptional<z.ZodLiteral<true>>;
|
|
5293
5343
|
}, z.core.$strict>>;
|
|
5294
5344
|
mcp_stdio_profiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
5295
5345
|
id: z.ZodString;
|
package/dist/index.js
CHANGED
|
@@ -325,9 +325,11 @@ export const hcpMcpStdioProfileSnapshotSchema = z
|
|
|
325
325
|
export const hcpWorkspaceManagementSchema = z.object({
|
|
326
326
|
revision: z.string().min(1).max(100),
|
|
327
327
|
allowed_roots: z.array(z.string().min(1).max(4096)).max(32),
|
|
328
|
+
directory_browsing: z.literal(true).optional(),
|
|
328
329
|
}).strict();
|
|
329
330
|
export const hcpWorkspaceOperationSchema = z.discriminatedUnion("kind", [
|
|
330
331
|
z.object({ kind: z.literal("list") }).strict(),
|
|
332
|
+
z.object({ kind: z.literal("browse"), path: z.string().min(1).max(4096).optional(), cursor: z.string().min(1).max(4096).optional() }).strict(),
|
|
331
333
|
z.object({ kind: z.literal("add"), path: z.string().min(1).max(4096), display_name: z.string().trim().min(1).max(100) }).strict(),
|
|
332
334
|
z.object({ kind: z.literal("rename"), id: z.string().min(1).max(200), display_name: z.string().trim().min(1).max(100) }).strict(),
|
|
333
335
|
z.object({ kind: z.literal("remove"), id: z.string().min(1).max(200) }).strict(),
|
|
@@ -341,6 +343,10 @@ export const hcpWorkspacesResultPayloadSchema = z.object({
|
|
|
341
343
|
request_id: nonEmptyStringSchema,
|
|
342
344
|
outcome: z.discriminatedUnion("kind", [
|
|
343
345
|
z.object({ kind: z.literal("success") }).strict(),
|
|
346
|
+
z.object({ kind: z.literal("directory"), path: z.string().min(1).max(4096), parent: z.string().min(1).max(4096).optional(),
|
|
347
|
+
entries: z.array(z.object({ name: z.string().min(1).max(4096), path: z.string().min(1).max(4096) }).strict()).max(200),
|
|
348
|
+
next_cursor: z.string().min(1).max(4096).optional(),
|
|
349
|
+
}).strict(),
|
|
344
350
|
z.object({ kind: z.literal("error"), message: z.string().min(1).max(1000) }).strict(),
|
|
345
351
|
]),
|
|
346
352
|
management: hcpWorkspaceManagementSchema,
|
package/package.json
CHANGED
|
@@ -49,6 +49,29 @@
|
|
|
49
49
|
],
|
|
50
50
|
"additionalProperties": false
|
|
51
51
|
},
|
|
52
|
+
{
|
|
53
|
+
"type": "object",
|
|
54
|
+
"properties": {
|
|
55
|
+
"kind": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"const": "browse"
|
|
58
|
+
},
|
|
59
|
+
"path": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"minLength": 1,
|
|
62
|
+
"maxLength": 4096
|
|
63
|
+
},
|
|
64
|
+
"cursor": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"minLength": 1,
|
|
67
|
+
"maxLength": 4096
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"required": [
|
|
71
|
+
"kind"
|
|
72
|
+
],
|
|
73
|
+
"additionalProperties": false
|
|
74
|
+
},
|
|
52
75
|
{
|
|
53
76
|
"type": "object",
|
|
54
77
|
"properties": {
|
|
@@ -187,6 +210,60 @@
|
|
|
187
210
|
],
|
|
188
211
|
"additionalProperties": false
|
|
189
212
|
},
|
|
213
|
+
{
|
|
214
|
+
"type": "object",
|
|
215
|
+
"properties": {
|
|
216
|
+
"kind": {
|
|
217
|
+
"type": "string",
|
|
218
|
+
"const": "directory"
|
|
219
|
+
},
|
|
220
|
+
"path": {
|
|
221
|
+
"type": "string",
|
|
222
|
+
"minLength": 1,
|
|
223
|
+
"maxLength": 4096
|
|
224
|
+
},
|
|
225
|
+
"parent": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"minLength": 1,
|
|
228
|
+
"maxLength": 4096
|
|
229
|
+
},
|
|
230
|
+
"entries": {
|
|
231
|
+
"maxItems": 200,
|
|
232
|
+
"type": "array",
|
|
233
|
+
"items": {
|
|
234
|
+
"type": "object",
|
|
235
|
+
"properties": {
|
|
236
|
+
"name": {
|
|
237
|
+
"type": "string",
|
|
238
|
+
"minLength": 1,
|
|
239
|
+
"maxLength": 4096
|
|
240
|
+
},
|
|
241
|
+
"path": {
|
|
242
|
+
"type": "string",
|
|
243
|
+
"minLength": 1,
|
|
244
|
+
"maxLength": 4096
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
"required": [
|
|
248
|
+
"name",
|
|
249
|
+
"path"
|
|
250
|
+
],
|
|
251
|
+
"additionalProperties": false
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"next_cursor": {
|
|
255
|
+
"type": "string",
|
|
256
|
+
"minLength": 1,
|
|
257
|
+
"maxLength": 4096
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
"required": [
|
|
261
|
+
"kind",
|
|
262
|
+
"path",
|
|
263
|
+
"entries"
|
|
264
|
+
],
|
|
265
|
+
"additionalProperties": false
|
|
266
|
+
},
|
|
190
267
|
{
|
|
191
268
|
"type": "object",
|
|
192
269
|
"properties": {
|
|
@@ -224,6 +301,10 @@
|
|
|
224
301
|
"minLength": 1,
|
|
225
302
|
"maxLength": 4096
|
|
226
303
|
}
|
|
304
|
+
},
|
|
305
|
+
"directory_browsing": {
|
|
306
|
+
"type": "boolean",
|
|
307
|
+
"const": true
|
|
227
308
|
}
|
|
228
309
|
},
|
|
229
310
|
"required": [
|
|
@@ -1217,6 +1298,10 @@
|
|
|
1217
1298
|
"minLength": 1,
|
|
1218
1299
|
"maxLength": 4096
|
|
1219
1300
|
}
|
|
1301
|
+
},
|
|
1302
|
+
"directory_browsing": {
|
|
1303
|
+
"type": "boolean",
|
|
1304
|
+
"const": true
|
|
1220
1305
|
}
|
|
1221
1306
|
},
|
|
1222
1307
|
"required": [
|