@bluenotelogic/harness 0.1.0 → 0.2.0

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.
@@ -0,0 +1,26 @@
1
+ import { type FileChange } from "./writers.js";
2
+ export declare const ANTIGRAVITY_PLUGIN_NAME = "proofmem";
3
+ export declare const ANTIGRAVITY_ENABLED_TOOLS: readonly ["persistent_save", "persistent_recall", "persistent_update", "persistent_archive", "preference_get", "preference_list", "preference_set", "preference_delete", "scratch_set", "scratch_get", "scratch_delete", "episodic_log", "episodic_recall", "session_start", "session_end", "session_recall", "dedup_scan", "contradiction_scan", "staleness_scan", "reminder_set", "reminder_list", "reminder_cancel", "bootstrap", "context", "harness_route", "feedback_file", "proposal_create", "graph_neighbors", "skills_list", "skills_get", "tools_list", "tools_get"];
4
+ export interface AntigravityInstall {
5
+ configHome: string;
6
+ harnessHome: string;
7
+ mcpUrl: string;
8
+ serverName: string;
9
+ hookToken: string;
10
+ /** ISO-8601 expiry of hookToken, when the server reported one. Not secret. */
11
+ hookTokenExpiresAt?: string;
12
+ /** Run the workspace's own build/test/lint on Stop. Off unless the user passed --verify-gate. */
13
+ verifyGate: boolean;
14
+ memoryApiUrl?: string;
15
+ }
16
+ export declare function antigravityConfigHome(explicit: string | null): string;
17
+ export declare function antigravityPluginRoot(configHome: string): string;
18
+ export declare function antigravityHookTokenPath(configHome: string): string;
19
+ export declare function assertAntigravityInstallTarget(configHome: string): void;
20
+ /** Plan the complete Antigravity plugin without putting a credential in its MCP config. */
21
+ export declare function planAntigravityInstall(opts: AntigravityInstall): FileChange[];
22
+ /** Paths are exported for the CLI doctor and for black-box installer tests. */
23
+ export declare function antigravityInstallPaths(configHome: string): {
24
+ pluginRoot: string;
25
+ tokenFile: string;
26
+ };
@@ -0,0 +1,118 @@
1
+ import { existsSync, readFileSync } from "node:fs";
2
+ import { join, resolve } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ import { planCredentialFile, readIfExists } from "./writers.js";
5
+ export const ANTIGRAVITY_PLUGIN_NAME = "proofmem";
6
+ // Which tools Antigravity offers its agent. This is a CLIENT-SIDE allowlist, not a security
7
+ // boundary: the server enforces each token's scopes. secret_* stays unreachable because no
8
+ // ProofMEM token is minted with secret:read/secret:write; skill/tool authoring is only hidden
9
+ // here, since those tools need just memory:write. graph_entity_upsert/graph_edge_upsert are left
10
+ // out because they need graph:write, which these tokens do not carry, so they could only fail.
11
+ export const ANTIGRAVITY_ENABLED_TOOLS = [
12
+ "persistent_save", "persistent_recall", "persistent_update", "persistent_archive",
13
+ "preference_get", "preference_list", "preference_set", "preference_delete",
14
+ "scratch_set", "scratch_get", "scratch_delete",
15
+ "episodic_log", "episodic_recall",
16
+ "session_start", "session_end", "session_recall",
17
+ "dedup_scan", "contradiction_scan", "staleness_scan",
18
+ "reminder_set", "reminder_list", "reminder_cancel",
19
+ "bootstrap", "context", "harness_route",
20
+ "feedback_file", "proposal_create",
21
+ "graph_neighbors",
22
+ "skills_list", "skills_get", "tools_list", "tools_get",
23
+ ];
24
+ const ASSET_FILES = [
25
+ "plugin.json",
26
+ "hooks.json",
27
+ "README.md",
28
+ "rules/proofmem.md",
29
+ "scripts/antigravity-hook.mjs",
30
+ "scripts/resolve-bash.mjs",
31
+ ];
32
+ export function antigravityConfigHome(explicit) {
33
+ return resolve(explicit
34
+ ?? process.env["ANTIGRAVITY_CONFIG_HOME"]
35
+ ?? join(process.env["USERPROFILE"] || process.env["HOME"] || "", ".gemini", "config"));
36
+ }
37
+ export function antigravityPluginRoot(configHome) {
38
+ return join(configHome, "plugins", ANTIGRAVITY_PLUGIN_NAME);
39
+ }
40
+ export function antigravityHookTokenPath(configHome) {
41
+ return join(configHome, ANTIGRAVITY_PLUGIN_NAME, "hook-token");
42
+ }
43
+ function assetRoot() {
44
+ return fileURLToPath(new URL("../assets/antigravity-plugin/", import.meta.url));
45
+ }
46
+ function assertOwnedPlugin(pluginRoot) {
47
+ if (!existsSync(pluginRoot))
48
+ return;
49
+ const manifestPath = join(pluginRoot, "plugin.json");
50
+ const raw = readIfExists(manifestPath);
51
+ if (raw === null) {
52
+ throw new Error(`refusing to replace ${pluginRoot}: it exists but has no ProofMEM plugin manifest`);
53
+ }
54
+ try {
55
+ const manifest = JSON.parse(raw);
56
+ if (manifest["name"] !== ANTIGRAVITY_PLUGIN_NAME)
57
+ throw new Error("name is not proofmem");
58
+ }
59
+ catch (error) {
60
+ throw new Error(`refusing to replace ${pluginRoot}: plugin ownership is ambiguous (${error.message})`);
61
+ }
62
+ }
63
+ export function assertAntigravityInstallTarget(configHome) {
64
+ assertOwnedPlugin(antigravityPluginRoot(configHome));
65
+ }
66
+ function inferMemoryApiUrl(mcpUrl) {
67
+ const url = new URL(mcpUrl);
68
+ return new URL("/api", url.origin).toString().replace(/\/$/, "");
69
+ }
70
+ /** Plan the complete Antigravity plugin without putting a credential in its MCP config. */
71
+ export function planAntigravityInstall(opts) {
72
+ const pluginRoot = antigravityPluginRoot(opts.configHome);
73
+ assertOwnedPlugin(pluginRoot);
74
+ const changes = ASSET_FILES.map((relative) => {
75
+ const target = join(pluginRoot, relative);
76
+ const source = join(assetRoot(), relative);
77
+ return { path: target, before: readIfExists(target), after: readFileSync(source, "utf8") };
78
+ });
79
+ const mcpPath = join(pluginRoot, "mcp_config.json");
80
+ const mcp = {
81
+ mcpServers: {
82
+ [opts.serverName]: {
83
+ serverUrl: opts.mcpUrl,
84
+ timeoutSeconds: 60,
85
+ enabledTools: [...ANTIGRAVITY_ENABLED_TOOLS],
86
+ },
87
+ },
88
+ };
89
+ changes.push({
90
+ path: mcpPath,
91
+ before: readIfExists(mcpPath),
92
+ after: `${JSON.stringify(mcp, null, 2)}\n`,
93
+ });
94
+ const hookTokenFile = antigravityHookTokenPath(opts.configHome);
95
+ const localConfigPath = join(pluginRoot, "harness-home.json");
96
+ const localConfig = {
97
+ harnessHome: resolve(opts.harnessHome),
98
+ hookTokenFile,
99
+ memoryApiUrl: opts.memoryApiUrl ?? inferMemoryApiUrl(opts.mcpUrl),
100
+ verifyGate: opts.verifyGate,
101
+ ...(opts.hookTokenExpiresAt ? { hookTokenExpiresAt: opts.hookTokenExpiresAt } : {}),
102
+ };
103
+ changes.push({
104
+ path: localConfigPath,
105
+ before: readIfExists(localConfigPath),
106
+ after: `${JSON.stringify(localConfig, null, 2)}\n`,
107
+ });
108
+ changes.push(planCredentialFile(hookTokenFile, readIfExists(hookTokenFile), opts.hookToken, "ProofMEM hook credential; owner-only and separate from Antigravity's OAuth store"));
109
+ return changes;
110
+ }
111
+ /** Paths are exported for the CLI doctor and for black-box installer tests. */
112
+ export function antigravityInstallPaths(configHome) {
113
+ return {
114
+ pluginRoot: antigravityPluginRoot(configHome),
115
+ tokenFile: antigravityHookTokenPath(configHome),
116
+ };
117
+ }
118
+ //# sourceMappingURL=antigravity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"antigravity.js","sourceRoot":"","sources":["../src/antigravity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAW,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAmB,MAAM,cAAc,CAAC;AAEjF,MAAM,CAAC,MAAM,uBAAuB,GAAG,UAAU,CAAC;AAElD,4FAA4F;AAC5F,2FAA2F;AAC3F,8FAA8F;AAC9F,iGAAiG;AACjG,+FAA+F;AAC/F,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,iBAAiB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,oBAAoB;IACjF,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,mBAAmB;IAC1E,aAAa,EAAE,aAAa,EAAE,gBAAgB;IAC9C,cAAc,EAAE,iBAAiB;IACjC,eAAe,EAAE,aAAa,EAAE,gBAAgB;IAChD,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AC,IAAI;KACnD,CAAC,CAAC;IACH,OAAO,CAAC,IAAI,CACV,kBAAkB,CAChB,aAAa,EACb,YAAY,CAAC,aAAa,CAAC,EAC3B,IAAI,CAAC,SAAS,EACd,kFAAkF,CACnF,CACF,CAAC;IACF,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,uBAAuB,CAAC,UAAkB;IAIxD,OAAO;QACL,UAAU,EAAE,qBAAqB,CAAC,UAAU,CAAC;QAC7C,SAAS,EAAE,wBAAwB,CAAC,UAAU,CAAC;KAChD,CAAC;AACJ,CAAC"}
package/dist/bundle.d.ts CHANGED
@@ -16,6 +16,10 @@
16
16
  * but no memory subscription"), not an auth failure, and must be reported as such — telling
17
17
  * someone their login failed when their billing lapsed sends them to the wrong place.
18
18
  *
19
+ * Behind the proofmem.com OAuth gateway the first step has already happened server-side: its
20
+ * `/oauth/token` performs that same exchange and returns the cmem_… key itself. See
21
+ * tenantTokenForSignIn() — exchanging that key a second time is the bug it exists to prevent.
22
+ *
19
23
  * Note the paths: Apache aliases `/api` to `api/v1`, so the live URL is
20
24
  * `/api/oidc_exchange.php`, NOT `/api/v1/oidc_exchange.php`.
21
25
  */
@@ -49,6 +53,8 @@ export interface HarnessBundle {
49
53
  token?: {
50
54
  value: string;
51
55
  label?: string;
56
+ /** ISO 8601 UTC. Non-secret -- safe to print, unlike `value`. */
57
+ expires_at?: string;
52
58
  usage?: string;
53
59
  codex_toml?: string;
54
60
  };
@@ -57,7 +63,23 @@ export interface HarnessBundle {
57
63
  export declare const SUPPORTED_BUNDLE_VERSION = 1;
58
64
  export declare class SubscriptionRequiredError extends Error {
59
65
  }
66
+ /** Authenticated, but the identity lacks something the server needs (422). Re-login won't fix it. */
67
+ export declare class IdentityIncompleteError extends Error {
68
+ }
60
69
  export declare function exchangeForTenantToken(baseUrl: string, accessToken: string): Promise<string>;
70
+ /** A ProofMEM tenant key — what the gateway's `/oauth/token` hands out. Never a Blue Note ID token. */
71
+ export declare const TENANT_TOKEN_PATTERN: RegExp;
72
+ /**
73
+ * The tenant token for the access token a sign-in produced.
74
+ *
75
+ * 🔴 Through the proofmem.com gateway the OAuth access token IS already the tenant token: the
76
+ * gateway exchanged the Blue Note ID token server-side before answering `/oauth/token`.
77
+ * Re-exchanging it sent a cmem_ key to Blue Note ID userinfo, which answers 401, so a sign-in
78
+ * through the gateway could never complete (pilot release blocker B1, 2026-10-25). A Blue Note
79
+ * ID token — a self-hosted deployment, or a server without the gateway — still goes through the
80
+ * exchange, unchanged.
81
+ */
82
+ export declare function tenantTokenForSignIn(baseUrl: string, accessToken: string): Promise<string>;
61
83
  export declare function fetchBundle(baseUrl: string, tenantToken: string, opts?: {
62
84
  mintToken?: boolean;
63
85
  }): Promise<HarnessBundle>;
package/dist/bundle.js CHANGED
@@ -16,6 +16,10 @@
16
16
  * but no memory subscription"), not an auth failure, and must be reported as such — telling
17
17
  * someone their login failed when their billing lapsed sends them to the wrong place.
18
18
  *
19
+ * Behind the proofmem.com OAuth gateway the first step has already happened server-side: its
20
+ * `/oauth/token` performs that same exchange and returns the cmem_… key itself. See
21
+ * tenantTokenForSignIn() — exchanging that key a second time is the bug it exists to prevent.
22
+ *
19
23
  * Note the paths: Apache aliases `/api` to `api/v1`, so the live URL is
20
24
  * `/api/oidc_exchange.php`, NOT `/api/v1/oidc_exchange.php`.
21
25
  */
@@ -23,6 +27,9 @@
23
27
  export const SUPPORTED_BUNDLE_VERSION = 1;
24
28
  export class SubscriptionRequiredError extends Error {
25
29
  }
30
+ /** Authenticated, but the identity lacks something the server needs (422). Re-login won't fix it. */
31
+ export class IdentityIncompleteError extends Error {
32
+ }
26
33
  export async function exchangeForTenantToken(baseUrl, accessToken) {
27
34
  const res = await fetch(`${baseUrl}/api/oidc_exchange.php`, {
28
35
  method: "POST",
@@ -30,7 +37,18 @@ export async function exchangeForTenantToken(baseUrl, accessToken) {
30
37
  });
31
38
  if (res.status === 403) {
32
39
  const body = (await res.json().catch(() => ({})));
33
- throw new SubscriptionRequiredError(String(body["error"] ?? "This Blue Note Account has no Blue Note Memory subscription"));
40
+ throw new SubscriptionRequiredError(String(body["error"] ?? "This Blue Note Account has no ProofMEM subscription"));
41
+ }
42
+ // 422 = the token was ACCEPTED but the identity behind it cannot be used (e.g. no verified
43
+ // email because the client asked for the wrong scope). Reporting that as a failed exchange
44
+ // sends people to re-authenticate, which cannot possibly help — the server's message names
45
+ // the actual cause, so pass it through verbatim.
46
+ if (res.status === 422) {
47
+ const body = (await res.json().catch(() => ({})));
48
+ throw new IdentityIncompleteError(String(body["error"] ?? "This Blue Note Account is missing a required claim"));
49
+ }
50
+ if (res.status === 503) {
51
+ throw new Error("Blue Note ID is temporarily unavailable — nothing is wrong with your login. Try again shortly.");
34
52
  }
35
53
  if (!res.ok) {
36
54
  throw new Error(`token exchange failed: ${res.status} ${await snippet(res)}`);
@@ -42,6 +60,23 @@ export async function exchangeForTenantToken(baseUrl, accessToken) {
42
60
  }
43
61
  return token;
44
62
  }
63
+ /** A ProofMEM tenant key — what the gateway's `/oauth/token` hands out. Never a Blue Note ID token. */
64
+ export const TENANT_TOKEN_PATTERN = /^cmem_[A-Za-z0-9_-]{16,}$/;
65
+ /**
66
+ * The tenant token for the access token a sign-in produced.
67
+ *
68
+ * 🔴 Through the proofmem.com gateway the OAuth access token IS already the tenant token: the
69
+ * gateway exchanged the Blue Note ID token server-side before answering `/oauth/token`.
70
+ * Re-exchanging it sent a cmem_ key to Blue Note ID userinfo, which answers 401, so a sign-in
71
+ * through the gateway could never complete (pilot release blocker B1, 2026-10-25). A Blue Note
72
+ * ID token — a self-hosted deployment, or a server without the gateway — still goes through the
73
+ * exchange, unchanged.
74
+ */
75
+ export async function tenantTokenForSignIn(baseUrl, accessToken) {
76
+ if (TENANT_TOKEN_PATTERN.test(accessToken))
77
+ return accessToken;
78
+ return exchangeForTenantToken(baseUrl, accessToken);
79
+ }
45
80
  export async function fetchBundle(baseUrl, tenantToken, opts = {}) {
46
81
  const url =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,CAAC;QAC9E,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IAC1E,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtC,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAC9E,CAAC;IAED,OAAO,GAAoB,CAAC;AAC9B,CAAC;AAED,KAAK,UAAU,OAAO,CAAC,GAAa;IAClC,IAAI,CAAC;QACH,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC1C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * bnl-harness — point this machine at Blue Note Memory in one command.
3
+ * bnl-harness — point this machine at ProofMEM in one command.
4
4
  *
5
5
  * npx @bluenotelogic/harness init
6
6
  *
@@ -10,15 +10,14 @@
10
10
  *
11
11
  * THE IMPORTANT PART — the `.mcp.json` this writes carries NO TOKEN:
12
12
  *
13
- * { "mcpServers": { "mem": { "type": "http", "url": "https://mem.bnlgit.com/mcp" } } }
13
+ * { "mcpServers": { "proofmem": { "type": "http", "url": "https://proofmem.com/mcp" } } }
14
14
  *
15
15
  * OAuth-capable hosts (Claude Code, VS Code) discover auth from the endpoint's 401 +
16
16
  * WWW-Authenticate, run the browser flow against Blue Note ID, and store their own
17
17
  * credentials. Nothing secret is written into a repo file, so the file is safe to commit
18
18
  * and there is nothing to rotate.
19
19
  *
20
- * Codex and CI cannot do that yet, so `--mint-token` exists for them — and it writes the
21
- * token to `~/.codex/.env`, never into a repo. Minting is OPT-IN precisely so the default
22
- * path creates no credential and no database row.
20
+ * Codex and hook subprocesses cannot do that yet, so token minting remains explicit: `--codex`
21
+ * writes only to `~/.codex/.env`, while `--antigravity` writes a separate owner-only hook key.
23
22
  */
24
23
  export {};