envpkt 0.7.3 → 0.8.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/index.d.ts CHANGED
@@ -430,7 +430,7 @@ declare const generateTomlFromScan: (matches: ReadonlyArray<MatchResult>) => str
430
430
  //#region src/core/boot.d.ts
431
431
  /** Programmatic boot — returns Either<BootError, BootResult> */
432
432
  declare const bootSafe: (options?: BootOptions) => Either<BootError, BootResult>;
433
- /** Programmatic boot — throws EnvpktBootError on failure */
433
+ /** Programmatic boot — throws EnvpktBootError on failure (intentional throwing wrapper over bootSafe) */
434
434
  declare const boot: (options?: BootOptions) => BootResult;
435
435
  /** Error class for boot() failures */
436
436
  declare class EnvpktBootError extends Error {
@@ -453,13 +453,17 @@ declare const unsealSecrets: (meta: Readonly<Record<string, SecretMeta>>, identi
453
453
  declare const resolveKeyPath: () => string;
454
454
  /** Resolve an inline age key from ENVPKT_AGE_KEY env var (for CI) */
455
455
  declare const resolveInlineKey: () => Option<string>;
456
- /** Generate an age keypair and write to disk */
456
+ /** Generate an age keypair and write to disk. Refuses to overwrite if the file already exists. */
457
457
  declare const generateKeypair: (options?: {
458
- readonly force?: boolean;
459
458
  readonly outputPath?: string;
460
459
  }) => Either<KeygenError, KeygenResult>;
461
- /** Update identity.recipient in an envpkt.toml file, preserving structure */
462
- declare const updateConfigRecipient: (configPath: string, recipient: string) => Either<KeygenError, true>;
460
+ type UpdateIdentityOptions = {
461
+ readonly recipient: string;
462
+ readonly keyFile?: string;
463
+ readonly name?: string;
464
+ };
465
+ /** Update identity fields (recipient, key_file, name) in an envpkt.toml file, preserving structure */
466
+ declare const updateConfigIdentity: (configPath: string, options: UpdateIdentityOptions) => Either<KeygenError, true>;
463
467
  //#endregion
464
468
  //#region src/core/resolve-values.d.ts
465
469
  /** Resolve plaintext values for the given keys via cascade: fnox → env → interactive prompt */
@@ -509,7 +513,11 @@ declare const fnoxAvailable: () => boolean;
509
513
  //#region src/fnox/identity.d.ts
510
514
  /** Check if the age CLI is available on PATH */
511
515
  declare const ageAvailable: () => boolean;
512
- /** Unwrap an encrypted agent key using age --decrypt */
516
+ /**
517
+ * Extract the secret key from an age identity file (plain or encrypted).
518
+ * - Plain identity files (from `age-keygen`) contain `AGE-SECRET-KEY-*` lines directly
519
+ * - Encrypted identity files need `age --decrypt` to unwrap
520
+ */
513
521
  declare const unwrapAgentKey: (identityPath: string) => Either<IdentityError, string>;
514
522
  //#endregion
515
523
  //#region src/fnox/parse.d.ts
@@ -527,7 +535,7 @@ declare const compareFnoxAndEnvpkt: (fnoxKeys: ReadonlySet<string>, envpktKeys:
527
535
  //#endregion
528
536
  //#region src/mcp/resources.d.ts
529
537
  declare const resourceDefinitions: readonly Resource[];
530
- declare const readResource: (uri: string) => ReadResourceResult | undefined;
538
+ declare const readResource: (uri: string) => Option<ReadResourceResult>;
531
539
  //#endregion
532
540
  //#region src/mcp/server.d.ts
533
541
  declare const createServer: () => Server;
@@ -546,4 +554,4 @@ type ToolDef = {
546
554
  declare const toolDefinitions: readonly ToolDef[];
547
555
  declare const callTool: (name: string, args: Record<string, unknown>) => CallToolResult;
548
556
  //#endregion
549
- export { type AgentIdentity, AgentIdentitySchema, type AuditResult, type BootError, type BootOptions, type BootResult, type CallbackConfig, CallbackConfigSchema, type CatalogError, type CheckResult, type ConfidenceLevel, type ConfigError, type ConfigSource, type ConsumerType, type CredentialPattern, type DriftEntry, type DriftStatus, type EnvAuditResult, type EnvDriftEntry, type EnvDriftStatus, type EnvMeta, EnvMetaSchema, EnvpktBootError, type EnvpktConfig, EnvpktConfigSchema, type FleetAgent, type FleetHealth, type FnoxConfig, type FnoxError, type FnoxSecret, type FormatPacketOptions, type HealthStatus, type Identity, type IdentityError, IdentitySchema, type KeygenError, type KeygenResult, type LifecycleConfig, LifecycleConfigSchema, type MatchResult, type ResolveOptions, type ResolveResult, type ResolvedPath, type ScanOptions, type ScanResult, type SealError, type SecretDisplay, type SecretHealth, type SecretMeta, SecretMetaSchema, type SecretStatus, type TomlEditError, type ToolsConfig, ToolsConfigSchema, ageAvailable, ageDecrypt, ageEncrypt, appendSection, boot, bootSafe, callTool, compareFnoxAndEnvpkt, computeAudit, computeEnvAudit, createServer, deriveServiceFromName, detectFnox, discoverConfig, envCheck, envScan, extractFnoxKeys, findConfigPath, fnoxAvailable, fnoxExport, fnoxGet, formatPacket, generateKeypair, generateTomlFromScan, loadCatalog, loadConfig, loadConfigFromCwd, maskValue, matchEnvVar, matchValueShape, parseToml, readConfigFile, readFnoxConfig, readResource, removeSection, renameSection, resolveConfig, resolveConfigPath, resolveInlineKey, resolveKeyPath, resolveSecrets, resolveValues, resourceDefinitions, scanEnv, scanFleet, sealSecrets, startServer, toolDefinitions, unsealSecrets, unwrapAgentKey, updateConfigRecipient, updateSectionFields, validateConfig };
557
+ export { type AgentIdentity, AgentIdentitySchema, type AuditResult, type BootError, type BootOptions, type BootResult, type CallbackConfig, CallbackConfigSchema, type CatalogError, type CheckResult, type ConfidenceLevel, type ConfigError, type ConfigSource, type ConsumerType, type CredentialPattern, type DriftEntry, type DriftStatus, type EnvAuditResult, type EnvDriftEntry, type EnvDriftStatus, type EnvMeta, EnvMetaSchema, EnvpktBootError, type EnvpktConfig, EnvpktConfigSchema, type FleetAgent, type FleetHealth, type FnoxConfig, type FnoxError, type FnoxSecret, type FormatPacketOptions, type HealthStatus, type Identity, type IdentityError, IdentitySchema, type KeygenError, type KeygenResult, type LifecycleConfig, LifecycleConfigSchema, type MatchResult, type ResolveOptions, type ResolveResult, type ResolvedPath, type ScanOptions, type ScanResult, type SealError, type SecretDisplay, type SecretHealth, type SecretMeta, SecretMetaSchema, type SecretStatus, type TomlEditError, type ToolsConfig, ToolsConfigSchema, ageAvailable, ageDecrypt, ageEncrypt, appendSection, boot, bootSafe, callTool, compareFnoxAndEnvpkt, computeAudit, computeEnvAudit, createServer, deriveServiceFromName, detectFnox, discoverConfig, envCheck, envScan, extractFnoxKeys, findConfigPath, fnoxAvailable, fnoxExport, fnoxGet, formatPacket, generateKeypair, generateTomlFromScan, loadCatalog, loadConfig, loadConfigFromCwd, maskValue, matchEnvVar, matchValueShape, parseToml, readConfigFile, readFnoxConfig, readResource, removeSection, renameSection, resolveConfig, resolveConfigPath, resolveInlineKey, resolveKeyPath, resolveSecrets, resolveValues, resourceDefinitions, scanEnv, scanFleet, sealSecrets, startServer, toolDefinitions, unsealSecrets, unwrapAgentKey, updateConfigIdentity, updateSectionFields, validateConfig };