@orboto/mcp 0.214.2 → 0.215.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.
package/dist/tail-labels.js
CHANGED
|
@@ -11,6 +11,15 @@ export const TAIL_LABELS = [
|
|
|
11
11
|
{ method: 'GET', path: new RegExp(`^/capacity/resources/${SEG}/plan$`), label: 'orboto_capacity_plan' },
|
|
12
12
|
{ method: 'POST', path: new RegExp(`^/capacity/resources/${SEG}/plan$`), label: 'orboto_capacity_plan' },
|
|
13
13
|
{ method: 'POST', path: /^\/capacity\/seeds\/nightly-unity$/, label: 'orboto_capacity_seed' },
|
|
14
|
+
{ method: 'GET', path: /^\/admin\/chat-bot\/(connections(\/[^/]+\/(health|slack-manifest))?|routes|links|settings|deliveries)$/, label: 'orboto_chat_bot_status' },
|
|
15
|
+
{ method: 'GET', path: new RegExp(`^/(chat-bot/connections|chat-bot/links/mine|projects/${SEG}/chat-bot/routes)$`), label: 'orboto_chat_bot_status' },
|
|
16
|
+
{ method: 'POST', path: /^\/admin\/chat-bot\/(connections(\/[^/]+\/(rotate-credentials|slack-install|discord-commands|unpin))?|links\/[^/]+\/revoke|deliveries\/[^/]+\/retry)$/, label: 'orboto_chat_bot_admin' },
|
|
17
|
+
{ method: 'PATCH', path: /^\/admin\/chat-bot\/(connections\/[^/]+|settings)$/, label: 'orboto_chat_bot_admin' },
|
|
18
|
+
{ method: 'DELETE', path: /^\/admin\/chat-bot\/connections\/[^/]+$/, label: 'orboto_chat_bot_admin' },
|
|
19
|
+
{ method: 'POST', path: new RegExp(`^/projects/${SEG}/chat-bot/routes(/${SEG}/send-test)?$`), label: 'orboto_chat_bot_route' },
|
|
20
|
+
{ method: 'PATCH', path: new RegExp(`^/projects/${SEG}/chat-bot/routes/${SEG}$`), label: 'orboto_chat_bot_route' },
|
|
21
|
+
{ method: 'DELETE', path: new RegExp(`^/projects/${SEG}/chat-bot/routes/${SEG}$`), label: 'orboto_chat_bot_route' },
|
|
22
|
+
{ method: 'POST', path: /^\/chat-bot\/links\/(confirm|[^/]+\/revoke)$/, label: 'orboto_chat_bot_link' },
|
|
14
23
|
];
|
|
15
24
|
/** The metrics label of one tool call: the stand-in tool name for a labelled api_call, else the tool name itself. */
|
|
16
25
|
export function metricsToolName(toolName, args) {
|
|
@@ -114,7 +114,7 @@ describe('ORB-2272 - metrics labels of the capacity tail', () => {
|
|
|
114
114
|
for (const [method, path, label] of cases)
|
|
115
115
|
expect(metricsToolName('orboto_api_call', { method, path }), `${method} ${path}`).toBe(label);
|
|
116
116
|
expect(metricsToolName('orboto_get_ticket', { method: 'POST', path: '/capacity/claims' })).toBe('orboto_get_ticket');
|
|
117
|
-
expect(new Set(TAIL_LABELS.map((l) => l.label))).toEqual(new Set(['orboto_capacity_list', 'orboto_capacity_claim', 'orboto_capacity_renew', 'orboto_capacity_release', 'orboto_capacity_windows', 'orboto_capacity_plan', 'orboto_capacity_seed', 'orboto_capacity_stats']));
|
|
117
|
+
expect(new Set(TAIL_LABELS.map((l) => l.label).filter((l) => l.startsWith('orboto_capacity_')))).toEqual(new Set(['orboto_capacity_list', 'orboto_capacity_claim', 'orboto_capacity_renew', 'orboto_capacity_release', 'orboto_capacity_windows', 'orboto_capacity_plan', 'orboto_capacity_seed', 'orboto_capacity_stats']));
|
|
118
118
|
});
|
|
119
119
|
it('ORB-2275 - labels the metrics read as orboto_capacity_stats, with or without a query', () => {
|
|
120
120
|
expect(metricsToolName('orboto_api_call', { method: 'GET', path: '/capacity/metrics' })).toBe('orboto_capacity_stats');
|
|
@@ -137,7 +137,7 @@ describe('ORB-2275 - capacity metrics through orboto_api_call', () => {
|
|
|
137
137
|
await flush();
|
|
138
138
|
expect(proxied.map((p) => `${p.method} ${p.path}`)).toEqual(['GET /capacity/metrics', 'GET /capacity/metrics']);
|
|
139
139
|
expect(instrument.map((e) => [e.toolName, e.success])).toEqual([['orboto_capacity_stats', true], ['orboto_capacity_stats', false]]);
|
|
140
|
-
expect(new Set(TAIL_LABELS.map((l) => l.label))).toEqual(new Set(['orboto_capacity_list', 'orboto_capacity_claim', 'orboto_capacity_renew', 'orboto_capacity_release', 'orboto_capacity_windows', 'orboto_capacity_plan', 'orboto_capacity_seed', 'orboto_capacity_stats']));
|
|
140
|
+
expect(new Set(TAIL_LABELS.map((l) => l.label).filter((l) => l.startsWith('orboto_capacity_')))).toEqual(new Set(['orboto_capacity_list', 'orboto_capacity_claim', 'orboto_capacity_renew', 'orboto_capacity_release', 'orboto_capacity_windows', 'orboto_capacity_plan', 'orboto_capacity_seed', 'orboto_capacity_stats']));
|
|
141
141
|
});
|
|
142
142
|
});
|
|
143
143
|
describe('ORB-2272 - orboto_help topic capacity', () => {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** ORB-2458 - the chat bot reaches an MCP-only agent through the escape hatch; every call is labelled in the metrics. */
|
|
2
|
+
import { describe, expect, it } from 'vitest';
|
|
3
|
+
import { metricsToolName } from '../tail-labels.js';
|
|
4
|
+
const ID = '6f1c2b1e-3d4a-4b5c-8d9e-0a1b2c3d4e5f';
|
|
5
|
+
const call = (method, path) => metricsToolName('orboto_api_call', { method, path });
|
|
6
|
+
describe('ORB-2458 - chat bot tail labels', () => {
|
|
7
|
+
it('labels the reads', () => {
|
|
8
|
+
for (const path of ['/admin/chat-bot/connections', `/admin/chat-bot/connections/${ID}/health`, `/admin/chat-bot/connections/${ID}/slack-manifest`, '/admin/chat-bot/routes', '/admin/chat-bot/links?includeRevoked=true', '/admin/chat-bot/settings', '/admin/chat-bot/deliveries', '/chat-bot/connections', '/chat-bot/links/mine', `/projects/${ID}/chat-bot/routes`]) {
|
|
9
|
+
expect(call('GET', path), path).toBe('orboto_chat_bot_status');
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
it('labels the operator writes, the route writes and the user link writes', () => {
|
|
13
|
+
expect(call('POST', '/admin/chat-bot/connections')).toBe('orboto_chat_bot_admin');
|
|
14
|
+
expect(call('POST', `/admin/chat-bot/connections/${ID}/rotate-credentials`)).toBe('orboto_chat_bot_admin');
|
|
15
|
+
expect(call('POST', `/admin/chat-bot/connections/${ID}/discord-commands`)).toBe('orboto_chat_bot_admin');
|
|
16
|
+
expect(call('POST', `/admin/chat-bot/connections/${ID}/unpin`)).toBe('orboto_chat_bot_admin');
|
|
17
|
+
expect(call('PATCH', '/admin/chat-bot/settings')).toBe('orboto_chat_bot_admin');
|
|
18
|
+
expect(call('DELETE', `/admin/chat-bot/connections/${ID}`)).toBe('orboto_chat_bot_admin');
|
|
19
|
+
expect(call('POST', `/admin/chat-bot/links/${ID}/revoke`)).toBe('orboto_chat_bot_admin');
|
|
20
|
+
expect(call('POST', `/admin/chat-bot/deliveries/${ID}/retry`)).toBe('orboto_chat_bot_admin');
|
|
21
|
+
expect(call('POST', `/projects/${ID}/chat-bot/routes`)).toBe('orboto_chat_bot_route');
|
|
22
|
+
expect(call('POST', `/projects/${ID}/chat-bot/routes/${ID}/send-test`)).toBe('orboto_chat_bot_route');
|
|
23
|
+
expect(call('PATCH', `/projects/${ID}/chat-bot/routes/${ID}`)).toBe('orboto_chat_bot_route');
|
|
24
|
+
expect(call('DELETE', `/projects/${ID}/chat-bot/routes/${ID}`)).toBe('orboto_chat_bot_route');
|
|
25
|
+
expect(call('POST', '/chat-bot/links/confirm')).toBe('orboto_chat_bot_link');
|
|
26
|
+
expect(call('POST', `/chat-bot/links/${ID}/revoke`)).toBe('orboto_chat_bot_link');
|
|
27
|
+
});
|
|
28
|
+
it('leaves the public receivers and unrelated calls unlabelled', () => {
|
|
29
|
+
expect(call('POST', `/inbound/chat-bot/slack/${ID}/events`)).toBe('orboto_api_call');
|
|
30
|
+
expect(call('GET', '/projects')).toBe('orboto_api_call');
|
|
31
|
+
});
|
|
32
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orboto/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.215.1",
|
|
4
4
|
"description": "Model Context Protocol server for orboto - exposes tickets, projects, milestones, time, docs, primer-facts, alerts and absences as MCP tools for Claude Desktop / Cursor / Copilot Chat / any MCP-aware AI client.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|