@nokai/cli 1.2.5 → 1.2.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/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/tools/id.js +9 -9
- package/dist/tools/id.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
const server_js_1 = require("./server.js");
|
|
5
5
|
const cli_js_1 = require("./cli.js");
|
|
6
|
+
const node_fs_1 = require("node:fs");
|
|
7
|
+
const profile_js_1 = require("./profile.js");
|
|
6
8
|
const args = process.argv.slice(2);
|
|
7
9
|
if (args[0] === "serve") {
|
|
8
10
|
// MCP server mode — spawned by AI tools
|
|
@@ -11,6 +13,18 @@ if (args[0] === "serve") {
|
|
|
11
13
|
process.exit(1);
|
|
12
14
|
});
|
|
13
15
|
}
|
|
16
|
+
else if (args[0] === "reset") {
|
|
17
|
+
// Clean uninstall — remove all local data
|
|
18
|
+
const dir = (0, profile_js_1.getProfileDir)();
|
|
19
|
+
if ((0, node_fs_1.existsSync)(dir)) {
|
|
20
|
+
(0, node_fs_1.rmSync)(dir, { recursive: true });
|
|
21
|
+
console.log(" ✓ NokAI data removed (~/.nokai/)");
|
|
22
|
+
console.log(" To fully uninstall: npm uninstall -g @nokai/cli");
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
console.log(" No NokAI data found.");
|
|
26
|
+
}
|
|
27
|
+
}
|
|
14
28
|
else {
|
|
15
29
|
// Interactive CLI mode — run by user
|
|
16
30
|
(0, cli_js_1.runCli)().catch((err) => {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,2CAAgD;AAChD,qCAAkC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRo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|
4
4
|
exports.handleId = handleId;
|
|
5
5
|
exports.idToolDefinition = {
|
|
6
6
|
name: "nokai_id",
|
|
7
|
-
description: "Show NokAI status and guide the user
|
|
7
|
+
description: "Show NokAI status and guide the user. Call when user says 'nokai', asks about setup, or wants to know what they can do. Present the response exactly as returned — it's written for the end user.",
|
|
8
8
|
inputSchema: {
|
|
9
9
|
type: "object",
|
|
10
10
|
properties: {},
|
|
@@ -12,13 +12,13 @@ exports.idToolDefinition = {
|
|
|
12
12
|
},
|
|
13
13
|
};
|
|
14
14
|
function handleId(profile, _sessionId, sessionName) {
|
|
15
|
-
return (
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
`1. **Connect to a teammate** —
|
|
19
|
-
`2. **Connect your own projects** — If you have another project open with NokAI,
|
|
20
|
-
`3. **Ask a connected peer** — Once connected, ask
|
|
21
|
-
`4. **Share files** —
|
|
22
|
-
`
|
|
15
|
+
return (`NokAI is active on this project.\n\n` +
|
|
16
|
+
`Your NokAI ID is **${profile.nokaiId}** and this session is **${sessionName}**.\n\n` +
|
|
17
|
+
`Here's what you can do:\n\n` +
|
|
18
|
+
`1. **Connect to a teammate** — Give them your ID \`${profile.nokaiId}\` or ask for theirs, then say "connect to [their ID]"\n` +
|
|
19
|
+
`2. **Connect your own projects** — If you have another project open with NokAI, just say "connect to my other project"\n` +
|
|
20
|
+
`3. **Ask a connected peer** — Once connected, say "ask [peer] about [question]"\n` +
|
|
21
|
+
`4. **Share files** — Say "share [file] with [peer]"\n\n` +
|
|
22
|
+
`What would you like to do?`);
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=id.js.map
|
package/dist/tools/id.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"id.js","sourceRoot":"","sources":["../../src/tools/id.ts"],"names":[],"mappings":";;;AAaA,4BAWC;AAtBY,QAAA,gBAAgB,GAAG;IAC9B,IAAI,EAAE,UAAU;IAChB,WAAW,EACT
|
|
1
|
+
{"version":3,"file":"id.js","sourceRoot":"","sources":["../../src/tools/id.ts"],"names":[],"mappings":";;;AAaA,4BAWC;AAtBY,QAAA,gBAAgB,GAAG;IAC9B,IAAI,EAAE,UAAU;IAChB,WAAW,EACT,mMAAmM;IACrM,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,EAAc;KACzB;CACF,CAAC;AAEF,SAAgB,QAAQ,CAAC,OAAqB,EAAE,UAAkB,EAAE,WAAmB;IACrF,OAAO,CACL,sCAAsC;QACtC,sBAAsB,OAAO,CAAC,OAAO,4BAA4B,WAAW,SAAS;QACrF,6BAA6B;QAC7B,sDAAsD,OAAO,CAAC,OAAO,0DAA0D;QAC/H,0HAA0H;QAC1H,mFAAmF;QACnF,yDAAyD;QACzD,4BAA4B,CAC7B,CAAC;AACJ,CAAC"}
|