@aitne-sh/aitne 0.1.0 → 0.1.1
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/package.json +2 -2
- package/personal-agent.mjs +9 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aitne-sh/aitne",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Aitne — a local-first, proactive personal AI agent. A long-running TypeScript daemon is the nervous system; Claude Code (or Codex / Gemini CLI) is the brain. All persistent memory lives in local Markdown files.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"README.md"
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@aitne/daemon": "0.1.
|
|
41
|
+
"@aitne/daemon": "0.1.1",
|
|
42
42
|
"@aitne/dashboard": "0.1.0",
|
|
43
43
|
"@aitne/shared": "0.1.0"
|
|
44
44
|
},
|
package/personal-agent.mjs
CHANGED
|
@@ -15,6 +15,13 @@ if (module.enableCompileCache && !process.env.NODE_DISABLE_COMPILE_CACHE) {
|
|
|
15
15
|
const isModuleNotFoundError = (err) =>
|
|
16
16
|
err && typeof err === "object" && "code" in err && err.code === "ERR_MODULE_NOT_FOUND";
|
|
17
17
|
|
|
18
|
+
// Distinguish "@aitne/daemon itself is missing" from "@aitne/daemon loaded but
|
|
19
|
+
// one of its transitive imports is missing" — only the former should trigger
|
|
20
|
+
// the workspace fallback. The latter must surface as-is so the operator sees
|
|
21
|
+
// the real missing-package name.
|
|
22
|
+
const isMissingDaemonItself = (err) =>
|
|
23
|
+
isModuleNotFoundError(err) && /['"]@aitne\/daemon['"]/.test(String(err.message ?? ""));
|
|
24
|
+
|
|
18
25
|
// Resolves to packages/daemon/dist/index.js in workspace dev (pnpm symlinks
|
|
19
26
|
// node_modules/@aitne/daemon → packages/daemon) and to the installed package
|
|
20
27
|
// in a published global install. Falls back to the workspace path when the
|
|
@@ -22,11 +29,11 @@ const isModuleNotFoundError = (err) =>
|
|
|
22
29
|
try {
|
|
23
30
|
await import("@aitne/daemon");
|
|
24
31
|
} catch (err) {
|
|
25
|
-
if (
|
|
32
|
+
if (isMissingDaemonItself(err)) {
|
|
26
33
|
try {
|
|
27
34
|
await import("./packages/daemon/dist/index.js");
|
|
28
35
|
} catch (innerErr) {
|
|
29
|
-
if (
|
|
36
|
+
if (isMissingDaemonItself(innerErr)) {
|
|
30
37
|
throw new Error(
|
|
31
38
|
"personal-agent: cannot find @aitne/daemon — run `pnpm install` and `pnpm build` first.",
|
|
32
39
|
);
|