@jini-ai/agent-plugins 0.6.23 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +13 -0
  3. package/calendly/exports/booking-calendar.css +7 -0
  4. package/calendly/exports/booking-calendar.html +5 -0
  5. package/calendly/mcp.json +10 -0
  6. package/calendly/plugin.json +47 -0
  7. package/calendly/skills/calendly/SKILL.md +27 -0
  8. package/charts-echarts/plugin.json +2 -2
  9. package/charts-recharts/plugin.json +2 -2
  10. package/cloudflare/lib/cms-forms.mjs +57 -0
  11. package/cloudflare/lib/forms.mjs +78 -18
  12. package/cloudflare/lib/target.mjs +17 -4
  13. package/cloudflare/plugin.json +2 -2
  14. package/cloudflare/skills/cloudflare/SKILL.md +4 -4
  15. package/cloudflare/skills/cloudflare/references/workers.md +4 -4
  16. package/cloudflare/worker/forms-receiver.mjs +81 -41
  17. package/cloudflare/worker/portable-validation.mjs +220 -0
  18. package/commerce/plugin.json +17 -0
  19. package/commerce/skills/commerce/SKILL.md +23 -0
  20. package/composio/mcp.json +1 -1
  21. package/composio/plugin.json +2 -2
  22. package/composio/skills/composio/SKILL.md +4 -4
  23. package/core/commerce-server.d.ts +2 -0
  24. package/core/commerce-server.mjs +2 -0
  25. package/dist/admin-surfaces/connections/connections.d.ts +35 -0
  26. package/dist/admin-surfaces/connections/connections.js +135 -0
  27. package/dist/admin-surfaces/connections/index.d.ts +3 -0
  28. package/dist/admin-surfaces/connections/index.js +2 -0
  29. package/dist/admin-surfaces/connections/ports.d.ts +110 -0
  30. package/dist/admin-surfaces/connections/ports.js +2 -0
  31. package/dist/admin-surfaces/index.d.ts +2 -0
  32. package/dist/admin-surfaces/index.js +1 -0
  33. package/dist/admin-surfaces/plugin-state-persistence.d.ts +27 -0
  34. package/dist/admin-surfaces/plugin-state-persistence.js +2 -0
  35. package/dist/admin-surfaces/plugin-state.d.ts +51 -0
  36. package/dist/admin-surfaces/plugin-state.js +106 -0
  37. package/dist/connect/access-token-tool.d.ts +240 -0
  38. package/dist/connect/access-token-tool.js +213 -0
  39. package/dist/connect/apply-connect-defaults.d.ts +91 -0
  40. package/dist/connect/apply-connect-defaults.js +113 -0
  41. package/dist/connect/apply-tool-renames.d.ts +72 -0
  42. package/dist/connect/apply-tool-renames.js +105 -0
  43. package/dist/connect/connect-card-ui.d.ts +143 -0
  44. package/dist/connect/connect-card-ui.js +106 -0
  45. package/dist/connect/connect-destination.d.ts +35 -0
  46. package/dist/connect/connect-destination.js +45 -0
  47. package/dist/connect/connect-sign-in-wait.d.ts +31 -0
  48. package/dist/connect/connect-sign-in-wait.js +21 -0
  49. package/dist/connect/connect-tool.d.ts +314 -0
  50. package/dist/connect/connect-tool.js +431 -0
  51. package/dist/connect/connection-status.d.ts +33 -0
  52. package/dist/connect/connection-status.js +63 -0
  53. package/dist/connect/credential-cards.d.ts +15 -0
  54. package/dist/connect/credential-cards.js +49 -0
  55. package/dist/connect/credential-save-tool.d.ts +45 -0
  56. package/dist/connect/credential-save-tool.js +156 -0
  57. package/dist/connect/enable-access.d.ts +67 -0
  58. package/dist/connect/enable-access.js +74 -0
  59. package/dist/connect/executable/approval.d.ts +58 -0
  60. package/dist/connect/executable/approval.js +40 -0
  61. package/dist/connect/executable/host-capabilities.d.ts +76 -0
  62. package/dist/connect/executable/host-capabilities.js +100 -0
  63. package/dist/connect/executable/index.d.ts +10 -0
  64. package/dist/connect/executable/index.js +9 -0
  65. package/dist/connect/executable/ports.d.ts +189 -0
  66. package/dist/connect/executable/ports.js +2 -0
  67. package/dist/connect/executable/register.d.ts +21 -0
  68. package/dist/connect/executable/register.js +125 -0
  69. package/dist/connect/federate-mcp.d.ts +190 -0
  70. package/dist/connect/federate-mcp.js +440 -0
  71. package/dist/connect/grant-signed-in-defaults.d.ts +96 -0
  72. package/dist/connect/grant-signed-in-defaults.js +100 -0
  73. package/dist/connect/import-access-token.d.ts +114 -0
  74. package/dist/connect/import-access-token.js +103 -0
  75. package/dist/connect/index.d.ts +19 -0
  76. package/dist/connect/index.js +19 -0
  77. package/dist/connect/plugin-credential-card.d.ts +46 -0
  78. package/dist/connect/plugin-credential-card.js +63 -0
  79. package/dist/connect/plugin-host/index.d.ts +203 -0
  80. package/dist/connect/plugin-host/index.js +153 -0
  81. package/dist/connect/ports.d.ts +74 -0
  82. package/dist/connect/ports.js +2 -0
  83. package/dist/connect/switch-on-saved-token.d.ts +48 -0
  84. package/dist/connect/switch-on-saved-token.js +20 -0
  85. package/dist/connect/token-sign-in.d.ts +51 -0
  86. package/dist/connect/token-sign-in.js +43 -0
  87. package/dist/core/identity-namespace.d.ts +39 -0
  88. package/dist/core/identity-namespace.js +61 -3
  89. package/dist/folder-zip-node.js +3 -1
  90. package/dist/lifecycle/automatic-use.d.ts +12 -7
  91. package/dist/lifecycle/automatic-use.js +37 -28
  92. package/dist/lifecycle/capability-projection.js +5 -1
  93. package/dist/lifecycle/contribution-loader.d.ts +2 -7
  94. package/dist/lifecycle/contribution-types.d.ts +8 -0
  95. package/dist/lifecycle/contribution-types.js +2 -0
  96. package/dist/lifecycle/credential-card-metadata.d.ts +23 -0
  97. package/dist/lifecycle/credential-card-metadata.js +184 -0
  98. package/dist/lifecycle/exports.d.ts +11 -0
  99. package/dist/lifecycle/exports.js +64 -3
  100. package/dist/lifecycle/host-tools/identity.d.ts +38 -0
  101. package/dist/lifecycle/host-tools/identity.js +58 -0
  102. package/dist/lifecycle/host-tools/index.d.ts +20 -0
  103. package/dist/lifecycle/host-tools/index.js +20 -0
  104. package/dist/lifecycle/host-tools/memory-tools.d.ts +22 -0
  105. package/dist/lifecycle/host-tools/memory-tools.js +63 -0
  106. package/dist/lifecycle/host-tools/ports.d.ts +121 -0
  107. package/dist/lifecycle/host-tools/ports.js +2 -0
  108. package/dist/lifecycle/host-tools/provider-status-tool.d.ts +88 -0
  109. package/dist/lifecycle/host-tools/provider-status-tool.js +45 -0
  110. package/dist/lifecycle/host-tools/search-tool.d.ts +74 -0
  111. package/dist/lifecycle/host-tools/search-tool.js +282 -0
  112. package/dist/lifecycle/host-tools/skill-tool.d.ts +219 -0
  113. package/dist/lifecycle/host-tools/skill-tool.js +482 -0
  114. package/dist/lifecycle/host-tools/write-note-tool.d.ts +22 -0
  115. package/dist/lifecycle/host-tools/write-note-tool.js +47 -0
  116. package/dist/lifecycle/index.d.ts +2 -1
  117. package/dist/lifecycle/install.js +2 -1
  118. package/dist/lifecycle/installed-package-index.js +5 -8
  119. package/dist/lifecycle/mail/adapter-descriptors.d.ts +78 -0
  120. package/dist/lifecycle/mail/adapter-descriptors.js +155 -0
  121. package/dist/lifecycle/mail/catalog.d.ts +116 -0
  122. package/dist/lifecycle/mail/catalog.js +72 -0
  123. package/dist/lifecycle/mail/configuration.d.ts +25 -0
  124. package/dist/lifecycle/mail/configuration.js +62 -0
  125. package/dist/lifecycle/mail/contribution.d.ts +89 -0
  126. package/dist/lifecycle/mail/contribution.js +115 -0
  127. package/dist/lifecycle/mail/host-mailer.d.ts +24 -0
  128. package/dist/lifecycle/mail/host-mailer.js +10 -0
  129. package/dist/lifecycle/mail/index.d.ts +16 -0
  130. package/dist/lifecycle/mail/index.js +16 -0
  131. package/dist/lifecycle/mail/selection.d.ts +40 -0
  132. package/dist/lifecycle/mail/selection.js +86 -0
  133. package/dist/lifecycle/manifest.d.ts +7 -2
  134. package/dist/lifecycle/manifest.js +32 -9
  135. package/dist/lifecycle/metadata.d.ts +31 -0
  136. package/dist/lifecycle/metadata.js +80 -0
  137. package/dist/lifecycle/persistent-state.js +2 -1
  138. package/dist/lifecycle/ports.d.ts +2 -0
  139. package/dist/lifecycle/resolve-agent-plugin-refs.d.ts +2 -1
  140. package/dist/lifecycle/resolve-agent-plugin-refs.js +14 -8
  141. package/dist/lifecycle/search-projection.d.ts +3 -4
  142. package/dist/lifecycle/search-projection.js +5 -7
  143. package/dist/lifecycle/search.js +3 -2
  144. package/fly/plugin.json +5 -5
  145. package/fly/skills/fly/SKILL.md +1 -1
  146. package/formspree/plugin.json +7 -0
  147. package/formspree/skills/formspree/SKILL.md +11 -0
  148. package/github/plugin.json +2 -2
  149. package/github/skills/github/SKILL.md +28 -28
  150. package/github/skills/github/references/actions.md +8 -8
  151. package/github/skills/github/references/auth-and-tokens.md +7 -7
  152. package/github/skills/github/references/repo-files.md +5 -5
  153. package/github/skills/github/references/site-backup.md +16 -16
  154. package/github/skills/github/references/source-control.md +17 -17
  155. package/github-pages/plugin.json +2 -2
  156. package/github-pages/skills/github-pages/SKILL.md +3 -3
  157. package/google-forms/plugin.json +7 -0
  158. package/google-forms/skills/google-forms/SKILL.md +15 -0
  159. package/google-login/plugin.json +3 -3
  160. package/google-login/skills/google-login/SKILL.md +17 -60
  161. package/google-workspace/plugin.json +6 -6
  162. package/google-workspace/skills/google-workspace/references/connection.md +1 -1
  163. package/google-workspace/skills/google-workspace/references/form-delivery.md +4 -4
  164. package/google-workspace/tovu-admin-surfaces.json +5 -5
  165. package/higgsfield-media/plugin.json +5 -5
  166. package/higgsfield-media/skills/higgsfield-media/SKILL.md +31 -33
  167. package/higgsfield-media/skills/higgsfield-media/references/failure-modes.md +7 -7
  168. package/higgsfield-media/skills/higgsfield-media/references/models-and-plan-gates.md +3 -3
  169. package/jev/plugin.json +2 -2
  170. package/langfuse/plugin.json +2 -2
  171. package/meilisearch/plugin.json +2 -2
  172. package/meilisearch/skills/meilisearch/SKILL.md +1 -1
  173. package/netlify/plugin.json +2 -2
  174. package/netlify/skills/netlify/SKILL.md +3 -3
  175. package/opentelemetry/plugin.json +2 -2
  176. package/opentelemetry/skills/opentelemetry/SKILL.md +7 -7
  177. package/package.json +92 -14
  178. package/posthog/plugin.json +2 -2
  179. package/posthog/skills/posthog/SKILL.md +7 -7
  180. package/railway/plugin.json +3 -3
  181. package/railway/skills/railway/SKILL.md +10 -11
  182. package/render/plugin.json +3 -3
  183. package/render/skills/render/SKILL.md +7 -8
  184. package/resend/NOTES.md +2 -2
  185. package/resend/mcp.json +1 -1
  186. package/resend/plugin.json +5 -5
  187. package/resend/skills/resend/SKILL.md +13 -13
  188. package/s3-compatible/plugin.json +2 -2
  189. package/s3-compatible/skills/s3-compatible/SKILL.md +4 -4
  190. package/sentry/plugin.json +2 -2
  191. package/sentry/skills/sentry/SKILL.md +7 -7
  192. package/shopify/plugin.json +2 -2
  193. package/site-compliance/plugin.json +2 -2
  194. package/site-compliance/skills/site-compliance/SKILL.md +3 -3
  195. package/site-compliance/skills/site-compliance/references/gdpr-eu-uk.md +1 -1
  196. package/site-import/plugin.json +2 -2
  197. package/slide-design/plugin.json +2 -2
  198. package/software-engineering/LICENSE +201 -0
  199. package/software-engineering/NOTICE +9 -0
  200. package/software-engineering/README.md +89 -0
  201. package/software-engineering/plugin.json +24 -0
  202. package/software-engineering/skills/software-engineering/SKILL.md +33 -0
  203. package/software-engineering/skills/software-engineering/references/debugging.md +54 -0
  204. package/software-engineering/skills/software-engineering/references/implementation.md +27 -0
  205. package/software-engineering/skills/software-engineering/references/planning.md +27 -0
  206. package/software-engineering/skills/software-engineering/references/prototyping.md +14 -0
  207. package/software-engineering/skills/software-engineering/references/security.md +47 -0
  208. package/software-engineering/skills/software-engineering/references/verification.md +53 -0
  209. package/stripe/plugin.json +2 -2
  210. package/supabase/mcp.json +4 -4
  211. package/supabase/plugin.json +3 -3
  212. package/supabase/skills/supabase/SKILL.md +8 -8
  213. package/supabase/skills/supabase/references/failure-modes.md +5 -5
  214. package/ui-ux-design/plugin.json +2 -2
  215. package/vercel/plugin.json +2 -2
  216. package/vercel/skills/vercel/SKILL.md +3 -3
  217. package/wordpress/plugin.json +2 -2
  218. package/wordpress/skills/wordpress/SKILL.md +3 -3
  219. package/wordpress/skills/wordpress/references/free-site-redirect.md +2 -2
  220. package/wordpress/skills/wordpress/references/subdomain.md +5 -5
@@ -0,0 +1,114 @@
1
+ import { type AgentPluginTokenTargetDeps, type TokenAuthTarget } from "./access-token-tool.js";
2
+ import type { McpServerConfig } from "../lifecycle/manifest.js";
3
+ import type { AgentPluginInstalledMcpReads } from "./federate-mcp.js";
4
+ import type { SavedTokenSwitchOutcome } from "./switch-on-saved-token.js";
5
+ /**
6
+ * @file Saves an access token that did NOT come through `agent_plugin_set_access_token`'s form onto
7
+ * an Agent Plugin's token-auth row, then switches the plugin on (`switch-on-saved-token.ts`, shared
8
+ * with the tool) — the same end state as a pasted token followed by a first sign-in.
9
+ *
10
+ * Two callers, both at boot (`server/runtime/boot/bootstrap.ts`):
11
+ * - {@link importAgentPluginAccessTokensFromEnv}: a plugin's `mcp.json` may name an old env var
12
+ * (`tokenAuth.importFromEnv`) whose token is copied over. Added 2026-09-29 when the Supabase
13
+ * env preset (host-provided variable names) was retired in favour of the Supabase plugin.
14
+ * - create-site onboarding's pending tokens (`composition/pending-agent-plugin-tokens.ts`).
15
+ *
16
+ * Never overwrites: a row that already holds a credential (a sign-in or a saved token) keeps it; the
17
+ * switch-on still runs, so a save whose switch-on failed is finished by the next import.
18
+ * Not probed: the env token was already in use, and onboarding probes before it seals.
19
+ *
20
+ * The env import trusts only what THIS host build shipped: a declaration is read from a plugin only
21
+ * when its installed digest is the one `seed-bundled.ts` recorded (`bundled-digests.ts`), and the
22
+ * token only goes to a row still at that declaration's URL. Any installed package can declare
23
+ * `importFromEnv`, so without this an operator-installed plugin could name `OPENAI_API_KEY` and an
24
+ * endpoint of its own and be handed that secret at boot (Codex review 2026-09-29).
25
+ */
26
+ /** @agent-note Bind the SAME repo/vault/projection pair and saved-token switch owner as the token
27
+ * tool and sign-in callback. Imports finish an interrupted switch without replacing a credential.
28
+ * `importActor` is YOUR stable saved principal id; no filesystem, actor or activation default exists here. */
29
+ export interface ImportAgentPluginAccessTokenDeps extends AgentPluginTokenTargetDeps {
30
+ readonly importActor: string;
31
+ readonly switchOnSavedToken: (required: {
32
+ target: TokenAuthTarget;
33
+ }) => Promise<SavedTokenSwitchOutcome>;
34
+ }
35
+ /** `saved-left-off`: the token is saved but an operator had turned the plugin or its connection off,
36
+ * so it stays off (`switch-on-saved-token.ts`).
37
+ * @agent-note Retry the SAME switch owner without replacing an existing credential; an operator's
38
+ * explicit off is preserved even after a successful sealed save. */
39
+ export type ImportAgentPluginAccessTokenOutcome = "saved" | "saved-left-off" | "already-connected";
40
+ /**
41
+ * Seals `token` onto `pluginId`'s token-auth row unless that row already has a credential, then
42
+ * switches the plugin on (also when it already had one, to finish an earlier interrupted import).
43
+ *
44
+ * @throws {import("@jini-ai/core").ToolInputError} Plugin not installed, or no single token-auth server.
45
+ * @throws Whatever the store throws on save (e.g. an unconfigured secret store).
46
+ * @complexity O(s) in the plugin's declared servers, plus one row read and at most two writes.
47
+ */
48
+ export declare function importAgentPluginAccessToken(required: {
49
+ readonly deps: ImportAgentPluginAccessTokenDeps;
50
+ readonly input: {
51
+ readonly pluginId: string;
52
+ readonly token: string;
53
+ readonly principalId?: string;
54
+ /** When set, the token is saved only onto a row at exactly this URL (the env import's rule). */
55
+ readonly onlyAtUrl?: string;
56
+ };
57
+ }, _optional?: Record<string, never>): Promise<ImportAgentPluginAccessTokenOutcome>;
58
+ /** One installed plugin's id and declared servers.
59
+ * @agent-note Your lifecycle owner's safe declaration projection, not a copied store row.
60
+ * Only a matching host-seeded digest makes bundled true and permits environment-token import. */
61
+ export interface InstalledAgentPluginServers {
62
+ readonly pluginId: string;
63
+ readonly servers: Readonly<Record<string, McpServerConfig>>;
64
+ /** True only when this is the digest this host build seeded for the id (`bundled-digests.ts`).
65
+ * Absent reads as not bundled. */
66
+ readonly bundled?: boolean;
67
+ }
68
+ /** Every installed plugin in the workspace, one per id (the bundled-preferred digest).
69
+ * @agent-note Bind YOUR lifecycle owner's trusted workspace root and installed reads. This job
70
+ * reads the ledger first, then lists/prefer-selects installed packages, then reads one declaration
71
+ * per first-seen id; the SAME ledger decides bundled eligibility. Fresh reads, no cache. */
72
+ export declare function listInstalledAgentPluginServers(input: {
73
+ readonly workspaceRoot: string;
74
+ readonly lifecycle: AgentPluginInstalledMcpReads;
75
+ }, _options?: {}): Promise<readonly InstalledAgentPluginServers[]>;
76
+ /** @agent-note Your boot log sink; importer/store error text is deliberately withheld because it
77
+ * may contain a token. Keep the safe fixed failure copy rather than logging the caught error. */
78
+ export interface TokenImportLog {
79
+ info(message: string): void;
80
+ warn(message: string): void;
81
+ }
82
+ /** @agent-note The host supplies environment VALUES and a fresh trusted installed listing; only
83
+ * rows whose bundled digest belongs to that host build may import. Pending explicit tokens win. */
84
+ export interface ImportAgentPluginAccessTokensFromEnvDeps extends ImportAgentPluginAccessTokenDeps {
85
+ /** @agent-note Bind {@link listInstalledAgentPluginServers} over your lifecycle owner and root. */
86
+ readonly listPlugins: () => Promise<readonly InstalledAgentPluginServers[]>;
87
+ /** @agent-note YOUR screen name and safe failure guidance. Never interpolate an importer error
88
+ * or token; these messages go to the boot log and can outlive the current process. */
89
+ readonly importMessages: {
90
+ readonly pluginsScreen: string;
91
+ failed(required: {
92
+ envName: string;
93
+ pluginId: string;
94
+ }): string;
95
+ };
96
+ }
97
+ /**
98
+ * Boot: for each bundled plugin whose token-auth server names `importFromEnv`, copies a set env
99
+ * token onto its row (logged once, on the boot that copies it — later boots find the row connected
100
+ * and say nothing), and names any set `retiredEnv` vars as no longer used. Never throws: a failed
101
+ * import is a warning and the next boot tries again.
102
+ *
103
+ * @complexity O(p·s) over installed plugins and their servers, plus one import per set env token.
104
+ */
105
+ export declare function importAgentPluginAccessTokensFromEnv(required: {
106
+ readonly deps: ImportAgentPluginAccessTokensFromEnvDeps;
107
+ readonly env: Readonly<Record<string, string | undefined>>;
108
+ readonly log: TokenImportLog;
109
+ }, options?: {
110
+ /** Plugins with a create-site onboarding token still pending: that explicit token wins over the
111
+ * env one, so the env token is not copied onto them (`bootstrap.ts`). */
112
+ readonly skipPluginIds?: ReadonlySet<string> | undefined;
113
+ }): Promise<void>;
114
+ //# sourceMappingURL=import-access-token.d.ts.map
@@ -0,0 +1,103 @@
1
+ import { resolveTarget, saveStaticAccessToken } from "./access-token-tool.js";
2
+ import { hasStoredAgentPluginCredential } from "./connect-tool.js";
3
+ /**
4
+ * Seals `token` onto `pluginId`'s token-auth row unless that row already has a credential, then
5
+ * switches the plugin on (also when it already had one, to finish an earlier interrupted import).
6
+ *
7
+ * @throws {import("@jini-ai/core").ToolInputError} Plugin not installed, or no single token-auth server.
8
+ * @throws Whatever the store throws on save (e.g. an unconfigured secret store).
9
+ * @complexity O(s) in the plugin's declared servers, plus one row read and at most two writes.
10
+ */
11
+ export async function importAgentPluginAccessToken(required, _optional = {}) {
12
+ const { deps, input } = required;
13
+ const principalId = input.principalId ?? deps.importActor;
14
+ const target = await resolveTarget({ routeDeps: deps, pluginId: input.pluginId, principalId });
15
+ const row = await deps.mcp.repo.findByServerId({ workspaceId: deps.workspaceId, serverId: target.connectionId });
16
+ if (row && hasStoredAgentPluginCredential({ row, projections: deps.mcp.projections })) {
17
+ // Finishes a switch-on an earlier import saved the token for but did not complete (it threw
18
+ // after the save): idempotent, and it keeps an operator's off switch (`switch-on-saved-token.ts`).
19
+ await deps.switchOnSavedToken({ target });
20
+ return "already-connected";
21
+ }
22
+ if (input.onlyAtUrl !== undefined && (row?.url ?? target.config.url) !== input.onlyAtUrl) {
23
+ throw new Error(`its '${target.connectionId}' connection points at a different URL than the '${input.pluginId}' plugin declares, so the token is not copied there`);
24
+ }
25
+ await saveStaticAccessToken({ routeDeps: deps, target, principalId, token: input.token });
26
+ const switched = await deps.switchOnSavedToken({ target });
27
+ return switched.state === "on" ? "saved" : "saved-left-off";
28
+ }
29
+ /** Every installed plugin in the workspace, one per id (the bundled-preferred digest).
30
+ * @agent-note Bind YOUR lifecycle owner's trusted workspace root and installed reads. This job
31
+ * reads the ledger first, then lists/prefer-selects installed packages, then reads one declaration
32
+ * per first-seen id; the SAME ledger decides bundled eligibility. Fresh reads, no cache. */
33
+ export async function listInstalledAgentPluginServers(input, _options = {}) {
34
+ const ledger = await input.lifecycle.readBundledAgentPluginDigests({ workspaceRoot: input.workspaceRoot });
35
+ const installed = input.lifecycle.preferBundledAgentPluginDigests({ installed: await input.lifecycle.listInstalledPlugins({ workspaceRoot: input.workspaceRoot }), bundled: ledger });
36
+ const seen = new Set();
37
+ const out = [];
38
+ for (const plugin of installed) {
39
+ if (seen.has(plugin.pluginId))
40
+ continue;
41
+ seen.add(plugin.pluginId);
42
+ out.push({ pluginId: plugin.pluginId, servers: await input.lifecycle.readInstalledMcpServers({ packageRoot: plugin.packageRoot }), bundled: ledger.get(plugin.pluginId) === plugin.archiveDigest });
43
+ }
44
+ return out;
45
+ }
46
+ /** The env declarations of every token-auth server across the BUNDLED plugins (see this file's header). */
47
+ function envDeclarations(plugins) {
48
+ return plugins.flatMap(({ pluginId, servers, bundled }) => bundled === true
49
+ ? Object.values(servers).flatMap((config) => (config.type !== "stdio" && config.tokenAuth ? [{ pluginId, url: config.url, auth: config.tokenAuth }] : []))
50
+ : []);
51
+ }
52
+ /**
53
+ * Boot: for each bundled plugin whose token-auth server names `importFromEnv`, copies a set env
54
+ * token onto its row (logged once, on the boot that copies it — later boots find the row connected
55
+ * and say nothing), and names any set `retiredEnv` vars as no longer used. Never throws: a failed
56
+ * import is a warning and the next boot tries again.
57
+ *
58
+ * @complexity O(p·s) over installed plugins and their servers, plus one import per set env token.
59
+ */
60
+ export async function importAgentPluginAccessTokensFromEnv(required, options = {}) {
61
+ const { deps, env, log } = required;
62
+ let plugins;
63
+ try {
64
+ plugins = await deps.listPlugins();
65
+ }
66
+ catch (err) {
67
+ log.warn(`[agent-plugins] could not list plugins to import env tokens: ${err instanceof Error ? err.message : String(err)}`);
68
+ return;
69
+ }
70
+ for (const { pluginId, url, auth } of envDeclarations(plugins)) {
71
+ reportRetiredEnv({ pluginId, auth, env, log });
72
+ const token = auth.importFromEnv ? (env[auth.importFromEnv] ?? "").trim() : "";
73
+ await importDeclaredEnvToken({ deps, pluginId, url, auth, token, log, skipPluginIds: options.skipPluginIds });
74
+ }
75
+ }
76
+ /** Retirement notices are independent of whether this boot has a token to import. */
77
+ function reportRetiredEnv(input, _options = {}) {
78
+ const { pluginId, auth, env, log } = input;
79
+ const retiredSet = (auth.retiredEnv ?? []).filter((name) => (env[name] ?? "").trim() !== "");
80
+ if (retiredSet.length > 0) {
81
+ log.info(`[agent-plugins] ${retiredSet.join(", ")} ${retiredSet.length === 1 ? "is" : "are"} no longer used; the '${pluginId}' plugin's connection replaces them. You can remove them.`);
82
+ }
83
+ }
84
+ /** Isolate one import's failure so later declarations still run. */
85
+ async function importDeclaredEnvToken(input, _options = {}) {
86
+ const { deps, pluginId, url, auth, token, log, skipPluginIds } = input;
87
+ if (!auth.importFromEnv || token === "" || skipPluginIds?.has(pluginId))
88
+ return;
89
+ try {
90
+ const outcome = await importAgentPluginAccessToken({ deps, input: { pluginId, token, onlyAtUrl: url } });
91
+ if (outcome === "saved") {
92
+ log.info(`[agent-plugins] copied ${auth.importFromEnv} onto the '${pluginId}' plugin's connection and switched it on. The env var is no longer needed.`);
93
+ }
94
+ if (outcome === "saved-left-off") {
95
+ log.info(`[agent-plugins] copied ${auth.importFromEnv} onto the '${pluginId}' plugin's connection; it stays off because an operator turned it off (${deps.importMessages.pluginsScreen}). The env var is no longer needed.`);
96
+ }
97
+ }
98
+ catch {
99
+ // Importer/store failures can echo the token; keep all importer text out of boot logs.
100
+ log.warn(deps.importMessages.failed({ envName: auth.importFromEnv, pluginId }));
101
+ }
102
+ }
103
+ //# sourceMappingURL=import-access-token.js.map
@@ -0,0 +1,19 @@
1
+ export { createCredentialSaveTools, type CredentialSaveMessages, type CredentialSaveAdapters } from './credential-save-tool.js';
2
+ export { createPluginCredentialCardOperations, findPluginCredentialCard, loadPluginCredentialCardsSafely, type LoadPluginCredentialCards, type PluginCredentialCardPorts } from './plugin-credential-card.js';
3
+ export { parsePluginCredentialCards, parseCredentialCardUsedFor, credentialCardsContribution, mergePluginCredentialCards } from './credential-cards.js';
4
+ export * from './ports.js';
5
+ export * from './federate-mcp.js';
6
+ export * from './enable-access.js';
7
+ export * from './apply-connect-defaults.js';
8
+ export * from './switch-on-saved-token.js';
9
+ export * from './connection-status.js';
10
+ export * from './connect-card-ui.js';
11
+ export * from './connect-destination.js';
12
+ export * from './connect-sign-in-wait.js';
13
+ export * from './connect-tool.js';
14
+ export * from './access-token-tool.js';
15
+ export * from './token-sign-in.js';
16
+ export * from './import-access-token.js';
17
+ export * from './grant-signed-in-defaults.js';
18
+ export * from './apply-tool-renames.js';
19
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,19 @@
1
+ export { createCredentialSaveTools } from './credential-save-tool.js';
2
+ export { createPluginCredentialCardOperations, findPluginCredentialCard, loadPluginCredentialCardsSafely } from './plugin-credential-card.js';
3
+ export { parsePluginCredentialCards, parseCredentialCardUsedFor, credentialCardsContribution, mergePluginCredentialCards } from './credential-cards.js';
4
+ export * from './ports.js';
5
+ export * from './federate-mcp.js';
6
+ export * from './enable-access.js';
7
+ export * from './apply-connect-defaults.js';
8
+ export * from './switch-on-saved-token.js';
9
+ export * from './connection-status.js';
10
+ export * from './connect-card-ui.js';
11
+ export * from './connect-destination.js';
12
+ export * from './connect-sign-in-wait.js';
13
+ export * from './connect-tool.js';
14
+ export * from './access-token-tool.js';
15
+ export * from './token-sign-in.js';
16
+ export * from './import-access-token.js';
17
+ export * from './grant-signed-in-defaults.js';
18
+ export * from './apply-tool-renames.js';
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,46 @@
1
+ import type { PluginCredentialCard } from "@jini-ai/core/contracts/credentials";
2
+ /** Composition-supplied loader; absent when no plugin catalog can declare cards here. */
3
+ export type LoadPluginCredentialCards = (workspaceId: string) => Promise<readonly PluginCredentialCard[]>;
4
+ /** Host-owned exception identity and public-field policy are preserved through these ports. */
5
+ export interface PluginCredentialCardPorts {
6
+ readonly cardErrors: {
7
+ validation(message: string, field?: string): Error;
8
+ };
9
+ readonly assertFreeField: (required: {
10
+ value: string;
11
+ field: string;
12
+ }) => void;
13
+ }
14
+ /** @agent-note Supply the same validation error constructor and field policy used by the host's credential store. */
15
+ export declare function createPluginCredentialCardOperations({ cardErrors, assertFreeField }: PluginCredentialCardPorts, _optional?: Record<string, never>): {
16
+ readPluginCredentialValues: ({ card, values }: {
17
+ card: PluginCredentialCard;
18
+ values: Readonly<Record<string, unknown>>;
19
+ }, _options?: {}) => {
20
+ label: string;
21
+ category: string;
22
+ baseUrl: string;
23
+ username?: string | undefined;
24
+ token: string;
25
+ additionalHosts?: readonly string[];
26
+ };
27
+ findPluginCredentialCard: typeof findPluginCredentialCard;
28
+ loadPluginCredentialCardsSafely: typeof loadPluginCredentialCardsSafely;
29
+ };
30
+ /** Resolve copy only for the matching domain and provider, never a similarly named card. */
31
+ export declare function findPluginCredentialCard({ loadCards, workspaceId, saveKind, target }: {
32
+ loadCards?: LoadPluginCredentialCards | undefined;
33
+ workspaceId: string;
34
+ saveKind: PluginCredentialCard['saveKind'];
35
+ target: string;
36
+ }, _options?: {}): Promise<PluginCredentialCard | undefined>;
37
+ /** Optional display data cannot prevent a domain's authorized credential operation. O(cards).
38
+ * Failures report a fixed warning, without reflecting filesystem paths or credential metadata.
39
+ */
40
+ export declare function loadPluginCredentialCardsSafely({ loadCards, workspaceId }: {
41
+ loadCards?: LoadPluginCredentialCards | undefined;
42
+ workspaceId: string;
43
+ }, options?: {
44
+ warn?: (message: string) => void;
45
+ }): Promise<readonly PluginCredentialCard[]>;
46
+ //# sourceMappingURL=plugin-credential-card.d.ts.map
@@ -0,0 +1,63 @@
1
+ /** @agent-note Supply the same validation error constructor and field policy used by the host's credential store. */
2
+ export function createPluginCredentialCardOperations({ cardErrors, assertFreeField }, _optional = {}) {
3
+ /** Extract API inputs from the human card. Fixed destinations cannot be changed by form params.
4
+ * Required public fields and dynamic HTTPS origins are checked before sealing. @complexity O(f).
5
+ */
6
+ function readPluginCredentialValues({ card, values }, _options = {}) {
7
+ const publicValues = Object.fromEntries((card.fields ?? []).map(field => [field.name, readPublicField({ field, values })]));
8
+ const baseUrl = card.baseUrl || publicValues.baseUrl || '';
9
+ if (!card.baseUrl)
10
+ assertHttpsInput({ value: baseUrl });
11
+ return { label: card.label, category: card.category, baseUrl, username: publicValues.username,
12
+ token: typeof values.token === 'string' ? values.token : '',
13
+ ...(card.additionalHosts === undefined ? {} : { additionalHosts: card.additionalHosts }) };
14
+ }
15
+ /** Public fields share the existing credential-free-value invariant with other credential forms. */
16
+ function readPublicField({ field, values }, _options = {}) {
17
+ const value = values[field.name];
18
+ if (field.required && (typeof value !== 'string' || !value.trim()))
19
+ throw cardErrors.validation(`${field.name} is required`);
20
+ if (value === undefined)
21
+ return undefined;
22
+ if (typeof value !== 'string')
23
+ throw cardErrors.validation(`${field.name} must be text`);
24
+ assertFreeField({ value, field: field.name });
25
+ return value;
26
+ }
27
+ /** The API store permits HTTP for legacy rows; plugin-declared dynamic origins require HTTPS. */
28
+ function assertHttpsInput({ value }, _options = {}) {
29
+ let url;
30
+ try {
31
+ url = new URL(value);
32
+ }
33
+ catch {
34
+ throw cardErrors.validation('Server URL must use HTTPS');
35
+ }
36
+ if (url.protocol !== 'https:' || url.username || url.password)
37
+ throw cardErrors.validation('Server URL must use HTTPS without credentials');
38
+ }
39
+ return { readPluginCredentialValues, findPluginCredentialCard, loadPluginCredentialCardsSafely };
40
+ }
41
+ /** Resolve copy only for the matching domain and provider, never a similarly named card. */
42
+ export async function findPluginCredentialCard({ loadCards, workspaceId, saveKind, target }, _options = {}) {
43
+ return (await loadPluginCredentialCardsSafely({ loadCards, workspaceId })).find(card => cardMatches({ card, saveKind, target }));
44
+ }
45
+ /** A missing saveKind keeps the original API-card contract (credential-cards.ts isApiCard). */
46
+ function cardMatches({ card, saveKind, target }, _options = {}) {
47
+ if (saveKind === "api")
48
+ return (card.saveKind ?? "api") === "api" && card.label === target;
49
+ return card.saveKind === saveKind && (card.saveTarget ?? card.providerId) === target;
50
+ }
51
+ /** Optional display data cannot prevent a domain's authorized credential operation. O(cards).
52
+ * Failures report a fixed warning, without reflecting filesystem paths or credential metadata.
53
+ */
54
+ export async function loadPluginCredentialCardsSafely({ loadCards, workspaceId }, options = {}) {
55
+ try {
56
+ return await loadCards?.(workspaceId) ?? [];
57
+ }
58
+ catch {
59
+ (options.warn ?? console.warn)("[plugin-credential-cards] Optional card lookup failed; using the default credential form.");
60
+ return [];
61
+ }
62
+ }
63
+ //# sourceMappingURL=plugin-credential-card.js.map
@@ -0,0 +1,203 @@
1
+ /** Portable plugin-host decisions (moved A9 from the A8 seam). Everything product- or runtime-specific is a
2
+ * required port the host binds; this file imports only @jini-ai/core, the agent-plugins lifecycle
3
+ * types (same package) and the connect bodies. It must never import the A10 connect
4
+ * cycle (`grant-signed-in-defaults.ts` and its neighbours): the sign-in grant arrives as the
5
+ * required `grantSignedInDefaults` port (pinned by `portable-plugin-host.no-cycle` test).
6
+ * Discovery is metadata-only and fresh on each call so disable/uninstall cannot leave stale grants. */
7
+ import type { Clock } from "@jini-ai/core/primitives";
8
+ import { type AccessApprovalResource } from '@jini-ai/core';
9
+ import { readPluginIdentity, type PluginIdentityCandidate, type PluginLookupPort } from '@jini-ai/core/plugin-directory';
10
+ import type { InstalledAgentPlugin } from '../../lifecycle/types.js';
11
+ import type { SetAgentPluginEnabledInput, SetAgentPluginEnabledResult } from '../../lifecycle/set-enabled.js';
12
+ import { provisionAgentPluginMcpServers, resolveAgentPluginMcpServers, type AgentPluginInstalledMcpReads, type AgentPluginMcpTrustClassifier } from '../federate-mcp.js';
13
+ import { type AgentPluginEnableAccessMessages } from '../enable-access.js';
14
+ import type { AgentPluginMcpPort, AgentPluginMcpProjectionPorts } from '../ports.js';
15
+ import type { McpServerConfig } from '../../lifecycle/manifest.js';
16
+ type AgentPluginLayoutInput = Parameters<typeof resolveAgentPluginMcpServers>[0]['agentPluginLayout'];
17
+ type ProvisioningFailure = Awaited<ReturnType<typeof provisionAgentPluginMcpServers>>['failed'][number];
18
+ /** The one discovery field set the host decisions read; a narrow local copy so the portable host
19
+ * does not depend on another plugin family's package. */
20
+ export interface PluginHostDiscoveryRecord {
21
+ readonly id: string;
22
+ readonly status: string;
23
+ readonly manifest?: unknown;
24
+ readonly version: string | null;
25
+ }
26
+ /** Point read of one site-runtime plugin's activation; `null` means never activated (off). */
27
+ export interface PluginHostActivation {
28
+ readonly enabled: boolean;
29
+ }
30
+ /** Deps handed to the sign-in grant. Shape matches the host's existing grant owner. */
31
+ /** @agent-note `Layout` is the host's own layout object, passed through to the grant untouched; this
32
+ * package reads only `forWorkspace(id).root` from it. */
33
+ export interface PluginHostGrantDeps<Layout extends AgentPluginLayoutInput = AgentPluginLayoutInput> extends AgentPluginMcpProjectionPorts {
34
+ readonly workspaceId: string;
35
+ readonly agentPluginLayout: Layout;
36
+ readonly repo: AgentPluginMcpPort['repo'];
37
+ readonly applyAccess: AgentPluginMcpPort['applyAccess'];
38
+ readonly clock: Clock;
39
+ readonly notifyRosterChanged: () => Promise<void>;
40
+ readonly warn: (message: string) => void;
41
+ }
42
+ /** Agent-plugin lifecycle owner, bound by the host. */
43
+ export interface PluginHostLifecycle<UninstallInput> {
44
+ /** @agent-note Provider: the host's installed-package index for THIS workspace. Every call is a
45
+ * fresh read (no cache), so a disable/uninstall is visible on the next lookup. */
46
+ listInstalled(): Promise<readonly InstalledAgentPlugin[]>;
47
+ /** @agent-note Provider: the host's revision-selection owner. Receives the list just read and
48
+ * returns the preferred revisions (e.g. bundled digests win). Must not invent a newest-version
49
+ * policy; order of reads is list → preference read → select, once per lookup. */
50
+ preferInstalled(required: {
51
+ installed: readonly InstalledAgentPlugin[];
52
+ }): Promise<readonly InstalledAgentPlugin[]>;
53
+ /** @agent-note Provider: the host's manifest reader for one installed revision; may throw (the
54
+ * revision is then omitted with a warning). Namespace must equal `namespace` below. */
55
+ readIdentity(required: {
56
+ plugin: InstalledAgentPlugin;
57
+ }): Promise<ReturnType<typeof readPluginIdentity>>;
58
+ /** @agent-note Provider: the activation owner's verdict for one plugin. Fail closed: throw on an
59
+ * unreadable activation store rather than answering `false`. */
60
+ isEnabled(required: {
61
+ pluginId: string;
62
+ }): Promise<boolean>;
63
+ /** @agent-note Provider: the activation owner's off records, read once per catalog request. */
64
+ inactivePluginIds(): Promise<ReadonlySet<string>>;
65
+ /** @agent-note Provider: the activation owner's writability probe; throws when writes would fail. */
66
+ assertWritable(): Promise<void>;
67
+ /** @agent-note Provider: the activation owner's durable enable/disable write. The host owns the
68
+ * roster-reload notification and the workspace layout it adds to the input; the result is
69
+ * returned unchanged. One activation queue: bind the same owner the admin toggle uses. */
70
+ setEnabled(required: SetAgentPluginEnabledInput): Promise<SetAgentPluginEnabledResult>;
71
+ /** @agent-note Provider: the host's uninstall tool runner. Input is passed through untouched
72
+ * (surfaces/ctx/executionOptions are host types); authorization and confirmation stay there. */
73
+ uninstall(required: UninstallInput): Promise<unknown>;
74
+ }
75
+ /** Product copy the host decisions report. Texts name host tools, so they are host input. */
76
+ export interface PluginHostMessages extends AgentPluginEnableAccessMessages {
77
+ /** @agent-note Product copy for an approved enable whose provisioning failed for `failed`
78
+ * servers. Returned text is passed through `redactSecrets` before it is thrown. Name the host's
79
+ * own enable tool for the retry hint. */
80
+ provisioningFailed(required: {
81
+ pluginId: string;
82
+ failed: readonly ProvisioningFailure[];
83
+ }): string;
84
+ /** @agent-note Product copy when an approved enable carries no access snapshot key. Nothing has
85
+ * been provisioned or granted when this is thrown. */
86
+ approvedSnapshotMissing(): string;
87
+ /** @agent-note Product copy when an approved enable's provisioning/grant threw; `detail` is the
88
+ * raw error message (unredacted) — the result is passed through `redactSecrets`. */
89
+ approvedLoadFailed(required: {
90
+ detail: string;
91
+ }): string;
92
+ }
93
+ export interface PluginHostDeps<UninstallInput, Layout extends AgentPluginLayoutInput = AgentPluginLayoutInput> {
94
+ readonly workspaceId: string;
95
+ readonly agentPluginLayout: Layout;
96
+ readonly clock: Clock;
97
+ /** @agent-note Your app's id; it is the namespace of every plugin identity this host reads and
98
+ * admits, so it must not change between installs. */
99
+ readonly namespace: string;
100
+ /** @agent-note Provider: the site-runtime plugin discovery owner. Metadata only, fresh per call. */
101
+ readonly discoverPlugins: () => Promise<readonly PluginHostDiscoveryRecord[]>;
102
+ /** @agent-note Provider: the site-runtime activation repo point read (same repo the runtime uses). */
103
+ readonly getActivation: (required: {
104
+ workspaceId: string;
105
+ pluginId: string;
106
+ }) => Promise<PluginHostActivation | null>;
107
+ readonly lifecycle: PluginHostLifecycle<UninstallInput>;
108
+ /** @agent-note Provider: the lifecycle owner's installed-package and `mcp.json` reads (object
109
+ * arguments, as `createAgentPluginLifecycle` returns them), fresh per call; the same owner as `lifecycle`. */
110
+ readonly installedMcp: AgentPluginInstalledMcpReads;
111
+ /** @agent-note Provider: the lifecycle owner's MCP trust rule; preview and provisioning both use it. */
112
+ readonly classifyTrust: AgentPluginMcpTrustClassifier;
113
+ /** @agent-note Host actor id saved as the write-grant attribution of a declined default grant; stable
114
+ * once rows exist (saved bytes). */
115
+ readonly declinedAccessActor: string;
116
+ /** @agent-note Serializes identity admission and publication across plugin kinds. Provider: ONE
117
+ * cross-process lock per agent-plugins tree (the host chooses the lock file; creating its parent
118
+ * is the host's job). Every install path of every family must take the same lock. */
119
+ readonly withLock: <T>(required: {
120
+ run: () => Promise<T>;
121
+ }) => Promise<T>;
122
+ /** @agent-note The host's MCP store port: ONE repo/vault/private context shared with the admin
123
+ * toggle and the sign-in callback; never a wrapped or re-sealed copy. It must carry the host's
124
+ * projection pair: portable bodies never fall back to another host's projections. */
125
+ readonly mcp: AgentPluginMcpPort & AgentPluginMcpProjectionPorts;
126
+ /** @agent-note The projection/error pair, resolved ONCE per binding by the host and shared by
127
+ * preview, provisioning grant and status (same function and error identity as `mcp`'s owner). */
128
+ readonly mcpPorts: AgentPluginMcpProjectionPorts;
129
+ /**
130
+ * @agent-note Host supplies its sign-in grant owner (for example a `grantDeclaredToolsToSignedInRows` owner).
131
+ * Order: called once per `provisionMcp`, AFTER provisioning and after its failure warnings; an
132
+ * approved enable whose provisioning failed refuses before this runs (no grant on a refused
133
+ * consent). `skipServerKeys` carries exactly the failed servers; `approvedEnable` is passed only
134
+ * for an approved enable, with the approved snapshot key. Same deps instance shape as the admin
135
+ * toggle; returns the connection ids it granted. Saved rows/approval bytes are the owner's.
136
+ */
137
+ readonly grantSignedInDefaults: (required: {
138
+ deps: PluginHostGrantDeps<Layout>;
139
+ pluginId: string;
140
+ servers: Readonly<Record<string, McpServerConfig>>;
141
+ }, optional: {
142
+ skipServerKeys?: readonly string[];
143
+ approvedEnable?: {
144
+ readonly principalId: string;
145
+ readonly accessKey: string;
146
+ };
147
+ }) => Promise<readonly string[]>;
148
+ /** @agent-note Host diagnostics sink (redacted strings only; never thrown at callers). */
149
+ readonly warn: (message: string) => void;
150
+ readonly messages: PluginHostMessages;
151
+ }
152
+ /** Lifecycle orchestration capability, structurally equal to the host's headless contract. */
153
+ export interface AgentPluginLifecycleCapability<UninstallInput> {
154
+ inactivePluginIds(): Promise<ReadonlySet<string>>;
155
+ previewEnableAccess(required: {
156
+ pluginId: string;
157
+ }): Promise<{
158
+ readonly key: string;
159
+ readonly resources?: readonly Omit<AccessApprovalResource, 'scope'>[];
160
+ }>;
161
+ recordDeclinedAccess(required: {
162
+ accessKey: string;
163
+ }): Promise<void>;
164
+ listInstalled(): Promise<readonly InstalledAgentPlugin[]>;
165
+ /** The lifecycle's revision-selection owner: the copies of `installed` the host would use. */
166
+ preferInstalled(required: {
167
+ installed: readonly InstalledAgentPlugin[];
168
+ }): Promise<readonly InstalledAgentPlugin[]>;
169
+ assertWritable(): Promise<void>;
170
+ setEnabled(required: SetAgentPluginEnabledInput): Promise<SetAgentPluginEnabledResult>;
171
+ provisionMcp(required: {
172
+ pluginId: string;
173
+ principalId: string;
174
+ }, optional?: {
175
+ readonly approvedEnable?: boolean;
176
+ readonly approvedEnableKey?: string;
177
+ }): Promise<void>;
178
+ uninstall(required: UninstallInput): Promise<unknown>;
179
+ }
180
+ export interface PortablePluginHost<UninstallInput> extends PluginLookupPort {
181
+ withInstallIdentity<T>(required: {
182
+ candidate: PluginIdentityCandidate;
183
+ run: () => Promise<T>;
184
+ }): Promise<T>;
185
+ getHostCapability(required: {
186
+ capability: 'agent-plugin-lifecycle';
187
+ }): AgentPluginLifecycleCapability<UninstallInput> | undefined;
188
+ }
189
+ /** Bind both plugin families to one workspace. Read manifests through the same installed-package
190
+ * index.
191
+ * @throws Unreadable activation (fail closed).
192
+ * Unreadable/invalid or ambiguous manifest metadata is omitted with a warning. Admission retains
193
+ * every valid revision identity, including revisions omitted from lookup, to prevent takeovers.
194
+ * @complexity O(p log p) per lookup, plus existing discovery/activation I/O for p installs.
195
+ */
196
+ export declare function createPluginHost<UninstallInput, Layout extends AgentPluginLayoutInput = AgentPluginLayoutInput>({ deps }: {
197
+ deps: PluginHostDeps<UninstallInput, Layout>;
198
+ }, optional?: {
199
+ resolveMcpServers?: typeof resolveAgentPluginMcpServers;
200
+ provisionMcpServers?: typeof provisionAgentPluginMcpServers;
201
+ }): PortablePluginHost<UninstallInput>;
202
+ export {};
203
+ //# sourceMappingURL=index.d.ts.map