@agent-native/dispatch 0.8.8 → 0.8.9

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.
@@ -1 +1 @@
1
- {"version":3,"file":"open_app.d.ts","sourceRoot":"","sources":["../../src/actions/open_app.ts"],"names":[],"mappings":";AAuCA,wBA4BG"}
1
+ {"version":3,"file":"open_app.d.ts","sourceRoot":"","sources":["../../src/actions/open_app.ts"],"names":[],"mappings":";AAuCA,wBA2BG"}
@@ -55,7 +55,6 @@ export default defineAction({
55
55
  iframeTitle: "Dispatch MCP app",
56
56
  openLabel: "Open app",
57
57
  frameDomains: ["https:", "http://localhost:*", "http://127.0.0.1:*"],
58
- height: 900,
59
58
  }),
60
59
  },
61
60
  });
@@ -1 +1 @@
1
- {"version":3,"file":"open_app.js","sourceRoot":"","sources":["../../src/actions/open_app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AACrE,MAAM,aAAa,GAAG,CAAC;KACpB,MAAM,CAAC;IACN,GAAG,EAAE,CAAC;SACH,MAAM,EAAE;SACR,QAAQ,CACP,qGAAqG,CACtG;IACH,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;IAC3E,IAAI,EAAE,CAAC;SACJ,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,gKAAgK,CACjK;IACH,MAAM,EAAE,CAAC;SACN,MAAM,CAAC,CAAC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ACjB,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,gDAAgD;YAC7D,WAAW,EAAE,kBAAkB;YAC/B,SAAS,EAAE,UAAU;YACrB,YAAY,EAAE,CAAC,QAAQ,EAAE,oBAAoB,EAAE,oBAAoB,CAAC;YACpE,MAAM,EAAE,GAAG;SACZ,CAAC;KACH;CACF,CAAC,CAAC","sourcesContent":["import { defineAction, embedApp } from \"@agent-native/core\";\nimport { z } from \"zod\";\nimport { openGrantedDispatchMcpApp } from \"../server/lib/mcp-gateway.js\";\n\nconst deepLinkParam = z.union([z.string(), z.number(), z.boolean()]);\nconst openAppSchema = z\n .object({\n app: z\n .string()\n .describe(\n 'Granted app id, e.g. mail or calendar. Use \"dispatch\" for Dispatch-owned pages such as /extensions.',\n ),\n view: z.string().optional().describe(\"Target view in the app, e.g. inbox.\"),\n path: z\n .string()\n .optional()\n .describe(\n 'Optional route within the target app, e.g. /adhoc/q2 or /chart?panel=... . Dispatch extension routes such as /extensions/<id>/<slug> belong to app \"dispatch\".',\n ),\n params: z\n .record(z.string(), deepLinkParam)\n .optional()\n .describe(\"Optional record-focus or filter params.\"),\n embed: z\n .boolean()\n .optional()\n .describe(\n \"Render the app or focused route/component inline in MCP Apps when supported.\",\n ),\n chrome: z\n .enum([\"full\", \"minimal\"])\n .optional()\n .describe(\"Embed chrome preference for compatible app routes.\"),\n })\n .refine((input) => input.view?.trim() || input.path?.trim(), {\n message: \"open_app requires either view or path\",\n path: [\"view\"],\n });\n\nexport default defineAction({\n description:\n 'Build a deep link or embeddable app route/component route for an app available through Dispatch MCP. Use app \"dispatch\" for Dispatch extension/tool pages. No side effects; surface the returned Open link to the user.',\n schema: openAppSchema,\n http: { method: \"GET\" },\n readOnly: true,\n parallelSafe: true,\n run: async (args) => openGrantedDispatchMcpApp(args),\n link: ({ result }) => {\n if (!result || typeof result !== \"object\") return null;\n const r = result as { url?: string; app?: string; view?: string };\n if (!r.url) return null;\n return {\n url: r.url,\n label: `Open ${r.app ?? \"app\"}`,\n view: r.view,\n };\n },\n mcpApp: {\n resource: embedApp({\n title: \"Open app\",\n description: \"Render the requested granted app route inline.\",\n iframeTitle: \"Dispatch MCP app\",\n openLabel: \"Open app\",\n frameDomains: [\"https:\", \"http://localhost:*\", \"http://127.0.0.1:*\"],\n height: 900,\n }),\n },\n});\n"]}
1
+ {"version":3,"file":"open_app.js","sourceRoot":"","sources":["../../src/actions/open_app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;AACrE,MAAM,aAAa,GAAG,CAAC;KACpB,MAAM,CAAC;IACN,GAAG,EAAE,CAAC;SACH,MAAM,EAAE;SACR,QAAQ,CACP,qGAAqG,CACtG;IACH,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;IAC3E,IAAI,EAAE,CAAC;SACJ,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,gKAAgK,CACjK;IACH,MAAM,EAAE,CAAC;SACN,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,aAAa,CAAC;SACjC,QAAQ,EAAE;SACV,QAAQ,CAAC,yCAAyC,CAAC;IACtD,KAAK,EAAE,CAAC;SACL,OAAO,EAAE;SACT,QAAQ,EAAE;SACV,QAAQ,CACP,8EAA8E,CAC/E;IACH,MAAM,EAAE,CAAC;SACN,IAAI,CAAC,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;SACzB,QAAQ,EAAE;SACV,QAAQ,CAAC,oDAAoD,CAAC;CAClE,CAAC;KACD,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;IAC3D,OAAO,EAAE,uCAAuC;IAChD,IAAI,EAAE,CAAC,MAAM,CAAC;CACf,CAAC,CAAC;AAEL,eAAe,YAAY,CAAC;IAC1B,WAAW,EACT,yNAAyN;IAC3N,MAAM,EAAE,aAAa;IACrB,IAAI,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE;IACvB,QAAQ,EAAE,IAAI;IACd,YAAY,EAAE,IAAI;IAClB,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,yBAAyB,CAAC,IAAI,CAAC;IACpD,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE;QACnB,IAAI,CAAC,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAC;QACvD,MAAM,CAAC,GAAG,MAAuD,CAAC;QAClE,IAAI,CAAC,CAAC,CAAC,GAAG;YAAE,OAAO,IAAI,CAAC;QACxB,OAAO;YACL,GAAG,EAAE,CAAC,CAAC,GAAG;YACV,KAAK,EAAE,QAAQ,CAAC,CAAC,GAAG,IAAI,KAAK,EAAE;YAC/B,IAAI,EAAE,CAAC,CAAC,IAAI;SACb,CAAC;IACJ,CAAC;IACD,MAAM,EAAE;QACN,QAAQ,EAAE,QAAQ,CAAC;YACjB,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,gDAAgD;YAC7D,WAAW,EAAE,kBAAkB;YAC/B,SAAS,EAAE,UAAU;YACrB,YAAY,EAAE,CAAC,QAAQ,EAAE,oBAAoB,EAAE,oBAAoB,CAAC;SACrE,CAAC;KACH;CACF,CAAC,CAAC","sourcesContent":["import { defineAction, embedApp } from \"@agent-native/core\";\nimport { z } from \"zod\";\nimport { openGrantedDispatchMcpApp } from \"../server/lib/mcp-gateway.js\";\n\nconst deepLinkParam = z.union([z.string(), z.number(), z.boolean()]);\nconst openAppSchema = z\n .object({\n app: z\n .string()\n .describe(\n 'Granted app id, e.g. mail or calendar. Use \"dispatch\" for Dispatch-owned pages such as /extensions.',\n ),\n view: z.string().optional().describe(\"Target view in the app, e.g. inbox.\"),\n path: z\n .string()\n .optional()\n .describe(\n 'Optional route within the target app, e.g. /adhoc/q2 or /chart?panel=... . Dispatch extension routes such as /extensions/<id>/<slug> belong to app \"dispatch\".',\n ),\n params: z\n .record(z.string(), deepLinkParam)\n .optional()\n .describe(\"Optional record-focus or filter params.\"),\n embed: z\n .boolean()\n .optional()\n .describe(\n \"Render the app or focused route/component inline in MCP Apps when supported.\",\n ),\n chrome: z\n .enum([\"full\", \"minimal\"])\n .optional()\n .describe(\"Embed chrome preference for compatible app routes.\"),\n })\n .refine((input) => input.view?.trim() || input.path?.trim(), {\n message: \"open_app requires either view or path\",\n path: [\"view\"],\n });\n\nexport default defineAction({\n description:\n 'Build a deep link or embeddable app route/component route for an app available through Dispatch MCP. Use app \"dispatch\" for Dispatch extension/tool pages. No side effects; surface the returned Open link to the user.',\n schema: openAppSchema,\n http: { method: \"GET\" },\n readOnly: true,\n parallelSafe: true,\n run: async (args) => openGrantedDispatchMcpApp(args),\n link: ({ result }) => {\n if (!result || typeof result !== \"object\") return null;\n const r = result as { url?: string; app?: string; view?: string };\n if (!r.url) return null;\n return {\n url: r.url,\n label: `Open ${r.app ?? \"app\"}`,\n view: r.view,\n };\n },\n mcpApp: {\n resource: embedApp({\n title: \"Open app\",\n description: \"Render the requested granted app route inline.\",\n iframeTitle: \"Dispatch MCP app\",\n openLabel: \"Open app\",\n frameDomains: [\"https:\", \"http://localhost:*\", \"http://127.0.0.1:*\"],\n }),\n },\n});\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/dispatch",
3
- "version": "0.8.8",
3
+ "version": "0.8.9",
4
4
  "type": "module",
5
5
  "description": "Dispatch — workspace control plane for agent-native apps. Vault, integrations, destinations, scheduled jobs, and cross-app delegation, shipped as a single drop-in package.",
6
6
  "license": "MIT",
@@ -62,7 +62,6 @@ export default defineAction({
62
62
  iframeTitle: "Dispatch MCP app",
63
63
  openLabel: "Open app",
64
64
  frameDomains: ["https:", "http://localhost:*", "http://127.0.0.1:*"],
65
- height: 900,
66
65
  }),
67
66
  },
68
67
  });