@autohq/cli 0.1.552 → 0.1.553

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.
@@ -30870,7 +30870,7 @@ Object.assign(lookup, {
30870
30870
  // package.json
30871
30871
  var package_default = {
30872
30872
  name: "@autohq/cli",
30873
- version: "0.1.552",
30873
+ version: "0.1.553",
30874
30874
  license: "SEE LICENSE IN README.md",
30875
30875
  publishConfig: {
30876
30876
  access: "public"
@@ -31880,6 +31880,18 @@ var AuthActorSchema = external_exports.object({
31880
31880
  principal: PrincipalSchema,
31881
31881
  client: AuthClientSchema
31882
31882
  });
31883
+ var PersistedPrincipalSchema = external_exports.preprocess(
31884
+ normalizePersistedPrincipal,
31885
+ PrincipalSchema
31886
+ );
31887
+ var PersistedAuthClientSchema = external_exports.preprocess(
31888
+ normalizePersistedAuthClient,
31889
+ AuthClientSchema
31890
+ );
31891
+ var PersistedAuthActorSchema = external_exports.object({
31892
+ principal: PersistedPrincipalSchema,
31893
+ client: PersistedAuthClientSchema
31894
+ });
31883
31895
  var AuthContextSchema = external_exports.object({
31884
31896
  actor: AuthActorSchema,
31885
31897
  organizationId: OrganizationIdSchema,
@@ -31909,6 +31921,23 @@ var AuthWhoamiResponseSchema = external_exports.object({
31909
31921
  })
31910
31922
  }).optional()
31911
31923
  });
31924
+ function normalizePersistedPrincipal(value2) {
31925
+ if (typeof value2 !== "object" || value2 === null) {
31926
+ return value2;
31927
+ }
31928
+ const principal = value2;
31929
+ if (principal.kind !== "run" || typeof principal.runId !== "string" || principal.runId.trim().length === 0) {
31930
+ return value2;
31931
+ }
31932
+ return { kind: "session", sessionId: principal.runId };
31933
+ }
31934
+ function normalizePersistedAuthClient(value2) {
31935
+ if (typeof value2 !== "object" || value2 === null) {
31936
+ return value2;
31937
+ }
31938
+ const client = value2;
31939
+ return client.kind === "run_token" ? { kind: "session_token" } : value2;
31940
+ }
31912
31941
  var SERVICE_ACCOUNT_READ_ONLY_SCOPES = [
31913
31942
  "environments:read",
31914
31943
  "tools:read",
package/dist/index.js CHANGED
@@ -15442,7 +15442,24 @@ var init_account = __esm({
15442
15442
  });
15443
15443
 
15444
15444
  // ../../packages/schemas/src/auth.ts
15445
- var AuthRoleSchema, AuthIdentityProviderSchema, AuthScopeSchema, AUTH_SCOPES, PrincipalSchema, AuthClientSchema, AuthActorSchema, AuthContextSchema, AuthWhoamiResponseSchema, SERVICE_ACCOUNT_READ_ONLY_SCOPES, SERVICE_ACCOUNT_SCOPE_PRESETS, ServiceAccountScopePresetSchema;
15445
+ function normalizePersistedPrincipal(value) {
15446
+ if (typeof value !== "object" || value === null) {
15447
+ return value;
15448
+ }
15449
+ const principal = value;
15450
+ if (principal.kind !== "run" || typeof principal.runId !== "string" || principal.runId.trim().length === 0) {
15451
+ return value;
15452
+ }
15453
+ return { kind: "session", sessionId: principal.runId };
15454
+ }
15455
+ function normalizePersistedAuthClient(value) {
15456
+ if (typeof value !== "object" || value === null) {
15457
+ return value;
15458
+ }
15459
+ const client = value;
15460
+ return client.kind === "run_token" ? { kind: "session_token" } : value;
15461
+ }
15462
+ var AuthRoleSchema, AuthIdentityProviderSchema, AuthScopeSchema, AUTH_SCOPES, PrincipalSchema, AuthClientSchema, AuthActorSchema, PersistedPrincipalSchema, PersistedAuthClientSchema, PersistedAuthActorSchema, AuthContextSchema, AuthWhoamiResponseSchema, SERVICE_ACCOUNT_READ_ONLY_SCOPES, SERVICE_ACCOUNT_SCOPE_PRESETS, ServiceAccountScopePresetSchema;
15446
15463
  var init_auth = __esm({
15447
15464
  "../../packages/schemas/src/auth.ts"() {
15448
15465
  "use strict";
@@ -15529,6 +15546,18 @@ var init_auth = __esm({
15529
15546
  principal: PrincipalSchema,
15530
15547
  client: AuthClientSchema
15531
15548
  });
15549
+ PersistedPrincipalSchema = external_exports.preprocess(
15550
+ normalizePersistedPrincipal,
15551
+ PrincipalSchema
15552
+ );
15553
+ PersistedAuthClientSchema = external_exports.preprocess(
15554
+ normalizePersistedAuthClient,
15555
+ AuthClientSchema
15556
+ );
15557
+ PersistedAuthActorSchema = external_exports.object({
15558
+ principal: PersistedPrincipalSchema,
15559
+ client: PersistedAuthClientSchema
15560
+ });
15532
15561
  AuthContextSchema = external_exports.object({
15533
15562
  actor: AuthActorSchema,
15534
15563
  organizationId: OrganizationIdSchema,
@@ -82927,7 +82956,7 @@ var init_package = __esm({
82927
82956
  "package.json"() {
82928
82957
  package_default = {
82929
82958
  name: "@autohq/cli",
82930
- version: "0.1.552",
82959
+ version: "0.1.553",
82931
82960
  license: "SEE LICENSE IN README.md",
82932
82961
  publishConfig: {
82933
82962
  access: "public"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autohq/cli",
3
- "version": "0.1.552",
3
+ "version": "0.1.553",
4
4
  "license": "SEE LICENSE IN README.md",
5
5
  "publishConfig": {
6
6
  "access": "public"