@vm0/cli 9.268.0 → 9.269.1
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/{agent-4QRFYL6Q.js → agent-YGPUCBVJ.js} +12 -12
- package/agent-YGPUCBVJ.js.map +1 -0
- package/{banking-VKKVWIYX.js → banking-JSGFRQ4L.js} +5 -5
- package/{browser-VFBMLIUS.js → browser-SNX5PNHT.js} +5 -5
- package/{chat-KQRKGQKS.js → chat-HIVVSEA5.js} +209 -24
- package/chat-HIVVSEA5.js.map +1 -0
- package/{chunk-TNDBFUFP.js → chunk-2EF4BXLJ.js} +2 -13
- package/chunk-2EF4BXLJ.js.map +1 -0
- package/chunk-2SSDVICG.js +22 -0
- package/chunk-2SSDVICG.js.map +1 -0
- package/{chunk-CZA5MW3N.js → chunk-46IAE7OE.js} +15 -17
- package/chunk-46IAE7OE.js.map +1 -0
- package/{chunk-DTZW7RES.js → chunk-AHGVNDOM.js} +3 -9
- package/{chunk-DTZW7RES.js.map → chunk-AHGVNDOM.js.map} +1 -1
- package/{chunk-VGPSGL5S.js → chunk-H6AOCKEL.js} +193 -81
- package/chunk-H6AOCKEL.js.map +1 -0
- package/{chunk-NGDZ3M3I.js → chunk-IYGQB2IF.js} +2 -2
- package/{chunk-ISZ5CKJ3.js → chunk-KRUM5LAL.js} +2 -2
- package/{chunk-QSWNNYV4.js → chunk-LCUAACWT.js} +92 -6
- package/chunk-LCUAACWT.js.map +1 -0
- package/{chunk-C6KDTR5A.js → chunk-QVPNDW6V.js} +33 -31
- package/chunk-QVPNDW6V.js.map +1 -0
- package/{chunk-7I3P4REZ.js → chunk-UW4J57OZ.js} +2 -2
- package/{chunk-4JA54Z75.js → chunk-VMZYIB6X.js} +2 -2
- package/{chunk-MD3YWUKO.js → chunk-ZUHSC7WF.js} +18 -2
- package/chunk-ZUHSC7WF.js.map +1 -0
- package/{computer-use-LTZEVHCS.js → computer-use-5SW6CWAY.js} +5 -5
- package/{connector-MY7K7RJN.js → connector-6YIH3K55.js} +47 -48
- package/connector-6YIH3K55.js.map +1 -0
- package/{credit-LDEHJIJT.js → credit-RV57VXH4.js} +7 -7
- package/{developer-support-ROATSWMP.js → developer-support-D2P6GTAZ.js} +5 -5
- package/{doctor-3P6KUY4D.js → doctor-BGVYFKMZ.js} +7 -7
- package/{feishu-PHKR2Q36.js → feishu-YP3C3TPQ.js} +5 -5
- package/{finance-3LM55SWD.js → finance-3KXG6RV5.js} +5 -5
- package/{generate-23ZOL7AI.js → generate-VX35LUBP.js} +12 -12
- package/generate-VX35LUBP.js.map +1 -0
- package/{github-SC4AB2Q2.js → github-AKWQZEIY.js} +5 -5
- package/{goal-FTWV2ADK.js → goal-OQXYFW5Z.js} +5 -5
- package/{host-L4BEXBPB.js → host-B6YLXMA6.js} +5 -5
- package/{logs-TICCUASU.js → logs-NRY3DWOV.js} +7 -7
- package/{mail-ZUBVNRJW.js → mail-43EQ3IYB.js} +7 -7
- package/{maps-UAKTZSO2.js → maps-UMTF5FJV.js} +5 -5
- package/{model-3N3ZWLZM.js → model-VRHOGMWA.js} +6 -6
- package/{model-provider-RI26N5OQ.js → model-provider-L5ZLZIKJ.js} +6 -6
- package/{org-IEYB2WBO.js → org-3FNAZTHF.js} +5 -5
- package/package.json +1 -1
- package/{people-search-5S4TV7RL.js → people-search-FK6RE2NT.js} +5 -5
- package/{phone-XV2LWGQT.js → phone-3TFQSWRG.js} +5 -5
- package/{preference-6XHDDQUW.js → preference-5IXDGW5E.js} +5 -5
- package/{resource-HXS7RGBP.js → resource-NKTI5XPA.js} +5 -5
- package/{scrape-NU6T5BQE.js → scrape-LHAVB7NB.js} +5 -5
- package/{search-FDG26NWA.js → search-F6NM44DL.js} +7 -7
- package/{secret-HN3R3V32.js → secret-HND7KZHJ.js} +5 -5
- package/{slack-IWEZU6HY.js → slack-CUKFUUE3.js} +5 -5
- package/{teams-6VZAWVC6.js → teams-JS36U3HH.js} +5 -5
- package/{telegram-UTCDO5ZB.js → telegram-F5GUYX3P.js} +5 -5
- package/{upgrade-EX2F7BFJ.js → upgrade-HPMCJDVW.js} +4 -4
- package/{variable-U67PHCBZ.js → variable-3NJ4XN52.js} +5 -5
- package/{video-GTQQSN6W.js → video-HZC5EIMX.js} +4 -4
- package/{weather-NMEINAIZ.js → weather-VN2P2PL4.js} +5 -5
- package/{web-YC7E327U.js → web-CFLVFNUS.js} +5 -5
- package/{web-search-TCWP5NDJ.js → web-search-4RP7J2FN.js} +5 -5
- package/{whoami-KACAW67A.js → whoami-FDPQTI53.js} +14 -14
- package/whoami-FDPQTI53.js.map +1 -0
- package/{workflow-TKJF2YY2.js → workflow-OHZEVG7B.js} +100 -9
- package/workflow-OHZEVG7B.js.map +1 -0
- package/zero.js +47 -47
- package/zero.js.map +1 -1
- package/agent-4QRFYL6Q.js.map +0 -1
- package/chat-KQRKGQKS.js.map +0 -1
- package/chunk-C6KDTR5A.js.map +0 -1
- package/chunk-CZA5MW3N.js.map +0 -1
- package/chunk-MD3YWUKO.js.map +0 -1
- package/chunk-QSWNNYV4.js.map +0 -1
- package/chunk-TNDBFUFP.js.map +0 -1
- package/chunk-VGPSGL5S.js.map +0 -1
- package/chunk-ZL7WFWOC.js +0 -97
- package/chunk-ZL7WFWOC.js.map +0 -1
- package/connector-MY7K7RJN.js.map +0 -1
- package/generate-23ZOL7AI.js.map +0 -1
- package/whoami-KACAW67A.js.map +0 -1
- package/workflow-TKJF2YY2.js.map +0 -1
- /package/{banking-VKKVWIYX.js.map → banking-JSGFRQ4L.js.map} +0 -0
- /package/{browser-VFBMLIUS.js.map → browser-SNX5PNHT.js.map} +0 -0
- /package/{chunk-NGDZ3M3I.js.map → chunk-IYGQB2IF.js.map} +0 -0
- /package/{chunk-ISZ5CKJ3.js.map → chunk-KRUM5LAL.js.map} +0 -0
- /package/{chunk-7I3P4REZ.js.map → chunk-UW4J57OZ.js.map} +0 -0
- /package/{chunk-4JA54Z75.js.map → chunk-VMZYIB6X.js.map} +0 -0
- /package/{computer-use-LTZEVHCS.js.map → computer-use-5SW6CWAY.js.map} +0 -0
- /package/{credit-LDEHJIJT.js.map → credit-RV57VXH4.js.map} +0 -0
- /package/{developer-support-ROATSWMP.js.map → developer-support-D2P6GTAZ.js.map} +0 -0
- /package/{doctor-3P6KUY4D.js.map → doctor-BGVYFKMZ.js.map} +0 -0
- /package/{feishu-PHKR2Q36.js.map → feishu-YP3C3TPQ.js.map} +0 -0
- /package/{finance-3LM55SWD.js.map → finance-3KXG6RV5.js.map} +0 -0
- /package/{github-SC4AB2Q2.js.map → github-AKWQZEIY.js.map} +0 -0
- /package/{goal-FTWV2ADK.js.map → goal-OQXYFW5Z.js.map} +0 -0
- /package/{host-L4BEXBPB.js.map → host-B6YLXMA6.js.map} +0 -0
- /package/{logs-TICCUASU.js.map → logs-NRY3DWOV.js.map} +0 -0
- /package/{mail-ZUBVNRJW.js.map → mail-43EQ3IYB.js.map} +0 -0
- /package/{maps-UAKTZSO2.js.map → maps-UMTF5FJV.js.map} +0 -0
- /package/{model-3N3ZWLZM.js.map → model-VRHOGMWA.js.map} +0 -0
- /package/{model-provider-RI26N5OQ.js.map → model-provider-L5ZLZIKJ.js.map} +0 -0
- /package/{org-IEYB2WBO.js.map → org-3FNAZTHF.js.map} +0 -0
- /package/{people-search-5S4TV7RL.js.map → people-search-FK6RE2NT.js.map} +0 -0
- /package/{phone-XV2LWGQT.js.map → phone-3TFQSWRG.js.map} +0 -0
- /package/{preference-6XHDDQUW.js.map → preference-5IXDGW5E.js.map} +0 -0
- /package/{resource-HXS7RGBP.js.map → resource-NKTI5XPA.js.map} +0 -0
- /package/{scrape-NU6T5BQE.js.map → scrape-LHAVB7NB.js.map} +0 -0
- /package/{search-FDG26NWA.js.map → search-F6NM44DL.js.map} +0 -0
- /package/{secret-HN3R3V32.js.map → secret-HND7KZHJ.js.map} +0 -0
- /package/{slack-IWEZU6HY.js.map → slack-CUKFUUE3.js.map} +0 -0
- /package/{teams-6VZAWVC6.js.map → teams-JS36U3HH.js.map} +0 -0
- /package/{telegram-UTCDO5ZB.js.map → telegram-F5GUYX3P.js.map} +0 -0
- /package/{upgrade-EX2F7BFJ.js.map → upgrade-HPMCJDVW.js.map} +0 -0
- /package/{variable-U67PHCBZ.js.map → variable-3NJ4XN52.js.map} +0 -0
- /package/{video-GTQQSN6W.js.map → video-HZC5EIMX.js.map} +0 -0
- /package/{weather-NMEINAIZ.js.map → weather-VN2P2PL4.js.map} +0 -0
- /package/{web-YC7E327U.js.map → web-CFLVFNUS.js.map} +0 -0
- /package/{web-search-TCWP5NDJ.js.map → web-search-4RP7J2FN.js.map} +0 -0
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
updateOrgModelPoliciesRequestSchema,
|
|
22
22
|
upsertModelProviderRequestSchema,
|
|
23
23
|
upsertModelProviderResponseSchema
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-AHGVNDOM.js";
|
|
25
25
|
import {
|
|
26
26
|
__commonJS,
|
|
27
27
|
__esm,
|
|
@@ -3025,7 +3025,7 @@ var modelCatalogPrefetchRoleSchema = external_exports.enum([
|
|
|
3025
3025
|
]);
|
|
3026
3026
|
var modelCatalogCacheMillisecondsSchema = external_exports.number().int().min(0).max(2147483647);
|
|
3027
3027
|
var modelCatalogCacheEvictionCountSchema = external_exports.number().int().min(0).max(32);
|
|
3028
|
-
var
|
|
3028
|
+
var networkLogEntryInputSchema = external_exports.object({
|
|
3029
3029
|
timestamp: external_exports.string(),
|
|
3030
3030
|
type: external_exports.string().optional(),
|
|
3031
3031
|
action: networkLogActionSchema.optional(),
|
|
@@ -3075,6 +3075,8 @@ var networkLogEntrySchema = external_exports.object({
|
|
|
3075
3075
|
upstream_binding_client_binding_match: external_exports.boolean().optional(),
|
|
3076
3076
|
upstream_binding_client_binding_endpoint_match: external_exports.boolean().optional(),
|
|
3077
3077
|
upstream_binding_client_binding_hosts: external_exports.string().optional(),
|
|
3078
|
+
connector_diagnostic_slug: external_exports.string().optional(),
|
|
3079
|
+
// TODO(#23838): Remove after the diagnostic compatibility window.
|
|
3078
3080
|
connector_diagnostic_type: external_exports.string().optional(),
|
|
3079
3081
|
connector_diagnostic_reason: external_exports.string().optional(),
|
|
3080
3082
|
connector_diagnostic_env_names: external_exports.array(external_exports.string()).optional(),
|
|
@@ -3097,6 +3099,25 @@ var networkLogEntrySchema = external_exports.object({
|
|
|
3097
3099
|
response_body_encoding: external_exports.enum(["utf-8", "base64", "binary"]).optional(),
|
|
3098
3100
|
response_body_truncated: external_exports.boolean().optional()
|
|
3099
3101
|
});
|
|
3102
|
+
var networkLogEntrySchema = networkLogEntryInputSchema.superRefine((entry, context) => {
|
|
3103
|
+
if (entry.connector_diagnostic_slug !== void 0 && entry.connector_diagnostic_type !== void 0 && entry.connector_diagnostic_slug !== entry.connector_diagnostic_type) {
|
|
3104
|
+
context.addIssue({
|
|
3105
|
+
code: "custom",
|
|
3106
|
+
path: ["connector_diagnostic_slug"],
|
|
3107
|
+
message: "connector_diagnostic_slug and connector_diagnostic_type must match"
|
|
3108
|
+
});
|
|
3109
|
+
}
|
|
3110
|
+
}).overwrite((entry) => {
|
|
3111
|
+
const connectorDiagnosticSlug = entry.connector_diagnostic_slug ?? entry.connector_diagnostic_type;
|
|
3112
|
+
if (connectorDiagnosticSlug === void 0) {
|
|
3113
|
+
return entry;
|
|
3114
|
+
}
|
|
3115
|
+
return {
|
|
3116
|
+
...entry,
|
|
3117
|
+
connector_diagnostic_slug: connectorDiagnosticSlug,
|
|
3118
|
+
connector_diagnostic_type: connectorDiagnosticSlug
|
|
3119
|
+
};
|
|
3120
|
+
});
|
|
3100
3121
|
var networkLogsResponseSchema = external_exports.object({
|
|
3101
3122
|
networkLogs: external_exports.array(networkLogEntrySchema),
|
|
3102
3123
|
hasMore: external_exports.boolean(),
|
|
@@ -3560,20 +3581,20 @@ var chatThreadEventSchema = external_exports.object({
|
|
|
3560
3581
|
var chatThreadEventResponseSchema = chatThreadEventSchema.extend({
|
|
3561
3582
|
seqId: chatThreadEventSchema.shape.seqId.optional()
|
|
3562
3583
|
});
|
|
3563
|
-
var
|
|
3584
|
+
var chatEventUsageProviderBreakdownSchema = external_exports.object({
|
|
3564
3585
|
provider: external_exports.string(),
|
|
3565
3586
|
credits: external_exports.number().int().nonnegative()
|
|
3566
3587
|
});
|
|
3567
|
-
var
|
|
3588
|
+
var chatEventUsageKindBreakdownSchema = external_exports.object({
|
|
3568
3589
|
kind: external_exports.string(),
|
|
3569
3590
|
credits: external_exports.number().int().nonnegative(),
|
|
3570
|
-
providers: external_exports.array(
|
|
3591
|
+
providers: external_exports.array(chatEventUsageProviderBreakdownSchema)
|
|
3571
3592
|
});
|
|
3572
|
-
var
|
|
3593
|
+
var chatEventUsagePayloadSchema = external_exports.object({
|
|
3573
3594
|
version: external_exports.literal(1),
|
|
3574
3595
|
totalCredits: external_exports.number().int().nonnegative(),
|
|
3575
3596
|
settledAt: external_exports.string(),
|
|
3576
|
-
breakdown: external_exports.array(
|
|
3597
|
+
breakdown: external_exports.array(chatEventUsageKindBreakdownSchema)
|
|
3577
3598
|
});
|
|
3578
3599
|
var toolSummaryEntrySchema = external_exports.object({
|
|
3579
3600
|
kind: external_exports.literal("tool"),
|
|
@@ -3704,20 +3725,20 @@ var chatEventBaseSchema = external_exports.object({
|
|
|
3704
3725
|
workflowSnapshot: workflowSnapshotSchema.optional(),
|
|
3705
3726
|
createdAt: external_exports.string()
|
|
3706
3727
|
});
|
|
3707
|
-
var
|
|
3728
|
+
var chatEventRecommendedFollowupSchema = external_exports.object({
|
|
3708
3729
|
prompt: external_exports.string(),
|
|
3709
3730
|
kind: external_exports.enum(["talk", "generate"]),
|
|
3710
3731
|
generationType: external_exports.enum(["image", "video", "presentation", "website"]).optional()
|
|
3711
3732
|
});
|
|
3712
|
-
var
|
|
3733
|
+
var chatEventRecommendedFollowupsSchema = external_exports.preprocess((value) => {
|
|
3713
3734
|
if (!Array.isArray(value)) {
|
|
3714
3735
|
return [];
|
|
3715
3736
|
}
|
|
3716
3737
|
return value.flatMap((item) => {
|
|
3717
|
-
const parsed =
|
|
3738
|
+
const parsed = chatEventRecommendedFollowupSchema.safeParse(item);
|
|
3718
3739
|
return parsed.success ? [parsed.data] : [];
|
|
3719
3740
|
});
|
|
3720
|
-
}, external_exports.array(
|
|
3741
|
+
}, external_exports.array(chatEventRecommendedFollowupSchema));
|
|
3721
3742
|
var inputPromptEventSchema = chatEventBaseSchema.extend({
|
|
3722
3743
|
eventType: external_exports.literal("input.prompt"),
|
|
3723
3744
|
content: external_exports.null(),
|
|
@@ -3775,7 +3796,7 @@ var outputThinkingEventSchema = chatEventBaseSchema.extend({
|
|
|
3775
3796
|
var outputFollowupsEventSchema = chatEventBaseSchema.extend({
|
|
3776
3797
|
eventType: external_exports.literal("output.followups"),
|
|
3777
3798
|
content: external_exports.null(),
|
|
3778
|
-
recommendedFollowups:
|
|
3799
|
+
recommendedFollowups: chatEventRecommendedFollowupsSchema
|
|
3779
3800
|
}).strict();
|
|
3780
3801
|
var runQueuedEventSchema = chatEventBaseSchema.extend({
|
|
3781
3802
|
eventType: external_exports.literal("run.queued"),
|
|
@@ -3834,7 +3855,7 @@ var usageRecordedEventSchema = chatEventBaseSchema.extend({
|
|
|
3834
3855
|
eventType: external_exports.literal("usage.recorded"),
|
|
3835
3856
|
runId: external_exports.string(),
|
|
3836
3857
|
content: external_exports.null(),
|
|
3837
|
-
usage:
|
|
3858
|
+
usage: chatEventUsagePayloadSchema
|
|
3838
3859
|
}).strict();
|
|
3839
3860
|
var chatEventSchema = external_exports.discriminatedUnion("eventType", [
|
|
3840
3861
|
inputPromptEventSchema,
|
|
@@ -3919,9 +3940,10 @@ var chatThreadCreateBodySchema = external_exports.preprocess(
|
|
|
3919
3940
|
eventId: chatThreadEventIdSchema.optional(),
|
|
3920
3941
|
/**
|
|
3921
3942
|
* Selected model id. The API resolves the effective model provider from org
|
|
3922
|
-
* policy and available credentials.
|
|
3943
|
+
* policy and available credentials. Omit it to inherit the model of the run
|
|
3944
|
+
* that owns the calling token; callers without a run must send it.
|
|
3923
3945
|
*/
|
|
3924
|
-
model: selectedModelRequestSchema,
|
|
3946
|
+
model: selectedModelRequestSchema.optional(),
|
|
3925
3947
|
title: external_exports.string().optional()
|
|
3926
3948
|
})
|
|
3927
3949
|
);
|
|
@@ -4050,11 +4072,16 @@ var chatThreadsContract = c13.router({
|
|
|
4050
4072
|
201: external_exports.object({
|
|
4051
4073
|
id: external_exports.string(),
|
|
4052
4074
|
title: external_exports.string().nullable(),
|
|
4053
|
-
createdAt: external_exports.string()
|
|
4075
|
+
createdAt: external_exports.string(),
|
|
4076
|
+
// The model the thread was pinned to, echoed so a caller that omitted
|
|
4077
|
+
// `model` learns what it inherited. Remove optionality only after
|
|
4078
|
+
// pre-echo APIs cannot serve a newly released CLI during rollout.
|
|
4079
|
+
selectedModel: external_exports.string().optional()
|
|
4054
4080
|
}),
|
|
4055
4081
|
400: apiErrorSchema,
|
|
4056
4082
|
401: apiErrorSchema,
|
|
4057
4083
|
402: apiErrorSchema,
|
|
4084
|
+
403: apiErrorSchema,
|
|
4058
4085
|
404: apiErrorSchema
|
|
4059
4086
|
},
|
|
4060
4087
|
summary: "Create a new chat thread"
|
|
@@ -5058,7 +5085,9 @@ async function getZeroAgentUserConnectors(id) {
|
|
|
5058
5085
|
const config = await getClientConfig();
|
|
5059
5086
|
const client2 = initClient(zeroUserConnectorsContract, config);
|
|
5060
5087
|
const result = await client2.get({ params: { id } });
|
|
5061
|
-
if (result.status === 200)
|
|
5088
|
+
if (result.status === 200) {
|
|
5089
|
+
return result.body.enabledConnectorSlugs ?? result.body.enabledTypes;
|
|
5090
|
+
}
|
|
5062
5091
|
handleError(
|
|
5063
5092
|
result,
|
|
5064
5093
|
`Failed to get connector permissions for zero agent "${id}"`
|
|
@@ -5078,7 +5107,14 @@ async function listZeroUserPermissionGrants(agentId) {
|
|
|
5078
5107
|
const config = await getClientConfig();
|
|
5079
5108
|
const client2 = initClient(zeroUserPermissionGrantsContract, config);
|
|
5080
5109
|
const result = await client2.list({ query: { agentId } });
|
|
5081
|
-
if (result.status === 200)
|
|
5110
|
+
if (result.status === 200) {
|
|
5111
|
+
return result.body.map(({ connectorRef, connectorSlug, ...grant }) => {
|
|
5112
|
+
return {
|
|
5113
|
+
...grant,
|
|
5114
|
+
connectorSlug: connectorSlug ?? connectorRef
|
|
5115
|
+
};
|
|
5116
|
+
});
|
|
5117
|
+
}
|
|
5082
5118
|
handleError(
|
|
5083
5119
|
result,
|
|
5084
5120
|
`Failed to get permission grants for zero agent "${agentId}"`
|
|
@@ -6383,12 +6419,64 @@ var zeroCustomConnectorProposalContract = c22.router({
|
|
|
6383
6419
|
});
|
|
6384
6420
|
|
|
6385
6421
|
// src/lib/api/domains/zero-connectors.ts
|
|
6422
|
+
function normalizeConnector(connector) {
|
|
6423
|
+
const { type, slug, ...rest } = connector;
|
|
6424
|
+
return { ...rest, slug: slug ?? type };
|
|
6425
|
+
}
|
|
6426
|
+
function normalizeBinding(binding) {
|
|
6427
|
+
const { connectorType, connectorSlug, ...rest } = binding;
|
|
6428
|
+
return { ...rest, connectorSlug: connectorSlug ?? connectorType };
|
|
6429
|
+
}
|
|
6430
|
+
function normalizeConnectorList(response) {
|
|
6431
|
+
const {
|
|
6432
|
+
connectors,
|
|
6433
|
+
configuredTypes,
|
|
6434
|
+
configuredConnectorSlugs,
|
|
6435
|
+
connectorProvidedBindings,
|
|
6436
|
+
...rest
|
|
6437
|
+
} = response;
|
|
6438
|
+
return {
|
|
6439
|
+
...rest,
|
|
6440
|
+
connectors: connectors.map(normalizeConnector),
|
|
6441
|
+
configuredConnectorSlugs: configuredConnectorSlugs ?? configuredTypes,
|
|
6442
|
+
connectorProvidedBindings: connectorProvidedBindings.map(normalizeBinding)
|
|
6443
|
+
};
|
|
6444
|
+
}
|
|
6445
|
+
function normalizeCatalogItem(connector) {
|
|
6446
|
+
const { connectorRef, slug, ...rest } = connector;
|
|
6447
|
+
return { ...rest, slug: slug ?? connectorRef };
|
|
6448
|
+
}
|
|
6449
|
+
function normalizeCheckIdentity(identity) {
|
|
6450
|
+
const { connectorRef, connectorSlug, ...rest } = identity;
|
|
6451
|
+
return { ...rest, connectorSlug: connectorSlug ?? connectorRef };
|
|
6452
|
+
}
|
|
6453
|
+
function normalizeConnectorCheck(result) {
|
|
6454
|
+
switch (result.outcome) {
|
|
6455
|
+
case "resolved":
|
|
6456
|
+
case "connector-mismatch":
|
|
6457
|
+
case "environment-not-owned":
|
|
6458
|
+
case "environment-not-used":
|
|
6459
|
+
case "unresolved-dynamic-base":
|
|
6460
|
+
return { ...result, connector: normalizeCheckIdentity(result.connector) };
|
|
6461
|
+
case "ambiguous":
|
|
6462
|
+
return {
|
|
6463
|
+
...result,
|
|
6464
|
+
candidates: result.candidates.map(normalizeCheckIdentity)
|
|
6465
|
+
};
|
|
6466
|
+
case "unsafe-input":
|
|
6467
|
+
case "unknown-connector":
|
|
6468
|
+
case "unknown-environment":
|
|
6469
|
+
case "no-match":
|
|
6470
|
+
case "run-context-unavailable":
|
|
6471
|
+
return result;
|
|
6472
|
+
}
|
|
6473
|
+
}
|
|
6386
6474
|
async function listZeroConnectors() {
|
|
6387
6475
|
const config = await getClientConfig();
|
|
6388
6476
|
const client2 = initClient(zeroConnectorsMainContract, config);
|
|
6389
6477
|
const result = await client2.list({ headers: {} });
|
|
6390
6478
|
if (result.status === 200) {
|
|
6391
|
-
return result.body;
|
|
6479
|
+
return normalizeConnectorList(result.body);
|
|
6392
6480
|
}
|
|
6393
6481
|
handleError(result, "Failed to list connectors");
|
|
6394
6482
|
}
|
|
@@ -6397,7 +6485,11 @@ async function listZeroConnectorCatalog() {
|
|
|
6397
6485
|
const client2 = initClient(zeroConnectorCatalogContract, config);
|
|
6398
6486
|
const result = await client2.list({ headers: {} });
|
|
6399
6487
|
if (result.status === 200) {
|
|
6400
|
-
|
|
6488
|
+
const { connectors, ...response } = result.body;
|
|
6489
|
+
return {
|
|
6490
|
+
...response,
|
|
6491
|
+
connectors: connectors.map(normalizeCatalogItem)
|
|
6492
|
+
};
|
|
6401
6493
|
}
|
|
6402
6494
|
handleError(result, "Failed to list connector catalog");
|
|
6403
6495
|
}
|
|
@@ -6406,7 +6498,11 @@ async function listZeroConnectorCatalogStatus() {
|
|
|
6406
6498
|
const client2 = initClient(zeroConnectorCatalogContract, config);
|
|
6407
6499
|
const result = await client2.status({ headers: {} });
|
|
6408
6500
|
if (result.status === 200) {
|
|
6409
|
-
|
|
6501
|
+
const { connectors, ...response } = result.body;
|
|
6502
|
+
return {
|
|
6503
|
+
...response,
|
|
6504
|
+
connectors: connectors.map(normalizeCatalogItem)
|
|
6505
|
+
};
|
|
6410
6506
|
}
|
|
6411
6507
|
handleError(result, "Failed to list connector catalog status");
|
|
6412
6508
|
}
|
|
@@ -6417,12 +6513,18 @@ async function getZeroConnectorCatalogPermissions(connectorSlug) {
|
|
|
6417
6513
|
params: { connectorSlug }
|
|
6418
6514
|
});
|
|
6419
6515
|
if (result.status === 200) {
|
|
6420
|
-
|
|
6516
|
+
const {
|
|
6517
|
+
connectorRef,
|
|
6518
|
+
connectorSlug: canonicalSlug,
|
|
6519
|
+
...permissions
|
|
6520
|
+
} = result.body.permissions;
|
|
6521
|
+
const normalizedConnectorSlug = canonicalSlug ?? connectorRef;
|
|
6522
|
+
if (normalizedConnectorSlug !== connectorSlug) {
|
|
6421
6523
|
throw new Error(
|
|
6422
|
-
`Permission metadata
|
|
6524
|
+
`Permission metadata connector slug mismatch: expected ${connectorSlug}, got ${normalizedConnectorSlug}`
|
|
6423
6525
|
);
|
|
6424
6526
|
}
|
|
6425
|
-
return
|
|
6527
|
+
return { ...permissions, connectorSlug: normalizedConnectorSlug };
|
|
6426
6528
|
}
|
|
6427
6529
|
if (result.status === 404) {
|
|
6428
6530
|
return null;
|
|
@@ -6440,7 +6542,7 @@ async function diagnoseZeroConnectorCheck(request) {
|
|
|
6440
6542
|
});
|
|
6441
6543
|
const result = await client2.check({ body: request });
|
|
6442
6544
|
if (result.status === 200) {
|
|
6443
|
-
return result.body;
|
|
6545
|
+
return normalizeConnectorCheck(result.body);
|
|
6444
6546
|
}
|
|
6445
6547
|
handleError(result, "Failed to diagnose connector");
|
|
6446
6548
|
}
|
|
@@ -6451,7 +6553,7 @@ async function getZeroConnector(connectorSlug) {
|
|
|
6451
6553
|
params: { connectorSlug }
|
|
6452
6554
|
});
|
|
6453
6555
|
if (result.status === 200) {
|
|
6454
|
-
return result.body;
|
|
6556
|
+
return normalizeConnector(result.body);
|
|
6455
6557
|
}
|
|
6456
6558
|
if (result.status === 404) {
|
|
6457
6559
|
return null;
|
|
@@ -6466,7 +6568,7 @@ async function connectZeroConnectorManualGrant(connectorSlug, authMethod, values
|
|
|
6466
6568
|
body: { authMethod, values }
|
|
6467
6569
|
});
|
|
6468
6570
|
if (result.status === 200) {
|
|
6469
|
-
return result.body;
|
|
6571
|
+
return normalizeConnector(result.body);
|
|
6470
6572
|
}
|
|
6471
6573
|
handleError(result, `Failed to connect connector "${connectorSlug}"`);
|
|
6472
6574
|
}
|
|
@@ -6999,45 +7101,15 @@ var runnersNetworkPolicyRefreshContract = c23.router({
|
|
|
6999
7101
|
runId: external_exports.uuid()
|
|
7000
7102
|
}),
|
|
7001
7103
|
body: external_exports.object({
|
|
7002
|
-
connectorSlugs: external_exports.array(connectorSlugSchema).min(1).max(NETWORK_POLICY_REFRESH_CONNECTOR_SLUGS_MAX).
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
}).superRefine((body, context) => {
|
|
7006
|
-
if (body.connectorSlugs === void 0 && body.connectorRefs === void 0) {
|
|
7007
|
-
context.addIssue({
|
|
7008
|
-
code: "custom",
|
|
7009
|
-
path: ["connectorSlugs"],
|
|
7010
|
-
message: "connectorSlugs or connectorRefs is required"
|
|
7011
|
-
});
|
|
7012
|
-
return;
|
|
7013
|
-
}
|
|
7014
|
-
if (body.connectorSlugs !== void 0 && body.connectorRefs !== void 0) {
|
|
7015
|
-
const connectorSlugs = new Set(body.connectorSlugs);
|
|
7016
|
-
const connectorRefs = new Set(body.connectorRefs);
|
|
7017
|
-
if (connectorSlugs.size !== connectorRefs.size || [...connectorSlugs].some((connectorSlug) => {
|
|
7018
|
-
return !connectorRefs.has(connectorSlug);
|
|
7019
|
-
})) {
|
|
7020
|
-
context.addIssue({
|
|
7021
|
-
code: "custom",
|
|
7022
|
-
path: ["connectorSlugs"],
|
|
7023
|
-
message: "must identify the same connectors as connectorRefs"
|
|
7024
|
-
});
|
|
7025
|
-
}
|
|
7026
|
-
}
|
|
7027
|
-
}).transform((body) => {
|
|
7028
|
-
return {
|
|
7029
|
-
connectorSlugs: [
|
|
7030
|
-
...new Set(body.connectorSlugs ?? body.connectorRefs ?? [])
|
|
7031
|
-
]
|
|
7032
|
-
};
|
|
7104
|
+
connectorSlugs: external_exports.array(connectorSlugSchema).min(1).max(NETWORK_POLICY_REFRESH_CONNECTOR_SLUGS_MAX).transform((connectorSlugs) => {
|
|
7105
|
+
return [...new Set(connectorSlugs)];
|
|
7106
|
+
})
|
|
7033
7107
|
}),
|
|
7034
7108
|
responses: {
|
|
7035
7109
|
200: external_exports.object({
|
|
7036
7110
|
refreshes: external_exports.array(
|
|
7037
7111
|
external_exports.object({
|
|
7038
7112
|
connectorSlug: connectorSlugSchema,
|
|
7039
|
-
// TODO(#23827): Remove after every pre-bridge runner has drained.
|
|
7040
|
-
connectorRef: connectorSlugSchema,
|
|
7041
7113
|
networkPolicy: networkPolicySchema,
|
|
7042
7114
|
nextRefreshAt: external_exports.string().datetime({ offset: true }).nullable()
|
|
7043
7115
|
})
|
|
@@ -7822,7 +7894,7 @@ var webhookModelUsageObservationContract = c24.router({
|
|
|
7822
7894
|
});
|
|
7823
7895
|
|
|
7824
7896
|
// ../../packages/api-contracts/src/contracts/zero-runs.ts
|
|
7825
|
-
var
|
|
7897
|
+
var zeroRunCreateBodySchema = unifiedRunRequestSchema.omit({
|
|
7826
7898
|
triggerSource: true,
|
|
7827
7899
|
artifacts: true,
|
|
7828
7900
|
disallowedTools: true,
|
|
@@ -7847,25 +7919,6 @@ var zeroNetworkLogPaginationQuerySchema = createLogPaginationQuerySchema({
|
|
|
7847
7919
|
defaultLimit: 500,
|
|
7848
7920
|
defaultOrder: "asc"
|
|
7849
7921
|
});
|
|
7850
|
-
var zeroRunsMainContract = c25.router({
|
|
7851
|
-
create: {
|
|
7852
|
-
method: "POST",
|
|
7853
|
-
path: "/api/zero/runs",
|
|
7854
|
-
headers: authHeadersSchema,
|
|
7855
|
-
body: zeroRunRequestSchema,
|
|
7856
|
-
responses: {
|
|
7857
|
-
201: createRunResponseSchema,
|
|
7858
|
-
400: apiErrorSchema,
|
|
7859
|
-
401: apiErrorSchema,
|
|
7860
|
-
402: apiErrorSchema,
|
|
7861
|
-
403: apiErrorSchema,
|
|
7862
|
-
404: apiErrorSchema,
|
|
7863
|
-
429: apiErrorSchema,
|
|
7864
|
-
503: apiErrorSchema
|
|
7865
|
-
},
|
|
7866
|
-
summary: "Create and execute agent run (zero proxy)"
|
|
7867
|
-
}
|
|
7868
|
-
});
|
|
7869
7922
|
var zeroRunsByIdContract = c25.router({
|
|
7870
7923
|
getById: {
|
|
7871
7924
|
method: "GET",
|
|
@@ -8126,6 +8179,27 @@ async function listZeroChatThreadEvents(options) {
|
|
|
8126
8179
|
}
|
|
8127
8180
|
handleError(result, "Failed to list chat thread events");
|
|
8128
8181
|
}
|
|
8182
|
+
async function createZeroChatThread(options) {
|
|
8183
|
+
const config = await getClientConfig();
|
|
8184
|
+
const client2 = initClient(chatThreadsContract, config);
|
|
8185
|
+
const result = await client2.create({
|
|
8186
|
+
body: {
|
|
8187
|
+
agentId: options.agentId,
|
|
8188
|
+
title: options.title,
|
|
8189
|
+
...options.model === void 0 ? {} : { model: options.model }
|
|
8190
|
+
}
|
|
8191
|
+
});
|
|
8192
|
+
if (result.status === 201) {
|
|
8193
|
+
return {
|
|
8194
|
+
threadId: result.body.id,
|
|
8195
|
+
title: result.body.title,
|
|
8196
|
+
// An API that predates the echoed pin leaves the CLI with only the
|
|
8197
|
+
// model the caller asked for.
|
|
8198
|
+
selectedModel: result.body.selectedModel ?? options.model ?? null
|
|
8199
|
+
};
|
|
8200
|
+
}
|
|
8201
|
+
handleError(result, "Failed to create chat thread");
|
|
8202
|
+
}
|
|
8129
8203
|
async function renameZeroChatThread(options) {
|
|
8130
8204
|
const config = await getClientConfig();
|
|
8131
8205
|
const client2 = initClient(chatThreadRenameContract, config);
|
|
@@ -10471,6 +10545,7 @@ var workflowInstructionSchema = external_exports.string().max(WORKFLOW_FILES_MAX
|
|
|
10471
10545
|
var zeroWorkflowScheduleTypeSchema = external_exports.enum(["cron", "loop", "once"]);
|
|
10472
10546
|
var zeroWorkflowAutomationKindSchema = external_exports.enum(["schedule", "event"]);
|
|
10473
10547
|
var zeroWorkflowEventTypeSchema = external_exports.enum([
|
|
10548
|
+
"chat-run-finished",
|
|
10474
10549
|
"gmail-new-message",
|
|
10475
10550
|
"gmail-label-applied",
|
|
10476
10551
|
"github-label-applied",
|
|
@@ -10489,6 +10564,18 @@ var zeroWorkflowEventTypeSchema = external_exports.enum([
|
|
|
10489
10564
|
"strapi-entry-published",
|
|
10490
10565
|
"webhook-received"
|
|
10491
10566
|
]);
|
|
10567
|
+
var chatRunFinishedRunStatusSchema = external_exports.enum([
|
|
10568
|
+
"completed",
|
|
10569
|
+
"failed",
|
|
10570
|
+
"cancelled"
|
|
10571
|
+
]);
|
|
10572
|
+
var chatRunFinishedEventConfigSchema = external_exports.object({
|
|
10573
|
+
provider: external_exports.literal("chat"),
|
|
10574
|
+
event: external_exports.literal("run_finished"),
|
|
10575
|
+
chatThreadId: external_exports.string().uuid(),
|
|
10576
|
+
runStatuses: external_exports.array(chatRunFinishedRunStatusSchema).min(1).optional(),
|
|
10577
|
+
outputPattern: external_exports.string().trim().min(1).max(512).optional()
|
|
10578
|
+
}).strict();
|
|
10492
10579
|
var gmailTextMatchSchema = external_exports.object({
|
|
10493
10580
|
contains: external_exports.string().min(1).optional(),
|
|
10494
10581
|
containsAny: external_exports.array(external_exports.string().min(1)).min(1).optional(),
|
|
@@ -10767,6 +10854,13 @@ var zeroWorkflowScheduleAutomationSummarySchema = zeroWorkflowAutomationSummaryB
|
|
|
10767
10854
|
schedule: zeroWorkflowScheduleSchema,
|
|
10768
10855
|
scheduleSummary: external_exports.string()
|
|
10769
10856
|
});
|
|
10857
|
+
var zeroWorkflowChatRunFinishedAutomationSummarySchema = zeroWorkflowAutomationSummaryBaseSchema.extend({
|
|
10858
|
+
kind: external_exports.literal("event"),
|
|
10859
|
+
eventType: external_exports.literal("chat-run-finished"),
|
|
10860
|
+
eventConfig: chatRunFinishedEventConfigSchema,
|
|
10861
|
+
schedule: external_exports.null(),
|
|
10862
|
+
scheduleSummary: external_exports.null()
|
|
10863
|
+
});
|
|
10770
10864
|
var zeroWorkflowGmailNewMessageAutomationSummarySchema = zeroWorkflowAutomationSummaryBaseSchema.extend({
|
|
10771
10865
|
kind: external_exports.literal("event"),
|
|
10772
10866
|
eventType: external_exports.literal("gmail-new-message"),
|
|
@@ -10894,6 +10988,7 @@ var zeroWorkflowWebhookReceivedAutomationSummarySchema = zeroWorkflowAutomationS
|
|
|
10894
10988
|
var zeroWorkflowEventAutomationSummarySchema = external_exports.discriminatedUnion(
|
|
10895
10989
|
"eventType",
|
|
10896
10990
|
[
|
|
10991
|
+
zeroWorkflowChatRunFinishedAutomationSummarySchema,
|
|
10897
10992
|
zeroWorkflowGmailNewMessageAutomationSummarySchema,
|
|
10898
10993
|
zeroWorkflowGmailLabelAppliedAutomationSummarySchema,
|
|
10899
10994
|
zeroWorkflowGithubLabelAppliedAutomationSummarySchema,
|
|
@@ -10934,6 +11029,13 @@ var chatThreadWorkflowScheduleAutomationSchema = chatThreadWorkflowAutomationBas
|
|
|
10934
11029
|
schedule: zeroWorkflowScheduleSchema,
|
|
10935
11030
|
scheduleSummary: external_exports.string()
|
|
10936
11031
|
});
|
|
11032
|
+
var chatThreadWorkflowChatRunFinishedAutomationSchema = chatThreadWorkflowAutomationBaseSchema.extend({
|
|
11033
|
+
kind: external_exports.literal("event"),
|
|
11034
|
+
eventType: external_exports.literal("chat-run-finished"),
|
|
11035
|
+
eventConfig: chatRunFinishedEventConfigSchema,
|
|
11036
|
+
schedule: external_exports.null(),
|
|
11037
|
+
scheduleSummary: external_exports.null()
|
|
11038
|
+
});
|
|
10937
11039
|
var chatThreadWorkflowGmailNewMessageAutomationSchema = chatThreadWorkflowAutomationBaseSchema.extend({
|
|
10938
11040
|
kind: external_exports.literal("event"),
|
|
10939
11041
|
eventType: external_exports.literal("gmail-new-message"),
|
|
@@ -11053,6 +11155,7 @@ var chatThreadWorkflowWebhookReceivedAutomationSchema = zeroWorkflowWebhookRecei
|
|
|
11053
11155
|
});
|
|
11054
11156
|
var chatThreadWorkflowAutomationSchema = external_exports.union([
|
|
11055
11157
|
chatThreadWorkflowScheduleAutomationSchema,
|
|
11158
|
+
chatThreadWorkflowChatRunFinishedAutomationSchema,
|
|
11056
11159
|
chatThreadWorkflowGmailNewMessageAutomationSchema,
|
|
11057
11160
|
chatThreadWorkflowGmailLabelAppliedAutomationSchema,
|
|
11058
11161
|
chatThreadWorkflowGithubLabelAppliedAutomationSchema,
|
|
@@ -11076,6 +11179,12 @@ var zeroWorkflowScheduleAutomationCreateRequestSchema = external_exports.object(
|
|
|
11076
11179
|
schedule: zeroWorkflowScheduleSchema,
|
|
11077
11180
|
enabled: external_exports.boolean().optional()
|
|
11078
11181
|
});
|
|
11182
|
+
var zeroWorkflowChatRunFinishedAutomationCreateRequestSchema = external_exports.object({
|
|
11183
|
+
kind: external_exports.literal("event"),
|
|
11184
|
+
eventType: external_exports.literal("chat-run-finished"),
|
|
11185
|
+
eventConfig: chatRunFinishedEventConfigSchema,
|
|
11186
|
+
enabled: external_exports.boolean().optional()
|
|
11187
|
+
});
|
|
11079
11188
|
var zeroWorkflowGmailNewMessageAutomationCreateRequestSchema = external_exports.object({
|
|
11080
11189
|
kind: external_exports.literal("event"),
|
|
11081
11190
|
eventType: external_exports.literal("gmail-new-message"),
|
|
@@ -11196,6 +11305,7 @@ var zeroWorkflowWebhookReceivedAutomationCreateRequestSchema = external_exports.
|
|
|
11196
11305
|
});
|
|
11197
11306
|
var zeroWorkflowAutomationCreateRequestSchema = external_exports.union([
|
|
11198
11307
|
zeroWorkflowScheduleAutomationCreateRequestSchema,
|
|
11308
|
+
zeroWorkflowChatRunFinishedAutomationCreateRequestSchema,
|
|
11199
11309
|
zeroWorkflowGmailNewMessageAutomationCreateRequestSchema,
|
|
11200
11310
|
zeroWorkflowGmailLabelAppliedAutomationCreateRequestSchema,
|
|
11201
11311
|
zeroWorkflowGithubLabelAppliedAutomationCreateRequestSchema,
|
|
@@ -13362,6 +13472,7 @@ export {
|
|
|
13362
13472
|
UNKNOWN_PERMISSION_GRANT,
|
|
13363
13473
|
chatThreadSnapshotProjectionSchema,
|
|
13364
13474
|
chatThreadEventSchema,
|
|
13475
|
+
userMessageDocumentSchema,
|
|
13365
13476
|
zeroAgentVisibilitySchema,
|
|
13366
13477
|
connectorSlugSchema,
|
|
13367
13478
|
createZeroAgent,
|
|
@@ -13441,6 +13552,7 @@ export {
|
|
|
13441
13552
|
searchZeroChat,
|
|
13442
13553
|
getZeroChatThreadSnapshot,
|
|
13443
13554
|
listZeroChatThreadEvents,
|
|
13555
|
+
createZeroChatThread,
|
|
13444
13556
|
renameZeroChatThread,
|
|
13445
13557
|
getZeroChatThread,
|
|
13446
13558
|
getZeroChatThreadAgentId,
|
|
@@ -13501,4 +13613,4 @@ export {
|
|
|
13501
13613
|
getHostedSiteFiles,
|
|
13502
13614
|
getHostedSiteDeployments
|
|
13503
13615
|
};
|
|
13504
|
-
//# sourceMappingURL=chunk-
|
|
13616
|
+
//# sourceMappingURL=chunk-H6AOCKEL.js.map
|