@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.
Files changed (63) hide show
  1. package/README.md +5 -3
  2. package/dist/agent/channel-runner.d.ts +3 -0
  3. package/dist/agent/channel-runner.js +51 -0
  4. package/dist/agent/prompt-builder.js +4 -0
  5. package/dist/agent/session-events.d.ts +1 -0
  6. package/dist/agent/session-events.js +13 -1
  7. package/dist/agent/types.d.ts +2 -0
  8. package/dist/index.d.ts +2 -2
  9. package/dist/index.js +1 -1
  10. package/dist/memory/channel-maintenance-queue.d.ts +5 -0
  11. package/dist/memory/channel-maintenance-queue.js +8 -0
  12. package/dist/memory/consolidation.d.ts +12 -4
  13. package/dist/memory/consolidation.js +54 -23
  14. package/dist/memory/files.js +8 -14
  15. package/dist/memory/lifecycle.d.ts +8 -14
  16. package/dist/memory/lifecycle.js +66 -111
  17. package/dist/memory/maintenance-gates.d.ts +56 -0
  18. package/dist/memory/maintenance-gates.js +161 -0
  19. package/dist/memory/maintenance-jobs.d.ts +52 -0
  20. package/dist/memory/maintenance-jobs.js +310 -0
  21. package/dist/memory/maintenance-state.d.ts +33 -0
  22. package/dist/memory/maintenance-state.js +113 -0
  23. package/dist/memory/post-turn-review.d.ts +32 -0
  24. package/dist/memory/post-turn-review.js +244 -0
  25. package/dist/memory/promotion-signals.d.ts +5 -0
  26. package/dist/memory/promotion-signals.js +34 -0
  27. package/dist/memory/promotion.d.ts +32 -0
  28. package/dist/memory/promotion.js +11 -0
  29. package/dist/memory/recall.d.ts +1 -1
  30. package/dist/memory/recall.js +33 -1
  31. package/dist/memory/review-log.d.ts +13 -0
  32. package/dist/memory/review-log.js +38 -0
  33. package/dist/memory/scheduler.d.ts +52 -0
  34. package/dist/memory/scheduler.js +152 -0
  35. package/dist/memory/session-corpus.d.ts +18 -0
  36. package/dist/memory/session-corpus.js +257 -0
  37. package/dist/memory/session-search.d.ts +30 -0
  38. package/dist/memory/session-search.js +151 -0
  39. package/dist/runtime/bootstrap.d.ts +5 -0
  40. package/dist/runtime/bootstrap.js +23 -0
  41. package/dist/runtime/delivery.js +7 -1
  42. package/dist/runtime/events.js +5 -0
  43. package/dist/settings.d.ts +35 -1
  44. package/dist/settings.js +55 -1
  45. package/dist/shared/atomic-file.d.ts +2 -0
  46. package/dist/shared/atomic-file.js +17 -0
  47. package/dist/shared/serial-queue.d.ts +4 -0
  48. package/dist/shared/serial-queue.js +17 -0
  49. package/dist/tools/config.d.ts +10 -0
  50. package/dist/tools/config.js +28 -0
  51. package/dist/tools/index.d.ts +2 -1
  52. package/dist/tools/index.js +32 -0
  53. package/dist/tools/session-search.d.ts +17 -0
  54. package/dist/tools/session-search.js +56 -0
  55. package/dist/tools/skill-list.d.ts +17 -0
  56. package/dist/tools/skill-list.js +86 -0
  57. package/dist/tools/skill-manage.d.ts +34 -0
  58. package/dist/tools/skill-manage.js +138 -0
  59. package/dist/tools/skill-security.d.ts +10 -0
  60. package/dist/tools/skill-security.js +111 -0
  61. package/dist/tools/skill-view.d.ts +12 -0
  62. package/dist/tools/skill-view.js +43 -0
  63. 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oyasmi/pipiclaw",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "description": "An AI assistant runtime for coding and team workflows, with DingTalk AI Cards, sub-agents, memory, and scheduled events.",
5
5
  "type": "module",
6
6
  "bin": {