@executor-js/plugin-onepassword 1.5.1 → 1.5.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@executor-js/plugin-onepassword",
3
- "version": "1.5.1",
3
+ "version": "1.5.3",
4
4
  "homepage": "https://github.com/RhysSullivan/executor/tree/main/packages/plugins/onepassword",
5
5
  "bugs": {
6
6
  "url": "https://github.com/RhysSullivan/executor/issues"
@@ -49,7 +49,7 @@
49
49
  "@1password/op-js": "^0.1.13",
50
50
  "@1password/sdk": "^0.4.1-beta.1",
51
51
  "@effect/atom-react": "4.0.0-beta.59",
52
- "@executor-js/sdk": "1.5.1"
52
+ "@executor-js/sdk": "1.5.3"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@effect/vitest": "4.0.0-beta.59",
@@ -1,36 +0,0 @@
1
- import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
2
- import { Schema } from "effect";
3
- import { InternalError } from "@executor-js/sdk/shared";
4
- import { OnePasswordError } from "../sdk/errors";
5
- export declare const OnePasswordGroup: HttpApiGroup.HttpApiGroup<"onepassword", HttpApiEndpoint.HttpApiEndpoint<"getConfig", "GET", "/onepassword/config", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.NullOr<Schema.Struct<{
6
- readonly auth: Schema.Union<readonly [Schema.Struct<{
7
- readonly kind: Schema.Literal<"desktop-app">;
8
- readonly accountName: Schema.String;
9
- }>, Schema.Struct<{
10
- readonly kind: Schema.Literal<"service-account">;
11
- }>]>;
12
- readonly vaultId: Schema.String;
13
- readonly name: Schema.String;
14
- }>>>, HttpApiEndpoint.Json<typeof InternalError | typeof OnePasswordError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"configure", "PUT", "/onepassword/config", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
15
- readonly auth: Schema.Union<readonly [Schema.Struct<{
16
- readonly kind: Schema.Literal<"desktop-app">;
17
- readonly accountName: Schema.String;
18
- }>, Schema.Struct<{
19
- readonly kind: Schema.Literal<"service-account">;
20
- readonly token: Schema.String;
21
- }>]>;
22
- readonly vaultId: Schema.String;
23
- readonly name: Schema.String;
24
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Void>, HttpApiEndpoint.Json<typeof InternalError | typeof OnePasswordError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"removeConfig", "DELETE", "/onepassword/config", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Void>, HttpApiEndpoint.Json<typeof InternalError | typeof OnePasswordError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"status", "GET", "/onepassword/status", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
25
- readonly connected: Schema.Boolean;
26
- readonly vaultName: Schema.optional<Schema.String>;
27
- readonly error: Schema.optional<Schema.String>;
28
- }>>, HttpApiEndpoint.Json<typeof InternalError | typeof OnePasswordError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listVaults", "GET", "/onepassword/vaults", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{
29
- readonly authKind: Schema.Literals<readonly ["desktop-app", "service-account"]>;
30
- readonly account: Schema.String;
31
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
32
- readonly vaults: Schema.$Array<Schema.Struct<{
33
- readonly id: Schema.String;
34
- readonly name: Schema.String;
35
- }>>;
36
- }>>, HttpApiEndpoint.Json<typeof InternalError | typeof OnePasswordError>, never, never>, false>;
@@ -1,20 +0,0 @@
1
- import { Context, Effect } from "effect";
2
- declare const OnePasswordExtensionService_base: Context.ServiceClass<OnePasswordExtensionService, "OnePasswordExtensionService", {
3
- configure: (config: import("../promise").OnePasswordConfig) => Effect.Effect<void, import("@executor-js/sdk").StorageError, never>;
4
- getConfig: () => Effect.Effect<import("../sdk").RedactedOnePasswordConfig | null, import("@executor-js/sdk").StorageError | import("../promise").OnePasswordError>;
5
- removeConfig: () => Effect.Effect<void, import("@executor-js/sdk").StorageError, never>;
6
- status: () => Effect.Effect<{
7
- readonly connected: boolean;
8
- readonly error?: string | undefined;
9
- readonly vaultName?: string | undefined;
10
- }, import("@executor-js/sdk").StorageError | import("../promise").OnePasswordError, never>;
11
- listVaults: (auth: import("../promise").OnePasswordAuth) => Effect.Effect<{
12
- readonly id: string;
13
- readonly name: string;
14
- }[], import("../promise").OnePasswordError, never>;
15
- resolve: (uri: string) => Effect.Effect<string, import("@executor-js/sdk").StorageError | import("../promise").OnePasswordError, never>;
16
- }>;
17
- export declare class OnePasswordExtensionService extends OnePasswordExtensionService_base {
18
- }
19
- export declare const OnePasswordHandlers: import("effect/Layer").Layer<import("effect/unstable/httpapi/HttpApiGroup").ApiGroup<"executor", "onepassword">, never, import("effect/unstable/http/HttpRouter").Request<"Requires", OnePasswordExtensionService>>;
20
- export {};
@@ -1,50 +0,0 @@
1
- import { type OnePasswordPluginOptions } from "../sdk/plugin";
2
- import { OnePasswordExtensionService } from "./handlers";
3
- export { OnePasswordGroup } from "./group";
4
- export { OnePasswordHandlers, OnePasswordExtensionService } from "./handlers";
5
- export declare const onepasswordHttpPlugin: import("@executor-js/sdk/core").ConfiguredPlugin<"onepassword", {
6
- configure: (config: import("../promise").OnePasswordConfig) => import("effect/Effect").Effect<void, import("@executor-js/sdk/core").StorageError, never>;
7
- getConfig: () => import("effect/Effect").Effect<import("../sdk").RedactedOnePasswordConfig | null, import("@executor-js/sdk/core").StorageError | import("../promise").OnePasswordError>;
8
- removeConfig: () => import("effect/Effect").Effect<void, import("@executor-js/sdk/core").StorageError, never>;
9
- status: () => import("effect/Effect").Effect<{
10
- readonly connected: boolean;
11
- readonly error?: string | undefined;
12
- readonly vaultName?: string | undefined;
13
- }, import("@executor-js/sdk/core").StorageError | import("../promise").OnePasswordError, never>;
14
- listVaults: (auth: import("../promise").OnePasswordAuth) => import("effect/Effect").Effect<{
15
- readonly id: string;
16
- readonly name: string;
17
- }[], import("../promise").OnePasswordError, never>;
18
- resolve: (uri: string) => import("effect/Effect").Effect<string, import("@executor-js/sdk/core").StorageError | import("../promise").OnePasswordError, never>;
19
- }, import("../sdk").OnePasswordStore, OnePasswordPluginOptions, typeof OnePasswordExtensionService, import("effect/Layer").Layer<import("effect/unstable/httpapi/HttpApiGroup").ApiGroup<"executor", "onepassword">, never, import("effect/unstable/http/HttpRouter").Request<"Requires", OnePasswordExtensionService>>, 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<{
20
- readonly auth: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
21
- readonly kind: import("effect/Schema").Literal<"desktop-app">;
22
- readonly accountName: import("effect/Schema").String;
23
- }>, import("effect/Schema").Struct<{
24
- readonly kind: import("effect/Schema").Literal<"service-account">;
25
- }>]>;
26
- readonly vaultId: import("effect/Schema").String;
27
- readonly name: import("effect/Schema").String;
28
- }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/api").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<{
29
- readonly auth: import("effect/Schema").Union<readonly [import("effect/Schema").Struct<{
30
- readonly kind: import("effect/Schema").Literal<"desktop-app">;
31
- readonly accountName: import("effect/Schema").String;
32
- }>, import("effect/Schema").Struct<{
33
- readonly kind: import("effect/Schema").Literal<"service-account">;
34
- readonly token: import("effect/Schema").String;
35
- }>]>;
36
- readonly vaultId: import("effect/Schema").String;
37
- readonly name: import("effect/Schema").String;
38
- }>>, 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("@executor-js/api").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("@executor-js/api").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<{
39
- readonly connected: import("effect/Schema").Boolean;
40
- readonly vaultName: import("effect/Schema").optional<import("effect/Schema").String>;
41
- readonly error: import("effect/Schema").optional<import("effect/Schema").String>;
42
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/api").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<{
43
- readonly authKind: import("effect/Schema").Literals<readonly ["desktop-app", "service-account"]>;
44
- readonly account: import("effect/Schema").String;
45
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
46
- readonly vaults: import("effect/Schema").$Array<import("effect/Schema").Struct<{
47
- readonly id: import("effect/Schema").String;
48
- readonly name: import("effect/Schema").String;
49
- }>>;
50
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("@executor-js/api").InternalError | typeof import("../promise").OnePasswordError>, never, never>, false>>;
package/dist/promise.d.ts DELETED
@@ -1,4 +0,0 @@
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";
@@ -1 +0,0 @@
1
- export default function OnePasswordSettings(): import("react/jsx-runtime").JSX.Element;
@@ -1,43 +0,0 @@
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("@executor-js/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("@executor-js/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("@executor-js/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("@executor-js/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("@executor-js/sdk").InternalError | import("../promise").OnePasswordError>;
@@ -1,32 +0,0 @@
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("@executor-js/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("@executor-js/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("@executor-js/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("@executor-js/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("@executor-js/sdk").InternalError | typeof import("../promise").OnePasswordError>, never, never>, false>>;
@@ -1,2 +0,0 @@
1
- export { default as OnePasswordSettings } from "./OnePasswordSettings";
2
- export { onePasswordSecretProviderPlugin } from "./secret-provider-plugin";
@@ -1,2 +0,0 @@
1
- declare const _default: import("@executor-js/sdk/client").ClientPluginSpec<"onepassword">;
2
- export default _default;
@@ -1,2 +0,0 @@
1
- import type { SecretProviderPlugin } from "@executor-js/sdk/client";
2
- export declare const onePasswordSecretProviderPlugin: SecretProviderPlugin;
@@ -1,8 +0,0 @@
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 {};
@@ -1,4 +0,0 @@
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";
@@ -1,49 +0,0 @@
1
- import { Effect } from "effect";
2
- import { StorageError, type Owner, type PluginCtx, type PluginBlobStore, type StorageFailure } from "@executor-js/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("@executor-js/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 {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,35 +0,0 @@
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, "@executor-js/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 {};
@@ -1,88 +0,0 @@
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;