@autohq/cli 0.1.132 → 0.1.133
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 +14 -32
- package/dist/index.js +188 -214
- package/package.json +1 -1
package/dist/agent-bridge.js
CHANGED
|
@@ -19683,7 +19683,6 @@ var SessionRunCommandIdSchema2 = OpaqueIdSchema2.brand();
|
|
|
19683
19683
|
var RuntimeIdSchema2 = OpaqueIdSchema2.brand();
|
|
19684
19684
|
var RuntimeBridgeLeaseIdSchema2 = OpaqueIdSchema2.brand();
|
|
19685
19685
|
var EnvironmentSetupSnapshotIdSchema = OpaqueIdSchema2.brand();
|
|
19686
|
-
var ToolIdSchema = OpaqueIdSchema2.brand();
|
|
19687
19686
|
var UserIdSchema = OpaqueIdSchema2.brand();
|
|
19688
19687
|
|
|
19689
19688
|
// ../../packages/schemas/src/auth.ts
|
|
@@ -20993,7 +20992,6 @@ var SecretDeleteResponseSchema = external_exports.object({
|
|
|
20993
20992
|
});
|
|
20994
20993
|
|
|
20995
20994
|
// ../../packages/schemas/src/tools.ts
|
|
20996
|
-
var RESOURCE_KIND_TOOL = "tool";
|
|
20997
20995
|
var REMOTE_MCP_TRANSPORTS = ["streamable_http"];
|
|
20998
20996
|
var LOCAL_TOOL_IMPLEMENTATIONS = ["auto", "chat", "ping"];
|
|
20999
20997
|
var SecretReferenceSchema = external_exports.object({
|
|
@@ -21093,9 +21091,7 @@ var ToolSpecSchema = external_exports.discriminatedUnion("kind", [
|
|
|
21093
21091
|
RemoteMcpToolSchema,
|
|
21094
21092
|
LocalToolSchema
|
|
21095
21093
|
]);
|
|
21096
|
-
var
|
|
21097
|
-
var ToolApplyRequestSchema = resourceApplySchema(ToolSpecSchema);
|
|
21098
|
-
var ToolConnectRequestSchema = external_exports.object({
|
|
21094
|
+
var SessionToolConnectRequestSchema = external_exports.object({
|
|
21099
21095
|
redirectUri: external_exports.string().trim().url().refine(
|
|
21100
21096
|
(value2) => {
|
|
21101
21097
|
const url3 = new URL(value2);
|
|
@@ -21105,21 +21101,23 @@ var ToolConnectRequestSchema = external_exports.object({
|
|
|
21105
21101
|
return url3.protocol === "http:" && (url3.hostname === "localhost" || url3.hostname === "127.0.0.1");
|
|
21106
21102
|
},
|
|
21107
21103
|
{
|
|
21108
|
-
message: "
|
|
21104
|
+
message: "Session tool OAuth redirect URIs must use https, except localhost loopback callbacks may use http"
|
|
21109
21105
|
}
|
|
21110
21106
|
).optional()
|
|
21111
21107
|
});
|
|
21112
|
-
var
|
|
21108
|
+
var SessionToolConnectResponseSchema = external_exports.discriminatedUnion("status", [
|
|
21113
21109
|
external_exports.object({
|
|
21114
21110
|
status: external_exports.literal("authorization_required"),
|
|
21111
|
+
session: ResourceNameSchema,
|
|
21115
21112
|
tool: ResourceNameSchema,
|
|
21116
21113
|
connection: ResourceNameSchema,
|
|
21117
21114
|
authorizationUrl: external_exports.string().trim().url(),
|
|
21118
21115
|
message: external_exports.string().trim().min(1)
|
|
21119
21116
|
})
|
|
21120
21117
|
]);
|
|
21121
|
-
var
|
|
21118
|
+
var SessionToolConnectCompleteResponseSchema = external_exports.object({
|
|
21122
21119
|
status: external_exports.literal("connected"),
|
|
21120
|
+
session: ResourceNameSchema.optional(),
|
|
21123
21121
|
tool: ResourceNameSchema,
|
|
21124
21122
|
connection: ResourceNameSchema,
|
|
21125
21123
|
projectId: ProjectIdSchema
|
|
@@ -21911,15 +21909,6 @@ var PROJECT_RESOURCE_APPLY_ORDER = [
|
|
|
21911
21909
|
RESOURCE_KIND_SESSION
|
|
21912
21910
|
];
|
|
21913
21911
|
var PROJECT_RESOURCE_KINDS = PROJECT_RESOURCE_APPLY_ORDER;
|
|
21914
|
-
var ProjectApplyResponseResourceKindSchema = external_exports.enum([
|
|
21915
|
-
RESOURCE_KIND_ENVIRONMENT,
|
|
21916
|
-
RESOURCE_KIND_IDENTITY,
|
|
21917
|
-
RESOURCE_KIND_SESSION,
|
|
21918
|
-
// Legacy tool resources are no longer authorable, but apply responses may
|
|
21919
|
-
// still report archived/pruned tool rows while existing installations clean
|
|
21920
|
-
// up their stored resource state.
|
|
21921
|
-
RESOURCE_KIND_TOOL
|
|
21922
|
-
]);
|
|
21923
21912
|
var ProjectDeleteResourceSchema = external_exports.object({
|
|
21924
21913
|
kind: external_exports.enum(PROJECT_RESOURCE_KINDS),
|
|
21925
21914
|
name: external_exports.string().trim().min(1)
|
|
@@ -21985,14 +21974,14 @@ var ProjectApplyResponseSchema = external_exports.object({
|
|
|
21985
21974
|
plan: external_exports.array(
|
|
21986
21975
|
external_exports.object({
|
|
21987
21976
|
action: external_exports.enum(["create", "update", "unchanged", "archive"]),
|
|
21988
|
-
kind:
|
|
21977
|
+
kind: external_exports.enum(PROJECT_RESOURCE_KINDS),
|
|
21989
21978
|
name: external_exports.string().min(1),
|
|
21990
21979
|
uid: external_exports.string().min(1).optional()
|
|
21991
21980
|
})
|
|
21992
21981
|
).default([]),
|
|
21993
21982
|
pruned: external_exports.array(
|
|
21994
21983
|
external_exports.object({
|
|
21995
|
-
kind:
|
|
21984
|
+
kind: external_exports.enum(PROJECT_RESOURCE_KINDS),
|
|
21996
21985
|
name: external_exports.string().min(1),
|
|
21997
21986
|
uid: external_exports.string().min(1)
|
|
21998
21987
|
})
|
|
@@ -22103,18 +22092,11 @@ var SessionRunRecordSchema = external_exports.object({
|
|
|
22103
22092
|
sessionSnapshot: SessionResourceSchema,
|
|
22104
22093
|
environmentSnapshot: EnvironmentResourceSchema,
|
|
22105
22094
|
toolSnapshots: external_exports.array(
|
|
22106
|
-
external_exports.
|
|
22107
|
-
external_exports.
|
|
22108
|
-
|
|
22109
|
-
|
|
22110
|
-
|
|
22111
|
-
}),
|
|
22112
|
-
external_exports.object({
|
|
22113
|
-
source: external_exports.literal("resource"),
|
|
22114
|
-
alias: ToolAliasSchema,
|
|
22115
|
-
resource: ToolResourceSchema
|
|
22116
|
-
})
|
|
22117
|
-
])
|
|
22095
|
+
external_exports.object({
|
|
22096
|
+
source: external_exports.literal("inline"),
|
|
22097
|
+
alias: ToolAliasSchema,
|
|
22098
|
+
spec: RemoteMcpToolSchema.or(LocalToolSchema).or(GithubToolSchema)
|
|
22099
|
+
})
|
|
22118
22100
|
),
|
|
22119
22101
|
input: JsonValueSchema2,
|
|
22120
22102
|
createdAt: external_exports.string().datetime(),
|
|
@@ -26266,7 +26248,7 @@ Object.assign(lookup, {
|
|
|
26266
26248
|
// package.json
|
|
26267
26249
|
var package_default = {
|
|
26268
26250
|
name: "@autohq/cli",
|
|
26269
|
-
version: "0.1.
|
|
26251
|
+
version: "0.1.133",
|
|
26270
26252
|
license: "SEE LICENSE IN README.md",
|
|
26271
26253
|
publishConfig: {
|
|
26272
26254
|
access: "public"
|
package/dist/index.js
CHANGED
|
@@ -16052,7 +16052,7 @@ var init_zod = __esm({
|
|
|
16052
16052
|
});
|
|
16053
16053
|
|
|
16054
16054
|
// ../../packages/schemas/src/ids.ts
|
|
16055
|
-
var OpaqueIdSchema, ProfileIdSchema, EnvironmentIdSchema, IdentityIdSchema, ConnectionIdSchema, ExternalAccountIdSchema, OrganizationIdSchema, ProjectIdSchema, ProviderGrantIdSchema, ServiceAccountIdSchema, SessionIdSchema, SessionRunIdSchema, SessionRunCommandIdSchema, RuntimeIdSchema, RuntimeBridgeLeaseIdSchema, EnvironmentSetupSnapshotIdSchema,
|
|
16055
|
+
var OpaqueIdSchema, ProfileIdSchema, EnvironmentIdSchema, IdentityIdSchema, ConnectionIdSchema, ExternalAccountIdSchema, OrganizationIdSchema, ProjectIdSchema, ProviderGrantIdSchema, ServiceAccountIdSchema, SessionIdSchema, SessionRunIdSchema, SessionRunCommandIdSchema, RuntimeIdSchema, RuntimeBridgeLeaseIdSchema, EnvironmentSetupSnapshotIdSchema, UserIdSchema;
|
|
16056
16056
|
var init_ids = __esm({
|
|
16057
16057
|
"../../packages/schemas/src/ids.ts"() {
|
|
16058
16058
|
"use strict";
|
|
@@ -16073,7 +16073,6 @@ var init_ids = __esm({
|
|
|
16073
16073
|
RuntimeIdSchema = OpaqueIdSchema.brand();
|
|
16074
16074
|
RuntimeBridgeLeaseIdSchema = OpaqueIdSchema.brand();
|
|
16075
16075
|
EnvironmentSetupSnapshotIdSchema = OpaqueIdSchema.brand();
|
|
16076
|
-
ToolIdSchema = OpaqueIdSchema.brand();
|
|
16077
16076
|
UserIdSchema = OpaqueIdSchema.brand();
|
|
16078
16077
|
}
|
|
16079
16078
|
});
|
|
@@ -17603,7 +17602,7 @@ function remoteMcpToolSchema(input) {
|
|
|
17603
17602
|
]).default({ kind: "none" })
|
|
17604
17603
|
});
|
|
17605
17604
|
}
|
|
17606
|
-
var
|
|
17605
|
+
var REMOTE_MCP_TRANSPORTS, LOCAL_TOOL_IMPLEMENTATIONS, SecretReferenceSchema, NoToolAuthSchema, McpOAuthToolAuthSchema, ConnectionToolAuthSchema, ConnectionsToolAuthSchema, ToolAliasSchema, RemoteMcpToolSchema, LocalAutoToolSchema, LocalPingToolSchema, LocalChatToolSchema, LocalToolSchema, GithubToolSchema, ToolSpecSchema, SessionToolConnectRequestSchema, SessionToolConnectResponseSchema, SessionToolConnectCompleteResponseSchema, InlineSessionToolSchema, SessionToolRefSchema, SessionToolsSchema;
|
|
17607
17606
|
var init_tools = __esm({
|
|
17608
17607
|
"../../packages/schemas/src/tools.ts"() {
|
|
17609
17608
|
"use strict";
|
|
@@ -17612,7 +17611,6 @@ var init_tools = __esm({
|
|
|
17612
17611
|
init_github_mcp_catalog();
|
|
17613
17612
|
init_ids();
|
|
17614
17613
|
init_resources();
|
|
17615
|
-
RESOURCE_KIND_TOOL = "tool";
|
|
17616
17614
|
REMOTE_MCP_TRANSPORTS = ["streamable_http"];
|
|
17617
17615
|
LOCAL_TOOL_IMPLEMENTATIONS = ["auto", "chat", "ping"];
|
|
17618
17616
|
SecretReferenceSchema = external_exports.object({
|
|
@@ -17676,9 +17674,7 @@ var init_tools = __esm({
|
|
|
17676
17674
|
RemoteMcpToolSchema,
|
|
17677
17675
|
LocalToolSchema
|
|
17678
17676
|
]);
|
|
17679
|
-
|
|
17680
|
-
ToolApplyRequestSchema = resourceApplySchema(ToolSpecSchema);
|
|
17681
|
-
ToolConnectRequestSchema = external_exports.object({
|
|
17677
|
+
SessionToolConnectRequestSchema = external_exports.object({
|
|
17682
17678
|
redirectUri: external_exports.string().trim().url().refine(
|
|
17683
17679
|
(value) => {
|
|
17684
17680
|
const url2 = new URL(value);
|
|
@@ -17688,21 +17684,23 @@ var init_tools = __esm({
|
|
|
17688
17684
|
return url2.protocol === "http:" && (url2.hostname === "localhost" || url2.hostname === "127.0.0.1");
|
|
17689
17685
|
},
|
|
17690
17686
|
{
|
|
17691
|
-
message: "
|
|
17687
|
+
message: "Session tool OAuth redirect URIs must use https, except localhost loopback callbacks may use http"
|
|
17692
17688
|
}
|
|
17693
17689
|
).optional()
|
|
17694
17690
|
});
|
|
17695
|
-
|
|
17691
|
+
SessionToolConnectResponseSchema = external_exports.discriminatedUnion("status", [
|
|
17696
17692
|
external_exports.object({
|
|
17697
17693
|
status: external_exports.literal("authorization_required"),
|
|
17694
|
+
session: ResourceNameSchema,
|
|
17698
17695
|
tool: ResourceNameSchema,
|
|
17699
17696
|
connection: ResourceNameSchema,
|
|
17700
17697
|
authorizationUrl: external_exports.string().trim().url(),
|
|
17701
17698
|
message: external_exports.string().trim().min(1)
|
|
17702
17699
|
})
|
|
17703
17700
|
]);
|
|
17704
|
-
|
|
17701
|
+
SessionToolConnectCompleteResponseSchema = external_exports.object({
|
|
17705
17702
|
status: external_exports.literal("connected"),
|
|
17703
|
+
session: ResourceNameSchema.optional(),
|
|
17706
17704
|
tool: ResourceNameSchema,
|
|
17707
17705
|
connection: ResourceNameSchema,
|
|
17708
17706
|
projectId: ProjectIdSchema
|
|
@@ -18586,7 +18584,7 @@ var init_project_service_accounts = __esm({
|
|
|
18586
18584
|
});
|
|
18587
18585
|
|
|
18588
18586
|
// ../../packages/schemas/src/project-resources.ts
|
|
18589
|
-
var EnvironmentApplyDocumentSchema, IdentityApplyDocumentSchema, SessionApplyDocumentSchema, ProjectApplyResourceSchema, PROJECT_RESOURCE_APPLY_ORDER, PROJECT_RESOURCE_KINDS,
|
|
18587
|
+
var EnvironmentApplyDocumentSchema, IdentityApplyDocumentSchema, SessionApplyDocumentSchema, ProjectApplyResourceSchema, PROJECT_RESOURCE_APPLY_ORDER, PROJECT_RESOURCE_KINDS, ProjectDeleteResourceSchema, AVATAR_ASSET_CONTENT_TYPES, MAX_AVATAR_ASSET_BASE64_LENGTH, ProjectApplyAssetSchema, ProjectApplyAssetsSchema, AvatarAssetUploadRequestSchema, AvatarAssetUploadResponseSchema, ProjectApplyRequestSchema, ProjectApplySystemConfigSchema, ProjectAppliedResourceSchema, ProjectApplyDiagnosticSchema, ProjectApplyResponseSchema;
|
|
18590
18588
|
var init_project_resources = __esm({
|
|
18591
18589
|
"../../packages/schemas/src/project-resources.ts"() {
|
|
18592
18590
|
"use strict";
|
|
@@ -18595,7 +18593,6 @@ var init_project_resources = __esm({
|
|
|
18595
18593
|
init_identities();
|
|
18596
18594
|
init_resources();
|
|
18597
18595
|
init_sessions();
|
|
18598
|
-
init_tools();
|
|
18599
18596
|
EnvironmentApplyDocumentSchema = resourceApplyDocumentSchema(
|
|
18600
18597
|
RESOURCE_KIND_ENVIRONMENT,
|
|
18601
18598
|
EnvironmentApplyRequestSchema.shape.spec
|
|
@@ -18619,15 +18616,6 @@ var init_project_resources = __esm({
|
|
|
18619
18616
|
RESOURCE_KIND_SESSION
|
|
18620
18617
|
];
|
|
18621
18618
|
PROJECT_RESOURCE_KINDS = PROJECT_RESOURCE_APPLY_ORDER;
|
|
18622
|
-
ProjectApplyResponseResourceKindSchema = external_exports.enum([
|
|
18623
|
-
RESOURCE_KIND_ENVIRONMENT,
|
|
18624
|
-
RESOURCE_KIND_IDENTITY,
|
|
18625
|
-
RESOURCE_KIND_SESSION,
|
|
18626
|
-
// Legacy tool resources are no longer authorable, but apply responses may
|
|
18627
|
-
// still report archived/pruned tool rows while existing installations clean
|
|
18628
|
-
// up their stored resource state.
|
|
18629
|
-
RESOURCE_KIND_TOOL
|
|
18630
|
-
]);
|
|
18631
18619
|
ProjectDeleteResourceSchema = external_exports.object({
|
|
18632
18620
|
kind: external_exports.enum(PROJECT_RESOURCE_KINDS),
|
|
18633
18621
|
name: external_exports.string().trim().min(1)
|
|
@@ -18693,14 +18681,14 @@ var init_project_resources = __esm({
|
|
|
18693
18681
|
plan: external_exports.array(
|
|
18694
18682
|
external_exports.object({
|
|
18695
18683
|
action: external_exports.enum(["create", "update", "unchanged", "archive"]),
|
|
18696
|
-
kind:
|
|
18684
|
+
kind: external_exports.enum(PROJECT_RESOURCE_KINDS),
|
|
18697
18685
|
name: external_exports.string().min(1),
|
|
18698
18686
|
uid: external_exports.string().min(1).optional()
|
|
18699
18687
|
})
|
|
18700
18688
|
).default([]),
|
|
18701
18689
|
pruned: external_exports.array(
|
|
18702
18690
|
external_exports.object({
|
|
18703
|
-
kind:
|
|
18691
|
+
kind: external_exports.enum(PROJECT_RESOURCE_KINDS),
|
|
18704
18692
|
name: external_exports.string().min(1),
|
|
18705
18693
|
uid: external_exports.string().min(1)
|
|
18706
18694
|
})
|
|
@@ -18849,18 +18837,11 @@ var init_session_runs = __esm({
|
|
|
18849
18837
|
sessionSnapshot: SessionResourceSchema,
|
|
18850
18838
|
environmentSnapshot: EnvironmentResourceSchema,
|
|
18851
18839
|
toolSnapshots: external_exports.array(
|
|
18852
|
-
external_exports.
|
|
18853
|
-
external_exports.
|
|
18854
|
-
|
|
18855
|
-
|
|
18856
|
-
|
|
18857
|
-
}),
|
|
18858
|
-
external_exports.object({
|
|
18859
|
-
source: external_exports.literal("resource"),
|
|
18860
|
-
alias: ToolAliasSchema,
|
|
18861
|
-
resource: ToolResourceSchema
|
|
18862
|
-
})
|
|
18863
|
-
])
|
|
18840
|
+
external_exports.object({
|
|
18841
|
+
source: external_exports.literal("inline"),
|
|
18842
|
+
alias: ToolAliasSchema,
|
|
18843
|
+
spec: RemoteMcpToolSchema.or(LocalToolSchema).or(GithubToolSchema)
|
|
18844
|
+
})
|
|
18864
18845
|
),
|
|
18865
18846
|
input: JsonValueSchema,
|
|
18866
18847
|
createdAt: external_exports.string().datetime(),
|
|
@@ -19637,10 +19618,6 @@ function createResourceApi(context) {
|
|
|
19637
19618
|
path: "/sessions",
|
|
19638
19619
|
applyResponseSchema: SessionApplyResponseSchema
|
|
19639
19620
|
});
|
|
19640
|
-
const tools = projectResource(context, {
|
|
19641
|
-
path: "/tools",
|
|
19642
|
-
applyResponseSchema: ToolResourceSchema
|
|
19643
|
-
});
|
|
19644
19621
|
const identities = projectResource(
|
|
19645
19622
|
context,
|
|
19646
19623
|
{
|
|
@@ -19658,19 +19635,17 @@ function createResourceApi(context) {
|
|
|
19658
19635
|
options ?? {}
|
|
19659
19636
|
),
|
|
19660
19637
|
applySessionResource: sessions.apply,
|
|
19661
|
-
applyToolResource: tools.apply,
|
|
19662
19638
|
createProjectServiceAccount: (request, options) => createProjectServiceAccount(context, request, options ?? {}),
|
|
19663
19639
|
deleteProjectResource: (request, options) => deleteProjectResource(context, request, options ?? {}),
|
|
19664
19640
|
listEnvironments: environments.list,
|
|
19665
19641
|
listIdentities: identities.list,
|
|
19666
19642
|
listProjectServiceAccounts: (options) => listProjectServiceAccounts(context, options ?? {}),
|
|
19667
19643
|
listSessions: sessions.list,
|
|
19668
|
-
listTools: tools.list,
|
|
19669
19644
|
getSessionPresence: (request, options) => getSessionPresence(context, request, options ?? {}),
|
|
19670
19645
|
connectSessionPresence: (request, options) => connectSessionPresence(context, request, options ?? {}),
|
|
19671
19646
|
recordSessionPresenceIcon: (request, options) => recordSessionPresenceIcon(context, request, options ?? {}),
|
|
19672
|
-
|
|
19673
|
-
|
|
19647
|
+
startSessionToolConnection: (request, options) => startSessionToolConnection(context, request, options ?? {}),
|
|
19648
|
+
completeSessionToolConnection: (request, options) => completeSessionToolConnection(context, request, options ?? {}),
|
|
19674
19649
|
removeProjectServiceAccount: (request, options) => removeProjectServiceAccount(context, request, options ?? {}),
|
|
19675
19650
|
rotateProjectServiceAccountToken: (request, options) => rotateProjectServiceAccountToken(context, request, options ?? {}),
|
|
19676
19651
|
updateProjectServiceAccount: (request, options) => updateProjectServiceAccount(context, request, options ?? {})
|
|
@@ -19816,13 +19791,13 @@ async function recordSessionPresenceIcon(context, request, options) {
|
|
|
19816
19791
|
}
|
|
19817
19792
|
return SessionPresenceIconResponseSchema.parse(await response.json());
|
|
19818
19793
|
}
|
|
19819
|
-
async function
|
|
19794
|
+
async function startSessionToolConnection(context, request, options) {
|
|
19820
19795
|
const project = await context.activeProject();
|
|
19821
19796
|
const response = await context.authenticatedFetch(
|
|
19822
19797
|
context.apiUrl(
|
|
19823
19798
|
projectApiPath(
|
|
19824
19799
|
project,
|
|
19825
|
-
`/tools/${encodeURIComponent(request.
|
|
19800
|
+
`/sessions/${encodeURIComponent(request.sessionName)}/tools/${encodeURIComponent(request.toolAlias)}/connections`
|
|
19826
19801
|
),
|
|
19827
19802
|
options.apiBaseUrl
|
|
19828
19803
|
),
|
|
@@ -19840,9 +19815,9 @@ async function startToolConnection(context, request, options) {
|
|
|
19840
19815
|
if (!response.ok) {
|
|
19841
19816
|
throw new Error(await responseErrorMessage(response));
|
|
19842
19817
|
}
|
|
19843
|
-
return
|
|
19818
|
+
return SessionToolConnectResponseSchema.parse(await response.json());
|
|
19844
19819
|
}
|
|
19845
|
-
async function
|
|
19820
|
+
async function completeSessionToolConnection(context, request, options) {
|
|
19846
19821
|
const url2 = new URL(
|
|
19847
19822
|
context.apiUrl(apiPath("/mcp/oauth/callback"), options.apiBaseUrl)
|
|
19848
19823
|
);
|
|
@@ -19856,7 +19831,7 @@ async function completeToolConnection(context, request, options) {
|
|
|
19856
19831
|
if (!response.ok) {
|
|
19857
19832
|
throw new Error(await responseErrorMessage(response));
|
|
19858
19833
|
}
|
|
19859
|
-
return
|
|
19834
|
+
return SessionToolConnectCompleteResponseSchema.parse(await response.json());
|
|
19860
19835
|
}
|
|
19861
19836
|
async function createProjectServiceAccount(context, request, options) {
|
|
19862
19837
|
const project = await context.activeProject();
|
|
@@ -21208,7 +21183,7 @@ var init_package = __esm({
|
|
|
21208
21183
|
"package.json"() {
|
|
21209
21184
|
package_default = {
|
|
21210
21185
|
name: "@autohq/cli",
|
|
21211
|
-
version: "0.1.
|
|
21186
|
+
version: "0.1.133",
|
|
21212
21187
|
license: "SEE LICENSE IN README.md",
|
|
21213
21188
|
publishConfig: {
|
|
21214
21189
|
access: "public"
|
|
@@ -21271,133 +21246,6 @@ var init_version = __esm({
|
|
|
21271
21246
|
}
|
|
21272
21247
|
});
|
|
21273
21248
|
|
|
21274
|
-
// src/commands/tools/connect.ts
|
|
21275
|
-
async function connectTool(input) {
|
|
21276
|
-
if (input.manual) {
|
|
21277
|
-
const result = await input.client.startToolConnection(
|
|
21278
|
-
{
|
|
21279
|
-
name: input.tool
|
|
21280
|
-
},
|
|
21281
|
-
{
|
|
21282
|
-
apiBaseUrl: input.apiBaseUrl
|
|
21283
|
-
}
|
|
21284
|
-
);
|
|
21285
|
-
writeConnectionStart(input.writeOutput, result);
|
|
21286
|
-
return;
|
|
21287
|
-
}
|
|
21288
|
-
let connection;
|
|
21289
|
-
const activeSelection = input.client.getActiveSelection();
|
|
21290
|
-
let scopeContext = toolConnectionScopeContext({
|
|
21291
|
-
activeSelection
|
|
21292
|
-
});
|
|
21293
|
-
const scopeContextPromise = resolveToolConnectionScopeContext({
|
|
21294
|
-
activeSelection,
|
|
21295
|
-
apiBaseUrl: input.apiBaseUrl,
|
|
21296
|
-
client: input.client
|
|
21297
|
-
});
|
|
21298
|
-
const callback = await createOAuthLoopbackCallback({
|
|
21299
|
-
successHtml: () => renderOAuthLoopbackPage({
|
|
21300
|
-
status: "success",
|
|
21301
|
-
eyebrow: "Auto Tool",
|
|
21302
|
-
title: `${connection?.tool ?? input.tool} is authorized`,
|
|
21303
|
-
message: "Auto received the provider authorization. The CLI will finish the token exchange in your terminal.",
|
|
21304
|
-
details: [
|
|
21305
|
-
{ label: "Tool", value: connection?.tool ?? input.tool },
|
|
21306
|
-
{ label: "Connection", value: connection?.connection },
|
|
21307
|
-
{ label: "Organization", value: scopeContext.organization },
|
|
21308
|
-
{ label: "Project", value: scopeContext.project }
|
|
21309
|
-
]
|
|
21310
|
-
}),
|
|
21311
|
-
failureHtml: () => renderOAuthLoopbackPage({
|
|
21312
|
-
status: "failure",
|
|
21313
|
-
eyebrow: "Auto Tool",
|
|
21314
|
-
title: `${connection?.tool ?? input.tool} was not authorized`,
|
|
21315
|
-
message: "The provider rejected the authorization request. Return to your terminal to see the error details.",
|
|
21316
|
-
details: [
|
|
21317
|
-
{ label: "Tool", value: connection?.tool ?? input.tool },
|
|
21318
|
-
{ label: "Connection", value: connection?.connection },
|
|
21319
|
-
{ label: "Organization", value: scopeContext.organization },
|
|
21320
|
-
{ label: "Project", value: scopeContext.project }
|
|
21321
|
-
]
|
|
21322
|
-
})
|
|
21323
|
-
});
|
|
21324
|
-
try {
|
|
21325
|
-
const result = await input.client.startToolConnection(
|
|
21326
|
-
{
|
|
21327
|
-
name: input.tool,
|
|
21328
|
-
redirectUri: callback.redirectUri
|
|
21329
|
-
},
|
|
21330
|
-
{
|
|
21331
|
-
apiBaseUrl: input.apiBaseUrl
|
|
21332
|
-
}
|
|
21333
|
-
);
|
|
21334
|
-
scopeContext = await scopeContextPromise;
|
|
21335
|
-
connection = result;
|
|
21336
|
-
writeConnectionStart(input.writeOutput, result);
|
|
21337
|
-
input.writeOutput("Waiting for browser authorization...");
|
|
21338
|
-
openBrowser(result.authorizationUrl);
|
|
21339
|
-
const authorized = await callback.result;
|
|
21340
|
-
if (!authorized.state) {
|
|
21341
|
-
throw new Error("OAuth callback is missing state");
|
|
21342
|
-
}
|
|
21343
|
-
const completed = await input.client.completeToolConnection(
|
|
21344
|
-
{
|
|
21345
|
-
code: authorized.code,
|
|
21346
|
-
state: authorized.state
|
|
21347
|
-
},
|
|
21348
|
-
{
|
|
21349
|
-
apiBaseUrl: input.apiBaseUrl
|
|
21350
|
-
}
|
|
21351
|
-
);
|
|
21352
|
-
input.writeOutput(
|
|
21353
|
-
`connected tool/${completed.tool} connection/${completed.connection}`
|
|
21354
|
-
);
|
|
21355
|
-
} finally {
|
|
21356
|
-
callback.close();
|
|
21357
|
-
}
|
|
21358
|
-
}
|
|
21359
|
-
async function resolveToolConnectionScopeContext(input) {
|
|
21360
|
-
if (!input.activeSelection.organizationId || !input.activeSelection.projectId) {
|
|
21361
|
-
return toolConnectionScopeContext({
|
|
21362
|
-
activeSelection: input.activeSelection
|
|
21363
|
-
});
|
|
21364
|
-
}
|
|
21365
|
-
try {
|
|
21366
|
-
const response = await input.client.listProjects({
|
|
21367
|
-
apiBaseUrl: input.apiBaseUrl
|
|
21368
|
-
});
|
|
21369
|
-
const activeProject = response.projects.find(
|
|
21370
|
-
(project) => project.organizationId === input.activeSelection.organizationId && project.projectId === input.activeSelection.projectId
|
|
21371
|
-
);
|
|
21372
|
-
return toolConnectionScopeContext({
|
|
21373
|
-
activeProject,
|
|
21374
|
-
activeSelection: input.activeSelection
|
|
21375
|
-
});
|
|
21376
|
-
} catch {
|
|
21377
|
-
return toolConnectionScopeContext({
|
|
21378
|
-
activeSelection: input.activeSelection
|
|
21379
|
-
});
|
|
21380
|
-
}
|
|
21381
|
-
}
|
|
21382
|
-
function toolConnectionScopeContext(input) {
|
|
21383
|
-
return {
|
|
21384
|
-
organization: input.activeProject ? `${input.activeProject.organizationName} (${input.activeProject.organizationSlug})` : input.activeSelection.organizationId,
|
|
21385
|
-
project: input.activeProject ? `${input.activeProject.projectName} (${input.activeProject.projectSlug})` : input.activeSelection.projectId
|
|
21386
|
-
};
|
|
21387
|
-
}
|
|
21388
|
-
function writeConnectionStart(writeOutput, result) {
|
|
21389
|
-
writeOutput(result.message);
|
|
21390
|
-
writeOutput(`connect tool/${result.tool} connection/${result.connection}`);
|
|
21391
|
-
writeOutput(`authorization_url ${result.authorizationUrl}`);
|
|
21392
|
-
}
|
|
21393
|
-
var init_connect = __esm({
|
|
21394
|
-
"src/commands/tools/connect.ts"() {
|
|
21395
|
-
"use strict";
|
|
21396
|
-
init_browser();
|
|
21397
|
-
init_loopback();
|
|
21398
|
-
}
|
|
21399
|
-
});
|
|
21400
|
-
|
|
21401
21249
|
// src/commands/apply/assets.ts
|
|
21402
21250
|
async function resolveApplyAssets(input) {
|
|
21403
21251
|
const entries = Object.entries(input.request.assets);
|
|
@@ -21552,7 +21400,7 @@ function readProjectApplyRequest(options) {
|
|
|
21552
21400
|
}
|
|
21553
21401
|
function appliedResourceKind(request, response, index) {
|
|
21554
21402
|
const plannedResources = response.plan.filter(
|
|
21555
|
-
(item) => item.action !== "archive"
|
|
21403
|
+
(item) => item.action !== "archive"
|
|
21556
21404
|
);
|
|
21557
21405
|
const kind = plannedResources[index]?.kind ?? request.resources[index]?.kind;
|
|
21558
21406
|
if (!kind) {
|
|
@@ -21562,20 +21410,21 @@ function appliedResourceKind(request, response, index) {
|
|
|
21562
21410
|
}
|
|
21563
21411
|
return kind;
|
|
21564
21412
|
}
|
|
21565
|
-
function
|
|
21566
|
-
return PROJECT_RESOURCE_APPLY_ORDER.includes(
|
|
21567
|
-
kind
|
|
21568
|
-
);
|
|
21569
|
-
}
|
|
21570
|
-
function mcpOAuthToolConnectionsFromApplyRequest(request) {
|
|
21413
|
+
function mcpOAuthSessionToolConnectionsFromApplyRequest(request) {
|
|
21571
21414
|
return request.resources.filter((resource) => resource.kind === RESOURCE_KIND_SESSION).flatMap((resource) => {
|
|
21572
|
-
return
|
|
21415
|
+
return mcpOAuthSessionToolConnectionsFromSessionTools({
|
|
21416
|
+
session: resource.metadata.name,
|
|
21417
|
+
tools: resource.spec.tools
|
|
21418
|
+
});
|
|
21573
21419
|
});
|
|
21574
21420
|
}
|
|
21575
|
-
function
|
|
21421
|
+
function mcpOAuthSessionToolConnectionsFromAppliedResources(resources) {
|
|
21576
21422
|
return resources.filter((item) => item.kind === RESOURCE_KIND_SESSION).flatMap((item) => {
|
|
21577
21423
|
const resource = item.resource;
|
|
21578
|
-
return
|
|
21424
|
+
return mcpOAuthSessionToolConnectionsFromSessionTools({
|
|
21425
|
+
session: resource.metadata.name,
|
|
21426
|
+
tools: resource.spec.tools
|
|
21427
|
+
});
|
|
21579
21428
|
});
|
|
21580
21429
|
}
|
|
21581
21430
|
function applyFiles(root) {
|
|
@@ -21598,12 +21447,18 @@ function applyFiles(root) {
|
|
|
21598
21447
|
}
|
|
21599
21448
|
return files;
|
|
21600
21449
|
}
|
|
21601
|
-
function
|
|
21602
|
-
return Object.entries(tools).flatMap(([alias, tool]) => {
|
|
21450
|
+
function mcpOAuthSessionToolConnectionsFromSessionTools(input) {
|
|
21451
|
+
return Object.entries(input.tools).flatMap(([alias, tool]) => {
|
|
21603
21452
|
if (tool.kind !== "mcp_remote" || tool.disabled || tool.auth.kind !== "mcp_oauth") {
|
|
21604
21453
|
return [];
|
|
21605
21454
|
}
|
|
21606
|
-
return [
|
|
21455
|
+
return [
|
|
21456
|
+
{
|
|
21457
|
+
session: input.session,
|
|
21458
|
+
tool: alias,
|
|
21459
|
+
connection: tool.auth.connection
|
|
21460
|
+
}
|
|
21461
|
+
];
|
|
21607
21462
|
});
|
|
21608
21463
|
}
|
|
21609
21464
|
function readApplyDocumentFile(path2) {
|
|
@@ -21816,6 +21671,139 @@ var init_files = __esm({
|
|
|
21816
21671
|
}
|
|
21817
21672
|
});
|
|
21818
21673
|
|
|
21674
|
+
// src/commands/apply/session-tool-connect.ts
|
|
21675
|
+
async function connectSessionTool(input) {
|
|
21676
|
+
if (input.manual) {
|
|
21677
|
+
const result = await input.client.startSessionToolConnection(
|
|
21678
|
+
{
|
|
21679
|
+
sessionName: input.session,
|
|
21680
|
+
toolAlias: input.tool
|
|
21681
|
+
},
|
|
21682
|
+
{
|
|
21683
|
+
apiBaseUrl: input.apiBaseUrl
|
|
21684
|
+
}
|
|
21685
|
+
);
|
|
21686
|
+
writeConnectionStart(input.writeOutput, result);
|
|
21687
|
+
return;
|
|
21688
|
+
}
|
|
21689
|
+
let connection;
|
|
21690
|
+
const activeSelection = input.client.getActiveSelection();
|
|
21691
|
+
let scopeContext = sessionToolConnectionScopeContext({
|
|
21692
|
+
activeSelection
|
|
21693
|
+
});
|
|
21694
|
+
const scopeContextPromise = resolveSessionToolConnectionScopeContext({
|
|
21695
|
+
activeSelection,
|
|
21696
|
+
apiBaseUrl: input.apiBaseUrl,
|
|
21697
|
+
client: input.client
|
|
21698
|
+
});
|
|
21699
|
+
const callback = await createOAuthLoopbackCallback({
|
|
21700
|
+
successHtml: () => renderOAuthLoopbackPage({
|
|
21701
|
+
status: "success",
|
|
21702
|
+
eyebrow: "Auto Tool",
|
|
21703
|
+
title: `${connection?.tool ?? input.tool} is authorized`,
|
|
21704
|
+
message: "Auto received the provider authorization. The CLI will finish the token exchange in your terminal.",
|
|
21705
|
+
details: [
|
|
21706
|
+
{ label: "Session", value: connection?.session ?? input.session },
|
|
21707
|
+
{ label: "Tool", value: connection?.tool ?? input.tool },
|
|
21708
|
+
{ label: "Connection", value: connection?.connection },
|
|
21709
|
+
{ label: "Organization", value: scopeContext.organization },
|
|
21710
|
+
{ label: "Project", value: scopeContext.project }
|
|
21711
|
+
]
|
|
21712
|
+
}),
|
|
21713
|
+
failureHtml: () => renderOAuthLoopbackPage({
|
|
21714
|
+
status: "failure",
|
|
21715
|
+
eyebrow: "Auto Tool",
|
|
21716
|
+
title: `${connection?.tool ?? input.tool} was not authorized`,
|
|
21717
|
+
message: "The provider rejected the authorization request. Return to your terminal to see the error details.",
|
|
21718
|
+
details: [
|
|
21719
|
+
{ label: "Session", value: connection?.session ?? input.session },
|
|
21720
|
+
{ label: "Tool", value: connection?.tool ?? input.tool },
|
|
21721
|
+
{ label: "Connection", value: connection?.connection },
|
|
21722
|
+
{ label: "Organization", value: scopeContext.organization },
|
|
21723
|
+
{ label: "Project", value: scopeContext.project }
|
|
21724
|
+
]
|
|
21725
|
+
})
|
|
21726
|
+
});
|
|
21727
|
+
try {
|
|
21728
|
+
const result = await input.client.startSessionToolConnection(
|
|
21729
|
+
{
|
|
21730
|
+
sessionName: input.session,
|
|
21731
|
+
toolAlias: input.tool,
|
|
21732
|
+
redirectUri: callback.redirectUri
|
|
21733
|
+
},
|
|
21734
|
+
{
|
|
21735
|
+
apiBaseUrl: input.apiBaseUrl
|
|
21736
|
+
}
|
|
21737
|
+
);
|
|
21738
|
+
scopeContext = await scopeContextPromise;
|
|
21739
|
+
connection = result;
|
|
21740
|
+
writeConnectionStart(input.writeOutput, result);
|
|
21741
|
+
input.writeOutput("Waiting for browser authorization...");
|
|
21742
|
+
openBrowser(result.authorizationUrl);
|
|
21743
|
+
const authorized = await callback.result;
|
|
21744
|
+
if (!authorized.state) {
|
|
21745
|
+
throw new Error("OAuth callback is missing state");
|
|
21746
|
+
}
|
|
21747
|
+
const completed = await input.client.completeSessionToolConnection(
|
|
21748
|
+
{
|
|
21749
|
+
code: authorized.code,
|
|
21750
|
+
state: authorized.state
|
|
21751
|
+
},
|
|
21752
|
+
{
|
|
21753
|
+
apiBaseUrl: input.apiBaseUrl
|
|
21754
|
+
}
|
|
21755
|
+
);
|
|
21756
|
+
input.writeOutput(
|
|
21757
|
+
`connected session/${completed.session ?? input.session} tool/${completed.tool} connection/${completed.connection}`
|
|
21758
|
+
);
|
|
21759
|
+
} finally {
|
|
21760
|
+
callback.close();
|
|
21761
|
+
}
|
|
21762
|
+
}
|
|
21763
|
+
async function resolveSessionToolConnectionScopeContext(input) {
|
|
21764
|
+
if (!input.activeSelection.organizationId || !input.activeSelection.projectId) {
|
|
21765
|
+
return sessionToolConnectionScopeContext({
|
|
21766
|
+
activeSelection: input.activeSelection
|
|
21767
|
+
});
|
|
21768
|
+
}
|
|
21769
|
+
try {
|
|
21770
|
+
const response = await input.client.listProjects({
|
|
21771
|
+
apiBaseUrl: input.apiBaseUrl
|
|
21772
|
+
});
|
|
21773
|
+
const activeProject = response.projects.find(
|
|
21774
|
+
(project) => project.organizationId === input.activeSelection.organizationId && project.projectId === input.activeSelection.projectId
|
|
21775
|
+
);
|
|
21776
|
+
return sessionToolConnectionScopeContext({
|
|
21777
|
+
activeProject,
|
|
21778
|
+
activeSelection: input.activeSelection
|
|
21779
|
+
});
|
|
21780
|
+
} catch {
|
|
21781
|
+
return sessionToolConnectionScopeContext({
|
|
21782
|
+
activeSelection: input.activeSelection
|
|
21783
|
+
});
|
|
21784
|
+
}
|
|
21785
|
+
}
|
|
21786
|
+
function sessionToolConnectionScopeContext(input) {
|
|
21787
|
+
return {
|
|
21788
|
+
organization: input.activeProject ? `${input.activeProject.organizationName} (${input.activeProject.organizationSlug})` : input.activeSelection.organizationId,
|
|
21789
|
+
project: input.activeProject ? `${input.activeProject.projectName} (${input.activeProject.projectSlug})` : input.activeSelection.projectId
|
|
21790
|
+
};
|
|
21791
|
+
}
|
|
21792
|
+
function writeConnectionStart(writeOutput, result) {
|
|
21793
|
+
writeOutput(result.message);
|
|
21794
|
+
writeOutput(
|
|
21795
|
+
`connect session/${result.session} tool/${result.tool} connection/${result.connection}`
|
|
21796
|
+
);
|
|
21797
|
+
writeOutput(`authorization_url ${result.authorizationUrl}`);
|
|
21798
|
+
}
|
|
21799
|
+
var init_session_tool_connect = __esm({
|
|
21800
|
+
"src/commands/apply/session-tool-connect.ts"() {
|
|
21801
|
+
"use strict";
|
|
21802
|
+
init_browser();
|
|
21803
|
+
init_loopback();
|
|
21804
|
+
}
|
|
21805
|
+
});
|
|
21806
|
+
|
|
21819
21807
|
// src/commands/apply/actions.ts
|
|
21820
21808
|
async function applyResource(input) {
|
|
21821
21809
|
if (input.commandOptions.connect && input.commandOptions.json) {
|
|
@@ -21878,12 +21866,12 @@ async function applyProjectInput(input) {
|
|
|
21878
21866
|
);
|
|
21879
21867
|
}
|
|
21880
21868
|
if (input.commandOptions.connect) {
|
|
21881
|
-
for (const item of
|
|
21869
|
+
for (const item of mcpOAuthSessionToolConnectionsFromApplyRequest(
|
|
21882
21870
|
input.request
|
|
21883
21871
|
)) {
|
|
21884
21872
|
input.writeOutput(
|
|
21885
21873
|
style.dim(
|
|
21886
|
-
`would connect tool/${item.tool} connection/${item.connection}`
|
|
21874
|
+
`would connect session/${item.session} tool/${item.tool} connection/${item.connection}`
|
|
21887
21875
|
)
|
|
21888
21876
|
);
|
|
21889
21877
|
}
|
|
@@ -21919,12 +21907,13 @@ async function applyProjectInput(input) {
|
|
|
21919
21907
|
}
|
|
21920
21908
|
writeDiagnostics(response.diagnostics, input.writeOutput, style);
|
|
21921
21909
|
if (input.commandOptions.connect) {
|
|
21922
|
-
const connections =
|
|
21910
|
+
const connections = mcpOAuthSessionToolConnectionsFromAppliedResources(resources);
|
|
21923
21911
|
for (const item of connections) {
|
|
21924
|
-
await
|
|
21912
|
+
await connectSessionTool({
|
|
21925
21913
|
apiBaseUrl: input.commandOptions.apiBaseUrl,
|
|
21926
21914
|
client: input.client,
|
|
21927
21915
|
manual: input.commandOptions.manualConnect,
|
|
21916
|
+
session: item.session,
|
|
21928
21917
|
tool: item.tool,
|
|
21929
21918
|
writeOutput: input.writeOutput
|
|
21930
21919
|
});
|
|
@@ -21957,9 +21946,9 @@ var init_actions = __esm({
|
|
|
21957
21946
|
"src/commands/apply/actions.ts"() {
|
|
21958
21947
|
"use strict";
|
|
21959
21948
|
init_style();
|
|
21960
|
-
init_connect();
|
|
21961
21949
|
init_assets();
|
|
21962
21950
|
init_files();
|
|
21951
|
+
init_session_tool_connect();
|
|
21963
21952
|
}
|
|
21964
21953
|
});
|
|
21965
21954
|
|
|
@@ -24710,7 +24699,6 @@ function useSwitchProject() {
|
|
|
24710
24699
|
for (const queryKey of [
|
|
24711
24700
|
["sessions"],
|
|
24712
24701
|
["environments"],
|
|
24713
|
-
["tools"],
|
|
24714
24702
|
["service-accounts"],
|
|
24715
24703
|
["connections"],
|
|
24716
24704
|
["connection-providers"]
|
|
@@ -25007,7 +24995,6 @@ var init_queries = __esm({
|
|
|
25007
24995
|
environments: (apiUrl) => ["environments", apiUrl],
|
|
25008
24996
|
identities: (apiUrl) => ["identities", apiUrl],
|
|
25009
24997
|
sessions: (apiUrl) => ["sessions", apiUrl],
|
|
25010
|
-
tools: (apiUrl) => ["tools", apiUrl],
|
|
25011
24998
|
projects: (apiUrl) => ["projects", apiUrl],
|
|
25012
24999
|
serviceAccounts: (apiUrl) => ["service-accounts", apiUrl],
|
|
25013
25000
|
connections: (apiUrl) => ["connections", apiUrl],
|
|
@@ -29628,7 +29615,10 @@ function registerApplyCommands(program, context) {
|
|
|
29628
29615
|
program.command("apply").description("Apply Auto resources from a file or the .auto directory.").option("-f, --file <file>", "single resource file to apply instead").option(
|
|
29629
29616
|
"--directory <directory>",
|
|
29630
29617
|
"directory containing Auto resource files"
|
|
29631
|
-
).option("--dry-run", "print the apply plan without changing resources").option("--no-prune", "leave omitted .auto resources unchanged").option(
|
|
29618
|
+
).option("--dry-run", "print the apply plan without changing resources").option("--no-prune", "leave omitted .auto resources unchanged").option(
|
|
29619
|
+
"--connect",
|
|
29620
|
+
"connect MCP OAuth session tools after applying resources"
|
|
29621
|
+
).option(
|
|
29632
29622
|
"--manual-connect",
|
|
29633
29623
|
"print MCP OAuth authorization URLs instead of opening a browser"
|
|
29634
29624
|
).option("--json", "print the apply response as JSON").option("--api-url <url>", "Auto API base URL").option("--api-base-url <url>", "Auto API base URL").action(async (commandOptions) => {
|
|
@@ -30905,7 +30895,7 @@ Docs and help: auto --help
|
|
|
30905
30895
|
`;
|
|
30906
30896
|
|
|
30907
30897
|
// src/commands/onboard/skill-content.generated.ts
|
|
30908
|
-
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`, `auto tools 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";
|
|
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";
|
|
30909
30899
|
|
|
30910
30900
|
// src/commands/onboard/commands.ts
|
|
30911
30901
|
function registerOnboardCommands(program, context) {
|
|
@@ -32979,21 +32969,6 @@ function registerSessionCommands(program, context) {
|
|
|
32979
32969
|
});
|
|
32980
32970
|
}
|
|
32981
32971
|
|
|
32982
|
-
// src/commands/tools/commands.ts
|
|
32983
|
-
init_connect();
|
|
32984
|
-
function registerToolCommands(program, context) {
|
|
32985
|
-
const tools = program.command("tools").description("Manage Tool resources.");
|
|
32986
|
-
tools.command("connect").description("Start an OAuth connection flow for a remote MCP Tool.").argument("<tool>", "tool resource name").option("--manual", "print the authorization URL without opening a browser").option("--api-url <url>", "Auto API base URL").option("--api-base-url <url>", "Auto API base URL").action(async (tool, commandOptions) => {
|
|
32987
|
-
await connectTool({
|
|
32988
|
-
tool,
|
|
32989
|
-
apiBaseUrl: apiUrlFromOptions(context, commandOptions),
|
|
32990
|
-
manual: commandOptions.manual,
|
|
32991
|
-
client: createContextApiClient(context),
|
|
32992
|
-
writeOutput: context.writeOutput
|
|
32993
|
-
});
|
|
32994
|
-
});
|
|
32995
|
-
}
|
|
32996
|
-
|
|
32997
32972
|
// src/cli/program.ts
|
|
32998
32973
|
init_path();
|
|
32999
32974
|
init_profiles();
|
|
@@ -33161,7 +33136,6 @@ function createProgram(options = {}) {
|
|
|
33161
33136
|
registerProjectCommands(program, context);
|
|
33162
33137
|
registerConnectionCommands(program, context);
|
|
33163
33138
|
registerSecretCommands(program, context);
|
|
33164
|
-
registerToolCommands(program, context);
|
|
33165
33139
|
registerSessionCommands(program, context);
|
|
33166
33140
|
registerRunCommands(program, context);
|
|
33167
33141
|
return program;
|