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 +2 -4
- package/dist/device.js +2 -15
- package/dist/mcp-setup/classify.js +4 -1
- package/dist/mcp-setup/commands.js +3 -7
- package/dist/mcp-setup/setup.js +1 -6
- package/dist/mcp-setup/spawn-plan.js +4 -6
- package/package.json +3 -3
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
|
|
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
|
|
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
|
-
//
|
|
5
|
-
//
|
|
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
|
-
//
|
|
4
|
-
//
|
|
5
|
-
|
|
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":
|
package/dist/mcp-setup/setup.js
CHANGED
|
@@ -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
|
-
|
|
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)
|
|
9
|
-
//
|
|
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
|
|
85
|
-
//
|
|
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.
|
|
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.
|
|
32
|
-
"@driggsby/sdk": "0.6.
|
|
31
|
+
"@driggsby/deploy": "0.6.3",
|
|
32
|
+
"@driggsby/sdk": "0.6.3"
|
|
33
33
|
}
|
|
34
34
|
}
|