@jini-ai/agent-plugins 0.7.3-next.1 → 0.7.3-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +22 -4
  3. package/calendly/README.md +29 -0
  4. package/calendly/mcp.json +1 -1
  5. package/cloudflare/lib/assets.mjs +1 -1
  6. package/cloudflare/lib/cms-forms.mjs +1 -1
  7. package/core/persistent-state.d.ts +4 -1
  8. package/core/persistent-state.js +55 -21
  9. package/dist/admin-surfaces/callback-field-inbox.d.ts +1 -6
  10. package/dist/admin-surfaces/connections/connections.d.ts +2 -6
  11. package/dist/admin-surfaces/connections/index.d.ts +3 -2
  12. package/dist/admin-surfaces/index.d.ts +3 -1
  13. package/dist/connect/access-token-tool.d.ts +1 -1
  14. package/dist/connect/access-token-tool.js +1 -1
  15. package/dist/connect/catalog.d.ts +26 -0
  16. package/dist/connect/catalog.js +42 -0
  17. package/dist/connect/connect-tool.d.ts +2 -294
  18. package/dist/connect/connect-tool.js +2 -53
  19. package/dist/connect/contracts.d.ts +257 -0
  20. package/dist/connect/contracts.js +2 -0
  21. package/dist/connect/credential-cards.d.ts +2 -0
  22. package/dist/connect/credential-cards.js +7 -4
  23. package/dist/connect/grant-signed-in-defaults.js +1 -1
  24. package/dist/connect/host-deps.d.ts +32 -0
  25. package/dist/connect/host-deps.js +35 -0
  26. package/dist/connect/import-access-token.js +1 -1
  27. package/dist/connect/index.d.ts +7 -2
  28. package/dist/connect/index.js +5 -2
  29. package/dist/connect/installed-plugin.d.ts +28 -0
  30. package/dist/connect/installed-plugin.js +19 -0
  31. package/dist/connect/new-site-agent-plugin-tokens.d.ts +88 -0
  32. package/dist/connect/new-site-agent-plugin-tokens.js +107 -0
  33. package/dist/connect/plugin-host/index.d.ts +2 -2
  34. package/dist/connect/plugin-host/index.js +19 -10
  35. package/dist/connect/token-sign-in.d.ts +1 -14
  36. package/dist/connect/token-sign-in.js +4 -23
  37. package/dist/core/export-props.d.ts +10 -0
  38. package/dist/core/export-props.js +31 -0
  39. package/dist/core/folder-zip-error.d.ts +5 -0
  40. package/dist/core/folder-zip-error.js +8 -0
  41. package/dist/core/host-incompatible-error.d.ts +8 -0
  42. package/dist/core/host-incompatible-error.js +9 -0
  43. package/dist/core/identity-namespace.d.ts +27 -16
  44. package/dist/core/identity-namespace.js +25 -22
  45. package/dist/core/plugin-display-name.d.ts +7 -0
  46. package/dist/core/plugin-display-name.js +11 -0
  47. package/dist/core/provider-plugin-link.d.ts +7 -0
  48. package/dist/core/provider-plugin-link.js +5 -0
  49. package/dist/{connect → core}/token-map.d.ts +11 -1
  50. package/dist/{connect → core}/token-map.js +15 -0
  51. package/dist/core/token-sign-in-list.d.ts +18 -0
  52. package/dist/core/token-sign-in-list.js +23 -0
  53. package/dist/core/update-error.d.ts +8 -0
  54. package/dist/core/update-error.js +9 -0
  55. package/dist/{lifecycle → core}/update-plan.d.ts +1 -1
  56. package/dist/ffmpeg-transcode/adapter.d.ts +74 -0
  57. package/dist/ffmpeg-transcode/adapter.js +155 -0
  58. package/dist/folder-zip-node.d.ts +2 -1
  59. package/dist/folder-zip-node.js +6 -5
  60. package/dist/folder-zip.d.ts +0 -4
  61. package/dist/folder-zip.js +1 -7
  62. package/dist/index.d.ts +3 -1
  63. package/dist/lifecycle/activation.d.ts +39 -3
  64. package/dist/lifecycle/activation.js +467 -418
  65. package/dist/lifecycle/automatic-use-offer.d.ts +62 -0
  66. package/dist/lifecycle/automatic-use-offer.js +52 -0
  67. package/dist/lifecycle/automatic-use.d.ts +33 -1
  68. package/dist/lifecycle/automatic-use.js +157 -38
  69. package/dist/lifecycle/bundled-source-archive.d.ts +1 -1
  70. package/dist/lifecycle/capability-projection.d.ts +0 -1
  71. package/dist/lifecycle/capability-projection.js +92 -23
  72. package/dist/lifecycle/compatibility-metadata.d.ts +1 -0
  73. package/dist/lifecycle/compatibility-metadata.js +6 -1
  74. package/dist/lifecycle/compatibility.d.ts +1 -8
  75. package/dist/lifecycle/compatibility.js +1 -8
  76. package/dist/lifecycle/credential-card-metadata.d.ts +2 -2
  77. package/dist/lifecycle/exports.d.ts +2 -45
  78. package/dist/lifecycle/exports.js +1 -30
  79. package/dist/lifecycle/host-tools/identity.d.ts +5 -4
  80. package/dist/lifecycle/host-tools/identity.js +5 -5
  81. package/dist/lifecycle/host-tools/ports.d.ts +10 -1
  82. package/dist/lifecycle/host-tools/search-tool.d.ts +4 -2
  83. package/dist/lifecycle/host-tools/search-tool.js +19 -8
  84. package/dist/lifecycle/host-tools/skill-tool.js +1 -1
  85. package/dist/lifecycle/index.d.ts +20 -17
  86. package/dist/lifecycle/index.js +5 -4
  87. package/dist/lifecycle/install-from-url.d.ts +1 -2
  88. package/dist/lifecycle/install.d.ts +4 -34
  89. package/dist/lifecycle/install.js +3 -3
  90. package/dist/lifecycle/installed-package-index.d.ts +1 -1
  91. package/dist/lifecycle/installed-package-index.js +4 -4
  92. package/dist/lifecycle/layout.d.ts +21 -25
  93. package/dist/lifecycle/layout.js +79 -0
  94. package/dist/lifecycle/manifest.d.ts +10 -7
  95. package/dist/lifecycle/manifest.js +20 -15
  96. package/dist/lifecycle/mcp-provisioning.d.ts +1 -1
  97. package/dist/lifecycle/metadata.d.ts +6 -3
  98. package/dist/lifecycle/metadata.js +2 -1
  99. package/dist/lifecycle/package-paths.js +59 -56
  100. package/dist/lifecycle/persistent-state.d.ts +10 -1
  101. package/dist/lifecycle/persistent-state.js +4 -2
  102. package/dist/lifecycle/ports.d.ts +18 -6
  103. package/dist/lifecycle/resolve-agent-plugin-refs.d.ts +2 -14
  104. package/dist/lifecycle/retire-bundled.d.ts +1 -1
  105. package/dist/lifecycle/search-projection.d.ts +3 -1
  106. package/dist/lifecycle/search-projection.js +7 -3
  107. package/dist/lifecycle/search.d.ts +1 -0
  108. package/dist/lifecycle/seed-bundled.d.ts +86 -1
  109. package/dist/lifecycle/seed-bundled.js +48 -84
  110. package/dist/lifecycle/set-enabled.d.ts +1 -13
  111. package/dist/lifecycle/set-enabled.js +11 -7
  112. package/dist/lifecycle/trusted-plugin-files.d.ts +1 -1
  113. package/dist/lifecycle/trusted-plugin-files.js +33 -30
  114. package/dist/lifecycle/types.d.ts +13 -34
  115. package/dist/lifecycle/uninstall.d.ts +1 -33
  116. package/dist/lifecycle/update-store.d.ts +0 -7
  117. package/dist/lifecycle/update-store.js +1 -8
  118. package/dist/lifecycle/update.d.ts +1 -1
  119. package/dist/lifecycle/update.js +60 -10
  120. package/dist/lifecycle/yauzl-archive-reader.d.ts +7 -2
  121. package/dist/lifecycle/yauzl-archive-reader.js +11 -6
  122. package/dist/manifest.d.ts +4 -8
  123. package/dist/react/AgentPluginDetailsModal.d.ts +187 -0
  124. package/dist/react/AgentPluginDetailsModal.js +29 -0
  125. package/dist/react/agent-plugin-install-port.d.ts +24 -0
  126. package/dist/react/agent-plugin-install-port.js +15 -0
  127. package/dist/react/installed-skills-composer-source.d.ts +60 -0
  128. package/dist/react/installed-skills-composer-source.js +111 -0
  129. package/dist/react/use-agent-plugins.hooks.d.ts +211 -0
  130. package/dist/react/use-agent-plugins.hooks.js +128 -0
  131. package/dist/site/activation-effects.d.ts +17 -0
  132. package/dist/site/activation-effects.js +31 -0
  133. package/dist/site/admin-surfaces/capabilities.d.ts +29 -0
  134. package/dist/site/admin-surfaces/capabilities.js +30 -0
  135. package/dist/site/admin-surfaces/delivery-bindings.d.ts +81 -0
  136. package/dist/site/admin-surfaces/delivery-bindings.js +161 -0
  137. package/dist/site/admin-surfaces/forms.d.ts +28 -0
  138. package/dist/site/admin-surfaces/forms.js +29 -0
  139. package/dist/site/admin-surfaces/handlers.d.ts +61 -0
  140. package/dist/site/admin-surfaces/handlers.js +35 -0
  141. package/dist/site/admin-surfaces/public-config.d.ts +12 -0
  142. package/dist/site/admin-surfaces/public-config.js +28 -0
  143. package/dist/site/analytics-provider-registry.d.ts +87 -0
  144. package/dist/site/analytics-provider-registry.js +87 -0
  145. package/dist/site/archive-reader-abi.d.ts +35 -0
  146. package/dist/site/archive-reader-abi.js +25 -0
  147. package/dist/site/auth-schemes.d.ts +110 -0
  148. package/dist/site/auth-schemes.js +119 -0
  149. package/dist/site/automatic-agent-plugins.d.ts +200 -0
  150. package/dist/site/automatic-agent-plugins.js +277 -0
  151. package/dist/site/bundled-contribution-sources.d.ts +24 -0
  152. package/dist/site/bundled-contribution-sources.js +17 -0
  153. package/dist/site/bundled-id-upgrade.d.ts +115 -0
  154. package/dist/site/bundled-id-upgrade.js +169 -0
  155. package/dist/site/customize-tool.d.ts +39 -0
  156. package/dist/site/customize-tool.js +31 -0
  157. package/dist/site/deploy-split-activation.d.ts +28 -0
  158. package/dist/site/deploy-split-activation.js +21 -0
  159. package/dist/site/exports/diagnostics.d.ts +37 -0
  160. package/dist/site/exports/diagnostics.js +55 -0
  161. package/dist/site/exports/runtime.d.ts +54 -0
  162. package/dist/site/exports/runtime.js +196 -0
  163. package/dist/site/exports/source.d.ts +42 -0
  164. package/dist/site/exports/source.js +58 -0
  165. package/dist/site/host-plugin-guidance.d.ts +137 -0
  166. package/dist/site/host-plugin-guidance.js +223 -0
  167. package/dist/site/host-signals.d.ts +78 -0
  168. package/dist/site/host-signals.js +83 -0
  169. package/dist/site/install-tool.d.ts +69 -0
  170. package/dist/site/install-tool.js +192 -0
  171. package/dist/site/install-upload.d.ts +175 -0
  172. package/dist/site/install-upload.js +324 -0
  173. package/dist/site/memory-i18n.d.ts +5 -0
  174. package/dist/site/memory-i18n.js +176 -0
  175. package/dist/site/memory.d.ts +80 -0
  176. package/dist/site/memory.js +83 -0
  177. package/dist/site/plugin-memory.d.ts +80 -0
  178. package/dist/site/plugin-memory.js +86 -0
  179. package/dist/site/provider-plugin-link.d.ts +112 -0
  180. package/dist/site/provider-plugin-link.js +100 -0
  181. package/dist/site/retired-plugin-tool-aliases.d.ts +40 -0
  182. package/dist/site/retired-plugin-tool-aliases.js +41 -0
  183. package/dist/site/service-ports.d.ts +108 -0
  184. package/dist/site/service-ports.js +2 -0
  185. package/dist/site/set-enabled.d.ts +80 -0
  186. package/dist/site/set-enabled.js +42 -0
  187. package/dist/site/soon-lock.d.ts +83 -0
  188. package/dist/site/soon-lock.js +78 -0
  189. package/dist/site/supersession.d.ts +61 -0
  190. package/dist/site/supersession.js +122 -0
  191. package/dist/site/uninstall-tool.d.ts +136 -0
  192. package/dist/site/uninstall-tool.js +203 -0
  193. package/dist/site/update-effects.d.ts +47 -0
  194. package/dist/site/update-effects.js +49 -0
  195. package/ffmpeg-transcode/plugin.json +16 -0
  196. package/github/source-control/backup-push.mjs +66 -46
  197. package/github/source-control/commit-site.mjs +124 -67
  198. package/github/source-control/write-files.mjs +86 -53
  199. package/github-pages/targets/github-pages.mjs +294 -233
  200. package/google-workspace/form-destinations/mapping.mjs +15 -7
  201. package/google-workspace/form-destinations/sheets.mjs +4 -2
  202. package/google-workspace/plugin.json +1 -0
  203. package/kuinetic/CHANGELOG.md +4 -0
  204. package/kuinetic/plugin.json +4 -1
  205. package/kuinetic/skills/kuinetic/SKILL.md +1 -2
  206. package/package.json +297 -20
  207. package/persistent-state.d.ts +4 -1
  208. package/resend/adapters/resend.mjs +5 -2
  209. package/resend/plugin.json +1 -1
  210. package/s3-compatible/jini-deploy-targets.json +1 -1
  211. package/s3-compatible/object-stores/s3-compatible.mjs +27 -4
  212. package/s3-compatible/targets/s3-compatible.mjs +3 -3
  213. package/site-import/plugin.json +3 -3
  214. package/site-import/skills/site-import/SKILL.md +62 -54
  215. package/site-import/skills/site-import/references/content-mapping.md +26 -20
  216. package/slide-design/plugin.json +1 -1
  217. package/slide-design/skills/slide-design/SKILL.md +8 -2
  218. package/ui-ux-design/CHANGELOG.md +6 -0
  219. package/ui-ux-design/plugin.json +1 -1
  220. package/ui-ux-design/skills/gstack-design/SKILL.md +6 -6
  221. package/ui-ux-design/skills/ui-ux-design/SKILL.md +3 -2
  222. package/ui-ux-design/skills/ui-ux-design/references/chrome-mobile-test-matrix.md +14 -12
  223. package/ui-ux-design/skills/ui-ux-design/references/ui-loop.md +16 -17
  224. package/vercel/NOTES.md +2 -1
  225. package/vercel/object-stores/vercel-blob.mjs +3 -4
  226. package/vercel/targets/vercel.mjs +425 -351
  227. package/core/commerce-server.d.ts +0 -2
  228. package/core/commerce-server.mjs +0 -2
  229. package/dist/admin-surfaces/connections/ports.d.ts +0 -110
  230. package/dist/admin-surfaces/connections/ports.js +0 -2
  231. /package/dist/{lifecycle → core}/install-errors.d.ts +0 -0
  232. /package/dist/{lifecycle → core}/install-errors.js +0 -0
  233. /package/dist/{lifecycle → core}/update-plan.js +0 -0
@@ -0,0 +1,69 @@
1
+ import { createAgentPluginUpdateEffects, type UpdateMcpDeps } from "./update-effects.js";
2
+ import type { UpdateAgentPluginRequired } from "@jini-ai/agent-plugins/lifecycle";
3
+ import { buildDomainRegistrations, type AgentToolDefinition, type AgentToolSideEffect, type ToolRegistration, type ToolExecutionContext } from "@jini-ai/core";
4
+ import type { zipLocalFolder } from "@jini-ai/agent-plugins/folder-zip/node";
5
+ import type { ToolContributor } from "@jini-ai/core";
6
+ import type { AuthorizeFn } from "@jini-ai/core/contracts/events";
7
+ import type { InstallAttachmentReader, PluginInstallSourcePort } from "@jini-ai/core/contracts/headless/plugin-install-source";
8
+ import type { createAgentPluginLifecycle } from "../lifecycle/index.js";
9
+ import { type InstallUploadedAgentPluginOptional, type bindAgentPluginUpload } from "./install-upload.js";
10
+ import type { AgentPluginLayout } from "@jini-ai/core/contracts/headless/plugin-host";
11
+ import type { listBundledAgentPluginServers } from "../connect/new-site-agent-plugin-tokens.js";
12
+ import type { prepareCustomizedAgentPluginArchive } from './customize-tool.js';
13
+ /** The assistant uses the same uploaded-package service as the Agent Plugins admin add tab.
14
+ * Customization prepares a new package and enters this same install flow, without replacement.
15
+ * No opt-in for this family: only bundled digests may run code. Preview verifies the full archive,
16
+ * install verifies the pinned bytes again, and every fresh/replacement install remains disabled. */
17
+ export type AgentPluginsInstallToolDeps<Layout extends AgentPluginLayout = AgentPluginLayout> = {
18
+ readonly pluginInstallSource: PluginInstallSourcePort;
19
+ readonly snapshotAgentPluginSettings?: UpdateAgentPluginRequired["snapshotSettings"];
20
+ readonly pluginHost?: import("@jini-ai/core/contracts/headless/plugin-host").PluginHostPort;
21
+ readonly workspaceId: string;
22
+ readonly authorize: AuthorizeFn;
23
+ readonly readInstallAttachment?: InstallAttachmentReader;
24
+ readonly agentPluginLayout: Layout;
25
+ readonly bundledAgentPluginsSourceRoot: string;
26
+ readonly catalog: readonly AgentToolDefinition[];
27
+ readonly catalogModule: string;
28
+ readonly toolMetadata: Parameters<typeof buildDomainRegistrations>[0]['metadata'];
29
+ readonly installPermission: string;
30
+ readonly zipLocalFolder: typeof zipLocalFolder;
31
+ readonly maxAgentPluginInstallArchiveBytes: () => number;
32
+ readonly listInstalledPlugins: ReturnType<typeof createAgentPluginLifecycle>['listInstalledPlugins'];
33
+ readonly seedBundledAgentPlugins: (input: Omit<Parameters<ReturnType<typeof createAgentPluginLifecycle>['seedBundledAgentPlugins']>[0], 'layout'> & {
34
+ layout: Layout;
35
+ }) => ReturnType<ReturnType<typeof createAgentPluginLifecycle>['seedBundledAgentPlugins']>;
36
+ readonly listBundledAgentPluginServers: (input: {
37
+ bundledSourceRoot: string;
38
+ }) => ReturnType<typeof listBundledAgentPluginServers>;
39
+ readonly agentPluginActivations: Pick<InstallUploadedAgentPluginOptional['lifecycle'], 'resolveAgentPluginActivation' | 'isAgentPluginRecordedAsBundled'>;
40
+ readonly uploadOptions: InstallUploadedAgentPluginOptional;
41
+ readonly resolveServers: Parameters<typeof createAgentPluginUpdateEffects>[0]['resolveServers'];
42
+ readonly provisionServers: Parameters<typeof createAgentPluginUpdateEffects>[0]['provisionServers'];
43
+ readonly prepareCustomizedAgentPluginArchive: (input: {
44
+ deps: AgentPluginsInstallToolDeps;
45
+ ctx: ToolExecutionContext;
46
+ }) => ReturnType<typeof prepareCustomizedAgentPluginArchive>;
47
+ } & Partial<UpdateMcpDeps>;
48
+ export declare const AGENT_PLUGINS_UPDATE_TOOL_ID = "agent_plugins_update";
49
+ export declare const AGENT_PLUGINS_INSTALL_TOOL_ID = "agent_plugins_install";
50
+ export declare const derivedRisk: ReadonlyMap<string, AgentToolSideEffect>;
51
+ export declare function bindAgentPluginsInstallTools<Layout extends AgentPluginLayout>(required: Pick<AgentPluginsInstallToolDeps<Layout>, 'catalog' | 'catalogModule' | 'toolMetadata' | 'installPermission' | 'zipLocalFolder' | 'maxAgentPluginInstallArchiveBytes' | 'listInstalledPlugins' | 'seedBundledAgentPlugins' | 'listBundledAgentPluginServers' | 'agentPluginActivations'> & {
52
+ sha256: InstallUploadedAgentPluginOptional['sha256'];
53
+ installUploadedAgentPlugin: ReturnType<typeof bindAgentPluginUpload>['installUploadedAgentPlugin'];
54
+ previewUploadedAgentPlugin: ReturnType<typeof bindAgentPluginUpload>['previewUploadedAgentPlugin'];
55
+ updateMcpEffects(input: {
56
+ deps: Pick<UpdateMcpDeps, 'workspaceId' | 'agentPluginLayout'> & Partial<UpdateMcpDeps>;
57
+ actor: string;
58
+ }): ReturnType<typeof createAgentPluginUpdateEffects>;
59
+ prepareCustomizedAgentPluginArchive(input: {
60
+ deps: Pick<AgentPluginsInstallToolDeps, 'workspaceId' | 'agentPluginLayout'>;
61
+ ctx: ToolExecutionContext;
62
+ }): ReturnType<typeof prepareCustomizedAgentPluginArchive>;
63
+ }, _optional?: {}): {
64
+ buildRegistrations: (input: Omit<AgentPluginsInstallToolDeps<Layout>, keyof typeof required | "uploadOptions" | "resolveServers" | "provisionServers">, _optional?: {}) => ToolRegistration[];
65
+ contributeAgentPluginsInstallTools: (input: Pick<AgentPluginsInstallToolDeps, "readInstallAttachment" | "pluginInstallSource">, _optional?: {}) => ToolContributor<Omit<Parameters<(input: Omit<AgentPluginsInstallToolDeps<Layout>, keyof typeof required | "uploadOptions" | "resolveServers" | "provisionServers">, _optional?: {}) => ToolRegistration[]>[0], "pluginInstallSource">, unknown>;
66
+ };
67
+ export declare function buildRegistrations(deps: AgentPluginsInstallToolDeps, _optional?: {}): ToolRegistration[];
68
+ export declare function contributeAgentPluginsInstallTools(required: Pick<AgentPluginsInstallToolDeps, 'readInstallAttachment' | 'pluginInstallSource'>, _optional?: {}): ToolContributor<Omit<Parameters<typeof buildRegistrations>[0], 'pluginInstallSource'>, unknown>;
69
+ //# sourceMappingURL=install-tool.d.ts.map
@@ -0,0 +1,192 @@
1
+ import { createAgentPluginUpdateEffects, requireUpdateMcpDeps } from "./update-effects.js";
2
+ import { AgentPluginUpdateError } from "../core/update-error.js";
3
+ import { AgentPluginHostIncompatibleError } from "../core/host-incompatible-error.js";
4
+ import { isAgentPluginName } from "../core/plugin-name.js";
5
+ import { adaptLegacyAuthorize, requireToolPermission } from "@jini-ai/core";
6
+ import { buildDomainRegistrations, indexCatalogById, requireInputRecord, requireString, ToolInputError } from "@jini-ai/core";
7
+ import { FolderZipError } from "../core/folder-zip-error.js";
8
+ import { AgentPluginInstallError } from "../core/install-errors.js";
9
+ import { AgentPluginUploadError, UPLOADED_AGENT_PLUGIN_TRUST_WARNING, createAgentPluginUpload, installUploadedAgentPlugin } from "./install-upload.js";
10
+ const CUSTOMIZE_AGENT_PLUGIN_TOOL = 'agent_plugins_customize';
11
+ export const AGENT_PLUGINS_UPDATE_TOOL_ID = "agent_plugins_update";
12
+ export const AGENT_PLUGINS_INSTALL_TOOL_ID = "agent_plugins_install";
13
+ export const derivedRisk = new Map([[AGENT_PLUGINS_INSTALL_TOOL_ID, "mutates-durable-state"], [AGENT_PLUGINS_UPDATE_TOOL_ID, "mutates-durable-state"], [CUSTOMIZE_AGENT_PLUGIN_TOOL, "mutates-durable-state"]]);
14
+ /** Gate all three entry points before any source read or package publication. */
15
+ async function runInstallTool({ deps, ctx, operation }, _optional = {}) {
16
+ await requireToolPermission({ authorize: adaptLegacyAuthorize({ authorize: deps.authorize }), workspaceId: deps.workspaceId, principalId: ctx.principal.id, permission: deps.installPermission }, { entityType: "plugin" });
17
+ const input = requireInputRecord({ input: ctx.input });
18
+ if (operation === 'customize')
19
+ return installArchivePlugin({ deps, ctx }, { archive: await deps.prepareCustomizedAgentPluginArchive({ deps, ctx }) });
20
+ if (operation === "update")
21
+ return updateArchivePlugin({ deps, ctx, update: readUpdateTarget({ input }) });
22
+ const source = input.source;
23
+ if (source?.kind === "bundled")
24
+ return installBundledPlugin({ input, deps });
25
+ if (source && Object.hasOwn(source, "bundledId"))
26
+ throw new ToolInputError({ message: "source.bundledId requires kind 'bundled' and cannot be combined with a path or attachmentRef." });
27
+ return installArchivePlugin({ deps, ctx });
28
+ }
29
+ /** The update's target, checked before any file is read. @complexity O(1). */
30
+ function readUpdateTarget({ input }, _optional = {}) {
31
+ const pluginId = requireString({ input, key: "pluginId" });
32
+ // Jini's manifest grammar, checked before the id names anything on disk.
33
+ if (!isAgentPluginName({ value: pluginId }))
34
+ throw new ToolInputError({ message: "pluginId is not a valid Agent Plugin id." });
35
+ const expectedOldDigest = requireString({ input, key: "expectedOldDigest" });
36
+ if (!/^[a-f0-9]{64}$/.test(expectedOldDigest))
37
+ throw new ToolInputError({ message: "expectedOldDigest must be the installed archiveDigest (lowercase hex SHA-256)." });
38
+ return { pluginId, expectedOldDigest };
39
+ }
40
+ /** The candidate's bytes from a folder, a local zip or a chat attachment, size-capped before reading. */
41
+ async function readToolArchive({ deps, ctx }, _optional = {}) {
42
+ const request = deps.pluginInstallSource.readRequest({ input: ctx.input });
43
+ let archive;
44
+ if (request.kind === "folder") {
45
+ if (request.path === undefined)
46
+ throw new ToolInputError({ message: "Agent Plugin folder source has no path" });
47
+ archive = await deps.zipLocalFolder({ path: request.path, maxBytes: deps.maxAgentPluginInstallArchiveBytes() });
48
+ }
49
+ else {
50
+ archive = await deps.pluginInstallSource.readArchive({ request, ownerId: ctx.principal.id, runId: ctx.run.id, maxBytes: deps.maxAgentPluginInstallArchiveBytes() }, { ...(deps.readInstallAttachment ? { readAttachment: deps.readInstallAttachment } : {}) });
51
+ }
52
+ return { request, archive, expectedSha256: deps.sha256(archive) };
53
+ }
54
+ /** Every named lifecycle refusal is a result the model can act on; anything else stays redacted. */
55
+ function toToolInputError({ error }, _optional = {}) {
56
+ if (error instanceof FolderZipError)
57
+ return new ToolInputError({ message: error.message });
58
+ const named = error instanceof AgentPluginUpdateError || error instanceof AgentPluginHostIncompatibleError || error instanceof AgentPluginInstallError || error instanceof AgentPluginUploadError;
59
+ return named ? new ToolInputError({ message: `${error.code}: ${error.message}` }) : error;
60
+ }
61
+ /** The same transaction as the admin Update button (`installUploadedAgentPlugin({ update })`). */
62
+ async function updateArchivePlugin({ deps, ctx, update }, _optional = {}) {
63
+ try {
64
+ const { archive, expectedSha256 } = await readToolArchive({ deps, ctx });
65
+ const result = await deps.installUploadedAgentPlugin({ archive, expectedSha256, workspaceId: deps.workspaceId, actor: ctx.principal.id, update }, {
66
+ layout: deps.agentPluginLayout, ...(deps.pluginHost ? { pluginHost: deps.pluginHost } : {}),
67
+ ...(deps.snapshotAgentPluginSettings ? { snapshotSettings: deps.snapshotAgentPluginSettings } : {}),
68
+ mcpProvisioning: deps.updateMcpEffects({ deps, actor: ctx.principal.id }),
69
+ });
70
+ // No preview here: its replace checks refuse an enabled plugin, which an update keeps enabled.
71
+ // The trust warning is the same static text install's preview carries, minus "stays OFF".
72
+ // `enabled`/`warnings` are always present on the update path (`UpdatedUploadedAgentPlugin`: the
73
+ // lifecycle owner's `updateAgentPlugin` result carries both), so no `null`/`[]` fallback is needed.
74
+ return { updated: !result.alreadyInstalled, alreadyInstalled: result.alreadyInstalled, enabled: result.enabled, warnings: result.warnings,
75
+ plugin: { id: result.plugin.pluginId, ...(result.plugin.version ? { version: result.plugin.version } : {}) },
76
+ warning: UPLOADED_AGENT_PLUGIN_TRUST_WARNING,
77
+ note: result.alreadyInstalled ? "These exact bytes are already installed; nothing changed."
78
+ : "Updated. Memory is kept. Running chats keep the guidance they already loaded; MCP calls in progress may fail." };
79
+ }
80
+ catch (error) {
81
+ throw toToolInputError({ error });
82
+ }
83
+ }
84
+ /** Shared preview, publication and activation report for uploads and customized copies.
85
+ * @throws Model-facing input errors for named install/upload/folder refusals.
86
+ * @complexity O(b) bounded archive bytes; the existing installer owns extraction and locking.
87
+ */
88
+ async function installArchivePlugin({ deps, ctx }, prepared = {}) {
89
+ try {
90
+ // Customized copies enter the SAME preview/install/state-reporting sequence as folder uploads.
91
+ const { request, archive, expectedSha256 } = prepared.archive
92
+ ? { request: { replace: false }, archive: prepared.archive, expectedSha256: deps.sha256(prepared.archive) }
93
+ : await readToolArchive({ deps, ctx });
94
+ const required = { archive, expectedSha256, workspaceId: deps.workspaceId, actor: ctx.principal.id, replace: request.replace };
95
+ const optional = { layout: deps.agentPluginLayout, ...(deps.pluginHost ? { pluginHost: deps.pluginHost } : {}) };
96
+ const preview = await deps.previewUploadedAgentPlugin(required, optional);
97
+ const result = await deps.installUploadedAgentPlugin({ ...required, expectedSha256: preview.digest }, optional);
98
+ // Identical bytes are a no-op, including activation. Do not falsely report OFF for a
99
+ // package the operator already enabled; malformed activation remains explicitly unknown.
100
+ const verdict = result.alreadyInstalled
101
+ ? (await deps.agentPluginActivations.resolveAgentPluginActivation({ workspaceRoot: deps.agentPluginLayout.forWorkspace({ workspaceId: deps.workspaceId }).root, pluginId: result.plugin.pluginId })).verdict
102
+ : "inactive";
103
+ return uploadedInstallResult({ result, verdict, warning: preview.warning });
104
+ }
105
+ catch (error) {
106
+ throw toToolInputError({ error });
107
+ }
108
+ }
109
+ function uploadedInstallResult({ result, verdict, warning }, _optional = {}) {
110
+ return { installed: true, enabled: verdict === "undetermined" ? null : verdict === "active", alreadyInstalled: result.alreadyInstalled,
111
+ plugin: { id: result.plugin.pluginId, ...(result.plugin.version ? { version: result.plugin.version } : {}), ...(result.upgradeFrom ? { upgradeFrom: result.upgradeFrom } : {}) },
112
+ warning,
113
+ note: result.alreadyInstalled ? "These exact bytes are already installed; activation was not changed." : "Installed OFF. Enable with plugins_set_enabled (family 'agent-plugin') if requested.",
114
+ };
115
+ }
116
+ /** Bundled plugins are seeded into every workspace at boot, so this normally finds the plugin
117
+ * installed and only reports its state. When it is missing (its boot seed failed), it re-runs that
118
+ * same idempotent boot seeder rather than a second install path, so provenance, digests and default
119
+ * activation stay the seeder's. An operator-installed namesake is never given bundled trust.
120
+ * @throws {ToolInputError} Unknown id, a namesake from another source, or a failed seed.
121
+ */
122
+ async function installBundledPlugin({ input, deps }, _optional = {}) {
123
+ const id = readBundledPluginId({ input });
124
+ const sourceRoot = deps.bundledAgentPluginsSourceRoot;
125
+ const bundledIds = (await deps.listBundledAgentPluginServers({ bundledSourceRoot: sourceRoot })).map(plugin => plugin.pluginId).sort();
126
+ if (!bundledIds.includes(id))
127
+ throw new ToolInputError({ message: `Unknown bundled plugin id '${id}'. Bundled ids: ${bundledIds.join(", ")}.` });
128
+ const workspaceRoot = deps.agentPluginLayout.forWorkspace({ workspaceId: deps.workspaceId }).root;
129
+ const existing = (await deps.listInstalledPlugins({ workspaceRoot })).some(plugin => plugin.pluginId === id);
130
+ if (existing && !await deps.agentPluginActivations.isAgentPluginRecordedAsBundled({ workspaceRoot, pluginId: id })) {
131
+ throw new ToolInputError({ message: `Plugin id '${id}' is already installed from another source; bundled plugins cannot replace it.` });
132
+ }
133
+ if (!existing) {
134
+ await seedMissingBundledPlugin({ deps, sourceRoot, id });
135
+ }
136
+ const { verdict } = await deps.agentPluginActivations.resolveAgentPluginActivation({ workspaceRoot, pluginId: id });
137
+ const installedNote = verdict === "active" ? "Installed ON (seeded enabled by default)." : "Installed OFF. Enable with plugins_set_enabled (family 'agent-plugin') if requested.";
138
+ return { installed: true, alreadyInstalled: existing, enabled: verdict === "undetermined" ? null : verdict === "active", plugin: { id },
139
+ note: existing ? `Bundled plugin '${id}' is already installed; activation was not changed.`
140
+ : installedNote,
141
+ };
142
+ }
143
+ export function bindAgentPluginsInstallTools(required, _optional = {}) {
144
+ const buildRegistrations = (input, _optional = {}) => {
145
+ const deps = { ...input, ...required };
146
+ return buildDomainRegistrations({ ...(deps.toolMetadata === undefined ? {} : { metadata: deps.toolMetadata }), domain: "agent-plugins-install", catalogModule: deps.catalogModule, catalog: indexCatalogById({ catalog: deps.catalog }), derivedRisk,
147
+ handlers: {
148
+ [AGENT_PLUGINS_INSTALL_TOOL_ID]: ctx => runInstallTool({ deps, ctx, operation: "install" }),
149
+ [AGENT_PLUGINS_UPDATE_TOOL_ID]: ctx => runInstallTool({ deps, ctx, operation: "update" }),
150
+ [CUSTOMIZE_AGENT_PLUGIN_TOOL]: ctx => runInstallTool({ deps, ctx, operation: 'customize' }),
151
+ },
152
+ });
153
+ };
154
+ return {
155
+ buildRegistrations,
156
+ contributeAgentPluginsInstallTools: (input, _optional = {}) => ({
157
+ domain: 'agent-plugins-install', build: deps => buildRegistrations({ ...deps, ...input }), risk: derivedRisk,
158
+ }),
159
+ };
160
+ }
161
+ export function buildRegistrations(deps, _optional = {}) {
162
+ function installUploadedAgentPlugin(input, optional) {
163
+ return createAgentPluginUpload({ ...deps.uploadOptions, ...optional }).installUploadedAgentPlugin(input, optional);
164
+ }
165
+ return bindAgentPluginsInstallTools({ ...deps, sha256: archive => deps.uploadOptions.sha256(archive),
166
+ installUploadedAgentPlugin,
167
+ previewUploadedAgentPlugin: (input, optional) => createAgentPluginUpload({ ...deps.uploadOptions, ...optional }).previewUploadedAgentPlugin(input, optional),
168
+ prepareCustomizedAgentPluginArchive: ({ deps: execution, ctx }) => deps.prepareCustomizedAgentPluginArchive({ deps: { ...deps, ...execution }, ctx }),
169
+ /** The MCP effects an update re-provisions through. Missing deps are a host wiring fault, so this
170
+ * throws a plain error (redacted to the model), not a caller-input error. @complexity O(1). */
171
+ updateMcpEffects: ({ deps: execution, actor }) => createAgentPluginUpdateEffects({ actor, deps: requireUpdateMcpDeps({ deps: execution }), resolveServers: deps.resolveServers, provisionServers: deps.provisionServers }),
172
+ }).buildRegistrations(deps);
173
+ }
174
+ export function contributeAgentPluginsInstallTools(required, _optional = {}) {
175
+ return { domain: 'agent-plugins-install', build: deps => buildRegistrations({ ...deps, ...required }), risk: derivedRisk };
176
+ }
177
+ function readBundledPluginId({ input }, _optional = {}) {
178
+ const source = input.source;
179
+ const id = source.bundledId;
180
+ if (typeof id !== "string" || Object.keys(source).some(key => key !== "kind" && key !== "bundledId")) {
181
+ throw new ToolInputError({ message: "Bundled source requires only kind:'bundled' and a bundledId; no path or attachmentRef." });
182
+ }
183
+ if (input.replace === true)
184
+ throw new ToolInputError({ message: "Bundled plugins cannot be replaced." });
185
+ return id;
186
+ }
187
+ async function seedMissingBundledPlugin({ deps, sourceRoot, id }, _optional = {}) {
188
+ const outcome = (await deps.seedBundledAgentPlugins({ layout: deps.agentPluginLayout, workspaceId: deps.workspaceId, sourceRoot })).outcomes.find(plugin => plugin.pluginId === id);
189
+ if (outcome?.status !== "seeded")
190
+ throw new ToolInputError({ message: `Bundled plugin '${id}' could not be installed: ${outcome?.status === "failed" ? outcome.reason : "bundled package unavailable"}` });
191
+ }
192
+ //# sourceMappingURL=install-tool.js.map
@@ -0,0 +1,175 @@
1
+ import { toObjectArgArchiveReader, toZeroArgArchiveReader } from './archive-reader-abi.js';
2
+ export { toObjectArgArchiveReader, toZeroArgArchiveReader } from './archive-reader-abi.js';
3
+ import type { AgentPluginMcpProvisioningPort } from "@jini-ai/agent-plugins/lifecycle";
4
+ import type { readInstalledAgentPluginIdentity } from "@jini-ai/agent-plugins/lifecycle/host-tools";
5
+ import type { PluginHostPort, AgentPluginLayout } from "@jini-ai/core/contracts/headless/plugin-host";
6
+ /**
7
+ * @file `installUploadedAgentPlugin()` — the admin "Add a plugin" upload: one operator-supplied
8
+ * `.zip` of an agent-plugins.org package, installed for one workspace and left switched OFF.
9
+ *
10
+ * No second install path. Extraction, containment, size caps, the digest check and publication are
11
+ * all `installAgentPlugin()`'s (`install.ts`), exactly as the bundled seed uses it; this module only
12
+ * adds what an upload needs that a bundled source never does:
13
+ *
14
+ * - A real ZIP reader: Jini's published yauzl adapter, the same one `plugin-runtime/install-archive.ts`
15
+ * uses for site-plugin uploads, adapted to `install.ts`'s own reader port.
16
+ * - One wrapping folder is accepted. Zipping a folder (macOS "Compress", a GitHub download) puts
17
+ * every file under `<folder>/`, plus `__MACOSX/` noise; `install.ts` wants `plugin.json` at the
18
+ * root. When the root has no `plugin.json` but exactly one top-level folder does, that folder is
19
+ * the package and everything outside it is dropped. Every path is still re-checked by `install.ts`.
20
+ * - Replacing a disabled operator-installed plugin is explicit. Old digests are staged aside and
21
+ * restored on publication failure; memory stays in place. The per-plugin lock prevents ambiguous
22
+ * id races. Identical bytes are a harmless no-op instead.
23
+ * - It stays off. An absent activation record reads as ACTIVE (operator installs predate the
24
+ * record), so the disabled `operator-installed` record is written BEFORE the package is
25
+ * published, the same order the bundled seed uses. A failed install leaves only that inert record.
26
+ *
27
+ * Nothing in an uploaded package runs: skills are markdown, and code seams only trust bundled
28
+ * digests (`trusted-plugin-files.ts`).
29
+ */
30
+ import path from "node:path";
31
+ import type { lstat } from "node:fs/promises";
32
+ import type { createAgentPluginLifecycle, AgentPluginLifecyclePorts } from "../lifecycle/index.js";
33
+ import type { PluginStateEffects } from "@jini-ai/agent-plugins/persistent-state";
34
+ import type { parseAgentPluginManifest } from "@jini-ai/agent-plugins/lifecycle";
35
+ import type { AgentPluginArchiveReaderPort } from "../lifecycle/index.js";
36
+ import type { InstalledAgentPlugin } from "@jini-ai/core/contracts/site/agent-plugins-lifecycle";
37
+ export type AgentPluginUploadErrorCode = "ARCHIVE_UNREADABLE" | "PLUGIN_ID_TAKEN" | "PLUGIN_ENABLED" | "PLUGIN_BUNDLED";
38
+ /** Upload-only refusals; every other refusal is `install.ts`'s own `AgentPluginInstallError`. */
39
+ export declare class AgentPluginUploadError extends Error {
40
+ readonly code: AgentPluginUploadErrorCode;
41
+ constructor({ code, message }: {
42
+ code: AgentPluginUploadErrorCode;
43
+ message: string;
44
+ }, options?: {
45
+ cause?: unknown;
46
+ });
47
+ }
48
+ export interface InstallUploadedAgentPluginRequired {
49
+ readonly archive: Uint8Array;
50
+ /** Lowercase hex SHA-256 the client computed from the file it chose; catches a corrupted upload. */
51
+ readonly expectedSha256: string;
52
+ /** From the authenticated request context, never from the archive. */
53
+ readonly workspaceId: string;
54
+ /** The authenticated principal, recorded as the activation record's `updatedBy`. */
55
+ readonly actor: string;
56
+ readonly replace?: boolean;
57
+ readonly update?: {
58
+ readonly pluginId: string;
59
+ readonly expectedOldDigest: string;
60
+ };
61
+ }
62
+ type EngineLifecycle = ReturnType<typeof createAgentPluginLifecycle>;
63
+ /** This module always hands the lifecycle the host's full layout (`optional.layout`), so a host lifecycle
64
+ * may require it instead of the engine's narrower layout port. */
65
+ type WithHostLayout<TInput> = Omit<TInput, 'layout'> & {
66
+ readonly layout: AgentPluginLayout;
67
+ };
68
+ type TailParams<TFn> = TFn extends (first: never, ...rest: infer TRest) => unknown ? TRest : never;
69
+ export interface InstallUploadedAgentPluginOptional {
70
+ readonly pluginHost?: PluginHostPort;
71
+ readonly mcpProvisioning?: AgentPluginMcpProvisioningPort;
72
+ readonly snapshotSettings?: import("@jini-ai/agent-plugins/lifecycle").UpdateAgentPluginRequired["snapshotSettings"];
73
+ readonly parseManifest: typeof parseAgentPluginManifest;
74
+ readonly readInstallIdentity: typeof readInstalledAgentPluginIdentity;
75
+ readonly sha256: (archive: Uint8Array) => string;
76
+ readonly archiveReader: AgentPluginArchiveReaderPort;
77
+ readonly lifecycle: Pick<EngineLifecycle, 'listInstalledPlugins' | 'stageForRemoval' | 'restoreStagedTrees' | 'removeFrozenPackageTree' | 'setAgentPluginActivation' | 'isAgentPluginRecordedAsBundled' | 'resolveAgentPluginActivation'> & {
78
+ installAgentPlugin(input: WithHostLayout<Parameters<EngineLifecycle['installAgentPlugin']>[0]>, ...rest: TailParams<EngineLifecycle['installAgentPlugin']>): ReturnType<EngineLifecycle['installAgentPlugin']>;
79
+ };
80
+ readonly createLifecycle: (required: {
81
+ layout: AgentPluginLayout;
82
+ }, optional: Partial<Pick<AgentPluginLifecyclePorts, 'mcpProvisioning'>> & Pick<AgentPluginLifecyclePorts, 'identityAdmission'>) => {
83
+ updateAgentPlugin(input: WithHostLayout<Parameters<EngineLifecycle['updateAgentPlugin']>[0]>, ...rest: TailParams<EngineLifecycle['updateAgentPlugin']>): ReturnType<EngineLifecycle['updateAgentPlugin']>;
84
+ };
85
+ readonly maxAgentPluginInstallArchiveBytes: () => number;
86
+ readonly contain: PluginStateEffects['contain'];
87
+ readonly assertOwnedPluginPath: (input: {
88
+ contain: PluginStateEffects['contain'];
89
+ workspaceRoot: string;
90
+ entryPath: string;
91
+ }) => Promise<string>;
92
+ readonly lstat: typeof lstat;
93
+ readonly warnCleanup: (input: {
94
+ pluginId: string;
95
+ error: unknown;
96
+ }) => void;
97
+ readonly layout: AgentPluginLayout;
98
+ readonly path?: Pick<typeof path, "join" | "relative">;
99
+ }
100
+ export interface InstalledUploadedAgentPlugin {
101
+ readonly plugin: InstalledAgentPlugin;
102
+ /** True when these exact bytes were already installed; nothing was written. */
103
+ readonly alreadyInstalled: boolean;
104
+ readonly enabled?: boolean;
105
+ readonly warnings?: readonly string[];
106
+ readonly upgradeFrom?: readonly string[];
107
+ }
108
+ /** An explicit update's result: the lifecycle owner's `updateAgentPlugin` always reports the
109
+ * plugin's kept on/off state and its warnings, so neither is optional on this path. */
110
+ export type UpdatedUploadedAgentPlugin = InstalledUploadedAgentPlugin & {
111
+ readonly enabled: boolean;
112
+ readonly warnings: readonly string[];
113
+ };
114
+ /**
115
+ * Installs one uploaded Agent Plugin `.zip`, switched off.
116
+ * @throws {AgentPluginInstallError} Size, digest, manifest and every extraction refusal.
117
+ * @throws {AgentPluginUploadError} An unreadable archive, or an id another package already holds.
118
+ * @complexity O(e + b) in entry count and extracted bytes, both capped by `install.ts`.
119
+ */
120
+ export declare function installUploadedAgentPlugin(required: InstallUploadedAgentPluginRequired & {
121
+ readonly update: NonNullable<InstallUploadedAgentPluginRequired["update"]>;
122
+ }, optional: InstallUploadedAgentPluginOptional): Promise<UpdatedUploadedAgentPlugin>;
123
+ export declare function installUploadedAgentPlugin(required: InstallUploadedAgentPluginRequired, optional: InstallUploadedAgentPluginOptional): Promise<InstalledUploadedAgentPlugin>;
124
+ /** Every uploaded package carries this, install and update alike; only install adds that it stays OFF,
125
+ * since an update keeps the installed plugin's on/off state. */
126
+ export declare const UPLOADED_AGENT_PLUGIN_TRUST_WARNING = "Trust: local / unverified publisher. Uploaded Agent Plugin code is not trusted to run. Skills can guide the assistant.";
127
+ export interface AgentPluginUploadPreview {
128
+ readonly pluginId: string;
129
+ readonly version?: string;
130
+ readonly digest: string;
131
+ readonly skills: readonly string[];
132
+ readonly upgradeFrom?: readonly string[];
133
+ readonly warning: string;
134
+ }
135
+ /** Extracts through the real install validator in staging; preview never publishes code or memory.
136
+ * Host paths from that ephemeral extraction are deliberately absent from this projection. */
137
+ export declare function previewUploadedAgentPlugin(required: InstallUploadedAgentPluginRequired, optional: InstallUploadedAgentPluginOptional): Promise<AgentPluginUploadPreview>;
138
+ export declare function createAgentPluginUpload(required: InstallUploadedAgentPluginOptional, _optional?: {}): {
139
+ installUploadedAgentPlugin: {
140
+ (input: InstallUploadedAgentPluginRequired & {
141
+ update: NonNullable<InstallUploadedAgentPluginRequired["update"]>;
142
+ }, optional?: Pick<InstallUploadedAgentPluginOptional, "pluginHost" | "mcpProvisioning" | "snapshotSettings">): Promise<UpdatedUploadedAgentPlugin>;
143
+ (input: InstallUploadedAgentPluginRequired, optional?: Pick<InstallUploadedAgentPluginOptional, "pluginHost" | "mcpProvisioning" | "snapshotSettings">): Promise<InstalledUploadedAgentPlugin>;
144
+ };
145
+ previewUploadedAgentPlugin: (input: InstallUploadedAgentPluginRequired, optional?: Pick<InstallUploadedAgentPluginOptional, "pluginHost" | "mcpProvisioning" | "snapshotSettings">) => Promise<AgentPluginUploadPreview>;
146
+ };
147
+ export declare function bindAgentPluginUpload(required: Omit<InstallUploadedAgentPluginOptional, 'layout' | 'archiveReader' | 'path' | 'snapshotSettings' | 'pluginHost' | 'mcpProvisioning' | 'lifecycle' | 'createLifecycle'> & {
148
+ lifecycle: Omit<InstallUploadedAgentPluginOptional['lifecycle'], 'installAgentPlugin'> & {
149
+ installAgentPlugin(input: Omit<Parameters<InstallUploadedAgentPluginOptional['lifecycle']['installAgentPlugin']>[0], 'archiveReader'> & {
150
+ archiveReader: ReturnType<typeof toZeroArgArchiveReader>;
151
+ }, optional?: Parameters<InstallUploadedAgentPluginOptional['lifecycle']['installAgentPlugin']>[1]): ReturnType<InstallUploadedAgentPluginOptional['lifecycle']['installAgentPlugin']>;
152
+ };
153
+ createLifecycle(input: Parameters<InstallUploadedAgentPluginOptional['createLifecycle']>[0], optional: Parameters<InstallUploadedAgentPluginOptional['createLifecycle']>[1]): {
154
+ updateAgentPlugin(input: Omit<Parameters<ReturnType<InstallUploadedAgentPluginOptional['createLifecycle']>['updateAgentPlugin']>[0], 'archiveReader'> & {
155
+ archiveReader: ReturnType<typeof toZeroArgArchiveReader>;
156
+ }): ReturnType<ReturnType<InstallUploadedAgentPluginOptional['createLifecycle']>['updateAgentPlugin']>;
157
+ };
158
+ path: Pick<typeof path, 'join' | 'relative'>;
159
+ archiveReader(): AgentPluginArchiveReaderPort;
160
+ }, _optional?: {}): {
161
+ installUploadedAgentPlugin: {
162
+ (input: InstallUploadedAgentPluginRequired & {
163
+ update: NonNullable<InstallUploadedAgentPluginRequired["update"]>;
164
+ }, optional: Pick<InstallUploadedAgentPluginOptional, "layout" | "snapshotSettings" | "pluginHost" | "mcpProvisioning"> & {
165
+ archiveReader?: Parameters<typeof toObjectArgArchiveReader>[0]["reader"];
166
+ }): Promise<UpdatedUploadedAgentPlugin>;
167
+ (input: InstallUploadedAgentPluginRequired, optional: Pick<InstallUploadedAgentPluginOptional, "layout" | "snapshotSettings" | "pluginHost" | "mcpProvisioning"> & {
168
+ archiveReader?: Parameters<typeof toObjectArgArchiveReader>[0]["reader"];
169
+ }): Promise<InstalledUploadedAgentPlugin>;
170
+ };
171
+ previewUploadedAgentPlugin: (input: InstallUploadedAgentPluginRequired, optional: Pick<InstallUploadedAgentPluginOptional, "layout" | "pluginHost" | "mcpProvisioning"> & {
172
+ archiveReader?: Parameters<typeof toObjectArgArchiveReader>[0]["reader"];
173
+ }) => Promise<AgentPluginUploadPreview>;
174
+ };
175
+ //# sourceMappingURL=install-upload.d.ts.map