import { Schema } from "effect"; export declare const DesktopAppAuth: Schema.Struct<{ readonly kind: Schema.Literal<"desktop-app">; /** 1Password account domain, e.g. "my.1password.com" */ readonly accountName: Schema.String; }>; export type DesktopAppAuth = typeof DesktopAppAuth.Type; export declare const ServiceAccountAuth: Schema.Struct<{ readonly kind: Schema.Literal<"service-account">; /** The service account token. Persisted in the plugin's owner-partitioned * config blob — never surfaced to agents (`getConfig` redacts it). v1 stored * this behind a separate secret id; v2 has no secrets table, so the * plugin-owned config row carries it directly. */ readonly token: Schema.String; }>; export type ServiceAccountAuth = typeof ServiceAccountAuth.Type; export declare const OnePasswordAuth: Schema.Union; /** 1Password account domain, e.g. "my.1password.com" */ readonly accountName: Schema.String; }>, Schema.Struct<{ readonly kind: Schema.Literal<"service-account">; /** The service account token. Persisted in the plugin's owner-partitioned * config blob — never surfaced to agents (`getConfig` redacts it). v1 stored * this behind a separate secret id; v2 has no secrets table, so the * plugin-owned config row carries it directly. */ readonly token: Schema.String; }>]>; export type OnePasswordAuth = typeof OnePasswordAuth.Type; export declare const Vault: Schema.Struct<{ readonly id: Schema.String; readonly name: Schema.String; }>; export type Vault = typeof Vault.Type; export declare const OnePasswordAccount: Schema.Struct<{ /** Stable identifier, generated when the account is first saved. Refs never * embed it — `op://` addressing stays vault-first — so renaming or * re-authing an account never invalidates a stored ref. */ readonly id: Schema.String; /** Human label for this account, e.g. "Work" */ readonly name: Schema.String; readonly auth: Schema.Union; /** 1Password account domain, e.g. "my.1password.com" */ readonly accountName: Schema.String; }>, Schema.Struct<{ readonly kind: Schema.Literal<"service-account">; /** The service account token. Persisted in the plugin's owner-partitioned * config blob — never surfaced to agents (`getConfig` redacts it). v1 stored * this behind a separate secret id; v2 has no secrets table, so the * plugin-owned config row carries it directly. */ readonly token: Schema.String; }>]>; /** Vaults to scope operations to. Order is presentational only: refs are * vault-qualified, and a bare ref that matches in more than one vault is an * explicit ambiguity failure, never a precedence pick. */ readonly vaults: Schema.NonEmptyArray>; }>; export type OnePasswordAccount = typeof OnePasswordAccount.Type; /** The account id every pre-multi-account config normalizes onto. */ export declare const DEFAULT_ACCOUNT_ID = "default"; export declare const OnePasswordConfig: Schema.Struct<{ readonly accounts: Schema.NonEmptyArray; /** 1Password account domain, e.g. "my.1password.com" */ readonly accountName: Schema.String; }>, Schema.Struct<{ readonly kind: Schema.Literal<"service-account">; /** The service account token. Persisted in the plugin's owner-partitioned * config blob — never surfaced to agents (`getConfig` redacts it). v1 stored * this behind a separate secret id; v2 has no secrets table, so the * plugin-owned config row carries it directly. */ readonly token: Schema.String; }>]>; /** Vaults to scope operations to. Order is presentational only: refs are * vault-qualified, and a bare ref that matches in more than one vault is an * explicit ambiguity failure, never a precedence pick. */ readonly vaults: Schema.NonEmptyArray>; }>>; }>; export type OnePasswordConfig = typeof OnePasswordConfig.Type; /** Single-account stored shape (multi-vault, pre-multi-account). Still * accepted on read; every save writes the current shape, so a config row * upgrades the first time it is re-saved. */ export declare const SingleAccountOnePasswordConfig: Schema.Struct<{ readonly auth: Schema.Union; /** 1Password account domain, e.g. "my.1password.com" */ readonly accountName: Schema.String; }>, Schema.Struct<{ readonly kind: Schema.Literal<"service-account">; /** The service account token. Persisted in the plugin's owner-partitioned * config blob — never surfaced to agents (`getConfig` redacts it). v1 stored * this behind a separate secret id; v2 has no secrets table, so the * plugin-owned config row carries it directly. */ readonly token: Schema.String; }>]>; readonly vaults: Schema.NonEmptyArray>; readonly name: Schema.String; }>; export type SingleAccountOnePasswordConfig = typeof SingleAccountOnePasswordConfig.Type; /** Original stored shape: a single vault id whose display name doubled as the * connection label. */ export declare const LegacyOnePasswordConfig: Schema.Struct<{ readonly auth: Schema.Union; /** 1Password account domain, e.g. "my.1password.com" */ readonly accountName: Schema.String; }>, Schema.Struct<{ readonly kind: Schema.Literal<"service-account">; /** The service account token. Persisted in the plugin's owner-partitioned * config blob — never surfaced to agents (`getConfig` redacts it). v1 stored * this behind a separate secret id; v2 has no secrets table, so the * plugin-owned config row carries it directly. */ readonly token: Schema.String; }>]>; readonly vaultId: Schema.String; readonly name: Schema.String; }>; export type LegacyOnePasswordConfig = typeof LegacyOnePasswordConfig.Type; export declare const StoredOnePasswordConfig: Schema.Union; /** 1Password account domain, e.g. "my.1password.com" */ readonly accountName: Schema.String; }>, Schema.Struct<{ readonly kind: Schema.Literal<"service-account">; /** The service account token. Persisted in the plugin's owner-partitioned * config blob — never surfaced to agents (`getConfig` redacts it). v1 stored * this behind a separate secret id; v2 has no secrets table, so the * plugin-owned config row carries it directly. */ readonly token: Schema.String; }>]>; /** Vaults to scope operations to. Order is presentational only: refs are * vault-qualified, and a bare ref that matches in more than one vault is an * explicit ambiguity failure, never a precedence pick. */ readonly vaults: Schema.NonEmptyArray>; }>>; }>, Schema.Struct<{ readonly auth: Schema.Union; /** 1Password account domain, e.g. "my.1password.com" */ readonly accountName: Schema.String; }>, Schema.Struct<{ readonly kind: Schema.Literal<"service-account">; /** The service account token. Persisted in the plugin's owner-partitioned * config blob — never surfaced to agents (`getConfig` redacts it). v1 stored * this behind a separate secret id; v2 has no secrets table, so the * plugin-owned config row carries it directly. */ readonly token: Schema.String; }>]>; readonly vaults: Schema.NonEmptyArray>; readonly name: Schema.String; }>, Schema.Struct<{ readonly auth: Schema.Union; /** 1Password account domain, e.g. "my.1password.com" */ readonly accountName: Schema.String; }>, Schema.Struct<{ readonly kind: Schema.Literal<"service-account">; /** The service account token. Persisted in the plugin's owner-partitioned * config blob — never surfaced to agents (`getConfig` redacts it). v1 stored * this behind a separate secret id; v2 has no secrets table, so the * plugin-owned config row carries it directly. */ readonly token: Schema.String; }>]>; readonly vaultId: Schema.String; readonly name: Schema.String; }>]>; export type StoredOnePasswordConfig = typeof StoredOnePasswordConfig.Type; export declare const normalizeStoredConfig: (stored: StoredOnePasswordConfig) => OnePasswordConfig; export declare const RedactedDesktopAppAuth: Schema.Struct<{ readonly kind: Schema.Literal<"desktop-app">; /** 1Password account domain, e.g. "my.1password.com" */ readonly accountName: Schema.String; }>; export declare const RedactedServiceAccountAuth: Schema.Struct<{ readonly kind: Schema.Literal<"service-account">; }>; export declare const RedactedOnePasswordAuth: Schema.Union; /** 1Password account domain, e.g. "my.1password.com" */ readonly accountName: Schema.String; }>, Schema.Struct<{ readonly kind: Schema.Literal<"service-account">; }>]>; export declare const RedactedOnePasswordAccount: Schema.Struct<{ readonly id: Schema.String; readonly name: Schema.String; readonly auth: Schema.Union; /** 1Password account domain, e.g. "my.1password.com" */ readonly accountName: Schema.String; }>, Schema.Struct<{ readonly kind: Schema.Literal<"service-account">; }>]>; readonly vaults: Schema.NonEmptyArray>; }>; export type RedactedOnePasswordAccount = typeof RedactedOnePasswordAccount.Type; export declare const RedactedOnePasswordConfig: Schema.Struct<{ readonly accounts: Schema.NonEmptyArray; /** 1Password account domain, e.g. "my.1password.com" */ readonly accountName: Schema.String; }>, Schema.Struct<{ readonly kind: Schema.Literal<"service-account">; }>]>; readonly vaults: Schema.NonEmptyArray>; }>>; }>; export type RedactedOnePasswordConfig = typeof RedactedOnePasswordConfig.Type; export declare const redactAccount: (account: OnePasswordAccount) => RedactedOnePasswordAccount; /** Strip the service-account tokens from a stored config for external exposure. */ export declare const redactConfig: (config: OnePasswordConfig) => RedactedOnePasswordConfig; export declare const AccountStatus: Schema.Struct<{ readonly id: Schema.String; readonly name: Schema.String; readonly connected: Schema.Boolean; readonly vaultNames: Schema.optional>; readonly error: Schema.optional; }>; export type AccountStatus = typeof AccountStatus.Type; export declare const ConnectionStatus: Schema.Struct<{ /** True only when configured and every account is reachable. */ readonly connected: Schema.Boolean; readonly accounts: Schema.$Array>; readonly error: Schema.optional; }>>; readonly error: Schema.optional; }>; export type ConnectionStatus = typeof ConnectionStatus.Type;