@dxos/compute 0.8.4-main.c85a9c8dae → 0.8.4-main.d05539e30a
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/LICENSE +102 -5
- package/README.md +36 -1
- package/dist/lib/neutral/StorageService.mjs +22 -0
- package/dist/lib/neutral/StorageService.mjs.map +7 -0
- package/dist/lib/neutral/chunk-AKVCVI6N.mjs +25 -0
- package/dist/lib/neutral/chunk-AKVCVI6N.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/neutral/chunk-LF2ANNYW.mjs +171 -0
- package/dist/lib/neutral/chunk-LF2ANNYW.mjs.map +7 -0
- package/dist/lib/neutral/chunk-LRCABAWU.mjs +17 -0
- package/dist/lib/neutral/chunk-LRCABAWU.mjs.map +7 -0
- package/dist/lib/neutral/chunk-RCLYF66G.mjs +21 -0
- package/dist/lib/neutral/chunk-RCLYF66G.mjs.map +7 -0
- package/dist/lib/neutral/chunk-SEBWOTOU.mjs +235 -0
- package/dist/lib/neutral/chunk-SEBWOTOU.mjs.map +7 -0
- package/dist/lib/neutral/chunk-VSICPGGY.mjs +53 -0
- package/dist/lib/neutral/chunk-VSICPGGY.mjs.map +7 -0
- package/dist/lib/neutral/chunk-XEVFBI6S.mjs +62 -0
- package/dist/lib/neutral/chunk-XEVFBI6S.mjs.map +7 -0
- package/dist/lib/neutral/fib-ZSJYREBW.mjs +10 -0
- package/dist/lib/neutral/fib-ZSJYREBW.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +1221 -51
- package/dist/lib/neutral/index.mjs.map +4 -4
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/reply-YH3BVOUT.mjs +10 -0
- package/dist/lib/neutral/reply-YH3BVOUT.mjs.map +7 -0
- package/dist/lib/neutral/sleep-TSPIQ5EY.mjs +10 -0
- package/dist/lib/neutral/sleep-TSPIQ5EY.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +27 -193
- package/dist/lib/neutral/testing/index.mjs.map +4 -4
- package/dist/types/src/Blueprint.d.ts +192 -0
- package/dist/types/src/Blueprint.d.ts.map +1 -0
- package/dist/types/src/Credential.d.ts +27 -0
- package/dist/types/src/Credential.d.ts.map +1 -0
- package/dist/types/src/LayerSpec.d.ts +56 -0
- package/dist/types/src/LayerSpec.d.ts.map +1 -0
- package/dist/types/src/McpServer.d.ts +27 -0
- package/dist/types/src/McpServer.d.ts.map +1 -0
- package/dist/types/src/Operation.d.ts +340 -0
- package/dist/types/src/Operation.d.ts.map +1 -0
- package/dist/types/src/OperationHandlerSet.d.ts +67 -0
- package/dist/types/src/OperationHandlerSet.d.ts.map +1 -0
- package/dist/types/src/OperationHandlerSet.test.d.ts +2 -0
- package/dist/types/src/OperationHandlerSet.test.d.ts.map +1 -0
- package/dist/types/src/OperationRegistry.d.ts +23 -0
- package/dist/types/src/OperationRegistry.d.ts.map +1 -0
- package/dist/types/src/Process.d.ts +247 -0
- package/dist/types/src/Process.d.ts.map +1 -0
- package/dist/types/src/Routine.d.ts +63 -0
- package/dist/types/src/Routine.d.ts.map +1 -0
- package/dist/types/src/Script.d.ts +22 -0
- package/dist/types/src/Script.d.ts.map +1 -0
- package/dist/types/src/ServiceResolver.d.ts +89 -0
- package/dist/types/src/ServiceResolver.d.ts.map +1 -0
- package/dist/types/src/StorageService.d.ts +58 -0
- package/dist/types/src/StorageService.d.ts.map +1 -0
- package/dist/types/src/Template.d.ts +62 -0
- package/dist/types/src/Template.d.ts.map +1 -0
- package/dist/types/src/Template.test.d.ts +2 -0
- package/dist/types/src/Template.test.d.ts.map +1 -0
- package/dist/types/src/Trace.d.ts +268 -0
- package/dist/types/src/Trace.d.ts.map +1 -0
- package/dist/types/src/Trigger.d.ts +150 -0
- package/dist/types/src/Trigger.d.ts.map +1 -0
- package/dist/types/src/TriggerEvent.d.ts +75 -0
- package/dist/types/src/TriggerEvent.d.ts.map +1 -0
- package/dist/types/src/errors.d.ts +308 -0
- package/dist/types/src/errors.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +17 -5
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/testing/definitions.d.ts +11 -0
- package/dist/types/src/testing/definitions.d.ts.map +1 -0
- package/dist/types/src/testing/fib.d.ts +8 -0
- package/dist/types/src/testing/fib.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +6 -4
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/reply.d.ts +4 -0
- package/dist/types/src/testing/reply.d.ts.map +1 -0
- package/dist/types/src/testing/sleep.d.ts +6 -0
- package/dist/types/src/testing/sleep.d.ts.map +1 -0
- package/dist/types/src/umbrella.test.d.ts +2 -0
- package/dist/types/src/umbrella.test.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +23 -35
- package/src/Blueprint.ts +303 -0
- package/src/Credential.ts +53 -0
- package/src/LayerSpec.ts +91 -0
- package/src/McpServer.ts +44 -0
- package/src/Operation.ts +593 -0
- package/src/OperationHandlerSet.test.ts +92 -0
- package/src/OperationHandlerSet.ts +174 -0
- package/src/OperationRegistry.ts +50 -0
- package/src/Process.ts +504 -0
- package/src/Routine.ts +75 -0
- package/src/Script.ts +40 -0
- package/src/ServiceResolver.ts +194 -0
- package/src/StorageService.ts +101 -0
- package/src/Template.test.ts +151 -0
- package/src/Template.ts +122 -0
- package/src/Trace.ts +368 -0
- package/src/Trigger.ts +209 -0
- package/src/TriggerEvent.ts +64 -0
- package/src/errors.ts +71 -0
- package/src/index.ts +19 -6
- package/src/testing/definitions.ts +49 -0
- package/src/testing/fib.ts +22 -0
- package/src/testing/index.ts +13 -5
- package/src/testing/reply.ts +18 -0
- package/src/testing/sleep.ts +16 -0
- package/src/umbrella.test.ts +51 -0
- package/dist/lib/neutral/chunk-KGBGT4NT.mjs +0 -3106
- package/dist/lib/neutral/chunk-KGBGT4NT.mjs.map +0 -7
- package/dist/types/src/compute-graph-registry.d.ts +0 -37
- package/dist/types/src/compute-graph-registry.d.ts.map +0 -1
- package/dist/types/src/compute-graph-registry.test.d.ts +0 -2
- package/dist/types/src/compute-graph-registry.test.d.ts.map +0 -1
- package/dist/types/src/compute-graph.d.ts +0 -67
- package/dist/types/src/compute-graph.d.ts.map +0 -1
- package/dist/types/src/compute-graph.test.d.ts +0 -2
- package/dist/types/src/compute-graph.test.d.ts.map +0 -1
- package/dist/types/src/compute-node.d.ts +0 -24
- package/dist/types/src/compute-node.d.ts.map +0 -1
- package/dist/types/src/functions/async-function.d.ts +0 -68
- package/dist/types/src/functions/async-function.d.ts.map +0 -1
- package/dist/types/src/functions/edge-function.d.ts +0 -20
- package/dist/types/src/functions/edge-function.d.ts.map +0 -1
- package/dist/types/src/functions/function-defs.d.ts +0 -11
- package/dist/types/src/functions/function-defs.d.ts.map +0 -1
- package/dist/types/src/functions/index.d.ts +0 -4
- package/dist/types/src/functions/index.d.ts.map +0 -1
- package/dist/types/src/hyperformula.test.d.ts +0 -2
- package/dist/types/src/hyperformula.test.d.ts.map +0 -1
- package/dist/types/src/testing/test-builder.d.ts +0 -15
- package/dist/types/src/testing/test-builder.d.ts.map +0 -1
- package/dist/types/src/testing/test-plugin.d.ts +0 -35
- package/dist/types/src/testing/test-plugin.d.ts.map +0 -1
- package/dist/types/src/testing/test-runtime.d.ts +0 -10
- package/dist/types/src/testing/test-runtime.d.ts.map +0 -1
- package/dist/types/src/testing/util.d.ts +0 -2
- package/dist/types/src/testing/util.d.ts.map +0 -1
- package/dist/types/src/types/hyperformula.d.ts +0 -8
- package/dist/types/src/types/hyperformula.d.ts.map +0 -1
- package/dist/types/src/types/index.d.ts +0 -3
- package/dist/types/src/types/index.d.ts.map +0 -1
- package/dist/types/src/types/types.d.ts +0 -20
- package/dist/types/src/types/types.d.ts.map +0 -1
- package/dist/types/src/types/types.test.d.ts +0 -2
- package/dist/types/src/types/types.test.d.ts.map +0 -1
- package/dist/types/src/util.d.ts +0 -2
- package/dist/types/src/util.d.ts.map +0 -1
- package/src/compute-graph-registry.test.ts +0 -158
- package/src/compute-graph-registry.ts +0 -97
- package/src/compute-graph.test.ts +0 -107
- package/src/compute-graph.ts +0 -264
- package/src/compute-node.ts +0 -59
- package/src/functions/async-function.ts +0 -184
- package/src/functions/edge-function.ts +0 -113
- package/src/functions/function-defs.ts +0 -2427
- package/src/functions/index.ts +0 -7
- package/src/hyperformula.test.ts +0 -14
- package/src/testing/test-builder.ts +0 -60
- package/src/testing/test-plugin.ts +0 -98
- package/src/testing/test-runtime.ts +0 -35
- package/src/testing/util.ts +0 -9
- package/src/types/hyperformula.ts +0 -19
- package/src/types/index.ts +0 -6
- package/src/types/types.test.ts +0 -91
- package/src/types/types.ts +0 -80
- package/src/util.ts +0 -8
|
@@ -1,198 +1,32 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
getRuntime: (_spaceId) => ManagedRuntime.make(FunctionInvocationServiceLayerTest({
|
|
21
|
-
functions
|
|
22
|
-
}).pipe(Layer.provide(AiService.notAvailable), Layer.provide(CredentialsService.configuredLayer([])), Layer.provide(Database.notAvailable), Layer.provide(QueueService.notAvailable), Layer.provide(Feed.notAvailable)))
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
// src/testing/test-builder.ts
|
|
27
|
-
var __dxlog_file = "/__w/dxos/dxos/packages/core/compute/src/testing/test-builder.ts";
|
|
28
|
-
var TestBuilder = class extends Resource {
|
|
29
|
-
_options;
|
|
30
|
-
_client;
|
|
31
|
-
_registry;
|
|
32
|
-
constructor(_options = {}) {
|
|
33
|
-
super(), this._options = _options;
|
|
34
|
-
}
|
|
35
|
-
get ctx() {
|
|
36
|
-
return this._ctx;
|
|
37
|
-
}
|
|
38
|
-
get client() {
|
|
39
|
-
invariant(this._client, void 0, {
|
|
40
|
-
F: __dxlog_file,
|
|
41
|
-
L: 29,
|
|
42
|
-
S: this,
|
|
43
|
-
A: [
|
|
44
|
-
"this._client",
|
|
45
|
-
""
|
|
46
|
-
]
|
|
47
|
-
});
|
|
48
|
-
return this._client;
|
|
49
|
-
}
|
|
50
|
-
get registry() {
|
|
51
|
-
invariant(this._registry, void 0, {
|
|
52
|
-
F: __dxlog_file,
|
|
53
|
-
L: 34,
|
|
54
|
-
S: this,
|
|
55
|
-
A: [
|
|
56
|
-
"this._registry",
|
|
57
|
-
""
|
|
58
|
-
]
|
|
59
|
-
});
|
|
60
|
-
return this._registry;
|
|
61
|
-
}
|
|
62
|
-
async _open() {
|
|
63
|
-
const client = new Client(this._options);
|
|
64
|
-
await client.initialize();
|
|
65
|
-
await client.halo.createIdentity();
|
|
66
|
-
this._client = client;
|
|
67
|
-
this._ctx.onDispose(async () => {
|
|
68
|
-
await client.destroy();
|
|
69
|
-
this._client = void 0;
|
|
70
|
-
});
|
|
71
|
-
const registry = new ComputeGraphRegistry({
|
|
72
|
-
...this._options,
|
|
73
|
-
// Provide a default runtime provider for tests if not supplied.
|
|
74
|
-
computeRuntime: this._options.computeRuntime ?? createMockedComputeRuntimeProvider()
|
|
75
|
-
});
|
|
76
|
-
await registry.open();
|
|
77
|
-
this._registry = registry;
|
|
78
|
-
this._ctx.onDispose(async () => {
|
|
79
|
-
await registry.close();
|
|
80
|
-
this._registry = void 0;
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
// src/testing/test-plugin.ts
|
|
86
|
-
import { getDeep } from "@dxos/util";
|
|
87
|
-
import { FunctionArgumentType } from "@dxos/vendor-hyperformula";
|
|
88
|
-
|
|
89
|
-
// src/util.ts
|
|
90
|
-
var parseNumberString = (str) => {
|
|
91
|
-
return parseFloat(str.replace(/[^\d.]/g, ""));
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
// src/testing/test-plugin.ts
|
|
95
|
-
var TestPlugin = class extends AsyncFunctionPlugin {
|
|
96
|
-
/**
|
|
97
|
-
* Simple local function returns input value.
|
|
98
|
-
*/
|
|
99
|
-
test(ast, state) {
|
|
100
|
-
const handler = async (_value) => {
|
|
101
|
-
return _value;
|
|
102
|
-
};
|
|
103
|
-
return this.runAsyncFunction(ast, state, handler);
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Simple local function returns random number.
|
|
107
|
-
*/
|
|
108
|
-
random(ast, state) {
|
|
109
|
-
const handler = async () => {
|
|
110
|
-
return Math.random();
|
|
111
|
-
};
|
|
112
|
-
return this.runAsyncFunction(ast, state, handler);
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Async HTTP function.
|
|
116
|
-
*/
|
|
117
|
-
crypto(ast, state) {
|
|
118
|
-
const handler = async (_currency) => {
|
|
119
|
-
const currency = (_currency || "USD").toUpperCase();
|
|
120
|
-
const result = await fetch(`https://api.coindesk.com/v1/bpi/currentprice/${currency}.json`);
|
|
121
|
-
const data = await result.json();
|
|
122
|
-
const rate = getDeep(data, [
|
|
123
|
-
"bpi",
|
|
124
|
-
currency,
|
|
125
|
-
"rate"
|
|
126
|
-
]);
|
|
127
|
-
if (!rate) {
|
|
128
|
-
return NaN;
|
|
129
|
-
}
|
|
130
|
-
return parseNumberString(rate);
|
|
131
|
-
};
|
|
132
|
-
return this.runAsyncFunction(ast, state, handler, {
|
|
133
|
-
ttl: 1e4
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
|
-
TestPlugin.implementedFunctions = {
|
|
138
|
-
TEST: {
|
|
139
|
-
method: "test",
|
|
140
|
-
parameters: [
|
|
141
|
-
{
|
|
142
|
-
argumentType: FunctionArgumentType.NUMBER,
|
|
143
|
-
optionalArg: false
|
|
144
|
-
}
|
|
145
|
-
],
|
|
146
|
-
isVolatile: true
|
|
147
|
-
},
|
|
148
|
-
RANDOM: {
|
|
149
|
-
method: "random",
|
|
150
|
-
parameters: [],
|
|
151
|
-
isVolatile: true
|
|
152
|
-
},
|
|
153
|
-
CRYPTO: {
|
|
154
|
-
method: "crypto",
|
|
155
|
-
parameters: [
|
|
156
|
-
{
|
|
157
|
-
argumentType: FunctionArgumentType.STRING,
|
|
158
|
-
optionalArg: true
|
|
159
|
-
}
|
|
160
|
-
],
|
|
161
|
-
isVolatile: true
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
var TestPluginTranslations = {
|
|
165
|
-
enGB: {
|
|
166
|
-
TEST: "Returns input value",
|
|
167
|
-
RANDOM: "Random number",
|
|
168
|
-
CRYPTO: "Crypto token value"
|
|
169
|
-
},
|
|
170
|
-
enUS: {
|
|
171
|
-
TEST: "Returns input value",
|
|
172
|
-
RANDOM: "Random number",
|
|
173
|
-
CRYPTO: "Crypto token value"
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
var testFunctionPlugins = [
|
|
177
|
-
{
|
|
178
|
-
plugin: TestPlugin,
|
|
179
|
-
translations: TestPluginTranslations
|
|
180
|
-
}
|
|
181
|
-
];
|
|
2
|
+
lazy
|
|
3
|
+
} from "../chunk-LF2ANNYW.mjs";
|
|
4
|
+
import {
|
|
5
|
+
fib_default
|
|
6
|
+
} from "../chunk-AKVCVI6N.mjs";
|
|
7
|
+
import {
|
|
8
|
+
reply_default
|
|
9
|
+
} from "../chunk-RCLYF66G.mjs";
|
|
10
|
+
import {
|
|
11
|
+
sleep_default
|
|
12
|
+
} from "../chunk-LRCABAWU.mjs";
|
|
13
|
+
import {
|
|
14
|
+
Fibonacci,
|
|
15
|
+
Reply,
|
|
16
|
+
Sleep
|
|
17
|
+
} from "../chunk-VSICPGGY.mjs";
|
|
18
|
+
import "../chunk-SEBWOTOU.mjs";
|
|
19
|
+
import "../chunk-J5LGTIGS.mjs";
|
|
182
20
|
|
|
183
|
-
// src/testing/
|
|
184
|
-
import
|
|
185
|
-
var getRegisteredFunctionNames = () => {
|
|
186
|
-
return HyperFormula.buildEmpty({
|
|
187
|
-
licenseKey: "gpl-v3"
|
|
188
|
-
}).getRegisteredFunctionNames();
|
|
189
|
-
};
|
|
21
|
+
// src/testing/index.ts
|
|
22
|
+
var ExampleHandlers = lazy(() => import("../fib-ZSJYREBW.mjs"), () => import("../reply-YH3BVOUT.mjs"), () => import("../sleep-TSPIQ5EY.mjs"));
|
|
190
23
|
export {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
24
|
+
ExampleHandlers,
|
|
25
|
+
Fibonacci,
|
|
26
|
+
fib_default as FibonacciHandler,
|
|
27
|
+
Reply,
|
|
28
|
+
reply_default as ReplyHandler,
|
|
29
|
+
Sleep,
|
|
30
|
+
sleep_default as SleepHandler
|
|
197
31
|
};
|
|
198
32
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/testing/
|
|
4
|
-
"sourcesContent": ["//\n// Copyright
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["
|
|
3
|
+
"sources": ["../../../../src/testing/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as OperationHandlerSet from '../OperationHandlerSet';\n\nexport { Fibonacci, Reply, Sleep } from './definitions';\nexport { default as FibonacciHandler } from './fib';\nexport { default as ReplyHandler } from './reply';\nexport { default as SleepHandler } from './sleep';\n\nexport const ExampleHandlers = OperationHandlerSet.lazy(\n () => import('./fib'),\n () => import('./reply'),\n () => import('./sleep'),\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;AAWO,IAAMA,kBAAsCC,KACjD,MAAM,OAAO,qBAAA,GACb,MAAM,OAAO,uBAAA,GACb,MAAM,OAAO,uBAAA,CAAA;",
|
|
6
|
+
"names": ["ExampleHandlers", "lazy"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import * as Context from 'effect/Context';
|
|
2
|
+
import * as Effect from 'effect/Effect';
|
|
3
|
+
import * as Layer from 'effect/Layer';
|
|
4
|
+
import * as Schema from 'effect/Schema';
|
|
5
|
+
import { Database, Migration, Obj, Type } from '@dxos/echo';
|
|
6
|
+
import { BaseError } from '@dxos/errors';
|
|
7
|
+
import * as Operation from './Operation';
|
|
8
|
+
/**
|
|
9
|
+
* Blueprint schema defines the structure for AI assistant blueprints.
|
|
10
|
+
* Blueprints contain instructions, tools, and artifacts that guide the AI's behavior.
|
|
11
|
+
* Blueprints may use tools to create and read artifacts, which are managed by the assistant.
|
|
12
|
+
*
|
|
13
|
+
* The registry `key` and `version` are stored in the object meta — access them via
|
|
14
|
+
* `Obj.getMeta(blueprint).key` and `Obj.getMeta(blueprint).version`.
|
|
15
|
+
*/
|
|
16
|
+
export declare const Blueprint: Type.Obj<{
|
|
17
|
+
readonly name: string;
|
|
18
|
+
readonly description?: string | undefined;
|
|
19
|
+
readonly instructions: {
|
|
20
|
+
readonly source: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
21
|
+
readonly name?: string | undefined;
|
|
22
|
+
readonly content: string;
|
|
23
|
+
}>;
|
|
24
|
+
readonly inputs?: readonly {
|
|
25
|
+
readonly name: string;
|
|
26
|
+
readonly kind: "operation" | "value";
|
|
27
|
+
readonly default?: any;
|
|
28
|
+
readonly operation?: string | undefined;
|
|
29
|
+
}[] | undefined;
|
|
30
|
+
};
|
|
31
|
+
readonly tools: readonly (string & import("effect/Brand").Brand<"ToolId">)[];
|
|
32
|
+
readonly agentCanEnable?: boolean | undefined;
|
|
33
|
+
readonly mcpServers?: readonly {
|
|
34
|
+
readonly name?: string | undefined;
|
|
35
|
+
readonly url: string;
|
|
36
|
+
readonly protocol: "http" | "sse";
|
|
37
|
+
readonly apiKey?: string | undefined;
|
|
38
|
+
}[] | undefined;
|
|
39
|
+
}, Schema.Struct.Fields>;
|
|
40
|
+
/**
|
|
41
|
+
* TypeScript type for Blueprint.
|
|
42
|
+
*/
|
|
43
|
+
export interface Blueprint extends Schema.Schema.Type<typeof Blueprint> {
|
|
44
|
+
}
|
|
45
|
+
type MakeProps = {
|
|
46
|
+
key: string;
|
|
47
|
+
version?: string;
|
|
48
|
+
name: string;
|
|
49
|
+
} & Partial<Blueprint>;
|
|
50
|
+
/**
|
|
51
|
+
* Create a new Blueprint.
|
|
52
|
+
* The `key` (and optional `version`) are stored in the object meta.
|
|
53
|
+
*/
|
|
54
|
+
export declare const make: ({ key, version, tools, instructions, ...props }: MakeProps) => Obj.OfShape<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
55
|
+
readonly name: string;
|
|
56
|
+
readonly description?: string | undefined;
|
|
57
|
+
readonly instructions: {
|
|
58
|
+
readonly source: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
59
|
+
readonly name?: string | undefined;
|
|
60
|
+
readonly content: string;
|
|
61
|
+
}>;
|
|
62
|
+
readonly inputs?: readonly {
|
|
63
|
+
readonly name: string;
|
|
64
|
+
readonly kind: "operation" | "value";
|
|
65
|
+
readonly default?: any;
|
|
66
|
+
readonly operation?: string | undefined;
|
|
67
|
+
}[] | undefined;
|
|
68
|
+
};
|
|
69
|
+
readonly tools: readonly (string & import("effect/Brand").Brand<"ToolId">)[];
|
|
70
|
+
readonly agentCanEnable?: boolean | undefined;
|
|
71
|
+
readonly mcpServers?: readonly {
|
|
72
|
+
readonly name?: string | undefined;
|
|
73
|
+
readonly url: string;
|
|
74
|
+
readonly protocol: "http" | "sse";
|
|
75
|
+
readonly apiKey?: string | undefined;
|
|
76
|
+
}[] | undefined;
|
|
77
|
+
}>;
|
|
78
|
+
/**
|
|
79
|
+
* Get the registry key for a blueprint.
|
|
80
|
+
*/
|
|
81
|
+
export declare const getKey: (blueprint: Blueprint) => string;
|
|
82
|
+
/**
|
|
83
|
+
* Get the registry version for a blueprint, if any.
|
|
84
|
+
*/
|
|
85
|
+
export declare const getVersion: (blueprint: Blueprint) => string | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* Util to create tool definitions for a blueprint.
|
|
88
|
+
*/
|
|
89
|
+
export declare const toolDefinitions: ({ tools, operations, }: {
|
|
90
|
+
tools?: string[];
|
|
91
|
+
operations?: Operation.Definition.Any[];
|
|
92
|
+
}) => (string & import("effect/Brand").Brand<"ToolId">)[];
|
|
93
|
+
/**
|
|
94
|
+
* Factory for the blueprints.
|
|
95
|
+
*/
|
|
96
|
+
export type Definition = {
|
|
97
|
+
key: string;
|
|
98
|
+
make: () => Blueprint;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Blueprint registry.
|
|
102
|
+
*/
|
|
103
|
+
export declare class Registry {
|
|
104
|
+
private readonly _blueprints;
|
|
105
|
+
constructor(blueprints: Blueprint[]);
|
|
106
|
+
get blueprints(): Blueprint[];
|
|
107
|
+
getByKey(key: string): Blueprint | undefined;
|
|
108
|
+
query(): Blueprint[];
|
|
109
|
+
updateBlueprints(): Effect.Effect<void, never, Database.Service>;
|
|
110
|
+
}
|
|
111
|
+
declare const RegistryService_base: Context.TagClass<RegistryService, "@dxos/blueprints/RegistryService", Registry>;
|
|
112
|
+
export declare class RegistryService extends RegistryService_base {
|
|
113
|
+
static notAvailable: Layer.Layer<RegistryService, never, never>;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Resolves a blueprint from the registry.
|
|
117
|
+
* Does not check the local database for the blueprint.
|
|
118
|
+
*/
|
|
119
|
+
export declare const resolve: (key: string) => Effect.Effect<Blueprint, NotFoundError, RegistryService>;
|
|
120
|
+
/**
|
|
121
|
+
* Upserts a blueprint into the database.
|
|
122
|
+
* If the blueprint already exists in the database, local blueprint is returned.
|
|
123
|
+
* Otherwise, it will be added.
|
|
124
|
+
*/
|
|
125
|
+
export declare const upsert: (key: string) => Effect.Effect<Blueprint, NotFoundError, RegistryService | Database.Service>;
|
|
126
|
+
declare const NotFoundError_base: {
|
|
127
|
+
new (options?: import("@dxos/errors").BaseErrorOptions): {
|
|
128
|
+
cause?: unknown;
|
|
129
|
+
stack?: string;
|
|
130
|
+
name: "BlueprintNotFound";
|
|
131
|
+
context: Record<string, unknown>;
|
|
132
|
+
readonly message: string;
|
|
133
|
+
readonly _tag: "BlueprintNotFound";
|
|
134
|
+
};
|
|
135
|
+
isError(error: unknown): error is Error;
|
|
136
|
+
name: "BlueprintNotFound";
|
|
137
|
+
is(error: unknown): error is BaseError;
|
|
138
|
+
wrap(options?: Omit<import("@dxos/errors").BaseErrorOptions, 'cause'> & {
|
|
139
|
+
ifTypeDiffers?: boolean;
|
|
140
|
+
}): (error: unknown) => {
|
|
141
|
+
cause?: unknown;
|
|
142
|
+
stack?: string;
|
|
143
|
+
name: "BlueprintNotFound";
|
|
144
|
+
context: Record<string, unknown>;
|
|
145
|
+
readonly message: string;
|
|
146
|
+
readonly _tag: "BlueprintNotFound";
|
|
147
|
+
};
|
|
148
|
+
extend<Name extends string = string>(name: Name, message?: string): any;
|
|
149
|
+
captureStackTrace(targetObject: object, constructorOpt?: Function): void;
|
|
150
|
+
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
151
|
+
stackTraceLimit: number;
|
|
152
|
+
};
|
|
153
|
+
export declare class NotFoundError extends NotFoundError_base {
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Blueprint schema v0.1.0 — `key` is stored as a data property.
|
|
157
|
+
* @deprecated Use {@link Blueprint} (v0.2.0) instead; the `key` and `version` now live in the object meta.
|
|
158
|
+
*/
|
|
159
|
+
export declare const Blueprint_v0_1_0: Type.Obj<{
|
|
160
|
+
readonly key: string;
|
|
161
|
+
readonly name: string;
|
|
162
|
+
readonly description?: string | undefined;
|
|
163
|
+
readonly instructions: {
|
|
164
|
+
readonly source: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
165
|
+
readonly name?: string | undefined;
|
|
166
|
+
readonly content: string;
|
|
167
|
+
}>;
|
|
168
|
+
readonly inputs?: readonly {
|
|
169
|
+
readonly name: string;
|
|
170
|
+
readonly kind: "operation" | "value";
|
|
171
|
+
readonly default?: any;
|
|
172
|
+
readonly operation?: string | undefined;
|
|
173
|
+
}[] | undefined;
|
|
174
|
+
};
|
|
175
|
+
readonly tools: readonly (string & import("effect/Brand").Brand<"ToolId">)[];
|
|
176
|
+
readonly agentCanEnable?: boolean | undefined;
|
|
177
|
+
readonly mcpServers?: readonly {
|
|
178
|
+
readonly name?: string | undefined;
|
|
179
|
+
readonly url: string;
|
|
180
|
+
readonly protocol: "http" | "sse";
|
|
181
|
+
readonly apiKey?: string | undefined;
|
|
182
|
+
}[] | undefined;
|
|
183
|
+
}, Schema.Struct.Fields>;
|
|
184
|
+
export interface Blueprint_v0_1_0 extends Schema.Schema.Type<typeof Blueprint_v0_1_0> {
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Schema migrations exported by this module.
|
|
188
|
+
* Exported as an array for extensibility — append future versions here.
|
|
189
|
+
*/
|
|
190
|
+
export declare const migrations: Migration.ObjectMigration[];
|
|
191
|
+
export {};
|
|
192
|
+
//# sourceMappingURL=Blueprint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Blueprint.d.ts","sourceRoot":"","sources":["../../../src/Blueprint.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAc,QAAQ,EAAU,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAChF,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzC,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AAGzC;;;;;;;GAOG;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;wBAmDrB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,SAAS,CAAC;CAAG;AAE1E,KAAK,SAAS,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AAEtF;;;GAGG;AACH,eAAO,MAAM,IAAI,oDAA4E,SAAS;;;;;;;;;;;;;;;;;;;;;;;EAMlG,CAAC;AAEL;;GAEG;AACH,eAAO,MAAM,MAAM,cAAe,SAAS,KAAG,MAM7C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,cAAe,SAAS,KAAG,MAAM,GAAG,SAA2C,CAAC;AAEvG;;GAEG;AACH,eAAO,MAAM,eAAe,2BAGzB;IACD,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC;CACzC,wDAAqG,CAAC;AAEvG;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,SAAS,CAAC;CACvB,CAAC;AAMF;;GAEG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAmB;IAE/C,YAAY,UAAU,EAAE,SAAS,EAAE,EAalC;IAED,IAAI,UAAU,IAAI,SAAS,EAAE,CAE5B;IAED,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAE3C;IAED,KAAK,IAAI,SAAS,EAAE,CAEnB;IAED,gBAAgB,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,CAkB/D;CACF;;AAED,qBAAa,eAAgB,SAAQ,oBAA4E;IAC/G,MAAM,CAAC,YAAY,6CAaO;CAC3B;AAED;;;GAGG;AACH,eAAO,MAAM,OAAO,QAAS,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,aAAa,EAAE,eAAe,CAQzF,CAAC;AAEL;;;;GAIG;AACH,eAAO,MAAM,MAAM,QAAS,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,aAAa,EAAE,eAAe,GAAG,QAAQ,CAAC,OAAO,CAO3G,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEL,qBAAa,aAAc,SAAQ,kBAA4D;CAAG;AAMlG;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;wBA2B5B,CAAC;AAEF,MAAM,WAAW,gBAAiB,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC;CAAG;AAoBxF;;;GAGG;AACH,eAAO,MAAM,UAAU,6BAAe,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as Context from 'effect/Context';
|
|
2
|
+
import * as Effect from 'effect/Effect';
|
|
3
|
+
import * as Redacted from 'effect/Redacted';
|
|
4
|
+
export type CredentialQuery = {
|
|
5
|
+
service?: string;
|
|
6
|
+
};
|
|
7
|
+
export type ServiceCredential = {
|
|
8
|
+
service: string;
|
|
9
|
+
apiKey?: string;
|
|
10
|
+
};
|
|
11
|
+
declare const CredentialsService_base: Context.TagClass<CredentialsService, "@dxos/functions/CredentialsService", {
|
|
12
|
+
/**
|
|
13
|
+
* Query all.
|
|
14
|
+
*/
|
|
15
|
+
queryCredentials: (query: CredentialQuery) => Promise<ServiceCredential[]>;
|
|
16
|
+
/**
|
|
17
|
+
* Get a single credential.
|
|
18
|
+
* @throws {Error} If no credential is found.
|
|
19
|
+
*/
|
|
20
|
+
getCredential: (query: CredentialQuery) => Promise<ServiceCredential>;
|
|
21
|
+
}>;
|
|
22
|
+
export declare class CredentialsService extends CredentialsService_base {
|
|
23
|
+
static getCredential: (query: CredentialQuery) => Effect.Effect<ServiceCredential, never, CredentialsService>;
|
|
24
|
+
static getApiKey: (query: CredentialQuery) => Effect.Effect<Redacted.Redacted<string>, never, CredentialsService>;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=Credential.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Credential.d.ts","sourceRoot":"","sources":["../../../src/Credential.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAE5C,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAIF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,MAAM,CAAC;IAGhB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;;IAKE;;OAEG;sBACe,CAAC,KAAK,EAAE,eAAe,KAAK,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAE1E;;;OAGG;mBACY,CAAC,KAAK,EAAE,eAAe,KAAK,OAAO,CAAC,iBAAiB,CAAC;;AAZzE,qBAAa,kBAAmB,SAAQ,uBAcrC;IACD,MAAM,CAAC,aAAa,UAAW,eAAe,KAAG,MAAM,CAAC,MAAM,CAAC,iBAAiB,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAIvG;IAEL,MAAM,CAAC,SAAS,UAAW,eAAe,KAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAO3G;CACN"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as Context from 'effect/Context';
|
|
2
|
+
import * as Layer from 'effect/Layer';
|
|
3
|
+
import * as Types from 'effect/Types';
|
|
4
|
+
import { SpaceId, DXN } from '@dxos/keys';
|
|
5
|
+
import type * as Process from './Process';
|
|
6
|
+
export declare const TypeId: '~@dxos/functions/LayerSpec';
|
|
7
|
+
export type TypeId = typeof TypeId;
|
|
8
|
+
/**
|
|
9
|
+
* Opaque layer with introspectable tags.
|
|
10
|
+
*/
|
|
11
|
+
export interface LayerSpec {
|
|
12
|
+
readonly [TypeId]: TypeId;
|
|
13
|
+
readonly affinity: Affinity;
|
|
14
|
+
readonly requires: readonly Context.Tag<any, any>[];
|
|
15
|
+
readonly provides: readonly Context.Tag<any, any>[];
|
|
16
|
+
readonly make: (context: LayerContext) => Layer.Layer<unknown, never, unknown>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Affinity defines the lifetime and scope of a service.
|
|
20
|
+
*
|
|
21
|
+
* - `application` - single service instance is available throughout the entire application.
|
|
22
|
+
* - `space` - service is instantiated per space.
|
|
23
|
+
* - `process` - separate service instance is created and destroyed for each process.
|
|
24
|
+
*/
|
|
25
|
+
export type Affinity = 'application' | 'space' | 'process';
|
|
26
|
+
/**
|
|
27
|
+
* Provides context for service resolution.
|
|
28
|
+
*/
|
|
29
|
+
export interface LayerContext {
|
|
30
|
+
/**
|
|
31
|
+
* Under which space the process is running.
|
|
32
|
+
* Space affinity and up only.
|
|
33
|
+
*/
|
|
34
|
+
readonly space?: SpaceId;
|
|
35
|
+
/**
|
|
36
|
+
* DXN of the conversation feed the process is running in.
|
|
37
|
+
* Process affinity only.
|
|
38
|
+
*/
|
|
39
|
+
readonly conversation?: DXN.String;
|
|
40
|
+
/**
|
|
41
|
+
* Under which process the process is running.
|
|
42
|
+
* Process affinity only.
|
|
43
|
+
*/
|
|
44
|
+
readonly process?: Process.ID;
|
|
45
|
+
}
|
|
46
|
+
interface MakeOpts {
|
|
47
|
+
readonly affinity: Affinity;
|
|
48
|
+
readonly requires: readonly Context.Tag<any, any>[];
|
|
49
|
+
readonly provides: readonly Context.Tag<any, any>[];
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Make a service.
|
|
53
|
+
*/
|
|
54
|
+
export declare const make: <const Opts extends Types.NoExcessProperties<MakeOpts, Opts>>(opts: Opts, make: (context: LayerContext) => Layer.Layer<Context.Tag.Identifier<Opts['provides'][number]>, never, Context.Tag.Identifier<Opts['requires'][number]>>) => LayerSpec;
|
|
55
|
+
export {};
|
|
56
|
+
//# sourceMappingURL=LayerSpec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LayerSpec.d.ts","sourceRoot":"","sources":["../../../src/LayerSpec.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,KAAK,KAAK,OAAO,MAAM,WAAW,CAAC;AAI1C,eAAO,MAAM,MAAM,EAAG,4BAAqC,CAAC;AAC5D,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC;AAEnC;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAE1B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,SAAS,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;IACpD,QAAQ,CAAC,QAAQ,EAAE,SAAS,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;IAGpD,QAAQ,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;CAChF;AAED;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,GAAG,aAAa,GAAG,OAAO,GAAG,SAAS,CAAC;AAE3D;;GAEG;AAEH,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAEzB;;;OAGG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC;IAEnC;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,CAAC;CAC/B;AAED,UAAU,QAAQ;IAChB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,SAAS,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;IACpD,QAAQ,CAAC,QAAQ,EAAE,SAAS,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;CACrD;AAED;;GAEG;AACH,eAAO,MAAM,IAAI,GAAI,KAAK,CAAC,IAAI,SAAS,KAAK,CAAC,kBAAkB,CAAC,QAAQ,EAAE,IAAI,CAAC,QACxE,IAAI,QACJ,CACJ,OAAO,EAAE,YAAY,KAClB,KAAK,CAAC,KAAK,CACd,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,EAChD,KAAK,EACL,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,CACjD,KACA,SAQF,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
/**
|
|
3
|
+
* MCP server connection spec — the minimal fields needed to dial an MCP server.
|
|
4
|
+
*
|
|
5
|
+
* Used as a value type embedded in blueprints and passed to runtime session connect logic.
|
|
6
|
+
* The user-facing ECHO object (`@dxos/assistant-toolkit` `McpServer`) composes this struct
|
|
7
|
+
* and adds instance-level fields (`name`, `enabled`) and ECHO annotations.
|
|
8
|
+
*/
|
|
9
|
+
export declare const McpServer: Schema.Struct<{
|
|
10
|
+
name: Schema.optional<typeof Schema.String>;
|
|
11
|
+
url: Schema.SchemaClass<string, string, never>;
|
|
12
|
+
/**
|
|
13
|
+
* Transport protocol. Prefer `'http'` (Streamable HTTP) for new servers; `'sse'` is
|
|
14
|
+
* kept for compatibility with servers that haven't migrated and is deprecated per
|
|
15
|
+
* the MCP SDK. Clients support both during the migration period.
|
|
16
|
+
*/
|
|
17
|
+
protocol: Schema.Union<[Schema.Literal<["http"]>, Schema.Literal<["sse"]>]>;
|
|
18
|
+
/**
|
|
19
|
+
* Optional API key sent with requests.
|
|
20
|
+
* Persisted in plaintext when stored on a space-replicated ECHO object — see the
|
|
21
|
+
* `@dxos/assistant-toolkit` `McpServer` type for security implications.
|
|
22
|
+
*/
|
|
23
|
+
apiKey: Schema.optional<typeof Schema.String>;
|
|
24
|
+
}>;
|
|
25
|
+
export interface McpServer extends Schema.Schema.Type<typeof McpServer> {
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=McpServer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpServer.d.ts","sourceRoot":"","sources":["../../../src/McpServer.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC;;;;;;GAMG;AACH,eAAO,MAAM,SAAS;;;IASpB;;;;OAIG;;IAKH;;;;OAIG;;EAIH,CAAC;AAEH,MAAM,WAAW,SAAU,SAAQ,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,SAAS,CAAC;CAAG"}
|