@rubytech/taskmaster 1.0.86 → 1.0.88
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/build-info.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fsp from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import {
|
|
3
|
+
import { resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../../agents/agent-scope.js";
|
|
4
4
|
import { loadConfig } from "../../config/config.js";
|
|
5
5
|
import { ErrorCodes, errorShape } from "../protocol/index.js";
|
|
6
6
|
const MAX_PREVIEW_BYTES = 256 * 1024; // 256 KB for preview
|
|
@@ -8,7 +8,7 @@ const MAX_DOWNLOAD_BYTES = 5 * 1024 * 1024; // 5 MB for download
|
|
|
8
8
|
const MAX_UPLOAD_BYTES = 5 * 1024 * 1024; // 5 MB for upload
|
|
9
9
|
function resolveWorkspaceRoot() {
|
|
10
10
|
const cfg = loadConfig();
|
|
11
|
-
return
|
|
11
|
+
return resolveAgentWorkspaceDir(cfg, resolveDefaultAgentId(cfg));
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Resolve workspace root from request params.
|
|
@@ -20,7 +20,7 @@ function resolveWorkspaceForRequest(params) {
|
|
|
20
20
|
if (!agentId)
|
|
21
21
|
return resolveWorkspaceRoot();
|
|
22
22
|
const cfg = loadConfig();
|
|
23
|
-
return
|
|
23
|
+
return resolveAgentWorkspaceDir(cfg, agentId);
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Validate and resolve a relative path within the workspace.
|
|
@@ -2,6 +2,7 @@ import { resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../../agents/ag
|
|
|
2
2
|
import { loadConfig } from "../../config/config.js";
|
|
3
3
|
import { clearAuditEntries, getUnreviewedEntries } from "../../memory/audit.js";
|
|
4
4
|
import { getMemorySearchManager } from "../../memory/index.js";
|
|
5
|
+
import { listMemoryFiles } from "../../memory/internal.js";
|
|
5
6
|
import { ErrorCodes, errorShape } from "../protocol/index.js";
|
|
6
7
|
export const memoryHandlers = {
|
|
7
8
|
"memory.status": async ({ params, respond }) => {
|
|
@@ -30,6 +31,8 @@ export const memoryHandlers = {
|
|
|
30
31
|
model: status.model,
|
|
31
32
|
fts: status.fts,
|
|
32
33
|
embeddingState: status.embeddingState,
|
|
34
|
+
workspaceDir: status.workspaceDir,
|
|
35
|
+
dbPath: status.dbPath,
|
|
33
36
|
});
|
|
34
37
|
}
|
|
35
38
|
catch (err) {
|
|
@@ -48,6 +51,8 @@ export const memoryHandlers = {
|
|
|
48
51
|
return;
|
|
49
52
|
}
|
|
50
53
|
try {
|
|
54
|
+
const workspaceDir = resolveAgentWorkspaceDir(cfg, agentId);
|
|
55
|
+
const memoryFilesBefore = await listMemoryFiles(workspaceDir);
|
|
51
56
|
await manager.sync({ reason: "ui", force });
|
|
52
57
|
const status = manager.status();
|
|
53
58
|
respond(true, {
|
|
@@ -57,6 +62,9 @@ export const memoryHandlers = {
|
|
|
57
62
|
chunks: status.chunks,
|
|
58
63
|
sources: status.sources,
|
|
59
64
|
sourceCounts: status.sourceCounts,
|
|
65
|
+
workspaceDir,
|
|
66
|
+
memoryFilesOnDisk: memoryFilesBefore.length,
|
|
67
|
+
memoryFilePaths: memoryFilesBefore.map((f) => f.replace(workspaceDir, "")),
|
|
60
68
|
});
|
|
61
69
|
}
|
|
62
70
|
catch (err) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../../agents/agent-scope.js";
|
|
2
2
|
import { installSkill } from "../../agents/skills-install.js";
|
|
3
3
|
import { buildWorkspaceSkillStatus } from "../../agents/skills-status.js";
|
|
4
4
|
import { loadWorkspaceSkillEntries } from "../../agents/skills.js";
|
|
@@ -11,11 +11,11 @@ function listWorkspaceDirs(cfg) {
|
|
|
11
11
|
if (Array.isArray(list)) {
|
|
12
12
|
for (const entry of list) {
|
|
13
13
|
if (entry && typeof entry === "object" && typeof entry.id === "string") {
|
|
14
|
-
dirs.add(
|
|
14
|
+
dirs.add(resolveAgentWorkspaceDir(cfg, entry.id));
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
dirs.add(
|
|
18
|
+
dirs.add(resolveAgentWorkspaceDir(cfg, resolveDefaultAgentId(cfg)));
|
|
19
19
|
return [...dirs];
|
|
20
20
|
}
|
|
21
21
|
function collectSkillBins(entries) {
|
|
@@ -52,7 +52,7 @@ export const skillsHandlers = {
|
|
|
52
52
|
return;
|
|
53
53
|
}
|
|
54
54
|
const cfg = loadConfig();
|
|
55
|
-
const workspaceDir =
|
|
55
|
+
const workspaceDir = resolveAgentWorkspaceDir(cfg, resolveDefaultAgentId(cfg));
|
|
56
56
|
const report = buildWorkspaceSkillStatus(workspaceDir, {
|
|
57
57
|
config: cfg,
|
|
58
58
|
eligibility: { remote: getRemoteSkillEligibility() },
|
|
@@ -81,7 +81,7 @@ export const skillsHandlers = {
|
|
|
81
81
|
}
|
|
82
82
|
const p = params;
|
|
83
83
|
const cfg = loadConfig();
|
|
84
|
-
const workspaceDirRaw =
|
|
84
|
+
const workspaceDirRaw = resolveAgentWorkspaceDir(cfg, resolveDefaultAgentId(cfg));
|
|
85
85
|
const result = await installSkill({
|
|
86
86
|
workspaceDir: workspaceDirRaw,
|
|
87
87
|
skillName: p.name,
|
package/dist/memory/manager.js
CHANGED
|
@@ -283,25 +283,12 @@ export class MemoryIndexManager {
|
|
|
283
283
|
sessionWarm = new Set();
|
|
284
284
|
syncing = null;
|
|
285
285
|
syncProgress = null;
|
|
286
|
-
/**
|
|
287
|
-
* Ensure standard memory directory structure exists.
|
|
288
|
-
* Creates: memory/public, memory/shared, memory/admin, memory/users
|
|
289
|
-
*/
|
|
290
|
-
static async ensureMemoryStructure(workspaceDir) {
|
|
291
|
-
const memoryDir = path.join(workspaceDir, "memory");
|
|
292
|
-
const standardDirs = ["public", "shared", "admin", "users"];
|
|
293
|
-
for (const dir of standardDirs) {
|
|
294
|
-
await ensureDir(path.join(memoryDir, dir));
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
286
|
static async get(params) {
|
|
298
287
|
const { cfg, agentId } = params;
|
|
299
288
|
const settings = resolveMemorySearchConfig(cfg, agentId);
|
|
300
289
|
if (!settings)
|
|
301
290
|
return null;
|
|
302
291
|
const workspaceDir = resolveAgentWorkspaceDir(cfg, agentId);
|
|
303
|
-
// Ensure standard memory folder structure exists
|
|
304
|
-
await MemoryIndexManager.ensureMemoryStructure(workspaceDir);
|
|
305
292
|
const key = `${agentId}:${workspaceDir}:${JSON.stringify(settings)}`;
|
|
306
293
|
const existing = INDEX_CACHE.get(key);
|
|
307
294
|
if (existing)
|