@agimon-ai/doompi-mcp 0.0.1-alpha.65 → 0.0.1-alpha.68

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agimon-ai/doompi-mcp",
3
- "version": "0.0.1-alpha.65",
3
+ "version": "0.0.1-alpha.68",
4
4
  "description": "Domain-aware MCP server selection and access boundaries for Pi sessions composed with DoomPi.",
5
5
  "keywords": [
6
6
  "ai",
@@ -34,7 +34,8 @@
34
34
  "src/prompts",
35
35
  "README.md",
36
36
  "LICENSE",
37
- "package.json"
37
+ "package.json",
38
+ "!src/web/**/*.stories.tsx"
38
39
  ],
39
40
  "type": "module",
40
41
  "main": "./dist/index.cjs",
@@ -69,11 +70,11 @@
69
70
  "open": "11.0.2",
70
71
  "typebox": "1.3.25",
71
72
  "yaml": "2.9.0",
72
- "@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.64",
73
- "@agimon-ai/doompi-ui": "0.0.1-alpha.65",
74
- "@agimon-ai/doompi-web-components": "0.0.1-alpha.24",
75
- "@agimon-ai/doompi-config": "0.0.1-alpha.64",
76
- "@agimon-ai/doompi-web-contracts": "0.0.1-alpha.27"
73
+ "@agimon-ai/doompi-config": "0.0.1-alpha.67",
74
+ "@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.67",
75
+ "@agimon-ai/doompi-ui": "0.0.1-alpha.68",
76
+ "@agimon-ai/doompi-web-components": "0.0.1-alpha.27",
77
+ "@agimon-ai/doompi-web-contracts": "0.0.1-alpha.30"
77
78
  },
78
79
  "devDependencies": {
79
80
  "@earendil-works/pi-coding-agent": "0.85.1",
@@ -84,6 +85,7 @@
84
85
  "@types/react": "19.2.18",
85
86
  "@vitest/coverage-v8": "5.0.0",
86
87
  "react": "19.2.8",
88
+ "react-dom": "19.2.8",
87
89
  "tsdown": "0.23.0",
88
90
  "typescript": "7.0.2",
89
91
  "vitest": "5.0.0"
@@ -52,7 +52,7 @@ export function McpRepositorySettingsPanel({ repository, request, requestWithSte
52
52
  }, [authorizationId, authorizationStatus, repositoryId, request]);
53
53
 
54
54
  if (!repository) {
55
- return <p className="py-3 text-[10px] text-doom-faint">Select a repository to inspect its synced MCP catalog.</p>;
55
+ return <p className="py-3 text-xs text-doom-faint">Select a repository to inspect its synced MCP catalog.</p>;
56
56
  }
57
57
 
58
58
  const catalog = state.repositoryId === repository.id ? state.catalog : undefined;
@@ -63,7 +63,7 @@ export function McpRepositorySettingsPanel({ repository, request, requestWithSte
63
63
  <div className="flex flex-col gap-3" data-testid="mcp-repository-settings">
64
64
  <div className="flex flex-col items-stretch gap-2 rounded border border-doom-border bg-doom-panel px-3 py-2 min-[560px]:flex-row min-[560px]:items-center">
65
65
  <Badge>{catalog?.sync.fresh ? 'synced' : 'sync required'}</Badge>
66
- <span className="min-w-0 text-[10px] leading-relaxed text-doom-muted min-[560px]:flex-1">
66
+ <span className="min-w-0 text-xs leading-relaxed text-doom-muted min-[560px]:flex-1">
67
67
  {catalog?.sync.fresh
68
68
  ? 'Cached inspection is local. Discovery contacts the configured servers.'
69
69
  : catalog
@@ -76,7 +76,7 @@ export function McpRepositorySettingsPanel({ repository, request, requestWithSte
76
76
  loading={busy === 'loading'}
77
77
  disabled={busy !== undefined}
78
78
  onClick={() => void loadMcpSettings(request, repository.id)}
79
- className="w-full text-[10px] min-[560px]:w-auto"
79
+ className="w-full text-xs min-[560px]:w-auto"
80
80
  >
81
81
  refresh cache
82
82
  </Button>
@@ -86,7 +86,7 @@ export function McpRepositorySettingsPanel({ repository, request, requestWithSte
86
86
  loading={busy === 'discovering'}
87
87
  disabled={busy !== undefined || !catalog?.sync.fresh}
88
88
  onClick={() => setConfirmDiscovery(true)}
89
- className="w-full text-[10px] min-[560px]:w-auto"
89
+ className="w-full text-xs min-[560px]:w-auto"
90
90
  >
91
91
  discover live
92
92
  </Button>
@@ -94,7 +94,7 @@ export function McpRepositorySettingsPanel({ repository, request, requestWithSte
94
94
 
95
95
  {!confirmDiscovery ? null : (
96
96
  <div className="flex flex-col items-stretch gap-2 rounded border border-doom-accent/50 bg-doom-accent/5 px-3 py-2 min-[560px]:flex-row min-[560px]:items-center">
97
- <span className="min-w-0 text-[10px] leading-relaxed text-doom-hi min-[560px]:flex-1">
97
+ <span className="min-w-0 text-xs leading-relaxed text-doom-hi min-[560px]:flex-1">
98
98
  Discovery starts configured processes and contacts remote MCP servers. Continue?
99
99
  </span>
100
100
  <Button
@@ -104,7 +104,7 @@ export function McpRepositorySettingsPanel({ repository, request, requestWithSte
104
104
  setConfirmDiscovery(false);
105
105
  void discoverMcpSettings(requestWithStepUp, repository.id);
106
106
  }}
107
- className="w-full text-[10px] min-[560px]:w-auto"
107
+ className="w-full text-xs min-[560px]:w-auto"
108
108
  >
109
109
  confirm discovery
110
110
  </Button>
@@ -112,23 +112,23 @@ export function McpRepositorySettingsPanel({ repository, request, requestWithSte
112
112
  variant="ghost"
113
113
  size="xs"
114
114
  onClick={() => setConfirmDiscovery(false)}
115
- className="w-full text-[10px] min-[560px]:w-auto"
115
+ className="w-full text-xs min-[560px]:w-auto"
116
116
  >
117
117
  cancel
118
118
  </Button>
119
119
  </div>
120
120
  )}
121
121
 
122
- {!error ? null : <p className="rounded border border-doom-red/40 px-3 py-2 text-[10px] text-doom-red">{error}</p>}
122
+ {!error ? null : <p className="rounded border border-doom-red/40 px-3 py-2 text-xs text-doom-red">{error}</p>}
123
123
 
124
124
  {authorization ? (
125
125
  <div className="flex flex-col gap-2 rounded border border-doom-border bg-doom-panel px-3 py-2">
126
126
  <div className="flex flex-wrap items-center gap-2">
127
- <span className="min-w-0 basis-full text-[10px] font-bold text-doom-hi min-[560px]:basis-auto">
127
+ <span className="min-w-0 basis-full text-xs font-bold text-doom-hi min-[560px]:basis-auto">
128
128
  {authorization.serverName}
129
129
  </span>
130
130
  <Badge>{authorization.status}</Badge>
131
- <span className="min-w-0 flex-1 text-[9px] text-doom-faint">authorization flow</span>
131
+ <span className="min-w-0 flex-1 text-2xs text-doom-faint">authorization flow</span>
132
132
  {TERMINAL_AUTHORIZATION.has(authorization.status) ? null : (
133
133
  <Button
134
134
  variant="ghost"
@@ -136,7 +136,7 @@ export function McpRepositorySettingsPanel({ repository, request, requestWithSte
136
136
  loading={busy === 'cancelling'}
137
137
  disabled={busy !== undefined}
138
138
  onClick={() => void cancelMcpFlow(requestWithStepUp, repository.id, authorization.id)}
139
- className="w-full text-[10px] min-[560px]:w-auto"
139
+ className="w-full text-xs min-[560px]:w-auto"
140
140
  >
141
141
  cancel
142
142
  </Button>
@@ -147,17 +147,17 @@ export function McpRepositorySettingsPanel({ repository, request, requestWithSte
147
147
  href={authorization.authorizationUrl}
148
148
  target="_blank"
149
149
  rel="noreferrer noopener"
150
- className="w-fit text-[10px] text-doom-accent underline underline-offset-2"
150
+ className="w-fit text-xs text-doom-accent underline underline-offset-2"
151
151
  >
152
152
  open authorization page
153
153
  </a>
154
154
  )}
155
- {!authorization.error ? null : <p className="text-[9px] text-doom-red">{authorization.error}</p>}
155
+ {!authorization.error ? null : <p className="text-2xs text-doom-red">{authorization.error}</p>}
156
156
  </div>
157
157
  ) : null}
158
158
 
159
159
  {!catalog || catalog.servers.length === 0 ? (
160
- <p className="rounded border border-dashed border-doom-border px-3 py-4 text-[10px] text-doom-faint">
160
+ <p className="rounded border border-dashed border-doom-border px-3 py-4 text-xs text-doom-faint">
161
161
  {busy === 'loading' ? 'Reading the cached catalog.' : 'No MCP servers are enabled in the synced selection.'}
162
162
  </p>
163
163
  ) : (
@@ -168,7 +168,7 @@ export function McpRepositorySettingsPanel({ repository, request, requestWithSte
168
168
  className="flex flex-col gap-2 rounded border border-doom-border bg-doom-panel px-3 py-2"
169
169
  >
170
170
  <div className="flex flex-wrap items-center gap-2">
171
- <span className="min-w-0 basis-full truncate text-[11px] font-bold text-doom-hi min-[560px]:basis-auto min-[560px]:flex-1">
171
+ <span className="min-w-0 basis-full truncate text-sm font-bold text-doom-hi min-[560px]:basis-auto min-[560px]:flex-1">
172
172
  {server.name}
173
173
  </span>
174
174
  <Badge>{server.state}</Badge>
@@ -179,14 +179,14 @@ export function McpRepositorySettingsPanel({ repository, request, requestWithSte
179
179
  size="xs"
180
180
  disabled={busy !== undefined || !catalog.sync.fresh}
181
181
  onClick={() => setConfirmAuthorization(server.name)}
182
- className="w-full text-[10px] min-[560px]:w-auto"
182
+ className="w-full text-xs min-[560px]:w-auto"
183
183
  >
184
184
  authorize
185
185
  </Button>
186
186
  </div>
187
187
  {confirmAuthorization !== server.name ? null : (
188
188
  <div className="flex flex-col items-stretch gap-2 border-t border-doom-border pt-2 min-[560px]:flex-row min-[560px]:items-center">
189
- <span className="min-w-0 text-[9px] leading-relaxed text-doom-muted min-[560px]:flex-1">
189
+ <span className="min-w-0 text-2xs leading-relaxed text-doom-muted min-[560px]:flex-1">
190
190
  Start a bounded OAuth attempt for this server? A passkey may be required.
191
191
  </span>
192
192
  <Button
@@ -196,7 +196,7 @@ export function McpRepositorySettingsPanel({ repository, request, requestWithSte
196
196
  setConfirmAuthorization(undefined);
197
197
  void authorizeMcpServer(requestWithStepUp, repository.id, server.name);
198
198
  }}
199
- className="w-full text-[10px] min-[560px]:w-auto"
199
+ className="w-full text-xs min-[560px]:w-auto"
200
200
  >
201
201
  continue
202
202
  </Button>
@@ -204,22 +204,22 @@ export function McpRepositorySettingsPanel({ repository, request, requestWithSte
204
204
  variant="ghost"
205
205
  size="xs"
206
206
  onClick={() => setConfirmAuthorization(undefined)}
207
- className="w-full text-[10px] min-[560px]:w-auto"
207
+ className="w-full text-xs min-[560px]:w-auto"
208
208
  >
209
209
  cancel
210
210
  </Button>
211
211
  </div>
212
212
  )}
213
213
  <details>
214
- <summary className="cursor-pointer text-[9px] text-doom-muted">
214
+ <summary className="cursor-pointer text-2xs text-doom-muted">
215
215
  {String(server.tools.length)} cached {server.tools.length === 1 ? 'tool' : 'tools'}
216
216
  </summary>
217
217
  <div className="mt-2 flex flex-col gap-1 border-t border-doom-border pt-2">
218
218
  {server.tools.length === 0 ? (
219
- <span className="text-[9px] text-doom-faint">Run discovery to populate capabilities.</span>
219
+ <span className="text-2xs text-doom-faint">Run discovery to populate capabilities.</span>
220
220
  ) : (
221
221
  server.tools.map((tool) => (
222
- <div key={tool.piName} className="flex min-w-0 gap-2 text-[9px]">
222
+ <div key={tool.piName} className="flex min-w-0 gap-2 text-2xs">
223
223
  <code className="shrink-0 text-doom-hi">{tool.name}</code>
224
224
  <span className="truncate text-doom-faint">{tool.description ?? tool.piName}</span>
225
225
  </div>
@@ -227,19 +227,19 @@ export function McpRepositorySettingsPanel({ repository, request, requestWithSte
227
227
  )}
228
228
  </div>
229
229
  </details>
230
- {!server.error ? null : <p className="text-[9px] text-doom-red">{server.error}</p>}
230
+ {!server.error ? null : <p className="text-2xs text-doom-red">{server.error}</p>}
231
231
  </div>
232
232
  ))}
233
233
  </div>
234
234
  )}
235
235
 
236
236
  {catalog?.droppedServers.length ? (
237
- <p className="text-[9px] text-doom-faint">
237
+ <p className="text-2xs text-doom-faint">
238
238
  Policy omitted {String(catalog.droppedServers.length)} configured servers.
239
239
  </p>
240
240
  ) : null}
241
241
  {catalog?.diagnostics.map((diagnostic) => (
242
- <p key={diagnostic} className="text-[9px] text-doom-red">
242
+ <p key={diagnostic} className="text-2xs text-doom-red">
243
243
  {diagnostic}
244
244
  </p>
245
245
  ))}
@@ -102,8 +102,8 @@ export function McpSessionAuthSection({
102
102
  {servers.length === 0 ? null : (
103
103
  <section data-testid="context-mcp-auth" className="flex flex-col gap-2 border-b border-doom-border px-3 py-3">
104
104
  <div className="flex flex-col gap-0.5">
105
- <p className="text-[9px] font-bold uppercase tracking-wide text-doom-faint">MCP servers</p>
106
- <p className="text-[9px] leading-relaxed text-doom-muted">
105
+ <p className="text-2xs font-bold uppercase tracking-wide text-doom-faint">MCP servers</p>
106
+ <p className="text-2xs leading-relaxed text-doom-muted">
107
107
  Open sign-in in a new tab, or copy the link from the authorization dialog.
108
108
  </p>
109
109
  </div>
@@ -115,8 +115,8 @@ export function McpSessionAuthSection({
115
115
  return (
116
116
  <li key={item.name} className="flex min-w-0 flex-col gap-1 px-1 py-0.5">
117
117
  <div className="flex min-w-0 items-center gap-2">
118
- <span className="min-w-0 flex-1 truncate text-[10px] text-doom-hi">{item.name}</span>
119
- <span className="text-[9px] text-doom-muted">{item.state.replace(/-/g, ' ')}</span>
118
+ <span className="min-w-0 flex-1 truncate text-xs text-doom-hi">{item.name}</span>
119
+ <span className="text-2xs text-doom-muted">{item.state.replace(/-/g, ' ')}</span>
120
120
  <Button
121
121
  variant="subtle"
122
122
  size="xs"
@@ -133,23 +133,23 @@ export function McpSessionAuthSection({
133
133
  setTarget({ sessionId, name: item.name });
134
134
  }
135
135
  }}
136
- className="shrink-0 text-[8px] font-bold"
136
+ className="shrink-0 text-2xs font-bold"
137
137
  >
138
138
  {item.state === 'connected' ? 'manage' : 'authorize'}
139
139
  </Button>
140
140
  </div>
141
141
  {tools.length === 0 ? (
142
- <p className="pl-3 text-[9px] text-doom-faint">no tools reported</p>
142
+ <p className="pl-3 text-2xs text-doom-faint">no tools reported</p>
143
143
  ) : (
144
144
  <ul aria-label={`${item.name} tools`} className="flex flex-col">
145
145
  {tools.map((tool) => (
146
146
  <li key={tool.name} className="flex min-w-0 items-center gap-2 py-px pl-3">
147
147
  <span
148
- className={`min-w-0 flex-1 truncate text-[9px] ${tool.active ? 'text-doom-muted' : 'text-doom-faint'}`}
148
+ className={`min-w-0 flex-1 truncate text-2xs ${tool.active ? 'text-doom-muted' : 'text-doom-faint'}`}
149
149
  >
150
150
  {tool.name}
151
151
  </span>
152
- <span className="w-14 shrink-0 text-right text-[9px] text-doom-faint">
152
+ <span className="w-14 shrink-0 text-right text-2xs text-doom-faint">
153
153
  {tool.active ? tokenEstimate(tool.tokens) : `(${tokenEstimate(tool.tokens)})`}
154
154
  </span>
155
155
  </li>
@@ -174,7 +174,7 @@ export function McpSessionAuthSection({
174
174
  <DialogContent data-testid="mcp-authorization-dialog">
175
175
  <DialogHeader className="items-start px-4 py-4 sm:px-5">
176
176
  <div className="flex min-w-0 flex-1 flex-col gap-1.5">
177
- <DialogTitle className="break-words text-[14px] leading-snug">
177
+ <DialogTitle className="break-words text-base leading-snug">
178
178
  {server?.state === 'connected' ? 'Manage' : 'Authorize'} {selected?.name}
179
179
  </DialogTitle>
180
180
  <DialogDescription className="max-w-2xl">
@@ -185,7 +185,7 @@ export function McpSessionAuthSection({
185
185
  </div>
186
186
  </DialogHeader>
187
187
  <DialogBody className="px-4 py-4 sm:px-5 sm:py-5">
188
- <p role="status" className="text-[11px] text-doom-muted">
188
+ <p role="status" className="text-sm text-doom-muted">
189
189
  {server?.state === 'connected'
190
190
  ? 'Authorization complete. This server is connected.'
191
191
  : server?.state === 'closed'
@@ -199,7 +199,7 @@ export function McpSessionAuthSection({
199
199
  : 'This server is no longer available in the session.'}
200
200
  </p>
201
201
  {popupBlocked ? (
202
- <p className="text-[10px] text-doom-muted">
202
+ <p className="text-xs text-doom-muted">
203
203
  The browser blocked the new tab. Open the link below when it is ready.
204
204
  </p>
205
205
  ) : null}
@@ -215,7 +215,7 @@ export function McpSessionAuthSection({
215
215
  href={authorizationUrl}
216
216
  target="_blank"
217
217
  rel="noopener noreferrer"
218
- className="text-[11px] text-doom-accent underline underline-offset-2"
218
+ className="text-sm text-doom-accent underline underline-offset-2"
219
219
  >
220
220
  open authorization page
221
221
  </a>
@@ -225,7 +225,7 @@ export function McpSessionAuthSection({
225
225
  </div>
226
226
  ) : null}
227
227
  {copyFeedback ? (
228
- <p role="status" className="text-[10px] text-doom-muted">
228
+ <p role="status" className="text-xs text-doom-muted">
229
229
  {copyFeedback}
230
230
  </p>
231
231
  ) : null}