@autohq/cli 0.1.124 → 0.1.126
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 +30 -18
- package/dist/index.js +48 -197
- package/package.json +1 -1
package/dist/agent-bridge.js
CHANGED
|
@@ -19791,7 +19791,6 @@ var AuthWhoamiResponseSchema = external_exports.object({
|
|
|
19791
19791
|
});
|
|
19792
19792
|
var SERVICE_ACCOUNT_READ_ONLY_SCOPES = [
|
|
19793
19793
|
"environments:read",
|
|
19794
|
-
"profiles:read",
|
|
19795
19794
|
"tools:read",
|
|
19796
19795
|
"sessions:read",
|
|
19797
19796
|
"runs:read"
|
|
@@ -19801,7 +19800,6 @@ var SERVICE_ACCOUNT_SCOPE_PRESETS = {
|
|
|
19801
19800
|
applier: [
|
|
19802
19801
|
...SERVICE_ACCOUNT_READ_ONLY_SCOPES,
|
|
19803
19802
|
"environments:write",
|
|
19804
|
-
"profiles:write",
|
|
19805
19803
|
"tools:write",
|
|
19806
19804
|
"sessions:write"
|
|
19807
19805
|
]
|
|
@@ -21140,7 +21138,6 @@ var ProjectServiceAccountListResponseSchema = external_exports.object({
|
|
|
21140
21138
|
});
|
|
21141
21139
|
|
|
21142
21140
|
// ../../packages/schemas/src/profiles.ts
|
|
21143
|
-
var RESOURCE_KIND_PROFILE = "profile";
|
|
21144
21141
|
var PROFILE_HARNESSES = ["claude-code"];
|
|
21145
21142
|
var ProfileSpecSchema = external_exports.object({
|
|
21146
21143
|
harness: external_exports.enum(PROFILE_HARNESSES),
|
|
@@ -21623,8 +21620,11 @@ var SessionIdentitySchema = external_exports.object({
|
|
|
21623
21620
|
}).strict().refine((identity) => Object.keys(identity).length > 0, {
|
|
21624
21621
|
message: "Session identity requires at least one field"
|
|
21625
21622
|
});
|
|
21626
|
-
var
|
|
21627
|
-
profile: ResourceNameSchema,
|
|
21623
|
+
var SessionSpecFieldsSchema = external_exports.object({
|
|
21624
|
+
profile: ResourceNameSchema.optional(),
|
|
21625
|
+
harness: external_exports.enum(PROFILE_HARNESSES).optional(),
|
|
21626
|
+
systemPrompt: external_exports.string().trim().min(1).max(1e5).optional(),
|
|
21627
|
+
environment: ResourceNameSchema.optional(),
|
|
21628
21628
|
identity: SessionIdentitySchema.optional(),
|
|
21629
21629
|
initialPrompt: external_exports.string().trim().min(1).max(2e4).optional(),
|
|
21630
21630
|
env: SecretEnvSchema.default({}),
|
|
@@ -21633,9 +21633,31 @@ var SessionSpecSchema = external_exports.object({
|
|
|
21633
21633
|
workingDirectory: external_exports.string().trim().min(1).optional(),
|
|
21634
21634
|
tools: SessionToolsSchema.default({})
|
|
21635
21635
|
});
|
|
21636
|
-
|
|
21636
|
+
function validateSessionRunnableConfig(spec, context) {
|
|
21637
|
+
if (spec.profile) {
|
|
21638
|
+
return;
|
|
21639
|
+
}
|
|
21640
|
+
if (!spec.harness) {
|
|
21641
|
+
context.addIssue({
|
|
21642
|
+
code: external_exports.ZodIssueCode.custom,
|
|
21643
|
+
path: ["harness"],
|
|
21644
|
+
message: "Session requires harness when profile is omitted"
|
|
21645
|
+
});
|
|
21646
|
+
}
|
|
21647
|
+
if (!spec.environment) {
|
|
21648
|
+
context.addIssue({
|
|
21649
|
+
code: external_exports.ZodIssueCode.custom,
|
|
21650
|
+
path: ["environment"],
|
|
21651
|
+
message: "Session requires environment when profile is omitted"
|
|
21652
|
+
});
|
|
21653
|
+
}
|
|
21654
|
+
}
|
|
21655
|
+
var SessionSpecSchema = SessionSpecFieldsSchema.superRefine(
|
|
21656
|
+
validateSessionRunnableConfig
|
|
21657
|
+
);
|
|
21658
|
+
var SessionApplySpecSchema = SessionSpecFieldsSchema.extend({
|
|
21637
21659
|
triggers: SessionApplyTriggersSchema.default([])
|
|
21638
|
-
});
|
|
21660
|
+
}).superRefine(validateSessionRunnableConfig);
|
|
21639
21661
|
var SessionStatusSchema = external_exports.object({
|
|
21640
21662
|
runCount: external_exports.number().int().nonnegative().default(0)
|
|
21641
21663
|
}).default({ runCount: 0 });
|
|
@@ -21884,10 +21906,6 @@ var EnvironmentApplyDocumentSchema = resourceApplyDocumentSchema(
|
|
|
21884
21906
|
RESOURCE_KIND_ENVIRONMENT,
|
|
21885
21907
|
EnvironmentApplyRequestSchema.shape.spec
|
|
21886
21908
|
);
|
|
21887
|
-
var ProfileApplyDocumentSchema = resourceApplyDocumentSchema(
|
|
21888
|
-
RESOURCE_KIND_PROFILE,
|
|
21889
|
-
ProfileApplyRequestSchema.shape.spec
|
|
21890
|
-
);
|
|
21891
21909
|
var ToolApplyDocumentSchema = resourceApplyDocumentSchema(
|
|
21892
21910
|
RESOURCE_KIND_TOOL,
|
|
21893
21911
|
ToolApplyRequestSchema.shape.spec
|
|
@@ -21898,13 +21916,11 @@ var SessionApplyDocumentSchema = resourceApplyDocumentSchema(
|
|
|
21898
21916
|
);
|
|
21899
21917
|
var ProjectApplyResourceSchema = external_exports.discriminatedUnion("kind", [
|
|
21900
21918
|
EnvironmentApplyDocumentSchema,
|
|
21901
|
-
ProfileApplyDocumentSchema,
|
|
21902
21919
|
ToolApplyDocumentSchema,
|
|
21903
21920
|
SessionApplyDocumentSchema
|
|
21904
21921
|
]);
|
|
21905
21922
|
var PROJECT_RESOURCE_APPLY_ORDER = [
|
|
21906
21923
|
RESOURCE_KIND_ENVIRONMENT,
|
|
21907
|
-
RESOURCE_KIND_PROFILE,
|
|
21908
21924
|
RESOURCE_KIND_TOOL,
|
|
21909
21925
|
RESOURCE_KIND_SESSION
|
|
21910
21926
|
];
|
|
@@ -21950,7 +21966,6 @@ var ProjectApplySystemConfigSchema = external_exports.object({
|
|
|
21950
21966
|
});
|
|
21951
21967
|
var ProjectAppliedResourceSchema = external_exports.union([
|
|
21952
21968
|
EnvironmentResourceSchema,
|
|
21953
|
-
ProfileResourceSchema,
|
|
21954
21969
|
ToolResourceSchema,
|
|
21955
21970
|
SessionResourceSchema
|
|
21956
21971
|
]);
|
|
@@ -21962,7 +21977,6 @@ var ProjectApplyDiagnosticSchema = external_exports.object({
|
|
|
21962
21977
|
action: external_exports.enum(["create", "update", "unchanged"]),
|
|
21963
21978
|
kind: external_exports.enum([
|
|
21964
21979
|
RESOURCE_KIND_ENVIRONMENT,
|
|
21965
|
-
RESOURCE_KIND_PROFILE,
|
|
21966
21980
|
RESOURCE_KIND_TOOL,
|
|
21967
21981
|
RESOURCE_KIND_SESSION
|
|
21968
21982
|
]),
|
|
@@ -21978,7 +21992,6 @@ var ProjectApplyResponseSchema = external_exports.object({
|
|
|
21978
21992
|
action: external_exports.enum(["create", "update", "unchanged", "archive"]),
|
|
21979
21993
|
kind: external_exports.enum([
|
|
21980
21994
|
RESOURCE_KIND_ENVIRONMENT,
|
|
21981
|
-
RESOURCE_KIND_PROFILE,
|
|
21982
21995
|
RESOURCE_KIND_TOOL,
|
|
21983
21996
|
RESOURCE_KIND_SESSION
|
|
21984
21997
|
]),
|
|
@@ -21990,7 +22003,6 @@ var ProjectApplyResponseSchema = external_exports.object({
|
|
|
21990
22003
|
external_exports.object({
|
|
21991
22004
|
kind: external_exports.enum([
|
|
21992
22005
|
RESOURCE_KIND_ENVIRONMENT,
|
|
21993
|
-
RESOURCE_KIND_PROFILE,
|
|
21994
22006
|
RESOURCE_KIND_TOOL,
|
|
21995
22007
|
RESOURCE_KIND_SESSION
|
|
21996
22008
|
]),
|
|
@@ -26269,7 +26281,7 @@ Object.assign(lookup, {
|
|
|
26269
26281
|
// package.json
|
|
26270
26282
|
var package_default = {
|
|
26271
26283
|
name: "@autohq/cli",
|
|
26272
|
-
version: "0.1.
|
|
26284
|
+
version: "0.1.126",
|
|
26273
26285
|
license: "SEE LICENSE IN README.md",
|
|
26274
26286
|
publishConfig: {
|
|
26275
26287
|
access: "public"
|
package/dist/index.js
CHANGED
|
@@ -16189,7 +16189,6 @@ var init_auth = __esm({
|
|
|
16189
16189
|
});
|
|
16190
16190
|
SERVICE_ACCOUNT_READ_ONLY_SCOPES = [
|
|
16191
16191
|
"environments:read",
|
|
16192
|
-
"profiles:read",
|
|
16193
16192
|
"tools:read",
|
|
16194
16193
|
"sessions:read",
|
|
16195
16194
|
"runs:read"
|
|
@@ -16199,7 +16198,6 @@ var init_auth = __esm({
|
|
|
16199
16198
|
applier: [
|
|
16200
16199
|
...SERVICE_ACCOUNT_READ_ONLY_SCOPES,
|
|
16201
16200
|
"environments:write",
|
|
16202
|
-
"profiles:write",
|
|
16203
16201
|
"tools:write",
|
|
16204
16202
|
"sessions:write"
|
|
16205
16203
|
]
|
|
@@ -17740,13 +17738,12 @@ var init_project_service_accounts = __esm({
|
|
|
17740
17738
|
});
|
|
17741
17739
|
|
|
17742
17740
|
// ../../packages/schemas/src/profiles.ts
|
|
17743
|
-
var
|
|
17741
|
+
var PROFILE_HARNESSES, ProfileSpecSchema, ProfileResourceSchema, ProfileApplyRequestSchema;
|
|
17744
17742
|
var init_profiles2 = __esm({
|
|
17745
17743
|
"../../packages/schemas/src/profiles.ts"() {
|
|
17746
17744
|
"use strict";
|
|
17747
17745
|
init_zod();
|
|
17748
17746
|
init_resources();
|
|
17749
|
-
RESOURCE_KIND_PROFILE = "profile";
|
|
17750
17747
|
PROFILE_HARNESSES = ["claude-code"];
|
|
17751
17748
|
ProfileSpecSchema = external_exports.object({
|
|
17752
17749
|
harness: external_exports.enum(PROFILE_HARNESSES),
|
|
@@ -18116,6 +18113,25 @@ function isAvatarAssetPathShapeValid(asset) {
|
|
|
18116
18113
|
const lower = normalized.toLowerCase();
|
|
18117
18114
|
return AVATAR_ASSET_EXTENSIONS.some((ext) => lower.endsWith(ext));
|
|
18118
18115
|
}
|
|
18116
|
+
function validateSessionRunnableConfig(spec, context) {
|
|
18117
|
+
if (spec.profile) {
|
|
18118
|
+
return;
|
|
18119
|
+
}
|
|
18120
|
+
if (!spec.harness) {
|
|
18121
|
+
context.addIssue({
|
|
18122
|
+
code: external_exports.ZodIssueCode.custom,
|
|
18123
|
+
path: ["harness"],
|
|
18124
|
+
message: "Session requires harness when profile is omitted"
|
|
18125
|
+
});
|
|
18126
|
+
}
|
|
18127
|
+
if (!spec.environment) {
|
|
18128
|
+
context.addIssue({
|
|
18129
|
+
code: external_exports.ZodIssueCode.custom,
|
|
18130
|
+
path: ["environment"],
|
|
18131
|
+
message: "Session requires environment when profile is omitted"
|
|
18132
|
+
});
|
|
18133
|
+
}
|
|
18134
|
+
}
|
|
18119
18135
|
function validateTriggerChecks(trigger, context, eventKeys) {
|
|
18120
18136
|
const checks = trigger.checks ?? [];
|
|
18121
18137
|
if (checks.length === 0) {
|
|
@@ -18239,7 +18255,7 @@ function isChatMessageEvent(trigger) {
|
|
|
18239
18255
|
function hasFilterValue(trigger, path2, expected) {
|
|
18240
18256
|
return trigger.where?.[path2] === expected;
|
|
18241
18257
|
}
|
|
18242
|
-
var RESOURCE_KIND_SESSION, 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, SessionSpecSchema, SessionApplySpecSchema, SessionStatusSchema, SessionResourceSchema, SessionApplyRequestSchema, SessionApplyTriggerReceiptSchema, SessionApplyResponseSchema, SESSION_TELEGRAM_IDENTITY_STATUSES, SessionTelegramIdentityStatusSchema, SessionPresenceIdentitySchema, SessionPresenceResponseSchema, SessionPresenceConnectRequestSchema, SessionPresenceConnectPendingSchema, SessionPresenceConnectResponseSchema, SessionPresenceIconRequestSchema, SessionPresenceIconResponseSchema, SessionPresenceCompleteResponseSchema;
|
|
18258
|
+
var RESOURCE_KIND_SESSION, 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;
|
|
18243
18259
|
var init_sessions = __esm({
|
|
18244
18260
|
"../../packages/schemas/src/sessions.ts"() {
|
|
18245
18261
|
"use strict";
|
|
@@ -18247,6 +18263,7 @@ var init_sessions = __esm({
|
|
|
18247
18263
|
init_connections();
|
|
18248
18264
|
init_mounts();
|
|
18249
18265
|
init_primitives();
|
|
18266
|
+
init_profiles2();
|
|
18250
18267
|
init_resources();
|
|
18251
18268
|
init_secrets();
|
|
18252
18269
|
init_tools();
|
|
@@ -18442,8 +18459,11 @@ var init_sessions = __esm({
|
|
|
18442
18459
|
}).strict().refine((identity2) => Object.keys(identity2).length > 0, {
|
|
18443
18460
|
message: "Session identity requires at least one field"
|
|
18444
18461
|
});
|
|
18445
|
-
|
|
18446
|
-
profile: ResourceNameSchema,
|
|
18462
|
+
SessionSpecFieldsSchema = external_exports.object({
|
|
18463
|
+
profile: ResourceNameSchema.optional(),
|
|
18464
|
+
harness: external_exports.enum(PROFILE_HARNESSES).optional(),
|
|
18465
|
+
systemPrompt: external_exports.string().trim().min(1).max(1e5).optional(),
|
|
18466
|
+
environment: ResourceNameSchema.optional(),
|
|
18447
18467
|
identity: SessionIdentitySchema.optional(),
|
|
18448
18468
|
initialPrompt: external_exports.string().trim().min(1).max(2e4).optional(),
|
|
18449
18469
|
env: SecretEnvSchema.default({}),
|
|
@@ -18452,9 +18472,12 @@ var init_sessions = __esm({
|
|
|
18452
18472
|
workingDirectory: external_exports.string().trim().min(1).optional(),
|
|
18453
18473
|
tools: SessionToolsSchema.default({})
|
|
18454
18474
|
});
|
|
18455
|
-
|
|
18475
|
+
SessionSpecSchema = SessionSpecFieldsSchema.superRefine(
|
|
18476
|
+
validateSessionRunnableConfig
|
|
18477
|
+
);
|
|
18478
|
+
SessionApplySpecSchema = SessionSpecFieldsSchema.extend({
|
|
18456
18479
|
triggers: SessionApplyTriggersSchema.default([])
|
|
18457
|
-
});
|
|
18480
|
+
}).superRefine(validateSessionRunnableConfig);
|
|
18458
18481
|
SessionStatusSchema = external_exports.object({
|
|
18459
18482
|
runCount: external_exports.number().int().nonnegative().default(0)
|
|
18460
18483
|
}).default({ runCount: 0 });
|
|
@@ -18578,13 +18601,12 @@ var init_sessions = __esm({
|
|
|
18578
18601
|
});
|
|
18579
18602
|
|
|
18580
18603
|
// ../../packages/schemas/src/project-resources.ts
|
|
18581
|
-
var EnvironmentApplyDocumentSchema,
|
|
18604
|
+
var EnvironmentApplyDocumentSchema, ToolApplyDocumentSchema, 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;
|
|
18582
18605
|
var init_project_resources = __esm({
|
|
18583
18606
|
"../../packages/schemas/src/project-resources.ts"() {
|
|
18584
18607
|
"use strict";
|
|
18585
18608
|
init_zod();
|
|
18586
18609
|
init_environments();
|
|
18587
|
-
init_profiles2();
|
|
18588
18610
|
init_resources();
|
|
18589
18611
|
init_sessions();
|
|
18590
18612
|
init_tools();
|
|
@@ -18592,10 +18614,6 @@ var init_project_resources = __esm({
|
|
|
18592
18614
|
RESOURCE_KIND_ENVIRONMENT,
|
|
18593
18615
|
EnvironmentApplyRequestSchema.shape.spec
|
|
18594
18616
|
);
|
|
18595
|
-
ProfileApplyDocumentSchema = resourceApplyDocumentSchema(
|
|
18596
|
-
RESOURCE_KIND_PROFILE,
|
|
18597
|
-
ProfileApplyRequestSchema.shape.spec
|
|
18598
|
-
);
|
|
18599
18617
|
ToolApplyDocumentSchema = resourceApplyDocumentSchema(
|
|
18600
18618
|
RESOURCE_KIND_TOOL,
|
|
18601
18619
|
ToolApplyRequestSchema.shape.spec
|
|
@@ -18606,13 +18624,11 @@ var init_project_resources = __esm({
|
|
|
18606
18624
|
);
|
|
18607
18625
|
ProjectApplyResourceSchema = external_exports.discriminatedUnion("kind", [
|
|
18608
18626
|
EnvironmentApplyDocumentSchema,
|
|
18609
|
-
ProfileApplyDocumentSchema,
|
|
18610
18627
|
ToolApplyDocumentSchema,
|
|
18611
18628
|
SessionApplyDocumentSchema
|
|
18612
18629
|
]);
|
|
18613
18630
|
PROJECT_RESOURCE_APPLY_ORDER = [
|
|
18614
18631
|
RESOURCE_KIND_ENVIRONMENT,
|
|
18615
|
-
RESOURCE_KIND_PROFILE,
|
|
18616
18632
|
RESOURCE_KIND_TOOL,
|
|
18617
18633
|
RESOURCE_KIND_SESSION
|
|
18618
18634
|
];
|
|
@@ -18658,7 +18674,6 @@ var init_project_resources = __esm({
|
|
|
18658
18674
|
});
|
|
18659
18675
|
ProjectAppliedResourceSchema = external_exports.union([
|
|
18660
18676
|
EnvironmentResourceSchema,
|
|
18661
|
-
ProfileResourceSchema,
|
|
18662
18677
|
ToolResourceSchema,
|
|
18663
18678
|
SessionResourceSchema
|
|
18664
18679
|
]);
|
|
@@ -18670,7 +18685,6 @@ var init_project_resources = __esm({
|
|
|
18670
18685
|
action: external_exports.enum(["create", "update", "unchanged"]),
|
|
18671
18686
|
kind: external_exports.enum([
|
|
18672
18687
|
RESOURCE_KIND_ENVIRONMENT,
|
|
18673
|
-
RESOURCE_KIND_PROFILE,
|
|
18674
18688
|
RESOURCE_KIND_TOOL,
|
|
18675
18689
|
RESOURCE_KIND_SESSION
|
|
18676
18690
|
]),
|
|
@@ -18686,7 +18700,6 @@ var init_project_resources = __esm({
|
|
|
18686
18700
|
action: external_exports.enum(["create", "update", "unchanged", "archive"]),
|
|
18687
18701
|
kind: external_exports.enum([
|
|
18688
18702
|
RESOURCE_KIND_ENVIRONMENT,
|
|
18689
|
-
RESOURCE_KIND_PROFILE,
|
|
18690
18703
|
RESOURCE_KIND_TOOL,
|
|
18691
18704
|
RESOURCE_KIND_SESSION
|
|
18692
18705
|
]),
|
|
@@ -18698,7 +18711,6 @@ var init_project_resources = __esm({
|
|
|
18698
18711
|
external_exports.object({
|
|
18699
18712
|
kind: external_exports.enum([
|
|
18700
18713
|
RESOURCE_KIND_ENVIRONMENT,
|
|
18701
|
-
RESOURCE_KIND_PROFILE,
|
|
18702
18714
|
RESOURCE_KIND_TOOL,
|
|
18703
18715
|
RESOURCE_KIND_SESSION
|
|
18704
18716
|
]),
|
|
@@ -19637,10 +19649,6 @@ function createResourceApi(context) {
|
|
|
19637
19649
|
path: "/environments",
|
|
19638
19650
|
applyResponseSchema: EnvironmentResourceSchema
|
|
19639
19651
|
});
|
|
19640
|
-
const profiles = projectResource(context, {
|
|
19641
|
-
path: "/profiles",
|
|
19642
|
-
applyResponseSchema: ProfileResourceSchema
|
|
19643
|
-
});
|
|
19644
19652
|
const sessions = projectResource(context, {
|
|
19645
19653
|
path: "/sessions",
|
|
19646
19654
|
applyResponseSchema: SessionApplyResponseSchema
|
|
@@ -19658,13 +19666,11 @@ function createResourceApi(context) {
|
|
|
19658
19666
|
request,
|
|
19659
19667
|
options ?? {}
|
|
19660
19668
|
),
|
|
19661
|
-
applyProfileResource: profiles.apply,
|
|
19662
19669
|
applySessionResource: sessions.apply,
|
|
19663
19670
|
applyToolResource: tools.apply,
|
|
19664
19671
|
createProjectServiceAccount: (request, options) => createProjectServiceAccount(context, request, options ?? {}),
|
|
19665
19672
|
deleteProjectResource: (request, options) => deleteProjectResource(context, request, options ?? {}),
|
|
19666
19673
|
listEnvironments: environments.list,
|
|
19667
|
-
listProfiles: profiles.list,
|
|
19668
19674
|
listProjectServiceAccounts: (options) => listProjectServiceAccounts(context, options ?? {}),
|
|
19669
19675
|
listSessions: sessions.list,
|
|
19670
19676
|
listTools: tools.list,
|
|
@@ -21169,33 +21175,6 @@ function createApiClient(input) {
|
|
|
21169
21175
|
setActiveSelection(organizationId, projectId) {
|
|
21170
21176
|
const config2 = readConfig(input.configPath);
|
|
21171
21177
|
writeConfig({ ...config2, organizationId, projectId }, input.configPath);
|
|
21172
|
-
},
|
|
21173
|
-
async applySession(name, spec, options = {}) {
|
|
21174
|
-
const project = await activeProject();
|
|
21175
|
-
const response = await authenticatedFetch(
|
|
21176
|
-
apiUrl(projectApiPath(project, "/sessions"), options.apiBaseUrl),
|
|
21177
|
-
{
|
|
21178
|
-
method: "POST",
|
|
21179
|
-
headers: {
|
|
21180
|
-
"content-type": "application/json"
|
|
21181
|
-
},
|
|
21182
|
-
body: JSON.stringify({
|
|
21183
|
-
metadata: { name },
|
|
21184
|
-
spec: {
|
|
21185
|
-
profile: spec.profile ?? "default",
|
|
21186
|
-
initialPrompt: spec.initialPrompt,
|
|
21187
|
-
workingDirectory: spec.workingDirectory
|
|
21188
|
-
}
|
|
21189
|
-
})
|
|
21190
|
-
},
|
|
21191
|
-
options.apiBaseUrl
|
|
21192
|
-
);
|
|
21193
|
-
if (!response.ok) {
|
|
21194
|
-
throw new Error(await responseErrorMessage(response));
|
|
21195
|
-
}
|
|
21196
|
-
const body = SessionApplyResponseSchema.parse(await response.json());
|
|
21197
|
-
const resource = "resource" in body ? body.resource : body;
|
|
21198
|
-
return { resource };
|
|
21199
21178
|
}
|
|
21200
21179
|
};
|
|
21201
21180
|
}
|
|
@@ -21237,7 +21216,7 @@ var init_package = __esm({
|
|
|
21237
21216
|
"package.json"() {
|
|
21238
21217
|
package_default = {
|
|
21239
21218
|
name: "@autohq/cli",
|
|
21240
|
-
version: "0.1.
|
|
21219
|
+
version: "0.1.126",
|
|
21241
21220
|
license: "SEE LICENSE IN README.md",
|
|
21242
21221
|
publishConfig: {
|
|
21243
21222
|
access: "public"
|
|
@@ -21817,13 +21796,11 @@ var init_files = __esm({
|
|
|
21817
21796
|
init_src();
|
|
21818
21797
|
APPLY_DIRECTORIES = {
|
|
21819
21798
|
environment: "environments",
|
|
21820
|
-
profile: "profiles",
|
|
21821
21799
|
tool: "tools",
|
|
21822
21800
|
session: "sessions"
|
|
21823
21801
|
};
|
|
21824
21802
|
APPLY_SCHEMAS = {
|
|
21825
21803
|
environment: EnvironmentApplyRequestSchema,
|
|
21826
|
-
profile: ProfileApplyRequestSchema,
|
|
21827
21804
|
tool: ToolApplyRequestSchema,
|
|
21828
21805
|
session: SessionApplyRequestSchema
|
|
21829
21806
|
};
|
|
@@ -21995,8 +21972,6 @@ async function listProjectResources2(client, kind, options) {
|
|
|
21995
21972
|
switch (kind) {
|
|
21996
21973
|
case RESOURCE_KIND_ENVIRONMENT:
|
|
21997
21974
|
return (await client.listEnvironments(options)).environments;
|
|
21998
|
-
case RESOURCE_KIND_PROFILE:
|
|
21999
|
-
return (await client.listProfiles(options)).profiles;
|
|
22000
21975
|
case RESOURCE_KIND_TOOL:
|
|
22001
21976
|
return (await client.listTools(options)).tools;
|
|
22002
21977
|
case RESOURCE_KIND_SESSION:
|
|
@@ -22025,12 +22000,6 @@ var init_resources3 = __esm({
|
|
|
22025
22000
|
label: "Environment",
|
|
22026
22001
|
pluralLabel: "Environments"
|
|
22027
22002
|
},
|
|
22028
|
-
[RESOURCE_KIND_PROFILE]: {
|
|
22029
|
-
kind: RESOURCE_KIND_PROFILE,
|
|
22030
|
-
section: "profiles",
|
|
22031
|
-
label: "Profile",
|
|
22032
|
-
pluralLabel: "Profiles"
|
|
22033
|
-
},
|
|
22034
22003
|
[RESOURCE_KIND_TOOL]: {
|
|
22035
22004
|
kind: RESOURCE_KIND_TOOL,
|
|
22036
22005
|
section: "tools",
|
|
@@ -22046,7 +22015,6 @@ var init_resources3 = __esm({
|
|
|
22046
22015
|
};
|
|
22047
22016
|
PROJECT_RESOURCE_TUI_ORDER = [
|
|
22048
22017
|
RESOURCE_KIND_SESSION,
|
|
22049
|
-
RESOURCE_KIND_PROFILE,
|
|
22050
22018
|
RESOURCE_KIND_ENVIRONMENT,
|
|
22051
22019
|
RESOURCE_KIND_TOOL
|
|
22052
22020
|
];
|
|
@@ -24439,36 +24407,9 @@ var init_ProjectsView = __esm({
|
|
|
24439
24407
|
// src/tui/ResourceViews.tsx
|
|
24440
24408
|
import { Box as Box9, Text as Text9, useStdout as useStdout4 } from "ink";
|
|
24441
24409
|
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
24442
|
-
function ProfilesView({
|
|
24443
|
-
resources,
|
|
24444
|
-
selectedIndex,
|
|
24445
|
-
error: error51
|
|
24446
|
-
}) {
|
|
24447
|
-
return /* @__PURE__ */ jsx9(
|
|
24448
|
-
ResourceTable,
|
|
24449
|
-
{
|
|
24450
|
-
rows: resources.map((profile) => ({
|
|
24451
|
-
id: profile.metadata.uid,
|
|
24452
|
-
name: profile.metadata.name,
|
|
24453
|
-
kind: profile.spec.harness,
|
|
24454
|
-
target: profile.spec.environment,
|
|
24455
|
-
detail: profile.spec.instructions?.replace(/\s+/g, " ").trim() ?? "",
|
|
24456
|
-
updatedAt: profile.metadata.updatedAt
|
|
24457
|
-
})),
|
|
24458
|
-
selectedIndex,
|
|
24459
|
-
error: error51,
|
|
24460
|
-
empty: "no profiles found",
|
|
24461
|
-
kindHeader: "HARNESS",
|
|
24462
|
-
targetHeader: "ENVIRONMENT",
|
|
24463
|
-
detailHeader: "INSTRUCTIONS",
|
|
24464
|
-
flexColumn: "detail"
|
|
24465
|
-
}
|
|
24466
|
-
);
|
|
24467
|
-
}
|
|
24468
24410
|
function EnvironmentsView({
|
|
24469
24411
|
resources,
|
|
24470
24412
|
selectedIndex,
|
|
24471
|
-
selectedProfile,
|
|
24472
24413
|
error: error51
|
|
24473
24414
|
}) {
|
|
24474
24415
|
return /* @__PURE__ */ jsx9(
|
|
@@ -24483,7 +24424,7 @@ function EnvironmentsView({
|
|
|
24483
24424
|
name: environment.metadata.name,
|
|
24484
24425
|
kind: environment.spec.image.name,
|
|
24485
24426
|
target: envEntries.map(([name, value]) => `${name}:${envValueKind(value)}`).join(", "),
|
|
24486
|
-
detail:
|
|
24427
|
+
detail: "",
|
|
24487
24428
|
updatedAt: environment.metadata.updatedAt
|
|
24488
24429
|
};
|
|
24489
24430
|
}),
|
|
@@ -24712,10 +24653,6 @@ function useEnvironments(apiUrl) {
|
|
|
24712
24653
|
const client = useApiClient();
|
|
24713
24654
|
return useQuery(environmentsQueryOptions(client, apiUrl));
|
|
24714
24655
|
}
|
|
24715
|
-
function useProfiles(apiUrl) {
|
|
24716
|
-
const client = useApiClient();
|
|
24717
|
-
return useQuery(profilesQueryOptions(client, apiUrl));
|
|
24718
|
-
}
|
|
24719
24656
|
function useTools(apiUrl) {
|
|
24720
24657
|
const client = useApiClient();
|
|
24721
24658
|
return useQuery(toolsQueryOptions(client, apiUrl));
|
|
@@ -24790,7 +24727,6 @@ function useSwitchProject() {
|
|
|
24790
24727
|
onSuccess: () => {
|
|
24791
24728
|
for (const queryKey of [
|
|
24792
24729
|
["sessions"],
|
|
24793
|
-
["profiles"],
|
|
24794
24730
|
["environments"],
|
|
24795
24731
|
["tools"],
|
|
24796
24732
|
["service-accounts"],
|
|
@@ -24994,16 +24930,6 @@ function environmentsQueryOptions(client, apiUrl) {
|
|
|
24994
24930
|
staleTime: Number.POSITIVE_INFINITY
|
|
24995
24931
|
});
|
|
24996
24932
|
}
|
|
24997
|
-
function profilesQueryOptions(client, apiUrl) {
|
|
24998
|
-
return queryOptions({
|
|
24999
|
-
queryKey: queryKeys.profiles(apiUrl),
|
|
25000
|
-
queryFn: async () => {
|
|
25001
|
-
const res = await client.listProfiles({ apiBaseUrl: apiUrl });
|
|
25002
|
-
return sortByName(res.profiles);
|
|
25003
|
-
},
|
|
25004
|
-
staleTime: Number.POSITIVE_INFINITY
|
|
25005
|
-
});
|
|
25006
|
-
}
|
|
25007
24933
|
function sessionsQueryOptions(client, apiUrl) {
|
|
25008
24934
|
return queryOptions({
|
|
25009
24935
|
queryKey: queryKeys.sessions(apiUrl),
|
|
@@ -25070,7 +24996,7 @@ function connectionProvidersQueryOptions(client, apiUrl, enabled = true) {
|
|
|
25070
24996
|
}
|
|
25071
24997
|
function sortSessions(list) {
|
|
25072
24998
|
return list.slice().sort(
|
|
25073
|
-
(a, b) => a.spec.
|
|
24999
|
+
(a, b) => (a.spec.environment ?? "").localeCompare(b.spec.environment ?? "") || a.metadata.name.localeCompare(b.metadata.name)
|
|
25074
25000
|
);
|
|
25075
25001
|
}
|
|
25076
25002
|
function sortByName(list) {
|
|
@@ -25099,7 +25025,6 @@ var init_queries = __esm({
|
|
|
25099
25025
|
TUI_RUN_LIST_LIMIT = 200;
|
|
25100
25026
|
queryKeys = {
|
|
25101
25027
|
environments: (apiUrl) => ["environments", apiUrl],
|
|
25102
|
-
profiles: (apiUrl) => ["profiles", apiUrl],
|
|
25103
25028
|
sessions: (apiUrl) => ["sessions", apiUrl],
|
|
25104
25029
|
tools: (apiUrl) => ["tools", apiUrl],
|
|
25105
25030
|
projects: (apiUrl) => ["projects", apiUrl],
|
|
@@ -25564,8 +25489,6 @@ function selectedNamedResourceForSection(input) {
|
|
|
25564
25489
|
switch (input.activeSection) {
|
|
25565
25490
|
case "environments":
|
|
25566
25491
|
return input.selectedEnvironment ?? null;
|
|
25567
|
-
case "profiles":
|
|
25568
|
-
return input.selectedProfile ?? null;
|
|
25569
25492
|
case "sessions":
|
|
25570
25493
|
return input.selectedSession ?? null;
|
|
25571
25494
|
case "tools":
|
|
@@ -25607,7 +25530,6 @@ function HomeView({ apiUrl, notice, returnToSession }) {
|
|
|
25607
25530
|
returnToSession ? "runs" : "sessions"
|
|
25608
25531
|
);
|
|
25609
25532
|
const [sessionIndex, setSessionIndex] = useState3(0);
|
|
25610
|
-
const [profileIndex, setProfileIndex] = useState3(0);
|
|
25611
25533
|
const [environmentIndex, setEnvironmentIndex] = useState3(0);
|
|
25612
25534
|
const [toolIndex, setToolIndex] = useState3(0);
|
|
25613
25535
|
const [projectIndex, setProjectIndex] = useState3(0);
|
|
@@ -25639,11 +25561,6 @@ function HomeView({ apiUrl, notice, returnToSession }) {
|
|
|
25639
25561
|
isLoading,
|
|
25640
25562
|
error: sessionsError
|
|
25641
25563
|
} = useSessions(apiUrl);
|
|
25642
|
-
const {
|
|
25643
|
-
data: profiles = [],
|
|
25644
|
-
isLoading: isProfilesLoading,
|
|
25645
|
-
error: profilesError
|
|
25646
|
-
} = useProfiles(apiUrl);
|
|
25647
25564
|
const {
|
|
25648
25565
|
data: environments = [],
|
|
25649
25566
|
isLoading: isEnvironmentsLoading,
|
|
@@ -25740,14 +25657,12 @@ function HomeView({ apiUrl, notice, returnToSession }) {
|
|
|
25740
25657
|
const selectedConnectionProvider = providerRows2(connectionProviders)[connectionProviderIndex];
|
|
25741
25658
|
const selectedServiceAccount = serviceAccounts[serviceAccountIndex];
|
|
25742
25659
|
const selectedSession = sessions[sessionIndex];
|
|
25743
|
-
const selectedProfile = profiles[profileIndex];
|
|
25744
25660
|
const selectedEnvironment = environments[environmentIndex];
|
|
25745
25661
|
const selectedTool = tools[toolIndex];
|
|
25746
25662
|
const selectedInspectableResource = useMemo3(() => {
|
|
25747
25663
|
const selectedEditable = editableResourceForSelection({
|
|
25748
25664
|
activeSection,
|
|
25749
25665
|
selectedEnvironment,
|
|
25750
|
-
selectedProfile,
|
|
25751
25666
|
selectedSession,
|
|
25752
25667
|
selectedTool
|
|
25753
25668
|
});
|
|
@@ -25761,12 +25676,6 @@ function HomeView({ apiUrl, notice, returnToSession }) {
|
|
|
25761
25676
|
name: selectedEditable.name,
|
|
25762
25677
|
spec: selectedSession.spec
|
|
25763
25678
|
} : null;
|
|
25764
|
-
case "profiles":
|
|
25765
|
-
return selectedProfile ? {
|
|
25766
|
-
kind: selectedEditable.kind,
|
|
25767
|
-
name: selectedEditable.name,
|
|
25768
|
-
spec: selectedProfile.spec
|
|
25769
|
-
} : null;
|
|
25770
25679
|
case "environments":
|
|
25771
25680
|
return selectedEnvironment ? {
|
|
25772
25681
|
kind: selectedEditable.kind,
|
|
@@ -25782,28 +25691,15 @@ function HomeView({ apiUrl, notice, returnToSession }) {
|
|
|
25782
25691
|
default:
|
|
25783
25692
|
return null;
|
|
25784
25693
|
}
|
|
25785
|
-
}, [
|
|
25786
|
-
activeSection,
|
|
25787
|
-
selectedEnvironment,
|
|
25788
|
-
selectedProfile,
|
|
25789
|
-
selectedSession,
|
|
25790
|
-
selectedTool
|
|
25791
|
-
]);
|
|
25694
|
+
}, [activeSection, selectedEnvironment, selectedSession, selectedTool]);
|
|
25792
25695
|
const selectedEditableResource = useMemo3(
|
|
25793
25696
|
() => editableResourceForSelection({
|
|
25794
25697
|
activeSection,
|
|
25795
25698
|
selectedEnvironment,
|
|
25796
|
-
selectedProfile,
|
|
25797
25699
|
selectedSession,
|
|
25798
25700
|
selectedTool
|
|
25799
25701
|
}),
|
|
25800
|
-
[
|
|
25801
|
-
activeSection,
|
|
25802
|
-
selectedEnvironment,
|
|
25803
|
-
selectedProfile,
|
|
25804
|
-
selectedSession,
|
|
25805
|
-
selectedTool
|
|
25806
|
-
]
|
|
25702
|
+
[activeSection, selectedEnvironment, selectedSession, selectedTool]
|
|
25807
25703
|
);
|
|
25808
25704
|
const inspectPanelHeight = Math.max(1, termHeight - 12);
|
|
25809
25705
|
const scopedSession = runScopeSessionName ? sessions.find((session) => session.metadata.name === runScopeSessionName) : void 0;
|
|
@@ -25839,22 +25735,13 @@ function HomeView({ apiUrl, notice, returnToSession }) {
|
|
|
25839
25735
|
});
|
|
25840
25736
|
}, [visibleRunIdKey]);
|
|
25841
25737
|
useEffect3(() => {
|
|
25842
|
-
|
|
25843
|
-
const index = profiles.findIndex(
|
|
25844
|
-
(profile) => profile.metadata.name === selectedSession.spec.profile
|
|
25845
|
-
);
|
|
25846
|
-
if (index >= 0) setProfileIndex(index);
|
|
25847
|
-
}, [profiles, selectedSession]);
|
|
25848
|
-
useEffect3(() => {
|
|
25849
|
-
const environmentName = selectedProfile?.spec.environment ?? profiles.find(
|
|
25850
|
-
(profile) => profile.metadata.name === selectedSession?.spec.profile
|
|
25851
|
-
)?.spec.environment;
|
|
25738
|
+
const environmentName = selectedSession?.spec.environment;
|
|
25852
25739
|
if (!environmentName) return;
|
|
25853
25740
|
const index = environments.findIndex(
|
|
25854
25741
|
(environment) => environment.metadata.name === environmentName
|
|
25855
25742
|
);
|
|
25856
25743
|
if (index >= 0) setEnvironmentIndex(index);
|
|
25857
|
-
}, [environments,
|
|
25744
|
+
}, [environments, selectedSession]);
|
|
25858
25745
|
useEffect3(() => {
|
|
25859
25746
|
const sessionToolRefs = selectedSession ? Object.values(selectedSession.spec.tools).flatMap((tool) => {
|
|
25860
25747
|
if ("ref" in tool) {
|
|
@@ -26396,20 +26283,6 @@ function HomeView({ apiUrl, notice, returnToSession }) {
|
|
|
26396
26283
|
return;
|
|
26397
26284
|
}
|
|
26398
26285
|
}
|
|
26399
|
-
if (activeSection === "profiles") {
|
|
26400
|
-
if (key.upArrow) {
|
|
26401
|
-
setProfileIndex((i) => Math.max(0, i - 1));
|
|
26402
|
-
return;
|
|
26403
|
-
}
|
|
26404
|
-
if (key.downArrow) {
|
|
26405
|
-
setProfileIndex((i) => clampListIndex(i + 1, profiles.length));
|
|
26406
|
-
return;
|
|
26407
|
-
}
|
|
26408
|
-
if (key.return && selectedProfile) {
|
|
26409
|
-
setSection("environments");
|
|
26410
|
-
return;
|
|
26411
|
-
}
|
|
26412
|
-
}
|
|
26413
26286
|
if (activeSection === "environments") {
|
|
26414
26287
|
if (key.upArrow) {
|
|
26415
26288
|
setEnvironmentIndex((i) => Math.max(0, i - 1));
|
|
@@ -26709,11 +26582,10 @@ function HomeView({ apiUrl, notice, returnToSession }) {
|
|
|
26709
26582
|
case "serviceAccounts":
|
|
26710
26583
|
sectionTitle = `Service Accounts[${serviceAccounts.length}]`;
|
|
26711
26584
|
break;
|
|
26712
|
-
case "profiles":
|
|
26713
26585
|
case "environments":
|
|
26714
26586
|
case "tools": {
|
|
26715
26587
|
const definition = PROJECT_RESOURCE_TUI_DEFINITIONS_BY_SECTION.get(activeSection);
|
|
26716
|
-
const count = activeSection === "
|
|
26588
|
+
const count = activeSection === "environments" ? environments.length : tools.length;
|
|
26717
26589
|
sectionTitle = `${definition?.pluralLabel ?? activeSection}[${count}]`;
|
|
26718
26590
|
break;
|
|
26719
26591
|
}
|
|
@@ -26802,7 +26674,6 @@ function HomeView({ apiUrl, notice, returnToSession }) {
|
|
|
26802
26674
|
{
|
|
26803
26675
|
keys: [
|
|
26804
26676
|
...isApplyResourceSection(activeSection) || activeSection === "serviceAccounts" ? [{ k: "\u2191\u2193", label: "Navigate" }] : [],
|
|
26805
|
-
...activeSection === "profiles" ? [{ k: "enter", label: "Environment" }] : [],
|
|
26806
26677
|
...isApplyResourceSection(activeSection) ? [
|
|
26807
26678
|
{ k: "i", label: "Inspect" },
|
|
26808
26679
|
{ k: "e", label: "Edit" }
|
|
@@ -26877,21 +26748,11 @@ function HomeView({ apiUrl, notice, returnToSession }) {
|
|
|
26877
26748
|
scrollOffset: inspectScrollOffset,
|
|
26878
26749
|
height: inspectPanelHeight
|
|
26879
26750
|
}
|
|
26880
|
-
) : activeSection === "profiles" ? isProfilesLoading ? /* @__PURE__ */ jsx14(Box13, { padding: 2, children: /* @__PURE__ */ jsx14(Spinner, { label: "loading profiles\u2026" }) }) : /* @__PURE__ */ jsx14(
|
|
26881
|
-
ProfilesView,
|
|
26882
|
-
{
|
|
26883
|
-
resources: profiles,
|
|
26884
|
-
selectedIndex: profileIndex,
|
|
26885
|
-
selectedSession,
|
|
26886
|
-
selectedEnvironmentName: selectedEnvironment?.metadata.name,
|
|
26887
|
-
error: profilesError instanceof Error ? profilesError.message : profilesError ? String(profilesError) : null
|
|
26888
|
-
}
|
|
26889
26751
|
) : activeSection === "environments" ? isEnvironmentsLoading ? /* @__PURE__ */ jsx14(Box13, { padding: 2, children: /* @__PURE__ */ jsx14(Spinner, { label: "loading environments\u2026" }) }) : /* @__PURE__ */ jsx14(
|
|
26890
26752
|
EnvironmentsView,
|
|
26891
26753
|
{
|
|
26892
26754
|
resources: environments,
|
|
26893
26755
|
selectedIndex: environmentIndex,
|
|
26894
|
-
selectedProfile,
|
|
26895
26756
|
selectedSession,
|
|
26896
26757
|
error: environmentsError instanceof Error ? environmentsError.message : environmentsError ? String(environmentsError) : null
|
|
26897
26758
|
}
|
|
@@ -27007,7 +26868,7 @@ function HomeView({ apiUrl, notice, returnToSession }) {
|
|
|
27007
26868
|
/* @__PURE__ */ jsx14(Text14, { dimColor: true, children: ` ${inspectedResource.name} ` }),
|
|
27008
26869
|
/* @__PURE__ */ jsx14(Text14, { dimColor: true, children: "\u203A" }),
|
|
27009
26870
|
/* @__PURE__ */ jsx14(Text14, { backgroundColor: "cyan", color: "black", children: " inspect " })
|
|
27010
|
-
] }) : (activeSection === "projects" || activeSection === "
|
|
26871
|
+
] }) : (activeSection === "projects" || activeSection === "environments" || activeSection === "tools" || activeSection === "serviceAccounts" || activeSection === "connections") && /* @__PURE__ */ jsx14(
|
|
27011
26872
|
Text14,
|
|
27012
26873
|
{
|
|
27013
26874
|
backgroundColor: "cyan",
|
|
@@ -27064,9 +26925,7 @@ function ActionKey({ k, label }) {
|
|
|
27064
26925
|
/* @__PURE__ */ jsx14(Box13, { width: 10, children: /* @__PURE__ */ jsx14(Text14, { dimColor: true, children: fitToWidth(label, 10) }) })
|
|
27065
26926
|
] });
|
|
27066
26927
|
}
|
|
27067
|
-
function ActionKeyColumns({
|
|
27068
|
-
keys
|
|
27069
|
-
}) {
|
|
26928
|
+
function ActionKeyColumns({ keys }) {
|
|
27070
26929
|
const columns = chunkActionKeys(keys, 4);
|
|
27071
26930
|
return /* @__PURE__ */ jsx14(Box13, { gap: 1, children: columns.map((column) => /* @__PURE__ */ jsx14(Box13, { flexDirection: "column", children: column.map(({ k, label }) => /* @__PURE__ */ jsx14(ActionKey, { k, label }, k)) }, column.map(({ k }) => k).join("-"))) });
|
|
27072
26931
|
}
|
|
@@ -27248,12 +27107,11 @@ var init_HomeView = __esm({
|
|
|
27248
27107
|
DASHBOARD_NAV_ITEMS = [
|
|
27249
27108
|
resourceNavItem({ k: "1", section: "sessions" }),
|
|
27250
27109
|
{ k: "2", label: "Runs", activeSection: "runs" },
|
|
27251
|
-
resourceNavItem({ k: "3", section: "
|
|
27252
|
-
resourceNavItem({ k: "4", section: "
|
|
27253
|
-
|
|
27254
|
-
{ k: "6", label: "
|
|
27255
|
-
{ k: "7", label: "
|
|
27256
|
-
{ k: "8", label: "Connections", activeSection: "connections" }
|
|
27110
|
+
resourceNavItem({ k: "3", section: "environments" }),
|
|
27111
|
+
resourceNavItem({ k: "4", section: "tools" }),
|
|
27112
|
+
{ k: "5", label: "Projects", activeSection: "projects" },
|
|
27113
|
+
{ k: "6", label: "Service Accounts", activeSection: "serviceAccounts" },
|
|
27114
|
+
{ k: "7", label: "Connections", activeSection: "connections" }
|
|
27257
27115
|
];
|
|
27258
27116
|
RESOURCES_PER_COLUMN = 4;
|
|
27259
27117
|
}
|
|
@@ -27509,13 +27367,6 @@ var init_launcher = __esm({
|
|
|
27509
27367
|
queryKey: queryKeys.environments,
|
|
27510
27368
|
sort: sortByResourceName
|
|
27511
27369
|
},
|
|
27512
|
-
[RESOURCE_KIND_PROFILE]: {
|
|
27513
|
-
async list({ apiClient, apiUrl }) {
|
|
27514
|
-
return (await apiClient.listProfiles({ apiBaseUrl: apiUrl })).profiles;
|
|
27515
|
-
},
|
|
27516
|
-
queryKey: queryKeys.profiles,
|
|
27517
|
-
sort: sortByResourceName
|
|
27518
|
-
},
|
|
27519
27370
|
[RESOURCE_KIND_TOOL]: {
|
|
27520
27371
|
async list({ apiClient, apiUrl }) {
|
|
27521
27372
|
return (await apiClient.listTools({ apiBaseUrl: apiUrl })).tools;
|