@pencil-agent/nano-pencil 1.4.8 → 1.5.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/cli-entry.d.ts +3 -0
- package/dist/cli-entry.js +11 -0
- package/dist/pencil-mem-integration.js +4 -2
- package/package.json +2 -2
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* CLI entry point for NanoPencil.
|
|
4
|
+
* Uses main.ts with AgentSession and new mode modules.
|
|
5
|
+
*
|
|
6
|
+
* Test with: npx tsx cli.ts [args...]
|
|
7
|
+
*/
|
|
8
|
+
process.title = "nanopencil";
|
|
9
|
+
import { main } from "./main.js";
|
|
10
|
+
main(process.argv.slice(2));
|
|
11
|
+
//# sourceMappingURL=cli-entry.js.map
|
|
@@ -12,7 +12,8 @@ import { fileURLToPath } from "node:url";
|
|
|
12
12
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
13
13
|
const require = createRequire(import.meta.url);
|
|
14
14
|
/** 内置扩展路径 */
|
|
15
|
-
|
|
15
|
+
// nanomem 现在打包在 dist/packages/nanomem/extension.js
|
|
16
|
+
const BUNDLED_NANOMEM_EXTENSION = join(__dirname, "packages", "nanomem", "extension.js");
|
|
16
17
|
const BUNDLED_SIMPLIFY_EXTENSION = join(__dirname, "extensions", "simplify", "index.js");
|
|
17
18
|
/** 从当前模块位置向上查找包根(含 package.json 且 name 为 nano-pencil 相关) */
|
|
18
19
|
function findPackageRoot(startDir) {
|
|
@@ -23,7 +24,8 @@ function findPackageRoot(startDir) {
|
|
|
23
24
|
if (existsSync(pkgPath)) {
|
|
24
25
|
const raw = readFileSync(pkgPath, "utf-8");
|
|
25
26
|
const pkg = JSON.parse(raw);
|
|
26
|
-
if (pkg.name === "@pencil-agent/nano-pencil" ||
|
|
27
|
+
if (pkg.name === "@pencil-agent/nano-pencil" ||
|
|
28
|
+
pkg.name === "nanopencil")
|
|
27
29
|
return dir;
|
|
28
30
|
}
|
|
29
31
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pencil-agent/nano-pencil",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "CLI writing agent with read, bash, edit, write tools and session management. Based on pi; supports DashScope Coding Plan. Soul enabled by default for AI personality evolution.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"nanopencil": "./dist/cli.js"
|
|
7
|
+
"nanopencil": "./dist/cli-entry.js"
|
|
8
8
|
},
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|