@gravity-rail/cli 0.4.0 → 0.5.1

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/lib.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { ApiClient } from '@gravity-rail/client';
2
- import { E as EnvironmentConfig, C as CredentialsManager } from './auth-DBspA1Dh.js';
2
+ import { E as EnvironmentConfig, C as CredentialsManager } from './cli-client-context-9KRUt6O-.js';
3
+ export { a as ConciergeAppContextPayload, b as buildCliConciergeAppContext } from './cli-client-context-9KRUt6O-.js';
3
4
  import { GravityRailClient } from '@gravity-rail/sdk';
4
5
 
5
6
  /** Metadata extracted from a paginated API response */
@@ -136,6 +137,7 @@ interface GlobalOptions {
136
137
  allowWrite?: boolean;
137
138
  }
138
139
  interface PublicGlobalOptions {
140
+ env?: string;
139
141
  apiUrl?: string;
140
142
  frontendUrl?: string;
141
143
  outputFormat?: string;
@@ -171,7 +173,7 @@ declare function createAuthenticatedContext(opts: GlobalOptions): Promise<Authen
171
173
  * Throws if called from a handler that did not declare `requiresAuth`.
172
174
  */
173
175
  declare function requireAuth(ctx: AuthenticatedContext | CommandContext): AuthenticatedContext;
174
- /** Create a base command context for the public CLI (no --env flag, defaults to prod) */
176
+ /** Create a base command context for the public CLI (defaults to prod) */
175
177
  declare function createPublicContext(opts: PublicGlobalOptions): CommandContext;
176
178
  /** Create an authenticated context for the public CLI. Tries env var, then cached token. */
177
179
  declare function createPublicAuthenticatedContext(opts: PublicGlobalOptions): Promise<AuthenticatedContext>;
@@ -425,6 +427,26 @@ declare function authBrowserCommand(ctx: AuthenticatedContext, args: Record<stri
425
427
 
426
428
  declare function conciergeCommand(hctx: CommandHandlerContext): Promise<void>;
427
429
 
430
+ /**
431
+ * `gr get-started` / `gr setup` — bootstrap instructions for humans and LLM agents.
432
+ */
433
+
434
+ declare function getStartedCommand(hctx: CommandHandlerContext): Promise<void>;
435
+
436
+ declare function isDirectoryTrusted(dirPath: string, opts?: {
437
+ trustCwdFlag?: boolean;
438
+ }): boolean;
439
+ interface DirectoryTrustOptions {
440
+ cwd?: string;
441
+ /** Explicit grant for CI/headless — trust files in this absolute path. */
442
+ trustDir?: string;
443
+ /** Explicit grant — trust process.cwd(). */
444
+ trustCwd?: boolean;
445
+ nonInteractive?: boolean;
446
+ }
447
+ /** @deprecated Use resolveDirectoryTrust — kept for tests migrating off session-start gates. */
448
+ declare function requireDirectoryTrust(opts: DirectoryTrustOptions): Promise<void>;
449
+
428
450
  declare function devImportLocalCommand(ctx: AuthenticatedContext, workspace: string): Promise<void>;
429
451
 
430
452
  declare function loginCommand(ctx: CommandContext): Promise<void>;
@@ -437,4 +459,4 @@ declare function organizationsListCommand(ctx: AuthenticatedContext): Promise<vo
437
459
 
438
460
  declare function whoamiCommand(ctx: AuthenticatedContext): Promise<void>;
439
461
 
440
- export { type ArgDef, AuthRequiredError, type AuthenticatedContext, CLIError, COL, type CommandContext, type CommandDef, type CommandHandlerContext, CommandRegistry, type ConciergeChat, type ConciergeMessage, type DomainDef, type GlobalOptions, LIST_PAGINATION_ARGS, type OutputFormat, type OutputOptions, PAGINATION_ARGS, type PaginationMeta, type ParsedArgs, type PublicGlobalOptions, type TableColumn, authBrowserCommand, chatCommand, conciergeCommand, createAuthenticatedContext, createConciergeChat, createContext, createPublicAuthenticatedContext, createPublicContext, crudCommands, detectOutputFormat, devImportLocalCommand, extractPaginationMeta, fetchAllCursorPages, fetchAllPages, formatPaginationWarning, getConciergeChat, getConciergeChatMessages, handleError, isCursorPaginatedResponse, isListResult, isPagePaginatedResponse, isPaginatedResponse, listConciergeChats, listResult, loginCommand, logoutCommand, manageCommand, organizationsListCommand, outputData, outputSingle, parseArgs, parsePaginationArgs, readJsonInput, registerPublicDomains, requireAuth, requireNumber, requireString, simpleCrudCommands, stderr, unwrapItems, whoamiCommand };
462
+ export { type ArgDef, AuthRequiredError, type AuthenticatedContext, CLIError, COL, type CommandContext, type CommandDef, type CommandHandlerContext, CommandRegistry, type ConciergeChat, type ConciergeMessage, type DomainDef, type GlobalOptions, LIST_PAGINATION_ARGS, type OutputFormat, type OutputOptions, PAGINATION_ARGS, type PaginationMeta, type ParsedArgs, type PublicGlobalOptions, type TableColumn, authBrowserCommand, chatCommand, conciergeCommand, createAuthenticatedContext, createConciergeChat, createContext, createPublicAuthenticatedContext, createPublicContext, crudCommands, detectOutputFormat, devImportLocalCommand, extractPaginationMeta, fetchAllCursorPages, fetchAllPages, formatPaginationWarning, getConciergeChat, getConciergeChatMessages, getStartedCommand, handleError, isCursorPaginatedResponse, isDirectoryTrusted, isListResult, isPagePaginatedResponse, isPaginatedResponse, listConciergeChats, listResult, loginCommand, logoutCommand, manageCommand, organizationsListCommand, outputData, outputSingle, parseArgs, parsePaginationArgs, readJsonInput, registerPublicDomains, requireAuth, requireDirectoryTrust, requireNumber, requireString, simpleCrudCommands, stderr, unwrapItems, whoamiCommand };