@agent-native/core 0.10.0 → 0.11.1

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 (129) hide show
  1. package/dist/a2a/caller-auth.d.ts +12 -0
  2. package/dist/a2a/caller-auth.d.ts.map +1 -0
  3. package/dist/a2a/caller-auth.js +54 -0
  4. package/dist/a2a/caller-auth.js.map +1 -0
  5. package/dist/action.d.ts +17 -0
  6. package/dist/action.d.ts.map +1 -1
  7. package/dist/action.js +22 -0
  8. package/dist/action.js.map +1 -1
  9. package/dist/agent/production-agent.d.ts.map +1 -1
  10. package/dist/agent/production-agent.js +32 -19
  11. package/dist/agent/production-agent.js.map +1 -1
  12. package/dist/client/AgentPanel.d.ts.map +1 -1
  13. package/dist/client/AgentPanel.js +9 -46
  14. package/dist/client/AgentPanel.js.map +1 -1
  15. package/dist/client/AssistantChat.d.ts.map +1 -1
  16. package/dist/client/AssistantChat.js +25 -19
  17. package/dist/client/AssistantChat.js.map +1 -1
  18. package/dist/client/builder-frame.d.ts.map +1 -1
  19. package/dist/client/builder-frame.js +10 -3
  20. package/dist/client/builder-frame.js.map +1 -1
  21. package/dist/client/components/ui/dropdown-menu.d.ts +28 -0
  22. package/dist/client/components/ui/dropdown-menu.d.ts.map +1 -0
  23. package/dist/client/components/ui/dropdown-menu.js +34 -0
  24. package/dist/client/components/ui/dropdown-menu.js.map +1 -0
  25. package/dist/client/composer/TiptapComposer.js +1 -1
  26. package/dist/client/composer/TiptapComposer.js.map +1 -1
  27. package/dist/client/extensions/EmbeddedExtension.d.ts.map +1 -1
  28. package/dist/client/extensions/EmbeddedExtension.js +2 -0
  29. package/dist/client/extensions/EmbeddedExtension.js.map +1 -1
  30. package/dist/client/extensions/ExtensionSlot.js +14 -1
  31. package/dist/client/extensions/ExtensionSlot.js.map +1 -1
  32. package/dist/client/extensions/ExtensionViewer.d.ts.map +1 -1
  33. package/dist/client/extensions/ExtensionViewer.js +2 -0
  34. package/dist/client/extensions/ExtensionViewer.js.map +1 -1
  35. package/dist/client/extensions/ExtensionsListPage.d.ts.map +1 -1
  36. package/dist/client/extensions/ExtensionsListPage.js +2 -2
  37. package/dist/client/extensions/ExtensionsListPage.js.map +1 -1
  38. package/dist/client/extensions/ExtensionsSidebarSection.d.ts.map +1 -1
  39. package/dist/client/extensions/ExtensionsSidebarSection.js +6 -17
  40. package/dist/client/extensions/ExtensionsSidebarSection.js.map +1 -1
  41. package/dist/client/extensions/iframe-bridge.d.ts.map +1 -1
  42. package/dist/client/extensions/iframe-bridge.js +5 -8
  43. package/dist/client/extensions/iframe-bridge.js.map +1 -1
  44. package/dist/client/org/OrgSwitcher.d.ts +7 -1
  45. package/dist/client/org/OrgSwitcher.d.ts.map +1 -1
  46. package/dist/client/org/OrgSwitcher.js +8 -3
  47. package/dist/client/org/OrgSwitcher.js.map +1 -1
  48. package/dist/client/org/TeamPage.d.ts.map +1 -1
  49. package/dist/client/org/TeamPage.js +153 -20
  50. package/dist/client/org/TeamPage.js.map +1 -1
  51. package/dist/client/org/hooks.d.ts +29 -1
  52. package/dist/client/org/hooks.d.ts.map +1 -1
  53. package/dist/client/org/hooks.js +39 -2
  54. package/dist/client/org/hooks.js.map +1 -1
  55. package/dist/client/org/index.d.ts +2 -1
  56. package/dist/client/org/index.d.ts.map +1 -1
  57. package/dist/client/org/index.js +1 -1
  58. package/dist/client/org/index.js.map +1 -1
  59. package/dist/client/resources/ResourceTree.d.ts.map +1 -1
  60. package/dist/client/resources/ResourceTree.js +11 -3
  61. package/dist/client/resources/ResourceTree.js.map +1 -1
  62. package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
  63. package/dist/client/resources/ResourcesPanel.js +21 -5
  64. package/dist/client/resources/ResourcesPanel.js.map +1 -1
  65. package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
  66. package/dist/client/settings/SettingsPanel.js +39 -3
  67. package/dist/client/settings/SettingsPanel.js.map +1 -1
  68. package/dist/client/sharing/ShareButton.d.ts.map +1 -1
  69. package/dist/client/sharing/ShareButton.js +58 -21
  70. package/dist/client/sharing/ShareButton.js.map +1 -1
  71. package/dist/client/use-action.d.ts.map +1 -1
  72. package/dist/client/use-action.js +1 -0
  73. package/dist/client/use-action.js.map +1 -1
  74. package/dist/deploy/build.d.ts.map +1 -1
  75. package/dist/deploy/build.js +20 -49
  76. package/dist/deploy/build.js.map +1 -1
  77. package/dist/index.browser.d.ts +1 -1
  78. package/dist/index.browser.d.ts.map +1 -1
  79. package/dist/index.browser.js +1 -1
  80. package/dist/index.browser.js.map +1 -1
  81. package/dist/index.d.ts +1 -1
  82. package/dist/index.d.ts.map +1 -1
  83. package/dist/index.js +1 -1
  84. package/dist/index.js.map +1 -1
  85. package/dist/org/accept-pending.d.ts.map +1 -1
  86. package/dist/org/accept-pending.js +5 -3
  87. package/dist/org/accept-pending.js.map +1 -1
  88. package/dist/org/free-email-providers.d.ts +18 -0
  89. package/dist/org/free-email-providers.d.ts.map +1 -0
  90. package/dist/org/free-email-providers.js +124 -0
  91. package/dist/org/free-email-providers.js.map +1 -0
  92. package/dist/org/handlers.d.ts +29 -5
  93. package/dist/org/handlers.d.ts.map +1 -1
  94. package/dist/org/handlers.js +178 -37
  95. package/dist/org/handlers.js.map +1 -1
  96. package/dist/org/index.d.ts +2 -1
  97. package/dist/org/index.d.ts.map +1 -1
  98. package/dist/org/index.js +2 -1
  99. package/dist/org/index.js.map +1 -1
  100. package/dist/org/migrations.d.ts.map +1 -1
  101. package/dist/org/migrations.js +4 -0
  102. package/dist/org/migrations.js.map +1 -1
  103. package/dist/org/plugin.d.ts.map +1 -1
  104. package/dist/org/plugin.js +13 -4
  105. package/dist/org/plugin.js.map +1 -1
  106. package/dist/org/schema.d.ts +19 -0
  107. package/dist/org/schema.d.ts.map +1 -1
  108. package/dist/org/schema.js +1 -0
  109. package/dist/org/schema.js.map +1 -1
  110. package/dist/org/types.d.ts +1 -0
  111. package/dist/org/types.d.ts.map +1 -1
  112. package/dist/org/types.js.map +1 -1
  113. package/dist/resources/metadata.d.ts +1 -0
  114. package/dist/resources/metadata.d.ts.map +1 -1
  115. package/dist/resources/metadata.js +13 -3
  116. package/dist/resources/metadata.js.map +1 -1
  117. package/dist/resources/store.d.ts.map +1 -1
  118. package/dist/resources/store.js +44 -6
  119. package/dist/resources/store.js.map +1 -1
  120. package/dist/server/action-routes.d.ts.map +1 -1
  121. package/dist/server/action-routes.js +1 -0
  122. package/dist/server/action-routes.js.map +1 -1
  123. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  124. package/dist/server/agent-chat-plugin.js +38 -11
  125. package/dist/server/agent-chat-plugin.js.map +1 -1
  126. package/dist/server/google-oauth.d.ts.map +1 -1
  127. package/dist/server/google-oauth.js +10 -3
  128. package/dist/server/google-oauth.js.map +1 -1
  129. package/package.json +2 -1
@@ -1 +1 @@
1
- {"version":3,"file":"builder-frame.d.ts","sourceRoot":"","sources":["../../src/client/builder-frame.ts"],"names":[],"mappings":"AA2DA;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,GAAG,IAAI,CAgBtD;AAED,wBAAgB,gBAAgB,IAAI,OAAO,CAG1C;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAKpE;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAyBnE;AAQD;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAI1E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,MAAM,GAAG,SAAS,GACvB,OAAO,CAIT"}
1
+ {"version":3,"file":"builder-frame.d.ts","sourceRoot":"","sources":["../../src/client/builder-frame.ts"],"names":[],"mappings":"AA6DA;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,GAAG,IAAI,CAgBtD;AAED,wBAAgB,gBAAgB,IAAI,OAAO,CAQ1C;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAKpE;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAyBnE;AAQD;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAI1E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,MAAM,GAAG,SAAS,GACvB,OAAO,CAIT"}
@@ -52,8 +52,10 @@ function hasBuilderPreviewParams() {
52
52
  const params = new URLSearchParams(window.location.search);
53
53
  return (params.has("builder.space") ||
54
54
  params.has("builder.preview") ||
55
+ params.has("builder.frameEditing") ||
55
56
  params.has("builder.user.permissions") ||
56
- params.has("builder.user.role.name"));
57
+ params.has("builder.user.role.name") ||
58
+ params.has("__builder_editing__"));
57
59
  }
58
60
  /**
59
61
  * For *.builder.io / *.builder.my the parent origin alone is sufficient — those
@@ -86,9 +88,14 @@ export function getBuilderParentOrigin() {
86
88
  return null;
87
89
  }
88
90
  export function isInBuilderFrame() {
89
- if (typeof window === "undefined" || window.parent === window)
91
+ if (typeof window === "undefined")
90
92
  return false;
91
- return getBuilderParentOrigin() !== null;
93
+ if (getBuilderParentOrigin() !== null)
94
+ return true;
95
+ // Electron webviews run the preview as a top-level page, so there is no
96
+ // parent frame to inspect. Builder still marks those URLs with builder.*
97
+ // preview params, and sendToBuilderChat will use the console relay.
98
+ return hasBuilderPreviewParams();
92
99
  }
93
100
  export function isTrustedBuilderMessage(event) {
94
101
  if (typeof window === "undefined")
@@ -1 +1 @@
1
- {"version":3,"file":"builder-frame.js","sourceRoot":"","sources":["../../src/client/builder-frame.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,SAAS,eAAe,CAAC,KAAc;IACrC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;QAAE,OAAO,IAAI,CAAC;IAC5D,IAAI,CAAC;QACH,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;IAC/B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAS,cAAc;IACrB,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO,IAAI,CAAC;IAC/C,MAAM,OAAO,GACX,MAAM,CAAC,QACR,CAAC,eAAe,CAAC;IAClB,MAAM,KAAK,GAAG,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAC3B,MAAM,YAAY,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;IAC5C,IAAI,YAAY;QAAE,OAAO,YAAY,CAAC;IACtC,OAAO,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,mBAAmB,CAAC,MAAqB;IAChD,IAAI,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAC1B,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;QACxD,OAAO,CACL,QAAQ,KAAK,YAAY;YACzB,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC;YAChC,QAAQ,KAAK,YAAY;YACzB,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,CACjC,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC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;IAE1C,2EAA2E;IAC3E,2EAA2E;IAC3E,uDAAuD;IACvD,IAAI,CAAC;QACH,OAAO,CAAC,GAAG,CACT,yBAAyB;YACvB,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,CACrD,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC,CAAA,CAAC;IAEV,OAAO,IAAI,CAAC;AACd,CAAC;AAED,qEAAqE;AACrE,2EAA2E;AAC3E,8DAA8D;AAC9D,MAAM,qBAAqB,GACzB,kHAAkH,CAAC;AAErH;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,wBAAwB,CAAC,IAAwB;IAC/D,MAAM,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAC9B,IAAI,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IACrB,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACvC,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gCAAgC,CAC9C,IAAwB;IAExB,IAAI,CAAC,gBAAgB,EAAE;QAAE,OAAO,KAAK,CAAC;IACtC,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IAClD,OAAO,iBAAiB,CAAC,EAAE,OAAO,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AAC3E,CAAC","sourcesContent":["import { getFrameOrigin } from \"./frame.js\";\n\nfunction normalizeOrigin(value: unknown): string | null {\n if (typeof value !== \"string\" || !value.trim()) return null;\n try {\n return new URL(value).origin;\n } catch {\n return null;\n }\n}\n\nfunction ancestorOrigin(): string | null {\n if (typeof window === \"undefined\") return null;\n const origins = (\n window.location as Location & { ancestorOrigins?: DOMStringList }\n ).ancestorOrigins;\n const first = origins?.[0];\n const fromAncestor = normalizeOrigin(first);\n if (fromAncestor) return fromAncestor;\n return normalizeOrigin(document.referrer);\n}\n\nfunction isStrictBuilderHost(origin: string | null): boolean {\n if (!origin) return false;\n try {\n const hostname = new URL(origin).hostname.toLowerCase();\n return (\n hostname === \"builder.io\" ||\n hostname.endsWith(\".builder.io\") ||\n hostname === \"builder.my\" ||\n hostname.endsWith(\".builder.my\")\n );\n } catch {\n return false;\n }\n}\n\nfunction isBuilderLikeOrigin(origin: string | null): boolean {\n if (!origin) return false;\n if (isStrictBuilderHost(origin)) return true;\n try {\n const hostname = new URL(origin).hostname.toLowerCase();\n return hostname === \"localhost\" || hostname === \"127.0.0.1\";\n } catch {\n return false;\n }\n}\n\nfunction hasBuilderPreviewParams(): boolean {\n if (typeof window === \"undefined\") return false;\n const params = new URLSearchParams(window.location.search);\n return (\n params.has(\"builder.space\") ||\n params.has(\"builder.preview\") ||\n params.has(\"builder.user.permissions\") ||\n params.has(\"builder.user.role.name\")\n );\n}\n\n/**\n * For *.builder.io / *.builder.my the parent origin alone is sufficient — those\n * are Builder-owned hosts and any iframe they load is by definition a Builder\n * editor session. For localhost we still require the legacy `?builder.*` query\n * params, because \"parent is localhost\" can mean anything in dev. The params\n * check existed historically as a belt-and-suspenders signal, but Builder's\n * Interact mode tunnels straight to the iframe URL without appending them, so\n * requiring them everywhere caused `isInBuilderFrame()` to return false for\n * real Builder editor sessions and `HomeChatPanel` submissions silently fell\n * through to `agentNative.submitChat` (which Builder ignores).\n */\nexport function getBuilderParentOrigin(): string | null {\n const frameOrigin = getFrameOrigin();\n if (frameOrigin) {\n if (isStrictBuilderHost(frameOrigin)) return frameOrigin;\n if (isBuilderLikeOrigin(frameOrigin) && hasBuilderPreviewParams()) {\n return frameOrigin;\n }\n }\n const origin = ancestorOrigin();\n if (origin) {\n if (isStrictBuilderHost(origin)) return origin;\n if (isBuilderLikeOrigin(origin) && hasBuilderPreviewParams()) {\n return origin;\n }\n }\n return null;\n}\n\nexport function isInBuilderFrame(): boolean {\n if (typeof window === \"undefined\" || window.parent === window) return false;\n return getBuilderParentOrigin() !== null;\n}\n\nexport function isTrustedBuilderMessage(event: MessageEvent): boolean {\n if (typeof window === \"undefined\") return false;\n const origin = getBuilderParentOrigin();\n if (!origin) return false;\n return event.origin === origin && event.source === window.parent;\n}\n\nexport interface BuilderChatMessage {\n message: string;\n context?: string;\n submit?: boolean;\n}\n\nexport function sendToBuilderChat(opts: BuilderChatMessage): boolean {\n if (typeof window === \"undefined\" || !opts.message?.trim()) return false;\n const target = window.parent !== window ? window.parent : window;\n const targetOrigin = getBuilderParentOrigin() ?? \"*\";\n const payload = {\n type: \"builder.submitChat\",\n data: {\n message: opts.message,\n context: opts.context,\n submit: opts.submit,\n },\n };\n target.postMessage(payload, targetOrigin);\n\n // Builder's Electron/webview relay watches console output because webviews\n // cannot always post directly to the app frame. Keep the payload small and\n // never include credential values in callers' context.\n try {\n console.log(\n \"BUILDER_PARENT_MESSAGE:\" +\n JSON.stringify({ message: payload, targetOrigin }),\n );\n } catch {}\n\n return true;\n}\n\n// Detect \"build/create/make/scaffold a new app/agent\" style prompts.\n// Within agent-native, \"agent\" and \"app\" are synonyms — every agent-native\n// app is an agent, so users phrase build requests either way.\nconst BUILD_APP_OR_AGENT_RE =\n /\\b(?:build|create|make|scaffold|generate)\\b[^.!?\\n]*?\\b(?:agent[-\\s]native\\s+)?(?:workspace\\s+)?(?:app|agent)\\b/i;\n\n/**\n * Returns true if `text` looks like a \"build me an app/agent\" request that\n * should hand off to the code-writing agent (Builder, local code agent, etc.)\n * rather than be answered by the embedded app's domain agent.\n *\n * Conservative: requires both an imperative build verb AND an explicit\n * \"app\" / \"agent\" target word in the same sentence. \"Build me a tool\",\n * \"build a recurring job\", \"create a destination\" do not match — they\n * don't end in \"app\"/\"agent\" so they stay on the local agent. \"Build me\n * an email app\" / \"create me an email agent\" do match — the target\n * word is \"app\" / \"agent\", not \"email\".\n */\nexport function isBuildAppOrAgentRequest(text: string | undefined): boolean {\n const t = (text ?? \"\").trim();\n if (!t) return false;\n return BUILD_APP_OR_AGENT_RE.test(t);\n}\n\n/**\n * If the user typed a \"build me an app/agent\" prompt while running inside\n * the Builder.io webview/iframe, hand the prompt up to the parent Builder\n * chat via `builder.submitChat`. Returns true when delegated.\n *\n * Why: Builder is the code-writing agent. When a workspace app (Dispatch,\n * Mail, etc.) is mounted inside Builder's webview and the user asks the\n * embedded chat to \"build an app\", the user almost certainly means the\n * already-open Builder chat session — not a separate Builder agent run\n * spawned through `start-workspace-app-creation`.\n */\nexport function tryDelegateBuildRequestToBuilder(\n text: string | undefined,\n): boolean {\n if (!isInBuilderFrame()) return false;\n if (!isBuildAppOrAgentRequest(text)) return false;\n return sendToBuilderChat({ message: (text ?? \"\").trim(), submit: true });\n}\n"]}
1
+ {"version":3,"file":"builder-frame.js","sourceRoot":"","sources":["../../src/client/builder-frame.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,SAAS,eAAe,CAAC,KAAc;IACrC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;QAAE,OAAO,IAAI,CAAC;IAC5D,IAAI,CAAC;QACH,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;IAC/B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,SAAS,cAAc;IACrB,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO,IAAI,CAAC;IAC/C,MAAM,OAAO,GACX,MAAM,CAAC,QACR,CAAC,eAAe,CAAC;IAClB,MAAM,KAAK,GAAG,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAC3B,MAAM,YAAY,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;IAC5C,IAAI,YAAY;QAAE,OAAO,YAAY,CAAC;IACtC,OAAO,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC5C,CAA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,EAAE;QAAE,OAAO,KAAK,CAAC;IACtC,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IAClD,OAAO,iBAAiB,CAAC,EAAE,OAAO,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AAC3E,CAAC","sourcesContent":["import { getFrameOrigin } from \"./frame.js\";\n\nfunction normalizeOrigin(value: unknown): string | null {\n if (typeof value !== \"string\" || !value.trim()) return null;\n try {\n return new URL(value).origin;\n } catch {\n return null;\n }\n}\n\nfunction ancestorOrigin(): string | null {\n if (typeof window === \"undefined\") return null;\n const origins = (\n window.location as Location & { ancestorOrigins?: DOMStringList }\n ).ancestorOrigins;\n const first = origins?.[0];\n const fromAncestor = normalizeOrigin(first);\n if (fromAncestor) return fromAncestor;\n return normalizeOrigin(document.referrer);\n}\n\nfunction isStrictBuilderHost(origin: string | null): boolean {\n if (!origin) return false;\n try {\n const hostname = new URL(origin).hostname.toLowerCase();\n return (\n hostname === \"builder.io\" ||\n hostname.endsWith(\".builder.io\") ||\n hostname === \"builder.my\" ||\n hostname.endsWith(\".builder.my\")\n );\n } catch {\n return false;\n }\n}\n\nfunction isBuilderLikeOrigin(origin: string | null): boolean {\n if (!origin) return false;\n if (isStrictBuilderHost(origin)) return true;\n try {\n const hostname = new URL(origin).hostname.toLowerCase();\n return hostname === \"localhost\" || hostname === \"127.0.0.1\";\n } catch {\n return false;\n }\n}\n\nfunction hasBuilderPreviewParams(): boolean {\n if (typeof window === \"undefined\") return false;\n const params = new URLSearchParams(window.location.search);\n return (\n params.has(\"builder.space\") ||\n params.has(\"builder.preview\") ||\n params.has(\"builder.frameEditing\") ||\n params.has(\"builder.user.permissions\") ||\n params.has(\"builder.user.role.name\") ||\n params.has(\"__builder_editing__\")\n );\n}\n\n/**\n * For *.builder.io / *.builder.my the parent origin alone is sufficient — those\n * are Builder-owned hosts and any iframe they load is by definition a Builder\n * editor session. For localhost we still require the legacy `?builder.*` query\n * params, because \"parent is localhost\" can mean anything in dev. The params\n * check existed historically as a belt-and-suspenders signal, but Builder's\n * Interact mode tunnels straight to the iframe URL without appending them, so\n * requiring them everywhere caused `isInBuilderFrame()` to return false for\n * real Builder editor sessions and `HomeChatPanel` submissions silently fell\n * through to `agentNative.submitChat` (which Builder ignores).\n */\nexport function getBuilderParentOrigin(): string | null {\n const frameOrigin = getFrameOrigin();\n if (frameOrigin) {\n if (isStrictBuilderHost(frameOrigin)) return frameOrigin;\n if (isBuilderLikeOrigin(frameOrigin) && hasBuilderPreviewParams()) {\n return frameOrigin;\n }\n }\n const origin = ancestorOrigin();\n if (origin) {\n if (isStrictBuilderHost(origin)) return origin;\n if (isBuilderLikeOrigin(origin) && hasBuilderPreviewParams()) {\n return origin;\n }\n }\n return null;\n}\n\nexport function isInBuilderFrame(): boolean {\n if (typeof window === \"undefined\") return false;\n if (getBuilderParentOrigin() !== null) return true;\n\n // Electron webviews run the preview as a top-level page, so there is no\n // parent frame to inspect. Builder still marks those URLs with builder.*\n // preview params, and sendToBuilderChat will use the console relay.\n return hasBuilderPreviewParams();\n}\n\nexport function isTrustedBuilderMessage(event: MessageEvent): boolean {\n if (typeof window === \"undefined\") return false;\n const origin = getBuilderParentOrigin();\n if (!origin) return false;\n return event.origin === origin && event.source === window.parent;\n}\n\nexport interface BuilderChatMessage {\n message: string;\n context?: string;\n submit?: boolean;\n}\n\nexport function sendToBuilderChat(opts: BuilderChatMessage): boolean {\n if (typeof window === \"undefined\" || !opts.message?.trim()) return false;\n const target = window.parent !== window ? window.parent : window;\n const targetOrigin = getBuilderParentOrigin() ?? \"*\";\n const payload = {\n type: \"builder.submitChat\",\n data: {\n message: opts.message,\n context: opts.context,\n submit: opts.submit,\n },\n };\n target.postMessage(payload, targetOrigin);\n\n // Builder's Electron/webview relay watches console output because webviews\n // cannot always post directly to the app frame. Keep the payload small and\n // never include credential values in callers' context.\n try {\n console.log(\n \"BUILDER_PARENT_MESSAGE:\" +\n JSON.stringify({ message: payload, targetOrigin }),\n );\n } catch {}\n\n return true;\n}\n\n// Detect \"build/create/make/scaffold a new app/agent\" style prompts.\n// Within agent-native, \"agent\" and \"app\" are synonyms — every agent-native\n// app is an agent, so users phrase build requests either way.\nconst BUILD_APP_OR_AGENT_RE =\n /\\b(?:build|create|make|scaffold|generate)\\b[^.!?\\n]*?\\b(?:agent[-\\s]native\\s+)?(?:workspace\\s+)?(?:app|agent)\\b/i;\n\n/**\n * Returns true if `text` looks like a \"build me an app/agent\" request that\n * should hand off to the code-writing agent (Builder, local code agent, etc.)\n * rather than be answered by the embedded app's domain agent.\n *\n * Conservative: requires both an imperative build verb AND an explicit\n * \"app\" / \"agent\" target word in the same sentence. \"Build me a tool\",\n * \"build a recurring job\", \"create a destination\" do not match — they\n * don't end in \"app\"/\"agent\" so they stay on the local agent. \"Build me\n * an email app\" / \"create me an email agent\" do match — the target\n * word is \"app\" / \"agent\", not \"email\".\n */\nexport function isBuildAppOrAgentRequest(text: string | undefined): boolean {\n const t = (text ?? \"\").trim();\n if (!t) return false;\n return BUILD_APP_OR_AGENT_RE.test(t);\n}\n\n/**\n * If the user typed a \"build me an app/agent\" prompt while running inside\n * the Builder.io webview/iframe, hand the prompt up to the parent Builder\n * chat via `builder.submitChat`. Returns true when delegated.\n *\n * Why: Builder is the code-writing agent. When a workspace app (Dispatch,\n * Mail, etc.) is mounted inside Builder's webview and the user asks the\n * embedded chat to \"build an app\", the user almost certainly means the\n * already-open Builder chat session — not a separate Builder agent run\n * spawned through `start-workspace-app-creation`.\n */\nexport function tryDelegateBuildRequestToBuilder(\n text: string | undefined,\n): boolean {\n if (!isInBuilderFrame()) return false;\n if (!isBuildAppOrAgentRequest(text)) return false;\n return sendToBuilderChat({ message: (text ?? \"\").trim(), submit: true });\n}\n"]}
@@ -0,0 +1,28 @@
1
+ import * as React from "react";
2
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
3
+ declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
4
+ declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
6
+ declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
7
+ declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
8
+ declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
9
+ declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
10
+ inset?: boolean;
11
+ } & React.RefAttributes<HTMLDivElement>>;
12
+ declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+ declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
15
+ inset?: boolean;
16
+ } & React.RefAttributes<HTMLDivElement>>;
17
+ declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
+ declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+ declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
20
+ inset?: boolean;
21
+ } & React.RefAttributes<HTMLDivElement>>;
22
+ declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
+ declare const DropdownMenuShortcut: {
24
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
25
+ displayName: string;
26
+ };
27
+ export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
28
+ //# sourceMappingURL=dropdown-menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../../../src/client/components/ui/dropdown-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AAKvE,QAAA,MAAM,YAAY,mDAA6B,CAAC;AAChD,QAAA,MAAM,mBAAmB,0HAAgC,CAAC;AAC1D,QAAA,MAAM,iBAAiB,qHAA8B,CAAC;AACtD,QAAA,MAAM,kBAAkB,yDAA+B,CAAC;AACxD,QAAA,MAAM,eAAe,sDAA4B,CAAC;AAClD,QAAA,MAAM,sBAAsB,0HAAmC,CAAC;AAEhE,QAAA,MAAM,sBAAsB;YAGhB,OAAO;wCAejB,CAAC;AAIH,QAAA,MAAM,sBAAsB,6KAY1B,CAAC;AAIH,QAAA,MAAM,mBAAmB,0KAevB,CAAC;AAGH,QAAA,MAAM,gBAAgB;YAGV,OAAO;wCAYjB,CAAC;AAGH,QAAA,MAAM,wBAAwB,+KAoB5B,CAAC;AAIH,QAAA,MAAM,qBAAqB,4KAmBzB,CAAC;AAGH,QAAA,MAAM,iBAAiB;YAGX,OAAO;wCAYjB,CAAC;AAGH,QAAA,MAAM,qBAAqB,4KASzB,CAAC;AAGH,QAAA,MAAM,oBAAoB;8BAGvB,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;;CAKvC,CAAC;AAGF,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,GACvB,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
4
+ import { IconCheck, IconChevronRight, IconCircle } from "@tabler/icons-react";
5
+ import { cn } from "../../utils.js";
6
+ const DropdownMenu = DropdownMenuPrimitive.Root;
7
+ const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
8
+ const DropdownMenuGroup = DropdownMenuPrimitive.Group;
9
+ const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
10
+ const DropdownMenuSub = DropdownMenuPrimitive.Sub;
11
+ const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
12
+ const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.SubTrigger, { ref: ref, className: cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent", inset && "pl-8", className), ...props, children: [children, _jsx(IconChevronRight, { className: "ml-auto h-4 w-4" })] })));
13
+ DropdownMenuSubTrigger.displayName =
14
+ DropdownMenuPrimitive.SubTrigger.displayName;
15
+ const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.SubContent, { ref: ref, className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className), ...props })));
16
+ DropdownMenuSubContent.displayName =
17
+ DropdownMenuPrimitive.SubContent.displayName;
18
+ const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className), ...props }) })));
19
+ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
20
+ const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Item, { ref: ref, className: cn("relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", className), ...props })));
21
+ DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
22
+ const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.CheckboxItem, { ref: ref, className: cn("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), checked: checked, ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(IconCheck, { className: "h-4 w-4" }) }) }), children] })));
23
+ DropdownMenuCheckboxItem.displayName =
24
+ DropdownMenuPrimitive.CheckboxItem.displayName;
25
+ const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.RadioItem, { ref: ref, className: cn("relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(IconCircle, { className: "h-2 w-2 fill-current" }) }) }), children] })));
26
+ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
27
+ const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Label, { ref: ref, className: cn("px-2 py-1.5 text-xs font-semibold text-muted-foreground", inset && "pl-8", className), ...props })));
28
+ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
29
+ const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })));
30
+ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
31
+ const DropdownMenuShortcut = ({ className, ...props }) => (_jsx("span", { className: cn("ml-auto text-xs tracking-widest opacity-60", className), ...props }));
32
+ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
33
+ export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
34
+ //# sourceMappingURL=dropdown-menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown-menu.js","sourceRoot":"","sources":["../../../../src/client/components/ui/dropdown-menu.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE9E,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAEpC,MAAM,YAAY,GAAG,qBAAqB,CAAC,IAAI,CAAC;AAChD,MAAM,mBAAmB,GAAG,qBAAqB,CAAC,OAAO,CAAC;AAC1D,MAAM,iBAAiB,GAAG,qBAAqB,CAAC,KAAK,CAAC;AACtD,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,MAAM,CAAC;AACxD,MAAM,eAAe,GAAG,qBAAqB,CAAC,GAAG,CAAC;AAClD,MAAM,sBAAsB,GAAG,qBAAqB,CAAC,UAAU,CAAC;AAEhE,MAAM,sBAAsB,GAAG,KAAK,CAAC,UAAU,CAK7C,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CA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F,MAAM,iBAAiB,GAAG,KAAK,CAAC,UAAU,CAKxC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACzC,KAAC,qBAAqB,CAAC,KAAK,IAC1B,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,yDAAyD,EACzD,KAAK,IAAI,MAAM,EACf,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC,CAAC;AACH,iBAAiB,CAAC,WAAW,GAAG,qBAAqB,CAAC,KAAK,CAAC,WAAW,CAAC;AAExE,MAAM,qBAAqB,GAAG,KAAK,CAAC,UAAU,CAG5C,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,qBAAqB,CAAC,SAAS,IAC9B,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,0BAA0B,EAAE,SAAS,CAAC,KAChD,KAAK,GACT,CACH,CAAC,CAAC;AACH,qBAAqB,CAAC,WAAW,GAAG,qBAAqB,CAAC,SAAS,CAAC,WAAW,CAAC;AAEhF,MAAM,oBAAoB,GAAG,CAAC,EAC5B,SAAS,EACT,GAAG,KAAK,EAC8B,EAAE,EAAE,CAAC,CAC3C,eACE,SAAS,EAAE,EAAE,CAAC,4CAA4C,EAAE,SAAS,CAAC,KAClE,KAAK,GACT,CACH,CAAC;AACF,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAC;AAE1D,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,GACvB,CAAC","sourcesContent":["import * as React from \"react\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { IconCheck, IconChevronRight, IconCircle } from \"@tabler/icons-react\";\n\nimport { cn } from \"../../utils.js\";\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <IconChevronRight className=\"ml-auto h-4 w-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName =\n DropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuSubContent.displayName =\n DropdownMenuPrimitive.SubContent.displayName;\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <IconCheck className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName =\n DropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <IconCircle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-xs font-semibold text-muted-foreground\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => (\n <span\n className={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)}\n {...props}\n />\n);\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\";\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n};\n"]}
@@ -42,7 +42,7 @@ Follow the create-skill pattern to build this. Before writing:
42
42
 
43
43
  1. **Determine the skill name** — derive a hyphen-case name from the description (e.g. "code review" → "code-review")
44
44
  2. **Determine the skill type** — Pattern (architectural rule), Workflow (step-by-step), or Generator (scaffolding)
45
- 3. **Write the skill** as a personal resource at path "skills/<name>.md" using resource-write
45
+ 3. **Write the skill** as a personal resource at path "skills/<name>/SKILL.md" using resource-write
46
46
 
47
47
  The skill file MUST have YAML frontmatter with name and description (under 40 words), then markdown with:
48
48
  - Clear rule/purpose statement