@executor-js/sdk 0.0.1-beta.6 → 0.0.2

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.
Files changed (96) hide show
  1. package/README.md +125 -107
  2. package/dist/blob.d.ts +48 -0
  3. package/dist/blob.d.ts.map +1 -0
  4. package/dist/blob.test.d.ts +2 -0
  5. package/dist/blob.test.d.ts.map +1 -0
  6. package/dist/chunk-6LMMN2GP.js +4396 -0
  7. package/dist/chunk-6LMMN2GP.js.map +1 -0
  8. package/dist/config.d.ts +14 -0
  9. package/dist/config.d.ts.map +1 -0
  10. package/dist/connections.d.ts +107 -0
  11. package/dist/connections.d.ts.map +1 -0
  12. package/dist/connections.test.d.ts +2 -0
  13. package/dist/connections.test.d.ts.map +1 -0
  14. package/dist/core-schema.d.ts +372 -0
  15. package/dist/core-schema.d.ts.map +1 -0
  16. package/dist/core.js +273 -57
  17. package/dist/core.js.map +1 -1
  18. package/dist/elicitation.d.ts +18 -34
  19. package/dist/elicitation.d.ts.map +1 -1
  20. package/dist/error-handling.test.d.ts +2 -0
  21. package/dist/error-handling.test.d.ts.map +1 -0
  22. package/dist/errors.d.ts +95 -24
  23. package/dist/errors.d.ts.map +1 -1
  24. package/dist/executor.d.ts +107 -48
  25. package/dist/executor.d.ts.map +1 -1
  26. package/dist/executor.test.d.ts +2 -0
  27. package/dist/executor.test.d.ts.map +1 -0
  28. package/dist/ids.d.ts +6 -4
  29. package/dist/ids.d.ts.map +1 -1
  30. package/dist/index.d.ts +22 -16
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +80 -308
  33. package/dist/index.js.map +1 -1
  34. package/dist/oauth-discovery.d.ts +138 -0
  35. package/dist/oauth-discovery.d.ts.map +1 -0
  36. package/dist/oauth-discovery.test.d.ts +2 -0
  37. package/dist/oauth-discovery.test.d.ts.map +1 -0
  38. package/dist/oauth-helpers.d.ts +89 -0
  39. package/dist/oauth-helpers.d.ts.map +1 -0
  40. package/dist/oauth-helpers.test.d.ts +2 -0
  41. package/dist/oauth-helpers.test.d.ts.map +1 -0
  42. package/dist/oauth-popup-types.d.ts +14 -0
  43. package/dist/oauth-popup-types.d.ts.map +1 -0
  44. package/dist/oauth-service.d.ts +33 -0
  45. package/dist/oauth-service.d.ts.map +1 -0
  46. package/dist/oauth.d.ts +275 -0
  47. package/dist/oauth.d.ts.map +1 -0
  48. package/dist/plugin.d.ts +261 -27
  49. package/dist/plugin.d.ts.map +1 -1
  50. package/dist/policies.d.ts +56 -64
  51. package/dist/policies.d.ts.map +1 -1
  52. package/dist/policies.test.d.ts +2 -0
  53. package/dist/policies.test.d.ts.map +1 -0
  54. package/dist/promise-executor.d.ts +26 -128
  55. package/dist/promise-executor.d.ts.map +1 -1
  56. package/dist/promise.d.ts +12 -6
  57. package/dist/promise.d.ts.map +1 -1
  58. package/dist/promise.test.d.ts +2 -0
  59. package/dist/promise.test.d.ts.map +1 -0
  60. package/dist/schema-types.d.ts +6 -5
  61. package/dist/schema-types.d.ts.map +1 -1
  62. package/dist/scope.d.ts +5 -15
  63. package/dist/scope.d.ts.map +1 -1
  64. package/dist/scoped-adapter.d.ts +13 -0
  65. package/dist/scoped-adapter.d.ts.map +1 -0
  66. package/dist/scoped-adapter.test.d.ts +2 -0
  67. package/dist/scoped-adapter.test.d.ts.map +1 -0
  68. package/dist/secret-backed-value.d.ts +27 -0
  69. package/dist/secret-backed-value.d.ts.map +1 -0
  70. package/dist/secrets.d.ts +52 -106
  71. package/dist/secrets.d.ts.map +1 -1
  72. package/dist/testing.d.ts +5 -3
  73. package/dist/testing.d.ts.map +1 -1
  74. package/dist/types.d.ts +84 -0
  75. package/dist/types.d.ts.map +1 -0
  76. package/package.json +7 -4
  77. package/dist/chunk-CJY7TT3J.js +0 -1384
  78. package/dist/chunk-CJY7TT3J.js.map +0 -1
  79. package/dist/in-memory/policy-engine.d.ts +0 -10
  80. package/dist/in-memory/policy-engine.d.ts.map +0 -1
  81. package/dist/in-memory/secret-store.d.ts +0 -16
  82. package/dist/in-memory/secret-store.d.ts.map +0 -1
  83. package/dist/in-memory/tool-registry.d.ts +0 -35
  84. package/dist/in-memory/tool-registry.d.ts.map +0 -1
  85. package/dist/index.test.d.ts +0 -2
  86. package/dist/index.test.d.ts.map +0 -1
  87. package/dist/plugin-kv.d.ts +0 -48
  88. package/dist/plugin-kv.d.ts.map +0 -1
  89. package/dist/plugins/in-memory-tools.d.ts +0 -42
  90. package/dist/plugins/in-memory-tools.d.ts.map +0 -1
  91. package/dist/runtime-tools.d.ts +0 -41
  92. package/dist/runtime-tools.d.ts.map +0 -1
  93. package/dist/sources.d.ts +0 -124
  94. package/dist/sources.d.ts.map +0 -1
  95. package/dist/tools.d.ts +0 -219
  96. package/dist/tools.d.ts.map +0 -1
@@ -1,139 +1,37 @@
1
- import { Context, Effect } from "effect";
2
- import { type ToolRegistry as CoreToolRegistry, type SourceRegistry as CoreSourceRegistry, type SecretStore as CoreSecretStore, type PolicyEngine as CorePolicyEngine, type ExecutorPlugin, type ElicitationContext, type ToolInvocationResult, type ToolMetadata, type ToolAnnotations, type SourceManager as EffectSourceManager, type Policy, type SecretRef, type SecretProvider as EffectSecretProvider, type Scope, type ToolId as ToolIdType, type SecretId as SecretIdType, type ScopeId as ScopeIdType, type PolicyId as PolicyIdType } from "./index";
3
- /** Replace branded IDs with plain strings in parameter types */
4
- type UnbrandParam<T> = T extends ToolIdType ? string : T extends SecretIdType ? string : T extends ScopeIdType ? string : T extends PolicyIdType ? string : T extends readonly (infer U)[] ? readonly UnbrandParam<U>[] : T;
5
- /** Convert an Effect service interface to Promise-based, unbranding ID params */
6
- type PromisifyService<T> = {
7
- readonly [K in keyof T]: NonNullable<T[K]> extends (...args: infer A) => Effect.Effect<infer R, infer _E> ? (...args: {
8
- [I in keyof A]: UnbrandParam<A[I]>;
9
- }) => Promise<R> : T[K];
10
- };
11
- type CoreToolRegistryService = Context.Tag.Service<typeof CoreToolRegistry>;
12
- type CoreSourceRegistryService = Context.Tag.Service<typeof CoreSourceRegistry>;
13
- type CoreSecretStoreService = Context.Tag.Service<typeof CoreSecretStore>;
14
- type CorePolicyEngineService = Context.Tag.Service<typeof CorePolicyEngine>;
15
- export interface ElicitationResponse {
16
- readonly action: "accept" | "decline" | "cancel";
17
- readonly content?: Record<string, unknown>;
18
- }
19
- export type ElicitationHandler = (ctx: ElicitationContext) => Promise<ElicitationResponse>;
20
- export interface InvokeOptions {
21
- readonly onElicitation: ElicitationHandler | "accept-all";
22
- }
23
- export interface ToolInvoker {
24
- readonly invoke: (toolId: string, args: unknown, options: InvokeOptions) => Promise<ToolInvocationResult>;
25
- readonly resolveAnnotations?: (toolId: string) => Promise<ToolAnnotations | undefined>;
26
- }
27
- export interface RuntimeToolHandler {
28
- readonly invoke: (args: unknown, options: InvokeOptions) => Promise<ToolInvocationResult>;
29
- readonly resolveAnnotations?: () => Promise<ToolAnnotations | undefined>;
30
- }
31
- export type SourceManager = PromisifyService<EffectSourceManager>;
32
- export type SecretProvider = PromisifyService<EffectSecretProvider>;
33
- export interface PluginContext {
34
- readonly scope: Scope;
35
- readonly tools: ToolRegistry;
36
- readonly sources: SourceRegistry;
37
- readonly secrets: SecretStore;
38
- readonly policies: PolicyEngine;
39
- }
40
- export interface ToolRegistry extends Omit<PromisifyService<CoreToolRegistryService>, "list" | "invoke" | "registerInvoker" | "registerRuntimeHandler"> {
41
- readonly list: (filter?: {
42
- sourceId?: string;
43
- query?: string;
44
- }) => Promise<readonly ToolMetadata[]>;
45
- readonly invoke: (toolId: string, args: unknown, options: InvokeOptions) => Promise<ToolInvocationResult>;
46
- readonly registerInvoker: (pluginKey: string, invoker: ToolInvoker) => Promise<void>;
47
- readonly registerRuntimeHandler: (toolId: string, handler: RuntimeToolHandler) => Promise<void>;
48
- }
49
- export interface SourceRegistry extends Omit<PromisifyService<CoreSourceRegistryService>, "addManager"> {
50
- readonly addManager: (manager: SourceManager) => Promise<void>;
51
- }
52
- export interface SecretStore extends Omit<PromisifyService<CoreSecretStoreService>, "set" | "addProvider"> {
53
- readonly set: (input: {
54
- readonly id: string;
55
- readonly scopeId: string;
56
- readonly name: string;
57
- readonly value: string;
58
- readonly provider?: string;
59
- readonly purpose?: string;
60
- }) => Promise<SecretRef>;
61
- readonly addProvider: (provider: SecretProvider) => Promise<void>;
62
- }
63
- export interface PolicyEngine extends Omit<PromisifyService<CorePolicyEngineService>, "check"> {
64
- readonly check: (input: {
65
- scopeId: string;
66
- toolId: string;
67
- }) => Promise<void>;
68
- }
69
- export interface Plugin<TKey extends string = string, TExtension extends object = object> {
70
- readonly key: TKey;
71
- /** @internal */
72
- readonly _promise?: true;
73
- readonly init: (ctx: PluginContext) => Promise<PluginHandle<TExtension>>;
74
- }
75
- export interface PluginHandle<TExtension extends object = object> {
76
- readonly extension: TExtension;
77
- readonly close?: () => Promise<void>;
78
- }
79
- export declare const definePlugin: <const TKey extends string, TExtension extends object>(plugin: Plugin<TKey, TExtension>) => Plugin<TKey, TExtension>;
80
- type Promisified<T> = T extends (...args: infer A) => Effect.Effect<infer R, infer _E> ? (...args: A) => Promise<R> : T extends object ? {
1
+ import { Brand, Effect } from "effect";
2
+ import { type Executor as EffectExecutor, type OnElicitation } from "./executor";
3
+ import type { AnyPlugin } from "./plugin";
4
+ type Unbrand<T> = T extends Brand.Brand<string> ? string : T extends readonly (infer U)[] ? readonly Unbrand<U>[] : T extends ReadonlyMap<infer K, infer V> ? ReadonlyMap<Unbrand<K>, Unbrand<V>> : T extends ReadonlySet<infer U> ? ReadonlySet<Unbrand<U>> : T extends Date ? T : T extends (...args: infer A) => infer R ? (...args: {
5
+ [I in keyof A]: Unbrand<A[I]>;
6
+ }) => Unbrand<R> : T extends object ? {
7
+ readonly [K in keyof T]: Unbrand<T[K]>;
8
+ } : T;
9
+ export type Promisified<T> = T extends (...args: infer A) => Effect.Effect<infer R, infer _E> ? (...args: {
10
+ [I in keyof A]: Unbrand<A[I]>;
11
+ }) => Promise<R> : T extends readonly unknown[] ? T : T extends object ? {
81
12
  readonly [K in keyof T]: Promisified<T[K]>;
82
13
  } : T;
83
- export type AnyPlugin = Plugin<string, object> | ExecutorPlugin<string, object>;
84
- export type Executor<TPlugins extends readonly AnyPlugin[] = []> = {
85
- readonly scope: Scope;
86
- readonly tools: Pick<ToolRegistry, "list" | "schema" | "definitions" | "invoke">;
87
- readonly sources: Pick<SourceRegistry, "list" | "remove" | "refresh" | "detect">;
88
- readonly policies: {
89
- readonly list: () => Promise<readonly Policy[]>;
90
- readonly add: (policy: Omit<Policy, "id" | "createdAt">) => Promise<Policy>;
91
- readonly remove: (policyId: string) => Promise<boolean>;
92
- };
93
- readonly secrets: {
94
- readonly list: () => Promise<readonly SecretRef[]>;
95
- readonly resolve: (secretId: string) => Promise<string>;
96
- readonly status: (secretId: string) => Promise<"resolved" | "missing">;
97
- readonly set: (input: {
98
- readonly id: string;
99
- readonly name: string;
100
- readonly value: string;
101
- readonly provider?: string;
102
- readonly purpose?: string;
103
- }) => Promise<SecretRef>;
104
- readonly remove: (secretId: string) => Promise<boolean>;
105
- readonly addProvider: (provider: SecretProvider) => Promise<void>;
106
- readonly providers: () => Promise<readonly string[]>;
107
- };
108
- readonly close: () => Promise<void>;
109
- } & PluginExtensions<TPlugins>;
110
- type PluginExtensions<TPlugins extends readonly AnyPlugin[]> = {
111
- readonly [P in TPlugins[number] as P["key"]]: P extends Plugin<string, infer TExt> ? TExt : P extends ExecutorPlugin<string, infer TExt> ? Promisified<TExt> : never;
112
- };
14
+ export type Executor<TPlugins extends readonly AnyPlugin[] = []> = Promisified<EffectExecutor<TPlugins>>;
113
15
  export interface ExecutorConfig<TPlugins extends readonly AnyPlugin[] = []> {
114
- readonly scope?: {
16
+ /**
17
+ * Precedence-ordered scope stack (innermost first). Optional — defaults
18
+ * to a single-element stack with id "default-scope". Pass an array of
19
+ * `{ id, name }` partials to build a multi-scope executor.
20
+ */
21
+ readonly scopes?: readonly {
115
22
  readonly id?: string;
116
23
  readonly name?: string;
117
- };
24
+ }[];
118
25
  readonly plugins?: TPlugins;
119
26
  /**
120
- * Custom tool registry implementation. Defaults to an in-memory store.
121
- * Implement the promise-shaped `ToolRegistry` interface to persist tool
122
- * metadata to a database, remote service, etc.
123
- */
124
- readonly tools?: ToolRegistry;
125
- /** Custom source registry implementation. Defaults to an in-memory store. */
126
- readonly sources?: SourceRegistry;
127
- /**
128
- * Custom secret store implementation. Defaults to an in-memory store.
129
- * For most use cases, prefer passing a custom `SecretProvider` via
130
- * `executor.secrets.addProvider(...)` — only replace the whole store if you
131
- * need to persist the `SecretRef` metadata itself.
27
+ * How to respond when a tool requests user input mid-invocation. Pass
28
+ * `"accept-all"` for tests / non-interactive hosts, or a handler
29
+ * `(ctx) => Promise<ElicitationResponse>` for interactive ones.
30
+ * Required at construction so per-invoke calls don't have to thread
31
+ * an options arg.
132
32
  */
133
- readonly secrets?: SecretStore;
134
- /** Custom policy engine implementation. Defaults to an in-memory store. */
135
- readonly policies?: PolicyEngine;
33
+ readonly onElicitation: OnElicitation;
136
34
  }
137
- export declare const createExecutor: <const TPlugins extends readonly AnyPlugin[] = []>(config?: ExecutorConfig<TPlugins>) => Promise<Executor<TPlugins>>;
35
+ export declare const createExecutor: <const TPlugins extends readonly AnyPlugin[] = []>(config: ExecutorConfig<TPlugins>) => Promise<Executor<TPlugins>>;
138
36
  export {};
139
37
  //# sourceMappingURL=promise-executor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"promise-executor.d.ts","sourceRoot":"","sources":["../src/promise-executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAQ,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE/C,OAAO,EAWL,KAAK,YAAY,IAAI,gBAAgB,EACrC,KAAK,cAAc,IAAI,kBAAkB,EACzC,KAAK,WAAW,IAAI,eAAe,EACnC,KAAK,YAAY,IAAI,gBAAgB,EAErC,KAAK,cAAc,EAGnB,KAAK,kBAAkB,EAEvB,KAAK,oBAAoB,EACzB,KAAK,YAAY,EACjB,KAA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AAC,CAAC,CAAC,CAAC,CAAC;CAAE,GAC9C,CAAC,CAAC;AAEV,MAAM,MAAM,QAAQ,CAAC,QAAQ,SAAS,SAAS,SAAS,EAAE,GAAG,EAAE,IAAI,WAAW,CAC5E,cAAc,CAAC,QAAQ,CAAC,CACzB,CAAC;AAEF,MAAM,WAAW,cAAc,CAAC,QAAQ,SAAS,SAAS,SAAS,EAAE,GAAG,EAAE;IACxE;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS;QAAE,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC9E,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC;IAC5B;;;;;;OAMG;IACH,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;CACvC;AAyDD,eAAO,MAAM,cAAc,GACzB,KAAK,CAAC,QAAQ,SAAS,SAAS,SAAS,EAAE,GAAG,EAAE,EAEhD,QAAQ,cAAc,CAAC,QAAQ,CAAC,KAC/B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAyC5B,CAAC"}
package/dist/promise.d.ts CHANGED
@@ -1,7 +1,13 @@
1
- export { createExecutor, type Executor, type ExecutorConfig, type AnyPlugin, } from "./promise-executor";
2
- export { definePlugin, type Plugin, type PluginContext, type PluginHandle, } from "./promise-executor";
3
- export type { ToolRegistry, SourceRegistry, SecretStore, PolicyEngine } from "./promise-executor";
4
- export type { ToolInvoker, RuntimeToolHandler, SourceManager, SecretProvider, } from "./promise-executor";
5
- export type { InvokeOptions, ElicitationHandler, ElicitationResponse } from "./promise-executor";
6
- export { ToolRegistration, ToolInvocationResult, ToolMetadata, ToolSchema, ToolAnnotations, ToolListFilter, ToolId, SecretId, ScopeId, PolicyId, Source, SourceDetectionResult, SecretRef, Policy, Scope, FormElicitation, UrlElicitation, type ElicitationContext, type ElicitationRequest, ToolNotFoundError, ToolInvocationError, SecretNotFoundError, SecretResolutionError, PolicyDeniedError, ElicitationDeclinedError, } from "./index";
1
+ export { createExecutor, type Executor, type ExecutorConfig, type Promisified, } from "./promise-executor";
2
+ export { ScopeId, ToolId, SecretId, PolicyId } from "./ids";
3
+ export { Scope } from "./scope";
4
+ export { SecretRef, SetSecretInput } from "./secrets";
5
+ export { ToolSchema, SourceDetectionResult, type Source, type Tool, type ToolListFilter, } from "./types";
6
+ export type { ToolAnnotations } from "./core-schema";
7
+ export type { AnyPlugin, PluginExtensions } from "./plugin";
8
+ export type { OnElicitation, InvokeOptions } from "./executor";
9
+ export { FormElicitation, UrlElicitation, ElicitationAction, ElicitationResponse, type ElicitationRequest, type ElicitationContext, type ElicitationHandler, } from "./elicitation";
10
+ export { SecretBackedValue, SecretBackedMap, isSecretBackedRef, resolveSecretBackedMap, type ResolveSecretBackedMapOptions, } from "./secret-backed-value";
11
+ export { defineExecutorConfig, type ExecutorCliConfig, type ExecutorDialect, } from "./config";
12
+ export { ToolNotFoundError, ToolInvocationError, NoHandlerError, SourceNotFoundError, SourceRemovalNotAllowedError, PluginNotLoadedError, SecretNotFoundError, SecretResolutionError, type ExecutorError, } from "./errors";
7
13
  //# sourceMappingURL=promise.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"promise.d.ts","sourceRoot":"","sources":["../src/promise.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,SAAS,GACf,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,YAAY,EACZ,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlG,YAAY,EACV,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,cAAc,GACf,MAAM,oBAAoB,CAAC;AA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AAe,CAAC;AAKvB,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,KAAK,6BAA6B,GACnC,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EACL,oBAAoB,EACpB,KAAK,iBAAiB,EACtB,KAAK,eAAe,GACrB,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,4BAA4B,EAC5B,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,KAAK,aAAa,GACnB,MAAM,UAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=promise.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promise.test.d.ts","sourceRoot":"","sources":["../src/promise.test.ts"],"names":[],"mappings":""}
@@ -11,14 +11,15 @@ export type TypeScriptSchemaPreview = {
11
11
  };
12
12
  export declare const schemaToTypeScriptPreview: (schema: unknown, options?: TypeScriptRenderOptions) => TypeScriptSchemaPreview;
13
13
  export declare const schemaToTypeScriptPreviewWithDefs: (schema: unknown, defs: ReadonlyMap<string, unknown>, options?: TypeScriptRenderOptions) => TypeScriptSchemaPreview;
14
+ export type ToolTypeScriptPreview = {
15
+ inputTypeScript?: string;
16
+ outputTypeScript?: string;
17
+ typeScriptDefinitions?: Record<string, string>;
18
+ };
14
19
  export declare const buildToolTypeScriptPreview: (input: {
15
20
  inputSchema?: unknown;
16
21
  outputSchema?: unknown;
17
22
  defs: ReadonlyMap<string, unknown>;
18
23
  options?: TypeScriptRenderOptions;
19
- }) => {
20
- inputTypeScript?: string;
21
- outputTypeScript?: string;
22
- typeScriptDefinitions?: Record<string, string>;
23
- };
24
+ }) => ToolTypeScriptPreview;
24
25
  //# sourceMappingURL=schema-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema-types.d.ts","sourceRoot":"","sources":["../src/schema-types.ts"],"names":[],"mappings":"AAEA,MA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AC;IACrB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9C,CAAC;AAgGF,eAAO,MAAM,yBAAyB,GACpC,QAAQ,OAAO,EACf,UAAS,uBAA4B,KACpC,uBAGF,CAAC;AAEF,eAAO,MAAM,iCAAiC,GAC5C,QAAQ,OAAO,EACf,MAAM,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,UAAS,uBAA4B,KACpC,uBAmPF,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qBAAqB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChD,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,OAAO;IAChD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,IAAI,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,uBAAuB,CAAC;CACnC,KAAG,qBAsBH,CAAC"}
package/dist/scope.d.ts CHANGED
@@ -1,19 +1,9 @@
1
1
  import { Schema } from "effect";
2
- declare const Scope_base: Schema.Class<Scope, {
3
- id: Schema.brand<typeof Schema.String, "ScopeId">;
4
- name: typeof Schema.String;
5
- createdAt: typeof Schema.DateFromNumber;
6
- }, Schema.Struct.Encoded<{
7
- id: Schema.brand<typeof Schema.String, "ScopeId">;
8
- name: typeof Schema.String;
9
- createdAt: typeof Schema.DateFromNumber;
10
- }>, never, {
11
- readonly id: string & import("effect/Brand").Brand<"ScopeId">;
12
- } & {
13
- readonly name: string;
14
- } & {
15
- readonly createdAt: Date;
16
- }, {}, {}>;
2
+ declare const Scope_base: Schema.Class<Scope, Schema.Struct<{
3
+ readonly id: Schema.brand<Schema.String, "ScopeId">;
4
+ readonly name: Schema.String;
5
+ readonly createdAt: Schema.Date;
6
+ }>, {}>;
17
7
  export declare class Scope extends Scope_base {
18
8
  }
19
9
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;;;;;;;;;;;;;;;;AAIhC,qBAAa,KAAM,SAAQ,UAIzB;CAAG"}
1
+ {"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;;;;;;AAIhC,qBAAa,KAAM,SAAQ,UAIzB;CAAG"}
@@ -0,0 +1,13 @@
1
+ import { type DBAdapter, type DBSchema } from "@executor-js/storage-core";
2
+ export interface ScopeContext {
3
+ /**
4
+ * Precedence-ordered list of scope ids the wrapper accepts on reads
5
+ * and writes. Innermost first. Reads walk every scope in the list
6
+ * (via `scope_id IN (...)`); writes must name one of them explicitly
7
+ * via `scope_id` in the payload.
8
+ */
9
+ readonly scopes: readonly string[];
10
+ }
11
+ export declare const scopeAdapter: (inner: DBAdapter, ctx: ScopeContext, schema: DBSchema) => DBAdapter;
12
+ export declare const __scopeField = "scope_id";
13
+ //# sourceMappingURL=scoped-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scoped-adapter.d.ts","sourceRoot":"","sources":["../src/scoped-adapter.ts"],"names":[],"mappings":"AAuBA,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,QAAQ,EAGd,MAAM,2BAA2B,CAAC;AAInC,MAAM,WAAW,YAAY;IAC3B;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC;AA0KD,eAAO,MAAM,YAAY,GACvB,OAAO,SAAS,EAChB,KAAK,YAAY,EACjB,QAAQ,QAAQ,KACf,SAiBF,CAAC;AAEF,eAAO,MAAM,YAAY,aAAc,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=scoped-adapter.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scoped-adapter.test.d.ts","sourceRoot":"","sources":["../src/scoped-adapter.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,27 @@
1
+ import { Effect, Schema } from "effect";
2
+ export declare const SecretBackedValue: Schema.Union<readonly [Schema.String, Schema.Struct<{
3
+ readonly secretId: Schema.String;
4
+ readonly prefix: Schema.optional<Schema.String>;
5
+ }>]>;
6
+ export type SecretBackedValue = typeof SecretBackedValue.Type;
7
+ export declare const SecretBackedMap: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Struct<{
8
+ readonly secretId: Schema.String;
9
+ readonly prefix: Schema.optional<Schema.String>;
10
+ }>]>>;
11
+ export type SecretBackedMap = typeof SecretBackedMap.Type;
12
+ export declare const isSecretBackedRef: (value: SecretBackedValue) => value is Extract<SecretBackedValue, {
13
+ readonly secretId: string;
14
+ }>;
15
+ export type ResolveSecretBackedMapOptions<E, E2> = {
16
+ readonly values: Record<string, SecretBackedValue> | undefined;
17
+ readonly getSecret: (secretId: string) => Effect.Effect<string | null, E>;
18
+ readonly onMissing: (name: string, value: Extract<SecretBackedValue, {
19
+ readonly secretId: string;
20
+ }>) => E2;
21
+ readonly onError?: (error: E, name: string, value: Extract<SecretBackedValue, {
22
+ readonly secretId: string;
23
+ }>) => E | E2;
24
+ readonly missing?: "fail" | "drop";
25
+ };
26
+ export declare const resolveSecretBackedMap: <E, E2 = E>({ values, getSecret, onMissing, onError, missing, }: ResolveSecretBackedMapOptions<E, E2>) => Effect.Effect<Record<string, string> | undefined, E | E2>;
27
+ //# sourceMappingURL=secret-backed-value.d.ts.map
@@ -0,0 +1 @@
1
+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ACpC,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,qDAM/C,6BAA6B,CAAC,CAAC,EAAE,EAAE,CAAC,KAAG,MAAM,CAAC,MAAM,CACrD,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EAClC,CAAC,GAAG,EAAE,CA2BP,CAAC"}
package/dist/secrets.d.ts CHANGED
@@ -1,118 +1,64 @@
1
- import { Context, Effect, Schema } from "effect";
2
- import { SecretId, ScopeId } from "./ids";
3
- import { SecretNotFoundError, SecretResolutionError } from "./errors";
1
+ import { Effect, Schema } from "effect";
2
+ import type { StorageFailure } from "@executor-js/storage-core";
4
3
  export interface SecretProvider {
5
- /** Unique key (e.g. "keychain", "env", "1password", "memory") */
4
+ /** Unique key (e.g. "keychain", "env", "1password", "memory"). */
6
5
  readonly key: string;
7
- /** Whether this provider supports writing */
6
+ /** If false, `set` and `delete` are never called. The executor
7
+ * honours this before routing writes — trying to write to a
8
+ * read-only provider is an error, not a silent drop. */
8
9
  readonly writable: boolean;
9
- /** Get a secret value by key. Returns null if not found. */
10
- readonly get: (key: string) => Effect.Effect<string | null>;
11
- /** Set a secret value. Only called on writable providers. */
12
- readonly set?: (key: string, value: string) => Effect.Effect<void>;
13
- /** Delete a secret. Only called on writable providers. */
14
- readonly delete?: (key: string) => Effect.Effect<boolean>;
15
- /** List known secret entries. Optional not all providers can enumerate. */
10
+ /** Get a secret value. `scope` is the executor scope the lookup is
11
+ * being made on behalf of providers that partition their storage
12
+ * by scope (memory, keychain via service name, per-vault in
13
+ * 1password) use it; providers without tenancy ignore it and fall
14
+ * back to a flat lookup. Failures (provider unreachable, decryption
15
+ * failed, etc.) surface as `StorageFailure` — the executor treats
16
+ * a provider call the same as a DB call; `StorageError` is captured
17
+ * at the HTTP edge to `InternalError`, `UniqueViolationError` dies. */
18
+ readonly get: (id: string, scope: string) => Effect.Effect<string | null, StorageFailure>;
19
+ /** Check whether a provider has a backing value without returning it.
20
+ * Providers that can answer this cheaply should implement it so
21
+ * stale core routing rows don't appear as selectable secrets. */
22
+ readonly has?: (id: string, scope: string) => Effect.Effect<boolean, StorageFailure>;
23
+ /** Set a secret value at a named scope. Only called on writable
24
+ * providers. Providers that partition by scope use this arg to
25
+ * decide where to write; flat providers ignore it. */
26
+ readonly set?: (id: string, value: string, scope: string) => Effect.Effect<void, StorageFailure>;
27
+ /** Delete a secret at a named scope. Only called on writable providers.
28
+ * Returns true if something was deleted. */
29
+ readonly delete?: (id: string, scope: string) => Effect.Effect<boolean, StorageFailure>;
30
+ /** Enumerate known secret entries. Optional — not all backends can
31
+ * enumerate (env-backed providers, for example). */
16
32
  readonly list?: () => Effect.Effect<readonly {
17
- id: string;
18
- name: string;
19
- }[]>;
33
+ readonly id: string;
34
+ readonly name: string;
35
+ }[], StorageFailure>;
20
36
  }
21
- declare const SecretRef_base: Schema.Class<SecretRef, {
22
- id: Schema.brand<typeof Schema.String, "SecretId">;
23
- scopeId: Schema.brand<typeof Schema.String, "ScopeId">;
37
+ declare const SecretRef_base: Schema.Class<SecretRef, Schema.Struct<{
38
+ readonly id: Schema.brand<Schema.String, "SecretId">;
39
+ readonly scopeId: Schema.brand<Schema.String, "ScopeId">;
24
40
  /** Human-readable label (e.g. "Cloudflare API Token") */
25
- name: typeof Schema.String;
26
- /** Optional: pin to a specific provider */
27
- provider: Schema.optionalWith<typeof Schema.String, {
28
- as: "Option";
29
- }>;
30
- /** What this secret is for */
31
- purpose: Schema.optional<typeof Schema.String>;
32
- createdAt: typeof Schema.DateFromNumber;
33
- }, Schema.Struct.Encoded<{
34
- id: Schema.brand<typeof Schema.String, "SecretId">;
35
- scopeId: Schema.brand<typeof Schema.String, "ScopeId">;
36
- /** Human-readable label (e.g. "Cloudflare API Token") */
37
- name: typeof Schema.String;
38
- /** Optional: pin to a specific provider */
39
- provider: Schema.optionalWith<typeof Schema.String, {
40
- as: "Option";
41
- }>;
42
- /** What this secret is for */
43
- purpose: Schema.optional<typeof Schema.String>;
44
- createdAt: typeof Schema.DateFromNumber;
45
- }>, never, {
46
- readonly id: string & import("effect/Brand").Brand<"SecretId">;
47
- } & {
48
- readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
49
- } & {
50
- readonly name: string;
51
- } & {
52
- readonly createdAt: Date;
53
- } & {
54
- readonly provider: import("effect/Option").Option<string>;
55
- } & {
56
- readonly purpose?: string | undefined;
57
- }, {}, {}>;
41
+ readonly name: Schema.String;
42
+ /** Which provider holds the value */
43
+ readonly provider: Schema.String;
44
+ readonly createdAt: Schema.Date;
45
+ }>, {}>;
58
46
  export declare class SecretRef extends SecretRef_base {
59
47
  }
60
- declare const SetSecretInput_base: Schema.Class<SetSecretInput, {
61
- id: Schema.brand<typeof Schema.String, "SecretId">;
62
- scopeId: Schema.brand<typeof Schema.String, "ScopeId">;
63
- name: typeof Schema.String;
64
- value: typeof Schema.String;
65
- provider: Schema.optional<typeof Schema.String>;
66
- purpose: Schema.optional<typeof Schema.String>;
67
- }, Schema.Struct.Encoded<{
68
- id: Schema.brand<typeof Schema.String, "SecretId">;
69
- scopeId: Schema.brand<typeof Schema.String, "ScopeId">;
70
- name: typeof Schema.String;
71
- value: typeof Schema.String;
72
- provider: Schema.optional<typeof Schema.String>;
73
- purpose: Schema.optional<typeof Schema.String>;
74
- }>, never, {
75
- readonly value: string;
76
- } & {
77
- readonly id: string & import("effect/Brand").Brand<"SecretId">;
78
- } & {
79
- readonly scopeId: string & import("effect/Brand").Brand<"ScopeId">;
80
- } & {
81
- readonly name: string;
82
- } & {
83
- readonly provider?: string | undefined;
84
- } & {
85
- readonly purpose?: string | undefined;
86
- }, {}, {}>;
48
+ declare const SetSecretInput_base: Schema.Class<SetSecretInput, Schema.Struct<{
49
+ readonly id: Schema.brand<Schema.String, "SecretId">;
50
+ /** Scope id to own this secret. Must be one of the executor's
51
+ * configured scopes. */
52
+ readonly scope: Schema.brand<Schema.String, "ScopeId">;
53
+ /** Display name shown in secret-list UI. */
54
+ readonly name: Schema.String;
55
+ /** The secret value itself — never persisted outside the provider. */
56
+ readonly value: Schema.String;
57
+ /** Optional provider routing. If unset the executor picks the first
58
+ * writable provider in registration order. */
59
+ readonly provider: Schema.optional<Schema.String>;
60
+ }>, {}>;
87
61
  export declare class SetSecretInput extends SetSecretInput_base {
88
62
  }
89
- declare const SecretStore_base: Context.TagClass<SecretStore, "@executor-js/sdk/SecretStore", {
90
- /** List all secret refs for a scope */
91
- readonly list: (scopeId: ScopeId) => Effect.Effect<readonly SecretRef[]>;
92
- /** Get a specific secret ref by id */
93
- readonly get: (secretId: SecretId) => Effect.Effect<SecretRef, SecretNotFoundError>;
94
- /**
95
- * Resolve a secret value by id.
96
- * Walks the provider chain (and optionally scope chain) to find the value.
97
- */
98
- readonly resolve: (secretId: SecretId, scopeId: ScopeId) => Effect.Effect<string, SecretNotFoundError | SecretResolutionError>;
99
- /**
100
- * Check if a secret can be resolved.
101
- */
102
- readonly status: (secretId: SecretId, scopeId: ScopeId) => Effect.Effect<"resolved" | "missing">;
103
- /**
104
- * Store a secret value. Creates a ref and writes the value to the
105
- * preferred writable provider.
106
- */
107
- readonly set: (input: SetSecretInput) => Effect.Effect<SecretRef, SecretResolutionError>;
108
- /** Remove a secret ref and its value from the provider */
109
- readonly remove: (secretId: SecretId) => Effect.Effect<boolean, SecretNotFoundError>;
110
- /** Register a secret provider */
111
- readonly addProvider: (provider: SecretProvider) => Effect.Effect<void>;
112
- /** List registered provider keys */
113
- readonly providers: () => Effect.Effect<readonly string[]>;
114
- }>;
115
- export declare class SecretStore extends SecretStore_base {
116
- }
117
63
  export {};
118
64
  //# sourceMappingURL=secrets.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../src/secrets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,OAAO,E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;;sEAEkE;IAClE,QAAQ,CAAC,GAAG,CAAC,EAAE,CACb,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,KACV,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IAC5C;;2DAEuD;IACvD,QAAQ,CAAC,GAAG,CAAC,EAAE,CACb,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,KACV,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;IACzC;iDAC6C;IAC7C,QAAQ,CAAC,MAAM,CAAC,EAAE,CAChB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,KACV,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IAC5C;yDACqD;IACrD,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,CACjC,SAAS;QAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,EACzD,cAAc,CACf,CAAC;CACH;;;;IAWC,yDAAyD;;IAEzD,qCAAqC;;;;AALvC,qBAAa,SAAU,SAAQ,cAQ7B;CAAG;;;IAiBH;6BACyB;;IAEzB,4CAA4C;;IAE5C,sEAAsE;;IAEtE;mDAC+C;;;AAZjD,qBAAa,cAAe,SAAQ,mBAclC;CAAG"}
package/dist/testing.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  import type { ExecutorConfig } from "./executor";
2
- import type { ExecutorPlugin } from "./plugin";
3
- export declare const makeTestConfig: <const TPlugins extends readonly ExecutorPlugin<string, object>[] = []>(options?: {
4
- readonly cwd?: string;
2
+ import type { AnyPlugin } from "./plugin";
3
+ import { Scope } from "./scope";
4
+ export declare const makeTestConfig: <const TPlugins extends readonly AnyPlugin[] = []>(options?: {
5
+ readonly scopeName?: string;
6
+ readonly scopes?: readonly Scope[];
5
7
  readonly plugins?: TPlugins;
6
8
  }) => ExecutorConfig<TPlugins>;
7
9
  //# sourceMappingURL=testing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../src/testing.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAW/C,eAAO,MAAM,cAAc,GACzB,KAAK,CAAC,QAAQ,SAAS,SAAS,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,EAAE,EACrE,UAAU;IACV,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC;CAC7B,KAAG,cAAc,CAAC,QAAQ,CAgB1B,CAAC"}
1
+ {"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../src/testing.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAGjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAWhC,eAAO,MAAM,cAAc,GACzB,KAAK,CAAC,QAAQ,SAAS,SAAS,SAAS,EAAE,GAAG,EAAE,EAChD,UAAU;IACV,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,KAAK,EAAE,CAAC;IACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC;CAC7B,KAAG,cAAc,CAAC,QAAQ,CAsB1B,CAAC"}