@consiliency/agent-board-cli 1.24.0 → 1.25.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.
- package/dist/assets.d.ts +22 -0
- package/dist/assets.js +61 -0
- package/dist/assets.json +6 -0
- package/dist/cli.d.ts +37 -3
- package/dist/cli.js +68 -26
- package/dist/config_edit.d.ts +37 -0
- package/dist/config_edit.js +549 -0
- package/dist/doctor.d.ts +7 -1
- package/dist/doctor.js +144 -2
- package/dist/identity_writer.d.ts +9 -7
- package/dist/identity_writer.js +18 -30
- package/dist/setup.d.ts +116 -0
- package/dist/setup.js +603 -0
- package/dist/setup_storage.d.ts +117 -0
- package/dist/setup_storage.js +447 -0
- package/dist/setup_writers.d.ts +128 -0
- package/dist/setup_writers.js +653 -0
- package/keyslot/agent-board-keyslot-load@.service +20 -0
- package/keyslot/agent-board-keyslot@.service +20 -0
- package/keyslot/constants.sh +73 -0
- package/keyslot/keygen.mjs +67 -0
- package/keyslot/keyslot-load.sh +78 -0
- package/keyslot/lib.sh +599 -0
- package/keyslot/optin.sh +185 -0
- package/keyslot/probe.sh +135 -0
- package/keyslot/provision.sh +530 -0
- package/keyslot/seam.sh +48 -0
- package/keyslot/status.sh +254 -0
- package/package.json +8 -4
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { type IdentityHarness } from "@consiliency/agent-board-client";
|
|
2
|
+
import type { BakedAssets } from "./assets.js";
|
|
3
|
+
import { type ConfigEntry } from "./config_edit.js";
|
|
4
|
+
import { type RegistrationFs, type ScopeContext } from "./doctor_scopes.js";
|
|
5
|
+
export type SetupScope = "user" | "local";
|
|
6
|
+
export declare const SETUP_SCOPES: readonly SetupScope[];
|
|
7
|
+
/** The server name setup writes; the same name the claude plugin registers. */
|
|
8
|
+
export declare const BOARD_SERVER_NAME = "agent-board";
|
|
9
|
+
/** `Consiliency/message-board`: the marketplace source, pinned to the baked release tag. */
|
|
10
|
+
export declare const CLAUDE_MARKETPLACE_REPO = "Consiliency/message-board";
|
|
11
|
+
/**
|
|
12
|
+
* What codex hands an MCP child and nothing else (`process_ancestry.ts`, measured 2026-09-18 on
|
|
13
|
+
* codex 0.155.0, across three configurations including `shell_environment_policy.inherit=all`).
|
|
14
|
+
* The writer test pins this list against that measurement's own text.
|
|
15
|
+
*/
|
|
16
|
+
export declare const CODEX_CHILD_ENV: readonly ["HOME", "LANG", "LOGNAME", "PATH", "SHELL", "TERM", "USER"];
|
|
17
|
+
/**
|
|
18
|
+
* Every non-secret input that decides where the identity file and the runtime records resolve
|
|
19
|
+
* (`identityConfigRoot`, `identityStateRoot`, `resolveHostSegment`). Written into the codex
|
|
20
|
+
* stanza's `env` when setup's own value is not the default, so the child resolves what setup
|
|
21
|
+
* wrote. Never a credential: the identity itself comes from the file.
|
|
22
|
+
*/
|
|
23
|
+
export declare const CODEX_PATH_INPUTS: readonly ["XDG_CONFIG_HOME", "XDG_STATE_HOME", "MESSAGE_BOARD_WAKE_MACHINE_ID", "MESSAGE_BOARD_WAKE_HOSTNAME"];
|
|
24
|
+
/** `secret-tool` inherits the child env (`keystore_os_keychain.ts`): an os_keychain key needs the session bus. */
|
|
25
|
+
export declare const KEYCHAIN_CHILD_INPUTS: readonly ["DBUS_SESSION_BUS_ADDRESS", "XDG_RUNTIME_DIR"];
|
|
26
|
+
export interface McpStanza extends ConfigEntry {
|
|
27
|
+
command: string;
|
|
28
|
+
args: string[];
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The env an `agent_socket:` reference's socket resolves through, which codex does not hand its
|
|
32
|
+
* child: `MESSAGE_BOARD_AGENT_SOCKET_PATH` when setup's env sets it (it overrides the handle), else
|
|
33
|
+
* `SSH_AUTH_SOCK` when the handle names the socket only by that sentinel (an external agent). An
|
|
34
|
+
* absolute socket in the handle (a keyslot) needs nothing. null: the socket resolves to nothing
|
|
35
|
+
* here, so no child could reach it.
|
|
36
|
+
*/
|
|
37
|
+
export declare function agentSocketInputs(keyReference: string | null, env: NodeJS.ProcessEnv): Record<string, string> | null;
|
|
38
|
+
/**
|
|
39
|
+
* The codex stanza's `env`: each frozen path input setup's env sets to a non-default value, the
|
|
40
|
+
* session bus for an os_keychain key, and the socket inputs of an agent_socket one. null when the
|
|
41
|
+
* key's socket cannot be resolved (see `agentSocketInputs`).
|
|
42
|
+
*/
|
|
43
|
+
export declare function codexStanzaEnv(env: NodeJS.ProcessEnv, keyReference: string | null): Record<string, string> | null;
|
|
44
|
+
/** The environment codex actually gives the MCP child: the frozen seven from `env`, then the stanza's. */
|
|
45
|
+
export declare function codexChildEnv(env: NodeJS.ProcessEnv, stanza: ConfigEntry): NodeJS.ProcessEnv;
|
|
46
|
+
/**
|
|
47
|
+
* The stanza setup writes for an MCP-configured harness: `npx -y <mcp>@<pin> --harness <h>` (+ the
|
|
48
|
+
* codex env). null only for codex, when its key's agent socket resolves to nothing here.
|
|
49
|
+
*/
|
|
50
|
+
export declare function mcpStanza(harness: IdentityHarness, assets: BakedAssets, env: NodeJS.ProcessEnv, keyReference: string | null): McpStanza | null;
|
|
51
|
+
/**
|
|
52
|
+
* Whether an entry under our name runs OUR server: an argv element whose package identity is
|
|
53
|
+
* exactly `@consiliency/agent-board-mcp` (any version, as `npx -y <pkg>@<v>` passes it), or the
|
|
54
|
+
* package's bin `agent-board-mcp` as its own element. A substring is never enough: a lookalike
|
|
55
|
+
* package (`@example/agent-board-mcp-tools`, `@consiliency/agent-board-mcp-extra`) or a wrapper
|
|
56
|
+
* script whose path merely contains the name is someone else's, and is never overwritten.
|
|
57
|
+
*/
|
|
58
|
+
export declare function isOurServer(words: readonly string[]): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* The `env` names setup owns: exactly the ones it may write. Any other name a user keeps in the
|
|
61
|
+
* entry's `env` survives an upgrade; an owned one setup no longer writes is dropped.
|
|
62
|
+
*/
|
|
63
|
+
export declare const OWNED_ENV_NAMES: ReadonlySet<string>;
|
|
64
|
+
export interface Refusal {
|
|
65
|
+
reason: string;
|
|
66
|
+
fix: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Whether `setup --harness <h> --scope <s>` is supported here. agy has no project scope; a codex
|
|
70
|
+
* project layer is loaded only under a trusted `[projects]` entry, judged by doctor's own walk
|
|
71
|
+
* (the `codex_project` row's `loaded`), so setup and doctor cannot disagree. Setup never writes trust.
|
|
72
|
+
*/
|
|
73
|
+
export declare function scopeRefusal(harness: IdentityHarness, scope: SetupScope, ctx: {
|
|
74
|
+
env: NodeJS.ProcessEnv;
|
|
75
|
+
cwd: string;
|
|
76
|
+
fs?: RegistrationFs;
|
|
77
|
+
claudeManagedDir?: string;
|
|
78
|
+
}): Refusal | null;
|
|
79
|
+
export interface ChildOutcome {
|
|
80
|
+
/** null when the child did not exit on its own (not spawned, killed, timed out). */
|
|
81
|
+
code: number | null;
|
|
82
|
+
stdout: string;
|
|
83
|
+
stderr: string;
|
|
84
|
+
}
|
|
85
|
+
/** Runs a child with NO stdin (`/dev/null`); stdout and stderr are captured, never inherited. */
|
|
86
|
+
export type ChildRunner = (file: string, args: readonly string[], options: {
|
|
87
|
+
env: NodeJS.ProcessEnv;
|
|
88
|
+
cwd?: string;
|
|
89
|
+
timeoutMs?: number;
|
|
90
|
+
}) => Promise<ChildOutcome>;
|
|
91
|
+
export declare const defaultChildRunner: ChildRunner;
|
|
92
|
+
/** An executable named `name` on `env`'s PATH (never `process.env`'s), or null. */
|
|
93
|
+
export declare function which(name: string, env: NodeJS.ProcessEnv): string | null;
|
|
94
|
+
export interface WriterContext {
|
|
95
|
+
harness: IdentityHarness;
|
|
96
|
+
scope: SetupScope;
|
|
97
|
+
assets: BakedAssets;
|
|
98
|
+
env: NodeJS.ProcessEnv;
|
|
99
|
+
cwd: string;
|
|
100
|
+
/** The identity's key reference, read from the identity file (never from a setup record). */
|
|
101
|
+
keyReference: string | null;
|
|
102
|
+
followSymlinks: boolean;
|
|
103
|
+
run?: ChildRunner;
|
|
104
|
+
fs?: RegistrationFs;
|
|
105
|
+
claudeManagedDir?: string;
|
|
106
|
+
}
|
|
107
|
+
export interface WriterResult {
|
|
108
|
+
status: "done" | "already" | "failed";
|
|
109
|
+
reason: string;
|
|
110
|
+
fix?: string;
|
|
111
|
+
}
|
|
112
|
+
/** The MCP-writer target file for a harness and scope, as doctor's scope rows locate it. */
|
|
113
|
+
export declare function mcpTarget(harness: IdentityHarness, scope: SetupScope, ctx: ScopeContext): string;
|
|
114
|
+
/**
|
|
115
|
+
* Setup's exact check for claude: our plugin, at the baked version, from the baked release tag,
|
|
116
|
+
* effective here AND installed and enabled at the REQUESTED scope from that tag.
|
|
117
|
+
*/
|
|
118
|
+
export declare function claudePluginExact(ctx: ScopeContext, assets: BakedAssets, scope: SetupScope): {
|
|
119
|
+
exact: boolean;
|
|
120
|
+
installedAtScope: boolean;
|
|
121
|
+
enabledAtScope: boolean;
|
|
122
|
+
disabledAtScope: boolean;
|
|
123
|
+
pinnedAtScope: boolean;
|
|
124
|
+
foreign: boolean;
|
|
125
|
+
unparseable: boolean;
|
|
126
|
+
};
|
|
127
|
+
/** The `harness` step for one harness and scope. Never throws for a host condition. */
|
|
128
|
+
export declare function installHarness(ctx: WriterContext): Promise<WriterResult>;
|