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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 0.7.4
2
+
3
+ ### Changes
4
+
5
+ - Register the ffmpeg transcode plugin and coordinate layout migration, upgrades, seeding, and restore under one workspace lock.
6
+ - Treat failed token probes as unavailable and handle malformed GitHub responses and memory lookups safely.
7
+
1
8
  ## 0.7.2
2
9
 
3
10
  ## 0.7.1
@@ -68,9 +68,8 @@ function routeSave({ selectedKind, metadata, adapters }, _options = {}) {
68
68
  case 'publish-host': return selectPublishSave({ metadata, adapters });
69
69
  case 'provider-settings': return selectProviderSettingsSave({ adapters, target: metadata.target });
70
70
  case 'plugin-provider': return { handler: adapters.pluginProvider, input: { provider: metadata.target } };
71
- // selectSave refuses any kind outside KINDS before routing. The default protects the
72
- // internal boundary if a future caller bypasses that check.
73
- default: throw new ToolInputError({ message: 'Unknown credential kind.' });
71
+ // selectSave validates KINDS; adding a kind must also add its route here.
72
+ default: return selectedKind;
74
73
  }
75
74
  }
76
75
  function selectProviderSettingsSave({ adapters, target }, _options = {}) {
@@ -10,7 +10,9 @@ function describeMatch({ plugin }, _options = {}) {
10
10
  }
11
11
  /** `drafted` names full sections an offer carries but has not recorded; they leave the catalog too. */
12
12
  function enabledPluginCatalog({ ctx, candidates, drafted }, _options = {}) {
13
- const rows = [...candidates].filter(plugin => !ctx.state.excluded.includes(plugin.pluginId) && !ctx.delivered.has(plugin.pluginId) && !drafted.includes(plugin.pluginId))
13
+ // Installed/enabled is not consent: saved Ask selections may omit ids without excluding them.
14
+ const admitted = ctx.mode === 'ask' ? candidates.filter(plugin => ctx.state.decision?.asked === true && ctx.state.decision.selected.includes(plugin.pluginId)) : candidates;
15
+ const rows = [...admitted].filter(plugin => !ctx.state.excluded.includes(plugin.pluginId) && !ctx.delivered.has(plugin.pluginId) && !drafted.includes(plugin.pluginId))
14
16
  .sort((a, b) => a.pluginId.localeCompare(b.pluginId));
15
17
  return rows.length ? 'Enabled agent plugins (load one before acting on its part):\n' + rows.map(plugin => catalogRow({ ctx, plugin })).join('\n') : '';
16
18
  }
@@ -13,15 +13,26 @@ export interface AgentPluginDiscoveryPage {
13
13
  readonly totalMatches: number;
14
14
  readonly nextOffset: number | null;
15
15
  }
16
+ type VisibleOffPluginCandidate = AgentPluginSearchCandidate & {
17
+ readonly enabled: false;
18
+ readonly id: string;
19
+ readonly description: string;
20
+ };
21
+ type PluginProjectionInput = {
22
+ candidate: AgentPluginSearchCandidate & {
23
+ readonly maturity?: string;
24
+ };
25
+ };
16
26
  /** Keep readable discovery metadata for off plugins; activation still owns tool availability.
17
27
  * @returns The active candidate, or the same searchable metadata clearly marked off.
18
28
  * @complexity O(1) bounded text work and shallow copy; no I/O or mutation.
19
29
  */
20
- export declare function agentVisiblePluginCandidate({ candidate }: {
21
- candidate: AgentPluginSearchCandidate & {
22
- readonly maturity?: string;
30
+ export declare function agentVisiblePluginCandidate(input: {
31
+ candidate: PluginProjectionInput['candidate'] & {
32
+ readonly enabled: false;
23
33
  };
24
- }, _options?: {}): AgentPluginSearchCandidate;
34
+ }, options?: Record<string, never>): VisibleOffPluginCandidate;
35
+ export declare function agentVisiblePluginCandidate(input: PluginProjectionInput, options?: Record<string, never>): AgentPluginSearchCandidate;
25
36
  /** Page an already ordered catalog, bounding the complete serialized result, including JSON escaping.
26
37
  * @param required Ranked/listed candidates, a validated count window and the installed catalog size.
27
38
  * @param options Optional byte budget (at least 1024); defaults to 8 KiB.
@@ -40,4 +51,5 @@ export declare function projectAgentPluginSearchPage({ candidates, offset, limit
40
51
  }, { maxBytes }?: {
41
52
  maxBytes?: number;
42
53
  }): AgentPluginDiscoveryPage;
54
+ export {};
43
55
  //# sourceMappingURL=search-projection.d.ts.map
@@ -8,10 +8,6 @@ function shortDescription({ text }, { maxBytes = 240 } = {}) {
8
8
  end--;
9
9
  return bytes.subarray(0, end).toString('utf8');
10
10
  }
11
- /** Keep readable discovery metadata for off plugins; activation still owns tool availability.
12
- * @returns The active candidate, or the same searchable metadata clearly marked off.
13
- * @complexity O(1) bounded text work and shallow copy; no I/O or mutation.
14
- */
15
11
  export function agentVisiblePluginCandidate({ candidate }, _options = {}) {
16
12
  if (candidate.enabled)
17
13
  return candidate;
@@ -26,9 +22,9 @@ export function agentVisiblePluginCandidate({ candidate }, _options = {}) {
26
22
  /** Project one candidate without copying skills, keywords, credentials or host metadata. O(1). */
27
23
  function discoveryMatch({ candidate }, _options = {}) {
28
24
  if (!candidate.enabled) {
29
- const visible = agentVisiblePluginCandidate({ candidate });
30
- return { id: visible.id ?? visible.pluginId, pluginId: visible.pluginId, enabled: false,
31
- ...(candidate.maturity === 'soon' ? { maturity: 'soon' } : {}), description: visible.description ?? '' };
25
+ const visible = agentVisiblePluginCandidate({ candidate: candidate });
26
+ return { id: visible.id, pluginId: visible.pluginId, enabled: false,
27
+ ...(candidate.maturity === 'soon' ? { maturity: 'soon' } : {}), description: visible.description };
32
28
  }
33
29
  return { id: candidate.id ?? candidate.pluginId, pluginId: candidate.pluginId, enabled: candidate.enabled,
34
30
  ...(candidate.maturity ? { maturity: candidate.maturity } : {}),
@@ -24,9 +24,9 @@ function passesDeploymentGate({ candidate, capabilities, terms }, _options = {})
24
24
  */
25
25
  function automaticScore({ candidate, terms }, _options = {}) {
26
26
  if (!candidate.enabled) {
27
- const visible = agentVisiblePluginCandidate({ candidate });
27
+ const visible = agentVisiblePluginCandidate({ candidate: candidate });
28
28
  const skills = visible.skills.map(skill => [skill.name, skill.summary].join(' ')).join(' ');
29
- const catalogTerms = automaticTerms(`${visible.pluginId} ${visible.description ?? ''} ${visible.keywords.join(' ')} ${(visible.provides ?? []).join(' ')} ${skills}`);
29
+ const catalogTerms = automaticTerms(`${visible.pluginId} ${visible.description} ${visible.keywords.join(' ')} ${(visible.provides ?? []).join(' ')} ${skills}`);
30
30
  return terms.reduce((score, term) => score + (catalogTerms.includes(term) ? 4 : 0), 0);
31
31
  }
32
32
  const capabilities = candidate.provides ?? [];
@@ -171,6 +171,6 @@ const dictionary = {
171
171
  export function memoryText({ key, locale = "en" }, _optional = {}) {
172
172
  // Own keys only: an inherited name ("toString", "constructor") is not a translation.
173
173
  const table = Object.hasOwn(dictionary, locale) ? dictionary[locale] : undefined;
174
- return table !== undefined && Object.hasOwn(table, key) ? table[key] ?? key : key;
174
+ return table !== undefined && Object.hasOwn(table, key) ? table[key] : key;
175
175
  }
176
176
  //# sourceMappingURL=memory-i18n.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jini-ai/agent-plugins",
3
- "version": "0.7.3-next.3",
3
+ "version": "0.7.4",
4
4
  "description": "Support for Agent Plugins: vendor-neutral manifest types and validators, installation, activation, digests and trusted contribution loading. Every Jini agent plugin ships here as its own subpath (@jini-ai/agent-plugins/<id>); resolving one never loads another plugin's files.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -185,7 +185,7 @@
185
185
  "yauzl": "opt-in: plugin zip import — Plugin ZIP import could not load yauzl. Install yauzl to enable this feature, or check its installed version and native binaries.",
186
186
  "@cfworker/json-schema": "opt-in: json schema validation; import @jini-ai/agent-plugins/lifecycle/tools, import @jini-ai/agent-plugins/connect/executable — JSON Schema validation could not load @cfworker/json-schema. Install @cfworker/json-schema to enable this feature, or check its installed version and native binaries.",
187
187
  "semver": "opt-in: plugin version compatibility; import @jini-ai/agent-plugins/lifecycle, import @jini-ai/agent-plugins/lifecycle/host-tools — Plugin version compatibility could not load semver. Install semver to enable this feature, or check its installed version and native binaries.",
188
- "react": "opt-in: react browser bindings; import @jini-ai/agent-plugins/react/installed-skills-composer-source — React browser bindings could not load react. Install react to enable this feature, or check its installed version."
188
+ "react": "opt-in: react browser bindings; import @jini-ai/agent-plugins/react/use-agent-plugins.hooks — React browser bindings could not load react. Install react to enable this feature, or check its installed version."
189
189
  }
190
190
  },
191
191
  "type": "module",
@@ -639,16 +639,16 @@
639
639
  "@types/react": "^19.2.0",
640
640
  "@types/react-dom": "^19.2.0",
641
641
  "@testing-library/react": "^16.3.0",
642
- "@jini-ai/core": "^0.7.3-next.3",
643
- "@jini-ai/platform": "^0.7.3-next.3",
644
- "@jini-ai/plugins": "^0.7.3-next.3",
645
- "@jini-ai/oauth": "^0.7.3-next.3",
646
- "@jini-ai/cms": "^0.7.3-next.3",
647
- "@jini-ai/ui": "^0.7.3-next.3"
642
+ "@jini-ai/platform": "^0.7.4",
643
+ "@jini-ai/ui": "^0.7.4",
644
+ "@jini-ai/oauth": "^0.7.4",
645
+ "@jini-ai/core": "^0.7.4",
646
+ "@jini-ai/plugins": "^0.7.4",
647
+ "@jini-ai/cms": "^0.7.4"
648
648
  },
649
649
  "peerDependencies": {
650
650
  "yauzl": "^3.4.0",
651
- "@jini-ai/core": "^0.7.3-next.3",
651
+ "@jini-ai/core": "^0.7.4",
652
652
  "@cfworker/json-schema": "^4.1.1",
653
653
  "semver": "^7.6.2",
654
654
  "react": "^18.3.0 || ^19.0.0"