@mysten-incubation/sui-agent-pass 0.1.6 → 0.1.7
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/cli.js +9 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -111,7 +111,16 @@ async function mergeJsonConfig(path, entry) {
|
|
|
111
111
|
await writeFile(path, JSON.stringify(current, null, 2) + '\n', { mode: 0o600 });
|
|
112
112
|
console.log(`Wrote agent-pass into ${path}. Restart the client to load it.`);
|
|
113
113
|
}
|
|
114
|
+
/** Registers agent-pass with Claude Code, replacing an earlier entry in the same scope. */
|
|
114
115
|
async function claudeMcpAdd(args) {
|
|
116
|
+
const scope = args[args.indexOf('--scope') + 1];
|
|
117
|
+
await new Promise((done) => {
|
|
118
|
+
const remove = spawn('claude', ['mcp', 'remove', '--scope', scope, 'agent-pass'], {
|
|
119
|
+
stdio: 'ignore',
|
|
120
|
+
});
|
|
121
|
+
remove.once('error', () => done());
|
|
122
|
+
remove.once('exit', () => done());
|
|
123
|
+
});
|
|
115
124
|
const child = spawn('claude', ['mcp', 'add', ...args], { stdio: 'inherit' });
|
|
116
125
|
await new Promise((resolve, reject) => {
|
|
117
126
|
child.once('error', reject);
|