@agent-native/core 0.49.10 → 0.49.11
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/cli/skills.d.ts +5 -5
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +195 -15
- package/dist/cli/skills.js.map +1 -1
- package/dist/deploy/build.d.ts.map +1 -1
- package/dist/deploy/build.js +10 -2
- package/dist/deploy/build.js.map +1 -1
- package/dist/extensions/actions.js +1 -1
- package/dist/extensions/actions.js.map +1 -1
- package/dist/local-artifacts/index.d.ts +101 -0
- package/dist/local-artifacts/index.d.ts.map +1 -0
- package/dist/local-artifacts/index.js +507 -0
- package/dist/local-artifacts/index.js.map +1 -0
- package/dist/secrets/substitution.js +2 -2
- package/dist/secrets/substitution.js.map +1 -1
- package/dist/server/auth-marketing.d.ts +1 -0
- package/dist/server/auth-marketing.d.ts.map +1 -1
- package/dist/server/auth-marketing.js +5 -0
- package/dist/server/auth-marketing.js.map +1 -1
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +2 -2
- package/dist/server/auth.js.map +1 -1
- package/dist/server/entry-server.d.ts +27 -4
- package/dist/server/entry-server.d.ts.map +1 -1
- package/dist/server/entry-server.js +63 -43
- package/dist/server/entry-server.js.map +1 -1
- package/dist/server/onboarding-html.d.ts.map +1 -1
- package/dist/server/onboarding-html.js +3 -3
- package/dist/server/onboarding-html.js.map +1 -1
- package/dist/server/social-og-image.d.ts +2 -0
- package/dist/server/social-og-image.d.ts.map +1 -1
- package/dist/server/social-og-image.js +20 -7
- package/dist/server/social-og-image.js.map +1 -1
- package/dist/server/ssr-handler.d.ts.map +1 -1
- package/dist/server/ssr-handler.js +2 -2
- package/dist/server/ssr-handler.js.map +1 -1
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/social-meta.d.ts +2 -0
- package/dist/shared/social-meta.d.ts.map +1 -1
- package/dist/shared/social-meta.js +5 -0
- package/dist/shared/social-meta.js.map +1 -1
- package/dist/templates/default/.agents/skills/storing-data/SKILL.md +3 -1
- package/dist/templates/default/app/entry.server.tsx +8 -2
- package/dist/templates/starter-shell-sync.spec.ts +4 -3
- package/dist/templates/workspace-core/.agents/skills/extensions/SKILL.md +3 -2
- package/dist/templates/workspace-core/.agents/skills/storing-data/SKILL.md +3 -1
- package/docs/content/template-content.md +9 -0
- package/package.json +5 -1
- package/src/templates/default/.agents/skills/storing-data/SKILL.md +3 -1
- package/src/templates/default/app/entry.server.tsx +8 -2
- package/src/templates/starter-shell-sync.spec.ts +4 -3
- package/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +3 -2
- package/src/templates/workspace-core/.agents/skills/storing-data/SKILL.md +3 -1
|
@@ -173,7 +173,7 @@ export function createExtensionActionEntries() {
|
|
|
173
173
|
},
|
|
174
174
|
"create-extension": {
|
|
175
175
|
tool: {
|
|
176
|
-
description: 'Create a sandboxed Alpine.js mini-app extension. Use this when the user asks to create, build, or make an extension/widget/dashboard/calculator. Call this action exactly once per requested extension. The content must be a self-contained Alpine.js HTML body snippet that can use appAction(), appFetch(), dbQuery(), dbExec(), extensionFetch(), and extensionData. IMPORTANT — hosting a pasted file: if the user pasted a large HTML/Alpine file (it appears in your context as an <attachment name="pasted-text-…"> block) and asked you to host it as-is, do NOT copy that file into `content`. Instead leave `content` empty and pass `contentFromAttachment` set to that attachment\'s name (or the literal "latest" for the most recent pasted block) — the server reads the file verbatim. Re-emitting a large pasted file as `content` regularly gets cut off mid-stream and stalls the turn. Prefer appAction(name, params) for app data and actions, including read actions mounted as GET; do not call template /api/* routes from appFetch because the extension bridge only allows framework /_agent-native/* paths. Parse JSON string action results before aggregating; use dbQuery()/dbExec() only for known existing SQL tables. Keep the initial create-extension payload compact and working; for complex extensions, create a useful v1 first, then use focused update-extension edits for refinements rather than assembling one enormous tool input. For any non-trivial component (more than a couple of state fields, any methods, any string formatting, any branching) put the component in a <script> block via Alpine.data(\'name\', () => ({...})) and reference it with x-data="name" — do NOT cram methods, template literals, or branching logic into an inline x-data="{...}" attribute (HTML parser pitfalls cause ReferenceError failures). Define every variable referenced from x-text/x-show/x-if/x-for on the data object\'s initial state. If the extension\'s value depends on an LLM call, require a real key via \\${keys.OPENAI_API_KEY}/\\${keys.ANTHROPIC_API_KEY} (and tell the user to add it in Settings →
|
|
176
|
+
description: 'Create a sandboxed Alpine.js mini-app extension. Use this when the user asks to create, build, or make an extension/widget/dashboard/calculator. Call this action exactly once per requested extension. The content must be a self-contained Alpine.js HTML body snippet that can use appAction(), appFetch(), dbQuery(), dbExec(), extensionFetch(), and extensionData. IMPORTANT — hosting a pasted file: if the user pasted a large HTML/Alpine file (it appears in your context as an <attachment name="pasted-text-…"> block) and asked you to host it as-is, do NOT copy that file into `content`. Instead leave `content` empty and pass `contentFromAttachment` set to that attachment\'s name (or the literal "latest" for the most recent pasted block) — the server reads the file verbatim. Re-emitting a large pasted file as `content` regularly gets cut off mid-stream and stalls the turn. Prefer appAction(name, params) for app data and actions, including read actions mounted as GET; do not call template /api/* routes from appFetch because the extension bridge only allows framework /_agent-native/* paths. Parse JSON string action results before aggregating; use dbQuery()/dbExec() only for known existing SQL tables. Keep the initial create-extension payload compact and working; for complex extensions, create a useful v1 first, then use focused update-extension edits for refinements rather than assembling one enormous tool input. For any non-trivial component (more than a couple of state fields, any methods, any string formatting, any branching) put the component in a <script> block via Alpine.data(\'name\', () => ({...})) and reference it with x-data="name" — do NOT cram methods, template literals, or branching logic into an inline x-data="{...}" attribute (HTML parser pitfalls cause ReferenceError failures). Define every variable referenced from x-text/x-show/x-if/x-for on the data object\'s initial state. If the extension\'s value depends on an LLM call, require a real key via \\${keys.OPENAI_API_KEY}/\\${keys.ANTHROPIC_API_KEY} (and tell the user to add it in the Dispatch Vault, or in app Settings → API Keys & Connections for standalone apps, if missing) or route the AI work to the agent chat — never ship a stubbed analysis step that renders a placeholder/boolean as the result.',
|
|
177
177
|
parameters: {
|
|
178
178
|
type: "object",
|
|
179
179
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/extensions/actions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EACL,eAAe,EACf,eAAe,EACf,4BAA4B,EAC5B,mCAAmC,EACnC,YAAY,EACZ,0BAA0B,EAC1B,mBAAmB,EACnB,qBAAqB,EACrB,aAAa,EACb,oBAAoB,EACpB,cAAc,EACd,8BAA8B,EAC9B,eAAe,EACf,eAAe,EACf,sBAAsB,GAEvB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAM1C,MAAM,UAAU,4BAA4B;IAC1C,OAAO;QACL,iBAAiB,EAAE;YACjB,IAAI,EAAE;gBACJ,WAAW,EACT,wXAAwX;gBAC1X,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,MAAM,EAAE;4BACN,IAAI,EAAE,QAAQ;4BACd,WAAW,EACT,iHAAiH;yBACpH;wBACD,aAAa,EAAE;4BACb,IAAI,EAAE,SAAS;4BACf,WAAW,EACT,oFAAoF;yBACvF;wBACD,qBAAqB,EAAE;4BACrB,IAAI,EAAE,SAAS;4BACf,WAAW,EACT,kKAAkK;yBACrK;wBACD,cAAc,EAAE;4BACd,IAAI,EAAE,SAAS;4BACf,WAAW,EACT,4EAA4E;yBAC/E;wBACD,KAAK,EAAE;4BACL,IAAI,EAAE,QAAQ;4BACd,WAAW,EAAE,6CAA6C;yBAC3D;qBACF;iBACF;aACF;YACD,GA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AO,KAAK,QAAQ,CAAC;QAC1C,KAAK,eAAe;YAClB,OAAO,CACL,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,CACrE,CAAC;QACJ;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC","sourcesContent":["import type { ActionEntry } from \"../agent/production-agent.js\";\nimport type { ActionRunContext } from \"../action.js\";\nimport type { AgentChatAttachment } from \"../agent/types.js\";\nimport { writeAppState } from \"../application-state/script-helpers.js\";\nimport {\n createExtension,\n deleteExtension,\n findRecentDuplicateExtension,\n getHiddenExtensionIdsForCurrentUser,\n getExtension,\n getExtensionHistoryVersion,\n globalHideExtension,\n globalUnhideExtension,\n hideExtension,\n listExtensionHistory,\n listExtensions,\n restoreExtensionHistoryVersion,\n unhideExtension,\n updateExtension,\n updateExtensionContent,\n type ExtensionRow,\n} from \"./store.js\";\nimport { resolveAccess } from \"../sharing/access.js\";\nimport {\n addExtensionSlotTarget,\n installExtensionSlot,\n uninstallExtensionSlot,\n listExtensionsForSlot,\n listSlotsForExtension,\n} from \"./slots/store.js\";\nimport { extensionPath } from \"./path.js\";\nimport type {\n ExtensionContentEdit,\n ExtensionLegacyPatch,\n} from \"./content-patch.js\";\n\nexport function createExtensionActionEntries(): Record<string, ActionEntry> {\n return {\n \"list-extensions\": {\n tool: {\n description:\n \"List extensions visible in the current user's Extensions list/sidebar. Use this for browsing or when you only know a display name. If <current-screen> or <current-url> already contains extensionId for the current extension, use get-extension or update-extension with that id directly instead of listing. Do not query the legacy tools table directly for extension management.\",\n parameters: {\n type: \"object\",\n properties: {\n search: {\n type: \"string\",\n description:\n \"Optional case-insensitive filter matched against id, name, description, and owner email. Example: Connect Zoom.\",\n },\n includeHidden: {\n type: \"boolean\",\n description:\n \"Include extensions the current user has hidden from their list. Defaults to false.\",\n },\n includeGloballyHidden: {\n type: \"boolean\",\n description:\n \"Include extensions an admin/owner has globally hidden from everyone (via global-hide-extension). Defaults to false. Use this to find ids to unhide for everyone.\",\n },\n includeContent: {\n type: \"boolean\",\n description:\n \"Include full Alpine.js content. Defaults to false to keep results concise.\",\n },\n limit: {\n type: \"number\",\n description: \"Maximum results to return. Defaults to 100.\",\n },\n },\n },\n },\n run: async (args) => {\n const includeHidden = coerceBoolean(args?.includeHidden);\n const includeGloballyHidden = coerceBoolean(\n args?.includeGloballyHidden,\n );\n const includeContent = coerceBoolean(args?.includeContent);\n const search = String(args?.search ?? \"\")\n .trim()\n .toLowerCase();\n const limit = coerceLimit(args?.limit);\n const hiddenIds = await getHiddenExtensionIdsForCurrentUser();\n\n let rows = await listExtensions({\n includeHidden,\n includeGloballyHidden,\n });\n if (search) {\n rows = rows.filter((row) =>\n [row.id, row.name, row.description, row.ownerEmail]\n .join(\"\\n\")\n .toLowerCase()\n .includes(search),\n );\n }\n\n rows = rows.slice(0, limit);\n const extensions = await Promise.all(\n rows.map((row) => summarizeExtension(row, hiddenIds, includeContent)),\n );\n return {\n ok: true,\n count: extensions.length,\n extensions,\n };\n },\n readOnly: true,\n },\n\n \"get-extension\": {\n tool: {\n description:\n \"Get one existing extension by id. Use this when <current-screen> or <current-url> contains extensionId for the current extension; do not call list-extensions just to rediscover that id. Defaults to including the full Alpine.js content so you can make a targeted update-extension edit.\",\n parameters: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n description:\n \"Extension id to read. Prefer the extensionId from <current-screen> or <current-url> when the user refers to the current extension.\",\n },\n includeContent: {\n type: \"boolean\",\n description:\n \"Include full Alpine.js content. Defaults to true for targeted edits.\",\n },\n },\n required: [\"id\"],\n },\n },\n run: async (args) => {\n const id = String(args?.id ?? \"\").trim();\n if (!id) return \"Error: id is required.\";\n const includeContent =\n args?.includeContent === undefined\n ? true\n : coerceBoolean(args.includeContent);\n const extension = await getExtension(id);\n if (!extension) return `Error: extension not found: ${id}`;\n const hiddenIds = await getHiddenExtensionIdsForCurrentUser();\n return {\n ok: true,\n extension: await summarizeExtension(\n extension,\n hiddenIds,\n includeContent,\n ),\n };\n },\n readOnly: true,\n },\n\n \"list-extension-history\": {\n tool: {\n description:\n \"List saved history snapshots for one extension. Use this when the user asks what changed, wants a changelog, or wants to pick an older version to restore. If the user is viewing the extension, use the extensionId from <current-screen> or <current-url>.\",\n parameters: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n description: \"Extension id whose history should be listed.\",\n },\n limit: {\n type: \"number\",\n description: \"Maximum versions to return. Defaults to 50.\",\n },\n includeContent: {\n type: \"boolean\",\n description:\n \"Include full HTML content for each version. Defaults to false.\",\n },\n },\n required: [\"id\"],\n },\n },\n run: async (args) => {\n const id = String(args?.id ?? \"\").trim();\n if (!id) return \"Error: id is required.\";\n const history = await listExtensionHistory(id, {\n limit:\n args?.limit === undefined ? undefined : coerceLimit(args.limit),\n includeContent: coerceBoolean(args?.includeContent),\n });\n return {\n ok: true,\n count: history.length,\n history,\n };\n },\n readOnly: true,\n },\n\n \"get-extension-history-version\": {\n tool: {\n description:\n \"Get one extension history version with its previous-version diff. Use after list-extension-history when the user wants to inspect exactly what changed.\",\n parameters: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n description: \"Extension id whose history version should be read.\",\n },\n version: {\n type: \"number\",\n description: \"History version number to inspect.\",\n },\n },\n required: [\"id\", \"version\"],\n },\n },\n run: async (args) => {\n const id = String(args?.id ?? \"\").trim();\n if (!id) return \"Error: id is required.\";\n const version = Number(args?.version);\n if (!Number.isInteger(version) || version < 1) {\n return \"Error: version must be a positive integer.\";\n }\n const detail = await getExtensionHistoryVersion(id, version);\n if (!detail) {\n return `Error: extension history version not found: ${id}#${version}`;\n }\n return { ok: true, ...detail };\n },\n readOnly: true,\n },\n\n \"create-extension\": {\n tool: {\n description:\n 'Create a sandboxed Alpine.js mini-app extension. Use this when the user asks to create, build, or make an extension/widget/dashboard/calculator. Call this action exactly once per requested extension. The content must be a self-contained Alpine.js HTML body snippet that can use appAction(), appFetch(), dbQuery(), dbExec(), extensionFetch(), and extensionData. IMPORTANT — hosting a pasted file: if the user pasted a large HTML/Alpine file (it appears in your context as an <attachment name=\"pasted-text-…\"> block) and asked you to host it as-is, do NOT copy that file into `content`. Instead leave `content` empty and pass `contentFromAttachment` set to that attachment\\'s name (or the literal \"latest\" for the most recent pasted block) — the server reads the file verbatim. Re-emitting a large pasted file as `content` regularly gets cut off mid-stream and stalls the turn. Prefer appAction(name, params) for app data and actions, including read actions mounted as GET; do not call template /api/* routes from appFetch because the extension bridge only allows framework /_agent-native/* paths. Parse JSON string action results before aggregating; use dbQuery()/dbExec() only for known existing SQL tables. Keep the initial create-extension payload compact and working; for complex extensions, create a useful v1 first, then use focused update-extension edits for refinements rather than assembling one enormous tool input. For any non-trivial component (more than a couple of state fields, any methods, any string formatting, any branching) put the component in a <script> block via Alpine.data(\\'name\\', () => ({...})) and reference it with x-data=\"name\" — do NOT cram methods, template literals, or branching logic into an inline x-data=\"{...}\" attribute (HTML parser pitfalls cause ReferenceError failures). Define every variable referenced from x-text/x-show/x-if/x-for on the data object\\'s initial state. If the extension\\'s value depends on an LLM call, require a real key via \\\\${keys.OPENAI_API_KEY}/\\\\${keys.ANTHROPIC_API_KEY} (and tell the user to add it in Settings → Secrets if missing) or route the AI work to the agent chat — never ship a stubbed analysis step that renders a placeholder/boolean as the result.',\n parameters: {\n type: \"object\",\n properties: {\n name: {\n type: \"string\",\n description:\n 'Short display name for the extension. Do not include \"app\" — e.g. name a todo app \"Todos\", a weather app \"Weather\".',\n },\n description: {\n type: \"string\",\n description: \"One-sentence summary of what the extension does.\",\n },\n content: {\n type: \"string\",\n description:\n \"Self-contained Alpine.js HTML body snippet. The iframe canvas already has modest default padding, so avoid duplicate outer padding unless the design needs it. Use semantic Tailwind colors (bg-background, text-foreground, bg-primary, etc.) for native theming. Do not include a full app build, React code, or source files. Required UNLESS you pass contentFromAttachment instead.\",\n },\n contentFromAttachment: {\n type: \"string\",\n description:\n 'Host a pasted/attached file verbatim WITHOUT re-typing it. Set this to the name of an attachment on the current turn (e.g. \"pasted-text-1718000000000-ab12cd.txt\") or the literal \"latest\" for the most recent pasted block; the server resolves it into the extension content. Use this instead of `content` whenever the user pasted a large file to host — it avoids re-emitting thousands of tokens. When set, leave `content` empty.',\n },\n icon: {\n type: \"string\",\n description: \"Optional icon name or short label.\",\n },\n },\n required: [\"name\"],\n },\n },\n run: async (args, ctx) => {\n const name = String(args?.name ?? \"\").trim();\n if (!name) return \"Error: name is required.\";\n const resolved = resolveExtensionContent(args, ctx);\n if (\"error\" in resolved) return resolved.error;\n const content = resolved.content.trim();\n if (!content) return \"Error: content is required.\";\n const description = String(args?.description ?? \"\").trim();\n const icon = args?.icon ? String(args.icon) : undefined;\n\n // Idempotency: if an identical extension was created in the last 5\n // minutes (e.g. a connection drop caused the agent to retry this tool\n // call), return the existing one instead of creating a duplicate.\n // Keyed on the FULL create inputs (name + content + description + icon),\n // so two creates that differ in ANY of them are treated as distinct\n // rather than silently collapsed — only a byte-identical re-create (the\n // retry case) recovers the existing row.\n const existing = await findRecentDuplicateExtension({\n name,\n content,\n description,\n icon,\n });\n if (existing) {\n const existingPath = extensionPath(existing.id, existing.name);\n try {\n await writeAppState(\"navigate\", {\n view: \"extensions\",\n extensionId: existing.id,\n path: existingPath,\n _writeId: `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,\n });\n } catch {\n // Non-fatal — agent can still mention the path in its reply.\n }\n return {\n ok: true,\n extension: { ...existing, path: existingPath },\n path: existingPath,\n next: `Extension was already created in this session (recovered from a connection retry). The user is being navigated to it — no further navigation tool calls needed.`,\n };\n }\n\n const extension = await createExtension({\n name,\n description,\n content,\n icon,\n });\n const path = extensionPath(extension.id, extension.name);\n\n // Auto-navigate so the user lands on the new extension instead of\n // having to read the JSON response and click a link. Writes a\n // one-shot `navigate` app-state command the UI consumes and clears.\n try {\n await writeAppState(\"navigate\", {\n view: \"extensions\",\n extensionId: extension.id,\n path,\n // Unique-per-write token so the UI's `use-navigation-state` hook\n // can dedup race-driven re-reads of the same command.\n _writeId: `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,\n });\n } catch {\n // Non-fatal — agent can still mention the path in its reply.\n }\n\n return {\n ok: true,\n extension: { ...extension, path },\n path,\n next: `Created. The user is being navigated to the new extension automatically — no further navigation tool calls needed.`,\n };\n },\n },\n\n \"update-extension\": {\n tool: {\n description:\n 'Update an existing sandboxed Alpine.js mini-app extension. If the user is viewing the extension, use the extensionId from <current-screen> or <current-url> directly; do not list extensions first just to find the current id. Prefer granular edits for surgical changes; use full content replacement only for broad rewrites. Supported edits include literal replace, insert-before/after marker, replace-between markers, replace-section/wrap-section/remove-section for <!-- agent-native:section name --> blocks, and regex-replace. Pass format=true to run Prettier on the final HTML. To replace the whole body with a large pasted file, pass contentFromAttachment (the attachment name, or \"latest\") instead of copying the file into `content` — that avoids re-emitting thousands of tokens.',\n parameters: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n description:\n \"Extension id to update. Prefer the extensionId from <current-screen> or <current-url> for the current extension.\",\n },\n name: {\n type: \"string\",\n description: \"Optional new display name.\",\n },\n description: {\n type: \"string\",\n description: \"Optional new description.\",\n },\n content: {\n type: \"string\",\n description:\n \"Optional full replacement Alpine.js HTML body snippet.\",\n },\n contentFromAttachment: {\n type: \"string\",\n description:\n 'Optional full replacement sourced from a pasted/attached file on the current turn, by attachment name (or the literal \"latest\" for the most recent pasted block). Use instead of `content` when replacing the whole body with a large pasted file so you do not have to re-type it. Ignored when `content` is provided.',\n },\n patches: {\n type: \"string\",\n description:\n 'Legacy optional JSON array of { \"find\": \"...\", \"replace\": \"...\", \"all\"?: true, \"expectedMatches\"?: 1, \"required\"?: true } patches. Missing required targets fail instead of silently no-oping.',\n },\n edits: {\n type: \"string\",\n description:\n 'Preferred optional JSON array of granular edit operations. Examples: { \"op\": \"insert-after\", \"marker\": \"<!-- section:metrics -->\", \"content\": \"...\" }, { \"op\": \"replace-section\", \"section\": \"npm-chart\", \"content\": \"...\" }, { \"op\": \"wrap-section\", \"section\": \"charts\", \"before\": \"<div>\", \"after\": \"</div>\" }, { \"op\": \"regex-replace\", \"pattern\": \"...\", \"replace\": \"...\", \"expectedMatches\": 1 }.',\n },\n format: {\n type: \"boolean\",\n description:\n \"When true, format the final extension HTML with Prettier after applying content, patches, and edits.\",\n },\n icon: {\n type: \"string\",\n description: \"Optional icon name or short label.\",\n },\n visibility: {\n type: \"string\",\n description: \"Optional sharing visibility.\",\n enum: [\"private\", \"org\", \"public\"],\n },\n },\n required: [\"id\"],\n },\n },\n run: async (args, ctx) => {\n const id = String(args?.id ?? \"\").trim();\n if (!id) return \"Error: id is required.\";\n\n // Full-replacement content can come inline (`content`) or by reference\n // (`contentFromAttachment`) so the model never has to re-type a large\n // pasted file. Inline wins only when NON-EMPTY — the docstring tells\n // callers to leave `content` empty when using `contentFromAttachment`,\n // so an empty/blank `content` must fall through to the attachment\n // instead of blanking the extension (mirrors resolveExtensionContent).\n let replacementContent =\n typeof args?.content === \"string\" && args.content.trim().length > 0\n ? args.content\n : undefined;\n if (\n replacementContent === undefined &&\n args?.contentFromAttachment !== undefined\n ) {\n const resolved = resolveExtensionContent(args, ctx);\n if (\"error\" in resolved) return resolved.error;\n replacementContent = resolved.content;\n }\n\n let result = null;\n const hasContentUpdate =\n replacementContent !== undefined ||\n args?.patches !== undefined ||\n args?.edits !== undefined ||\n args?.format !== undefined;\n if (hasContentUpdate) {\n const patches = parsePatches((args as any).patches);\n if (args?.patches !== undefined && !patches) {\n return \"Error: patches must be a JSON array of { find, replace } objects.\";\n }\n const edits = parseEdits((args as any).edits);\n if (args?.edits !== undefined && !edits) {\n return \"Error: edits must be a JSON array of supported extension edit operations.\";\n }\n result = await updateExtensionContent(id, {\n content: replacementContent,\n patches,\n edits,\n format: coerceBoolean(args?.format),\n });\n }\n\n const meta: Record<string, string> = {};\n if (args?.name !== undefined) meta.name = String(args.name).trim();\n if (args?.description !== undefined) {\n meta.description = String(args.description).trim();\n }\n if (args?.icon !== undefined) meta.icon = String(args.icon);\n if (args?.visibility !== undefined) {\n meta.visibility = String(args.visibility);\n }\n if (Object.keys(meta).length > 0) {\n result = await updateExtension(id, meta as any);\n }\n\n if (!result) result = await getExtension(id);\n if (!result) return `Error: extension not found: ${id}`;\n const hiddenIds = await getHiddenExtensionIdsForCurrentUser();\n return {\n ok: true,\n extension: await summarizeExtension(result, hiddenIds, false),\n };\n },\n },\n\n \"delete-extension\": {\n tool: {\n description:\n \"Permanently delete an extension everywhere it is shared. Requires owner/admin access. If the user only wants a shared extension removed from their own sidebar/list, use hide-extension instead.\",\n parameters: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n description:\n \"Extension id to permanently delete. Use list-extensions first if you only know the display name.\",\n },\n },\n required: [\"id\"],\n },\n },\n run: async (args) => {\n const id = String(args?.id ?? \"\").trim();\n if (!id) return \"Error: id is required.\";\n const extension = await getExtension(id);\n if (!extension) return `Error: extension not found: ${id}`;\n\n try {\n const ok = await deleteExtension(id);\n if (!ok) return `Error: extension not found: ${id}`;\n return { ok: true, deleted: summarizeDeletedExtension(extension) };\n } catch (err: any) {\n return {\n ok: false,\n error: err?.message ?? String(err),\n next: \"If the user wants this gone only from their own view, call hide-extension with the same id.\",\n };\n }\n },\n },\n\n \"restore-extension-history-version\": {\n tool: {\n description:\n \"Restore an extension's name, description, icon, and HTML content from a saved history version. Requires editor access. This does not restore sharing visibility or ownership.\",\n parameters: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n description: \"Extension id to restore.\",\n },\n version: {\n type: \"number\",\n description:\n \"Saved history version number to restore. Use list-extension-history first if unsure.\",\n },\n },\n required: [\"id\", \"version\"],\n },\n },\n run: async (args) => {\n const id = String(args?.id ?? \"\").trim();\n if (!id) return \"Error: id is required.\";\n const version = Number(args?.version);\n if (!Number.isInteger(version) || version < 1) {\n return \"Error: version must be a positive integer.\";\n }\n const result = await restoreExtensionHistoryVersion(id, version);\n if (!result) {\n return `Error: extension history version not found: ${id}#${version}`;\n }\n const hiddenIds = await getHiddenExtensionIdsForCurrentUser();\n return {\n ok: true,\n restoredVersion: version,\n extension: await summarizeExtension(result, hiddenIds, false),\n };\n },\n },\n\n \"hide-extension\": {\n tool: {\n description:\n \"Hide an accessible extension from the current user's Extensions list/sidebar without deleting it for anyone else. Use this when the user says to remove a shared extension from their view, or when delete-extension reports that the current user is not owner/admin.\",\n parameters: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n description:\n \"Extension id to hide for the current user. Use list-extensions first if you only know the display name.\",\n },\n },\n required: [\"id\"],\n },\n },\n run: async (args) => {\n const id = String(args?.id ?? \"\").trim();\n if (!id) return \"Error: id is required.\";\n const extension = await getExtension(id);\n if (!extension) return `Error: extension not found: ${id}`;\n\n await hideExtension(id);\n return { ok: true, hidden: summarizeDeletedExtension(extension) };\n },\n },\n\n \"unhide-extension\": {\n tool: {\n description:\n \"Restore an extension the current user previously hid so it appears in their Extensions list/sidebar again. Use list-extensions with includeHidden=true to find hidden ids.\",\n parameters: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n description: \"Extension id to restore for the current user.\",\n },\n },\n required: [\"id\"],\n },\n },\n run: async (args) => {\n const id = String(args?.id ?? \"\").trim();\n if (!id) return \"Error: id is required.\";\n await unhideExtension(id);\n return { ok: true, id };\n },\n },\n\n \"global-hide-extension\": {\n tool: {\n description:\n \"Globally hide an extension from EVERYONE's Extensions list/sidebar (not just the current user) by stamping it hidden. Requires owner/admin access. Use this for an admin takedown of a shared/org extension. The extension is not deleted and stays accessible by id; use global-unhide-extension to reverse. For removing an extension only from your own view, use hide-extension instead.\",\n parameters: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n description:\n \"Extension id to hide for everyone. Use list-extensions first if you only know the display name.\",\n },\n },\n required: [\"id\"],\n },\n },\n run: async (args) => {\n const id = String(args?.id ?? \"\").trim();\n if (!id) return \"Error: id is required.\";\n const extension = await getExtension(id);\n if (!extension) return `Error: extension not found: ${id}`;\n\n await globalHideExtension(id);\n return {\n ok: true,\n globallyHidden: summarizeDeletedExtension(extension),\n };\n },\n },\n\n \"global-unhide-extension\": {\n tool: {\n description:\n \"Reverse a global hide so the extension reappears in everyone's Extensions list/sidebar again. Requires owner/admin access. Use list-extensions with includeGloballyHidden=true to find globally-hidden ids.\",\n parameters: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n description: \"Extension id to unhide for everyone.\",\n },\n },\n required: [\"id\"],\n },\n },\n run: async (args) => {\n const id = String(args?.id ?? \"\").trim();\n if (!id) return \"Error: id is required.\";\n await globalUnhideExtension(id);\n return { ok: true, id };\n },\n },\n\n \"add-extension-slot-target\": {\n tool: {\n description:\n 'Declare that an extension can render in a UI extension-point slot of an app (e.g. \"mail.contact-sidebar.bottom\"). Apps drop ExtensionSlot components in their UI; this action registers an extension as installable into one of those slots. Slot IDs follow the convention <app>.<area>.<position>. Caller must have editor access to the extension.',\n parameters: {\n type: \"object\",\n properties: {\n extensionId: { type: \"string\", description: \"Extension id.\" },\n slotId: {\n type: \"string\",\n description:\n 'Slot identifier — e.g. \"mail.contact-sidebar.bottom\".',\n },\n config: {\n type: \"string\",\n description:\n \"Optional JSON string with slot-specific config (defaults, hints, etc.).\",\n },\n },\n required: [\"extensionId\", \"slotId\"],\n },\n },\n run: async (args) => {\n const extensionId = String(args?.extensionId ?? \"\").trim();\n const slotId = String(args?.slotId ?? \"\").trim();\n if (!extensionId) return \"Error: extensionId is required.\";\n if (!slotId) return \"Error: slotId is required.\";\n const row = await addExtensionSlotTarget(\n extensionId,\n slotId,\n args?.config ? String(args.config) : undefined,\n );\n return { ok: true, slot: row };\n },\n },\n\n \"install-extension\": {\n tool: {\n description:\n \"Install an extension as a widget in an extension-point slot for the current user. The extension must already declare the slot via add-extension-slot-target. Per-user installation — only affects the calling user's view. Use after creating an extension that targets a slot, or when the user asks to add an existing widget to a slot.\",\n parameters: {\n type: \"object\",\n properties: {\n extensionId: {\n type: \"string\",\n description: \"Extension id to install.\",\n },\n slotId: {\n type: \"string\",\n description:\n 'Slot identifier — e.g. \"mail.contact-sidebar.bottom\".',\n },\n position: {\n type: \"number\",\n description:\n \"Optional integer position within the slot (lower = earlier). Defaults to end.\",\n },\n config: {\n type: \"string\",\n description:\n \"Optional JSON string with per-install config (overrides, settings).\",\n },\n },\n required: [\"extensionId\", \"slotId\"],\n },\n },\n run: async (args) => {\n const extensionId = String(args?.extensionId ?? \"\").trim();\n const slotId = String(args?.slotId ?? \"\").trim();\n if (!extensionId) return \"Error: extensionId is required.\";\n if (!slotId) return \"Error: slotId is required.\";\n const position =\n args?.position !== undefined && args.position !== null\n ? Number(args.position)\n : undefined;\n const row = await installExtensionSlot(extensionId, slotId, {\n position: Number.isFinite(position as number) ? position : undefined,\n config: args?.config ? String(args.config) : undefined,\n });\n return { ok: true, install: row };\n },\n },\n\n \"uninstall-extension\": {\n tool: {\n description:\n \"Remove an extension from an extension-point slot for the current user. Does not delete the extension itself.\",\n parameters: {\n type: \"object\",\n properties: {\n extensionId: { type: \"string\", description: \"Extension id.\" },\n slotId: { type: \"string\", description: \"Slot identifier.\" },\n },\n required: [\"extensionId\", \"slotId\"],\n },\n },\n run: async (args) => {\n const extensionId = String(args?.extensionId ?? \"\").trim();\n const slotId = String(args?.slotId ?? \"\").trim();\n if (!extensionId) return \"Error: extensionId is required.\";\n if (!slotId) return \"Error: slotId is required.\";\n await uninstallExtensionSlot(extensionId, slotId);\n return { ok: true };\n },\n },\n\n \"list-extensions-for-slot\": {\n tool: {\n description:\n \"List extensions the current user has access to that declare a given extension-point slot. Use to discover what's available to install into a slot the user mentioned.\",\n parameters: {\n type: \"object\",\n properties: {\n slotId: { type: \"string\", description: \"Slot identifier.\" },\n },\n required: [\"slotId\"],\n },\n },\n run: async (args) => {\n const slotId = String(args?.slotId ?? \"\").trim();\n if (!slotId) return \"Error: slotId is required.\";\n return { extensions: await listExtensionsForSlot(slotId) };\n },\n readOnly: true,\n },\n\n \"list-extension-slots\": {\n tool: {\n description:\n \"List the extension-point slots a specific extension declares it can render in. Caller must have viewer access to the extension.\",\n parameters: {\n type: \"object\",\n properties: {\n extensionId: { type: \"string\", description: \"Extension id.\" },\n },\n required: [\"extensionId\"],\n },\n },\n run: async (args) => {\n const extensionId = String(args?.extensionId ?? \"\").trim();\n if (!extensionId) return \"Error: extensionId is required.\";\n return { slots: await listSlotsForExtension(extensionId) };\n },\n readOnly: true,\n },\n };\n}\n\nasync function summarizeExtension(\n row: ExtensionRow,\n hiddenIds: Set<string>,\n includeContent: boolean,\n) {\n const access = await resolveAccess(\"extension\", row.id).catch(() => null);\n return {\n id: row.id,\n name: row.name,\n path: extensionPath(row.id, row.name),\n description: row.description,\n icon: row.icon,\n ownerEmail: row.ownerEmail,\n visibility: row.visibility,\n role: access?.role ?? null,\n canEdit: access\n ? [\"owner\", \"admin\", \"editor\"].includes(access.role)\n : false,\n canDelete: access ? [\"owner\", \"admin\"].includes(access.role) : false,\n hidden: hiddenIds.has(row.id),\n globallyHidden: row.hiddenAt != null,\n hiddenAt: row.hiddenAt,\n hiddenBy: row.hiddenBy,\n createdAt: row.createdAt,\n updatedAt: row.updatedAt,\n ...(includeContent ? { content: row.content } : {}),\n };\n}\n\nfunction summarizeDeletedExtension(row: ExtensionRow) {\n return {\n id: row.id,\n name: row.name,\n ownerEmail: row.ownerEmail,\n visibility: row.visibility,\n };\n}\n\n/**\n * Filename prefix the composer stamps on a \"Pasted text\" attachment chip\n * (`createPastedTextFile` in `client/composer/pasted-text.ts`). The agent sees\n * these as `<attachment name=\"pasted-text-…\">` blocks, so a model hosting a\n * pasted file can reference it by that name via `contentFromAttachment`.\n */\nconst PASTED_TEXT_ATTACHMENT_PREFIX = \"pasted-text-\";\n\n/** Keyword refs that mean \"use the most recent pasted block above\". */\nconst LATEST_ATTACHMENT_KEYWORDS = new Set([\n \"latest\",\n \"last\",\n \"paste\",\n \"pasted\",\n \"pasted-text\",\n \"attachment\",\n \"above\",\n]);\n\n/** Strip the `<attachment …>\\n…\\n</attachment>` wrapper if one is present. */\nfunction unwrapAttachmentEnvelope(text: string): string {\n const match = text.match(/^<attachment\\b[^>]*>\\n([\\s\\S]*)\\n<\\/attachment>$/);\n return match ? match[1] : text;\n}\n\n/**\n * Resolve the HTML body for create/update-extension from either the inline\n * `content` argument or a `contentFromAttachment` handle pointing at a pasted /\n * uploaded text attachment on the current turn. The by-reference path lets the\n * model host a large pasted file without re-emitting it as a tool argument —\n * which frequently gets cut off mid-stream and triggers a continuation loop.\n *\n * Resolution is forgiving: an exact attachment-name match wins, then a keyword\n * (\"latest\"/\"pasted\"/…) or a near-miss name falls back to the most recent\n * pasted-text attachment (or the only text attachment).\n */\nfunction resolveExtensionContent(\n args: Record<string, string> | undefined,\n ctx: ActionRunContext | undefined,\n): { content: string } | { error: string } {\n const inline = args?.content !== undefined ? String(args.content) : undefined;\n if (inline !== undefined && inline.trim().length > 0) {\n return { content: inline };\n }\n\n const ref =\n args?.contentFromAttachment !== undefined\n ? String(args.contentFromAttachment).trim()\n : \"\";\n if (!ref) {\n return {\n error:\n \"Error: provide either content (inline Alpine.js HTML) or contentFromAttachment (the name of a pasted/attached file to host verbatim).\",\n };\n }\n\n const textAttachments = (ctx?.attachments ?? []).filter(\n (att): att is AgentChatAttachment & { text: string } =>\n typeof att.text === \"string\" && att.text.trim().length > 0,\n );\n if (textAttachments.length === 0) {\n return {\n error:\n \"Error: contentFromAttachment was set but this turn has no readable text attachment. Re-send the file as an attachment, or pass the HTML inline via content.\",\n };\n }\n\n const lower = ref.toLowerCase();\n let match = textAttachments.find(\n (att) => (att.name ?? \"\").trim().toLowerCase() === lower,\n );\n if (!match) {\n const pasted = textAttachments.filter((att) =>\n (att.name ?? \"\").startsWith(PASTED_TEXT_ATTACHMENT_PREFIX),\n );\n const pool = pasted.length > 0 ? pasted : textAttachments;\n if (\n LATEST_ATTACHMENT_KEYWORDS.has(lower) ||\n pasted.length === 1 ||\n textAttachments.length === 1\n ) {\n match = pool[pool.length - 1];\n }\n }\n\n if (!match) {\n const names = textAttachments\n .map((att) => att.name || \"(unnamed)\")\n .join(\", \");\n return {\n error: `Error: no attachment matched contentFromAttachment=\"${ref}\". Available text attachments: ${names}. Pass one of those names exactly, or \"latest\" for the most recent pasted block.`,\n };\n }\n\n const resolved = unwrapAttachmentEnvelope(match.text);\n // Fail fast instead of hosting corrupted content. The client caps an\n // outbound attachment at MAX_OUTBOUND_ATTACHMENT_CHARS (200k) and appends a\n // trailing notice ending \"...omitted from the submitted attachment.]\" (see\n // truncateOutboundAttachment in agent-chat-adapter.ts). Hosting that verbatim\n // would bake a half file + the notice into the extension body; reject it with\n // an actionable message so the user shrinks/splits the file instead.\n if (/omitted from the submitted attachment\\.\\]\\s*$/.test(resolved)) {\n return {\n error:\n \"Error: the pasted file is too large to host verbatim (it was truncated above 200,000 characters before reaching the server, so hosting it would corrupt the extension). Reduce the file or split it into smaller extensions, then try again.\",\n };\n }\n return { content: resolved };\n}\n\nfunction coerceBoolean(value: unknown): boolean {\n return value === true || value === \"true\";\n}\n\nfunction coerceLimit(value: unknown): number {\n const limit = Number(value ?? 100);\n if (!Number.isFinite(limit)) return 100;\n return Math.min(Math.max(1, Math.floor(limit)), 500);\n}\n\nfunction parsePatches(value: unknown): ExtensionLegacyPatch[] | undefined {\n if (value === undefined) return undefined;\n const parsed = typeof value === \"string\" ? JSON.parse(value) : value;\n if (!Array.isArray(parsed)) return undefined;\n if (\n parsed.some(\n (patch) =>\n !patch ||\n typeof patch.find !== \"string\" ||\n typeof patch.replace !== \"string\",\n )\n ) {\n return undefined;\n }\n return parsed;\n}\n\nfunction parseEdits(value: unknown): ExtensionContentEdit[] | undefined {\n if (value === undefined) return undefined;\n const parsed = typeof value === \"string\" ? JSON.parse(value) : value;\n if (!Array.isArray(parsed)) return undefined;\n return parsed.every(isValidContentEdit)\n ? (parsed as ExtensionContentEdit[])\n : undefined;\n}\n\nfunction isValidContentEdit(value: unknown): boolean {\n if (!value || typeof value !== \"object\") return false;\n const edit = value as Record<string, unknown>;\n const op = edit.op ?? \"replace\";\n if (typeof op !== \"string\") return false;\n\n switch (op) {\n case \"replace\":\n return typeof edit.find === \"string\" && typeof edit.replace === \"string\";\n case \"insert-before\":\n case \"insert-after\":\n return (\n typeof edit.marker === \"string\" && typeof edit.content === \"string\"\n );\n case \"replace-between\":\n return (\n typeof edit.start === \"string\" &&\n typeof edit.end === \"string\" &&\n typeof edit.content === \"string\"\n );\n case \"replace-section\":\n return (\n typeof edit.section === \"string\" && typeof edit.content === \"string\"\n );\n case \"wrap-section\":\n return (\n typeof edit.section === \"string\" &&\n typeof edit.before === \"string\" &&\n typeof edit.after === \"string\"\n );\n case \"remove-section\":\n return typeof edit.section === \"string\";\n case \"regex-replace\":\n return (\n typeof edit.pattern === \"string\" && typeof edit.replace === \"string\"\n );\n default:\n return false;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/extensions/actions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AACvE,OAAO,EACL,eAAe,EACf,eAAe,EACf,4BAA4B,EAC5B,mCAAmC,EACnC,YAAY,EACZ,0BAA0B,EAC1B,mBAAmB,EACnB,qBAAqB,EACrB,aAAa,EACb,oBAAoB,EACpB,cAAc,EACd,8BAA8B,EAC9B,eAAe,EACf,eAAe,EACf,sBAAsB,GAEvB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAM1C,MAAM,UAAU,4BAA4B;IAC1C,OAAO;QACL,iBAAiB,EAAE;YACjB,IAAI,EAAE;gBACJ,WAAW,EACT,wXAAwX;gBAC1X,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,MAAM,EA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C,OAAO,KAAK,QAAQ,CACjC,CAAC;QACJ,KAAK,iBAAiB;YACpB,OAAO,CACL,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,CACrE,CAAC;QACJ,KAAK,cAAc;YACjB,OAAO,CACL,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ;gBAChC,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ;gBAC/B,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,CAC/B,CAAC;QACJ,KAAK,gBAAgB;YACnB,OAAO,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,CAAC;QAC1C,KAAK,eAAe;YAClB,OAAO,CACL,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,CACrE,CAAC;QACJ;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC","sourcesContent":["import type { ActionEntry } from \"../agent/production-agent.js\";\nimport type { ActionRunContext } from \"../action.js\";\nimport type { AgentChatAttachment } from \"../agent/types.js\";\nimport { writeAppState } from \"../application-state/script-helpers.js\";\nimport {\n createExtension,\n deleteExtension,\n findRecentDuplicateExtension,\n getHiddenExtensionIdsForCurrentUser,\n getExtension,\n getExtensionHistoryVersion,\n globalHideExtension,\n globalUnhideExtension,\n hideExtension,\n listExtensionHistory,\n listExtensions,\n restoreExtensionHistoryVersion,\n unhideExtension,\n updateExtension,\n updateExtensionContent,\n type ExtensionRow,\n} from \"./store.js\";\nimport { resolveAccess } from \"../sharing/access.js\";\nimport {\n addExtensionSlotTarget,\n installExtensionSlot,\n uninstallExtensionSlot,\n listExtensionsForSlot,\n listSlotsForExtension,\n} from \"./slots/store.js\";\nimport { extensionPath } from \"./path.js\";\nimport type {\n ExtensionContentEdit,\n ExtensionLegacyPatch,\n} from \"./content-patch.js\";\n\nexport function createExtensionActionEntries(): Record<string, ActionEntry> {\n return {\n \"list-extensions\": {\n tool: {\n description:\n \"List extensions visible in the current user's Extensions list/sidebar. Use this for browsing or when you only know a display name. If <current-screen> or <current-url> already contains extensionId for the current extension, use get-extension or update-extension with that id directly instead of listing. Do not query the legacy tools table directly for extension management.\",\n parameters: {\n type: \"object\",\n properties: {\n search: {\n type: \"string\",\n description:\n \"Optional case-insensitive filter matched against id, name, description, and owner email. Example: Connect Zoom.\",\n },\n includeHidden: {\n type: \"boolean\",\n description:\n \"Include extensions the current user has hidden from their list. Defaults to false.\",\n },\n includeGloballyHidden: {\n type: \"boolean\",\n description:\n \"Include extensions an admin/owner has globally hidden from everyone (via global-hide-extension). Defaults to false. Use this to find ids to unhide for everyone.\",\n },\n includeContent: {\n type: \"boolean\",\n description:\n \"Include full Alpine.js content. Defaults to false to keep results concise.\",\n },\n limit: {\n type: \"number\",\n description: \"Maximum results to return. Defaults to 100.\",\n },\n },\n },\n },\n run: async (args) => {\n const includeHidden = coerceBoolean(args?.includeHidden);\n const includeGloballyHidden = coerceBoolean(\n args?.includeGloballyHidden,\n );\n const includeContent = coerceBoolean(args?.includeContent);\n const search = String(args?.search ?? \"\")\n .trim()\n .toLowerCase();\n const limit = coerceLimit(args?.limit);\n const hiddenIds = await getHiddenExtensionIdsForCurrentUser();\n\n let rows = await listExtensions({\n includeHidden,\n includeGloballyHidden,\n });\n if (search) {\n rows = rows.filter((row) =>\n [row.id, row.name, row.description, row.ownerEmail]\n .join(\"\\n\")\n .toLowerCase()\n .includes(search),\n );\n }\n\n rows = rows.slice(0, limit);\n const extensions = await Promise.all(\n rows.map((row) => summarizeExtension(row, hiddenIds, includeContent)),\n );\n return {\n ok: true,\n count: extensions.length,\n extensions,\n };\n },\n readOnly: true,\n },\n\n \"get-extension\": {\n tool: {\n description:\n \"Get one existing extension by id. Use this when <current-screen> or <current-url> contains extensionId for the current extension; do not call list-extensions just to rediscover that id. Defaults to including the full Alpine.js content so you can make a targeted update-extension edit.\",\n parameters: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n description:\n \"Extension id to read. Prefer the extensionId from <current-screen> or <current-url> when the user refers to the current extension.\",\n },\n includeContent: {\n type: \"boolean\",\n description:\n \"Include full Alpine.js content. Defaults to true for targeted edits.\",\n },\n },\n required: [\"id\"],\n },\n },\n run: async (args) => {\n const id = String(args?.id ?? \"\").trim();\n if (!id) return \"Error: id is required.\";\n const includeContent =\n args?.includeContent === undefined\n ? true\n : coerceBoolean(args.includeContent);\n const extension = await getExtension(id);\n if (!extension) return `Error: extension not found: ${id}`;\n const hiddenIds = await getHiddenExtensionIdsForCurrentUser();\n return {\n ok: true,\n extension: await summarizeExtension(\n extension,\n hiddenIds,\n includeContent,\n ),\n };\n },\n readOnly: true,\n },\n\n \"list-extension-history\": {\n tool: {\n description:\n \"List saved history snapshots for one extension. Use this when the user asks what changed, wants a changelog, or wants to pick an older version to restore. If the user is viewing the extension, use the extensionId from <current-screen> or <current-url>.\",\n parameters: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n description: \"Extension id whose history should be listed.\",\n },\n limit: {\n type: \"number\",\n description: \"Maximum versions to return. Defaults to 50.\",\n },\n includeContent: {\n type: \"boolean\",\n description:\n \"Include full HTML content for each version. Defaults to false.\",\n },\n },\n required: [\"id\"],\n },\n },\n run: async (args) => {\n const id = String(args?.id ?? \"\").trim();\n if (!id) return \"Error: id is required.\";\n const history = await listExtensionHistory(id, {\n limit:\n args?.limit === undefined ? undefined : coerceLimit(args.limit),\n includeContent: coerceBoolean(args?.includeContent),\n });\n return {\n ok: true,\n count: history.length,\n history,\n };\n },\n readOnly: true,\n },\n\n \"get-extension-history-version\": {\n tool: {\n description:\n \"Get one extension history version with its previous-version diff. Use after list-extension-history when the user wants to inspect exactly what changed.\",\n parameters: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n description: \"Extension id whose history version should be read.\",\n },\n version: {\n type: \"number\",\n description: \"History version number to inspect.\",\n },\n },\n required: [\"id\", \"version\"],\n },\n },\n run: async (args) => {\n const id = String(args?.id ?? \"\").trim();\n if (!id) return \"Error: id is required.\";\n const version = Number(args?.version);\n if (!Number.isInteger(version) || version < 1) {\n return \"Error: version must be a positive integer.\";\n }\n const detail = await getExtensionHistoryVersion(id, version);\n if (!detail) {\n return `Error: extension history version not found: ${id}#${version}`;\n }\n return { ok: true, ...detail };\n },\n readOnly: true,\n },\n\n \"create-extension\": {\n tool: {\n description:\n 'Create a sandboxed Alpine.js mini-app extension. Use this when the user asks to create, build, or make an extension/widget/dashboard/calculator. Call this action exactly once per requested extension. The content must be a self-contained Alpine.js HTML body snippet that can use appAction(), appFetch(), dbQuery(), dbExec(), extensionFetch(), and extensionData. IMPORTANT — hosting a pasted file: if the user pasted a large HTML/Alpine file (it appears in your context as an <attachment name=\"pasted-text-…\"> block) and asked you to host it as-is, do NOT copy that file into `content`. Instead leave `content` empty and pass `contentFromAttachment` set to that attachment\\'s name (or the literal \"latest\" for the most recent pasted block) — the server reads the file verbatim. Re-emitting a large pasted file as `content` regularly gets cut off mid-stream and stalls the turn. Prefer appAction(name, params) for app data and actions, including read actions mounted as GET; do not call template /api/* routes from appFetch because the extension bridge only allows framework /_agent-native/* paths. Parse JSON string action results before aggregating; use dbQuery()/dbExec() only for known existing SQL tables. Keep the initial create-extension payload compact and working; for complex extensions, create a useful v1 first, then use focused update-extension edits for refinements rather than assembling one enormous tool input. For any non-trivial component (more than a couple of state fields, any methods, any string formatting, any branching) put the component in a <script> block via Alpine.data(\\'name\\', () => ({...})) and reference it with x-data=\"name\" — do NOT cram methods, template literals, or branching logic into an inline x-data=\"{...}\" attribute (HTML parser pitfalls cause ReferenceError failures). Define every variable referenced from x-text/x-show/x-if/x-for on the data object\\'s initial state. If the extension\\'s value depends on an LLM call, require a real key via \\\\${keys.OPENAI_API_KEY}/\\\\${keys.ANTHROPIC_API_KEY} (and tell the user to add it in the Dispatch Vault, or in app Settings → API Keys & Connections for standalone apps, if missing) or route the AI work to the agent chat — never ship a stubbed analysis step that renders a placeholder/boolean as the result.',\n parameters: {\n type: \"object\",\n properties: {\n name: {\n type: \"string\",\n description:\n 'Short display name for the extension. Do not include \"app\" — e.g. name a todo app \"Todos\", a weather app \"Weather\".',\n },\n description: {\n type: \"string\",\n description: \"One-sentence summary of what the extension does.\",\n },\n content: {\n type: \"string\",\n description:\n \"Self-contained Alpine.js HTML body snippet. The iframe canvas already has modest default padding, so avoid duplicate outer padding unless the design needs it. Use semantic Tailwind colors (bg-background, text-foreground, bg-primary, etc.) for native theming. Do not include a full app build, React code, or source files. Required UNLESS you pass contentFromAttachment instead.\",\n },\n contentFromAttachment: {\n type: \"string\",\n description:\n 'Host a pasted/attached file verbatim WITHOUT re-typing it. Set this to the name of an attachment on the current turn (e.g. \"pasted-text-1718000000000-ab12cd.txt\") or the literal \"latest\" for the most recent pasted block; the server resolves it into the extension content. Use this instead of `content` whenever the user pasted a large file to host — it avoids re-emitting thousands of tokens. When set, leave `content` empty.',\n },\n icon: {\n type: \"string\",\n description: \"Optional icon name or short label.\",\n },\n },\n required: [\"name\"],\n },\n },\n run: async (args, ctx) => {\n const name = String(args?.name ?? \"\").trim();\n if (!name) return \"Error: name is required.\";\n const resolved = resolveExtensionContent(args, ctx);\n if (\"error\" in resolved) return resolved.error;\n const content = resolved.content.trim();\n if (!content) return \"Error: content is required.\";\n const description = String(args?.description ?? \"\").trim();\n const icon = args?.icon ? String(args.icon) : undefined;\n\n // Idempotency: if an identical extension was created in the last 5\n // minutes (e.g. a connection drop caused the agent to retry this tool\n // call), return the existing one instead of creating a duplicate.\n // Keyed on the FULL create inputs (name + content + description + icon),\n // so two creates that differ in ANY of them are treated as distinct\n // rather than silently collapsed — only a byte-identical re-create (the\n // retry case) recovers the existing row.\n const existing = await findRecentDuplicateExtension({\n name,\n content,\n description,\n icon,\n });\n if (existing) {\n const existingPath = extensionPath(existing.id, existing.name);\n try {\n await writeAppState(\"navigate\", {\n view: \"extensions\",\n extensionId: existing.id,\n path: existingPath,\n _writeId: `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,\n });\n } catch {\n // Non-fatal — agent can still mention the path in its reply.\n }\n return {\n ok: true,\n extension: { ...existing, path: existingPath },\n path: existingPath,\n next: `Extension was already created in this session (recovered from a connection retry). The user is being navigated to it — no further navigation tool calls needed.`,\n };\n }\n\n const extension = await createExtension({\n name,\n description,\n content,\n icon,\n });\n const path = extensionPath(extension.id, extension.name);\n\n // Auto-navigate so the user lands on the new extension instead of\n // having to read the JSON response and click a link. Writes a\n // one-shot `navigate` app-state command the UI consumes and clears.\n try {\n await writeAppState(\"navigate\", {\n view: \"extensions\",\n extensionId: extension.id,\n path,\n // Unique-per-write token so the UI's `use-navigation-state` hook\n // can dedup race-driven re-reads of the same command.\n _writeId: `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,\n });\n } catch {\n // Non-fatal — agent can still mention the path in its reply.\n }\n\n return {\n ok: true,\n extension: { ...extension, path },\n path,\n next: `Created. The user is being navigated to the new extension automatically — no further navigation tool calls needed.`,\n };\n },\n },\n\n \"update-extension\": {\n tool: {\n description:\n 'Update an existing sandboxed Alpine.js mini-app extension. If the user is viewing the extension, use the extensionId from <current-screen> or <current-url> directly; do not list extensions first just to find the current id. Prefer granular edits for surgical changes; use full content replacement only for broad rewrites. Supported edits include literal replace, insert-before/after marker, replace-between markers, replace-section/wrap-section/remove-section for <!-- agent-native:section name --> blocks, and regex-replace. Pass format=true to run Prettier on the final HTML. To replace the whole body with a large pasted file, pass contentFromAttachment (the attachment name, or \"latest\") instead of copying the file into `content` — that avoids re-emitting thousands of tokens.',\n parameters: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n description:\n \"Extension id to update. Prefer the extensionId from <current-screen> or <current-url> for the current extension.\",\n },\n name: {\n type: \"string\",\n description: \"Optional new display name.\",\n },\n description: {\n type: \"string\",\n description: \"Optional new description.\",\n },\n content: {\n type: \"string\",\n description:\n \"Optional full replacement Alpine.js HTML body snippet.\",\n },\n contentFromAttachment: {\n type: \"string\",\n description:\n 'Optional full replacement sourced from a pasted/attached file on the current turn, by attachment name (or the literal \"latest\" for the most recent pasted block). Use instead of `content` when replacing the whole body with a large pasted file so you do not have to re-type it. Ignored when `content` is provided.',\n },\n patches: {\n type: \"string\",\n description:\n 'Legacy optional JSON array of { \"find\": \"...\", \"replace\": \"...\", \"all\"?: true, \"expectedMatches\"?: 1, \"required\"?: true } patches. Missing required targets fail instead of silently no-oping.',\n },\n edits: {\n type: \"string\",\n description:\n 'Preferred optional JSON array of granular edit operations. Examples: { \"op\": \"insert-after\", \"marker\": \"<!-- section:metrics -->\", \"content\": \"...\" }, { \"op\": \"replace-section\", \"section\": \"npm-chart\", \"content\": \"...\" }, { \"op\": \"wrap-section\", \"section\": \"charts\", \"before\": \"<div>\", \"after\": \"</div>\" }, { \"op\": \"regex-replace\", \"pattern\": \"...\", \"replace\": \"...\", \"expectedMatches\": 1 }.',\n },\n format: {\n type: \"boolean\",\n description:\n \"When true, format the final extension HTML with Prettier after applying content, patches, and edits.\",\n },\n icon: {\n type: \"string\",\n description: \"Optional icon name or short label.\",\n },\n visibility: {\n type: \"string\",\n description: \"Optional sharing visibility.\",\n enum: [\"private\", \"org\", \"public\"],\n },\n },\n required: [\"id\"],\n },\n },\n run: async (args, ctx) => {\n const id = String(args?.id ?? \"\").trim();\n if (!id) return \"Error: id is required.\";\n\n // Full-replacement content can come inline (`content`) or by reference\n // (`contentFromAttachment`) so the model never has to re-type a large\n // pasted file. Inline wins only when NON-EMPTY — the docstring tells\n // callers to leave `content` empty when using `contentFromAttachment`,\n // so an empty/blank `content` must fall through to the attachment\n // instead of blanking the extension (mirrors resolveExtensionContent).\n let replacementContent =\n typeof args?.content === \"string\" && args.content.trim().length > 0\n ? args.content\n : undefined;\n if (\n replacementContent === undefined &&\n args?.contentFromAttachment !== undefined\n ) {\n const resolved = resolveExtensionContent(args, ctx);\n if (\"error\" in resolved) return resolved.error;\n replacementContent = resolved.content;\n }\n\n let result = null;\n const hasContentUpdate =\n replacementContent !== undefined ||\n args?.patches !== undefined ||\n args?.edits !== undefined ||\n args?.format !== undefined;\n if (hasContentUpdate) {\n const patches = parsePatches((args as any).patches);\n if (args?.patches !== undefined && !patches) {\n return \"Error: patches must be a JSON array of { find, replace } objects.\";\n }\n const edits = parseEdits((args as any).edits);\n if (args?.edits !== undefined && !edits) {\n return \"Error: edits must be a JSON array of supported extension edit operations.\";\n }\n result = await updateExtensionContent(id, {\n content: replacementContent,\n patches,\n edits,\n format: coerceBoolean(args?.format),\n });\n }\n\n const meta: Record<string, string> = {};\n if (args?.name !== undefined) meta.name = String(args.name).trim();\n if (args?.description !== undefined) {\n meta.description = String(args.description).trim();\n }\n if (args?.icon !== undefined) meta.icon = String(args.icon);\n if (args?.visibility !== undefined) {\n meta.visibility = String(args.visibility);\n }\n if (Object.keys(meta).length > 0) {\n result = await updateExtension(id, meta as any);\n }\n\n if (!result) result = await getExtension(id);\n if (!result) return `Error: extension not found: ${id}`;\n const hiddenIds = await getHiddenExtensionIdsForCurrentUser();\n return {\n ok: true,\n extension: await summarizeExtension(result, hiddenIds, false),\n };\n },\n },\n\n \"delete-extension\": {\n tool: {\n description:\n \"Permanently delete an extension everywhere it is shared. Requires owner/admin access. If the user only wants a shared extension removed from their own sidebar/list, use hide-extension instead.\",\n parameters: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n description:\n \"Extension id to permanently delete. Use list-extensions first if you only know the display name.\",\n },\n },\n required: [\"id\"],\n },\n },\n run: async (args) => {\n const id = String(args?.id ?? \"\").trim();\n if (!id) return \"Error: id is required.\";\n const extension = await getExtension(id);\n if (!extension) return `Error: extension not found: ${id}`;\n\n try {\n const ok = await deleteExtension(id);\n if (!ok) return `Error: extension not found: ${id}`;\n return { ok: true, deleted: summarizeDeletedExtension(extension) };\n } catch (err: any) {\n return {\n ok: false,\n error: err?.message ?? String(err),\n next: \"If the user wants this gone only from their own view, call hide-extension with the same id.\",\n };\n }\n },\n },\n\n \"restore-extension-history-version\": {\n tool: {\n description:\n \"Restore an extension's name, description, icon, and HTML content from a saved history version. Requires editor access. This does not restore sharing visibility or ownership.\",\n parameters: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n description: \"Extension id to restore.\",\n },\n version: {\n type: \"number\",\n description:\n \"Saved history version number to restore. Use list-extension-history first if unsure.\",\n },\n },\n required: [\"id\", \"version\"],\n },\n },\n run: async (args) => {\n const id = String(args?.id ?? \"\").trim();\n if (!id) return \"Error: id is required.\";\n const version = Number(args?.version);\n if (!Number.isInteger(version) || version < 1) {\n return \"Error: version must be a positive integer.\";\n }\n const result = await restoreExtensionHistoryVersion(id, version);\n if (!result) {\n return `Error: extension history version not found: ${id}#${version}`;\n }\n const hiddenIds = await getHiddenExtensionIdsForCurrentUser();\n return {\n ok: true,\n restoredVersion: version,\n extension: await summarizeExtension(result, hiddenIds, false),\n };\n },\n },\n\n \"hide-extension\": {\n tool: {\n description:\n \"Hide an accessible extension from the current user's Extensions list/sidebar without deleting it for anyone else. Use this when the user says to remove a shared extension from their view, or when delete-extension reports that the current user is not owner/admin.\",\n parameters: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n description:\n \"Extension id to hide for the current user. Use list-extensions first if you only know the display name.\",\n },\n },\n required: [\"id\"],\n },\n },\n run: async (args) => {\n const id = String(args?.id ?? \"\").trim();\n if (!id) return \"Error: id is required.\";\n const extension = await getExtension(id);\n if (!extension) return `Error: extension not found: ${id}`;\n\n await hideExtension(id);\n return { ok: true, hidden: summarizeDeletedExtension(extension) };\n },\n },\n\n \"unhide-extension\": {\n tool: {\n description:\n \"Restore an extension the current user previously hid so it appears in their Extensions list/sidebar again. Use list-extensions with includeHidden=true to find hidden ids.\",\n parameters: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n description: \"Extension id to restore for the current user.\",\n },\n },\n required: [\"id\"],\n },\n },\n run: async (args) => {\n const id = String(args?.id ?? \"\").trim();\n if (!id) return \"Error: id is required.\";\n await unhideExtension(id);\n return { ok: true, id };\n },\n },\n\n \"global-hide-extension\": {\n tool: {\n description:\n \"Globally hide an extension from EVERYONE's Extensions list/sidebar (not just the current user) by stamping it hidden. Requires owner/admin access. Use this for an admin takedown of a shared/org extension. The extension is not deleted and stays accessible by id; use global-unhide-extension to reverse. For removing an extension only from your own view, use hide-extension instead.\",\n parameters: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n description:\n \"Extension id to hide for everyone. Use list-extensions first if you only know the display name.\",\n },\n },\n required: [\"id\"],\n },\n },\n run: async (args) => {\n const id = String(args?.id ?? \"\").trim();\n if (!id) return \"Error: id is required.\";\n const extension = await getExtension(id);\n if (!extension) return `Error: extension not found: ${id}`;\n\n await globalHideExtension(id);\n return {\n ok: true,\n globallyHidden: summarizeDeletedExtension(extension),\n };\n },\n },\n\n \"global-unhide-extension\": {\n tool: {\n description:\n \"Reverse a global hide so the extension reappears in everyone's Extensions list/sidebar again. Requires owner/admin access. Use list-extensions with includeGloballyHidden=true to find globally-hidden ids.\",\n parameters: {\n type: \"object\",\n properties: {\n id: {\n type: \"string\",\n description: \"Extension id to unhide for everyone.\",\n },\n },\n required: [\"id\"],\n },\n },\n run: async (args) => {\n const id = String(args?.id ?? \"\").trim();\n if (!id) return \"Error: id is required.\";\n await globalUnhideExtension(id);\n return { ok: true, id };\n },\n },\n\n \"add-extension-slot-target\": {\n tool: {\n description:\n 'Declare that an extension can render in a UI extension-point slot of an app (e.g. \"mail.contact-sidebar.bottom\"). Apps drop ExtensionSlot components in their UI; this action registers an extension as installable into one of those slots. Slot IDs follow the convention <app>.<area>.<position>. Caller must have editor access to the extension.',\n parameters: {\n type: \"object\",\n properties: {\n extensionId: { type: \"string\", description: \"Extension id.\" },\n slotId: {\n type: \"string\",\n description:\n 'Slot identifier — e.g. \"mail.contact-sidebar.bottom\".',\n },\n config: {\n type: \"string\",\n description:\n \"Optional JSON string with slot-specific config (defaults, hints, etc.).\",\n },\n },\n required: [\"extensionId\", \"slotId\"],\n },\n },\n run: async (args) => {\n const extensionId = String(args?.extensionId ?? \"\").trim();\n const slotId = String(args?.slotId ?? \"\").trim();\n if (!extensionId) return \"Error: extensionId is required.\";\n if (!slotId) return \"Error: slotId is required.\";\n const row = await addExtensionSlotTarget(\n extensionId,\n slotId,\n args?.config ? String(args.config) : undefined,\n );\n return { ok: true, slot: row };\n },\n },\n\n \"install-extension\": {\n tool: {\n description:\n \"Install an extension as a widget in an extension-point slot for the current user. The extension must already declare the slot via add-extension-slot-target. Per-user installation — only affects the calling user's view. Use after creating an extension that targets a slot, or when the user asks to add an existing widget to a slot.\",\n parameters: {\n type: \"object\",\n properties: {\n extensionId: {\n type: \"string\",\n description: \"Extension id to install.\",\n },\n slotId: {\n type: \"string\",\n description:\n 'Slot identifier — e.g. \"mail.contact-sidebar.bottom\".',\n },\n position: {\n type: \"number\",\n description:\n \"Optional integer position within the slot (lower = earlier). Defaults to end.\",\n },\n config: {\n type: \"string\",\n description:\n \"Optional JSON string with per-install config (overrides, settings).\",\n },\n },\n required: [\"extensionId\", \"slotId\"],\n },\n },\n run: async (args) => {\n const extensionId = String(args?.extensionId ?? \"\").trim();\n const slotId = String(args?.slotId ?? \"\").trim();\n if (!extensionId) return \"Error: extensionId is required.\";\n if (!slotId) return \"Error: slotId is required.\";\n const position =\n args?.position !== undefined && args.position !== null\n ? Number(args.position)\n : undefined;\n const row = await installExtensionSlot(extensionId, slotId, {\n position: Number.isFinite(position as number) ? position : undefined,\n config: args?.config ? String(args.config) : undefined,\n });\n return { ok: true, install: row };\n },\n },\n\n \"uninstall-extension\": {\n tool: {\n description:\n \"Remove an extension from an extension-point slot for the current user. Does not delete the extension itself.\",\n parameters: {\n type: \"object\",\n properties: {\n extensionId: { type: \"string\", description: \"Extension id.\" },\n slotId: { type: \"string\", description: \"Slot identifier.\" },\n },\n required: [\"extensionId\", \"slotId\"],\n },\n },\n run: async (args) => {\n const extensionId = String(args?.extensionId ?? \"\").trim();\n const slotId = String(args?.slotId ?? \"\").trim();\n if (!extensionId) return \"Error: extensionId is required.\";\n if (!slotId) return \"Error: slotId is required.\";\n await uninstallExtensionSlot(extensionId, slotId);\n return { ok: true };\n },\n },\n\n \"list-extensions-for-slot\": {\n tool: {\n description:\n \"List extensions the current user has access to that declare a given extension-point slot. Use to discover what's available to install into a slot the user mentioned.\",\n parameters: {\n type: \"object\",\n properties: {\n slotId: { type: \"string\", description: \"Slot identifier.\" },\n },\n required: [\"slotId\"],\n },\n },\n run: async (args) => {\n const slotId = String(args?.slotId ?? \"\").trim();\n if (!slotId) return \"Error: slotId is required.\";\n return { extensions: await listExtensionsForSlot(slotId) };\n },\n readOnly: true,\n },\n\n \"list-extension-slots\": {\n tool: {\n description:\n \"List the extension-point slots a specific extension declares it can render in. Caller must have viewer access to the extension.\",\n parameters: {\n type: \"object\",\n properties: {\n extensionId: { type: \"string\", description: \"Extension id.\" },\n },\n required: [\"extensionId\"],\n },\n },\n run: async (args) => {\n const extensionId = String(args?.extensionId ?? \"\").trim();\n if (!extensionId) return \"Error: extensionId is required.\";\n return { slots: await listSlotsForExtension(extensionId) };\n },\n readOnly: true,\n },\n };\n}\n\nasync function summarizeExtension(\n row: ExtensionRow,\n hiddenIds: Set<string>,\n includeContent: boolean,\n) {\n const access = await resolveAccess(\"extension\", row.id).catch(() => null);\n return {\n id: row.id,\n name: row.name,\n path: extensionPath(row.id, row.name),\n description: row.description,\n icon: row.icon,\n ownerEmail: row.ownerEmail,\n visibility: row.visibility,\n role: access?.role ?? null,\n canEdit: access\n ? [\"owner\", \"admin\", \"editor\"].includes(access.role)\n : false,\n canDelete: access ? [\"owner\", \"admin\"].includes(access.role) : false,\n hidden: hiddenIds.has(row.id),\n globallyHidden: row.hiddenAt != null,\n hiddenAt: row.hiddenAt,\n hiddenBy: row.hiddenBy,\n createdAt: row.createdAt,\n updatedAt: row.updatedAt,\n ...(includeContent ? { content: row.content } : {}),\n };\n}\n\nfunction summarizeDeletedExtension(row: ExtensionRow) {\n return {\n id: row.id,\n name: row.name,\n ownerEmail: row.ownerEmail,\n visibility: row.visibility,\n };\n}\n\n/**\n * Filename prefix the composer stamps on a \"Pasted text\" attachment chip\n * (`createPastedTextFile` in `client/composer/pasted-text.ts`). The agent sees\n * these as `<attachment name=\"pasted-text-…\">` blocks, so a model hosting a\n * pasted file can reference it by that name via `contentFromAttachment`.\n */\nconst PASTED_TEXT_ATTACHMENT_PREFIX = \"pasted-text-\";\n\n/** Keyword refs that mean \"use the most recent pasted block above\". */\nconst LATEST_ATTACHMENT_KEYWORDS = new Set([\n \"latest\",\n \"last\",\n \"paste\",\n \"pasted\",\n \"pasted-text\",\n \"attachment\",\n \"above\",\n]);\n\n/** Strip the `<attachment …>\\n…\\n</attachment>` wrapper if one is present. */\nfunction unwrapAttachmentEnvelope(text: string): string {\n const match = text.match(/^<attachment\\b[^>]*>\\n([\\s\\S]*)\\n<\\/attachment>$/);\n return match ? match[1] : text;\n}\n\n/**\n * Resolve the HTML body for create/update-extension from either the inline\n * `content` argument or a `contentFromAttachment` handle pointing at a pasted /\n * uploaded text attachment on the current turn. The by-reference path lets the\n * model host a large pasted file without re-emitting it as a tool argument —\n * which frequently gets cut off mid-stream and triggers a continuation loop.\n *\n * Resolution is forgiving: an exact attachment-name match wins, then a keyword\n * (\"latest\"/\"pasted\"/…) or a near-miss name falls back to the most recent\n * pasted-text attachment (or the only text attachment).\n */\nfunction resolveExtensionContent(\n args: Record<string, string> | undefined,\n ctx: ActionRunContext | undefined,\n): { content: string } | { error: string } {\n const inline = args?.content !== undefined ? String(args.content) : undefined;\n if (inline !== undefined && inline.trim().length > 0) {\n return { content: inline };\n }\n\n const ref =\n args?.contentFromAttachment !== undefined\n ? String(args.contentFromAttachment).trim()\n : \"\";\n if (!ref) {\n return {\n error:\n \"Error: provide either content (inline Alpine.js HTML) or contentFromAttachment (the name of a pasted/attached file to host verbatim).\",\n };\n }\n\n const textAttachments = (ctx?.attachments ?? []).filter(\n (att): att is AgentChatAttachment & { text: string } =>\n typeof att.text === \"string\" && att.text.trim().length > 0,\n );\n if (textAttachments.length === 0) {\n return {\n error:\n \"Error: contentFromAttachment was set but this turn has no readable text attachment. Re-send the file as an attachment, or pass the HTML inline via content.\",\n };\n }\n\n const lower = ref.toLowerCase();\n let match = textAttachments.find(\n (att) => (att.name ?? \"\").trim().toLowerCase() === lower,\n );\n if (!match) {\n const pasted = textAttachments.filter((att) =>\n (att.name ?? \"\").startsWith(PASTED_TEXT_ATTACHMENT_PREFIX),\n );\n const pool = pasted.length > 0 ? pasted : textAttachments;\n if (\n LATEST_ATTACHMENT_KEYWORDS.has(lower) ||\n pasted.length === 1 ||\n textAttachments.length === 1\n ) {\n match = pool[pool.length - 1];\n }\n }\n\n if (!match) {\n const names = textAttachments\n .map((att) => att.name || \"(unnamed)\")\n .join(\", \");\n return {\n error: `Error: no attachment matched contentFromAttachment=\"${ref}\". Available text attachments: ${names}. Pass one of those names exactly, or \"latest\" for the most recent pasted block.`,\n };\n }\n\n const resolved = unwrapAttachmentEnvelope(match.text);\n // Fail fast instead of hosting corrupted content. The client caps an\n // outbound attachment at MAX_OUTBOUND_ATTACHMENT_CHARS (200k) and appends a\n // trailing notice ending \"...omitted from the submitted attachment.]\" (see\n // truncateOutboundAttachment in agent-chat-adapter.ts). Hosting that verbatim\n // would bake a half file + the notice into the extension body; reject it with\n // an actionable message so the user shrinks/splits the file instead.\n if (/omitted from the submitted attachment\\.\\]\\s*$/.test(resolved)) {\n return {\n error:\n \"Error: the pasted file is too large to host verbatim (it was truncated above 200,000 characters before reaching the server, so hosting it would corrupt the extension). Reduce the file or split it into smaller extensions, then try again.\",\n };\n }\n return { content: resolved };\n}\n\nfunction coerceBoolean(value: unknown): boolean {\n return value === true || value === \"true\";\n}\n\nfunction coerceLimit(value: unknown): number {\n const limit = Number(value ?? 100);\n if (!Number.isFinite(limit)) return 100;\n return Math.min(Math.max(1, Math.floor(limit)), 500);\n}\n\nfunction parsePatches(value: unknown): ExtensionLegacyPatch[] | undefined {\n if (value === undefined) return undefined;\n const parsed = typeof value === \"string\" ? JSON.parse(value) : value;\n if (!Array.isArray(parsed)) return undefined;\n if (\n parsed.some(\n (patch) =>\n !patch ||\n typeof patch.find !== \"string\" ||\n typeof patch.replace !== \"string\",\n )\n ) {\n return undefined;\n }\n return parsed;\n}\n\nfunction parseEdits(value: unknown): ExtensionContentEdit[] | undefined {\n if (value === undefined) return undefined;\n const parsed = typeof value === \"string\" ? JSON.parse(value) : value;\n if (!Array.isArray(parsed)) return undefined;\n return parsed.every(isValidContentEdit)\n ? (parsed as ExtensionContentEdit[])\n : undefined;\n}\n\nfunction isValidContentEdit(value: unknown): boolean {\n if (!value || typeof value !== \"object\") return false;\n const edit = value as Record<string, unknown>;\n const op = edit.op ?? \"replace\";\n if (typeof op !== \"string\") return false;\n\n switch (op) {\n case \"replace\":\n return typeof edit.find === \"string\" && typeof edit.replace === \"string\";\n case \"insert-before\":\n case \"insert-after\":\n return (\n typeof edit.marker === \"string\" && typeof edit.content === \"string\"\n );\n case \"replace-between\":\n return (\n typeof edit.start === \"string\" &&\n typeof edit.end === \"string\" &&\n typeof edit.content === \"string\"\n );\n case \"replace-section\":\n return (\n typeof edit.section === \"string\" && typeof edit.content === \"string\"\n );\n case \"wrap-section\":\n return (\n typeof edit.section === \"string\" &&\n typeof edit.before === \"string\" &&\n typeof edit.after === \"string\"\n );\n case \"remove-section\":\n return typeof edit.section === \"string\";\n case \"regex-replace\":\n return (\n typeof edit.pattern === \"string\" && typeof edit.replace === \"string\"\n );\n default:\n return false;\n }\n}\n"]}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
export type AgentNativeDataMode = "database" | "local-files";
|
|
2
|
+
export interface AgentNativeManifestRoot {
|
|
3
|
+
name?: string;
|
|
4
|
+
path: string;
|
|
5
|
+
kind?: string;
|
|
6
|
+
extensions?: string[];
|
|
7
|
+
include?: string[];
|
|
8
|
+
hide?: string[];
|
|
9
|
+
}
|
|
10
|
+
export interface AgentNativeManifestApp {
|
|
11
|
+
mode?: AgentNativeDataMode;
|
|
12
|
+
roots?: AgentNativeManifestRoot[];
|
|
13
|
+
components?: string | string[];
|
|
14
|
+
hide?: string[];
|
|
15
|
+
}
|
|
16
|
+
export interface AgentNativeManifest {
|
|
17
|
+
version?: number;
|
|
18
|
+
mode?: AgentNativeDataMode;
|
|
19
|
+
apps?: Record<string, AgentNativeManifestApp>;
|
|
20
|
+
}
|
|
21
|
+
export interface LoadedAgentNativeManifest {
|
|
22
|
+
path: string;
|
|
23
|
+
rootDir: string;
|
|
24
|
+
manifest: AgentNativeManifest;
|
|
25
|
+
}
|
|
26
|
+
export interface LocalArtifactAppDefaults {
|
|
27
|
+
mode?: AgentNativeDataMode;
|
|
28
|
+
roots: AgentNativeManifestRoot[];
|
|
29
|
+
hide?: string[];
|
|
30
|
+
components?: string | string[];
|
|
31
|
+
}
|
|
32
|
+
export interface LoadAgentNativeManifestOptions {
|
|
33
|
+
cwd?: string;
|
|
34
|
+
manifestPath?: string;
|
|
35
|
+
optional?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface ResolveAgentNativeModeOptions extends LoadAgentNativeManifestOptions {
|
|
38
|
+
appId?: string;
|
|
39
|
+
defaults?: Pick<LocalArtifactAppDefaults, "mode">;
|
|
40
|
+
}
|
|
41
|
+
export interface LocalArtifactOptions extends LoadAgentNativeManifestOptions {
|
|
42
|
+
appId: string;
|
|
43
|
+
defaults?: LocalArtifactAppDefaults;
|
|
44
|
+
}
|
|
45
|
+
export interface LoadedLocalArtifactRoot {
|
|
46
|
+
name: string;
|
|
47
|
+
path: string;
|
|
48
|
+
absolutePath: string;
|
|
49
|
+
kind?: string;
|
|
50
|
+
extensions: string[];
|
|
51
|
+
hide: string[];
|
|
52
|
+
include: string[];
|
|
53
|
+
}
|
|
54
|
+
export interface LoadedLocalArtifactApp {
|
|
55
|
+
appId: string;
|
|
56
|
+
mode: AgentNativeDataMode;
|
|
57
|
+
manifestPath: string | null;
|
|
58
|
+
workspaceRoot: string;
|
|
59
|
+
roots: LoadedLocalArtifactRoot[];
|
|
60
|
+
components: string[];
|
|
61
|
+
hide: string[];
|
|
62
|
+
}
|
|
63
|
+
export interface LocalArtifactFileMeta {
|
|
64
|
+
path: string;
|
|
65
|
+
rootName: string;
|
|
66
|
+
rootPath: string;
|
|
67
|
+
kind?: string;
|
|
68
|
+
extension: string;
|
|
69
|
+
contentType: string;
|
|
70
|
+
sizeBytes: number;
|
|
71
|
+
hash: string;
|
|
72
|
+
createdAt: string;
|
|
73
|
+
updatedAt: string;
|
|
74
|
+
mtimeMs: number;
|
|
75
|
+
}
|
|
76
|
+
export interface LocalArtifactFile extends LocalArtifactFileMeta {
|
|
77
|
+
content: string;
|
|
78
|
+
}
|
|
79
|
+
export interface WriteLocalArtifactFileOptions extends LocalArtifactOptions {
|
|
80
|
+
content: string;
|
|
81
|
+
expectedHash?: string | null;
|
|
82
|
+
ifNotExists?: boolean;
|
|
83
|
+
}
|
|
84
|
+
export declare function findAgentNativeManifest(startDir?: string): string | null;
|
|
85
|
+
export declare function loadAgentNativeManifest(options?: LoadAgentNativeManifestOptions): Promise<LoadedAgentNativeManifest | null>;
|
|
86
|
+
export declare function resolveAgentNativeDataMode(options?: ResolveAgentNativeModeOptions): Promise<AgentNativeDataMode>;
|
|
87
|
+
export declare function isAgentNativeLocalFileMode(options?: ResolveAgentNativeModeOptions): Promise<boolean>;
|
|
88
|
+
export declare function getLocalArtifactApp(options: LocalArtifactOptions): Promise<LoadedLocalArtifactApp>;
|
|
89
|
+
export declare function listLocalArtifactFiles(options: LocalArtifactOptions): Promise<LocalArtifactFileMeta[]>;
|
|
90
|
+
export declare function readLocalArtifactFile(options: LocalArtifactOptions & {
|
|
91
|
+
path: string;
|
|
92
|
+
}): Promise<LocalArtifactFile | null>;
|
|
93
|
+
export declare function writeLocalArtifactFile(options: WriteLocalArtifactFileOptions & {
|
|
94
|
+
path: string;
|
|
95
|
+
}): Promise<LocalArtifactFileMeta>;
|
|
96
|
+
export declare function deleteLocalArtifactFile(options: LocalArtifactOptions & {
|
|
97
|
+
path: string;
|
|
98
|
+
}): Promise<boolean>;
|
|
99
|
+
export declare function ensureLocalArtifactRoot(options: LocalArtifactOptions): Promise<LoadedLocalArtifactRoot>;
|
|
100
|
+
export declare function createTempWorkspaceDir(prefix?: string): string;
|
|
101
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/local-artifacts/index.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,aAAa,CAAC;AAE7D,MAAM,WAAW,uBAAuB;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,KAAK,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC/B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;CAC/C;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,mBAAmB,CAAC;CAC/B;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,KAAK,EAAE,uBAAuB,EAAE,CAAC;IACjC,IAAI,CAAC,EAAE,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