@executor-js/sdk 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/README.md +21 -29
  2. package/dist/api-errors.d.ts +10 -0
  3. package/dist/api-errors.d.ts.map +1 -0
  4. package/dist/blob.d.ts.map +1 -1
  5. package/dist/chunk-6SQWMOM4.js +51 -0
  6. package/dist/chunk-6SQWMOM4.js.map +1 -0
  7. package/dist/chunk-NPWV4R3N.js +5563 -0
  8. package/dist/chunk-NPWV4R3N.js.map +1 -0
  9. package/dist/chunk-QQK7X3DM.js +103 -0
  10. package/dist/chunk-QQK7X3DM.js.map +1 -0
  11. package/dist/client.d.ts +2 -5
  12. package/dist/client.d.ts.map +1 -1
  13. package/dist/client.js +12 -18
  14. package/dist/client.js.map +1 -1
  15. package/dist/connections.d.ts +7 -0
  16. package/dist/connections.d.ts.map +1 -1
  17. package/dist/core-schema.d.ts +83 -3
  18. package/dist/core-schema.d.ts.map +1 -1
  19. package/dist/core.js +94 -52
  20. package/dist/core.js.map +1 -1
  21. package/dist/credential-bindings.d.ts +173 -0
  22. package/dist/credential-bindings.d.ts.map +1 -0
  23. package/dist/credential-bindings.test.d.ts +2 -0
  24. package/dist/credential-bindings.test.d.ts.map +1 -0
  25. package/dist/errors.d.ts +27 -5
  26. package/dist/errors.d.ts.map +1 -1
  27. package/dist/executor.d.ts +47 -13
  28. package/dist/executor.d.ts.map +1 -1
  29. package/dist/hosted-http-client.d.ts +17 -0
  30. package/dist/hosted-http-client.d.ts.map +1 -0
  31. package/dist/hosted-http-client.test.d.ts +2 -0
  32. package/dist/hosted-http-client.test.d.ts.map +1 -0
  33. package/dist/ids.d.ts +2 -0
  34. package/dist/ids.d.ts.map +1 -1
  35. package/dist/index.d.ts +15 -10
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +16 -18
  38. package/dist/index.js.map +1 -1
  39. package/dist/oauth-discovery.d.ts +19 -4
  40. package/dist/oauth-discovery.d.ts.map +1 -1
  41. package/dist/oauth-helpers.d.ts +21 -0
  42. package/dist/oauth-helpers.d.ts.map +1 -1
  43. package/dist/oauth-popup-types.d.ts.map +1 -1
  44. package/dist/oauth-service.d.ts +16 -5
  45. package/dist/oauth-service.d.ts.map +1 -1
  46. package/dist/oauth.d.ts +19 -16
  47. package/dist/oauth.d.ts.map +1 -1
  48. package/dist/oxlint-plugin-executor.test.d.ts +2 -0
  49. package/dist/oxlint-plugin-executor.test.d.ts.map +1 -0
  50. package/dist/plugin.d.ts +84 -19
  51. package/dist/plugin.d.ts.map +1 -1
  52. package/dist/policies.d.ts +10 -15
  53. package/dist/policies.d.ts.map +1 -1
  54. package/dist/promise-executor.d.ts.map +1 -1
  55. package/dist/promise.d.ts +5 -3
  56. package/dist/promise.d.ts.map +1 -1
  57. package/dist/schema-types.d.ts.map +1 -1
  58. package/dist/scoped-adapter.d.ts +17 -2
  59. package/dist/scoped-adapter.d.ts.map +1 -1
  60. package/dist/secrets.d.ts +12 -0
  61. package/dist/secrets.d.ts.map +1 -1
  62. package/dist/test-config.d.ts +10 -0
  63. package/dist/test-config.d.ts.map +1 -0
  64. package/dist/testing.d.ts +30 -8
  65. package/dist/testing.d.ts.map +1 -1
  66. package/dist/testing.js +56 -0
  67. package/dist/testing.js.map +1 -0
  68. package/dist/types.d.ts +11 -3
  69. package/dist/types.d.ts.map +1 -1
  70. package/dist/usage-visibility.test.d.ts +2 -0
  71. package/dist/usage-visibility.test.d.ts.map +1 -0
  72. package/dist/usages.d.ts +20 -0
  73. package/dist/usages.d.ts.map +1 -0
  74. package/package.json +26 -14
  75. package/dist/chunk-2WV7VSNL.js +0 -4440
  76. package/dist/chunk-2WV7VSNL.js.map +0 -1
package/dist/promise.d.ts CHANGED
@@ -1,13 +1,15 @@
1
1
  export { createExecutor, type Executor, type ExecutorConfig, type Promisified, } from "./promise-executor";
2
2
  export { ScopeId, ToolId, SecretId, PolicyId } from "./ids";
3
3
  export { Scope } from "./scope";
4
- export { SecretRef, SetSecretInput } from "./secrets";
5
- export { ToolSchema, SourceDetectionResult, type Source, type Tool, type ToolListFilter, } from "./types";
4
+ export { RemoveConnectionInput } from "./connections";
5
+ export { RemoveSecretInput, SecretRef, SetSecretInput } from "./secrets";
6
+ export type { CreateToolPolicyInput, RemoveToolPolicyInput, UpdateToolPolicyInput, } from "./policies";
7
+ export { ToolSchema, SourceDetectionResult, type RefreshSourceInput, type RemoveSourceInput, type Source, type Tool, type ToolListFilter, } from "./types";
6
8
  export type { ToolAnnotations } from "./core-schema";
7
9
  export type { AnyPlugin, PluginExtensions } from "./plugin";
8
10
  export type { OnElicitation, InvokeOptions } from "./executor";
9
11
  export { FormElicitation, UrlElicitation, ElicitationAction, ElicitationResponse, type ElicitationRequest, type ElicitationContext, type ElicitationHandler, } from "./elicitation";
10
12
  export { SecretBackedValue, SecretBackedMap, isSecretBackedRef, resolveSecretBackedMap, type ResolveSecretBackedMapOptions, } from "./secret-backed-value";
11
- export { defineExecutorConfig, type ExecutorCliConfig, type ExecutorDialect, } from "./config";
13
+ export { defineExecutorConfig, type ExecutorCliConfig, type ExecutorDialect } from "./config";
12
14
  export { ToolNotFoundError, ToolInvocationError, NoHandlerError, SourceNotFoundError, SourceRemovalNotAllowedError, PluginNotLoadedError, SecretNotFoundError, SecretResolutionError, type ExecutorError, } from "./errors";
13
15
  //# sourceMappingURL=promise.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"promise.d.ts","sourceRoot":"","sources":["../src/promise.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,cAAc,EACd,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,WAAW,GACjB,MAAM,oBAAoB,CAAC;AAK5B,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,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AE,cAAc,EAAE,MAAM,WAAW,CAAC;AACzE,YAAY,EACV,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,UAAU,EACV,qBAAqB,EACrB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,MAAM,EACX,KAAK,IAAI,EACT,KAAK,cAAc,GACpB,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5D,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAI/D,OAAO,EACL,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,GACxB,MAAM,eAAe,CAAC;AAKvB,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,KAAK,6BAA6B,GACnC,MAAM,uBAAuB,CAAC;AAI/B,OAAO,EAAE,oBAAoB,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAG9F,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,4BAA4B,EAC5B,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,KAAK,aAAa,GACnB,MAAM,UAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"schema-types.d.ts","sourceRoot":"","sources":["../src/schema-types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,uBAAuB,GAAG;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mBAA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B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9C,CAAC;AAwFF,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"}
@@ -1,4 +1,5 @@
1
- import { type DBAdapter, type DBSchema } from "@executor-js/storage-core";
1
+ import { type Brand } from "effect";
2
+ import { type DBAdapter, type DBSchema, type DBTransactionAdapter, type StorageFailure, type TypedAdapter } from "@executor-js/storage-core";
2
3
  export interface ScopeContext {
3
4
  /**
4
5
  * Precedence-ordered list of scope ids the wrapper accepts on reads
@@ -8,6 +9,20 @@ export interface ScopeContext {
8
9
  */
9
10
  readonly scopes: readonly string[];
10
11
  }
11
- export declare const scopeAdapter: (inner: DBAdapter, ctx: ScopeContext, schema: DBSchema) => DBAdapter;
12
+ /**
13
+ * Adapter that has already been wrapped by `scopeAdapter`. Executor/plugin
14
+ * internals should accept this branded type after construction, so a raw
15
+ * adapter cannot be threaded into scoped storage by accident.
16
+ */
17
+ export type ScopedDBAdapter = DBAdapter & Brand.Brand<"ScopedDBAdapter">;
18
+ /**
19
+ * Plugin-facing typed adapter derived from a `ScopedDBAdapter`. It has the
20
+ * same runtime shape as `TypedAdapter`, but the brand keeps StorageDeps from
21
+ * being satisfied by `typedAdapter(rawAdapter)`.
22
+ */
23
+ export type ScopedTypedAdapter<TSchema extends DBSchema> = TypedAdapter<TSchema, StorageFailure> & Brand.Brand<"ScopedTypedAdapter">;
24
+ export declare const scopedTypedAdapter: <TSchema extends DBSchema>(adapter: ScopedDBAdapter) => ScopedTypedAdapter<TSchema>;
25
+ export declare const scopeTransactionAdapter: (inner: DBTransactionAdapter, ctx: ScopeContext, schema: DBSchema) => DBTransactionAdapter;
26
+ export declare const scopeAdapter: (inner: DBAdapter, ctx: ScopeContext, schema: DBSchema) => ScopedDBAdapter;
12
27
  export declare const __scopeField = "scope_id";
13
28
  //# sourceMappingURL=scoped-adapter.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"scoped-adapter.d.ts","sourceRoot":"","sources":["../src/scoped-adapter.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAU,KAAK,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE5C,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,YAAY,EAElB,MAAM,2BAA2B,CAAC;AAInC,MAAM,WAAW,YAAY;IAC3B;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC;AAED;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;AAEzE;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,CAAC,OAAO,SAAS,QAAQ,IAAI,YAAY,CAAC,OAAO,EAAE,cAAc,CAAC,GAC9F,KAAK,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;AAEpC,eAAO,MAAM,kBAAkB,GAAI,OAAO,SAAS,QAAQ,EACzD,SAAS,eAAe,KACvB,kBAAkB,CAAC,OAAO,CAAkE,CAAC;AA0LhG,eAAO,MAAM,uBAAuB,GAClC,OAAO,oBAAoB,EAC3B,KAAK,YAAY,EACjB,QAAQ,QAAQ,KACf,oBAA8E,CAAC;AAElF,eAAO,MAAM,YAAY,GACvB,OAAO,SAAS,EAChB,KAAK,YAAY,EACjB,QAAQ,QAAQ,KACf,eAaF,CAAC;AAEF,eAAO,MAAM,YAAY,aAAc,CAAC"}
package/dist/secrets.d.ts CHANGED
@@ -33,6 +33,10 @@ export interface SecretProvider {
33
33
  readonly id: string;
34
34
  readonly name: string;
35
35
  }[], StorageFailure>;
36
+ /** Whether the provider may be asked during id-only fallback resolution.
37
+ * Providers whose own auth depends on `ctx.secrets.get` should opt out to
38
+ * avoid recursive fallback through themselves. */
39
+ readonly allowFallback?: boolean;
36
40
  }
37
41
  declare const SecretRef_base: Schema.Class<SecretRef, Schema.Struct<{
38
42
  readonly id: Schema.brand<Schema.String, "SecretId">;
@@ -60,5 +64,13 @@ declare const SetSecretInput_base: Schema.Class<SetSecretInput, Schema.Struct<{
60
64
  }>, {}>;
61
65
  export declare class SetSecretInput extends SetSecretInput_base {
62
66
  }
67
+ declare const RemoveSecretInput_base: Schema.Class<RemoveSecretInput, Schema.Struct<{
68
+ readonly id: Schema.brand<Schema.String, "SecretId">;
69
+ /** Scope id whose secret row/value should be removed. Must be one of
70
+ * the executor's configured scopes. */
71
+ readonly targetScope: Schema.brand<Schema.String, "ScopeId">;
72
+ }>, {}>;
73
+ export declare class RemoveSecretInput extends RemoveSecretInput_base {
74
+ }
63
75
  export {};
64
76
  //# sourceMappingURL=secrets.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../src/secrets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAExC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAehE,MAAM,WAAW,cAAc;IAC7B,kEAAkE;IAClE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB;;6DAEyD;IACzD,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B;;;;;;;4EAOwE;IACxE,QAAQ,CAAC,GAAG,EAAE,CACZ,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,MAAM,KACV,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,EAAE,cAAc,CAAC,CAAC;IAClD;;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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AAM,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;IACjG;iDAC6C;IAC7C,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IACxF;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;IACF;;uDAEmD;IACnD,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;CAClC;;;;IAWC,yDAAyD;;IAEzD,qCAAqC;;;;AALvC,qBAAa,SAAU,SAAQ,cAQ7B;CAAG;;;IAeH;6BACyB;;IAEzB,4CAA4C;;IAE5C,sEAAsE;;IAEtE;mDAC+C;;;AAVjD,qBAAa,cAAe,SAAQ,mBAYlC;CAAG;;;IAIH;4CACwC;;;AAH1C,qBAAa,iBAAkB,SAAQ,sBAKrC;CAAG"}
@@ -0,0 +1,10 @@
1
+ import type { ExecutorConfig } from "./executor";
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[];
7
+ readonly plugins?: TPlugins;
8
+ }) => ExecutorConfig<TPlugins>;
9
+ export declare const memorySecretsPlugin: import("./plugin").ConfiguredPlugin<"memory-secrets", object, {}, {}, undefined, undefined, import("effect/Layer").Layer<unknown, never, never>, import("effect/unstable/httpapi/HttpApiGroup").Any>;
10
+ //# sourceMappingURL=test-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-config.d.ts","sourceRoot":"","sources":["../src/test-config.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAGjD,OAAO,EAAgB,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAYhC,eAAO,MAAM,cAAc,GAAI,KAAK,CAAC,QAAQ,SAAS,SAAS,SAAS,EAAE,GAAG,EAAE,EAAE,UAAU;IACzF,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,CAqB1B,CAAC;AAEF,eAAO,MAAM,mBAAmB,sMA0B9B,CAAC"}
package/dist/testing.d.ts CHANGED
@@ -1,9 +1,31 @@
1
- import type { ExecutorConfig } from "./executor";
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[];
7
- readonly plugins?: TPlugins;
8
- }) => ExecutorConfig<TPlugins>;
1
+ import { Effect, Layer, Scope as EffectScope } from "effect";
2
+ import { HttpClient, HttpRouter, HttpServerRequest, HttpServerResponse } from "effect/unstable/http";
3
+ export { makeTestConfig, memorySecretsPlugin } from "./test-config";
4
+ declare const TestHttpServerAddressError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
5
+ readonly _tag: "TestHttpServerAddressError";
6
+ } & Readonly<A>;
7
+ export declare class TestHttpServerAddressError extends TestHttpServerAddressError_base<{
8
+ readonly address: unknown;
9
+ }> {
10
+ }
11
+ declare const TestHttpServerServeError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
12
+ readonly _tag: "TestHttpServerServeError";
13
+ } & Readonly<A>;
14
+ export declare class TestHttpServerServeError extends TestHttpServerServeError_base<{
15
+ readonly cause: unknown;
16
+ }> {
17
+ }
18
+ export interface TestHttpServerShape {
19
+ readonly baseUrl: string;
20
+ readonly httpClientLayer: Layer.Layer<HttpClient.HttpClient>;
21
+ readonly url: (path?: string) => string;
22
+ }
23
+ export type TestHttpRoute = HttpRouter.Route<any, any>;
24
+ export type TestHttpRequest = HttpServerRequest.HttpServerRequest;
25
+ export type TestHttpResponse = HttpServerResponse.HttpServerResponse;
26
+ export declare const testHttpRoute: <E = never, R = never>(method: "*" | import("effect/unstable/http/HttpMethod").HttpMethod, path: HttpRouter.PathInput, handler: HttpServerResponse.HttpServerResponse | Effect.Effect<HttpServerResponse.HttpServerResponse, E, R> | ((request: HttpServerRequest.HttpServerRequest) => Effect.Effect<HttpServerResponse.HttpServerResponse, E, R>), options?: {
27
+ readonly uninterruptible?: boolean | undefined;
28
+ }) => HttpRouter.Route<E, Exclude<R, HttpRouter.Provided>>;
29
+ export declare const serveTestHttpRoutes: (routes: readonly TestHttpRoute[]) => Effect.Effect<TestHttpServerShape, TestHttpServerAddressError | TestHttpServerServeError, EffectScope.Scope>;
30
+ export declare const serveTestHttpApp: (handler: (request: TestHttpRequest) => Effect.Effect<TestHttpResponse>) => Effect.Effect<TestHttpServerShape, TestHttpServerAddressError | TestHttpServerServeError, EffectScope.Scope>;
9
31
  //# sourceMappingURL=testing.d.ts.map
@@ -1 +1 @@
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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B,GAAG,kBAAkB,CAAC,kBAAkB,CAAC;AAErE,eAAO,MAAM,aAAa;4BAmD6rN,CAAC;0DAnD3qN,CAAC;AAE9C,eAAO,MAAM,mBAAmB,GAC9B,QAAQ,SAAS,aAAa,EAAE,KAC/B,MAAM,CAAC,MAAM,CACd,mBAAmB,EACnB,0BAA0B,GAAG,wBAAwB,EACrD,WAAW,CAAC,KAAK,CAOhB,CAAC;AAEJ,eAAO,MAAM,gBAAgB,GAC3B,SAAS,CAAC,OAAO,EAAE,eAAe,KAAK,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,KACrE,MAAM,CAAC,MAAM,CACd,mBAAmB,EACnB,0BAA0B,GAAG,wBAAwB,EACrD,WAAW,CAAC,KAAK,CAIhB,CAAC"}
@@ -0,0 +1,56 @@
1
+ import {
2
+ makeTestConfig,
3
+ memorySecretsPlugin
4
+ } from "./chunk-QQK7X3DM.js";
5
+ import "./chunk-NPWV4R3N.js";
6
+
7
+ // src/testing.ts
8
+ import * as NodeHttpServer from "@effect/platform-node/NodeHttpServer";
9
+ import { Context, Data, Effect, Layer, Predicate } from "effect";
10
+ import {
11
+ HttpClient,
12
+ HttpRouter,
13
+ HttpServer,
14
+ HttpServerRequest
15
+ } from "effect/unstable/http";
16
+ var TestHttpServerAddressError = class extends Data.TaggedError("TestHttpServerAddressError") {
17
+ };
18
+ var TestHttpServerServeError = class extends Data.TaggedError("TestHttpServerServeError") {
19
+ };
20
+ var testHttpRoute = HttpRouter.route;
21
+ var serveTestHttpRoutes = (routes) => makeTestHttpServer(
22
+ HttpRouter.serve(HttpRouter.addAll(routes), {
23
+ disableListenLog: true,
24
+ disableLogger: true
25
+ })
26
+ );
27
+ var serveTestHttpApp = (handler) => makeTestHttpServer(
28
+ HttpServer.serve(HttpServerRequest.HttpServerRequest.asEffect().pipe(Effect.flatMap(handler)))
29
+ );
30
+ var makeTestHttpServer = (serverLayer) => Effect.gen(function* () {
31
+ const context = yield* Layer.build(
32
+ Layer.fresh(serverLayer.pipe(Layer.provideMerge(NodeHttpServer.layerTest)))
33
+ ).pipe(Effect.mapError((cause) => new TestHttpServerServeError({ cause })));
34
+ const server = Context.get(context, HttpServer.HttpServer);
35
+ const address = server.address;
36
+ if (!Predicate.isTagged(address, "TcpAddress")) {
37
+ return yield* new TestHttpServerAddressError({ address });
38
+ }
39
+ const client = Context.get(context, HttpClient.HttpClient);
40
+ const baseUrl = `http://127.0.0.1:${address.port}`;
41
+ return {
42
+ baseUrl,
43
+ httpClientLayer: Layer.succeed(HttpClient.HttpClient, client),
44
+ url: (path = "") => new URL(path, baseUrl).toString()
45
+ };
46
+ });
47
+ export {
48
+ TestHttpServerAddressError,
49
+ TestHttpServerServeError,
50
+ makeTestConfig,
51
+ memorySecretsPlugin,
52
+ serveTestHttpApp,
53
+ serveTestHttpRoutes,
54
+ testHttpRoute
55
+ };
56
+ //# sourceMappingURL=testing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/testing.ts"],"sourcesContent":["import * as NodeHttpServer from \"@effect/platform-node/NodeHttpServer\";\nimport { Context, Data, Effect, Layer, Predicate, Scope as EffectScope } from \"effect\";\nimport {\n HttpClient,\n HttpRouter,\n HttpServer,\n HttpServerRequest,\n HttpServerResponse,\n} from \"effect/unstable/http\";\n\nexport { makeTestConfig, memorySecretsPlugin } from \"./test-config\";\n\nexport class TestHttpServerAddressError extends Data.TaggedError(\"TestHttpServerAddressError\")<{\n readonly address: unknown;\n}> {}\n\nexport class TestHttpServerServeError extends Data.TaggedError(\"TestHttpServerServeError\")<{\n readonly cause: unknown;\n}> {}\n\nexport interface TestHttpServerShape {\n readonly baseUrl: string;\n readonly httpClientLayer: Layer.Layer<HttpClient.HttpClient>;\n readonly url: (path?: string) => string;\n}\n\nexport type TestHttpRoute = HttpRouter.Route<any, any>;\nexport type TestHttpRequest = HttpServerRequest.HttpServerRequest;\nexport type TestHttpResponse = HttpServerResponse.HttpServerResponse;\n\nexport const testHttpRoute = HttpRouter.route;\n\nexport const serveTestHttpRoutes = (\n routes: readonly TestHttpRoute[],\n): Effect.Effect<\n TestHttpServerShape,\n TestHttpServerAddressError | TestHttpServerServeError,\n EffectScope.Scope\n> =>\n makeTestHttpServer(\n HttpRouter.serve(HttpRouter.addAll(routes), {\n disableListenLog: true,\n disableLogger: true,\n }),\n );\n\nexport const serveTestHttpApp = (\n handler: (request: TestHttpRequest) => Effect.Effect<TestHttpResponse>,\n): Effect.Effect<\n TestHttpServerShape,\n TestHttpServerAddressError | TestHttpServerServeError,\n EffectScope.Scope\n> =>\n makeTestHttpServer(\n HttpServer.serve(HttpServerRequest.HttpServerRequest.asEffect().pipe(Effect.flatMap(handler))),\n );\n\nconst makeTestHttpServer = (\n serverLayer: Layer.Layer<never, never, HttpServer.HttpServer>,\n): Effect.Effect<\n TestHttpServerShape,\n TestHttpServerAddressError | TestHttpServerServeError,\n EffectScope.Scope\n> =>\n Effect.gen(function* () {\n const context = yield* Layer.build(\n Layer.fresh(serverLayer.pipe(Layer.provideMerge(NodeHttpServer.layerTest))),\n ).pipe(Effect.mapError((cause) => new TestHttpServerServeError({ cause })));\n const server = Context.get(context, HttpServer.HttpServer);\n const address = server.address;\n if (!Predicate.isTagged(address, \"TcpAddress\")) {\n return yield* new TestHttpServerAddressError({ address });\n }\n const client = Context.get(context, HttpClient.HttpClient);\n const baseUrl = `http://127.0.0.1:${address.port}`;\n return {\n baseUrl,\n httpClientLayer: Layer.succeed(HttpClient.HttpClient, client),\n url: (path = \"\") => new URL(path, baseUrl).toString(),\n };\n });\n"],"mappings":";;;;;;;AAAA,YAAY,oBAAoB;AAChC,SAAS,SAAS,MAAM,QAAQ,OAAO,iBAAuC;AAC9E;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AAIA,IAAM,6BAAN,cAAyC,KAAK,YAAY,4BAA4B,EAE1F;AAAC;AAEG,IAAM,2BAAN,cAAuC,KAAK,YAAY,0BAA0B,EAEtF;AAAC;AAYG,IAAM,gBAAgB,WAAW;AAEjC,IAAM,sBAAsB,CACjC,WAMA;AAAA,EACE,WAAW,MAAM,WAAW,OAAO,MAAM,GAAG;AAAA,IAC1C,kBAAkB;AAAA,IAClB,eAAe;AAAA,EACjB,CAAC;AACH;AAEK,IAAM,mBAAmB,CAC9B,YAMA;AAAA,EACE,WAAW,MAAM,kBAAkB,kBAAkB,SAAS,EAAE,KAAK,OAAO,QAAQ,OAAO,CAAC,CAAC;AAC/F;AAEF,IAAM,qBAAqB,CACzB,gBAMA,OAAO,IAAI,aAAa;AACtB,QAAM,UAAU,OAAO,MAAM;AAAA,IAC3B,MAAM,MAAM,YAAY,KAAK,MAAM,aAA4B,wBAAS,CAAC,CAAC;AAAA,EAC5E,EAAE,KAAK,OAAO,SAAS,CAAC,UAAU,IAAI,yBAAyB,EAAE,MAAM,CAAC,CAAC,CAAC;AAC1E,QAAM,SAAS,QAAQ,IAAI,SAAS,WAAW,UAAU;AACzD,QAAM,UAAU,OAAO;AACvB,MAAI,CAAC,UAAU,SAAS,SAAS,YAAY,GAAG;AAC9C,WAAO,OAAO,IAAI,2BAA2B,EAAE,QAAQ,CAAC;AAAA,EAC1D;AACA,QAAM,SAAS,QAAQ,IAAI,SAAS,WAAW,UAAU;AACzD,QAAM,UAAU,oBAAoB,QAAQ,IAAI;AAChD,SAAO;AAAA,IACL;AAAA,IACA,iBAAiB,MAAM,QAAQ,WAAW,YAAY,MAAM;AAAA,IAC5D,KAAK,CAAC,OAAO,OAAO,IAAI,IAAI,MAAM,OAAO,EAAE,SAAS;AAAA,EACtD;AACF,CAAC;","names":[]}
package/dist/types.d.ts CHANGED
@@ -11,10 +11,10 @@ export interface Source {
11
11
  /** Which plugin owns this source. */
12
12
  readonly pluginId: string;
13
13
  /** Whether the user can remove this source via
14
- * `executor.sources.remove(id)`. `false` for static / built-in
15
- * sources declared by plugins at startup. */
14
+ * `executor.sources.remove({ id, targetScope })`. `false` for
15
+ * static / built-in sources declared by plugins at startup. */
16
16
  readonly canRemove: boolean;
17
- /** Whether the plugin supports `executor.sources.refresh(id)`. */
17
+ /** Whether the plugin supports `executor.sources.refresh({ id, targetScope })`. */
18
18
  readonly canRefresh: boolean;
19
19
  /** Whether the source has editable config (headers, base url, etc.).
20
20
  * Editing is done via plugin-specific extension methods
@@ -27,6 +27,14 @@ export interface Source {
27
27
  * user-added with this. */
28
28
  readonly runtime: boolean;
29
29
  }
30
+ export interface RemoveSourceInput {
31
+ readonly id: string;
32
+ readonly targetScope: string;
33
+ }
34
+ export interface RefreshSourceInput {
35
+ readonly id: string;
36
+ readonly targetScope: string;
37
+ }
30
38
  export interface Tool {
31
39
  readonly id: string;
32
40
  readonly sourceId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGrD,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB;2CACuC;IACvC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,qCAAqC;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;kDAE8C;IAC9C,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,kEAAkE;IAClE,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B;;;4BAGwB;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B;;;gCAG4B;IAC5B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,IAAI;IACnB,QAAQ,CAAC,EAAE,EA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IACvC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,wEAAwE;IACxE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,4DAA4D;IAC5D,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IACtC;;;8EAG0E;IAC1E,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;CACnC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=usage-visibility.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage-visibility.test.d.ts","sourceRoot":"","sources":["../src/usage-visibility.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,20 @@
1
+ import { Schema } from "effect";
2
+ import { SecretId, ConnectionId } from "./ids";
3
+ declare const Usage_base: Schema.Class<Usage, Schema.Struct<{
4
+ readonly pluginId: Schema.String;
5
+ readonly scopeId: Schema.brand<Schema.String, "ScopeId">;
6
+ readonly ownerKind: Schema.String;
7
+ readonly ownerId: Schema.String;
8
+ readonly ownerName: Schema.NullOr<Schema.String>;
9
+ readonly slot: Schema.String;
10
+ }>, {}>;
11
+ export declare class Usage extends Usage_base {
12
+ }
13
+ export interface UsagesForSecretInput {
14
+ readonly secretId: SecretId;
15
+ }
16
+ export interface UsagesForConnectionInput {
17
+ readonly connectionId: ConnectionId;
18
+ }
19
+ export {};
20
+ //# sourceMappingURL=usages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usages.d.ts","sourceRoot":"","sources":["../src/usages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAW,QAAQ,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;;;;;;;;;AAwBxD,qBAAa,KAAM,SAAQ,UAOzB;CAAG;AAEL,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;CAC7B;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;CACrC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@executor-js/sdk",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "homepage": "https://github.com/RhysSullivan/executor/tree/main/packages/core/sdk",
5
5
  "bugs": {
6
6
  "url": "https://github.com/RhysSullivan/executor/issues"
@@ -33,6 +33,12 @@
33
33
  "types": "./dist/client.d.ts",
34
34
  "default": "./dist/client.js"
35
35
  }
36
+ },
37
+ "./testing": {
38
+ "import": {
39
+ "types": "./dist/testing.d.ts",
40
+ "default": "./dist/testing.js"
41
+ }
36
42
  }
37
43
  },
38
44
  "publishConfig": {
@@ -45,31 +51,37 @@
45
51
  "typecheck:slow": "tsc --noEmit"
46
52
  },
47
53
  "dependencies": {
48
- "@executor-js/storage-core": "0.1.0",
54
+ "@executor-js/storage-core": "0.2.1",
55
+ "@standard-schema/spec": "^1.1.0",
49
56
  "effect": "4.0.0-beta.59",
50
- "oauth4webapi": "^3.8.5",
51
- "fractional-indexing": "^3.2.0"
57
+ "fractional-indexing": "^3.2.0",
58
+ "oauth4webapi": "^3.8.5"
59
+ },
60
+ "devDependencies": {
61
+ "@effect/atom-react": "4.0.0-beta.59",
62
+ "@effect/platform-node": "4.0.0-beta.59",
63
+ "@effect/vitest": "4.0.0-beta.59",
64
+ "@types/node": "^24.3.1",
65
+ "@types/react": "^19.1.0",
66
+ "react": "^19.1.0",
67
+ "tsup": "^8.5.0",
68
+ "typescript": "^5.9.3",
69
+ "vitest": "^4.1.5"
52
70
  },
53
71
  "peerDependencies": {
54
72
  "@effect/atom-react": "4.0.0-beta.59",
73
+ "@effect/platform-node": "4.0.0-beta.59",
55
74
  "react": "^19.1.0"
56
75
  },
57
76
  "peerDependenciesMeta": {
77
+ "@effect/platform-node": {
78
+ "optional": true
79
+ },
58
80
  "@effect/atom-react": {
59
81
  "optional": true
60
82
  },
61
83
  "react": {
62
84
  "optional": true
63
85
  }
64
- },
65
- "devDependencies": {
66
- "@effect/atom-react": "4.0.0-beta.59",
67
- "@effect/vitest": "4.0.0-beta.59",
68
- "@types/node": "^24.3.1",
69
- "@types/react": "^19.1.0",
70
- "react": "^19.1.0",
71
- "tsup": "^8.5.0",
72
- "typescript": "^5.9.3",
73
- "vitest": "^4.1.5"
74
86
  }
75
87
  }