omnara 1.0.27 → 1.0.29
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 +355 -73
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -16,10 +16,164 @@ import * as z4 from "zod";
|
|
|
16
16
|
|
|
17
17
|
// ../sdk/src/generated/zod.gen.ts
|
|
18
18
|
import * as z from "zod";
|
|
19
|
+
var zAgentConfigDefinitionEventWebhook = z.object({
|
|
20
|
+
events: z.array(z.enum([
|
|
21
|
+
"agent_input",
|
|
22
|
+
"model_output",
|
|
23
|
+
"tool_result",
|
|
24
|
+
"context_checkpoint",
|
|
25
|
+
"tool_call_update"
|
|
26
|
+
])).min(1),
|
|
27
|
+
signing_secret_id: z.string().min(1).optional(),
|
|
28
|
+
url: z.string().min(1)
|
|
29
|
+
});
|
|
30
|
+
var zAgentConfigDefinitionGitCredentials = z.object({
|
|
31
|
+
integration: z.string().regex(/^[a-zA-Z][a-zA-Z0-9-]{0,31}$/)
|
|
32
|
+
});
|
|
33
|
+
var zAgentConfigDefinitionInteractionHandler = z.record(z.string(), z.never());
|
|
34
|
+
var zAgentConfigDefinitionInteractionHandlers = z.record(z.string(), zAgentConfigDefinitionInteractionHandler).nullable();
|
|
35
|
+
var zAgentConfigDefinitionMcpAuth = z.object({
|
|
36
|
+
region: z.string().min(1).optional(),
|
|
37
|
+
secret_id: z.string().min(1).regex(/^sec_[a-z2-7]{26}$/),
|
|
38
|
+
service: z.string().min(1).optional(),
|
|
39
|
+
type: z.enum([
|
|
40
|
+
"bearer",
|
|
41
|
+
"oauth",
|
|
42
|
+
"sigv4"
|
|
43
|
+
])
|
|
44
|
+
});
|
|
45
|
+
var zAgentConfigDefinitionSkills = z.array(z.string().regex(/^skl_[a-z2-7]{26}$/)).nullable();
|
|
46
|
+
var zAgentConfigDefinitionSubagentInstruction = z.object({
|
|
47
|
+
append: z.string().optional()
|
|
48
|
+
});
|
|
49
|
+
var zAgentConfigDefinitionToolInputSchema = z.looseObject({
|
|
50
|
+
properties: z.record(z.string(), z.record(z.string(), z.unknown())).optional(),
|
|
51
|
+
required: z.array(z.string().min(1)).optional(),
|
|
52
|
+
type: z.literal("object")
|
|
53
|
+
});
|
|
54
|
+
var zAgentConfigDefinitionToolPermission = z.object({
|
|
55
|
+
mode: z.string().min(1).regex(/\S/),
|
|
56
|
+
parameters: z.record(z.string(), z.unknown()).optional()
|
|
57
|
+
});
|
|
58
|
+
var zAgentConfigDefinitionMcpTool = z.object({
|
|
59
|
+
deferred: z.boolean().nullish(),
|
|
60
|
+
enabled: z.boolean().nullish(),
|
|
61
|
+
permission: zAgentConfigDefinitionToolPermission.optional()
|
|
62
|
+
});
|
|
63
|
+
var zAgentConfigDefinitionMcpServer = z.object({
|
|
64
|
+
auth: zAgentConfigDefinitionMcpAuth.optional(),
|
|
65
|
+
default_enabled: z.boolean().nullish(),
|
|
66
|
+
deferred: z.boolean().optional(),
|
|
67
|
+
permission: zAgentConfigDefinitionToolPermission.optional(),
|
|
68
|
+
tools: z.record(z.string(), zAgentConfigDefinitionMcpTool).optional(),
|
|
69
|
+
url: z.string().min(1)
|
|
70
|
+
});
|
|
71
|
+
var zAgentConfigDefinitionMcpServers = z.record(z.string(), zAgentConfigDefinitionMcpServer).nullable();
|
|
72
|
+
var zAgentConfigDefinitionTool = z.object({
|
|
73
|
+
deferred: z.boolean().optional(),
|
|
74
|
+
description: z.string().min(1).optional(),
|
|
75
|
+
enabled: z.boolean().nullish(),
|
|
76
|
+
input_schema: zAgentConfigDefinitionToolInputSchema.optional(),
|
|
77
|
+
permission: zAgentConfigDefinitionToolPermission.optional(),
|
|
78
|
+
type: z.enum(["built_in", "custom"]).optional()
|
|
79
|
+
});
|
|
80
|
+
var zAgentConfigDefinitionTools = z.record(z.string(), zAgentConfigDefinitionTool).nullable();
|
|
81
|
+
var zEnvironmentVariableName = z.string().min(1).regex(/^[^=\x00]+$/);
|
|
82
|
+
var zResourceNameReference = z.string().min(1).max(64).regex(/^\S(?:.*\S)?$/);
|
|
83
|
+
var zAgentConfigDefinitionMachineSource = z.intersection(z.union([
|
|
84
|
+
z.record(z.string(), z.unknown()),
|
|
85
|
+
z.record(z.string(), z.unknown())
|
|
86
|
+
]), z.object({
|
|
87
|
+
cwd: z.string().max(4096).optional(),
|
|
88
|
+
delete_after_idle_minutes: z.union([
|
|
89
|
+
z.literal(0),
|
|
90
|
+
z.int().gte(5).lte(2147483647)
|
|
91
|
+
]).optional(),
|
|
92
|
+
description: z.string().max(4096).optional(),
|
|
93
|
+
env_overlay: z.record(z.string(), z.string().nullable()).nullish(),
|
|
94
|
+
initial_num_machines: z.int().gte(0).optional(),
|
|
95
|
+
machine_cpu: z.int().gte(1).lte(2147483647).optional(),
|
|
96
|
+
machine_memory_mb: z.int().gte(1).lte(2147483647).optional(),
|
|
97
|
+
machine_name: zResourceNameReference.optional(),
|
|
98
|
+
machine_pool_name: zResourceNameReference.optional(),
|
|
99
|
+
machine_provider_options_overlay: z.record(z.string(), z.unknown()).nullish(),
|
|
100
|
+
max_machines: z.int().gte(0).optional(),
|
|
101
|
+
secret_env_overlay: z.record(z.string(), z.string().regex(/^sec_[a-z2-7]{26}$/).nullable()).nullish()
|
|
102
|
+
}));
|
|
103
|
+
var zAgentConfigDefinitionMachineSources = z.array(zAgentConfigDefinitionMachineSource).nullable();
|
|
104
|
+
var zAgentConfigDefinitionModel = z.object({
|
|
105
|
+
cache_retention: z.enum([
|
|
106
|
+
"none",
|
|
107
|
+
"short",
|
|
108
|
+
"long"
|
|
109
|
+
]).optional(),
|
|
110
|
+
context_window_tokens: z.int().gte(1).optional(),
|
|
111
|
+
default_max_output_tokens: z.int().gte(1).optional(),
|
|
112
|
+
name: zResourceNameReference,
|
|
113
|
+
provider_config: zResourceNameReference,
|
|
114
|
+
reasoning: z.object({
|
|
115
|
+
effort: z.string().min(1).regex(/\S/)
|
|
116
|
+
}).optional()
|
|
117
|
+
});
|
|
118
|
+
var zAgentConfigDefinitionSubagentModel = z.object({
|
|
119
|
+
cache_retention: z.enum([
|
|
120
|
+
"none",
|
|
121
|
+
"short",
|
|
122
|
+
"long"
|
|
123
|
+
]).optional(),
|
|
124
|
+
context_window_tokens: z.int().gte(1).optional(),
|
|
125
|
+
default_max_output_tokens: z.int().gte(1).optional(),
|
|
126
|
+
name: zResourceNameReference.optional(),
|
|
127
|
+
provider_config: zResourceNameReference.optional(),
|
|
128
|
+
reasoning: z.object({
|
|
129
|
+
effort: z.string().min(1).regex(/\S/)
|
|
130
|
+
}).optional()
|
|
131
|
+
});
|
|
132
|
+
var zAgentConfigDefinitionSubagent = z.object({
|
|
133
|
+
archive_after_idle_minutes: z.int().gte(1).lte(2147483647).optional(),
|
|
134
|
+
description: z.string().optional(),
|
|
135
|
+
instruction: zAgentConfigDefinitionSubagentInstruction.optional(),
|
|
136
|
+
max_instances: z.int().gte(1).lte(2147483647).optional(),
|
|
137
|
+
model: zAgentConfigDefinitionSubagentModel.optional(),
|
|
138
|
+
profile: zResourceNameReference.optional(),
|
|
139
|
+
type: z.enum(["profile", "self"])
|
|
140
|
+
});
|
|
141
|
+
var zAgentConfigDefinitionSubagents = z.record(z.string(), zAgentConfigDefinitionSubagent).nullable();
|
|
19
142
|
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
143
|
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
144
|
var zSkillName = z.string().min(1).max(64).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);
|
|
22
145
|
var zMemoryStoreName = z.string().min(1).max(64).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);
|
|
146
|
+
var zAgentConfigDefinitionMemoryStore = z.object({
|
|
147
|
+
name: zMemoryStoreName,
|
|
148
|
+
access: z.enum(["read", "read_write"])
|
|
149
|
+
});
|
|
150
|
+
var zAgentConfigDefinitionMemoryStores = z.array(zAgentConfigDefinitionMemoryStore).nullable();
|
|
151
|
+
var zAgentConfigDefinition = z.object({
|
|
152
|
+
event_webhook: zAgentConfigDefinitionEventWebhook.optional(),
|
|
153
|
+
git_credentials: zAgentConfigDefinitionGitCredentials.optional(),
|
|
154
|
+
instruction: z.string().min(1).regex(/\S/),
|
|
155
|
+
interaction_handlers: zAgentConfigDefinitionInteractionHandlers.optional(),
|
|
156
|
+
machine_sources: zAgentConfigDefinitionMachineSources.optional(),
|
|
157
|
+
max_depth: z.int().gte(1).lte(8).optional(),
|
|
158
|
+
max_subagents: z.int().gte(1).lte(2147483647).optional(),
|
|
159
|
+
mcp: zAgentConfigDefinitionMcpServers.optional(),
|
|
160
|
+
memory_stores: zAgentConfigDefinitionMemoryStores.optional(),
|
|
161
|
+
model: zAgentConfigDefinitionModel,
|
|
162
|
+
skills: zAgentConfigDefinitionSkills.optional(),
|
|
163
|
+
subagents: zAgentConfigDefinitionSubagents.optional(),
|
|
164
|
+
tools: zAgentConfigDefinitionTools.optional(),
|
|
165
|
+
version: z.enum(["v1"]).optional()
|
|
166
|
+
});
|
|
167
|
+
var zAgentConfigToolsDefinition = z.looseObject({
|
|
168
|
+
git_credentials: zAgentConfigDefinitionGitCredentials.optional(),
|
|
169
|
+
interaction_handlers: zAgentConfigDefinitionInteractionHandlers.optional(),
|
|
170
|
+
machine_sources: zAgentConfigDefinitionMachineSources.optional(),
|
|
171
|
+
mcp: zAgentConfigDefinitionMcpServers.optional(),
|
|
172
|
+
memory_stores: zAgentConfigDefinitionMemoryStores.optional(),
|
|
173
|
+
skills: zAgentConfigDefinitionSkills.optional(),
|
|
174
|
+
subagents: zAgentConfigDefinitionSubagents.optional(),
|
|
175
|
+
tools: zAgentConfigDefinitionTools.optional()
|
|
176
|
+
});
|
|
23
177
|
var zResourceListSort = z.enum([
|
|
24
178
|
"name",
|
|
25
179
|
"-name",
|
|
@@ -555,15 +709,22 @@ var zCreateSlackSetupRequest = z.object({
|
|
|
555
709
|
return_to: z.string().optional()
|
|
556
710
|
});
|
|
557
711
|
var zResolveAgentConfigToolsRequest = z.object({
|
|
558
|
-
source: z.
|
|
712
|
+
source: z.union([
|
|
713
|
+
z.string().min(1),
|
|
714
|
+
zAgentConfigToolsDefinition
|
|
715
|
+
]),
|
|
559
716
|
source_format: z.enum(["yaml", "json"])
|
|
560
717
|
});
|
|
718
|
+
var zAgentConfigSourceInput = z.union([
|
|
719
|
+
z.string().min(1),
|
|
720
|
+
zAgentConfigDefinition
|
|
721
|
+
]);
|
|
561
722
|
var zCreateAgentConfigRequest = z.object({
|
|
562
|
-
source:
|
|
723
|
+
source: zAgentConfigSourceInput,
|
|
563
724
|
source_format: z.enum(["yaml", "json"])
|
|
564
725
|
});
|
|
565
726
|
var zUpdateAgentConfigRequest = z.object({
|
|
566
|
-
source:
|
|
727
|
+
source: zAgentConfigSourceInput,
|
|
567
728
|
source_format: z.enum(["yaml", "json"]),
|
|
568
729
|
expected_current_config_id: zAgentConfigId.optional()
|
|
569
730
|
});
|
|
@@ -829,6 +990,9 @@ var zAgentConfigSummary = z.object({
|
|
|
829
990
|
instruction_hash: z.string().optional(),
|
|
830
991
|
created_at: zTimestamp
|
|
831
992
|
});
|
|
993
|
+
var zAgentConfigGeneratedSource = z.object({
|
|
994
|
+
source: z.string()
|
|
995
|
+
});
|
|
832
996
|
var zCreateAgentProfileRequest = z.object({
|
|
833
997
|
name: zResourceName,
|
|
834
998
|
config: zAgentConfigId
|
|
@@ -1681,6 +1845,17 @@ var zArtifact = z.object({
|
|
|
1681
1845
|
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" }).optional(),
|
|
1682
1846
|
created_at: zTimestamp
|
|
1683
1847
|
});
|
|
1848
|
+
var zCheckMachinePoolConnectionRequest = z.object({
|
|
1849
|
+
provider: z.string().min(1),
|
|
1850
|
+
provider_auth_secret_id: zSecretId,
|
|
1851
|
+
provider_config: z.record(z.string(), z.unknown()).optional(),
|
|
1852
|
+
default_machine_provider_options: z.record(z.string(), z.unknown()).optional()
|
|
1853
|
+
});
|
|
1854
|
+
var zMachinePoolConnectionCheckError = z.object({
|
|
1855
|
+
error: z.string(),
|
|
1856
|
+
code: z.enum(["unprocessable", "upstream_unavailable"]),
|
|
1857
|
+
details: z.string().optional()
|
|
1858
|
+
});
|
|
1684
1859
|
var zCreateMachinePoolRequestBase = z.object({
|
|
1685
1860
|
name: zResourceName,
|
|
1686
1861
|
description: z.string().optional(),
|
|
@@ -1707,11 +1882,11 @@ var zCreateMachinePoolRequestBase = z.object({
|
|
|
1707
1882
|
var zCreateMachinePoolRequest = zCreateMachinePoolRequestBase.and(z.union([
|
|
1708
1883
|
z.object({
|
|
1709
1884
|
provider: z.enum([
|
|
1710
|
-
"
|
|
1711
|
-
"modal",
|
|
1885
|
+
"arker",
|
|
1712
1886
|
"freestyle",
|
|
1887
|
+
"modal",
|
|
1713
1888
|
"tenki",
|
|
1714
|
-
"
|
|
1889
|
+
"unikraft"
|
|
1715
1890
|
]),
|
|
1716
1891
|
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" }),
|
|
1717
1892
|
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" }),
|
|
@@ -1722,9 +1897,9 @@ var zCreateMachinePoolRequest = zCreateMachinePoolRequestBase.and(z.union([
|
|
|
1722
1897
|
}),
|
|
1723
1898
|
z.object({
|
|
1724
1899
|
provider: z.enum([
|
|
1725
|
-
"daytona",
|
|
1726
1900
|
"boxd",
|
|
1727
|
-
"createos"
|
|
1901
|
+
"createos",
|
|
1902
|
+
"daytona"
|
|
1728
1903
|
]),
|
|
1729
1904
|
max_total_cpu: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1730
1905
|
max_total_memory_mb: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
@@ -2423,24 +2598,6 @@ var zIntegrationRuntimeFailure = z.object({
|
|
|
2423
2598
|
message: z.string(),
|
|
2424
2599
|
retry_at: zTimestamp
|
|
2425
2600
|
});
|
|
2426
|
-
var zConfigAgentToolInputSchema = z.object({
|
|
2427
|
-
properties: z.record(z.string(), z.record(z.string(), z.unknown())).optional(),
|
|
2428
|
-
required: z.array(z.string().min(1)).optional(),
|
|
2429
|
-
type: z.literal("object")
|
|
2430
|
-
});
|
|
2431
|
-
var zConfigIntegrationCapabilitySource = z.record(z.string(), z.never());
|
|
2432
|
-
var zConfigToolPermissionSelection = z.object({
|
|
2433
|
-
mode: z.string().min(1).regex(/\S/),
|
|
2434
|
-
parameters: z.record(z.string(), z.unknown()).optional()
|
|
2435
|
-
});
|
|
2436
|
-
var zConfigToolSource = z.object({
|
|
2437
|
-
deferred: z.boolean().optional(),
|
|
2438
|
-
description: z.string().min(1).optional(),
|
|
2439
|
-
enabled: z.boolean().nullish(),
|
|
2440
|
-
input_schema: zConfigAgentToolInputSchema.optional(),
|
|
2441
|
-
permission: zConfigToolPermissionSelection.optional(),
|
|
2442
|
-
type: z.enum(["built_in", "custom"]).optional()
|
|
2443
|
-
});
|
|
2444
2601
|
var zIntegrationName = z.string().regex(/^[a-zA-Z][a-zA-Z0-9-]{0,31}$/);
|
|
2445
2602
|
var zCompiledGitCredentials = z.object({
|
|
2446
2603
|
integration: zIntegrationName,
|
|
@@ -2593,16 +2750,27 @@ var zIntegrationSubscriptionAttachment = z.object({
|
|
|
2593
2750
|
integration_id: zIntegrationId,
|
|
2594
2751
|
conversation: zIntegrationConversation
|
|
2595
2752
|
});
|
|
2596
|
-
var zCreateAgentRequest = z.
|
|
2753
|
+
var zCreateAgentRequest = z.intersection(z.union([
|
|
2754
|
+
z.object({
|
|
2755
|
+
profile: zAgentProfileId
|
|
2756
|
+
}),
|
|
2757
|
+
z.object({
|
|
2758
|
+
config: zAgentConfigId
|
|
2759
|
+
}),
|
|
2760
|
+
z.object({
|
|
2761
|
+
config_source: zCreateAgentConfigRequest
|
|
2762
|
+
})
|
|
2763
|
+
]), z.object({
|
|
2597
2764
|
profile: zAgentProfileId.optional(),
|
|
2598
|
-
config: zAgentConfigId,
|
|
2765
|
+
config: zAgentConfigId.optional(),
|
|
2766
|
+
config_source: zCreateAgentConfigRequest.optional(),
|
|
2599
2767
|
name: zAgentName.optional(),
|
|
2600
2768
|
message: z.string().optional(),
|
|
2601
|
-
tools: z.record(z.string(),
|
|
2769
|
+
tools: z.record(z.string(), zAgentConfigDefinitionTool).optional(),
|
|
2602
2770
|
subscriptions: z.array(zIntegrationSubscriptionAttachment).max(100).optional(),
|
|
2603
|
-
interaction_handlers: z.record(z.string(),
|
|
2771
|
+
interaction_handlers: z.record(z.string(), zAgentConfigDefinitionInteractionHandler).optional(),
|
|
2604
2772
|
initial_input: zAgentLaunchInitialInput.optional()
|
|
2605
|
-
});
|
|
2773
|
+
}));
|
|
2606
2774
|
var zCreateIntegrationSubscriptionRequest = z.object({
|
|
2607
2775
|
agent_id: zAgentId,
|
|
2608
2776
|
conversation: zIntegrationConversation
|
|
@@ -3187,6 +3355,15 @@ var zGetAgentConfigPath = z.object({
|
|
|
3187
3355
|
agentConfigID: z.string().regex(/^acfg_[a-z2-7]{26}$/)
|
|
3188
3356
|
});
|
|
3189
3357
|
var zGetAgentConfigResponse = zAgentConfig;
|
|
3358
|
+
var zGetAgentConfigGeneratedSourcePath = z.object({
|
|
3359
|
+
orgID: z.string().regex(/^org_[a-z2-7]{26}$/),
|
|
3360
|
+
projectID: z.string().regex(/^proj_[a-z2-7]{26}$/),
|
|
3361
|
+
agentConfigID: z.string().regex(/^acfg_[a-z2-7]{26}$/)
|
|
3362
|
+
});
|
|
3363
|
+
var zGetAgentConfigGeneratedSourceQuery = z.object({
|
|
3364
|
+
source_format: z.enum(["yaml", "json"]).optional().default("yaml")
|
|
3365
|
+
});
|
|
3366
|
+
var zGetAgentConfigGeneratedSourceResponse = zAgentConfigGeneratedSource;
|
|
3190
3367
|
var zListAgentProfilesPath = z.object({
|
|
3191
3368
|
orgID: z.string().regex(/^org_[a-z2-7]{26}$/),
|
|
3192
3369
|
projectID: z.string().regex(/^proj_[a-z2-7]{26}$/)
|
|
@@ -3533,6 +3710,7 @@ var zListVisibleProjectMachinesPath = z.object({
|
|
|
3533
3710
|
var zListVisibleProjectMachinesQuery = z.object({
|
|
3534
3711
|
name: z.string().min(1).max(200).optional(),
|
|
3535
3712
|
source_kind: zMachineSourceKind.optional(),
|
|
3713
|
+
machine_pool_id: zMachinePoolId.optional(),
|
|
3536
3714
|
sort: zResourceListSort.optional(),
|
|
3537
3715
|
limit: z.int().gte(1).lte(100).optional().default(50),
|
|
3538
3716
|
cursor: z.string().max(1024).optional()
|
|
@@ -3618,6 +3796,7 @@ var zListVisibleMachinesPath = z.object({
|
|
|
3618
3796
|
var zListVisibleMachinesQuery = z.object({
|
|
3619
3797
|
name: z.string().min(1).max(200).optional(),
|
|
3620
3798
|
source_kind: zMachineSourceKind.optional(),
|
|
3799
|
+
machine_pool_id: zMachinePoolId.optional(),
|
|
3621
3800
|
sort: zResourceListSort.optional(),
|
|
3622
3801
|
limit: z.int().gte(1).lte(100).optional().default(50),
|
|
3623
3802
|
cursor: z.string().max(1024).optional()
|
|
@@ -3760,6 +3939,10 @@ var zCreateMachinePoolPath = z.object({
|
|
|
3760
3939
|
orgID: z.string().regex(/^org_[a-z2-7]{26}$/)
|
|
3761
3940
|
});
|
|
3762
3941
|
var zCreateMachinePoolResponse = zMachinePool;
|
|
3942
|
+
var zCheckMachinePoolConnectionPath = z.object({
|
|
3943
|
+
orgID: z.string().regex(/^org_[a-z2-7]{26}$/)
|
|
3944
|
+
});
|
|
3945
|
+
var zCheckMachinePoolConnectionResponse = z.void();
|
|
3763
3946
|
var zDeleteMachinePoolPath = z.object({
|
|
3764
3947
|
orgID: z.string().regex(/^org_[a-z2-7]{26}$/),
|
|
3765
3948
|
poolID: z.string().regex(/^mpo_[a-z2-7]{26}$/)
|
|
@@ -3782,6 +3965,7 @@ var zListProjectMachinePoolGrantsPath = z.object({
|
|
|
3782
3965
|
});
|
|
3783
3966
|
var zListProjectMachinePoolGrantsQuery = z.object({
|
|
3784
3967
|
name: z.string().min(1).max(200).optional(),
|
|
3968
|
+
machine_pool_id: zMachinePoolId.optional(),
|
|
3785
3969
|
sort: zResourceListSort.optional(),
|
|
3786
3970
|
limit: z.int().gte(1).lte(100).optional().default(50),
|
|
3787
3971
|
cursor: z.string().max(1024).optional()
|
|
@@ -3875,6 +4059,15 @@ var zUploadDaemonFileQuery = z.object({
|
|
|
3875
4059
|
filename: z.string().optional()
|
|
3876
4060
|
});
|
|
3877
4061
|
var zUploadDaemonFileResponse = zUploadFileResponse;
|
|
4062
|
+
var zListOrgIntegrationsPath = z.object({
|
|
4063
|
+
orgID: zOrganizationId
|
|
4064
|
+
});
|
|
4065
|
+
var zListOrgIntegrationsQuery = z.object({
|
|
4066
|
+
name: z.string().min(1).max(200).optional(),
|
|
4067
|
+
limit: z.int().gte(1).lte(100).optional().default(50),
|
|
4068
|
+
cursor: z.string().max(1024).optional()
|
|
4069
|
+
});
|
|
4070
|
+
var zListOrgIntegrationsResponse = zListIntegrationsResponse;
|
|
3878
4071
|
var zListIntegrationsPath = z.object({
|
|
3879
4072
|
orgID: zOrganizationId,
|
|
3880
4073
|
projectID: zProjectId
|
|
@@ -5363,6 +5556,7 @@ __export(sdk_gen_exports, {
|
|
|
5363
5556
|
bootstrapDaemon: () => bootstrapDaemon,
|
|
5364
5557
|
cancelAgent: () => cancelAgent,
|
|
5365
5558
|
cancelQueuedBacklogInput: () => cancelQueuedBacklogInput,
|
|
5559
|
+
checkMachinePoolConnection: () => checkMachinePoolConnection,
|
|
5366
5560
|
configureIntegration: () => configureIntegration,
|
|
5367
5561
|
connectByoMachine: () => connectByoMachine,
|
|
5368
5562
|
createAgent: () => createAgent,
|
|
@@ -5424,6 +5618,7 @@ __export(sdk_gen_exports, {
|
|
|
5424
5618
|
getActor: () => getActor,
|
|
5425
5619
|
getAgent: () => getAgent,
|
|
5426
5620
|
getAgentConfig: () => getAgentConfig,
|
|
5621
|
+
getAgentConfigGeneratedSource: () => getAgentConfigGeneratedSource,
|
|
5427
5622
|
getAgentProfile: () => getAgentProfile,
|
|
5428
5623
|
getAgentProfileUsage: () => getAgentProfileUsage,
|
|
5429
5624
|
getAgentUsage: () => getAgentUsage,
|
|
@@ -5472,6 +5667,7 @@ __export(sdk_gen_exports, {
|
|
|
5472
5667
|
listOrgAgents: () => listOrgAgents,
|
|
5473
5668
|
listOrgApiKeyProjectAccess: () => listOrgApiKeyProjectAccess,
|
|
5474
5669
|
listOrgApiKeys: () => listOrgApiKeys,
|
|
5670
|
+
listOrgIntegrations: () => listOrgIntegrations,
|
|
5475
5671
|
listOrgInvitations: () => listOrgInvitations,
|
|
5476
5672
|
listOrgMembers: () => listOrgMembers,
|
|
5477
5673
|
listOrgMemoryStores: () => listOrgMemoryStores,
|
|
@@ -6773,6 +6969,20 @@ var getAgentConfig = (options) => (options.client ?? client).get({
|
|
|
6773
6969
|
url: "/orgs/{orgID}/projects/{projectID}/agent-configs/{agentConfigID}",
|
|
6774
6970
|
...options
|
|
6775
6971
|
});
|
|
6972
|
+
var getAgentConfigGeneratedSource = (options) => (options.client ?? client).get({
|
|
6973
|
+
responseValidator: relaxedResponseValidator(zGetAgentConfigGeneratedSourceResponse),
|
|
6974
|
+
security: [{
|
|
6975
|
+
key: "bearerAuth",
|
|
6976
|
+
scheme: "bearer",
|
|
6977
|
+
type: "http"
|
|
6978
|
+
}, {
|
|
6979
|
+
in: "cookie",
|
|
6980
|
+
name: "__Host-omnara_session",
|
|
6981
|
+
type: "apiKey"
|
|
6982
|
+
}],
|
|
6983
|
+
url: "/orgs/{orgID}/projects/{projectID}/agent-configs/{agentConfigID}/generated-source",
|
|
6984
|
+
...options
|
|
6985
|
+
});
|
|
6776
6986
|
var listAgentProfiles = (options) => (options.client ?? client).get({
|
|
6777
6987
|
responseValidator: relaxedResponseValidator(zListAgentProfilesResponse2),
|
|
6778
6988
|
security: [{
|
|
@@ -8009,6 +8219,28 @@ var createMachinePool = (options) => (options.client ?? client).post({
|
|
|
8009
8219
|
...options.headers
|
|
8010
8220
|
}
|
|
8011
8221
|
});
|
|
8222
|
+
var checkMachinePoolConnection = (options) => (options.client ?? client).post({
|
|
8223
|
+
responseValidator: relaxedResponseValidator(zCheckMachinePoolConnectionResponse),
|
|
8224
|
+
security: [
|
|
8225
|
+
{
|
|
8226
|
+
key: "bearerAuth",
|
|
8227
|
+
scheme: "bearer",
|
|
8228
|
+
type: "http"
|
|
8229
|
+
},
|
|
8230
|
+
{
|
|
8231
|
+
in: "cookie",
|
|
8232
|
+
name: "__Host-omnara_session",
|
|
8233
|
+
type: "apiKey"
|
|
8234
|
+
},
|
|
8235
|
+
{ name: "X-Omnara-Csrf", type: "apiKey" }
|
|
8236
|
+
],
|
|
8237
|
+
url: "/orgs/{orgID}/machine-pools/check-connection",
|
|
8238
|
+
...options,
|
|
8239
|
+
headers: {
|
|
8240
|
+
"Content-Type": "application/json",
|
|
8241
|
+
...options.headers
|
|
8242
|
+
}
|
|
8243
|
+
});
|
|
8012
8244
|
var deleteMachinePool = (options) => (options.client ?? client).delete({
|
|
8013
8245
|
responseValidator: relaxedResponseValidator(zDeleteMachinePoolResponse),
|
|
8014
8246
|
security: [
|
|
@@ -8295,6 +8527,20 @@ var uploadDaemonFile = (options) => (options.client ?? client).post({
|
|
|
8295
8527
|
...options.headers
|
|
8296
8528
|
}
|
|
8297
8529
|
});
|
|
8530
|
+
var listOrgIntegrations = (options) => (options.client ?? client).get({
|
|
8531
|
+
responseValidator: relaxedResponseValidator(zListOrgIntegrationsResponse),
|
|
8532
|
+
security: [{
|
|
8533
|
+
key: "bearerAuth",
|
|
8534
|
+
scheme: "bearer",
|
|
8535
|
+
type: "http"
|
|
8536
|
+
}, {
|
|
8537
|
+
in: "cookie",
|
|
8538
|
+
name: "__Host-omnara_session",
|
|
8539
|
+
type: "apiKey"
|
|
8540
|
+
}],
|
|
8541
|
+
url: "/orgs/{orgID}/integrations",
|
|
8542
|
+
...options
|
|
8543
|
+
});
|
|
8298
8544
|
var listIntegrations = (options) => (options.client ?? client).get({
|
|
8299
8545
|
responseValidator: relaxedResponseValidator(zListIntegrationsResponse2),
|
|
8300
8546
|
security: [{
|
|
@@ -9725,7 +9971,7 @@ function registerLoginCommand(program2, cli) {
|
|
|
9725
9971
|
}
|
|
9726
9972
|
cli.store.update({ token: void 0 });
|
|
9727
9973
|
console.log(
|
|
9728
|
-
`Removed the saved token from ${cli.store.path}. It stays valid until revoked
|
|
9974
|
+
`Removed the saved token from ${cli.store.path}. It stays valid until revoked under Personal tokens in your account menu.`
|
|
9729
9975
|
);
|
|
9730
9976
|
});
|
|
9731
9977
|
});
|
|
@@ -11098,7 +11344,12 @@ import {
|
|
|
11098
11344
|
} from "@tanstack/react-query";
|
|
11099
11345
|
|
|
11100
11346
|
// ../react/src/domains/integrations.ts
|
|
11101
|
-
import {
|
|
11347
|
+
import {
|
|
11348
|
+
useInfiniteQuery as useInfiniteQuery6,
|
|
11349
|
+
useMutation as useMutation8,
|
|
11350
|
+
useQuery as useQuery7,
|
|
11351
|
+
useQueryClient as useQueryClient9
|
|
11352
|
+
} from "@tanstack/react-query";
|
|
11102
11353
|
|
|
11103
11354
|
// ../react/src/domains/invitations.ts
|
|
11104
11355
|
import { useMutation as useMutation9, useQuery as useQuery8, useQueryClient as useQueryClient10, useSuspenseQuery as useSuspenseQuery4 } from "@tanstack/react-query";
|
|
@@ -11814,13 +12065,24 @@ function fileFormat(filePath) {
|
|
|
11814
12065
|
if (lower.endsWith(".yaml") || lower.endsWith(".yml")) return "yaml";
|
|
11815
12066
|
throw new CliInputError(`config file must end in .yaml, .yml, or .json: ${filePath}`);
|
|
11816
12067
|
}
|
|
11817
|
-
|
|
11818
|
-
|
|
11819
|
-
|
|
11820
|
-
|
|
11821
|
-
|
|
11822
|
-
|
|
12068
|
+
var zDefinitionText = zJsonText.pipe(
|
|
12069
|
+
z20.custom(
|
|
12070
|
+
(value) => z20.record(z20.string(), z20.unknown()).safeParse(value).success,
|
|
12071
|
+
"expected a JSON object"
|
|
12072
|
+
)
|
|
12073
|
+
);
|
|
12074
|
+
function jsonSource(text, label) {
|
|
12075
|
+
const parsed = zDefinitionText.safeParse(text);
|
|
12076
|
+
if (!parsed.success) {
|
|
12077
|
+
throw new CliInputError(
|
|
12078
|
+
`${label} is not a valid JSON agent config: ${parsed.error.issues[0]?.message}`
|
|
12079
|
+
);
|
|
11823
12080
|
}
|
|
12081
|
+
return { source: text, source_format: "json" };
|
|
12082
|
+
}
|
|
12083
|
+
function inlineSource(source) {
|
|
12084
|
+
if (!zJsonText.safeParse(source).success) return { source, source_format: "yaml" };
|
|
12085
|
+
return jsonSource(source, "inline config source");
|
|
11824
12086
|
}
|
|
11825
12087
|
function renderConfigSource(attachment) {
|
|
11826
12088
|
requireExactlyOne([attachment.file, attachment.source], SOURCE_HINT);
|
|
@@ -11832,11 +12094,10 @@ function renderConfigSource(attachment) {
|
|
|
11832
12094
|
} catch {
|
|
11833
12095
|
throw new CliInputError(`could not read config file: ${attachment.file}`);
|
|
11834
12096
|
}
|
|
11835
|
-
return { source, source_format:
|
|
11836
|
-
|
|
11837
|
-
if (attachment.source !== void 0) {
|
|
11838
|
-
return { source: attachment.source, source_format: inlineFormat(attachment.source) };
|
|
12097
|
+
if (format === "yaml") return { source, source_format: "yaml" };
|
|
12098
|
+
return jsonSource(source, `config file ${attachment.file}`);
|
|
11839
12099
|
}
|
|
12100
|
+
if (attachment.source !== void 0) return inlineSource(attachment.source);
|
|
11840
12101
|
throw new CliInputError(SOURCE_HINT);
|
|
11841
12102
|
}
|
|
11842
12103
|
async function resolveConfigId(client2, path, attachment) {
|
|
@@ -11849,6 +12110,18 @@ async function resolveConfigId(client2, path, attachment) {
|
|
|
11849
12110
|
});
|
|
11850
12111
|
return data.id;
|
|
11851
12112
|
}
|
|
12113
|
+
var LAUNCH_HINT = "pass --profile or one of --config, --file, or --source";
|
|
12114
|
+
var LAUNCH_CONFIG_HINT = "pass at most one of --config, --file, or --source";
|
|
12115
|
+
function renderLaunchConfig(profile, attachment) {
|
|
12116
|
+
const provided = [attachment.config, attachment.file, attachment.source].filter(
|
|
12117
|
+
(value) => value !== void 0
|
|
12118
|
+
);
|
|
12119
|
+
if (provided.length > 1) throw new CliInputError(LAUNCH_CONFIG_HINT);
|
|
12120
|
+
if (attachment.config !== void 0) return { profile, config: attachment.config };
|
|
12121
|
+
if (provided.length === 1) return { profile, config_source: renderConfigSource(attachment) };
|
|
12122
|
+
if (profile === void 0) throw new CliInputError(LAUNCH_HINT);
|
|
12123
|
+
return { profile };
|
|
12124
|
+
}
|
|
11852
12125
|
async function currentProfileConfigId(client2, path) {
|
|
11853
12126
|
const { data } = await sdk_gen_exports.getAgentProfile({ client: client2, path });
|
|
11854
12127
|
return data.current_config_id;
|
|
@@ -12504,32 +12777,34 @@ function serverEntry(url4, secretId) {
|
|
|
12504
12777
|
return { url: url4, auth: { type: "oauth", secret_id: secretId } };
|
|
12505
12778
|
}
|
|
12506
12779
|
var zJsonRecord = z25.record(z25.string(), z25.json());
|
|
12507
|
-
|
|
12508
|
-
|
|
12509
|
-
|
|
12510
|
-
|
|
12511
|
-
|
|
12512
|
-
|
|
12513
|
-
|
|
12780
|
+
var zDefinitionText2 = zJsonText.pipe(
|
|
12781
|
+
z25.custom((value) => zJsonRecord.safeParse(value).success)
|
|
12782
|
+
);
|
|
12783
|
+
function prepareJsonConfig(configId, source, serverName, mcpUrl) {
|
|
12784
|
+
const parsed = zDefinitionText2.safeParse(source);
|
|
12785
|
+
if (!parsed.success) throw new CliInputError("the current agent config is not a JSON object");
|
|
12786
|
+
const definition = parsed.data;
|
|
12787
|
+
if (!zJsonRecord.nullish().safeParse(definition.mcp).success) {
|
|
12514
12788
|
throw new CliInputError("the current agent config has an invalid mcp section");
|
|
12515
12789
|
}
|
|
12516
|
-
if (mcp
|
|
12790
|
+
if (definition.mcp != null && Object.hasOwn(definition.mcp, serverName)) {
|
|
12517
12791
|
throw new CliInputError(`MCP server ${serverName} already exists in the current config`);
|
|
12518
12792
|
}
|
|
12519
12793
|
return {
|
|
12520
|
-
currentConfigId:
|
|
12794
|
+
currentConfigId: configId,
|
|
12521
12795
|
render(secretId) {
|
|
12522
|
-
|
|
12523
|
-
|
|
12524
|
-
|
|
12796
|
+
return {
|
|
12797
|
+
source: {
|
|
12798
|
+
...definition,
|
|
12799
|
+
mcp: { ...definition.mcp, [serverName]: serverEntry(mcpUrl, secretId) }
|
|
12800
|
+
},
|
|
12801
|
+
source_format: "json"
|
|
12525
12802
|
};
|
|
12526
|
-
return { source: `${JSON.stringify(updated, null, 2)}
|
|
12527
|
-
`, sourceFormat: "json" };
|
|
12528
12803
|
}
|
|
12529
12804
|
};
|
|
12530
12805
|
}
|
|
12531
|
-
function prepareYamlConfig(
|
|
12532
|
-
const doc = parseDocument(
|
|
12806
|
+
function prepareYamlConfig(configId, source, serverName, mcpUrl) {
|
|
12807
|
+
const doc = parseDocument(source);
|
|
12533
12808
|
if (doc.errors.length > 0) {
|
|
12534
12809
|
throw new CliInputError("the current agent config contains invalid YAML");
|
|
12535
12810
|
}
|
|
@@ -12545,14 +12820,14 @@ function prepareYamlConfig(config2, serverName, mcpUrl) {
|
|
|
12545
12820
|
throw new CliInputError(`MCP server ${serverName} already exists in the current config`);
|
|
12546
12821
|
}
|
|
12547
12822
|
return {
|
|
12548
|
-
currentConfigId:
|
|
12823
|
+
currentConfigId: configId,
|
|
12549
12824
|
render(secretId) {
|
|
12550
12825
|
if (isMap(mcp)) {
|
|
12551
12826
|
doc.setIn(["mcp", serverName], serverEntry(mcpUrl, secretId));
|
|
12552
12827
|
} else {
|
|
12553
12828
|
doc.set("mcp", { [serverName]: serverEntry(mcpUrl, secretId) });
|
|
12554
12829
|
}
|
|
12555
|
-
return { source: doc.toString(),
|
|
12830
|
+
return { source: doc.toString(), source_format: "yaml" };
|
|
12556
12831
|
}
|
|
12557
12832
|
};
|
|
12558
12833
|
}
|
|
@@ -12560,7 +12835,7 @@ function prepareConfig(config2, serverName, mcpUrl) {
|
|
|
12560
12835
|
if (config2.source === void 0 || config2.source_format === void 0) {
|
|
12561
12836
|
throw new CliInputError("the current agent config source is unavailable");
|
|
12562
12837
|
}
|
|
12563
|
-
return config2.source_format === "json" ? prepareJsonConfig(config2, serverName, mcpUrl) : prepareYamlConfig(config2, serverName, mcpUrl);
|
|
12838
|
+
return config2.source_format === "json" ? prepareJsonConfig(config2.id, config2.source, serverName, mcpUrl) : prepareYamlConfig(config2.id, config2.source, serverName, mcpUrl);
|
|
12564
12839
|
}
|
|
12565
12840
|
async function loadConfig2(client2, scope, target, targetId) {
|
|
12566
12841
|
const path = { orgID: scope.orgId, projectID: scope.projectId };
|
|
@@ -12577,6 +12852,14 @@ async function loadConfig2(client2, scope, target, targetId) {
|
|
|
12577
12852
|
if (configId === void 0) throw new CliInputError("the agent has no current config");
|
|
12578
12853
|
return (await sdk_gen_exports.getAgentConfig({ client: client2, path: { ...path, agentConfigID: configId } })).data;
|
|
12579
12854
|
}
|
|
12855
|
+
async function withEditableSource(client2, scope, config2) {
|
|
12856
|
+
if (config2.source !== void 0) return config2;
|
|
12857
|
+
const { data } = await sdk_gen_exports.getAgentConfigGeneratedSource({
|
|
12858
|
+
client: client2,
|
|
12859
|
+
path: { orgID: scope.orgId, projectID: scope.projectId, agentConfigID: config2.id }
|
|
12860
|
+
});
|
|
12861
|
+
return { ...config2, source: data.source, source_format: "yaml" };
|
|
12862
|
+
}
|
|
12580
12863
|
async function applyConfig(client2, scope, target, targetId, prepared, secret, report) {
|
|
12581
12864
|
const rendered = prepared.render(secret.id);
|
|
12582
12865
|
const path = { orgID: scope.orgId, projectID: scope.projectId };
|
|
@@ -12584,18 +12867,14 @@ async function applyConfig(client2, scope, target, targetId, prepared, secret, r
|
|
|
12584
12867
|
const { data } = await sdk_gen_exports.updateAgentConfig({
|
|
12585
12868
|
client: client2,
|
|
12586
12869
|
path: { ...path, agentID: targetId },
|
|
12587
|
-
body: {
|
|
12588
|
-
source: rendered.source,
|
|
12589
|
-
source_format: rendered.sourceFormat,
|
|
12590
|
-
expected_current_config_id: prepared.currentConfigId
|
|
12591
|
-
}
|
|
12870
|
+
body: { ...rendered, expected_current_config_id: prepared.currentConfigId }
|
|
12592
12871
|
});
|
|
12593
12872
|
return data.agent_config.id;
|
|
12594
12873
|
}
|
|
12595
12874
|
const { data: config2 } = await sdk_gen_exports.createAgentConfig({
|
|
12596
12875
|
client: client2,
|
|
12597
12876
|
path,
|
|
12598
|
-
body:
|
|
12877
|
+
body: rendered
|
|
12599
12878
|
});
|
|
12600
12879
|
try {
|
|
12601
12880
|
await sdk_gen_exports.updateAgentProfile({
|
|
@@ -12621,7 +12900,11 @@ async function runMcpAdd(context, target, targetId) {
|
|
|
12621
12900
|
owner: { kind: "project", project_id: scope.projectId },
|
|
12622
12901
|
name: secret_name ?? `${server_name}-mcp`
|
|
12623
12902
|
};
|
|
12624
|
-
const currentConfig = await
|
|
12903
|
+
const currentConfig = await withEditableSource(
|
|
12904
|
+
client2,
|
|
12905
|
+
scope,
|
|
12906
|
+
await loadConfig2(client2, scope, target, targetId)
|
|
12907
|
+
);
|
|
12625
12908
|
const prepared = prepareConfig(currentConfig, server_name, request.mcp_url);
|
|
12626
12909
|
let secret;
|
|
12627
12910
|
try {
|
|
@@ -12794,15 +13077,14 @@ var commandGroups = [
|
|
|
12794
13077
|
format: formatRecord(),
|
|
12795
13078
|
path: zCreateAgentPath,
|
|
12796
13079
|
body: zConfigAttachment.extend({
|
|
12797
|
-
profile: zAgentProfileId.optional(),
|
|
13080
|
+
profile: zAgentProfileId.optional().describe("agent profile ID; runs its current config unless a config is given"),
|
|
12798
13081
|
name: zAgentName.optional(),
|
|
12799
13082
|
message: z28.string().optional()
|
|
12800
13083
|
}),
|
|
12801
|
-
transformBody:
|
|
12802
|
-
profile,
|
|
13084
|
+
transformBody: ({ profile, name, message, ...attachment }) => ({
|
|
12803
13085
|
name,
|
|
12804
13086
|
message,
|
|
12805
|
-
|
|
13087
|
+
...renderLaunchConfig(profile, attachment)
|
|
12806
13088
|
})
|
|
12807
13089
|
}),
|
|
12808
13090
|
op({
|
package/package.json
CHANGED