driggsby 0.6.2 → 0.6.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/README.md CHANGED
@@ -22,11 +22,9 @@ npx driggsby@latest mcp setup other
22
22
  After setup, authenticate Driggsby through your client — run `/mcp` in
23
23
  Claude Code, or sign in through the browser window Codex opens.
24
24
 
25
- So your Driggsby MCP page can tell your connections apart, `login` sends
25
+ So your Driggsby MCP page can tell your CLI sign-ins apart, `login` sends
26
26
  Driggsby this computer's name and operating system version (for example
27
- `mbp-studio` and `macOS 15.6`) with its sign-in, and
28
- `mcp setup claude-code` saves them as headers on the Driggsby entry it
29
- adds to Claude Code, which sends them with each request.
27
+ `mbp-studio` and `macOS 15.6`) with its sign-in.
30
28
 
31
29
  For another MCP client, choose Other. Driggsby currently supports only
32
30
  OAuth-based remote MCP at:
package/dist/device.js CHANGED
@@ -1,10 +1,8 @@
1
1
  import { readFileSync, statSync } from "node:fs";
2
2
  import { isIP } from "node:net";
3
3
  import { hostname, platform, release, version } from "node:os";
4
- // Load-bearing: these allowlists are what make the values safe as command
5
- // arguments (spawn-plan.ts quotes them for cmd.exe) and as "Name: value"
6
- // headers. They must never admit % ! ^ & | < > " \ : or a control
7
- // character; device.test.ts checks each.
4
+ // These allowlists keep what leaves the CLI plain text: they never admit
5
+ // % ! ^ & | < > " \ : or a control character (device.test.ts checks each).
8
6
  const NAME_PATTERN = /^[A-Za-z0-9][A-Za-z0-9_-]{0,62}$/;
9
7
  const SYSTEM_PATTERN = /^[A-Za-z0-9][A-Za-z0-9 ._/-]{0,63}$/;
10
8
  const MAC_VERSION_FILE = "/System/Library/CoreServices/SystemVersion.plist";
@@ -38,17 +36,6 @@ export function knownDevice(device) {
38
36
  };
39
37
  return Object.keys(known).length === 0 ? null : known;
40
38
  }
41
- // The Driggsby headers `mcp setup` gives Claude Code, one per known value.
42
- export function deviceHeaders(device) {
43
- const headers = [];
44
- if (device.name !== null) {
45
- headers.push(`X-Driggsby-Device-Name: ${device.name}`);
46
- }
47
- if (device.system !== null) {
48
- headers.push(`X-Driggsby-Device-System: ${device.system}`);
49
- }
50
- return headers;
51
- }
52
39
  // "mbp-studio.local" and "devbox-02.corp.example.test" are mbp-studio and
53
40
  // devbox-02: the first label is the name people give their computer. An
54
41
  // address or localhost names no computer.
@@ -19,9 +19,12 @@ function reportsMissingConfig(text) {
19
19
  function matchesExpectedConfig(client, scope, text) {
20
20
  switch (client) {
21
21
  case "claude-code":
22
+ // An entry an earlier version gave device headers doesn't match:
23
+ // Claude Code doesn't send its sign-in on requests to it.
22
24
  return (hasLine(text, "Type: http") &&
23
25
  hasLine(text, `URL: ${DRIGGSBY_MCP_URL}`) &&
24
- hasClaudeScope(text, scope ?? "user"));
26
+ hasClaudeScope(text, scope ?? "user") &&
27
+ !text.includes("X-Driggsby-Device-"));
25
28
  case "codex":
26
29
  return (text.includes('"enabled": true') &&
27
30
  text.includes('"type": "streamable_http"') &&
@@ -1,11 +1,8 @@
1
1
  import {} from "./known-client.js";
2
2
  export const DRIGGSBY_MCP_URL = "https://app.driggsby.com/mcp";
3
- // headers: this computer's name and system for Driggsby's MCP page
4
- // (device.ts builds them from allowlisted values only). Claude Code takes
5
- // them after the URL (--header is variadic, so before the name it would
6
- // swallow it); Codex has no header option, so it never gets any. The
7
- // commands printed for a person to run carry none.
8
- export function buildInstallerCommand(client, scope, headers = []) {
3
+ // The plain entry, with no custom headers: Claude Code doesn't send its
4
+ // sign-in on requests to an entry that carries them.
5
+ export function buildInstallerCommand(client, scope) {
9
6
  switch (client) {
10
7
  case "claude-code":
11
8
  return {
@@ -19,7 +16,6 @@ export function buildInstallerCommand(client, scope, headers = []) {
19
16
  scope ?? "user",
20
17
  "driggsby",
21
18
  DRIGGSBY_MCP_URL,
22
- ...headers.flatMap((header) => ["--header", header]),
23
19
  ],
24
20
  };
25
21
  case "codex":
@@ -1,6 +1,5 @@
1
1
  import { createInterface } from "node:readline/promises";
2
2
  import { CliError } from "../cli-error.js";
3
- import { describeDevice, deviceHeaders } from "../device.js";
4
3
  import { trimLikeRust } from "../terminal-text.js";
5
4
  import { runClientCommand } from "./client-command.js";
6
5
  import { classifyExistingMcpConfig } from "./classify.js";
@@ -25,11 +24,7 @@ export async function runMcpSetup(options) {
25
24
  return;
26
25
  }
27
26
  write(`Adding Driggsby to ${displayName(client)} MCP config...\n`);
28
- // The command it runs also names this computer (Claude Code only); the
29
- // commands it prints for a person stay the plain, portable ones.
30
- const headers = installClient === "claude-code" ? deviceHeaders(describeDevice()) : [];
31
- const runInstaller = buildInstallerCommand(installClient, options.scope, headers);
32
- const result = await runClientCommand(runInstaller, streamConfigOutput(client));
27
+ const result = await runClientCommand(installer, streamConfigOutput(client));
33
28
  switch (result.kind) {
34
29
  case "output":
35
30
  if (result.output.succeeded) {
@@ -5,9 +5,8 @@
5
5
  // PATH + PATHEXT (never the current directory, which Windows shells would
6
6
  // search first) and run shims through an explicit, absolute cmd.exe
7
7
  // invocation with our own quoting. Real commands only ever carry fixed
8
- // constant arguments (see commands.ts) or this computer's name and system,
9
- // allowlisted by device.ts to characters cmd.exe treats as plain; nothing
10
- // user-controlled may ever flow into a spawn plan.
8
+ // constant arguments (see commands.ts); nothing user-controlled may ever
9
+ // flow into a spawn plan.
11
10
  import { existsSync } from "node:fs";
12
11
  import { isAbsolute, join } from "node:path";
13
12
  import {} from "./commands.js";
@@ -81,9 +80,8 @@ export function resolveWindowsProgram(program, lookup = defaultLookup()) {
81
80
  // (the cmd convention) and trailing backslashes doubled (so a path ending
82
81
  // in \ cannot escape the closing quote for the child's own parser). The
83
82
  // safe set covers every constant argument the CLI actually runs, including
84
- // the MCP URL; only fixed constants, PATH-resolved program paths, and the
85
- // device values device.ts allowlists (no % ! ^ & | < > " \ or control
86
- // characters) may reach this function.
83
+ // the MCP URL; only fixed constants and PATH-resolved program paths may
84
+ // reach this function.
87
85
  export function quoteForCmd(value) {
88
86
  if (/^[A-Za-z0-9_\-.:\\/=]+$/.test(value)) {
89
87
  return value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "driggsby",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "Set up and build on Driggsby, the MCP server for personal finance.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -28,7 +28,7 @@
28
28
  "node": ">=18"
29
29
  },
30
30
  "dependencies": {
31
- "@driggsby/deploy": "0.6.2",
32
- "@driggsby/sdk": "0.6.2"
31
+ "@driggsby/deploy": "0.6.3",
32
+ "@driggsby/sdk": "0.6.3"
33
33
  }
34
34
  }