pi-weave 0.3.12 → 0.3.14
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 +26 -8
- package/package.json +6 -3
- package/src/claude/cli.ts +13 -0
- package/src/claude/control.ts +84 -0
- package/src/claude/generate.ts +62 -0
- package/src/claude/index.ts +87 -0
- package/src/claude/mcp.ts +105 -0
- package/src/claude/server.ts +154 -0
- package/src/claude/sessions.ts +158 -0
- package/src/core/index.ts +3 -0
- package/src/core/sessionDigest.ts +103 -0
- package/src/core/tools.ts +63 -0
- package/src/core/vault.ts +79 -5
- package/src/core/view/tree.ts +2 -2
- package/src/opencode/commands.ts +4 -71
- package/src/opencode/index.ts +1 -1
- package/src/opencode/v1.ts +1 -1
- package/src/pi/tools/noteTool.ts +10 -22
- package/src/pi/tools/parameters.ts +10 -0
- package/src/pi/tools/repoTool.ts +8 -9
- package/src/web/client/api.ts +4 -0
- package/src/web/client/dist/app.js +48 -48
- package/src/web/client/shell/shell.model.ts +3 -2
- package/src/web/client/tree/Tree.tsx +8 -6
- package/src/web/client/tree/tree.model.ts +22 -7
- package/src/web/server/routes.ts +25 -3
- package/src/opencode/tools.ts +0 -43
package/src/web/client/api.ts
CHANGED
|
@@ -411,6 +411,7 @@ function mutation(fetchImpl: FetchLike, url: string, method: string, body?: unkn
|
|
|
411
411
|
|
|
412
412
|
const noteUrl = (slug: string, suffix = ""): string => `/api/note/${encodeURIComponent(slug)}${suffix}`;
|
|
413
413
|
const folderUrl = (path: string, suffix = ""): string => `/api/folder/${path.split("/").map(encodeURIComponent).join("/")}${suffix}`;
|
|
414
|
+
const artifactUrl = (path: string, suffix = ""): string => `/api/artifact/${path.split("/").map(encodeURIComponent).join("/")}${suffix}`;
|
|
414
415
|
|
|
415
416
|
/**
|
|
416
417
|
* `POST /api/note/:slug` — save the note's Markdown body. No revision
|
|
@@ -421,6 +422,9 @@ export const saveNote = (fetchImpl: FetchLike, slug: string, body: string, raw =
|
|
|
421
422
|
mutation(fetchImpl, noteUrl(slug), "POST", raw ? { body, raw: true } : { body });
|
|
422
423
|
export const renameNote = (fetchImpl: FetchLike, slug: string, name: string) => mutation(fetchImpl, noteUrl(slug, "/rename"), "POST", { name });
|
|
423
424
|
export const moveNote = (fetchImpl: FetchLike, slug: string, folder: string | null) => mutation(fetchImpl, noteUrl(slug, "/move"), "POST", { folder });
|
|
425
|
+
export const moveArtifact = (fetchImpl: FetchLike, slug: string, folder: string | null) => mutation(fetchImpl, artifactUrl(slug, "/move"), "POST", { folder });
|
|
426
|
+
export const renameArtifact = (fetchImpl: FetchLike, slug: string, name: string) => mutation(fetchImpl, artifactUrl(slug, "/rename"), "POST", { name });
|
|
427
|
+
export const deleteArtifact = (fetchImpl: FetchLike, slug: string) => mutation(fetchImpl, artifactUrl(slug), "DELETE");
|
|
424
428
|
export const deleteNote = (fetchImpl: FetchLike, slug: string) => mutation(fetchImpl, noteUrl(slug), "DELETE");
|
|
425
429
|
export const createFolder = (fetchImpl: FetchLike, path: string) => mutation(fetchImpl, folderUrl(path), "POST");
|
|
426
430
|
export const renameFolder = (fetchImpl: FetchLike, path: string, name: string) => mutation(fetchImpl, folderUrl(path, "/rename"), "POST", { name });
|