neotoma 0.4.2 → 0.4.5
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/README.md +43 -0
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js +332 -150
- package/dist/actions.js.map +1 -1
- package/dist/cli/commands/mirror.d.ts +52 -0
- package/dist/cli/commands/mirror.d.ts.map +1 -0
- package/dist/cli/commands/mirror.js +147 -0
- package/dist/cli/commands/mirror.js.map +1 -0
- package/dist/cli/config.d.ts +8 -0
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/doctor.d.ts +76 -0
- package/dist/cli/doctor.d.ts.map +1 -0
- package/dist/cli/doctor.js +345 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/hooks.d.ts +45 -0
- package/dist/cli/hooks.d.ts.map +1 -0
- package/dist/cli/hooks.js +273 -0
- package/dist/cli/hooks.js.map +1 -0
- package/dist/cli/hooks_detect.d.ts +53 -0
- package/dist/cli/hooks_detect.d.ts.map +1 -0
- package/dist/cli/hooks_detect.js +220 -0
- package/dist/cli/hooks_detect.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +595 -49
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/permissions.d.ts +46 -0
- package/dist/cli/permissions.d.ts.map +1 -0
- package/dist/cli/permissions.js +191 -0
- package/dist/cli/permissions.js.map +1 -0
- package/dist/cli/setup.d.ts +46 -0
- package/dist/cli/setup.d.ts.map +1 -0
- package/dist/cli/setup.js +105 -0
- package/dist/cli/setup.js.map +1 -0
- package/dist/core/operations.d.ts +145 -0
- package/dist/core/operations.d.ts.map +1 -0
- package/dist/core/operations.js +106 -0
- package/dist/core/operations.js.map +1 -0
- package/dist/openclaw_entry.d.ts +45 -0
- package/dist/openclaw_entry.d.ts.map +1 -0
- package/dist/openclaw_entry.js +75 -0
- package/dist/openclaw_entry.js.map +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +107 -748
- package/dist/server.js.map +1 -1
- package/dist/services/batch_correction.d.ts +129 -0
- package/dist/services/batch_correction.d.ts.map +1 -0
- package/dist/services/batch_correction.js +231 -0
- package/dist/services/batch_correction.js.map +1 -0
- package/dist/services/canonical_markdown.d.ts +145 -0
- package/dist/services/canonical_markdown.d.ts.map +1 -0
- package/dist/services/canonical_markdown.js +425 -0
- package/dist/services/canonical_markdown.js.map +1 -0
- package/dist/services/canonical_mirror.d.ts +127 -0
- package/dist/services/canonical_mirror.d.ts.map +1 -0
- package/dist/services/canonical_mirror.js +1047 -0
- package/dist/services/canonical_mirror.js.map +1 -0
- package/dist/services/canonical_mirror_git.d.ts +71 -0
- package/dist/services/canonical_mirror_git.d.ts.map +1 -0
- package/dist/services/canonical_mirror_git.js +211 -0
- package/dist/services/canonical_mirror_git.js.map +1 -0
- package/dist/services/entity_resolution.d.ts +17 -1
- package/dist/services/entity_resolution.d.ts.map +1 -1
- package/dist/services/entity_resolution.js +97 -24
- package/dist/services/entity_resolution.js.map +1 -1
- package/dist/services/entity_type_equivalence.d.ts +40 -0
- package/dist/services/entity_type_equivalence.d.ts.map +1 -0
- package/dist/services/entity_type_equivalence.js +109 -0
- package/dist/services/entity_type_equivalence.js.map +1 -0
- package/dist/services/entity_type_guard.d.ts +52 -0
- package/dist/services/entity_type_guard.d.ts.map +1 -0
- package/dist/services/entity_type_guard.js +204 -0
- package/dist/services/entity_type_guard.js.map +1 -0
- package/dist/services/file_text_extraction.d.ts.map +1 -1
- package/dist/services/file_text_extraction.js +5 -0
- package/dist/services/file_text_extraction.js.map +1 -1
- package/dist/services/flat_packed_detection.d.ts +32 -0
- package/dist/services/flat_packed_detection.d.ts.map +1 -0
- package/dist/services/flat_packed_detection.js +96 -0
- package/dist/services/flat_packed_detection.js.map +1 -0
- package/dist/services/interpretation.d.ts.map +1 -1
- package/dist/services/interpretation.js +9 -0
- package/dist/services/interpretation.js.map +1 -1
- package/dist/services/memory_export.d.ts +56 -0
- package/dist/services/memory_export.d.ts.map +1 -0
- package/dist/services/memory_export.js +295 -0
- package/dist/services/memory_export.js.map +1 -0
- package/dist/services/raw_fragments.js +1 -1
- package/dist/services/raw_fragments.js.map +1 -1
- package/dist/services/raw_storage.d.ts +6 -0
- package/dist/services/raw_storage.d.ts.map +1 -1
- package/dist/services/raw_storage.js +26 -0
- package/dist/services/raw_storage.js.map +1 -1
- package/dist/services/schema_definitions.d.ts.map +1 -1
- package/dist/services/schema_definitions.js +37 -0
- package/dist/services/schema_definitions.js.map +1 -1
- package/dist/services/schema_reference_linking.d.ts +38 -0
- package/dist/services/schema_reference_linking.d.ts.map +1 -0
- package/dist/services/schema_reference_linking.js +130 -0
- package/dist/services/schema_reference_linking.js.map +1 -0
- package/dist/services/schema_registry.d.ts +39 -0
- package/dist/services/schema_registry.d.ts.map +1 -1
- package/dist/services/schema_registry.js +91 -2
- package/dist/services/schema_registry.js.map +1 -1
- package/dist/services/snapshot_computation.d.ts.map +1 -1
- package/dist/services/snapshot_computation.js +10 -0
- package/dist/services/snapshot_computation.js.map +1 -1
- package/dist/services/timeline_events.d.ts +24 -5
- package/dist/services/timeline_events.d.ts.map +1 -1
- package/dist/services/timeline_events.js +89 -13
- package/dist/services/timeline_events.js.map +1 -1
- package/dist/shared/action_schemas.d.ts +18 -2
- package/dist/shared/action_schemas.d.ts.map +1 -1
- package/dist/shared/action_schemas.js +8 -0
- package/dist/shared/action_schemas.js.map +1 -1
- package/dist/shared/local_transport.d.ts +13 -0
- package/dist/shared/local_transport.d.ts.map +1 -1
- package/dist/shared/local_transport.js +89 -6
- package/dist/shared/local_transport.js.map +1 -1
- package/dist/tool_definitions.d.ts +22 -0
- package/dist/tool_definitions.d.ts.map +1 -0
- package/dist/tool_definitions.js +747 -0
- package/dist/tool_definitions.js.map +1 -0
- package/openapi.yaml +13 -0
- package/openclaw.plugin.json +87 -0
- package/package.json +31 -1
- package/skills/query-memory/SKILL.md +67 -0
- package/skills/recover-sqlite-database/SKILL.md +46 -0
- package/skills/store-data/SKILL.md +58 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Permission-file writers for `neotoma setup`.
|
|
3
|
+
*
|
|
4
|
+
* Merges a single canonical `neotoma *` wildcard approval and a one-time
|
|
5
|
+
* `npm install -g neotoma` allow entry into each supported harness's
|
|
6
|
+
* permission file. All writers are merge-preserving and idempotent.
|
|
7
|
+
*/
|
|
8
|
+
import { existsSync } from "node:fs";
|
|
9
|
+
import type { ToolId } from "./doctor.js";
|
|
10
|
+
export interface PermissionPatch {
|
|
11
|
+
path: string;
|
|
12
|
+
tool: ToolId;
|
|
13
|
+
before: string | null;
|
|
14
|
+
after: string;
|
|
15
|
+
changed: boolean;
|
|
16
|
+
created: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** Write `.claude/settings.local.json` with neotoma allow entries (project scope). */
|
|
19
|
+
export declare function patchClaudeCodeProject(cwd: string, options?: {
|
|
20
|
+
dryRun?: boolean;
|
|
21
|
+
}): Promise<PermissionPatch>;
|
|
22
|
+
/** Write `~/.claude/settings.json` with neotoma allow entries (user scope). */
|
|
23
|
+
export declare function patchClaudeCodeUser(options?: {
|
|
24
|
+
dryRun?: boolean;
|
|
25
|
+
}): Promise<PermissionPatch>;
|
|
26
|
+
/** Write `.cursor/allowlist.json` under the current project root. */
|
|
27
|
+
export declare function patchCursorAllowlist(cwd: string, options?: {
|
|
28
|
+
dryRun?: boolean;
|
|
29
|
+
}): Promise<PermissionPatch>;
|
|
30
|
+
/** Append an `[approvals]` block to `~/.codex/config.toml` if missing. */
|
|
31
|
+
export declare function patchCodexConfig(options?: {
|
|
32
|
+
dryRun?: boolean;
|
|
33
|
+
}): Promise<PermissionPatch>;
|
|
34
|
+
/** Write all supported permission files for a given tool. */
|
|
35
|
+
export declare function writePermissionsForTool(tool: ToolId, cwd: string, options?: {
|
|
36
|
+
dryRun?: boolean;
|
|
37
|
+
scope?: "project" | "user" | "both";
|
|
38
|
+
}): Promise<PermissionPatch[]>;
|
|
39
|
+
export declare function toolFromString(s: string): ToolId | null;
|
|
40
|
+
/** Convenience: detect whether a tool already has neotoma wildcard permission. */
|
|
41
|
+
export declare function hasNeotomaAllow(patch: PermissionPatch): boolean;
|
|
42
|
+
/** Expose existsSync for tests. */
|
|
43
|
+
export declare const __testing: {
|
|
44
|
+
existsSync: typeof existsSync;
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=permissions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/cli/permissions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAIrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;CAClB;AAiCD,sFAAsF;AACtF,wBAAsB,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,OAAO,CAAC,eAAe,CAAC,CAoBtH;AAED,+EAA+E;AAC/E,wBAAsB,mBAAmB,CAAC,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,OAAO,CAAC,eAAe,CAAC,CAoBtG;AAED,qEAAqE;AACrE,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,OAAO,CAAC,eAAe,CAAC,CAoBpH;AAWD,0EAA0E;AAC1E,wBAAsB,gBAAgB,CAAC,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,OAAO,CAAC,eAAe,CAAC,CAkBnG;AAED,6DAA6D;AAC7D,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,CAAA;CAAO,GACtE,OAAO,CAAC,eAAe,EAAE,CAAC,CA4B5B;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQvD;AAED,kFAAkF;AAClF,wBAAgB,eAAe,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAG/D;AAED,mCAAmC;AACnC,eAAO,MAAM,SAAS;;CAAiB,CAAC"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Permission-file writers for `neotoma setup`.
|
|
3
|
+
*
|
|
4
|
+
* Merges a single canonical `neotoma *` wildcard approval and a one-time
|
|
5
|
+
* `npm install -g neotoma` allow entry into each supported harness's
|
|
6
|
+
* permission file. All writers are merge-preserving and idempotent.
|
|
7
|
+
*/
|
|
8
|
+
import fs from "node:fs/promises";
|
|
9
|
+
import { existsSync } from "node:fs";
|
|
10
|
+
import os from "node:os";
|
|
11
|
+
import path from "node:path";
|
|
12
|
+
/** Serialize JSON with stable 2-space indentation. */
|
|
13
|
+
function jsonStr(value) {
|
|
14
|
+
return `${JSON.stringify(value, null, 2)}\n`;
|
|
15
|
+
}
|
|
16
|
+
async function readText(p) {
|
|
17
|
+
try {
|
|
18
|
+
return await fs.readFile(p, "utf8");
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
async function ensureDir(dir) {
|
|
25
|
+
await fs.mkdir(dir, { recursive: true });
|
|
26
|
+
}
|
|
27
|
+
/** Canonical allow entries to inject per harness. */
|
|
28
|
+
const CLAUDE_ALLOW_ENTRIES = ["Bash(neotoma:*)", "Bash(npm install -g neotoma:*)"];
|
|
29
|
+
const CURSOR_ALLOW_ENTRIES = ["neotoma *", "npm install -g neotoma"];
|
|
30
|
+
/** Merge unique entries into array, preserving existing order. */
|
|
31
|
+
function mergeAllow(existing, entries) {
|
|
32
|
+
const base = Array.isArray(existing) ? existing.filter((s) => typeof s === "string") : [];
|
|
33
|
+
const out = [...base];
|
|
34
|
+
for (const e of entries) {
|
|
35
|
+
if (!out.includes(e))
|
|
36
|
+
out.push(e);
|
|
37
|
+
}
|
|
38
|
+
return out;
|
|
39
|
+
}
|
|
40
|
+
/** Write `.claude/settings.local.json` with neotoma allow entries (project scope). */
|
|
41
|
+
export async function patchClaudeCodeProject(cwd, options = {}) {
|
|
42
|
+
const target = path.join(cwd, ".claude", "settings.local.json");
|
|
43
|
+
const before = await readText(target);
|
|
44
|
+
let parsed = {};
|
|
45
|
+
if (before) {
|
|
46
|
+
try {
|
|
47
|
+
parsed = JSON.parse(before);
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
// treat as empty
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
const allow = mergeAllow(parsed.permissions?.allow, CLAUDE_ALLOW_ENTRIES);
|
|
54
|
+
const next = { ...parsed, permissions: { ...(parsed.permissions ?? {}), allow } };
|
|
55
|
+
const after = jsonStr(next);
|
|
56
|
+
const changed = after !== before;
|
|
57
|
+
if (changed && !options.dryRun) {
|
|
58
|
+
await ensureDir(path.dirname(target));
|
|
59
|
+
await fs.writeFile(target, after, "utf8");
|
|
60
|
+
}
|
|
61
|
+
return { path: target, tool: "claude-code", before, after, changed, created: before === null };
|
|
62
|
+
}
|
|
63
|
+
/** Write `~/.claude/settings.json` with neotoma allow entries (user scope). */
|
|
64
|
+
export async function patchClaudeCodeUser(options = {}) {
|
|
65
|
+
const target = path.join(os.homedir(), ".claude", "settings.json");
|
|
66
|
+
const before = await readText(target);
|
|
67
|
+
let parsed = {};
|
|
68
|
+
if (before) {
|
|
69
|
+
try {
|
|
70
|
+
parsed = JSON.parse(before);
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
// ignore
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
const allow = mergeAllow(parsed.permissions?.allow, CLAUDE_ALLOW_ENTRIES);
|
|
77
|
+
const next = { ...parsed, permissions: { ...(parsed.permissions ?? {}), allow } };
|
|
78
|
+
const after = jsonStr(next);
|
|
79
|
+
const changed = after !== before;
|
|
80
|
+
if (changed && !options.dryRun) {
|
|
81
|
+
await ensureDir(path.dirname(target));
|
|
82
|
+
await fs.writeFile(target, after, "utf8");
|
|
83
|
+
}
|
|
84
|
+
return { path: target, tool: "claude-code", before, after, changed, created: before === null };
|
|
85
|
+
}
|
|
86
|
+
/** Write `.cursor/allowlist.json` under the current project root. */
|
|
87
|
+
export async function patchCursorAllowlist(cwd, options = {}) {
|
|
88
|
+
const target = path.join(cwd, ".cursor", "allowlist.json");
|
|
89
|
+
const before = await readText(target);
|
|
90
|
+
let parsed = {};
|
|
91
|
+
if (before) {
|
|
92
|
+
try {
|
|
93
|
+
parsed = JSON.parse(before);
|
|
94
|
+
}
|
|
95
|
+
catch {
|
|
96
|
+
// ignore
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
const allow = mergeAllow(parsed.allow, CURSOR_ALLOW_ENTRIES);
|
|
100
|
+
const next = { ...parsed, allow };
|
|
101
|
+
const after = jsonStr(next);
|
|
102
|
+
const changed = after !== before;
|
|
103
|
+
if (changed && !options.dryRun) {
|
|
104
|
+
await ensureDir(path.dirname(target));
|
|
105
|
+
await fs.writeFile(target, after, "utf8");
|
|
106
|
+
}
|
|
107
|
+
return { path: target, tool: "cursor", before, after, changed, created: before === null };
|
|
108
|
+
}
|
|
109
|
+
const CODEX_APPROVAL_BLOCK = `
|
|
110
|
+
# Added by \`neotoma setup --tool codex\`
|
|
111
|
+
[approvals]
|
|
112
|
+
allow = [
|
|
113
|
+
"neotoma *",
|
|
114
|
+
"npm install -g neotoma",
|
|
115
|
+
]
|
|
116
|
+
`.trimStart();
|
|
117
|
+
/** Append an `[approvals]` block to `~/.codex/config.toml` if missing. */
|
|
118
|
+
export async function patchCodexConfig(options = {}) {
|
|
119
|
+
const target = path.join(os.homedir(), ".codex", "config.toml");
|
|
120
|
+
const before = await readText(target);
|
|
121
|
+
const hasNeotoma = before ? /neotoma/i.test(before) : false;
|
|
122
|
+
let after;
|
|
123
|
+
if (!before) {
|
|
124
|
+
after = CODEX_APPROVAL_BLOCK;
|
|
125
|
+
}
|
|
126
|
+
else if (hasNeotoma) {
|
|
127
|
+
after = before;
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
after = before.endsWith("\n") ? `${before}\n${CODEX_APPROVAL_BLOCK}` : `${before}\n\n${CODEX_APPROVAL_BLOCK}`;
|
|
131
|
+
}
|
|
132
|
+
const changed = after !== before;
|
|
133
|
+
if (changed && !options.dryRun) {
|
|
134
|
+
await ensureDir(path.dirname(target));
|
|
135
|
+
await fs.writeFile(target, after, "utf8");
|
|
136
|
+
}
|
|
137
|
+
return { path: target, tool: "codex", before, after, changed, created: before === null };
|
|
138
|
+
}
|
|
139
|
+
/** Write all supported permission files for a given tool. */
|
|
140
|
+
export async function writePermissionsForTool(tool, cwd, options = {}) {
|
|
141
|
+
const scope = options.scope ?? "project";
|
|
142
|
+
const results = [];
|
|
143
|
+
switch (tool) {
|
|
144
|
+
case "claude-code": {
|
|
145
|
+
if (scope === "project" || scope === "both") {
|
|
146
|
+
results.push(await patchClaudeCodeProject(cwd, options));
|
|
147
|
+
}
|
|
148
|
+
if (scope === "user" || scope === "both") {
|
|
149
|
+
results.push(await patchClaudeCodeUser(options));
|
|
150
|
+
}
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
case "cursor": {
|
|
154
|
+
results.push(await patchCursorAllowlist(cwd, options));
|
|
155
|
+
break;
|
|
156
|
+
}
|
|
157
|
+
case "codex": {
|
|
158
|
+
results.push(await patchCodexConfig(options));
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
case "claude-desktop":
|
|
162
|
+
case "openclaw": {
|
|
163
|
+
// These harnesses don't surface an allowlist file; documented in the preflight UI instead.
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return results;
|
|
168
|
+
}
|
|
169
|
+
export function toolFromString(s) {
|
|
170
|
+
const n = s.trim().toLowerCase();
|
|
171
|
+
if (n === "claude-code" || n === "claudecode" || n === "claude_code")
|
|
172
|
+
return "claude-code";
|
|
173
|
+
if (n === "claude-desktop" || n === "claude_desktop")
|
|
174
|
+
return "claude-desktop";
|
|
175
|
+
if (n === "cursor")
|
|
176
|
+
return "cursor";
|
|
177
|
+
if (n === "codex")
|
|
178
|
+
return "codex";
|
|
179
|
+
if (n === "openclaw")
|
|
180
|
+
return "openclaw";
|
|
181
|
+
return null;
|
|
182
|
+
}
|
|
183
|
+
/** Convenience: detect whether a tool already has neotoma wildcard permission. */
|
|
184
|
+
export function hasNeotomaAllow(patch) {
|
|
185
|
+
if (!patch.after)
|
|
186
|
+
return false;
|
|
187
|
+
return /neotoma/i.test(patch.after);
|
|
188
|
+
}
|
|
189
|
+
/** Expose existsSync for tests. */
|
|
190
|
+
export const __testing = { existsSync };
|
|
191
|
+
//# sourceMappingURL=permissions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions.js","sourceRoot":"","sources":["../../src/cli/permissions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAa7B,sDAAsD;AACtD,SAAS,OAAO,CAAC,KAAc;IA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AAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACtC,CAAC;AAED,mCAAmC;AACnC,MAAM,CAAC,MAAM,SAAS,GAAG,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `neotoma setup` — composite onboarding command.
|
|
3
|
+
*
|
|
4
|
+
* Collapses `init --yes --idempotent`, `mcp config --yes`,
|
|
5
|
+
* `cli-instructions config --yes`, and permission-file writes into one
|
|
6
|
+
* agent-runnable call so harnesses only need wildcard approval for
|
|
7
|
+
* `neotoma *` to complete the full install-first flow.
|
|
8
|
+
*/
|
|
9
|
+
import type { ToolId } from "./doctor.js";
|
|
10
|
+
import { runDoctor } from "./doctor.js";
|
|
11
|
+
import type { PermissionPatch } from "./permissions.js";
|
|
12
|
+
export interface SetupStepResult {
|
|
13
|
+
id: string;
|
|
14
|
+
ok: boolean;
|
|
15
|
+
changed: boolean;
|
|
16
|
+
skipped?: boolean;
|
|
17
|
+
reason?: string;
|
|
18
|
+
details?: unknown;
|
|
19
|
+
}
|
|
20
|
+
export interface SetupReport {
|
|
21
|
+
tool: ToolId | null;
|
|
22
|
+
dry_run: boolean;
|
|
23
|
+
steps: SetupStepResult[];
|
|
24
|
+
permission_patches: PermissionPatch[];
|
|
25
|
+
doctor_before: Awaited<ReturnType<typeof runDoctor>>;
|
|
26
|
+
doctor_after: Awaited<ReturnType<typeof runDoctor>>;
|
|
27
|
+
overall_ok: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface RunSetupOptions {
|
|
30
|
+
tool?: string | ToolId | null;
|
|
31
|
+
dryRun?: boolean;
|
|
32
|
+
yes?: boolean;
|
|
33
|
+
cwd?: string;
|
|
34
|
+
/** Skip permissions patching; useful for openclaw which uses a native plugin. */
|
|
35
|
+
skipPermissions?: boolean;
|
|
36
|
+
/** Permission scope for tools that expose project+user files. */
|
|
37
|
+
scope?: "project" | "user" | "both";
|
|
38
|
+
/** Injected runners to keep setup pure + testable. */
|
|
39
|
+
runners?: {
|
|
40
|
+
init?: () => Promise<SetupStepResult>;
|
|
41
|
+
mcpConfigure?: () => Promise<SetupStepResult>;
|
|
42
|
+
cliInstructionsConfigure?: () => Promise<SetupStepResult>;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export declare function runSetup(options?: RunSetupOptions): Promise<SetupReport>;
|
|
46
|
+
//# sourceMappingURL=setup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/cli/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,OAAO,CAAC;IACZ,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,kBAAkB,EAAE,eAAe,EAAE,CAAC;IACtC,aAAa,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC;IACrD,YAAY,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC;IACpD,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC9B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iFAAiF;IACjF,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iEAAiE;IACjE,KAAK,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;IACpC,sDAAsD;IACtD,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,CAAC;QACtC,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,CAAC;QAC9C,wBAAwB,CAAC,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,CAAC;KAC3D,CAAC;CACH;AAED,wBAAsB,QAAQ,CAAC,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,WAAW,CAAC,CA4FlF"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `neotoma setup` — composite onboarding command.
|
|
3
|
+
*
|
|
4
|
+
* Collapses `init --yes --idempotent`, `mcp config --yes`,
|
|
5
|
+
* `cli-instructions config --yes`, and permission-file writes into one
|
|
6
|
+
* agent-runnable call so harnesses only need wildcard approval for
|
|
7
|
+
* `neotoma *` to complete the full install-first flow.
|
|
8
|
+
*/
|
|
9
|
+
import { runDoctor } from "./doctor.js";
|
|
10
|
+
import { writePermissionsForTool, toolFromString } from "./permissions.js";
|
|
11
|
+
export async function runSetup(options = {}) {
|
|
12
|
+
const cwd = options.cwd ?? process.cwd();
|
|
13
|
+
const dryRun = options.dryRun ?? false;
|
|
14
|
+
const doctorBefore = await runDoctor({ cwd });
|
|
15
|
+
const toolInput = typeof options.tool === "string" ? toolFromString(options.tool) : (options.tool ?? null);
|
|
16
|
+
const tool = toolInput ?? doctorBefore.current_tool_hint;
|
|
17
|
+
const steps = [];
|
|
18
|
+
// Step 1: init (idempotent)
|
|
19
|
+
if (options.runners?.init) {
|
|
20
|
+
steps.push(await options.runners.init());
|
|
21
|
+
}
|
|
22
|
+
else if (doctorBefore.data.initialized) {
|
|
23
|
+
steps.push({ id: "init", ok: true, changed: false, skipped: true, reason: "already-initialized" });
|
|
24
|
+
}
|
|
25
|
+
else if (dryRun) {
|
|
26
|
+
steps.push({ id: "init", ok: true, changed: true, skipped: true, reason: "dry-run" });
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
steps.push({ id: "init", ok: false, changed: false, skipped: true, reason: "runner-not-provided" });
|
|
30
|
+
}
|
|
31
|
+
// Step 2: mcp configure
|
|
32
|
+
if (options.runners?.mcpConfigure) {
|
|
33
|
+
steps.push(await options.runners.mcpConfigure());
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
const hasMcp = Object.values(doctorBefore.mcp_servers_detected).some((c) => c.has_neotoma || c.has_neotoma_dev);
|
|
37
|
+
if (hasMcp) {
|
|
38
|
+
steps.push({ id: "mcp-configure", ok: true, changed: false, skipped: true, reason: "already-configured" });
|
|
39
|
+
}
|
|
40
|
+
else if (dryRun) {
|
|
41
|
+
steps.push({ id: "mcp-configure", ok: true, changed: true, skipped: true, reason: "dry-run" });
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
steps.push({ id: "mcp-configure", ok: false, changed: false, skipped: true, reason: "runner-not-provided" });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
// Step 3: CLI instructions configure
|
|
48
|
+
if (options.runners?.cliInstructionsConfigure) {
|
|
49
|
+
steps.push(await options.runners.cliInstructionsConfigure());
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
const ci = doctorBefore.cli_instructions;
|
|
53
|
+
const hasAny = ci.project.cursor ||
|
|
54
|
+
ci.project.claude ||
|
|
55
|
+
ci.project.codex ||
|
|
56
|
+
ci.user.cursor ||
|
|
57
|
+
ci.user.claude ||
|
|
58
|
+
ci.user.codex;
|
|
59
|
+
if (hasAny) {
|
|
60
|
+
steps.push({ id: "cli-instructions", ok: true, changed: false, skipped: true, reason: "already-configured" });
|
|
61
|
+
}
|
|
62
|
+
else if (dryRun) {
|
|
63
|
+
steps.push({ id: "cli-instructions", ok: true, changed: true, skipped: true, reason: "dry-run" });
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
steps.push({ id: "cli-instructions", ok: false, changed: false, skipped: true, reason: "runner-not-provided" });
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
// Step 4: permission patches
|
|
70
|
+
const permissionPatches = [];
|
|
71
|
+
if (tool && !options.skipPermissions && tool !== "openclaw" && tool !== "claude-desktop") {
|
|
72
|
+
const patches = await writePermissionsForTool(tool, cwd, {
|
|
73
|
+
dryRun,
|
|
74
|
+
scope: options.scope ?? "project",
|
|
75
|
+
});
|
|
76
|
+
permissionPatches.push(...patches);
|
|
77
|
+
steps.push({
|
|
78
|
+
id: "permissions",
|
|
79
|
+
ok: true,
|
|
80
|
+
changed: patches.some((p) => p.changed),
|
|
81
|
+
details: patches.map((p) => ({ path: p.path, changed: p.changed, created: p.created })),
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
steps.push({
|
|
86
|
+
id: "permissions",
|
|
87
|
+
ok: true,
|
|
88
|
+
changed: false,
|
|
89
|
+
skipped: true,
|
|
90
|
+
reason: tool ? `tool ${tool} does not expose an allowlist file` : "tool not specified",
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
const doctorAfter = dryRun ? doctorBefore : await runDoctor({ cwd });
|
|
94
|
+
const overall = steps.every((s) => s.ok);
|
|
95
|
+
return {
|
|
96
|
+
tool,
|
|
97
|
+
dry_run: dryRun,
|
|
98
|
+
steps,
|
|
99
|
+
permission_patches: permissionPatches,
|
|
100
|
+
doctor_before: doctorBefore,
|
|
101
|
+
doctor_after: doctorAfter,
|
|
102
|
+
overall_ok: overall,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=setup.js.map
|
|
@@ -0,0 +1 @@
|
|
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I;QACJ,OAAO,EAAE,MAAM;QACf,KAAK;QACL,kBAAkB,EAAE,iBAAiB;QACrC,aAAa,EAAE,YAAY;QAC3B,YAAY,EAAE,WAAW;QACzB,UAAU,EAAE,OAAO;KACpB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core operations module.
|
|
3
|
+
*
|
|
4
|
+
* Provides a stable, typed API surface for calling Neotoma's core actions
|
|
5
|
+
* (store, retrieve, create_relationship, etc.) without going through the
|
|
6
|
+
* MCP JSON-RPC protocol. This is the foundation used by:
|
|
7
|
+
* - `@neotoma/client` (local transport)
|
|
8
|
+
* - hook plugins for Claude Code, Cursor, OpenCode, Codex
|
|
9
|
+
* - Claude Agent SDK adapter
|
|
10
|
+
*
|
|
11
|
+
* Design:
|
|
12
|
+
* - Wraps the existing `NeotomaServer.executeToolForCli` dispatcher so we
|
|
13
|
+
* reuse every business rule, idempotency check, schema validation, and
|
|
14
|
+
* provenance construction already implemented there.
|
|
15
|
+
* - Parses the MCP-standard `{ content: [{ type, text }] }` response into
|
|
16
|
+
* typed return values.
|
|
17
|
+
* - Exposes a `createOperations({ userId })` factory so each caller gets
|
|
18
|
+
* a bound instance with its authenticated user.
|
|
19
|
+
*
|
|
20
|
+
* See `docs/developer/mcp/instructions.md` for the semantic contract that
|
|
21
|
+
* agents follow when storing and retrieving through these operations.
|
|
22
|
+
*/
|
|
23
|
+
import { NeotomaServer } from "../server.js";
|
|
24
|
+
export interface CreateOperationsOptions {
|
|
25
|
+
userId: string;
|
|
26
|
+
/** Optional pre-constructed server instance. If omitted, a new one is created lazily. */
|
|
27
|
+
server?: NeotomaServer;
|
|
28
|
+
}
|
|
29
|
+
export interface StoreEntityInput {
|
|
30
|
+
entity_type: string;
|
|
31
|
+
[key: string]: unknown;
|
|
32
|
+
}
|
|
33
|
+
export interface StoreRelationshipInput {
|
|
34
|
+
relationship_type: string;
|
|
35
|
+
source_index?: number;
|
|
36
|
+
target_index?: number;
|
|
37
|
+
source_entity_id?: string;
|
|
38
|
+
target_entity_id?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface StoreInput {
|
|
41
|
+
entities?: StoreEntityInput[];
|
|
42
|
+
relationships?: StoreRelationshipInput[];
|
|
43
|
+
idempotency_key?: string;
|
|
44
|
+
file_path?: string;
|
|
45
|
+
file_content?: string;
|
|
46
|
+
mime_type?: string;
|
|
47
|
+
file_idempotency_key?: string;
|
|
48
|
+
original_filename?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface StoredEntityRef {
|
|
51
|
+
entity_id: string;
|
|
52
|
+
entity_type: string;
|
|
53
|
+
action?: "created" | "updated" | string;
|
|
54
|
+
[key: string]: unknown;
|
|
55
|
+
}
|
|
56
|
+
export interface StoreResult {
|
|
57
|
+
structured?: {
|
|
58
|
+
entities: StoredEntityRef[];
|
|
59
|
+
relationships?: unknown[];
|
|
60
|
+
};
|
|
61
|
+
unstructured?: {
|
|
62
|
+
asset_entity_id?: string;
|
|
63
|
+
[key: string]: unknown;
|
|
64
|
+
};
|
|
65
|
+
[key: string]: unknown;
|
|
66
|
+
}
|
|
67
|
+
export interface RetrieveEntitiesInput {
|
|
68
|
+
entity_type?: string;
|
|
69
|
+
limit?: number;
|
|
70
|
+
offset?: number;
|
|
71
|
+
since?: string;
|
|
72
|
+
until?: string;
|
|
73
|
+
[key: string]: unknown;
|
|
74
|
+
}
|
|
75
|
+
export interface RetrieveEntityByIdentifierInput {
|
|
76
|
+
identifier: string;
|
|
77
|
+
entity_type?: string;
|
|
78
|
+
}
|
|
79
|
+
export interface CreateRelationshipInput {
|
|
80
|
+
relationship_type: string;
|
|
81
|
+
source_entity_id: string;
|
|
82
|
+
target_entity_id: string;
|
|
83
|
+
}
|
|
84
|
+
export interface Operations {
|
|
85
|
+
/** Store structured and/or unstructured data. See docs/developer/mcp/instructions.md. */
|
|
86
|
+
store(input: StoreInput): Promise<StoreResult>;
|
|
87
|
+
/** Alias for store() preserving the MCP `store_structured` action name. */
|
|
88
|
+
storeStructured(input: StoreInput): Promise<StoreResult>;
|
|
89
|
+
/** Alias for store() preserving the MCP `store_unstructured` action name. */
|
|
90
|
+
storeUnstructured(input: StoreInput): Promise<StoreResult>;
|
|
91
|
+
/** List entities by type or time window. */
|
|
92
|
+
retrieveEntities(input: RetrieveEntitiesInput): Promise<unknown>;
|
|
93
|
+
/** Look up a single entity by identifier (name, email, canonical_name, etc.). */
|
|
94
|
+
retrieveEntityByIdentifier(input: RetrieveEntityByIdentifierInput): Promise<unknown>;
|
|
95
|
+
/** Snapshot of a single entity. */
|
|
96
|
+
retrieveEntitySnapshot(input: {
|
|
97
|
+
entity_id: string;
|
|
98
|
+
}): Promise<unknown>;
|
|
99
|
+
/** List observations for provenance / history. */
|
|
100
|
+
listObservations(input: {
|
|
101
|
+
entity_id: string;
|
|
102
|
+
limit?: number;
|
|
103
|
+
}): Promise<unknown>;
|
|
104
|
+
/** List timeline events for a time window. */
|
|
105
|
+
listTimelineEvents(input: {
|
|
106
|
+
since?: string;
|
|
107
|
+
until?: string;
|
|
108
|
+
limit?: number;
|
|
109
|
+
}): Promise<unknown>;
|
|
110
|
+
/** Retrieve related entities (graph expansion). */
|
|
111
|
+
retrieveRelatedEntities(input: {
|
|
112
|
+
entity_id: string;
|
|
113
|
+
relationship_type?: string;
|
|
114
|
+
direction?: "outgoing" | "incoming" | "both";
|
|
115
|
+
limit?: number;
|
|
116
|
+
}): Promise<unknown>;
|
|
117
|
+
/** Create a relationship between two existing entities. */
|
|
118
|
+
createRelationship(input: CreateRelationshipInput): Promise<unknown>;
|
|
119
|
+
/** Correct an observation (creates a new observation that supersedes the prior). */
|
|
120
|
+
correct(input: {
|
|
121
|
+
entity_id: string;
|
|
122
|
+
corrections: Record<string, unknown>;
|
|
123
|
+
}): Promise<unknown>;
|
|
124
|
+
/** List registered entity types (schema-level discovery). */
|
|
125
|
+
listEntityTypes(input?: {
|
|
126
|
+
search?: string;
|
|
127
|
+
}): Promise<unknown>;
|
|
128
|
+
/** Per-type entity counts. */
|
|
129
|
+
getEntityTypeCounts(input?: Record<string, unknown>): Promise<unknown>;
|
|
130
|
+
/** Raw escape hatch — invoke any MCP tool by name. */
|
|
131
|
+
executeTool(name: string, args: unknown): Promise<unknown>;
|
|
132
|
+
/** Dispose the internal server instance if this factory created one. */
|
|
133
|
+
dispose(): Promise<void>;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Create a bound operations client for a given user.
|
|
137
|
+
*
|
|
138
|
+
* The caller is responsible for providing `userId` — this mirrors the
|
|
139
|
+
* existing `executeToolForCli` contract and lets the same process serve
|
|
140
|
+
* multiple users (e.g. API server mode). For single-user local mode use
|
|
141
|
+
* the local dev user id from `services/local_auth.ts`.
|
|
142
|
+
*/
|
|
143
|
+
export declare function createOperations(options: CreateOperationsOptions): Operations;
|
|
144
|
+
export type { NeotomaServer };
|
|
145
|
+
//# sourceMappingURL=operations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../src/core/operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,yFAAyF;IACzF,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,sBAAsB;IACrC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW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