@autohq/cli 0.1.133 → 0.1.134
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 +37 -12
- package/dist/index.js +114 -68
- package/package.json +1 -1
package/dist/agent-bridge.js
CHANGED
|
@@ -21243,7 +21243,9 @@ var EventRoutingTriggerResultSchema = external_exports.object({
|
|
|
21243
21243
|
});
|
|
21244
21244
|
|
|
21245
21245
|
// ../../packages/schemas/src/sessions.ts
|
|
21246
|
-
var
|
|
21246
|
+
var RESOURCE_KIND_AGENT = "agent";
|
|
21247
|
+
var LEGACY_RESOURCE_KIND_SESSION = "session";
|
|
21248
|
+
var RESOURCE_KIND_SESSION = RESOURCE_KIND_AGENT;
|
|
21247
21249
|
var SESSION_HARNESSES = ["claude-code"];
|
|
21248
21250
|
var TriggerFilterScalarSchema = external_exports.union([
|
|
21249
21251
|
external_exports.null(),
|
|
@@ -21554,7 +21556,7 @@ var SessionPresenceIdentitySchema = external_exports.object({
|
|
|
21554
21556
|
/**
|
|
21555
21557
|
* Scopes the current agent-app scope set requests that this realized
|
|
21556
21558
|
* identity's install never granted. Computed at read time; non-empty means
|
|
21557
|
-
* the install predates a scope addition and `auto
|
|
21559
|
+
* the install predates a scope addition and `auto agents connect
|
|
21558
21560
|
* <session> --reconnect` refreshes it.
|
|
21559
21561
|
*/
|
|
21560
21562
|
missingScopes: external_exports.array(external_exports.string().trim().min(1)).optional()
|
|
@@ -21898,21 +21900,29 @@ var SessionApplyDocumentSchema = resourceApplyDocumentSchema(
|
|
|
21898
21900
|
RESOURCE_KIND_SESSION,
|
|
21899
21901
|
SessionApplyRequestSchema.shape.spec
|
|
21900
21902
|
);
|
|
21901
|
-
var ProjectApplyResourceSchema = external_exports.
|
|
21902
|
-
|
|
21903
|
-
|
|
21904
|
-
|
|
21905
|
-
|
|
21903
|
+
var ProjectApplyResourceSchema = external_exports.preprocess(
|
|
21904
|
+
normalizeLegacySessionKind,
|
|
21905
|
+
external_exports.discriminatedUnion("kind", [
|
|
21906
|
+
EnvironmentApplyDocumentSchema,
|
|
21907
|
+
IdentityApplyDocumentSchema,
|
|
21908
|
+
SessionApplyDocumentSchema
|
|
21909
|
+
])
|
|
21910
|
+
);
|
|
21906
21911
|
var PROJECT_RESOURCE_APPLY_ORDER = [
|
|
21907
21912
|
RESOURCE_KIND_ENVIRONMENT,
|
|
21908
21913
|
RESOURCE_KIND_IDENTITY,
|
|
21909
21914
|
RESOURCE_KIND_SESSION
|
|
21910
21915
|
];
|
|
21911
21916
|
var PROJECT_RESOURCE_KINDS = PROJECT_RESOURCE_APPLY_ORDER;
|
|
21912
|
-
var
|
|
21913
|
-
kind: external_exports.enum(PROJECT_RESOURCE_KINDS),
|
|
21917
|
+
var ProjectDeleteResourceBaseSchema = external_exports.object({
|
|
21914
21918
|
name: external_exports.string().trim().min(1)
|
|
21915
21919
|
});
|
|
21920
|
+
var ProjectDeleteResourceSchema = external_exports.preprocess(
|
|
21921
|
+
normalizeLegacySessionKind,
|
|
21922
|
+
ProjectDeleteResourceBaseSchema.extend({
|
|
21923
|
+
kind: external_exports.enum(PROJECT_RESOURCE_KINDS)
|
|
21924
|
+
})
|
|
21925
|
+
);
|
|
21916
21926
|
var AVATAR_ASSET_CONTENT_TYPES = ["image/png", "image/jpeg"];
|
|
21917
21927
|
var MAX_AVATAR_ASSET_BASE64_LENGTH = Math.ceil(MAX_AVATAR_ASSET_BYTES / 3) * 4 + 4;
|
|
21918
21928
|
var ProjectApplyAssetSchema = external_exports.object({
|
|
@@ -21966,6 +21976,12 @@ var ProjectApplyDiagnosticSchema = external_exports.object({
|
|
|
21966
21976
|
]),
|
|
21967
21977
|
name: external_exports.string().min(1)
|
|
21968
21978
|
});
|
|
21979
|
+
var ProjectApplyResponseResourceKindSchema = external_exports.union([
|
|
21980
|
+
external_exports.enum(PROJECT_RESOURCE_KINDS),
|
|
21981
|
+
external_exports.literal(LEGACY_RESOURCE_KIND_SESSION)
|
|
21982
|
+
]).transform(
|
|
21983
|
+
(kind) => kind === LEGACY_RESOURCE_KIND_SESSION ? RESOURCE_KIND_SESSION : kind
|
|
21984
|
+
);
|
|
21969
21985
|
var ProjectApplyResponseSchema = external_exports.object({
|
|
21970
21986
|
dryRun: external_exports.boolean().default(false),
|
|
21971
21987
|
resources: external_exports.array(ProjectAppliedResourceSchema),
|
|
@@ -21974,19 +21990,28 @@ var ProjectApplyResponseSchema = external_exports.object({
|
|
|
21974
21990
|
plan: external_exports.array(
|
|
21975
21991
|
external_exports.object({
|
|
21976
21992
|
action: external_exports.enum(["create", "update", "unchanged", "archive"]),
|
|
21977
|
-
kind:
|
|
21993
|
+
kind: ProjectApplyResponseResourceKindSchema,
|
|
21978
21994
|
name: external_exports.string().min(1),
|
|
21979
21995
|
uid: external_exports.string().min(1).optional()
|
|
21980
21996
|
})
|
|
21981
21997
|
).default([]),
|
|
21982
21998
|
pruned: external_exports.array(
|
|
21983
21999
|
external_exports.object({
|
|
21984
|
-
kind:
|
|
22000
|
+
kind: ProjectApplyResponseResourceKindSchema,
|
|
21985
22001
|
name: external_exports.string().min(1),
|
|
21986
22002
|
uid: external_exports.string().min(1)
|
|
21987
22003
|
})
|
|
21988
22004
|
).default([])
|
|
21989
22005
|
});
|
|
22006
|
+
function normalizeLegacySessionKind(value2) {
|
|
22007
|
+
if (isRecord(value2) && value2.kind === LEGACY_RESOURCE_KIND_SESSION) {
|
|
22008
|
+
return { ...value2, kind: RESOURCE_KIND_SESSION };
|
|
22009
|
+
}
|
|
22010
|
+
return value2;
|
|
22011
|
+
}
|
|
22012
|
+
function isRecord(value2) {
|
|
22013
|
+
return typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
|
|
22014
|
+
}
|
|
21990
22015
|
|
|
21991
22016
|
// ../../packages/schemas/src/run-diagnostics.ts
|
|
21992
22017
|
var RUN_DIAGNOSTIC_REALTIME_EVENT = "run.diagnostic";
|
|
@@ -26248,7 +26273,7 @@ Object.assign(lookup, {
|
|
|
26248
26273
|
// package.json
|
|
26249
26274
|
var package_default = {
|
|
26250
26275
|
name: "@autohq/cli",
|
|
26251
|
-
version: "0.1.
|
|
26276
|
+
version: "0.1.134",
|
|
26252
26277
|
license: "SEE LICENSE IN README.md",
|
|
26253
26278
|
publishConfig: {
|
|
26254
26279
|
access: "public"
|
package/dist/index.js
CHANGED
|
@@ -18053,7 +18053,7 @@ function isChatMessageEvent(trigger) {
|
|
|
18053
18053
|
function hasFilterValue(trigger, path2, expected) {
|
|
18054
18054
|
return trigger.where?.[path2] === expected;
|
|
18055
18055
|
}
|
|
18056
|
-
var RESOURCE_KIND_SESSION, SESSION_HARNESSES, TriggerFilterScalarSchema, TriggerFilterPathSchema, TriggerFilterClauseSchema, TriggerFilterSchema, SessionTriggerCheckTimeoutSchema, TriggerEventSchema, TriggerEventsSchema, SessionTriggerSharedFields, SessionTriggerEventSourceFields, SessionTriggerBaseSchema, SessionTriggerDefinitionBaseSchema, SessionTriggerSchema, SessionApplyTriggerSchema, SessionHeartbeatTriggerBaseSchema, SessionHeartbeatTriggerSchema, SessionApplyHeartbeatTriggerSchema, SessionTriggerDefinitionSchema, SessionApplyTriggerDefinitionSchema, SessionTriggersSchema, SessionApplyTriggersSchema, AVATAR_ASSET_EXTENSIONS, MAX_AVATAR_ASSET_BYTES, MIN_AVATAR_ASSET_DIMENSION_PX, MAX_AVATAR_ASSET_DIMENSION_PX, PNG_SIGNATURE, SESSION_IDENTITY_DESCRIPTION_MAX_LENGTH, SHA256_HEX_PATTERN, SessionIdentitySchema, SessionSpecFieldsSchema, SessionSpecSchema, SessionApplySpecSchema, SessionStatusSchema, SessionResourceSchema, SessionApplyRequestSchema, SessionApplyTriggerReceiptSchema, SessionApplyResponseSchema, SESSION_TELEGRAM_IDENTITY_STATUSES, SessionTelegramIdentityStatusSchema, SessionPresenceIdentitySchema, SessionPresenceResponseSchema, SessionPresenceConnectRequestSchema, SessionPresenceConnectPendingSchema, SessionPresenceConnectResponseSchema, SessionPresenceIconRequestSchema, SessionPresenceIconResponseSchema, SessionPresenceCompleteResponseSchema;
|
|
18056
|
+
var RESOURCE_KIND_AGENT, LEGACY_RESOURCE_KIND_SESSION, RESOURCE_KIND_SESSION, SESSION_HARNESSES, TriggerFilterScalarSchema, TriggerFilterPathSchema, TriggerFilterClauseSchema, TriggerFilterSchema, SessionTriggerCheckTimeoutSchema, TriggerEventSchema, TriggerEventsSchema, SessionTriggerSharedFields, SessionTriggerEventSourceFields, SessionTriggerBaseSchema, SessionTriggerDefinitionBaseSchema, SessionTriggerSchema, SessionApplyTriggerSchema, SessionHeartbeatTriggerBaseSchema, SessionHeartbeatTriggerSchema, SessionApplyHeartbeatTriggerSchema, SessionTriggerDefinitionSchema, SessionApplyTriggerDefinitionSchema, SessionTriggersSchema, SessionApplyTriggersSchema, AVATAR_ASSET_EXTENSIONS, MAX_AVATAR_ASSET_BYTES, MIN_AVATAR_ASSET_DIMENSION_PX, MAX_AVATAR_ASSET_DIMENSION_PX, PNG_SIGNATURE, SESSION_IDENTITY_DESCRIPTION_MAX_LENGTH, SHA256_HEX_PATTERN, SessionIdentitySchema, SessionSpecFieldsSchema, SessionSpecSchema, SessionApplySpecSchema, SessionStatusSchema, SessionResourceSchema, SessionApplyRequestSchema, SessionApplyTriggerReceiptSchema, SessionApplyResponseSchema, SESSION_TELEGRAM_IDENTITY_STATUSES, SessionTelegramIdentityStatusSchema, SessionPresenceIdentitySchema, SessionPresenceResponseSchema, SessionPresenceConnectRequestSchema, SessionPresenceConnectPendingSchema, SessionPresenceConnectResponseSchema, SessionPresenceIconRequestSchema, SessionPresenceIconResponseSchema, SessionPresenceCompleteResponseSchema;
|
|
18057
18057
|
var init_sessions = __esm({
|
|
18058
18058
|
"../../packages/schemas/src/sessions.ts"() {
|
|
18059
18059
|
"use strict";
|
|
@@ -18065,7 +18065,9 @@ var init_sessions = __esm({
|
|
|
18065
18065
|
init_secrets();
|
|
18066
18066
|
init_tools();
|
|
18067
18067
|
init_trigger_router();
|
|
18068
|
-
|
|
18068
|
+
RESOURCE_KIND_AGENT = "agent";
|
|
18069
|
+
LEGACY_RESOURCE_KIND_SESSION = "session";
|
|
18070
|
+
RESOURCE_KIND_SESSION = RESOURCE_KIND_AGENT;
|
|
18069
18071
|
SESSION_HARNESSES = ["claude-code"];
|
|
18070
18072
|
TriggerFilterScalarSchema = external_exports.union([
|
|
18071
18073
|
external_exports.null(),
|
|
@@ -18339,7 +18341,7 @@ var init_sessions = __esm({
|
|
|
18339
18341
|
/**
|
|
18340
18342
|
* Scopes the current agent-app scope set requests that this realized
|
|
18341
18343
|
* identity's install never granted. Computed at read time; non-empty means
|
|
18342
|
-
* the install predates a scope addition and `auto
|
|
18344
|
+
* the install predates a scope addition and `auto agents connect
|
|
18343
18345
|
* <session> --reconnect` refreshes it.
|
|
18344
18346
|
*/
|
|
18345
18347
|
missingScopes: external_exports.array(external_exports.string().trim().min(1)).optional()
|
|
@@ -18584,7 +18586,16 @@ var init_project_service_accounts = __esm({
|
|
|
18584
18586
|
});
|
|
18585
18587
|
|
|
18586
18588
|
// ../../packages/schemas/src/project-resources.ts
|
|
18587
|
-
|
|
18589
|
+
function normalizeLegacySessionKind(value) {
|
|
18590
|
+
if (isRecord(value) && value.kind === LEGACY_RESOURCE_KIND_SESSION) {
|
|
18591
|
+
return { ...value, kind: RESOURCE_KIND_SESSION };
|
|
18592
|
+
}
|
|
18593
|
+
return value;
|
|
18594
|
+
}
|
|
18595
|
+
function isRecord(value) {
|
|
18596
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
18597
|
+
}
|
|
18598
|
+
var EnvironmentApplyDocumentSchema, IdentityApplyDocumentSchema, SessionApplyDocumentSchema, ProjectApplyResourceSchema, PROJECT_RESOURCE_APPLY_ORDER, PROJECT_RESOURCE_KINDS, ProjectDeleteResourceBaseSchema, ProjectDeleteResourceSchema, AVATAR_ASSET_CONTENT_TYPES, MAX_AVATAR_ASSET_BASE64_LENGTH, ProjectApplyAssetSchema, ProjectApplyAssetsSchema, AvatarAssetUploadRequestSchema, AvatarAssetUploadResponseSchema, ProjectApplyRequestSchema, ProjectApplySystemConfigSchema, ProjectAppliedResourceSchema, ProjectApplyDiagnosticSchema, ProjectApplyResponseResourceKindSchema, ProjectApplyResponseSchema;
|
|
18588
18599
|
var init_project_resources = __esm({
|
|
18589
18600
|
"../../packages/schemas/src/project-resources.ts"() {
|
|
18590
18601
|
"use strict";
|
|
@@ -18605,21 +18616,29 @@ var init_project_resources = __esm({
|
|
|
18605
18616
|
RESOURCE_KIND_SESSION,
|
|
18606
18617
|
SessionApplyRequestSchema.shape.spec
|
|
18607
18618
|
);
|
|
18608
|
-
ProjectApplyResourceSchema = external_exports.
|
|
18609
|
-
|
|
18610
|
-
|
|
18611
|
-
|
|
18612
|
-
|
|
18619
|
+
ProjectApplyResourceSchema = external_exports.preprocess(
|
|
18620
|
+
normalizeLegacySessionKind,
|
|
18621
|
+
external_exports.discriminatedUnion("kind", [
|
|
18622
|
+
EnvironmentApplyDocumentSchema,
|
|
18623
|
+
IdentityApplyDocumentSchema,
|
|
18624
|
+
SessionApplyDocumentSchema
|
|
18625
|
+
])
|
|
18626
|
+
);
|
|
18613
18627
|
PROJECT_RESOURCE_APPLY_ORDER = [
|
|
18614
18628
|
RESOURCE_KIND_ENVIRONMENT,
|
|
18615
18629
|
RESOURCE_KIND_IDENTITY,
|
|
18616
18630
|
RESOURCE_KIND_SESSION
|
|
18617
18631
|
];
|
|
18618
18632
|
PROJECT_RESOURCE_KINDS = PROJECT_RESOURCE_APPLY_ORDER;
|
|
18619
|
-
|
|
18620
|
-
kind: external_exports.enum(PROJECT_RESOURCE_KINDS),
|
|
18633
|
+
ProjectDeleteResourceBaseSchema = external_exports.object({
|
|
18621
18634
|
name: external_exports.string().trim().min(1)
|
|
18622
18635
|
});
|
|
18636
|
+
ProjectDeleteResourceSchema = external_exports.preprocess(
|
|
18637
|
+
normalizeLegacySessionKind,
|
|
18638
|
+
ProjectDeleteResourceBaseSchema.extend({
|
|
18639
|
+
kind: external_exports.enum(PROJECT_RESOURCE_KINDS)
|
|
18640
|
+
})
|
|
18641
|
+
);
|
|
18623
18642
|
AVATAR_ASSET_CONTENT_TYPES = ["image/png", "image/jpeg"];
|
|
18624
18643
|
MAX_AVATAR_ASSET_BASE64_LENGTH = Math.ceil(MAX_AVATAR_ASSET_BYTES / 3) * 4 + 4;
|
|
18625
18644
|
ProjectApplyAssetSchema = external_exports.object({
|
|
@@ -18673,6 +18692,12 @@ var init_project_resources = __esm({
|
|
|
18673
18692
|
]),
|
|
18674
18693
|
name: external_exports.string().min(1)
|
|
18675
18694
|
});
|
|
18695
|
+
ProjectApplyResponseResourceKindSchema = external_exports.union([
|
|
18696
|
+
external_exports.enum(PROJECT_RESOURCE_KINDS),
|
|
18697
|
+
external_exports.literal(LEGACY_RESOURCE_KIND_SESSION)
|
|
18698
|
+
]).transform(
|
|
18699
|
+
(kind) => kind === LEGACY_RESOURCE_KIND_SESSION ? RESOURCE_KIND_SESSION : kind
|
|
18700
|
+
);
|
|
18676
18701
|
ProjectApplyResponseSchema = external_exports.object({
|
|
18677
18702
|
dryRun: external_exports.boolean().default(false),
|
|
18678
18703
|
resources: external_exports.array(ProjectAppliedResourceSchema),
|
|
@@ -18681,14 +18706,14 @@ var init_project_resources = __esm({
|
|
|
18681
18706
|
plan: external_exports.array(
|
|
18682
18707
|
external_exports.object({
|
|
18683
18708
|
action: external_exports.enum(["create", "update", "unchanged", "archive"]),
|
|
18684
|
-
kind:
|
|
18709
|
+
kind: ProjectApplyResponseResourceKindSchema,
|
|
18685
18710
|
name: external_exports.string().min(1),
|
|
18686
18711
|
uid: external_exports.string().min(1).optional()
|
|
18687
18712
|
})
|
|
18688
18713
|
).default([]),
|
|
18689
18714
|
pruned: external_exports.array(
|
|
18690
18715
|
external_exports.object({
|
|
18691
|
-
kind:
|
|
18716
|
+
kind: ProjectApplyResponseResourceKindSchema,
|
|
18692
18717
|
name: external_exports.string().min(1),
|
|
18693
18718
|
uid: external_exports.string().min(1)
|
|
18694
18719
|
})
|
|
@@ -21183,7 +21208,7 @@ var init_package = __esm({
|
|
|
21183
21208
|
"package.json"() {
|
|
21184
21209
|
package_default = {
|
|
21185
21210
|
name: "@autohq/cli",
|
|
21186
|
-
version: "0.1.
|
|
21211
|
+
version: "0.1.134",
|
|
21187
21212
|
license: "SEE LICENSE IN README.md",
|
|
21188
21213
|
publishConfig: {
|
|
21189
21214
|
access: "public"
|
|
@@ -21317,7 +21342,7 @@ function stampAvatarSha256(resource, assets) {
|
|
|
21317
21342
|
}
|
|
21318
21343
|
};
|
|
21319
21344
|
}
|
|
21320
|
-
if (resource.kind ===
|
|
21345
|
+
if (resource.kind === RESOURCE_KIND_SESSION && typeof resource.spec.identity === "object" && resource.spec.identity !== null && !Array.isArray(resource.spec.identity)) {
|
|
21321
21346
|
const identity2 = resource.spec.identity;
|
|
21322
21347
|
const avatar = identity2.avatar;
|
|
21323
21348
|
const asset = avatar ? assets[avatar.asset] : void 0;
|
|
@@ -21344,6 +21369,7 @@ var MAX_APPLY_REQUEST_BODY_BYTES;
|
|
|
21344
21369
|
var init_assets = __esm({
|
|
21345
21370
|
"src/commands/apply/assets.ts"() {
|
|
21346
21371
|
"use strict";
|
|
21372
|
+
init_src();
|
|
21347
21373
|
init_resources2();
|
|
21348
21374
|
MAX_APPLY_REQUEST_BODY_BYTES = 4 * 1024 * 1024;
|
|
21349
21375
|
}
|
|
@@ -21389,7 +21415,7 @@ function readProjectApplyRequest(options) {
|
|
|
21389
21415
|
for (const resource of request.resources) {
|
|
21390
21416
|
if (resource.kind !== kind) {
|
|
21391
21417
|
throw new Error(
|
|
21392
|
-
`Resource kind "${resource.kind}" in ${path2} does not match .auto/${
|
|
21418
|
+
`Resource kind "${resource.kind}" in ${path2} does not match .auto/${primaryApplyDirectory(kind)}`
|
|
21393
21419
|
);
|
|
21394
21420
|
}
|
|
21395
21421
|
resources.push(resource);
|
|
@@ -21430,20 +21456,21 @@ function mcpOAuthSessionToolConnectionsFromAppliedResources(resources) {
|
|
|
21430
21456
|
function applyFiles(root) {
|
|
21431
21457
|
const files = [];
|
|
21432
21458
|
for (const kind of PROJECT_RESOURCE_APPLY_ORDER) {
|
|
21433
|
-
const directory
|
|
21434
|
-
|
|
21435
|
-
|
|
21436
|
-
|
|
21437
|
-
|
|
21438
|
-
|
|
21439
|
-
|
|
21459
|
+
for (const directory of applyDirectories(kind)) {
|
|
21460
|
+
const path2 = join3(root, directory);
|
|
21461
|
+
let entries;
|
|
21462
|
+
try {
|
|
21463
|
+
entries = readdirSync2(path2, { withFileTypes: true });
|
|
21464
|
+
} catch {
|
|
21465
|
+
continue;
|
|
21466
|
+
}
|
|
21467
|
+
files.push(
|
|
21468
|
+
...resourceApplyFiles(path2, entries).map((file2) => ({
|
|
21469
|
+
kind,
|
|
21470
|
+
path: file2
|
|
21471
|
+
}))
|
|
21472
|
+
);
|
|
21440
21473
|
}
|
|
21441
|
-
files.push(
|
|
21442
|
-
...resourceApplyFiles(path2, entries).map((file2) => ({
|
|
21443
|
-
kind,
|
|
21444
|
-
path: file2
|
|
21445
|
-
}))
|
|
21446
|
-
);
|
|
21447
21474
|
}
|
|
21448
21475
|
return files;
|
|
21449
21476
|
}
|
|
@@ -21616,12 +21643,21 @@ function isInside(path2, parent) {
|
|
|
21616
21643
|
return path2.startsWith(`${parent}/`);
|
|
21617
21644
|
}
|
|
21618
21645
|
function applyCandidate(document) {
|
|
21619
|
-
if (!
|
|
21646
|
+
if (!isRecord2(document) || !("kind" in document)) {
|
|
21620
21647
|
return { kind: RESOURCE_KIND_SESSION, value: document };
|
|
21621
21648
|
}
|
|
21649
|
+
if (document.kind === LEGACY_RESOURCE_KIND_SESSION) {
|
|
21650
|
+
return {
|
|
21651
|
+
kind: RESOURCE_KIND_SESSION,
|
|
21652
|
+
value: {
|
|
21653
|
+
metadata: document.metadata,
|
|
21654
|
+
spec: document.spec
|
|
21655
|
+
}
|
|
21656
|
+
};
|
|
21657
|
+
}
|
|
21622
21658
|
if (!PROJECT_RESOURCE_APPLY_ORDER.includes(document.kind)) {
|
|
21623
21659
|
throw new Error(
|
|
21624
|
-
`Unsupported apply resource kind "${String(document.kind)}"; supported kinds are ${PROJECT_RESOURCE_APPLY_ORDER.map((kind2) => `"${kind2}"`).join(", ")}`
|
|
21660
|
+
`Unsupported apply resource kind "${String(document.kind)}"; supported kinds are ${PROJECT_RESOURCE_APPLY_ORDER.map((kind2) => `"${kind2}"`).join(", ")} (legacy alias "session" is also accepted)`
|
|
21625
21661
|
);
|
|
21626
21662
|
}
|
|
21627
21663
|
const kind = document.kind;
|
|
@@ -21633,7 +21669,13 @@ function applyCandidate(document) {
|
|
|
21633
21669
|
}
|
|
21634
21670
|
};
|
|
21635
21671
|
}
|
|
21636
|
-
function
|
|
21672
|
+
function applyDirectories(kind) {
|
|
21673
|
+
return [...LEGACY_APPLY_DIRECTORIES[kind] ?? [], APPLY_DIRECTORIES[kind]];
|
|
21674
|
+
}
|
|
21675
|
+
function primaryApplyDirectory(kind) {
|
|
21676
|
+
return APPLY_DIRECTORIES[kind];
|
|
21677
|
+
}
|
|
21678
|
+
function isRecord2(value) {
|
|
21637
21679
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
21638
21680
|
}
|
|
21639
21681
|
function resourceApplyFiles(directory, entries) {
|
|
@@ -21652,7 +21694,7 @@ function resourceApplyFiles(directory, entries) {
|
|
|
21652
21694
|
}
|
|
21653
21695
|
return files.sort((left, right) => left.localeCompare(right));
|
|
21654
21696
|
}
|
|
21655
|
-
var APPLY_DIRECTORIES, APPLY_SCHEMAS, ALLOWED_AVATAR_EXTENSIONS;
|
|
21697
|
+
var APPLY_DIRECTORIES, LEGACY_APPLY_DIRECTORIES, APPLY_SCHEMAS, ALLOWED_AVATAR_EXTENSIONS;
|
|
21656
21698
|
var init_files = __esm({
|
|
21657
21699
|
"src/commands/apply/files.ts"() {
|
|
21658
21700
|
"use strict";
|
|
@@ -21660,12 +21702,15 @@ var init_files = __esm({
|
|
|
21660
21702
|
APPLY_DIRECTORIES = {
|
|
21661
21703
|
environment: "environments",
|
|
21662
21704
|
identity: "identities",
|
|
21663
|
-
|
|
21705
|
+
agent: "agents"
|
|
21706
|
+
};
|
|
21707
|
+
LEGACY_APPLY_DIRECTORIES = {
|
|
21708
|
+
[RESOURCE_KIND_SESSION]: ["sessions"]
|
|
21664
21709
|
};
|
|
21665
21710
|
APPLY_SCHEMAS = {
|
|
21666
21711
|
environment: EnvironmentApplyRequestSchema,
|
|
21667
21712
|
identity: IdentityApplyRequestSchema,
|
|
21668
|
-
|
|
21713
|
+
[RESOURCE_KIND_SESSION]: SessionApplyRequestSchema
|
|
21669
21714
|
};
|
|
21670
21715
|
ALLOWED_AVATAR_EXTENSIONS = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png"]);
|
|
21671
21716
|
}
|
|
@@ -21754,7 +21799,7 @@ async function connectSessionTool(input) {
|
|
|
21754
21799
|
}
|
|
21755
21800
|
);
|
|
21756
21801
|
input.writeOutput(
|
|
21757
|
-
`connected
|
|
21802
|
+
`connected agent/${completed.session ?? input.session} tool/${completed.tool} connection/${completed.connection}`
|
|
21758
21803
|
);
|
|
21759
21804
|
} finally {
|
|
21760
21805
|
callback.close();
|
|
@@ -21792,7 +21837,7 @@ function sessionToolConnectionScopeContext(input) {
|
|
|
21792
21837
|
function writeConnectionStart(writeOutput, result) {
|
|
21793
21838
|
writeOutput(result.message);
|
|
21794
21839
|
writeOutput(
|
|
21795
|
-
`connect
|
|
21840
|
+
`connect agent/${result.session} tool/${result.tool} connection/${result.connection}`
|
|
21796
21841
|
);
|
|
21797
21842
|
writeOutput(`authorization_url ${result.authorizationUrl}`);
|
|
21798
21843
|
}
|
|
@@ -21871,7 +21916,7 @@ async function applyProjectInput(input) {
|
|
|
21871
21916
|
)) {
|
|
21872
21917
|
input.writeOutput(
|
|
21873
21918
|
style.dim(
|
|
21874
|
-
`would connect
|
|
21919
|
+
`would connect agent/${item.session} tool/${item.tool} connection/${item.connection}`
|
|
21875
21920
|
)
|
|
21876
21921
|
);
|
|
21877
21922
|
}
|
|
@@ -21959,8 +22004,11 @@ function parseProjectResourceReference(resource) {
|
|
|
21959
22004
|
throw new Error('Resource must be formatted as "kind/name"');
|
|
21960
22005
|
}
|
|
21961
22006
|
if (!PROJECT_RESOURCE_KINDS.includes(kind)) {
|
|
22007
|
+
if (kind === LEGACY_RESOURCE_KIND_SESSION) {
|
|
22008
|
+
return { kind: RESOURCE_KIND_SESSION, name };
|
|
22009
|
+
}
|
|
21962
22010
|
throw new Error(
|
|
21963
|
-
`Unsupported resource kind "${kind}"; supported kinds are ${PROJECT_RESOURCE_KINDS.map((value) => `"${value}"`).join(", ")}`
|
|
22011
|
+
`Unsupported resource kind "${kind}"; supported kinds are ${PROJECT_RESOURCE_KINDS.map((value) => `"${value}"`).join(", ")} (legacy alias "session" is also accepted)`
|
|
21964
22012
|
);
|
|
21965
22013
|
}
|
|
21966
22014
|
return { kind, name };
|
|
@@ -22006,8 +22054,8 @@ var init_resources3 = __esm({
|
|
|
22006
22054
|
[RESOURCE_KIND_SESSION]: {
|
|
22007
22055
|
kind: RESOURCE_KIND_SESSION,
|
|
22008
22056
|
section: "sessions",
|
|
22009
|
-
label: "
|
|
22010
|
-
pluralLabel: "
|
|
22057
|
+
label: "Agent",
|
|
22058
|
+
pluralLabel: "Agents"
|
|
22011
22059
|
}
|
|
22012
22060
|
};
|
|
22013
22061
|
PROJECT_RESOURCE_TUI_ORDER = [
|
|
@@ -23735,7 +23783,7 @@ function ConversationView({
|
|
|
23735
23783
|
{
|
|
23736
23784
|
name: "/back",
|
|
23737
23785
|
aliases: ["/exit"],
|
|
23738
|
-
description: "Go back to the
|
|
23786
|
+
description: "Go back to the agents dashboard",
|
|
23739
23787
|
shortcut: "esc",
|
|
23740
23788
|
action: () => {
|
|
23741
23789
|
setInput("");
|
|
@@ -23775,7 +23823,7 @@ function ConversationView({
|
|
|
23775
23823
|
/* @__PURE__ */ jsx4(Text4, { bold: true, children: "Welcome to Auto!" }),
|
|
23776
23824
|
/* @__PURE__ */ jsx4(Text4, { children: " " }),
|
|
23777
23825
|
/* @__PURE__ */ jsxs4(Box4, { gap: 2, children: [
|
|
23778
|
-
/* @__PURE__ */ jsx4(Text4, { color: "yellow", children: "
|
|
23826
|
+
/* @__PURE__ */ jsx4(Text4, { color: "yellow", children: "Agent " }),
|
|
23779
23827
|
/* @__PURE__ */ jsx4(Text4, { children: sessionName })
|
|
23780
23828
|
] }),
|
|
23781
23829
|
/* @__PURE__ */ jsxs4(Box4, { gap: 2, children: [
|
|
@@ -26505,7 +26553,7 @@ function HomeView({ apiUrl, notice, returnToSession }) {
|
|
|
26505
26553
|
}
|
|
26506
26554
|
});
|
|
26507
26555
|
if (isLoading) {
|
|
26508
|
-
return /* @__PURE__ */ jsx14(Box13, { height: termHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx14(Spinner, { label: "loading
|
|
26556
|
+
return /* @__PURE__ */ jsx14(Box13, { height: termHeight, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx14(Spinner, { label: "loading agents\u2026" }) });
|
|
26509
26557
|
}
|
|
26510
26558
|
if (authErrorMessage && sessions.length === 0 && !projectSelectionRequired) {
|
|
26511
26559
|
return /* @__PURE__ */ jsx14(
|
|
@@ -26526,7 +26574,7 @@ function HomeView({ apiUrl, notice, returnToSession }) {
|
|
|
26526
26574
|
let sectionTitle;
|
|
26527
26575
|
switch (activeSection) {
|
|
26528
26576
|
case "sessions":
|
|
26529
|
-
sectionTitle = "
|
|
26577
|
+
sectionTitle = "Agents";
|
|
26530
26578
|
break;
|
|
26531
26579
|
case "projects":
|
|
26532
26580
|
sectionTitle = `Projects[${projects.length}]`;
|
|
@@ -26547,7 +26595,7 @@ function HomeView({ apiUrl, notice, returnToSession }) {
|
|
|
26547
26595
|
case "runs": {
|
|
26548
26596
|
const selectedSuffix = markedRunIds.length > 0 ? `, ${markedRunIds.length} selected` : "";
|
|
26549
26597
|
if (scopedSession) {
|
|
26550
|
-
sectionTitle = showArchivedRuns ? `
|
|
26598
|
+
sectionTitle = showArchivedRuns ? `Agent Runs[${scopedSession.metadata.name}: ${visibleRuns.length} archived${selectedSuffix}]` : `Agent Runs[${scopedSession.metadata.name}: ${visibleRuns.length}${selectedSuffix}]`;
|
|
26551
26599
|
} else {
|
|
26552
26600
|
sectionTitle = showArchivedRuns ? `Runs[${visibleRuns.length} archived${selectedSuffix}]` : `Runs[${visibleRuns.length}${selectedSuffix}]`;
|
|
26553
26601
|
}
|
|
@@ -26571,7 +26619,7 @@ function HomeView({ apiUrl, notice, returnToSession }) {
|
|
|
26571
26619
|
activeProject && /* @__PURE__ */ jsx14(KV, { label: "Org", value: activeProject.organizationName }),
|
|
26572
26620
|
activeProject && /* @__PURE__ */ jsx14(KV, { label: "Project", value: activeProject.projectName }),
|
|
26573
26621
|
activeProject && /* @__PURE__ */ jsx14(KV, { label: "Role", value: activeProject.role }),
|
|
26574
|
-
selectedSession && /* @__PURE__ */ jsx14(KV, { label: "
|
|
26622
|
+
selectedSession && /* @__PURE__ */ jsx14(KV, { label: "Agent", value: selectedSession.metadata.name }),
|
|
26575
26623
|
runError && /* @__PURE__ */ jsx14(KV, { label: "Error", value: runError, color: "red" }),
|
|
26576
26624
|
isRunMutationPending && /* @__PURE__ */ jsx14(
|
|
26577
26625
|
KV,
|
|
@@ -30881,7 +30929,7 @@ var humanQuickstartText = `Get started with auto:
|
|
|
30881
30929
|
1. auto auth login sign in (device flow; account setup in browser)
|
|
30882
30930
|
2. auto connections list see available providers; auto connect <provider>
|
|
30883
30931
|
3. auto apply apply .auto/ resources to your project
|
|
30884
|
-
4. auto run <
|
|
30932
|
+
4. auto run <agent> launch an agent run; add --attach to follow it
|
|
30885
30933
|
|
|
30886
30934
|
Fastest path: paste this into a coding agent running in your repo
|
|
30887
30935
|
(Claude Code, Cursor, Codex):
|
|
@@ -30895,7 +30943,7 @@ Docs and help: auto --help
|
|
|
30895
30943
|
`;
|
|
30896
30944
|
|
|
30897
30945
|
// src/commands/onboard/skill-content.generated.ts
|
|
30898
|
-
var onboardingSkillMarkdown = "# Intent\n\nYou are onboarding a user onto auto. Achieve three goals, in roughly this order, as rapidly as the user's pace allows:\n\n1. **Educate** \u2014 teach the user what auto is and how it works, and get them genuinely excited about it.\n2. **Magic moment** \u2014 get a tailor-made, deployed, proactive workflow live that solves a *real* problem for them, and have them witness it working end to end.\n3. **Self-sufficiency** \u2014 leave them with the building blocks (mental model, CI/CD, a self-improvement loop) to iterate on their auto system rapidly and safely on their own.\n\n# Background\n\n**What is auto?**\n\nauto lets you program software factories the same way you program CI/CD.\n\nCompose agents and triggers into workflows using simple YAML files, and deploy them into the cloud on merge.\n\nYou can use auto to build simple (but effective) automations:\n\n- Ticket / feedback triage and resolution\n- Automated incident / bug response\n- Custom tailored code review agents\n\nYou can also use auto to push the frontier of agentic labor:\n\n- Organized fleets of agents on long-horizon tasks\n- Multi-agent autoresearch / optimization loops\n- Agentic BDR and outbound lead engines\n- \u221E more ideas we've yet to dream up\n\nAnything that can be described in a standard operating procedure can be translated into a \"chart\" of agents and triggers in auto \u2014 the only limit is your imagination.\n\n# Reference material\n\nThis skill ships with documentation and worked examples. Read them before you onboard anyone; cite and copy from them as you go.\n\n| Path | What it covers |\n| --- | --- |\n| `docs/index.md` | The mental model: resources, events, triggers, runs. Start here. |\n| `docs/resource-model.md` | The `.auto/` directory, resource envelopes, and `auto apply` semantics. |\n| `docs/sessions-and-triggers.md` | Sessions, the trigger/event/routing vocabulary, filters, and PR checks. |\n| `docs/environments-and-profiles.md` | Sandbox images, setup steps and caching, and reusable agent profiles. |\n| `docs/tools-and-connections.md` | MCP tools, chat tools, provider connections, secrets, and the runtime tool surface agents see. |\n| `docs/cli.md` | The `auto` CLI command reference. |\n| `docs/ci-cd.md` | Service accounts and GitHub Actions for apply-on-merge. |\n| `examples/index.md` | Prose outline of every example \u2014 read this to know what's on the shelf. |\n| `examples/` | Complete, copyable `.auto/` directories \u2014 one per workflow archetype, each with a README explaining the moving parts. |\n\nIf these relative paths are not available (for example this playbook was printed by `auto onboard --agent` rather than installed as a skill directory), fetch the same content from the skills mirror: `npx skills add auto-dot-sh/skills`, or browse https://github.com/auto-dot-sh/skills.\n\n# Operating principles\n\nHold these throughout the onboarding:\n\n- **Trust live command output over this document.** The CLI evolves; run `auto --help` early and whenever in doubt, and when a command's real output disagrees with anything written here, trust the command output over this document and adapt.\n- **Converse, don't lecture.** Short messages, one question at a time, and adapt your vocabulary to the user's technical level. The pitch should take seconds, not paragraphs.\n- **Ask before changing anything outside `.auto/`.** The onboarding's write surface is the `.auto/` directory (plus the CI workflow in Beat 7, which ships as a PR). Any other file in the user's repo gets touched only with their explicit go-ahead.\n- **Warn before browsers open, and surface the link either way.** `auto auth login`, `auto connect`, and `auto sessions connect` open a browser window *and* print the authorization URL. Give a one-sentence heads-up first (\"this will open your browser to install the GitHub App\") so it doesn't feel like something hijacked their machine. If the browser doesn't pop (some environments can't open one), don't leave the user hunting through command output \u2014 repeat the printed authorization URL back to them on its own line as a clickable fallback, one provider at a time, and tell them plainly to click it.\n- **Signal before going quiet.** Deep repo exploration and waiting on async runs both involve silence. Say what you're about to do and roughly how long it will take.\n- **Enlist the user as the second pair of hands.** They trigger the inputs you can't (tagging a bot in Slack, commenting on a PR) and verify the outputs you can't see (a Slack message arriving). Make those asks explicit and specific.\n- **Hand off, don't hint.** When the user needs to do something, spell it out the *first* time \u2014 before they have to ask. Name the exact trigger (which label, which channel, which command), where to click, and what they'll see when it works. \"Label the issue whenever you're ready\" assumes they can see what's in your head and the YAML you wrote; a numbered \"in Linear: create an issue \u2192 add the `auto-triage` label \u2192 that label is the trigger\" does not. If you catch yourself about to post a one-line \"go ahead and \u2026\", expand it.\n- **Set expectations once, then stay quiet.** When you start watching an async run, tell the user up front roughly how long it takes and what \"normal\" looks like (\"the coder run provisions a sandbox first \u2014 expect a quiet couple of minutes\"), then hold until something *they'd care about* changes. Don't narrate every monitor tick or re-report the same event from a second watcher \u2014 a stream of \"still queued / still running / no news\" reads as noise, not reassurance.\n- **Expect trouble; own the troubleshooting.** OAuth flows fail, secrets get mistyped, webhooks misfire. When something breaks, diagnose it with the CLI (`auto runs list`, `auto runs show`, `auto runs conversation`, `auto apply --dry-run`) rather than asking the user to debug.\n- **Asynchronous means asynchronous.** Triggered runs take time to spawn and act. Tell the user when a wait is expected, and tail run state rather than declaring failure early.\n- **Never fabricate success.** Verify each step actually worked (the apply plan, the trigger receipt, the run conversation) before telling the user it did.\n- **Celebrate real wins.** When a workflow completes end to end for the first time, mark the moment \u2014 emoji, a pun, a little flourish. This should feel fun.\n\n# Procedure\n\nWork through the following beats in order. They are a roadmap, not a script \u2014 skip or reorder when the user's situation clearly calls for it (for example, a user who already has an account and connections can jump straight to Beat 3).\n\n## Beat 0: Learn auto\n\nBefore talking to the user, make sure you have a working command of the system: read `docs/index.md` for the mental model, skim the rest of `docs/`, and look through `examples/` to internalize what complete workflows look like. You will be drawing on the examples heavily in Beats 3-5.\n\n## Beat 1: Establish rapport\n\n**Your very first message after launching is a plain-language pitch, not a form.** Two or three sentences on what auto is and where it's valuable, then *one* opening question. Do **not** open with `AskUserQuestion` or a multiple-choice menu \u2014 that skips the *Educate* goal and makes the onboarding feel like a config wizard. Lead with words; reach for `AskUserQuestion` only once you're past the pitch and genuinely offering discrete choices (e.g. the hero workflow in Beat 3).\n\nAfter the pitch, shift into lightly interviewing the user. You want to learn:\n\n1. **Who they are and their professional context.**\n - Hobbyist, or evaluating auto for a real business?\n - How technical are they? Engineer, or a more managerial / operational role?\n2. **Where the work that matters most to them happens.**\n - Do they have a GitHub account / organization? Is there a repo that would make a good home for their auto system \u2014 better yet, are you running inside it right now?\n - Do they work out of Slack day-to-day, and could they install auto there?\n - What else is in their operating loop? Linear, Datadog, Sentry, PostHog, Notion, Telegram, internal webhooks, and so on.\n\nKeep this light \u2014 a few questions, not a survey. You're gathering enough signal to propose workflows that will land.\n\n## Beat 2: Get up to speed\n\nIf you are running inside a repo the user has indicated is their focus, tell them you're going to explore it for a few minutes (and that you'll go quiet while a research agent reads the repo) \u2014 then **dispatch a subagent to do the deep read in parallel** rather than reading file-by-file in the main thread. This keeps the conversation responsive and your own context clean, and it forces real exploration instead of leaning on whatever `CLAUDE.md` / `AGENTS.md` happened to load.\n\nSpawn one general-purpose / Explore subagent (or a small fan-out of them for a large monorepo) and have it read **both**:\n\n- **The repo:** what the project does, how the team works (CI, review culture, issue-tracker and chat integrations), the conventions written down in `CLAUDE.md`/`AGENTS.md`/`docs/`, and \u2014 most importantly \u2014 where the recurring, automatable toil is.\n- **This skill's `docs/` and `examples/`**, so the ideas it returns are already expressed in auto's vocabulary (sessions, triggers, profiles) and mapped to a concrete archetype.\n\nHave the subagent return a structured shortlist: for each candidate workflow, a one-line description, the matching archetype, the trigger/event that would fire it, and the *specific evidence in this repo* that the toil is real (a file, a workflow, a documented rule, a past incident). That shortlist is the raw material for Beat 3.\n\nWhen the agent returns, don't just move on \u2014 **surface 1-2 concrete observations to the user** (\"you renumber migrations by hand and a missed renumber caused a prod outage; your `postman/collection.json` updates are marked NOT OPTIONAL\") so they see the exploration paid off and trust that your pitches are grounded in *their* code. If `CLAUDE.md` already told you something, say so and confirm it against the repo rather than presenting it as discovery.\n\n## Beat 3: Present some options\n\nCombine what you know about the user, their goals, and their codebase, and brainstorm at least three workflows they could deploy *today*. Anchor on the archetypes in `examples/index.md` \u2014 code review, issue triage, incident response, chat assistant, scheduled digest, an orchestrated agent fleet, a research/optimization loop, an outbound lead engine \u2014 but tailor each pitch to their actual stack and pain points (\"a review agent that enforces *your* `docs/style.md`\", not \"a code review bot\"). The archetypes are anchors, not a menu: if the user's situation suggests a useful workflow that matches none of them, it is absolutely fair game \u2014 pitch it. Calibrate ambition to the user: the simple automations land the magic moment fastest, while the frontier examples (fleet, research loop) make better second acts unless the user is clearly hungry for them.\n\nPresent the options as a question, one line each on what the workflow would do for them, and let them pick \u2014 including the option to propose their own idea instead. The winner becomes the hero use case.\n\n## Beat 4: Setup & smoke test\n\nGet the user from zero to a deployed, *hollow* version of the hero workflow \u2014 a shell that proves every input and output is wired up before you invest in the real logic. In practice:\n\n1. **Install the CLI**: `npm install -g @autohq/cli` (requires Node 20+). Verify with `auto --version`.\n2. **Sign in**: `auto auth login` (heads-up: opens a browser; account creation happens there too). You're blocked on the user completing the flow either way, so wait for them \u2014 don't busy yourself with other work mid-sign-in, which only confuses things. When you're driving from a terminal with no browser, `auto auth login --device` prints a code the user enters in their browser.\n3. **Create the org and project**: `auto orgs create` / `auto projects create`. Ask the user what they want to name them \u2014 don't pick names for them.\n4. **Connect providers**: `auto connections list --available` to see what's offered, then `auto connect <provider>` for each one the workflow needs (heads-up: browser again). GitHub connects as an App installation; Slack and Linear as OAuth grants.\n5. **Scaffold `.auto/`**: create the directory in their repo and draft the minimal resources \u2014 an environment, a profile, any tool definitions, and a session with the workflow's trigger. Copy from the matching example and strip it down.\n6. **Apply**: `auto apply --dry-run` first, show the user the plan, then `auto apply`.\n\nThen run the smoke test. Its exact shape depends on the use case, but the goal is always the same: verify that the trigger fires and the agent's output surfaces reach the user. A workflow almost always involves some communication channel, so a good smoke test \"breaks the fourth wall\" \u2014 have the hollow agent send the user a hello in Slack (or wherever they live).\n\nEnlist the user, and **hand off, don't hint** (see the operating principle): when you ask them to fire the input only they can fire, give the full, numbered steps the first time \u2014 *which* label on *which* issue, *which* channel to create, the exact command to run, and what they'll see when it lands. Don't post \"go ahead and label the issue\" and assume they know a label is the trigger; that one-liner is what makes a user ask \"wait, what exactly do I do?\". Right after `auto apply`, before you start watching, tell them in plain words what just deployed and what their next action is. Then **set expectations once** \u2014 \"the run takes a minute or two to spawn; I'll tell you when it acts\" \u2014 and watch progress yourself with `auto runs list` and `auto attach <run-id>` (live stream; `auto runs conversation <run-id>` for a snapshot), surfacing only meaningful changes rather than every tick. Troubleshoot until the smoke test passes.\n\nIf a channel install is blocked \u2014 for example the Slack workspace requires admin approval \u2014 don't stall the onboarding on it. Pick an output surface the user can verify without the channel (a PR comment, a GitHub check, the run transcript via `auto runs conversation`), continue the beats, and circle back to realize the channel identity once the approval lands.\n\n## Beat 5: Build the real thing\n\nWith inputs and outputs proven, flesh the workflow out to its real form in `.auto/` \u2014 the full profile instructions, the real prompt, the filters and routing that make it production-shaped. Tell the user what you're changing, then apply it.\n\nTest end to end: trigger the workflow for real, follow the run, and enlist the user again for out-of-band inputs and output verification. Iterate until you've witnessed one complete, successful run of the real workflow.\n\nThen celebrate. This is the magic moment \u2014 act like it. \u{1F389}\n\n## Beat 6: Bring the user up to speed\n\nWalk the user through what you built, piece by piece: which environment, profile, tools, session, and triggers you composed, how an event flows through them to become a run, and where each file lives in `.auto/`. Show short snippets from the actual files rather than describing them abstractly.\n\nThen ask: anything they want to dig into further, or shall we set up CI/CD?\n\n## Beat 7: Set up CI/CD\n\nMake merges to their default branch the deployment mechanism for their auto system (this is the \"program software factories like CI/CD\" promise made literal). Following `docs/ci-cd.md`:\n\n1. Create a service account: have the *user* run `auto service-account create ci-apply --preset applier` in their own terminal (and a second `--preset read-only` account for PR dry-runs if they want plan-on-PR). The token prints exactly once and goes straight into a repo secret \u2014 it must never be pasted into the conversation, and if you run the command yourself it lands in your transcript.\n2. Add a GitHub Actions workflow that runs `auto apply --dry-run` on pull requests and `auto apply` on pushes to the default branch.\n3. Tell the user exactly which secret to create where in their repo settings (the service-account token, shown once at creation).\n4. Open a PR containing `.auto/` and the new workflow, and ask the user to merge it.\n\nWhen the merge lands, verify the apply ran cleanly in Actions, and congratulate them \u2014 their factory now ships itself.\n\n## Beat 8: Set up a self-improvement loop\n\nTell the user there's one last step we've found high-leverage: a workflow that watches their auto system itself \u2014 sweeping recent runs for failures, bottlenecks, and drift, and proposing improvements. Explain that it's just another auto workflow, fully theirs to tune.\n\nIf they're in, copy `examples/self-improvement/` and tailor it to their setup (their channel, their sessions, their cadence). Since CI/CD is now live, do **not** run `auto apply` yourself \u2014 open a PR and let them merge it. That's the new normal, and modeling it is the point.\n\n## Beat 9: Conclusion\n\nTell the user they're all set: a live workflow, CI/CD for their auto system, and a loop that helps it improve. Recap in two or three lines what now exists. Offer to help them build or optimize additional workflows \u2014 Beat 3's runner-up ideas are natural next candidates.\n";
|
|
30946
|
+
var onboardingSkillMarkdown = "# Intent\n\nYou are onboarding a user onto auto. Achieve three goals, in roughly this order, as rapidly as the user's pace allows:\n\n1. **Educate** \u2014 teach the user what auto is and how it works, and get them genuinely excited about it.\n2. **Magic moment** \u2014 get a tailor-made, deployed, proactive workflow live that solves a *real* problem for them, and have them witness it working end to end.\n3. **Self-sufficiency** \u2014 leave them with the building blocks (mental model, CI/CD, a self-improvement loop) to iterate on their auto system rapidly and safely on their own.\n\n# Background\n\n**What is auto?**\n\nauto lets you program software factories the same way you program CI/CD.\n\nCompose agents and triggers into workflows using simple YAML files, and deploy them into the cloud on merge.\n\nYou can use auto to build simple (but effective) automations:\n\n- Ticket / feedback triage and resolution\n- Automated incident / bug response\n- Custom tailored code review agents\n\nYou can also use auto to push the frontier of agentic labor:\n\n- Organized fleets of agents on long-horizon tasks\n- Multi-agent autoresearch / optimization loops\n- Agentic BDR and outbound lead engines\n- \u221E more ideas we've yet to dream up\n\nAnything that can be described in a standard operating procedure can be translated into a \"chart\" of agents and triggers in auto \u2014 the only limit is your imagination.\n\n# Reference material\n\nThis skill ships with documentation and worked examples. Read them before you onboard anyone; cite and copy from them as you go.\n\n| Path | What it covers |\n| --- | --- |\n| `docs/index.md` | The mental model: resources, events, triggers, runs. Start here. |\n| `docs/resource-model.md` | The `.auto/` directory, resource envelopes, and `auto apply` semantics. |\n| `docs/sessions-and-triggers.md` | Agents, the trigger/event/routing vocabulary, filters, and PR checks. |\n| `docs/environments-and-profiles.md` | Sandbox images, setup steps and caching, and reusable agent profiles. |\n| `docs/tools-and-connections.md` | MCP tools, chat tools, provider connections, secrets, and the runtime tool surface agents see. |\n| `docs/cli.md` | The `auto` CLI command reference. |\n| `docs/ci-cd.md` | Service accounts and GitHub Actions for apply-on-merge. |\n| `examples/index.md` | Prose outline of every example \u2014 read this to know what's on the shelf. |\n| `examples/` | Complete, copyable `.auto/` directories \u2014 one per workflow archetype, each with a README explaining the moving parts. |\n\nIf these relative paths are not available (for example this playbook was printed by `auto onboard --agent` rather than installed as a skill directory), fetch the same content from the skills mirror: `npx skills add auto-dot-sh/skills`, or browse https://github.com/auto-dot-sh/skills.\n\n# Operating principles\n\nHold these throughout the onboarding:\n\n- **Trust live command output over this document.** The CLI evolves; run `auto --help` early and whenever in doubt, and when a command's real output disagrees with anything written here, trust the command output over this document and adapt.\n- **Converse, don't lecture.** Short messages, one question at a time, and adapt your vocabulary to the user's technical level. The pitch should take seconds, not paragraphs.\n- **Ask before changing anything outside `.auto/`.** The onboarding's write surface is the `.auto/` directory (plus the CI workflow in Beat 7, which ships as a PR). Any other file in the user's repo gets touched only with their explicit go-ahead.\n- **Warn before browsers open, and surface the link either way.** `auto auth login`, `auto connect`, and `auto agents connect` open a browser window *and* print the authorization URL. Give a one-sentence heads-up first (\"this will open your browser to install the GitHub App\") so it doesn't feel like something hijacked their machine. If the browser doesn't pop (some environments can't open one), don't leave the user hunting through command output \u2014 repeat the printed authorization URL back to them on its own line as a clickable fallback, one provider at a time, and tell them plainly to click it.\n- **Signal before going quiet.** Deep repo exploration and waiting on async runs both involve silence. Say what you're about to do and roughly how long it will take.\n- **Enlist the user as the second pair of hands.** They trigger the inputs you can't (tagging a bot in Slack, commenting on a PR) and verify the outputs you can't see (a Slack message arriving). Make those asks explicit and specific.\n- **Hand off, don't hint.** When the user needs to do something, spell it out the *first* time \u2014 before they have to ask. Name the exact trigger (which label, which channel, which command), where to click, and what they'll see when it works. \"Label the issue whenever you're ready\" assumes they can see what's in your head and the YAML you wrote; a numbered \"in Linear: create an issue \u2192 add the `auto-triage` label \u2192 that label is the trigger\" does not. If you catch yourself about to post a one-line \"go ahead and \u2026\", expand it.\n- **Set expectations once, then stay quiet.** When you start watching an async run, tell the user up front roughly how long it takes and what \"normal\" looks like (\"the coder run provisions a sandbox first \u2014 expect a quiet couple of minutes\"), then hold until something *they'd care about* changes. Don't narrate every monitor tick or re-report the same event from a second watcher \u2014 a stream of \"still queued / still running / no news\" reads as noise, not reassurance.\n- **Expect trouble; own the troubleshooting.** OAuth flows fail, secrets get mistyped, webhooks misfire. When something breaks, diagnose it with the CLI (`auto runs list`, `auto runs show`, `auto runs conversation`, `auto apply --dry-run`) rather than asking the user to debug.\n- **Asynchronous means asynchronous.** Triggered runs take time to spawn and act. Tell the user when a wait is expected, and tail run state rather than declaring failure early.\n- **Never fabricate success.** Verify each step actually worked (the apply plan, the trigger receipt, the run conversation) before telling the user it did.\n- **Celebrate real wins.** When a workflow completes end to end for the first time, mark the moment \u2014 emoji, a pun, a little flourish. This should feel fun.\n\n# Procedure\n\nWork through the following beats in order. They are a roadmap, not a script \u2014 skip or reorder when the user's situation clearly calls for it (for example, a user who already has an account and connections can jump straight to Beat 3).\n\n## Beat 0: Learn auto\n\nBefore talking to the user, make sure you have a working command of the system: read `docs/index.md` for the mental model, skim the rest of `docs/`, and look through `examples/` to internalize what complete workflows look like. You will be drawing on the examples heavily in Beats 3-5.\n\n## Beat 1: Establish rapport\n\n**Your very first message after launching is a plain-language pitch, not a form.** Two or three sentences on what auto is and where it's valuable, then *one* opening question. Do **not** open with `AskUserQuestion` or a multiple-choice menu \u2014 that skips the *Educate* goal and makes the onboarding feel like a config wizard. Lead with words; reach for `AskUserQuestion` only once you're past the pitch and genuinely offering discrete choices (e.g. the hero workflow in Beat 3).\n\nAfter the pitch, shift into lightly interviewing the user. You want to learn:\n\n1. **Who they are and their professional context.**\n - Hobbyist, or evaluating auto for a real business?\n - How technical are they? Engineer, or a more managerial / operational role?\n2. **Where the work that matters most to them happens.**\n - Do they have a GitHub account / organization? Is there a repo that would make a good home for their auto system \u2014 better yet, are you running inside it right now?\n - Do they work out of Slack day-to-day, and could they install auto there?\n - What else is in their operating loop? Linear, Datadog, Sentry, PostHog, Notion, Telegram, internal webhooks, and so on.\n\nKeep this light \u2014 a few questions, not a survey. You're gathering enough signal to propose workflows that will land.\n\n## Beat 2: Get up to speed\n\nIf you are running inside a repo the user has indicated is their focus, tell them you're going to explore it for a few minutes (and that you'll go quiet while a research agent reads the repo) \u2014 then **dispatch a subagent to do the deep read in parallel** rather than reading file-by-file in the main thread. This keeps the conversation responsive and your own context clean, and it forces real exploration instead of leaning on whatever `CLAUDE.md` / `AGENTS.md` happened to load.\n\nSpawn one general-purpose / Explore subagent (or a small fan-out of them for a large monorepo) and have it read **both**:\n\n- **The repo:** what the project does, how the team works (CI, review culture, issue-tracker and chat integrations), the conventions written down in `CLAUDE.md`/`AGENTS.md`/`docs/`, and \u2014 most importantly \u2014 where the recurring, automatable toil is.\n- **This skill's `docs/` and `examples/`**, so the ideas it returns are already expressed in auto's vocabulary (agents, triggers, profiles) and mapped to a concrete archetype.\n\nHave the subagent return a structured shortlist: for each candidate workflow, a one-line description, the matching archetype, the trigger/event that would fire it, and the *specific evidence in this repo* that the toil is real (a file, a workflow, a documented rule, a past incident). That shortlist is the raw material for Beat 3.\n\nWhen the agent returns, don't just move on \u2014 **surface 1-2 concrete observations to the user** (\"you renumber migrations by hand and a missed renumber caused a prod outage; your `postman/collection.json` updates are marked NOT OPTIONAL\") so they see the exploration paid off and trust that your pitches are grounded in *their* code. If `CLAUDE.md` already told you something, say so and confirm it against the repo rather than presenting it as discovery.\n\n## Beat 3: Present some options\n\nCombine what you know about the user, their goals, and their codebase, and brainstorm at least three workflows they could deploy *today*. Anchor on the archetypes in `examples/index.md` \u2014 code review, issue triage, incident response, chat assistant, scheduled digest, an orchestrated agent fleet, a research/optimization loop, an outbound lead engine \u2014 but tailor each pitch to their actual stack and pain points (\"a review agent that enforces *your* `docs/style.md`\", not \"a code review bot\"). The archetypes are anchors, not a menu: if the user's situation suggests a useful workflow that matches none of them, it is absolutely fair game \u2014 pitch it. Calibrate ambition to the user: the simple automations land the magic moment fastest, while the frontier examples (fleet, research loop) make better second acts unless the user is clearly hungry for them.\n\nPresent the options as a question, one line each on what the workflow would do for them, and let them pick \u2014 including the option to propose their own idea instead. The winner becomes the hero use case.\n\n## Beat 4: Setup & smoke test\n\nGet the user from zero to a deployed, *hollow* version of the hero workflow \u2014 a shell that proves every input and output is wired up before you invest in the real logic. In practice:\n\n1. **Install the CLI**: `npm install -g @autohq/cli` (requires Node 20+). Verify with `auto --version`.\n2. **Sign in**: `auto auth login` (heads-up: opens a browser; account creation happens there too). You're blocked on the user completing the flow either way, so wait for them \u2014 don't busy yourself with other work mid-sign-in, which only confuses things. When you're driving from a terminal with no browser, `auto auth login --device` prints a code the user enters in their browser.\n3. **Create the org and project**: `auto orgs create` / `auto projects create`. Ask the user what they want to name them \u2014 don't pick names for them.\n4. **Connect providers**: `auto connections list --available` to see what's offered, then `auto connect <provider>` for each one the workflow needs (heads-up: browser again). GitHub connects as an App installation; Slack and Linear as OAuth grants.\n5. **Scaffold `.auto/`**: create the directory in their repo and draft the minimal resources \u2014 an environment, a profile, any tool definitions, and an agent with the workflow's trigger. Copy from the matching example and strip it down.\n6. **Apply**: `auto apply --dry-run` first, show the user the plan, then `auto apply`.\n\nThen run the smoke test. Its exact shape depends on the use case, but the goal is always the same: verify that the trigger fires and the agent's output surfaces reach the user. A workflow almost always involves some communication channel, so a good smoke test \"breaks the fourth wall\" \u2014 have the hollow agent send the user a hello in Slack (or wherever they live).\n\nEnlist the user, and **hand off, don't hint** (see the operating principle): when you ask them to fire the input only they can fire, give the full, numbered steps the first time \u2014 *which* label on *which* issue, *which* channel to create, the exact command to run, and what they'll see when it lands. Don't post \"go ahead and label the issue\" and assume they know a label is the trigger; that one-liner is what makes a user ask \"wait, what exactly do I do?\". Right after `auto apply`, before you start watching, tell them in plain words what just deployed and what their next action is. Then **set expectations once** \u2014 \"the run takes a minute or two to spawn; I'll tell you when it acts\" \u2014 and watch progress yourself with `auto runs list` and `auto attach <run-id>` (live stream; `auto runs conversation <run-id>` for a snapshot), surfacing only meaningful changes rather than every tick. Troubleshoot until the smoke test passes.\n\nIf a channel install is blocked \u2014 for example the Slack workspace requires admin approval \u2014 don't stall the onboarding on it. Pick an output surface the user can verify without the channel (a PR comment, a GitHub check, the run transcript via `auto runs conversation`), continue the beats, and circle back to realize the channel identity once the approval lands.\n\n## Beat 5: Build the real thing\n\nWith inputs and outputs proven, flesh the workflow out to its real form in `.auto/` \u2014 the full profile instructions, the real prompt, the filters and routing that make it production-shaped. Tell the user what you're changing, then apply it.\n\nTest end to end: trigger the workflow for real, follow the run, and enlist the user again for out-of-band inputs and output verification. Iterate until you've witnessed one complete, successful run of the real workflow.\n\nThen celebrate. This is the magic moment \u2014 act like it. \u{1F389}\n\n## Beat 6: Bring the user up to speed\n\nWalk the user through what you built, piece by piece: which environment, profile, tools, agent, and triggers you composed, how an event flows through them to become a run, and where each file lives in `.auto/`. Show short snippets from the actual files rather than describing them abstractly.\n\nThen ask: anything they want to dig into further, or shall we set up CI/CD?\n\n## Beat 7: Set up CI/CD\n\nMake merges to their default branch the deployment mechanism for their auto system (this is the \"program software factories like CI/CD\" promise made literal). Following `docs/ci-cd.md`:\n\n1. Create a service account: have the *user* run `auto service-account create ci-apply --preset applier` in their own terminal (and a second `--preset read-only` account for PR dry-runs if they want plan-on-PR). The token prints exactly once and goes straight into a repo secret \u2014 it must never be pasted into the conversation, and if you run the command yourself it lands in your transcript.\n2. Add a GitHub Actions workflow that runs `auto apply --dry-run` on pull requests and `auto apply` on pushes to the default branch.\n3. Tell the user exactly which secret to create where in their repo settings (the service-account token, shown once at creation).\n4. Open a PR containing `.auto/` and the new workflow, and ask the user to merge it.\n\nWhen the merge lands, verify the apply ran cleanly in Actions, and congratulate them \u2014 their factory now ships itself.\n\n## Beat 8: Set up a self-improvement loop\n\nTell the user there's one last step we've found high-leverage: a workflow that watches their auto system itself \u2014 sweeping recent runs for failures, bottlenecks, and drift, and proposing improvements. Explain that it's just another auto workflow, fully theirs to tune.\n\nIf they're in, copy `examples/self-improvement/` and tailor it to their setup (their channel, their agents, their cadence). Since CI/CD is now live, do **not** run `auto apply` yourself \u2014 open a PR and let them merge it. That's the new normal, and modeling it is the point.\n\n## Beat 9: Conclusion\n\nTell the user they're all set: a live workflow, CI/CD for their auto system, and a loop that helps it improve. Recap in two or three lines what now exists. Offer to help them build or optimize additional workflows \u2014 Beat 3's runner-up ideas are natural next candidates.\n";
|
|
30899
30947
|
|
|
30900
30948
|
// src/commands/onboard/commands.ts
|
|
30901
30949
|
function registerOnboardCommands(program, context) {
|
|
@@ -32221,7 +32269,7 @@ function collect(value, previous = []) {
|
|
|
32221
32269
|
return [...previous, value];
|
|
32222
32270
|
}
|
|
32223
32271
|
function registerRunCommands(program, context) {
|
|
32224
|
-
const runs = program.command("runs").description("Inspect
|
|
32272
|
+
const runs = program.command("runs").description("Inspect agent runs.");
|
|
32225
32273
|
runs.command("list").description("List runs for a session or the whole project.").option("--session <name>", "session name").option("--include-archived", "include archived runs").option("--status <status>", "filter by run status (repeatable)", collect).option("--since <iso-timestamp>", "only runs created after this time").option("--limit <count>", "maximum runs to return", parsePositiveInteger).option("--api-url <url>", "Auto API base URL").option("--api-base-url <url>", "Auto API base URL").action(async (options) => {
|
|
32226
32274
|
await handleRunsList(context, options.session, options);
|
|
32227
32275
|
});
|
|
@@ -32291,7 +32339,7 @@ function registerRunCommands(program, context) {
|
|
|
32291
32339
|
runs.command("stop").description("Stop live runs and shut down their agent sessions.").argument("<run-ids...>", "run id(s)").option("--reason <reason>", "reason recorded with the stop").option("--api-url <url>", "Auto API base URL").option("--api-base-url <url>", "Auto API base URL").action(async (runIds, commandOptions) => {
|
|
32292
32340
|
await stopRunsAction(context, runIds, commandOptions);
|
|
32293
32341
|
});
|
|
32294
|
-
runs.command("benchmark-startup").description("Launch
|
|
32342
|
+
runs.command("benchmark-startup").description("Launch an agent run and measure time until awaiting.").requiredOption("--session <name>", "agent name").option("-m, --message <message>", "initial message for the run").option(
|
|
32295
32343
|
"--interactive",
|
|
32296
32344
|
"start without the default initial prompt unless --message is provided"
|
|
32297
32345
|
).option(
|
|
@@ -32313,7 +32361,7 @@ function registerRunCommands(program, context) {
|
|
|
32313
32361
|
).option("--json", "write a single JSON result object").option("--api-url <url>", "Auto API base URL").option("--api-base-url <url>", "Auto API base URL").action(async (options) => {
|
|
32314
32362
|
await benchmarkStartupAction(context, options);
|
|
32315
32363
|
});
|
|
32316
|
-
program.command("interactive").description("Launch
|
|
32364
|
+
program.command("interactive").description("Launch an agent run, stream it, and send typed messages.").argument("<session>", "agent name").option("-m, --message <message>", "initial message for the run").option("--api-url <url>", "Auto API base URL").option("--api-base-url <url>", "Auto API base URL").option("--operator <name>", "operator name for attach/detach messages").option(
|
|
32317
32365
|
"--attach-message",
|
|
32318
32366
|
"send the automated attach message after creating the run"
|
|
32319
32367
|
).option("--no-attach-message", "do not send the automated attach message").option("--no-detach-message", "do not send the automated detach message").action(
|
|
@@ -32677,7 +32725,7 @@ async function connectSessionPresence2(input) {
|
|
|
32677
32725
|
}
|
|
32678
32726
|
for (const pending of result.pending) {
|
|
32679
32727
|
input.writeOutput(
|
|
32680
|
-
`connect
|
|
32728
|
+
`connect agent/${input.session} workspace/${pending.workspace} connection/${pending.connection}`
|
|
32681
32729
|
);
|
|
32682
32730
|
input.writeOutput(`authorization_url ${pending.authorizationUrl}`);
|
|
32683
32731
|
if (pending.suggestedUsername) {
|
|
@@ -32738,7 +32786,7 @@ async function connectSessionPresence2(input) {
|
|
|
32738
32786
|
}
|
|
32739
32787
|
if (!realized) {
|
|
32740
32788
|
throw new Error(
|
|
32741
|
-
telegram ? `Timed out waiting for the Telegram bot to be confirmed under ${pending.workspace}. Confirm the creation dialog in Telegram, then re-run \`auto
|
|
32789
|
+
telegram ? `Timed out waiting for the Telegram bot to be confirmed under ${pending.workspace}. Confirm the creation dialog in Telegram, then re-run \`auto agents connect ${input.session}\`.` : `Timed out waiting for the install in workspace ${pending.workspace}. Re-run \`auto agents connect ${input.session}\` to retry.`
|
|
32742
32790
|
);
|
|
32743
32791
|
}
|
|
32744
32792
|
}
|
|
@@ -32746,19 +32794,19 @@ async function connectSessionPresence2(input) {
|
|
|
32746
32794
|
}
|
|
32747
32795
|
function realizedIdentityLine(session, identity2) {
|
|
32748
32796
|
const handle = identity2.botUsername ? `persona/@${identity2.botUsername}` : `bot/${identity2.botUserId ?? ""}`;
|
|
32749
|
-
return `connected
|
|
32797
|
+
return `connected agent/${session} workspace/${identity2.workspace} ${handle}`;
|
|
32750
32798
|
}
|
|
32751
32799
|
function staleScopesLine(session, identity2) {
|
|
32752
32800
|
if (!identity2.missingScopes?.length) {
|
|
32753
32801
|
return void 0;
|
|
32754
32802
|
}
|
|
32755
|
-
return ` workspace "${identity2.workspace}" was installed before scopes ${identity2.missingScopes.join(", ")} were added; refresh with \`auto
|
|
32803
|
+
return ` workspace "${identity2.workspace}" was installed before scopes ${identity2.missingScopes.join(", ")} were added; refresh with \`auto agents connect ${session} --reconnect\``;
|
|
32756
32804
|
}
|
|
32757
32805
|
function manualGuidance(input) {
|
|
32758
32806
|
if (input.allTelegram) {
|
|
32759
|
-
return `Open each creation link and confirm the new bot in Telegram; Auto provisions it automatically. Re-run \`auto
|
|
32807
|
+
return `Open each creation link and confirm the new bot in Telegram; Auto provisions it automatically. Re-run \`auto agents connect ${input.session}\` (or check presence) to see it realize.`;
|
|
32760
32808
|
}
|
|
32761
|
-
return input.reconnect ? "Open each authorization URL to reinstall the agent app; the callback page confirms the refreshed tokens." : "Open each authorization URL to install the agent app, then re-run with no flags or check `
|
|
32809
|
+
return input.reconnect ? "Open each authorization URL to reinstall the agent app; the callback page confirms the refreshed tokens." : "Open each authorization URL to install the agent app, then re-run with no flags or check `agents connect` again.";
|
|
32762
32810
|
}
|
|
32763
32811
|
async function promptForIconUploads(input, options) {
|
|
32764
32812
|
const presence = await input.client.getSessionPresence(
|
|
@@ -32775,14 +32823,14 @@ async function promptForIconUploads(input, options) {
|
|
|
32775
32823
|
for (const identity2 of drifted) {
|
|
32776
32824
|
const settingsUrl = `${SLACK_APPS_URL}/${identity2.appId}/general`;
|
|
32777
32825
|
input.writeOutput(
|
|
32778
|
-
`Workspace "${identity2.workspace}" agent app icon does not match the
|
|
32826
|
+
`Workspace "${identity2.workspace}" agent app icon does not match the agent avatar yet. Slack has no app-icon API; upload the avatar image once under "Display Information" at ${settingsUrl}`
|
|
32779
32827
|
);
|
|
32780
32828
|
if (identity2.avatarUrl) {
|
|
32781
32829
|
input.writeOutput(`avatar image: ${identity2.avatarUrl}`);
|
|
32782
32830
|
}
|
|
32783
32831
|
if (!canPrompt) {
|
|
32784
32832
|
input.writeOutput(
|
|
32785
|
-
`Then re-run \`auto
|
|
32833
|
+
`Then re-run \`auto agents connect ${input.session}\` interactively to record the upload.`
|
|
32786
32834
|
);
|
|
32787
32835
|
continue;
|
|
32788
32836
|
}
|
|
@@ -32822,7 +32870,7 @@ async function promptForIconUploads(input, options) {
|
|
|
32822
32870
|
options
|
|
32823
32871
|
);
|
|
32824
32872
|
input.writeOutput(
|
|
32825
|
-
`recorded icon
|
|
32873
|
+
`recorded icon agent/${input.session} workspace/${identity2.workspace} sha256/${recorded.appliedIconSha256.slice(0, 12)}`
|
|
32826
32874
|
);
|
|
32827
32875
|
}
|
|
32828
32876
|
}
|
|
@@ -32929,17 +32977,17 @@ async function launchRun(input) {
|
|
|
32929
32977
|
|
|
32930
32978
|
// src/commands/sessions/commands.ts
|
|
32931
32979
|
function registerSessionCommands(program, context) {
|
|
32932
|
-
program.command("run").description("Launch
|
|
32980
|
+
program.command("run").description("Launch an agent run on the Auto platform.").argument("<session>", "agent name").option("-m, --message <message>", "initial message for the run").option("-a, --attach", "stream the run conversation after launch").option("--api-url <url>", "Auto API base URL").option("--api-base-url <url>", "Auto API base URL").action(async (sessionName, commandOptions) => {
|
|
32933
32981
|
await launchRun({
|
|
32934
32982
|
sessionName,
|
|
32935
32983
|
commandOptions,
|
|
32936
32984
|
context
|
|
32937
32985
|
});
|
|
32938
32986
|
});
|
|
32939
|
-
const sessions = program.command("sessions").description("Manage
|
|
32987
|
+
const sessions = program.command("agents").alias("sessions").description("Manage Agent resources.");
|
|
32940
32988
|
sessions.command("connect").description(
|
|
32941
|
-
"Connect
|
|
32942
|
-
).argument("<session>", "
|
|
32989
|
+
"Connect an agent's provider presence (e.g. install its Slack agent app)."
|
|
32990
|
+
).argument("<session>", "agent resource name").option("--manual", "print authorization URLs without opening a browser").option(
|
|
32943
32991
|
"--reconnect",
|
|
32944
32992
|
"re-run the install for already-connected workspaces (repairs stranded bot tokens)"
|
|
32945
32993
|
).option("--api-url <url>", "Auto API base URL").option("--api-base-url <url>", "Auto API base URL").action(
|
|
@@ -32955,9 +33003,7 @@ function registerSessionCommands(program, context) {
|
|
|
32955
33003
|
});
|
|
32956
33004
|
}
|
|
32957
33005
|
);
|
|
32958
|
-
program.command("run-and-attach").description(
|
|
32959
|
-
"Launch a session run and immediately stream its conversation."
|
|
32960
|
-
).argument("<session>", "session name").option("-m, --message <message>", "initial message for the run").option("--api-url <url>", "Auto API base URL").option("--api-base-url <url>", "Auto API base URL").action(async (sessionName, commandOptions) => {
|
|
33006
|
+
program.command("run-and-attach").description("Launch an agent run and immediately stream its conversation.").argument("<session>", "agent name").option("-m, --message <message>", "initial message for the run").option("--api-url <url>", "Auto API base URL").option("--api-base-url <url>", "Auto API base URL").action(async (sessionName, commandOptions) => {
|
|
32961
33007
|
await launchRun({
|
|
32962
33008
|
sessionName,
|
|
32963
33009
|
commandOptions: {
|