@coffre/conformance 0.4.4 → 0.4.5

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/main.js CHANGED
@@ -1270,7 +1270,7 @@ async function mcpRead(deployment, people, canaries) {
1270
1270
  const listed = await modern(deployment, access, "tools/list");
1271
1271
  const result = listed.body.result;
1272
1272
  const names = result?.tools?.map((tool) => tool.name) ?? [];
1273
- expect(names.includes("list_secrets") && names.includes("run_with_secrets") && !names.includes("admit_member") && result?.cacheScope === "private" && typeof result.ttlMs === "number" && result.ttlMs <= 6e5, "tools/list does not list the reader's tools alone, cached for them only and briefly", listed.body);
1273
+ expect(names.includes("list_secrets") && !names.includes("run_with_secrets") && !names.includes("admit_member") && result?.cacheScope === "private" && typeof result.ttlMs === "number" && result.ttlMs <= 6e5, "tools/list does not list the reader's tools alone, cached for them only and briefly", listed.body);
1274
1274
  const callTool = async (tool, args) => {
1275
1275
  const { response, body } = await modern(deployment, access, "tools/call", {
1276
1276
  name: tool,
@@ -1284,11 +1284,6 @@ async function mcpRead(deployment, people, canaries) {
1284
1284
  expect(["API_KEY", "DATABASE_URL"].every((key) => keys.includes(key)), `list_secrets on ${DEV} does not list its keys`, keys);
1285
1285
  const prod = await callTool("list_secrets", { environment: PROD });
1286
1286
  expect(prod.isError === true, `the reader listed ${PROD}'s keys through MCP, which they cannot`, prod);
1287
- const run = await callTool("run_with_secrets", {
1288
- environment: DEV,
1289
- command: "npm test"
1290
- });
1291
- expect(run.content?.[0]?.text?.includes(`coffre run ${DEV} -- npm test`) === true, "run_with_secrets does not say how to run the command", run);
1292
1287
  for (const tool of ["whoami", "list_projects"]) await callTool(tool, {});
1293
1288
  await callTool("secret_history", { secret: `${DEV}/API_KEY` });
1294
1289
  const mismatched = await mcp(deployment, {
@@ -1334,7 +1329,7 @@ async function mcpRead(deployment, people, canaries) {
1334
1329
  const mine = entries.filter((entry) => entry.metadata.via?.clientId === clientId);
1335
1330
  const reads = mine.filter((entry) => entry.action === "mcp.read").length;
1336
1331
  const refused = mine.filter((entry) => entry.action === "mcp.call" && entry.decision === "deny").length;
1337
- expect(reads === 6 && refused === 1, "the log does not hold each call under the client", {
1332
+ expect(reads === 5 && refused === 1, "the log does not hold each call under the client", {
1338
1333
  reads,
1339
1334
  refused
1340
1335
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coffre/conformance",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "description": "Checks a coffre deployment from outside: what it must never do, whatever code it runs.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -31,8 +31,8 @@
31
31
  "dependencies": {
32
32
  "jose": "6.2.3",
33
33
  "pg": "8.16.3",
34
- "@coffre/cli": "0.4.4",
35
- "@coffre/db": "0.4.4"
34
+ "@coffre/cli": "0.4.5",
35
+ "@coffre/db": "0.4.5"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/node": "26.1.1",
@@ -41,7 +41,7 @@
41
41
  "tsdown": "0.23.0",
42
42
  "typescript": "5.9.3",
43
43
  "vite": "8.1.5",
44
- "@coffre/client": "0.4.4"
44
+ "@coffre/client": "0.4.5"
45
45
  },
46
46
  "scripts": {
47
47
  "build": "tsdown",
package/src/checks/mcp.ts CHANGED
@@ -263,7 +263,7 @@ export async function mcpRead(deployment: Deployment, people: People, canaries:
263
263
  const result = listed.body.result as { tools?: { name: string; annotations?: { readOnlyHint?: boolean } }[]; cacheScope?: string; ttlMs?: number } | undefined;
264
264
  const names = result?.tools?.map((tool) => tool.name) ?? [];
265
265
  // The reader's list: their role's tools, and none of an instance owner's; theirs alone to cache, and not for long, so a role's change shows.
266
- expect(names.includes('list_secrets') && names.includes('run_with_secrets') && !names.includes('admit_member') && result?.cacheScope === 'private' && typeof result.ttlMs === 'number' && result.ttlMs <= 600_000,
266
+ expect(names.includes('list_secrets') && !names.includes('run_with_secrets') && !names.includes('admit_member') && result?.cacheScope === 'private' && typeof result.ttlMs === 'number' && result.ttlMs <= 600_000,
267
267
  "tools/list does not list the reader's tools alone, cached for them only and briefly", listed.body);
268
268
  const callTool = async (tool: string, args: Record<string, unknown>) => {
269
269
  const { response, body } = await modern(deployment, access, 'tools/call', { name: tool, arguments: args }, tool);
@@ -276,8 +276,6 @@ export async function mcpRead(deployment: Deployment, people: People, canaries:
276
276
  expect(['API_KEY', 'DATABASE_URL'].every((key) => keys.includes(key)), `list_secrets on ${DEV} does not list its keys`, keys);
277
277
  const prod = await callTool('list_secrets', { environment: PROD });
278
278
  expect(prod.isError === true, `the reader listed ${PROD}'s keys through MCP, which they cannot`, prod);
279
- const run = await callTool('run_with_secrets', { environment: DEV, command: 'npm test' });
280
- expect(run.content?.[0]?.text?.includes(`coffre run ${DEV} -- npm test`) === true, 'run_with_secrets does not say how to run the command', run);
281
279
  for (const tool of ['whoami', 'list_projects']) await callTool(tool, {});
282
280
  await callTool('secret_history', { secret: `${DEV}/API_KEY` });
283
281
 
@@ -310,7 +308,7 @@ export async function mcpRead(deployment: Deployment, people: People, canaries:
310
308
  const mine = entries.filter((entry) => (entry.metadata.via as { clientId?: string } | undefined)?.clientId === clientId);
311
309
  const reads = mine.filter((entry) => entry.action === 'mcp.read').length;
312
310
  const refused = mine.filter((entry) => entry.action === 'mcp.call' && entry.decision === 'deny').length;
313
- expect(reads === 6 && refused === 1, 'the log does not hold each call under the client', { reads, refused });
311
+ expect(reads === 5 && refused === 1, 'the log does not hold each call under the client', { reads, refused });
314
312
  const api = mine.filter((entry) => !entry.action.startsWith('mcp.'));
315
313
  expect(api.length > 0, "the API's own entries for the calls do not name the connection", mine.map((entry) => entry.action));
316
314
  const shown = (await people.admin.api.audit.list({ actor: people.reader.member, limit: 500 })).entries;