@autohq/cli 0.1.319 → 0.1.321
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 +75 -10
- package/dist/index.js +82 -13
- package/package.json +1 -1
package/dist/agent-bridge.js
CHANGED
|
@@ -23432,7 +23432,7 @@ Object.assign(lookup, {
|
|
|
23432
23432
|
// package.json
|
|
23433
23433
|
var package_default = {
|
|
23434
23434
|
name: "@autohq/cli",
|
|
23435
|
-
version: "0.1.
|
|
23435
|
+
version: "0.1.321",
|
|
23436
23436
|
license: "SEE LICENSE IN README.md",
|
|
23437
23437
|
publishConfig: {
|
|
23438
23438
|
access: "public"
|
|
@@ -26264,24 +26264,29 @@ var RouteBySchema = external_exports.union([
|
|
|
26264
26264
|
var SingletonRouteBySchema = external_exports.object({
|
|
26265
26265
|
kind: external_exports.literal("singleton")
|
|
26266
26266
|
});
|
|
26267
|
-
var
|
|
26267
|
+
var TRIGGER_ON_UNMATCHED_POLICIES = [
|
|
26268
|
+
"drop",
|
|
26269
|
+
"warn",
|
|
26270
|
+
"error",
|
|
26271
|
+
"spawn"
|
|
26272
|
+
];
|
|
26273
|
+
var OnUnmatchedSchema = external_exports.enum(TRIGGER_ON_UNMATCHED_POLICIES).default("drop");
|
|
26268
26274
|
var SpawnBindSchema = external_exports.object({
|
|
26269
26275
|
target: TriggerBindingTargetTypeSchema
|
|
26270
26276
|
});
|
|
26271
|
-
var
|
|
26277
|
+
var CanonicalTriggerRoutingSchema = external_exports.discriminatedUnion("kind", [
|
|
26272
26278
|
external_exports.object({
|
|
26273
26279
|
kind: external_exports.literal("spawn"),
|
|
26274
26280
|
bind: SpawnBindSchema.optional()
|
|
26275
26281
|
}),
|
|
26282
|
+
// Deliver route: `routeBy` names the resolution strategy. Omitting it is
|
|
26283
|
+
// valid only for a concurrency-capped agent (validated at the agent level):
|
|
26284
|
+
// the delivery then resolves the agent's one live slot member.
|
|
26276
26285
|
external_exports.object({
|
|
26277
26286
|
kind: external_exports.literal("deliver"),
|
|
26278
|
-
routeBy: RouteBySchema,
|
|
26287
|
+
routeBy: RouteBySchema.optional(),
|
|
26279
26288
|
onUnmatched: OnUnmatchedSchema
|
|
26280
26289
|
}),
|
|
26281
|
-
external_exports.object({
|
|
26282
|
-
kind: external_exports.literal("deliverOrSpawn"),
|
|
26283
|
-
routeBy: SingletonRouteBySchema
|
|
26284
|
-
}),
|
|
26285
26290
|
// Bind route: resolve the event's routing target to the session bound to it
|
|
26286
26291
|
// for this agent and deliver a message, else apply the onUnmatched policy.
|
|
26287
26292
|
// The unified continuation primitive the foundation's resolveBoundSession
|
|
@@ -26292,6 +26297,18 @@ var TriggerRoutingSchema = external_exports.discriminatedUnion("kind", [
|
|
|
26292
26297
|
onUnmatched: OnUnmatchedSchema
|
|
26293
26298
|
})
|
|
26294
26299
|
]);
|
|
26300
|
+
var LegacyDeliverOrSpawnRoutingSchema = external_exports.object({
|
|
26301
|
+
kind: external_exports.literal("deliverOrSpawn"),
|
|
26302
|
+
routeBy: SingletonRouteBySchema
|
|
26303
|
+
}).transform(() => ({
|
|
26304
|
+
kind: "deliver",
|
|
26305
|
+
routeBy: { kind: "singleton" },
|
|
26306
|
+
onUnmatched: "spawn"
|
|
26307
|
+
}));
|
|
26308
|
+
var TriggerRoutingSchema = external_exports.union([
|
|
26309
|
+
CanonicalTriggerRoutingSchema,
|
|
26310
|
+
LegacyDeliverOrSpawnRoutingSchema
|
|
26311
|
+
]);
|
|
26295
26312
|
var SourceEventRequestSchema = external_exports.object({
|
|
26296
26313
|
organizationId: external_exports.string().trim().min(1),
|
|
26297
26314
|
projectId: external_exports.string().trim().min(1).nullable().optional(),
|
|
@@ -26425,6 +26442,11 @@ var AgentArchiveAfterInactiveSchema = external_exports.object({
|
|
|
26425
26442
|
var AgentSessionPolicySchema = external_exports.object({
|
|
26426
26443
|
archiveAfterInactive: AgentArchiveAfterInactiveSchema.optional()
|
|
26427
26444
|
}).strict().default({});
|
|
26445
|
+
var AgentConcurrencySchema = external_exports.number().int().refine((value2) => value2 === 1, {
|
|
26446
|
+
message: "Only `concurrency: 1` is supported; larger pools are a deliberate non-goal for now (see docs/singleton-session-refresh.md)"
|
|
26447
|
+
});
|
|
26448
|
+
var AgentReplacePolicySchema = external_exports.literal("auto");
|
|
26449
|
+
var AgentManagesSchema = external_exports.array(ResourceNameSchema).max(64);
|
|
26428
26450
|
var TriggerEventSchema = external_exports.string().trim().min(1);
|
|
26429
26451
|
var TriggerEventsSchema = external_exports.array(TriggerEventSchema).min(1).superRefine((events, context) => {
|
|
26430
26452
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -26668,6 +26690,10 @@ var AgentSpecFieldsSchema = external_exports.object({
|
|
|
26668
26690
|
mounts: external_exports.array(AgentMountSchema).default([]),
|
|
26669
26691
|
triggers: TriggersSchema.default([]),
|
|
26670
26692
|
session: AgentSessionPolicySchema,
|
|
26693
|
+
concurrency: AgentConcurrencySchema.optional(),
|
|
26694
|
+
replace: AgentReplacePolicySchema.optional(),
|
|
26695
|
+
onReplace: external_exports.string().trim().min(1).max(2e4).optional(),
|
|
26696
|
+
manages: AgentManagesSchema.optional(),
|
|
26671
26697
|
workingDirectory: external_exports.string().trim().min(1).optional(),
|
|
26672
26698
|
tools: AgentToolsSchema.default({})
|
|
26673
26699
|
});
|
|
@@ -26700,7 +26726,36 @@ var AgentApplySpecSchema = AgentSpecFieldsSchema.extend({
|
|
|
26700
26726
|
}).superRefine((spec, context) => {
|
|
26701
26727
|
validateRunnableConfig(spec, context);
|
|
26702
26728
|
validateAgentModelFieldsForHarness(spec, context);
|
|
26729
|
+
validateConcurrencyConfig(spec, context);
|
|
26703
26730
|
});
|
|
26731
|
+
function validateConcurrencyConfig(spec, context) {
|
|
26732
|
+
if (spec.concurrency === void 0 && spec.replace !== void 0) {
|
|
26733
|
+
context.addIssue({
|
|
26734
|
+
code: external_exports.ZodIssueCode.custom,
|
|
26735
|
+
path: ["replace"],
|
|
26736
|
+
message: "`replace` requires `concurrency` (the cap it manages)"
|
|
26737
|
+
});
|
|
26738
|
+
}
|
|
26739
|
+
if (spec.onReplace !== void 0 && spec.replace === void 0) {
|
|
26740
|
+
context.addIssue({
|
|
26741
|
+
code: external_exports.ZodIssueCode.custom,
|
|
26742
|
+
path: ["onReplace"],
|
|
26743
|
+
message: "`onReplace` requires `replace: auto` (it is the rebuild prompt delivered to platform-spawned replacements; nothing consumes it otherwise)"
|
|
26744
|
+
});
|
|
26745
|
+
}
|
|
26746
|
+
if (spec.concurrency !== void 0) {
|
|
26747
|
+
return;
|
|
26748
|
+
}
|
|
26749
|
+
for (const [index, trigger] of spec.triggers.entries()) {
|
|
26750
|
+
if (trigger.routing.kind === "deliver" && !trigger.routing.routeBy) {
|
|
26751
|
+
context.addIssue({
|
|
26752
|
+
code: external_exports.ZodIssueCode.custom,
|
|
26753
|
+
path: ["triggers", index, "routing", "routeBy"],
|
|
26754
|
+
message: "A `deliver` trigger without `routeBy` resolves the agent's concurrency slot; set `concurrency: 1` on the agent or name a routeBy strategy"
|
|
26755
|
+
});
|
|
26756
|
+
}
|
|
26757
|
+
}
|
|
26758
|
+
}
|
|
26704
26759
|
var AgentStatusSchema = external_exports.object({
|
|
26705
26760
|
runCount: external_exports.number().int().nonnegative().default(0),
|
|
26706
26761
|
lastActivityAt: external_exports.string().datetime().nullable().default(null)
|
|
@@ -26930,7 +26985,7 @@ function isSpawnTrigger(trigger) {
|
|
|
26930
26985
|
return trigger.routing.kind === "spawn";
|
|
26931
26986
|
}
|
|
26932
26987
|
function isAttributedSessionsDeliverTrigger(trigger) {
|
|
26933
|
-
return trigger.routing.kind === "deliver" && trigger.routing.routeBy
|
|
26988
|
+
return trigger.routing.kind === "deliver" && trigger.routing.routeBy?.kind === "attributedSessions";
|
|
26934
26989
|
}
|
|
26935
26990
|
function hasAutoAttributionsExists(trigger, expected) {
|
|
26936
26991
|
const clause = trigger.where?.["$.auto.attributions"];
|
|
@@ -32429,8 +32484,18 @@ var ProjectUsageAgentSummarySchema = UsageTotalsSchema.extend({
|
|
|
32429
32484
|
var ProjectUsageModelSummarySchema = UsageTotalsSchema.extend({
|
|
32430
32485
|
model: external_exports.string().trim().min(1)
|
|
32431
32486
|
});
|
|
32487
|
+
var ProjectUsageDayAgentSliceSchema = external_exports.object({
|
|
32488
|
+
agentResourceId: external_exports.string().trim().min(1),
|
|
32489
|
+
derivedCostUsd: NonNegativeUsdSchema
|
|
32490
|
+
});
|
|
32491
|
+
var ProjectUsageDayModelSliceSchema = external_exports.object({
|
|
32492
|
+
model: external_exports.string().trim().min(1),
|
|
32493
|
+
derivedCostUsd: NonNegativeUsdSchema
|
|
32494
|
+
});
|
|
32432
32495
|
var ProjectUsageDayPointSchema = UsageTotalsSchema.extend({
|
|
32433
|
-
date: UtcDateSchema
|
|
32496
|
+
date: UtcDateSchema,
|
|
32497
|
+
byAgent: external_exports.array(ProjectUsageDayAgentSliceSchema),
|
|
32498
|
+
byModel: external_exports.array(ProjectUsageDayModelSliceSchema)
|
|
32434
32499
|
});
|
|
32435
32500
|
var ProjectUsageResponseSchema = external_exports.object({
|
|
32436
32501
|
organizationId: OrganizationIdSchema,
|
package/dist/index.js
CHANGED
|
@@ -17742,7 +17742,7 @@ function normalizeLegacyHeartbeatTickWorkflowInput(input) {
|
|
|
17742
17742
|
agentResourceId: sessionResourceId
|
|
17743
17743
|
};
|
|
17744
17744
|
}
|
|
17745
|
-
var CANONICAL_ROUTE_BY_KINDS, LEGACY_ROUTE_BY_KINDS, CanonicalRouteBySchema, LegacyRouteBySchema, RouteBySchema, SingletonRouteBySchema, OnUnmatchedSchema, SpawnBindSchema, TriggerRoutingSchema, SourceEventRequestSchema, EventRoutingWorkflowInputSchema, HeartbeatTickWorkflowInputSchema, GithubPullRequestMergeabilityWorkflowInputSchema, GithubPullRequestMergeabilityWorkflowResultSchema, EventRoutingTriggerResultSchema;
|
|
17745
|
+
var CANONICAL_ROUTE_BY_KINDS, LEGACY_ROUTE_BY_KINDS, CanonicalRouteBySchema, LegacyRouteBySchema, RouteBySchema, SingletonRouteBySchema, TRIGGER_ON_UNMATCHED_POLICIES, OnUnmatchedSchema, SpawnBindSchema, CanonicalTriggerRoutingSchema, LegacyDeliverOrSpawnRoutingSchema, TriggerRoutingSchema, SourceEventRequestSchema, EventRoutingWorkflowInputSchema, HeartbeatTickWorkflowInputSchema, GithubPullRequestMergeabilityWorkflowInputSchema, GithubPullRequestMergeabilityWorkflowResultSchema, EventRoutingTriggerResultSchema;
|
|
17746
17746
|
var init_trigger_router = __esm({
|
|
17747
17747
|
"../../packages/schemas/src/trigger-router.ts"() {
|
|
17748
17748
|
"use strict";
|
|
@@ -17797,24 +17797,29 @@ var init_trigger_router = __esm({
|
|
|
17797
17797
|
SingletonRouteBySchema = external_exports.object({
|
|
17798
17798
|
kind: external_exports.literal("singleton")
|
|
17799
17799
|
});
|
|
17800
|
-
|
|
17800
|
+
TRIGGER_ON_UNMATCHED_POLICIES = [
|
|
17801
|
+
"drop",
|
|
17802
|
+
"warn",
|
|
17803
|
+
"error",
|
|
17804
|
+
"spawn"
|
|
17805
|
+
];
|
|
17806
|
+
OnUnmatchedSchema = external_exports.enum(TRIGGER_ON_UNMATCHED_POLICIES).default("drop");
|
|
17801
17807
|
SpawnBindSchema = external_exports.object({
|
|
17802
17808
|
target: TriggerBindingTargetTypeSchema
|
|
17803
17809
|
});
|
|
17804
|
-
|
|
17810
|
+
CanonicalTriggerRoutingSchema = external_exports.discriminatedUnion("kind", [
|
|
17805
17811
|
external_exports.object({
|
|
17806
17812
|
kind: external_exports.literal("spawn"),
|
|
17807
17813
|
bind: SpawnBindSchema.optional()
|
|
17808
17814
|
}),
|
|
17815
|
+
// Deliver route: `routeBy` names the resolution strategy. Omitting it is
|
|
17816
|
+
// valid only for a concurrency-capped agent (validated at the agent level):
|
|
17817
|
+
// the delivery then resolves the agent's one live slot member.
|
|
17809
17818
|
external_exports.object({
|
|
17810
17819
|
kind: external_exports.literal("deliver"),
|
|
17811
|
-
routeBy: RouteBySchema,
|
|
17820
|
+
routeBy: RouteBySchema.optional(),
|
|
17812
17821
|
onUnmatched: OnUnmatchedSchema
|
|
17813
17822
|
}),
|
|
17814
|
-
external_exports.object({
|
|
17815
|
-
kind: external_exports.literal("deliverOrSpawn"),
|
|
17816
|
-
routeBy: SingletonRouteBySchema
|
|
17817
|
-
}),
|
|
17818
17823
|
// Bind route: resolve the event's routing target to the session bound to it
|
|
17819
17824
|
// for this agent and deliver a message, else apply the onUnmatched policy.
|
|
17820
17825
|
// The unified continuation primitive the foundation's resolveBoundSession
|
|
@@ -17825,6 +17830,18 @@ var init_trigger_router = __esm({
|
|
|
17825
17830
|
onUnmatched: OnUnmatchedSchema
|
|
17826
17831
|
})
|
|
17827
17832
|
]);
|
|
17833
|
+
LegacyDeliverOrSpawnRoutingSchema = external_exports.object({
|
|
17834
|
+
kind: external_exports.literal("deliverOrSpawn"),
|
|
17835
|
+
routeBy: SingletonRouteBySchema
|
|
17836
|
+
}).transform(() => ({
|
|
17837
|
+
kind: "deliver",
|
|
17838
|
+
routeBy: { kind: "singleton" },
|
|
17839
|
+
onUnmatched: "spawn"
|
|
17840
|
+
}));
|
|
17841
|
+
TriggerRoutingSchema = external_exports.union([
|
|
17842
|
+
CanonicalTriggerRoutingSchema,
|
|
17843
|
+
LegacyDeliverOrSpawnRoutingSchema
|
|
17844
|
+
]);
|
|
17828
17845
|
SourceEventRequestSchema = external_exports.object({
|
|
17829
17846
|
organizationId: external_exports.string().trim().min(1),
|
|
17830
17847
|
projectId: external_exports.string().trim().min(1).nullable().optional(),
|
|
@@ -18092,6 +18109,34 @@ function validateRunnableConfig(spec, context) {
|
|
|
18092
18109
|
});
|
|
18093
18110
|
}
|
|
18094
18111
|
}
|
|
18112
|
+
function validateConcurrencyConfig(spec, context) {
|
|
18113
|
+
if (spec.concurrency === void 0 && spec.replace !== void 0) {
|
|
18114
|
+
context.addIssue({
|
|
18115
|
+
code: external_exports.ZodIssueCode.custom,
|
|
18116
|
+
path: ["replace"],
|
|
18117
|
+
message: "`replace` requires `concurrency` (the cap it manages)"
|
|
18118
|
+
});
|
|
18119
|
+
}
|
|
18120
|
+
if (spec.onReplace !== void 0 && spec.replace === void 0) {
|
|
18121
|
+
context.addIssue({
|
|
18122
|
+
code: external_exports.ZodIssueCode.custom,
|
|
18123
|
+
path: ["onReplace"],
|
|
18124
|
+
message: "`onReplace` requires `replace: auto` (it is the rebuild prompt delivered to platform-spawned replacements; nothing consumes it otherwise)"
|
|
18125
|
+
});
|
|
18126
|
+
}
|
|
18127
|
+
if (spec.concurrency !== void 0) {
|
|
18128
|
+
return;
|
|
18129
|
+
}
|
|
18130
|
+
for (const [index, trigger] of spec.triggers.entries()) {
|
|
18131
|
+
if (trigger.routing.kind === "deliver" && !trigger.routing.routeBy) {
|
|
18132
|
+
context.addIssue({
|
|
18133
|
+
code: external_exports.ZodIssueCode.custom,
|
|
18134
|
+
path: ["triggers", index, "routing", "routeBy"],
|
|
18135
|
+
message: "A `deliver` trigger without `routeBy` resolves the agent's concurrency slot; set `concurrency: 1` on the agent or name a routeBy strategy"
|
|
18136
|
+
});
|
|
18137
|
+
}
|
|
18138
|
+
}
|
|
18139
|
+
}
|
|
18095
18140
|
function validateTriggerChecks(trigger, context, eventKeys) {
|
|
18096
18141
|
const checks = trigger.checks ?? [];
|
|
18097
18142
|
if (checks.length === 0) {
|
|
@@ -18203,7 +18248,7 @@ function isSpawnTrigger(trigger) {
|
|
|
18203
18248
|
return trigger.routing.kind === "spawn";
|
|
18204
18249
|
}
|
|
18205
18250
|
function isAttributedSessionsDeliverTrigger(trigger) {
|
|
18206
|
-
return trigger.routing.kind === "deliver" && trigger.routing.routeBy
|
|
18251
|
+
return trigger.routing.kind === "deliver" && trigger.routing.routeBy?.kind === "attributedSessions";
|
|
18207
18252
|
}
|
|
18208
18253
|
function hasAutoAttributionsExists(trigger, expected) {
|
|
18209
18254
|
const clause = trigger.where?.["$.auto.attributions"];
|
|
@@ -18215,7 +18260,7 @@ function isChatMessageEvent(trigger) {
|
|
|
18215
18260
|
function hasFilterValue(trigger, path2, expected) {
|
|
18216
18261
|
return trigger.where?.[path2] === expected;
|
|
18217
18262
|
}
|
|
18218
|
-
var RESOURCE_KIND_AGENT, AGENT_HARNESSES, AgentHarnessSchema, TriggerFilterScalarSchema, TriggerFilterPathSchema, TriggerFilterClauseSchema, TriggerFilterSchema, TriggerCheckTimeoutSchema, AgentArchiveAfterInactiveSchema, AgentSessionPolicySchema, TriggerEventSchema, TriggerEventsSchema, PAYLOAD_PREFIXED_TEMPLATE_TOKEN, TriggerChecksField, TriggerEventSourceFields, TriggerSchema, ApplyTriggerSchema, HeartbeatTriggerSchema, ApplyHeartbeatTriggerSchema, TriggerDefinitionSchema, ApplyTriggerDefinitionSchema, TriggersSchema, ApplyTriggersSchema, AVATAR_ASSET_EXTENSIONS, MAX_AVATAR_ASSET_BYTES, MIN_AVATAR_ASSET_DIMENSION_PX, MAX_AVATAR_ASSET_DIMENSION_PX, PNG_SIGNATURE, AGENT_IDENTITY_DESCRIPTION_MAX_LENGTH, SHA256_HEX_PATTERN, AgentIdentitySchema, AgentSpecFieldsSchema, AgentSpecSchema, AgentApplySpecSchema, AgentStatusSchema, AgentResourceSchema, AgentApplyRequestSchema, ApplyTriggerReceiptSchema, AgentApplyResponseSchema, AGENT_TELEGRAM_IDENTITY_STATUSES, AgentTelegramIdentityStatusSchema, AgentPresenceIdentitySchema, AgentPresenceResponseSchema, AgentPresenceConnectRequestSchema, AgentPresenceConnectPendingSchema, AgentPresenceConnectResponseSchema, AgentPresenceIconRequestSchema, AgentPresenceIconResponseSchema, AgentPresenceCompleteResponseSchema;
|
|
18263
|
+
var RESOURCE_KIND_AGENT, AGENT_HARNESSES, AgentHarnessSchema, TriggerFilterScalarSchema, TriggerFilterPathSchema, TriggerFilterClauseSchema, TriggerFilterSchema, TriggerCheckTimeoutSchema, AgentArchiveAfterInactiveSchema, AgentSessionPolicySchema, AgentConcurrencySchema, AgentReplacePolicySchema, AgentManagesSchema, TriggerEventSchema, TriggerEventsSchema, PAYLOAD_PREFIXED_TEMPLATE_TOKEN, TriggerChecksField, TriggerEventSourceFields, TriggerSchema, ApplyTriggerSchema, HeartbeatTriggerSchema, ApplyHeartbeatTriggerSchema, TriggerDefinitionSchema, ApplyTriggerDefinitionSchema, TriggersSchema, ApplyTriggersSchema, AVATAR_ASSET_EXTENSIONS, MAX_AVATAR_ASSET_BYTES, MIN_AVATAR_ASSET_DIMENSION_PX, MAX_AVATAR_ASSET_DIMENSION_PX, PNG_SIGNATURE, AGENT_IDENTITY_DESCRIPTION_MAX_LENGTH, SHA256_HEX_PATTERN, AgentIdentitySchema, AgentSpecFieldsSchema, AgentSpecSchema, AgentApplySpecSchema, AgentStatusSchema, AgentResourceSchema, AgentApplyRequestSchema, ApplyTriggerReceiptSchema, AgentApplyResponseSchema, AGENT_TELEGRAM_IDENTITY_STATUSES, AgentTelegramIdentityStatusSchema, AgentPresenceIdentitySchema, AgentPresenceResponseSchema, AgentPresenceConnectRequestSchema, AgentPresenceConnectPendingSchema, AgentPresenceConnectResponseSchema, AgentPresenceIconRequestSchema, AgentPresenceIconResponseSchema, AgentPresenceCompleteResponseSchema;
|
|
18219
18264
|
var init_agents = __esm({
|
|
18220
18265
|
"../../packages/schemas/src/agents.ts"() {
|
|
18221
18266
|
"use strict";
|
|
@@ -18273,6 +18318,11 @@ var init_agents = __esm({
|
|
|
18273
18318
|
AgentSessionPolicySchema = external_exports.object({
|
|
18274
18319
|
archiveAfterInactive: AgentArchiveAfterInactiveSchema.optional()
|
|
18275
18320
|
}).strict().default({});
|
|
18321
|
+
AgentConcurrencySchema = external_exports.number().int().refine((value) => value === 1, {
|
|
18322
|
+
message: "Only `concurrency: 1` is supported; larger pools are a deliberate non-goal for now (see docs/singleton-session-refresh.md)"
|
|
18323
|
+
});
|
|
18324
|
+
AgentReplacePolicySchema = external_exports.literal("auto");
|
|
18325
|
+
AgentManagesSchema = external_exports.array(ResourceNameSchema).max(64);
|
|
18276
18326
|
TriggerEventSchema = external_exports.string().trim().min(1);
|
|
18277
18327
|
TriggerEventsSchema = external_exports.array(TriggerEventSchema).min(1).superRefine((events, context) => {
|
|
18278
18328
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -18398,6 +18448,10 @@ var init_agents = __esm({
|
|
|
18398
18448
|
mounts: external_exports.array(AgentMountSchema).default([]),
|
|
18399
18449
|
triggers: TriggersSchema.default([]),
|
|
18400
18450
|
session: AgentSessionPolicySchema,
|
|
18451
|
+
concurrency: AgentConcurrencySchema.optional(),
|
|
18452
|
+
replace: AgentReplacePolicySchema.optional(),
|
|
18453
|
+
onReplace: external_exports.string().trim().min(1).max(2e4).optional(),
|
|
18454
|
+
manages: AgentManagesSchema.optional(),
|
|
18401
18455
|
workingDirectory: external_exports.string().trim().min(1).optional(),
|
|
18402
18456
|
tools: AgentToolsSchema.default({})
|
|
18403
18457
|
});
|
|
@@ -18414,6 +18468,7 @@ var init_agents = __esm({
|
|
|
18414
18468
|
}).superRefine((spec, context) => {
|
|
18415
18469
|
validateRunnableConfig(spec, context);
|
|
18416
18470
|
validateAgentModelFieldsForHarness(spec, context);
|
|
18471
|
+
validateConcurrencyConfig(spec, context);
|
|
18417
18472
|
});
|
|
18418
18473
|
AgentStatusSchema = external_exports.object({
|
|
18419
18474
|
runCount: external_exports.number().int().nonnegative().default(0),
|
|
@@ -24218,7 +24273,7 @@ var init_temporal = __esm({
|
|
|
24218
24273
|
});
|
|
24219
24274
|
|
|
24220
24275
|
// ../../packages/schemas/src/usage.ts
|
|
24221
|
-
var UsageHarnessSchema, ModelCredentialFundingSourceSchema, NonNegativeTokenCountSchema, NonNegativeUsdSchema, UsageEventSchema, UsageEventRecordSchema, UsageTotalsSchema, SessionUsageModelSummarySchema, SessionUsageResponseSchema, PROJECT_USAGE_RANGE_KEYS, ProjectUsageRangeKeySchema, UtcDateSchema, ProjectUsageTotalsSchema, ProjectUsageAgentSummarySchema, ProjectUsageModelSummarySchema, ProjectUsageDayPointSchema, ProjectUsageResponseSchema;
|
|
24276
|
+
var UsageHarnessSchema, ModelCredentialFundingSourceSchema, NonNegativeTokenCountSchema, NonNegativeUsdSchema, UsageEventSchema, UsageEventRecordSchema, UsageTotalsSchema, SessionUsageModelSummarySchema, SessionUsageResponseSchema, PROJECT_USAGE_RANGE_KEYS, ProjectUsageRangeKeySchema, UtcDateSchema, ProjectUsageTotalsSchema, ProjectUsageAgentSummarySchema, ProjectUsageModelSummarySchema, ProjectUsageDayAgentSliceSchema, ProjectUsageDayModelSliceSchema, ProjectUsageDayPointSchema, ProjectUsageResponseSchema;
|
|
24222
24277
|
var init_usage = __esm({
|
|
24223
24278
|
"../../packages/schemas/src/usage.ts"() {
|
|
24224
24279
|
"use strict";
|
|
@@ -24308,8 +24363,18 @@ var init_usage = __esm({
|
|
|
24308
24363
|
ProjectUsageModelSummarySchema = UsageTotalsSchema.extend({
|
|
24309
24364
|
model: external_exports.string().trim().min(1)
|
|
24310
24365
|
});
|
|
24366
|
+
ProjectUsageDayAgentSliceSchema = external_exports.object({
|
|
24367
|
+
agentResourceId: external_exports.string().trim().min(1),
|
|
24368
|
+
derivedCostUsd: NonNegativeUsdSchema
|
|
24369
|
+
});
|
|
24370
|
+
ProjectUsageDayModelSliceSchema = external_exports.object({
|
|
24371
|
+
model: external_exports.string().trim().min(1),
|
|
24372
|
+
derivedCostUsd: NonNegativeUsdSchema
|
|
24373
|
+
});
|
|
24311
24374
|
ProjectUsageDayPointSchema = UsageTotalsSchema.extend({
|
|
24312
|
-
date: UtcDateSchema
|
|
24375
|
+
date: UtcDateSchema,
|
|
24376
|
+
byAgent: external_exports.array(ProjectUsageDayAgentSliceSchema),
|
|
24377
|
+
byModel: external_exports.array(ProjectUsageDayModelSliceSchema)
|
|
24313
24378
|
});
|
|
24314
24379
|
ProjectUsageResponseSchema = external_exports.object({
|
|
24315
24380
|
organizationId: OrganizationIdSchema,
|
|
@@ -27107,7 +27172,7 @@ var init_package = __esm({
|
|
|
27107
27172
|
"package.json"() {
|
|
27108
27173
|
package_default = {
|
|
27109
27174
|
name: "@autohq/cli",
|
|
27110
|
-
version: "0.1.
|
|
27175
|
+
version: "0.1.321",
|
|
27111
27176
|
license: "SEE LICENSE IN README.md",
|
|
27112
27177
|
publishConfig: {
|
|
27113
27178
|
access: "public"
|
|
@@ -28742,6 +28807,10 @@ var init_agent_fields = __esm({
|
|
|
28742
28807
|
mounts: mountsField(),
|
|
28743
28808
|
triggers: triggersField(),
|
|
28744
28809
|
session: specField(),
|
|
28810
|
+
concurrency: specField(),
|
|
28811
|
+
replace: specField(),
|
|
28812
|
+
onReplace: fileBackedStringField(),
|
|
28813
|
+
manages: specField(),
|
|
28745
28814
|
workingDirectory: specField(),
|
|
28746
28815
|
tools: namedMapField()
|
|
28747
28816
|
};
|