@autohq/cli 0.1.318 → 0.1.320
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 +122 -17
- package/dist/index.js +132 -20
- package/package.json +1 -1
package/dist/agent-bridge.js
CHANGED
|
@@ -19589,7 +19589,8 @@ var AgentBridgeCodexReasoningEffortSchema = external_exports.enum([
|
|
|
19589
19589
|
"minimal",
|
|
19590
19590
|
"low",
|
|
19591
19591
|
"medium",
|
|
19592
|
-
"high"
|
|
19592
|
+
"high",
|
|
19593
|
+
"xhigh"
|
|
19593
19594
|
]);
|
|
19594
19595
|
var AgentBridgeClaudeConfigSchema = AgentBridgeHarnessBaseConfigSchema.extend({
|
|
19595
19596
|
model: AgentBridgeModelSelectionSchema.optional(),
|
|
@@ -23431,7 +23432,7 @@ Object.assign(lookup, {
|
|
|
23431
23432
|
// package.json
|
|
23432
23433
|
var package_default = {
|
|
23433
23434
|
name: "@autohq/cli",
|
|
23434
|
-
version: "0.1.
|
|
23435
|
+
version: "0.1.320",
|
|
23435
23436
|
license: "SEE LICENSE IN README.md",
|
|
23436
23437
|
publishConfig: {
|
|
23437
23438
|
access: "public"
|
|
@@ -25263,7 +25264,8 @@ var CODEX_REASONING_EFFORTS = [
|
|
|
25263
25264
|
"minimal",
|
|
25264
25265
|
"low",
|
|
25265
25266
|
"medium",
|
|
25266
|
-
"high"
|
|
25267
|
+
"high",
|
|
25268
|
+
"xhigh"
|
|
25267
25269
|
];
|
|
25268
25270
|
var ClaudeCodeReasoningEffortSchema = external_exports.enum(
|
|
25269
25271
|
CLAUDE_CODE_REASONING_EFFORTS
|
|
@@ -25309,7 +25311,11 @@ var HARNESS_MODEL_RULES = {
|
|
|
25309
25311
|
]
|
|
25310
25312
|
},
|
|
25311
25313
|
openProviderPatterns: {},
|
|
25312
|
-
|
|
25314
|
+
// The pinned Claude Agent SDK applies "high" when the effort option is
|
|
25315
|
+
// omitted, so "high" is what default-effort sessions have always run at.
|
|
25316
|
+
defaultReasoningEffort: "high",
|
|
25317
|
+
reasoningEfforts: CLAUDE_CODE_REASONING_EFFORTS,
|
|
25318
|
+
reasoningEffortsByModel: {}
|
|
25313
25319
|
},
|
|
25314
25320
|
codex: {
|
|
25315
25321
|
defaultProvider: "openai",
|
|
@@ -25321,12 +25327,43 @@ var HARNESS_MODEL_RULES = {
|
|
|
25321
25327
|
openProviderPatterns: {
|
|
25322
25328
|
openrouter: OPENROUTER_MODEL_SLUG_PATTERN
|
|
25323
25329
|
},
|
|
25324
|
-
|
|
25330
|
+
defaultReasoningEffort: "medium",
|
|
25331
|
+
reasoningEfforts: CODEX_REASONING_EFFORTS,
|
|
25332
|
+
reasoningEffortsByModel: {
|
|
25333
|
+
openai: {
|
|
25334
|
+
"gpt-5.3-codex": {
|
|
25335
|
+
defaultEffort: "medium",
|
|
25336
|
+
efforts: CODEX_REASONING_EFFORTS
|
|
25337
|
+
}
|
|
25338
|
+
},
|
|
25339
|
+
openrouter: {
|
|
25340
|
+
"z-ai/glm-5.2": {
|
|
25341
|
+
defaultEffort: "high",
|
|
25342
|
+
efforts: ["high", "xhigh"]
|
|
25343
|
+
},
|
|
25344
|
+
"anthropic/claude-sonnet-5": {
|
|
25345
|
+
defaultEffort: "medium",
|
|
25346
|
+
efforts: ["low", "medium", "high", "xhigh"]
|
|
25347
|
+
},
|
|
25348
|
+
"moonshotai/kimi-k2.7-code": {
|
|
25349
|
+
defaultEffort: "high",
|
|
25350
|
+
efforts: ["high", "xhigh"]
|
|
25351
|
+
}
|
|
25352
|
+
}
|
|
25353
|
+
}
|
|
25325
25354
|
}
|
|
25326
25355
|
};
|
|
25327
25356
|
function modelRulesForHarness(harness) {
|
|
25328
25357
|
return HARNESS_MODEL_RULES[harness];
|
|
25329
25358
|
}
|
|
25359
|
+
function reasoningEffortRulesForModelSelection(input) {
|
|
25360
|
+
const rules = modelRulesForHarness(input.harness);
|
|
25361
|
+
const model = resolveModelSelectionForHarness(input.harness, input.model);
|
|
25362
|
+
return rules.reasoningEffortsByModel[model.provider]?.[model.id] ?? {
|
|
25363
|
+
defaultEffort: rules.defaultReasoningEffort,
|
|
25364
|
+
efforts: rules.reasoningEfforts
|
|
25365
|
+
};
|
|
25366
|
+
}
|
|
25330
25367
|
function resolveModelSelectionForHarness(harness, selection) {
|
|
25331
25368
|
const rules = modelRulesForHarness(harness);
|
|
25332
25369
|
const provider = selection?.provider ?? rules.defaultProvider;
|
|
@@ -25339,8 +25376,11 @@ function validateReasoningEffortForHarness(input) {
|
|
|
25339
25376
|
if (!input.reasoningEffort) {
|
|
25340
25377
|
return;
|
|
25341
25378
|
}
|
|
25342
|
-
const rules =
|
|
25343
|
-
|
|
25379
|
+
const rules = reasoningEffortRulesForModelSelection({
|
|
25380
|
+
harness: input.harness,
|
|
25381
|
+
model: input.model
|
|
25382
|
+
});
|
|
25383
|
+
if (!rules.efforts.includes(input.reasoningEffort)) {
|
|
25344
25384
|
throw new InvalidModelSelectionError(
|
|
25345
25385
|
`${input.harness} does not support reasoning effort "${input.reasoningEffort}"`
|
|
25346
25386
|
);
|
|
@@ -25351,9 +25391,10 @@ function validateAgentModelFieldsForHarness(spec, context) {
|
|
|
25351
25391
|
if (harness !== "claude-code" && harness !== "codex") {
|
|
25352
25392
|
return;
|
|
25353
25393
|
}
|
|
25394
|
+
let resolvedModel;
|
|
25354
25395
|
if (spec.model) {
|
|
25355
25396
|
try {
|
|
25356
|
-
resolveModelSelectionForHarness(harness, spec.model);
|
|
25397
|
+
resolvedModel = resolveModelSelectionForHarness(harness, spec.model);
|
|
25357
25398
|
} catch (error51) {
|
|
25358
25399
|
context.addIssue({
|
|
25359
25400
|
code: external_exports.ZodIssueCode.custom,
|
|
@@ -25365,6 +25406,7 @@ function validateAgentModelFieldsForHarness(spec, context) {
|
|
|
25365
25406
|
try {
|
|
25366
25407
|
validateReasoningEffortForHarness({
|
|
25367
25408
|
harness,
|
|
25409
|
+
model: resolvedModel,
|
|
25368
25410
|
reasoningEffort: spec.reasoningEffort
|
|
25369
25411
|
});
|
|
25370
25412
|
} catch (error51) {
|
|
@@ -26222,24 +26264,29 @@ var RouteBySchema = external_exports.union([
|
|
|
26222
26264
|
var SingletonRouteBySchema = external_exports.object({
|
|
26223
26265
|
kind: external_exports.literal("singleton")
|
|
26224
26266
|
});
|
|
26225
|
-
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");
|
|
26226
26274
|
var SpawnBindSchema = external_exports.object({
|
|
26227
26275
|
target: TriggerBindingTargetTypeSchema
|
|
26228
26276
|
});
|
|
26229
|
-
var
|
|
26277
|
+
var CanonicalTriggerRoutingSchema = external_exports.discriminatedUnion("kind", [
|
|
26230
26278
|
external_exports.object({
|
|
26231
26279
|
kind: external_exports.literal("spawn"),
|
|
26232
26280
|
bind: SpawnBindSchema.optional()
|
|
26233
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.
|
|
26234
26285
|
external_exports.object({
|
|
26235
26286
|
kind: external_exports.literal("deliver"),
|
|
26236
|
-
routeBy: RouteBySchema,
|
|
26287
|
+
routeBy: RouteBySchema.optional(),
|
|
26237
26288
|
onUnmatched: OnUnmatchedSchema
|
|
26238
26289
|
}),
|
|
26239
|
-
external_exports.object({
|
|
26240
|
-
kind: external_exports.literal("deliverOrSpawn"),
|
|
26241
|
-
routeBy: SingletonRouteBySchema
|
|
26242
|
-
}),
|
|
26243
26290
|
// Bind route: resolve the event's routing target to the session bound to it
|
|
26244
26291
|
// for this agent and deliver a message, else apply the onUnmatched policy.
|
|
26245
26292
|
// The unified continuation primitive the foundation's resolveBoundSession
|
|
@@ -26250,6 +26297,18 @@ var TriggerRoutingSchema = external_exports.discriminatedUnion("kind", [
|
|
|
26250
26297
|
onUnmatched: OnUnmatchedSchema
|
|
26251
26298
|
})
|
|
26252
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
|
+
]);
|
|
26253
26312
|
var SourceEventRequestSchema = external_exports.object({
|
|
26254
26313
|
organizationId: external_exports.string().trim().min(1),
|
|
26255
26314
|
projectId: external_exports.string().trim().min(1).nullable().optional(),
|
|
@@ -26383,6 +26442,10 @@ var AgentArchiveAfterInactiveSchema = external_exports.object({
|
|
|
26383
26442
|
var AgentSessionPolicySchema = external_exports.object({
|
|
26384
26443
|
archiveAfterInactive: AgentArchiveAfterInactiveSchema.optional()
|
|
26385
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");
|
|
26386
26449
|
var TriggerEventSchema = external_exports.string().trim().min(1);
|
|
26387
26450
|
var TriggerEventsSchema = external_exports.array(TriggerEventSchema).min(1).superRefine((events, context) => {
|
|
26388
26451
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -26626,6 +26689,9 @@ var AgentSpecFieldsSchema = external_exports.object({
|
|
|
26626
26689
|
mounts: external_exports.array(AgentMountSchema).default([]),
|
|
26627
26690
|
triggers: TriggersSchema.default([]),
|
|
26628
26691
|
session: AgentSessionPolicySchema,
|
|
26692
|
+
concurrency: AgentConcurrencySchema.optional(),
|
|
26693
|
+
replace: AgentReplacePolicySchema.optional(),
|
|
26694
|
+
onReplace: external_exports.string().trim().min(1).max(2e4).optional(),
|
|
26629
26695
|
workingDirectory: external_exports.string().trim().min(1).optional(),
|
|
26630
26696
|
tools: AgentToolsSchema.default({})
|
|
26631
26697
|
});
|
|
@@ -26658,7 +26724,36 @@ var AgentApplySpecSchema = AgentSpecFieldsSchema.extend({
|
|
|
26658
26724
|
}).superRefine((spec, context) => {
|
|
26659
26725
|
validateRunnableConfig(spec, context);
|
|
26660
26726
|
validateAgentModelFieldsForHarness(spec, context);
|
|
26727
|
+
validateConcurrencyConfig(spec, context);
|
|
26661
26728
|
});
|
|
26729
|
+
function validateConcurrencyConfig(spec, context) {
|
|
26730
|
+
if (spec.concurrency === void 0 && spec.replace !== void 0) {
|
|
26731
|
+
context.addIssue({
|
|
26732
|
+
code: external_exports.ZodIssueCode.custom,
|
|
26733
|
+
path: ["replace"],
|
|
26734
|
+
message: "`replace` requires `concurrency` (the cap it manages)"
|
|
26735
|
+
});
|
|
26736
|
+
}
|
|
26737
|
+
if (spec.onReplace !== void 0 && spec.replace === void 0) {
|
|
26738
|
+
context.addIssue({
|
|
26739
|
+
code: external_exports.ZodIssueCode.custom,
|
|
26740
|
+
path: ["onReplace"],
|
|
26741
|
+
message: "`onReplace` requires `replace: auto` (it is the rebuild prompt delivered to platform-spawned replacements; nothing consumes it otherwise)"
|
|
26742
|
+
});
|
|
26743
|
+
}
|
|
26744
|
+
if (spec.concurrency !== void 0) {
|
|
26745
|
+
return;
|
|
26746
|
+
}
|
|
26747
|
+
for (const [index, trigger] of spec.triggers.entries()) {
|
|
26748
|
+
if (trigger.routing.kind === "deliver" && !trigger.routing.routeBy) {
|
|
26749
|
+
context.addIssue({
|
|
26750
|
+
code: external_exports.ZodIssueCode.custom,
|
|
26751
|
+
path: ["triggers", index, "routing", "routeBy"],
|
|
26752
|
+
message: "A `deliver` trigger without `routeBy` resolves the agent's concurrency slot; set `concurrency: 1` on the agent or name a routeBy strategy"
|
|
26753
|
+
});
|
|
26754
|
+
}
|
|
26755
|
+
}
|
|
26756
|
+
}
|
|
26662
26757
|
var AgentStatusSchema = external_exports.object({
|
|
26663
26758
|
runCount: external_exports.number().int().nonnegative().default(0),
|
|
26664
26759
|
lastActivityAt: external_exports.string().datetime().nullable().default(null)
|
|
@@ -26888,7 +26983,7 @@ function isSpawnTrigger(trigger) {
|
|
|
26888
26983
|
return trigger.routing.kind === "spawn";
|
|
26889
26984
|
}
|
|
26890
26985
|
function isAttributedSessionsDeliverTrigger(trigger) {
|
|
26891
|
-
return trigger.routing.kind === "deliver" && trigger.routing.routeBy
|
|
26986
|
+
return trigger.routing.kind === "deliver" && trigger.routing.routeBy?.kind === "attributedSessions";
|
|
26892
26987
|
}
|
|
26893
26988
|
function hasAutoAttributionsExists(trigger, expected) {
|
|
26894
26989
|
const clause = trigger.where?.["$.auto.attributions"];
|
|
@@ -32387,8 +32482,18 @@ var ProjectUsageAgentSummarySchema = UsageTotalsSchema.extend({
|
|
|
32387
32482
|
var ProjectUsageModelSummarySchema = UsageTotalsSchema.extend({
|
|
32388
32483
|
model: external_exports.string().trim().min(1)
|
|
32389
32484
|
});
|
|
32485
|
+
var ProjectUsageDayAgentSliceSchema = external_exports.object({
|
|
32486
|
+
agentResourceId: external_exports.string().trim().min(1),
|
|
32487
|
+
derivedCostUsd: NonNegativeUsdSchema
|
|
32488
|
+
});
|
|
32489
|
+
var ProjectUsageDayModelSliceSchema = external_exports.object({
|
|
32490
|
+
model: external_exports.string().trim().min(1),
|
|
32491
|
+
derivedCostUsd: NonNegativeUsdSchema
|
|
32492
|
+
});
|
|
32390
32493
|
var ProjectUsageDayPointSchema = UsageTotalsSchema.extend({
|
|
32391
|
-
date: UtcDateSchema
|
|
32494
|
+
date: UtcDateSchema,
|
|
32495
|
+
byAgent: external_exports.array(ProjectUsageDayAgentSliceSchema),
|
|
32496
|
+
byModel: external_exports.array(ProjectUsageDayModelSliceSchema)
|
|
32392
32497
|
});
|
|
32393
32498
|
var ProjectUsageResponseSchema = external_exports.object({
|
|
32394
32499
|
organizationId: OrganizationIdSchema,
|
package/dist/index.js
CHANGED
|
@@ -16680,6 +16680,14 @@ var init_conversation_reducer = __esm({
|
|
|
16680
16680
|
function modelRulesForHarness(harness) {
|
|
16681
16681
|
return HARNESS_MODEL_RULES[harness];
|
|
16682
16682
|
}
|
|
16683
|
+
function reasoningEffortRulesForModelSelection(input) {
|
|
16684
|
+
const rules = modelRulesForHarness(input.harness);
|
|
16685
|
+
const model = resolveModelSelectionForHarness(input.harness, input.model);
|
|
16686
|
+
return rules.reasoningEffortsByModel[model.provider]?.[model.id] ?? {
|
|
16687
|
+
defaultEffort: rules.defaultReasoningEffort,
|
|
16688
|
+
efforts: rules.reasoningEfforts
|
|
16689
|
+
};
|
|
16690
|
+
}
|
|
16683
16691
|
function resolveModelSelectionForHarness(harness, selection) {
|
|
16684
16692
|
const rules = modelRulesForHarness(harness);
|
|
16685
16693
|
const provider = selection?.provider ?? rules.defaultProvider;
|
|
@@ -16692,8 +16700,11 @@ function validateReasoningEffortForHarness(input) {
|
|
|
16692
16700
|
if (!input.reasoningEffort) {
|
|
16693
16701
|
return;
|
|
16694
16702
|
}
|
|
16695
|
-
const rules =
|
|
16696
|
-
|
|
16703
|
+
const rules = reasoningEffortRulesForModelSelection({
|
|
16704
|
+
harness: input.harness,
|
|
16705
|
+
model: input.model
|
|
16706
|
+
});
|
|
16707
|
+
if (!rules.efforts.includes(input.reasoningEffort)) {
|
|
16697
16708
|
throw new InvalidModelSelectionError(
|
|
16698
16709
|
`${input.harness} does not support reasoning effort "${input.reasoningEffort}"`
|
|
16699
16710
|
);
|
|
@@ -16704,9 +16715,10 @@ function validateAgentModelFieldsForHarness(spec, context) {
|
|
|
16704
16715
|
if (harness !== "claude-code" && harness !== "codex") {
|
|
16705
16716
|
return;
|
|
16706
16717
|
}
|
|
16718
|
+
let resolvedModel;
|
|
16707
16719
|
if (spec.model) {
|
|
16708
16720
|
try {
|
|
16709
|
-
resolveModelSelectionForHarness(harness, spec.model);
|
|
16721
|
+
resolvedModel = resolveModelSelectionForHarness(harness, spec.model);
|
|
16710
16722
|
} catch (error51) {
|
|
16711
16723
|
context.addIssue({
|
|
16712
16724
|
code: external_exports.ZodIssueCode.custom,
|
|
@@ -16718,6 +16730,7 @@ function validateAgentModelFieldsForHarness(spec, context) {
|
|
|
16718
16730
|
try {
|
|
16719
16731
|
validateReasoningEffortForHarness({
|
|
16720
16732
|
harness,
|
|
16733
|
+
model: resolvedModel,
|
|
16721
16734
|
reasoningEffort: spec.reasoningEffort
|
|
16722
16735
|
});
|
|
16723
16736
|
} catch (error51) {
|
|
@@ -16777,7 +16790,8 @@ var init_model_selection = __esm({
|
|
|
16777
16790
|
"minimal",
|
|
16778
16791
|
"low",
|
|
16779
16792
|
"medium",
|
|
16780
|
-
"high"
|
|
16793
|
+
"high",
|
|
16794
|
+
"xhigh"
|
|
16781
16795
|
];
|
|
16782
16796
|
ClaudeCodeReasoningEffortSchema = external_exports.enum(
|
|
16783
16797
|
CLAUDE_CODE_REASONING_EFFORTS
|
|
@@ -16823,7 +16837,11 @@ var init_model_selection = __esm({
|
|
|
16823
16837
|
]
|
|
16824
16838
|
},
|
|
16825
16839
|
openProviderPatterns: {},
|
|
16826
|
-
|
|
16840
|
+
// The pinned Claude Agent SDK applies "high" when the effort option is
|
|
16841
|
+
// omitted, so "high" is what default-effort sessions have always run at.
|
|
16842
|
+
defaultReasoningEffort: "high",
|
|
16843
|
+
reasoningEfforts: CLAUDE_CODE_REASONING_EFFORTS,
|
|
16844
|
+
reasoningEffortsByModel: {}
|
|
16827
16845
|
},
|
|
16828
16846
|
codex: {
|
|
16829
16847
|
defaultProvider: "openai",
|
|
@@ -16835,7 +16853,30 @@ var init_model_selection = __esm({
|
|
|
16835
16853
|
openProviderPatterns: {
|
|
16836
16854
|
openrouter: OPENROUTER_MODEL_SLUG_PATTERN
|
|
16837
16855
|
},
|
|
16838
|
-
|
|
16856
|
+
defaultReasoningEffort: "medium",
|
|
16857
|
+
reasoningEfforts: CODEX_REASONING_EFFORTS,
|
|
16858
|
+
reasoningEffortsByModel: {
|
|
16859
|
+
openai: {
|
|
16860
|
+
"gpt-5.3-codex": {
|
|
16861
|
+
defaultEffort: "medium",
|
|
16862
|
+
efforts: CODEX_REASONING_EFFORTS
|
|
16863
|
+
}
|
|
16864
|
+
},
|
|
16865
|
+
openrouter: {
|
|
16866
|
+
"z-ai/glm-5.2": {
|
|
16867
|
+
defaultEffort: "high",
|
|
16868
|
+
efforts: ["high", "xhigh"]
|
|
16869
|
+
},
|
|
16870
|
+
"anthropic/claude-sonnet-5": {
|
|
16871
|
+
defaultEffort: "medium",
|
|
16872
|
+
efforts: ["low", "medium", "high", "xhigh"]
|
|
16873
|
+
},
|
|
16874
|
+
"moonshotai/kimi-k2.7-code": {
|
|
16875
|
+
defaultEffort: "high",
|
|
16876
|
+
efforts: ["high", "xhigh"]
|
|
16877
|
+
}
|
|
16878
|
+
}
|
|
16879
|
+
}
|
|
16839
16880
|
}
|
|
16840
16881
|
};
|
|
16841
16882
|
}
|
|
@@ -17701,7 +17742,7 @@ function normalizeLegacyHeartbeatTickWorkflowInput(input) {
|
|
|
17701
17742
|
agentResourceId: sessionResourceId
|
|
17702
17743
|
};
|
|
17703
17744
|
}
|
|
17704
|
-
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;
|
|
17705
17746
|
var init_trigger_router = __esm({
|
|
17706
17747
|
"../../packages/schemas/src/trigger-router.ts"() {
|
|
17707
17748
|
"use strict";
|
|
@@ -17756,24 +17797,29 @@ var init_trigger_router = __esm({
|
|
|
17756
17797
|
SingletonRouteBySchema = external_exports.object({
|
|
17757
17798
|
kind: external_exports.literal("singleton")
|
|
17758
17799
|
});
|
|
17759
|
-
|
|
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");
|
|
17760
17807
|
SpawnBindSchema = external_exports.object({
|
|
17761
17808
|
target: TriggerBindingTargetTypeSchema
|
|
17762
17809
|
});
|
|
17763
|
-
|
|
17810
|
+
CanonicalTriggerRoutingSchema = external_exports.discriminatedUnion("kind", [
|
|
17764
17811
|
external_exports.object({
|
|
17765
17812
|
kind: external_exports.literal("spawn"),
|
|
17766
17813
|
bind: SpawnBindSchema.optional()
|
|
17767
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.
|
|
17768
17818
|
external_exports.object({
|
|
17769
17819
|
kind: external_exports.literal("deliver"),
|
|
17770
|
-
routeBy: RouteBySchema,
|
|
17820
|
+
routeBy: RouteBySchema.optional(),
|
|
17771
17821
|
onUnmatched: OnUnmatchedSchema
|
|
17772
17822
|
}),
|
|
17773
|
-
external_exports.object({
|
|
17774
|
-
kind: external_exports.literal("deliverOrSpawn"),
|
|
17775
|
-
routeBy: SingletonRouteBySchema
|
|
17776
|
-
}),
|
|
17777
17823
|
// Bind route: resolve the event's routing target to the session bound to it
|
|
17778
17824
|
// for this agent and deliver a message, else apply the onUnmatched policy.
|
|
17779
17825
|
// The unified continuation primitive the foundation's resolveBoundSession
|
|
@@ -17784,6 +17830,18 @@ var init_trigger_router = __esm({
|
|
|
17784
17830
|
onUnmatched: OnUnmatchedSchema
|
|
17785
17831
|
})
|
|
17786
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
|
+
]);
|
|
17787
17845
|
SourceEventRequestSchema = external_exports.object({
|
|
17788
17846
|
organizationId: external_exports.string().trim().min(1),
|
|
17789
17847
|
projectId: external_exports.string().trim().min(1).nullable().optional(),
|
|
@@ -18051,6 +18109,34 @@ function validateRunnableConfig(spec, context) {
|
|
|
18051
18109
|
});
|
|
18052
18110
|
}
|
|
18053
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
|
+
}
|
|
18054
18140
|
function validateTriggerChecks(trigger, context, eventKeys) {
|
|
18055
18141
|
const checks = trigger.checks ?? [];
|
|
18056
18142
|
if (checks.length === 0) {
|
|
@@ -18162,7 +18248,7 @@ function isSpawnTrigger(trigger) {
|
|
|
18162
18248
|
return trigger.routing.kind === "spawn";
|
|
18163
18249
|
}
|
|
18164
18250
|
function isAttributedSessionsDeliverTrigger(trigger) {
|
|
18165
|
-
return trigger.routing.kind === "deliver" && trigger.routing.routeBy
|
|
18251
|
+
return trigger.routing.kind === "deliver" && trigger.routing.routeBy?.kind === "attributedSessions";
|
|
18166
18252
|
}
|
|
18167
18253
|
function hasAutoAttributionsExists(trigger, expected) {
|
|
18168
18254
|
const clause = trigger.where?.["$.auto.attributions"];
|
|
@@ -18174,7 +18260,7 @@ function isChatMessageEvent(trigger) {
|
|
|
18174
18260
|
function hasFilterValue(trigger, path2, expected) {
|
|
18175
18261
|
return trigger.where?.[path2] === expected;
|
|
18176
18262
|
}
|
|
18177
|
-
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, 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;
|
|
18178
18264
|
var init_agents = __esm({
|
|
18179
18265
|
"../../packages/schemas/src/agents.ts"() {
|
|
18180
18266
|
"use strict";
|
|
@@ -18232,6 +18318,10 @@ var init_agents = __esm({
|
|
|
18232
18318
|
AgentSessionPolicySchema = external_exports.object({
|
|
18233
18319
|
archiveAfterInactive: AgentArchiveAfterInactiveSchema.optional()
|
|
18234
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");
|
|
18235
18325
|
TriggerEventSchema = external_exports.string().trim().min(1);
|
|
18236
18326
|
TriggerEventsSchema = external_exports.array(TriggerEventSchema).min(1).superRefine((events, context) => {
|
|
18237
18327
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -18357,6 +18447,9 @@ var init_agents = __esm({
|
|
|
18357
18447
|
mounts: external_exports.array(AgentMountSchema).default([]),
|
|
18358
18448
|
triggers: TriggersSchema.default([]),
|
|
18359
18449
|
session: AgentSessionPolicySchema,
|
|
18450
|
+
concurrency: AgentConcurrencySchema.optional(),
|
|
18451
|
+
replace: AgentReplacePolicySchema.optional(),
|
|
18452
|
+
onReplace: external_exports.string().trim().min(1).max(2e4).optional(),
|
|
18360
18453
|
workingDirectory: external_exports.string().trim().min(1).optional(),
|
|
18361
18454
|
tools: AgentToolsSchema.default({})
|
|
18362
18455
|
});
|
|
@@ -18373,6 +18466,7 @@ var init_agents = __esm({
|
|
|
18373
18466
|
}).superRefine((spec, context) => {
|
|
18374
18467
|
validateRunnableConfig(spec, context);
|
|
18375
18468
|
validateAgentModelFieldsForHarness(spec, context);
|
|
18469
|
+
validateConcurrencyConfig(spec, context);
|
|
18376
18470
|
});
|
|
18377
18471
|
AgentStatusSchema = external_exports.object({
|
|
18378
18472
|
runCount: external_exports.number().int().nonnegative().default(0),
|
|
@@ -24177,7 +24271,7 @@ var init_temporal = __esm({
|
|
|
24177
24271
|
});
|
|
24178
24272
|
|
|
24179
24273
|
// ../../packages/schemas/src/usage.ts
|
|
24180
|
-
var UsageHarnessSchema, ModelCredentialFundingSourceSchema, NonNegativeTokenCountSchema, NonNegativeUsdSchema, UsageEventSchema, UsageEventRecordSchema, UsageTotalsSchema, SessionUsageModelSummarySchema, SessionUsageResponseSchema, PROJECT_USAGE_RANGE_KEYS, ProjectUsageRangeKeySchema, UtcDateSchema, ProjectUsageTotalsSchema, ProjectUsageAgentSummarySchema, ProjectUsageModelSummarySchema, ProjectUsageDayPointSchema, ProjectUsageResponseSchema;
|
|
24274
|
+
var UsageHarnessSchema, ModelCredentialFundingSourceSchema, NonNegativeTokenCountSchema, NonNegativeUsdSchema, UsageEventSchema, UsageEventRecordSchema, UsageTotalsSchema, SessionUsageModelSummarySchema, SessionUsageResponseSchema, PROJECT_USAGE_RANGE_KEYS, ProjectUsageRangeKeySchema, UtcDateSchema, ProjectUsageTotalsSchema, ProjectUsageAgentSummarySchema, ProjectUsageModelSummarySchema, ProjectUsageDayAgentSliceSchema, ProjectUsageDayModelSliceSchema, ProjectUsageDayPointSchema, ProjectUsageResponseSchema;
|
|
24181
24275
|
var init_usage = __esm({
|
|
24182
24276
|
"../../packages/schemas/src/usage.ts"() {
|
|
24183
24277
|
"use strict";
|
|
@@ -24267,8 +24361,18 @@ var init_usage = __esm({
|
|
|
24267
24361
|
ProjectUsageModelSummarySchema = UsageTotalsSchema.extend({
|
|
24268
24362
|
model: external_exports.string().trim().min(1)
|
|
24269
24363
|
});
|
|
24364
|
+
ProjectUsageDayAgentSliceSchema = external_exports.object({
|
|
24365
|
+
agentResourceId: external_exports.string().trim().min(1),
|
|
24366
|
+
derivedCostUsd: NonNegativeUsdSchema
|
|
24367
|
+
});
|
|
24368
|
+
ProjectUsageDayModelSliceSchema = external_exports.object({
|
|
24369
|
+
model: external_exports.string().trim().min(1),
|
|
24370
|
+
derivedCostUsd: NonNegativeUsdSchema
|
|
24371
|
+
});
|
|
24270
24372
|
ProjectUsageDayPointSchema = UsageTotalsSchema.extend({
|
|
24271
|
-
date: UtcDateSchema
|
|
24373
|
+
date: UtcDateSchema,
|
|
24374
|
+
byAgent: external_exports.array(ProjectUsageDayAgentSliceSchema),
|
|
24375
|
+
byModel: external_exports.array(ProjectUsageDayModelSliceSchema)
|
|
24272
24376
|
});
|
|
24273
24377
|
ProjectUsageResponseSchema = external_exports.object({
|
|
24274
24378
|
organizationId: OrganizationIdSchema,
|
|
@@ -27066,7 +27170,7 @@ var init_package = __esm({
|
|
|
27066
27170
|
"package.json"() {
|
|
27067
27171
|
package_default = {
|
|
27068
27172
|
name: "@autohq/cli",
|
|
27069
|
-
version: "0.1.
|
|
27173
|
+
version: "0.1.320",
|
|
27070
27174
|
license: "SEE LICENSE IN README.md",
|
|
27071
27175
|
publishConfig: {
|
|
27072
27176
|
access: "public"
|
|
@@ -27679,6 +27783,8 @@ var init_authoring = __esm({
|
|
|
27679
27783
|
AGENT_FILE_EXTENSIONS = [".yaml", ".yml", ".json"];
|
|
27680
27784
|
AGENT_SPEC_FIELDS = /* @__PURE__ */ new Set([
|
|
27681
27785
|
"harness",
|
|
27786
|
+
"model",
|
|
27787
|
+
"reasoningEffort",
|
|
27682
27788
|
"systemPrompt",
|
|
27683
27789
|
"environment",
|
|
27684
27790
|
"identity",
|
|
@@ -28688,6 +28794,8 @@ var init_agent_fields = __esm({
|
|
|
28688
28794
|
labels: metadataField(),
|
|
28689
28795
|
annotations: metadataField(),
|
|
28690
28796
|
harness: specField(),
|
|
28797
|
+
model: specField(),
|
|
28798
|
+
reasoningEffort: specField(),
|
|
28691
28799
|
systemPrompt: fileBackedStringField(),
|
|
28692
28800
|
environment: inlineEnvironmentField(),
|
|
28693
28801
|
identity: inlineIdentityField(),
|
|
@@ -28697,6 +28805,9 @@ var init_agent_fields = __esm({
|
|
|
28697
28805
|
mounts: mountsField(),
|
|
28698
28806
|
triggers: triggersField(),
|
|
28699
28807
|
session: specField(),
|
|
28808
|
+
concurrency: specField(),
|
|
28809
|
+
replace: specField(),
|
|
28810
|
+
onReplace: fileBackedStringField(),
|
|
28700
28811
|
workingDirectory: specField(),
|
|
28701
28812
|
tools: namedMapField()
|
|
28702
28813
|
};
|
|
@@ -37000,7 +37111,8 @@ var AgentBridgeCodexReasoningEffortSchema = external_exports.enum([
|
|
|
37000
37111
|
"minimal",
|
|
37001
37112
|
"low",
|
|
37002
37113
|
"medium",
|
|
37003
|
-
"high"
|
|
37114
|
+
"high",
|
|
37115
|
+
"xhigh"
|
|
37004
37116
|
]);
|
|
37005
37117
|
var AgentBridgeClaudeConfigSchema = AgentBridgeHarnessBaseConfigSchema.extend({
|
|
37006
37118
|
model: AgentBridgeModelSelectionSchema.optional(),
|