@rafads/plugin-onepassword 1.5.38

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/client.js ADDED
@@ -0,0 +1,20 @@
1
+ // src/react/plugin-client.tsx
2
+ import { defineClientPlugin } from "@rafads/sdk/client";
3
+
4
+ // src/react/secret-provider-plugin.ts
5
+ import { lazy } from "react";
6
+ var onePasswordSecretProviderPlugin = {
7
+ key: "onepassword",
8
+ label: "1Password",
9
+ settings: lazy(() => import("./OnePasswordSettings-YYVXN2JL.js"))
10
+ };
11
+
12
+ // src/react/plugin-client.tsx
13
+ var plugin_client_default = defineClientPlugin({
14
+ id: "onepassword",
15
+ secretProviderPlugin: onePasswordSecretProviderPlugin
16
+ });
17
+ export {
18
+ plugin_client_default as default
19
+ };
20
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/react/plugin-client.tsx","../src/react/secret-provider-plugin.ts"],"sourcesContent":["import { defineClientPlugin } from \"@rafads/sdk/client\";\n\nimport { onePasswordSecretProviderPlugin } from \"./secret-provider-plugin\";\n\nexport default defineClientPlugin({\n id: \"onepassword\" as const,\n secretProviderPlugin: onePasswordSecretProviderPlugin,\n});\n","import { lazy } from \"react\";\nimport type { SecretProviderPlugin } from \"@rafads/sdk/client\";\n\nexport const onePasswordSecretProviderPlugin: SecretProviderPlugin = {\n key: \"onepassword\",\n label: \"1Password\",\n settings: lazy(() => import(\"./OnePasswordSettings\")),\n};\n"],"mappings":";AAAA,SAAS,0BAA0B;;;ACAnC,SAAS,YAAY;AAGd,IAAM,kCAAwD;AAAA,EACnE,KAAK;AAAA,EACL,OAAO;AAAA,EACP,UAAU,KAAK,MAAM,OAAO,mCAAuB,CAAC;AACtD;;;ADHA,IAAO,wBAAQ,mBAAmB;AAAA,EAChC,IAAI;AAAA,EACJ,sBAAsB;AACxB,CAAC;","names":[]}
package/dist/core.js ADDED
@@ -0,0 +1,39 @@
1
+ import {
2
+ OnePasswordServiceTag,
3
+ makeCliService,
4
+ makeNativeSdkService,
5
+ makeOnePasswordService,
6
+ makeOnePasswordStore,
7
+ onepasswordPlugin
8
+ } from "./chunk-JNJOYLVW.js";
9
+ import {
10
+ ConnectionStatus,
11
+ DesktopAppAuth,
12
+ OnePasswordAuth,
13
+ OnePasswordConfig,
14
+ OnePasswordError,
15
+ RedactedOnePasswordAuth,
16
+ RedactedOnePasswordConfig,
17
+ ServiceAccountAuth,
18
+ Vault,
19
+ redactConfig
20
+ } from "./chunk-OYHEG6OK.js";
21
+ export {
22
+ ConnectionStatus,
23
+ DesktopAppAuth,
24
+ OnePasswordAuth,
25
+ OnePasswordConfig,
26
+ OnePasswordError,
27
+ OnePasswordServiceTag,
28
+ RedactedOnePasswordAuth,
29
+ RedactedOnePasswordConfig,
30
+ ServiceAccountAuth,
31
+ Vault,
32
+ makeCliService,
33
+ makeNativeSdkService,
34
+ makeOnePasswordService,
35
+ makeOnePasswordStore,
36
+ onepasswordPlugin,
37
+ redactConfig
38
+ };
39
+ //# sourceMappingURL=core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/dist/index.js ADDED
@@ -0,0 +1,23 @@
1
+ import {
2
+ onepasswordPlugin
3
+ } from "./chunk-JNJOYLVW.js";
4
+ import {
5
+ ConnectionStatus,
6
+ DesktopAppAuth,
7
+ OnePasswordAuth,
8
+ OnePasswordConfig,
9
+ OnePasswordError,
10
+ ServiceAccountAuth,
11
+ Vault
12
+ } from "./chunk-OYHEG6OK.js";
13
+ export {
14
+ ConnectionStatus,
15
+ DesktopAppAuth,
16
+ OnePasswordAuth,
17
+ OnePasswordConfig,
18
+ OnePasswordError,
19
+ ServiceAccountAuth,
20
+ Vault,
21
+ onepasswordPlugin
22
+ };
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,7 @@
1
+ // src/sdk/onepassword-sdk.ts
2
+ import * as sdk from "@1password/sdk";
3
+ var onePasswordSdk = sdk;
4
+ export {
5
+ onePasswordSdk
6
+ };
7
+ //# sourceMappingURL=onepassword-sdk-BT5LZEVG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/sdk/onepassword-sdk.ts"],"sourcesContent":["import * as sdk from \"@1password/sdk\";\n\nexport type OnePasswordSdkModule = typeof sdk;\n\n// Keep the package import static in this local shim. The service dynamically\n// imports this file so normal app boot stays lazy, while Bun's compiler sees\n// the concrete @1password/sdk dependency and its sdk-core WASM loader.\nexport const onePasswordSdk: OnePasswordSdkModule = sdk;\n"],"mappings":";AAAA,YAAY,SAAS;AAOd,IAAM,iBAAuC;","names":[]}
@@ -0,0 +1,4 @@
1
+ export { onepasswordPlugin } from "./sdk/plugin";
2
+ export type { OnePasswordExtension, OnePasswordPluginOptions } from "./sdk/plugin";
3
+ export { OnePasswordConfig, ConnectionStatus, Vault, OnePasswordAuth, DesktopAppAuth, ServiceAccountAuth, } from "./sdk/types";
4
+ export { OnePasswordError } from "./sdk/errors";
@@ -0,0 +1 @@
1
+ export default function OnePasswordSettings(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,43 @@
1
+ export declare const onepasswordWriteKeys: readonly ["providers"];
2
+ export declare const onepasswordConfigAtom: import("effect/unstable/reactivity/Atom").Atom<import("effect/unstable/reactivity/AsyncResult").AsyncResult<{
3
+ readonly name: string;
4
+ readonly auth: {
5
+ readonly kind: "desktop-app";
6
+ readonly accountName: string;
7
+ } | {
8
+ readonly kind: "service-account";
9
+ };
10
+ readonly vaultId: string;
11
+ } | null, import("@rafads/sdk").InternalError | import("../promise").OnePasswordError>>;
12
+ export declare const onepasswordStatusAtom: import("effect/unstable/reactivity/Atom").Atom<import("effect/unstable/reactivity/AsyncResult").AsyncResult<{
13
+ readonly connected: boolean;
14
+ readonly error?: string | undefined;
15
+ readonly vaultName?: string | undefined;
16
+ }, import("@rafads/sdk").InternalError | import("../promise").OnePasswordError>>;
17
+ export declare const onepasswordVaultsAtom: (authKind: "desktop-app" | "service-account", account: string) => import("effect/unstable/reactivity/Atom").Atom<import("effect/unstable/reactivity/AsyncResult").AsyncResult<{
18
+ readonly vaults: readonly {
19
+ readonly id: string;
20
+ readonly name: string;
21
+ }[];
22
+ }, import("@rafads/sdk").InternalError | import("../promise").OnePasswordError>>;
23
+ export declare const configureOnePassword: import("effect/unstable/reactivity/Atom").AtomResultFn<{
24
+ readonly payload: {
25
+ readonly name: string;
26
+ readonly auth: {
27
+ readonly kind: "desktop-app";
28
+ readonly accountName: string;
29
+ } | {
30
+ readonly kind: "service-account";
31
+ readonly token: string;
32
+ };
33
+ readonly vaultId: string;
34
+ };
35
+ readonly responseMode?: "decoded-only" | undefined;
36
+ readonly reactivityKeys?: readonly unknown[] | import("effect/Record").ReadonlyRecord<string, readonly unknown[]> | undefined;
37
+ }, void, import("@rafads/sdk").InternalError | import("../promise").OnePasswordError>;
38
+ export declare const removeOnePasswordConfig: import("effect/unstable/reactivity/Atom").AtomResultFn<{
39
+ readonly reactivityKeys?: readonly unknown[] | import("effect/Record").ReadonlyRecord<string, readonly unknown[]> | undefined;
40
+ } | {
41
+ readonly responseMode?: "decoded-only" | undefined;
42
+ readonly reactivityKeys?: readonly unknown[] | import("effect/Record").ReadonlyRecord<string, readonly unknown[]> | undefined;
43
+ }, void, import("@rafads/sdk").InternalError | import("../promise").OnePasswordError>;
@@ -0,0 +1,32 @@
1
+ export declare const OnePasswordClient: import("effect/unstable/reactivity/AtomHttpApi").AtomHttpApiClient<"Plugin_onepasswordClient", `Plugin_${string}Client`, import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"onepassword", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getConfig", "GET", "/onepassword/config", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").NullOr<import("effect/Schema").Struct<{
2
+ readonly auth: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
3
+ readonly kind: import("effect/Schema").Literal<"desktop-app">;
4
+ readonly accountName: import("effect/Schema").String;
5
+ }>, import("effect/Schema").Struct<{
6
+ readonly kind: import("effect/Schema").Literal<"service-account">;
7
+ }>]>;
8
+ readonly vaultId: import("effect/Schema").String;
9
+ readonly name: import("effect/Schema").String;
10
+ }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@rafads/sdk").InternalError | typeof import("../promise").OnePasswordError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"configure", "PUT", "/onepassword/config", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
11
+ readonly auth: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
12
+ readonly kind: import("effect/Schema").Literal<"desktop-app">;
13
+ readonly accountName: import("effect/Schema").String;
14
+ }>, import("effect/Schema").Struct<{
15
+ readonly kind: import("effect/Schema").Literal<"service-account">;
16
+ readonly token: import("effect/Schema").String;
17
+ }>]>;
18
+ readonly vaultId: import("effect/Schema").String;
19
+ readonly name: import("effect/Schema").String;
20
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Void>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@rafads/sdk").InternalError | typeof import("../promise").OnePasswordError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"removeConfig", "DELETE", "/onepassword/config", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Void>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@rafads/sdk").InternalError | typeof import("../promise").OnePasswordError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"status", "GET", "/onepassword/status", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
21
+ readonly connected: import("effect/Schema").Boolean;
22
+ readonly vaultName: import("effect/Schema").optional<import("effect/Schema").String>;
23
+ readonly error: import("effect/Schema").optional<import("effect/Schema").String>;
24
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@rafads/sdk").InternalError | typeof import("../promise").OnePasswordError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"listVaults", "GET", "/onepassword/vaults", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
25
+ readonly authKind: import("effect/Schema").Literals<readonly ["desktop-app", "service-account"]>;
26
+ readonly account: import("effect/Schema").String;
27
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
28
+ readonly vaults: import("effect/Schema").$Array<import("effect/Schema").Struct<{
29
+ readonly id: import("effect/Schema").String;
30
+ readonly name: import("effect/Schema").String;
31
+ }>>;
32
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@rafads/sdk").InternalError | typeof import("../promise").OnePasswordError>, never, never>, false>>;
@@ -0,0 +1,2 @@
1
+ export { default as OnePasswordSettings } from "./OnePasswordSettings";
2
+ export { onePasswordSecretProviderPlugin } from "./secret-provider-plugin";
@@ -0,0 +1,2 @@
1
+ declare const _default: import("@rafads/sdk/client").ClientPluginSpec<"onepassword">;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import type { SecretProviderPlugin } from "@rafads/sdk/client";
2
+ export declare const onePasswordSecretProviderPlugin: SecretProviderPlugin;
@@ -0,0 +1,8 @@
1
+ import { Schema } from "effect";
2
+ declare const OnePasswordError_base: Schema.Class<OnePasswordError, Schema.TaggedStruct<"OnePasswordError", {
3
+ readonly operation: Schema.String;
4
+ readonly message: Schema.String;
5
+ }>, import("effect/Cause").YieldableError>;
6
+ export declare class OnePasswordError extends OnePasswordError_base {
7
+ }
8
+ export {};
@@ -0,0 +1,4 @@
1
+ export { onepasswordPlugin, makeOnePasswordStore, type OnePasswordExtension, type OnePasswordPluginOptions, type OnePasswordStore, } from "./plugin";
2
+ export { OnePasswordConfig, RedactedOnePasswordConfig, RedactedOnePasswordAuth, redactConfig, Vault, ConnectionStatus, OnePasswordAuth, DesktopAppAuth, ServiceAccountAuth, } from "./types";
3
+ export { OnePasswordError } from "./errors";
4
+ export { makeOnePasswordService, makeNativeSdkService, makeCliService, OnePasswordServiceTag, type OnePasswordService, type ResolvedAuth, } from "./service";
@@ -0,0 +1,3 @@
1
+ import * as sdk from "@1password/sdk";
2
+ export type OnePasswordSdkModule = typeof sdk;
3
+ export declare const onePasswordSdk: OnePasswordSdkModule;
@@ -0,0 +1,49 @@
1
+ import { Effect } from "effect";
2
+ import { StorageError, type Owner, type PluginCtx, type PluginBlobStore, type StorageFailure } from "@rafads/sdk/core";
3
+ import { OnePasswordAuth, OnePasswordConfig, RedactedOnePasswordConfig } from "./types";
4
+ import { OnePasswordError } from "./errors";
5
+ export type OnePasswordExtensionFailure = OnePasswordError | StorageFailure;
6
+ export interface OnePasswordStore {
7
+ readonly getConfig: () => Effect.Effect<OnePasswordConfig | null, StorageError | OnePasswordError>;
8
+ readonly saveConfig: (config: OnePasswordConfig, owner: Owner) => Effect.Effect<void, StorageError>;
9
+ readonly deleteConfig: (owner: Owner) => Effect.Effect<void, StorageError>;
10
+ }
11
+ export declare const makeOnePasswordStore: (blobs: PluginBlobStore) => OnePasswordStore;
12
+ declare const makeOnePasswordExtension: (ctx: PluginCtx<OnePasswordStore>, timeoutMs: number, preferSdk: boolean | undefined) => {
13
+ configure: (config: OnePasswordConfig) => Effect.Effect<void, StorageError, never>;
14
+ getConfig: () => Effect.Effect<RedactedOnePasswordConfig | null, StorageError | OnePasswordError>;
15
+ removeConfig: () => Effect.Effect<void, StorageError, never>;
16
+ status: () => Effect.Effect<{
17
+ readonly connected: boolean;
18
+ readonly error?: string | undefined;
19
+ readonly vaultName?: string | undefined;
20
+ }, StorageError | OnePasswordError, never>;
21
+ listVaults: (auth: OnePasswordAuth) => Effect.Effect<{
22
+ readonly id: string;
23
+ readonly name: string;
24
+ }[], OnePasswordError, never>;
25
+ resolve: (uri: string) => Effect.Effect<string, StorageError | OnePasswordError, never>;
26
+ };
27
+ export type OnePasswordExtension = ReturnType<typeof makeOnePasswordExtension>;
28
+ export interface OnePasswordPluginOptions {
29
+ /** Request timeout in ms (default: 15000) */
30
+ readonly timeoutMs?: number;
31
+ /** Force use of the native SDK instead of the CLI (default: false) */
32
+ readonly preferSdk?: boolean;
33
+ }
34
+ export declare const onepasswordPlugin: import("@rafads/sdk/core").ConfiguredPlugin<"onepassword", {
35
+ configure: (config: OnePasswordConfig) => Effect.Effect<void, StorageError, never>;
36
+ getConfig: () => Effect.Effect<RedactedOnePasswordConfig | null, StorageError | OnePasswordError>;
37
+ removeConfig: () => Effect.Effect<void, StorageError, never>;
38
+ status: () => Effect.Effect<{
39
+ readonly connected: boolean;
40
+ readonly error?: string | undefined;
41
+ readonly vaultName?: string | undefined;
42
+ }, StorageError | OnePasswordError, never>;
43
+ listVaults: (auth: OnePasswordAuth) => Effect.Effect<{
44
+ readonly id: string;
45
+ readonly name: string;
46
+ }[], OnePasswordError, never>;
47
+ resolve: (uri: string) => Effect.Effect<string, StorageError | OnePasswordError, never>;
48
+ }, OnePasswordStore, OnePasswordPluginOptions, undefined, import("effect/Layer").Layer<unknown, never, never>, import("effect/unstable/httpapi/HttpApiGroup").Any>;
49
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,35 @@
1
+ import { Context, Effect } from "effect";
2
+ import { OnePasswordError } from "./errors";
3
+ export interface OnePasswordVault {
4
+ readonly id: string;
5
+ readonly title: string;
6
+ }
7
+ export interface OnePasswordItem {
8
+ readonly id: string;
9
+ readonly title: string;
10
+ }
11
+ export interface OnePasswordService {
12
+ /** Resolve a secret by op:// URI */
13
+ readonly resolveSecret: (uri: string) => Effect.Effect<string, OnePasswordError>;
14
+ /** List accessible vaults */
15
+ readonly listVaults: () => Effect.Effect<ReadonlyArray<OnePasswordVault>, OnePasswordError>;
16
+ /** List items in a vault */
17
+ readonly listItems: (vaultId: string) => Effect.Effect<ReadonlyArray<OnePasswordItem>, OnePasswordError>;
18
+ }
19
+ declare const OnePasswordServiceTag_base: Context.ServiceClass<OnePasswordServiceTag, "@rafads/plugin-onepassword/OnePasswordService", OnePasswordService>;
20
+ export declare class OnePasswordServiceTag extends OnePasswordServiceTag_base {
21
+ }
22
+ export type ResolvedAuth = {
23
+ readonly kind: "desktop-app";
24
+ readonly accountName: string;
25
+ } | {
26
+ readonly kind: "service-account";
27
+ readonly token: string;
28
+ };
29
+ export declare const makeNativeSdkService: (auth: ResolvedAuth, timeoutMs?: number) => Effect.Effect<OnePasswordService, OnePasswordError>;
30
+ export declare const makeCliService: (auth: ResolvedAuth) => Effect.Effect<OnePasswordService, OnePasswordError>;
31
+ export declare const makeOnePasswordService: (auth: ResolvedAuth, options?: {
32
+ readonly preferSdk?: boolean;
33
+ readonly timeoutMs?: number;
34
+ }) => Effect.Effect<OnePasswordService, OnePasswordError>;
35
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,88 @@
1
+ import { Schema } from "effect";
2
+ export declare const DesktopAppAuth: Schema.Struct<{
3
+ readonly kind: Schema.Literal<"desktop-app">;
4
+ /** 1Password account domain, e.g. "my.1password.com" */
5
+ readonly accountName: Schema.String;
6
+ }>;
7
+ export type DesktopAppAuth = typeof DesktopAppAuth.Type;
8
+ export declare const ServiceAccountAuth: Schema.Struct<{
9
+ readonly kind: Schema.Literal<"service-account">;
10
+ /** The service account token. Persisted in the plugin's owner-partitioned
11
+ * config blob — never surfaced to agents (`getConfig` redacts it). v1 stored
12
+ * this behind a separate secret id; v2 has no secrets table, so the
13
+ * plugin-owned config row carries it directly. */
14
+ readonly token: Schema.String;
15
+ }>;
16
+ export type ServiceAccountAuth = typeof ServiceAccountAuth.Type;
17
+ export declare const OnePasswordAuth: Schema.Union<readonly [Schema.Struct<{
18
+ readonly kind: Schema.Literal<"desktop-app">;
19
+ /** 1Password account domain, e.g. "my.1password.com" */
20
+ readonly accountName: Schema.String;
21
+ }>, Schema.Struct<{
22
+ readonly kind: Schema.Literal<"service-account">;
23
+ /** The service account token. Persisted in the plugin's owner-partitioned
24
+ * config blob — never surfaced to agents (`getConfig` redacts it). v1 stored
25
+ * this behind a separate secret id; v2 has no secrets table, so the
26
+ * plugin-owned config row carries it directly. */
27
+ readonly token: Schema.String;
28
+ }>]>;
29
+ export type OnePasswordAuth = typeof OnePasswordAuth.Type;
30
+ export declare const OnePasswordConfig: Schema.Struct<{
31
+ readonly auth: Schema.Union<readonly [Schema.Struct<{
32
+ readonly kind: Schema.Literal<"desktop-app">;
33
+ /** 1Password account domain, e.g. "my.1password.com" */
34
+ readonly accountName: Schema.String;
35
+ }>, Schema.Struct<{
36
+ readonly kind: Schema.Literal<"service-account">;
37
+ /** The service account token. Persisted in the plugin's owner-partitioned
38
+ * config blob — never surfaced to agents (`getConfig` redacts it). v1 stored
39
+ * this behind a separate secret id; v2 has no secrets table, so the
40
+ * plugin-owned config row carries it directly. */
41
+ readonly token: Schema.String;
42
+ }>]>;
43
+ /** Vault to scope operations to */
44
+ readonly vaultId: Schema.String;
45
+ /** Human label */
46
+ readonly name: Schema.String;
47
+ }>;
48
+ export type OnePasswordConfig = typeof OnePasswordConfig.Type;
49
+ export declare const RedactedDesktopAppAuth: Schema.Struct<{
50
+ readonly kind: Schema.Literal<"desktop-app">;
51
+ /** 1Password account domain, e.g. "my.1password.com" */
52
+ readonly accountName: Schema.String;
53
+ }>;
54
+ export declare const RedactedServiceAccountAuth: Schema.Struct<{
55
+ readonly kind: Schema.Literal<"service-account">;
56
+ }>;
57
+ export declare const RedactedOnePasswordAuth: Schema.Union<readonly [Schema.Struct<{
58
+ readonly kind: Schema.Literal<"desktop-app">;
59
+ /** 1Password account domain, e.g. "my.1password.com" */
60
+ readonly accountName: Schema.String;
61
+ }>, Schema.Struct<{
62
+ readonly kind: Schema.Literal<"service-account">;
63
+ }>]>;
64
+ export declare const RedactedOnePasswordConfig: Schema.Struct<{
65
+ readonly auth: Schema.Union<readonly [Schema.Struct<{
66
+ readonly kind: Schema.Literal<"desktop-app">;
67
+ /** 1Password account domain, e.g. "my.1password.com" */
68
+ readonly accountName: Schema.String;
69
+ }>, Schema.Struct<{
70
+ readonly kind: Schema.Literal<"service-account">;
71
+ }>]>;
72
+ readonly vaultId: Schema.String;
73
+ readonly name: Schema.String;
74
+ }>;
75
+ export type RedactedOnePasswordConfig = typeof RedactedOnePasswordConfig.Type;
76
+ /** Strip the service-account token from a stored config for external exposure. */
77
+ export declare const redactConfig: (config: OnePasswordConfig) => RedactedOnePasswordConfig;
78
+ export declare const Vault: Schema.Struct<{
79
+ readonly id: Schema.String;
80
+ readonly name: Schema.String;
81
+ }>;
82
+ export type Vault = typeof Vault.Type;
83
+ export declare const ConnectionStatus: Schema.Struct<{
84
+ readonly connected: Schema.Boolean;
85
+ readonly vaultName: Schema.optional<Schema.String>;
86
+ readonly error: Schema.optional<Schema.String>;
87
+ }>;
88
+ export type ConnectionStatus = typeof ConnectionStatus.Type;
package/package.json ADDED
@@ -0,0 +1,77 @@
1
+ {
2
+ "name": "@rafads/plugin-onepassword",
3
+ "version": "1.5.38",
4
+ "homepage": "https://github.com/UsefulSoftwareCo/executor/tree/main/packages/plugins/onepassword",
5
+ "bugs": {
6
+ "url": "https://github.com/UsefulSoftwareCo/executor/issues"
7
+ },
8
+ "license": "MIT",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/UsefulSoftwareCo/executor.git",
12
+ "directory": "packages/plugins/onepassword"
13
+ },
14
+ "files": [
15
+ "dist"
16
+ ],
17
+ "type": "module",
18
+ "exports": {
19
+ ".": {
20
+ "import": {
21
+ "types": "./dist/promise.d.ts",
22
+ "default": "./dist/index.js"
23
+ }
24
+ },
25
+ "./core": {
26
+ "import": {
27
+ "types": "./dist/sdk/index.d.ts",
28
+ "default": "./dist/core.js"
29
+ }
30
+ },
31
+ "./client": {
32
+ "import": {
33
+ "types": "./dist/react/plugin-client.d.ts",
34
+ "default": "./dist/client.js"
35
+ }
36
+ }
37
+ },
38
+ "publishConfig": {
39
+ "access": "public"
40
+ },
41
+ "scripts": {
42
+ "build": "tsup && tsc --declaration --emitDeclarationOnly --outDir dist --rootDir src",
43
+ "typecheck": "tsgo --noEmit",
44
+ "test": "vitest run",
45
+ "test:watch": "vitest",
46
+ "typecheck:slow": "bunx tsc --noEmit -p tsconfig.json"
47
+ },
48
+ "dependencies": {
49
+ "@1password/op-js": "^0.1.13",
50
+ "@1password/sdk": "^0.4.1-beta.1",
51
+ "@effect/atom-react": "4.0.0-beta.59",
52
+ "@rafads/sdk": "1.5.38"
53
+ },
54
+ "devDependencies": {
55
+ "@effect/vitest": "4.0.0-beta.59",
56
+ "@types/node": "^24.3.1",
57
+ "@types/react": "^19.1.0",
58
+ "bun-types": "^1.2.22",
59
+ "effect": "4.0.0-beta.59",
60
+ "react": "^19.1.0",
61
+ "tsup": "^8.5.0",
62
+ "vitest": "^4.1.5"
63
+ },
64
+ "peerDependencies": {
65
+ "@effect/atom-react": "4.0.0-beta.59",
66
+ "effect": "4.0.0-beta.59",
67
+ "react": ">=18"
68
+ },
69
+ "peerDependenciesMeta": {
70
+ "react": {
71
+ "optional": true
72
+ },
73
+ "@effect/atom-react": {
74
+ "optional": true
75
+ }
76
+ }
77
+ }