@autohq/cli 0.1.154 → 0.1.156
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-bridge.js +39 -15
- package/dist/index.js +41 -17
- package/package.json +1 -1
package/dist/agent-bridge.js
CHANGED
|
@@ -19682,7 +19682,7 @@ var SessionIdSchema2 = OpaqueIdSchema2.brand();
|
|
|
19682
19682
|
var SessionCommandIdSchema2 = OpaqueIdSchema2.brand();
|
|
19683
19683
|
var RuntimeIdSchema2 = OpaqueIdSchema2.brand();
|
|
19684
19684
|
var RuntimeBridgeLeaseIdSchema2 = OpaqueIdSchema2.brand();
|
|
19685
|
-
var
|
|
19685
|
+
var EnvironmentSetupTemplateIdSchema = OpaqueIdSchema2.brand();
|
|
19686
19686
|
var UserIdSchema = OpaqueIdSchema2.brand();
|
|
19687
19687
|
|
|
19688
19688
|
// ../../packages/schemas/src/auth.ts
|
|
@@ -21194,26 +21194,52 @@ var AgentToolRefSchema = InlineAgentToolSchema;
|
|
|
21194
21194
|
var AgentToolsSchema = external_exports.record(ToolAliasSchema, AgentToolRefSchema);
|
|
21195
21195
|
|
|
21196
21196
|
// ../../packages/schemas/src/trigger-router.ts
|
|
21197
|
-
var
|
|
21197
|
+
var CANONICAL_ROUTE_BY_KINDS = [
|
|
21198
|
+
"singleton",
|
|
21199
|
+
"ownedArtifact",
|
|
21200
|
+
"allLiveSessions",
|
|
21201
|
+
"attributedSessions"
|
|
21202
|
+
];
|
|
21203
|
+
var LEGACY_ROUTE_BY_KINDS = ["allLiveRuns", "attributedRuns"];
|
|
21204
|
+
var CanonicalRouteBySchema = external_exports.discriminatedUnion("kind", [
|
|
21198
21205
|
external_exports.object({
|
|
21199
|
-
kind: external_exports.literal(
|
|
21206
|
+
kind: external_exports.literal(CANONICAL_ROUTE_BY_KINDS[0])
|
|
21200
21207
|
}),
|
|
21201
21208
|
external_exports.object({
|
|
21202
|
-
kind: external_exports.literal(
|
|
21209
|
+
kind: external_exports.literal(CANONICAL_ROUTE_BY_KINDS[1]),
|
|
21203
21210
|
artifactType: external_exports.string().trim().min(1)
|
|
21204
21211
|
}),
|
|
21205
21212
|
external_exports.object({
|
|
21206
|
-
kind: external_exports.literal(
|
|
21213
|
+
kind: external_exports.literal(CANONICAL_ROUTE_BY_KINDS[2])
|
|
21207
21214
|
}),
|
|
21208
21215
|
// Use attributedSessions for follow-up delivery only. Spawn triggers that can
|
|
21209
21216
|
// overlap with attributed events should filter `$.auto.attributions` out.
|
|
21210
21217
|
external_exports.object({
|
|
21211
|
-
kind: external_exports.literal(
|
|
21218
|
+
kind: external_exports.literal(CANONICAL_ROUTE_BY_KINDS[3])
|
|
21219
|
+
})
|
|
21220
|
+
]);
|
|
21221
|
+
var LegacyRouteBySchema = external_exports.discriminatedUnion("kind", [
|
|
21222
|
+
external_exports.object({
|
|
21223
|
+
kind: external_exports.literal(LEGACY_ROUTE_BY_KINDS[0])
|
|
21212
21224
|
}),
|
|
21213
21225
|
external_exports.object({
|
|
21214
|
-
kind: external_exports.literal(
|
|
21226
|
+
kind: external_exports.literal(LEGACY_ROUTE_BY_KINDS[1])
|
|
21215
21227
|
})
|
|
21228
|
+
]).transform((routeBy) => {
|
|
21229
|
+
switch (routeBy.kind) {
|
|
21230
|
+
case "allLiveRuns":
|
|
21231
|
+
return { kind: "allLiveSessions" };
|
|
21232
|
+
case "attributedRuns":
|
|
21233
|
+
return { kind: "attributedSessions" };
|
|
21234
|
+
}
|
|
21235
|
+
});
|
|
21236
|
+
var RouteBySchema = external_exports.union([
|
|
21237
|
+
CanonicalRouteBySchema,
|
|
21238
|
+
LegacyRouteBySchema
|
|
21216
21239
|
]);
|
|
21240
|
+
var SingletonRouteBySchema = external_exports.object({
|
|
21241
|
+
kind: external_exports.literal("singleton")
|
|
21242
|
+
});
|
|
21217
21243
|
var TriggerRoutingSchema = external_exports.discriminatedUnion("kind", [
|
|
21218
21244
|
external_exports.object({
|
|
21219
21245
|
kind: external_exports.literal("spawn")
|
|
@@ -21225,9 +21251,7 @@ var TriggerRoutingSchema = external_exports.discriminatedUnion("kind", [
|
|
|
21225
21251
|
}),
|
|
21226
21252
|
external_exports.object({
|
|
21227
21253
|
kind: external_exports.literal("deliverOrSpawn"),
|
|
21228
|
-
routeBy:
|
|
21229
|
-
kind: external_exports.literal("singleton")
|
|
21230
|
-
})
|
|
21254
|
+
routeBy: SingletonRouteBySchema
|
|
21231
21255
|
})
|
|
21232
21256
|
]);
|
|
21233
21257
|
var SourceEventRequestSchema = external_exports.object({
|
|
@@ -21728,7 +21752,7 @@ function validateAttributedRunsTriggerPairing(triggers, context) {
|
|
|
21728
21752
|
continue;
|
|
21729
21753
|
}
|
|
21730
21754
|
const eventTrigger = trigger;
|
|
21731
|
-
if (!
|
|
21755
|
+
if (!isAttributedSessionsDeliverTrigger(eventTrigger) || !isChatMessageEvent(eventTrigger)) {
|
|
21732
21756
|
continue;
|
|
21733
21757
|
}
|
|
21734
21758
|
if (hasFilterValue(eventTrigger, "$.auto.authored", false)) {
|
|
@@ -21748,7 +21772,7 @@ function validateAttributedRunsTriggerPairing(triggers, context) {
|
|
|
21748
21772
|
continue;
|
|
21749
21773
|
}
|
|
21750
21774
|
for (const [deliverIndex, deliverTrigger] of triggers.entries()) {
|
|
21751
|
-
if (deliverTrigger.kind === "heartbeat" || !deliverTrigger.event || spawnIndex === deliverIndex || spawnTrigger.event !== deliverTrigger.event || !
|
|
21775
|
+
if (deliverTrigger.kind === "heartbeat" || !deliverTrigger.event || spawnIndex === deliverIndex || spawnTrigger.event !== deliverTrigger.event || !isAttributedSessionsDeliverTrigger(deliverTrigger)) {
|
|
21752
21776
|
continue;
|
|
21753
21777
|
}
|
|
21754
21778
|
if (hasAutoAttributionsExists(spawnTrigger, false) && hasAutoAttributionsExists(deliverTrigger, true)) {
|
|
@@ -21765,8 +21789,8 @@ function validateAttributedRunsTriggerPairing(triggers, context) {
|
|
|
21765
21789
|
function isSpawnTrigger(trigger) {
|
|
21766
21790
|
return trigger.routing.kind === "spawn";
|
|
21767
21791
|
}
|
|
21768
|
-
function
|
|
21769
|
-
return trigger.routing.kind === "deliver" &&
|
|
21792
|
+
function isAttributedSessionsDeliverTrigger(trigger) {
|
|
21793
|
+
return trigger.routing.kind === "deliver" && trigger.routing.routeBy.kind === "attributedSessions";
|
|
21770
21794
|
}
|
|
21771
21795
|
function hasAutoAttributionsExists(trigger, expected) {
|
|
21772
21796
|
const clause = trigger.where?.["$.auto.attributions"];
|
|
@@ -26296,7 +26320,7 @@ Object.assign(lookup, {
|
|
|
26296
26320
|
// package.json
|
|
26297
26321
|
var package_default = {
|
|
26298
26322
|
name: "@autohq/cli",
|
|
26299
|
-
version: "0.1.
|
|
26323
|
+
version: "0.1.156",
|
|
26300
26324
|
license: "SEE LICENSE IN README.md",
|
|
26301
26325
|
publishConfig: {
|
|
26302
26326
|
access: "public"
|
package/dist/index.js
CHANGED
|
@@ -16061,7 +16061,7 @@ var init_zod = __esm({
|
|
|
16061
16061
|
});
|
|
16062
16062
|
|
|
16063
16063
|
// ../../packages/schemas/src/ids.ts
|
|
16064
|
-
var OpaqueIdSchema, ProfileIdSchema, EnvironmentIdSchema, IdentityIdSchema, ConnectionIdSchema, ExternalAccountIdSchema, OrganizationIdSchema, ProjectIdSchema, ProviderGrantIdSchema, ServiceAccountIdSchema, AgentIdSchema, SessionIdSchema, SessionCommandIdSchema, RuntimeIdSchema, RuntimeBridgeLeaseIdSchema,
|
|
16064
|
+
var OpaqueIdSchema, ProfileIdSchema, EnvironmentIdSchema, IdentityIdSchema, ConnectionIdSchema, ExternalAccountIdSchema, OrganizationIdSchema, ProjectIdSchema, ProviderGrantIdSchema, ServiceAccountIdSchema, AgentIdSchema, SessionIdSchema, SessionCommandIdSchema, RuntimeIdSchema, RuntimeBridgeLeaseIdSchema, EnvironmentSetupTemplateIdSchema, UserIdSchema;
|
|
16065
16065
|
var init_ids = __esm({
|
|
16066
16066
|
"../../packages/schemas/src/ids.ts"() {
|
|
16067
16067
|
"use strict";
|
|
@@ -16081,7 +16081,7 @@ var init_ids = __esm({
|
|
|
16081
16081
|
SessionCommandIdSchema = OpaqueIdSchema.brand();
|
|
16082
16082
|
RuntimeIdSchema = OpaqueIdSchema.brand();
|
|
16083
16083
|
RuntimeBridgeLeaseIdSchema = OpaqueIdSchema.brand();
|
|
16084
|
-
|
|
16084
|
+
EnvironmentSetupTemplateIdSchema = OpaqueIdSchema.brand();
|
|
16085
16085
|
UserIdSchema = OpaqueIdSchema.brand();
|
|
16086
16086
|
}
|
|
16087
16087
|
});
|
|
@@ -17796,33 +17796,59 @@ var init_tools = __esm({
|
|
|
17796
17796
|
});
|
|
17797
17797
|
|
|
17798
17798
|
// ../../packages/schemas/src/trigger-router.ts
|
|
17799
|
-
var RouteBySchema, TriggerRoutingSchema, SourceEventRequestSchema, EventRoutingWorkflowInputSchema, HeartbeatTickWorkflowInputSchema, GithubPullRequestMergeabilityWorkflowInputSchema, GithubPullRequestMergeabilityWorkflowResultSchema, EventRoutingTriggerResultSchema;
|
|
17799
|
+
var CANONICAL_ROUTE_BY_KINDS, LEGACY_ROUTE_BY_KINDS, CanonicalRouteBySchema, LegacyRouteBySchema, RouteBySchema, SingletonRouteBySchema, TriggerRoutingSchema, SourceEventRequestSchema, EventRoutingWorkflowInputSchema, HeartbeatTickWorkflowInputSchema, GithubPullRequestMergeabilityWorkflowInputSchema, GithubPullRequestMergeabilityWorkflowResultSchema, EventRoutingTriggerResultSchema;
|
|
17800
17800
|
var init_trigger_router = __esm({
|
|
17801
17801
|
"../../packages/schemas/src/trigger-router.ts"() {
|
|
17802
17802
|
"use strict";
|
|
17803
17803
|
init_zod();
|
|
17804
17804
|
init_ids();
|
|
17805
17805
|
init_primitives();
|
|
17806
|
-
|
|
17806
|
+
CANONICAL_ROUTE_BY_KINDS = [
|
|
17807
|
+
"singleton",
|
|
17808
|
+
"ownedArtifact",
|
|
17809
|
+
"allLiveSessions",
|
|
17810
|
+
"attributedSessions"
|
|
17811
|
+
];
|
|
17812
|
+
LEGACY_ROUTE_BY_KINDS = ["allLiveRuns", "attributedRuns"];
|
|
17813
|
+
CanonicalRouteBySchema = external_exports.discriminatedUnion("kind", [
|
|
17807
17814
|
external_exports.object({
|
|
17808
|
-
kind: external_exports.literal(
|
|
17815
|
+
kind: external_exports.literal(CANONICAL_ROUTE_BY_KINDS[0])
|
|
17809
17816
|
}),
|
|
17810
17817
|
external_exports.object({
|
|
17811
|
-
kind: external_exports.literal(
|
|
17818
|
+
kind: external_exports.literal(CANONICAL_ROUTE_BY_KINDS[1]),
|
|
17812
17819
|
artifactType: external_exports.string().trim().min(1)
|
|
17813
17820
|
}),
|
|
17814
17821
|
external_exports.object({
|
|
17815
|
-
kind: external_exports.literal(
|
|
17822
|
+
kind: external_exports.literal(CANONICAL_ROUTE_BY_KINDS[2])
|
|
17816
17823
|
}),
|
|
17817
17824
|
// Use attributedSessions for follow-up delivery only. Spawn triggers that can
|
|
17818
17825
|
// overlap with attributed events should filter `$.auto.attributions` out.
|
|
17819
17826
|
external_exports.object({
|
|
17820
|
-
kind: external_exports.literal(
|
|
17827
|
+
kind: external_exports.literal(CANONICAL_ROUTE_BY_KINDS[3])
|
|
17828
|
+
})
|
|
17829
|
+
]);
|
|
17830
|
+
LegacyRouteBySchema = external_exports.discriminatedUnion("kind", [
|
|
17831
|
+
external_exports.object({
|
|
17832
|
+
kind: external_exports.literal(LEGACY_ROUTE_BY_KINDS[0])
|
|
17821
17833
|
}),
|
|
17822
17834
|
external_exports.object({
|
|
17823
|
-
kind: external_exports.literal(
|
|
17835
|
+
kind: external_exports.literal(LEGACY_ROUTE_BY_KINDS[1])
|
|
17824
17836
|
})
|
|
17837
|
+
]).transform((routeBy) => {
|
|
17838
|
+
switch (routeBy.kind) {
|
|
17839
|
+
case "allLiveRuns":
|
|
17840
|
+
return { kind: "allLiveSessions" };
|
|
17841
|
+
case "attributedRuns":
|
|
17842
|
+
return { kind: "attributedSessions" };
|
|
17843
|
+
}
|
|
17844
|
+
});
|
|
17845
|
+
RouteBySchema = external_exports.union([
|
|
17846
|
+
CanonicalRouteBySchema,
|
|
17847
|
+
LegacyRouteBySchema
|
|
17825
17848
|
]);
|
|
17849
|
+
SingletonRouteBySchema = external_exports.object({
|
|
17850
|
+
kind: external_exports.literal("singleton")
|
|
17851
|
+
});
|
|
17826
17852
|
TriggerRoutingSchema = external_exports.discriminatedUnion("kind", [
|
|
17827
17853
|
external_exports.object({
|
|
17828
17854
|
kind: external_exports.literal("spawn")
|
|
@@ -17834,9 +17860,7 @@ var init_trigger_router = __esm({
|
|
|
17834
17860
|
}),
|
|
17835
17861
|
external_exports.object({
|
|
17836
17862
|
kind: external_exports.literal("deliverOrSpawn"),
|
|
17837
|
-
routeBy:
|
|
17838
|
-
kind: external_exports.literal("singleton")
|
|
17839
|
-
})
|
|
17863
|
+
routeBy: SingletonRouteBySchema
|
|
17840
17864
|
})
|
|
17841
17865
|
]);
|
|
17842
17866
|
SourceEventRequestSchema = external_exports.object({
|
|
@@ -18075,7 +18099,7 @@ function validateAttributedRunsTriggerPairing(triggers, context) {
|
|
|
18075
18099
|
continue;
|
|
18076
18100
|
}
|
|
18077
18101
|
const eventTrigger = trigger;
|
|
18078
|
-
if (!
|
|
18102
|
+
if (!isAttributedSessionsDeliverTrigger(eventTrigger) || !isChatMessageEvent(eventTrigger)) {
|
|
18079
18103
|
continue;
|
|
18080
18104
|
}
|
|
18081
18105
|
if (hasFilterValue(eventTrigger, "$.auto.authored", false)) {
|
|
@@ -18095,7 +18119,7 @@ function validateAttributedRunsTriggerPairing(triggers, context) {
|
|
|
18095
18119
|
continue;
|
|
18096
18120
|
}
|
|
18097
18121
|
for (const [deliverIndex, deliverTrigger] of triggers.entries()) {
|
|
18098
|
-
if (deliverTrigger.kind === "heartbeat" || !deliverTrigger.event || spawnIndex === deliverIndex || spawnTrigger.event !== deliverTrigger.event || !
|
|
18122
|
+
if (deliverTrigger.kind === "heartbeat" || !deliverTrigger.event || spawnIndex === deliverIndex || spawnTrigger.event !== deliverTrigger.event || !isAttributedSessionsDeliverTrigger(deliverTrigger)) {
|
|
18099
18123
|
continue;
|
|
18100
18124
|
}
|
|
18101
18125
|
if (hasAutoAttributionsExists(spawnTrigger, false) && hasAutoAttributionsExists(deliverTrigger, true)) {
|
|
@@ -18112,8 +18136,8 @@ function validateAttributedRunsTriggerPairing(triggers, context) {
|
|
|
18112
18136
|
function isSpawnTrigger(trigger) {
|
|
18113
18137
|
return trigger.routing.kind === "spawn";
|
|
18114
18138
|
}
|
|
18115
|
-
function
|
|
18116
|
-
return trigger.routing.kind === "deliver" &&
|
|
18139
|
+
function isAttributedSessionsDeliverTrigger(trigger) {
|
|
18140
|
+
return trigger.routing.kind === "deliver" && trigger.routing.routeBy.kind === "attributedSessions";
|
|
18117
18141
|
}
|
|
18118
18142
|
function hasAutoAttributionsExists(trigger, expected) {
|
|
18119
18143
|
const clause = trigger.where?.["$.auto.attributions"];
|
|
@@ -21306,7 +21330,7 @@ var init_package = __esm({
|
|
|
21306
21330
|
"package.json"() {
|
|
21307
21331
|
package_default = {
|
|
21308
21332
|
name: "@autohq/cli",
|
|
21309
|
-
version: "0.1.
|
|
21333
|
+
version: "0.1.156",
|
|
21310
21334
|
license: "SEE LICENSE IN README.md",
|
|
21311
21335
|
publishConfig: {
|
|
21312
21336
|
access: "public"
|