unforgit 0.10.1 → 0.11.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/{chunk-YDVVU3Z7.js → chunk-J6GW65PL.js} +192 -38
- package/dist/chunk-J6GW65PL.js.map +1 -0
- package/dist/index.js +32 -22
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +2 -2
- package/package.json +6 -4
- package/dist/chunk-YDVVU3Z7.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -35,17 +35,17 @@ import {
|
|
|
35
35
|
saveConfig,
|
|
36
36
|
shouldImportMarkdownMemory,
|
|
37
37
|
validateMemoryType
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-J6GW65PL.js";
|
|
39
39
|
|
|
40
40
|
// src/index.ts
|
|
41
41
|
import { Command as Command32 } from "commander";
|
|
42
42
|
|
|
43
43
|
// src/commands/init.ts
|
|
44
|
-
import fs2 from "fs";
|
|
44
|
+
import fs2 from "node:fs";
|
|
45
45
|
import { Command } from "commander";
|
|
46
46
|
|
|
47
47
|
// src/utils.ts
|
|
48
|
-
import readline from "readline";
|
|
48
|
+
import readline from "node:readline";
|
|
49
49
|
function truncate(text, maxLength) {
|
|
50
50
|
const singleLine = text.replace(/\n/g, " ").trim();
|
|
51
51
|
if (singleLine.length <= maxLength) return singleLine;
|
|
@@ -135,8 +135,8 @@ var logger = {
|
|
|
135
135
|
};
|
|
136
136
|
|
|
137
137
|
// src/ide-integration.ts
|
|
138
|
-
import fs from "fs";
|
|
139
|
-
import path from "path";
|
|
138
|
+
import fs from "node:fs";
|
|
139
|
+
import path from "node:path";
|
|
140
140
|
var ALL_IDE_NAMES = [
|
|
141
141
|
"cursor",
|
|
142
142
|
"claude",
|
|
@@ -921,8 +921,8 @@ Examples:
|
|
|
921
921
|
import { Command as Command9 } from "commander";
|
|
922
922
|
|
|
923
923
|
// src/commands/backups.ts
|
|
924
|
-
import fs3 from "fs";
|
|
925
|
-
import path2 from "path";
|
|
924
|
+
import fs3 from "node:fs";
|
|
925
|
+
import path2 from "node:path";
|
|
926
926
|
import { Command as Command8 } from "commander";
|
|
927
927
|
function formatBackupTimestamp(date) {
|
|
928
928
|
return date.toISOString().replace(/[-:]/g, "").replace("T", "-").replace(/\.\d{3}Z$/, "");
|
|
@@ -1132,9 +1132,9 @@ var restoreCommand = new Command9("restore").description("Restore a soft-deleted
|
|
|
1132
1132
|
|
|
1133
1133
|
// src/commands/web.ts
|
|
1134
1134
|
import { Command as Command10 } from "commander";
|
|
1135
|
-
import { spawn } from "child_process";
|
|
1136
|
-
import path3 from "path";
|
|
1137
|
-
import fs4 from "fs";
|
|
1135
|
+
import { spawn } from "node:child_process";
|
|
1136
|
+
import path3 from "node:path";
|
|
1137
|
+
import fs4 from "node:fs";
|
|
1138
1138
|
var webCommand = new Command10("web").description("Start the Unforgit web dashboard").option("-p, --port <port>", "Port to run on", "3838").option("--no-open", "Don't open browser automatically").action(async (opts) => {
|
|
1139
1139
|
const cwd4 = process.cwd();
|
|
1140
1140
|
if (!isInitialized(cwd4)) {
|
|
@@ -3330,10 +3330,10 @@ Examples:
|
|
|
3330
3330
|
});
|
|
3331
3331
|
|
|
3332
3332
|
// src/commands/dashboard.ts
|
|
3333
|
-
import { spawn as spawn2 } from "child_process";
|
|
3334
|
-
import fs5 from "fs";
|
|
3335
|
-
import path4 from "path";
|
|
3336
|
-
import { fileURLToPath } from "url";
|
|
3333
|
+
import { spawn as spawn2 } from "node:child_process";
|
|
3334
|
+
import fs5 from "node:fs";
|
|
3335
|
+
import path4 from "node:path";
|
|
3336
|
+
import { fileURLToPath } from "node:url";
|
|
3337
3337
|
import { Command as Command26 } from "commander";
|
|
3338
3338
|
function assertSafeDashboardBind(host, allowNetwork = false) {
|
|
3339
3339
|
if ((host === "0.0.0.0" || host === "::") && !allowNetwork) {
|
|
@@ -3428,7 +3428,7 @@ Examples:
|
|
|
3428
3428
|
|
|
3429
3429
|
// src/commands/doctor.ts
|
|
3430
3430
|
import { Command as Command27 } from "commander";
|
|
3431
|
-
import fs6 from "fs";
|
|
3431
|
+
import fs6 from "node:fs";
|
|
3432
3432
|
import YAML from "yaml";
|
|
3433
3433
|
var doctorCommand = new Command27("doctor").description("Check system health and diagnose common issues").action(async () => {
|
|
3434
3434
|
const results = [];
|
|
@@ -4013,13 +4013,21 @@ function openStore() {
|
|
|
4013
4013
|
}
|
|
4014
4014
|
function formatSuggestionLine(suggestion) {
|
|
4015
4015
|
const memoryIds = suggestion.memoryIds.map((id) => id.slice(0, 8)).join(", ");
|
|
4016
|
-
|
|
4017
|
-
`${suggestion.id
|
|
4016
|
+
const lines = [
|
|
4017
|
+
`${suggestion.id} [${suggestion.priority}] ${suggestion.type}`,
|
|
4018
4018
|
` status: ${suggestion.status}`,
|
|
4019
4019
|
` confidence: ${Math.round(suggestion.confidence * 100)}%`,
|
|
4020
4020
|
` memories: ${memoryIds || "none"}`,
|
|
4021
4021
|
` reason: ${suggestion.reason}`
|
|
4022
|
-
]
|
|
4022
|
+
];
|
|
4023
|
+
const sourceSuggestionId = suggestion.payload?.sourceSuggestionId;
|
|
4024
|
+
if (suggestion.createdBy) lines.push(` created by: ${suggestion.createdBy}`);
|
|
4025
|
+
if (typeof sourceSuggestionId === "string") {
|
|
4026
|
+
lines.push(` generated from: ${sourceSuggestionId}`);
|
|
4027
|
+
}
|
|
4028
|
+
if (suggestion.reviewedBy) lines.push(` reviewed by: ${suggestion.reviewedBy}`);
|
|
4029
|
+
if (suggestion.reviewNote) lines.push(` review note: ${suggestion.reviewNote}`);
|
|
4030
|
+
return lines.join("\n");
|
|
4023
4031
|
}
|
|
4024
4032
|
function parseStatus(value) {
|
|
4025
4033
|
if (!value) return ["pending"];
|
|
@@ -4094,10 +4102,12 @@ var suggestionsCommand = new Command30("suggestions").description("Reviewable cu
|
|
|
4094
4102
|
process.exit(EXIT_ERROR);
|
|
4095
4103
|
}
|
|
4096
4104
|
const status = opts.approve ? "approved" : opts.reject ? "rejected" : "applied";
|
|
4097
|
-
const { store } = openStore();
|
|
4105
|
+
const { store, orgId, repoId } = openStore();
|
|
4098
4106
|
try {
|
|
4099
4107
|
const suggestion = store.reviewCurationSuggestion({
|
|
4100
4108
|
id,
|
|
4109
|
+
orgId,
|
|
4110
|
+
repoId,
|
|
4101
4111
|
status,
|
|
4102
4112
|
reviewedBy: opts.reviewer,
|
|
4103
4113
|
reviewNote: opts.note
|
|
@@ -4114,8 +4124,8 @@ var suggestionsCommand = new Command30("suggestions").description("Reviewable cu
|
|
|
4114
4124
|
);
|
|
4115
4125
|
|
|
4116
4126
|
// src/commands/md.ts
|
|
4117
|
-
import fs7 from "fs";
|
|
4118
|
-
import path5 from "path";
|
|
4127
|
+
import fs7 from "node:fs";
|
|
4128
|
+
import path5 from "node:path";
|
|
4119
4129
|
import { Command as Command31 } from "commander";
|
|
4120
4130
|
var mdCommand = new Command31("md").description("Import and export markdown memory files such as CLAUDE.md and MEMORY.md");
|
|
4121
4131
|
function readMarkdownFile(file) {
|
|
@@ -4234,7 +4244,7 @@ mdCommand.command("export").description("Export active Unforgit memories to a ma
|
|
|
4234
4244
|
mdCommand.command("doctor").description("Check a markdown memory file for unsafe entries and importability").argument("<file>", "Markdown file to inspect").option("--json", "Output machine-readable JSON").action((file, opts) => importMarkdown(file, { ...opts, dryRun: true }));
|
|
4235
4245
|
|
|
4236
4246
|
// src/index.ts
|
|
4237
|
-
import { createRequire } from "module";
|
|
4247
|
+
import { createRequire } from "node:module";
|
|
4238
4248
|
var require2 = createRequire(import.meta.url);
|
|
4239
4249
|
var pkg = require2("../package.json");
|
|
4240
4250
|
var cleanupHandlers = [];
|