@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
@@ -0,0 +1,84 @@
1
+ import { Schema } from "effect";
2
+ import type { ToolAnnotations } from "./core-schema";
3
+ export interface Source {
4
+ readonly id: string;
5
+ /** Owning scope of the visible source row. Present for dynamic
6
+ * sources; static sources omit it. */
7
+ readonly scopeId?: string;
8
+ readonly kind: string;
9
+ readonly name: string;
10
+ readonly url?: string;
11
+ /** Which plugin owns this source. */
12
+ readonly pluginId: string;
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. */
16
+ readonly canRemove: boolean;
17
+ /** Whether the plugin supports `executor.sources.refresh(id)`. */
18
+ readonly canRefresh: boolean;
19
+ /** Whether the source has editable config (headers, base url, etc.).
20
+ * Editing is done via plugin-specific extension methods
21
+ * (`executor.openapi.updateSource(id, patch)` etc.) — this flag is
22
+ * just a UI signal. */
23
+ readonly canEdit: boolean;
24
+ /** True if the source was declared statically by a plugin at startup
25
+ * (in-memory only, no DB row). False if it was added at runtime via
26
+ * `ctx.core.sources.register(...)`. UI differentiates built-in vs
27
+ * user-added with this. */
28
+ readonly runtime: boolean;
29
+ }
30
+ export interface Tool {
31
+ readonly id: string;
32
+ readonly sourceId: string;
33
+ /** Which plugin owns this tool. Matches the owning source's `pluginId`. */
34
+ readonly pluginId: string;
35
+ readonly name: string;
36
+ readonly description: string;
37
+ readonly inputSchema?: unknown;
38
+ readonly outputSchema?: unknown;
39
+ readonly annotations?: ToolAnnotations;
40
+ }
41
+ declare const ToolSchema_base: Schema.Class<ToolSchema, Schema.Struct<{
42
+ readonly id: Schema.brand<Schema.String, "ToolId">;
43
+ readonly name: Schema.optional<Schema.String>;
44
+ readonly description: Schema.optional<Schema.String>;
45
+ readonly inputSchema: Schema.optional<Schema.Unknown>;
46
+ readonly outputSchema: Schema.optional<Schema.Unknown>;
47
+ readonly inputTypeScript: Schema.optional<Schema.String>;
48
+ readonly outputTypeScript: Schema.optional<Schema.String>;
49
+ readonly typeScriptDefinitions: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
50
+ }>, {}>;
51
+ export declare class ToolSchema extends ToolSchema_base {
52
+ }
53
+ declare const SourceDetectionResult_base: Schema.Class<SourceDetectionResult, Schema.Struct<{
54
+ /** Plugin id that recognized the URL (e.g. "openapi", "graphql"). */
55
+ readonly kind: Schema.String;
56
+ /** Confidence tier — UI uses this to pick a winner when multiple
57
+ * plugins claim a URL. */
58
+ readonly confidence: Schema.Literals<readonly ["high", "medium", "low"]>;
59
+ /** The (possibly normalized) endpoint the plugin will use. */
60
+ readonly endpoint: Schema.String;
61
+ /** Human-readable name suggestion, typically derived from spec title
62
+ * or URL hostname. */
63
+ readonly name: Schema.String;
64
+ /** Namespace suggestion — the plugin's recommendation for the source
65
+ * id. UI may override. */
66
+ readonly namespace: Schema.String;
67
+ }>, {}>;
68
+ export declare class SourceDetectionResult extends SourceDetectionResult_base {
69
+ }
70
+ export interface ToolListFilter {
71
+ /** Only tools under this source id. */
72
+ readonly sourceId?: string;
73
+ /** Case-insensitive substring match against `name` OR `description`. */
74
+ readonly query?: string;
75
+ /** Resolve plugin-derived annotations. Defaults to true. */
76
+ readonly includeAnnotations?: boolean;
77
+ /** Include tools whose effective `tool_policy` is `block`. Defaults to
78
+ * `false` so the agent-facing surfaces (`searchTools`, sandbox `tools.list`)
79
+ * silently omit blocked tools. The settings UI for managing policies
80
+ * should pass `true` so users can author rules against blocked tools. */
81
+ readonly includeBlocked?: boolean;
82
+ }
83
+ export {};
84
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +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,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,WAAW,CAAC,EAAE,eAAe,CAAC;CACxC;;;;;;;;;;;AAUD,qBAAa,UAAW,SAAQ,eAW9B;CAAG;;IAaH,qEAAqE;;IAErE;+BAC2B;;IAE3B,8DAA8D;;IAE9D;2BACuB;;IAEvB;+BAC2B;;;AAd7B,qBAAa,qBAAsB,SAAQ,0BAgBzC;CAAG;AAML,MAAM,WAAW,cAAc;IAC7B,uCAAuC;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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@executor-js/sdk",
3
- "version": "0.0.1-beta.6",
3
+ "version": "0.0.2",
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"
@@ -39,13 +39,16 @@
39
39
  "typecheck:slow": "tsc --noEmit"
40
40
  },
41
41
  "dependencies": {
42
- "effect": "^3.21.0"
42
+ "@executor-js/storage-core": "0.0.2",
43
+ "effect": "4.0.0-beta.59",
44
+ "oauth4webapi": "^3.8.5",
45
+ "fractional-indexing": "^3.2.0"
43
46
  },
44
47
  "devDependencies": {
45
- "@effect/vitest": "^0.29.0",
48
+ "@effect/vitest": "4.0.0-beta.59",
46
49
  "@types/node": "^24.3.1",
47
50
  "tsup": "^8.5.0",
48
51
  "typescript": "^5.9.3",
49
- "vitest": "^4.1.3"
52
+ "vitest": "^4.1.5"
50
53
  }
51
54
  }