@agent-native/dispatch 0.29.1 → 0.29.3

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 (33) hide show
  1. package/dist/actions/list-workspace-apps.d.ts +1 -0
  2. package/dist/actions/list-workspace-apps.js +3 -0
  3. package/dist/actions/list-workspace-apps.js.map +1 -1
  4. package/dist/components/layout/Layout.js +1 -1
  5. package/dist/components/layout/Layout.js.map +1 -1
  6. package/dist/components/workspace-app-host.d.ts +4 -2
  7. package/dist/components/workspace-app-host.d.ts.map +1 -1
  8. package/dist/components/workspace-app-host.js +54 -10
  9. package/dist/components/workspace-app-host.js.map +1 -1
  10. package/dist/lib/workspace-apps.d.ts +2 -0
  11. package/dist/lib/workspace-apps.d.ts.map +1 -1
  12. package/dist/lib/workspace-apps.js +23 -0
  13. package/dist/lib/workspace-apps.js.map +1 -1
  14. package/dist/lib/workspace-apps.test.js +60 -2
  15. package/dist/lib/workspace-apps.test.js.map +1 -1
  16. package/dist/routes/pages/$appId.d.ts.map +1 -1
  17. package/dist/routes/pages/$appId.js +15 -6
  18. package/dist/routes/pages/$appId.js.map +1 -1
  19. package/dist/routes/pages/apps.$appId.d.ts +1 -0
  20. package/dist/routes/pages/apps.$appId.d.ts.map +1 -1
  21. package/dist/routes/pages/apps.$appId.js +5 -1
  22. package/dist/routes/pages/apps.$appId.js.map +1 -1
  23. package/package.json +2 -2
  24. package/src/actions/list-workspace-apps.ts +3 -0
  25. package/src/components/layout/Layout.tsx +1 -1
  26. package/src/components/workspace-app-host.spec.tsx +222 -38
  27. package/src/components/workspace-app-host.tsx +89 -7
  28. package/src/lib/workspace-apps.test.ts +70 -1
  29. package/src/lib/workspace-apps.ts +24 -0
  30. package/src/routes/pages/$appId.spec.tsx +115 -0
  31. package/src/routes/pages/$appId.tsx +28 -5
  32. package/src/routes/pages/apps.$appId.spec.tsx +66 -0
  33. package/src/routes/pages/apps.$appId.tsx +11 -1
@@ -1,5 +1,6 @@
1
1
  declare const _default: import("@agent-native/core").ActionDefinition<{
2
2
  includeAgentCards?: unknown;
3
+ includeArchived?: unknown;
3
4
  audience?: "all" | "internal" | "public" | undefined;
4
5
  }, import("../server/lib/app-creation-store.js").WorkspaceAppSummary[]>;
5
6
  export default _default;
@@ -17,6 +17,9 @@ export default defineAction({
17
17
  includeAgentCards: httpBoolean
18
18
  .default(true)
19
19
  .describe("Fetch each ready app's /.well-known/agent-card.json with a short non-throwing timeout and include agentCardUrl, agentCardReachable, a2aEndpointUrl, agentName, and agentSkillsCount. Defaults to true for agent calls; UI polling should pass false. Pending Builder apps are not probed."),
20
+ includeArchived: httpBoolean
21
+ .default(false)
22
+ .describe("Include archived workspace apps in the result."),
20
23
  audience: z
21
24
  .enum(["all", "internal", "public"])
22
25
  .default("all")
@@ -1 +1 @@
1
- {"version":3,"file":"list-workspace-apps.js","sourceRoot":"","sources":["../../src/actions/list-workspace-apps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAExE,MAAM,WAAW,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,EAAE;IACzC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC9C,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC;QAAE,OAAO,IAAI,CAAC;IACjE,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC;QAAE,OAAO,KAAK,CAAC;IACnE,OAAO,KAAK,CAAC;AACf,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;AAEhB,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,yZAAyZ;IAC3Z,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,iBAAiB,EAAE,WAAW;aAC3B,OAAO,CAAC,IAAI,CAAC;aACb,QAAQ,CACP,2RAA2R,CAC5R;QACH,QAAQ,EAAE,CAAC;aACR,IAAI,CAAC,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;aACnC,OAAO,CAAC,KAAK,CAAC;aACd,QAAQ,CAAC,mCAAmC,CAAC;KACjD,CAAC;IACF,IAAI,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;IACvB,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC;CAC/C,CAAC,CAAC","sourcesContent":["import { defineAction } from \"@agent-native/core\";\nimport { z } from \"zod\";\n\nimport { listWorkspaceApps } from \"../server/lib/app-creation-store.js\";\n\nconst httpBoolean = z.preprocess((value) => {\n if (typeof value !== \"string\") return value;\n const normalized = value.trim().toLowerCase();\n if ([\"true\", \"1\", \"yes\", \"on\"].includes(normalized)) return true;\n if ([\"false\", \"0\", \"no\", \"off\"].includes(normalized)) return false;\n return value;\n}, z.boolean());\n\nexport default defineAction({\n description:\n \"List apps mounted inside this workspace deployment, including paths, absolute URLs, audience (internal/public), page route access overrides, and agent-card/A2A metadata for ready mounted apps by default. This is not the hosted/connected A2A agent registry; use list-connected-agents to discover agents such as Analytics or Content. UI polling callers can pass includeAgentCards=false to skip network probes.\",\n schema: z.object({\n includeAgentCards: httpBoolean\n .default(true)\n .describe(\n \"Fetch each ready app's /.well-known/agent-card.json with a short non-throwing timeout and include agentCardUrl, agentCardReachable, a2aEndpointUrl, agentName, and agentSkillsCount. Defaults to true for agent calls; UI polling should pass false. Pending Builder apps are not probed.\",\n ),\n audience: z\n .enum([\"all\", \"internal\", \"public\"])\n .default(\"all\")\n .describe(\"Filter by workspace app audience.\"),\n }),\n http: { method: \"GET\" },\n run: async (input) => listWorkspaceApps(input),\n});\n"]}
1
+ {"version":3,"file":"list-workspace-apps.js","sourceRoot":"","sources":["../../src/actions/list-workspace-apps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAExE,MAAM,WAAW,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,EAAE;IACzC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC9C,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC;QAAE,OAAO,IAAI,CAAC;IACjE,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC;QAAE,OAAO,KAAK,CAAC;IACnE,OAAO,KAAK,CAAC;AACf,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;AAEhB,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,yZAAyZ;IAC3Z,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,iBAAiB,EAAE,WAAW;aAC3B,OAAO,CAAC,IAAI,CAAC;aACb,QAAQ,CACP,2RAA2R,CAC5R;QACH,eAAe,EAAE,WAAW;aACzB,OAAO,CAAC,KAAK,CAAC;aACd,QAAQ,CAAC,gDAAgD,CAAC;QAC7D,QAAQ,EAAE,CAAC;aACR,IAAI,CAAC,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;aACnC,OAAO,CAAC,KAAK,CAAC;aACd,QAAQ,CAAC,mCAAmC,CAAC;KACjD,CAAC;IACF,IAAI,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;IACvB,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC;CAC/C,CAAC,CAAC","sourcesContent":["import { defineAction } from \"@agent-native/core\";\nimport { z } from \"zod\";\n\nimport { listWorkspaceApps } from \"../server/lib/app-creation-store.js\";\n\nconst httpBoolean = z.preprocess((value) => {\n if (typeof value !== \"string\") return value;\n const normalized = value.trim().toLowerCase();\n if ([\"true\", \"1\", \"yes\", \"on\"].includes(normalized)) return true;\n if ([\"false\", \"0\", \"no\", \"off\"].includes(normalized)) return false;\n return value;\n}, z.boolean());\n\nexport default defineAction({\n description:\n \"List apps mounted inside this workspace deployment, including paths, absolute URLs, audience (internal/public), page route access overrides, and agent-card/A2A metadata for ready mounted apps by default. This is not the hosted/connected A2A agent registry; use list-connected-agents to discover agents such as Analytics or Content. UI polling callers can pass includeAgentCards=false to skip network probes.\",\n schema: z.object({\n includeAgentCards: httpBoolean\n .default(true)\n .describe(\n \"Fetch each ready app's /.well-known/agent-card.json with a short non-throwing timeout and include agentCardUrl, agentCardReachable, a2aEndpointUrl, agentName, and agentSkillsCount. Defaults to true for agent calls; UI polling should pass false. Pending Builder apps are not probed.\",\n ),\n includeArchived: httpBoolean\n .default(false)\n .describe(\"Include archived workspace apps in the result.\"),\n audience: z\n .enum([\"all\", \"internal\", \"public\"])\n .default(\"all\")\n .describe(\"Filter by workspace app audience.\"),\n }),\n http: { method: \"GET\" },\n run: async (input) => listWorkspaceApps(input),\n});\n"]}
@@ -654,7 +654,7 @@ export function Layout({ children, extensions, agentPageHref, }) {
654
654
  }, [electronEmbedded, location.pathname, location.search]);
655
655
  const [chatFirstAppLayout, setChatFirstAppLayout] = useState(() => readChatFirstAppLayout());
656
656
  const chatFirstAppLayoutHydratedRef = useRef(false);
657
- const chatFirstAppsQuery = useActionQuery("list-workspace-apps", { includeAgentCards: false }, { enabled: chatFirstMode });
657
+ const chatFirstAppsQuery = useActionQuery("list-workspace-apps", { includeAgentCards: false, includeArchived: true }, { enabled: chatFirstMode });
658
658
  const chatFirstGrantedAppsQuery = useActionQuery("list_apps", {}, { enabled: chatFirstMode });
659
659
  const chatFirstWorkspaceApps = useMemo(() => mergeChatFirstWorkspaceApps(chatFirstAppsQuery.data), [chatFirstAppsQuery.data]);
660
660
  const chatFirstAppRegistrations = useMemo(() => {