omnara 1.0.21 → 1.0.23
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/bin.js +585 -151
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -19,6 +19,7 @@ import * as z from "zod";
|
|
|
19
19
|
var zResourceName = z.string().min(1).refine((value) => Array.from(value).length <= 64, { message: "Resource name cannot exceed 64 Unicode characters" }).transform((value) => value.normalize("NFC")).refine((value) => Array.from(value).length <= 64, { message: "Resource name cannot exceed 64 Unicode characters" }).refine((value) => !new RegExp("^\\p{White_Space}|\\p{White_Space}$", "u").test(value), { message: "Resource name must not start or end with whitespace" }).refine((value) => !/[\p{Cc}\p{Cf}\p{Cs}\p{Default_Ignorable_Code_Point}⠀]/u.test(value), { message: "Resource name contains an unsupported invisible, control, or format character" }).refine((value) => !value.includes("\uFFFD"), { message: "Resource name contains the Unicode replacement character" }).refine((value) => !Array.from(value).some((character) => character !== " " && new RegExp("\\p{White_Space}", "u").test(character)), { message: "Resource name may only use ordinary spaces" });
|
|
20
20
|
var zAgentName = z.string().refine((value) => Array.from(value).length <= 64, { message: "Resource name cannot exceed 64 Unicode characters" }).transform((value) => value.normalize("NFC")).refine((value) => Array.from(value).length <= 64, { message: "Resource name cannot exceed 64 Unicode characters" }).refine((value) => !new RegExp("^\\p{White_Space}|\\p{White_Space}$", "u").test(value), { message: "Resource name must not start or end with whitespace" }).refine((value) => !/[\p{Cc}\p{Cf}\p{Cs}\p{Default_Ignorable_Code_Point}⠀]/u.test(value), { message: "Resource name contains an unsupported invisible, control, or format character" }).refine((value) => !value.includes("\uFFFD"), { message: "Resource name contains the Unicode replacement character" }).refine((value) => !Array.from(value).some((character) => character !== " " && new RegExp("\\p{White_Space}", "u").test(character)), { message: "Resource name may only use ordinary spaces" });
|
|
21
21
|
var zSkillName = z.string().min(1).max(64).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);
|
|
22
|
+
var zMemoryStoreName = z.string().min(1).max(64).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);
|
|
22
23
|
var zResourceListSort = z.enum([
|
|
23
24
|
"name",
|
|
24
25
|
"-name",
|
|
@@ -41,57 +42,40 @@ var zAgentConfigErrorIssue = z.object({
|
|
|
41
42
|
});
|
|
42
43
|
var zError = z.object({
|
|
43
44
|
error: z.string(),
|
|
45
|
+
current_digest: z.string().regex(/^sha256:[0-9a-f]{64}$/).optional(),
|
|
44
46
|
issues: z.array(zAgentConfigErrorIssue).optional(),
|
|
45
|
-
code: z.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"forbidden",
|
|
49
|
-
"not_found",
|
|
50
|
-
"conflict",
|
|
51
|
-
"gone",
|
|
52
|
-
"request_too_large",
|
|
53
|
-
"unsupported_media_type",
|
|
54
|
-
"unprocessable",
|
|
55
|
-
"upstream_unavailable",
|
|
56
|
-
"rate_limited",
|
|
57
|
-
"internal_error",
|
|
58
|
-
"service_unavailable",
|
|
59
|
-
"idempotency_key_conflict",
|
|
60
|
-
"state_transition_conflict",
|
|
61
|
-
"managed_work_admission_denied",
|
|
62
|
-
"pending_work",
|
|
63
|
-
"not_wake_capable",
|
|
64
|
-
"daemon_runtime_unregistered",
|
|
65
|
-
"validation_failed",
|
|
66
|
-
"csrf_check_failed",
|
|
67
|
-
"authentication_unavailable"
|
|
68
|
-
])
|
|
69
|
-
});
|
|
70
|
-
var zClientErrorCode = z.enum([
|
|
47
|
+
code: z.string()
|
|
48
|
+
});
|
|
49
|
+
var zErrorCode = z.enum([
|
|
71
50
|
"invalid_request",
|
|
72
|
-
"validation_failed",
|
|
73
51
|
"unauthorized",
|
|
74
52
|
"forbidden",
|
|
75
|
-
"csrf_check_failed",
|
|
76
53
|
"not_found",
|
|
77
54
|
"conflict",
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
55
|
+
"file_content_conflict",
|
|
56
|
+
"file_read_only",
|
|
57
|
+
"expected_digest_required",
|
|
58
|
+
"not_a_file",
|
|
82
59
|
"gone",
|
|
83
|
-
"daemon_runtime_unregistered",
|
|
84
60
|
"request_too_large",
|
|
85
61
|
"unsupported_media_type",
|
|
86
62
|
"unprocessable",
|
|
87
63
|
"upstream_unavailable",
|
|
88
|
-
"rate_limited"
|
|
89
|
-
]);
|
|
90
|
-
var zServerErrorCode = z.enum([
|
|
64
|
+
"rate_limited",
|
|
91
65
|
"internal_error",
|
|
92
66
|
"service_unavailable",
|
|
67
|
+
"idempotency_key_conflict",
|
|
68
|
+
"state_transition_conflict",
|
|
69
|
+
"managed_work_admission_denied",
|
|
70
|
+
"pending_work",
|
|
71
|
+
"not_wake_capable",
|
|
72
|
+
"daemon_runtime_unregistered",
|
|
73
|
+
"validation_failed",
|
|
74
|
+
"csrf_check_failed",
|
|
93
75
|
"authentication_unavailable"
|
|
94
76
|
]);
|
|
77
|
+
var zClientErrorCode = z.string();
|
|
78
|
+
var zServerErrorCode = z.string();
|
|
95
79
|
var zManagementKind = z.enum(["tenant", "cluster"]);
|
|
96
80
|
var zOrganizationId = z.string().regex(/^org_[a-z2-7]{26}$/);
|
|
97
81
|
var zOrgInvitationId = z.string().regex(/^oinv_[a-z2-7]{26}$/);
|
|
@@ -228,6 +212,7 @@ var zMachineDaemonTokenId = z.string().regex(/^mdt_[a-z2-7]{26}$/);
|
|
|
228
212
|
var zSkillId = z.string().regex(/^skl_[a-z2-7]{26}$/);
|
|
229
213
|
var zSkillRevisionId = z.string().regex(/^skr_[a-z2-7]{26}$/);
|
|
230
214
|
var zSkillGrantId = z.string().regex(/^skg_[a-z2-7]{26}$/);
|
|
215
|
+
var zMemoryStoreId = z.string().regex(/^mst_[a-z2-7]{26}$/);
|
|
231
216
|
var zSecretId = z.string().regex(/^sec_[a-z2-7]{26}$/);
|
|
232
217
|
var zCreateModelProviderConfigRequest = z.object({
|
|
233
218
|
name: zResourceName,
|
|
@@ -405,17 +390,17 @@ var zSkillOwner = z.discriminatedUnion("kind", [
|
|
|
405
390
|
]);
|
|
406
391
|
var zCreateSkillRequest = z.object({
|
|
407
392
|
owner: zSkillOwnerInput,
|
|
408
|
-
archive: z.
|
|
393
|
+
archive: z.instanceof(Blob)
|
|
409
394
|
});
|
|
410
395
|
var zUpdateSkillRequest = z.intersection(z.union([
|
|
411
396
|
z.object({
|
|
412
|
-
archive: z.
|
|
397
|
+
archive: z.instanceof(Blob)
|
|
413
398
|
}),
|
|
414
399
|
z.object({
|
|
415
400
|
skill_md: z.string()
|
|
416
401
|
})
|
|
417
402
|
]), z.object({
|
|
418
|
-
archive: z.
|
|
403
|
+
archive: z.instanceof(Blob).optional(),
|
|
419
404
|
skill_md: z.string().optional()
|
|
420
405
|
}));
|
|
421
406
|
var zSkillFile = z.object({
|
|
@@ -469,6 +454,51 @@ var zSkillGrant = z.object({
|
|
|
469
454
|
target_project_id: zProjectId,
|
|
470
455
|
created_at: zTimestamp
|
|
471
456
|
});
|
|
457
|
+
var zMemoryStoreAccess = z.enum(["read", "read_write"]);
|
|
458
|
+
var zMemoryStore = z.object({
|
|
459
|
+
id: zMemoryStoreId,
|
|
460
|
+
name: zMemoryStoreName,
|
|
461
|
+
description: z.string().refine((value) => Array.from(value).length <= 1024, { message: "String cannot exceed 1024 Unicode characters" }),
|
|
462
|
+
agent_access: zMemoryStoreAccess,
|
|
463
|
+
created_at: z.iso.datetime({ offset: true }),
|
|
464
|
+
updated_at: z.iso.datetime({ offset: true })
|
|
465
|
+
});
|
|
466
|
+
var zCreateMemoryStore = z.object({
|
|
467
|
+
name: zMemoryStoreName,
|
|
468
|
+
description: z.string().refine((value) => Array.from(value).length <= 1024, { message: "String cannot exceed 1024 Unicode characters" }).optional(),
|
|
469
|
+
agent_access: zMemoryStoreAccess.optional().default("read_write")
|
|
470
|
+
});
|
|
471
|
+
var zUpdateMemoryStore = z.object({
|
|
472
|
+
description: z.string().refine((value) => Array.from(value).length <= 1024, { message: "String cannot exceed 1024 Unicode characters" }).optional(),
|
|
473
|
+
agent_access: zMemoryStoreAccess.optional()
|
|
474
|
+
});
|
|
475
|
+
var zMemoryStoreList = z.object({
|
|
476
|
+
data: z.array(zMemoryStore),
|
|
477
|
+
next_cursor: z.string().nullable()
|
|
478
|
+
});
|
|
479
|
+
var zMemoryRegularFile = z.object({
|
|
480
|
+
path: z.string(),
|
|
481
|
+
type: z.enum(["file"]),
|
|
482
|
+
size_bytes: z.coerce.bigint().min(BigInt("-9223372036854775808"), { error: "Invalid value: Expected int64 to be >= -9223372036854775808" }).max(BigInt("9223372036854775807"), { error: "Invalid value: Expected int64 to be <= 9223372036854775807" }),
|
|
483
|
+
modified_at: zTimestamp
|
|
484
|
+
});
|
|
485
|
+
var zMemoryDirectory = z.object({
|
|
486
|
+
path: z.string(),
|
|
487
|
+
type: z.enum(["directory"]),
|
|
488
|
+
modified_at: zTimestamp
|
|
489
|
+
});
|
|
490
|
+
var zMemoryFile = z.discriminatedUnion("type", [
|
|
491
|
+
zMemoryRegularFile.extend({ type: z.literal("file") }),
|
|
492
|
+
zMemoryDirectory.extend({ type: z.literal("directory") })
|
|
493
|
+
]);
|
|
494
|
+
var zMemoryFileList = z.object({
|
|
495
|
+
data: z.array(zMemoryFile),
|
|
496
|
+
next_cursor: z.string().nullable()
|
|
497
|
+
});
|
|
498
|
+
var zUploadFileResponse = z.object({
|
|
499
|
+
path: z.string(),
|
|
500
|
+
digest: z.string().regex(/^sha256:[0-9a-f]{64}$/)
|
|
501
|
+
});
|
|
472
502
|
var zMcpoAuthStartMetadata = z.record(z.string(), z.string().max(512));
|
|
473
503
|
var zMcpoAuthStartResponse = z.object({
|
|
474
504
|
flow_id: zMcpoAuthFlowId,
|
|
@@ -771,6 +801,10 @@ var zCompiledMcpServer = z.object({
|
|
|
771
801
|
var zCompiledSkill = z.object({
|
|
772
802
|
id: zSkillId
|
|
773
803
|
});
|
|
804
|
+
var zCompiledMemoryStore = z.object({
|
|
805
|
+
id: zMemoryStoreId,
|
|
806
|
+
access: zMemoryStoreAccess
|
|
807
|
+
});
|
|
774
808
|
var zCompiledSubagentModel = z.object({
|
|
775
809
|
configured_model_id: zConfiguredModelId.optional(),
|
|
776
810
|
context_window_tokens: z.int().optional(),
|
|
@@ -808,6 +842,7 @@ var zCompiledAgentConfig = z.object({
|
|
|
808
842
|
mcp: z.record(z.string(), zCompiledMcpServer).optional(),
|
|
809
843
|
event_webhook: zCompiledEventWebhook.optional(),
|
|
810
844
|
skills: z.array(zCompiledSkill).optional(),
|
|
845
|
+
memory_stores: z.array(zCompiledMemoryStore).optional(),
|
|
811
846
|
subagents: z.record(z.string(), zCompiledSubagent).optional(),
|
|
812
847
|
max_subagents: z.int().optional(),
|
|
813
848
|
max_depth: z.int().optional()
|
|
@@ -1825,7 +1860,8 @@ var zCreateMachinePoolRequest = zCreateMachinePoolRequestBase.and(z.union([
|
|
|
1825
1860
|
"unikraft",
|
|
1826
1861
|
"modal",
|
|
1827
1862
|
"freestyle",
|
|
1828
|
-
"tenki"
|
|
1863
|
+
"tenki",
|
|
1864
|
+
"arker"
|
|
1829
1865
|
]),
|
|
1830
1866
|
default_machine_cpu: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1831
1867
|
default_machine_memory_mb: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
@@ -2239,9 +2275,6 @@ var zBootstrapDaemonResponse = z.object({
|
|
|
2239
2275
|
installation_id: zInstallationId,
|
|
2240
2276
|
machine_id: zMachineId
|
|
2241
2277
|
});
|
|
2242
|
-
var zUploadArtifactResponse = z.object({
|
|
2243
|
-
artifact_id: zArtifactId
|
|
2244
|
-
});
|
|
2245
2278
|
var zCreateProjectRequest = z.object({
|
|
2246
2279
|
name: zResourceName
|
|
2247
2280
|
});
|
|
@@ -2713,6 +2746,82 @@ var zListProjectAvailableSkillsQuery = z.object({
|
|
|
2713
2746
|
cursor: z.string().max(1024).optional()
|
|
2714
2747
|
});
|
|
2715
2748
|
var zListProjectAvailableSkillsResponse = zListProjectSkillAccessesResponse;
|
|
2749
|
+
var zListMemoryStoresPath = z.object({
|
|
2750
|
+
orgID: zOrganizationId,
|
|
2751
|
+
projectID: zProjectId
|
|
2752
|
+
});
|
|
2753
|
+
var zListMemoryStoresQuery = z.object({
|
|
2754
|
+
limit: z.int().gte(1).lte(100).optional().default(50),
|
|
2755
|
+
name: z.string().min(1).max(200).optional(),
|
|
2756
|
+
cursor: z.string().max(1024).optional()
|
|
2757
|
+
});
|
|
2758
|
+
var zListMemoryStoresResponse = zMemoryStoreList;
|
|
2759
|
+
var zCreateMemoryStoreBody = zCreateMemoryStore;
|
|
2760
|
+
var zCreateMemoryStorePath = z.object({
|
|
2761
|
+
orgID: zOrganizationId,
|
|
2762
|
+
projectID: zProjectId
|
|
2763
|
+
});
|
|
2764
|
+
var zCreateMemoryStoreResponse = zMemoryStore;
|
|
2765
|
+
var zDeleteMemoryStorePath = z.object({
|
|
2766
|
+
orgID: zOrganizationId,
|
|
2767
|
+
projectID: zProjectId,
|
|
2768
|
+
memoryStoreID: zMemoryStoreId
|
|
2769
|
+
});
|
|
2770
|
+
var zDeleteMemoryStoreResponse = z.void();
|
|
2771
|
+
var zGetMemoryStorePath = z.object({
|
|
2772
|
+
orgID: zOrganizationId,
|
|
2773
|
+
projectID: zProjectId,
|
|
2774
|
+
memoryStoreID: zMemoryStoreId
|
|
2775
|
+
});
|
|
2776
|
+
var zGetMemoryStoreResponse = zMemoryStore;
|
|
2777
|
+
var zUpdateMemoryStoreBody = zUpdateMemoryStore;
|
|
2778
|
+
var zUpdateMemoryStorePath = z.object({
|
|
2779
|
+
orgID: zOrganizationId,
|
|
2780
|
+
projectID: zProjectId,
|
|
2781
|
+
memoryStoreID: zMemoryStoreId
|
|
2782
|
+
});
|
|
2783
|
+
var zUpdateMemoryStoreResponse = zMemoryStore;
|
|
2784
|
+
var zListMemoryFilesPath = z.object({
|
|
2785
|
+
orgID: zOrganizationId,
|
|
2786
|
+
projectID: zProjectId,
|
|
2787
|
+
memoryStoreID: zMemoryStoreId
|
|
2788
|
+
});
|
|
2789
|
+
var zListMemoryFilesQuery = z.object({
|
|
2790
|
+
path: z.string().max(1024).optional(),
|
|
2791
|
+
limit: z.int().gte(1).lte(100).optional().default(50),
|
|
2792
|
+
cursor: z.string().max(1024).optional()
|
|
2793
|
+
});
|
|
2794
|
+
var zListMemoryFilesResponse = zMemoryFileList;
|
|
2795
|
+
var zDeleteMemoryFilePath = z.object({
|
|
2796
|
+
orgID: zOrganizationId,
|
|
2797
|
+
projectID: zProjectId,
|
|
2798
|
+
memoryStoreID: zMemoryStoreId
|
|
2799
|
+
});
|
|
2800
|
+
var zDeleteMemoryFileQuery = z.object({
|
|
2801
|
+
path: z.string().max(1024),
|
|
2802
|
+
expected_digest: z.string().regex(/^sha256:[0-9a-f]{64}$/)
|
|
2803
|
+
});
|
|
2804
|
+
var zDeleteMemoryFileResponse = z.void();
|
|
2805
|
+
var zDownloadMemoryFilePath = z.object({
|
|
2806
|
+
orgID: zOrganizationId,
|
|
2807
|
+
projectID: zProjectId,
|
|
2808
|
+
memoryStoreID: zMemoryStoreId
|
|
2809
|
+
});
|
|
2810
|
+
var zDownloadMemoryFileQuery = z.object({
|
|
2811
|
+
path: z.string().max(1024)
|
|
2812
|
+
});
|
|
2813
|
+
var zDownloadMemoryFileResponse = z.instanceof(Blob);
|
|
2814
|
+
var zWriteMemoryFileBody = z.instanceof(Blob);
|
|
2815
|
+
var zWriteMemoryFilePath = z.object({
|
|
2816
|
+
orgID: zOrganizationId,
|
|
2817
|
+
projectID: zProjectId,
|
|
2818
|
+
memoryStoreID: zMemoryStoreId
|
|
2819
|
+
});
|
|
2820
|
+
var zWriteMemoryFileQuery = z.object({
|
|
2821
|
+
path: z.string().max(1024),
|
|
2822
|
+
expected_digest: z.string().regex(/^sha256:[0-9a-f]{64}$/).optional()
|
|
2823
|
+
});
|
|
2824
|
+
var zWriteMemoryFileResponse = zUploadFileResponse;
|
|
2716
2825
|
var zListSecretsPath = z.object({
|
|
2717
2826
|
orgID: z.string().regex(/^org_[a-z2-7]{26}$/)
|
|
2718
2827
|
});
|
|
@@ -3155,7 +3264,7 @@ var zGetArtifactContentPath = z.object({
|
|
|
3155
3264
|
agentID: z.string().regex(/^agt_[a-z2-7]{26}$/),
|
|
3156
3265
|
artifactID: z.string().regex(/^art_[a-z2-7]{26}$/)
|
|
3157
3266
|
});
|
|
3158
|
-
var zGetArtifactContentResponse = z.
|
|
3267
|
+
var zGetArtifactContentResponse = z.instanceof(Blob);
|
|
3159
3268
|
var zListVisibleProjectMachinesPath = z.object({
|
|
3160
3269
|
orgID: z.string().regex(/^org_[a-z2-7]{26}$/),
|
|
3161
3270
|
projectID: z.string().regex(/^proj_[a-z2-7]{26}$/)
|
|
@@ -3485,20 +3594,19 @@ var zGetDaemonSkillArchiveQuery = z.object({
|
|
|
3485
3594
|
expires_at: z.coerce.bigint().min(BigInt("-9223372036854775808"), { error: "Invalid value: Expected int64 to be >= -9223372036854775808" }).max(BigInt("9223372036854775807"), { error: "Invalid value: Expected int64 to be <= 9223372036854775807" }),
|
|
3486
3595
|
download_token: z.string().length(64)
|
|
3487
3596
|
});
|
|
3488
|
-
var zGetDaemonSkillArchiveResponse = z.
|
|
3489
|
-
var
|
|
3490
|
-
|
|
3491
|
-
toolCallID: zToolCallId
|
|
3597
|
+
var zGetDaemonSkillArchiveResponse = z.instanceof(Blob);
|
|
3598
|
+
var zDownloadDaemonFilePath = z.object({
|
|
3599
|
+
processID: zProcessId
|
|
3492
3600
|
});
|
|
3493
|
-
var
|
|
3494
|
-
|
|
3601
|
+
var zDownloadDaemonFileResponse = z.instanceof(Blob);
|
|
3602
|
+
var zUploadDaemonFileBody = z.instanceof(Blob);
|
|
3603
|
+
var zUploadDaemonFilePath = z.object({
|
|
3604
|
+
processID: zProcessId
|
|
3495
3605
|
});
|
|
3496
|
-
var
|
|
3497
|
-
|
|
3498
|
-
toolCallID: zToolCallId,
|
|
3499
|
-
artifactID: zArtifactId
|
|
3606
|
+
var zUploadDaemonFileQuery = z.object({
|
|
3607
|
+
filename: z.string().optional()
|
|
3500
3608
|
});
|
|
3501
|
-
var
|
|
3609
|
+
var zUploadDaemonFileResponse = zUploadFileResponse;
|
|
3502
3610
|
|
|
3503
3611
|
// ../sdk/src/json-body.ts
|
|
3504
3612
|
import * as z2 from "zod";
|
|
@@ -3563,22 +3671,21 @@ var zErrorBody = zJsonText.pipe(zJsonBody);
|
|
|
3563
3671
|
var zErrorResponse = relaxedSchema(
|
|
3564
3672
|
zError.partial({ code: true }).extend({ error_description: z4.string().optional() })
|
|
3565
3673
|
);
|
|
3566
|
-
function issuesFromBody(body) {
|
|
3567
|
-
const parsed = zErrorResponse.safeParse(body);
|
|
3568
|
-
return parsed.success ? parsed.data.issues ?? [] : [];
|
|
3569
|
-
}
|
|
3570
3674
|
var ApiError = class _ApiError extends Error {
|
|
3571
3675
|
status;
|
|
3572
3676
|
code;
|
|
3573
3677
|
body;
|
|
3574
3678
|
issues;
|
|
3679
|
+
currentDigest;
|
|
3575
3680
|
constructor(status, message, code, body) {
|
|
3576
3681
|
super(message);
|
|
3577
3682
|
this.name = "ApiError";
|
|
3578
3683
|
this.status = status;
|
|
3579
3684
|
this.code = code;
|
|
3580
3685
|
this.body = body;
|
|
3581
|
-
|
|
3686
|
+
const parsed = zErrorResponse.safeParse(body);
|
|
3687
|
+
this.issues = parsed.data?.issues ?? [];
|
|
3688
|
+
this.currentDigest = parsed.data?.current_digest;
|
|
3582
3689
|
}
|
|
3583
3690
|
static async fromResponse(response) {
|
|
3584
3691
|
const body = zErrorBody.safeParse(await response.clone().text());
|
|
@@ -3969,7 +4076,7 @@ function createSseClient({
|
|
|
3969
4076
|
if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
|
|
3970
4077
|
if (!response.body) throw new Error("No body in SSE response");
|
|
3971
4078
|
const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
|
|
3972
|
-
let
|
|
4079
|
+
let buffer2 = "";
|
|
3973
4080
|
const abortHandler = () => {
|
|
3974
4081
|
try {
|
|
3975
4082
|
reader.cancel();
|
|
@@ -3981,10 +4088,10 @@ function createSseClient({
|
|
|
3981
4088
|
while (true) {
|
|
3982
4089
|
const { done, value } = await reader.read();
|
|
3983
4090
|
if (done) break;
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
const chunks =
|
|
3987
|
-
|
|
4091
|
+
buffer2 += value;
|
|
4092
|
+
buffer2 = buffer2.replace(/\r\n?/g, "\n");
|
|
4093
|
+
const chunks = buffer2.split("\n\n");
|
|
4094
|
+
buffer2 = chunks.pop() ?? "";
|
|
3988
4095
|
for (const chunk of chunks) {
|
|
3989
4096
|
const lines = chunk.split("\n");
|
|
3990
4097
|
const dataLines = [];
|
|
@@ -4924,6 +5031,7 @@ __export(sdk_gen_exports, {
|
|
|
4924
5031
|
createIntegrationOAuthSetup: () => createIntegrationOAuthSetup,
|
|
4925
5032
|
createMachine: () => createMachine,
|
|
4926
5033
|
createMachinePool: () => createMachinePool,
|
|
5034
|
+
createMemoryStore: () => createMemoryStore,
|
|
4927
5035
|
createModelProviderConfig: () => createModelProviderConfig,
|
|
4928
5036
|
createOrgApiKey: () => createOrgApiKey,
|
|
4929
5037
|
createOrgInvitation: () => createOrgInvitation,
|
|
@@ -4947,6 +5055,8 @@ __export(sdk_gen_exports, {
|
|
|
4947
5055
|
deleteIntegrationInstall: () => deleteIntegrationInstall,
|
|
4948
5056
|
deleteMachine: () => deleteMachine,
|
|
4949
5057
|
deleteMachinePool: () => deleteMachinePool,
|
|
5058
|
+
deleteMemoryFile: () => deleteMemoryFile,
|
|
5059
|
+
deleteMemoryStore: () => deleteMemoryStore,
|
|
4950
5060
|
deleteModelProviderConfig: () => deleteModelProviderConfig,
|
|
4951
5061
|
deleteOrgInvitation: () => deleteOrgInvitation,
|
|
4952
5062
|
deleteOrganization: () => deleteOrganization,
|
|
@@ -4959,7 +5069,8 @@ __export(sdk_gen_exports, {
|
|
|
4959
5069
|
deleteSkill: () => deleteSkill,
|
|
4960
5070
|
deleteSkillGrant: () => deleteSkillGrant,
|
|
4961
5071
|
demoteSteeringInputToQueued: () => demoteSteeringInputToQueued,
|
|
4962
|
-
|
|
5072
|
+
downloadDaemonFile: () => downloadDaemonFile,
|
|
5073
|
+
downloadMemoryFile: () => downloadMemoryFile,
|
|
4963
5074
|
endMachineDaemonRuntime: () => endMachineDaemonRuntime,
|
|
4964
5075
|
getActor: () => getActor,
|
|
4965
5076
|
getAgent: () => getAgent,
|
|
@@ -4974,6 +5085,7 @@ __export(sdk_gen_exports, {
|
|
|
4974
5085
|
getDaemonSkillArchive: () => getDaemonSkillArchive,
|
|
4975
5086
|
getMachine: () => getMachine,
|
|
4976
5087
|
getMachinePool: () => getMachinePool,
|
|
5088
|
+
getMemoryStore: () => getMemoryStore,
|
|
4977
5089
|
getModelCatalog: () => getModelCatalog,
|
|
4978
5090
|
getModelProviderConfig: () => getModelProviderConfig,
|
|
4979
5091
|
getOrgApiKey: () => getOrgApiKey,
|
|
@@ -4998,6 +5110,8 @@ __export(sdk_gen_exports, {
|
|
|
4998
5110
|
listMcpServerTools: () => listMcpServerTools,
|
|
4999
5111
|
listMcpServers: () => listMcpServers,
|
|
5000
5112
|
listMemberProjectAccess: () => listMemberProjectAccess,
|
|
5113
|
+
listMemoryFiles: () => listMemoryFiles,
|
|
5114
|
+
listMemoryStores: () => listMemoryStores,
|
|
5001
5115
|
listModelProviderConfigs: () => listModelProviderConfigs,
|
|
5002
5116
|
listOrgApiKeyProjectAccess: () => listOrgApiKeyProjectAccess,
|
|
5003
5117
|
listOrgApiKeys: () => listOrgApiKeys,
|
|
@@ -5049,6 +5163,7 @@ __export(sdk_gen_exports, {
|
|
|
5049
5163
|
updateCronTrigger: () => updateCronTrigger,
|
|
5050
5164
|
updateMachine: () => updateMachine,
|
|
5051
5165
|
updateMachinePool: () => updateMachinePool,
|
|
5166
|
+
updateMemoryStore: () => updateMemoryStore,
|
|
5052
5167
|
updateModelProviderConfig: () => updateModelProviderConfig,
|
|
5053
5168
|
updateOrgApiKey: () => updateOrgApiKey,
|
|
5054
5169
|
updateOrgMember: () => updateOrgMember,
|
|
@@ -5056,7 +5171,8 @@ __export(sdk_gen_exports, {
|
|
|
5056
5171
|
updateProjectModelGrant: () => updateProjectModelGrant,
|
|
5057
5172
|
updateSecret: () => updateSecret,
|
|
5058
5173
|
updateSkill: () => updateSkill,
|
|
5059
|
-
|
|
5174
|
+
uploadDaemonFile: () => uploadDaemonFile,
|
|
5175
|
+
writeMemoryFile: () => writeMemoryFile
|
|
5060
5176
|
});
|
|
5061
5177
|
var listPersonalAccessTokens = (options) => (options?.client ?? client).get({
|
|
5062
5178
|
responseValidator: relaxedResponseValidator(zListPersonalAccessTokensResponse2),
|
|
@@ -5787,6 +5903,165 @@ var listProjectAvailableSkills = (options) => (options.client ?? client).get({
|
|
|
5787
5903
|
url: "/orgs/{orgID}/projects/{projectID}/skills",
|
|
5788
5904
|
...options
|
|
5789
5905
|
});
|
|
5906
|
+
var listMemoryStores = (options) => (options.client ?? client).get({
|
|
5907
|
+
responseValidator: relaxedResponseValidator(zListMemoryStoresResponse),
|
|
5908
|
+
security: [{
|
|
5909
|
+
key: "bearerAuth",
|
|
5910
|
+
scheme: "bearer",
|
|
5911
|
+
type: "http"
|
|
5912
|
+
}, {
|
|
5913
|
+
in: "cookie",
|
|
5914
|
+
name: "__Host-omnara_session",
|
|
5915
|
+
type: "apiKey"
|
|
5916
|
+
}],
|
|
5917
|
+
url: "/orgs/{orgID}/projects/{projectID}/memory-stores",
|
|
5918
|
+
...options
|
|
5919
|
+
});
|
|
5920
|
+
var createMemoryStore = (options) => (options.client ?? client).post({
|
|
5921
|
+
responseValidator: relaxedResponseValidator(zCreateMemoryStoreResponse),
|
|
5922
|
+
security: [
|
|
5923
|
+
{
|
|
5924
|
+
key: "bearerAuth",
|
|
5925
|
+
scheme: "bearer",
|
|
5926
|
+
type: "http"
|
|
5927
|
+
},
|
|
5928
|
+
{
|
|
5929
|
+
in: "cookie",
|
|
5930
|
+
name: "__Host-omnara_session",
|
|
5931
|
+
type: "apiKey"
|
|
5932
|
+
},
|
|
5933
|
+
{ name: "X-Omnara-Csrf", type: "apiKey" }
|
|
5934
|
+
],
|
|
5935
|
+
url: "/orgs/{orgID}/projects/{projectID}/memory-stores",
|
|
5936
|
+
...options,
|
|
5937
|
+
headers: {
|
|
5938
|
+
"Content-Type": "application/json",
|
|
5939
|
+
...options.headers
|
|
5940
|
+
}
|
|
5941
|
+
});
|
|
5942
|
+
var deleteMemoryStore = (options) => (options.client ?? client).delete({
|
|
5943
|
+
responseValidator: relaxedResponseValidator(zDeleteMemoryStoreResponse),
|
|
5944
|
+
security: [
|
|
5945
|
+
{
|
|
5946
|
+
key: "bearerAuth",
|
|
5947
|
+
scheme: "bearer",
|
|
5948
|
+
type: "http"
|
|
5949
|
+
},
|
|
5950
|
+
{
|
|
5951
|
+
in: "cookie",
|
|
5952
|
+
name: "__Host-omnara_session",
|
|
5953
|
+
type: "apiKey"
|
|
5954
|
+
},
|
|
5955
|
+
{ name: "X-Omnara-Csrf", type: "apiKey" }
|
|
5956
|
+
],
|
|
5957
|
+
url: "/orgs/{orgID}/projects/{projectID}/memory-stores/{memoryStoreID}",
|
|
5958
|
+
...options
|
|
5959
|
+
});
|
|
5960
|
+
var getMemoryStore = (options) => (options.client ?? client).get({
|
|
5961
|
+
responseValidator: relaxedResponseValidator(zGetMemoryStoreResponse),
|
|
5962
|
+
security: [{
|
|
5963
|
+
key: "bearerAuth",
|
|
5964
|
+
scheme: "bearer",
|
|
5965
|
+
type: "http"
|
|
5966
|
+
}, {
|
|
5967
|
+
in: "cookie",
|
|
5968
|
+
name: "__Host-omnara_session",
|
|
5969
|
+
type: "apiKey"
|
|
5970
|
+
}],
|
|
5971
|
+
url: "/orgs/{orgID}/projects/{projectID}/memory-stores/{memoryStoreID}",
|
|
5972
|
+
...options
|
|
5973
|
+
});
|
|
5974
|
+
var updateMemoryStore = (options) => (options.client ?? client).patch({
|
|
5975
|
+
responseValidator: relaxedResponseValidator(zUpdateMemoryStoreResponse),
|
|
5976
|
+
security: [
|
|
5977
|
+
{
|
|
5978
|
+
key: "bearerAuth",
|
|
5979
|
+
scheme: "bearer",
|
|
5980
|
+
type: "http"
|
|
5981
|
+
},
|
|
5982
|
+
{
|
|
5983
|
+
in: "cookie",
|
|
5984
|
+
name: "__Host-omnara_session",
|
|
5985
|
+
type: "apiKey"
|
|
5986
|
+
},
|
|
5987
|
+
{ name: "X-Omnara-Csrf", type: "apiKey" }
|
|
5988
|
+
],
|
|
5989
|
+
url: "/orgs/{orgID}/projects/{projectID}/memory-stores/{memoryStoreID}",
|
|
5990
|
+
...options,
|
|
5991
|
+
headers: {
|
|
5992
|
+
"Content-Type": "application/json",
|
|
5993
|
+
...options.headers
|
|
5994
|
+
}
|
|
5995
|
+
});
|
|
5996
|
+
var listMemoryFiles = (options) => (options.client ?? client).get({
|
|
5997
|
+
responseValidator: relaxedResponseValidator(zListMemoryFilesResponse),
|
|
5998
|
+
security: [{
|
|
5999
|
+
key: "bearerAuth",
|
|
6000
|
+
scheme: "bearer",
|
|
6001
|
+
type: "http"
|
|
6002
|
+
}, {
|
|
6003
|
+
in: "cookie",
|
|
6004
|
+
name: "__Host-omnara_session",
|
|
6005
|
+
type: "apiKey"
|
|
6006
|
+
}],
|
|
6007
|
+
url: "/orgs/{orgID}/projects/{projectID}/memory-stores/{memoryStoreID}/files",
|
|
6008
|
+
...options
|
|
6009
|
+
});
|
|
6010
|
+
var deleteMemoryFile = (options) => (options.client ?? client).delete({
|
|
6011
|
+
responseValidator: relaxedResponseValidator(zDeleteMemoryFileResponse),
|
|
6012
|
+
security: [
|
|
6013
|
+
{
|
|
6014
|
+
key: "bearerAuth",
|
|
6015
|
+
scheme: "bearer",
|
|
6016
|
+
type: "http"
|
|
6017
|
+
},
|
|
6018
|
+
{
|
|
6019
|
+
in: "cookie",
|
|
6020
|
+
name: "__Host-omnara_session",
|
|
6021
|
+
type: "apiKey"
|
|
6022
|
+
},
|
|
6023
|
+
{ name: "X-Omnara-Csrf", type: "apiKey" }
|
|
6024
|
+
],
|
|
6025
|
+
url: "/orgs/{orgID}/projects/{projectID}/memory-stores/{memoryStoreID}/file",
|
|
6026
|
+
...options
|
|
6027
|
+
});
|
|
6028
|
+
var downloadMemoryFile = (options) => (options.client ?? client).get({
|
|
6029
|
+
responseValidator: relaxedResponseValidator(zDownloadMemoryFileResponse),
|
|
6030
|
+
security: [{
|
|
6031
|
+
key: "bearerAuth",
|
|
6032
|
+
scheme: "bearer",
|
|
6033
|
+
type: "http"
|
|
6034
|
+
}, {
|
|
6035
|
+
in: "cookie",
|
|
6036
|
+
name: "__Host-omnara_session",
|
|
6037
|
+
type: "apiKey"
|
|
6038
|
+
}],
|
|
6039
|
+
url: "/orgs/{orgID}/projects/{projectID}/memory-stores/{memoryStoreID}/file",
|
|
6040
|
+
...options
|
|
6041
|
+
});
|
|
6042
|
+
var writeMemoryFile = (options) => (options.client ?? client).put({
|
|
6043
|
+
bodySerializer: null,
|
|
6044
|
+
responseValidator: relaxedResponseValidator(zWriteMemoryFileResponse),
|
|
6045
|
+
security: [
|
|
6046
|
+
{
|
|
6047
|
+
key: "bearerAuth",
|
|
6048
|
+
scheme: "bearer",
|
|
6049
|
+
type: "http"
|
|
6050
|
+
},
|
|
6051
|
+
{
|
|
6052
|
+
in: "cookie",
|
|
6053
|
+
name: "__Host-omnara_session",
|
|
6054
|
+
type: "apiKey"
|
|
6055
|
+
},
|
|
6056
|
+
{ name: "X-Omnara-Csrf", type: "apiKey" }
|
|
6057
|
+
],
|
|
6058
|
+
url: "/orgs/{orgID}/projects/{projectID}/memory-stores/{memoryStoreID}/file",
|
|
6059
|
+
...options,
|
|
6060
|
+
headers: {
|
|
6061
|
+
"Content-Type": "application/octet-stream",
|
|
6062
|
+
...options.headers
|
|
6063
|
+
}
|
|
6064
|
+
});
|
|
5790
6065
|
var listSecrets = (options) => (options.client ?? client).get({
|
|
5791
6066
|
responseValidator: relaxedResponseValidator(zListSecretsResponse2),
|
|
5792
6067
|
security: [{
|
|
@@ -7574,32 +7849,36 @@ var getDaemonSkillArchive = (options) => (options.client ?? client).get({
|
|
|
7574
7849
|
url: "/daemon/skills/{skillID}/archive",
|
|
7575
7850
|
...options
|
|
7576
7851
|
});
|
|
7577
|
-
var
|
|
7578
|
-
|
|
7579
|
-
responseValidator: relaxedResponseValidator(zUploadDaemonArtifactResponse),
|
|
7852
|
+
var downloadDaemonFile = (options) => (options.client ?? client).get({
|
|
7853
|
+
responseValidator: relaxedResponseValidator(zDownloadDaemonFileResponse),
|
|
7580
7854
|
security: [{
|
|
7581
7855
|
key: "machineDaemonAuth",
|
|
7582
7856
|
scheme: "bearer",
|
|
7583
7857
|
type: "http"
|
|
7584
7858
|
}],
|
|
7585
|
-
url: "/daemon/
|
|
7586
|
-
...options
|
|
7587
|
-
headers: {
|
|
7588
|
-
"Content-Type": "application/octet-stream",
|
|
7589
|
-
...options.headers
|
|
7590
|
-
}
|
|
7859
|
+
url: "/daemon/processes/{processID}/file",
|
|
7860
|
+
...options
|
|
7591
7861
|
});
|
|
7592
|
-
var
|
|
7593
|
-
|
|
7862
|
+
var uploadDaemonFile = (options) => (options.client ?? client).post({
|
|
7863
|
+
bodySerializer: null,
|
|
7864
|
+
responseValidator: relaxedResponseValidator(zUploadDaemonFileResponse),
|
|
7594
7865
|
security: [{
|
|
7595
7866
|
key: "machineDaemonAuth",
|
|
7596
7867
|
scheme: "bearer",
|
|
7597
7868
|
type: "http"
|
|
7598
7869
|
}],
|
|
7599
|
-
url: "/daemon/
|
|
7600
|
-
...options
|
|
7870
|
+
url: "/daemon/processes/{processID}/file",
|
|
7871
|
+
...options,
|
|
7872
|
+
headers: {
|
|
7873
|
+
"Content-Type": "application/octet-stream",
|
|
7874
|
+
...options.headers
|
|
7875
|
+
}
|
|
7601
7876
|
});
|
|
7602
7877
|
|
|
7878
|
+
// ../sdk/src/memory.ts
|
|
7879
|
+
var MAX_MEMORY_FILE_BYTES = 10 * 1024 * 1024;
|
|
7880
|
+
var FILE_DIGEST_HEADER = "X-Omnara-File-Digest";
|
|
7881
|
+
|
|
7603
7882
|
// src/config-file.ts
|
|
7604
7883
|
import { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
7605
7884
|
import { homedir } from "node:os";
|
|
@@ -7790,6 +8069,7 @@ ${z8.prettifyError(error)}`);
|
|
|
7790
8069
|
} else if (error instanceof ApiError) {
|
|
7791
8070
|
const code = error.code ? ` [${error.code}]` : "";
|
|
7792
8071
|
console.error(`error: API ${error.status}${code}: ${error.message}`);
|
|
8072
|
+
if (error.currentDigest) console.error(`current_digest: ${error.currentDigest}`);
|
|
7793
8073
|
} else {
|
|
7794
8074
|
console.error(`error: ${error instanceof Error ? error.message : String(error)}`);
|
|
7795
8075
|
}
|
|
@@ -8810,10 +9090,10 @@ function registerLoginCommand(program2, cli) {
|
|
|
8810
9090
|
}
|
|
8811
9091
|
|
|
8812
9092
|
// src/manifest.ts
|
|
8813
|
-
import * as
|
|
9093
|
+
import * as z26 from "zod";
|
|
8814
9094
|
|
|
8815
9095
|
// src/agent-commands.ts
|
|
8816
|
-
import * as
|
|
9096
|
+
import * as z18 from "zod";
|
|
8817
9097
|
|
|
8818
9098
|
// ../sdk/src/generated/@tanstack/react-query.gen.ts
|
|
8819
9099
|
import { infiniteQueryOptions, queryOptions } from "@tanstack/react-query";
|
|
@@ -8918,7 +9198,10 @@ function useOmnaraClient() {
|
|
|
8918
9198
|
import { z as z13 } from "zod";
|
|
8919
9199
|
var generatedQueryKeyEntry = z13.object({
|
|
8920
9200
|
_id: z13.string(),
|
|
8921
|
-
path: z13.object({
|
|
9201
|
+
path: z13.object({
|
|
9202
|
+
orgID: z13.string().optional(),
|
|
9203
|
+
projectID: z13.string().optional()
|
|
9204
|
+
}).optional()
|
|
8922
9205
|
});
|
|
8923
9206
|
function generatedQueryKey(query) {
|
|
8924
9207
|
const parsed = generatedQueryKeyEntry.safeParse(query.queryKey[0]);
|
|
@@ -10164,49 +10447,52 @@ var mcpServerToolsStaleTime = 60 * 1e3;
|
|
|
10164
10447
|
// ../react/src/domains/me.ts
|
|
10165
10448
|
import { useMutation as useMutation11, useQueryClient as useQueryClient13, useSuspenseQuery as useSuspenseQuery5 } from "@tanstack/react-query";
|
|
10166
10449
|
|
|
10167
|
-
// ../react/src/domains/
|
|
10450
|
+
// ../react/src/domains/memory.ts
|
|
10168
10451
|
import {
|
|
10452
|
+
skipToken,
|
|
10169
10453
|
useInfiniteQuery as useInfiniteQuery9,
|
|
10170
10454
|
useMutation as useMutation12,
|
|
10171
|
-
useQueries,
|
|
10172
10455
|
useQuery as useQuery12,
|
|
10173
10456
|
useQueryClient as useQueryClient14
|
|
10174
10457
|
} from "@tanstack/react-query";
|
|
10458
|
+
import * as z15 from "zod";
|
|
10459
|
+
var memoryFileDigest = z15.object({ digest: z15.string() });
|
|
10460
|
+
|
|
10461
|
+
// ../react/src/domains/model-providers.ts
|
|
10462
|
+
import {
|
|
10463
|
+
useInfiniteQuery as useInfiniteQuery10,
|
|
10464
|
+
useMutation as useMutation13,
|
|
10465
|
+
useQueries,
|
|
10466
|
+
useQuery as useQuery13,
|
|
10467
|
+
useQueryClient as useQueryClient15
|
|
10468
|
+
} from "@tanstack/react-query";
|
|
10175
10469
|
import { useEffect as useEffect2 } from "react";
|
|
10176
10470
|
var modelCatalogPricingStaleTime = 5 * 60 * 1e3;
|
|
10177
10471
|
|
|
10178
10472
|
// ../react/src/domains/org-api-keys.ts
|
|
10179
|
-
import { useInfiniteQuery as
|
|
10473
|
+
import { useInfiniteQuery as useInfiniteQuery11, useMutation as useMutation14, useQuery as useQuery14, useQueryClient as useQueryClient16 } from "@tanstack/react-query";
|
|
10180
10474
|
|
|
10181
10475
|
// ../react/src/domains/org-members.ts
|
|
10182
|
-
import { useMutation as
|
|
10476
|
+
import { useMutation as useMutation15, useQuery as useQuery15, useQueryClient as useQueryClient17 } from "@tanstack/react-query";
|
|
10183
10477
|
|
|
10184
10478
|
// ../react/src/domains/orgs.ts
|
|
10185
|
-
import { useInfiniteQuery as
|
|
10479
|
+
import { useInfiniteQuery as useInfiniteQuery12, useMutation as useMutation16, useQuery as useQuery16, useQueryClient as useQueryClient18 } from "@tanstack/react-query";
|
|
10186
10480
|
|
|
10187
10481
|
// ../react/src/domains/personal-access-tokens.ts
|
|
10188
|
-
import { useInfiniteQuery as
|
|
10482
|
+
import { useInfiniteQuery as useInfiniteQuery13, useMutation as useMutation17, useQueryClient as useQueryClient19 } from "@tanstack/react-query";
|
|
10189
10483
|
|
|
10190
10484
|
// ../react/src/domains/project-grants.ts
|
|
10191
|
-
import { useInfiniteQuery as
|
|
10485
|
+
import { useInfiniteQuery as useInfiniteQuery14, useMutation as useMutation18, useQueryClient as useQueryClient20 } from "@tanstack/react-query";
|
|
10192
10486
|
|
|
10193
10487
|
// ../react/src/domains/projects.ts
|
|
10194
10488
|
import {
|
|
10195
|
-
skipToken,
|
|
10196
|
-
useInfiniteQuery as
|
|
10197
|
-
useQueryClient as
|
|
10489
|
+
skipToken as skipToken2,
|
|
10490
|
+
useInfiniteQuery as useInfiniteQuery15,
|
|
10491
|
+
useQueryClient as useQueryClient21,
|
|
10198
10492
|
useSuspenseInfiniteQuery
|
|
10199
10493
|
} from "@tanstack/react-query";
|
|
10200
10494
|
|
|
10201
10495
|
// ../react/src/domains/secrets.ts
|
|
10202
|
-
import {
|
|
10203
|
-
useInfiniteQuery as useInfiniteQuery15,
|
|
10204
|
-
useMutation as useMutation18,
|
|
10205
|
-
useQuery as useQuery16,
|
|
10206
|
-
useQueryClient as useQueryClient21
|
|
10207
|
-
} from "@tanstack/react-query";
|
|
10208
|
-
|
|
10209
|
-
// ../react/src/domains/skills.ts
|
|
10210
10496
|
import {
|
|
10211
10497
|
useInfiniteQuery as useInfiniteQuery16,
|
|
10212
10498
|
useMutation as useMutation19,
|
|
@@ -10214,8 +10500,16 @@ import {
|
|
|
10214
10500
|
useQueryClient as useQueryClient22
|
|
10215
10501
|
} from "@tanstack/react-query";
|
|
10216
10502
|
|
|
10503
|
+
// ../react/src/domains/skills.ts
|
|
10504
|
+
import {
|
|
10505
|
+
useInfiniteQuery as useInfiniteQuery17,
|
|
10506
|
+
useMutation as useMutation20,
|
|
10507
|
+
useQuery as useQuery18,
|
|
10508
|
+
useQueryClient as useQueryClient23
|
|
10509
|
+
} from "@tanstack/react-query";
|
|
10510
|
+
|
|
10217
10511
|
// ../react/src/domains/tool-catalog.ts
|
|
10218
|
-
import { useQuery as
|
|
10512
|
+
import { useQuery as useQuery19 } from "@tanstack/react-query";
|
|
10219
10513
|
|
|
10220
10514
|
// src/chat.tsx
|
|
10221
10515
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
@@ -10224,10 +10518,10 @@ import { render } from "ink";
|
|
|
10224
10518
|
// src/chat-ui.tsx
|
|
10225
10519
|
import { Box as Box2, Static, Text as Text2, useApp } from "ink";
|
|
10226
10520
|
import { useEffect as useEffect3, useMemo as useMemo2, useReducer, useState as useState2 } from "react";
|
|
10227
|
-
import * as
|
|
10521
|
+
import * as z17 from "zod";
|
|
10228
10522
|
|
|
10229
10523
|
// src/agent-rendering.ts
|
|
10230
|
-
import * as
|
|
10524
|
+
import * as z16 from "zod";
|
|
10231
10525
|
var formatAgentEventList = (response) => {
|
|
10232
10526
|
const page = {
|
|
10233
10527
|
data: response.data.map((event) => ({
|
|
@@ -10244,10 +10538,10 @@ var formatAgentEventList = (response) => {
|
|
|
10244
10538
|
return { value: next_before_sequence == null ? page : { ...page, next_before_sequence } };
|
|
10245
10539
|
};
|
|
10246
10540
|
var summaryWidth = 100;
|
|
10247
|
-
var zJsonValue =
|
|
10248
|
-
var zRunCommandInput =
|
|
10541
|
+
var zJsonValue = z16.json();
|
|
10542
|
+
var zRunCommandInput = z16.object({ command: z16.string() });
|
|
10249
10543
|
function summaryValue(value) {
|
|
10250
|
-
const text =
|
|
10544
|
+
const text = z16.string().safeParse(value);
|
|
10251
10545
|
return text.success ? text.data : JSON.stringify(value);
|
|
10252
10546
|
}
|
|
10253
10547
|
function toolCallSummary(name, input) {
|
|
@@ -10441,10 +10735,10 @@ import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
|
10441
10735
|
var spinnerFrames = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
|
|
10442
10736
|
var streamingTailLines = 8;
|
|
10443
10737
|
var streamingTailChars = 1500;
|
|
10444
|
-
var zToolInput2 =
|
|
10445
|
-
var zToolOutput =
|
|
10738
|
+
var zToolInput2 = z17.record(z17.string(), z17.json());
|
|
10739
|
+
var zToolOutput = z17.object({
|
|
10446
10740
|
outcome: zToolCallOutcome,
|
|
10447
|
-
contentBlocks:
|
|
10741
|
+
contentBlocks: z17.array(zToolResultContentBlock)
|
|
10448
10742
|
});
|
|
10449
10743
|
function formatDuration(ms) {
|
|
10450
10744
|
const seconds = Math.max(1, Math.round(ms / 1e3));
|
|
@@ -10810,7 +11104,7 @@ var agentEventsStreamOp = customOp({
|
|
|
10810
11104
|
},
|
|
10811
11105
|
run: async ({ client: client2, path, args, options }) => {
|
|
10812
11106
|
const agentID = parseWithSchema(zAgentId, args[0], "agent id");
|
|
10813
|
-
const afterSequence = parseWithSchema(
|
|
11107
|
+
const afterSequence = parseWithSchema(z18.int().gte(0).optional(), options.afterSequence, "--after-sequence") ?? 0;
|
|
10814
11108
|
const abort = new AbortController();
|
|
10815
11109
|
process.once("SIGINT", () => {
|
|
10816
11110
|
abort.abort();
|
|
@@ -10827,12 +11121,12 @@ var agentEventsStreamOp = customOp({
|
|
|
10827
11121
|
|
|
10828
11122
|
// src/config-attachment.ts
|
|
10829
11123
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
10830
|
-
import * as
|
|
10831
|
-
var zConfigSourceAttachment =
|
|
10832
|
-
file:
|
|
10833
|
-
source:
|
|
11124
|
+
import * as z19 from "zod";
|
|
11125
|
+
var zConfigSourceAttachment = z19.object({
|
|
11126
|
+
file: z19.string().min(1).optional().describe("path to an agent config file (.yaml, .yml, or .json)"),
|
|
11127
|
+
source: z19.string().min(1).optional().describe("inline agent config source (YAML or JSON)")
|
|
10834
11128
|
});
|
|
10835
|
-
var zConfigAttachment =
|
|
11129
|
+
var zConfigAttachment = z19.object({
|
|
10836
11130
|
config: zAgentConfigId.optional().describe("existing agent config ID"),
|
|
10837
11131
|
...zConfigSourceAttachment.shape
|
|
10838
11132
|
});
|
|
@@ -10918,7 +11212,7 @@ import { spawn as spawn2, spawnSync } from "node:child_process";
|
|
|
10918
11212
|
import { accessSync, constants, existsSync as existsSync2, readdirSync, readFileSync as readFileSync3 } from "node:fs";
|
|
10919
11213
|
import { homedir as homedir2, release } from "node:os";
|
|
10920
11214
|
import { basename, dirname as dirname2, isAbsolute, join as join2, resolve } from "node:path";
|
|
10921
|
-
import * as
|
|
11215
|
+
import * as z20 from "zod";
|
|
10922
11216
|
var zMachineSetupBody = zConnectByoMachineRequest;
|
|
10923
11217
|
async function connectMachine(context) {
|
|
10924
11218
|
const { client: client2, path, body, report } = context;
|
|
@@ -10955,9 +11249,9 @@ var daemonConfigFileName = "daemon.json";
|
|
|
10955
11249
|
var installLockFileName = "install.lock";
|
|
10956
11250
|
var daemonLockFileName = "daemon.lock";
|
|
10957
11251
|
var daemonLockPollMs = 250;
|
|
10958
|
-
var zDaemonConfigFile =
|
|
10959
|
-
machine_id:
|
|
10960
|
-
api_url:
|
|
11252
|
+
var zDaemonConfigFile = z20.looseObject({
|
|
11253
|
+
machine_id: z20.string().optional(),
|
|
11254
|
+
api_url: z20.string().optional()
|
|
10961
11255
|
});
|
|
10962
11256
|
function daemonHome() {
|
|
10963
11257
|
const override = process.env.OMNARA_HOME;
|
|
@@ -11239,10 +11533,10 @@ function runInstaller(report, apiUrl, token, machineId, home) {
|
|
|
11239
11533
|
|
|
11240
11534
|
// src/mcp-add.ts
|
|
11241
11535
|
import { isMap, isScalar as isScalar2, parseDocument } from "yaml";
|
|
11242
|
-
import * as
|
|
11536
|
+
import * as z22 from "zod";
|
|
11243
11537
|
|
|
11244
11538
|
// src/mcp-oauth.ts
|
|
11245
|
-
import * as
|
|
11539
|
+
import * as z21 from "zod";
|
|
11246
11540
|
async function authorizeMcpOAuthSecret(options) {
|
|
11247
11541
|
const { data: start } = await sdk_gen_exports.startSecretMcpoAuth({
|
|
11248
11542
|
client: options.client,
|
|
@@ -11263,7 +11557,7 @@ async function authorizeMcpOAuthSecret(options) {
|
|
|
11263
11557
|
}
|
|
11264
11558
|
});
|
|
11265
11559
|
}
|
|
11266
|
-
var zBrowserFlag =
|
|
11560
|
+
var zBrowserFlag = z21.boolean().default(true).describe("open the authorization URL in a browser");
|
|
11267
11561
|
function openAuthorizationUrl(report, title, url4, browser) {
|
|
11268
11562
|
report.url(title, url4);
|
|
11269
11563
|
if (browser) {
|
|
@@ -11299,7 +11593,7 @@ async function runMcpOAuth(context) {
|
|
|
11299
11593
|
// src/mcp-add.ts
|
|
11300
11594
|
var SERVER_KEY_PATTERN = /^[a-zA-Z][a-zA-Z0-9-]{0,31}$/;
|
|
11301
11595
|
var zMcpAddBody = zMcpoAuthStartRequest.omit({ owner: true, name: true }).extend({
|
|
11302
|
-
server_name:
|
|
11596
|
+
server_name: z22.string().regex(
|
|
11303
11597
|
SERVER_KEY_PATTERN,
|
|
11304
11598
|
"must start with a letter and contain at most 32 letters, digits, or hyphens"
|
|
11305
11599
|
).describe("MCP server key used in the agent config"),
|
|
@@ -11312,7 +11606,7 @@ function targetLabel(target) {
|
|
|
11312
11606
|
function serverEntry(url4, secretId) {
|
|
11313
11607
|
return { url: url4, auth: { type: "oauth", secret_id: secretId } };
|
|
11314
11608
|
}
|
|
11315
|
-
var zJsonRecord =
|
|
11609
|
+
var zJsonRecord = z22.record(z22.string(), z22.json());
|
|
11316
11610
|
function prepareJsonConfig(config2, serverName, mcpUrl) {
|
|
11317
11611
|
const json8 = zJsonText.safeParse(config2.source ?? "");
|
|
11318
11612
|
if (!json8.success) throw new CliInputError("the current agent config contains invalid JSON");
|
|
@@ -11471,14 +11765,61 @@ function runProfileMcpAdd(context) {
|
|
|
11471
11765
|
return runMcpAdd(context, "profile", context.path.agentProfileID);
|
|
11472
11766
|
}
|
|
11473
11767
|
|
|
11768
|
+
// src/memory-files.ts
|
|
11769
|
+
import { open, writeFile } from "node:fs/promises";
|
|
11770
|
+
import { buffer } from "node:stream/consumers";
|
|
11771
|
+
import * as z23 from "zod";
|
|
11772
|
+
var zMemoryUploadBody = z23.object({
|
|
11773
|
+
file: z23.string().min(1).describe("local file to upload")
|
|
11774
|
+
});
|
|
11775
|
+
async function loadMemoryUpload(file) {
|
|
11776
|
+
const handle = await open(file, "r");
|
|
11777
|
+
try {
|
|
11778
|
+
if ((await handle.stat()).size > MAX_MEMORY_FILE_BYTES) {
|
|
11779
|
+
throw new CliInputError("memory file exceeds the 10 MiB upload limit");
|
|
11780
|
+
}
|
|
11781
|
+
const bytes = await buffer(
|
|
11782
|
+
handle.createReadStream({ end: MAX_MEMORY_FILE_BYTES, autoClose: false })
|
|
11783
|
+
);
|
|
11784
|
+
if (bytes.length > MAX_MEMORY_FILE_BYTES) {
|
|
11785
|
+
throw new CliInputError("memory file exceeds the 10 MiB upload limit");
|
|
11786
|
+
}
|
|
11787
|
+
return new Blob([new Uint8Array(bytes)]);
|
|
11788
|
+
} finally {
|
|
11789
|
+
await handle.close();
|
|
11790
|
+
}
|
|
11791
|
+
}
|
|
11792
|
+
var memoryDownloadOp = customOp({
|
|
11793
|
+
verb: "download",
|
|
11794
|
+
summary: "Download a memory file",
|
|
11795
|
+
path: zDownloadMemoryFilePath,
|
|
11796
|
+
configure: (command) => {
|
|
11797
|
+
command.requiredOption("--path <path>", "file path relative to the store root").requiredOption("--output <file>", "local destination; must not already exist").option("--json", "print download metadata as JSON");
|
|
11798
|
+
},
|
|
11799
|
+
run: async ({ client: client2, path, options }) => {
|
|
11800
|
+
const query = parseWithSchema(
|
|
11801
|
+
zDownloadMemoryFileQuery,
|
|
11802
|
+
{ path: options.path ?? null },
|
|
11803
|
+
"query flags"
|
|
11804
|
+
);
|
|
11805
|
+
const output = parseWithSchema(z23.string().min(1), options.output, "--output");
|
|
11806
|
+
const { response } = await sdk_gen_exports.downloadMemoryFile({ client: client2, path, query, parseAs: "stream" });
|
|
11807
|
+
const digest = response.headers.get(FILE_DIGEST_HEADER);
|
|
11808
|
+
if (!digest) throw new CliInputError("file response is missing its digest");
|
|
11809
|
+
const bytes = new Uint8Array(await response.arrayBuffer());
|
|
11810
|
+
await writeFile(output, bytes, { flag: "wx" });
|
|
11811
|
+
renderResult({ output, digest }, options.json === true);
|
|
11812
|
+
}
|
|
11813
|
+
});
|
|
11814
|
+
|
|
11474
11815
|
// src/skill-archive.ts
|
|
11475
11816
|
import { readdirSync as readdirSync2, readFileSync as readFileSync4, statSync } from "node:fs";
|
|
11476
11817
|
import { basename as basename2, dirname as dirname3, join as join3, resolve as resolve2 } from "node:path";
|
|
11477
11818
|
import * as tar from "tar";
|
|
11478
|
-
import * as
|
|
11479
|
-
var zCreateSkillCliBody =
|
|
11819
|
+
import * as z24 from "zod";
|
|
11820
|
+
var zCreateSkillCliBody = z24.object({
|
|
11480
11821
|
owner: zSkillOwnerInput,
|
|
11481
|
-
archive:
|
|
11822
|
+
archive: z24.string().min(1).describe("path to a skill directory (packed automatically) or a .zip/.tar.gz archive")
|
|
11482
11823
|
});
|
|
11483
11824
|
var ARCHIVE_SUFFIXES = [".zip", ".tar.gz", ".tgz"];
|
|
11484
11825
|
function assertPackable(dir) {
|
|
@@ -11507,8 +11848,8 @@ async function loadSkillArchive(archivePath) {
|
|
|
11507
11848
|
throw new CliInputError(`archive path not found: ${archivePath}`);
|
|
11508
11849
|
}
|
|
11509
11850
|
if (isDirectory) {
|
|
11510
|
-
const
|
|
11511
|
-
return new File([new Uint8Array(
|
|
11851
|
+
const buffer2 = await packDirectory(archivePath);
|
|
11852
|
+
return new File([new Uint8Array(buffer2)], `${basename2(resolve2(archivePath))}.tar.gz`);
|
|
11512
11853
|
}
|
|
11513
11854
|
const filename = basename2(archivePath);
|
|
11514
11855
|
if (!ARCHIVE_SUFFIXES.some((suffix) => filename.toLowerCase().endsWith(suffix))) {
|
|
@@ -11520,16 +11861,16 @@ async function loadSkillArchive(archivePath) {
|
|
|
11520
11861
|
}
|
|
11521
11862
|
|
|
11522
11863
|
// src/slack-integration.ts
|
|
11523
|
-
import * as
|
|
11524
|
-
var zSlackBody =
|
|
11525
|
-
app_name:
|
|
11526
|
-
app_configuration_token:
|
|
11527
|
-
icon_filename:
|
|
11528
|
-
icon_data_base64:
|
|
11529
|
-
client_id:
|
|
11530
|
-
client_secret:
|
|
11531
|
-
signing_secret:
|
|
11532
|
-
return_to:
|
|
11864
|
+
import * as z25 from "zod";
|
|
11865
|
+
var zSlackBody = z25.object({
|
|
11866
|
+
app_name: z25.string().optional().describe("name for a new Slack app"),
|
|
11867
|
+
app_configuration_token: z25.string().optional().describe("Slack app configuration token for a new app"),
|
|
11868
|
+
icon_filename: z25.string().optional().describe("filename for the new Slack app icon"),
|
|
11869
|
+
icon_data_base64: z25.string().optional().describe("base64-encoded Slack app icon"),
|
|
11870
|
+
client_id: z25.string().optional().describe("existing Slack app client ID"),
|
|
11871
|
+
client_secret: z25.string().optional().describe("existing Slack app client secret"),
|
|
11872
|
+
signing_secret: z25.string().optional().describe("existing Slack app signing secret"),
|
|
11873
|
+
return_to: z25.string().optional().describe("console-relative path opened after authorization"),
|
|
11533
11874
|
browser: zBrowserFlag
|
|
11534
11875
|
});
|
|
11535
11876
|
function parseRequest(body) {
|
|
@@ -11559,7 +11900,7 @@ function parseRequest(body) {
|
|
|
11559
11900
|
if (!result2.success) {
|
|
11560
11901
|
throw new CliInputError(
|
|
11561
11902
|
`invalid existing Slack app parameters:
|
|
11562
|
-
${
|
|
11903
|
+
${z25.prettifyError(result2.error)}`
|
|
11563
11904
|
);
|
|
11564
11905
|
}
|
|
11565
11906
|
return { kind: "existing-app", body: result2.data };
|
|
@@ -11580,7 +11921,7 @@ ${z23.prettifyError(result2.error)}`
|
|
|
11580
11921
|
if (!result.success) {
|
|
11581
11922
|
throw new CliInputError(
|
|
11582
11923
|
`invalid Slack app parameters:
|
|
11583
|
-
${
|
|
11924
|
+
${z25.prettifyError(result.error)}
|
|
11584
11925
|
Pass --app-name and --app-configuration-token, or existing app credentials.`
|
|
11585
11926
|
);
|
|
11586
11927
|
}
|
|
@@ -11679,7 +12020,7 @@ var commandGroups = [
|
|
|
11679
12020
|
body: zConfigAttachment.extend({
|
|
11680
12021
|
profile: zAgentProfileId.optional(),
|
|
11681
12022
|
name: zAgentName.optional(),
|
|
11682
|
-
message:
|
|
12023
|
+
message: z26.string().optional()
|
|
11683
12024
|
}),
|
|
11684
12025
|
transformBody: async ({ profile, name, message, ...attachment }, { client: client2, path }) => ({
|
|
11685
12026
|
profile,
|
|
@@ -11720,7 +12061,7 @@ var commandGroups = [
|
|
|
11720
12061
|
flowOp({
|
|
11721
12062
|
verb: "mcp-add",
|
|
11722
12063
|
summary: "Create an OAuth secret and add an MCP server to an agent",
|
|
11723
|
-
path:
|
|
12064
|
+
path: z26.object({
|
|
11724
12065
|
orgID: zOrganizationId,
|
|
11725
12066
|
projectID: zProjectId,
|
|
11726
12067
|
agentID: zAgentId
|
|
@@ -11736,7 +12077,7 @@ var commandGroups = [
|
|
|
11736
12077
|
format: (response) => formatRecord()(response.agent_input),
|
|
11737
12078
|
path: zCreateAgentInputPath,
|
|
11738
12079
|
body: zCreateAgentInputBody.partial({ content_blocks: true }).extend({
|
|
11739
|
-
message:
|
|
12080
|
+
message: z26.string().optional().describe("plain text to send as a single text block")
|
|
11740
12081
|
}).transform(({ message, content_blocks, ...rest }, ctx) => {
|
|
11741
12082
|
if (content_blocks !== void 0 && message === void 0) {
|
|
11742
12083
|
return { ...rest, content_blocks };
|
|
@@ -11745,7 +12086,7 @@ var commandGroups = [
|
|
|
11745
12086
|
return { ...rest, content_blocks: [{ type: "text", text: message }] };
|
|
11746
12087
|
}
|
|
11747
12088
|
ctx.addIssue("pass exactly one of --message or --content-blocks");
|
|
11748
|
-
return
|
|
12089
|
+
return z26.NEVER;
|
|
11749
12090
|
})
|
|
11750
12091
|
})
|
|
11751
12092
|
],
|
|
@@ -11762,8 +12103,8 @@ var commandGroups = [
|
|
|
11762
12103
|
format: formatAgentEventList,
|
|
11763
12104
|
path: zListEventsPath,
|
|
11764
12105
|
query: zListEventsQuery.extend({
|
|
11765
|
-
before_sequence:
|
|
11766
|
-
after_sequence:
|
|
12106
|
+
before_sequence: z26.int().gte(0).optional(),
|
|
12107
|
+
after_sequence: z26.int().gte(0).optional()
|
|
11767
12108
|
})
|
|
11768
12109
|
}),
|
|
11769
12110
|
agentEventsStreamOp
|
|
@@ -12260,7 +12601,7 @@ var commandGroups = [
|
|
|
12260
12601
|
flowOp({
|
|
12261
12602
|
verb: "mcp-oauth",
|
|
12262
12603
|
summary: "Create a secret through an MCP server OAuth flow",
|
|
12263
|
-
path:
|
|
12604
|
+
path: z26.object({ orgID: zOrganizationId }),
|
|
12264
12605
|
body: zMcpOAuthBody,
|
|
12265
12606
|
run: runMcpOAuth
|
|
12266
12607
|
})
|
|
@@ -12307,6 +12648,99 @@ var commandGroups = [
|
|
|
12307
12648
|
})
|
|
12308
12649
|
]
|
|
12309
12650
|
},
|
|
12651
|
+
{
|
|
12652
|
+
name: "memory-stores",
|
|
12653
|
+
aliases: ["memory-store"],
|
|
12654
|
+
summary: "Manage project memory stores",
|
|
12655
|
+
operations: [
|
|
12656
|
+
op({
|
|
12657
|
+
verb: "list",
|
|
12658
|
+
summary: "List memory stores",
|
|
12659
|
+
fn: sdk_gen_exports.listMemoryStores,
|
|
12660
|
+
format: formatTable([
|
|
12661
|
+
"id",
|
|
12662
|
+
"name",
|
|
12663
|
+
"description",
|
|
12664
|
+
"agent_access",
|
|
12665
|
+
"created_at",
|
|
12666
|
+
"updated_at"
|
|
12667
|
+
]),
|
|
12668
|
+
path: zListMemoryStoresPath,
|
|
12669
|
+
query: zListMemoryStoresQuery
|
|
12670
|
+
}),
|
|
12671
|
+
op({
|
|
12672
|
+
verb: "get",
|
|
12673
|
+
summary: "Fetch a memory store",
|
|
12674
|
+
fn: sdk_gen_exports.getMemoryStore,
|
|
12675
|
+
format: formatRecord(),
|
|
12676
|
+
path: zGetMemoryStorePath
|
|
12677
|
+
}),
|
|
12678
|
+
op({
|
|
12679
|
+
verb: "create",
|
|
12680
|
+
summary: "Create a memory store",
|
|
12681
|
+
fn: sdk_gen_exports.createMemoryStore,
|
|
12682
|
+
format: formatRecord(),
|
|
12683
|
+
path: zCreateMemoryStorePath,
|
|
12684
|
+
body: zCreateMemoryStoreBody
|
|
12685
|
+
}),
|
|
12686
|
+
op({
|
|
12687
|
+
verb: "update",
|
|
12688
|
+
summary: "Update memory store settings",
|
|
12689
|
+
fn: sdk_gen_exports.updateMemoryStore,
|
|
12690
|
+
format: formatRecord(),
|
|
12691
|
+
path: zUpdateMemoryStorePath,
|
|
12692
|
+
body: zUpdateMemoryStoreBody
|
|
12693
|
+
}),
|
|
12694
|
+
op({
|
|
12695
|
+
verb: "delete",
|
|
12696
|
+
summary: "Delete a memory store",
|
|
12697
|
+
fn: sdk_gen_exports.deleteMemoryStore,
|
|
12698
|
+
format: formatVoid("deleted"),
|
|
12699
|
+
path: zDeleteMemoryStorePath
|
|
12700
|
+
})
|
|
12701
|
+
],
|
|
12702
|
+
groups: [
|
|
12703
|
+
{
|
|
12704
|
+
name: "files",
|
|
12705
|
+
aliases: ["file"],
|
|
12706
|
+
summary: "Manage files in a memory store",
|
|
12707
|
+
operations: [
|
|
12708
|
+
op({
|
|
12709
|
+
verb: "list",
|
|
12710
|
+
summary: "List files and directories in a memory store",
|
|
12711
|
+
fn: sdk_gen_exports.listMemoryFiles,
|
|
12712
|
+
format: formatTable([
|
|
12713
|
+
"path",
|
|
12714
|
+
"type",
|
|
12715
|
+
"size_bytes",
|
|
12716
|
+
"modified_at"
|
|
12717
|
+
]),
|
|
12718
|
+
path: zListMemoryFilesPath,
|
|
12719
|
+
query: zListMemoryFilesQuery
|
|
12720
|
+
}),
|
|
12721
|
+
op({
|
|
12722
|
+
verb: "upload",
|
|
12723
|
+
summary: "Create or replace a memory file",
|
|
12724
|
+
fn: sdk_gen_exports.writeMemoryFile,
|
|
12725
|
+
format: formatRecord(),
|
|
12726
|
+
path: zWriteMemoryFilePath,
|
|
12727
|
+
query: zWriteMemoryFileQuery,
|
|
12728
|
+
body: zMemoryUploadBody,
|
|
12729
|
+
transformBody: ({ file }) => loadMemoryUpload(file)
|
|
12730
|
+
}),
|
|
12731
|
+
memoryDownloadOp,
|
|
12732
|
+
op({
|
|
12733
|
+
verb: "delete",
|
|
12734
|
+
summary: "Delete a memory file",
|
|
12735
|
+
fn: sdk_gen_exports.deleteMemoryFile,
|
|
12736
|
+
format: formatVoid("deleted"),
|
|
12737
|
+
path: zDeleteMemoryFilePath,
|
|
12738
|
+
query: zDeleteMemoryFileQuery
|
|
12739
|
+
})
|
|
12740
|
+
]
|
|
12741
|
+
}
|
|
12742
|
+
]
|
|
12743
|
+
},
|
|
12310
12744
|
{
|
|
12311
12745
|
name: "profiles",
|
|
12312
12746
|
aliases: ["profile"],
|
|
@@ -12374,7 +12808,7 @@ var commandGroups = [
|
|
|
12374
12808
|
flowOp({
|
|
12375
12809
|
verb: "mcp-add",
|
|
12376
12810
|
summary: "Create an OAuth secret and add an MCP server to an agent profile",
|
|
12377
|
-
path:
|
|
12811
|
+
path: z26.object({
|
|
12378
12812
|
orgID: zOrganizationId,
|
|
12379
12813
|
projectID: zProjectId,
|
|
12380
12814
|
agentProfileID: zAgentProfileId
|
|
@@ -12386,7 +12820,7 @@ var commandGroups = [
|
|
|
12386
12820
|
verb: "slack",
|
|
12387
12821
|
aliases: ["slack-setup"],
|
|
12388
12822
|
summary: "Connect Slack to an agent profile through OAuth",
|
|
12389
|
-
path:
|
|
12823
|
+
path: z26.object({
|
|
12390
12824
|
orgID: zOrganizationId,
|
|
12391
12825
|
projectID: zProjectId,
|
|
12392
12826
|
agentProfileID: zAgentProfileId
|
package/package.json
CHANGED