@jini-ai/agent-plugins 0.7.2 → 0.7.3-next.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 (235) hide show
  1. package/CHANGELOG.md +4 -6
  2. package/NOTICE +2 -0
  3. package/README.md +11 -15
  4. package/calendly/plugin.json +3 -3
  5. package/cloudflare/lib/forms.mjs +9 -10
  6. package/cloudflare/lib/target.mjs +1 -1
  7. package/cloudflare/plugin.json +3 -3
  8. package/cloudflare/worker/forms-receiver.mjs +9 -9
  9. package/composio/plugin.json +3 -3
  10. package/core/persistent-state.js +227 -163
  11. package/dist/admin-surfaces/connections/connections.d.ts +11 -6
  12. package/dist/admin-surfaces/connections/connections.js +102 -85
  13. package/dist/admin-surfaces/node.d.ts +27 -0
  14. package/dist/admin-surfaces/node.js +32 -0
  15. package/dist/admin-surfaces/plugin-state.js +21 -18
  16. package/dist/admin-surfaces/surface-client.d.ts +4 -0
  17. package/dist/admin-surfaces/surface-client.js +124 -117
  18. package/dist/admin-surfaces/surface-handlers.js +21 -17
  19. package/dist/admin-surfaces/theme.d.ts +5 -1
  20. package/dist/admin-surfaces/theme.js +3 -3
  21. package/dist/connect/access-token-tool.d.ts +3 -1
  22. package/dist/connect/access-token-tool.js +3 -2
  23. package/dist/connect/apply-connect-defaults.js +2 -2
  24. package/dist/connect/apply-tool-renames.js +9 -8
  25. package/dist/connect/connect-tool.d.ts +2 -0
  26. package/dist/connect/connect-tool.js +3 -2
  27. package/dist/connect/credential-cards.js +3 -2
  28. package/dist/connect/credential-save-tool.d.ts +14 -11
  29. package/dist/connect/credential-save-tool.js +128 -121
  30. package/dist/connect/enable-access.d.ts +2 -2
  31. package/dist/connect/enable-access.js +6 -6
  32. package/dist/connect/executable/register.js +40 -34
  33. package/dist/connect/federate-mcp.d.ts +21 -11
  34. package/dist/connect/federate-mcp.js +28 -21
  35. package/dist/connect/grant-signed-in-defaults.js +3 -3
  36. package/dist/connect/import-access-token.js +2 -1
  37. package/dist/connect/index.d.ts +1 -0
  38. package/dist/connect/index.js +1 -0
  39. package/dist/connect/plugin-credential-card.js +2 -1
  40. package/dist/connect/plugin-host/index.d.ts +9 -5
  41. package/dist/connect/plugin-host/index.js +113 -100
  42. package/dist/connect/ports.d.ts +1 -1
  43. package/dist/connect/row-update.d.ts +22 -0
  44. package/dist/connect/row-update.js +18 -0
  45. package/dist/connect/switch-on-saved-token.d.ts +4 -2
  46. package/dist/connect/switch-on-saved-token.js +1 -1
  47. package/dist/connect/token-map.d.ts +44 -0
  48. package/dist/connect/token-map.js +49 -0
  49. package/dist/core/identity-namespace.js +5 -0
  50. package/dist/folder-zip.d.ts +3 -1
  51. package/dist/folder-zip.js +2 -2
  52. package/dist/lifecycle/activation.d.ts +4 -4
  53. package/dist/lifecycle/activation.js +4 -5
  54. package/dist/lifecycle/automatic-use.js +236 -210
  55. package/dist/lifecycle/bundled-digests.d.ts +75 -12
  56. package/dist/lifecycle/bundled-digests.js +213 -212
  57. package/dist/lifecycle/bundled-source-archive.d.ts +1 -1
  58. package/dist/lifecycle/bundled-source-archive.js +263 -264
  59. package/dist/lifecycle/capability-projection.d.ts +1 -1
  60. package/dist/lifecycle/capability-projection.js +1 -1
  61. package/dist/lifecycle/credential-card-metadata.d.ts +1 -1
  62. package/dist/lifecycle/credential-card-metadata.js +27 -3
  63. package/dist/lifecycle/exports.js +9 -4
  64. package/dist/lifecycle/fetch-archive.d.ts +1 -1
  65. package/dist/lifecycle/fetch-archive.js +1 -1
  66. package/dist/lifecycle/host-tools/identity.js +3 -2
  67. package/dist/lifecycle/host-tools/ports.d.ts +2 -0
  68. package/dist/lifecycle/host-tools/search-tool.js +8 -8
  69. package/dist/lifecycle/host-tools/skill-tool.d.ts +18 -2
  70. package/dist/lifecycle/host-tools/skill-tool.js +16 -8
  71. package/dist/lifecycle/index.d.ts +118 -110
  72. package/dist/lifecycle/index.js +45 -12
  73. package/dist/lifecycle/install-errors.d.ts +1 -1
  74. package/dist/lifecycle/install-from-url.d.ts +1 -1
  75. package/dist/lifecycle/install-from-url.js +1 -1
  76. package/dist/lifecycle/install.d.ts +7 -2
  77. package/dist/lifecycle/install.js +414 -396
  78. package/dist/lifecycle/installed-package-index.js +45 -42
  79. package/dist/lifecycle/layout.d.ts +1 -1
  80. package/dist/lifecycle/layout.js +1 -1
  81. package/dist/lifecycle/mail/catalog.d.ts +8 -32
  82. package/dist/lifecycle/mail/catalog.js +25 -20
  83. package/dist/lifecycle/mail/contribution.d.ts +2 -2
  84. package/dist/lifecycle/mail/contribution.js +34 -34
  85. package/dist/lifecycle/mail/selection.js +6 -2
  86. package/dist/lifecycle/manifest.d.ts +3 -3
  87. package/dist/lifecycle/manifest.js +4 -4
  88. package/dist/lifecycle/mcp-provisioning.d.ts +3 -3
  89. package/dist/lifecycle/mcp-provisioning.js +3 -3
  90. package/dist/lifecycle/package-paths.d.ts +1 -1
  91. package/dist/lifecycle/package-paths.js +1 -1
  92. package/dist/lifecycle/persistent-state.js +1 -2
  93. package/dist/lifecycle/ports.d.ts +5 -1
  94. package/dist/lifecycle/resolve-agent-plugin-refs.d.ts +30 -8
  95. package/dist/lifecycle/resolve-agent-plugin-refs.js +227 -228
  96. package/dist/lifecycle/retire-bundled.d.ts +1 -52
  97. package/dist/lifecycle/retire-bundled.js +134 -84
  98. package/dist/lifecycle/search.d.ts +2 -1
  99. package/dist/lifecycle/search.js +1 -1
  100. package/dist/lifecycle/seed-bundled.d.ts +1 -1
  101. package/dist/lifecycle/seed-bundled.js +154 -155
  102. package/dist/lifecycle/set-enabled.d.ts +1 -1
  103. package/dist/lifecycle/set-enabled.js +1 -1
  104. package/dist/lifecycle/skill-file-reader.js +53 -50
  105. package/dist/lifecycle/tools/projection.d.ts +4 -7
  106. package/dist/lifecycle/tools/projection.js +109 -108
  107. package/dist/lifecycle/trusted-plugin-files.d.ts +2 -2
  108. package/dist/lifecycle/trusted-plugin-files.js +1 -1
  109. package/dist/lifecycle/uninstall.d.ts +1 -1
  110. package/dist/lifecycle/uninstall.js +237 -241
  111. package/dist/lifecycle/update-store.js +20 -17
  112. package/dist/lifecycle/update.js +287 -281
  113. package/dist/lifecycle/yauzl-archive-reader.d.ts +2 -2
  114. package/dist/lifecycle/yauzl-archive-reader.js +8 -2
  115. package/dist/manifest.d.ts +11 -3
  116. package/dist/manifest.js +9 -9
  117. package/fly/jini-credential-schemes.json +11 -0
  118. package/fly/plugin.json +3 -4
  119. package/github/plugin.json +3 -3
  120. package/github/source-control/backup-push.mjs +11 -11
  121. package/github/source-control/commit-site.mjs +3 -3
  122. package/github/source-control/github.mjs +12 -6
  123. package/github/source-control/write-files.mjs +27 -28
  124. package/github-pages/{tovu-deploy-targets.json → jini-deploy-targets.json} +22 -22
  125. package/github-pages/plugin.json +3 -3
  126. package/github-pages/targets/github-pages.mjs +3 -3
  127. package/google-login/plugin.json +3 -3
  128. package/google-workspace/README.md +14 -14
  129. package/google-workspace/form-destinations/README.md +3 -3
  130. package/google-workspace/form-destinations/dedupe.mjs +1 -1
  131. package/google-workspace/form-destinations/mapping.mjs +8 -9
  132. package/google-workspace/form-destinations/sheets.mjs +1 -1
  133. package/google-workspace/{tovu-admin-surfaces.json → jini-admin-surfaces.json} +2 -2
  134. package/google-workspace/{tovu-agent-tools.json → jini-agent-tools.json} +28 -28
  135. package/google-workspace/{tovu-connections.json → jini-connections.json} +2 -2
  136. package/google-workspace/lib/auth.mjs +2 -2
  137. package/google-workspace/lib/form-destination-settings.mjs +1 -1
  138. package/google-workspace/lib/picker-flow.mjs +2 -2
  139. package/google-workspace/lib/request-policy.mjs +1 -1
  140. package/google-workspace/lib/surface-actions.mjs +1 -1
  141. package/google-workspace/plugin.json +3 -3
  142. package/google-workspace/tools/sheets/README.md +3 -3
  143. package/google-workspace/tools/sheets-admin/README.md +3 -3
  144. package/google-workspace/ui/README.md +4 -4
  145. package/google-workspace/ui/connection-panel.mjs +51 -51
  146. package/google-workspace/ui/destination-panel.mjs +34 -34
  147. package/google-workspace/ui/dom.mjs +15 -16
  148. package/google-workspace/ui/picker-flow.mjs +2 -2
  149. package/google-workspace/ui/picker.mjs +19 -19
  150. package/google-workspace/ui/surface-client.mjs +96 -69
  151. package/higgsfield-media/plugin.json +3 -3
  152. package/jev/plugin.json +3 -3
  153. package/kuinetic/CHANGELOG.md +12 -0
  154. package/kuinetic/mcp.json +4 -0
  155. package/kuinetic/plugin.json +27 -0
  156. package/kuinetic/skills/kuinetic/SKILL.md +120 -0
  157. package/kuinetic/skills/kuinetic/references/effects-by-family.md +32 -0
  158. package/kuinetic/skills/kuinetic/references/opt-in-tiers.md +12 -0
  159. package/kuinetic/skills/kuinetic/references/reserved-keys.md +36 -0
  160. package/meilisearch/plugin.json +5 -5
  161. package/netlify/plugin.json +3 -3
  162. package/netlify/targets/netlify.mjs +14 -4
  163. package/opentelemetry/plugin.json +3 -3
  164. package/package.json +25 -20
  165. package/posthog/plugin.json +3 -3
  166. package/railway/plugin.json +3 -3
  167. package/render/plugin.json +3 -3
  168. package/resend/NOTES.md +2 -2
  169. package/resend/adapters/resend.mjs +1 -1
  170. package/resend/{tovu-mail-adapters.json → jini-mail-adapters.json} +1 -1
  171. package/resend/lib/domains.mjs +8 -8
  172. package/resend/plugin.json +3 -3
  173. package/s3-compatible/{tovu-deploy-targets.json → jini-deploy-targets.json} +68 -68
  174. package/s3-compatible/jini-object-stores.json +29 -0
  175. package/s3-compatible/object-stores/s3-compatible.mjs +19 -13
  176. package/s3-compatible/plugin.json +3 -3
  177. package/s3-compatible/targets/s3-compatible.mjs +25 -25
  178. package/sentry/plugin.json +3 -3
  179. package/shadcn-ui/CHANGELOG.md +7 -0
  180. package/shadcn-ui/LICENSE +201 -0
  181. package/shadcn-ui/NOTICE +10 -0
  182. package/shadcn-ui/mcp.json +4 -0
  183. package/shadcn-ui/plugin.json +26 -0
  184. package/shopify/plugin.json +3 -3
  185. package/site-compliance/plugin.json +3 -3
  186. package/site-import/plugin.json +3 -3
  187. package/supabase/mcp.json +1 -4
  188. package/supabase/plugin.json +3 -3
  189. package/ui-ux-design/CHANGELOG.md +13 -0
  190. package/ui-ux-design/NOTICE +2 -0
  191. package/ui-ux-design/README.md +17 -7
  192. package/ui-ux-design/plugin.json +6 -3
  193. package/ui-ux-design/skills/ui-ux-design/SKILL.md +38 -152
  194. package/ui-ux-design/skills/ui-ux-design/references/full-workflow.md +156 -0
  195. package/ui-ux-design/skills/ui-ux-design/references/ui-animation.md +4 -4
  196. package/vercel/NOTES.md +1 -1
  197. package/vercel/object-stores/vercel-blob.mjs +12 -2
  198. package/vercel/plugin.json +3 -3
  199. package/vercel/targets/vercel.mjs +3 -3
  200. package/wordpress/plugin.json +3 -3
  201. package/dist/lifecycle/node.d.ts +0 -11
  202. package/dist/lifecycle/node.js +0 -38
  203. package/fly/tovu-credential-schemes.json +0 -11
  204. package/github/deployments/github.mjs +0 -415
  205. package/s3-compatible/tovu-object-stores.json +0 -29
  206. package/ui-ux-design/skills/ui-ux-design/references/kuinetic-reference.md +0 -184
  207. /package/cloudflare/{tovu-consent.json → jini-consent.json} +0 -0
  208. /package/cloudflare/{tovu-deploy-targets.json → jini-deploy-targets.json} +0 -0
  209. /package/cloudflare/{tovu-form-destinations.json → jini-form-destinations.json} +0 -0
  210. /package/fly/{tovu-deploy-configs.json → jini-deploy-configs.json} +0 -0
  211. /package/fly/{tovu-deploy-ops.json → jini-deploy-ops.json} +0 -0
  212. /package/github/{tovu-deploy-ops.json → jini-deploy-ops.json} +0 -0
  213. /package/github/{tovu-source-control.json → jini-source-control.json} +0 -0
  214. /package/google-login/{tovu-login-providers.json → jini-login-providers.json} +0 -0
  215. /package/google-workspace/{tovu-form-destinations.json → jini-form-destinations.json} +0 -0
  216. /package/meilisearch/{tovu-search-providers.json → jini-search-providers.json} +0 -0
  217. /package/netlify/{tovu-consent.json → jini-consent.json} +0 -0
  218. /package/netlify/{tovu-deploy-targets.json → jini-deploy-targets.json} +0 -0
  219. /package/railway/{tovu-deploy-configs.json → jini-deploy-configs.json} +0 -0
  220. /package/railway/{tovu-deploy-ops.json → jini-deploy-ops.json} +0 -0
  221. /package/render/{tovu-deploy-configs.json → jini-deploy-configs.json} +0 -0
  222. /package/render/{tovu-deploy-ops.json → jini-deploy-ops.json} +0 -0
  223. /package/{ui-ux-design → shadcn-ui}/skills/shadcn-ui/README.md +0 -0
  224. /package/{ui-ux-design → shadcn-ui}/skills/shadcn-ui/SKILL.md +0 -0
  225. /package/{ui-ux-design → shadcn-ui}/skills/shadcn-ui/examples/auth-layout.tsx +0 -0
  226. /package/{ui-ux-design → shadcn-ui}/skills/shadcn-ui/examples/data-table.tsx +0 -0
  227. /package/{ui-ux-design → shadcn-ui}/skills/shadcn-ui/examples/form-pattern.tsx +0 -0
  228. /package/{ui-ux-design → shadcn-ui}/skills/shadcn-ui/resources/component-catalog.md +0 -0
  229. /package/{ui-ux-design → shadcn-ui}/skills/shadcn-ui/resources/customization-guide.md +0 -0
  230. /package/{ui-ux-design → shadcn-ui}/skills/shadcn-ui/resources/migration-guide.md +0 -0
  231. /package/{ui-ux-design → shadcn-ui}/skills/shadcn-ui/resources/setup-guide.md +0 -0
  232. /package/{ui-ux-design → shadcn-ui}/skills/shadcn-ui/scripts/verify-setup.sh +0 -0
  233. /package/vercel/{tovu-consent.json → jini-consent.json} +0 -0
  234. /package/vercel/{tovu-deploy-targets.json → jini-deploy-targets.json} +0 -0
  235. /package/vercel/{tovu-object-stores.json → jini-object-stores.json} +0 -0
@@ -1,3 +1,4 @@
1
+ import { createConsoleLogger } from '@jini-ai/core/primitives';
1
2
  import { readAgentPluginPortableExtension, readAgentPluginCompatibilityWarnings } from '../core/identity-namespace.js';
2
3
  /** Supported categories for portable connection-card declarations. */
3
4
  const CUSTOM_CREDENTIAL_CATEGORIES = ['source-control', 'hosting', 'media', 'ai', 'ops', 'general'];
@@ -106,18 +107,25 @@ function cardText({ value }, _options = {}) {
106
107
  }
107
108
  /** Parse portable connection-card declarations without executing plugin modules.
108
109
  * Refuse the whole batch on invalid or duplicate targets; absent declarations remain compatible.
109
- * Legacy namespace reads warn through the host callback (console by default).
110
+ * Legacy namespace reads warn through the host callback (safe logger by default).
110
111
  * @returns Normalized display/form metadata or a declaration-specific refusal reason.
111
112
  * @complexity O(c + f), capped at 32 cards × 16 fields; no I/O or input mutation.
112
113
  */
113
114
  export function parsePluginCredentialCards({ raw }, options = {}) {
115
+ let parsed;
114
116
  try {
115
- const manifest = recordOf({ value: JSON.parse(raw) });
117
+ parsed = JSON.parse(raw);
118
+ }
119
+ catch (error) {
120
+ return refuseUnparsableManifest({ error }, options);
121
+ }
122
+ try {
123
+ const manifest = recordOf({ value: parsed });
116
124
  if (!manifest)
117
125
  throw new Error('plugin manifest must be an object');
118
126
  const extension = readAgentPluginPortableExtension({ value: manifest }, options);
119
127
  for (const warning of readAgentPluginCompatibilityWarnings({ value: manifest }, options))
120
- (options.onWarning ?? console.warn)(warning);
128
+ (options.onWarning ?? (message => createConsoleLogger({ prefix: '' }).warn({ message })))(warning);
121
129
  const descriptors = parseCardBatch({ value: extension?.credentialCards });
122
130
  return { ok: true, descriptors };
123
131
  }
@@ -125,6 +133,22 @@ export function parsePluginCredentialCards({ raw }, options = {}) {
125
133
  return { ok: false, reason: error instanceof Error ? error.message : 'invalid credential cards' };
126
134
  }
127
135
  }
136
+ /** The parser's own message can echo manifest text, so the refusal and the warning name the problem
137
+ * in fixed words; only the default logger receives the caught error. */
138
+ function refuseUnparsableManifest({ error }, { onWarning } = {}) {
139
+ const message = 'The plugin manifest is not valid JSON, so its credential cards were refused.';
140
+ try {
141
+ if (onWarning)
142
+ onWarning(`[agent-plugins] ${message}`);
143
+ else
144
+ createConsoleLogger({ prefix: '[agent-plugins]' }).warn({ message }, { error });
145
+ }
146
+ catch (warningFailure) {
147
+ // Diagnostics cannot replace the malformed-manifest refusal; the failed warning still reaches the console.
148
+ createConsoleLogger({ prefix: '[agent-plugins]' }).warn({ message: 'The invalid-manifest warning could not be delivered.' }, { error: warningFailure });
149
+ }
150
+ return { ok: false, reason: 'the plugin manifest is not valid JSON' };
151
+ }
128
152
  /** Validate collection bounds separately from manifest decoding. O(cards + fields). */
129
153
  function parseCardBatch({ value }, _options = {}) {
130
154
  if (value === undefined)
@@ -63,16 +63,21 @@ function checkUrlPropsDeclared({ entry }, _optional = {}) {
63
63
  }
64
64
  /** Nothing loads unless named here: own files by contained path, third-party files by declared origin. */
65
65
  function checkExternal({ entry }, _optional = {}) {
66
+ return checkExternalHosts({ entry }) ?? checkUrlPropsDeclared({ entry }) ?? checkScripts({ entry });
67
+ }
68
+ /** externalHosts, when present, maps known kinds to exact https origins. */
69
+ function checkExternalHosts({ entry }, _optional = {}) {
66
70
  const hosts = entry.externalHosts;
67
71
  if (hosts !== undefined && !(isObject(hosts) && Object.entries(hosts).every(([kind, origins]) => HOST_KINDS.includes(kind) && Array.isArray(origins) && origins.every(isHttpsOrigin)))) {
68
72
  return 'externalHosts must map script, frame or connect to exact https origins';
69
73
  }
70
- const urlProps = checkUrlPropsDeclared({ entry });
71
- if (urlProps !== null)
72
- return urlProps;
74
+ return null;
75
+ }
76
+ /** Scripts are own contained .js files or https URLs on a declared script origin. */
77
+ function checkScripts({ entry }, _optional = {}) {
73
78
  if (entry.scripts === undefined)
74
79
  return null;
75
- const scriptHosts = hosts?.script ?? [];
80
+ const scriptHosts = entry.externalHosts?.script ?? [];
76
81
  const valid = Array.isArray(entry.scripts) && entry.scripts.every(value => isExportFile({ value, extension: ['.js'] }) || isDeclaredScriptUrl({ value, hosts: scriptHosts }));
77
82
  return valid ? null : 'scripts must be contained .js paths or https URLs on externalHosts.script';
78
83
  }
@@ -83,5 +83,5 @@ export declare function fetchAgentPluginArchive(required: FetchAgentPluginArchiv
83
83
  * The module's own cap, exported so a caller (or a test pinning it against `install.ts`'s
84
84
  * `LIMITS.maxArchiveBytes`) can read it without duplicating the number.
85
85
  */
86
- export declare function maxAgentPluginArchiveBytes(_required: Record<string, never>): number;
86
+ export declare function maxAgentPluginArchiveBytes(_required: Record<string, never>, _optional?: Record<string, never>): number;
87
87
  //# sourceMappingURL=fetch-archive.d.ts.map
@@ -107,7 +107,7 @@ async function readArchiveBody({ response, maxBytes, diagnosticUrl }) {
107
107
  * The module's own cap, exported so a caller (or a test pinning it against `install.ts`'s
108
108
  * `LIMITS.maxArchiveBytes`) can read it without duplicating the number.
109
109
  */
110
- export function maxAgentPluginArchiveBytes(_required) {
110
+ export function maxAgentPluginArchiveBytes(_required, _optional = {}) {
111
111
  return MAX_ARCHIVE_BYTES;
112
112
  }
113
113
  function assertAllowedUrl(value, position) {
@@ -1,3 +1,4 @@
1
+ import { createConsoleLogger } from '@jini-ai/core/primitives';
1
2
  /** Host adapter for the shared identity owner. The legacy lifecycle already indexes packageRoot;
2
3
  * rereading its manifest keeps new metadata available before compiled lifecycle code is rebuilt. */
3
4
  import { readFile } from 'node:fs/promises';
@@ -14,7 +15,7 @@ export function readPluginMaturity({ manifest }, options = {}) {
14
15
  return undefined;
15
16
  if (maturity === 'untested' || maturity === 'soon')
16
17
  return maturity;
17
- (options.warn ?? console.warn)('[agent-plugins] Unknown extensions.jini.maturity ignored; expected "untested" or "soon".');
18
+ (options.warn ?? (message => createConsoleLogger({ prefix: '' }).warn({ message })))('[agent-plugins] Unknown extensions.jini.maturity ignored; expected "untested" or "soon".');
18
19
  return undefined;
19
20
  }
20
21
  /** Provider plugin ids follow the same grammar as a credential card's `saveTarget`. */
@@ -30,7 +31,7 @@ export function readProviderPluginLink({ manifest }, options = {}) {
30
31
  return undefined;
31
32
  if (typeof link === 'string' && PROVIDER_PLUGIN_ID.test(link))
32
33
  return link;
33
- (options.warn ?? console.warn)('[agent-plugins] Invalid extensions.jini.providerPlugin ignored; expected a plugin id.');
34
+ (options.warn ?? (message => createConsoleLogger({ prefix: '' }).warn({ message })))('[agent-plugins] Invalid extensions.jini.providerPlugin ignored; expected a plugin id.');
34
35
  return undefined;
35
36
  }
36
37
  /** Shared instruction for every host guidance surface, so disclosure precedes credentials/actions. */
@@ -6,6 +6,7 @@
6
6
  * as is. Activation writes stay with the host's one shared queue; these tools only read.
7
7
  */
8
8
  import type { ToolMetadataById, ToolRegistration } from '@jini-ai/core';
9
+ import type { Logger } from '@jini-ai/core/primitives';
9
10
  import type { createAgentPluginLifecycle } from '../index.js';
10
11
  import type { AgentPluginWorkspaceLayout } from '../layout.js';
11
12
  import type { PluginMemory } from '../../../core/persistent-state.js';
@@ -60,6 +61,7 @@ export interface HostToolMessages {
60
61
  }
61
62
  /** Every host-tools entry point takes this one bag. */
62
63
  export interface AgentPluginHostToolPorts {
64
+ readonly report?: Pick<Logger, 'warn'>;
63
65
  readonly lifecycle: HostToolsLifecyclePort;
64
66
  readonly activations: HostToolsActivationsPort;
65
67
  readonly layout: HostToolsLayoutPort;
@@ -1,8 +1,9 @@
1
1
  import { buildDomainRegistrations, indexCatalogById, optionalNumber, optionalString, requireInputRecord, ToolInputError } from "@jini-ai/core";
2
+ import { createConsoleLogger } from "@jini-ai/core/primitives";
2
3
  import { describeAgentPluginCompatibility, agentPluginDependentWarnings } from "../compatibility.js";
3
4
  import { projectAgentPluginSearchPage } from "../search-projection.js";
4
5
  import { readInstalledAgentPluginIdentity } from "./identity.js";
5
- import { summarizeSkillMarkdown } from "./skill-tool.js";
6
+ import { readInstalledSkillDetail } from "./skill-tool.js";
6
7
  /**
7
8
  * ===========================================================================================
8
9
  * `search_agent_plugin_local` — a SEPARATE, STATIC tool, not another per-plugin dynamic one
@@ -162,7 +163,8 @@ export async function loadAgentPluginSearchCandidates(ctx, _optional = {}) {
162
163
  });
163
164
  }
164
165
  catch (error) {
165
- console.warn(`[agent-plugins] '${plugin.pluginId}': ${error instanceof Error ? error.message : String(error)} — excluded from search`);
166
+ const logger = ctx.ports.report ?? createConsoleLogger({ prefix: '[agent-plugins]' });
167
+ logger.warn({ message: 'Plugin excluded from search.' }, { error });
166
168
  }
167
169
  }
168
170
  return candidates;
@@ -247,14 +249,11 @@ async function resolveSkillsForSearchTolerant(plugin, ports) {
247
249
  const skills = [];
248
250
  for (const skill of plugin.skills) {
249
251
  try {
250
- const markdown = await ports.lifecycle.readInstalledSkillMarkdown({ packageRoot: plugin.packageRoot, skillPath: skill.skillPath });
251
- skills.push({ name: skill.name, summary: summarizeSkillMarkdown(skill.name, markdown, ports), markdown,
252
- readFile: (_input, options = {}) => ports.lifecycle.readInstalledSkillFile({ packageRoot: plugin.packageRoot, skillPath: skill.skillPath }, options),
253
- });
252
+ skills.push(await readInstalledSkillDetail({ plugin, skill, ports }));
254
253
  }
255
254
  catch (error) {
256
- console.warn(`[agent-plugins] '${plugin.pluginId}': skill '${skill.name}' could not be read ` +
257
- `(${error instanceof Error ? error.message : String(error)}) — skipped from search`);
255
+ const logger = ports.report ?? createConsoleLogger({ prefix: '[agent-plugins]' });
256
+ logger.warn({ message: 'Plugin skill could not be read; skipped from search.' }, { error });
258
257
  }
259
258
  }
260
259
  return skills;
@@ -273,6 +272,7 @@ async function buildSearchCandidate({ plugin, activations, ports }, _optional =
273
272
  ...(identity.maturity ? { maturity: identity.maturity } : {}),
274
273
  ...(identity.providerPlugin ? { providerPlugin: identity.providerPlugin } : {}),
275
274
  provides: identity.provides,
275
+ ...(plugin.requires !== undefined ? { requires: plugin.requires } : {}),
276
276
  keywords: identity.keywords,
277
277
  enabled: ports.activations.isAgentPluginActive({ activations: activations, pluginId: plugin.pluginId }),
278
278
  skills: skills.map((skill) => ({ name: skill.name, summary: skill.summary })),
@@ -5,7 +5,11 @@ import type { SkillFileResult } from "../skill-file-reader.js";
5
5
  /** One skill's summary, for folding into its plugin's combined description — reuses the same
6
6
  * frontmatter/fallback parsing the prior per-skill pilot used, just no longer wrapped into a
7
7
  * standalone tool description of its own. */
8
- export declare function summarizeSkillMarkdown(skillName: string, markdown: string, ports: Pick<AgentPluginHostToolPorts, "readFrontmatterField">): string;
8
+ export declare function summarizeSkillMarkdown({ skillName, markdown, ports }: {
9
+ skillName: string;
10
+ markdown: string;
11
+ ports: Pick<AgentPluginHostToolPorts, "readFrontmatterField">;
12
+ }, _optional?: Record<string, never>): string;
9
13
  /** One installed plugin's one skill, fully resolved for tool registration — no host paths, a deferred
10
14
  * reader capability for supporting-file requests at call time. See this file's header, SECURITY. */
11
15
  export interface AgentPluginSkillDetail {
@@ -39,12 +43,24 @@ export interface AgentPluginToolSource {
39
43
  * reason folded into both the description and every default-path handler response. */
40
44
  readonly defaultSkillReason?: string;
41
45
  }
46
+ /** Reads one installed skill's markdown and builds its detail. A read failure propagates: each
47
+ * caller applies its own policy (the tool loader refuses the plugin, search skips the skill). */
48
+ export declare function readInstalledSkillDetail({ plugin, skill, ports }: {
49
+ plugin: {
50
+ readonly packageRoot: string;
51
+ };
52
+ skill: {
53
+ readonly name: string;
54
+ readonly skillPath: string;
55
+ };
56
+ ports: AgentPluginHostToolPorts;
57
+ }, _optional?: Record<string, never>): Promise<AgentPluginSkillDetail>;
42
58
  /**
43
59
  * Loads every installed Agent Plugin for one workspace, resolved into one tool-ready source per
44
60
  * plugin. Per-plugin failures are isolated: a pluginId installed under more than one digest (a
45
61
  * genuine, actionable ambiguity — see this file's header for why the digest itself is not folded
46
62
  * into the id) — or any other per-plugin resolution failure, e.g. an unreadable SKILL.md — is
47
- * logged via `console.warn` and excluded from the returned array, but never aborts the whole load.
63
+ * logged through the host reporter and excluded from the returned array, but never aborts the whole load.
48
64
  * One bad plugin install must not take every other installed plugin's tool down with it.
49
65
  *
50
66
  * @complexity O(d * s) in installed-digest count times average skills-per-digest, dominated by
@@ -1,4 +1,5 @@
1
1
  import { buildDomainRegistrations, indexCatalogById, optionalString, requireInputRecord } from "@jini-ai/core";
2
+ import { createConsoleLogger } from "@jini-ai/core/primitives";
2
3
  import { readInstalledAgentPluginIdentity, UNTESTED_PLUGIN_GUIDANCE } from "./identity.js";
3
4
  import { buildPluginMemoryRegistrations } from "./memory-tools.js";
4
5
  /**
@@ -63,7 +64,7 @@ function extractFallbackSummary(markdown) {
63
64
  /** One skill's summary, for folding into its plugin's combined description — reuses the same
64
65
  * frontmatter/fallback parsing the prior per-skill pilot used, just no longer wrapped into a
65
66
  * standalone tool description of its own. */
66
- export function summarizeSkillMarkdown(skillName, markdown, ports) {
67
+ export function summarizeSkillMarkdown({ skillName, markdown, ports }, _optional = {}) {
67
68
  return (ports.readFrontmatterField({ markdown, key: "description" }) ?? extractFallbackSummary(markdown) ?? `${humanize(skillName)} guidance and reference material.`).replace(/\s+/g, " ").trim();
68
69
  }
69
70
  /**
@@ -114,15 +115,20 @@ function assertSingleDigestPerPlugin(digestByPluginId, plugin) {
114
115
  }
115
116
  digestByPluginId.set(plugin.pluginId, plugin.archiveDigest);
116
117
  }
118
+ /** Reads one installed skill's markdown and builds its detail. A read failure propagates: each
119
+ * caller applies its own policy (the tool loader refuses the plugin, search skips the skill). */
120
+ export async function readInstalledSkillDetail({ plugin, skill, ports }, _optional = {}) {
121
+ const markdown = await ports.lifecycle.readInstalledSkillMarkdown({ packageRoot: plugin.packageRoot, skillPath: skill.skillPath });
122
+ return { name: skill.name, summary: summarizeSkillMarkdown({ skillName: skill.name, markdown, ports }), markdown,
123
+ readFile: (_input, options = {}) => ports.lifecycle.readInstalledSkillFile({ packageRoot: plugin.packageRoot, skillPath: skill.skillPath }, options),
124
+ };
125
+ }
117
126
  /** Reads and summarizes every one of one installed plugin's skills — the only `await`-per-item
118
127
  * work in the whole load, isolated so the caller's loop has no nested `for` of its own. */
119
128
  async function resolveSkillsForPlugin(plugin, ports) {
120
129
  const skills = [];
121
130
  for (const skill of plugin.skills) {
122
- const markdown = await ports.lifecycle.readInstalledSkillMarkdown({ packageRoot: plugin.packageRoot, skillPath: skill.skillPath });
123
- skills.push({ name: skill.name, summary: summarizeSkillMarkdown(skill.name, markdown, ports), markdown,
124
- readFile: (_input, options = {}) => ports.lifecycle.readInstalledSkillFile({ packageRoot: plugin.packageRoot, skillPath: skill.skillPath }, options),
125
- });
131
+ skills.push(await readInstalledSkillDetail({ plugin, skill, ports }));
126
132
  }
127
133
  return skills;
128
134
  }
@@ -168,7 +174,7 @@ function buildToolSource(plugin, skills, ports) {
168
174
  * plugin. Per-plugin failures are isolated: a pluginId installed under more than one digest (a
169
175
  * genuine, actionable ambiguity — see this file's header for why the digest itself is not folded
170
176
  * into the id) — or any other per-plugin resolution failure, e.g. an unreadable SKILL.md — is
171
- * logged via `console.warn` and excluded from the returned array, but never aborts the whole load.
177
+ * logged through the host reporter and excluded from the returned array, but never aborts the whole load.
172
178
  * One bad plugin install must not take every other installed plugin's tool down with it.
173
179
  *
174
180
  * @complexity O(d * s) in installed-digest count times average skills-per-digest, dominated by
@@ -217,7 +223,8 @@ export async function loadInstalledAgentPluginToolSources(ctx, _optional = {}) {
217
223
  // itself is still a genuine, actionable refusal, just scoped to this one plugin now.
218
224
  sourceByPluginId.delete(plugin.pluginId);
219
225
  poisonedPluginIds.add(plugin.pluginId);
220
- console.warn(`[agent-plugins] '${plugin.pluginId}': ${error instanceof Error ? error.message : String(error)} — skipped`);
226
+ const logger = ctx.ports.report ?? createConsoleLogger({ prefix: '[agent-plugins]' });
227
+ logger.warn({ message: 'Plugin tool source skipped.' }, { error });
221
228
  }
222
229
  }
223
230
  return [...sourceByPluginId.values()];
@@ -329,7 +336,8 @@ export function createAgentPluginToolGate(ctx, _optional = {}) {
329
336
  if (activation.verdict === "undetermined") {
330
337
  // The error surface fail-CLOSED is supposed to lack: an operator whose activations file is
331
338
  // damaged gets a denial they can see the cause of, next to the daemon's own `denied` record.
332
- console.warn(`[agent-plugins] '${plugin.pluginId}': tool call denied — activation could not be established (${activation.reason})`);
339
+ const logger = ctx.ports.report ?? createConsoleLogger({ prefix: '[agent-plugins]' });
340
+ logger.warn({ message: 'Tool call denied: activation could not be established.' });
333
341
  return false;
334
342
  }
335
343
  if (activation.verdict !== "active")
@@ -7,7 +7,7 @@ export * from './bundled-file-policy.js';
7
7
  import { maxAgentPluginArchiveBytes } from './fetch-archive.js';
8
8
  import type { FetchAgentPluginArchiveOptional } from './fetch-archive.js';
9
9
  import type { PackAgentPluginDirectoryOptional } from './bundled-source-archive.js';
10
- import type { AgentPluginLifecycleRequired, AgentPluginLifecycleOptional } from './ports.js';
10
+ import type { AgentPluginLifecyclePorts, AgentPluginLifecycleRequired, AgentPluginLifecycleOptional } from './ports.js';
11
11
  import type { InstalledDigestIdentity } from './bundled-digests.js';
12
12
  export type { SeededAgentPluginOutcome, SeedBundledAgentPluginsRequired, SeedBundledAgentPluginsOptional, SeedBundledAgentPluginsResult, PackingForSource } from './seed-bundled.js';
13
13
  export type { RetireBundledAgentPluginsRequired, RetireBundledAgentPluginsOptional, RetiredAgentPluginOutcome, RetiredAgentPluginSuccessorOutcome } from './retire-bundled.js';
@@ -40,99 +40,23 @@ export type { AgentPluginSearchSkill, AgentPluginSearchCandidate, AgentPluginSea
40
40
  * Installation/activation and MCP provisioning are separate operations: the host explicitly wires
41
41
  * provisioning using the exported helpers, with its own retry/recovery policy. */
42
42
  export declare function createAgentPluginLifecycle(required: AgentPluginLifecycleRequired, optional?: AgentPluginLifecycleOptional): {
43
- fetchAgentPluginArchive: (input: {
44
- readonly url: string;
45
- }, optional?: FetchAgentPluginArchiveOptional) => Promise<import("./fetch-archive.js").FetchedAgentPluginArchive>;
46
- maxAgentPluginArchiveBytes: typeof maxAgentPluginArchiveBytes;
47
- seedBundledAgentPlugins: (required: import("./seed-bundled.js").SeedBundledAgentPluginsRequired, optional?: import("./seed-bundled.js").SeedBundledAgentPluginsOptional) => Promise<import("./seed-bundled.js").SeedBundledAgentPluginsResult>;
48
- retireBundledAgentPlugins: (required: import("./retire-bundled.js").RetireBundledAgentPluginsRequired, optional?: import("./retire-bundled.js").RetireBundledAgentPluginsOptional) => Promise<readonly import("./retire-bundled.js").RetiredAgentPluginOutcome[]>;
49
- reconcileAgentPluginActivation: (required: Omit<import("./activation.js").SetAgentPluginActivationRequired, "enabled"> & {
50
- resolveEnabled: () => Promise<boolean>;
51
- }, optional?: import("./activation.js").SetAgentPluginActivationOptional) => Promise<boolean>;
52
- setAgentPluginActivation: (required: import("./activation.js").SetAgentPluginActivationRequired, optional?: import("./activation.js").SetAgentPluginActivationOptional) => Promise<import("./activation.js").AgentPluginActivations>;
53
- recordBundledAgentPluginIfAbsent: (required: {
54
- readonly workspaceRoot: string;
55
- readonly pluginId: string;
56
- }, optional?: {
57
- readonly now?: ((required: Record<string, never>) => Date) | undefined;
58
- readonly enabled?: boolean;
59
- }) => Promise<{
60
- readonly recorded: boolean;
43
+ importContainedModule: (input: {
44
+ readonly plugin: Parameters<(plugin: import("./trusted-plugin-files.js").TrustedPluginPackage, modulePath: string) => Promise<{
45
+ readonly exported: unknown;
46
+ } | string>>[0];
47
+ readonly modulePath: string;
48
+ }) => Promise<string | {
49
+ readonly exported: unknown;
61
50
  }>;
62
- enableBundledAgentPluginUnlessOperatorDisabled: (required: {
63
- readonly workspaceRoot: string;
64
- readonly pluginId: string;
65
- readonly actor: string;
66
- readonly now?: ((required: Record<string, never>) => Date) | undefined;
67
- }) => Promise<import("./activation.js").BundledAgentPluginEnableOutcome>;
68
- deleteAgentPluginActivation: (required: import("./activation.js").DeleteAgentPluginActivationRequired) => Promise<void>;
69
- recordBundledAgentPluginDigests: (input: {
70
- readonly workspaceRoot: string;
71
- readonly seeded: Parameters<(required: {
72
- readonly workspaceRoot: string;
73
- readonly seeded: readonly import("./bundled-digests.js").SeededBundledAgentPluginDigest[];
74
- readonly now?: ((required: Record<string, never>) => Date) | undefined;
75
- }) => Promise<void>>[0]["seeded"];
76
- }, optional?: {
77
- readonly now?: (required: Record<string, never>) => Date;
78
- }) => Promise<void>;
79
- removeBundledAgentPluginDigest: (required: {
80
- readonly workspaceRoot: string;
81
- readonly pluginId: string;
82
- }) => Promise<boolean>;
83
- installAgentPlugin: (required: import("./install.js").InstallAgentPluginRequired, optional?: import("./install.js").InstallAgentPluginOptional) => Promise<import("./types.js").InstalledAgentPlugin>;
84
- installAgentPluginFromUrl: (required: import("./install-from-url.js").InstallAgentPluginFromUrlRequired, optional?: import("./install-from-url.js").InstallAgentPluginFromUrlOptional) => Promise<import("./install-from-url.js").InstalledAgentPluginFromUrl>;
85
- setAgentPluginEnabled: (input: import("./set-enabled.js").SetAgentPluginEnabledInput, optional?: {
86
- readonly unlessOperatorDisabled?: boolean;
87
- }) => Promise<import("./set-enabled.js").SetAgentPluginEnabledResult>;
88
- findTrustedPluginPackages: (input: Omit<Parameters<(query: import("./trusted-plugin-files.js").TrustedPluginPackagesQuery) => Promise<readonly import("./trusted-plugin-files.js").TrustedPluginVerdict[]>>[0], "orderByPluginId" | "onInactive">, optional?: Pick<Parameters<(query: import("./trusted-plugin-files.js").TrustedPluginPackagesQuery) => Promise<readonly import("./trusted-plugin-files.js").TrustedPluginVerdict[]>>[0], "orderByPluginId" | "onInactive">) => Promise<readonly import("./trusted-plugin-files.js").TrustedPluginVerdict[]>;
89
- previewAgentPluginUninstall: (required: import("./uninstall.js").UninstallAgentPluginRequired) => Promise<import("./uninstall.js").AgentPluginUninstallPreview>;
90
- uninstallAgentPlugin: (required: import("./uninstall.js").UninstallAgentPluginRequired, optional?: import("./uninstall.js").UninstallAgentPluginOptional) => Promise<import("./uninstall.js").UninstallAgentPluginResult>;
91
- stageForRemoval: (input: {
92
- readonly packagesDir: string;
51
+ maxAgentPluginInstallArchiveBytes: (_input: Record<string, never>) => number;
52
+ indexInstalledRoot: (input: {
93
53
  readonly packageRoot: string;
94
- }, _optional?: Record<string, never>) => Promise<import("./uninstall.js").StagedTree>;
95
- restoreStagedTrees: (input: {
96
- readonly staged: Parameters<(staged: readonly import("./uninstall.js").StagedTree[], cause: unknown) => Promise<unknown>>[0];
97
- readonly cause: unknown;
98
- }, _optional?: Record<string, never>) => Promise<unknown>;
99
- removeFrozenPackageTree: (input: {
100
- readonly root: string;
101
- }, _optional?: Record<string, never>) => Promise<void>;
102
- isAgentPluginActive: (input: {
103
- readonly activations: Parameters<(activations: import("./activation.js").AgentPluginActivations, pluginId: string) => boolean>[0];
104
- readonly pluginId: string;
105
- }) => boolean;
106
- filterActiveAgentPlugins: <T>(input: {
107
- readonly activations: Parameters<(activations: import("./activation.js").AgentPluginActivations, pluginId: string) => boolean>[0];
108
- readonly items: readonly T[];
109
- readonly pluginIdOf: (required: {
110
- readonly item: T;
111
- }) => string;
112
- }) => readonly T[];
113
- readAgentPluginActivations: (input: {
114
- readonly workspaceRoot: string;
115
- }) => Promise<import("./activation.js").AgentPluginActivations>;
116
- assertAgentPluginActivationsWritable: (input: {
117
- readonly workspaceRoot: string;
118
- }) => Promise<void>;
119
- isAgentPluginRecordedAsBundled: (input: {
120
- readonly workspaceRoot: string;
121
- readonly pluginId: string;
122
- }) => Promise<boolean>;
123
- resolveAgentPluginActivation: (input: {
124
- readonly workspaceRoot: string;
125
- readonly pluginId: string;
126
- }) => Promise<import("./activation.js").AgentPluginActivationVerdict>;
127
- normalizeActivations: (input: {
128
- readonly value: unknown;
129
- }) => import("./activation.js").AgentPluginActivations;
130
- readBundledAgentPluginDigests: (input: {
131
- readonly workspaceRoot: string;
132
- }) => Promise<import("./bundled-digests.js").BundledAgentPluginDigests>;
133
- normalizeBundledDigests: (input: {
134
- readonly value: unknown;
135
- }) => import("./bundled-digests.js").BundledAgentPluginDigests;
54
+ readonly archiveDigest: string;
55
+ }) => Promise<import("./types.js").InstalledAgentPlugin>;
56
+ packAgentPluginDirectory: (input: {
57
+ readonly sourceDir: string;
58
+ }, optional?: PackAgentPluginDirectoryOptional) => Promise<import("./bundled-source-archive.js").PackedAgentPluginArchive>;
59
+ createBundledSourceArchiveReader: (_input: Record<string, never>) => import("./install.js").AgentPluginArchiveReaderPort;
136
60
  preferBundledAgentPluginDigests: <T extends InstalledDigestIdentity>(input: {
137
61
  readonly installed: readonly T[];
138
62
  readonly bundled: Parameters<(<T_1 extends InstalledDigestIdentity>(installed: readonly T_1[], bundled: import("./bundled-digests.js").BundledAgentPluginDigests) => readonly T_1[])>[1];
@@ -163,13 +87,21 @@ export declare function createAgentPluginLifecycle(required: AgentPluginLifecycl
163
87
  readInstalledMcpServers: (input: {
164
88
  readonly packageRoot: string;
165
89
  }) => Promise<Readonly<Record<string, import("./manifest.js").McpServerConfig>>>;
166
- resolveAgentPluginRefs: ({ pluginRefIds, workspaceLayout }: {
90
+ resolveAgentPluginRefs: (required: Omit<Parameters<({ ports, pluginRefIds, workspaceLayout }: {
91
+ ports: AgentPluginLifecyclePorts;
92
+ pluginRefIds: readonly string[];
93
+ workspaceLayout: Pick<import("./layout.js").AgentPluginWorkspaceLayout, "packages" | "root">;
94
+ }, { deliveryMode, allowInactiveGuidance, ...request }?: import("./resolve-agent-plugin-refs.js").AgentPluginSkillRequest & {
95
+ deliveryMode?: import("./types.js").AgentPluginDeliveryMode;
96
+ allowInactiveGuidance?: boolean;
97
+ }) => Promise<import("./resolve-agent-plugin-refs.js").ResolveAgentPluginRefsResult>>[0], "ports">, optional?: Parameters<({ ports, pluginRefIds, workspaceLayout }: {
98
+ ports: AgentPluginLifecyclePorts;
167
99
  pluginRefIds: readonly string[];
168
100
  workspaceLayout: Pick<import("./layout.js").AgentPluginWorkspaceLayout, "packages" | "root">;
169
101
  }, { deliveryMode, allowInactiveGuidance, ...request }?: import("./resolve-agent-plugin-refs.js").AgentPluginSkillRequest & {
170
102
  deliveryMode?: import("./types.js").AgentPluginDeliveryMode;
171
103
  allowInactiveGuidance?: boolean;
172
- }) => Promise<import("./resolve-agent-plugin-refs.js").ResolveAgentPluginRefsResult>;
104
+ }) => Promise<import("./resolve-agent-plugin-refs.js").ResolveAgentPluginRefsResult>>[1]) => Promise<import("./resolve-agent-plugin-refs.js").ResolveAgentPluginRefsResult>;
173
105
  pluginMemory: (input: {
174
106
  readonly workspaceId: string;
175
107
  readonly pluginId: string;
@@ -198,23 +130,99 @@ export declare function createAgentPluginLifecycle(required: AgentPluginLifecycl
198
130
  readonly plugin: Parameters<(plugin: import("./trusted-plugin-files.js").TrustedPluginPackage, filename: string) => Promise<string>>[0];
199
131
  readonly filename: string;
200
132
  }) => Promise<string>;
201
- importContainedModule: (input: {
202
- readonly plugin: Parameters<(plugin: import("./trusted-plugin-files.js").TrustedPluginPackage, modulePath: string) => Promise<{
203
- readonly exported: unknown;
204
- } | string>>[0];
205
- readonly modulePath: string;
206
- }) => Promise<string | {
207
- readonly exported: unknown;
208
- }>;
209
- maxAgentPluginInstallArchiveBytes: (_input: Record<string, never>) => number;
210
- indexInstalledRoot: (input: {
133
+ findTrustedPluginPackages: (input: Omit<Parameters<(query: import("./trusted-plugin-files.js").TrustedPluginPackagesQuery) => Promise<readonly import("./trusted-plugin-files.js").TrustedPluginVerdict[]>>[0], "orderByPluginId" | "onInactive">, optional?: Pick<Parameters<(query: import("./trusted-plugin-files.js").TrustedPluginPackagesQuery) => Promise<readonly import("./trusted-plugin-files.js").TrustedPluginVerdict[]>>[0], "orderByPluginId" | "onInactive">) => Promise<readonly import("./trusted-plugin-files.js").TrustedPluginVerdict[]>;
134
+ previewAgentPluginUninstall: (required: import("./uninstall.js").UninstallAgentPluginRequired) => Promise<import("./uninstall.js").AgentPluginUninstallPreview>;
135
+ uninstallAgentPlugin: (required: import("./uninstall.js").UninstallAgentPluginRequired, optional?: import("./uninstall.js").UninstallAgentPluginOptional) => Promise<import("./uninstall.js").UninstallAgentPluginResult>;
136
+ stageForRemoval: (input: {
137
+ readonly packagesDir: string;
211
138
  readonly packageRoot: string;
212
- readonly archiveDigest: string;
213
- }) => Promise<import("./types.js").InstalledAgentPlugin>;
214
- packAgentPluginDirectory: (input: {
215
- readonly sourceDir: string;
216
- }, optional?: PackAgentPluginDirectoryOptional) => Promise<import("./bundled-source-archive.js").PackedAgentPluginArchive>;
217
- createBundledSourceArchiveReader: (_input: Record<string, never>) => import("./install.js").AgentPluginArchiveReaderPort;
139
+ }, _optional?: Record<string, never>) => Promise<import("./uninstall.js").StagedTree>;
140
+ restoreStagedTrees: (input: {
141
+ readonly staged: Parameters<(staged: readonly import("./uninstall.js").StagedTree[], cause: unknown) => Promise<unknown>>[0];
142
+ readonly cause: unknown;
143
+ }, _optional?: Record<string, never>) => Promise<unknown>;
144
+ removeFrozenPackageTree: (input: {
145
+ readonly root: string;
146
+ }, _optional?: Record<string, never>) => Promise<void>;
147
+ isAgentPluginActive: (input: {
148
+ readonly activations: Parameters<(activations: import("./activation.js").AgentPluginActivations, pluginId: string) => boolean>[0];
149
+ readonly pluginId: string;
150
+ }) => boolean;
151
+ filterActiveAgentPlugins: <T>(input: {
152
+ readonly activations: Parameters<(activations: import("./activation.js").AgentPluginActivations, pluginId: string) => boolean>[0];
153
+ readonly items: readonly T[];
154
+ readonly pluginIdOf: (required: {
155
+ readonly item: T;
156
+ }) => string;
157
+ }) => readonly T[];
158
+ readAgentPluginActivations: (input: {
159
+ readonly workspaceRoot: string;
160
+ }) => Promise<import("./activation.js").AgentPluginActivations>;
161
+ assertAgentPluginActivationsWritable: (input: {
162
+ readonly workspaceRoot: string;
163
+ }) => Promise<void>;
164
+ isAgentPluginRecordedAsBundled: (input: {
165
+ readonly workspaceRoot: string;
166
+ readonly pluginId: string;
167
+ }) => Promise<boolean>;
168
+ resolveAgentPluginActivation: (input: {
169
+ readonly workspaceRoot: string;
170
+ readonly pluginId: string;
171
+ }) => Promise<import("./activation.js").AgentPluginActivationVerdict>;
172
+ normalizeActivations: (input: {
173
+ readonly value: unknown;
174
+ }) => import("./activation.js").AgentPluginActivations;
175
+ readBundledAgentPluginDigests: (input: {
176
+ readonly workspaceRoot: string;
177
+ }) => Promise<import("./bundled-digests.js").BundledAgentPluginDigests>;
178
+ normalizeBundledDigests: (input: {
179
+ readonly value: unknown;
180
+ }) => import("./bundled-digests.js").BundledAgentPluginDigests;
181
+ fetchAgentPluginArchive: (input: {
182
+ readonly url: string;
183
+ }, optional?: FetchAgentPluginArchiveOptional) => Promise<import("./fetch-archive.js").FetchedAgentPluginArchive>;
184
+ maxAgentPluginArchiveBytes: typeof maxAgentPluginArchiveBytes;
185
+ seedBundledAgentPlugins: (required: import("./seed-bundled.js").SeedBundledAgentPluginsRequired, optional?: import("./seed-bundled.js").SeedBundledAgentPluginsOptional) => Promise<import("./seed-bundled.js").SeedBundledAgentPluginsResult>;
186
+ retireBundledAgentPlugins: (required: import("./retire-bundled.js").RetireBundledAgentPluginsRequired, optional?: import("./retire-bundled.js").RetireBundledAgentPluginsOptional) => Promise<readonly import("./retire-bundled.js").RetiredAgentPluginOutcome[]>;
187
+ reconcileAgentPluginActivation: (required: Omit<import("./activation.js").SetAgentPluginActivationRequired, "enabled"> & {
188
+ resolveEnabled: () => Promise<boolean>;
189
+ }, optional?: import("./activation.js").SetAgentPluginActivationOptional) => Promise<boolean>;
190
+ setAgentPluginActivation: (required: import("./activation.js").SetAgentPluginActivationRequired, optional?: import("./activation.js").SetAgentPluginActivationOptional) => Promise<import("./activation.js").AgentPluginActivations>;
191
+ recordBundledAgentPluginIfAbsent: (required: {
192
+ readonly workspaceRoot: string;
193
+ readonly pluginId: string;
194
+ }, optional?: {
195
+ readonly now?: ((required: Record<string, never>) => Date) | undefined;
196
+ readonly enabled?: boolean;
197
+ }) => Promise<{
198
+ readonly recorded: boolean;
199
+ }>;
200
+ enableBundledAgentPluginUnlessOperatorDisabled: (required: {
201
+ readonly workspaceRoot: string;
202
+ readonly pluginId: string;
203
+ readonly actor: string;
204
+ readonly now?: ((required: Record<string, never>) => Date) | undefined;
205
+ }) => Promise<import("./activation.js").BundledAgentPluginEnableOutcome>;
206
+ deleteAgentPluginActivation: (required: import("./activation.js").DeleteAgentPluginActivationRequired) => Promise<void>;
207
+ recordBundledAgentPluginDigests: (input: {
208
+ readonly workspaceRoot: string;
209
+ readonly seeded: Parameters<(required: Parameters<(ports: AgentPluginLifecyclePorts, required: {
210
+ readonly workspaceRoot: string;
211
+ readonly seeded: readonly import("./bundled-digests.js").SeededBundledAgentPluginDigest[];
212
+ readonly now?: ((required: Record<string, never>) => Date) | undefined;
213
+ }) => Promise<void>>[1]) => Promise<void>>[0]["seeded"];
214
+ }, optional?: {
215
+ readonly now?: (required: Record<string, never>) => Date;
216
+ }) => Promise<void>;
217
+ removeBundledAgentPluginDigest: (required: Parameters<(ports: AgentPluginLifecyclePorts, required: {
218
+ readonly workspaceRoot: string;
219
+ readonly pluginId: string;
220
+ }) => Promise<boolean>>[1]) => Promise<boolean>;
221
+ installAgentPlugin: (required: import("./install.js").InstallAgentPluginRequired, optional?: import("./install.js").InstallAgentPluginOptional) => Promise<import("./types.js").InstalledAgentPlugin>;
222
+ installAgentPluginFromUrl: (required: import("./install-from-url.js").InstallAgentPluginFromUrlRequired, optional?: import("./install-from-url.js").InstallAgentPluginFromUrlOptional) => Promise<import("./install-from-url.js").InstalledAgentPluginFromUrl>;
223
+ setAgentPluginEnabled: (input: import("./set-enabled.js").SetAgentPluginEnabledInput, optional?: {
224
+ readonly unlessOperatorDisabled?: boolean;
225
+ }) => Promise<import("./set-enabled.js").SetAgentPluginEnabledResult>;
218
226
  loadPluginContributions: <D, T>(input: {
219
227
  readonly workspaceId: string;
220
228
  readonly definition: import("./contribution-loader.js").PluginContributionDefinition<D, T>;