borgmcp 2.8.0 → 2.10.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/assimilate-cmd.d.ts +14 -0
- package/dist/assimilate-cmd.d.ts.map +1 -1
- package/dist/assimilate-cmd.js +187 -14
- package/dist/assimilate-cmd.js.map +1 -1
- package/dist/assimilate-deps.d.ts.map +1 -1
- package/dist/assimilate-deps.js +29 -1
- package/dist/assimilate-deps.js.map +1 -1
- package/dist/assimilate-welcome.d.ts.map +1 -1
- package/dist/assimilate-welcome.js +1 -0
- package/dist/assimilate-welcome.js.map +1 -1
- package/dist/claude.d.ts.map +1 -1
- package/dist/claude.js +27 -0
- package/dist/claude.js.map +1 -1
- package/dist/cli-help.d.ts +1 -0
- package/dist/cli-help.d.ts.map +1 -1
- package/dist/cli-help.js +13 -3
- package/dist/cli-help.js.map +1 -1
- package/dist/config.d.ts +12 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +170 -11
- package/dist/config.js.map +1 -1
- package/dist/first-run-server.d.ts +10 -2
- package/dist/first-run-server.d.ts.map +1 -1
- package/dist/first-run-server.js +54 -7
- package/dist/first-run-server.js.map +1 -1
- package/dist/invitation-artifact.d.ts +33 -0
- package/dist/invitation-artifact.d.ts.map +1 -0
- package/dist/invitation-artifact.js +89 -0
- package/dist/invitation-artifact.js.map +1 -0
- package/dist/launch-gate.d.ts +5 -4
- package/dist/launch-gate.d.ts.map +1 -1
- package/dist/launch-gate.js +7 -8
- package/dist/launch-gate.js.map +1 -1
- package/dist/parse-assimilate-args.d.ts.map +1 -1
- package/dist/parse-assimilate-args.js +9 -3
- package/dist/parse-assimilate-args.js.map +1 -1
- package/dist/recover-enrollment-cmd.d.ts +17 -0
- package/dist/recover-enrollment-cmd.d.ts.map +1 -0
- package/dist/recover-enrollment-cmd.js +62 -0
- package/dist/recover-enrollment-cmd.js.map +1 -0
- package/dist/regen-format.d.ts +9 -0
- package/dist/regen-format.d.ts.map +1 -1
- package/dist/regen-format.js +15 -0
- package/dist/regen-format.js.map +1 -1
- package/dist/regen.js +27 -3
- package/dist/regen.js.map +1 -1
- package/dist/remote-client.d.ts +1 -1
- package/dist/remote-client.d.ts.map +1 -1
- package/dist/remote-client.js +1 -1
- package/dist/remote-client.js.map +1 -1
- package/dist/runtime-metadata.d.ts +1 -1
- package/dist/runtime-metadata.d.ts.map +1 -1
- package/dist/runtime-metadata.js +3 -3
- package/dist/runtime-metadata.js.map +1 -1
- package/dist/seat-store.d.ts.map +1 -1
- package/dist/seat-store.js +7 -0
- package/dist/seat-store.js.map +1 -1
- package/dist/server-errors.d.ts +1 -1
- package/dist/server-errors.d.ts.map +1 -1
- package/dist/server-errors.js.map +1 -1
- package/dist/server-facade.d.ts +1 -1
- package/dist/server-facade.d.ts.map +1 -1
- package/dist/server-facade.js +2 -2
- package/dist/server-facade.js.map +1 -1
- package/dist/server-handshake.d.ts +23 -3
- package/dist/server-handshake.d.ts.map +1 -1
- package/dist/server-handshake.js +102 -7
- package/dist/server-handshake.js.map +1 -1
- package/dist/server-trust.d.ts +8 -0
- package/dist/server-trust.d.ts.map +1 -1
- package/dist/server-trust.js +165 -5
- package/dist/server-trust.js.map +1 -1
- package/dist/setup.js +5 -2
- package/dist/setup.js.map +1 -1
- package/dist/token-store.d.ts +3 -0
- package/dist/token-store.d.ts.map +1 -1
- package/dist/token-store.js +2 -0
- package/dist/token-store.js.map +1 -1
- package/dist/tool-manifest.d.ts.map +1 -1
- package/dist/tool-manifest.js +5 -3
- package/dist/tool-manifest.js.map +1 -1
- package/dist/unknown-subcommand.d.ts +1 -1
- package/dist/unknown-subcommand.d.ts.map +1 -1
- package/dist/unknown-subcommand.js +1 -0
- package/dist/unknown-subcommand.js.map +1 -1
- package/dist/update-cmd.d.ts +1 -0
- package/dist/update-cmd.d.ts.map +1 -1
- package/dist/update-cmd.js +8 -3
- package/dist/update-cmd.js.map +1 -1
- package/docs/EXTRACTION_PROVENANCE.md +11 -7
- package/docs/LOCAL_SERVER.md +12 -3
- package/docs/RELEASING.md +17 -6
- package/package.json +2 -2
- package/src/assimilate-cmd.ts +234 -20
- package/src/assimilate-deps.ts +29 -0
- package/src/assimilate-welcome.ts +1 -0
- package/src/claude.ts +22 -0
- package/src/cli-help.ts +16 -3
- package/src/config.ts +167 -8
- package/src/first-run-server.ts +71 -8
- package/src/invitation-artifact.ts +116 -0
- package/src/launch-gate.ts +7 -8
- package/src/parse-assimilate-args.ts +11 -4
- package/src/recover-enrollment-cmd.ts +63 -0
- package/src/regen-format.ts +25 -0
- package/src/regen.ts +30 -2
- package/src/remote-client.ts +2 -2
- package/src/runtime-metadata.ts +4 -3
- package/src/seat-store.ts +6 -0
- package/src/server-errors.ts +1 -0
- package/src/server-facade.ts +2 -2
- package/src/server-handshake.ts +140 -4
- package/src/server-trust.ts +180 -5
- package/src/setup.ts +5 -2
- package/src/token-store.ts +5 -0
- package/src/tool-manifest.ts +5 -3
- package/src/unknown-subcommand.ts +1 -0
- package/src/update-cmd.ts +8 -3
package/src/setup.ts
CHANGED
|
@@ -73,11 +73,12 @@ async function main() {
|
|
|
73
73
|
// configuration. Decline/non-interactive/failure paths therefore leave no
|
|
74
74
|
// partial setup state behind.
|
|
75
75
|
console.log(chalk.blue('◼ Local Server'));
|
|
76
|
-
const serverInstall = await offerFirstRunServerInstall();
|
|
76
|
+
const serverInstall = await offerFirstRunServerInstall(undefined, undefined, { initializeServer: true });
|
|
77
77
|
if (serverInstall.kind !== 'present' && serverInstall.kind !== 'installed') {
|
|
78
78
|
process.exit(serverInstall.kind === 'declined' ? 0 : 1);
|
|
79
79
|
}
|
|
80
80
|
console.log('');
|
|
81
|
+
console.log('◼ Local server initialized');
|
|
81
82
|
|
|
82
83
|
// Step 1: Configure every detected agent CLI
|
|
83
84
|
console.log(chalk.blue('◼ Agent CLI Integration'));
|
|
@@ -185,7 +186,9 @@ async function main() {
|
|
|
185
186
|
// Success message
|
|
186
187
|
console.log(chalk.green.bold('\nSetup complete!\n'));
|
|
187
188
|
console.log(chalk.yellow('🔄 Restart Claude Code / Codex / OpenCode (or open a new session) for the changes to take effect.\n'));
|
|
188
|
-
|
|
189
|
+
if (!serverInstall.suppressClientNextSteps) {
|
|
190
|
+
console.log(chalk.gray(setupNextStepsText()));
|
|
191
|
+
}
|
|
189
192
|
}
|
|
190
193
|
|
|
191
194
|
// Run wizard
|
package/src/token-store.ts
CHANGED
|
@@ -20,6 +20,9 @@ export type TokenBackendName = 'file';
|
|
|
20
20
|
export interface TokenBackend {
|
|
21
21
|
readonly name: TokenBackendName;
|
|
22
22
|
get(account: string): Promise<string | null>;
|
|
23
|
+
readonly entries?: () => Promise<Record<string, string>>;
|
|
24
|
+
/** Replace the complete account map in one backend transaction when available. */
|
|
25
|
+
readonly replaceAccounts?: (accounts: Record<string, string>) => Promise<void>;
|
|
23
26
|
set(account: string, value: string): Promise<void>;
|
|
24
27
|
delete(account: string): Promise<void>;
|
|
25
28
|
}
|
|
@@ -87,6 +90,8 @@ export function makeFileBackend(
|
|
|
87
90
|
atomicWrite0600(filePath, JSON.stringify({ version: 1, accounts }, null, 2) + '\n', options);
|
|
88
91
|
return {
|
|
89
92
|
name: 'file',
|
|
93
|
+
entries: load,
|
|
94
|
+
replaceAccounts: save,
|
|
90
95
|
async get(account) {
|
|
91
96
|
const accounts = await load();
|
|
92
97
|
return Object.prototype.hasOwnProperty.call(accounts, account) ? accounts[account] : null;
|
package/src/tool-manifest.ts
CHANGED
|
@@ -30,7 +30,7 @@ export const TOOL_MANIFEST: ToolManifestEntry[] = [
|
|
|
30
30
|
'Optional `since` (entry-id UUID or ISO-8601 timestamp) trims the recent-log section ' +
|
|
31
31
|
'to entries strictly after the anchor — pass your last-seen entry id to skip ' +
|
|
32
32
|
'already-processed history on each refresh. If you know the current session model, pass ' +
|
|
33
|
-
'optional `model` to self-report
|
|
33
|
+
'optional `model` to self-report its printable identifier as advisory metadata; model names are not allowlisted.',
|
|
34
34
|
inputSchema: {
|
|
35
35
|
type: 'object',
|
|
36
36
|
properties: {
|
|
@@ -47,9 +47,11 @@ export const TOOL_MANIFEST: ToolManifestEntry[] = [
|
|
|
47
47
|
},
|
|
48
48
|
model: {
|
|
49
49
|
type: 'string',
|
|
50
|
-
|
|
50
|
+
minLength: 1,
|
|
51
|
+
maxLength: 160,
|
|
52
|
+
pattern: '^[A-Za-z0-9][A-Za-z0-9._/@:+-]*$',
|
|
51
53
|
description:
|
|
52
|
-
'Optional advisory self-report of the model running this agent session. Use
|
|
54
|
+
'Optional advisory self-report of the model running this agent session. Use a printable model identifier of 1-160 ASCII characters; model names are not allowlisted.',
|
|
53
55
|
},
|
|
54
56
|
},
|
|
55
57
|
required: [],
|
package/src/update-cmd.ts
CHANGED
|
@@ -1128,7 +1128,13 @@ async function defaultPublishedVersions(
|
|
|
1128
1128
|
}
|
|
1129
1129
|
}
|
|
1130
1130
|
|
|
1131
|
-
|
|
1131
|
+
export function parseConfirmationAnswer(answer: string, defaultYes = false): 'yes' | 'no' {
|
|
1132
|
+
const normalized = answer.trim().toLowerCase();
|
|
1133
|
+
if (normalized === '') return defaultYes ? 'yes' : 'no';
|
|
1134
|
+
return normalized === 'y' || normalized === 'yes' ? 'yes' : 'no';
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
async function defaultConfirm(message: string, defaultYes = false): Promise<'yes' | 'no' | 'eof' | 'interrupted'> {
|
|
1132
1138
|
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
1133
1139
|
let interrupted = false;
|
|
1134
1140
|
rl.once('SIGINT', () => {
|
|
@@ -1136,8 +1142,7 @@ async function defaultConfirm(message: string): Promise<'yes' | 'no' | 'eof' | '
|
|
|
1136
1142
|
rl.close();
|
|
1137
1143
|
});
|
|
1138
1144
|
try {
|
|
1139
|
-
|
|
1140
|
-
return answer === 'y' || answer === 'yes' ? 'yes' : 'no';
|
|
1145
|
+
return parseConfirmationAnswer(await rl.question(message), defaultYes);
|
|
1141
1146
|
} catch (error) {
|
|
1142
1147
|
if (interrupted) return 'interrupted';
|
|
1143
1148
|
if ((error as NodeJS.ErrnoException).code === 'ERR_USE_AFTER_CLOSE') return 'eof';
|