@fluid-app/fluid-cli 0.1.809 → 0.1.810

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/index.d.mts CHANGED
@@ -1,6 +1,4 @@
1
- import { Command, Option } from "commander";
2
-
3
- //#region src/config/types.d.ts
1
+ import { Command } from "commander";
4
2
  /**
5
3
  * Configuration types for the Fluid CLI
6
4
  */
@@ -55,7 +53,8 @@ interface FluidProfile {
55
53
  */
56
54
  readonly gitSyncActor?: {
57
55
  readonly name: string;
58
- readonly publicId: string | null; /** ISO-8601. */
56
+ readonly publicId: string | null;
57
+ /** ISO-8601. */
59
58
  readonly cachedAt: string;
60
59
  };
61
60
  /** Set by Mist on a profile it wrote; the CLI never converts one. */
@@ -69,7 +68,7 @@ type IdentityProfile = FluidProfile & {
69
68
  readonly auth: IdentityProfileAuth;
70
69
  };
71
70
  /** Whether a profile signs in through the identity service. */
72
- declare function isIdentityProfile(profile: FluidProfile | null | undefined): profile is IdentityProfile;
71
+ export declare function isIdentityProfile(profile: FluidProfile | null | undefined): profile is IdentityProfile;
73
72
  interface FluidConfig {
74
73
  activeProfile: string | null;
75
74
  profiles: Record<string, FluidProfile>;
@@ -90,9 +89,7 @@ interface FluidConfig {
90
89
  * know about Mist's local workspace compatibility metadata. */
91
90
  workspaceAliasesByFluidShop?: Record<string, string[]>;
92
91
  }
93
- declare function createDefaultConfig(): FluidConfig;
94
- //#endregion
95
- //#region src/config/paths.d.ts
92
+ export declare function createDefaultConfig(): FluidConfig;
96
93
  /**
97
94
  * XDG-compliant config directory resolution
98
95
  *
@@ -103,25 +100,19 @@ declare function createDefaultConfig(): FluidConfig;
103
100
  * 4. $XDG_CONFIG_HOME/fluid/ on Linux (XDG spec)
104
101
  * 5. ~/.config/fluid/ fallback on Linux
105
102
  */
106
- declare function getConfigDir(): string;
107
- declare function getConfigFilePath(): string;
108
- //#endregion
109
- //#region src/config/config.d.ts
103
+ export declare function getConfigDir(): string;
104
+ export declare function getConfigFilePath(): string;
110
105
  /** Under strict config (see {@link isStrictConfig}) stored profiles are dropped; `updateConfig` still sees the stored file. */
111
- declare function readConfig(): FluidConfig;
112
- declare function writeConfig(config: FluidConfig): void;
113
- declare function updateConfig(updater: (config: FluidConfig) => FluidConfig): FluidConfig;
114
- //#endregion
115
- //#region src/config/strict.d.ts
106
+ export declare function readConfig(): FluidConfig;
107
+ export declare function writeConfig(config: FluidConfig): void;
108
+ export declare function updateConfig(updater: (config: FluidConfig) => FluidConfig): FluidConfig;
116
109
  /**
117
110
  * Whether this process runs under a host that supplies the base URL and
118
111
  * credential through the environment alone. The host sets
119
112
  * FLUID_RUNTIME_STRICT_CONFIG=1 on its CLI children; setting it only removes
120
113
  * the CLI's config-file authentication, it never adds any.
121
114
  */
122
- declare function isStrictConfig(): boolean;
123
- //#endregion
124
- //#region src/config/project-config.d.ts
115
+ export declare function isStrictConfig(): boolean;
125
116
  /**
126
117
  * Project-level config (.fluidrc) reader.
127
118
  *
@@ -145,9 +136,7 @@ interface ProjectRcConfig {
145
136
  * The result is cached per starting directory for the lifetime of the
146
137
  * process — CLI commands are short-lived so stale-cache is not a concern.
147
138
  */
148
- declare function findProjectConfig(startDir: string): ProjectRcConfig | null;
149
- //#endregion
150
- //#region src/utils/errors.d.ts
139
+ export declare function findProjectConfig(startDir: string): ProjectRcConfig | null;
151
140
  /**
152
141
  * Base error interface for CLI domain errors.
153
142
  * All domain-specific error types should extend this.
@@ -157,8 +146,6 @@ interface CliError {
157
146
  readonly message: string;
158
147
  readonly details?: string;
159
148
  }
160
- //#endregion
161
- //#region src/utils/result.d.ts
162
149
  /**
163
150
  * Result type utilities for type-safe error handling
164
151
  *
@@ -174,22 +161,20 @@ interface Failure<E> {
174
161
  readonly error: E;
175
162
  }
176
163
  type Result<T, E = Error> = Success<T> | Failure<E>;
177
- declare function success<T>(value: T): Success<T>;
178
- declare function failure<E>(error: E): Failure<E>;
179
- declare function isSuccess<T, E>(result: Result<T, E>): result is Success<T>;
180
- declare function isFailure<T, E>(result: Result<T, E>): result is Failure<E>;
181
- declare function tryCatch<T>(fn: () => T): Result<T, Error>;
182
- declare function tryCatchAsync<T>(fn: () => Promise<T>): Promise<Result<T, Error>>;
183
- declare function unwrap<T, E>(result: Result<T, E>): T;
184
- declare function unwrapOr<T, E>(result: Result<T, E>, defaultValue: T): T;
185
- declare function mapResult<T, U, E>(result: Result<T, E>, fn: (value: T) => U): Result<U, E>;
186
- declare function mapError<T, E, F>(result: Result<T, E>, fn: (error: E) => F): Result<T, F>;
187
- declare function isError(value: unknown): value is Error;
188
- declare function isNodeError(value: unknown): value is NodeJS.ErrnoException;
189
- declare function getErrorMessage(error: unknown): string;
190
- //#endregion
191
- //#region src/auth/fluid-api.d.ts
192
- declare function getFluidApiBase(): string;
164
+ export declare function success<T>(value: T): Success<T>;
165
+ export declare function failure<E>(error: E): Failure<E>;
166
+ export declare function isSuccess<T, E>(result: Result<T, E>): result is Success<T>;
167
+ export declare function isFailure<T, E>(result: Result<T, E>): result is Failure<E>;
168
+ export declare function tryCatch<T>(fn: () => T): Result<T, Error>;
169
+ export declare function tryCatchAsync<T>(fn: () => Promise<T>): Promise<Result<T, Error>>;
170
+ export declare function unwrap<T, E>(result: Result<T, E>): T;
171
+ export declare function unwrapOr<T, E>(result: Result<T, E>, defaultValue: T): T;
172
+ export declare function mapResult<T, U, E>(result: Result<T, E>, fn: (value: T) => U): Result<U, E>;
173
+ export declare function mapError<T, E, F>(result: Result<T, E>, fn: (error: E) => F): Result<T, F>;
174
+ export declare function isError(value: unknown): value is Error;
175
+ export declare function isNodeError(value: unknown): value is NodeJS.ErrnoException;
176
+ export declare function getErrorMessage(error: unknown): string;
177
+ export declare function getFluidApiBase(): string;
193
178
  interface FluidApiError extends CliError {
194
179
  readonly code: string;
195
180
  readonly message: string;
@@ -245,7 +230,7 @@ interface ConfirmMfaResponse {
245
230
  * Validate a token against the Fluid API and return company info.
246
231
  * `baseUrl` is the API the token belongs to; it defaults to the CLI's.
247
232
  */
248
- declare function validateToken(token: string, options?: {
233
+ export declare function validateToken(token: string, options?: {
249
234
  readonly baseUrl?: string;
250
235
  }): Promise<Result<CompanyInfo, FluidApiError>>;
251
236
  /**
@@ -257,7 +242,7 @@ declare function validateToken(token: string, options?: {
257
242
  * that company, so redeeming it signs in to that company alone and, for an
258
243
  * admin's emailed code, confirms a new signup.
259
244
  */
260
- declare function sendMfa(email: string, options?: {
245
+ export declare function sendMfa(email: string, options?: {
261
246
  readonly fluidShop?: string;
262
247
  readonly identityHint?: boolean;
263
248
  }): Promise<Result<MfaResponse, FluidApiError>>;
@@ -267,21 +252,21 @@ declare function sendMfa(email: string, options?: {
267
252
  * `baseUrl` is the API the code was sent from; a sign-in finished in a
268
253
  * later process passes the one it saved, not the current environment's.
269
254
  */
270
- declare function confirmMfa(uuid: string, code: string, options?: {
255
+ export declare function confirmMfa(uuid: string, code: string, options?: {
271
256
  readonly fluidShop?: string;
272
257
  readonly baseUrl?: string;
273
258
  }): Promise<Result<ConfirmMfaResponse, FluidApiError>>;
274
259
  /**
275
260
  * Fetch all companies the authenticated user has access to.
276
261
  */
277
- declare function fetchUserCompanies(token: string, baseUrl?: string): Promise<Result<UserCompany[], FluidApiError>>;
262
+ export declare function fetchUserCompanies(token: string, baseUrl?: string): Promise<Result<UserCompany[], FluidApiError>>;
278
263
  /**
279
264
  * Switch to a different company and receive a new JWT.
280
265
  *
281
266
  * Response shape (from @fluid-app/auth SwitchCompanyResponse):
282
267
  * { company: { id, name, fluid_shop, jwt }, meta: { request_id, timestamp } }
283
268
  */
284
- declare function switchCompany(token: string, companyId: number, baseUrl?: string, adoptChallenge?: string): Promise<Result<SwitchCompanyResult | SwitchAdoptAnswer, FluidApiError>>;
269
+ export declare function switchCompany(token: string, companyId: number, baseUrl?: string, adoptChallenge?: string): Promise<Result<SwitchCompanyResult | SwitchAdoptAnswer, FluidApiError>>;
285
270
  interface SignupRequest {
286
271
  readonly firstName: string;
287
272
  readonly lastName: string;
@@ -332,7 +317,7 @@ interface SignupError extends CliError {
332
317
  /** Seconds until the rate-limit window resets, on a 429. */
333
318
  readonly retryAfter?: number;
334
319
  }
335
- declare const SIGNUP_ERROR: {
320
+ export declare const SIGNUP_ERROR: {
336
321
  readonly SUBDOMAIN_TAKEN: {
337
322
  readonly code: "SUBDOMAIN_TAKEN";
338
323
  readonly message: "That subdomain belongs to another company. Pick another, unless an earlier signup of yours sent it: then the company exists, so sign in instead.";
@@ -365,9 +350,7 @@ declare const SIGNUP_ERROR: {
365
350
  * company, and every attempt, failed or not, counts toward the per-IP and
366
351
  * per-email signup limits.
367
352
  */
368
- declare function signup(request: SignupRequest): Promise<Result<SignupResponse, SignupError>>;
369
- //#endregion
370
- //#region src/auth/token.d.ts
353
+ export declare function signup(request: SignupRequest): Promise<Result<SignupResponse, SignupError>>;
371
354
  /** A role a company access token can be narrowed to. */
372
355
  type AuthRole = "root_admin" | "admin" | "rep";
373
356
  /**
@@ -403,7 +386,7 @@ type CredentialSource = {
403
386
  * replaced with an identity profile of the same company, resolves to that
404
387
  * identity profile for the rest of the process, by name or by default.
405
388
  */
406
- declare function resolveCredentialSource(profileName?: string): CredentialSource | null;
389
+ export declare function resolveCredentialSource(profileName?: string): CredentialSource | null;
407
390
  /**
408
391
  * Get the auth token for a named profile, or the active profile when omitted,
409
392
  * in the order {@link resolveCredentialSource} describes.
@@ -414,13 +397,13 @@ declare function resolveCredentialSource(profileName?: string): CredentialSource
414
397
  * session ends, this returns null. Prefer {@link getAuthTokenAsync}, which
415
398
  * restores and refreshes the session itself.
416
399
  */
417
- declare function getAuthToken(profileName?: string): string | null;
400
+ export declare function getAuthToken(profileName?: string): string | null;
418
401
  /**
419
402
  * Like {@link getAuthToken}, but restores, refreshes, or exchanges an
420
403
  * identity-mode profile's session as needed. Resolves with null when there
421
404
  * is no credential; rejects when an identity session has ended.
422
405
  */
423
- declare function getAuthTokenAsync(profileName?: string): Promise<string | null>;
406
+ export declare function getAuthTokenAsync(profileName?: string): Promise<string | null>;
424
407
  /**
425
408
  * Like {@link getAuthTokenAsync}, for a token that acts only as `roles`. An
426
409
  * admin who is also a rep holds an `admin` token by default, which an API that
@@ -428,24 +411,19 @@ declare function getAuthTokenAsync(profileName?: string): Promise<string | null>
428
411
  * `roles` in the company (RFC 8693), and holds that token apart from the
429
412
  * default one, which every other reader keeps getting.
430
413
  *
431
- * Only an identity-mode profile can be narrowed. A literal token
432
- * (`FLUID_TOKEN`) and a legacy profile come back exactly as
433
- * {@link getAuthTokenAsync} returns them, because their token already is what
434
- * it is. Resolves with null when there is no credential. Rejects with an
414
+ * Resolves with null when there is no credential. Rejects with an
435
415
  * error {@link isRoleNotGrantedError} recognises when the person does not
436
416
  * hold `roles` in the company, and when an identity session has ended.
437
417
  */
438
- declare function getRoleAuthTokenAsync(roles: readonly AuthRole[], profileName?: string): Promise<string | null>;
418
+ export declare function getRoleAuthTokenAsync(roles: readonly AuthRole[], profileName?: string): Promise<string | null>;
439
419
  /**
440
420
  * Get the active profile, or null if not logged in
441
421
  */
442
- declare function getActiveProfile(): FluidProfile | null;
422
+ export declare function getActiveProfile(): FluidProfile | null;
443
423
  /**
444
424
  * List all stored profile names
445
425
  */
446
- declare function listProfileNames(): string[];
447
- //#endregion
448
- //#region ../../platform/auth/src/session/types.d.ts
426
+ export declare function listProfileNames(): string[];
449
427
  /**
450
428
  * Session API types.
451
429
  *
@@ -456,8 +434,6 @@ declare function listProfileNames(): string[];
456
434
  */
457
435
  /** A role the identity service can grant on a principal token. */
458
436
  type SessionRole = "admin" | "rep" | "customer" | "root_admin";
459
- //#endregion
460
- //#region ../../platform/api-client-core/src/fetch-client.d.ts
461
437
  interface RequestOptions {
462
438
  method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH";
463
439
  headers?: Record<string, string>;
@@ -486,8 +462,6 @@ interface FetchClientInstance {
486
462
  delete: <TResponse = unknown>(endpoint: string, options?: Omit<RequestOptions, "method">) => Promise<TResponse>;
487
463
  }
488
464
  type FetchClient = FetchClientInstance;
489
- //#endregion
490
- //#region src/auth/identity/session.d.ts
491
465
  /**
492
466
  * The identity service would not narrow a session to roles the person does not
493
467
  * hold in the company, for example `rep` for an admin with no rep standing.
@@ -501,18 +475,22 @@ declare class RoleNotGrantedError extends Error {
501
475
  /** The company's name, when the caller knows it. */
502
476
  readonly companyName?: string | undefined;
503
477
  readonly code = "role_not_granted";
504
- constructor(roles: readonly SessionRole[], /** The company's id. */
505
-
506
- org: string, /** The company's name, when the caller knows it. */
507
-
478
+ constructor(roles: readonly SessionRole[],
479
+ /** The company's id. */
480
+ org: string,
481
+ /** The company's name, when the caller knows it. */
508
482
  companyName?: string | undefined);
509
483
  }
510
484
  /** Whether an error is a {@link RoleNotGrantedError}, from any copy of it. */
511
- declare function isRoleNotGrantedError(error: unknown): error is RoleNotGrantedError;
485
+ export declare function isRoleNotGrantedError(error: unknown): error is RoleNotGrantedError;
486
+ /**
487
+ * Whether this process already showed the person this exact identity-session
488
+ * failure message. Held on `globalThis` because a plugin may load its own copy
489
+ * of this package.
490
+ */
491
+ export declare function identityFailureReported(message: string): boolean;
512
492
  /** A sentence for the user about an identity failure. */
513
- declare function describeIdentityError(error: unknown): string;
514
- //#endregion
515
- //#region src/dam/upload.d.ts
493
+ export declare function describeIdentityError(error: unknown): string;
516
494
  /**
517
495
  * One upload to the Fluid DAM through the `upload.fluid.app/upload` service,
518
496
  * which does the three underlying calls (imagekit_auth, the ImageKit upload
@@ -529,7 +507,7 @@ declare function describeIdentityError(error: unknown): string;
529
507
  * is reached through the FLUID_UPLOAD_BASE env var, read from the process
530
508
  * environment, never from an argument a user types.
531
509
  */
532
- declare function damUploadBase(): string;
510
+ export declare function damUploadBase(): string;
533
511
  /** What one DAM upload sends. Give `file` or `url`, not both. */
534
512
  interface DamUploadRequest {
535
513
  /** The Fluid API token sent as the bearer. */
@@ -558,7 +536,7 @@ interface DamUploadRequest {
558
536
  fetch?: typeof fetch;
559
537
  }
560
538
  /** A refused or failed upload, with the service's HTTP status and its body's start. */
561
- declare class DamUploadError extends Error {
539
+ export declare class DamUploadError extends Error {
562
540
  readonly status: number;
563
541
  readonly detail: string;
564
542
  constructor(message: string, status: number, detail: string);
@@ -575,13 +553,11 @@ declare class DamUploadError extends Error {
575
553
  *
576
554
  * Throws DamUploadError when the service answers anything but 2xx.
577
555
  */
578
- declare function uploadToDam(request: DamUploadRequest): Promise<unknown>;
556
+ export declare function uploadToDam(request: DamUploadRequest): Promise<unknown>;
579
557
  /** The CDN address in an upload's answer, or null when it has none. */
580
- declare function damAssetUrlOf(answer: unknown): string | null;
558
+ export declare function damAssetUrlOf(answer: unknown): string | null;
581
559
  /** The DAM asset code in an upload's answer, or null when it has none. */
582
- declare function damAssetCodeOf(answer: unknown): string | null;
583
- //#endregion
584
- //#region src/inputs/types.d.ts
560
+ export declare function damAssetCodeOf(answer: unknown): string | null;
585
561
  type InputSpec = {
586
562
  kind: "file";
587
563
  path: string;
@@ -639,8 +615,6 @@ interface TreeEntry {
639
615
  }>;
640
616
  }
641
617
  type InputEntry = FileEntry | RefEntry | TreeEntry;
642
- //#endregion
643
- //#region src/plugins/types.d.ts
644
618
  interface PluginContext {
645
619
  /** Commander program instance — plugins add subcommands here */
646
620
  readonly program: Command;
@@ -656,8 +630,6 @@ interface FluidPlugin {
656
630
  readonly version: string;
657
631
  register(ctx: PluginContext): void | Promise<void>;
658
632
  }
659
- //#endregion
660
- //#region src/domain/types.d.ts
661
633
  interface OutputOptions {
662
634
  format: "json" | "table";
663
635
  compact: boolean;
@@ -673,13 +645,9 @@ interface CommandContext {
673
645
  inputs: CommandInputs;
674
646
  verbose: boolean;
675
647
  }
676
- //#endregion
677
- //#region src/domain/command.d.ts
678
648
  type RegisterFn = (parent: Command, ctx: CommandContext) => void;
679
- declare function createDomainCommand(name: string, description: string, register: RegisterFn): Command;
680
- //#endregion
681
- //#region src/domain/context.d.ts
682
- declare function createCommandContext(opts: {
649
+ export declare function createDomainCommand(name: string, description: string, register: RegisterFn): Command;
650
+ export declare function createCommandContext(opts: {
683
651
  token?: string;
684
652
  baseUrl?: string;
685
653
  profile?: string;
@@ -688,11 +656,7 @@ declare function createCommandContext(opts: {
688
656
  jq?: string;
689
657
  verbose: boolean;
690
658
  }): CommandContext;
691
- //#endregion
692
- //#region src/domain/output.d.ts
693
- declare function formatOutput(data: unknown, options: OutputOptions): string;
694
- //#endregion
695
- //#region src/inputs/declare.d.ts
659
+ export declare function formatOutput(data: unknown, options: OutputOptions): string;
696
660
  /**
697
661
  * Declares the local inputs a command's action reads.
698
662
  *
@@ -702,34 +666,30 @@ declare function formatOutput(data: unknown, options: OutputOptions): string;
702
666
  *
703
667
  * Returns the command.
704
668
  */
705
- declare function declareInputs(command: Command, resolver: InputResolver): Command;
706
- //#endregion
707
- //#region src/inputs/hook.d.ts
708
- declare const INPUTS_MODE_ENV = "FLUID_INPUTS_MODE";
709
- declare const INPUTS_EXPECT_ENV = "FLUID_INPUTS_EXPECT";
710
- declare const INPUTS_UNDECLARED_CODE = "inputs_undeclared";
711
- declare const INPUTS_UNDECLARED_EXIT = 64;
712
- declare const INPUTS_MISMATCH_CODE = "inputs_mismatch";
713
- declare const INPUTS_MISMATCH_EXIT = 65;
669
+ export declare function declareInputs(command: Command, resolver: InputResolver): Command;
670
+ export declare const INPUTS_MODE_ENV = "FLUID_INPUTS_MODE";
671
+ export declare const INPUTS_EXPECT_ENV = "FLUID_INPUTS_EXPECT";
672
+ export declare const INPUTS_UNDECLARED_CODE = "inputs_undeclared";
673
+ export declare const INPUTS_UNDECLARED_EXIT = 64;
674
+ export declare const INPUTS_MISMATCH_CODE = "inputs_mismatch";
675
+ export declare const INPUTS_MISMATCH_EXIT = 65;
714
676
  interface InputsHookIo {
715
677
  env: NodeJS.ProcessEnv;
716
678
  stdout: (text: string) => void;
717
679
  stderr: (text: string) => void;
718
680
  exit: (code: number) => never;
719
681
  }
720
- declare function inputsModeActive(env: NodeJS.ProcessEnv): boolean;
682
+ export declare function inputsModeActive(env: NodeJS.ProcessEnv): boolean;
721
683
  /**
722
684
  * Registers the inputs preAction hook. Register it before any credential
723
685
  * hook.
724
686
  */
725
- declare function registerInputsHook(program: Command, io?: InputsHookIo): void;
687
+ export declare function registerInputsHook(program: Command, io?: InputsHookIo): void;
726
688
  /**
727
689
  * Maps an undeclared read in expect mode to the fixed undeclared exit; any
728
690
  * other error is returned to the caller untouched.
729
691
  */
730
- declare function exitOnInputsError(error: unknown, io?: InputsHookIo): void;
731
- //#endregion
732
- //#region src/inputs/testing.d.ts
692
+ export declare function exitOnInputsError(error: unknown, io?: InputsHookIo): void;
733
693
  interface UndeclaredReadGuard {
734
694
  violations: string[];
735
695
  restore(): void;
@@ -743,11 +703,9 @@ interface UndeclaredReadGuard {
743
703
  *
744
704
  * Returns the recorded violations and a restore function.
745
705
  */
746
- declare function guardUndeclaredReads(options?: {
706
+ export declare function guardUndeclaredReads(options?: {
747
707
  allow?: (path: string) => boolean;
748
708
  }): UndeclaredReadGuard;
749
- //#endregion
750
- //#region src/inputs/snapshot.d.ts
751
709
  interface Snapshot {
752
710
  files: Map<string, Buffer>;
753
711
  aliases: Map<string, string>;
@@ -755,25 +713,19 @@ interface Snapshot {
755
713
  treeAliases: Map<string, string>;
756
714
  refs: Map<string, string>;
757
715
  }
758
- //#endregion
759
- //#region src/inputs/reader.d.ts
760
- declare function setActiveSnapshot(snapshot: Snapshot | null): void;
716
+ export declare function setActiveSnapshot(snapshot: Snapshot | null): void;
761
717
  /**
762
718
  * The reader behind ctx.inputs. Outside expect mode it reads from disk; once
763
719
  * an expect-mode snapshot is active it serves only that snapshot and throws
764
720
  * for anything undeclared.
765
721
  */
766
- declare function createInputsReader(): CommandInputs;
767
- //#endregion
768
- //#region src/inputs/scope.d.ts
769
- declare function withInternalReads<T>(fn: () => T): T;
722
+ export declare function createInputsReader(): CommandInputs;
723
+ export declare function withInternalReads<T>(fn: () => T): T;
770
724
  /**
771
725
  * Async form of withInternalReads. The scope follows fn's own async
772
726
  * continuations only; unrelated concurrent work stays guarded.
773
727
  */
774
- declare function withInternalReadsAsync<T>(fn: () => Promise<T>): Promise<T>;
775
- //#endregion
776
- //#region src/walk/prompter.d.ts
728
+ export declare function withInternalReadsAsync<T>(fn: () => Promise<T>): Promise<T>;
777
729
  type Nav = "back" | "skip" | "menu" | "quit";
778
730
  /** An answer, or a request to move: back a question, skip it, open the
779
731
  * menu, or stop (Ctrl-C / Esc). */
@@ -811,16 +763,14 @@ interface Prompter {
811
763
  menu<T extends string>(message: string, items: ReadonlyArray<MenuItem<T>>): Promise<T | null>;
812
764
  note(text: string): void;
813
765
  }
814
- declare const NAV_HELP = "Type < to go back, > to skip, ? for the menu. Every answer is saved as you go; Ctrl-C stops.";
766
+ export declare const NAV_HELP = "Type < to go back, > to skip, ? for the menu. Every answer is saved as you go; Ctrl-C stops.";
815
767
  /** A typed `<`, `>` or `?` moves instead of answering. */
816
- declare function parseTyped(raw: string): Reply;
768
+ export declare function parseTyped(raw: string): Reply;
817
769
  /** A prompter on the terminal, built on `prompts`. */
818
- declare function terminalPrompter(): Prompter;
770
+ export declare function terminalPrompter(): Prompter;
819
771
  /** A walk needs a person at a terminal; scripts and agents use the
820
772
  * non-interactive commands it names. */
821
- declare function assertInteractive(alternative: string, isTTY?: boolean): void;
822
- //#endregion
823
- //#region src/git-sync/commit-subject.d.ts
773
+ export declare function assertInteractive(alternative: string, isTTY?: boolean): void;
824
774
  /**
825
775
  * The canonical GitSync commit-subject format, shared by every kind of
826
776
  * Fluid-managed repository — Mist apps, Themes, Portals and Widgets.
@@ -859,7 +809,7 @@ interface GitSyncActor {
859
809
  readonly publicId: string | null;
860
810
  }
861
811
  /** Actor name used when no human triggered the commit. */
862
- declare const SYSTEM_ACTOR_NAME = "Fluid";
812
+ export declare const SYSTEM_ACTOR_NAME = "Fluid";
863
813
  /**
864
814
  * A subject broken back into its parts. `publicId` is null for
865
815
  * system-authored commits and for actors whose public id was unknown at
@@ -873,7 +823,7 @@ interface ParsedGitSyncSubject {
873
823
  readonly publicId: string | null;
874
824
  }
875
825
  /** `2026-08-06T12:00:00.000Z` → `2026-08-06 12:00:00`. */
876
- declare function formatCommitTimestamp(when: Date): string;
826
+ export declare function formatCommitTimestamp(when: Date): string;
877
827
  /**
878
828
  * Neutralize the two sequences the grammar splits on, so no value can
879
829
  * shift the actor / action / uuid boundaries:
@@ -890,7 +840,7 @@ declare function formatCommitTimestamp(when: Date): string;
890
840
  * don't have to remember. It's idempotent, so calling it yourself on an
891
841
  * interpolated resource name (as the CLIs do) costs nothing.
892
842
  */
893
- declare function subjectFragment(value: string): string;
843
+ export declare function subjectFragment(value: string): string;
894
844
  /**
895
845
  * Build a canonical commit subject.
896
846
  *
@@ -901,42 +851,47 @@ declare function subjectFragment(value: string): string;
901
851
  * @param when - Injectable clock, so callers and tests get a stable
902
852
  * stamp.
903
853
  */
904
- declare function gitSyncCommitSubject(action: string, actor: GitSyncActor | null, when?: Date): string;
854
+ export declare function gitSyncCommitSubject(action: string, actor: GitSyncActor | null, when?: Date): string;
905
855
  /**
906
856
  * Split a canonical subject back into its parts, or null when the
907
857
  * subject predates the format (legacy CLI wording such as `push @ <iso>`
908
858
  * or a hand-written commit). Callers fall back to rendering the raw
909
859
  * subject.
910
860
  */
911
- declare function parseGitSyncSubject(subject: string | null | undefined): ParsedGitSyncSubject | null;
861
+ export declare function parseGitSyncSubject(subject: string | null | undefined): ParsedGitSyncSubject | null;
912
862
  /**
913
863
  * The person a canonical subject is attributed to, or null when the
914
864
  * subject isn't canonical or was system-authored. Use this for "who
915
865
  * shipped this" UI — a `Fluid:` commit has no human to name.
916
866
  */
917
- declare function gitSyncSubjectAuthor(subject: string | null | undefined): string | null;
918
- /** The `/api/me` fields the actor is derived from. */
867
+ export declare function gitSyncSubjectAuthor(subject: string | null | undefined): string | null;
868
+ /** The `/api/me` or `/api/v2026-10/me` fields the actor is derived from. */
919
869
  interface MeUser {
920
870
  readonly id?: unknown;
871
+ readonly legacy_id?: unknown;
921
872
  readonly public_id?: unknown;
873
+ readonly name?: unknown;
922
874
  readonly full_name?: unknown;
923
875
  readonly first_name?: unknown;
924
876
  readonly last_name?: unknown;
925
877
  readonly email?: unknown;
878
+ readonly profile?: MeUser;
879
+ readonly membership?: {
880
+ readonly id?: unknown;
881
+ };
926
882
  }
927
- /** Some `/api/me` deployments nest the user, others return it flat. */
883
+ /** Supports the `/api/v2026-10/me` `{ data }` envelope and legacy flat/nested `/api/me` shapes. */
928
884
  interface MeResponse extends MeUser {
885
+ readonly data?: MeUser;
929
886
  readonly user?: MeUser;
930
887
  }
931
888
  /**
932
- * Resolve an `/api/me` body to a commit actor, with the name fallback
933
- * chain `full_name → first+last → email → user-<id>`. Returns null when
934
- * the body carries no usable identity at all, which callers treat the
935
- * same as an unreachable `/api/me`: a system-authored commit.
889
+ * Resolve a `/api/v2026-10/me` or `/api/me` body to a commit actor, with the
890
+ * name fallback chain `full_name/name → first+last → email → user-<id>`.
891
+ * Returns null when the body carries no usable identity at all, which callers
892
+ * treat the same as an unreachable `/me`: a system-authored commit.
936
893
  */
937
- declare function gitSyncActorFromMe(raw: MeResponse): GitSyncActor | null;
938
- //#endregion
939
- //#region src/git-sync/change-summary.d.ts
894
+ export declare function gitSyncActorFromMe(raw: MeResponse): GitSyncActor | null;
940
895
  /**
941
896
  * Turn a set of changed paths into the `<Action>` half of a canonical
942
897
  * GitSync commit subject (see commit-subject.ts).
@@ -991,7 +946,7 @@ interface ChangeEntry {
991
946
  * Unknown letters (`U` unmerged, `T` typechange) count as modified —
992
947
  * the file did change, and mislabeling the verb is better than
993
948
  * dropping it from the count. */
994
- declare function changeStatusFromCode(code: string): ChangeStatus;
949
+ export declare function changeStatusFromCode(code: string): ChangeStatus;
995
950
  /**
996
951
  * Parse `git diff --cached --name-status -z` output.
997
952
  *
@@ -1002,7 +957,7 @@ declare function changeStatusFromCode(code: string): ChangeStatus;
1002
957
  * `status\0path\0` — except renames and copies, which are
1003
958
  * `status\0from\0to\0` and consume an extra field.
1004
959
  */
1005
- declare function parseNameStatusZ(stdout: string): ChangeEntry[];
960
+ export declare function parseNameStatusZ(stdout: string): ChangeEntry[];
1006
961
  /**
1007
962
  * Build the action phrase for a set of changes, or null when there is
1008
963
  * nothing to describe — the caller then falls back to its own constant
@@ -1014,15 +969,13 @@ declare function parseNameStatusZ(stdout: string): ChangeEntry[];
1014
969
  * readable. The subject also carries a name, timestamp and UUID, so
1015
970
  * the action gets a modest budget.
1016
971
  */
1017
- declare function summarizeChanges(entries: readonly ChangeEntry[], maxLength?: number): string | null;
1018
- //#endregion
1019
- //#region src/git-sync/actor-cache.d.ts
972
+ export declare function summarizeChanges(entries: readonly ChangeEntry[], maxLength?: number): string | null;
1020
973
  /**
1021
974
  * How long a cached identity is trusted. Long, because a display name
1022
975
  * changing is rare — but not forever, so a rename does eventually reach
1023
976
  * the commit log without the user having to re-login.
1024
977
  */
1025
- declare const ACTOR_CACHE_TTL_MS: number;
978
+ export declare const ACTOR_CACHE_TTL_MS: number;
1026
979
  /** Cached identity as persisted on a profile. */
1027
980
  interface CachedGitSyncActor {
1028
981
  readonly name: string;
@@ -1031,9 +984,9 @@ interface CachedGitSyncActor {
1031
984
  readonly cachedAt: string;
1032
985
  }
1033
986
  /** The cached identity for the active profile, or null. */
1034
- declare function readCachedActor(now?: number): GitSyncActor | null;
987
+ export declare function readCachedActor(now?: number): GitSyncActor | null;
1035
988
  /** Persist an identity against the active profile. Best-effort. */
1036
- declare function writeCachedActor(actor: GitSyncActor, now?: Date): void;
989
+ export declare function writeCachedActor(actor: GitSyncActor, now?: Date): void;
1037
990
  /**
1038
991
  * The commit identity, from cache when possible.
1039
992
  *
@@ -1044,9 +997,7 @@ declare function writeCachedActor(actor: GitSyncActor, now?: Date): void;
1044
997
  * Returns null when there's no cache and the lookup fails or yields no
1045
998
  * usable identity; callers then write a `Fluid:` system commit.
1046
999
  */
1047
- declare function resolveGitSyncActor(fetchActor: () => Promise<GitSyncActor | null>): Promise<GitSyncActor | null>;
1048
- //#endregion
1049
- //#region src/catalog/annotations.d.ts
1000
+ export declare function resolveGitSyncActor(fetchActor: () => Promise<GitSyncActor | null>): Promise<GitSyncActor | null>;
1050
1001
  interface CommandEndpoint {
1051
1002
  readonly method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
1052
1003
  /** Path as the API documents it, e.g. `/api/domains/{id}`. */
@@ -1062,9 +1013,7 @@ interface CommandAnnotation {
1062
1013
  * Record the endpoints a command calls and whether it writes, so
1063
1014
  * `fluid commands --json` can list them. Returns the command for chaining.
1064
1015
  */
1065
- declare function describeCommand<T extends Command>(command: T, annotation: CommandAnnotation): T;
1066
- //#endregion
1067
- //#region src/catalog/walk.d.ts
1016
+ export declare function describeCommand<T extends Command>(command: T, annotation: CommandAnnotation): T;
1068
1017
  interface CatalogOption {
1069
1018
  readonly flags: string;
1070
1019
  readonly long: string | null;
@@ -1102,7 +1051,6 @@ interface CatalogEntry {
1102
1051
  /** The endpoints the plugin declared; null when it declared none, which means unknown, not none. */
1103
1052
  readonly endpoints: readonly CommandEndpoint[] | null;
1104
1053
  }
1105
- declare function walkCommands(root: Command): CatalogEntry[];
1106
- //#endregion
1107
- export { ACTOR_CACHE_TTL_MS, type AuthRole, type CachedGitSyncActor, type CatalogArgument, type CatalogEntry, type CatalogOption, type ChangeEntry, type ChangeStatus, type Choice, type CliError, type CommandAnnotation, type CommandContext, type CommandEndpoint, type CommandInputs, type CommitMessage, type CompanyChoice, type CompanyInfo, type ConfirmMfaResponse, DamUploadError, type DamUploadRequest, type Failure, type FetchClient, type FluidApiError, type FluidConfig, type FluidPlugin, type FluidProfile, type GitSyncActor, INPUTS_EXPECT_ENV, INPUTS_MISMATCH_CODE, INPUTS_MISMATCH_EXIT, INPUTS_MODE_ENV, INPUTS_UNDECLARED_CODE, INPUTS_UNDECLARED_EXIT, type IdentityProfile, type IdentityProfileAuth, type InputEntry, type InputResolver, type InputSpec, type InputTree, type MenuItem, type MfaResponse, NAV_HELP, type Nav, type OutputOptions, type ParsedGitSyncSubject, type PluginContext, type ProjectRcConfig, type Prompter, type Question, type Reply, type Result, type RoleNotGrantedError, SIGNUP_ERROR, SYSTEM_ACTOR_NAME, type SignupError, type SignupRequest, type SignupResponse, type Success, type SwitchCompanyResult, type UserCompany, assertInteractive, changeStatusFromCode, confirmMfa, createCommandContext, createDefaultConfig, createDomainCommand, createInputsReader, damAssetCodeOf, damAssetUrlOf, damUploadBase, declareInputs, describeCommand, describeIdentityError, exitOnInputsError, failure, fetchUserCompanies, findProjectConfig, formatCommitTimestamp, formatOutput, getActiveProfile, getAuthToken, getAuthTokenAsync, getConfigDir, getConfigFilePath, getErrorMessage, getFluidApiBase, getRoleAuthTokenAsync, gitSyncActorFromMe, gitSyncCommitSubject, gitSyncSubjectAuthor, guardUndeclaredReads, inputsModeActive, isError, isFailure, isIdentityProfile, isNodeError, isRoleNotGrantedError, isStrictConfig, isSuccess, listProfileNames, mapError, mapResult, parseGitSyncSubject, parseNameStatusZ, parseTyped, readCachedActor, readConfig, registerInputsHook, resolveCredentialSource, resolveGitSyncActor, sendMfa, setActiveSnapshot, signup, subjectFragment, success, summarizeChanges, switchCompany, terminalPrompter, tryCatch, tryCatchAsync, unwrap, unwrapOr, updateConfig, uploadToDam, validateToken, walkCommands, withInternalReads, withInternalReadsAsync, writeCachedActor, writeConfig };
1054
+ export declare function walkCommands(root: Command): CatalogEntry[];
1055
+ export type { AuthRole, CachedGitSyncActor, CatalogArgument, CatalogEntry, CatalogOption, ChangeEntry, ChangeStatus, Choice, CliError, CommandAnnotation, CommandContext, CommandEndpoint, CommandInputs, CommitMessage, CompanyChoice, CompanyInfo, ConfirmMfaResponse, DamUploadRequest, Failure, FetchClient, FluidApiError, FluidConfig, FluidPlugin, FluidProfile, GitSyncActor, IdentityProfile, IdentityProfileAuth, InputEntry, InputResolver, InputSpec, InputTree, MenuItem, MfaResponse, Nav, OutputOptions, ParsedGitSyncSubject, PluginContext, ProjectRcConfig, Prompter, Question, Reply, Result, RoleNotGrantedError, SignupError, SignupRequest, SignupResponse, Success, SwitchCompanyResult, UserCompany };
1108
1056
  //# sourceMappingURL=index.d.mts.map