@orchestration-ai/sdk 0.2.0 → 0.3.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.
@@ -0,0 +1,589 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.getSecretSetting = exports.getTextSetting = exports.getBooleanSetting = void 0;
37
+ exports.defineService = defineService;
38
+ exports.defineServiceWithDynamicDescription = defineServiceWithDynamicDescription;
39
+ exports.createApp = createApp;
40
+ const express_1 = __importStar(require("express"));
41
+ const node_http_1 = require("node:http");
42
+ const services_1 = require("./services");
43
+ const oauth_utils_1 = require("./oauth-utils");
44
+ function defineService(definition) {
45
+ return definition;
46
+ }
47
+ function defineServiceWithDynamicDescription(definition) {
48
+ return definition;
49
+ }
50
+ var shared_types_1 = require("./shared-types");
51
+ Object.defineProperty(exports, "getBooleanSetting", { enumerable: true, get: function () { return shared_types_1.getBooleanSetting; } });
52
+ Object.defineProperty(exports, "getTextSetting", { enumerable: true, get: function () { return shared_types_1.getTextSetting; } });
53
+ Object.defineProperty(exports, "getSecretSetting", { enumerable: true, get: function () { return shared_types_1.getSecretSetting; } });
54
+ // --- Context Resolution ---
55
+ async function resolveContext(layerId, engineUrl, accessKey) {
56
+ const endpoint = `${engineUrl}/agents/context/${layerId}`;
57
+ return (await fetch(endpoint, {
58
+ headers: { Authorization: `Bearer ${accessKey}` },
59
+ })).json();
60
+ }
61
+ // --- Explore Page ---
62
+ function renderExplorePage(services, permissions) {
63
+ const permissionsHtml = permissions.length > 0
64
+ ? permissions.map((p) => `<div class="permission"><code>${p.permission_name}</code><span>${p.justification}</span></div>`).join("")
65
+ : `<p class="no-tools">No permissions declared</p>`;
66
+ const serviceCards = services.map((s) => {
67
+ const isStatic = typeof s.description !== "function";
68
+ const tools = s.tools ? Object.keys(s.tools) : [];
69
+ const description = isStatic ? s.description : null;
70
+ let toolsHtml = "";
71
+ if (description && description.length > 0) {
72
+ toolsHtml = description.map((tool) => {
73
+ const paramInputs = Object.entries(tool.parameters).map(([name, p]) => {
74
+ const required = !p.optional ? 'required' : '';
75
+ if (p.type === "boolean") {
76
+ return `<label class="param-input-label"><input type="checkbox" name="${name}" data-type="boolean" />${name}${p.optional ? ' (optional)' : ''}</label>`;
77
+ }
78
+ return `<input class="param-input" type="text" name="${name}" placeholder="${name}${p.optional ? ' (optional)' : ''}" data-type="${p.type}" ${required} />`;
79
+ }).join("");
80
+ const params = Object.entries(tool.parameters).map(([name, p]) => `<span class="param">${name}${p.optional ? "?" : ""}: <span class="param-type">${p.type}</span></span>`).join("");
81
+ return `<div class="tool">
82
+ <div class="tool-header">
83
+ <span class="method method-${tool.method.toLowerCase()}">${tool.method}</span>
84
+ <code class="tool-path">${tool.path}</code>
85
+ <button class="try-btn" onclick="toggleForm(this)">Try</button>
86
+ </div>
87
+ <p class="tool-desc">${tool.description}</p>
88
+ ${params ? `<div class="params">${params}</div>` : ""}
89
+ <form class="tool-form" style="display:none" onsubmit="callTool(event, '${s.unique_name}', '${tool.path}', '${tool.method}')">
90
+ <input class="param-input layer-id-input" type="text" name="__layerId__" placeholder="X-LayerId (optional)" />
91
+ ${paramInputs}
92
+ <div class="form-actions">
93
+ <button type="submit" class="call-btn">Call</button>
94
+ </div>
95
+ <pre class="tool-response"></pre>
96
+ </form>
97
+ </div>`;
98
+ }).join("");
99
+ }
100
+ else if (tools.length > 0) {
101
+ toolsHtml = tools.map((t) => `<div class="tool">
102
+ <div class="tool-header">
103
+ <span class="method method-post">POST</span>
104
+ <code class="tool-path">${t}</code>
105
+ <button class="try-btn" onclick="toggleForm(this)">Try</button>
106
+ </div>
107
+ <form class="tool-form" style="display:none" onsubmit="callTool(event, '${s.unique_name}', '${t}', 'POST')">
108
+ <input class="param-input layer-id-input" type="text" name="__layerId__" placeholder="X-LayerId (optional)" />
109
+ <textarea class="raw-body" name="__raw__" placeholder='{ "key": "value" }' rows="3"></textarea>
110
+ <div class="form-actions">
111
+ <button type="submit" class="call-btn">Call</button>
112
+ </div>
113
+ <pre class="tool-response"></pre>
114
+ </form>
115
+ </div>`).join("");
116
+ }
117
+ else {
118
+ toolsHtml = `<p class="no-tools">No tools exposed</p>`;
119
+ }
120
+ const dynamicBadge = !isStatic ? `<span class="badge">Dynamic</span>` : "";
121
+ const hasTouchBadge = s.touch ? `<span class="badge badge-touch">Touch</span>` : "";
122
+ return `<div class="service-card">
123
+ <div class="service-header">
124
+ <h2>${s.service_name}</h2>
125
+ <div class="badges">
126
+ <code class="service-id">${s.unique_name}</code>
127
+ ${dynamicBadge}${hasTouchBadge}
128
+ </div>
129
+ </div>
130
+ <p class="service-desc">${s.service_description}</p>
131
+ <div class="tools-section">
132
+ <h3>Tools</h3>
133
+ ${toolsHtml}
134
+ </div>
135
+ </div>`;
136
+ }).join("");
137
+ return `<!DOCTYPE html>
138
+ <html lang="en">
139
+ <head>
140
+ <meta charset="utf-8" />
141
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
142
+ <title>Explore Services — Orchestration AI</title>
143
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet" />
144
+ <style>
145
+ :root {
146
+ --primary: #40babd;
147
+ --primary-dark: #339597;
148
+ --dark: #0d1117;
149
+ --dark-2: #161b22;
150
+ --dark-3: #1c2128;
151
+ --text: #e6edf3;
152
+ --text-muted: #8b949e;
153
+ --gradient: linear-gradient(135deg, #40babd, #75c181);
154
+ --radius: 12px;
155
+ }
156
+ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
157
+ body {
158
+ font-family: 'Inter', -apple-system, sans-serif;
159
+ background: var(--dark);
160
+ color: var(--text);
161
+ font-size: 15px;
162
+ line-height: 1.6;
163
+ -webkit-font-smoothing: antialiased;
164
+ padding: 48px 24px;
165
+ }
166
+ .container { max-width: 900px; margin: 0 auto; }
167
+ .page-header {
168
+ margin-bottom: 40px;
169
+ }
170
+ .page-header h1 {
171
+ font-size: 28px;
172
+ font-weight: 700;
173
+ background: var(--gradient);
174
+ -webkit-background-clip: text;
175
+ -webkit-text-fill-color: transparent;
176
+ background-clip: text;
177
+ }
178
+ .page-header p {
179
+ color: var(--text-muted);
180
+ margin-top: 8px;
181
+ }
182
+ .service-card {
183
+ background: var(--dark-2);
184
+ border: 1px solid var(--dark-3);
185
+ border-radius: var(--radius);
186
+ padding: 24px;
187
+ margin-bottom: 20px;
188
+ }
189
+ .service-header {
190
+ display: flex;
191
+ align-items: center;
192
+ justify-content: space-between;
193
+ flex-wrap: wrap;
194
+ gap: 8px;
195
+ margin-bottom: 8px;
196
+ }
197
+ .service-header h2 {
198
+ font-size: 18px;
199
+ font-weight: 600;
200
+ }
201
+ .badges { display: flex; align-items: center; gap: 8px; }
202
+ .service-id {
203
+ font-size: 12px;
204
+ background: var(--dark-3);
205
+ padding: 2px 8px;
206
+ border-radius: 4px;
207
+ color: var(--text-muted);
208
+ }
209
+ .badge {
210
+ font-size: 11px;
211
+ font-weight: 500;
212
+ padding: 2px 8px;
213
+ border-radius: 4px;
214
+ background: rgba(64, 186, 189, 0.15);
215
+ color: var(--primary);
216
+ }
217
+ .badge-touch {
218
+ background: rgba(117, 193, 129, 0.15);
219
+ color: #75c181;
220
+ }
221
+ .service-desc {
222
+ color: var(--text-muted);
223
+ margin-bottom: 16px;
224
+ }
225
+ .tools-section h3 {
226
+ font-size: 13px;
227
+ font-weight: 600;
228
+ text-transform: uppercase;
229
+ letter-spacing: 0.5px;
230
+ color: var(--text-muted);
231
+ margin-bottom: 10px;
232
+ }
233
+ .tool {
234
+ background: var(--dark-3);
235
+ border-radius: 8px;
236
+ padding: 12px 16px;
237
+ margin-bottom: 8px;
238
+ }
239
+ .tool-header {
240
+ display: flex;
241
+ align-items: center;
242
+ gap: 10px;
243
+ }
244
+ .method {
245
+ font-size: 11px;
246
+ font-weight: 700;
247
+ padding: 2px 6px;
248
+ border-radius: 4px;
249
+ text-transform: uppercase;
250
+ }
251
+ .method-post { background: rgba(64, 186, 189, 0.2); color: var(--primary); }
252
+ .method-get { background: rgba(117, 193, 129, 0.2); color: #75c181; }
253
+ .method-patch { background: rgba(255, 193, 7, 0.2); color: #ffc107; }
254
+ .method-delete { background: rgba(248, 81, 73, 0.2); color: #f85149; }
255
+ .method-put { background: rgba(169, 142, 255, 0.2); color: #a98eff; }
256
+ .tool-path {
257
+ font-size: 14px;
258
+ font-weight: 500;
259
+ color: var(--text);
260
+ }
261
+ .tool-desc {
262
+ color: var(--text-muted);
263
+ font-size: 13px;
264
+ margin-top: 6px;
265
+ }
266
+ .params {
267
+ display: flex;
268
+ flex-wrap: wrap;
269
+ gap: 6px;
270
+ margin-top: 8px;
271
+ }
272
+ .param {
273
+ font-size: 12px;
274
+ background: var(--dark-2);
275
+ padding: 2px 8px;
276
+ border-radius: 4px;
277
+ color: var(--text-muted);
278
+ }
279
+ .param-type { color: var(--primary); }
280
+ .no-tools {
281
+ color: var(--text-muted);
282
+ font-size: 13px;
283
+ font-style: italic;
284
+ }
285
+ .section-title {
286
+ font-size: 13px;
287
+ font-weight: 600;
288
+ text-transform: uppercase;
289
+ letter-spacing: 0.5px;
290
+ color: var(--text-muted);
291
+ margin-bottom: 12px;
292
+ margin-top: 32px;
293
+ }
294
+ .permissions-card {
295
+ background: var(--dark-2);
296
+ border: 1px solid var(--dark-3);
297
+ border-radius: var(--radius);
298
+ padding: 24px;
299
+ margin-bottom: 32px;
300
+ }
301
+ .permission {
302
+ display: flex;
303
+ align-items: baseline;
304
+ gap: 12px;
305
+ padding: 8px 0;
306
+ border-bottom: 1px solid var(--dark-3);
307
+ }
308
+ .permission:last-child { border-bottom: none; }
309
+ .permission code {
310
+ font-size: 13px;
311
+ font-weight: 500;
312
+ color: var(--primary);
313
+ white-space: nowrap;
314
+ }
315
+ .permission span {
316
+ font-size: 13px;
317
+ color: var(--text-muted);
318
+ }
319
+ .try-btn {
320
+ margin-left: auto;
321
+ font-size: 11px;
322
+ font-weight: 600;
323
+ padding: 3px 10px;
324
+ border-radius: 4px;
325
+ border: 1px solid var(--primary);
326
+ background: transparent;
327
+ color: var(--primary);
328
+ cursor: pointer;
329
+ transition: background 0.2s;
330
+ }
331
+ .try-btn:hover { background: rgba(64, 186, 189, 0.1); }
332
+ .tool-form {
333
+ margin-top: 12px;
334
+ display: flex;
335
+ flex-direction: column;
336
+ gap: 8px;
337
+ }
338
+ .param-input, .raw-body {
339
+ font-family: 'Inter', sans-serif;
340
+ font-size: 13px;
341
+ padding: 8px 12px;
342
+ border-radius: 6px;
343
+ border: 1px solid var(--dark-3);
344
+ background: var(--dark);
345
+ color: var(--text);
346
+ outline: none;
347
+ width: 100%;
348
+ resize: vertical;
349
+ }
350
+ .param-input:focus, .raw-body:focus {
351
+ border-color: var(--primary);
352
+ }
353
+ .layer-id-input {
354
+ border-style: dashed;
355
+ font-size: 12px;
356
+ }
357
+ .param-input-label {
358
+ font-size: 13px;
359
+ color: var(--text-muted);
360
+ display: flex;
361
+ align-items: center;
362
+ gap: 8px;
363
+ }
364
+ .form-actions {
365
+ display: flex;
366
+ gap: 8px;
367
+ }
368
+ .call-btn {
369
+ font-size: 12px;
370
+ font-weight: 600;
371
+ padding: 6px 16px;
372
+ border-radius: 6px;
373
+ border: none;
374
+ background: var(--gradient);
375
+ color: var(--dark);
376
+ cursor: pointer;
377
+ }
378
+ .call-btn:hover { opacity: 0.9; }
379
+ .tool-response {
380
+ font-size: 12px;
381
+ background: var(--dark);
382
+ border: 1px solid var(--dark-3);
383
+ border-radius: 6px;
384
+ padding: 10px 12px;
385
+ color: var(--text-muted);
386
+ white-space: pre-wrap;
387
+ word-break: break-all;
388
+ display: none;
389
+ max-height: 300px;
390
+ overflow: auto;
391
+ }
392
+ .tool-response.visible { display: block; }
393
+ </style>
394
+ </head>
395
+ <body>
396
+ <div class="container">
397
+ <div class="page-header">
398
+ <h1>Explore Services</h1>
399
+ <p>${services.length} service${services.length !== 1 ? "s" : ""} registered</p>
400
+ </div>
401
+ <div class="permissions-card">
402
+ <h3 class="section-title">Permissions</h3>
403
+ ${permissionsHtml}
404
+ </div>
405
+ <h3 class="section-title">Services</h3>
406
+ ${serviceCards}
407
+ </div>
408
+ <script>
409
+ function toggleForm(btn) {
410
+ const form = btn.closest('.tool').querySelector('.tool-form');
411
+ const visible = form.style.display !== 'none';
412
+ form.style.display = visible ? 'none' : 'flex';
413
+ btn.textContent = visible ? 'Try' : 'Hide';
414
+ }
415
+ async function callTool(e, service, path, method) {
416
+ e.preventDefault();
417
+ const form = e.target;
418
+ const responseEl = form.querySelector('.tool-response');
419
+ const rawField = form.querySelector('[name="__raw__"]');
420
+ const layerIdField = form.querySelector('[name="__layerId__"]');
421
+ const layerId = layerIdField ? layerIdField.value.trim() : '';
422
+ let body = {};
423
+ if (rawField) {
424
+ try { body = JSON.parse(rawField.value || '{}'); } catch { body = {}; }
425
+ } else {
426
+ for (const input of form.querySelectorAll('[name]')) {
427
+ if (input.name === '__layerId__') continue;
428
+ const name = input.name;
429
+ const type = input.dataset.type;
430
+ if (type === 'boolean') { body[name] = input.checked; }
431
+ else if (type === 'number') { body[name] = Number(input.value); }
432
+ else if (input.value) { body[name] = input.value; }
433
+ }
434
+ }
435
+ responseEl.textContent = 'Calling...';
436
+ responseEl.classList.add('visible');
437
+ try {
438
+ const isBodyMethod = ['POST', 'PUT', 'PATCH'].includes(method.toUpperCase());
439
+ const url = '/services/' + service + '/api/' + path;
440
+ const headers = {};
441
+ if (isBodyMethod) { headers['Content-Type'] = 'application/json'; }
442
+ if (layerId) { headers['X-LayerId'] = layerId; }
443
+ const opts = { method: method.toUpperCase(), headers };
444
+ if (isBodyMethod) { opts.body = JSON.stringify(body); }
445
+ const res = await fetch(url, opts);
446
+ const text = await res.text();
447
+ try { responseEl.textContent = JSON.stringify(JSON.parse(text), null, 2); }
448
+ catch { responseEl.textContent = text; }
449
+ } catch (err) {
450
+ responseEl.textContent = 'Error: ' + err.message;
451
+ }
452
+ }
453
+ </script>
454
+ </body>
455
+ </html>`;
456
+ }
457
+ // --- App Builder ---
458
+ function createApp(config) {
459
+ var _a, _b, _c, _d, _e;
460
+ const app = (0, express_1.default)();
461
+ const server = (0, node_http_1.createServer)(app);
462
+ const services = [];
463
+ let appPermissions = (_a = config === null || config === void 0 ? void 0 : config.permissions) !== null && _a !== void 0 ? _a : [];
464
+ const engineUrl = (_c = (_b = config === null || config === void 0 ? void 0 : config.engineUrl) !== null && _b !== void 0 ? _b : process.env.ENGINE_URL) !== null && _c !== void 0 ? _c : "";
465
+ const accessKey = (_e = (_d = config === null || config === void 0 ? void 0 : config.accessKey) !== null && _d !== void 0 ? _d : process.env.OAI_ACCESS_KEY) !== null && _e !== void 0 ? _e : "";
466
+ // Context middleware
467
+ app.use(async (req, res, next) => {
468
+ var _a;
469
+ const layerId = req.get("X-LayerId");
470
+ if (layerId) {
471
+ const context = await resolveContext(layerId, engineUrl, accessKey);
472
+ res.locals.context = context;
473
+ res.locals.engineClient = (0, services_1.createEngineClient)((_a = process.env.ENGINE_URL) !== null && _a !== void 0 ? _a : null, accessKey);
474
+ const apiClient = (0, services_1.createApiClient)();
475
+ (0, oauth_utils_1.setupClientCredentials)(apiClient, {
476
+ client_id: accessKey,
477
+ client_secret: `${accessKey}:${context.identity.workspaceOwnerId}`,
478
+ });
479
+ res.locals.apiClient = apiClient;
480
+ }
481
+ next();
482
+ });
483
+ app.use(express_1.default.json());
484
+ function registerService(definition) {
485
+ var _a, _b;
486
+ services.push(definition);
487
+ const router = (0, express_1.Router)();
488
+ if (definition.defaultSettings) {
489
+ router.get("/api/default-settings", (_req, res) => {
490
+ res.status(200).json(definition.defaultSettings);
491
+ });
492
+ }
493
+ router.get("/api/description", async (_req, res) => {
494
+ try {
495
+ const context = res.locals.context;
496
+ const desc = typeof definition.description === "function"
497
+ ? await definition.description(context, res.locals.engineClient, res.locals.apiClient)
498
+ : definition.description;
499
+ res.status(200).json(desc);
500
+ }
501
+ catch (e) {
502
+ console.warn(e);
503
+ res.status(500).send(`${e}`);
504
+ }
505
+ });
506
+ if (definition.touch) {
507
+ router.post("/api/touch", async (_req, res) => {
508
+ try {
509
+ const context = res.locals.context;
510
+ await definition.touch(context, res.locals.engineClient, res.locals.apiClient);
511
+ res.status(204).send();
512
+ }
513
+ catch (e) {
514
+ console.warn(e);
515
+ res.status(500).send(`${e}`);
516
+ }
517
+ });
518
+ }
519
+ if (definition.tools) {
520
+ for (const [toolName, handler] of Object.entries(definition.tools)) {
521
+ const toolDesc = typeof definition.description !== "function"
522
+ ? definition.description.find((d) => d.path === toolName)
523
+ : undefined;
524
+ const method = (_b = (_a = toolDesc === null || toolDesc === void 0 ? void 0 : toolDesc.method) === null || _a === void 0 ? void 0 : _a.toLowerCase()) !== null && _b !== void 0 ? _b : "post";
525
+ const routeHandler = async (req, res) => {
526
+ try {
527
+ const context = res.locals.context;
528
+ const result = await handler(req.body, context, res.locals.engineClient, res.locals.apiClient);
529
+ if (typeof result === "string") {
530
+ res.status(200).send(result);
531
+ }
532
+ else {
533
+ res.status(200).json(result);
534
+ }
535
+ }
536
+ catch (e) {
537
+ console.warn(e);
538
+ res.status(500).send(`${e}`);
539
+ }
540
+ };
541
+ router[method](`/api/${toolName}`, routeHandler);
542
+ }
543
+ }
544
+ app.use(`/services/${definition.unique_name}`, router);
545
+ }
546
+ function mountGlobalEndpoints() {
547
+ app.get("/services", (_req, res) => {
548
+ res.status(200).json(services.map((s) => ({
549
+ unique_name: s.unique_name,
550
+ service_name: s.service_name,
551
+ service_description: s.service_description,
552
+ })));
553
+ });
554
+ app.get("/permissions", (_req, res) => {
555
+ res.status(200).json(appPermissions);
556
+ });
557
+ if ((config === null || config === void 0 ? void 0 : config.explore) !== false) {
558
+ app.get("/explore", (_req, res) => {
559
+ res.status(200).send(renderExplorePage(services, appPermissions));
560
+ });
561
+ }
562
+ }
563
+ const oaiApp = {
564
+ expressApp: app,
565
+ httpServer: server,
566
+ service(definition) {
567
+ registerService(definition);
568
+ return oaiApp;
569
+ },
570
+ permissions(permissions) {
571
+ appPermissions = permissions;
572
+ return oaiApp;
573
+ },
574
+ listen(port) {
575
+ var _a;
576
+ mountGlobalEndpoints();
577
+ const p = (_a = port !== null && port !== void 0 ? port : config === null || config === void 0 ? void 0 : config.port) !== null && _a !== void 0 ? _a : 3001;
578
+ server.listen(p, () => {
579
+ console.log(`Server is running on http://localhost:${p}`);
580
+ if ((config === null || config === void 0 ? void 0 : config.explore) !== false) {
581
+ console.log(`Explore services at http://localhost:${p}/explore`);
582
+ }
583
+ });
584
+ return server;
585
+ },
586
+ };
587
+ return oaiApp;
588
+ }
589
+ //# sourceMappingURL=app-builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-builder.js","sourceRoot":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C;YAC5B,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,WAAW,CAAC,WAAyB;YACnC,cAAc,GAAG,WAAW,CAAC;YAC7B,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,MAAM,CAAC,IAAsB;;YAC3B,oBAAoB,EAAE,CAAC;YACvB,MAAM,CAAC,GAAG,MAAA,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,mCAAI,IAAI,CAAC;YACvC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE;gBACpB,OAAO,CAAC,GAAG,CAAC,yCAAyC,CAAC,EAAE,CAAC,CAAC;gBAC1D,IAAI,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,MAAK,KAAK,EAAE,CAAC;oBAC9B,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,UAAU,CAAC,CAAC;gBACnE,CAAC;YACH,CAAC,CAAC,CAAC;YACH,OAAO,MAAM,CAAC;QAChB,CAAC;KACF,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,33 @@
1
+ import type { Client } from './client';
2
+ import type { Application } from './types.gen';
3
+ import type { Context, Message, Permission, ServiceDescription, ServiceInfo, Setting } from './shared-types';
4
+ export type { AgentIdentity, Context, Message, Permission, PermissionName, ServiceDescription, ServiceDescriptionPart, ServiceInfo, Setting, } from './shared-types';
5
+ export { getBooleanSetting, getTextSetting, getSecretSetting } from './shared-types';
6
+ /** Create a client configured for an application's URL, optionally with a layer ID for context */
7
+ export declare function createApplicationClient(application: Application, layerId?: string): Client;
8
+ /** Create a bare API client (no auth configured). Use with setupClientCredentials. */
9
+ export declare function createApiClient(): Client;
10
+ /** Create a client configured for the engine URL with an access key */
11
+ export declare function createEngineClient(engineUrl: string | null, accessKey: string): Client;
12
+ /** Create a client configured for the production engine with an access key */
13
+ export declare function createEngineClient(accessKey: string): Client;
14
+ /** List all available services */
15
+ export declare function listServices(client: Client): Promise<ServiceInfo[]>;
16
+ /** Get permissions required by the application */
17
+ export declare function getPermissions(client: Client): Promise<Permission[]>;
18
+ /** Get default settings for a service */
19
+ export declare function getDefaultSettings(serviceName: string, client: Client): Promise<Setting[]>;
20
+ /** Get the service description (tools it exposes) */
21
+ export declare function getServiceDescription(serviceName: string, client: Client): Promise<ServiceDescription>;
22
+ /** Touch a service to notify it that its context may have changed */
23
+ export declare function touchService(serviceName: string, client: Client): Promise<void>;
24
+ /** Call a service tool (arbitrary endpoint exposed by a service) */
25
+ export declare function callServiceTool<TBody = unknown, TResponse = unknown>(serviceName: string, toolPath: string, client: Client, options?: {
26
+ method?: "POST" | "GET" | "PATCH" | "DELETE" | "PUT";
27
+ body?: TBody;
28
+ }): Promise<TResponse>;
29
+ /** Get the context for a layer */
30
+ export declare function getContext(layerId: string, client: Client): Promise<Context>;
31
+ /** Send messages to an agent's layer and get the inference response */
32
+ export declare function sendMessages(agentId: string, layerIndex: number, messages: Message[], layerId: string, client: Client): Promise<string>;
33
+ //# sourceMappingURL=services.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../typescript/services.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAU,MAAM,UAAU,CAAC;AAE/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EACV,OAAO,EACP,OAAO,EACP,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,OAAO,EACR,MAAM,gBAAgB,CAAC;AAGxB,YAAY,EACV,aAAa,EACb,OAAO,EACP,OAAO,EACP,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACtB,WAAW,EACX,OAAO,GACR,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIrF,kGAAkG;AACl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