@troykelly/openclaw-projects 0.0.29 → 0.0.31

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 (71) hide show
  1. package/dist/api-client.d.ts +2 -0
  2. package/dist/api-client.d.ts.map +1 -1
  3. package/dist/api-client.js +4 -0
  4. package/dist/api-client.js.map +1 -1
  5. package/dist/register-openclaw.d.ts.map +1 -1
  6. package/dist/register-openclaw.js +243 -12
  7. package/dist/register-openclaw.js.map +1 -1
  8. package/dist/services/api-source-service.d.ts +181 -0
  9. package/dist/services/api-source-service.d.ts.map +1 -0
  10. package/dist/services/api-source-service.js +120 -0
  11. package/dist/services/api-source-service.js.map +1 -0
  12. package/dist/tools/api-credential-manage.d.ts +83 -0
  13. package/dist/tools/api-credential-manage.d.ts.map +1 -0
  14. package/dist/tools/api-credential-manage.js +71 -0
  15. package/dist/tools/api-credential-manage.js.map +1 -0
  16. package/dist/tools/api-get.d.ts +47 -0
  17. package/dist/tools/api-get.d.ts.map +1 -0
  18. package/dist/tools/api-get.js +41 -0
  19. package/dist/tools/api-get.js.map +1 -0
  20. package/dist/tools/api-list.d.ts +54 -0
  21. package/dist/tools/api-list.d.ts.map +1 -0
  22. package/dist/tools/api-list.js +46 -0
  23. package/dist/tools/api-list.js.map +1 -0
  24. package/dist/tools/api-onboard.d.ts +134 -0
  25. package/dist/tools/api-onboard.d.ts.map +1 -0
  26. package/dist/tools/api-onboard.js +109 -0
  27. package/dist/tools/api-onboard.js.map +1 -0
  28. package/dist/tools/api-recall.d.ts +69 -0
  29. package/dist/tools/api-recall.d.ts.map +1 -0
  30. package/dist/tools/api-recall.js +101 -0
  31. package/dist/tools/api-recall.js.map +1 -0
  32. package/dist/tools/api-refresh.d.ts +50 -0
  33. package/dist/tools/api-refresh.d.ts.map +1 -0
  34. package/dist/tools/api-refresh.js +55 -0
  35. package/dist/tools/api-refresh.js.map +1 -0
  36. package/dist/tools/api-remove.d.ts +46 -0
  37. package/dist/tools/api-remove.d.ts.map +1 -0
  38. package/dist/tools/api-remove.js +45 -0
  39. package/dist/tools/api-remove.js.map +1 -0
  40. package/dist/tools/api-restore.d.ts +45 -0
  41. package/dist/tools/api-restore.d.ts.map +1 -0
  42. package/dist/tools/api-restore.js +41 -0
  43. package/dist/tools/api-restore.js.map +1 -0
  44. package/dist/tools/api-update.d.ts +57 -0
  45. package/dist/tools/api-update.d.ts.map +1 -0
  46. package/dist/tools/api-update.js +46 -0
  47. package/dist/tools/api-update.js.map +1 -0
  48. package/dist/tools/index.d.ts +13 -0
  49. package/dist/tools/index.d.ts.map +1 -1
  50. package/dist/tools/index.js +18 -0
  51. package/dist/tools/index.js.map +1 -1
  52. package/dist/tools/terminal-connections.d.ts +387 -0
  53. package/dist/tools/terminal-connections.d.ts.map +1 -0
  54. package/dist/tools/terminal-connections.js +631 -0
  55. package/dist/tools/terminal-connections.js.map +1 -0
  56. package/dist/tools/terminal-search.d.ts +139 -0
  57. package/dist/tools/terminal-search.d.ts.map +1 -0
  58. package/dist/tools/terminal-search.js +248 -0
  59. package/dist/tools/terminal-search.js.map +1 -0
  60. package/dist/tools/terminal-sessions.d.ts +344 -0
  61. package/dist/tools/terminal-sessions.d.ts.map +1 -0
  62. package/dist/tools/terminal-sessions.js +586 -0
  63. package/dist/tools/terminal-sessions.js.map +1 -0
  64. package/dist/tools/terminal-tunnels.d.ts +156 -0
  65. package/dist/tools/terminal-tunnels.d.ts.map +1 -0
  66. package/dist/tools/terminal-tunnels.js +266 -0
  67. package/dist/tools/terminal-tunnels.js.map +1 -0
  68. package/dist/types/openclaw-api.d.ts +1 -0
  69. package/dist/types/openclaw-api.d.ts.map +1 -1
  70. package/openclaw.plugin.json +1 -1
  71. package/package.json +1 -1
@@ -28,6 +28,8 @@ export interface RequestOptions {
28
28
  user_id?: string;
29
29
  /** User email for identity resolution (e.g. namespace grant creation) (#1567) */
30
30
  user_email?: string;
31
+ /** Target namespace for the request (adds X-Namespace header) (#1760) */
32
+ namespace?: string;
31
33
  /** Custom timeout (overrides config) */
32
34
  timeout?: number;
33
35
  /** Mark request as coming from an agent (adds X-OpenClaw-Agent header) */
@@ -1 +1 @@
1
- {"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AAExD,yBAAyB;AACzB,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,2BAA2B;AAC3B,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,CAAC,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,QAAQ,CAAA;CAAE,CAAC;AAE9F,sBAAsB;AACtB,MAAM,WAAW,cAAc;IAC7B,0BAA0B;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iFAAiF;IACjF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0EAA0E;IAC1E,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,yBAAyB;AACzB,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,0BAA0B;AAC1B,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB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B,GAAG,SAAS,CAEpE"}
@@ -145,6 +145,10 @@ export class ApiClient {
145
145
  if (options?.user_email) {
146
146
  headers['X-User-Email'] = options.user_email;
147
147
  }
148
+ // Namespace scoping — ensures by-ID operations target the correct namespace (#1760)
149
+ if (options?.namespace) {
150
+ headers['X-Namespace'] = options.namespace;
151
+ }
148
152
  // Mark request as coming from an agent for privacy filtering
149
153
  if (options?.isAgent) {
150
154
  headers['X-OpenClaw-Agent'] = options.user_id || 'plugin-agent';
@@ -1 +1 @@
1
- {"version":3,"file":"api-client.js","sourceRoot":"","sources":["../src/api-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,YAAY,EAAe,MAAM,aAAa,CAAC;AAuCxD;;GAEG;AACH,SAAS,KAAK,CAAC,EAAU;IACvB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC;AAED;;GAEG;AACH,SAAS,iBAAiB;IACxB,OAAO,MAAM,CAAC,UAAU,EAAE,CAAC;AAC7B,CAAC;AAED;;GAEG;AACH,SAAS,mBAAmB,CAAC,OAAe,EAAE,SAAS,GAAG,IAAI,EAAE,QAAQ,GAAG,KAAK;IAC9E,yCAAyC;IACzC,MAAM,gBAAgB,GAAG,SAAS,GAAG,CAAC,IAAI,OAAO,CAAC;IAClD,+CAA+C;IAC/C,MAAM,MAAM,GAAG,gBAAgB,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC;IAC/D,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,SAAS,iBAAiB,CAAC,MAAc;IACvC,8EAA8E;IAC9E,OAAO,MAAM,KAAK,CAAC,IAAI,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,IAAI,GAAG,IAAI,MAAM,GAAG,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,CAAC;IACpB,4GAA4G;IAC5G,iBAAiB,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACzD,oEAAoE;IACpE,eAAe,EAAE,OAAO,CAAC;IACzB,mEAAmE;IACnE,sBAAsB,EAAE,MAAM,CAAC;IAC/B,2DAA2D;IAC3D,eAAe,EAAE,OAAO,CAAC;IACzB,gEAAgE;IAChE,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAyjDD;;;;GAIG;AACH,wBAAsB,sBAAsB,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA6C9E;AAwuED;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,iBAq9B9B,CAAC;AAEF,yDAAyD;AACzD,eAAe,gBAAgB,CAAC;AAEhC,2CAA2C;AAC3C,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCnB,CAAC"}
@@ -16,7 +16,7 @@ import { createGatewayMethods, registerGatewayRpcMethods } from './gateway/rpc-m
16
16
  import { createAutoCaptureHook, createGraphAwareRecallHook } from './hooks.js';
17
17
  import { createLogger } from './logger.js';
18
18
  import { createNotificationService } from './services/notification-service.js';
19
- import { createContextSearchTool, createLinksQueryTool, createLinksRemoveTool, createLinksSetTool, createProjectSearchTool, createSkillStoreAggregateTool, createSkillStoreCollectionsTool, createSkillStoreDeleteTool, createSkillStoreGetTool, createSkillStoreListTool, createSkillStorePutTool, createSkillStoreSearchTool, } from './tools/index.js';
19
+ import { createContextSearchTool, createLinksQueryTool, createLinksRemoveTool, createLinksSetTool, createProjectSearchTool, createSkillStoreAggregateTool, createSkillStoreCollectionsTool, createSkillStoreDeleteTool, createSkillStoreGetTool, createSkillStoreListTool, createSkillStorePutTool, createSkillStoreSearchTool, createApiOnboardTool, createApiRecallTool, createApiGetTool, createApiListTool, createApiUpdateTool, createApiCredentialManageTool, createApiRefreshTool, createApiRemoveTool, createApiRestoreTool, } from './tools/index.js';
20
20
  import { autoLinkInboundMessage } from './utils/auto-linker.js';
21
21
  import { blendScores, computeGeoScore, haversineDistanceKm } from './utils/geo.js';
22
22
  import { createBoundaryMarkers, detectInjectionPatternsAsync, sanitizeMessageForContext, sanitizeMetadataField, wrapExternalMessage, } from './utils/injection-protection.js';
@@ -1439,6 +1439,107 @@ const namespaceRevokeSchema = {
1439
1439
  },
1440
1440
  required: ['namespace', 'grant_id'],
1441
1441
  };
1442
+ // ── API Onboarding tool schemas (#1784, #1785, #1786) ─────────────────────
1443
+ const apiOnboardSchema = {
1444
+ type: 'object',
1445
+ properties: {
1446
+ spec_url: { type: 'string', description: 'URL to fetch the OpenAPI spec from.', format: 'uri' },
1447
+ spec_content: { type: 'string', description: 'Inline OpenAPI spec content (JSON or YAML).' },
1448
+ name: { type: 'string', description: 'Human-readable name for the API.', maxLength: 200 },
1449
+ description: { type: 'string', description: 'Description of the API.', maxLength: 2000 },
1450
+ tags: { type: 'array', description: 'Tags to categorise the API.', items: { type: 'string' } },
1451
+ credentials: {
1452
+ type: 'array',
1453
+ description: 'Credentials for authenticating API calls.',
1454
+ items: {
1455
+ type: 'object',
1456
+ properties: {
1457
+ header_name: { type: 'string' },
1458
+ header_prefix: { type: 'string' },
1459
+ resolve_strategy: { type: 'string', enum: ['literal', 'env', 'file', 'command'] },
1460
+ resolve_reference: { type: 'string' },
1461
+ purpose: { type: 'string', enum: ['api_call', 'spec_fetch'] },
1462
+ },
1463
+ required: ['header_name', 'resolve_strategy', 'resolve_reference'],
1464
+ },
1465
+ },
1466
+ spec_auth_headers: { type: 'object', description: 'Headers for fetching the spec URL (if auth-protected).', additionalProperties: { type: 'string' } },
1467
+ },
1468
+ required: [],
1469
+ };
1470
+ const apiRecallSchema = {
1471
+ type: 'object',
1472
+ properties: {
1473
+ query: { type: 'string', description: 'Natural-language search query for API capabilities.', minLength: 1, maxLength: 1000 },
1474
+ limit: { type: 'integer', description: 'Maximum results to return.', minimum: 1, maximum: 50, default: 10 },
1475
+ memory_kind: { type: 'string', description: 'Filter by memory kind.', enum: ['overview', 'tag_group', 'operation'] },
1476
+ api_source_id: { type: 'string', description: 'Filter to a specific API source.', format: 'uuid' },
1477
+ tags: { type: 'array', description: 'Filter by tags.', items: { type: 'string' } },
1478
+ },
1479
+ required: ['query'],
1480
+ };
1481
+ const apiGetSchema = {
1482
+ type: 'object',
1483
+ properties: {
1484
+ id: { type: 'string', description: 'UUID of the API source.', format: 'uuid' },
1485
+ },
1486
+ required: ['id'],
1487
+ };
1488
+ const apiListSchema = {
1489
+ type: 'object',
1490
+ properties: {
1491
+ limit: { type: 'integer', description: 'Maximum results.', minimum: 1, maximum: 100 },
1492
+ offset: { type: 'integer', description: 'Pagination offset.', minimum: 0 },
1493
+ status: { type: 'string', description: 'Filter by status.', enum: ['active', 'error', 'disabled'] },
1494
+ },
1495
+ required: [],
1496
+ };
1497
+ const apiUpdateSchema = {
1498
+ type: 'object',
1499
+ properties: {
1500
+ id: { type: 'string', description: 'UUID of the API source to update.', format: 'uuid' },
1501
+ name: { type: 'string', description: 'New name.', maxLength: 200 },
1502
+ description: { type: 'string', description: 'New description.', maxLength: 2000 },
1503
+ tags: { type: 'array', description: 'New tags.', items: { type: 'string' } },
1504
+ status: { type: 'string', description: 'New status.', enum: ['active', 'error', 'disabled'] },
1505
+ },
1506
+ required: ['id'],
1507
+ };
1508
+ const apiCredentialManageSchema = {
1509
+ type: 'object',
1510
+ properties: {
1511
+ api_source_id: { type: 'string', description: 'UUID of the API source.', format: 'uuid' },
1512
+ action: { type: 'string', description: 'Action to perform.', enum: ['add', 'update', 'remove'] },
1513
+ credential_id: { type: 'string', description: 'UUID of the credential (for update/remove).', format: 'uuid' },
1514
+ header_name: { type: 'string', description: 'HTTP header name (e.g. Authorization).' },
1515
+ header_prefix: { type: 'string', description: 'Header value prefix (e.g. Bearer).' },
1516
+ resolve_strategy: { type: 'string', description: 'How to resolve the credential.', enum: ['literal', 'env', 'file', 'command'] },
1517
+ resolve_reference: { type: 'string', description: 'Credential value or reference.' },
1518
+ purpose: { type: 'string', description: 'Credential purpose.', enum: ['api_call', 'spec_fetch'] },
1519
+ },
1520
+ required: ['api_source_id', 'action'],
1521
+ };
1522
+ const apiRefreshSchema = {
1523
+ type: 'object',
1524
+ properties: {
1525
+ id: { type: 'string', description: 'UUID of the API source to refresh.', format: 'uuid' },
1526
+ },
1527
+ required: ['id'],
1528
+ };
1529
+ const apiRemoveSchema = {
1530
+ type: 'object',
1531
+ properties: {
1532
+ id: { type: 'string', description: 'UUID of the API source to soft-delete.', format: 'uuid' },
1533
+ },
1534
+ required: ['id'],
1535
+ };
1536
+ const apiRestoreSchema = {
1537
+ type: 'object',
1538
+ properties: {
1539
+ id: { type: 'string', description: 'UUID of the API source to restore.', format: 'uuid' },
1540
+ },
1541
+ required: ['id'],
1542
+ };
1442
1543
  /**
1443
1544
  * Async namespace discovery — fetches accessible namespaces from the API
1444
1545
  * and updates state.resolvedNamespace.recall in-place (Issue #1537).
@@ -1490,10 +1591,21 @@ function createToolHandlers(state) {
1490
1591
  const { config, logger, apiClient } = state;
1491
1592
  // Issue #1644: Read user_id from mutable state on every call.
1492
1593
  const getAgentId = () => state.agentId;
1493
- /** Read user_id from mutable state on every call (Issue #1644) */
1594
+ /** Read user_id and namespace from mutable state on every call (Issue #1644, #1797) */
1494
1595
  const reqOpts = () => ({
1495
1596
  user_id: state.agentId,
1496
1597
  user_email: state.agentEmail,
1598
+ namespace: state.resolvedNamespace.default,
1599
+ });
1600
+ /**
1601
+ * Request options with namespace header for by-ID operations (#1760).
1602
+ * Only use for GET/PATCH/DELETE on specific items (e.g. /api/work-items/:id).
1603
+ * Do NOT use for list/search/create — those already pass namespace via body/query
1604
+ * and the X-Namespace header would override them (middleware checks headers first).
1605
+ */
1606
+ const reqOptsScoped = () => ({
1607
+ ...reqOpts(),
1608
+ namespace: state.resolvedNamespace.default,
1497
1609
  });
1498
1610
  /** Read namespace from mutable state on every call (Issue #1644) */
1499
1611
  function getStoreNamespace(params) {
@@ -1642,7 +1754,7 @@ function createToolHandlers(state) {
1642
1754
  const { memory_id, query } = params;
1643
1755
  try {
1644
1756
  if (memory_id) {
1645
- const response = await apiClient.delete(`/api/memories/${memory_id}`, reqOpts());
1757
+ const response = await apiClient.delete(`/api/memories/${memory_id}`, reqOptsScoped());
1646
1758
  if (!response.success) {
1647
1759
  return { success: false, error: response.error.message };
1648
1760
  }
@@ -1671,7 +1783,7 @@ function createToolHandlers(state) {
1671
1783
  }
1672
1784
  // Single high-confidence match → auto-delete
1673
1785
  if (matches.length === 1 && (matches[0].similarity ?? 0) > 0.9) {
1674
- const delResponse = await apiClient.delete(`/api/memories/${matches[0].id}`, reqOpts());
1786
+ const delResponse = await apiClient.delete(`/api/memories/${matches[0].id}`, reqOptsScoped());
1675
1787
  if (!delResponse.success) {
1676
1788
  return { success: false, error: delResponse.error.message };
1677
1789
  }
@@ -1684,7 +1796,7 @@ function createToolHandlers(state) {
1684
1796
  };
1685
1797
  }
1686
1798
  // Multiple matches or low confidence → return candidates, don't delete
1687
- const list = matches.map((m) => `- [${m.id.slice(0, 8)}] ${m.content.slice(0, 60)}${m.content.length > 60 ? '...' : ''}`).join('\n');
1799
+ const list = matches.map((m) => `- [${m.id}] ${m.content.slice(0, 60)}${m.content.length > 60 ? '...' : ''}`).join('\n');
1688
1800
  return {
1689
1801
  success: true,
1690
1802
  data: {
@@ -1730,7 +1842,7 @@ function createToolHandlers(state) {
1730
1842
  async project_get(params) {
1731
1843
  const { project_id } = params;
1732
1844
  try {
1733
- const response = await apiClient.get(`/api/work-items/${project_id}?user_email=${encodeURIComponent(state.agentId)}`, reqOpts());
1845
+ const response = await apiClient.get(`/api/work-items/${project_id}?user_email=${encodeURIComponent(state.agentId)}`, reqOptsScoped());
1734
1846
  if (!response.success) {
1735
1847
  return { success: false, error: response.error.message };
1736
1848
  }
@@ -1843,7 +1955,7 @@ function createToolHandlers(state) {
1843
1955
  async todo_complete(params) {
1844
1956
  const { todoId } = params;
1845
1957
  try {
1846
- const response = await apiClient.patch(`/api/work-items/${todoId}/status?user_email=${encodeURIComponent(state.agentId)}`, { status: 'completed' }, reqOpts());
1958
+ const response = await apiClient.patch(`/api/work-items/${todoId}/status?user_email=${encodeURIComponent(state.agentId)}`, { status: 'completed' }, reqOptsScoped());
1847
1959
  if (!response.success) {
1848
1960
  return { success: false, error: response.error.message };
1849
1961
  }
@@ -1966,7 +2078,7 @@ function createToolHandlers(state) {
1966
2078
  async contact_get(params) {
1967
2079
  const { contact_id } = params;
1968
2080
  try {
1969
- const response = await apiClient.get(`/api/contacts/${contact_id}?user_email=${encodeURIComponent(state.agentId)}`, reqOpts());
2081
+ const response = await apiClient.get(`/api/contacts/${contact_id}?user_email=${encodeURIComponent(state.agentId)}`, reqOptsScoped());
1970
2082
  if (!response.success) {
1971
2083
  return { success: false, error: response.error.message };
1972
2084
  }
@@ -2046,7 +2158,7 @@ function createToolHandlers(state) {
2046
2158
  if (k !== 'namespace' && v !== undefined)
2047
2159
  body[k] = v;
2048
2160
  }
2049
- const response = await apiClient.patch(`/api/contacts/${contact_id}`, body, reqOpts());
2161
+ const response = await apiClient.patch(`/api/contacts/${contact_id}`, body, reqOptsScoped());
2050
2162
  if (!response.success) {
2051
2163
  return { success: false, error: response.error.message };
2052
2164
  }
@@ -2090,7 +2202,7 @@ function createToolHandlers(state) {
2090
2202
  if (!contact_id || !tags?.length)
2091
2203
  return { success: false, error: 'contact_id and tags are required' };
2092
2204
  try {
2093
- const response = await apiClient.post(`/api/contacts/${contact_id}/tags`, { tags }, reqOpts());
2205
+ const response = await apiClient.post(`/api/contacts/${contact_id}/tags`, { tags }, reqOptsScoped());
2094
2206
  if (!response.success) {
2095
2207
  return { success: false, error: response.error.message };
2096
2208
  }
@@ -2112,7 +2224,7 @@ function createToolHandlers(state) {
2112
2224
  if (!contact_id || !tag)
2113
2225
  return { success: false, error: 'contact_id and tag are required' };
2114
2226
  try {
2115
- const response = await apiClient.delete(`/api/contacts/${contact_id}/tags/${encodeURIComponent(tag)}`, reqOpts());
2227
+ const response = await apiClient.delete(`/api/contacts/${contact_id}/tags/${encodeURIComponent(tag)}`, reqOptsScoped());
2116
2228
  if (!response.success) {
2117
2229
  return { success: false, error: response.error.message };
2118
2230
  }
@@ -2729,7 +2841,7 @@ function createToolHandlers(state) {
2729
2841
  contact_id = contacts[0].id;
2730
2842
  }
2731
2843
  // Use graph traversal endpoint which returns related_contacts
2732
- const response = await apiClient.get(`/api/contacts/${contact_id}/relationships?user_email=${encodeURIComponent(state.agentId)}`, reqOpts());
2844
+ const response = await apiClient.get(`/api/contacts/${contact_id}/relationships?user_email=${encodeURIComponent(state.agentId)}`, reqOptsScoped());
2733
2845
  if (!response.success) {
2734
2846
  if (response.error.code === 'NOT_FOUND') {
2735
2847
  return { success: false, error: 'Contact not found.' };
@@ -3196,6 +3308,43 @@ function createToolHandlers(state) {
3196
3308
  return { success: false, error: 'Failed to revoke namespace access' };
3197
3309
  }
3198
3310
  },
3311
+ // ── API Onboarding tools (#1784, #1785, #1786) ──────────────────────
3312
+ async api_onboard(params) {
3313
+ const tool = createApiOnboardTool({ client: apiClient, logger, config, user_id: getAgentId() });
3314
+ return tool.execute(params);
3315
+ },
3316
+ async api_recall(params) {
3317
+ const tool = createApiRecallTool({ client: apiClient, logger, config, user_id: getAgentId() });
3318
+ return tool.execute(params);
3319
+ },
3320
+ async api_get(params) {
3321
+ const tool = createApiGetTool({ client: apiClient, logger, config, user_id: getAgentId() });
3322
+ return tool.execute(params);
3323
+ },
3324
+ async api_list(params) {
3325
+ const tool = createApiListTool({ client: apiClient, logger, config, user_id: getAgentId() });
3326
+ return tool.execute(params);
3327
+ },
3328
+ async api_update(params) {
3329
+ const tool = createApiUpdateTool({ client: apiClient, logger, config, user_id: getAgentId() });
3330
+ return tool.execute(params);
3331
+ },
3332
+ async api_credential_manage(params) {
3333
+ const tool = createApiCredentialManageTool({ client: apiClient, logger, config, user_id: getAgentId() });
3334
+ return tool.execute(params);
3335
+ },
3336
+ async api_refresh(params) {
3337
+ const tool = createApiRefreshTool({ client: apiClient, logger, config, user_id: getAgentId() });
3338
+ return tool.execute(params);
3339
+ },
3340
+ async api_remove(params) {
3341
+ const tool = createApiRemoveTool({ client: apiClient, logger, config, user_id: getAgentId() });
3342
+ return tool.execute(params);
3343
+ },
3344
+ async api_restore(params) {
3345
+ const tool = createApiRestoreTool({ client: apiClient, logger, config, user_id: getAgentId() });
3346
+ return tool.execute(params);
3347
+ },
3199
3348
  };
3200
3349
  }
3201
3350
  /**
@@ -3756,6 +3905,88 @@ export const registerOpenClaw = (api) => {
3756
3905
  return toAgentToolResult(result);
3757
3906
  },
3758
3907
  },
3908
+ // ── API Onboarding tools (#1784, #1785, #1786) ──────────────────────
3909
+ {
3910
+ name: 'api_onboard',
3911
+ description: 'Onboard a new API by providing its OpenAPI spec URL or inline content. Parses the spec into searchable memories and optionally stores credentials.',
3912
+ parameters: withNamespace(apiOnboardSchema),
3913
+ execute: async (_toolCallId, params, _signal, _onUpdate) => {
3914
+ const result = await handlers.api_onboard(params);
3915
+ return toAgentToolResult(result);
3916
+ },
3917
+ },
3918
+ {
3919
+ name: 'api_recall',
3920
+ description: 'Search onboarded API memories to find endpoints, operations, and capabilities. Returns operation details including method, path, parameters, and credentials.',
3921
+ parameters: withNamespaces(apiRecallSchema),
3922
+ execute: async (_toolCallId, params, _signal, _onUpdate) => {
3923
+ const result = await handlers.api_recall(params);
3924
+ return toAgentToolResult(result);
3925
+ },
3926
+ },
3927
+ {
3928
+ name: 'api_get',
3929
+ description: 'Get details about a specific onboarded API source including its status, spec version, and tags.',
3930
+ parameters: apiGetSchema,
3931
+ execute: async (_toolCallId, params, _signal, _onUpdate) => {
3932
+ const result = await handlers.api_get(params);
3933
+ return toAgentToolResult(result);
3934
+ },
3935
+ },
3936
+ {
3937
+ name: 'api_list',
3938
+ description: 'List all onboarded API sources. Optionally filter by status (active, error, disabled).',
3939
+ parameters: apiListSchema,
3940
+ execute: async (_toolCallId, params, _signal, _onUpdate) => {
3941
+ const result = await handlers.api_list(params);
3942
+ return toAgentToolResult(result);
3943
+ },
3944
+ },
3945
+ {
3946
+ name: 'api_update',
3947
+ description: 'Update an onboarded API source. Change its name, description, tags, or status.',
3948
+ parameters: apiUpdateSchema,
3949
+ execute: async (_toolCallId, params, _signal, _onUpdate) => {
3950
+ const result = await handlers.api_update(params);
3951
+ return toAgentToolResult(result);
3952
+ },
3953
+ },
3954
+ {
3955
+ name: 'api_credential_manage',
3956
+ description: 'Manage credentials for an onboarded API source: add, update, or remove authentication headers.',
3957
+ parameters: apiCredentialManageSchema,
3958
+ execute: async (_toolCallId, params, _signal, _onUpdate) => {
3959
+ const result = await handlers.api_credential_manage(params);
3960
+ return toAgentToolResult(result);
3961
+ },
3962
+ },
3963
+ {
3964
+ name: 'api_refresh',
3965
+ description: 'Refresh an API source by re-fetching its OpenAPI spec and updating memories. Returns a diff summary.',
3966
+ parameters: apiRefreshSchema,
3967
+ execute: async (_toolCallId, params, _signal, _onUpdate) => {
3968
+ const result = await handlers.api_refresh(params);
3969
+ return toAgentToolResult(result);
3970
+ },
3971
+ },
3972
+ {
3973
+ name: 'api_remove',
3974
+ description: 'Soft-delete an onboarded API source. Can be restored later with api_restore.',
3975
+ parameters: apiRemoveSchema,
3976
+ execute: async (_toolCallId, params, _signal, _onUpdate) => {
3977
+ const result = await handlers.api_remove(params);
3978
+ return toAgentToolResult(result);
3979
+ },
3980
+ },
3981
+ {
3982
+ name: 'api_restore',
3983
+ description: 'Restore a previously soft-deleted API source.',
3984
+ parameters: apiRestoreSchema,
3985
+ execute: async (_toolCallId, params, _signal, _onUpdate) => {
3986
+ const result = await handlers.api_restore(params);
3987
+ return toAgentToolResult(result);
3988
+ },
3989
+ },
3759
3990
  ];
3760
3991
  for (const tool of tools) {
3761
3992
  api.registerTool(tool);