@agimon-ai/doompi-mcp 0.0.1-alpha.45 → 0.0.1-alpha.48

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.
@@ -1 +1 @@
1
- {"version":3,"file":"mcpConstants.cjs","names":[],"sources":["../../../src/adapters/pi/mcpConstants.ts"],"sourcesContent":["export const PACKAGE_SOURCE = '@agimon-ai/doompi-mcp';\n/** Leader binding ids are restricted to `[a-z0-9][a-z0-9._:-]*`, so the scope and slash are dropped. */\nexport const LEADER_BINDING_PREFIX = 'doom-mcp';\n/**\n * Sits under the existing `extension` group, beside `tools` and `config`.\n *\n * A top-level key would have to be unique across every extension, and MCP belongs\n * next to the tool browser a user reaches for anyway. `t` in particular is taken:\n * it is Doom Task's top-level group.\n */\nexport const LEADER_GROUP = { key: 'e', label: 'extension', detail: 'tools, skills and config', order: 50 } as const;\nexport const LEADER_KEY = 'm';\nexport const LEADER_LABEL = 'mcp';\nexport const LEADER_DETAIL = 'servers and tools';\n/**\n * Footer status carrying the session's MCP server names, comma separated.\n *\n * MCP tools are registered under `<server>_<tool>`, a name only known at\n * runtime, so the cockpit's web plugin reads this status to recognise which\n * tool calls are MCP calls. The web half duplicates the literal (web/ may\n * only import src/types), and a test keeps the two in step.\n */\nexport const MCP_STATUS_KEY = 'doom-mcp';\n"],"mappings":"AAAA,MAUa,EAAe,CAAE,IAAK,IAAK,MAAO,YAAa,OAAQ,2BAA4B,MAAO,EAAG"}
1
+ {"version":3,"file":"mcpConstants.cjs","names":[],"sources":["../../../src/adapters/pi/mcpConstants.ts"],"sourcesContent":["export const PACKAGE_SOURCE = '@agimon-ai/doompi-mcp';\n/** Leader binding ids are restricted to `[a-z0-9][a-z0-9._:-]*`, so the scope and slash are dropped. */\nexport const LEADER_BINDING_PREFIX = 'doom-mcp';\n/**\n * Sits under the existing `extension` group, beside `tools` and `config`.\n *\n * A top-level key would have to be unique across every extension, and MCP belongs\n * next to the tool browser a user reaches for anyway. `t` in particular is taken:\n * it is Doom Task's top-level group.\n */\nexport const LEADER_GROUP = { key: 'e', label: 'extension', detail: 'tools, skills and config', order: 50 } as const;\nexport const LEADER_KEY = 'm';\nexport const LEADER_LABEL = 'mcp';\nexport const LEADER_DETAIL = 'servers and tools';\n/**\n * Footer status carrying the session's MCP server names, comma separated.\n *\n * MCP tools are registered under `<server>_<tool>`, a name only known at\n * runtime, so the cockpit's web plugin reads this status to recognise which\n * tool calls are MCP calls. The web half duplicates the literal (src/web may\n * only import src/types), and a test keeps the two in step.\n */\nexport const MCP_STATUS_KEY = 'doom-mcp';\n"],"mappings":"AAAA,MAUa,EAAe,CAAE,IAAK,IAAK,MAAO,YAAa,OAAQ,2BAA4B,MAAO,EAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"mcpConstants.mjs","names":[],"sources":["../../../src/adapters/pi/mcpConstants.ts"],"sourcesContent":["export const PACKAGE_SOURCE = '@agimon-ai/doompi-mcp';\n/** Leader binding ids are restricted to `[a-z0-9][a-z0-9._:-]*`, so the scope and slash are dropped. */\nexport const LEADER_BINDING_PREFIX = 'doom-mcp';\n/**\n * Sits under the existing `extension` group, beside `tools` and `config`.\n *\n * A top-level key would have to be unique across every extension, and MCP belongs\n * next to the tool browser a user reaches for anyway. `t` in particular is taken:\n * it is Doom Task's top-level group.\n */\nexport const LEADER_GROUP = { key: 'e', label: 'extension', detail: 'tools, skills and config', order: 50 } as const;\nexport const LEADER_KEY = 'm';\nexport const LEADER_LABEL = 'mcp';\nexport const LEADER_DETAIL = 'servers and tools';\n/**\n * Footer status carrying the session's MCP server names, comma separated.\n *\n * MCP tools are registered under `<server>_<tool>`, a name only known at\n * runtime, so the cockpit's web plugin reads this status to recognise which\n * tool calls are MCP calls. The web half duplicates the literal (web/ may\n * only import src/types), and a test keeps the two in step.\n */\nexport const MCP_STATUS_KEY = 'doom-mcp';\n"],"mappings":"AAAA,MAAa,EAAiB,wBAEjB,EAAwB,WAQxB,EAAe,CAAE,IAAK,IAAK,MAAO,YAAa,OAAQ,2BAA4B,MAAO,EAAG,EAG7F,EAAgB,oBAShB,EAAiB"}
1
+ {"version":3,"file":"mcpConstants.mjs","names":[],"sources":["../../../src/adapters/pi/mcpConstants.ts"],"sourcesContent":["export const PACKAGE_SOURCE = '@agimon-ai/doompi-mcp';\n/** Leader binding ids are restricted to `[a-z0-9][a-z0-9._:-]*`, so the scope and slash are dropped. */\nexport const LEADER_BINDING_PREFIX = 'doom-mcp';\n/**\n * Sits under the existing `extension` group, beside `tools` and `config`.\n *\n * A top-level key would have to be unique across every extension, and MCP belongs\n * next to the tool browser a user reaches for anyway. `t` in particular is taken:\n * it is Doom Task's top-level group.\n */\nexport const LEADER_GROUP = { key: 'e', label: 'extension', detail: 'tools, skills and config', order: 50 } as const;\nexport const LEADER_KEY = 'm';\nexport const LEADER_LABEL = 'mcp';\nexport const LEADER_DETAIL = 'servers and tools';\n/**\n * Footer status carrying the session's MCP server names, comma separated.\n *\n * MCP tools are registered under `<server>_<tool>`, a name only known at\n * runtime, so the cockpit's web plugin reads this status to recognise which\n * tool calls are MCP calls. The web half duplicates the literal (src/web may\n * only import src/types), and a test keeps the two in step.\n */\nexport const MCP_STATUS_KEY = 'doom-mcp';\n"],"mappings":"AAAA,MAAa,EAAiB,wBAEjB,EAAwB,WAQxB,EAAe,CAAE,IAAK,IAAK,MAAO,YAAa,OAAQ,2BAA4B,MAAO,EAAG,EAG7F,EAAgB,oBAShB,EAAiB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agimon-ai/doompi-mcp",
3
- "version": "0.0.1-alpha.45",
3
+ "version": "0.0.1-alpha.48",
4
4
  "description": "Domain-aware MCP server selection and access boundaries for Pi sessions composed with DoomPi.",
5
5
  "keywords": [
6
6
  "ai",
@@ -27,7 +27,8 @@
27
27
  },
28
28
  "files": [
29
29
  "dist",
30
- "web",
30
+ "src/web",
31
+ "src/exports/webClient.ts",
31
32
  "src/types/webMcp.ts",
32
33
  "llms.txt",
33
34
  "src/prompts",
@@ -68,11 +69,11 @@
68
69
  "open": "11.0.1",
69
70
  "typebox": "1.3.19",
70
71
  "yaml": "2.9.0",
71
- "@agimon-ai/doompi-config": "0.0.1-alpha.44",
72
- "@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.44",
73
- "@agimon-ai/doompi-ui": "0.0.1-alpha.45",
74
- "@agimon-ai/doompi-web-components": "0.0.1-alpha.5",
75
- "@agimon-ai/doompi-web-contracts": "0.0.1-alpha.8"
72
+ "@agimon-ai/doompi-config": "0.0.1-alpha.47",
73
+ "@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.47",
74
+ "@agimon-ai/doompi-web-contracts": "0.0.1-alpha.11",
75
+ "@agimon-ai/doompi-ui": "0.0.1-alpha.48",
76
+ "@agimon-ai/doompi-web-components": "0.0.1-alpha.8"
76
77
  },
77
78
  "devDependencies": {
78
79
  "@earendil-works/pi-coding-agent": "0.84.4",
@@ -112,7 +113,7 @@
112
113
  "doompiWeb": {
113
114
  "pluginId": "mcp",
114
115
  "channels": [],
115
- "client": "./web/index.ts"
116
+ "client": "./src/exports/webClient.ts"
116
117
  },
117
118
  "pi": {
118
119
  "extensions": [
@@ -122,7 +123,7 @@
122
123
  "scripts": {
123
124
  "build": "tsdown",
124
125
  "test": "vitest --run",
125
- "typecheck": "tsc --noEmit && tsc --noEmit -p web/tsconfig.json",
126
+ "typecheck": "tsc --noEmit && tsc --noEmit -p src/web/tsconfig.json",
126
127
  "lint": "oxlint . && oxfmt . --check",
127
128
  "fixcode": "oxlint . --fix && oxfmt ."
128
129
  }
@@ -0,0 +1 @@
1
+ export { webPlugin } from '../web/index.ts';
@@ -30,18 +30,26 @@ export function McpRepositorySettingsPanel({ repository, request, requestWithSte
30
30
  const repositoryId = repository?.id;
31
31
 
32
32
  useEffect(() => {
33
+ // Loading a repository's catalog is the external sync; the two resets clear the
34
+ // confirmations that belonged to the repository being navigated away from.
35
+ // oxlint-disable-next-line react/set-state-in-effect
33
36
  setConfirmDiscovery(false);
34
37
  setConfirmAuthorization(undefined);
35
38
  if (repositoryId) void loadMcpSettings(request, repositoryId);
36
39
  }, [repositoryId, request]);
37
40
 
38
41
  const authorization = state.repositoryId === repositoryId ? state.authorization : undefined;
42
+ // Only the id and status decide the subscription, so the effect reads those two
43
+ // primitives rather than the authorization object it belongs to.
44
+ const authorizationId = authorization?.id;
45
+ const authorizationStatus = authorization?.status;
39
46
  useEffect(() => {
40
- if (!repositoryId || !authorization || TERMINAL_AUTHORIZATION.has(authorization.status)) return;
41
- return followMcpAuthorization(request, repositoryId, authorization.id, () => {
47
+ if (!repositoryId || authorizationId === undefined) return;
48
+ if (authorizationStatus !== undefined && TERMINAL_AUTHORIZATION.has(authorizationStatus)) return;
49
+ return followMcpAuthorization(request, repositoryId, authorizationId, () => {
42
50
  void loadMcpSettings(request, repositoryId);
43
51
  });
44
- }, [authorization?.id, authorization?.status, repositoryId, request]);
52
+ }, [authorizationId, authorizationStatus, repositoryId, request]);
45
53
 
46
54
  if (!repository) {
47
55
  return <p className="py-3 text-[10px] text-doom-faint">Select a repository to inspect its synced MCP catalog.</p>;
@@ -7,7 +7,7 @@ import {
7
7
  toolTone,
8
8
  } from '@agimon-ai/doompi-web-components';
9
9
  import type { ToolMessageRenderProps } from '@agimon-ai/doompi-web-contracts';
10
- import type { McpResultBlock } from '../src/types/webMcp.ts';
10
+ import type { McpResultBlock } from '../types/webMcp.ts';
11
11
  import {
12
12
  type McpStatusTone,
13
13
  matchMcpTool,
@@ -1,5 +1,5 @@
1
- import type { McpAuthorizationFlow, McpRepositoryCatalog } from '../src/types/webMcp.ts';
2
- import { MCP_AUTHORIZATION_API_PATH, MCP_DISCOVERY_API_PATH, MCP_REPOSITORY_API_PATH } from '../src/types/webMcp.ts';
1
+ import type { McpAuthorizationFlow, McpRepositoryCatalog } from '../types/webMcp.ts';
2
+ import { MCP_AUTHORIZATION_API_PATH, MCP_DISCOVERY_API_PATH, MCP_REPOSITORY_API_PATH } from '../types/webMcp.ts';
3
3
 
4
4
  const API_ROOT = '/api/plugin/mcp';
5
5
  const JSON_HEADERS = { 'content-type': 'application/json' };
@@ -1,5 +1,5 @@
1
1
  import { Store } from '@tanstack/store';
2
- import type { McpAuthorizationFlow, McpRepositoryCatalog } from '../src/types/webMcp.ts';
2
+ import type { McpAuthorizationFlow, McpRepositoryCatalog } from '../types/webMcp.ts';
3
3
  import {
4
4
  cancelMcpAuthorization,
5
5
  discoverMcpCatalog,
@@ -1,4 +1,4 @@
1
- import type { McpResultBlock } from '../src/types/webMcp.ts';
1
+ import type { McpResultBlock } from '../types/webMcp.ts';
2
2
 
3
3
  /**
4
4
  * Pure view logic for MCP tool cards, the browser counterpart of
@@ -19,5 +19,5 @@
19
19
  "forceConsistentCasingInFileNames": true,
20
20
  "types": ["node"]
21
21
  },
22
- "include": [".", "../src/types"]
22
+ "include": [".", "../types", "../exports/webClient.ts"]
23
23
  }
File without changes