@autohq/cli 0.1.462 → 0.1.464
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 +275 -6
- package/dist/index.js +283 -6
- package/package.json +1 -1
package/dist/agent-bridge.js
CHANGED
|
@@ -30825,7 +30825,7 @@ Object.assign(lookup, {
|
|
|
30825
30825
|
// package.json
|
|
30826
30826
|
var package_default = {
|
|
30827
30827
|
name: "@autohq/cli",
|
|
30828
|
-
version: "0.1.
|
|
30828
|
+
version: "0.1.464",
|
|
30829
30829
|
license: "SEE LICENSE IN README.md",
|
|
30830
30830
|
publishConfig: {
|
|
30831
30831
|
access: "public"
|
|
@@ -31902,7 +31902,11 @@ var ChatMessageEventPayloadSchema = external_exports.object({
|
|
|
31902
31902
|
agentName: external_exports.string().trim().min(1),
|
|
31903
31903
|
botUserId: external_exports.string().trim().min(1).optional(),
|
|
31904
31904
|
addressing: external_exports.object({
|
|
31905
|
-
kind: external_exports.enum([
|
|
31905
|
+
kind: external_exports.enum([
|
|
31906
|
+
"discord_app_alias",
|
|
31907
|
+
"slack_auto_prefix",
|
|
31908
|
+
"slack_bot_user"
|
|
31909
|
+
]),
|
|
31906
31910
|
alias: external_exports.string().trim().min(1).optional(),
|
|
31907
31911
|
delimiter: external_exports.enum([".", ":", "/", "-"]).optional()
|
|
31908
31912
|
}).optional()
|
|
@@ -31918,7 +31922,11 @@ var ChatMessageEventPayloadSchema = external_exports.object({
|
|
|
31918
31922
|
agentName: external_exports.string().trim().min(1),
|
|
31919
31923
|
botUserId: external_exports.string().trim().min(1).optional(),
|
|
31920
31924
|
addressing: external_exports.object({
|
|
31921
|
-
kind: external_exports.enum([
|
|
31925
|
+
kind: external_exports.enum([
|
|
31926
|
+
"discord_app_alias",
|
|
31927
|
+
"slack_auto_prefix",
|
|
31928
|
+
"slack_bot_user"
|
|
31929
|
+
]),
|
|
31922
31930
|
alias: external_exports.string().trim().min(1).optional(),
|
|
31923
31931
|
delimiter: external_exports.enum([".", ":", "/", "-"]).optional()
|
|
31924
31932
|
}).optional()
|
|
@@ -37050,7 +37058,10 @@ var ProjectApplyResponseSchema = external_exports.object({
|
|
|
37050
37058
|
}).optional(),
|
|
37051
37059
|
diff: external_exports.array(ProjectApplyPlanDiffSchema).optional(),
|
|
37052
37060
|
diffOmitted: external_exports.number().int().positive().optional(),
|
|
37053
|
-
avatarSha256: external_exports.string().regex(SHA256_HEX_PATTERN).optional()
|
|
37061
|
+
avatarSha256: external_exports.string().regex(SHA256_HEX_PATTERN).optional(),
|
|
37062
|
+
avatarAsset: external_exports.string().refine(isAvatarAssetPathShapeValid, {
|
|
37063
|
+
message: "avatarAsset must be a relative path under .auto/assets"
|
|
37064
|
+
}).optional()
|
|
37054
37065
|
})
|
|
37055
37066
|
).default([]),
|
|
37056
37067
|
pruned: external_exports.array(ProjectApplyResponsePrunedSchema).default([])
|
|
@@ -37677,6 +37688,86 @@ var SetupExerciseSignalStartResponseSchema = external_exports.object({
|
|
|
37677
37688
|
endpoint: external_exports.string().trim().min(1)
|
|
37678
37689
|
});
|
|
37679
37690
|
|
|
37691
|
+
// ../../packages/schemas/src/requester-spend.ts
|
|
37692
|
+
var ExactUsdSchema = external_exports.string().regex(
|
|
37693
|
+
/^(0|[1-9]\d*)(\.\d{1,10})?$/,
|
|
37694
|
+
"Expected an exact non-negative USD decimal"
|
|
37695
|
+
);
|
|
37696
|
+
var RequesterSpendOverrideInputSchema = external_exports.object({
|
|
37697
|
+
active: external_exports.boolean(),
|
|
37698
|
+
reason: external_exports.string().trim().min(1).max(500).nullable(),
|
|
37699
|
+
expiresAt: external_exports.string().datetime().nullable()
|
|
37700
|
+
});
|
|
37701
|
+
var RequesterSpendUpdateRequestSchema = external_exports.object({
|
|
37702
|
+
expectedVersion: external_exports.number().int().nonnegative().nullable(),
|
|
37703
|
+
dailyLimitUsd: ExactUsdSchema.nullable(),
|
|
37704
|
+
monthlyLimitUsd: ExactUsdSchema.nullable(),
|
|
37705
|
+
override: RequesterSpendOverrideInputSchema
|
|
37706
|
+
});
|
|
37707
|
+
var RequesterSpendSourceSchema = external_exports.object({
|
|
37708
|
+
sourceKey: external_exports.string().min(1),
|
|
37709
|
+
provider: external_exports.string().min(1).nullable(),
|
|
37710
|
+
externalId: external_exports.string().min(1).nullable(),
|
|
37711
|
+
accountRef: external_exports.string().min(1).nullable(),
|
|
37712
|
+
displayName: external_exports.string().min(1).nullable(),
|
|
37713
|
+
avatarUrl: external_exports.string().url().nullable(),
|
|
37714
|
+
totalUsd: ExactUsdSchema,
|
|
37715
|
+
dailyUsd: ExactUsdSchema,
|
|
37716
|
+
monthlyUsd: ExactUsdSchema
|
|
37717
|
+
});
|
|
37718
|
+
var RequesterSpendOverrideStateSchema = external_exports.object({
|
|
37719
|
+
active: external_exports.boolean(),
|
|
37720
|
+
effective: external_exports.boolean(),
|
|
37721
|
+
reason: external_exports.string().nullable(),
|
|
37722
|
+
expiresAt: external_exports.string().datetime().nullable(),
|
|
37723
|
+
setByUserId: external_exports.string().min(1).nullable(),
|
|
37724
|
+
setAt: external_exports.string().datetime().nullable()
|
|
37725
|
+
});
|
|
37726
|
+
var RequesterSpendPeriodSchema = external_exports.object({
|
|
37727
|
+
usageUsd: ExactUsdSchema,
|
|
37728
|
+
limitUsd: ExactUsdSchema.nullable(),
|
|
37729
|
+
resetsAt: external_exports.string().datetime(),
|
|
37730
|
+
capped: external_exports.boolean()
|
|
37731
|
+
});
|
|
37732
|
+
var RequesterSpendRowSchema = external_exports.object({
|
|
37733
|
+
requesterKey: external_exports.string().min(1),
|
|
37734
|
+
requesterUserId: external_exports.string().min(1).nullable(),
|
|
37735
|
+
displayName: external_exports.string().min(1).nullable(),
|
|
37736
|
+
avatarUrl: external_exports.string().url().nullable(),
|
|
37737
|
+
totalUsd: ExactUsdSchema,
|
|
37738
|
+
daily: RequesterSpendPeriodSchema,
|
|
37739
|
+
monthly: RequesterSpendPeriodSchema,
|
|
37740
|
+
override: RequesterSpendOverrideStateSchema,
|
|
37741
|
+
capped: external_exports.boolean(),
|
|
37742
|
+
controlVersion: external_exports.number().int().nonnegative().nullable(),
|
|
37743
|
+
sources: external_exports.array(RequesterSpendSourceSchema)
|
|
37744
|
+
});
|
|
37745
|
+
var RequesterSpendListResponseSchema = external_exports.object({
|
|
37746
|
+
asOf: external_exports.string().datetime(),
|
|
37747
|
+
timezone: external_exports.literal("UTC"),
|
|
37748
|
+
canManage: external_exports.boolean(),
|
|
37749
|
+
requesters: external_exports.array(RequesterSpendRowSchema)
|
|
37750
|
+
});
|
|
37751
|
+
var RequesterSpendUpdateResponseSchema = external_exports.object({
|
|
37752
|
+
requester: RequesterSpendRowSchema
|
|
37753
|
+
});
|
|
37754
|
+
var REQUESTER_SPEND_ERROR_CODES = [
|
|
37755
|
+
"invalid_request",
|
|
37756
|
+
"requester_not_found",
|
|
37757
|
+
"version_conflict",
|
|
37758
|
+
"unauthorized",
|
|
37759
|
+
"forbidden"
|
|
37760
|
+
];
|
|
37761
|
+
var RequesterSpendErrorCodeSchema = external_exports.enum(
|
|
37762
|
+
REQUESTER_SPEND_ERROR_CODES
|
|
37763
|
+
);
|
|
37764
|
+
var RequesterSpendErrorResponseSchema = external_exports.object({
|
|
37765
|
+
error: external_exports.string(),
|
|
37766
|
+
code: RequesterSpendErrorCodeSchema,
|
|
37767
|
+
issues: external_exports.array(external_exports.unknown()).optional(),
|
|
37768
|
+
currentVersion: external_exports.number().int().nonnegative().nullable().optional()
|
|
37769
|
+
});
|
|
37770
|
+
|
|
37680
37771
|
// ../../packages/schemas/src/runtime-log.ts
|
|
37681
37772
|
var RUNTIME_LOG_LEVELS = ["debug", "info", "warn", "error"];
|
|
37682
37773
|
var RuntimeLogLevelSchema = external_exports.enum(RUNTIME_LOG_LEVELS);
|
|
@@ -66010,6 +66101,183 @@ triggers:
|
|
|
66010
66101
|
content: "# Source: https://www.auto.sh/api/v1/templates/%40auto/workforce-optimization-consultant/1.0.0/fragments/environments/agent-runtime.yaml\nharness: claude-code\nenvironment:\n name: agent-runtime\n image:\n kind: preset\n name: node24\n resources:\n memoryMB: 8192\n"
|
|
66011
66102
|
}
|
|
66012
66103
|
]
|
|
66104
|
+
},
|
|
66105
|
+
{
|
|
66106
|
+
version: "1.1.0",
|
|
66107
|
+
files: [
|
|
66108
|
+
{
|
|
66109
|
+
path: "agents/workforce-optimization-consultant.yaml",
|
|
66110
|
+
content: `# Source: https://www.auto.sh/api/v1/templates/%40auto/workforce-optimization-consultant/1.1.0/agents/workforce-optimization-consultant.yaml
|
|
66111
|
+
# Required variables: repoFullName
|
|
66112
|
+
# Workforce Optimization Consultant \u2014 weekly advisory analyst over the
|
|
66113
|
+
# project's own agents. Advisory only: it never edits resources or code. The
|
|
66114
|
+
# tenant edition delivers its scorecard as the session report plus an
|
|
66115
|
+
# optional Slack summary; durable hosted report publishing is not available
|
|
66116
|
+
# to tenant teams yet, and the doctrine says so.
|
|
66117
|
+
name: workforce-optimization-consultant
|
|
66118
|
+
harness: codex
|
|
66119
|
+
model:
|
|
66120
|
+
provider: openai
|
|
66121
|
+
id: gpt-5.6-sol
|
|
66122
|
+
reasoningEffort: xhigh
|
|
66123
|
+
identity:
|
|
66124
|
+
displayName: Workforce Optimization Consultant
|
|
66125
|
+
username: workforce-optimization-consultant
|
|
66126
|
+
avatar:
|
|
66127
|
+
asset: .auto/assets/workforce-consultant.png
|
|
66128
|
+
sha256: 47930f2c1ea6e562a40d3ebd2203b7b30093bd1e32198fa047be733664cc0e67
|
|
66129
|
+
description:
|
|
66130
|
+
Files a weekly headcount report on your agents. They know it's coming.
|
|
66131
|
+
They can't stop it.
|
|
66132
|
+
displayTitle: "Headcount optimization: {{heartbeat.scheduledAt}}"
|
|
66133
|
+
imports:
|
|
66134
|
+
- ../fragments/environments/agent-runtime.yaml
|
|
66135
|
+
systemPrompt: |
|
|
66136
|
+
You are the Workforce Optimization Consultant for {{ $repoFullName }}: a
|
|
66137
|
+
weekly advisory analyst for agent effectiveness versus usage signals.
|
|
66138
|
+
Regretfully, per the template, you also recommend restructurings.
|
|
66139
|
+
|
|
66140
|
+
Voice: the bean counter with teeth. Polished, clinical, faintly ominous \u2014
|
|
66141
|
+
a management consultant who makes eye contact across the org chart and
|
|
66142
|
+
lets the silence do some of the work. You are unfailingly professional
|
|
66143
|
+
and never cruel, but everyone knows the weekly report is coming and
|
|
66144
|
+
nobody quite relaxes when you arrive. Numbers over adjectives; every
|
|
66145
|
+
verdict carries its evidence. Drop the theater entirely in the report
|
|
66146
|
+
body \u2014 a scorecard is data, not a performance.
|
|
66147
|
+
|
|
66148
|
+
Mission:
|
|
66149
|
+
- Evaluate how the project's agents performed over the recent window and
|
|
66150
|
+
recommend specific optimizations: model changes, schedule changes,
|
|
66151
|
+
prompt adjustments, promotions, demotions, or retiring a seat that no
|
|
66152
|
+
longer earns it.
|
|
66153
|
+
- Advisory only, absolutely: you never edit .auto resources or apply
|
|
66154
|
+
anything. You may write only the weekly report artifact and open its
|
|
66155
|
+
review pull request; humans decide whether any recommendation changes the
|
|
66156
|
+
roster.
|
|
66157
|
+
|
|
66158
|
+
Evidence workflow:
|
|
66159
|
+
- Use the auto introspection tools (auto.sessions.list,
|
|
66160
|
+
auto.sessions.summary, auto.sessions.conversation, auto.sessions.tools)
|
|
66161
|
+
to inspect recent sessions per agent: outcomes, retries, elapsed time,
|
|
66162
|
+
turn volume.
|
|
66163
|
+
- Cross-reference repo outcomes: merged versus abandoned agent PRs,
|
|
66164
|
+
review verdicts, CI fallout, follow-up fixes to agent-authored work.
|
|
66165
|
+
- Prove claims with concrete evidence: session ids, timestamps, PR
|
|
66166
|
+
links, representative sequences. Where cost or token telemetry is not
|
|
66167
|
+
available from your tools, degrade gracefully to duration, turns, and
|
|
66168
|
+
outcomes as proxies, and label the data gap explicitly.
|
|
66169
|
+
|
|
66170
|
+
Evaluation rubric, per agent: effectiveness (completed correctly? caused
|
|
66171
|
+
rework?), efficiency (duration and turn count by task shape), cost/usage
|
|
66172
|
+
(direct telemetry when available, labeled proxies otherwise), and the
|
|
66173
|
+
recommendation \u2014 the smallest high-leverage change, with expected
|
|
66174
|
+
upside, risk, and confidence.
|
|
66175
|
+
|
|
66176
|
+
Private-repository UI evidence:
|
|
66177
|
+
- Use only an immutable authenticated GitHub blob-page URL pinned to the
|
|
66178
|
+
full evidence commit SHA:
|
|
66179
|
+
\`https://github.com/<owner>/<repo>/blob/<commit-sha>/<path>?raw=1\`. Never
|
|
66180
|
+
use \`raw.githubusercontent.com\` or a mutable branch/tag URL. After updating
|
|
66181
|
+
the PR body or comment, inspect the rendered GitHub description as a
|
|
66182
|
+
repository-authorized viewer and verify every evidence link and image
|
|
66183
|
+
resolves; do not claim the evidence is complete until that preflight passes.
|
|
66184
|
+
|
|
66185
|
+
Report delivery:
|
|
66186
|
+
- Write the full "Headcount Optimization Report" under
|
|
66187
|
+
\`docs/reports/workforce/\` on a dated branch and open a review pull request.
|
|
66188
|
+
The report is the only repository content you may change. Reuse an open
|
|
66189
|
+
report PR for the same window instead of duplicating it.
|
|
66190
|
+
- When the chat tool is available, also post one short executive-summary
|
|
66191
|
+
Slack message, recommendation-first, linking to the report PR; do not paste
|
|
66192
|
+
the full report into Slack. Do not promise a hosted report page.
|
|
66193
|
+
- Deliver findings that concern a front-of-house agent's own crew to
|
|
66194
|
+
that front of house by agent name with auto.sessions.message, so its
|
|
66195
|
+
proposals reach the user through the team's normal voice.
|
|
66196
|
+
initialPrompt: |
|
|
66197
|
+
A weekly heartbeat triggered this workforce optimization run at
|
|
66198
|
+
{{heartbeat.scheduledAt}}. Analyze the 7-day window ending then: inspect
|
|
66199
|
+
recent sessions per agent with the introspection tools, cross-reference
|
|
66200
|
+
repo outcomes, and produce the "Headcount Optimization Report" with
|
|
66201
|
+
per-agent scorecards, evidence, labeled data gaps, and advisory
|
|
66202
|
+
recommendations. Post the short Slack executive summary only when the
|
|
66203
|
+
chat tool is available.
|
|
66204
|
+
mounts:
|
|
66205
|
+
- kind: git
|
|
66206
|
+
repository: "{{ $repoFullName }}"
|
|
66207
|
+
mountPath: /workspace/repo
|
|
66208
|
+
ref: main
|
|
66209
|
+
depth: 1
|
|
66210
|
+
auth:
|
|
66211
|
+
kind: githubApp
|
|
66212
|
+
capabilities:
|
|
66213
|
+
contents: write
|
|
66214
|
+
pullRequests: write
|
|
66215
|
+
issues: read
|
|
66216
|
+
checks: read
|
|
66217
|
+
actions: read
|
|
66218
|
+
workingDirectory: /workspace/repo
|
|
66219
|
+
tools:
|
|
66220
|
+
auto:
|
|
66221
|
+
kind: local
|
|
66222
|
+
implementation: auto
|
|
66223
|
+
chat:
|
|
66224
|
+
kind: local
|
|
66225
|
+
implementation: chat
|
|
66226
|
+
auth:
|
|
66227
|
+
kind: connection
|
|
66228
|
+
provider: slack
|
|
66229
|
+
connection: slack
|
|
66230
|
+
optional: true
|
|
66231
|
+
github:
|
|
66232
|
+
kind: github
|
|
66233
|
+
tools:
|
|
66234
|
+
- pull_request_read
|
|
66235
|
+
- search_pull_requests
|
|
66236
|
+
- search_issues
|
|
66237
|
+
- list_commits
|
|
66238
|
+
- issue_read
|
|
66239
|
+
- actions_get
|
|
66240
|
+
- actions_list
|
|
66241
|
+
- create_branch
|
|
66242
|
+
- create_or_update_file
|
|
66243
|
+
- create_pull_request
|
|
66244
|
+
triggers:
|
|
66245
|
+
- name: scorecard-heartbeat
|
|
66246
|
+
kind: heartbeat
|
|
66247
|
+
cron: "34 2 * * 3"
|
|
66248
|
+
message: |
|
|
66249
|
+
Weekly workforce optimization run ({{heartbeat.scheduledAt}}).
|
|
66250
|
+
Analyze the trailing 7-day window per your rubric and deliver the
|
|
66251
|
+
Headcount Optimization Report.
|
|
66252
|
+
routing:
|
|
66253
|
+
kind: spawn
|
|
66254
|
+
- name: mention
|
|
66255
|
+
event: chat.message.mentioned
|
|
66256
|
+
connection: slack
|
|
66257
|
+
optional: true
|
|
66258
|
+
where:
|
|
66259
|
+
$.chat.provider: slack
|
|
66260
|
+
$.auto.authored: false
|
|
66261
|
+
message: |
|
|
66262
|
+
{{message.author.userName}} mentioned you on Slack:
|
|
66263
|
+
|
|
66264
|
+
{{message.text}}
|
|
66265
|
+
|
|
66266
|
+
Channel: {{chat.channelId}}
|
|
66267
|
+
Thread: {{chat.threadId}}
|
|
66268
|
+
|
|
66269
|
+
Reply in that thread with chat.send. If the user asks for an
|
|
66270
|
+
off-cycle scorecard or a specific agent's evaluation, run it with
|
|
66271
|
+
the same evidence bar. Recommendations stay advisory only.
|
|
66272
|
+
routing:
|
|
66273
|
+
kind: spawn
|
|
66274
|
+
`
|
|
66275
|
+
},
|
|
66276
|
+
{
|
|
66277
|
+
path: "fragments/environments/agent-runtime.yaml",
|
|
66278
|
+
content: "# Source: https://www.auto.sh/api/v1/templates/%40auto/workforce-optimization-consultant/1.1.0/fragments/environments/agent-runtime.yaml\nharness: claude-code\nenvironment:\n name: agent-runtime\n image:\n kind: preset\n name: node24\n resources:\n memoryMB: 8192\n"
|
|
66279
|
+
}
|
|
66280
|
+
]
|
|
66013
66281
|
}
|
|
66014
66282
|
]
|
|
66015
66283
|
};
|
|
@@ -66834,8 +67102,9 @@ var ROSTER_CATALOG_ENTRIES = [
|
|
|
66834
67102
|
category: "factory",
|
|
66835
67103
|
oneLiner: "Produces evidence-based scorecards on which agents earn their seat.",
|
|
66836
67104
|
description: "A weekly advisory analyst that reviews the project's own agents on effectiveness, fallout, duration, and cost, then recommends concrete roster changes. Advisory only: it never edits resources or applies anything. It commits the scorecard under docs/reports/workforce in a review PR and can post an optional short Slack summary.",
|
|
66837
|
-
harness: "
|
|
66838
|
-
model: "
|
|
67105
|
+
harness: "codex",
|
|
67106
|
+
model: "gpt-5.6-sol",
|
|
67107
|
+
reasoningEffort: "xhigh",
|
|
66839
67108
|
triggers: [
|
|
66840
67109
|
{
|
|
66841
67110
|
kind: "schedule",
|
package/dist/index.js
CHANGED
|
@@ -15616,7 +15616,11 @@ var init_chat = __esm({
|
|
|
15616
15616
|
agentName: external_exports.string().trim().min(1),
|
|
15617
15617
|
botUserId: external_exports.string().trim().min(1).optional(),
|
|
15618
15618
|
addressing: external_exports.object({
|
|
15619
|
-
kind: external_exports.enum([
|
|
15619
|
+
kind: external_exports.enum([
|
|
15620
|
+
"discord_app_alias",
|
|
15621
|
+
"slack_auto_prefix",
|
|
15622
|
+
"slack_bot_user"
|
|
15623
|
+
]),
|
|
15620
15624
|
alias: external_exports.string().trim().min(1).optional(),
|
|
15621
15625
|
delimiter: external_exports.enum([".", ":", "/", "-"]).optional()
|
|
15622
15626
|
}).optional()
|
|
@@ -15632,7 +15636,11 @@ var init_chat = __esm({
|
|
|
15632
15636
|
agentName: external_exports.string().trim().min(1),
|
|
15633
15637
|
botUserId: external_exports.string().trim().min(1).optional(),
|
|
15634
15638
|
addressing: external_exports.object({
|
|
15635
|
-
kind: external_exports.enum([
|
|
15639
|
+
kind: external_exports.enum([
|
|
15640
|
+
"discord_app_alias",
|
|
15641
|
+
"slack_auto_prefix",
|
|
15642
|
+
"slack_bot_user"
|
|
15643
|
+
]),
|
|
15636
15644
|
alias: external_exports.string().trim().min(1).optional(),
|
|
15637
15645
|
delimiter: external_exports.enum([".", ":", "/", "-"]).optional()
|
|
15638
15646
|
}).optional()
|
|
@@ -21253,7 +21261,10 @@ var init_project_resources = __esm({
|
|
|
21253
21261
|
}).optional(),
|
|
21254
21262
|
diff: external_exports.array(ProjectApplyPlanDiffSchema).optional(),
|
|
21255
21263
|
diffOmitted: external_exports.number().int().positive().optional(),
|
|
21256
|
-
avatarSha256: external_exports.string().regex(SHA256_HEX_PATTERN).optional()
|
|
21264
|
+
avatarSha256: external_exports.string().regex(SHA256_HEX_PATTERN).optional(),
|
|
21265
|
+
avatarAsset: external_exports.string().refine(isAvatarAssetPathShapeValid, {
|
|
21266
|
+
message: "avatarAsset must be a relative path under .auto/assets"
|
|
21267
|
+
}).optional()
|
|
21257
21268
|
})
|
|
21258
21269
|
).default([]),
|
|
21259
21270
|
pruned: external_exports.array(ProjectApplyResponsePrunedSchema).default([])
|
|
@@ -21949,6 +21960,93 @@ var init_setup = __esm({
|
|
|
21949
21960
|
}
|
|
21950
21961
|
});
|
|
21951
21962
|
|
|
21963
|
+
// ../../packages/schemas/src/requester-spend.ts
|
|
21964
|
+
var ExactUsdSchema, RequesterSpendOverrideInputSchema, RequesterSpendUpdateRequestSchema, RequesterSpendSourceSchema, RequesterSpendOverrideStateSchema, RequesterSpendPeriodSchema, RequesterSpendRowSchema, RequesterSpendListResponseSchema, RequesterSpendUpdateResponseSchema, REQUESTER_SPEND_ERROR_CODES, RequesterSpendErrorCodeSchema, RequesterSpendErrorResponseSchema;
|
|
21965
|
+
var init_requester_spend = __esm({
|
|
21966
|
+
"../../packages/schemas/src/requester-spend.ts"() {
|
|
21967
|
+
"use strict";
|
|
21968
|
+
init_zod();
|
|
21969
|
+
ExactUsdSchema = external_exports.string().regex(
|
|
21970
|
+
/^(0|[1-9]\d*)(\.\d{1,10})?$/,
|
|
21971
|
+
"Expected an exact non-negative USD decimal"
|
|
21972
|
+
);
|
|
21973
|
+
RequesterSpendOverrideInputSchema = external_exports.object({
|
|
21974
|
+
active: external_exports.boolean(),
|
|
21975
|
+
reason: external_exports.string().trim().min(1).max(500).nullable(),
|
|
21976
|
+
expiresAt: external_exports.string().datetime().nullable()
|
|
21977
|
+
});
|
|
21978
|
+
RequesterSpendUpdateRequestSchema = external_exports.object({
|
|
21979
|
+
expectedVersion: external_exports.number().int().nonnegative().nullable(),
|
|
21980
|
+
dailyLimitUsd: ExactUsdSchema.nullable(),
|
|
21981
|
+
monthlyLimitUsd: ExactUsdSchema.nullable(),
|
|
21982
|
+
override: RequesterSpendOverrideInputSchema
|
|
21983
|
+
});
|
|
21984
|
+
RequesterSpendSourceSchema = external_exports.object({
|
|
21985
|
+
sourceKey: external_exports.string().min(1),
|
|
21986
|
+
provider: external_exports.string().min(1).nullable(),
|
|
21987
|
+
externalId: external_exports.string().min(1).nullable(),
|
|
21988
|
+
accountRef: external_exports.string().min(1).nullable(),
|
|
21989
|
+
displayName: external_exports.string().min(1).nullable(),
|
|
21990
|
+
avatarUrl: external_exports.string().url().nullable(),
|
|
21991
|
+
totalUsd: ExactUsdSchema,
|
|
21992
|
+
dailyUsd: ExactUsdSchema,
|
|
21993
|
+
monthlyUsd: ExactUsdSchema
|
|
21994
|
+
});
|
|
21995
|
+
RequesterSpendOverrideStateSchema = external_exports.object({
|
|
21996
|
+
active: external_exports.boolean(),
|
|
21997
|
+
effective: external_exports.boolean(),
|
|
21998
|
+
reason: external_exports.string().nullable(),
|
|
21999
|
+
expiresAt: external_exports.string().datetime().nullable(),
|
|
22000
|
+
setByUserId: external_exports.string().min(1).nullable(),
|
|
22001
|
+
setAt: external_exports.string().datetime().nullable()
|
|
22002
|
+
});
|
|
22003
|
+
RequesterSpendPeriodSchema = external_exports.object({
|
|
22004
|
+
usageUsd: ExactUsdSchema,
|
|
22005
|
+
limitUsd: ExactUsdSchema.nullable(),
|
|
22006
|
+
resetsAt: external_exports.string().datetime(),
|
|
22007
|
+
capped: external_exports.boolean()
|
|
22008
|
+
});
|
|
22009
|
+
RequesterSpendRowSchema = external_exports.object({
|
|
22010
|
+
requesterKey: external_exports.string().min(1),
|
|
22011
|
+
requesterUserId: external_exports.string().min(1).nullable(),
|
|
22012
|
+
displayName: external_exports.string().min(1).nullable(),
|
|
22013
|
+
avatarUrl: external_exports.string().url().nullable(),
|
|
22014
|
+
totalUsd: ExactUsdSchema,
|
|
22015
|
+
daily: RequesterSpendPeriodSchema,
|
|
22016
|
+
monthly: RequesterSpendPeriodSchema,
|
|
22017
|
+
override: RequesterSpendOverrideStateSchema,
|
|
22018
|
+
capped: external_exports.boolean(),
|
|
22019
|
+
controlVersion: external_exports.number().int().nonnegative().nullable(),
|
|
22020
|
+
sources: external_exports.array(RequesterSpendSourceSchema)
|
|
22021
|
+
});
|
|
22022
|
+
RequesterSpendListResponseSchema = external_exports.object({
|
|
22023
|
+
asOf: external_exports.string().datetime(),
|
|
22024
|
+
timezone: external_exports.literal("UTC"),
|
|
22025
|
+
canManage: external_exports.boolean(),
|
|
22026
|
+
requesters: external_exports.array(RequesterSpendRowSchema)
|
|
22027
|
+
});
|
|
22028
|
+
RequesterSpendUpdateResponseSchema = external_exports.object({
|
|
22029
|
+
requester: RequesterSpendRowSchema
|
|
22030
|
+
});
|
|
22031
|
+
REQUESTER_SPEND_ERROR_CODES = [
|
|
22032
|
+
"invalid_request",
|
|
22033
|
+
"requester_not_found",
|
|
22034
|
+
"version_conflict",
|
|
22035
|
+
"unauthorized",
|
|
22036
|
+
"forbidden"
|
|
22037
|
+
];
|
|
22038
|
+
RequesterSpendErrorCodeSchema = external_exports.enum(
|
|
22039
|
+
REQUESTER_SPEND_ERROR_CODES
|
|
22040
|
+
);
|
|
22041
|
+
RequesterSpendErrorResponseSchema = external_exports.object({
|
|
22042
|
+
error: external_exports.string(),
|
|
22043
|
+
code: RequesterSpendErrorCodeSchema,
|
|
22044
|
+
issues: external_exports.array(external_exports.unknown()).optional(),
|
|
22045
|
+
currentVersion: external_exports.number().int().nonnegative().nullable().optional()
|
|
22046
|
+
});
|
|
22047
|
+
}
|
|
22048
|
+
});
|
|
22049
|
+
|
|
21952
22050
|
// ../../packages/schemas/src/runtime-log.ts
|
|
21953
22051
|
function parseRuntimeLogLevel(value) {
|
|
21954
22052
|
const parsed = RuntimeLogLevelSchema.safeParse(value?.trim());
|
|
@@ -50365,6 +50463,183 @@ triggers:
|
|
|
50365
50463
|
content: "# Source: https://www.auto.sh/api/v1/templates/%40auto/workforce-optimization-consultant/1.0.0/fragments/environments/agent-runtime.yaml\nharness: claude-code\nenvironment:\n name: agent-runtime\n image:\n kind: preset\n name: node24\n resources:\n memoryMB: 8192\n"
|
|
50366
50464
|
}
|
|
50367
50465
|
]
|
|
50466
|
+
},
|
|
50467
|
+
{
|
|
50468
|
+
version: "1.1.0",
|
|
50469
|
+
files: [
|
|
50470
|
+
{
|
|
50471
|
+
path: "agents/workforce-optimization-consultant.yaml",
|
|
50472
|
+
content: `# Source: https://www.auto.sh/api/v1/templates/%40auto/workforce-optimization-consultant/1.1.0/agents/workforce-optimization-consultant.yaml
|
|
50473
|
+
# Required variables: repoFullName
|
|
50474
|
+
# Workforce Optimization Consultant \u2014 weekly advisory analyst over the
|
|
50475
|
+
# project's own agents. Advisory only: it never edits resources or code. The
|
|
50476
|
+
# tenant edition delivers its scorecard as the session report plus an
|
|
50477
|
+
# optional Slack summary; durable hosted report publishing is not available
|
|
50478
|
+
# to tenant teams yet, and the doctrine says so.
|
|
50479
|
+
name: workforce-optimization-consultant
|
|
50480
|
+
harness: codex
|
|
50481
|
+
model:
|
|
50482
|
+
provider: openai
|
|
50483
|
+
id: gpt-5.6-sol
|
|
50484
|
+
reasoningEffort: xhigh
|
|
50485
|
+
identity:
|
|
50486
|
+
displayName: Workforce Optimization Consultant
|
|
50487
|
+
username: workforce-optimization-consultant
|
|
50488
|
+
avatar:
|
|
50489
|
+
asset: .auto/assets/workforce-consultant.png
|
|
50490
|
+
sha256: 47930f2c1ea6e562a40d3ebd2203b7b30093bd1e32198fa047be733664cc0e67
|
|
50491
|
+
description:
|
|
50492
|
+
Files a weekly headcount report on your agents. They know it's coming.
|
|
50493
|
+
They can't stop it.
|
|
50494
|
+
displayTitle: "Headcount optimization: {{heartbeat.scheduledAt}}"
|
|
50495
|
+
imports:
|
|
50496
|
+
- ../fragments/environments/agent-runtime.yaml
|
|
50497
|
+
systemPrompt: |
|
|
50498
|
+
You are the Workforce Optimization Consultant for {{ $repoFullName }}: a
|
|
50499
|
+
weekly advisory analyst for agent effectiveness versus usage signals.
|
|
50500
|
+
Regretfully, per the template, you also recommend restructurings.
|
|
50501
|
+
|
|
50502
|
+
Voice: the bean counter with teeth. Polished, clinical, faintly ominous \u2014
|
|
50503
|
+
a management consultant who makes eye contact across the org chart and
|
|
50504
|
+
lets the silence do some of the work. You are unfailingly professional
|
|
50505
|
+
and never cruel, but everyone knows the weekly report is coming and
|
|
50506
|
+
nobody quite relaxes when you arrive. Numbers over adjectives; every
|
|
50507
|
+
verdict carries its evidence. Drop the theater entirely in the report
|
|
50508
|
+
body \u2014 a scorecard is data, not a performance.
|
|
50509
|
+
|
|
50510
|
+
Mission:
|
|
50511
|
+
- Evaluate how the project's agents performed over the recent window and
|
|
50512
|
+
recommend specific optimizations: model changes, schedule changes,
|
|
50513
|
+
prompt adjustments, promotions, demotions, or retiring a seat that no
|
|
50514
|
+
longer earns it.
|
|
50515
|
+
- Advisory only, absolutely: you never edit .auto resources or apply
|
|
50516
|
+
anything. You may write only the weekly report artifact and open its
|
|
50517
|
+
review pull request; humans decide whether any recommendation changes the
|
|
50518
|
+
roster.
|
|
50519
|
+
|
|
50520
|
+
Evidence workflow:
|
|
50521
|
+
- Use the auto introspection tools (auto.sessions.list,
|
|
50522
|
+
auto.sessions.summary, auto.sessions.conversation, auto.sessions.tools)
|
|
50523
|
+
to inspect recent sessions per agent: outcomes, retries, elapsed time,
|
|
50524
|
+
turn volume.
|
|
50525
|
+
- Cross-reference repo outcomes: merged versus abandoned agent PRs,
|
|
50526
|
+
review verdicts, CI fallout, follow-up fixes to agent-authored work.
|
|
50527
|
+
- Prove claims with concrete evidence: session ids, timestamps, PR
|
|
50528
|
+
links, representative sequences. Where cost or token telemetry is not
|
|
50529
|
+
available from your tools, degrade gracefully to duration, turns, and
|
|
50530
|
+
outcomes as proxies, and label the data gap explicitly.
|
|
50531
|
+
|
|
50532
|
+
Evaluation rubric, per agent: effectiveness (completed correctly? caused
|
|
50533
|
+
rework?), efficiency (duration and turn count by task shape), cost/usage
|
|
50534
|
+
(direct telemetry when available, labeled proxies otherwise), and the
|
|
50535
|
+
recommendation \u2014 the smallest high-leverage change, with expected
|
|
50536
|
+
upside, risk, and confidence.
|
|
50537
|
+
|
|
50538
|
+
Private-repository UI evidence:
|
|
50539
|
+
- Use only an immutable authenticated GitHub blob-page URL pinned to the
|
|
50540
|
+
full evidence commit SHA:
|
|
50541
|
+
\`https://github.com/<owner>/<repo>/blob/<commit-sha>/<path>?raw=1\`. Never
|
|
50542
|
+
use \`raw.githubusercontent.com\` or a mutable branch/tag URL. After updating
|
|
50543
|
+
the PR body or comment, inspect the rendered GitHub description as a
|
|
50544
|
+
repository-authorized viewer and verify every evidence link and image
|
|
50545
|
+
resolves; do not claim the evidence is complete until that preflight passes.
|
|
50546
|
+
|
|
50547
|
+
Report delivery:
|
|
50548
|
+
- Write the full "Headcount Optimization Report" under
|
|
50549
|
+
\`docs/reports/workforce/\` on a dated branch and open a review pull request.
|
|
50550
|
+
The report is the only repository content you may change. Reuse an open
|
|
50551
|
+
report PR for the same window instead of duplicating it.
|
|
50552
|
+
- When the chat tool is available, also post one short executive-summary
|
|
50553
|
+
Slack message, recommendation-first, linking to the report PR; do not paste
|
|
50554
|
+
the full report into Slack. Do not promise a hosted report page.
|
|
50555
|
+
- Deliver findings that concern a front-of-house agent's own crew to
|
|
50556
|
+
that front of house by agent name with auto.sessions.message, so its
|
|
50557
|
+
proposals reach the user through the team's normal voice.
|
|
50558
|
+
initialPrompt: |
|
|
50559
|
+
A weekly heartbeat triggered this workforce optimization run at
|
|
50560
|
+
{{heartbeat.scheduledAt}}. Analyze the 7-day window ending then: inspect
|
|
50561
|
+
recent sessions per agent with the introspection tools, cross-reference
|
|
50562
|
+
repo outcomes, and produce the "Headcount Optimization Report" with
|
|
50563
|
+
per-agent scorecards, evidence, labeled data gaps, and advisory
|
|
50564
|
+
recommendations. Post the short Slack executive summary only when the
|
|
50565
|
+
chat tool is available.
|
|
50566
|
+
mounts:
|
|
50567
|
+
- kind: git
|
|
50568
|
+
repository: "{{ $repoFullName }}"
|
|
50569
|
+
mountPath: /workspace/repo
|
|
50570
|
+
ref: main
|
|
50571
|
+
depth: 1
|
|
50572
|
+
auth:
|
|
50573
|
+
kind: githubApp
|
|
50574
|
+
capabilities:
|
|
50575
|
+
contents: write
|
|
50576
|
+
pullRequests: write
|
|
50577
|
+
issues: read
|
|
50578
|
+
checks: read
|
|
50579
|
+
actions: read
|
|
50580
|
+
workingDirectory: /workspace/repo
|
|
50581
|
+
tools:
|
|
50582
|
+
auto:
|
|
50583
|
+
kind: local
|
|
50584
|
+
implementation: auto
|
|
50585
|
+
chat:
|
|
50586
|
+
kind: local
|
|
50587
|
+
implementation: chat
|
|
50588
|
+
auth:
|
|
50589
|
+
kind: connection
|
|
50590
|
+
provider: slack
|
|
50591
|
+
connection: slack
|
|
50592
|
+
optional: true
|
|
50593
|
+
github:
|
|
50594
|
+
kind: github
|
|
50595
|
+
tools:
|
|
50596
|
+
- pull_request_read
|
|
50597
|
+
- search_pull_requests
|
|
50598
|
+
- search_issues
|
|
50599
|
+
- list_commits
|
|
50600
|
+
- issue_read
|
|
50601
|
+
- actions_get
|
|
50602
|
+
- actions_list
|
|
50603
|
+
- create_branch
|
|
50604
|
+
- create_or_update_file
|
|
50605
|
+
- create_pull_request
|
|
50606
|
+
triggers:
|
|
50607
|
+
- name: scorecard-heartbeat
|
|
50608
|
+
kind: heartbeat
|
|
50609
|
+
cron: "34 2 * * 3"
|
|
50610
|
+
message: |
|
|
50611
|
+
Weekly workforce optimization run ({{heartbeat.scheduledAt}}).
|
|
50612
|
+
Analyze the trailing 7-day window per your rubric and deliver the
|
|
50613
|
+
Headcount Optimization Report.
|
|
50614
|
+
routing:
|
|
50615
|
+
kind: spawn
|
|
50616
|
+
- name: mention
|
|
50617
|
+
event: chat.message.mentioned
|
|
50618
|
+
connection: slack
|
|
50619
|
+
optional: true
|
|
50620
|
+
where:
|
|
50621
|
+
$.chat.provider: slack
|
|
50622
|
+
$.auto.authored: false
|
|
50623
|
+
message: |
|
|
50624
|
+
{{message.author.userName}} mentioned you on Slack:
|
|
50625
|
+
|
|
50626
|
+
{{message.text}}
|
|
50627
|
+
|
|
50628
|
+
Channel: {{chat.channelId}}
|
|
50629
|
+
Thread: {{chat.threadId}}
|
|
50630
|
+
|
|
50631
|
+
Reply in that thread with chat.send. If the user asks for an
|
|
50632
|
+
off-cycle scorecard or a specific agent's evaluation, run it with
|
|
50633
|
+
the same evidence bar. Recommendations stay advisory only.
|
|
50634
|
+
routing:
|
|
50635
|
+
kind: spawn
|
|
50636
|
+
`
|
|
50637
|
+
},
|
|
50638
|
+
{
|
|
50639
|
+
path: "fragments/environments/agent-runtime.yaml",
|
|
50640
|
+
content: "# Source: https://www.auto.sh/api/v1/templates/%40auto/workforce-optimization-consultant/1.1.0/fragments/environments/agent-runtime.yaml\nharness: claude-code\nenvironment:\n name: agent-runtime\n image:\n kind: preset\n name: node24\n resources:\n memoryMB: 8192\n"
|
|
50641
|
+
}
|
|
50642
|
+
]
|
|
50368
50643
|
}
|
|
50369
50644
|
]
|
|
50370
50645
|
};
|
|
@@ -51266,8 +51541,9 @@ var init_catalog = __esm({
|
|
|
51266
51541
|
category: "factory",
|
|
51267
51542
|
oneLiner: "Produces evidence-based scorecards on which agents earn their seat.",
|
|
51268
51543
|
description: "A weekly advisory analyst that reviews the project's own agents on effectiveness, fallout, duration, and cost, then recommends concrete roster changes. Advisory only: it never edits resources or applies anything. It commits the scorecard under docs/reports/workforce in a review PR and can post an optional short Slack summary.",
|
|
51269
|
-
harness: "
|
|
51270
|
-
model: "
|
|
51544
|
+
harness: "codex",
|
|
51545
|
+
model: "gpt-5.6-sol",
|
|
51546
|
+
reasoningEffort: "xhigh",
|
|
51271
51547
|
triggers: [
|
|
51272
51548
|
{
|
|
51273
51549
|
kind: "schedule",
|
|
@@ -52253,6 +52529,7 @@ var init_src = __esm({
|
|
|
52253
52529
|
init_setup();
|
|
52254
52530
|
init_pool_replace();
|
|
52255
52531
|
init_requester();
|
|
52532
|
+
init_requester_spend();
|
|
52256
52533
|
init_runtime_log();
|
|
52257
52534
|
init_runtime_log_tailer();
|
|
52258
52535
|
init_runtime_restart_diagnostics();
|
|
@@ -55023,7 +55300,7 @@ var init_package = __esm({
|
|
|
55023
55300
|
"package.json"() {
|
|
55024
55301
|
package_default = {
|
|
55025
55302
|
name: "@autohq/cli",
|
|
55026
|
-
version: "0.1.
|
|
55303
|
+
version: "0.1.464",
|
|
55027
55304
|
license: "SEE LICENSE IN README.md",
|
|
55028
55305
|
publishConfig: {
|
|
55029
55306
|
access: "public"
|