@personaai/runtime 0.11.0 → 0.12.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 +1 -1
- package/dist/docs/.nojekyll +1 -0
- package/dist/index.cjs +64 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +64 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -207,6 +207,8 @@ interface RuntimeCapabilities {
|
|
|
207
207
|
knowledge?: boolean;
|
|
208
208
|
/** Vector store CRUD and file read/write. @default false */
|
|
209
209
|
stores?: boolean;
|
|
210
|
+
/** RCP (REST Connector Protocol) source CRUD + Test Connection. @default false */
|
|
211
|
+
rcpSources?: boolean;
|
|
210
212
|
/** Security/compliance audit log read access. @default false */
|
|
211
213
|
auditLogs?: boolean;
|
|
212
214
|
/** The Architect co-pilot — builds/edits Agents on the caller's behalf via tool calls. @default false */
|
package/dist/index.d.ts
CHANGED
|
@@ -207,6 +207,8 @@ interface RuntimeCapabilities {
|
|
|
207
207
|
knowledge?: boolean;
|
|
208
208
|
/** Vector store CRUD and file read/write. @default false */
|
|
209
209
|
stores?: boolean;
|
|
210
|
+
/** RCP (REST Connector Protocol) source CRUD + Test Connection. @default false */
|
|
211
|
+
rcpSources?: boolean;
|
|
210
212
|
/** Security/compliance audit log read access. @default false */
|
|
211
213
|
auditLogs?: boolean;
|
|
212
214
|
/** The Architect co-pilot — builds/edits Agents on the caller's behalf via tool calls. @default false */
|
package/dist/index.js
CHANGED
|
@@ -1354,6 +1354,57 @@ var deleteStoreFile = async (request, ctx) => {
|
|
|
1354
1354
|
return noContent();
|
|
1355
1355
|
};
|
|
1356
1356
|
|
|
1357
|
+
// src/routes/rcpSources.ts
|
|
1358
|
+
var listRcpSources = async (request, ctx) => {
|
|
1359
|
+
const items = await ctx.client.rcpSources.list({
|
|
1360
|
+
page: toInt(request.query.page),
|
|
1361
|
+
limit: toInt(request.query.limit),
|
|
1362
|
+
search: request.query.search
|
|
1363
|
+
});
|
|
1364
|
+
return json(200, items);
|
|
1365
|
+
};
|
|
1366
|
+
var createRcpSource = async (request, ctx) => {
|
|
1367
|
+
const body = requireBodyObject(request.body);
|
|
1368
|
+
const input = {
|
|
1369
|
+
name: requireStringField(body, "name"),
|
|
1370
|
+
url: requireStringField(body, "url"),
|
|
1371
|
+
description: typeof body.description === "string" ? body.description : void 0,
|
|
1372
|
+
authType: body.authType,
|
|
1373
|
+
secretRef: typeof body.secretRef === "string" ? body.secretRef : void 0,
|
|
1374
|
+
isEnabled: typeof body.isEnabled === "boolean" ? body.isEnabled : void 0,
|
|
1375
|
+
paramContextMap: Array.isArray(body.paramContextMap) ? body.paramContextMap : void 0
|
|
1376
|
+
};
|
|
1377
|
+
const source = await ctx.client.rcpSources.create(input);
|
|
1378
|
+
return json(201, source);
|
|
1379
|
+
};
|
|
1380
|
+
var getRcpSource = async (_request, ctx) => {
|
|
1381
|
+
const source = await ctx.client.rcpSources.get(requireParam(ctx.params, "id"));
|
|
1382
|
+
return json(200, source);
|
|
1383
|
+
};
|
|
1384
|
+
var updateRcpSource = async (request, ctx) => {
|
|
1385
|
+
const body = request.body ?? {};
|
|
1386
|
+
const source = await ctx.client.rcpSources.update(requireParam(ctx.params, "id"), body);
|
|
1387
|
+
return json(200, source);
|
|
1388
|
+
};
|
|
1389
|
+
var deleteRcpSource = async (_request, ctx) => {
|
|
1390
|
+
await ctx.client.rcpSources.delete(requireParam(ctx.params, "id"));
|
|
1391
|
+
return noContent();
|
|
1392
|
+
};
|
|
1393
|
+
var bulkDeleteRcpSources = async (request, ctx) => {
|
|
1394
|
+
const body = requireBodyObject(request.body);
|
|
1395
|
+
const ids = Array.isArray(body.ids) ? body.ids : [];
|
|
1396
|
+
const result = await ctx.client.rcpSources.bulkDelete(ids);
|
|
1397
|
+
return json(200, result);
|
|
1398
|
+
};
|
|
1399
|
+
var getRcpSourceUsage = async (_request, ctx) => {
|
|
1400
|
+
const usage = await ctx.client.rcpSources.getUsage(requireParam(ctx.params, "id"));
|
|
1401
|
+
return json(200, usage);
|
|
1402
|
+
};
|
|
1403
|
+
var testRcpSourceConnection = async (_request, ctx) => {
|
|
1404
|
+
const result = await ctx.client.rcpSources.testConnection(requireParam(ctx.params, "id"));
|
|
1405
|
+
return json(200, result);
|
|
1406
|
+
};
|
|
1407
|
+
|
|
1357
1408
|
// src/routes/auditLogs.ts
|
|
1358
1409
|
var listAuditLogs = async (request, ctx) => {
|
|
1359
1410
|
const items = await ctx.client.auditLogs.list({
|
|
@@ -1525,6 +1576,7 @@ function resolveCapabilities(capabilities) {
|
|
|
1525
1576
|
skills: capabilities?.skills ?? false,
|
|
1526
1577
|
knowledge: capabilities?.knowledge ?? false,
|
|
1527
1578
|
stores: capabilities?.stores ?? false,
|
|
1579
|
+
rcpSources: capabilities?.rcpSources ?? false,
|
|
1528
1580
|
auditLogs: capabilities?.auditLogs ?? false,
|
|
1529
1581
|
architect: capabilities?.architect ?? false,
|
|
1530
1582
|
workflowsWrite: capabilities?.workflowsWrite ?? false
|
|
@@ -1703,6 +1755,18 @@ function buildRoutes(capabilities) {
|
|
|
1703
1755
|
{ method: "DELETE", pattern: ["stores", ":id", "file"], handler: deleteStoreFile }
|
|
1704
1756
|
);
|
|
1705
1757
|
}
|
|
1758
|
+
if (capabilities.rcpSources) {
|
|
1759
|
+
routes.push(
|
|
1760
|
+
{ method: "GET", pattern: ["rcp-sources"], handler: listRcpSources },
|
|
1761
|
+
{ method: "POST", pattern: ["rcp-sources"], handler: createRcpSource },
|
|
1762
|
+
{ method: "POST", pattern: ["rcp-sources", "bulk-delete"], handler: bulkDeleteRcpSources },
|
|
1763
|
+
{ method: "GET", pattern: ["rcp-sources", ":id"], handler: getRcpSource },
|
|
1764
|
+
{ method: "PATCH", pattern: ["rcp-sources", ":id"], handler: updateRcpSource },
|
|
1765
|
+
{ method: "DELETE", pattern: ["rcp-sources", ":id"], handler: deleteRcpSource },
|
|
1766
|
+
{ method: "GET", pattern: ["rcp-sources", ":id", "usage"], handler: getRcpSourceUsage },
|
|
1767
|
+
{ method: "POST", pattern: ["rcp-sources", ":id", "test"], handler: testRcpSourceConnection }
|
|
1768
|
+
);
|
|
1769
|
+
}
|
|
1706
1770
|
if (capabilities.auditLogs) {
|
|
1707
1771
|
routes.push({ method: "GET", pattern: ["audit-logs"], handler: listAuditLogs });
|
|
1708
1772
|
}
|