forge-openclaw-plugin 0.2.21 → 0.2.22

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/index.html CHANGED
@@ -13,7 +13,7 @@
13
13
  />
14
14
  <link rel="icon" type="image/png" href="/forge/assets/favicon-BCHm9dUV.ico" />
15
15
  <link rel="alternate icon" href="/forge/assets/favicon-BCHm9dUV.ico" />
16
- <script type="module" crossorigin src="/forge/assets/index-B4A6TooJ.js"></script>
16
+ <script type="module" crossorigin src="/forge/assets/index-Ch_xeZ2u.js"></script>
17
17
  <link rel="modulepreload" crossorigin href="/forge/assets/viz-C6hfyqzu.js">
18
18
  <link rel="modulepreload" crossorigin href="/forge/assets/vendor-De38P6YR.js">
19
19
  <link rel="modulepreload" crossorigin href="/forge/assets/ui-BzK4azQb.js">
@@ -21,7 +21,7 @@
21
21
  <link rel="modulepreload" crossorigin href="/forge/assets/table-BWzTaky1.js">
22
22
  <link rel="modulepreload" crossorigin href="/forge/assets/board-_C6oMy5w.js">
23
23
  <link rel="stylesheet" crossorigin href="/forge/assets/vendor-DT3pnAKJ.css">
24
- <link rel="stylesheet" crossorigin href="/forge/assets/index-D6Xs_2mo.css">
24
+ <link rel="stylesheet" crossorigin href="/forge/assets/index-DvVM7K6j.css">
25
25
  </head>
26
26
  <body class="bg-canvas text-ink antialiased">
27
27
  <div id="root"></div>
@@ -4688,6 +4688,33 @@ export async function buildServer(options = {}) {
4688
4688
  }
4689
4689
  return getWikiPageDetail(note.id);
4690
4690
  });
4691
+ app.delete("/api/v1/wiki/pages/:id", async (request, reply) => {
4692
+ const { id } = request.params;
4693
+ const current = getNoteById(id);
4694
+ if (!current || (current.kind !== "wiki" && current.kind !== "evidence")) {
4695
+ reply.code(404);
4696
+ return { error: "Wiki page not found" };
4697
+ }
4698
+ if (current.slug === "index") {
4699
+ reply.code(400);
4700
+ return { error: "The wiki home page cannot be deleted." };
4701
+ }
4702
+ const linkedEntityType = current.links[0]?.entityType ?? null;
4703
+ const auth = requireNoteAccess(request.headers, linkedEntityType, {
4704
+ route: "/api/v1/wiki/pages/:id",
4705
+ entityType: linkedEntityType
4706
+ });
4707
+ const deleted = deleteEntity("note", id, entityDeleteQuerySchema.parse(request.query ?? {}), toActivityContext(auth));
4708
+ if (!deleted) {
4709
+ reply.code(404);
4710
+ return { error: "Wiki page not found" };
4711
+ }
4712
+ return {
4713
+ deleted: {
4714
+ id: deleted.id
4715
+ }
4716
+ };
4717
+ });
4691
4718
  app.post("/api/v1/wiki/search", async (request) => {
4692
4719
  requireScopedAccess(request.headers, ["read", "write"], { route: "/api/v1/wiki/search" });
4693
4720
  return searchWikiPages(wikiSearchQuerySchema.parse(request.body ?? {}), managers.secrets);
@@ -8,6 +8,7 @@ import { resolveDataDir, getDatabase } from "../db.js";
8
8
  import { decorateOwnedEntity } from "./entity-ownership.js";
9
9
  import { createNoteLinkSchema, crudEntityTypeSchema, noteKindSchema, noteSchema as persistedNoteSchema, wikiSearchModeSchema, wikiSpaceVisibilitySchema } from "../types.js";
10
10
  import { deleteEncryptedSecret, readEncryptedSecret, storeEncryptedSecret } from "./calendar.js";
11
+ import { isEntityDeleted } from "./deleted-entities.js";
11
12
  import { recordDiagnosticLog } from "./diagnostic-logs.js";
12
13
  const wikiSpaceSchema = z.object({
13
14
  id: z.string(),
@@ -528,6 +529,20 @@ function getNoteBySlugRaw(spaceId, slug, exceptNoteId) {
528
529
  .get(...(exceptNoteId ? [spaceId, slug, exceptNoteId] : [spaceId, slug]));
529
530
  return row;
530
531
  }
532
+ function getActiveNoteByIdRaw(noteId) {
533
+ const row = getNoteByIdRaw(noteId);
534
+ if (!row || isEntityDeleted("note", row.id)) {
535
+ return null;
536
+ }
537
+ return row;
538
+ }
539
+ function getActiveNoteBySlugRaw(spaceId, slug, exceptNoteId) {
540
+ const row = getNoteBySlugRaw(spaceId, slug, exceptNoteId);
541
+ if (!row || isEntityDeleted("note", row.id)) {
542
+ return null;
543
+ }
544
+ return row;
545
+ }
531
546
  function buildContentPlain(markdown) {
532
547
  return markdown
533
548
  .replace(/^---[\s\S]*?---\s*/m, "")
@@ -1465,7 +1480,9 @@ function listAllNotes() {
1465
1480
  current.push(link);
1466
1481
  linksByNoteId.set(link.note_id, current);
1467
1482
  }
1468
- return rows.map((row) => mapNoteRow(row, linksByNoteId.get(row.id) ?? []));
1483
+ return rows
1484
+ .filter((row) => !isEntityDeleted("note", row.id))
1485
+ .map((row) => mapNoteRow(row, linksByNoteId.get(row.id) ?? []));
1469
1486
  }
1470
1487
  export function listWikiSpaces() {
1471
1488
  ensureSharedWikiSpace();
@@ -1530,7 +1547,7 @@ export function listWikiPageTree(query) {
1530
1547
  export function getWikiHomePageDetail(input = {}) {
1531
1548
  const spaceId = resolveSpaceId(input.spaceId, null);
1532
1549
  ensureWikiSpaceSeedPages(spaceId);
1533
- const home = getNoteBySlugRaw(spaceId, "index");
1550
+ const home = getActiveNoteBySlugRaw(spaceId, "index");
1534
1551
  if (!home) {
1535
1552
  return null;
1536
1553
  }
@@ -1539,14 +1556,14 @@ export function getWikiHomePageDetail(input = {}) {
1539
1556
  export function getWikiPageDetailBySlug(input) {
1540
1557
  const spaceId = resolveSpaceId(input.spaceId, null);
1541
1558
  ensureWikiSpaceSeedPages(spaceId);
1542
- const row = getNoteBySlugRaw(spaceId, input.slug.trim());
1559
+ const row = getActiveNoteBySlugRaw(spaceId, input.slug.trim());
1543
1560
  if (!row) {
1544
1561
  return null;
1545
1562
  }
1546
1563
  return getWikiPageDetail(row.id);
1547
1564
  }
1548
1565
  export function getWikiPageDetail(noteId) {
1549
- const row = getNoteByIdRaw(noteId);
1566
+ const row = getActiveNoteByIdRaw(noteId);
1550
1567
  if (!row) {
1551
1568
  return null;
1552
1569
  }
@@ -3125,6 +3142,9 @@ export async function reviewWikiIngestJob(jobId, input, options) {
3125
3142
  if (!candidate) {
3126
3143
  continue;
3127
3144
  }
3145
+ if (candidate.status === "applied") {
3146
+ continue;
3147
+ }
3128
3148
  const action = decision.action ??
3129
3149
  (decision.keep === false ? "discard" : "keep");
3130
3150
  if (action === "discard") {
@@ -2,7 +2,7 @@
2
2
  "id": "forge-openclaw-plugin",
3
3
  "name": "Forge",
4
4
  "description": "Curated OpenClaw adapter for the Forge collaboration API, UI entrypoint, and localhost auto-start runtime.",
5
- "version": "0.2.21",
5
+ "version": "0.2.22",
6
6
  "skills": [
7
7
  "./skills"
8
8
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forge-openclaw-plugin",
3
- "version": "0.2.21",
3
+ "version": "0.2.22",
4
4
  "description": "Curated OpenClaw adapter for the Forge collaboration API, UI entrypoint, and localhost auto-start runtime.",
5
5
  "type": "module",
6
6
  "license": "MIT",