@adea-ai/plugins 3.0.10 → 4.0.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 (75) hide show
  1. package/README.md +18 -11
  2. package/dist/agent-plugins-catalog.d.ts +2 -3
  3. package/dist/agent-plugins-catalog.js +2 -10
  4. package/dist/agent-plugins-catalog.js.map +1 -1
  5. package/dist/catalog-store.d.ts +81 -0
  6. package/dist/catalog-store.js +487 -0
  7. package/dist/catalog-store.js.map +1 -0
  8. package/dist/consumer-index.d.ts +1 -1
  9. package/dist/consumer-index.js +17 -7
  10. package/dist/consumer-index.js.map +1 -1
  11. package/dist/display-name.js +3 -2
  12. package/dist/display-name.js.map +1 -1
  13. package/dist/harness.d.ts +50 -9
  14. package/dist/harness.js +190 -147
  15. package/dist/harness.js.map +1 -1
  16. package/dist/icon-mirror.d.ts +2 -2
  17. package/dist/icon-mirror.js +38 -25
  18. package/dist/icon-mirror.js.map +1 -1
  19. package/dist/icons.js +5 -27
  20. package/dist/icons.js.map +1 -1
  21. package/dist/index.d.ts +9 -3
  22. package/dist/index.js +103 -88
  23. package/dist/index.js.map +1 -1
  24. package/dist/publication.d.ts +8 -11
  25. package/dist/publication.js +8 -11
  26. package/dist/publication.js.map +1 -1
  27. package/dist/schema.d.ts +0 -40
  28. package/dist/schema.js +0 -36
  29. package/dist/schema.js.map +1 -1
  30. package/dist/site-icons.d.ts +2 -0
  31. package/dist/site-icons.js +46 -9
  32. package/dist/site-icons.js.map +1 -1
  33. package/dist/source-digest.d.ts +2 -0
  34. package/dist/source-digest.js +12 -0
  35. package/dist/source-digest.js.map +1 -0
  36. package/dist/sources.js +3 -3
  37. package/dist/sources.js.map +1 -1
  38. package/native/build-provenance.txt +5 -5
  39. package/native/staged-reader-win32-arm64.node +0 -0
  40. package/native/staged-reader-win32-x64.node +0 -0
  41. package/package.json +4 -9
  42. package/src/agent-plugins-catalog.ts +3 -10
  43. package/src/artifacts.test.ts +80 -0
  44. package/src/catalog-installation.test.ts +1 -1
  45. package/src/catalog-store.ts +546 -0
  46. package/src/consumer-index.test.ts +125 -0
  47. package/src/consumer-index.ts +23 -8
  48. package/src/default-head.test.ts +143 -0
  49. package/src/display-name.test.ts +8 -0
  50. package/src/display-name.ts +3 -2
  51. package/src/{agent-plugins-harness.test.ts → harness.test.ts} +1 -1
  52. package/src/harness.ts +249 -170
  53. package/src/icon-mirror.ts +36 -23
  54. package/src/icons.test.ts +5 -0
  55. package/src/icons.ts +6 -29
  56. package/src/index.test.ts +272 -40
  57. package/src/index.ts +131 -94
  58. package/src/manifest-retry.test.ts +49 -0
  59. package/src/portable-catalog.test.ts +8 -5
  60. package/src/publication.ts +8 -11
  61. package/src/schema.ts +0 -40
  62. package/src/site-icon-fallback.test.ts +36 -19
  63. package/src/site-icons.test.ts +104 -0
  64. package/src/site-icons.ts +47 -9
  65. package/src/source-config-sync.test.ts +84 -0
  66. package/src/source-digest.test.ts +101 -0
  67. package/src/source-digest.ts +14 -0
  68. package/src/sources-json.test.ts +53 -0
  69. package/src/sources.ts +3 -3
  70. package/src/upstream-headers.test.ts +31 -7
  71. package/src/write-artifacts.test.ts +375 -0
  72. package/dist/agent-plugins-harness.d.ts +0 -54
  73. package/dist/agent-plugins-harness.js +0 -212
  74. package/dist/agent-plugins-harness.js.map +0 -1
  75. package/src/agent-plugins-harness.ts +0 -281
@@ -136,7 +136,8 @@ const FULL_NAMES = {
136
136
  */
137
137
  export function normalizeDisplayName(value) {
138
138
  const trimmed = value.trim();
139
- const known = FULL_NAMES[trimmed.toLowerCase()];
139
+ const fullNameKey = trimmed.toLowerCase();
140
+ const known = Object.hasOwn(FULL_NAMES, fullNameKey) ? FULL_NAMES[fullNameKey] : undefined;
140
141
  if (known !== undefined)
141
142
  return known;
142
143
  const tokens = trimmed.split(/[-_\s]+/u).filter(Boolean);
@@ -145,7 +146,7 @@ export function normalizeDisplayName(value) {
145
146
  return tokens
146
147
  .map((token, index) => {
147
148
  const key = token.toLowerCase();
148
- const brand = BRAND_TOKENS[key];
149
+ const brand = Object.hasOwn(BRAND_TOKENS, key) ? BRAND_TOKENS[key] : undefined;
149
150
  if (brand !== undefined)
150
151
  return brand;
151
152
  // Any uppercase means the vendor already chose a casing.
@@ -1 +1 @@
1
- {"version":3,"file":"display-name.js","sourceRoot":"","sources":["../src/display-name.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,YAAY,GAAqC;IACrD,UAAU,EAAE,UAAU;IACtB,IAAI,EAAE,MAAM;IACZ,EAAE,EAAE,IAAI;IACR,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,aAAa;IACzB,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,SAAS;IAClB,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,YAAY;IACxB,GAAG,EAAE,KAAK;IACV,UAAU,EAAE,YAAY;IACxB,QAAQ,EAAE,UAAU;IACpB,GAAG,EAAE,KAAK;IACV,WAAW,EAAE,aAAa;IAC1B,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,aAAa,EAAE,iBAAiB;IAChC,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,WAAW;IACtB,GAAG,EAAE,KAAK;IACV,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,cAAc;IAC3B,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,GAAG,EAAE,KAAK;IACV,UAAU,EAAE,YAAY;IACxB,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,YAAY;I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terializationPlan } from './schema.js';
2
- export declare class MaterializationError extends Error {
3
- readonly code: string;
4
- readonly details: readonly string[];
5
- constructor(code: string, details?: readonly string[]);
1
+ import { type HarnessProfile, type McpServer, type InstallationPlan } from './agent-plugins-schema.js';
2
+ import type { Catalog } from './schema.js';
3
+ export interface InstallationInput {
4
+ readonly pluginId: string;
5
+ readonly releaseId: string;
6
+ readonly instanceId: string;
7
+ readonly source: InstallationPlan['source'];
8
+ readonly package: unknown;
9
+ readonly profile: HarnessProfile;
10
+ readonly requiredCredentials?: readonly string[];
11
+ readonly requiredConnectors?: readonly string[];
12
+ readonly allowPartial?: boolean;
6
13
  }
7
- export declare function createMaterializationPlan(input: {
14
+ export interface CatalogInstallationInput {
8
15
  readonly catalog: Catalog;
9
16
  readonly pluginId: string;
10
- readonly harness: Harness;
11
17
  readonly releaseId?: string;
12
- }): MaterializationPlan;
13
- export declare function supportedHarnesses(): readonly Harness[];
18
+ readonly instanceId: string;
19
+ readonly profile: HarnessProfile;
20
+ readonly allowPartial?: boolean;
21
+ }
22
+ /** Resolve the exact catalog release before planning. The caller must also authenticate
23
+ * the catalog publisher and verify its artifact integrity before invoking this API.
24
+ */
25
+ export declare function createCatalogInstallationPlan(input: CatalogInstallationInput): InstallationPlan;
26
+ /** A declarative proposal, never an execution grant. No brand-based support assumptions. */
27
+ export declare function createInstallationPlan(input: InstallationInput): InstallationPlan;
28
+ export interface RuntimeRoots {
29
+ readonly pluginRoot: string;
30
+ readonly pluginData: string;
31
+ }
32
+ /** Exact, single-pass expansion. Replacement text is never scanned recursively. */
33
+ export declare function expandPluginPaths(value: string, roots: RuntimeRoots): string;
34
+ export type McpBinding = {
35
+ type: 'stdio';
36
+ command: string;
37
+ args: string[];
38
+ cwd: string;
39
+ env: Record<string, string>;
40
+ shell: false;
41
+ } | {
42
+ type: 'streamable-http' | 'sse';
43
+ url: string;
44
+ headers: Record<string, string>;
45
+ redirectPolicy: 'same-origin';
46
+ authorization: 'control-plane';
47
+ };
48
+ /** Produce concrete Control Plane launch/connect descriptors, without launching or connecting. */
49
+ export declare function resolveMcpBinding(input: McpServer, roots: RuntimeRoots, baseEnv?: Readonly<Record<string, string>>, platform?: 'posix' | 'win32'): McpBinding;
50
+ /** Mandatory filesystem preflight for Control Plane callers after safe materialization.
51
+ * Call immediately before activation inside the same protected installation boundary;
52
+ * a separate preflight is not a substitute for preventing concurrent filesystem mutation.
53
+ */
54
+ export declare function verifyBindingPaths(input: McpServer, roots: RuntimeRoots): Promise<void>;
package/dist/harness.js CHANGED
@@ -1,169 +1,212 @@
1
- import { HarnessSchema, MaterializationPlanSchema, } from './schema.js';
2
- export class MaterializationError extends Error {
3
- code;
4
- details;
5
- constructor(code, details = []) {
6
- super(`${code}${details.length ? `: ${details.join(', ')}` : ''}`);
7
- this.code = code;
8
- this.details = details;
9
- this.name = 'MaterializationError';
10
- }
11
- }
12
- export function createMaterializationPlan(input) {
13
- const plugin = input.catalog.plugins.find((candidate) => candidate.pluginId === input.pluginId);
1
+ import { isAbsolute, resolve, relative, sep } from 'node:path';
2
+ import { realpath } from 'node:fs/promises';
3
+ import { createHash } from 'node:crypto';
4
+ import { HarnessProfileSchema, InstallationPlanSchema, } from './agent-plugins-schema.js';
5
+ import { verifyPortableCatalog, PACKAGE_METADATA_KEY } from './portable-catalog.js';
6
+ import { verifyAgentPackage, validateServer } from './agent-plugins-catalog.js';
7
+ /** Resolve the exact catalog release before planning. The caller must also authenticate
8
+ * the catalog publisher and verify its artifact integrity before invoking this API.
9
+ */
10
+ export function createCatalogInstallationPlan(input) {
11
+ verifyPortableCatalog(input.catalog);
12
+ const plugin = input.catalog.plugins.find((entry) => entry.pluginId === input.pluginId);
14
13
  if (!plugin)
15
- throw new MaterializationError('PLUGIN_NOT_FOUND', [input.pluginId]);
16
- const release = plugin.availableReleases.find((candidate) => candidate.releaseId === (input.releaseId ?? plugin.currentReleaseId));
14
+ throw new Error(`PLUGIN_NOT_FOUND: ${input.pluginId}`);
15
+ const release = plugin.availableReleases.find((entry) => entry.releaseId === (input.releaseId ?? plugin.currentReleaseId));
17
16
  if (!release)
18
- throw new MaterializationError('RELEASE_NOT_FOUND', [
19
- input.releaseId ?? plugin.currentReleaseId,
20
- ]);
21
- const compatibility = plugin.harnessCompatibility[input.harness];
22
- if (!compatibility)
23
- throw new MaterializationError('HARNESS_UNSUPPORTED', [input.harness]);
24
- return MaterializationPlanSchema.parse({
25
- planVersion: 1,
17
+ throw new Error('RELEASE_NOT_FOUND');
18
+ if (release.contentResolution !== 'complete')
19
+ throw new Error('COMPLETE_SOURCE_REQUIRED');
20
+ const pkg = release.releaseMetadata[PACKAGE_METADATA_KEY];
21
+ if (pkg === undefined)
22
+ throw new Error('PORTABLE_RESYNC_REQUIRED: run a full catalog sync before planning portable installation');
23
+ return createInstallationPlan({
26
24
  pluginId: plugin.pluginId,
27
25
  releaseId: release.releaseId,
28
- harness: input.harness,
26
+ instanceId: input.instanceId,
27
+ profile: input.profile,
28
+ package: pkg,
29
+ allowPartial: input.allowPartial === true,
29
30
  source: {
30
31
  repositoryUrl: release.resolvedRepositoryUrl,
31
32
  commitSha: release.resolvedCommitSha,
32
33
  pluginSubdirectory: release.pluginSubdirectory,
33
34
  contentDigest: release.canonicalContentDigest,
34
35
  },
35
- targetLayout: targetLayout(input.harness),
36
- files: release.fileIndex
37
- .map((sourcePath) => filePlan(release, sourcePath, input.harness, compatibility.status))
38
- .toSorted((left, right) => left.targetPath.localeCompare(right.targetPath) ||
39
- left.sourcePath.localeCompare(right.sourcePath)),
40
- configuration: {
41
- compatibilityStatus: compatibility.status,
42
- sourceDialect: release.releaseMetadata.sourceDialect ?? 'unknown',
43
- executeInstallation: false,
44
- },
45
- requiredConnectors: release.requiredConnectors,
46
36
  requiredCredentials: release.requiredCredentials,
47
- policyConstraints: [
48
- 'This plan describes files and translation only; it does not install or execute upstream code.',
49
- ...release.permissionSensitiveChanges.map((type) => `Control Plane must authorize ${type} capability explicitly.`),
50
- ],
37
+ requiredConnectors: release.requiredConnectors,
51
38
  });
52
39
  }
53
- function targetLayout(harness) {
54
- switch (harness) {
55
- case 'codex':
56
- return {
57
- root: '.agents',
58
- notes: [
59
- 'Skills and instructions map to the Codex .agents layout.',
60
- 'MCP and executable capabilities require Control Plane policy.',
61
- ],
62
- };
63
- case 'claude-code':
64
- return {
65
- root: '.claude',
66
- notes: [
67
- 'Claude Code-native files can be copied when the source dialect is Claude.',
68
- 'Hooks and MCP configuration still require explicit runtime authorization.',
69
- ],
70
- };
71
- case 'cursor':
72
- return {
73
- root: '.cursor',
74
- notes: [
75
- 'Cursor rules and skills map to the .cursor layout.',
76
- 'MCP configuration is declarative and is not executed by this plan.',
77
- ],
78
- };
79
- case 'pi':
80
- return {
81
- root: '.pi',
82
- notes: [
83
- 'Pi receives portable SKILL.md and MCP metadata only.',
84
- 'No Pi process or package lifecycle is invoked.',
85
- ],
86
- };
87
- case 'hermes':
88
- return {
89
- root: '.hermes',
90
- notes: [
91
- 'Hermes receives portable skill and MCP metadata only.',
92
- 'Harness-specific translation remains explicit in each file action.',
93
- ],
94
- };
95
- case 'opencode':
96
- return {
97
- root: '.opencode',
98
- notes: [
99
- 'OpenCode receives portable instruction and MCP metadata only.',
100
- 'Executable capabilities are excluded.',
101
- ],
102
- };
103
- case 'generic-skill-mcp':
104
- return {
105
- root: '.agent',
106
- notes: ['Generic SKILL.md and MCP-compatible files are copied when recognized.'],
107
- };
108
- }
40
+ function identity(...parts) {
41
+ return createHash('sha256').update(JSON.stringify(parts)).digest('hex');
109
42
  }
110
- function filePlan(release, sourcePath, harness, status) {
111
- const type = capabilityTypeForPath(release, sourcePath);
112
- const directory = sourcePath.includes('/') ? sourcePath.slice(0, sourcePath.lastIndexOf('/')) : '';
113
- if (status === 'unsupported' || type === 'executable' || type === 'unknown') {
114
- return {
115
- sourcePath,
116
- targetPath: sourcePath,
117
- action: 'unsupported',
118
- reason: `${type} capability is not executable through a materialization plan.`,
119
- };
43
+ /** A declarative proposal, never an execution grant. No brand-based support assumptions. */
44
+ export function createInstallationPlan(input) {
45
+ const profile = HarnessProfileSchema.parse(input.profile);
46
+ const pkg = verifyAgentPackage(input.package);
47
+ if (pkg.sourceDigest !== input.source.contentDigest)
48
+ throw new Error('Package recipe does not match the selected immutable release.');
49
+ if (!input.instanceId || input.instanceId.length > 256)
50
+ throw new Error('A stable installation instanceId is required.');
51
+ const disabled = [];
52
+ for (const item of pkg.nonPortable)
53
+ disabled.push({ component: item.kind, reason: item.reason });
54
+ for (const item of pkg.diagnostics.filter((entry) => entry.severity === 'error'))
55
+ disabled.push({ component: item.path, reason: item.message });
56
+ const nativeEligible = profile.agentPlugins.versions.includes(pkg.specVersion) &&
57
+ pkg.nonPortable.length === 0 &&
58
+ !Object.keys(pkg.manifest?.extensions ?? {}).length;
59
+ const nativeCoverage = (profile.agentPlugins.skills ? pkg.skills.length : 0) +
60
+ Object.values(pkg.mcpServers).filter((server) => profile.agentPlugins.mcpTransports.includes(server.type)).length;
61
+ const adapterCoverage = (profile.components.skillDirectories ? pkg.skills.length : 0) +
62
+ Object.values(pkg.mcpServers).filter((server) => profile.components.mcpTransports.includes(server.type)).length;
63
+ const native = nativeEligible && nativeCoverage > 0 && nativeCoverage >= adapterCoverage;
64
+ const strategy = pkg.status === 'unavailable'
65
+ ? 'unavailable'
66
+ : native
67
+ ? 'native-agent-plugin'
68
+ : 'component-adapter';
69
+ let skillDirectories = [];
70
+ const servers = new Map();
71
+ if (strategy !== 'unavailable') {
72
+ if (native ? profile.agentPlugins.skills : profile.components.skillDirectories)
73
+ skillDirectories = pkg.skills.map((skill) => skill.path);
74
+ else
75
+ for (const skill of pkg.skills)
76
+ disabled.push({
77
+ component: `skill:${skill.name}`,
78
+ reason: 'The selected adapter cannot expose skill directories.',
79
+ });
80
+ for (const [name, server] of Object.entries(pkg.mcpServers)) {
81
+ if ((native ? profile.agentPlugins.mcpTransports : profile.components.mcpTransports).includes(server.type))
82
+ servers.set(name, server);
83
+ else
84
+ disabled.push({
85
+ component: `mcp:${name}`,
86
+ reason: `No ${server.type} MCP binding on this harness adapter.`,
87
+ });
88
+ }
120
89
  }
121
- if (type === 'hook' ||
122
- type === 'browser' ||
123
- type === 'scheduled-task' ||
124
- type === 'ui-component') {
90
+ const hasContent = skillDirectories.length > 0 || servers.size > 0;
91
+ const compatibility = !hasContent ? 'unsupported' : disabled.length > 0 ? 'partial' : 'full';
92
+ const selectedStrategy = !hasContent || (compatibility === 'partial' && !input.allowPartial) ? 'unavailable' : strategy;
93
+ return InstallationPlanSchema.parse({
94
+ planVersion: 2,
95
+ pluginId: input.pluginId,
96
+ releaseId: input.releaseId,
97
+ instanceId: input.instanceId,
98
+ profile,
99
+ source: input.source,
100
+ package: pkg,
101
+ // Git source identity also pins executable modes, which the v1 byte snapshot omits.
102
+ packageKey: pkg.packageDigest
103
+ ? `packages/${identity(input.source.repositoryUrl, input.source.commitSha, input.source.pluginSubdirectory, pkg.packageDigest)}`
104
+ : '',
105
+ // Deliberately excludes release, package digest and harness. Switching harnesses or updating
106
+ // the same approved instance preserves data; distinct scopes use distinct instance IDs.
107
+ dataKey: `instances/${identity(input.pluginId, input.instanceId)}`,
108
+ preserveDataAcrossUpdates: true,
109
+ strategy: selectedStrategy,
110
+ compatibility,
111
+ allowedToActivate: false,
112
+ approvalRequired: true,
113
+ selection: selectedStrategy === 'unavailable'
114
+ ? { skillDirectories: [], mcpServers: {} }
115
+ : { skillDirectories, mcpServers: Object.fromEntries(servers) },
116
+ disabled,
117
+ requiredCredentials: [...(input.requiredCredentials ?? [])],
118
+ requiredConnectors: [...(input.requiredConnectors ?? [])],
119
+ preconditions: [
120
+ 'Verify catalog integrity/provenance and exact source digest before applying the package recipe.',
121
+ 'Use an immutable package root; preserve source file modes and complete skill directories/resources.',
122
+ 'Create a writable data directory for this instance; never key it by release or copy credentials between instances.',
123
+ 'Control Plane must authorize activation, filesystem/network access, executables and credential bindings.',
124
+ 'Recheck the actual harness/runtime/adapter profile and realpath containment immediately before activation.',
125
+ 'Native mode registers exactly one package root. Component mode registers only the selected skill directories and MCP bindings, never legacy hooks/config files.',
126
+ 'Do not install dependencies or run lifecycle scripts implicitly; review required executables and skill compatibility requirements.',
127
+ 'Skill allowed-tools metadata is advisory and never grants permission.',
128
+ 'Namespace registrations by installation identity; detect skill/server name collisions instead of overwriting existing harness configuration.',
129
+ 'Remote authorization is client-managed. Do not expand remote URLs/headers or forward configured headers to another origin without authorization.',
130
+ ],
131
+ });
132
+ }
133
+ /** Exact, single-pass expansion. Replacement text is never scanned recursively. */
134
+ export function expandPluginPaths(value, roots) {
135
+ return value.replace(/\$\{(PLUGIN_ROOT|PLUGIN_DATA)\}/g, (_match, name) => name === 'PLUGIN_ROOT' ? roots.pluginRoot : roots.pluginData);
136
+ }
137
+ function within(path, root) {
138
+ const suffix = relative(root, path);
139
+ return suffix === '' || (suffix !== '..' && !suffix.startsWith(`..${sep}`) && !isAbsolute(suffix));
140
+ }
141
+ /** Produce concrete Control Plane launch/connect descriptors, without launching or connecting. */
142
+ export function resolveMcpBinding(input, roots, baseEnv = {}, platform = process.platform === 'win32' ? 'win32' : 'posix') {
143
+ const server = validateServer(input);
144
+ if (!isAbsolute(roots.pluginRoot) || !isAbsolute(roots.pluginData))
145
+ throw new Error('Runtime plugin roots must be absolute paths.');
146
+ if (server.type !== 'stdio')
125
147
  return {
126
- sourcePath,
127
- targetPath: sourcePath,
128
- action: 'ignore',
129
- reason: `${type} is cataloged but has no portable target layout for ${harness}.`,
148
+ type: server.type,
149
+ url: server.url,
150
+ headers: { ...server.headers },
151
+ redirectPolicy: 'same-origin',
152
+ authorization: 'control-plane',
130
153
  };
131
- }
132
- const targetPath = targetForType(type, sourcePath, directory, harness);
133
- const action = type === 'skill' || type === 'rule' || (type === 'mcp-server' && status === 'native')
134
- ? 'copy'
135
- : 'translate';
154
+ const command = server.command.startsWith('./')
155
+ ? resolve(roots.pluginRoot, server.command)
156
+ : server.command;
157
+ if (server.command.startsWith('./') && !within(command, roots.pluginRoot))
158
+ throw new Error('Executable escapes the plugin root.');
159
+ const cwdInput = server.cwd ?? '${PLUGIN_ROOT}';
160
+ const cwdRoot = cwdInput.startsWith('${PLUGIN_DATA}') ? roots.pluginData : roots.pluginRoot;
161
+ const expanded = expandPluginPaths(cwdInput, roots);
162
+ const cwd = resolve(roots.pluginRoot, expanded);
163
+ if (!within(cwd, cwdRoot))
164
+ throw new Error('Working directory escapes its declared root.');
165
+ const env = {};
166
+ const overlay = (name, value) => {
167
+ if (platform === 'win32')
168
+ for (const existing of Object.keys(env))
169
+ if (existing.toUpperCase() === name.toUpperCase())
170
+ delete env[existing];
171
+ Object.defineProperty(env, name, {
172
+ value,
173
+ enumerable: true,
174
+ configurable: true,
175
+ writable: true,
176
+ });
177
+ };
178
+ for (const [key, value] of Object.entries(baseEnv))
179
+ overlay(key, value);
180
+ for (const [key, value] of Object.entries(server.env ?? {}))
181
+ overlay(key, expandPluginPaths(value, roots));
182
+ overlay('PLUGIN_ROOT', roots.pluginRoot);
183
+ overlay('PLUGIN_DATA', roots.pluginData);
136
184
  return {
137
- sourcePath,
138
- targetPath,
139
- action: action,
140
- reason: action === 'copy'
141
- ? `Copy recognized ${type} content.`
142
- : `Translate ${type} metadata into the ${harness} layout.`,
185
+ type: 'stdio',
186
+ command,
187
+ args: (server.args ?? []).map((arg) => expandPluginPaths(arg, roots)),
188
+ cwd,
189
+ env,
190
+ shell: false,
143
191
  };
144
192
  }
145
- function capabilityTypeForPath(release, path) {
146
- const match = release.capabilities.find((capability) => capability.paths.includes(path));
147
- return match?.type ?? 'unknown';
148
- }
149
- function targetForType(type, path, directory, harness) {
150
- if (type === 'skill')
151
- return `${targetLayout(harness).root}/skills/${directory || basenameWithoutExtension(path)}/${path.endsWith('SKILL.md') ? 'SKILL.md' : basenameWithoutExtension(path)}`;
152
- if (type === 'rule')
153
- return `${targetLayout(harness).root}/rules/${basenameWithoutExtension(path)}.md`;
154
- if (type === 'command')
155
- return `${targetLayout(harness).root}/commands/${basenameWithoutExtension(path)}.md`;
156
- if (type === 'agent')
157
- return `${targetLayout(harness).root}/agents/${basenameWithoutExtension(path)}.md`;
158
- if (type === 'mcp-server')
159
- return `${targetLayout(harness).root}/mcp/${basenameWithoutExtension(path)}.json`;
160
- return `${targetLayout(harness).root}/${path}`;
161
- }
162
- function basenameWithoutExtension(path) {
163
- const basename = path.split('/').at(-1) ?? path;
164
- return basename.replace(/\.[^.]+$/, '');
165
- }
166
- export function supportedHarnesses() {
167
- return HarnessSchema.options;
193
+ /** Mandatory filesystem preflight for Control Plane callers after safe materialization.
194
+ * Call immediately before activation inside the same protected installation boundary;
195
+ * a separate preflight is not a substitute for preventing concurrent filesystem mutation.
196
+ */
197
+ export async function verifyBindingPaths(input, roots) {
198
+ const binding = resolveMcpBinding(input, roots);
199
+ if (binding.type !== 'stdio' || input.type !== 'stdio')
200
+ return;
201
+ const root = await realpath(roots.pluginRoot);
202
+ const data = await realpath(roots.pluginData);
203
+ if (root !== roots.pluginRoot || data !== roots.pluginData)
204
+ throw new Error('Supply canonical filesystem-resolved runtime roots.');
205
+ const cwd = await realpath(binding.cwd);
206
+ const expected = input.cwd?.startsWith('${PLUGIN_DATA}') ? data : root;
207
+ if (!within(cwd, expected))
208
+ throw new Error('Working directory resolves outside its declared root.');
209
+ if (input.command.startsWith('./') && !within(await realpath(binding.command), root))
210
+ throw new Error('Executable resolves outside the package root.');
168
211
  }
169
212
  //# sourceMappingURL=harness.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"harness.js","sourceRoot":"","sources":["../src/harness.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,yBAAyB,GAM1B,MAAM,aAAa,CAAA;AAEpB,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAElC,IAAI;IACJ,OAAO;IAFlB,YACW,IAAY,EACZ,OAAO,GAAsB,EAAE;QAExC,KAAK,CAAC,GAAG,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,IAAI,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ACb,CAAA;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,KAAgB,EAAE,KAAmB;IAC5E,MAAM,OAAO,GAAG,iBAAiB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;IAC/C,IAAI,OAAO,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO;QAAE,OAAM;IAC9D,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;IAC7C,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;IAC7C,IAAI,IAAI,KAAK,KAAK,CAAC,UAAU,IAAI,IAAI,KAAK,KAAK,CAAC,UAAU;QACxD,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAA;IACxE,MAAM,GAAG,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;IACvC,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;IACtE,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,QAAQ,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAA;IAC1E,IAAI,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC;QAClF,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAA;AACpE,CAAC"}
@@ -40,8 +40,8 @@ export interface IconMirrorResult {
40
40
  }
41
41
  /**
42
42
  * Maps every mirrored icon back to the exact commit it was resolved from, by
43
- * matching the digest the product advertises. Canonical variants are inspected
44
- * first, mirroring the order product records were built in.
43
+ * matching the digest the product advertises. Retain each distinct pinned
44
+ * origin so the mirror can try another source if one is unavailable.
45
45
  */
46
46
  export declare function resolveIconSources(catalog: Pick<Catalog, 'plugins'>, index: ConsumerIndex): readonly IconSource[];
47
47
  /**