omnara 1.0.23 → 1.0.25
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/README.md +98 -0
- package/dist/bin.js +1424 -694
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -89,7 +89,7 @@ var zAgentId = z.string().regex(/^agt_[a-z2-7]{26}$/);
|
|
|
89
89
|
var zAgentConfigId = z.string().regex(/^acfg_[a-z2-7]{26}$/);
|
|
90
90
|
var zAgentProfileId = z.string().regex(/^aprf_[a-z2-7]{26}$/);
|
|
91
91
|
var zCronTriggerId = z.string().regex(/^cron_[a-z2-7]{26}$/);
|
|
92
|
-
var
|
|
92
|
+
var zIntegrationTargetId = z.string().regex(/^itgt_[a-z2-7]{26}$/);
|
|
93
93
|
var zAgentEventId = z.string().regex(/^evt_[a-z2-7]{26}$/);
|
|
94
94
|
var zModelCallContextId = z.string().regex(/^mcc_[a-z2-7]{26}$/);
|
|
95
95
|
var zAgentInputId = z.string().regex(/^ain_[a-z2-7]{26}$/);
|
|
@@ -506,40 +506,40 @@ var zMcpoAuthStartResponse = z.object({
|
|
|
506
506
|
expires_at: zTimestamp
|
|
507
507
|
});
|
|
508
508
|
var zCreateIntegrationOAuthSetupRequest = z.object({
|
|
509
|
-
provider: z.string().optional().default("slack"),
|
|
510
509
|
client_id: z.string().min(1),
|
|
511
510
|
client_secret: z.string().min(1),
|
|
512
511
|
signing_secret: z.string().min(1),
|
|
513
512
|
return_to: z.string().optional()
|
|
514
513
|
});
|
|
515
|
-
var
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
514
|
+
var zIntegrationKind = z.enum([
|
|
515
|
+
"slack_thread",
|
|
516
|
+
"discord_thread",
|
|
517
|
+
"github_pr"
|
|
518
|
+
]);
|
|
519
|
+
var zIntegrationProviderDisplayName = z.string().max(512);
|
|
520
|
+
var zIntegrationProviderConfig = z.record(z.string(), z.unknown());
|
|
521
|
+
var zCreateGitHubSetupRequest = z.object({
|
|
522
|
+
expected_setup_revision: z.int().gte(1),
|
|
523
|
+
app_name: z.string().min(1).max(34).optional(),
|
|
524
|
+
organization: z.string().min(1).max(39).regex(/^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$/).optional()
|
|
525
|
+
});
|
|
526
|
+
var zInspectGitHubInstallationsRequest = z.object({
|
|
527
|
+
credential_secret_id: zSecretId,
|
|
528
|
+
page: z.int().gte(1).lte(1e3).optional().default(1)
|
|
530
529
|
});
|
|
531
|
-
var
|
|
532
|
-
|
|
533
|
-
|
|
530
|
+
var zGitHubSetupInstallation = z.object({
|
|
531
|
+
id: z.string().regex(/^[1-9][0-9]*$/),
|
|
532
|
+
account: z.string(),
|
|
533
|
+
account_type: z.string().optional(),
|
|
534
|
+
settings_url: z.url()
|
|
534
535
|
});
|
|
535
|
-
var
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
expires_at: zTimestamp
|
|
536
|
+
var zGitHubInstallations = z.object({
|
|
537
|
+
provider_app_id: z.string().regex(/^[1-9][0-9]*$/),
|
|
538
|
+
name: z.string(),
|
|
539
|
+
slug: z.string(),
|
|
540
|
+
install_url: z.url(),
|
|
541
|
+
installations: z.array(zGitHubSetupInstallation),
|
|
542
|
+
next_page: z.int().gte(1).lte(1e3).optional()
|
|
543
543
|
});
|
|
544
544
|
var zSlackSetupIcon = z.object({
|
|
545
545
|
filename: z.string().optional(),
|
|
@@ -551,16 +551,6 @@ var zCreateSlackSetupRequest = z.object({
|
|
|
551
551
|
icon: zSlackSetupIcon.optional(),
|
|
552
552
|
return_to: z.string().optional()
|
|
553
553
|
});
|
|
554
|
-
var zSlackSetup = z.object({
|
|
555
|
-
provider: z.string(),
|
|
556
|
-
flow_id: zIntegrationOAuthFlowId,
|
|
557
|
-
slack_app_id: z.string(),
|
|
558
|
-
oauth_url: z.url(),
|
|
559
|
-
redirect_uri: z.url(),
|
|
560
|
-
events_url: z.url(),
|
|
561
|
-
actions_url: z.url(),
|
|
562
|
-
expires_at: zTimestamp
|
|
563
|
-
});
|
|
564
554
|
var zResolveAgentConfigToolsRequest = z.object({
|
|
565
555
|
source: z.string().min(1),
|
|
566
556
|
source_format: z.enum(["yaml", "json"])
|
|
@@ -758,14 +748,6 @@ var zCompiledMachineSource = z.object({
|
|
|
758
748
|
machine_provider_options_overlay: z.record(z.string(), z.unknown()).optional(),
|
|
759
749
|
description: z.string().optional()
|
|
760
750
|
});
|
|
761
|
-
var zCompiledTool = z.object({
|
|
762
|
-
enabled: z.boolean(),
|
|
763
|
-
type: z.enum(["built_in", "custom"]).optional(),
|
|
764
|
-
permission: zToolPermissionSelection,
|
|
765
|
-
deferred: z.boolean().optional(),
|
|
766
|
-
description: z.string().optional(),
|
|
767
|
-
input_schema: z.record(z.string(), z.unknown()).optional()
|
|
768
|
-
});
|
|
769
751
|
var zCompiledMcpAuthBearer = z.object({
|
|
770
752
|
type: z.enum(["bearer"]),
|
|
771
753
|
secret_id: zSecretId
|
|
@@ -833,20 +815,6 @@ var zCompiledSubagent = z.discriminatedUnion("type", [
|
|
|
833
815
|
zCompiledSelfSubagent.extend({ type: z.literal("self") }),
|
|
834
816
|
zCompiledProfileSubagent.extend({ type: z.literal("profile") })
|
|
835
817
|
]);
|
|
836
|
-
var zCompiledAgentConfig = z.object({
|
|
837
|
-
version: z.string().optional(),
|
|
838
|
-
instruction: z.string(),
|
|
839
|
-
model: zCompiledAgentModel,
|
|
840
|
-
machine_sources: z.array(zCompiledMachineSource).optional(),
|
|
841
|
-
tools: z.record(z.string(), zCompiledTool).optional(),
|
|
842
|
-
mcp: z.record(z.string(), zCompiledMcpServer).optional(),
|
|
843
|
-
event_webhook: zCompiledEventWebhook.optional(),
|
|
844
|
-
skills: z.array(zCompiledSkill).optional(),
|
|
845
|
-
memory_stores: z.array(zCompiledMemoryStore).optional(),
|
|
846
|
-
subagents: z.record(z.string(), zCompiledSubagent).optional(),
|
|
847
|
-
max_subagents: z.int().optional(),
|
|
848
|
-
max_depth: z.int().optional()
|
|
849
|
-
});
|
|
850
818
|
var zAgentConfigSummary = z.object({
|
|
851
819
|
id: zAgentConfigId,
|
|
852
820
|
org_id: zOrganizationId,
|
|
@@ -858,18 +826,6 @@ var zAgentConfigSummary = z.object({
|
|
|
858
826
|
instruction_hash: z.string().optional(),
|
|
859
827
|
created_at: zTimestamp
|
|
860
828
|
});
|
|
861
|
-
var zAgentConfig = z.object({
|
|
862
|
-
id: zAgentConfigId,
|
|
863
|
-
org_id: zOrganizationId,
|
|
864
|
-
project_id: zProjectId,
|
|
865
|
-
source: z.string().optional(),
|
|
866
|
-
source_format: z.enum(["yaml", "json"]).optional(),
|
|
867
|
-
effective_definition_hash: z.string(),
|
|
868
|
-
model: zAgentConfigModel,
|
|
869
|
-
instruction_hash: z.string().optional(),
|
|
870
|
-
created_at: zTimestamp,
|
|
871
|
-
compiled_definition: zCompiledAgentConfig
|
|
872
|
-
});
|
|
873
829
|
var zCreateAgentProfileRequest = z.object({
|
|
874
830
|
name: zResourceName,
|
|
875
831
|
config: zAgentConfigId
|
|
@@ -881,32 +837,6 @@ var zUpdateAgentProfileRequest = z.object({
|
|
|
881
837
|
var zRenameAgentProfileRequest = z.object({
|
|
882
838
|
name: zResourceName
|
|
883
839
|
});
|
|
884
|
-
var zAgentProfileSummary = z.object({
|
|
885
|
-
id: zAgentProfileId,
|
|
886
|
-
org_id: zOrganizationId,
|
|
887
|
-
project_id: zProjectId,
|
|
888
|
-
name: zResourceName,
|
|
889
|
-
current_config_id: zAgentConfigId,
|
|
890
|
-
current_generation: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
891
|
-
created_at: zTimestamp,
|
|
892
|
-
updated_at: zTimestamp,
|
|
893
|
-
current_config: zAgentConfigSummary
|
|
894
|
-
});
|
|
895
|
-
var zAgentProfile = z.object({
|
|
896
|
-
id: zAgentProfileId,
|
|
897
|
-
org_id: zOrganizationId,
|
|
898
|
-
project_id: zProjectId,
|
|
899
|
-
name: zResourceName,
|
|
900
|
-
current_config_id: zAgentConfigId,
|
|
901
|
-
current_generation: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
902
|
-
created_at: zTimestamp,
|
|
903
|
-
updated_at: zTimestamp,
|
|
904
|
-
current_config: zAgentConfig
|
|
905
|
-
});
|
|
906
|
-
var zListAgentProfilesResponse = z.object({
|
|
907
|
-
data: z.array(zAgentProfileSummary),
|
|
908
|
-
next_cursor: z.string().nullable()
|
|
909
|
-
});
|
|
910
840
|
var zAgentProfileCronTriggerTarget = z.object({
|
|
911
841
|
type: z.enum(["profile"]),
|
|
912
842
|
agent_profile_id: zAgentProfileId
|
|
@@ -920,56 +850,22 @@ var zAgentCronTriggerTarget = z.object({
|
|
|
920
850
|
agent_id: zAgentId,
|
|
921
851
|
delivery_mode: zCronTriggerDeliveryMode.optional()
|
|
922
852
|
});
|
|
923
|
-
var zCronTriggerTarget = z.discriminatedUnion("type", [
|
|
924
|
-
zAgentCronTriggerTarget.extend({ type: z.literal("agent") }),
|
|
925
|
-
zAgentProfileCronTriggerTarget.extend({ type: z.literal("profile") })
|
|
926
|
-
]);
|
|
927
853
|
var zCronTriggerFailureReport = z.object({
|
|
928
854
|
message: z.string(),
|
|
929
855
|
will_retry: z.boolean(),
|
|
930
856
|
failed_at: zTimestamp
|
|
931
857
|
});
|
|
932
|
-
var
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
var zUpdateCronTriggerRequest = z.object({
|
|
941
|
-
target: zCronTriggerTarget.optional(),
|
|
942
|
-
name: zResourceName.optional(),
|
|
943
|
-
cron: zCronExpression.optional(),
|
|
944
|
-
timezone: zCronTimezone.optional(),
|
|
945
|
-
message_template: zCronMessageTemplate.optional(),
|
|
946
|
-
enabled: z.boolean().optional()
|
|
947
|
-
});
|
|
948
|
-
var zCronTrigger = z.object({
|
|
949
|
-
id: zCronTriggerId,
|
|
950
|
-
org_id: zOrganizationId,
|
|
951
|
-
project_id: zProjectId,
|
|
952
|
-
name: zResourceName,
|
|
953
|
-
target: zCronTriggerTarget,
|
|
954
|
-
cron: zCronExpression,
|
|
955
|
-
timezone: zCronTimezone,
|
|
956
|
-
message_template: zCronMessageTemplate,
|
|
957
|
-
enabled: z.boolean(),
|
|
958
|
-
last_fired_at: zTimestamp.nullable(),
|
|
959
|
-
next_fire_at: zTimestamp.nullable(),
|
|
960
|
-
failure_report: zCronTriggerFailureReport.nullable(),
|
|
858
|
+
var zCronTriggerLastRunState = z.enum([
|
|
859
|
+
"queued",
|
|
860
|
+
"processing",
|
|
861
|
+
"completed",
|
|
862
|
+
"failed"
|
|
863
|
+
]);
|
|
864
|
+
var zCronTriggerLastRun = z.object({
|
|
865
|
+
state: zCronTriggerLastRunState,
|
|
961
866
|
created_at: zTimestamp,
|
|
962
|
-
updated_at: zTimestamp
|
|
963
|
-
|
|
964
|
-
var zListCronTriggersResponse = z.object({
|
|
965
|
-
data: z.array(zCronTrigger),
|
|
966
|
-
next_cursor: z.string().nullable()
|
|
967
|
-
});
|
|
968
|
-
var zCreateAgentRequest = z.object({
|
|
969
|
-
profile: zAgentProfileId.optional(),
|
|
970
|
-
config: zAgentConfigId,
|
|
971
|
-
name: zAgentName.optional(),
|
|
972
|
-
message: z.string().optional()
|
|
867
|
+
updated_at: zTimestamp,
|
|
868
|
+
failure_message: z.string().nullable()
|
|
973
869
|
});
|
|
974
870
|
var zAgentActivity = z.object({
|
|
975
871
|
state: z.enum([
|
|
@@ -984,30 +880,6 @@ var zAgentModel = z.object({
|
|
|
984
880
|
provider_config: zResourceName,
|
|
985
881
|
name: zResourceName
|
|
986
882
|
});
|
|
987
|
-
var zIntegrationTarget = z.object({
|
|
988
|
-
provider: z.string(),
|
|
989
|
-
provider_ref: z.string(),
|
|
990
|
-
provider_ref_kind: z.string(),
|
|
991
|
-
display_name: z.string(),
|
|
992
|
-
provider_uri: z.url().optional()
|
|
993
|
-
});
|
|
994
|
-
var zAgent = z.object({
|
|
995
|
-
id: zAgentId,
|
|
996
|
-
org_id: zOrganizationId,
|
|
997
|
-
project_id: zProjectId,
|
|
998
|
-
agent_profile_id: zAgentProfileId.optional(),
|
|
999
|
-
state: z.enum(["active", "archived"]),
|
|
1000
|
-
name: zAgentName,
|
|
1001
|
-
integration_target: zIntegrationTarget.optional(),
|
|
1002
|
-
current_config_id: zAgentConfigId.optional(),
|
|
1003
|
-
model: zAgentModel.optional(),
|
|
1004
|
-
parent_agent_id: zAgentId.optional(),
|
|
1005
|
-
subagent_key: z.string().optional(),
|
|
1006
|
-
activity: zAgentActivity.optional(),
|
|
1007
|
-
created_at: zTimestamp,
|
|
1008
|
-
updated_at: zTimestamp,
|
|
1009
|
-
archived_at: zTimestamp.optional()
|
|
1010
|
-
});
|
|
1011
883
|
var zAgentMcpConnection = z.object({
|
|
1012
884
|
server_key: z.string(),
|
|
1013
885
|
endpoint_url: z.string(),
|
|
@@ -1022,18 +894,6 @@ var zAgentMcpConnection = z.object({
|
|
|
1022
894
|
created_at: zTimestamp,
|
|
1023
895
|
updated_at: zTimestamp
|
|
1024
896
|
});
|
|
1025
|
-
var zCurrentAgentResponse = z.object({
|
|
1026
|
-
agent: zAgent
|
|
1027
|
-
});
|
|
1028
|
-
var zGetAgentResponse = z.object({
|
|
1029
|
-
agent: zAgent,
|
|
1030
|
-
machine_ids: z.array(zMachineId),
|
|
1031
|
-
mcp_connections: z.array(zAgentMcpConnection)
|
|
1032
|
-
});
|
|
1033
|
-
var zListAgentsResponse = z.object({
|
|
1034
|
-
data: z.array(zAgent),
|
|
1035
|
-
next_cursor: z.string().nullable()
|
|
1036
|
-
});
|
|
1037
897
|
var zAgentInputKind = z.enum([
|
|
1038
898
|
"content",
|
|
1039
899
|
"control",
|
|
@@ -1188,17 +1048,6 @@ var zAgentInput = z.object({
|
|
|
1188
1048
|
content_blocks: z.array(zAgentInputContentBlock).optional(),
|
|
1189
1049
|
queued_at: zTimestamp
|
|
1190
1050
|
});
|
|
1191
|
-
var zLaunchAgentResponse = z.object({
|
|
1192
|
-
agent: zAgent,
|
|
1193
|
-
agent_config: zAgentConfig,
|
|
1194
|
-
machine_bindings: z.array(zAgentMachineBinding),
|
|
1195
|
-
agent_input: zAgentInput.optional()
|
|
1196
|
-
});
|
|
1197
|
-
var zUpdateAgentConfigResponse = z.object({
|
|
1198
|
-
agent_config: zAgentConfig,
|
|
1199
|
-
agent_input: zAgentInput,
|
|
1200
|
-
event_id: zAgentEventId
|
|
1201
|
-
});
|
|
1202
1051
|
var zMachineMetadata = z.record(z.string(), z.string().max(512));
|
|
1203
1052
|
var zAgentInputEnvelope = z.object({
|
|
1204
1053
|
agent_input: zAgentInput
|
|
@@ -1541,26 +1390,10 @@ var zAgentInteractionState = z.enum([
|
|
|
1541
1390
|
"resolved",
|
|
1542
1391
|
"canceled"
|
|
1543
1392
|
]);
|
|
1544
|
-
var
|
|
1545
|
-
id: zAgentInteractionId,
|
|
1546
|
-
org_id: zOrganizationId,
|
|
1547
|
-
project_id: zProjectId,
|
|
1548
|
-
agent_id: zAgentId,
|
|
1549
|
-
tool_call_id: zToolCallId,
|
|
1550
|
-
tool_name: z.string().optional(),
|
|
1551
|
-
agent_name: zAgentName.optional(),
|
|
1552
|
-
subagent_key: z.string().optional(),
|
|
1553
|
-
interaction_kind: zAgentInteractionKind,
|
|
1554
|
-
state: zAgentInteractionState,
|
|
1555
|
-
request: zInteractionForm,
|
|
1556
|
-
resolution: zInteractionResolution.optional(),
|
|
1557
|
-
resolved_by_input_id: zAgentInputId.optional(),
|
|
1558
|
-
created_at: zTimestamp,
|
|
1559
|
-
resolved_at: zTimestamp.optional()
|
|
1560
|
-
});
|
|
1393
|
+
var zInteractionPresentationReceipt = z.record(z.string(), z.unknown());
|
|
1561
1394
|
var zActorProvider = z.enum([
|
|
1562
1395
|
"omnara",
|
|
1563
|
-
"
|
|
1396
|
+
"integration",
|
|
1564
1397
|
"external"
|
|
1565
1398
|
]);
|
|
1566
1399
|
var zActor = z.object({
|
|
@@ -1581,6 +1414,10 @@ var zExternalActorParams = z.object({
|
|
|
1581
1414
|
display_name: z.string().max(256).optional(),
|
|
1582
1415
|
metadata: zMetadata.optional()
|
|
1583
1416
|
});
|
|
1417
|
+
var zAgentLaunchInitialInput = z.object({
|
|
1418
|
+
content_blocks: z.array(zTextContentBlock).min(1),
|
|
1419
|
+
actor: zExternalActorParams.optional()
|
|
1420
|
+
});
|
|
1584
1421
|
var zCreateAgentInputRequest = z.object({
|
|
1585
1422
|
content_blocks: z.array(zCreateAgentInputContentBlock),
|
|
1586
1423
|
delivery_mode: zCreateAgentInputDeliveryMode.optional(),
|
|
@@ -1598,10 +1435,6 @@ var zListActorsResponse = z.object({
|
|
|
1598
1435
|
data: z.array(zActor),
|
|
1599
1436
|
next_cursor: z.string().nullable()
|
|
1600
1437
|
});
|
|
1601
|
-
var zListAgentInteractionsResponse = z.object({
|
|
1602
|
-
data: z.array(zAgentInteraction),
|
|
1603
|
-
next_cursor: z.string().nullable()
|
|
1604
|
-
});
|
|
1605
1438
|
var zOrgSecretOwnerInput = z.object({
|
|
1606
1439
|
kind: z.enum(["org"])
|
|
1607
1440
|
});
|
|
@@ -1672,10 +1505,17 @@ var zAwsCredentialsSecretMaterial = z.object({
|
|
|
1672
1505
|
role_arn: z.string().min(1).optional(),
|
|
1673
1506
|
external_id: z.string().min(1).optional()
|
|
1674
1507
|
});
|
|
1508
|
+
var zGitHubAppCredentialsSecretMaterial = z.object({
|
|
1509
|
+
kind: z.enum(["github_app_credentials"]),
|
|
1510
|
+
app_id: z.string().regex(/^[1-9][0-9]*$/),
|
|
1511
|
+
private_key: z.string().min(1),
|
|
1512
|
+
webhook_secret: z.string().min(1)
|
|
1513
|
+
});
|
|
1675
1514
|
var zSecretMaterial = z.discriminatedUnion("kind", [
|
|
1676
1515
|
zGenericSecretMaterial.extend({ kind: z.literal("generic") }),
|
|
1677
1516
|
zOAuthTokenSetSecretMaterial.extend({ kind: z.literal("oauth_token_set") }),
|
|
1678
|
-
zAwsCredentialsSecretMaterial.extend({ kind: z.literal("aws_credentials") })
|
|
1517
|
+
zAwsCredentialsSecretMaterial.extend({ kind: z.literal("aws_credentials") }),
|
|
1518
|
+
zGitHubAppCredentialsSecretMaterial.extend({ kind: z.literal("github_app_credentials") })
|
|
1679
1519
|
]);
|
|
1680
1520
|
var zCreateSecretRequest = z.object({
|
|
1681
1521
|
owner: zSecretOwnerInput,
|
|
@@ -1697,7 +1537,8 @@ var zSecretKind = z.enum([
|
|
|
1697
1537
|
"generic",
|
|
1698
1538
|
"oauth_token_set",
|
|
1699
1539
|
"slack_app_credentials",
|
|
1700
|
-
"aws_credentials"
|
|
1540
|
+
"aws_credentials",
|
|
1541
|
+
"github_app_credentials"
|
|
1701
1542
|
]);
|
|
1702
1543
|
var zSecret = z.object({
|
|
1703
1544
|
id: zSecretId,
|
|
@@ -1871,7 +1712,11 @@ var zCreateMachinePoolRequest = zCreateMachinePoolRequestBase.and(z.union([
|
|
|
1871
1712
|
max_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" })
|
|
1872
1713
|
}),
|
|
1873
1714
|
z.object({
|
|
1874
|
-
provider: z.enum([
|
|
1715
|
+
provider: z.enum([
|
|
1716
|
+
"daytona",
|
|
1717
|
+
"boxd",
|
|
1718
|
+
"createos"
|
|
1719
|
+
]),
|
|
1875
1720
|
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" }),
|
|
1876
1721
|
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" }),
|
|
1877
1722
|
max_machine_cpu: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
@@ -2320,22 +2165,43 @@ var zListProjectsResponse = z.object({
|
|
|
2320
2165
|
data: z.array(zVisibleProject),
|
|
2321
2166
|
next_cursor: z.string().nullable()
|
|
2322
2167
|
});
|
|
2168
|
+
var zOrgOverviewProjectActivity = z.object({
|
|
2169
|
+
project_id: zProjectId,
|
|
2170
|
+
last_active_at: zTimestamp
|
|
2171
|
+
});
|
|
2323
2172
|
var zOrgOverviewAgentProfileReference = z.object({
|
|
2324
2173
|
id: zAgentProfileId,
|
|
2325
2174
|
name: zResourceName,
|
|
2326
2175
|
agent_count: z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), { error: "Invalid value: Expected int64 to be <= 9223372036854775807" })
|
|
2327
2176
|
});
|
|
2328
|
-
var
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2177
|
+
var zUsageTimeseriesInterval = z.enum([
|
|
2178
|
+
"hour",
|
|
2179
|
+
"day",
|
|
2180
|
+
"week",
|
|
2181
|
+
"month"
|
|
2182
|
+
]);
|
|
2183
|
+
var zUsageTimeseriesMetric = z.enum([
|
|
2184
|
+
"sum_tokens",
|
|
2185
|
+
"sum_input_tokens",
|
|
2186
|
+
"sum_output_tokens",
|
|
2187
|
+
"sum_cost",
|
|
2188
|
+
"count_model_calls"
|
|
2189
|
+
]);
|
|
2190
|
+
var zUsageTimeseriesGroupBy = z.enum(["model", "profile"]);
|
|
2191
|
+
var zUsageTimeseriesSeries = z.object({
|
|
2192
|
+
kind: z.enum([
|
|
2193
|
+
"all",
|
|
2194
|
+
"model",
|
|
2195
|
+
"profile",
|
|
2196
|
+
"no_profile",
|
|
2197
|
+
"other"
|
|
2198
|
+
]),
|
|
2199
|
+
id: z.string().optional(),
|
|
2200
|
+
name: zResourceName.optional(),
|
|
2201
|
+
model_provider_config_name: zResourceName.optional(),
|
|
2202
|
+
project_name: zResourceName.optional(),
|
|
2203
|
+
total: z.number().gte(0),
|
|
2204
|
+
values: z.array(z.number().gte(0))
|
|
2339
2205
|
});
|
|
2340
2206
|
var zUsageTokenTotals = z.object({
|
|
2341
2207
|
input_tokens_total: z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), { error: "Invalid value: Expected int64 to be <= 9223372036854775807" }),
|
|
@@ -2354,36 +2220,36 @@ var zUsageTotals = z.object({
|
|
|
2354
2220
|
tokens: zUsageTokenTotals,
|
|
2355
2221
|
cost: zUsageCostTotals
|
|
2356
2222
|
});
|
|
2357
|
-
var
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
totals: zUsageTotals
|
|
2223
|
+
var zAgentProfileStats = z.object({
|
|
2224
|
+
agent_count: z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), { error: "Invalid value: Expected int64 to be <= 9223372036854775807" }),
|
|
2225
|
+
usage: zUsageTotals
|
|
2361
2226
|
});
|
|
2362
|
-
var
|
|
2363
|
-
id: zAgentProfileId
|
|
2364
|
-
|
|
2365
|
-
|
|
2227
|
+
var zAgentProfileSummary = z.object({
|
|
2228
|
+
id: zAgentProfileId,
|
|
2229
|
+
org_id: zOrganizationId,
|
|
2230
|
+
project_id: zProjectId,
|
|
2231
|
+
name: zResourceName,
|
|
2232
|
+
current_config_id: zAgentConfigId,
|
|
2233
|
+
current_generation: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
2234
|
+
created_at: zTimestamp,
|
|
2235
|
+
updated_at: zTimestamp,
|
|
2236
|
+
current_config: zAgentConfigSummary,
|
|
2237
|
+
stats: zAgentProfileStats.optional()
|
|
2366
2238
|
});
|
|
2367
|
-
var
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
models: z.array(zOrgOverviewUsageDayModel),
|
|
2371
|
-
profiles: z.array(zOrgOverviewUsageDayProfile)
|
|
2239
|
+
var zListAgentProfilesResponse = z.object({
|
|
2240
|
+
data: z.array(zAgentProfileSummary),
|
|
2241
|
+
next_cursor: z.string().nullable()
|
|
2372
2242
|
});
|
|
2373
|
-
var
|
|
2243
|
+
var zUsageTimeseries = z.object({
|
|
2244
|
+
metric: zUsageTimeseriesMetric,
|
|
2245
|
+
interval: zUsageTimeseriesInterval,
|
|
2246
|
+
group_by: zUsageTimeseriesGroupBy.optional(),
|
|
2247
|
+
timezone: z.string(),
|
|
2248
|
+
bucket_starts: z.array(zTimestamp),
|
|
2249
|
+
until: zTimestamp,
|
|
2374
2250
|
totals: zUsageTotals,
|
|
2375
2251
|
active_agents: z.coerce.bigint().gte(BigInt(0)).max(BigInt("9223372036854775807"), { error: "Invalid value: Expected int64 to be <= 9223372036854775807" }),
|
|
2376
|
-
|
|
2377
|
-
profiles: z.array(zOrgOverviewUsageProfile),
|
|
2378
|
-
days: z.array(zOrgOverviewUsageDay)
|
|
2379
|
-
});
|
|
2380
|
-
var zOrgOverviewResponse = z.object({
|
|
2381
|
-
projects: z.array(zVisibleProject),
|
|
2382
|
-
recent_agents: z.array(zAgent),
|
|
2383
|
-
recent_agent_profiles: z.array(zAgentProfileSummary),
|
|
2384
|
-
referenced_agent_profiles: z.array(zOrgOverviewAgentProfileReference),
|
|
2385
|
-
today: zOrgOverviewToday,
|
|
2386
|
-
usage: zOrgOverviewUsage
|
|
2252
|
+
series: z.array(zUsageTimeseriesSeries)
|
|
2387
2253
|
});
|
|
2388
2254
|
var zUsageModel = z.object({
|
|
2389
2255
|
configured_model_id: zConfiguredModelId,
|
|
@@ -2450,29 +2316,369 @@ var zProjectMembershipGrant = z.object({
|
|
|
2450
2316
|
var zListProjectMembershipGrantsResponse = z.object({
|
|
2451
2317
|
data: z.array(zProjectMembershipGrant)
|
|
2452
2318
|
});
|
|
2453
|
-
var
|
|
2454
|
-
var
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2319
|
+
var zIntegrationId = z.string().regex(/^itg_[a-z2-7]{26}$/);
|
|
2320
|
+
var zIntegrationOAuthSetup = z.object({
|
|
2321
|
+
integration_id: zIntegrationId,
|
|
2322
|
+
setup_revision: z.int().gte(1),
|
|
2323
|
+
provider: z.string(),
|
|
2324
|
+
flow_id: zIntegrationOAuthFlowId,
|
|
2325
|
+
oauth_url: z.url(),
|
|
2326
|
+
redirect_uri: z.url(),
|
|
2327
|
+
events_url: z.url(),
|
|
2328
|
+
actions_url: z.url(),
|
|
2329
|
+
expires_at: zTimestamp
|
|
2330
|
+
});
|
|
2331
|
+
var zGitHubSetup = z.object({
|
|
2332
|
+
integration_id: zIntegrationId,
|
|
2333
|
+
setup_revision: z.int().gte(1),
|
|
2334
|
+
registration_url: z.url(),
|
|
2335
|
+
manifest: z.record(z.string(), z.unknown()),
|
|
2336
|
+
expires_at: zTimestamp
|
|
2337
|
+
});
|
|
2338
|
+
var zSlackSetup = z.object({
|
|
2339
|
+
integration_id: zIntegrationId,
|
|
2340
|
+
setup_revision: z.int().gte(1),
|
|
2341
|
+
provider: z.string(),
|
|
2342
|
+
flow_id: zIntegrationOAuthFlowId,
|
|
2343
|
+
slack_app_id: z.string(),
|
|
2344
|
+
oauth_url: z.url(),
|
|
2345
|
+
redirect_uri: z.url(),
|
|
2346
|
+
events_url: z.url(),
|
|
2347
|
+
actions_url: z.url(),
|
|
2348
|
+
expires_at: zTimestamp
|
|
2349
|
+
});
|
|
2350
|
+
var zCompiledTool = z.object({
|
|
2351
|
+
integration_id: zIntegrationId.optional(),
|
|
2352
|
+
enabled: z.boolean(),
|
|
2353
|
+
type: z.enum(["built_in", "custom"]).optional(),
|
|
2354
|
+
permission: zToolPermissionSelection,
|
|
2355
|
+
deferred: z.boolean().optional(),
|
|
2356
|
+
description: z.string().optional(),
|
|
2357
|
+
input_schema: z.record(z.string(), z.unknown()).optional()
|
|
2358
|
+
});
|
|
2359
|
+
var zCompiledIntegrationCapability = z.object({
|
|
2360
|
+
integration_id: zIntegrationId
|
|
2361
|
+
});
|
|
2362
|
+
var zIntegrationCronTriggerTarget = z.object({
|
|
2363
|
+
type: z.enum(["integration"]),
|
|
2364
|
+
integration_id: zIntegrationId,
|
|
2365
|
+
settings: z.record(z.string(), z.unknown())
|
|
2366
|
+
});
|
|
2367
|
+
var zCronTriggerTarget = z.discriminatedUnion("type", [
|
|
2368
|
+
zAgentCronTriggerTarget.extend({ type: z.literal("agent") }),
|
|
2369
|
+
zAgentProfileCronTriggerTarget.extend({ type: z.literal("profile") }),
|
|
2370
|
+
zIntegrationCronTriggerTarget.extend({ type: z.literal("integration") })
|
|
2371
|
+
]);
|
|
2372
|
+
var zCreateCronTriggerRequest = z.object({
|
|
2373
|
+
name: zResourceName,
|
|
2374
|
+
target: zCronTriggerTarget,
|
|
2375
|
+
cron: zCronExpression,
|
|
2376
|
+
timezone: zCronTimezone.optional(),
|
|
2377
|
+
message_template: zCronMessageTemplate.optional(),
|
|
2378
|
+
enabled: z.boolean().optional().default(true)
|
|
2379
|
+
});
|
|
2380
|
+
var zUpdateCronTriggerRequest = z.object({
|
|
2381
|
+
target: zCronTriggerTarget.optional(),
|
|
2382
|
+
name: zResourceName.optional(),
|
|
2383
|
+
cron: zCronExpression.optional(),
|
|
2384
|
+
timezone: zCronTimezone.optional(),
|
|
2385
|
+
message_template: zCronMessageTemplate.optional(),
|
|
2386
|
+
enabled: z.boolean().optional()
|
|
2387
|
+
});
|
|
2388
|
+
var zCronTrigger = z.object({
|
|
2389
|
+
id: zCronTriggerId,
|
|
2390
|
+
org_id: zOrganizationId,
|
|
2391
|
+
project_id: zProjectId,
|
|
2392
|
+
name: zResourceName,
|
|
2393
|
+
target: zCronTriggerTarget,
|
|
2394
|
+
cron: zCronExpression,
|
|
2395
|
+
timezone: zCronTimezone,
|
|
2396
|
+
message_template: zCronMessageTemplate.optional(),
|
|
2397
|
+
enabled: z.boolean(),
|
|
2398
|
+
last_fired_at: zTimestamp.nullable(),
|
|
2399
|
+
next_fire_at: zTimestamp.nullable(),
|
|
2400
|
+
failure_report: zCronTriggerFailureReport.nullable(),
|
|
2401
|
+
last_run: zCronTriggerLastRun.nullable(),
|
|
2402
|
+
created_at: zTimestamp,
|
|
2403
|
+
updated_at: zTimestamp
|
|
2404
|
+
});
|
|
2405
|
+
var zListCronTriggersResponse = z.object({
|
|
2406
|
+
data: z.array(zCronTrigger),
|
|
2407
|
+
next_cursor: z.string().nullable()
|
|
2408
|
+
});
|
|
2409
|
+
var zIntegrationSettings = z.record(z.string(), z.unknown());
|
|
2410
|
+
var zUpdateIntegrationRequest = z.object({
|
|
2411
|
+
settings: zIntegrationSettings
|
|
2412
|
+
});
|
|
2413
|
+
var zIntegrationRuntimeFailure = z.object({
|
|
2414
|
+
message: z.string(),
|
|
2415
|
+
retry_at: zTimestamp
|
|
2416
|
+
});
|
|
2417
|
+
var zConfigAgentToolInputSchema = z.object({
|
|
2418
|
+
properties: z.record(z.string(), z.record(z.string(), z.unknown())).optional(),
|
|
2419
|
+
required: z.array(z.string().min(1)).optional(),
|
|
2420
|
+
type: z.literal("object")
|
|
2421
|
+
});
|
|
2422
|
+
var zConfigIntegrationCapabilitySource = z.record(z.string(), z.never());
|
|
2423
|
+
var zConfigToolPermissionSelection = z.object({
|
|
2424
|
+
mode: z.string().min(1).regex(/\S/),
|
|
2425
|
+
parameters: z.record(z.string(), z.unknown()).optional()
|
|
2426
|
+
});
|
|
2427
|
+
var zConfigToolSource = z.object({
|
|
2428
|
+
deferred: z.boolean().optional(),
|
|
2429
|
+
description: z.string().min(1).optional(),
|
|
2430
|
+
enabled: z.boolean().nullish(),
|
|
2431
|
+
input_schema: zConfigAgentToolInputSchema.optional(),
|
|
2432
|
+
permission: zConfigToolPermissionSelection.optional(),
|
|
2433
|
+
type: z.enum(["built_in", "custom"]).optional()
|
|
2434
|
+
});
|
|
2435
|
+
var zIntegrationName = z.string().regex(/^[a-zA-Z][a-zA-Z0-9-]{0,31}$/);
|
|
2436
|
+
var zCompiledGitCredentials = z.object({
|
|
2437
|
+
integration: zIntegrationName,
|
|
2438
|
+
integration_id: zIntegrationId
|
|
2439
|
+
});
|
|
2440
|
+
var zCompiledAgentConfig = z.object({
|
|
2441
|
+
version: z.string().optional(),
|
|
2442
|
+
instruction: z.string(),
|
|
2443
|
+
model: zCompiledAgentModel,
|
|
2444
|
+
machine_sources: z.array(zCompiledMachineSource).optional(),
|
|
2445
|
+
tools: z.record(z.string(), zCompiledTool).optional(),
|
|
2446
|
+
mcp: z.record(z.string(), zCompiledMcpServer).optional(),
|
|
2447
|
+
event_webhook: zCompiledEventWebhook.optional(),
|
|
2448
|
+
interaction_handlers: z.record(z.string(), zCompiledIntegrationCapability).optional(),
|
|
2449
|
+
git_credentials: zCompiledGitCredentials.optional(),
|
|
2450
|
+
skills: z.array(zCompiledSkill).optional(),
|
|
2451
|
+
memory_stores: z.array(zCompiledMemoryStore).optional(),
|
|
2452
|
+
subagents: z.record(z.string(), zCompiledSubagent).optional(),
|
|
2453
|
+
max_subagents: z.int().optional(),
|
|
2454
|
+
max_depth: z.int().optional()
|
|
2455
|
+
});
|
|
2456
|
+
var zAgentConfig = z.object({
|
|
2457
|
+
id: zAgentConfigId,
|
|
2458
|
+
org_id: zOrganizationId,
|
|
2459
|
+
project_id: zProjectId,
|
|
2460
|
+
source: z.string().optional(),
|
|
2461
|
+
source_format: z.enum(["yaml", "json"]).optional(),
|
|
2462
|
+
effective_definition_hash: z.string(),
|
|
2463
|
+
model: zAgentConfigModel,
|
|
2464
|
+
instruction_hash: z.string().optional(),
|
|
2465
|
+
created_at: zTimestamp,
|
|
2466
|
+
compiled_definition: zCompiledAgentConfig
|
|
2467
|
+
});
|
|
2468
|
+
var zAgentProfile = z.object({
|
|
2469
|
+
id: zAgentProfileId,
|
|
2470
|
+
org_id: zOrganizationId,
|
|
2471
|
+
project_id: zProjectId,
|
|
2472
|
+
name: zResourceName,
|
|
2473
|
+
current_config_id: zAgentConfigId,
|
|
2474
|
+
current_generation: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
2475
|
+
created_at: zTimestamp,
|
|
2476
|
+
updated_at: zTimestamp,
|
|
2477
|
+
current_config: zAgentConfig
|
|
2478
|
+
});
|
|
2479
|
+
var zUpdateAgentConfigResponse = z.object({
|
|
2480
|
+
agent_config: zAgentConfig,
|
|
2481
|
+
agent_input: zAgentInput,
|
|
2482
|
+
event_id: zAgentEventId
|
|
2483
|
+
});
|
|
2484
|
+
var zCreateIntegrationRequest = z.object({
|
|
2485
|
+
name: zIntegrationName,
|
|
2486
|
+
integration_kind: zIntegrationKind,
|
|
2487
|
+
settings: zIntegrationSettings
|
|
2488
|
+
});
|
|
2489
|
+
var zIntegrationState = z.enum(["active", "disconnected"]);
|
|
2490
|
+
var zConfigureIntegrationRequest = z.object({
|
|
2491
|
+
expected_setup_revision: z.int().gte(1),
|
|
2492
|
+
provider_tenant_id: z.string().min(1).max(512),
|
|
2493
|
+
provider_account_ref: z.string().min(1).max(512).optional(),
|
|
2494
|
+
provider_agent_display_name: zIntegrationProviderDisplayName.optional(),
|
|
2495
|
+
credential_secret_id: zSecretId,
|
|
2496
|
+
provider_config: zIntegrationProviderConfig.optional()
|
|
2497
|
+
});
|
|
2498
|
+
var zIntegrationCapabilityDefinition = z.object({
|
|
2499
|
+
description: z.string().optional(),
|
|
2500
|
+
input_schema: z.record(z.string(), z.unknown())
|
|
2501
|
+
});
|
|
2502
|
+
var zIntegrationSubscriptionId = z.string().regex(/^isub_[a-z2-7]{26}$/);
|
|
2503
|
+
var zIntegrationConversation = z.record(z.string(), z.unknown());
|
|
2504
|
+
var zIntegrationTarget = z.object({
|
|
2505
|
+
provider: z.string(),
|
|
2506
|
+
conversation: zIntegrationConversation,
|
|
2507
|
+
display_name: z.string(),
|
|
2508
|
+
provider_uri: z.url().optional()
|
|
2509
|
+
});
|
|
2510
|
+
var zAgent = z.object({
|
|
2511
|
+
id: zAgentId,
|
|
2512
|
+
org_id: zOrganizationId,
|
|
2513
|
+
project_id: zProjectId,
|
|
2514
|
+
agent_profile_id: zAgentProfileId.optional(),
|
|
2515
|
+
state: z.enum(["active", "archived"]),
|
|
2516
|
+
name: zAgentName,
|
|
2517
|
+
integration_target: zIntegrationTarget.optional(),
|
|
2518
|
+
current_config_id: zAgentConfigId.optional(),
|
|
2519
|
+
model: zAgentModel.optional(),
|
|
2520
|
+
parent_agent_id: zAgentId.optional(),
|
|
2521
|
+
subagent_key: z.string().optional(),
|
|
2522
|
+
activity: zAgentActivity.optional(),
|
|
2523
|
+
usage: zUsageTotals.optional(),
|
|
2524
|
+
created_at: zTimestamp,
|
|
2525
|
+
updated_at: zTimestamp,
|
|
2526
|
+
archived_at: zTimestamp.optional()
|
|
2527
|
+
});
|
|
2528
|
+
var zCurrentAgentResponse = z.object({
|
|
2529
|
+
agent: zAgent
|
|
2530
|
+
});
|
|
2531
|
+
var zGetAgentResponse = z.object({
|
|
2532
|
+
agent: zAgent,
|
|
2533
|
+
machine_ids: z.array(zMachineId),
|
|
2534
|
+
mcp_connections: z.array(zAgentMcpConnection)
|
|
2535
|
+
});
|
|
2536
|
+
var zListAgentsResponse = z.object({
|
|
2537
|
+
data: z.array(zAgent),
|
|
2538
|
+
next_cursor: z.string().nullable()
|
|
2539
|
+
});
|
|
2540
|
+
var zLaunchAgentResponse = z.object({
|
|
2541
|
+
agent: zAgent,
|
|
2542
|
+
agent_config: zAgentConfig,
|
|
2543
|
+
machine_bindings: z.array(zAgentMachineBinding),
|
|
2544
|
+
agent_input: zAgentInput.optional()
|
|
2545
|
+
});
|
|
2546
|
+
var zAgentInteractionDestination = z.object({
|
|
2547
|
+
integration_kind: zIntegrationKind,
|
|
2548
|
+
handler_key: z.string(),
|
|
2549
|
+
integration_id: zIntegrationId,
|
|
2550
|
+
integration_target_id: zIntegrationTargetId,
|
|
2551
|
+
conversation: zIntegrationConversation
|
|
2552
|
+
});
|
|
2553
|
+
var zAgentInteraction = z.object({
|
|
2554
|
+
id: zAgentInteractionId,
|
|
2555
|
+
org_id: zOrganizationId,
|
|
2556
|
+
project_id: zProjectId,
|
|
2557
|
+
agent_id: zAgentId,
|
|
2558
|
+
tool_call_id: zToolCallId,
|
|
2559
|
+
tool_name: z.string().optional(),
|
|
2560
|
+
agent_name: zAgentName.optional(),
|
|
2561
|
+
subagent_key: z.string().optional(),
|
|
2562
|
+
interaction_kind: zAgentInteractionKind,
|
|
2563
|
+
state: zAgentInteractionState,
|
|
2564
|
+
request: zInteractionForm,
|
|
2565
|
+
resolution: zInteractionResolution.optional(),
|
|
2566
|
+
destination: zAgentInteractionDestination.optional(),
|
|
2567
|
+
presentation_receipt: zInteractionPresentationReceipt.optional(),
|
|
2568
|
+
resolved_by_input_id: zAgentInputId.optional(),
|
|
2569
|
+
created_at: zTimestamp,
|
|
2570
|
+
resolved_at: zTimestamp.optional()
|
|
2571
|
+
});
|
|
2572
|
+
var zListAgentInteractionsResponse = z.object({
|
|
2573
|
+
data: z.array(zAgentInteraction),
|
|
2574
|
+
next_cursor: z.string().nullable()
|
|
2575
|
+
});
|
|
2576
|
+
var zOrgOverviewResponse = z.object({
|
|
2577
|
+
projects: z.array(zVisibleProject),
|
|
2578
|
+
project_activity: z.array(zOrgOverviewProjectActivity),
|
|
2579
|
+
recent_agents: z.array(zAgent),
|
|
2580
|
+
recent_agent_profiles: z.array(zAgentProfileSummary),
|
|
2581
|
+
referenced_agent_profiles: z.array(zOrgOverviewAgentProfileReference)
|
|
2582
|
+
});
|
|
2583
|
+
var zIntegrationSubscriptionAttachment = z.object({
|
|
2584
|
+
integration_id: zIntegrationId,
|
|
2585
|
+
conversation: zIntegrationConversation
|
|
2586
|
+
});
|
|
2587
|
+
var zCreateAgentRequest = z.object({
|
|
2588
|
+
profile: zAgentProfileId.optional(),
|
|
2589
|
+
config: zAgentConfigId,
|
|
2590
|
+
name: zAgentName.optional(),
|
|
2591
|
+
message: z.string().optional(),
|
|
2592
|
+
tools: z.record(z.string(), zConfigToolSource).optional(),
|
|
2593
|
+
subscriptions: z.array(zIntegrationSubscriptionAttachment).max(100).optional(),
|
|
2594
|
+
interaction_handlers: z.record(z.string(), zConfigIntegrationCapabilitySource).optional(),
|
|
2595
|
+
initial_input: zAgentLaunchInitialInput.optional()
|
|
2596
|
+
});
|
|
2597
|
+
var zCreateIntegrationSubscriptionRequest = z.object({
|
|
2598
|
+
agent_id: zAgentId,
|
|
2599
|
+
conversation: zIntegrationConversation
|
|
2600
|
+
});
|
|
2601
|
+
var zIntegrationSubscription = z.object({
|
|
2602
|
+
id: zIntegrationSubscriptionId,
|
|
2603
|
+
project_id: zProjectId,
|
|
2604
|
+
integration_id: zIntegrationId,
|
|
2605
|
+
agent_id: zAgentId,
|
|
2606
|
+
agent_name: zAgentName,
|
|
2607
|
+
conversation: zIntegrationConversation,
|
|
2608
|
+
conversation_name: z.string().optional(),
|
|
2609
|
+
created_at: zTimestamp
|
|
2610
|
+
});
|
|
2611
|
+
var zListIntegrationSubscriptionsResponse = z.object({
|
|
2612
|
+
data: z.array(zIntegrationSubscription),
|
|
2613
|
+
next_cursor: z.string().nullable()
|
|
2614
|
+
});
|
|
2615
|
+
var zIntegrationSubscriptionDefinition = z.object({
|
|
2616
|
+
conversation_schema: z.record(z.string(), z.unknown())
|
|
2617
|
+
});
|
|
2618
|
+
var zIntegrationCapabilities = z.object({
|
|
2619
|
+
settings: zIntegrationCapabilityDefinition.optional(),
|
|
2620
|
+
tools: z.record(z.string(), zIntegrationCapabilityDefinition),
|
|
2621
|
+
subscription: zIntegrationSubscriptionDefinition.optional(),
|
|
2622
|
+
interaction_handler: zIntegrationCapabilityDefinition.optional(),
|
|
2623
|
+
schedule: zIntegrationCapabilityDefinition.optional()
|
|
2624
|
+
});
|
|
2625
|
+
var zIntegration = z.object({
|
|
2626
|
+
id: zIntegrationId,
|
|
2627
|
+
project_id: zProjectId,
|
|
2628
|
+
name: zIntegrationName,
|
|
2629
|
+
integration_kind: zIntegrationKind,
|
|
2630
|
+
state: zIntegrationState,
|
|
2631
|
+
setup_revision: z.int().gte(1),
|
|
2632
|
+
last_oauth_flow_id: zIntegrationOAuthFlowId.optional(),
|
|
2633
|
+
runtime_failure: zIntegrationRuntimeFailure.optional(),
|
|
2634
|
+
settings: zIntegrationSettings,
|
|
2635
|
+
provider_tenant_id: z.string().optional(),
|
|
2636
|
+
provider_account_ref: z.string().optional(),
|
|
2637
|
+
provider_agent_display_name: zIntegrationProviderDisplayName,
|
|
2638
|
+
bot_mention: z.string().optional(),
|
|
2639
|
+
credential_secret_id: zSecretId.optional(),
|
|
2640
|
+
provider_config: zIntegrationProviderConfig,
|
|
2641
|
+
capabilities: zIntegrationCapabilities,
|
|
2642
|
+
created_at: zTimestamp,
|
|
2643
|
+
updated_at: zTimestamp
|
|
2644
|
+
});
|
|
2645
|
+
var zListIntegrationsResponse = z.object({
|
|
2646
|
+
data: z.array(zIntegration),
|
|
2647
|
+
next_cursor: z.string().nullable()
|
|
2648
|
+
});
|
|
2649
|
+
var zIntegrationDefinition = z.object({
|
|
2650
|
+
integration_kind: zIntegrationKind,
|
|
2651
|
+
capabilities: zIntegrationCapabilities
|
|
2652
|
+
});
|
|
2653
|
+
var zListIntegrationDefinitionsResponse = z.object({
|
|
2654
|
+
data: z.array(zIntegrationDefinition)
|
|
2655
|
+
});
|
|
2656
|
+
var zAgentIncludeUsage = z.boolean();
|
|
2657
|
+
var zAgentProfileIncludeStats = z.boolean();
|
|
2658
|
+
var zAgentProfileStatsSince = z.iso.datetime({ offset: true });
|
|
2659
|
+
var zUsageSince = z.iso.datetime({ offset: true });
|
|
2660
|
+
var zUsageUntil = z.iso.datetime({ offset: true });
|
|
2661
|
+
var zUsageIncludeProjectIds = z.array(zProjectId).min(1).max(100);
|
|
2662
|
+
var zUsageExcludeProjectIds = z.array(zProjectId).min(1).max(100);
|
|
2663
|
+
var zIdempotencyKey = z.string().min(1).max(255);
|
|
2664
|
+
var zPageLimit = z.int().gte(1).lte(100).default(50);
|
|
2665
|
+
var zPageCursor = z.string().max(1024);
|
|
2666
|
+
var zResourceNameFilter = z.string().min(1).max(200);
|
|
2667
|
+
var zSecretMetadataFilter = z.record(z.string(), z.string());
|
|
2668
|
+
var zSkillOwnerKindFilter = z.enum([
|
|
2669
|
+
"org",
|
|
2670
|
+
"project",
|
|
2671
|
+
"user"
|
|
2672
|
+
]);
|
|
2673
|
+
var zSkillAvailabilitySourceFilter = z.enum(["direct", "grant"]);
|
|
2674
|
+
var zSecretOwnerKindFilter = z.enum([
|
|
2675
|
+
"org",
|
|
2676
|
+
"project",
|
|
2677
|
+
"user"
|
|
2678
|
+
]);
|
|
2679
|
+
var zSecretAvailabilitySourceFilter = z.enum(["direct", "grant"]);
|
|
2680
|
+
var zListPersonalAccessTokensQuery = z.object({
|
|
2681
|
+
limit: z.int().gte(1).lte(100).optional().default(50),
|
|
2476
2682
|
cursor: z.string().max(1024).optional()
|
|
2477
2683
|
});
|
|
2478
2684
|
var zListPersonalAccessTokensResponse2 = zListPersonalAccessTokensResponse;
|
|
@@ -2527,9 +2733,6 @@ var zDeclineInvitationResponse = zOrgInvitation;
|
|
|
2527
2733
|
var zGetOrgOverviewPath = z.object({
|
|
2528
2734
|
orgID: zOrganizationId
|
|
2529
2735
|
});
|
|
2530
|
-
var zGetOrgOverviewQuery = z.object({
|
|
2531
|
-
timezone: z.string().max(64).optional().default("UTC")
|
|
2532
|
-
});
|
|
2533
2736
|
var zGetOrgOverviewResponse = zOrgOverviewResponse;
|
|
2534
2737
|
var zGetOrgUsagePath = z.object({
|
|
2535
2738
|
orgID: zOrganizationId
|
|
@@ -2541,6 +2744,49 @@ var zGetOrgUsageQuery = z.object({
|
|
|
2541
2744
|
exclude_project_ids: z.array(zProjectId).min(1).max(100).optional()
|
|
2542
2745
|
});
|
|
2543
2746
|
var zGetOrgUsageResponse = zUsageReport;
|
|
2747
|
+
var zGetOrgUsageTimeseriesPath = z.object({
|
|
2748
|
+
orgID: zOrganizationId
|
|
2749
|
+
});
|
|
2750
|
+
var zGetOrgUsageTimeseriesQuery = z.object({
|
|
2751
|
+
since: z.iso.datetime({ offset: true }).optional(),
|
|
2752
|
+
until: z.iso.datetime({ offset: true }).optional(),
|
|
2753
|
+
timezone: z.string().max(64).optional().default("UTC"),
|
|
2754
|
+
interval: zUsageTimeseriesInterval.optional(),
|
|
2755
|
+
metric: zUsageTimeseriesMetric.optional(),
|
|
2756
|
+
group_by: zUsageTimeseriesGroupBy.optional(),
|
|
2757
|
+
group_limit: z.int().gte(1).lte(20).optional().default(8),
|
|
2758
|
+
project_ids: z.array(zProjectId).min(1).max(100).optional(),
|
|
2759
|
+
agent_profile_ids: z.array(zAgentProfileId).min(1).max(100).optional(),
|
|
2760
|
+
include_subagents: z.boolean().optional().default(false)
|
|
2761
|
+
});
|
|
2762
|
+
var zGetOrgUsageTimeseriesResponse = zUsageTimeseries;
|
|
2763
|
+
var zListOrgAgentsPath = z.object({
|
|
2764
|
+
orgID: zOrganizationId
|
|
2765
|
+
});
|
|
2766
|
+
var zListOrgAgentsQuery = z.object({
|
|
2767
|
+
name: z.string().min(1).max(200).optional(),
|
|
2768
|
+
agent_profile_id: zAgentProfileId.optional(),
|
|
2769
|
+
parent_agent_id: zAgentId.optional(),
|
|
2770
|
+
include_subagents: z.boolean().optional(),
|
|
2771
|
+
include_archived: z.boolean().optional(),
|
|
2772
|
+
include_usage: z.boolean().optional(),
|
|
2773
|
+
sort: zResourceListSort.optional(),
|
|
2774
|
+
limit: z.int().gte(1).lte(100).optional().default(50),
|
|
2775
|
+
cursor: z.string().max(1024).optional()
|
|
2776
|
+
});
|
|
2777
|
+
var zListOrgAgentsResponse = zListAgentsResponse;
|
|
2778
|
+
var zListOrgAgentProfilesPath = z.object({
|
|
2779
|
+
orgID: zOrganizationId
|
|
2780
|
+
});
|
|
2781
|
+
var zListOrgAgentProfilesQuery = z.object({
|
|
2782
|
+
name: z.string().min(1).max(200).optional(),
|
|
2783
|
+
include_stats: z.boolean().optional(),
|
|
2784
|
+
stats_since: z.iso.datetime({ offset: true }).optional(),
|
|
2785
|
+
sort: zResourceListSort.optional(),
|
|
2786
|
+
limit: z.int().gte(1).lte(100).optional().default(50),
|
|
2787
|
+
cursor: z.string().max(1024).optional()
|
|
2788
|
+
});
|
|
2789
|
+
var zListOrgAgentProfilesResponse = zListAgentProfilesResponse;
|
|
2544
2790
|
var zListVisibleProjectsPath = z.object({
|
|
2545
2791
|
orgID: z.string().regex(/^org_[a-z2-7]{26}$/)
|
|
2546
2792
|
});
|
|
@@ -2894,25 +3140,6 @@ var zDeleteSecretGrantPath = z.object({
|
|
|
2894
3140
|
grantID: z.string().regex(/^sgr_[a-z2-7]{26}$/)
|
|
2895
3141
|
});
|
|
2896
3142
|
var zDeleteSecretGrantResponse = z.void();
|
|
2897
|
-
var zListIntegrationInstallsPath = z.object({
|
|
2898
|
-
orgID: z.string().regex(/^org_[a-z2-7]{26}$/),
|
|
2899
|
-
projectID: z.string().regex(/^proj_[a-z2-7]{26}$/)
|
|
2900
|
-
});
|
|
2901
|
-
var zListIntegrationInstallsQuery = z.object({
|
|
2902
|
-
name: z.string().min(1).max(200).optional(),
|
|
2903
|
-
agent_profile_id: zAgentProfileId.optional(),
|
|
2904
|
-
oauth_flow_id: zIntegrationOAuthFlowId.optional(),
|
|
2905
|
-
sort: zResourceListSort.optional(),
|
|
2906
|
-
limit: z.int().gte(1).lte(100).optional().default(50),
|
|
2907
|
-
cursor: z.string().max(1024).optional()
|
|
2908
|
-
});
|
|
2909
|
-
var zListIntegrationInstallsResponse2 = zListIntegrationInstallsResponse;
|
|
2910
|
-
var zDeleteIntegrationInstallPath = z.object({
|
|
2911
|
-
orgID: z.string().regex(/^org_[a-z2-7]{26}$/),
|
|
2912
|
-
projectID: z.string().regex(/^proj_[a-z2-7]{26}$/),
|
|
2913
|
-
integrationInstallID: z.string().regex(/^iin_[a-z2-7]{26}$/)
|
|
2914
|
-
});
|
|
2915
|
-
var zDeleteIntegrationInstallResponse = z.void();
|
|
2916
3143
|
var zResolveAgentConfigToolsPath = z.object({
|
|
2917
3144
|
orgID: zOrganizationId,
|
|
2918
3145
|
projectID: zProjectId
|
|
@@ -2948,6 +3175,8 @@ var zListAgentProfilesPath = z.object({
|
|
|
2948
3175
|
});
|
|
2949
3176
|
var zListAgentProfilesQuery = z.object({
|
|
2950
3177
|
name: z.string().min(1).max(200).optional(),
|
|
3178
|
+
include_stats: z.boolean().optional(),
|
|
3179
|
+
stats_since: z.iso.datetime({ offset: true }).optional(),
|
|
2951
3180
|
sort: zResourceListSort.optional(),
|
|
2952
3181
|
limit: z.int().gte(1).lte(100).optional().default(50),
|
|
2953
3182
|
cursor: z.string().max(1024).optional()
|
|
@@ -3001,17 +3230,29 @@ var zUpdateAgentProfilePath = z.object({
|
|
|
3001
3230
|
});
|
|
3002
3231
|
var zUpdateAgentProfileResponse = zAgentProfile;
|
|
3003
3232
|
var zCreateIntegrationOAuthSetupPath = z.object({
|
|
3004
|
-
orgID:
|
|
3005
|
-
projectID:
|
|
3006
|
-
|
|
3233
|
+
orgID: zOrganizationId,
|
|
3234
|
+
projectID: zProjectId,
|
|
3235
|
+
integrationID: zIntegrationId
|
|
3007
3236
|
});
|
|
3008
3237
|
var zCreateIntegrationOAuthSetupResponse = zIntegrationOAuthSetup;
|
|
3009
|
-
var
|
|
3010
|
-
orgID:
|
|
3011
|
-
projectID:
|
|
3012
|
-
|
|
3238
|
+
var zCreateIntegrationSlackSetupPath = z.object({
|
|
3239
|
+
orgID: zOrganizationId,
|
|
3240
|
+
projectID: zProjectId,
|
|
3241
|
+
integrationID: zIntegrationId
|
|
3242
|
+
});
|
|
3243
|
+
var zCreateIntegrationSlackSetupResponse = zSlackSetup;
|
|
3244
|
+
var zCreateIntegrationGitHubSetupPath = z.object({
|
|
3245
|
+
orgID: zOrganizationId,
|
|
3246
|
+
projectID: zProjectId,
|
|
3247
|
+
integrationID: zIntegrationId
|
|
3013
3248
|
});
|
|
3014
|
-
var
|
|
3249
|
+
var zCreateIntegrationGitHubSetupResponse = zGitHubSetup;
|
|
3250
|
+
var zInspectIntegrationGitHubInstallationsPath = z.object({
|
|
3251
|
+
orgID: zOrganizationId,
|
|
3252
|
+
projectID: zProjectId,
|
|
3253
|
+
integrationID: zIntegrationId
|
|
3254
|
+
});
|
|
3255
|
+
var zInspectIntegrationGitHubInstallationsResponse = zGitHubInstallations;
|
|
3015
3256
|
var zListCronTriggersPath = z.object({
|
|
3016
3257
|
orgID: z.string().regex(/^org_[a-z2-7]{26}$/),
|
|
3017
3258
|
projectID: z.string().regex(/^proj_[a-z2-7]{26}$/)
|
|
@@ -3020,6 +3261,7 @@ var zListCronTriggersQuery = z.object({
|
|
|
3020
3261
|
name: z.string().min(1).max(200).optional(),
|
|
3021
3262
|
agent_id: zAgentId.optional(),
|
|
3022
3263
|
agent_profile_id: zAgentProfileId.optional(),
|
|
3264
|
+
integration_id: zIntegrationId.optional(),
|
|
3023
3265
|
sort: zResourceListSort.optional(),
|
|
3024
3266
|
limit: z.int().gte(1).lte(100).optional().default(50),
|
|
3025
3267
|
cursor: z.string().max(1024).optional()
|
|
@@ -3063,6 +3305,7 @@ var zListAgentsQuery = z.object({
|
|
|
3063
3305
|
parent_agent_id: zAgentId.optional(),
|
|
3064
3306
|
include_subagents: z.boolean().optional(),
|
|
3065
3307
|
include_archived: z.boolean().optional(),
|
|
3308
|
+
include_usage: z.boolean().optional(),
|
|
3066
3309
|
sort: zResourceListSort.optional(),
|
|
3067
3310
|
limit: z.int().gte(1).lte(100).optional().default(50),
|
|
3068
3311
|
cursor: z.string().max(1024).optional()
|
|
@@ -3586,6 +3829,13 @@ var zSleepMachineDaemonRuntimePath = z.object({
|
|
|
3586
3829
|
runtimeID: z.string().regex(/^drt_[a-z2-7]{26}$/)
|
|
3587
3830
|
});
|
|
3588
3831
|
var zSleepMachineDaemonRuntimeResponse = zDaemonRuntime;
|
|
3832
|
+
var zGetDaemonGitCredentialsPath = z.object({
|
|
3833
|
+
processID: zProcessId
|
|
3834
|
+
});
|
|
3835
|
+
var zGetDaemonGitCredentialsResponse = z.object({
|
|
3836
|
+
token: z.string(),
|
|
3837
|
+
expires_at: zTimestamp
|
|
3838
|
+
});
|
|
3589
3839
|
var zGetDaemonSkillArchivePath = z.object({
|
|
3590
3840
|
skillID: z.string().regex(/^skl_[a-z2-7]{26}$/)
|
|
3591
3841
|
});
|
|
@@ -3603,10 +3853,85 @@ var zUploadDaemonFileBody = z.instanceof(Blob);
|
|
|
3603
3853
|
var zUploadDaemonFilePath = z.object({
|
|
3604
3854
|
processID: zProcessId
|
|
3605
3855
|
});
|
|
3606
|
-
var zUploadDaemonFileQuery = z.object({
|
|
3607
|
-
filename: z.string().optional()
|
|
3856
|
+
var zUploadDaemonFileQuery = z.object({
|
|
3857
|
+
filename: z.string().optional()
|
|
3858
|
+
});
|
|
3859
|
+
var zUploadDaemonFileResponse = zUploadFileResponse;
|
|
3860
|
+
var zListIntegrationsPath = z.object({
|
|
3861
|
+
orgID: zOrganizationId,
|
|
3862
|
+
projectID: zProjectId
|
|
3863
|
+
});
|
|
3864
|
+
var zListIntegrationsQuery = z.object({
|
|
3865
|
+
limit: z.int().gte(1).lte(100).optional().default(50),
|
|
3866
|
+
cursor: z.string().max(1024).optional()
|
|
3867
|
+
});
|
|
3868
|
+
var zListIntegrationsResponse2 = zListIntegrationsResponse;
|
|
3869
|
+
var zCreateIntegrationBody = zCreateIntegrationRequest;
|
|
3870
|
+
var zCreateIntegrationPath = z.object({
|
|
3871
|
+
orgID: zOrganizationId,
|
|
3872
|
+
projectID: zProjectId
|
|
3873
|
+
});
|
|
3874
|
+
var zCreateIntegrationResponse = zIntegration;
|
|
3875
|
+
var zDeleteIntegrationPath = z.object({
|
|
3876
|
+
orgID: zOrganizationId,
|
|
3877
|
+
projectID: zProjectId,
|
|
3878
|
+
integrationID: zIntegrationId
|
|
3879
|
+
});
|
|
3880
|
+
var zDeleteIntegrationResponse = z.void();
|
|
3881
|
+
var zGetIntegrationPath = z.object({
|
|
3882
|
+
orgID: zOrganizationId,
|
|
3883
|
+
projectID: zProjectId,
|
|
3884
|
+
integrationID: zIntegrationId
|
|
3885
|
+
});
|
|
3886
|
+
var zGetIntegrationResponse = zIntegration;
|
|
3887
|
+
var zUpdateIntegrationBody = zUpdateIntegrationRequest;
|
|
3888
|
+
var zUpdateIntegrationPath = z.object({
|
|
3889
|
+
orgID: zOrganizationId,
|
|
3890
|
+
projectID: zProjectId,
|
|
3891
|
+
integrationID: zIntegrationId
|
|
3892
|
+
});
|
|
3893
|
+
var zUpdateIntegrationResponse = zIntegration;
|
|
3894
|
+
var zListIntegrationSubscriptionsPath = z.object({
|
|
3895
|
+
orgID: zOrganizationId,
|
|
3896
|
+
projectID: zProjectId,
|
|
3897
|
+
integrationID: zIntegrationId
|
|
3898
|
+
});
|
|
3899
|
+
var zListIntegrationSubscriptionsQuery = z.object({
|
|
3900
|
+
limit: z.int().gte(1).lte(100).optional().default(50),
|
|
3901
|
+
cursor: z.string().max(1024).optional()
|
|
3902
|
+
});
|
|
3903
|
+
var zListIntegrationSubscriptionsResponse2 = zListIntegrationSubscriptionsResponse;
|
|
3904
|
+
var zCreateIntegrationSubscriptionPath = z.object({
|
|
3905
|
+
orgID: zOrganizationId,
|
|
3906
|
+
projectID: zProjectId,
|
|
3907
|
+
integrationID: zIntegrationId
|
|
3908
|
+
});
|
|
3909
|
+
var zCreateIntegrationSubscriptionResponse = zIntegrationSubscription;
|
|
3910
|
+
var zDeleteIntegrationSubscriptionPath = z.object({
|
|
3911
|
+
orgID: zOrganizationId,
|
|
3912
|
+
projectID: zProjectId,
|
|
3913
|
+
integrationID: zIntegrationId,
|
|
3914
|
+
subscriptionID: zIntegrationSubscriptionId
|
|
3915
|
+
});
|
|
3916
|
+
var zDeleteIntegrationSubscriptionResponse = z.void();
|
|
3917
|
+
var zConfigureIntegrationBody = zConfigureIntegrationRequest;
|
|
3918
|
+
var zConfigureIntegrationPath = z.object({
|
|
3919
|
+
orgID: zOrganizationId,
|
|
3920
|
+
projectID: zProjectId,
|
|
3921
|
+
integrationID: zIntegrationId
|
|
3922
|
+
});
|
|
3923
|
+
var zConfigureIntegrationResponse = zIntegration;
|
|
3924
|
+
var zDisconnectIntegrationPath = z.object({
|
|
3925
|
+
orgID: zOrganizationId,
|
|
3926
|
+
projectID: zProjectId,
|
|
3927
|
+
integrationID: zIntegrationId
|
|
3928
|
+
});
|
|
3929
|
+
var zDisconnectIntegrationResponse = zIntegration;
|
|
3930
|
+
var zListIntegrationDefinitionsPath = z.object({
|
|
3931
|
+
orgID: zOrganizationId,
|
|
3932
|
+
projectID: zProjectId
|
|
3608
3933
|
});
|
|
3609
|
-
var
|
|
3934
|
+
var zListIntegrationDefinitionsResponse2 = zListIntegrationDefinitionsResponse;
|
|
3610
3935
|
|
|
3611
3936
|
// ../sdk/src/json-body.ts
|
|
3612
3937
|
import * as z2 from "zod";
|
|
@@ -5020,6 +5345,7 @@ __export(sdk_gen_exports, {
|
|
|
5020
5345
|
bootstrapDaemon: () => bootstrapDaemon,
|
|
5021
5346
|
cancelAgent: () => cancelAgent,
|
|
5022
5347
|
cancelQueuedBacklogInput: () => cancelQueuedBacklogInput,
|
|
5348
|
+
configureIntegration: () => configureIntegration,
|
|
5023
5349
|
connectByoMachine: () => connectByoMachine,
|
|
5024
5350
|
createAgent: () => createAgent,
|
|
5025
5351
|
createAgentConfig: () => createAgentConfig,
|
|
@@ -5028,7 +5354,11 @@ __export(sdk_gen_exports, {
|
|
|
5028
5354
|
createByoMachineDaemonToken: () => createByoMachineDaemonToken,
|
|
5029
5355
|
createConfiguredModel: () => createConfiguredModel,
|
|
5030
5356
|
createCronTrigger: () => createCronTrigger,
|
|
5357
|
+
createIntegration: () => createIntegration,
|
|
5358
|
+
createIntegrationGitHubSetup: () => createIntegrationGitHubSetup,
|
|
5031
5359
|
createIntegrationOAuthSetup: () => createIntegrationOAuthSetup,
|
|
5360
|
+
createIntegrationSlackSetup: () => createIntegrationSlackSetup,
|
|
5361
|
+
createIntegrationSubscription: () => createIntegrationSubscription,
|
|
5032
5362
|
createMachine: () => createMachine,
|
|
5033
5363
|
createMachinePool: () => createMachinePool,
|
|
5034
5364
|
createMemoryStore: () => createMemoryStore,
|
|
@@ -5046,13 +5376,13 @@ __export(sdk_gen_exports, {
|
|
|
5046
5376
|
createSecretVersion: () => createSecretVersion,
|
|
5047
5377
|
createSkill: () => createSkill,
|
|
5048
5378
|
createSkillGrant: () => createSkillGrant,
|
|
5049
|
-
createSlackSetup: () => createSlackSetup,
|
|
5050
5379
|
declineInvitation: () => declineInvitation,
|
|
5051
5380
|
deleteAgentProfile: () => deleteAgentProfile,
|
|
5052
5381
|
deleteConfiguredModel: () => deleteConfiguredModel,
|
|
5053
5382
|
deleteCronTrigger: () => deleteCronTrigger,
|
|
5054
5383
|
deleteCurrentUser: () => deleteCurrentUser,
|
|
5055
|
-
|
|
5384
|
+
deleteIntegration: () => deleteIntegration,
|
|
5385
|
+
deleteIntegrationSubscription: () => deleteIntegrationSubscription,
|
|
5056
5386
|
deleteMachine: () => deleteMachine,
|
|
5057
5387
|
deleteMachinePool: () => deleteMachinePool,
|
|
5058
5388
|
deleteMemoryFile: () => deleteMemoryFile,
|
|
@@ -5069,6 +5399,7 @@ __export(sdk_gen_exports, {
|
|
|
5069
5399
|
deleteSkill: () => deleteSkill,
|
|
5070
5400
|
deleteSkillGrant: () => deleteSkillGrant,
|
|
5071
5401
|
demoteSteeringInputToQueued: () => demoteSteeringInputToQueued,
|
|
5402
|
+
disconnectIntegration: () => disconnectIntegration,
|
|
5072
5403
|
downloadDaemonFile: () => downloadDaemonFile,
|
|
5073
5404
|
downloadMemoryFile: () => downloadMemoryFile,
|
|
5074
5405
|
endMachineDaemonRuntime: () => endMachineDaemonRuntime,
|
|
@@ -5082,7 +5413,9 @@ __export(sdk_gen_exports, {
|
|
|
5082
5413
|
getArtifactContent: () => getArtifactContent,
|
|
5083
5414
|
getCronTrigger: () => getCronTrigger,
|
|
5084
5415
|
getCurrentUser: () => getCurrentUser,
|
|
5416
|
+
getDaemonGitCredentials: () => getDaemonGitCredentials,
|
|
5085
5417
|
getDaemonSkillArchive: () => getDaemonSkillArchive,
|
|
5418
|
+
getIntegration: () => getIntegration,
|
|
5086
5419
|
getMachine: () => getMachine,
|
|
5087
5420
|
getMachinePool: () => getMachinePool,
|
|
5088
5421
|
getMemoryStore: () => getMemoryStore,
|
|
@@ -5091,12 +5424,14 @@ __export(sdk_gen_exports, {
|
|
|
5091
5424
|
getOrgApiKey: () => getOrgApiKey,
|
|
5092
5425
|
getOrgOverview: () => getOrgOverview,
|
|
5093
5426
|
getOrgUsage: () => getOrgUsage,
|
|
5427
|
+
getOrgUsageTimeseries: () => getOrgUsageTimeseries,
|
|
5094
5428
|
getProjectAvailableSecret: () => getProjectAvailableSecret,
|
|
5095
5429
|
getProjectMachinePoolGrant: () => getProjectMachinePoolGrant,
|
|
5096
5430
|
getProjectUsage: () => getProjectUsage,
|
|
5097
5431
|
getSecret: () => getSecret,
|
|
5098
5432
|
getSkill: () => getSkill,
|
|
5099
5433
|
getToolCatalog: () => getToolCatalog,
|
|
5434
|
+
inspectIntegrationGitHubInstallations: () => inspectIntegrationGitHubInstallations,
|
|
5100
5435
|
listActors: () => listActors,
|
|
5101
5436
|
listAgentInteractions: () => listAgentInteractions,
|
|
5102
5437
|
listAgentProfiles: () => listAgentProfiles,
|
|
@@ -5105,7 +5440,9 @@ __export(sdk_gen_exports, {
|
|
|
5105
5440
|
listConfiguredModels: () => listConfiguredModels,
|
|
5106
5441
|
listCronTriggers: () => listCronTriggers,
|
|
5107
5442
|
listEvents: () => listEvents,
|
|
5108
|
-
|
|
5443
|
+
listIntegrationDefinitions: () => listIntegrationDefinitions,
|
|
5444
|
+
listIntegrationSubscriptions: () => listIntegrationSubscriptions,
|
|
5445
|
+
listIntegrations: () => listIntegrations,
|
|
5109
5446
|
listMachinePools: () => listMachinePools,
|
|
5110
5447
|
listMcpServerTools: () => listMcpServerTools,
|
|
5111
5448
|
listMcpServers: () => listMcpServers,
|
|
@@ -5113,6 +5450,8 @@ __export(sdk_gen_exports, {
|
|
|
5113
5450
|
listMemoryFiles: () => listMemoryFiles,
|
|
5114
5451
|
listMemoryStores: () => listMemoryStores,
|
|
5115
5452
|
listModelProviderConfigs: () => listModelProviderConfigs,
|
|
5453
|
+
listOrgAgentProfiles: () => listOrgAgentProfiles,
|
|
5454
|
+
listOrgAgents: () => listOrgAgents,
|
|
5116
5455
|
listOrgApiKeyProjectAccess: () => listOrgApiKeyProjectAccess,
|
|
5117
5456
|
listOrgApiKeys: () => listOrgApiKeys,
|
|
5118
5457
|
listOrgInvitations: () => listOrgInvitations,
|
|
@@ -5161,6 +5500,7 @@ __export(sdk_gen_exports, {
|
|
|
5161
5500
|
updateAgentProfile: () => updateAgentProfile,
|
|
5162
5501
|
updateConfiguredModel: () => updateConfiguredModel,
|
|
5163
5502
|
updateCronTrigger: () => updateCronTrigger,
|
|
5503
|
+
updateIntegration: () => updateIntegration,
|
|
5164
5504
|
updateMachine: () => updateMachine,
|
|
5165
5505
|
updateMachinePool: () => updateMachinePool,
|
|
5166
5506
|
updateMemoryStore: () => updateMemoryStore,
|
|
@@ -5409,6 +5749,48 @@ var getOrgUsage = (options) => (options.client ?? client).get({
|
|
|
5409
5749
|
url: "/orgs/{orgID}/usage",
|
|
5410
5750
|
...options
|
|
5411
5751
|
});
|
|
5752
|
+
var getOrgUsageTimeseries = (options) => (options.client ?? client).get({
|
|
5753
|
+
responseValidator: relaxedResponseValidator(zGetOrgUsageTimeseriesResponse),
|
|
5754
|
+
security: [{
|
|
5755
|
+
key: "bearerAuth",
|
|
5756
|
+
scheme: "bearer",
|
|
5757
|
+
type: "http"
|
|
5758
|
+
}, {
|
|
5759
|
+
in: "cookie",
|
|
5760
|
+
name: "__Host-omnara_session",
|
|
5761
|
+
type: "apiKey"
|
|
5762
|
+
}],
|
|
5763
|
+
url: "/orgs/{orgID}/usage/timeseries",
|
|
5764
|
+
...options
|
|
5765
|
+
});
|
|
5766
|
+
var listOrgAgents = (options) => (options.client ?? client).get({
|
|
5767
|
+
responseValidator: relaxedResponseValidator(zListOrgAgentsResponse),
|
|
5768
|
+
security: [{
|
|
5769
|
+
key: "bearerAuth",
|
|
5770
|
+
scheme: "bearer",
|
|
5771
|
+
type: "http"
|
|
5772
|
+
}, {
|
|
5773
|
+
in: "cookie",
|
|
5774
|
+
name: "__Host-omnara_session",
|
|
5775
|
+
type: "apiKey"
|
|
5776
|
+
}],
|
|
5777
|
+
url: "/orgs/{orgID}/agents",
|
|
5778
|
+
...options
|
|
5779
|
+
});
|
|
5780
|
+
var listOrgAgentProfiles = (options) => (options.client ?? client).get({
|
|
5781
|
+
responseValidator: relaxedResponseValidator(zListOrgAgentProfilesResponse),
|
|
5782
|
+
security: [{
|
|
5783
|
+
key: "bearerAuth",
|
|
5784
|
+
scheme: "bearer",
|
|
5785
|
+
type: "http"
|
|
5786
|
+
}, {
|
|
5787
|
+
in: "cookie",
|
|
5788
|
+
name: "__Host-omnara_session",
|
|
5789
|
+
type: "apiKey"
|
|
5790
|
+
}],
|
|
5791
|
+
url: "/orgs/{orgID}/agent-profiles",
|
|
5792
|
+
...options
|
|
5793
|
+
});
|
|
5412
5794
|
var listVisibleProjects = (options) => (options.client ?? client).get({
|
|
5413
5795
|
responseValidator: relaxedResponseValidator(zListVisibleProjectsResponse),
|
|
5414
5796
|
security: [{
|
|
@@ -6250,38 +6632,6 @@ var deleteSecretGrant = (options) => (options.client ?? client).delete({
|
|
|
6250
6632
|
url: "/orgs/{orgID}/secrets/{secretID}/grants/{grantID}",
|
|
6251
6633
|
...options
|
|
6252
6634
|
});
|
|
6253
|
-
var listIntegrationInstalls = (options) => (options.client ?? client).get({
|
|
6254
|
-
responseValidator: relaxedResponseValidator(zListIntegrationInstallsResponse2),
|
|
6255
|
-
security: [{
|
|
6256
|
-
key: "bearerAuth",
|
|
6257
|
-
scheme: "bearer",
|
|
6258
|
-
type: "http"
|
|
6259
|
-
}, {
|
|
6260
|
-
in: "cookie",
|
|
6261
|
-
name: "__Host-omnara_session",
|
|
6262
|
-
type: "apiKey"
|
|
6263
|
-
}],
|
|
6264
|
-
url: "/orgs/{orgID}/projects/{projectID}/integration-installs",
|
|
6265
|
-
...options
|
|
6266
|
-
});
|
|
6267
|
-
var deleteIntegrationInstall = (options) => (options.client ?? client).delete({
|
|
6268
|
-
responseValidator: relaxedResponseValidator(zDeleteIntegrationInstallResponse),
|
|
6269
|
-
security: [
|
|
6270
|
-
{
|
|
6271
|
-
key: "bearerAuth",
|
|
6272
|
-
scheme: "bearer",
|
|
6273
|
-
type: "http"
|
|
6274
|
-
},
|
|
6275
|
-
{
|
|
6276
|
-
in: "cookie",
|
|
6277
|
-
name: "__Host-omnara_session",
|
|
6278
|
-
type: "apiKey"
|
|
6279
|
-
},
|
|
6280
|
-
{ name: "X-Omnara-Csrf", type: "apiKey" }
|
|
6281
|
-
],
|
|
6282
|
-
url: "/orgs/{orgID}/projects/{projectID}/integration-installs/{integrationInstallID}",
|
|
6283
|
-
...options
|
|
6284
|
-
});
|
|
6285
6635
|
var resolveAgentConfigTools = (options) => (options.client ?? client).post({
|
|
6286
6636
|
responseValidator: relaxedResponseValidator(zResolveAgentConfigToolsResponse),
|
|
6287
6637
|
security: [
|
|
@@ -6531,15 +6881,15 @@ var createIntegrationOAuthSetup = (options) => (options.client ?? client).post({
|
|
|
6531
6881
|
},
|
|
6532
6882
|
{ name: "X-Omnara-Csrf", type: "apiKey" }
|
|
6533
6883
|
],
|
|
6534
|
-
url: "/orgs/{orgID}/projects/{projectID}/
|
|
6884
|
+
url: "/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/oauth/setup",
|
|
6535
6885
|
...options,
|
|
6536
6886
|
headers: {
|
|
6537
6887
|
"Content-Type": "application/json",
|
|
6538
6888
|
...options.headers
|
|
6539
6889
|
}
|
|
6540
6890
|
});
|
|
6541
|
-
var
|
|
6542
|
-
responseValidator: relaxedResponseValidator(
|
|
6891
|
+
var createIntegrationSlackSetup = (options) => (options.client ?? client).post({
|
|
6892
|
+
responseValidator: relaxedResponseValidator(zCreateIntegrationSlackSetupResponse),
|
|
6543
6893
|
security: [
|
|
6544
6894
|
{
|
|
6545
6895
|
key: "bearerAuth",
|
|
@@ -6553,7 +6903,35 @@ var createSlackSetup = (options) => (options.client ?? client).post({
|
|
|
6553
6903
|
},
|
|
6554
6904
|
{ name: "X-Omnara-Csrf", type: "apiKey" }
|
|
6555
6905
|
],
|
|
6556
|
-
url: "/orgs/{orgID}/projects/{projectID}/
|
|
6906
|
+
url: "/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/slack-setup",
|
|
6907
|
+
...options,
|
|
6908
|
+
headers: {
|
|
6909
|
+
"Content-Type": "application/json",
|
|
6910
|
+
...options.headers
|
|
6911
|
+
}
|
|
6912
|
+
});
|
|
6913
|
+
var createIntegrationGitHubSetup = (options) => (options.client ?? client).post({
|
|
6914
|
+
responseValidator: relaxedResponseValidator(zCreateIntegrationGitHubSetupResponse),
|
|
6915
|
+
security: [{
|
|
6916
|
+
in: "cookie",
|
|
6917
|
+
name: "__Host-omnara_session",
|
|
6918
|
+
type: "apiKey"
|
|
6919
|
+
}, { name: "X-Omnara-Csrf", type: "apiKey" }],
|
|
6920
|
+
url: "/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/github-setup",
|
|
6921
|
+
...options,
|
|
6922
|
+
headers: {
|
|
6923
|
+
"Content-Type": "application/json",
|
|
6924
|
+
...options.headers
|
|
6925
|
+
}
|
|
6926
|
+
});
|
|
6927
|
+
var inspectIntegrationGitHubInstallations = (options) => (options.client ?? client).post({
|
|
6928
|
+
responseValidator: relaxedResponseValidator(zInspectIntegrationGitHubInstallationsResponse),
|
|
6929
|
+
security: [{
|
|
6930
|
+
in: "cookie",
|
|
6931
|
+
name: "__Host-omnara_session",
|
|
6932
|
+
type: "apiKey"
|
|
6933
|
+
}, { name: "X-Omnara-Csrf", type: "apiKey" }],
|
|
6934
|
+
url: "/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/github-setup/installations",
|
|
6557
6935
|
...options,
|
|
6558
6936
|
headers: {
|
|
6559
6937
|
"Content-Type": "application/json",
|
|
@@ -7839,6 +8217,16 @@ var sleepMachineDaemonRuntime = (options) => (options.client ?? client).post({
|
|
|
7839
8217
|
url: "/daemon/runtimes/{runtimeID}/sleep",
|
|
7840
8218
|
...options
|
|
7841
8219
|
});
|
|
8220
|
+
var getDaemonGitCredentials = (options) => (options.client ?? client).post({
|
|
8221
|
+
responseValidator: relaxedResponseValidator(zGetDaemonGitCredentialsResponse),
|
|
8222
|
+
security: [{
|
|
8223
|
+
key: "machineDaemonAuth",
|
|
8224
|
+
scheme: "bearer",
|
|
8225
|
+
type: "http"
|
|
8226
|
+
}],
|
|
8227
|
+
url: "/daemon/processes/{processID}/git-credentials",
|
|
8228
|
+
...options
|
|
8229
|
+
});
|
|
7842
8230
|
var getDaemonSkillArchive = (options) => (options.client ?? client).get({
|
|
7843
8231
|
responseValidator: relaxedResponseValidator(zGetDaemonSkillArchiveResponse),
|
|
7844
8232
|
security: [{
|
|
@@ -7874,24 +8262,245 @@ var uploadDaemonFile = (options) => (options.client ?? client).post({
|
|
|
7874
8262
|
...options.headers
|
|
7875
8263
|
}
|
|
7876
8264
|
});
|
|
8265
|
+
var listIntegrations = (options) => (options.client ?? client).get({
|
|
8266
|
+
responseValidator: relaxedResponseValidator(zListIntegrationsResponse2),
|
|
8267
|
+
security: [{
|
|
8268
|
+
key: "bearerAuth",
|
|
8269
|
+
scheme: "bearer",
|
|
8270
|
+
type: "http"
|
|
8271
|
+
}, {
|
|
8272
|
+
in: "cookie",
|
|
8273
|
+
name: "__Host-omnara_session",
|
|
8274
|
+
type: "apiKey"
|
|
8275
|
+
}],
|
|
8276
|
+
url: "/orgs/{orgID}/projects/{projectID}/integrations",
|
|
8277
|
+
...options
|
|
8278
|
+
});
|
|
8279
|
+
var createIntegration = (options) => (options.client ?? client).post({
|
|
8280
|
+
responseValidator: relaxedResponseValidator(zCreateIntegrationResponse),
|
|
8281
|
+
security: [
|
|
8282
|
+
{
|
|
8283
|
+
key: "bearerAuth",
|
|
8284
|
+
scheme: "bearer",
|
|
8285
|
+
type: "http"
|
|
8286
|
+
},
|
|
8287
|
+
{
|
|
8288
|
+
in: "cookie",
|
|
8289
|
+
name: "__Host-omnara_session",
|
|
8290
|
+
type: "apiKey"
|
|
8291
|
+
},
|
|
8292
|
+
{ name: "X-Omnara-Csrf", type: "apiKey" }
|
|
8293
|
+
],
|
|
8294
|
+
url: "/orgs/{orgID}/projects/{projectID}/integrations",
|
|
8295
|
+
...options,
|
|
8296
|
+
headers: {
|
|
8297
|
+
"Content-Type": "application/json",
|
|
8298
|
+
...options.headers
|
|
8299
|
+
}
|
|
8300
|
+
});
|
|
8301
|
+
var deleteIntegration = (options) => (options.client ?? client).delete({
|
|
8302
|
+
responseValidator: relaxedResponseValidator(zDeleteIntegrationResponse),
|
|
8303
|
+
security: [
|
|
8304
|
+
{
|
|
8305
|
+
key: "bearerAuth",
|
|
8306
|
+
scheme: "bearer",
|
|
8307
|
+
type: "http"
|
|
8308
|
+
},
|
|
8309
|
+
{
|
|
8310
|
+
in: "cookie",
|
|
8311
|
+
name: "__Host-omnara_session",
|
|
8312
|
+
type: "apiKey"
|
|
8313
|
+
},
|
|
8314
|
+
{ name: "X-Omnara-Csrf", type: "apiKey" }
|
|
8315
|
+
],
|
|
8316
|
+
url: "/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}",
|
|
8317
|
+
...options
|
|
8318
|
+
});
|
|
8319
|
+
var getIntegration = (options) => (options.client ?? client).get({
|
|
8320
|
+
responseValidator: relaxedResponseValidator(zGetIntegrationResponse),
|
|
8321
|
+
security: [{
|
|
8322
|
+
key: "bearerAuth",
|
|
8323
|
+
scheme: "bearer",
|
|
8324
|
+
type: "http"
|
|
8325
|
+
}, {
|
|
8326
|
+
in: "cookie",
|
|
8327
|
+
name: "__Host-omnara_session",
|
|
8328
|
+
type: "apiKey"
|
|
8329
|
+
}],
|
|
8330
|
+
url: "/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}",
|
|
8331
|
+
...options
|
|
8332
|
+
});
|
|
8333
|
+
var updateIntegration = (options) => (options.client ?? client).put({
|
|
8334
|
+
responseValidator: relaxedResponseValidator(zUpdateIntegrationResponse),
|
|
8335
|
+
security: [
|
|
8336
|
+
{
|
|
8337
|
+
key: "bearerAuth",
|
|
8338
|
+
scheme: "bearer",
|
|
8339
|
+
type: "http"
|
|
8340
|
+
},
|
|
8341
|
+
{
|
|
8342
|
+
in: "cookie",
|
|
8343
|
+
name: "__Host-omnara_session",
|
|
8344
|
+
type: "apiKey"
|
|
8345
|
+
},
|
|
8346
|
+
{ name: "X-Omnara-Csrf", type: "apiKey" }
|
|
8347
|
+
],
|
|
8348
|
+
url: "/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}",
|
|
8349
|
+
...options,
|
|
8350
|
+
headers: {
|
|
8351
|
+
"Content-Type": "application/json",
|
|
8352
|
+
...options.headers
|
|
8353
|
+
}
|
|
8354
|
+
});
|
|
8355
|
+
var listIntegrationSubscriptions = (options) => (options.client ?? client).get({
|
|
8356
|
+
responseValidator: relaxedResponseValidator(zListIntegrationSubscriptionsResponse2),
|
|
8357
|
+
security: [{
|
|
8358
|
+
key: "bearerAuth",
|
|
8359
|
+
scheme: "bearer",
|
|
8360
|
+
type: "http"
|
|
8361
|
+
}, {
|
|
8362
|
+
in: "cookie",
|
|
8363
|
+
name: "__Host-omnara_session",
|
|
8364
|
+
type: "apiKey"
|
|
8365
|
+
}],
|
|
8366
|
+
url: "/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/subscriptions",
|
|
8367
|
+
...options
|
|
8368
|
+
});
|
|
8369
|
+
var createIntegrationSubscription = (options) => (options.client ?? client).post({
|
|
8370
|
+
responseValidator: relaxedResponseValidator(zCreateIntegrationSubscriptionResponse),
|
|
8371
|
+
security: [
|
|
8372
|
+
{
|
|
8373
|
+
key: "bearerAuth",
|
|
8374
|
+
scheme: "bearer",
|
|
8375
|
+
type: "http"
|
|
8376
|
+
},
|
|
8377
|
+
{
|
|
8378
|
+
in: "cookie",
|
|
8379
|
+
name: "__Host-omnara_session",
|
|
8380
|
+
type: "apiKey"
|
|
8381
|
+
},
|
|
8382
|
+
{ name: "X-Omnara-Csrf", type: "apiKey" }
|
|
8383
|
+
],
|
|
8384
|
+
url: "/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/subscriptions",
|
|
8385
|
+
...options,
|
|
8386
|
+
headers: {
|
|
8387
|
+
"Content-Type": "application/json",
|
|
8388
|
+
...options.headers
|
|
8389
|
+
}
|
|
8390
|
+
});
|
|
8391
|
+
var deleteIntegrationSubscription = (options) => (options.client ?? client).delete({
|
|
8392
|
+
responseValidator: relaxedResponseValidator(zDeleteIntegrationSubscriptionResponse),
|
|
8393
|
+
security: [
|
|
8394
|
+
{
|
|
8395
|
+
key: "bearerAuth",
|
|
8396
|
+
scheme: "bearer",
|
|
8397
|
+
type: "http"
|
|
8398
|
+
},
|
|
8399
|
+
{
|
|
8400
|
+
in: "cookie",
|
|
8401
|
+
name: "__Host-omnara_session",
|
|
8402
|
+
type: "apiKey"
|
|
8403
|
+
},
|
|
8404
|
+
{ name: "X-Omnara-Csrf", type: "apiKey" }
|
|
8405
|
+
],
|
|
8406
|
+
url: "/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/subscriptions/{subscriptionID}",
|
|
8407
|
+
...options
|
|
8408
|
+
});
|
|
8409
|
+
var configureIntegration = (options) => (options.client ?? client).post({
|
|
8410
|
+
responseValidator: relaxedResponseValidator(zConfigureIntegrationResponse),
|
|
8411
|
+
security: [
|
|
8412
|
+
{
|
|
8413
|
+
key: "bearerAuth",
|
|
8414
|
+
scheme: "bearer",
|
|
8415
|
+
type: "http"
|
|
8416
|
+
},
|
|
8417
|
+
{
|
|
8418
|
+
in: "cookie",
|
|
8419
|
+
name: "__Host-omnara_session",
|
|
8420
|
+
type: "apiKey"
|
|
8421
|
+
},
|
|
8422
|
+
{ name: "X-Omnara-Csrf", type: "apiKey" }
|
|
8423
|
+
],
|
|
8424
|
+
url: "/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/setup",
|
|
8425
|
+
...options,
|
|
8426
|
+
headers: {
|
|
8427
|
+
"Content-Type": "application/json",
|
|
8428
|
+
...options.headers
|
|
8429
|
+
}
|
|
8430
|
+
});
|
|
8431
|
+
var disconnectIntegration = (options) => (options.client ?? client).post({
|
|
8432
|
+
responseValidator: relaxedResponseValidator(zDisconnectIntegrationResponse),
|
|
8433
|
+
security: [
|
|
8434
|
+
{
|
|
8435
|
+
key: "bearerAuth",
|
|
8436
|
+
scheme: "bearer",
|
|
8437
|
+
type: "http"
|
|
8438
|
+
},
|
|
8439
|
+
{
|
|
8440
|
+
in: "cookie",
|
|
8441
|
+
name: "__Host-omnara_session",
|
|
8442
|
+
type: "apiKey"
|
|
8443
|
+
},
|
|
8444
|
+
{ name: "X-Omnara-Csrf", type: "apiKey" }
|
|
8445
|
+
],
|
|
8446
|
+
url: "/orgs/{orgID}/projects/{projectID}/integrations/{integrationID}/disconnect",
|
|
8447
|
+
...options
|
|
8448
|
+
});
|
|
8449
|
+
var listIntegrationDefinitions = (options) => (options.client ?? client).get({
|
|
8450
|
+
responseValidator: relaxedResponseValidator(zListIntegrationDefinitionsResponse2),
|
|
8451
|
+
security: [{
|
|
8452
|
+
key: "bearerAuth",
|
|
8453
|
+
scheme: "bearer",
|
|
8454
|
+
type: "http"
|
|
8455
|
+
}, {
|
|
8456
|
+
in: "cookie",
|
|
8457
|
+
name: "__Host-omnara_session",
|
|
8458
|
+
type: "apiKey"
|
|
8459
|
+
}],
|
|
8460
|
+
url: "/orgs/{orgID}/projects/{projectID}/integration-definitions",
|
|
8461
|
+
...options
|
|
8462
|
+
});
|
|
7877
8463
|
|
|
7878
8464
|
// ../sdk/src/memory.ts
|
|
7879
8465
|
var MAX_MEMORY_FILE_BYTES = 10 * 1024 * 1024;
|
|
7880
8466
|
var FILE_DIGEST_HEADER = "X-Omnara-File-Digest";
|
|
7881
8467
|
|
|
8468
|
+
// ../sdk/src/profile-integration.ts
|
|
8469
|
+
import * as z8 from "zod";
|
|
8470
|
+
var discordPublicKeyPattern = "[a-fA-F0-9]{64}";
|
|
8471
|
+
var discordPublicKey = z8.string().regex(new RegExp(`^${discordPublicKeyPattern}$`));
|
|
8472
|
+
var profilesSchema = z8.array(zAgentProfileId).max(16).refine((ids) => new Set(ids).size === ids.length, "Choose each profile only once.");
|
|
8473
|
+
var repositorySchema = z8.string().trim().regex(/^[1-9][0-9]*$/, "Enter a positive repository ID without leading zeros.").refine((id) => BigInt(id) <= 9223372036854775807n, "The repository ID is too large.");
|
|
8474
|
+
var triggerSchema = z8.enum(["mention", "pull_request_opened", "both"]);
|
|
8475
|
+
var chatLauncherSchema = z8.object({ profiles: profilesSchema.min(1) }).strict();
|
|
8476
|
+
var githubLauncherSchema = z8.object({
|
|
8477
|
+
profile: zAgentProfileId,
|
|
8478
|
+
trigger: triggerSchema,
|
|
8479
|
+
repository_id: repositorySchema.optional()
|
|
8480
|
+
}).strict();
|
|
8481
|
+
function profileIntegrationProfileUpdate(integration, profileIds) {
|
|
8482
|
+
if (!["slack_thread", "discord_thread"].includes(integration.integration_kind))
|
|
8483
|
+
throw new Error("Profile editing requires a Slack or Discord integration.");
|
|
8484
|
+
const profiles = profilesSchema.parse(profileIds);
|
|
8485
|
+
const settings = { ...integration.settings };
|
|
8486
|
+
if (profiles.length === 0) delete settings.launcher;
|
|
8487
|
+
else settings.launcher = { profiles };
|
|
8488
|
+
return { settings };
|
|
8489
|
+
}
|
|
8490
|
+
|
|
7882
8491
|
// src/config-file.ts
|
|
7883
8492
|
import { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
7884
8493
|
import { homedir } from "node:os";
|
|
7885
8494
|
import { dirname, join } from "node:path";
|
|
7886
|
-
import * as
|
|
8495
|
+
import * as z10 from "zod";
|
|
7887
8496
|
|
|
7888
8497
|
// src/output.ts
|
|
7889
|
-
import * as
|
|
7890
|
-
var zRenderValue =
|
|
8498
|
+
import * as z9 from "zod";
|
|
8499
|
+
var zRenderValue = z9.json();
|
|
7891
8500
|
var zOptionalRenderValue = zRenderValue.optional();
|
|
7892
|
-
var zListEnvelope =
|
|
7893
|
-
data:
|
|
7894
|
-
next_cursor:
|
|
8501
|
+
var zListEnvelope = z9.strictObject({
|
|
8502
|
+
data: z9.array(zRenderValue),
|
|
8503
|
+
next_cursor: z9.string().nullable()
|
|
7895
8504
|
});
|
|
7896
8505
|
var PREFERRED_LEADING_COLUMNS = ["id", "name"];
|
|
7897
8506
|
var HIDDEN_TABLE_COLUMNS = /* @__PURE__ */ new Set(["org_id", "project_id"]);
|
|
@@ -8063,9 +8672,9 @@ async function runCliAction(action) {
|
|
|
8063
8672
|
} catch (error) {
|
|
8064
8673
|
if (error instanceof CliInputError) {
|
|
8065
8674
|
console.error(`error: ${error.message}`);
|
|
8066
|
-
} else if (error instanceof
|
|
8675
|
+
} else if (error instanceof z9.ZodError) {
|
|
8067
8676
|
console.error(`error: unexpected response shape:
|
|
8068
|
-
${
|
|
8677
|
+
${z9.prettifyError(error)}`);
|
|
8069
8678
|
} else if (error instanceof ApiError) {
|
|
8070
8679
|
const code = error.code ? ` [${error.code}]` : "";
|
|
8071
8680
|
console.error(`error: API ${error.status}${code}: ${error.message}`);
|
|
@@ -8078,11 +8687,11 @@ ${z8.prettifyError(error)}`);
|
|
|
8078
8687
|
}
|
|
8079
8688
|
|
|
8080
8689
|
// src/config-file.ts
|
|
8081
|
-
var zConfigFile =
|
|
8082
|
-
api_url:
|
|
8083
|
-
issuer_url:
|
|
8084
|
-
base_url:
|
|
8085
|
-
token:
|
|
8690
|
+
var zConfigFile = z10.looseObject({
|
|
8691
|
+
api_url: z10.url().optional(),
|
|
8692
|
+
issuer_url: z10.url().optional(),
|
|
8693
|
+
base_url: z10.url().optional(),
|
|
8694
|
+
token: z10.string().min(1).optional(),
|
|
8086
8695
|
org_id: zOrganizationId.optional(),
|
|
8087
8696
|
project_id: zProjectId.optional()
|
|
8088
8697
|
});
|
|
@@ -8099,9 +8708,9 @@ function loadConfigFile() {
|
|
|
8099
8708
|
const path = configFilePath();
|
|
8100
8709
|
if (!existsSync(path)) return { readable: true, file: {} };
|
|
8101
8710
|
const json8 = zJsonText.safeParse(readFileSync(path, "utf8"));
|
|
8102
|
-
if (!json8.success) return { readable: false, reason:
|
|
8711
|
+
if (!json8.success) return { readable: false, reason: z10.prettifyError(json8.error) };
|
|
8103
8712
|
const file = zConfigFile.safeParse(json8.data);
|
|
8104
|
-
return file.success ? { readable: true, file: file.data } : { readable: false, reason:
|
|
8713
|
+
return file.success ? { readable: true, file: file.data } : { readable: false, reason: z10.prettifyError(file.error) };
|
|
8105
8714
|
}
|
|
8106
8715
|
function readConfigFile() {
|
|
8107
8716
|
const loaded = loadConfigFile();
|
|
@@ -8128,7 +8737,7 @@ function updateConfigFile(patch) {
|
|
|
8128
8737
|
const result = zConfigFile.safeParse(merged);
|
|
8129
8738
|
if (!result.success) {
|
|
8130
8739
|
throw new CliInputError(`refusing to save invalid config:
|
|
8131
|
-
${
|
|
8740
|
+
${z10.prettifyError(result.error)}`);
|
|
8132
8741
|
}
|
|
8133
8742
|
mkdirSync(dirname(configFilePath()), { recursive: true, mode: 448 });
|
|
8134
8743
|
writeFileSync(configFilePath(), `${JSON.stringify(result.data, null, 2)}
|
|
@@ -8140,7 +8749,7 @@ ${z9.prettifyError(result.error)}`);
|
|
|
8140
8749
|
// src/device-login.ts
|
|
8141
8750
|
import { hostname } from "node:os";
|
|
8142
8751
|
import { intro, log, note, outro, spinner } from "@clack/prompts";
|
|
8143
|
-
import * as
|
|
8752
|
+
import * as z11 from "zod";
|
|
8144
8753
|
|
|
8145
8754
|
// src/browser.ts
|
|
8146
8755
|
import { spawn } from "node:child_process";
|
|
@@ -8313,7 +8922,7 @@ function loginTokenName(explicit, hostName) {
|
|
|
8313
8922
|
if (result.success) return result.data;
|
|
8314
8923
|
if (explicit === void 0) return cliLoginTokenName();
|
|
8315
8924
|
throw new CliInputError(`invalid token name:
|
|
8316
|
-
${
|
|
8925
|
+
${z11.prettifyError(result.error)}`);
|
|
8317
8926
|
}
|
|
8318
8927
|
async function loginWithDevice(options) {
|
|
8319
8928
|
const { report, store } = options;
|
|
@@ -8549,14 +9158,14 @@ function registerConfigCommand(program2, cli) {
|
|
|
8549
9158
|
|
|
8550
9159
|
// src/factory.ts
|
|
8551
9160
|
import { InvalidArgumentError } from "commander";
|
|
8552
|
-
import * as
|
|
9161
|
+
import * as z13 from "zod";
|
|
8553
9162
|
|
|
8554
9163
|
// src/flags.ts
|
|
8555
|
-
import * as
|
|
8556
|
-
var zScalarKind =
|
|
8557
|
-
|
|
8558
|
-
|
|
8559
|
-
|
|
9164
|
+
import * as z12 from "zod";
|
|
9165
|
+
var zScalarKind = z12.union([
|
|
9166
|
+
z12.string().transform(() => "string"),
|
|
9167
|
+
z12.number().transform(() => "number"),
|
|
9168
|
+
z12.boolean().transform(() => "boolean")
|
|
8560
9169
|
]);
|
|
8561
9170
|
function isChoice(value) {
|
|
8562
9171
|
return typeof value === "string" || typeof value === "number";
|
|
@@ -8673,7 +9282,7 @@ function finalizeFlag(draft) {
|
|
|
8673
9282
|
};
|
|
8674
9283
|
}
|
|
8675
9284
|
function deriveFlags(schema) {
|
|
8676
|
-
const jsonSchema =
|
|
9285
|
+
const jsonSchema = z12.toJSONSchema(schema, { io: "input" });
|
|
8677
9286
|
const drafts = /* @__PURE__ */ new Map();
|
|
8678
9287
|
collectDrafts(drafts, jsonSchema, [], false);
|
|
8679
9288
|
return [...drafts.values()].map(finalizeFlag);
|
|
@@ -8744,9 +9353,9 @@ function createFlowReporter(title) {
|
|
|
8744
9353
|
}
|
|
8745
9354
|
|
|
8746
9355
|
// src/factory.ts
|
|
8747
|
-
var zFlagValue =
|
|
8748
|
-
var zFlagObject =
|
|
8749
|
-
var zNoParams =
|
|
9356
|
+
var zFlagValue = z13.json();
|
|
9357
|
+
var zFlagObject = z13.record(z13.string(), zFlagValue);
|
|
9358
|
+
var zNoParams = z13.object({});
|
|
8750
9359
|
function op(spec) {
|
|
8751
9360
|
return {
|
|
8752
9361
|
type: "op",
|
|
@@ -8902,7 +9511,7 @@ function parseWithSchema(schema, value, label) {
|
|
|
8902
9511
|
const result = schema.safeParse(value);
|
|
8903
9512
|
if (!result.success) {
|
|
8904
9513
|
throw new CliInputError(`invalid ${label}:
|
|
8905
|
-
${
|
|
9514
|
+
${z13.prettifyError(result.error)}`);
|
|
8906
9515
|
}
|
|
8907
9516
|
return result.data;
|
|
8908
9517
|
}
|
|
@@ -8947,7 +9556,7 @@ function registerPathParams(command, plan) {
|
|
|
8947
9556
|
command.option(param.option, `defaults from config (${param.describe})`);
|
|
8948
9557
|
}
|
|
8949
9558
|
}
|
|
8950
|
-
var zExplicitOption =
|
|
9559
|
+
var zExplicitOption = z13.string().optional();
|
|
8951
9560
|
async function resolvePathValues(plan, args, options, config2) {
|
|
8952
9561
|
const path = {};
|
|
8953
9562
|
plan.positionalParams.forEach((param, index) => {
|
|
@@ -9090,10 +9699,10 @@ function registerLoginCommand(program2, cli) {
|
|
|
9090
9699
|
}
|
|
9091
9700
|
|
|
9092
9701
|
// src/manifest.ts
|
|
9093
|
-
import * as
|
|
9702
|
+
import * as z28 from "zod";
|
|
9094
9703
|
|
|
9095
9704
|
// src/agent-commands.ts
|
|
9096
|
-
import * as
|
|
9705
|
+
import * as z19 from "zod";
|
|
9097
9706
|
|
|
9098
9707
|
// ../sdk/src/generated/@tanstack/react-query.gen.ts
|
|
9099
9708
|
import { infiniteQueryOptions, queryOptions } from "@tanstack/react-query";
|
|
@@ -9119,6 +9728,7 @@ var createQueryKey = (id, options, infinite, tags) => {
|
|
|
9119
9728
|
}
|
|
9120
9729
|
return [params];
|
|
9121
9730
|
};
|
|
9731
|
+
var listOrgAgentsQueryKey = (options) => createQueryKey("listOrgAgents", options);
|
|
9122
9732
|
var listAgentsQueryKey = (options) => createQueryKey("listAgents", options);
|
|
9123
9733
|
var getAgentQueryKey = (options) => createQueryKey("getAgent", options);
|
|
9124
9734
|
var getAgentOptions = (options) => queryOptions({
|
|
@@ -9195,12 +9805,12 @@ function useOmnaraClient() {
|
|
|
9195
9805
|
}
|
|
9196
9806
|
|
|
9197
9807
|
// ../react/src/domains/query-keys.ts
|
|
9198
|
-
import { z as
|
|
9199
|
-
var generatedQueryKeyEntry =
|
|
9200
|
-
_id:
|
|
9201
|
-
path:
|
|
9202
|
-
orgID:
|
|
9203
|
-
projectID:
|
|
9808
|
+
import { z as z14 } from "zod";
|
|
9809
|
+
var generatedQueryKeyEntry = z14.object({
|
|
9810
|
+
_id: z14.string(),
|
|
9811
|
+
path: z14.object({
|
|
9812
|
+
orgID: z14.string().optional(),
|
|
9813
|
+
projectID: z14.string().optional()
|
|
9204
9814
|
}).optional()
|
|
9205
9815
|
});
|
|
9206
9816
|
function generatedQueryKey(query) {
|
|
@@ -9216,6 +9826,21 @@ function projectActorsQueryPredicate(orgID, projectID) {
|
|
|
9216
9826
|
};
|
|
9217
9827
|
}
|
|
9218
9828
|
|
|
9829
|
+
// ../react/src/domains/agent-activity.ts
|
|
9830
|
+
var activeAgentPollIntervalMs = 5e3;
|
|
9831
|
+
function isAgentActive(agent) {
|
|
9832
|
+
const state = agent.activity?.state;
|
|
9833
|
+
return state === "running" || state === "waiting_on_interaction";
|
|
9834
|
+
}
|
|
9835
|
+
function activeAgentsRefetchInterval(getAgents, refetchInterval) {
|
|
9836
|
+
return (query) => {
|
|
9837
|
+
const data = query.state.data;
|
|
9838
|
+
const own = refetchInterval?.(data);
|
|
9839
|
+
if (own) return own;
|
|
9840
|
+
return getAgents(data).some(isAgentActive) ? activeAgentPollIntervalMs : false;
|
|
9841
|
+
};
|
|
9842
|
+
}
|
|
9843
|
+
|
|
9219
9844
|
// ../react/src/domains/agent-chat.ts
|
|
9220
9845
|
import { useQueryClient as useQueryClient3 } from "@tanstack/react-query";
|
|
9221
9846
|
import { useCallback, useEffect, useMemo, useSyncExternalStore } from "react";
|
|
@@ -9224,7 +9849,7 @@ import { useCallback, useEffect, useMemo, useSyncExternalStore } from "react";
|
|
|
9224
9849
|
import { useInfiniteQuery } from "@tanstack/react-query";
|
|
9225
9850
|
|
|
9226
9851
|
// ../react/src/domains/agent-chat-messages.ts
|
|
9227
|
-
import { z as
|
|
9852
|
+
import { z as z15 } from "zod";
|
|
9228
9853
|
function parseStreamData(data) {
|
|
9229
9854
|
if ("event_kind" in data) return { kind: "event", event: data };
|
|
9230
9855
|
if ("tool_call_id" in data && "state" in data) return { kind: "tool_call_update" };
|
|
@@ -9261,7 +9886,7 @@ function mediaPart(block, id) {
|
|
|
9261
9886
|
function isHiddenContentBlock(block) {
|
|
9262
9887
|
return block.metadata?.omnara_hidden === "true";
|
|
9263
9888
|
}
|
|
9264
|
-
var structuredToolError =
|
|
9889
|
+
var structuredToolError = z15.object({ error_code: z15.string() });
|
|
9265
9890
|
function structuredToolErrorCode(blocks) {
|
|
9266
9891
|
for (const block of blocks) {
|
|
9267
9892
|
if (block.type !== "structured_data") continue;
|
|
@@ -9682,7 +10307,7 @@ function historyHasEvent(queryClient, scope, matches) {
|
|
|
9682
10307
|
// ../react/src/domains/agent-chat-transport.ts
|
|
9683
10308
|
var sourceLabels = { web: "web app", cli: "CLI" };
|
|
9684
10309
|
function sourceHint(source) {
|
|
9685
|
-
return `This message came from the Omnara ${sourceLabels[source]}. Reply with normal assistant text unless explicitly asked to message an integration.`;
|
|
10310
|
+
return `This message came from the Omnara ${sourceLabels[source]}. Reply with normal assistant text unless explicitly asked to send a message through an integration.`;
|
|
9686
10311
|
}
|
|
9687
10312
|
var sdkAgentChatTransport = {
|
|
9688
10313
|
openAgentEventStream,
|
|
@@ -9932,12 +10557,17 @@ async function invalidateSubagentList(queryClient, client2, scope, event, hasEve
|
|
|
9932
10557
|
if (!spawnsSubagent(event, hasEvent) && !await sentBySubagent(queryClient, client2, scope, event)) {
|
|
9933
10558
|
return;
|
|
9934
10559
|
}
|
|
9935
|
-
await
|
|
9936
|
-
|
|
9937
|
-
|
|
9938
|
-
|
|
10560
|
+
await Promise.all([
|
|
10561
|
+
queryClient.invalidateQueries({
|
|
10562
|
+
queryKey: listAgentsQueryKey({
|
|
10563
|
+
path: { orgID: scope.orgID, projectID: scope.projectID },
|
|
10564
|
+
client: client2
|
|
10565
|
+
})
|
|
10566
|
+
}),
|
|
10567
|
+
queryClient.invalidateQueries({
|
|
10568
|
+
queryKey: listOrgAgentsQueryKey({ path: { orgID: scope.orgID }, client: client2 })
|
|
9939
10569
|
})
|
|
9940
|
-
|
|
10570
|
+
]);
|
|
9941
10571
|
}
|
|
9942
10572
|
|
|
9943
10573
|
// ../react/src/domains/usage.ts
|
|
@@ -10420,87 +11050,88 @@ import {
|
|
|
10420
11050
|
useQueryClient as useQueryClient6,
|
|
10421
11051
|
useSuspenseQuery as useSuspenseQuery3
|
|
10422
11052
|
} from "@tanstack/react-query";
|
|
11053
|
+
var agentListRefetchInterval = activeAgentsRefetchInterval(
|
|
11054
|
+
(data) => data?.pages.flatMap((page) => page.data) ?? []
|
|
11055
|
+
);
|
|
10423
11056
|
|
|
10424
11057
|
// ../react/src/domains/cron-triggers.ts
|
|
10425
11058
|
import { useInfiniteQuery as useInfiniteQuery4, useMutation as useMutation6, useQueryClient as useQueryClient7 } from "@tanstack/react-query";
|
|
10426
11059
|
|
|
10427
|
-
// ../react/src/domains/integration-
|
|
10428
|
-
import {
|
|
11060
|
+
// ../react/src/domains/integration-subscriptions.ts
|
|
11061
|
+
import {
|
|
11062
|
+
useInfiniteQuery as useInfiniteQuery5,
|
|
11063
|
+
useMutation as useMutation7,
|
|
11064
|
+
useQueryClient as useQueryClient8
|
|
11065
|
+
} from "@tanstack/react-query";
|
|
11066
|
+
|
|
11067
|
+
// ../react/src/domains/integrations.ts
|
|
11068
|
+
import { useInfiniteQuery as useInfiniteQuery6, useMutation as useMutation8, useQuery as useQuery7, useQueryClient as useQueryClient9 } from "@tanstack/react-query";
|
|
10429
11069
|
|
|
10430
11070
|
// ../react/src/domains/invitations.ts
|
|
10431
|
-
import { useMutation as
|
|
11071
|
+
import { useMutation as useMutation9, useQuery as useQuery8, useQueryClient as useQueryClient10, useSuspenseQuery as useSuspenseQuery4 } from "@tanstack/react-query";
|
|
10432
11072
|
|
|
10433
11073
|
// ../react/src/domains/machine-pools.ts
|
|
10434
|
-
import { useInfiniteQuery as
|
|
11074
|
+
import { useInfiniteQuery as useInfiniteQuery7, useMutation as useMutation10, useQuery as useQuery9, useQueryClient as useQueryClient11 } from "@tanstack/react-query";
|
|
10435
11075
|
|
|
10436
11076
|
// ../react/src/domains/machines.ts
|
|
10437
|
-
import { useInfiniteQuery as
|
|
11077
|
+
import { useInfiniteQuery as useInfiniteQuery8, useMutation as useMutation11, useQuery as useQuery10, useQueryClient as useQueryClient12 } from "@tanstack/react-query";
|
|
10438
11078
|
|
|
10439
11079
|
// ../react/src/domains/mcp-registry.ts
|
|
10440
|
-
import { useInfiniteQuery as
|
|
11080
|
+
import { useInfiniteQuery as useInfiniteQuery9, useQuery as useQuery11, useQueryClient as useQueryClient13 } from "@tanstack/react-query";
|
|
10441
11081
|
var serverInfoStaleTime = 5 * 60 * 1e3;
|
|
10442
11082
|
|
|
10443
11083
|
// ../react/src/domains/mcp-server-tools.ts
|
|
10444
|
-
import { useQuery as
|
|
11084
|
+
import { useQuery as useQuery12 } from "@tanstack/react-query";
|
|
10445
11085
|
var mcpServerToolsStaleTime = 60 * 1e3;
|
|
10446
11086
|
|
|
10447
11087
|
// ../react/src/domains/me.ts
|
|
10448
|
-
import { useMutation as
|
|
11088
|
+
import { useMutation as useMutation12, useQueryClient as useQueryClient14, useSuspenseQuery as useSuspenseQuery5 } from "@tanstack/react-query";
|
|
10449
11089
|
|
|
10450
11090
|
// ../react/src/domains/memory.ts
|
|
10451
11091
|
import {
|
|
10452
11092
|
skipToken,
|
|
10453
|
-
useInfiniteQuery as
|
|
10454
|
-
useMutation as
|
|
10455
|
-
useQuery as
|
|
10456
|
-
useQueryClient as
|
|
11093
|
+
useInfiniteQuery as useInfiniteQuery10,
|
|
11094
|
+
useMutation as useMutation13,
|
|
11095
|
+
useQuery as useQuery13,
|
|
11096
|
+
useQueryClient as useQueryClient15
|
|
10457
11097
|
} from "@tanstack/react-query";
|
|
10458
|
-
import * as
|
|
10459
|
-
var memoryFileDigest =
|
|
11098
|
+
import * as z16 from "zod";
|
|
11099
|
+
var memoryFileDigest = z16.object({ digest: z16.string() });
|
|
10460
11100
|
|
|
10461
11101
|
// ../react/src/domains/model-providers.ts
|
|
10462
11102
|
import {
|
|
10463
|
-
useInfiniteQuery as
|
|
10464
|
-
useMutation as
|
|
11103
|
+
useInfiniteQuery as useInfiniteQuery11,
|
|
11104
|
+
useMutation as useMutation14,
|
|
10465
11105
|
useQueries,
|
|
10466
|
-
useQuery as
|
|
10467
|
-
useQueryClient as
|
|
11106
|
+
useQuery as useQuery14,
|
|
11107
|
+
useQueryClient as useQueryClient16
|
|
10468
11108
|
} from "@tanstack/react-query";
|
|
10469
11109
|
import { useEffect as useEffect2 } from "react";
|
|
10470
|
-
var modelCatalogPricingStaleTime = 5 * 60 * 1e3;
|
|
10471
11110
|
|
|
10472
11111
|
// ../react/src/domains/org-api-keys.ts
|
|
10473
|
-
import { useInfiniteQuery as
|
|
11112
|
+
import { useInfiniteQuery as useInfiniteQuery12, useMutation as useMutation15, useQuery as useQuery15, useQueryClient as useQueryClient17 } from "@tanstack/react-query";
|
|
10474
11113
|
|
|
10475
11114
|
// ../react/src/domains/org-members.ts
|
|
10476
|
-
import { useMutation as
|
|
11115
|
+
import { useMutation as useMutation16, useQuery as useQuery16, useQueryClient as useQueryClient18 } from "@tanstack/react-query";
|
|
10477
11116
|
|
|
10478
11117
|
// ../react/src/domains/orgs.ts
|
|
10479
|
-
import { useInfiniteQuery as
|
|
11118
|
+
import { useInfiniteQuery as useInfiniteQuery13, useMutation as useMutation17, useQuery as useQuery17, useQueryClient as useQueryClient19 } from "@tanstack/react-query";
|
|
10480
11119
|
|
|
10481
11120
|
// ../react/src/domains/personal-access-tokens.ts
|
|
10482
|
-
import { useInfiniteQuery as
|
|
11121
|
+
import { useInfiniteQuery as useInfiniteQuery14, useMutation as useMutation18, useQueryClient as useQueryClient20 } from "@tanstack/react-query";
|
|
10483
11122
|
|
|
10484
11123
|
// ../react/src/domains/project-grants.ts
|
|
10485
|
-
import { useInfiniteQuery as
|
|
11124
|
+
import { useInfiniteQuery as useInfiniteQuery15, useMutation as useMutation19, useQueryClient as useQueryClient21 } from "@tanstack/react-query";
|
|
10486
11125
|
|
|
10487
11126
|
// ../react/src/domains/projects.ts
|
|
10488
11127
|
import {
|
|
10489
11128
|
skipToken as skipToken2,
|
|
10490
|
-
useInfiniteQuery as
|
|
10491
|
-
useQueryClient as
|
|
11129
|
+
useInfiniteQuery as useInfiniteQuery16,
|
|
11130
|
+
useQueryClient as useQueryClient22,
|
|
10492
11131
|
useSuspenseInfiniteQuery
|
|
10493
11132
|
} from "@tanstack/react-query";
|
|
10494
11133
|
|
|
10495
11134
|
// ../react/src/domains/secrets.ts
|
|
10496
|
-
import {
|
|
10497
|
-
useInfiniteQuery as useInfiniteQuery16,
|
|
10498
|
-
useMutation as useMutation19,
|
|
10499
|
-
useQuery as useQuery17,
|
|
10500
|
-
useQueryClient as useQueryClient22
|
|
10501
|
-
} from "@tanstack/react-query";
|
|
10502
|
-
|
|
10503
|
-
// ../react/src/domains/skills.ts
|
|
10504
11135
|
import {
|
|
10505
11136
|
useInfiniteQuery as useInfiniteQuery17,
|
|
10506
11137
|
useMutation as useMutation20,
|
|
@@ -10508,8 +11139,16 @@ import {
|
|
|
10508
11139
|
useQueryClient as useQueryClient23
|
|
10509
11140
|
} from "@tanstack/react-query";
|
|
10510
11141
|
|
|
11142
|
+
// ../react/src/domains/skills.ts
|
|
11143
|
+
import {
|
|
11144
|
+
useInfiniteQuery as useInfiniteQuery18,
|
|
11145
|
+
useMutation as useMutation21,
|
|
11146
|
+
useQuery as useQuery19,
|
|
11147
|
+
useQueryClient as useQueryClient24
|
|
11148
|
+
} from "@tanstack/react-query";
|
|
11149
|
+
|
|
10511
11150
|
// ../react/src/domains/tool-catalog.ts
|
|
10512
|
-
import { useQuery as
|
|
11151
|
+
import { useQuery as useQuery20 } from "@tanstack/react-query";
|
|
10513
11152
|
|
|
10514
11153
|
// src/chat.tsx
|
|
10515
11154
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
@@ -10518,10 +11157,10 @@ import { render } from "ink";
|
|
|
10518
11157
|
// src/chat-ui.tsx
|
|
10519
11158
|
import { Box as Box2, Static, Text as Text2, useApp } from "ink";
|
|
10520
11159
|
import { useEffect as useEffect3, useMemo as useMemo2, useReducer, useState as useState2 } from "react";
|
|
10521
|
-
import * as
|
|
11160
|
+
import * as z18 from "zod";
|
|
10522
11161
|
|
|
10523
11162
|
// src/agent-rendering.ts
|
|
10524
|
-
import * as
|
|
11163
|
+
import * as z17 from "zod";
|
|
10525
11164
|
var formatAgentEventList = (response) => {
|
|
10526
11165
|
const page = {
|
|
10527
11166
|
data: response.data.map((event) => ({
|
|
@@ -10538,10 +11177,10 @@ var formatAgentEventList = (response) => {
|
|
|
10538
11177
|
return { value: next_before_sequence == null ? page : { ...page, next_before_sequence } };
|
|
10539
11178
|
};
|
|
10540
11179
|
var summaryWidth = 100;
|
|
10541
|
-
var zJsonValue =
|
|
10542
|
-
var zRunCommandInput =
|
|
11180
|
+
var zJsonValue = z17.json();
|
|
11181
|
+
var zRunCommandInput = z17.object({ command: z17.string() });
|
|
10543
11182
|
function summaryValue(value) {
|
|
10544
|
-
const text =
|
|
11183
|
+
const text = z17.string().safeParse(value);
|
|
10545
11184
|
return text.success ? text.data : JSON.stringify(value);
|
|
10546
11185
|
}
|
|
10547
11186
|
function toolCallSummary(name, input) {
|
|
@@ -10735,10 +11374,10 @@ import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
|
10735
11374
|
var spinnerFrames = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
|
|
10736
11375
|
var streamingTailLines = 8;
|
|
10737
11376
|
var streamingTailChars = 1500;
|
|
10738
|
-
var zToolInput2 =
|
|
10739
|
-
var zToolOutput =
|
|
11377
|
+
var zToolInput2 = z18.record(z18.string(), z18.json());
|
|
11378
|
+
var zToolOutput = z18.object({
|
|
10740
11379
|
outcome: zToolCallOutcome,
|
|
10741
|
-
contentBlocks:
|
|
11380
|
+
contentBlocks: z18.array(zToolResultContentBlock)
|
|
10742
11381
|
});
|
|
10743
11382
|
function formatDuration(ms) {
|
|
10744
11383
|
const seconds = Math.max(1, Math.round(ms / 1e3));
|
|
@@ -11104,7 +11743,7 @@ var agentEventsStreamOp = customOp({
|
|
|
11104
11743
|
},
|
|
11105
11744
|
run: async ({ client: client2, path, args, options }) => {
|
|
11106
11745
|
const agentID = parseWithSchema(zAgentId, args[0], "agent id");
|
|
11107
|
-
const afterSequence = parseWithSchema(
|
|
11746
|
+
const afterSequence = parseWithSchema(z19.int().gte(0).optional(), options.afterSequence, "--after-sequence") ?? 0;
|
|
11108
11747
|
const abort = new AbortController();
|
|
11109
11748
|
process.once("SIGINT", () => {
|
|
11110
11749
|
abort.abort();
|
|
@@ -11121,12 +11760,12 @@ var agentEventsStreamOp = customOp({
|
|
|
11121
11760
|
|
|
11122
11761
|
// src/config-attachment.ts
|
|
11123
11762
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
11124
|
-
import * as
|
|
11125
|
-
var zConfigSourceAttachment =
|
|
11126
|
-
file:
|
|
11127
|
-
source:
|
|
11763
|
+
import * as z20 from "zod";
|
|
11764
|
+
var zConfigSourceAttachment = z20.object({
|
|
11765
|
+
file: z20.string().min(1).optional().describe("path to an agent config file (.yaml, .yml, or .json)"),
|
|
11766
|
+
source: z20.string().min(1).optional().describe("inline agent config source (YAML or JSON)")
|
|
11128
11767
|
});
|
|
11129
|
-
var zConfigAttachment =
|
|
11768
|
+
var zConfigAttachment = z20.object({
|
|
11130
11769
|
config: zAgentConfigId.optional().describe("existing agent config ID"),
|
|
11131
11770
|
...zConfigSourceAttachment.shape
|
|
11132
11771
|
});
|
|
@@ -11160,59 +11799,341 @@ function renderConfigSource(attachment) {
|
|
|
11160
11799
|
} catch {
|
|
11161
11800
|
throw new CliInputError(`could not read config file: ${attachment.file}`);
|
|
11162
11801
|
}
|
|
11163
|
-
return { source, source_format: format };
|
|
11164
|
-
}
|
|
11165
|
-
if (attachment.source !== void 0) {
|
|
11166
|
-
return { source: attachment.source, source_format: inlineFormat(attachment.source) };
|
|
11802
|
+
return { source, source_format: format };
|
|
11803
|
+
}
|
|
11804
|
+
if (attachment.source !== void 0) {
|
|
11805
|
+
return { source: attachment.source, source_format: inlineFormat(attachment.source) };
|
|
11806
|
+
}
|
|
11807
|
+
throw new CliInputError(SOURCE_HINT);
|
|
11808
|
+
}
|
|
11809
|
+
async function resolveConfigId(client2, path, attachment) {
|
|
11810
|
+
requireExactlyOne([attachment.config, attachment.file, attachment.source], ATTACHMENT_HINT);
|
|
11811
|
+
if (attachment.config !== void 0) return attachment.config;
|
|
11812
|
+
const { data } = await sdk_gen_exports.createAgentConfig({
|
|
11813
|
+
client: client2,
|
|
11814
|
+
path,
|
|
11815
|
+
body: renderConfigSource(attachment)
|
|
11816
|
+
});
|
|
11817
|
+
return data.id;
|
|
11818
|
+
}
|
|
11819
|
+
async function currentProfileConfigId(client2, path) {
|
|
11820
|
+
const { data } = await sdk_gen_exports.getAgentProfile({ client: client2, path });
|
|
11821
|
+
return data.current_config_id;
|
|
11822
|
+
}
|
|
11823
|
+
|
|
11824
|
+
// src/format.ts
|
|
11825
|
+
function pickFields(source, fields) {
|
|
11826
|
+
const picked = {};
|
|
11827
|
+
for (const field of fields) {
|
|
11828
|
+
const value = source[field];
|
|
11829
|
+
if (value !== void 0) picked[field] = value;
|
|
11830
|
+
}
|
|
11831
|
+
return picked;
|
|
11832
|
+
}
|
|
11833
|
+
function formatTable(columns) {
|
|
11834
|
+
return (response) => ({
|
|
11835
|
+
value: {
|
|
11836
|
+
data: response.data.map((item) => pickFields(item, columns)),
|
|
11837
|
+
next_cursor: response.next_cursor
|
|
11838
|
+
},
|
|
11839
|
+
columns
|
|
11840
|
+
});
|
|
11841
|
+
}
|
|
11842
|
+
function formatRecord() {
|
|
11843
|
+
return (data) => ({ value: data });
|
|
11844
|
+
}
|
|
11845
|
+
function formatVoid(message = "ok") {
|
|
11846
|
+
return () => ({ value: message });
|
|
11847
|
+
}
|
|
11848
|
+
|
|
11849
|
+
// src/integration-setup.ts
|
|
11850
|
+
import * as z23 from "zod";
|
|
11851
|
+
|
|
11852
|
+
// src/slack-setup.ts
|
|
11853
|
+
import * as z22 from "zod";
|
|
11854
|
+
|
|
11855
|
+
// src/mcp-oauth.ts
|
|
11856
|
+
import * as z21 from "zod";
|
|
11857
|
+
async function authorizeMcpOAuthSecret(options) {
|
|
11858
|
+
const { data: start } = await sdk_gen_exports.startSecretMcpoAuth({
|
|
11859
|
+
client: options.client,
|
|
11860
|
+
path: { orgID: options.orgId },
|
|
11861
|
+
body: options.request
|
|
11862
|
+
});
|
|
11863
|
+
options.onAuthorization(start.authorization_url);
|
|
11864
|
+
return pollUntilDeadline({
|
|
11865
|
+
expiresAt: start.expires_at,
|
|
11866
|
+
expiredMessage: "MCP OAuth authorization expired before the secret was created",
|
|
11867
|
+
async fetchOnce() {
|
|
11868
|
+
const { data } = await sdk_gen_exports.listSecrets({
|
|
11869
|
+
client: options.client,
|
|
11870
|
+
path: { orgID: options.orgId },
|
|
11871
|
+
query: { mcp_oauth_flow_id: start.flow_id, limit: 1 }
|
|
11872
|
+
});
|
|
11873
|
+
return data.data[0];
|
|
11874
|
+
}
|
|
11875
|
+
});
|
|
11876
|
+
}
|
|
11877
|
+
var zBrowserFlag = z21.boolean().default(true).describe("open the authorization URL in a browser");
|
|
11878
|
+
function openAuthorizationUrl(report, title, url4, browser) {
|
|
11879
|
+
report.url(title, url4);
|
|
11880
|
+
if (browser) {
|
|
11881
|
+
openInBrowser(url4, (message) => {
|
|
11882
|
+
report.warn(message);
|
|
11883
|
+
});
|
|
11884
|
+
}
|
|
11885
|
+
}
|
|
11886
|
+
var zMcpOAuthBody = zMcpoAuthStartRequest.extend({ browser: zBrowserFlag });
|
|
11887
|
+
async function runMcpOAuth(context) {
|
|
11888
|
+
const { client: client2, path, body, report } = context;
|
|
11889
|
+
const { browser, ...request } = body;
|
|
11890
|
+
let secret;
|
|
11891
|
+
try {
|
|
11892
|
+
secret = await authorizeMcpOAuthSecret({
|
|
11893
|
+
client: client2,
|
|
11894
|
+
orgId: path.orgID,
|
|
11895
|
+
request,
|
|
11896
|
+
onAuthorization(url4) {
|
|
11897
|
+
openAuthorizationUrl(report, "Authorize this MCP server in your browser", url4, browser);
|
|
11898
|
+
report.start("Waiting for the secret to be created");
|
|
11899
|
+
}
|
|
11900
|
+
});
|
|
11901
|
+
} catch (error) {
|
|
11902
|
+
report.fail("Authorization failed");
|
|
11903
|
+
throw error;
|
|
11904
|
+
}
|
|
11905
|
+
report.stop("Secret created");
|
|
11906
|
+
report.info(`Secret ID: ${secret.id}`);
|
|
11907
|
+
report.done();
|
|
11908
|
+
}
|
|
11909
|
+
|
|
11910
|
+
// src/slack-setup.ts
|
|
11911
|
+
var zSlackBody = z22.object({
|
|
11912
|
+
app_name: z22.string().optional().describe("name for a new Slack app"),
|
|
11913
|
+
app_configuration_token: z22.string().optional().describe("Slack app configuration token for a new app"),
|
|
11914
|
+
icon_filename: z22.string().optional().describe("filename for the new Slack app icon"),
|
|
11915
|
+
icon_data_base64: z22.string().optional().describe("base64-encoded Slack app icon"),
|
|
11916
|
+
client_id: z22.string().optional().describe("existing Slack app client ID"),
|
|
11917
|
+
client_secret: z22.string().optional().describe("existing Slack app client secret"),
|
|
11918
|
+
signing_secret: z22.string().optional().describe("existing Slack app signing secret"),
|
|
11919
|
+
return_to: z22.string().optional().describe("console-relative path opened after authorization"),
|
|
11920
|
+
browser: zBrowserFlag
|
|
11921
|
+
});
|
|
11922
|
+
function parseRequest(body) {
|
|
11923
|
+
const createAppFields = [
|
|
11924
|
+
body.app_name,
|
|
11925
|
+
body.app_configuration_token,
|
|
11926
|
+
body.icon_filename,
|
|
11927
|
+
body.icon_data_base64
|
|
11928
|
+
];
|
|
11929
|
+
const existingAppFields = [body.client_id, body.client_secret, body.signing_secret];
|
|
11930
|
+
const createsApp = createAppFields.some((value) => value !== void 0);
|
|
11931
|
+
const usesExistingApp = existingAppFields.some((value) => value !== void 0);
|
|
11932
|
+
if (createsApp && usesExistingApp) {
|
|
11933
|
+
throw new CliInputError(
|
|
11934
|
+
"choose either --app-name with --app-configuration-token, or existing app credentials"
|
|
11935
|
+
);
|
|
11936
|
+
}
|
|
11937
|
+
if (usesExistingApp) {
|
|
11938
|
+
const draft2 = {
|
|
11939
|
+
client_id: body.client_id,
|
|
11940
|
+
client_secret: body.client_secret,
|
|
11941
|
+
signing_secret: body.signing_secret
|
|
11942
|
+
};
|
|
11943
|
+
if (body.return_to !== void 0) draft2.return_to = body.return_to;
|
|
11944
|
+
const result2 = zCreateIntegrationOAuthSetupRequest.safeParse(draft2);
|
|
11945
|
+
if (!result2.success) {
|
|
11946
|
+
throw new CliInputError(
|
|
11947
|
+
`invalid existing Slack app parameters:
|
|
11948
|
+
${z22.prettifyError(result2.error)}`
|
|
11949
|
+
);
|
|
11950
|
+
}
|
|
11951
|
+
return { kind: "existing-app", body: result2.data };
|
|
11952
|
+
}
|
|
11953
|
+
if (body.icon_filename !== void 0 && body.icon_data_base64 === void 0) {
|
|
11954
|
+
throw new CliInputError("--icon-filename requires --icon-data-base64");
|
|
11955
|
+
}
|
|
11956
|
+
const draft = {
|
|
11957
|
+
app_name: body.app_name,
|
|
11958
|
+
app_configuration_token: body.app_configuration_token
|
|
11959
|
+
};
|
|
11960
|
+
if (body.icon_data_base64 !== void 0) {
|
|
11961
|
+
draft.icon = { data_base64: body.icon_data_base64 };
|
|
11962
|
+
if (body.icon_filename !== void 0) draft.icon.filename = body.icon_filename;
|
|
11963
|
+
}
|
|
11964
|
+
if (body.return_to !== void 0) draft.return_to = body.return_to;
|
|
11965
|
+
const result = zCreateSlackSetupRequest.safeParse(draft);
|
|
11966
|
+
if (!result.success) {
|
|
11967
|
+
throw new CliInputError(
|
|
11968
|
+
`invalid Slack app parameters:
|
|
11969
|
+
${z22.prettifyError(result.error)}
|
|
11970
|
+
Pass --app-name and --app-configuration-token, or existing app credentials.`
|
|
11971
|
+
);
|
|
11972
|
+
}
|
|
11973
|
+
return { kind: "create-app", body: result.data };
|
|
11974
|
+
}
|
|
11975
|
+
async function runSlackIntegration(context) {
|
|
11976
|
+
const { client: client2, path, body, report } = context;
|
|
11977
|
+
const request = parseRequest(body);
|
|
11978
|
+
const setupPath = {
|
|
11979
|
+
orgID: path.orgID,
|
|
11980
|
+
projectID: path.projectID,
|
|
11981
|
+
integrationID: path.integrationID
|
|
11982
|
+
};
|
|
11983
|
+
let start;
|
|
11984
|
+
let slackAppId;
|
|
11985
|
+
if (request.kind === "create-app") {
|
|
11986
|
+
const { data } = await sdk_gen_exports.createIntegrationSlackSetup({
|
|
11987
|
+
client: client2,
|
|
11988
|
+
path: setupPath,
|
|
11989
|
+
body: request.body
|
|
11990
|
+
});
|
|
11991
|
+
start = data;
|
|
11992
|
+
slackAppId = data.slack_app_id;
|
|
11993
|
+
} else {
|
|
11994
|
+
const { data } = await sdk_gen_exports.createIntegrationOAuthSetup({
|
|
11995
|
+
client: client2,
|
|
11996
|
+
path: setupPath,
|
|
11997
|
+
body: request.body
|
|
11998
|
+
});
|
|
11999
|
+
start = data;
|
|
12000
|
+
}
|
|
12001
|
+
openAuthorizationUrl(
|
|
12002
|
+
report,
|
|
12003
|
+
"Authorize the Slack app in your browser",
|
|
12004
|
+
start.oauth_url,
|
|
12005
|
+
body.browser
|
|
12006
|
+
);
|
|
12007
|
+
report.start("Waiting for the Slack integration to connect");
|
|
12008
|
+
let integration;
|
|
12009
|
+
try {
|
|
12010
|
+
integration = await pollUntilDeadline({
|
|
12011
|
+
expiresAt: start.expires_at,
|
|
12012
|
+
expiredMessage: "Slack authorization expired before the integration connected",
|
|
12013
|
+
async fetchOnce() {
|
|
12014
|
+
const { data } = await sdk_gen_exports.getIntegration({ client: client2, path: setupPath });
|
|
12015
|
+
return data.state === "active" && data.last_oauth_flow_id === start.flow_id ? data : void 0;
|
|
12016
|
+
}
|
|
12017
|
+
});
|
|
12018
|
+
} catch (error) {
|
|
12019
|
+
report.fail("Slack authorization failed");
|
|
12020
|
+
if (slackAppId !== void 0) {
|
|
12021
|
+
report.warn(`Slack app ${slackAppId} was created, but Omnara setup was not completed`);
|
|
12022
|
+
}
|
|
12023
|
+
throw error;
|
|
11167
12024
|
}
|
|
11168
|
-
|
|
12025
|
+
report.stop("Slack integration connected");
|
|
12026
|
+
report.info(`Integration ID: ${integration.id} (${integration.name})`);
|
|
12027
|
+
report.info(
|
|
12028
|
+
"Reconnect preserves existing integration settings. Use integrations get/update to inspect or change the launcher."
|
|
12029
|
+
);
|
|
12030
|
+
report.done();
|
|
11169
12031
|
}
|
|
11170
|
-
|
|
11171
|
-
|
|
11172
|
-
|
|
11173
|
-
|
|
12032
|
+
|
|
12033
|
+
// src/integration-setup.ts
|
|
12034
|
+
var zIntegrationProfilesBody = z23.object({
|
|
12035
|
+
profile_ids: z23.array(zAgentProfileId).max(16).describe("repeat for each offered profile; preserves other integration settings")
|
|
12036
|
+
});
|
|
12037
|
+
async function runIntegrationProfilesUpdate(context) {
|
|
12038
|
+
const { client: client2, path, body, report } = context;
|
|
12039
|
+
const { data: integration } = await sdk_gen_exports.getIntegration({ client: client2, path });
|
|
12040
|
+
await sdk_gen_exports.updateIntegration({
|
|
11174
12041
|
client: client2,
|
|
11175
12042
|
path,
|
|
11176
|
-
body:
|
|
12043
|
+
body: profileIntegrationProfileUpdate(integration, body.profile_ids)
|
|
11177
12044
|
});
|
|
11178
|
-
|
|
11179
|
-
|
|
11180
|
-
async function currentProfileConfigId(client2, path) {
|
|
11181
|
-
const { data } = await sdk_gen_exports.getAgentProfile({ client: client2, path });
|
|
11182
|
-
return data.current_config_id;
|
|
12045
|
+
report.info("Profiles saved. One launches immediately; several show a menu to select one.");
|
|
12046
|
+
report.done();
|
|
11183
12047
|
}
|
|
11184
|
-
|
|
11185
|
-
|
|
11186
|
-
|
|
11187
|
-
|
|
11188
|
-
|
|
11189
|
-
|
|
11190
|
-
|
|
12048
|
+
var integrationCommandGroups = [
|
|
12049
|
+
{
|
|
12050
|
+
name: "integrations",
|
|
12051
|
+
summary: "Manage project integrations, credentials and launchers",
|
|
12052
|
+
operations: [
|
|
12053
|
+
op({
|
|
12054
|
+
verb: "definitions",
|
|
12055
|
+
summary: "List available integration implementations and capabilities",
|
|
12056
|
+
fn: sdk_gen_exports.listIntegrationDefinitions,
|
|
12057
|
+
path: zListIntegrationDefinitionsPath,
|
|
12058
|
+
format: formatRecord()
|
|
12059
|
+
}),
|
|
12060
|
+
op({
|
|
12061
|
+
verb: "list",
|
|
12062
|
+
summary: "List project integrations",
|
|
12063
|
+
fn: sdk_gen_exports.listIntegrations,
|
|
12064
|
+
path: zListIntegrationsPath,
|
|
12065
|
+
query: zListIntegrationsQuery,
|
|
12066
|
+
format: formatTable(["id", "name", "integration_kind", "state"])
|
|
12067
|
+
}),
|
|
12068
|
+
op({
|
|
12069
|
+
verb: "get",
|
|
12070
|
+
summary: "Read integration setup and exported capabilities",
|
|
12071
|
+
fn: sdk_gen_exports.getIntegration,
|
|
12072
|
+
path: zGetIntegrationPath,
|
|
12073
|
+
format: formatRecord()
|
|
12074
|
+
}),
|
|
12075
|
+
op({
|
|
12076
|
+
verb: "create",
|
|
12077
|
+
summary: "Create a disconnected integration and optional launcher",
|
|
12078
|
+
fn: sdk_gen_exports.createIntegration,
|
|
12079
|
+
path: zCreateIntegrationPath,
|
|
12080
|
+
body: zCreateIntegrationBody,
|
|
12081
|
+
format: formatRecord()
|
|
12082
|
+
}),
|
|
12083
|
+
op({
|
|
12084
|
+
verb: "update",
|
|
12085
|
+
summary: "Replace integration settings; name and kind are immutable",
|
|
12086
|
+
fn: sdk_gen_exports.updateIntegration,
|
|
12087
|
+
path: zUpdateIntegrationPath,
|
|
12088
|
+
body: zUpdateIntegrationBody,
|
|
12089
|
+
format: formatRecord()
|
|
12090
|
+
}),
|
|
12091
|
+
op({
|
|
12092
|
+
verb: "configure",
|
|
12093
|
+
summary: "Verify GitHub or Discord credentials for an integration; use integrations slack for Slack",
|
|
12094
|
+
fn: sdk_gen_exports.configureIntegration,
|
|
12095
|
+
path: zConfigureIntegrationPath,
|
|
12096
|
+
body: zConfigureIntegrationBody,
|
|
12097
|
+
format: formatRecord()
|
|
12098
|
+
}),
|
|
12099
|
+
flowOp({
|
|
12100
|
+
verb: "slack",
|
|
12101
|
+
summary: "Connect this integration to Slack through browser authorization",
|
|
12102
|
+
path: zGetIntegrationPath,
|
|
12103
|
+
body: zSlackBody,
|
|
12104
|
+
run: runSlackIntegration
|
|
12105
|
+
}),
|
|
12106
|
+
flowOp({
|
|
12107
|
+
verb: "profiles",
|
|
12108
|
+
summary: "Edit offered Slack or Discord profiles",
|
|
12109
|
+
path: zGetIntegrationPath,
|
|
12110
|
+
body: zIntegrationProfilesBody,
|
|
12111
|
+
run: runIntegrationProfilesUpdate
|
|
12112
|
+
}),
|
|
12113
|
+
op({
|
|
12114
|
+
verb: "disconnect",
|
|
12115
|
+
summary: "Stop provider access while retaining integration setup and agents",
|
|
12116
|
+
fn: sdk_gen_exports.disconnectIntegration,
|
|
12117
|
+
path: zDisconnectIntegrationPath,
|
|
12118
|
+
format: formatRecord()
|
|
12119
|
+
}),
|
|
12120
|
+
op({
|
|
12121
|
+
verb: "delete",
|
|
12122
|
+
summary: "Delete integration setup and revoke its capabilities; retain agents",
|
|
12123
|
+
fn: sdk_gen_exports.deleteIntegration,
|
|
12124
|
+
path: zDeleteIntegrationPath,
|
|
12125
|
+
format: formatVoid("deleted")
|
|
12126
|
+
})
|
|
12127
|
+
]
|
|
11191
12128
|
}
|
|
11192
|
-
|
|
11193
|
-
}
|
|
11194
|
-
function formatTable(columns) {
|
|
11195
|
-
return (response) => ({
|
|
11196
|
-
value: {
|
|
11197
|
-
data: response.data.map((item) => pickFields(item, columns)),
|
|
11198
|
-
next_cursor: response.next_cursor
|
|
11199
|
-
},
|
|
11200
|
-
columns
|
|
11201
|
-
});
|
|
11202
|
-
}
|
|
11203
|
-
function formatRecord() {
|
|
11204
|
-
return (data) => ({ value: data });
|
|
11205
|
-
}
|
|
11206
|
-
function formatVoid(message = "ok") {
|
|
11207
|
-
return () => ({ value: message });
|
|
11208
|
-
}
|
|
12129
|
+
];
|
|
11209
12130
|
|
|
11210
12131
|
// src/machine-setup.ts
|
|
11211
12132
|
import { spawn as spawn2, spawnSync } from "node:child_process";
|
|
11212
12133
|
import { accessSync, constants, existsSync as existsSync2, readdirSync, readFileSync as readFileSync3 } from "node:fs";
|
|
11213
12134
|
import { homedir as homedir2, release } from "node:os";
|
|
11214
12135
|
import { basename, dirname as dirname2, isAbsolute, join as join2, resolve } from "node:path";
|
|
11215
|
-
import * as
|
|
12136
|
+
import * as z24 from "zod";
|
|
11216
12137
|
var zMachineSetupBody = zConnectByoMachineRequest;
|
|
11217
12138
|
async function connectMachine(context) {
|
|
11218
12139
|
const { client: client2, path, body, report } = context;
|
|
@@ -11249,9 +12170,9 @@ var daemonConfigFileName = "daemon.json";
|
|
|
11249
12170
|
var installLockFileName = "install.lock";
|
|
11250
12171
|
var daemonLockFileName = "daemon.lock";
|
|
11251
12172
|
var daemonLockPollMs = 250;
|
|
11252
|
-
var zDaemonConfigFile =
|
|
11253
|
-
machine_id:
|
|
11254
|
-
api_url:
|
|
12173
|
+
var zDaemonConfigFile = z24.looseObject({
|
|
12174
|
+
machine_id: z24.string().optional(),
|
|
12175
|
+
api_url: z24.string().optional()
|
|
11255
12176
|
});
|
|
11256
12177
|
function daemonHome() {
|
|
11257
12178
|
const override = process.env.OMNARA_HOME;
|
|
@@ -11533,67 +12454,10 @@ function runInstaller(report, apiUrl, token, machineId, home) {
|
|
|
11533
12454
|
|
|
11534
12455
|
// src/mcp-add.ts
|
|
11535
12456
|
import { isMap, isScalar as isScalar2, parseDocument } from "yaml";
|
|
11536
|
-
import * as
|
|
11537
|
-
|
|
11538
|
-
// src/mcp-oauth.ts
|
|
11539
|
-
import * as z21 from "zod";
|
|
11540
|
-
async function authorizeMcpOAuthSecret(options) {
|
|
11541
|
-
const { data: start } = await sdk_gen_exports.startSecretMcpoAuth({
|
|
11542
|
-
client: options.client,
|
|
11543
|
-
path: { orgID: options.orgId },
|
|
11544
|
-
body: options.request
|
|
11545
|
-
});
|
|
11546
|
-
options.onAuthorization(start.authorization_url);
|
|
11547
|
-
return pollUntilDeadline({
|
|
11548
|
-
expiresAt: start.expires_at,
|
|
11549
|
-
expiredMessage: "MCP OAuth authorization expired before the secret was created",
|
|
11550
|
-
async fetchOnce() {
|
|
11551
|
-
const { data } = await sdk_gen_exports.listSecrets({
|
|
11552
|
-
client: options.client,
|
|
11553
|
-
path: { orgID: options.orgId },
|
|
11554
|
-
query: { mcp_oauth_flow_id: start.flow_id, limit: 1 }
|
|
11555
|
-
});
|
|
11556
|
-
return data.data[0];
|
|
11557
|
-
}
|
|
11558
|
-
});
|
|
11559
|
-
}
|
|
11560
|
-
var zBrowserFlag = z21.boolean().default(true).describe("open the authorization URL in a browser");
|
|
11561
|
-
function openAuthorizationUrl(report, title, url4, browser) {
|
|
11562
|
-
report.url(title, url4);
|
|
11563
|
-
if (browser) {
|
|
11564
|
-
openInBrowser(url4, (message) => {
|
|
11565
|
-
report.warn(message);
|
|
11566
|
-
});
|
|
11567
|
-
}
|
|
11568
|
-
}
|
|
11569
|
-
var zMcpOAuthBody = zMcpoAuthStartRequest.extend({ browser: zBrowserFlag });
|
|
11570
|
-
async function runMcpOAuth(context) {
|
|
11571
|
-
const { client: client2, path, body, report } = context;
|
|
11572
|
-
const { browser, ...request } = body;
|
|
11573
|
-
let secret;
|
|
11574
|
-
try {
|
|
11575
|
-
secret = await authorizeMcpOAuthSecret({
|
|
11576
|
-
client: client2,
|
|
11577
|
-
orgId: path.orgID,
|
|
11578
|
-
request,
|
|
11579
|
-
onAuthorization(url4) {
|
|
11580
|
-
openAuthorizationUrl(report, "Authorize this MCP server in your browser", url4, browser);
|
|
11581
|
-
report.start("Waiting for the secret to be created");
|
|
11582
|
-
}
|
|
11583
|
-
});
|
|
11584
|
-
} catch (error) {
|
|
11585
|
-
report.fail("Authorization failed");
|
|
11586
|
-
throw error;
|
|
11587
|
-
}
|
|
11588
|
-
report.stop("Secret created");
|
|
11589
|
-
report.info(`Secret ID: ${secret.id}`);
|
|
11590
|
-
report.done();
|
|
11591
|
-
}
|
|
11592
|
-
|
|
11593
|
-
// src/mcp-add.ts
|
|
12457
|
+
import * as z25 from "zod";
|
|
11594
12458
|
var SERVER_KEY_PATTERN = /^[a-zA-Z][a-zA-Z0-9-]{0,31}$/;
|
|
11595
12459
|
var zMcpAddBody = zMcpoAuthStartRequest.omit({ owner: true, name: true }).extend({
|
|
11596
|
-
server_name:
|
|
12460
|
+
server_name: z25.string().regex(
|
|
11597
12461
|
SERVER_KEY_PATTERN,
|
|
11598
12462
|
"must start with a letter and contain at most 32 letters, digits, or hyphens"
|
|
11599
12463
|
).describe("MCP server key used in the agent config"),
|
|
@@ -11606,7 +12470,7 @@ function targetLabel(target) {
|
|
|
11606
12470
|
function serverEntry(url4, secretId) {
|
|
11607
12471
|
return { url: url4, auth: { type: "oauth", secret_id: secretId } };
|
|
11608
12472
|
}
|
|
11609
|
-
var zJsonRecord =
|
|
12473
|
+
var zJsonRecord = z25.record(z25.string(), z25.json());
|
|
11610
12474
|
function prepareJsonConfig(config2, serverName, mcpUrl) {
|
|
11611
12475
|
const json8 = zJsonText.safeParse(config2.source ?? "");
|
|
11612
12476
|
if (!json8.success) throw new CliInputError("the current agent config contains invalid JSON");
|
|
@@ -11768,9 +12632,9 @@ function runProfileMcpAdd(context) {
|
|
|
11768
12632
|
// src/memory-files.ts
|
|
11769
12633
|
import { open, writeFile } from "node:fs/promises";
|
|
11770
12634
|
import { buffer } from "node:stream/consumers";
|
|
11771
|
-
import * as
|
|
11772
|
-
var zMemoryUploadBody =
|
|
11773
|
-
file:
|
|
12635
|
+
import * as z26 from "zod";
|
|
12636
|
+
var zMemoryUploadBody = z26.object({
|
|
12637
|
+
file: z26.string().min(1).describe("local file to upload")
|
|
11774
12638
|
});
|
|
11775
12639
|
async function loadMemoryUpload(file) {
|
|
11776
12640
|
const handle = await open(file, "r");
|
|
@@ -11802,7 +12666,7 @@ var memoryDownloadOp = customOp({
|
|
|
11802
12666
|
{ path: options.path ?? null },
|
|
11803
12667
|
"query flags"
|
|
11804
12668
|
);
|
|
11805
|
-
const output = parseWithSchema(
|
|
12669
|
+
const output = parseWithSchema(z26.string().min(1), options.output, "--output");
|
|
11806
12670
|
const { response } = await sdk_gen_exports.downloadMemoryFile({ client: client2, path, query, parseAs: "stream" });
|
|
11807
12671
|
const digest = response.headers.get(FILE_DIGEST_HEADER);
|
|
11808
12672
|
if (!digest) throw new CliInputError("file response is missing its digest");
|
|
@@ -11816,10 +12680,10 @@ var memoryDownloadOp = customOp({
|
|
|
11816
12680
|
import { readdirSync as readdirSync2, readFileSync as readFileSync4, statSync } from "node:fs";
|
|
11817
12681
|
import { basename as basename2, dirname as dirname3, join as join3, resolve as resolve2 } from "node:path";
|
|
11818
12682
|
import * as tar from "tar";
|
|
11819
|
-
import * as
|
|
11820
|
-
var zCreateSkillCliBody =
|
|
12683
|
+
import * as z27 from "zod";
|
|
12684
|
+
var zCreateSkillCliBody = z27.object({
|
|
11821
12685
|
owner: zSkillOwnerInput,
|
|
11822
|
-
archive:
|
|
12686
|
+
archive: z27.string().min(1).describe("path to a skill directory (packed automatically) or a .zip/.tar.gz archive")
|
|
11823
12687
|
});
|
|
11824
12688
|
var ARCHIVE_SUFFIXES = [".zip", ".tar.gz", ".tgz"];
|
|
11825
12689
|
function assertPackable(dir) {
|
|
@@ -11860,130 +12724,9 @@ async function loadSkillArchive(archivePath) {
|
|
|
11860
12724
|
return new File([new Uint8Array(readFileSync4(archivePath))], filename);
|
|
11861
12725
|
}
|
|
11862
12726
|
|
|
11863
|
-
// src/slack-integration.ts
|
|
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"),
|
|
11874
|
-
browser: zBrowserFlag
|
|
11875
|
-
});
|
|
11876
|
-
function parseRequest(body) {
|
|
11877
|
-
const createAppFields = [
|
|
11878
|
-
body.app_name,
|
|
11879
|
-
body.app_configuration_token,
|
|
11880
|
-
body.icon_filename,
|
|
11881
|
-
body.icon_data_base64
|
|
11882
|
-
];
|
|
11883
|
-
const existingAppFields = [body.client_id, body.client_secret, body.signing_secret];
|
|
11884
|
-
const createsApp = createAppFields.some((value) => value !== void 0);
|
|
11885
|
-
const usesExistingApp = existingAppFields.some((value) => value !== void 0);
|
|
11886
|
-
if (createsApp && usesExistingApp) {
|
|
11887
|
-
throw new CliInputError(
|
|
11888
|
-
"choose either --app-name with --app-configuration-token, or existing app credentials"
|
|
11889
|
-
);
|
|
11890
|
-
}
|
|
11891
|
-
if (usesExistingApp) {
|
|
11892
|
-
const draft2 = {
|
|
11893
|
-
provider: "slack",
|
|
11894
|
-
client_id: body.client_id,
|
|
11895
|
-
client_secret: body.client_secret,
|
|
11896
|
-
signing_secret: body.signing_secret
|
|
11897
|
-
};
|
|
11898
|
-
if (body.return_to !== void 0) draft2.return_to = body.return_to;
|
|
11899
|
-
const result2 = zCreateIntegrationOAuthSetupRequest.safeParse(draft2);
|
|
11900
|
-
if (!result2.success) {
|
|
11901
|
-
throw new CliInputError(
|
|
11902
|
-
`invalid existing Slack app parameters:
|
|
11903
|
-
${z25.prettifyError(result2.error)}`
|
|
11904
|
-
);
|
|
11905
|
-
}
|
|
11906
|
-
return { kind: "existing-app", body: result2.data };
|
|
11907
|
-
}
|
|
11908
|
-
if (body.icon_filename !== void 0 && body.icon_data_base64 === void 0) {
|
|
11909
|
-
throw new CliInputError("--icon-filename requires --icon-data-base64");
|
|
11910
|
-
}
|
|
11911
|
-
const draft = {
|
|
11912
|
-
app_name: body.app_name,
|
|
11913
|
-
app_configuration_token: body.app_configuration_token
|
|
11914
|
-
};
|
|
11915
|
-
if (body.icon_data_base64 !== void 0) {
|
|
11916
|
-
draft.icon = { data_base64: body.icon_data_base64 };
|
|
11917
|
-
if (body.icon_filename !== void 0) draft.icon.filename = body.icon_filename;
|
|
11918
|
-
}
|
|
11919
|
-
if (body.return_to !== void 0) draft.return_to = body.return_to;
|
|
11920
|
-
const result = zCreateSlackSetupRequest.safeParse(draft);
|
|
11921
|
-
if (!result.success) {
|
|
11922
|
-
throw new CliInputError(
|
|
11923
|
-
`invalid Slack app parameters:
|
|
11924
|
-
${z25.prettifyError(result.error)}
|
|
11925
|
-
Pass --app-name and --app-configuration-token, or existing app credentials.`
|
|
11926
|
-
);
|
|
11927
|
-
}
|
|
11928
|
-
return { kind: "create-app", body: result.data };
|
|
11929
|
-
}
|
|
11930
|
-
async function runSlackIntegration(context) {
|
|
11931
|
-
const { client: client2, path, body, report } = context;
|
|
11932
|
-
const request = parseRequest(body);
|
|
11933
|
-
const setupPath = {
|
|
11934
|
-
orgID: path.orgID,
|
|
11935
|
-
projectID: path.projectID,
|
|
11936
|
-
agentProfileID: path.agentProfileID
|
|
11937
|
-
};
|
|
11938
|
-
let start;
|
|
11939
|
-
let slackAppId;
|
|
11940
|
-
if (request.kind === "create-app") {
|
|
11941
|
-
const { data } = await sdk_gen_exports.createSlackSetup({ client: client2, path: setupPath, body: request.body });
|
|
11942
|
-
start = data;
|
|
11943
|
-
slackAppId = data.slack_app_id;
|
|
11944
|
-
} else {
|
|
11945
|
-
const { data } = await sdk_gen_exports.createIntegrationOAuthSetup({
|
|
11946
|
-
client: client2,
|
|
11947
|
-
path: setupPath,
|
|
11948
|
-
body: request.body
|
|
11949
|
-
});
|
|
11950
|
-
start = data;
|
|
11951
|
-
}
|
|
11952
|
-
openAuthorizationUrl(
|
|
11953
|
-
report,
|
|
11954
|
-
"Approve the Slack integration in your browser",
|
|
11955
|
-
start.oauth_url,
|
|
11956
|
-
body.browser
|
|
11957
|
-
);
|
|
11958
|
-
report.start("Waiting for the Slack integration to be created");
|
|
11959
|
-
let integration;
|
|
11960
|
-
try {
|
|
11961
|
-
integration = await pollUntilDeadline({
|
|
11962
|
-
expiresAt: start.expires_at,
|
|
11963
|
-
expiredMessage: "Slack authorization expired before the integration was created",
|
|
11964
|
-
async fetchOnce() {
|
|
11965
|
-
const { data } = await sdk_gen_exports.listIntegrationInstalls({
|
|
11966
|
-
client: client2,
|
|
11967
|
-
path: { orgID: path.orgID, projectID: path.projectID },
|
|
11968
|
-
query: { oauth_flow_id: start.flow_id, limit: 1 }
|
|
11969
|
-
});
|
|
11970
|
-
return data.data[0];
|
|
11971
|
-
}
|
|
11972
|
-
});
|
|
11973
|
-
} catch (error) {
|
|
11974
|
-
report.fail("Slack authorization failed");
|
|
11975
|
-
if (slackAppId !== void 0) {
|
|
11976
|
-
report.warn(`Slack app ${slackAppId} was created, but the integration was not completed`);
|
|
11977
|
-
}
|
|
11978
|
-
throw error;
|
|
11979
|
-
}
|
|
11980
|
-
report.stop("Slack integration created");
|
|
11981
|
-
report.info(`Integration ID: ${integration.id}`);
|
|
11982
|
-
report.done();
|
|
11983
|
-
}
|
|
11984
|
-
|
|
11985
12727
|
// src/manifest.ts
|
|
11986
12728
|
var commandGroups = [
|
|
12729
|
+
...integrationCommandGroups,
|
|
11987
12730
|
{
|
|
11988
12731
|
name: "agents",
|
|
11989
12732
|
aliases: ["agent"],
|
|
@@ -12020,7 +12763,7 @@ var commandGroups = [
|
|
|
12020
12763
|
body: zConfigAttachment.extend({
|
|
12021
12764
|
profile: zAgentProfileId.optional(),
|
|
12022
12765
|
name: zAgentName.optional(),
|
|
12023
|
-
message:
|
|
12766
|
+
message: z28.string().optional()
|
|
12024
12767
|
}),
|
|
12025
12768
|
transformBody: async ({ profile, name, message, ...attachment }, { client: client2, path }) => ({
|
|
12026
12769
|
profile,
|
|
@@ -12061,7 +12804,7 @@ var commandGroups = [
|
|
|
12061
12804
|
flowOp({
|
|
12062
12805
|
verb: "mcp-add",
|
|
12063
12806
|
summary: "Create an OAuth secret and add an MCP server to an agent",
|
|
12064
|
-
path:
|
|
12807
|
+
path: z28.object({
|
|
12065
12808
|
orgID: zOrganizationId,
|
|
12066
12809
|
projectID: zProjectId,
|
|
12067
12810
|
agentID: zAgentId
|
|
@@ -12077,7 +12820,7 @@ var commandGroups = [
|
|
|
12077
12820
|
format: (response) => formatRecord()(response.agent_input),
|
|
12078
12821
|
path: zCreateAgentInputPath,
|
|
12079
12822
|
body: zCreateAgentInputBody.partial({ content_blocks: true }).extend({
|
|
12080
|
-
message:
|
|
12823
|
+
message: z28.string().optional().describe("plain text to send as a single text block")
|
|
12081
12824
|
}).transform(({ message, content_blocks, ...rest }, ctx) => {
|
|
12082
12825
|
if (content_blocks !== void 0 && message === void 0) {
|
|
12083
12826
|
return { ...rest, content_blocks };
|
|
@@ -12086,7 +12829,7 @@ var commandGroups = [
|
|
|
12086
12829
|
return { ...rest, content_blocks: [{ type: "text", text: message }] };
|
|
12087
12830
|
}
|
|
12088
12831
|
ctx.addIssue("pass exactly one of --message or --content-blocks");
|
|
12089
|
-
return
|
|
12832
|
+
return z28.NEVER;
|
|
12090
12833
|
})
|
|
12091
12834
|
})
|
|
12092
12835
|
],
|
|
@@ -12103,8 +12846,8 @@ var commandGroups = [
|
|
|
12103
12846
|
format: formatAgentEventList,
|
|
12104
12847
|
path: zListEventsPath,
|
|
12105
12848
|
query: zListEventsQuery.extend({
|
|
12106
|
-
before_sequence:
|
|
12107
|
-
after_sequence:
|
|
12849
|
+
before_sequence: z28.int().gte(0).optional(),
|
|
12850
|
+
after_sequence: z28.int().gte(0).optional()
|
|
12108
12851
|
})
|
|
12109
12852
|
}),
|
|
12110
12853
|
agentEventsStreamOp
|
|
@@ -12158,8 +12901,7 @@ var commandGroups = [
|
|
|
12158
12901
|
summary: "Show an organization overview",
|
|
12159
12902
|
fn: sdk_gen_exports.getOrgOverview,
|
|
12160
12903
|
format: formatRecord(),
|
|
12161
|
-
path: zGetOrgOverviewPath
|
|
12162
|
-
query: zGetOrgOverviewQuery
|
|
12904
|
+
path: zGetOrgOverviewPath
|
|
12163
12905
|
}),
|
|
12164
12906
|
op({
|
|
12165
12907
|
verb: "delete",
|
|
@@ -12601,7 +13343,7 @@ var commandGroups = [
|
|
|
12601
13343
|
flowOp({
|
|
12602
13344
|
verb: "mcp-oauth",
|
|
12603
13345
|
summary: "Create a secret through an MCP server OAuth flow",
|
|
12604
|
-
path:
|
|
13346
|
+
path: z28.object({ orgID: zOrganizationId }),
|
|
12605
13347
|
body: zMcpOAuthBody,
|
|
12606
13348
|
run: runMcpOAuth
|
|
12607
13349
|
})
|
|
@@ -12808,25 +13550,13 @@ var commandGroups = [
|
|
|
12808
13550
|
flowOp({
|
|
12809
13551
|
verb: "mcp-add",
|
|
12810
13552
|
summary: "Create an OAuth secret and add an MCP server to an agent profile",
|
|
12811
|
-
path:
|
|
13553
|
+
path: z28.object({
|
|
12812
13554
|
orgID: zOrganizationId,
|
|
12813
13555
|
projectID: zProjectId,
|
|
12814
13556
|
agentProfileID: zAgentProfileId
|
|
12815
13557
|
}),
|
|
12816
13558
|
body: zMcpAddBody,
|
|
12817
13559
|
run: runProfileMcpAdd
|
|
12818
|
-
}),
|
|
12819
|
-
flowOp({
|
|
12820
|
-
verb: "slack",
|
|
12821
|
-
aliases: ["slack-setup"],
|
|
12822
|
-
summary: "Connect Slack to an agent profile through OAuth",
|
|
12823
|
-
path: z26.object({
|
|
12824
|
-
orgID: zOrganizationId,
|
|
12825
|
-
projectID: zProjectId,
|
|
12826
|
-
agentProfileID: zAgentProfileId
|
|
12827
|
-
}),
|
|
12828
|
-
body: zSlackBody,
|
|
12829
|
-
run: runSlackIntegration
|
|
12830
13560
|
})
|
|
12831
13561
|
]
|
|
12832
13562
|
},
|