@oyasmi/pipiclaw 0.6.3 → 0.6.4
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 +5 -3
- package/dist/agent/channel-runner.d.ts +3 -0
- package/dist/agent/channel-runner.js +51 -0
- package/dist/agent/prompt-builder.js +4 -0
- package/dist/agent/session-events.d.ts +1 -0
- package/dist/agent/session-events.js +13 -1
- package/dist/agent/types.d.ts +2 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/memory/channel-maintenance-queue.d.ts +5 -0
- package/dist/memory/channel-maintenance-queue.js +8 -0
- package/dist/memory/consolidation.d.ts +12 -4
- package/dist/memory/consolidation.js +54 -23
- package/dist/memory/files.js +8 -14
- package/dist/memory/lifecycle.d.ts +8 -14
- package/dist/memory/lifecycle.js +66 -111
- package/dist/memory/maintenance-gates.d.ts +56 -0
- package/dist/memory/maintenance-gates.js +161 -0
- package/dist/memory/maintenance-jobs.d.ts +52 -0
- package/dist/memory/maintenance-jobs.js +310 -0
- package/dist/memory/maintenance-state.d.ts +33 -0
- package/dist/memory/maintenance-state.js +113 -0
- package/dist/memory/post-turn-review.d.ts +32 -0
- package/dist/memory/post-turn-review.js +244 -0
- package/dist/memory/promotion-signals.d.ts +5 -0
- package/dist/memory/promotion-signals.js +34 -0
- package/dist/memory/promotion.d.ts +32 -0
- package/dist/memory/promotion.js +11 -0
- package/dist/memory/recall.d.ts +1 -1
- package/dist/memory/recall.js +33 -1
- package/dist/memory/review-log.d.ts +13 -0
- package/dist/memory/review-log.js +38 -0
- package/dist/memory/scheduler.d.ts +52 -0
- package/dist/memory/scheduler.js +152 -0
- package/dist/memory/session-corpus.d.ts +18 -0
- package/dist/memory/session-corpus.js +257 -0
- package/dist/memory/session-search.d.ts +30 -0
- package/dist/memory/session-search.js +151 -0
- package/dist/runtime/bootstrap.d.ts +5 -0
- package/dist/runtime/bootstrap.js +23 -0
- package/dist/runtime/delivery.js +7 -1
- package/dist/runtime/events.js +5 -0
- package/dist/settings.d.ts +35 -1
- package/dist/settings.js +55 -1
- package/dist/shared/atomic-file.d.ts +2 -0
- package/dist/shared/atomic-file.js +17 -0
- package/dist/shared/serial-queue.d.ts +4 -0
- package/dist/shared/serial-queue.js +17 -0
- package/dist/tools/config.d.ts +10 -0
- package/dist/tools/config.js +28 -0
- package/dist/tools/index.d.ts +2 -1
- package/dist/tools/index.js +32 -0
- package/dist/tools/session-search.d.ts +17 -0
- package/dist/tools/session-search.js +56 -0
- package/dist/tools/skill-list.d.ts +17 -0
- package/dist/tools/skill-list.js +86 -0
- package/dist/tools/skill-manage.d.ts +34 -0
- package/dist/tools/skill-manage.js +138 -0
- package/dist/tools/skill-security.d.ts +10 -0
- package/dist/tools/skill-security.js +111 -0
- package/dist/tools/skill-view.d.ts +12 -0
- package/dist/tools/skill-view.js +43 -0
- package/package.json +1 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { Type } from "@sinclair/typebox";
|
|
4
|
+
import { resolveSkillPath, resolveSkillSupportingFile } from "./skill-security.js";
|
|
5
|
+
const skillViewSchema = Type.Object({
|
|
6
|
+
label: Type.String({ description: "Brief description of why you're viewing this skill (shown to user)" }),
|
|
7
|
+
name: Type.String({ description: "Workspace skill name" }),
|
|
8
|
+
filePath: Type.Optional(Type.String({
|
|
9
|
+
description: "Optional file path inside the skill directory. Defaults to SKILL.md. Supporting files must be under references/, templates/, scripts/, or assets/.",
|
|
10
|
+
})),
|
|
11
|
+
});
|
|
12
|
+
function toWorkspacePath(options, hostPath) {
|
|
13
|
+
if (hostPath.startsWith(options.workspaceDir)) {
|
|
14
|
+
return `${options.workspacePath}${hostPath.slice(options.workspaceDir.length)}`;
|
|
15
|
+
}
|
|
16
|
+
return hostPath;
|
|
17
|
+
}
|
|
18
|
+
export function createSkillViewTool(options) {
|
|
19
|
+
return {
|
|
20
|
+
name: "skill_view",
|
|
21
|
+
label: "skill_view",
|
|
22
|
+
description: "View a workspace-level skill SKILL.md file or an allowed supporting file.",
|
|
23
|
+
parameters: skillViewSchema,
|
|
24
|
+
execute: async (_toolCallId, { name, filePath }) => {
|
|
25
|
+
const skillDir = resolveSkillPath(options.workspaceDir, name);
|
|
26
|
+
const targetPath = filePath ? resolveSkillSupportingFile(skillDir, filePath) : join(skillDir, "SKILL.md");
|
|
27
|
+
const content = await readFile(targetPath, "utf-8");
|
|
28
|
+
return {
|
|
29
|
+
content: [
|
|
30
|
+
{
|
|
31
|
+
type: "text",
|
|
32
|
+
text: JSON.stringify({
|
|
33
|
+
name,
|
|
34
|
+
path: toWorkspacePath(options, targetPath),
|
|
35
|
+
content,
|
|
36
|
+
}, null, 2),
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
details: { kind: "skill_view", name, path: toWorkspacePath(options, targetPath) },
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
}
|
package/package.json
CHANGED