@executor-js/sdk 0.0.1 → 0.1.0
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/README.md +125 -107
- package/dist/blob.d.ts +48 -0
- package/dist/blob.d.ts.map +1 -0
- package/dist/blob.test.d.ts +2 -0
- package/dist/blob.test.d.ts.map +1 -0
- package/dist/chunk-2WV7VSNL.js +4440 -0
- package/dist/chunk-2WV7VSNL.js.map +1 -0
- package/dist/client.d.ts +135 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +87 -0
- package/dist/client.js.map +1 -0
- package/dist/client.test.d.ts +2 -0
- package/dist/client.test.d.ts.map +1 -0
- package/dist/config.d.ts +24 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/connections.d.ts +107 -0
- package/dist/connections.d.ts.map +1 -0
- package/dist/connections.test.d.ts +2 -0
- package/dist/connections.test.d.ts.map +1 -0
- package/dist/core-schema.d.ts +372 -0
- package/dist/core-schema.d.ts.map +1 -0
- package/dist/core.js +296 -57
- package/dist/core.js.map +1 -1
- package/dist/elicitation.d.ts +18 -34
- package/dist/elicitation.d.ts.map +1 -1
- package/dist/error-handling.test.d.ts +2 -0
- package/dist/error-handling.test.d.ts.map +1 -0
- package/dist/errors.d.ts +95 -24
- package/dist/errors.d.ts.map +1 -1
- package/dist/executor.d.ts +107 -48
- package/dist/executor.d.ts.map +1 -1
- package/dist/executor.test.d.ts +2 -0
- package/dist/executor.test.d.ts.map +1 -0
- package/dist/ids.d.ts +6 -4
- package/dist/ids.d.ts.map +1 -1
- package/dist/index.d.ts +24 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +80 -308
- package/dist/index.js.map +1 -1
- package/dist/oauth-discovery.d.ts +138 -0
- package/dist/oauth-discovery.d.ts.map +1 -0
- package/dist/oauth-discovery.test.d.ts +2 -0
- package/dist/oauth-discovery.test.d.ts.map +1 -0
- package/dist/oauth-helpers.d.ts +89 -0
- package/dist/oauth-helpers.d.ts.map +1 -0
- package/dist/oauth-helpers.test.d.ts +2 -0
- package/dist/oauth-helpers.test.d.ts.map +1 -0
- package/dist/oauth-popup-types.d.ts +14 -0
- package/dist/oauth-popup-types.d.ts.map +1 -0
- package/dist/oauth-service.d.ts +33 -0
- package/dist/oauth-service.d.ts.map +1 -0
- package/dist/oauth.d.ts +275 -0
- package/dist/oauth.d.ts.map +1 -0
- package/dist/plugin.d.ts +318 -28
- package/dist/plugin.d.ts.map +1 -1
- package/dist/policies.d.ts +56 -64
- package/dist/policies.d.ts.map +1 -1
- package/dist/policies.test.d.ts +2 -0
- package/dist/policies.test.d.ts.map +1 -0
- package/dist/promise-executor.d.ts +26 -128
- package/dist/promise-executor.d.ts.map +1 -1
- package/dist/promise.d.ts +12 -6
- package/dist/promise.d.ts.map +1 -1
- package/dist/promise.test.d.ts +2 -0
- package/dist/promise.test.d.ts.map +1 -0
- package/dist/schema-types.d.ts +6 -5
- package/dist/schema-types.d.ts.map +1 -1
- package/dist/scope.d.ts +5 -15
- package/dist/scope.d.ts.map +1 -1
- package/dist/scoped-adapter.d.ts +13 -0
- package/dist/scoped-adapter.d.ts.map +1 -0
- package/dist/scoped-adapter.test.d.ts +2 -0
- package/dist/scoped-adapter.test.d.ts.map +1 -0
- package/dist/secret-backed-value.d.ts +27 -0
- package/dist/secret-backed-value.d.ts.map +1 -0
- package/dist/secrets.d.ts +52 -106
- package/dist/secrets.d.ts.map +1 -1
- package/dist/testing.d.ts +5 -3
- package/dist/testing.d.ts.map +1 -1
- package/dist/types.d.ts +84 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +28 -4
- package/dist/chunk-D7CT3UMO.js +0 -1386
- package/dist/chunk-D7CT3UMO.js.map +0 -1
- package/dist/in-memory/policy-engine.d.ts +0 -10
- package/dist/in-memory/policy-engine.d.ts.map +0 -1
- package/dist/in-memory/secret-store.d.ts +0 -16
- package/dist/in-memory/secret-store.d.ts.map +0 -1
- package/dist/in-memory/tool-registry.d.ts +0 -35
- package/dist/in-memory/tool-registry.d.ts.map +0 -1
- package/dist/index.test.d.ts +0 -2
- package/dist/index.test.d.ts.map +0 -1
- package/dist/plugin-kv.d.ts +0 -48
- package/dist/plugin-kv.d.ts.map +0 -1
- package/dist/plugins/in-memory-tools.d.ts +0 -42
- package/dist/plugins/in-memory-tools.d.ts.map +0 -1
- package/dist/runtime-tools.d.ts +0 -41
- package/dist/runtime-tools.d.ts.map +0 -1
- package/dist/sources.d.ts +0 -130
- package/dist/sources.d.ts.map +0 -1
- package/dist/tools.d.ts +0 -219
- package/dist/tools.d.ts.map +0 -1
package/dist/types.d.ts
ADDED
|
@@ -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;IA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
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
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"
|
|
@@ -27,6 +27,12 @@
|
|
|
27
27
|
"types": "./dist/index.d.ts",
|
|
28
28
|
"default": "./dist/core.js"
|
|
29
29
|
}
|
|
30
|
+
},
|
|
31
|
+
"./client": {
|
|
32
|
+
"import": {
|
|
33
|
+
"types": "./dist/client.d.ts",
|
|
34
|
+
"default": "./dist/client.js"
|
|
35
|
+
}
|
|
30
36
|
}
|
|
31
37
|
},
|
|
32
38
|
"publishConfig": {
|
|
@@ -39,13 +45,31 @@
|
|
|
39
45
|
"typecheck:slow": "tsc --noEmit"
|
|
40
46
|
},
|
|
41
47
|
"dependencies": {
|
|
42
|
-
"
|
|
48
|
+
"@executor-js/storage-core": "0.1.0",
|
|
49
|
+
"effect": "4.0.0-beta.59",
|
|
50
|
+
"oauth4webapi": "^3.8.5",
|
|
51
|
+
"fractional-indexing": "^3.2.0"
|
|
52
|
+
},
|
|
53
|
+
"peerDependencies": {
|
|
54
|
+
"@effect/atom-react": "4.0.0-beta.59",
|
|
55
|
+
"react": "^19.1.0"
|
|
56
|
+
},
|
|
57
|
+
"peerDependenciesMeta": {
|
|
58
|
+
"@effect/atom-react": {
|
|
59
|
+
"optional": true
|
|
60
|
+
},
|
|
61
|
+
"react": {
|
|
62
|
+
"optional": true
|
|
63
|
+
}
|
|
43
64
|
},
|
|
44
65
|
"devDependencies": {
|
|
45
|
-
"@effect/
|
|
66
|
+
"@effect/atom-react": "4.0.0-beta.59",
|
|
67
|
+
"@effect/vitest": "4.0.0-beta.59",
|
|
46
68
|
"@types/node": "^24.3.1",
|
|
69
|
+
"@types/react": "^19.1.0",
|
|
70
|
+
"react": "^19.1.0",
|
|
47
71
|
"tsup": "^8.5.0",
|
|
48
72
|
"typescript": "^5.9.3",
|
|
49
|
-
"vitest": "^4.1.
|
|
73
|
+
"vitest": "^4.1.5"
|
|
50
74
|
}
|
|
51
75
|
}
|