@coffre/conformance 0.4.2 → 0.4.3

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
@@ -1541,8 +1541,8 @@ async function mcpValues(deployment, people, canaries) {
1541
1541
  };
1542
1542
  const dev = valuesIn(canaries, DEV);
1543
1543
  const reading = (await redeem(deployment, clientId, await connect(deployment, reader, clientId))).access_token;
1544
- const stepUp = await call(reading, "read_secret_values", { path: DEV });
1545
- expect(stepUp.status === 403 && stepUp.challenge.includes("scope=\"read reveal\""), `read_secret_values with Read answered ${stepUp.status}, not a step-up`, stepUp.challenge);
1544
+ const stepUp = await call(reading, "reveal_secret_values", { path: DEV });
1545
+ expect(stepUp.status === 403 && stepUp.challenge.includes("scope=\"read reveal\""), `reveal_secret_values with Read answered ${stepUp.status}, not a step-up`, stepUp.challenge);
1546
1546
  const show = await call(reading, "show_secret_value", { secret: `${DEV}/API_KEY` });
1547
1547
  const id = show.result?.structuredContent?.approval?.id;
1548
1548
  expect(show.result?.structuredContent?.status === "pending" && id !== void 0, "show_secret_value did not open an approval", show.result);
@@ -1557,10 +1557,10 @@ async function mcpValues(deployment, people, canaries) {
1557
1557
  const readLeaks = Object.entries(canaries).filter(([, value]) => answers.some((answer) => answer.includes(value))).map(([path]) => path);
1558
1558
  expect(readLeaks.length === 0, "a Read answer held a value", readLeaks);
1559
1559
  const revealing = (await redeem(deployment, clientId, await connect(deployment, reader, clientId, "read reveal"))).access_token;
1560
- const read = await call(revealing, "read_secret_values", { path: DEV });
1561
- expect(JSON.stringify(read.result?.structuredContent?.values) === JSON.stringify(dev), `read_secret_values on ${DEV} did not answer its values`);
1562
- expect(read.result?.content?.[0]?.text?.startsWith("These values are now part of this conversation") === true, "read_secret_values does not warn first", read.result?.content);
1563
- const prod = await call(revealing, "read_secret_values", { path: PROD });
1560
+ const read = await call(revealing, "reveal_secret_values", { path: DEV });
1561
+ expect(JSON.stringify(read.result?.structuredContent?.values) === JSON.stringify(dev), `reveal_secret_values on ${DEV} did not answer its values`);
1562
+ expect(read.result?.content?.[0]?.text?.startsWith("These values are now part of this conversation") === true, "reveal_secret_values does not warn first", read.result?.content);
1563
+ const prod = await call(revealing, "reveal_secret_values", { path: PROD });
1564
1564
  expect(prod.result?.isError === true && !JSON.stringify(prod.result).includes(canaries[`${PROD}/API_KEY`]), `the reader read ${PROD} through MCP`, prod.result);
1565
1565
  return `Read stepped up for values and showed ${DEV}/API_KEY to ${reader.email} on coffre's page only; Reveal values answered ${DEV}'s values, warning first, and refused ${PROD}`;
1566
1566
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coffre/conformance",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
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.2",
35
- "@coffre/db": "0.4.2"
34
+ "@coffre/cli": "0.4.3",
35
+ "@coffre/db": "0.4.3"
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.2"
44
+ "@coffre/client": "0.4.3"
45
45
  },
46
46
  "scripts": {
47
47
  "build": "tsdown",
package/src/checks/mcp.ts CHANGED
@@ -467,8 +467,8 @@ export async function mcpValues(deployment: Deployment, people: People, canaries
467
467
 
468
468
  // Read: no value to the model, but one shown to the person on coffre's page.
469
469
  const reading = (await redeem(deployment, clientId, await connect(deployment, reader, clientId))).access_token;
470
- const stepUp = await call(reading, 'read_secret_values', { path: DEV });
471
- expect(stepUp.status === 403 && stepUp.challenge.includes('scope="read reveal"'), `read_secret_values with Read answered ${stepUp.status}, not a step-up`, stepUp.challenge);
470
+ const stepUp = await call(reading, 'reveal_secret_values', { path: DEV });
471
+ expect(stepUp.status === 403 && stepUp.challenge.includes('scope="read reveal"'), `reveal_secret_values with Read answered ${stepUp.status}, not a step-up`, stepUp.challenge);
472
472
  const show = await call(reading, 'show_secret_value', { secret: `${DEV}/API_KEY` });
473
473
  const id = show.result?.structuredContent?.approval?.id;
474
474
  expect(show.result?.structuredContent?.status === 'pending' && id !== undefined, 'show_secret_value did not open an approval', show.result);
@@ -483,10 +483,10 @@ export async function mcpValues(deployment: Deployment, people: People, canaries
483
483
 
484
484
  // Reveal values: the values the person may read, and no others.
485
485
  const revealing = (await redeem(deployment, clientId, await connect(deployment, reader, clientId, 'read reveal'))).access_token;
486
- const read = await call(revealing, 'read_secret_values', { path: DEV });
487
- expect(JSON.stringify(read.result?.structuredContent?.values) === JSON.stringify(dev), `read_secret_values on ${DEV} did not answer its values`);
488
- expect(read.result?.content?.[0]?.text?.startsWith('These values are now part of this conversation') === true, 'read_secret_values does not warn first', read.result?.content);
489
- const prod = await call(revealing, 'read_secret_values', { path: PROD });
486
+ const read = await call(revealing, 'reveal_secret_values', { path: DEV });
487
+ expect(JSON.stringify(read.result?.structuredContent?.values) === JSON.stringify(dev), `reveal_secret_values on ${DEV} did not answer its values`);
488
+ expect(read.result?.content?.[0]?.text?.startsWith('These values are now part of this conversation') === true, 'reveal_secret_values does not warn first', read.result?.content);
489
+ const prod = await call(revealing, 'reveal_secret_values', { path: PROD });
490
490
  expect(prod.result?.isError === true && !JSON.stringify(prod.result).includes(canaries[`${PROD}/API_KEY`]!), `the reader read ${PROD} through MCP`, prod.result);
491
491
  return `Read stepped up for values and showed ${DEV}/API_KEY to ${reader.email} on coffre's page only; Reveal values answered ${DEV}'s values, warning first, and refused ${PROD}`;
492
492
  }