@autohq/cli 0.1.125 → 0.1.127

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.
@@ -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
  ]
@@ -21139,17 +21137,6 @@ var ProjectServiceAccountListResponseSchema = external_exports.object({
21139
21137
  serviceAccounts: external_exports.array(ProjectServiceAccountSchema)
21140
21138
  });
21141
21139
 
21142
- // ../../packages/schemas/src/profiles.ts
21143
- var RESOURCE_KIND_PROFILE = "profile";
21144
- var PROFILE_HARNESSES = ["claude-code"];
21145
- var ProfileSpecSchema = external_exports.object({
21146
- harness: external_exports.enum(PROFILE_HARNESSES),
21147
- instructions: external_exports.string().trim().min(1).max(1e5).optional(),
21148
- environment: ResourceNameSchema
21149
- }).strict();
21150
- var ProfileResourceSchema = resourceEnvelopeSchema(ProfileSpecSchema);
21151
- var ProfileApplyRequestSchema = resourceApplySchema(ProfileSpecSchema);
21152
-
21153
21140
  // ../../packages/schemas/src/tools.ts
21154
21141
  var RESOURCE_KIND_TOOL = "tool";
21155
21142
  var REMOTE_MCP_TRANSPORTS = ["streamable_http"];
@@ -21412,6 +21399,7 @@ var EventRoutingTriggerResultSchema = external_exports.object({
21412
21399
 
21413
21400
  // ../../packages/schemas/src/sessions.ts
21414
21401
  var RESOURCE_KIND_SESSION = "session";
21402
+ var SESSION_HARNESSES = ["claude-code"];
21415
21403
  var TriggerFilterScalarSchema = external_exports.union([
21416
21404
  external_exports.null(),
21417
21405
  external_exports.string(),
@@ -21624,8 +21612,7 @@ var SessionIdentitySchema = external_exports.object({
21624
21612
  message: "Session identity requires at least one field"
21625
21613
  });
21626
21614
  var SessionSpecFieldsSchema = external_exports.object({
21627
- profile: ResourceNameSchema.optional(),
21628
- harness: external_exports.enum(PROFILE_HARNESSES).optional(),
21615
+ harness: external_exports.enum(SESSION_HARNESSES).optional(),
21629
21616
  systemPrompt: external_exports.string().trim().min(1).max(1e5).optional(),
21630
21617
  environment: ResourceNameSchema.optional(),
21631
21618
  identity: SessionIdentitySchema.optional(),
@@ -21637,21 +21624,18 @@ var SessionSpecFieldsSchema = external_exports.object({
21637
21624
  tools: SessionToolsSchema.default({})
21638
21625
  });
21639
21626
  function validateSessionRunnableConfig(spec, context) {
21640
- if (spec.profile) {
21641
- return;
21642
- }
21643
21627
  if (!spec.harness) {
21644
21628
  context.addIssue({
21645
21629
  code: external_exports.ZodIssueCode.custom,
21646
21630
  path: ["harness"],
21647
- message: "Session requires harness when profile is omitted"
21631
+ message: "Session requires harness"
21648
21632
  });
21649
21633
  }
21650
21634
  if (!spec.environment) {
21651
21635
  context.addIssue({
21652
21636
  code: external_exports.ZodIssueCode.custom,
21653
21637
  path: ["environment"],
21654
- message: "Session requires environment when profile is omitted"
21638
+ message: "Session requires environment"
21655
21639
  });
21656
21640
  }
21657
21641
  }
@@ -21909,10 +21893,6 @@ var EnvironmentApplyDocumentSchema = resourceApplyDocumentSchema(
21909
21893
  RESOURCE_KIND_ENVIRONMENT,
21910
21894
  EnvironmentApplyRequestSchema.shape.spec
21911
21895
  );
21912
- var ProfileApplyDocumentSchema = resourceApplyDocumentSchema(
21913
- RESOURCE_KIND_PROFILE,
21914
- ProfileApplyRequestSchema.shape.spec
21915
- );
21916
21896
  var ToolApplyDocumentSchema = resourceApplyDocumentSchema(
21917
21897
  RESOURCE_KIND_TOOL,
21918
21898
  ToolApplyRequestSchema.shape.spec
@@ -21923,13 +21903,11 @@ var SessionApplyDocumentSchema = resourceApplyDocumentSchema(
21923
21903
  );
21924
21904
  var ProjectApplyResourceSchema = external_exports.discriminatedUnion("kind", [
21925
21905
  EnvironmentApplyDocumentSchema,
21926
- ProfileApplyDocumentSchema,
21927
21906
  ToolApplyDocumentSchema,
21928
21907
  SessionApplyDocumentSchema
21929
21908
  ]);
21930
21909
  var PROJECT_RESOURCE_APPLY_ORDER = [
21931
21910
  RESOURCE_KIND_ENVIRONMENT,
21932
- RESOURCE_KIND_PROFILE,
21933
21911
  RESOURCE_KIND_TOOL,
21934
21912
  RESOURCE_KIND_SESSION
21935
21913
  ];
@@ -21975,7 +21953,6 @@ var ProjectApplySystemConfigSchema = external_exports.object({
21975
21953
  });
21976
21954
  var ProjectAppliedResourceSchema = external_exports.union([
21977
21955
  EnvironmentResourceSchema,
21978
- ProfileResourceSchema,
21979
21956
  ToolResourceSchema,
21980
21957
  SessionResourceSchema
21981
21958
  ]);
@@ -21987,7 +21964,6 @@ var ProjectApplyDiagnosticSchema = external_exports.object({
21987
21964
  action: external_exports.enum(["create", "update", "unchanged"]),
21988
21965
  kind: external_exports.enum([
21989
21966
  RESOURCE_KIND_ENVIRONMENT,
21990
- RESOURCE_KIND_PROFILE,
21991
21967
  RESOURCE_KIND_TOOL,
21992
21968
  RESOURCE_KIND_SESSION
21993
21969
  ]),
@@ -22003,7 +21979,6 @@ var ProjectApplyResponseSchema = external_exports.object({
22003
21979
  action: external_exports.enum(["create", "update", "unchanged", "archive"]),
22004
21980
  kind: external_exports.enum([
22005
21981
  RESOURCE_KIND_ENVIRONMENT,
22006
- RESOURCE_KIND_PROFILE,
22007
21982
  RESOURCE_KIND_TOOL,
22008
21983
  RESOURCE_KIND_SESSION
22009
21984
  ]),
@@ -22015,7 +21990,6 @@ var ProjectApplyResponseSchema = external_exports.object({
22015
21990
  external_exports.object({
22016
21991
  kind: external_exports.enum([
22017
21992
  RESOURCE_KIND_ENVIRONMENT,
22018
- RESOURCE_KIND_PROFILE,
22019
21993
  RESOURCE_KIND_TOOL,
22020
21994
  RESOURCE_KIND_SESSION
22021
21995
  ]),
@@ -22025,6 +21999,17 @@ var ProjectApplyResponseSchema = external_exports.object({
22025
21999
  ).default([])
22026
22000
  });
22027
22001
 
22002
+ // ../../packages/schemas/src/profiles.ts
22003
+ var LEGACY_PROFILE_HARNESSES = ["claude-code"];
22004
+ var LegacyProfileSpecSchema = external_exports.object({
22005
+ harness: external_exports.enum(LEGACY_PROFILE_HARNESSES),
22006
+ instructions: external_exports.string().trim().min(1).max(1e5).optional(),
22007
+ environment: ResourceNameSchema
22008
+ }).strict();
22009
+ var LegacyProfileResourceSchema = resourceEnvelopeSchema(
22010
+ LegacyProfileSpecSchema
22011
+ );
22012
+
22028
22013
  // ../../packages/schemas/src/run-diagnostics.ts
22029
22014
  var RUN_DIAGNOSTIC_REALTIME_EVENT = "run.diagnostic";
22030
22015
  var RUN_DIAGNOSTIC_LEVELS = [
@@ -22127,7 +22112,7 @@ var SessionRunRecordSchema = external_exports.object({
22127
22112
  displayTitle: SessionRunDisplayTitleSchema,
22128
22113
  starterActor: AuthActorSchema.nullable(),
22129
22114
  sessionSnapshot: SessionResourceSchema,
22130
- profileSnapshot: ProfileResourceSchema,
22115
+ profileSnapshot: LegacyProfileResourceSchema,
22131
22116
  environmentSnapshot: EnvironmentResourceSchema,
22132
22117
  toolSnapshots: external_exports.array(
22133
22118
  external_exports.discriminatedUnion("source", [
@@ -26294,7 +26279,7 @@ Object.assign(lookup, {
26294
26279
  // package.json
26295
26280
  var package_default = {
26296
26281
  name: "@autohq/cli",
26297
- version: "0.1.125",
26282
+ version: "0.1.127",
26298
26283
  license: "SEE LICENSE IN README.md",
26299
26284
  publishConfig: {
26300
26285
  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
  ]
@@ -17739,25 +17737,6 @@ var init_project_service_accounts = __esm({
17739
17737
  }
17740
17738
  });
17741
17739
 
17742
- // ../../packages/schemas/src/profiles.ts
17743
- var RESOURCE_KIND_PROFILE, PROFILE_HARNESSES, ProfileSpecSchema, ProfileResourceSchema, ProfileApplyRequestSchema;
17744
- var init_profiles2 = __esm({
17745
- "../../packages/schemas/src/profiles.ts"() {
17746
- "use strict";
17747
- init_zod();
17748
- init_resources();
17749
- RESOURCE_KIND_PROFILE = "profile";
17750
- PROFILE_HARNESSES = ["claude-code"];
17751
- ProfileSpecSchema = external_exports.object({
17752
- harness: external_exports.enum(PROFILE_HARNESSES),
17753
- instructions: external_exports.string().trim().min(1).max(1e5).optional(),
17754
- environment: ResourceNameSchema
17755
- }).strict();
17756
- ProfileResourceSchema = resourceEnvelopeSchema(ProfileSpecSchema);
17757
- ProfileApplyRequestSchema = resourceApplySchema(ProfileSpecSchema);
17758
- }
17759
- });
17760
-
17761
17740
  // ../../packages/schemas/src/tools.ts
17762
17741
  function remoteMcpUrlSchema(input) {
17763
17742
  return external_exports.string().trim().url().refine(
@@ -18117,21 +18096,18 @@ function isAvatarAssetPathShapeValid(asset) {
18117
18096
  return AVATAR_ASSET_EXTENSIONS.some((ext) => lower.endsWith(ext));
18118
18097
  }
18119
18098
  function validateSessionRunnableConfig(spec, context) {
18120
- if (spec.profile) {
18121
- return;
18122
- }
18123
18099
  if (!spec.harness) {
18124
18100
  context.addIssue({
18125
18101
  code: external_exports.ZodIssueCode.custom,
18126
18102
  path: ["harness"],
18127
- message: "Session requires harness when profile is omitted"
18103
+ message: "Session requires harness"
18128
18104
  });
18129
18105
  }
18130
18106
  if (!spec.environment) {
18131
18107
  context.addIssue({
18132
18108
  code: external_exports.ZodIssueCode.custom,
18133
18109
  path: ["environment"],
18134
- message: "Session requires environment when profile is omitted"
18110
+ message: "Session requires environment"
18135
18111
  });
18136
18112
  }
18137
18113
  }
@@ -18258,7 +18234,7 @@ function isChatMessageEvent(trigger) {
18258
18234
  function hasFilterValue(trigger, path2, expected) {
18259
18235
  return trigger.where?.[path2] === expected;
18260
18236
  }
18261
- 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;
18237
+ var RESOURCE_KIND_SESSION, SESSION_HARNESSES, TriggerFilterScalarSchema, TriggerFilterPathSchema, TriggerFilterClauseSchema, TriggerFilterSchema, SessionTriggerCheckTimeoutSchema, TriggerEventSchema, TriggerEventsSchema, SessionTriggerSharedFields, SessionTriggerEventSourceFields, SessionTriggerBaseSchema, SessionTriggerDefinitionBaseSchema, SessionTriggerSchema, SessionApplyTriggerSchema, SessionHeartbeatTriggerBaseSchema, SessionHeartbeatTriggerSchema, SessionApplyHeartbeatTriggerSchema, SessionTriggerDefinitionSchema, SessionApplyTriggerDefinitionSchema, SessionTriggersSchema, SessionApplyTriggersSchema, AVATAR_ASSET_EXTENSIONS, MAX_AVATAR_ASSET_BYTES, MIN_AVATAR_ASSET_DIMENSION_PX, MAX_AVATAR_ASSET_DIMENSION_PX, PNG_SIGNATURE, SESSION_IDENTITY_DESCRIPTION_MAX_LENGTH, SHA256_HEX_PATTERN, SessionIdentitySchema, SessionSpecFieldsSchema, SessionSpecSchema, SessionApplySpecSchema, SessionStatusSchema, SessionResourceSchema, SessionApplyRequestSchema, SessionApplyTriggerReceiptSchema, SessionApplyResponseSchema, SESSION_TELEGRAM_IDENTITY_STATUSES, SessionTelegramIdentityStatusSchema, SessionPresenceIdentitySchema, SessionPresenceResponseSchema, SessionPresenceConnectRequestSchema, SessionPresenceConnectPendingSchema, SessionPresenceConnectResponseSchema, SessionPresenceIconRequestSchema, SessionPresenceIconResponseSchema, SessionPresenceCompleteResponseSchema;
18262
18238
  var init_sessions = __esm({
18263
18239
  "../../packages/schemas/src/sessions.ts"() {
18264
18240
  "use strict";
@@ -18266,12 +18242,12 @@ var init_sessions = __esm({
18266
18242
  init_connections();
18267
18243
  init_mounts();
18268
18244
  init_primitives();
18269
- init_profiles2();
18270
18245
  init_resources();
18271
18246
  init_secrets();
18272
18247
  init_tools();
18273
18248
  init_trigger_router();
18274
18249
  RESOURCE_KIND_SESSION = "session";
18250
+ SESSION_HARNESSES = ["claude-code"];
18275
18251
  TriggerFilterScalarSchema = external_exports.union([
18276
18252
  external_exports.null(),
18277
18253
  external_exports.string(),
@@ -18463,8 +18439,7 @@ var init_sessions = __esm({
18463
18439
  message: "Session identity requires at least one field"
18464
18440
  });
18465
18441
  SessionSpecFieldsSchema = external_exports.object({
18466
- profile: ResourceNameSchema.optional(),
18467
- harness: external_exports.enum(PROFILE_HARNESSES).optional(),
18442
+ harness: external_exports.enum(SESSION_HARNESSES).optional(),
18468
18443
  systemPrompt: external_exports.string().trim().min(1).max(1e5).optional(),
18469
18444
  environment: ResourceNameSchema.optional(),
18470
18445
  identity: SessionIdentitySchema.optional(),
@@ -18604,13 +18579,12 @@ var init_sessions = __esm({
18604
18579
  });
18605
18580
 
18606
18581
  // ../../packages/schemas/src/project-resources.ts
18607
- var EnvironmentApplyDocumentSchema, ProfileApplyDocumentSchema, 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
+ 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;
18608
18583
  var init_project_resources = __esm({
18609
18584
  "../../packages/schemas/src/project-resources.ts"() {
18610
18585
  "use strict";
18611
18586
  init_zod();
18612
18587
  init_environments();
18613
- init_profiles2();
18614
18588
  init_resources();
18615
18589
  init_sessions();
18616
18590
  init_tools();
@@ -18618,10 +18592,6 @@ var init_project_resources = __esm({
18618
18592
  RESOURCE_KIND_ENVIRONMENT,
18619
18593
  EnvironmentApplyRequestSchema.shape.spec
18620
18594
  );
18621
- ProfileApplyDocumentSchema = resourceApplyDocumentSchema(
18622
- RESOURCE_KIND_PROFILE,
18623
- ProfileApplyRequestSchema.shape.spec
18624
- );
18625
18595
  ToolApplyDocumentSchema = resourceApplyDocumentSchema(
18626
18596
  RESOURCE_KIND_TOOL,
18627
18597
  ToolApplyRequestSchema.shape.spec
@@ -18632,13 +18602,11 @@ var init_project_resources = __esm({
18632
18602
  );
18633
18603
  ProjectApplyResourceSchema = external_exports.discriminatedUnion("kind", [
18634
18604
  EnvironmentApplyDocumentSchema,
18635
- ProfileApplyDocumentSchema,
18636
18605
  ToolApplyDocumentSchema,
18637
18606
  SessionApplyDocumentSchema
18638
18607
  ]);
18639
18608
  PROJECT_RESOURCE_APPLY_ORDER = [
18640
18609
  RESOURCE_KIND_ENVIRONMENT,
18641
- RESOURCE_KIND_PROFILE,
18642
18610
  RESOURCE_KIND_TOOL,
18643
18611
  RESOURCE_KIND_SESSION
18644
18612
  ];
@@ -18684,7 +18652,6 @@ var init_project_resources = __esm({
18684
18652
  });
18685
18653
  ProjectAppliedResourceSchema = external_exports.union([
18686
18654
  EnvironmentResourceSchema,
18687
- ProfileResourceSchema,
18688
18655
  ToolResourceSchema,
18689
18656
  SessionResourceSchema
18690
18657
  ]);
@@ -18696,7 +18663,6 @@ var init_project_resources = __esm({
18696
18663
  action: external_exports.enum(["create", "update", "unchanged"]),
18697
18664
  kind: external_exports.enum([
18698
18665
  RESOURCE_KIND_ENVIRONMENT,
18699
- RESOURCE_KIND_PROFILE,
18700
18666
  RESOURCE_KIND_TOOL,
18701
18667
  RESOURCE_KIND_SESSION
18702
18668
  ]),
@@ -18712,7 +18678,6 @@ var init_project_resources = __esm({
18712
18678
  action: external_exports.enum(["create", "update", "unchanged", "archive"]),
18713
18679
  kind: external_exports.enum([
18714
18680
  RESOURCE_KIND_ENVIRONMENT,
18715
- RESOURCE_KIND_PROFILE,
18716
18681
  RESOURCE_KIND_TOOL,
18717
18682
  RESOURCE_KIND_SESSION
18718
18683
  ]),
@@ -18724,7 +18689,6 @@ var init_project_resources = __esm({
18724
18689
  external_exports.object({
18725
18690
  kind: external_exports.enum([
18726
18691
  RESOURCE_KIND_ENVIRONMENT,
18727
- RESOURCE_KIND_PROFILE,
18728
18692
  RESOURCE_KIND_TOOL,
18729
18693
  RESOURCE_KIND_SESSION
18730
18694
  ]),
@@ -18736,6 +18700,25 @@ var init_project_resources = __esm({
18736
18700
  }
18737
18701
  });
18738
18702
 
18703
+ // ../../packages/schemas/src/profiles.ts
18704
+ var LEGACY_PROFILE_HARNESSES, LegacyProfileSpecSchema, LegacyProfileResourceSchema;
18705
+ var init_profiles2 = __esm({
18706
+ "../../packages/schemas/src/profiles.ts"() {
18707
+ "use strict";
18708
+ init_zod();
18709
+ init_resources();
18710
+ LEGACY_PROFILE_HARNESSES = ["claude-code"];
18711
+ LegacyProfileSpecSchema = external_exports.object({
18712
+ harness: external_exports.enum(LEGACY_PROFILE_HARNESSES),
18713
+ instructions: external_exports.string().trim().min(1).max(1e5).optional(),
18714
+ environment: ResourceNameSchema
18715
+ }).strict();
18716
+ LegacyProfileResourceSchema = resourceEnvelopeSchema(
18717
+ LegacyProfileSpecSchema
18718
+ );
18719
+ }
18720
+ });
18721
+
18739
18722
  // ../../packages/schemas/src/realtime.ts
18740
18723
  var RunRealtimeEventSchema;
18741
18724
  var init_realtime = __esm({
@@ -18875,7 +18858,7 @@ var init_session_runs = __esm({
18875
18858
  displayTitle: SessionRunDisplayTitleSchema,
18876
18859
  starterActor: AuthActorSchema.nullable(),
18877
18860
  sessionSnapshot: SessionResourceSchema,
18878
- profileSnapshot: ProfileResourceSchema,
18861
+ profileSnapshot: LegacyProfileResourceSchema,
18879
18862
  environmentSnapshot: EnvironmentResourceSchema,
18880
18863
  toolSnapshots: external_exports.array(
18881
18864
  external_exports.discriminatedUnion("source", [
@@ -19663,10 +19646,6 @@ function createResourceApi(context) {
19663
19646
  path: "/environments",
19664
19647
  applyResponseSchema: EnvironmentResourceSchema
19665
19648
  });
19666
- const profiles = projectResource(context, {
19667
- path: "/profiles",
19668
- applyResponseSchema: ProfileResourceSchema
19669
- });
19670
19649
  const sessions = projectResource(context, {
19671
19650
  path: "/sessions",
19672
19651
  applyResponseSchema: SessionApplyResponseSchema
@@ -19684,13 +19663,11 @@ function createResourceApi(context) {
19684
19663
  request,
19685
19664
  options ?? {}
19686
19665
  ),
19687
- applyProfileResource: profiles.apply,
19688
19666
  applySessionResource: sessions.apply,
19689
19667
  applyToolResource: tools.apply,
19690
19668
  createProjectServiceAccount: (request, options) => createProjectServiceAccount(context, request, options ?? {}),
19691
19669
  deleteProjectResource: (request, options) => deleteProjectResource(context, request, options ?? {}),
19692
19670
  listEnvironments: environments.list,
19693
- listProfiles: profiles.list,
19694
19671
  listProjectServiceAccounts: (options) => listProjectServiceAccounts(context, options ?? {}),
19695
19672
  listSessions: sessions.list,
19696
19673
  listTools: tools.list,
@@ -21195,33 +21172,6 @@ function createApiClient(input) {
21195
21172
  setActiveSelection(organizationId, projectId) {
21196
21173
  const config2 = readConfig(input.configPath);
21197
21174
  writeConfig({ ...config2, organizationId, projectId }, input.configPath);
21198
- },
21199
- async applySession(name, spec, options = {}) {
21200
- const project = await activeProject();
21201
- const response = await authenticatedFetch(
21202
- apiUrl(projectApiPath(project, "/sessions"), options.apiBaseUrl),
21203
- {
21204
- method: "POST",
21205
- headers: {
21206
- "content-type": "application/json"
21207
- },
21208
- body: JSON.stringify({
21209
- metadata: { name },
21210
- spec: {
21211
- profile: spec.profile ?? "default",
21212
- initialPrompt: spec.initialPrompt,
21213
- workingDirectory: spec.workingDirectory
21214
- }
21215
- })
21216
- },
21217
- options.apiBaseUrl
21218
- );
21219
- if (!response.ok) {
21220
- throw new Error(await responseErrorMessage(response));
21221
- }
21222
- const body = SessionApplyResponseSchema.parse(await response.json());
21223
- const resource = "resource" in body ? body.resource : body;
21224
- return { resource };
21225
21175
  }
21226
21176
  };
21227
21177
  }
@@ -21263,7 +21213,7 @@ var init_package = __esm({
21263
21213
  "package.json"() {
21264
21214
  package_default = {
21265
21215
  name: "@autohq/cli",
21266
- version: "0.1.125",
21216
+ version: "0.1.127",
21267
21217
  license: "SEE LICENSE IN README.md",
21268
21218
  publishConfig: {
21269
21219
  access: "public"
@@ -21843,13 +21793,11 @@ var init_files = __esm({
21843
21793
  init_src();
21844
21794
  APPLY_DIRECTORIES = {
21845
21795
  environment: "environments",
21846
- profile: "profiles",
21847
21796
  tool: "tools",
21848
21797
  session: "sessions"
21849
21798
  };
21850
21799
  APPLY_SCHEMAS = {
21851
21800
  environment: EnvironmentApplyRequestSchema,
21852
- profile: ProfileApplyRequestSchema,
21853
21801
  tool: ToolApplyRequestSchema,
21854
21802
  session: SessionApplyRequestSchema
21855
21803
  };
@@ -22021,8 +21969,6 @@ async function listProjectResources2(client, kind, options) {
22021
21969
  switch (kind) {
22022
21970
  case RESOURCE_KIND_ENVIRONMENT:
22023
21971
  return (await client.listEnvironments(options)).environments;
22024
- case RESOURCE_KIND_PROFILE:
22025
- return (await client.listProfiles(options)).profiles;
22026
21972
  case RESOURCE_KIND_TOOL:
22027
21973
  return (await client.listTools(options)).tools;
22028
21974
  case RESOURCE_KIND_SESSION:
@@ -22051,12 +21997,6 @@ var init_resources3 = __esm({
22051
21997
  label: "Environment",
22052
21998
  pluralLabel: "Environments"
22053
21999
  },
22054
- [RESOURCE_KIND_PROFILE]: {
22055
- kind: RESOURCE_KIND_PROFILE,
22056
- section: "profiles",
22057
- label: "Profile",
22058
- pluralLabel: "Profiles"
22059
- },
22060
22000
  [RESOURCE_KIND_TOOL]: {
22061
22001
  kind: RESOURCE_KIND_TOOL,
22062
22002
  section: "tools",
@@ -22072,7 +22012,6 @@ var init_resources3 = __esm({
22072
22012
  };
22073
22013
  PROJECT_RESOURCE_TUI_ORDER = [
22074
22014
  RESOURCE_KIND_SESSION,
22075
- RESOURCE_KIND_PROFILE,
22076
22015
  RESOURCE_KIND_ENVIRONMENT,
22077
22016
  RESOURCE_KIND_TOOL
22078
22017
  ];
@@ -24465,36 +24404,9 @@ var init_ProjectsView = __esm({
24465
24404
  // src/tui/ResourceViews.tsx
24466
24405
  import { Box as Box9, Text as Text9, useStdout as useStdout4 } from "ink";
24467
24406
  import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
24468
- function ProfilesView({
24469
- resources,
24470
- selectedIndex,
24471
- error: error51
24472
- }) {
24473
- return /* @__PURE__ */ jsx9(
24474
- ResourceTable,
24475
- {
24476
- rows: resources.map((profile) => ({
24477
- id: profile.metadata.uid,
24478
- name: profile.metadata.name,
24479
- kind: profile.spec.harness,
24480
- target: profile.spec.environment,
24481
- detail: profile.spec.instructions?.replace(/\s+/g, " ").trim() ?? "",
24482
- updatedAt: profile.metadata.updatedAt
24483
- })),
24484
- selectedIndex,
24485
- error: error51,
24486
- empty: "no profiles found",
24487
- kindHeader: "HARNESS",
24488
- targetHeader: "ENVIRONMENT",
24489
- detailHeader: "INSTRUCTIONS",
24490
- flexColumn: "detail"
24491
- }
24492
- );
24493
- }
24494
24407
  function EnvironmentsView({
24495
24408
  resources,
24496
24409
  selectedIndex,
24497
- selectedProfile,
24498
24410
  error: error51
24499
24411
  }) {
24500
24412
  return /* @__PURE__ */ jsx9(
@@ -24509,7 +24421,7 @@ function EnvironmentsView({
24509
24421
  name: environment.metadata.name,
24510
24422
  kind: environment.spec.image.name,
24511
24423
  target: envEntries.map(([name, value]) => `${name}:${envValueKind(value)}`).join(", "),
24512
- detail: selectedProfile?.spec.environment === environment.metadata.name ? `profile:${selectedProfile.metadata.name}` : "",
24424
+ detail: "",
24513
24425
  updatedAt: environment.metadata.updatedAt
24514
24426
  };
24515
24427
  }),
@@ -24738,10 +24650,6 @@ function useEnvironments(apiUrl) {
24738
24650
  const client = useApiClient();
24739
24651
  return useQuery(environmentsQueryOptions(client, apiUrl));
24740
24652
  }
24741
- function useProfiles(apiUrl) {
24742
- const client = useApiClient();
24743
- return useQuery(profilesQueryOptions(client, apiUrl));
24744
- }
24745
24653
  function useTools(apiUrl) {
24746
24654
  const client = useApiClient();
24747
24655
  return useQuery(toolsQueryOptions(client, apiUrl));
@@ -24816,7 +24724,6 @@ function useSwitchProject() {
24816
24724
  onSuccess: () => {
24817
24725
  for (const queryKey of [
24818
24726
  ["sessions"],
24819
- ["profiles"],
24820
24727
  ["environments"],
24821
24728
  ["tools"],
24822
24729
  ["service-accounts"],
@@ -25020,16 +24927,6 @@ function environmentsQueryOptions(client, apiUrl) {
25020
24927
  staleTime: Number.POSITIVE_INFINITY
25021
24928
  });
25022
24929
  }
25023
- function profilesQueryOptions(client, apiUrl) {
25024
- return queryOptions({
25025
- queryKey: queryKeys.profiles(apiUrl),
25026
- queryFn: async () => {
25027
- const res = await client.listProfiles({ apiBaseUrl: apiUrl });
25028
- return sortByName(res.profiles);
25029
- },
25030
- staleTime: Number.POSITIVE_INFINITY
25031
- });
25032
- }
25033
24930
  function sessionsQueryOptions(client, apiUrl) {
25034
24931
  return queryOptions({
25035
24932
  queryKey: queryKeys.sessions(apiUrl),
@@ -25096,7 +24993,7 @@ function connectionProvidersQueryOptions(client, apiUrl, enabled = true) {
25096
24993
  }
25097
24994
  function sortSessions(list) {
25098
24995
  return list.slice().sort(
25099
- (a, b) => (a.spec.profile ?? "").localeCompare(b.spec.profile ?? "") || a.metadata.name.localeCompare(b.metadata.name)
24996
+ (a, b) => (a.spec.environment ?? "").localeCompare(b.spec.environment ?? "") || a.metadata.name.localeCompare(b.metadata.name)
25100
24997
  );
25101
24998
  }
25102
24999
  function sortByName(list) {
@@ -25125,7 +25022,6 @@ var init_queries = __esm({
25125
25022
  TUI_RUN_LIST_LIMIT = 200;
25126
25023
  queryKeys = {
25127
25024
  environments: (apiUrl) => ["environments", apiUrl],
25128
- profiles: (apiUrl) => ["profiles", apiUrl],
25129
25025
  sessions: (apiUrl) => ["sessions", apiUrl],
25130
25026
  tools: (apiUrl) => ["tools", apiUrl],
25131
25027
  projects: (apiUrl) => ["projects", apiUrl],
@@ -25590,8 +25486,6 @@ function selectedNamedResourceForSection(input) {
25590
25486
  switch (input.activeSection) {
25591
25487
  case "environments":
25592
25488
  return input.selectedEnvironment ?? null;
25593
- case "profiles":
25594
- return input.selectedProfile ?? null;
25595
25489
  case "sessions":
25596
25490
  return input.selectedSession ?? null;
25597
25491
  case "tools":
@@ -25633,7 +25527,6 @@ function HomeView({ apiUrl, notice, returnToSession }) {
25633
25527
  returnToSession ? "runs" : "sessions"
25634
25528
  );
25635
25529
  const [sessionIndex, setSessionIndex] = useState3(0);
25636
- const [profileIndex, setProfileIndex] = useState3(0);
25637
25530
  const [environmentIndex, setEnvironmentIndex] = useState3(0);
25638
25531
  const [toolIndex, setToolIndex] = useState3(0);
25639
25532
  const [projectIndex, setProjectIndex] = useState3(0);
@@ -25665,11 +25558,6 @@ function HomeView({ apiUrl, notice, returnToSession }) {
25665
25558
  isLoading,
25666
25559
  error: sessionsError
25667
25560
  } = useSessions(apiUrl);
25668
- const {
25669
- data: profiles = [],
25670
- isLoading: isProfilesLoading,
25671
- error: profilesError
25672
- } = useProfiles(apiUrl);
25673
25561
  const {
25674
25562
  data: environments = [],
25675
25563
  isLoading: isEnvironmentsLoading,
@@ -25766,14 +25654,12 @@ function HomeView({ apiUrl, notice, returnToSession }) {
25766
25654
  const selectedConnectionProvider = providerRows2(connectionProviders)[connectionProviderIndex];
25767
25655
  const selectedServiceAccount = serviceAccounts[serviceAccountIndex];
25768
25656
  const selectedSession = sessions[sessionIndex];
25769
- const selectedProfile = profiles[profileIndex];
25770
25657
  const selectedEnvironment = environments[environmentIndex];
25771
25658
  const selectedTool = tools[toolIndex];
25772
25659
  const selectedInspectableResource = useMemo3(() => {
25773
25660
  const selectedEditable = editableResourceForSelection({
25774
25661
  activeSection,
25775
25662
  selectedEnvironment,
25776
- selectedProfile,
25777
25663
  selectedSession,
25778
25664
  selectedTool
25779
25665
  });
@@ -25787,12 +25673,6 @@ function HomeView({ apiUrl, notice, returnToSession }) {
25787
25673
  name: selectedEditable.name,
25788
25674
  spec: selectedSession.spec
25789
25675
  } : null;
25790
- case "profiles":
25791
- return selectedProfile ? {
25792
- kind: selectedEditable.kind,
25793
- name: selectedEditable.name,
25794
- spec: selectedProfile.spec
25795
- } : null;
25796
25676
  case "environments":
25797
25677
  return selectedEnvironment ? {
25798
25678
  kind: selectedEditable.kind,
@@ -25808,28 +25688,15 @@ function HomeView({ apiUrl, notice, returnToSession }) {
25808
25688
  default:
25809
25689
  return null;
25810
25690
  }
25811
- }, [
25812
- activeSection,
25813
- selectedEnvironment,
25814
- selectedProfile,
25815
- selectedSession,
25816
- selectedTool
25817
- ]);
25691
+ }, [activeSection, selectedEnvironment, selectedSession, selectedTool]);
25818
25692
  const selectedEditableResource = useMemo3(
25819
25693
  () => editableResourceForSelection({
25820
25694
  activeSection,
25821
25695
  selectedEnvironment,
25822
- selectedProfile,
25823
25696
  selectedSession,
25824
25697
  selectedTool
25825
25698
  }),
25826
- [
25827
- activeSection,
25828
- selectedEnvironment,
25829
- selectedProfile,
25830
- selectedSession,
25831
- selectedTool
25832
- ]
25699
+ [activeSection, selectedEnvironment, selectedSession, selectedTool]
25833
25700
  );
25834
25701
  const inspectPanelHeight = Math.max(1, termHeight - 12);
25835
25702
  const scopedSession = runScopeSessionName ? sessions.find((session) => session.metadata.name === runScopeSessionName) : void 0;
@@ -25865,22 +25732,13 @@ function HomeView({ apiUrl, notice, returnToSession }) {
25865
25732
  });
25866
25733
  }, [visibleRunIdKey]);
25867
25734
  useEffect3(() => {
25868
- if (!selectedSession?.spec.profile) return;
25869
- const index = profiles.findIndex(
25870
- (profile) => profile.metadata.name === selectedSession.spec.profile
25871
- );
25872
- if (index >= 0) setProfileIndex(index);
25873
- }, [profiles, selectedSession]);
25874
- useEffect3(() => {
25875
- const environmentName = selectedProfile?.spec.environment ?? selectedSession?.spec.environment ?? profiles.find(
25876
- (profile) => profile.metadata.name === selectedSession?.spec.profile
25877
- )?.spec.environment;
25735
+ const environmentName = selectedSession?.spec.environment;
25878
25736
  if (!environmentName) return;
25879
25737
  const index = environments.findIndex(
25880
25738
  (environment) => environment.metadata.name === environmentName
25881
25739
  );
25882
25740
  if (index >= 0) setEnvironmentIndex(index);
25883
- }, [environments, profiles, selectedProfile, selectedSession]);
25741
+ }, [environments, selectedSession]);
25884
25742
  useEffect3(() => {
25885
25743
  const sessionToolRefs = selectedSession ? Object.values(selectedSession.spec.tools).flatMap((tool) => {
25886
25744
  if ("ref" in tool) {
@@ -26422,20 +26280,6 @@ function HomeView({ apiUrl, notice, returnToSession }) {
26422
26280
  return;
26423
26281
  }
26424
26282
  }
26425
- if (activeSection === "profiles") {
26426
- if (key.upArrow) {
26427
- setProfileIndex((i) => Math.max(0, i - 1));
26428
- return;
26429
- }
26430
- if (key.downArrow) {
26431
- setProfileIndex((i) => clampListIndex(i + 1, profiles.length));
26432
- return;
26433
- }
26434
- if (key.return && selectedProfile) {
26435
- setSection("environments");
26436
- return;
26437
- }
26438
- }
26439
26283
  if (activeSection === "environments") {
26440
26284
  if (key.upArrow) {
26441
26285
  setEnvironmentIndex((i) => Math.max(0, i - 1));
@@ -26735,11 +26579,10 @@ function HomeView({ apiUrl, notice, returnToSession }) {
26735
26579
  case "serviceAccounts":
26736
26580
  sectionTitle = `Service Accounts[${serviceAccounts.length}]`;
26737
26581
  break;
26738
- case "profiles":
26739
26582
  case "environments":
26740
26583
  case "tools": {
26741
26584
  const definition = PROJECT_RESOURCE_TUI_DEFINITIONS_BY_SECTION.get(activeSection);
26742
- const count = activeSection === "profiles" ? profiles.length : activeSection === "environments" ? environments.length : tools.length;
26585
+ const count = activeSection === "environments" ? environments.length : tools.length;
26743
26586
  sectionTitle = `${definition?.pluralLabel ?? activeSection}[${count}]`;
26744
26587
  break;
26745
26588
  }
@@ -26828,7 +26671,6 @@ function HomeView({ apiUrl, notice, returnToSession }) {
26828
26671
  {
26829
26672
  keys: [
26830
26673
  ...isApplyResourceSection(activeSection) || activeSection === "serviceAccounts" ? [{ k: "\u2191\u2193", label: "Navigate" }] : [],
26831
- ...activeSection === "profiles" ? [{ k: "enter", label: "Environment" }] : [],
26832
26674
  ...isApplyResourceSection(activeSection) ? [
26833
26675
  { k: "i", label: "Inspect" },
26834
26676
  { k: "e", label: "Edit" }
@@ -26903,21 +26745,11 @@ function HomeView({ apiUrl, notice, returnToSession }) {
26903
26745
  scrollOffset: inspectScrollOffset,
26904
26746
  height: inspectPanelHeight
26905
26747
  }
26906
- ) : activeSection === "profiles" ? isProfilesLoading ? /* @__PURE__ */ jsx14(Box13, { padding: 2, children: /* @__PURE__ */ jsx14(Spinner, { label: "loading profiles\u2026" }) }) : /* @__PURE__ */ jsx14(
26907
- ProfilesView,
26908
- {
26909
- resources: profiles,
26910
- selectedIndex: profileIndex,
26911
- selectedSession,
26912
- selectedEnvironmentName: selectedEnvironment?.metadata.name,
26913
- error: profilesError instanceof Error ? profilesError.message : profilesError ? String(profilesError) : null
26914
- }
26915
26748
  ) : activeSection === "environments" ? isEnvironmentsLoading ? /* @__PURE__ */ jsx14(Box13, { padding: 2, children: /* @__PURE__ */ jsx14(Spinner, { label: "loading environments\u2026" }) }) : /* @__PURE__ */ jsx14(
26916
26749
  EnvironmentsView,
26917
26750
  {
26918
26751
  resources: environments,
26919
26752
  selectedIndex: environmentIndex,
26920
- selectedProfile,
26921
26753
  selectedSession,
26922
26754
  error: environmentsError instanceof Error ? environmentsError.message : environmentsError ? String(environmentsError) : null
26923
26755
  }
@@ -27033,7 +26865,7 @@ function HomeView({ apiUrl, notice, returnToSession }) {
27033
26865
  /* @__PURE__ */ jsx14(Text14, { dimColor: true, children: ` ${inspectedResource.name} ` }),
27034
26866
  /* @__PURE__ */ jsx14(Text14, { dimColor: true, children: "\u203A" }),
27035
26867
  /* @__PURE__ */ jsx14(Text14, { backgroundColor: "cyan", color: "black", children: " inspect " })
27036
- ] }) : (activeSection === "projects" || activeSection === "profiles" || activeSection === "environments" || activeSection === "tools" || activeSection === "serviceAccounts" || activeSection === "connections") && /* @__PURE__ */ jsx14(
26868
+ ] }) : (activeSection === "projects" || activeSection === "environments" || activeSection === "tools" || activeSection === "serviceAccounts" || activeSection === "connections") && /* @__PURE__ */ jsx14(
27037
26869
  Text14,
27038
26870
  {
27039
26871
  backgroundColor: "cyan",
@@ -27090,9 +26922,7 @@ function ActionKey({ k, label }) {
27090
26922
  /* @__PURE__ */ jsx14(Box13, { width: 10, children: /* @__PURE__ */ jsx14(Text14, { dimColor: true, children: fitToWidth(label, 10) }) })
27091
26923
  ] });
27092
26924
  }
27093
- function ActionKeyColumns({
27094
- keys
27095
- }) {
26925
+ function ActionKeyColumns({ keys }) {
27096
26926
  const columns = chunkActionKeys(keys, 4);
27097
26927
  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("-"))) });
27098
26928
  }
@@ -27274,12 +27104,11 @@ var init_HomeView = __esm({
27274
27104
  DASHBOARD_NAV_ITEMS = [
27275
27105
  resourceNavItem({ k: "1", section: "sessions" }),
27276
27106
  { k: "2", label: "Runs", activeSection: "runs" },
27277
- resourceNavItem({ k: "3", section: "profiles" }),
27278
- resourceNavItem({ k: "4", section: "environments" }),
27279
- resourceNavItem({ k: "5", section: "tools" }),
27280
- { k: "6", label: "Projects", activeSection: "projects" },
27281
- { k: "7", label: "Service Accounts", activeSection: "serviceAccounts" },
27282
- { k: "8", label: "Connections", activeSection: "connections" }
27107
+ resourceNavItem({ k: "3", section: "environments" }),
27108
+ resourceNavItem({ k: "4", section: "tools" }),
27109
+ { k: "5", label: "Projects", activeSection: "projects" },
27110
+ { k: "6", label: "Service Accounts", activeSection: "serviceAccounts" },
27111
+ { k: "7", label: "Connections", activeSection: "connections" }
27283
27112
  ];
27284
27113
  RESOURCES_PER_COLUMN = 4;
27285
27114
  }
@@ -27535,13 +27364,6 @@ var init_launcher = __esm({
27535
27364
  queryKey: queryKeys.environments,
27536
27365
  sort: sortByResourceName
27537
27366
  },
27538
- [RESOURCE_KIND_PROFILE]: {
27539
- async list({ apiClient, apiUrl }) {
27540
- return (await apiClient.listProfiles({ apiBaseUrl: apiUrl })).profiles;
27541
- },
27542
- queryKey: queryKeys.profiles,
27543
- sort: sortByResourceName
27544
- },
27545
27367
  [RESOURCE_KIND_TOOL]: {
27546
27368
  async list({ apiClient, apiUrl }) {
27547
27369
  return (await apiClient.listTools({ apiBaseUrl: apiUrl })).tools;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autohq/cli",
3
- "version": "0.1.125",
3
+ "version": "0.1.127",
4
4
  "license": "SEE LICENSE IN README.md",
5
5
  "publishConfig": {
6
6
  "access": "public"