@rubytech/create-realagent 1.0.853 → 1.0.854

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 (37) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/lib/persistent-components/dist/index.d.ts +21 -0
  3. package/payload/platform/lib/persistent-components/dist/index.d.ts.map +1 -0
  4. package/payload/platform/lib/persistent-components/dist/index.js +32 -0
  5. package/payload/platform/lib/persistent-components/dist/index.js.map +1 -0
  6. package/payload/platform/lib/persistent-components/src/index.ts +28 -0
  7. package/payload/platform/lib/persistent-components/tsconfig.json +8 -0
  8. package/payload/platform/package.json +2 -2
  9. package/payload/platform/plugins/admin/PLUGIN.md +1 -1
  10. package/payload/platform/plugins/admin/hooks/__tests__/playwright-file-guard.test.sh +278 -0
  11. package/payload/platform/plugins/admin/hooks/playwright-file-guard.sh +204 -20
  12. package/payload/platform/plugins/admin/mcp/dist/index.js +40 -1
  13. package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -1
  14. package/payload/platform/plugins/docs/references/deployment.md +2 -0
  15. package/payload/platform/plugins/docs/references/getting-started.md +2 -0
  16. package/payload/platform/plugins/docs/references/platform.md +1 -1
  17. package/payload/platform/plugins/docs/references/troubleshooting.md +10 -0
  18. package/payload/platform/scripts/admin-persist-audit.ts +191 -0
  19. package/payload/platform/scripts/component-knowledgedoc-backfill.ts +214 -0
  20. package/payload/platform/scripts/installer-device-verify.sh +17 -4
  21. package/payload/platform/templates/specialists/agents/content-producer.md +2 -2
  22. package/payload/server/chunk-CFNSKDGA.js +667 -0
  23. package/payload/server/chunk-DC6DWYZJ.js +1603 -0
  24. package/payload/server/chunk-LTB5SSQW.js +10889 -0
  25. package/payload/server/chunk-MN2LGNUB.js +2143 -0
  26. package/payload/server/client-pool-AMT2W3II.js +34 -0
  27. package/payload/server/cloudflare-task-tracker-LJ4SMK2D.js +20 -0
  28. package/payload/server/maxy-edge.js +3 -3
  29. package/payload/server/public/assets/admin-DZ8Ke7t3.js +352 -0
  30. package/payload/server/public/assets/public-DApUXgoq.js +5 -0
  31. package/payload/server/public/assets/useVoiceRecorder-CI8GpxfU.js +36 -0
  32. package/payload/server/public/index.html +2 -2
  33. package/payload/server/public/public.html +2 -2
  34. package/payload/server/server.js +535 -351
  35. package/payload/server/public/assets/admin-Dyl8uNxX.js +0 -352
  36. package/payload/server/public/assets/public-B_PNZUph.js +0 -5
  37. package/payload/server/public/assets/useVoiceRecorder-fD0IWzJj.js +0 -36
@@ -9,6 +9,7 @@ import { execFileSync } from "node:child_process";
9
9
  import { appendFileSync, cpSync, existsSync, mkdirSync, readdirSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
10
10
  import { writeKey, validateKey, hasKey, keyFilePath, deleteKey } from "../../../../lib/anthropic-key/dist/index.js";
11
11
  import { writeAdminEntry, removeAdminFromAccount } from "../../../../lib/admins-write/dist/index.js";
12
+ import { isPersistentComponent } from "../../../../lib/persistent-components/dist/index.js";
12
13
  import { deviceUrlBlock } from "../../../../lib/device-url/dist/index.js";
13
14
  import { substituteBrandPlaceholders } from "../../../../lib/brand-templating/dist/index.js";
14
15
  import { resolveEntitlement } from "../../../../lib/entitlement/dist/index.js";
@@ -1631,12 +1632,50 @@ server.tool("plugin-read", "Read a plugin definition (PLUGIN.md) or one of its r
1631
1632
  };
1632
1633
  }
1633
1634
  });
1635
+ // Task 940 — `"rendered"` is a sentinel, not a persistence ack. The platform
1636
+ // UI's stream-parser intercepts this tool_use upstream of the SDK reply
1637
+ // (platform/ui/app/lib/claude-agent/stream-parser.ts:362) and emits a typed
1638
+ // `component` event that admin-agent.ts's persistMessage flushes to Neo4j as
1639
+ // a sibling :Component node.
1640
+ //
1641
+ // Task 942 — render-component is also the *server commitment surface* for
1642
+ // PERSISTENT_COMPONENTS (action-list, document-editor, rich-content-editor,
1643
+ // grid-editor). The actual file write + :KnowledgeDocument projection lives
1644
+ // in the admin server process (stream-parser path) because the SDK delivers
1645
+ // `tool_use.input` to the UI in the assistant message but the MCP handler's
1646
+ // return reaches only the agent — there is no path back to persistMessage
1647
+ // from here. This handler emits a one-line observability marker per
1648
+ // persistence-eligible call so operators can grep for the commitment, and
1649
+ // returns richer JSON so the doctrine grep
1650
+ // `render-component.*"rendered"` resolves to a persistence-aware handler
1651
+ // rather than a bare stub.
1634
1652
  server.tool("render-component", "Render a pre-built UI component inline in the conversation. " +
1635
1653
  "Call this instead of describing a UI — the component handles input collection. " +
1636
1654
  "Wait for the user's response before continuing.", {
1637
1655
  name: z.string().describe("Component name from the UI suite (e.g. single-select, confirm, info-card, form, progress)"),
1638
1656
  data: z.record(z.string(), z.unknown()),
1639
- }, async () => ({ content: [{ type: "text", text: "rendered" }] }));
1657
+ }, async ({ name, data }) => {
1658
+ if (isPersistentComponent(name)) {
1659
+ // Persistence-eligible: log the commitment so the live + audit grep
1660
+ // (`[render-component-persist]`) can correlate the MCP call against
1661
+ // the downstream :KnowledgeDocument MERGE. Byte counts come from
1662
+ // data.html (preferred) or data.content; both being absent is a
1663
+ // legitimate render of an empty editor and the projection is skipped
1664
+ // server-side.
1665
+ const html = typeof data?.html === "string" ? data.html : "";
1666
+ const content = typeof data?.content === "string" ? data.content : "";
1667
+ const bytes = html.length > 0 ? html.length : content.length;
1668
+ const mimeType = html.length > 0 ? "text/html" : (content.length > 0 ? "text/markdown" : "");
1669
+ console.error(`[render-component-persist] componentName=${name} bytes=${bytes} mimeType=${mimeType || "none"}`);
1670
+ return {
1671
+ content: [{
1672
+ type: "text",
1673
+ text: JSON.stringify({ rendered: true, name, persistent: true, bytes, mimeType }),
1674
+ }],
1675
+ };
1676
+ }
1677
+ return { content: [{ type: "text", text: "rendered" }] };
1678
+ });
1640
1679
  server.tool("session-reset", "Reset the current session. Compacts conversation history to memory, clears the visible conversation, " +
1641
1680
  "and starts a fresh session with a new greeting. Call when the user asks to start a new session, " +
1642
1681
  "clear the conversation, or start fresh.", {}, async () => ({ content: [{ type: "text", text: "reset" }] }));