@agentxm/extension-authoring 0.29.2 → 0.30.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.
- package/dist/src/adopt/adopt-extension.d.ts +2 -1
- package/dist/src/adopt/adopt-extension.js +3 -1
- package/dist/src/create/create-extension.d.ts +2 -1
- package/dist/src/create/create-extension.js +4 -2
- package/dist/src/fork/fork-extension.d.ts +2 -1
- package/dist/src/fork/fork-extension.js +3 -1
- package/dist/src/import/import-native-extension.d.ts +2 -1
- package/dist/src/import/import-native-extension.js +3 -1
- package/dist/src/packs/change-pack-membership.js +44 -27
- package/package.json +19 -20
|
@@ -18,7 +18,8 @@ import * as Effect from "effect/Effect";
|
|
|
18
18
|
import * as FileSystem from "effect/FileSystem";
|
|
19
19
|
import type * as HttpClient from "effect/unstable/http/HttpClient";
|
|
20
20
|
import * as Path from "effect/Path";
|
|
21
|
-
import { ExtensionManagers, McpSecretStore, type ManagerRequirements
|
|
21
|
+
import { ExtensionManagers, McpSecretStore, type ManagerRequirements } from "@agentxm/extension-materialization";
|
|
22
|
+
import { type RecipeRequirements } from "@agentxm/workspace-reconciliation";
|
|
22
23
|
import { type ExtensionType, type FqnInvalidError, type Handle } from "@agentxm/extension-model/unstable/extensions";
|
|
23
24
|
import { type CandidateFingerprintFailed, type ExecutionCandidate, type PlanExecution } from "@agentxm/workspace-operations";
|
|
24
25
|
import type { CodingAgentRepository } from "@agentxm/workspace-projection";
|
|
@@ -18,7 +18,9 @@ import * as Effect from "effect/Effect";
|
|
|
18
18
|
import * as FileSystem from "effect/FileSystem";
|
|
19
19
|
import * as Option from "effect/Option";
|
|
20
20
|
import * as Path from "effect/Path";
|
|
21
|
-
import { ExtensionManagers, McpSecretStore,
|
|
21
|
+
import { ExtensionManagers, McpSecretStore, } from "@agentxm/extension-materialization";
|
|
22
|
+
import { materializeAuthoredMcpServer } from "@agentxm/workspace-reconciliation";
|
|
23
|
+
import { buildAuthoredExtensionStep, } from "@agentxm/workspace-reconciliation";
|
|
22
24
|
import { extensionTypeToPlural, formatFqn, parseFqn, } from "@agentxm/extension-model/unstable/extensions";
|
|
23
25
|
import { operationPresentation, prepareExecutionCandidate, resolveExecutionCandidate, } from "@agentxm/workspace-operations";
|
|
24
26
|
import { WorkspaceMutations, resolveWorkspaceExtensionRef, } from "@agentxm/workspace-state";
|
|
@@ -20,7 +20,8 @@ import * as Effect from "effect/Effect";
|
|
|
20
20
|
import type * as FileSystem from "effect/FileSystem";
|
|
21
21
|
import * as Option from "effect/Option";
|
|
22
22
|
import * as Path from "effect/Path";
|
|
23
|
-
import { ExtensionManagers, type ManagerRequirements
|
|
23
|
+
import { ExtensionManagers, type ManagerRequirements } from "@agentxm/extension-materialization";
|
|
24
|
+
import { type RecipeRequirements } from "@agentxm/workspace-reconciliation";
|
|
24
25
|
import { McpSecretStore } from "@agentxm/extension-materialization";
|
|
25
26
|
import { type Handle } from "@agentxm/extension-model/unstable/extensions";
|
|
26
27
|
import type { HookEvent, HookRuntime } from "@agentxm/extension-model/unstable/hooks/manifest-schema";
|
|
@@ -19,8 +19,10 @@
|
|
|
19
19
|
import * as Effect from "effect/Effect";
|
|
20
20
|
import * as Option from "effect/Option";
|
|
21
21
|
import * as Path from "effect/Path";
|
|
22
|
-
import { ExtensionManagers,
|
|
23
|
-
import {
|
|
22
|
+
import { ExtensionManagers, createCanonicalDirectory, groupInstallTargetsByDirectory, recoverCanonicalDirectory, artifactAgentIdsFromTargets, artifactTargetAgentIds, } from "@agentxm/extension-materialization";
|
|
23
|
+
import { buildAuthoredExtensionStep, buildNewExtensionStep, } from "@agentxm/workspace-reconciliation";
|
|
24
|
+
import { McpSecretStore } from "@agentxm/extension-materialization";
|
|
25
|
+
import { materializeAuthoredMcpServer } from "@agentxm/workspace-reconciliation";
|
|
24
26
|
import { CONFIGURABLE_AGENTS_BY_ID } from "@agentxm/extension-model/unstable/agent-capabilities";
|
|
25
27
|
import { toExtensionTypePlural, formatFqn, decodeExtensionNameSync, } from "@agentxm/extension-model/unstable/extensions";
|
|
26
28
|
import { operationPresentation, prepareExecutionCandidate, resolveExecutionCandidate, } from "@agentxm/workspace-operations";
|
|
@@ -23,7 +23,8 @@ import type * as HttpClient from "effect/unstable/http/HttpClient";
|
|
|
23
23
|
import * as Option from "effect/Option";
|
|
24
24
|
import * as Path from "effect/Path";
|
|
25
25
|
import type * as Scope from "effect/Scope";
|
|
26
|
-
import { ExtensionManagers, McpSecretStore, type ManagerRequirements
|
|
26
|
+
import { ExtensionManagers, McpSecretStore, type ManagerRequirements } from "@agentxm/extension-materialization";
|
|
27
|
+
import { type RecipeRequirements } from "@agentxm/workspace-reconciliation";
|
|
27
28
|
import { type ExtensionType, type FqnInvalidError, type Handle } from "@agentxm/extension-model/unstable/extensions";
|
|
28
29
|
import { SourceHostProviders, WorkspaceCatalog, type SourceResolutionFailure } from "@agentxm/extension-sources";
|
|
29
30
|
import { type CandidateFingerprintFailed, type ExecutionCandidate, type PlanExecution } from "@agentxm/workspace-operations";
|
|
@@ -21,7 +21,9 @@ import * as Effect from "effect/Effect";
|
|
|
21
21
|
import * as FileSystem from "effect/FileSystem";
|
|
22
22
|
import * as Option from "effect/Option";
|
|
23
23
|
import * as Path from "effect/Path";
|
|
24
|
-
import { ExtensionManagers, McpSecretStore,
|
|
24
|
+
import { ExtensionManagers, McpSecretStore, copyExtensionDirectory, createCanonicalDirectory, recoverCanonicalDirectory, } from "@agentxm/extension-materialization";
|
|
25
|
+
import { materializeAuthoredMcpServer } from "@agentxm/workspace-reconciliation";
|
|
26
|
+
import { buildAuthoredExtensionStep, } from "@agentxm/workspace-reconciliation";
|
|
25
27
|
import { extensionTypeFromPlural, extensionTypeToPlural, formatFqn, parseFqn, parseSourceQualifiedRegistrySourcePatternParts, } from "@agentxm/extension-model/unstable/extensions";
|
|
26
28
|
import { SourceHostProviders, WorkspaceCatalog, findExtensionPackagesFromSource, inspectExtensionPackage, resolveSource, } from "@agentxm/extension-sources";
|
|
27
29
|
import { operationPresentation, prepareExecutionCandidate, resolveExecutionCandidate, } from "@agentxm/workspace-operations";
|
|
@@ -21,7 +21,8 @@ import type * as HttpClient from "effect/unstable/http/HttpClient";
|
|
|
21
21
|
import * as Option from "effect/Option";
|
|
22
22
|
import * as Path from "effect/Path";
|
|
23
23
|
import type * as Scope from "effect/Scope";
|
|
24
|
-
import { ExtensionManagers, McpSecretStore, type ManagerRequirements, type NativeMcpEntryRef
|
|
24
|
+
import { ExtensionManagers, McpSecretStore, type ManagerRequirements, type NativeMcpEntryRef } from "@agentxm/extension-materialization";
|
|
25
|
+
import { type RecipeRequirements } from "@agentxm/workspace-reconciliation";
|
|
25
26
|
import { type FqnInvalidError, type Handle } from "@agentxm/extension-model/unstable/extensions";
|
|
26
27
|
import { SourceHostProviders, WorkspaceCatalog, type SourceResolutionFailure } from "@agentxm/extension-sources";
|
|
27
28
|
import { type CandidateFingerprintFailed, type ExecutionCandidate, type PlanExecution } from "@agentxm/workspace-operations";
|
|
@@ -19,7 +19,9 @@ import * as Effect from "effect/Effect";
|
|
|
19
19
|
import * as FileSystem from "effect/FileSystem";
|
|
20
20
|
import * as Option from "effect/Option";
|
|
21
21
|
import * as Path from "effect/Path";
|
|
22
|
-
import { ExtensionManagers, McpSecretStore,
|
|
22
|
+
import { ExtensionManagers, McpSecretStore, copyExtensionDirectory, createCanonicalDirectory, recoverCanonicalDirectory, retireNativeMcpEntry, } from "@agentxm/extension-materialization";
|
|
23
|
+
import { materializeAuthoredMcpServer } from "@agentxm/workspace-reconciliation";
|
|
24
|
+
import { buildAuthoredExtensionStep, } from "@agentxm/workspace-reconciliation";
|
|
23
25
|
import { extensionTypeToPlural, formatFqn, parseFqn, } from "@agentxm/extension-model/unstable/extensions";
|
|
24
26
|
import { MCP_SERVER_MANIFEST_FILENAME, MCP_SERVER_MANIFEST_SCHEMA_URL, MCP_SERVER_REGISTRY_SERVER_SCHEMA_URL, } from "@agentxm/extension-model/unstable/mcps/manifest-schema";
|
|
25
27
|
import { decodeVersionSync } from "@agentxm/extension-model/unstable/version-constraints";
|
|
@@ -125,28 +125,50 @@ export const preparePackMembership = Effect.fn("ChangePackMembership.prepare")(f
|
|
|
125
125
|
const unchanged = { _tag: "NoChange", change: request.change, pack };
|
|
126
126
|
return unchanged;
|
|
127
127
|
}
|
|
128
|
+
const packMembership = {
|
|
129
|
+
pack: formatFqn({ owner: packOwner, type: "pack", name: decodeExtensionNameSync(pack) }),
|
|
130
|
+
members: members
|
|
131
|
+
.map((member) => request.change === "add"
|
|
132
|
+
? {
|
|
133
|
+
member: member.fqn,
|
|
134
|
+
before: manifest.dependencies[member.fqn] ?? null,
|
|
135
|
+
after: member.range,
|
|
136
|
+
}
|
|
137
|
+
: { member: member.fqn, before: member.range, after: null })
|
|
138
|
+
.sort((a, b) => (a.member < b.member ? -1 : a.member > b.member ? 1 : 0)),
|
|
139
|
+
};
|
|
140
|
+
const run = request.change === "add"
|
|
141
|
+
? addToPack({
|
|
142
|
+
name: "add-to-pack",
|
|
143
|
+
args: {
|
|
144
|
+
packName: pack,
|
|
145
|
+
packOwner,
|
|
146
|
+
additions: Object.fromEntries(packMembership.members.flatMap((member) => member.after === null ? [] : [[member.member, member.after]])),
|
|
147
|
+
manifestHash,
|
|
148
|
+
},
|
|
149
|
+
})
|
|
150
|
+
: removeFromPack({
|
|
151
|
+
name: "remove-from-pack",
|
|
152
|
+
args: {
|
|
153
|
+
packName: pack,
|
|
154
|
+
packOwner,
|
|
155
|
+
removals: packMembership.members.map((member) => member.member),
|
|
156
|
+
manifestHash,
|
|
157
|
+
},
|
|
158
|
+
});
|
|
128
159
|
const step = {
|
|
129
160
|
readiness: "ready",
|
|
130
161
|
label: pack,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
: removeFromPack({
|
|
142
|
-
name: "remove-from-pack",
|
|
143
|
-
args: {
|
|
144
|
-
packName: pack,
|
|
145
|
-
packOwner,
|
|
146
|
-
removals: members.map((member) => member.fqn),
|
|
147
|
-
manifestHash,
|
|
148
|
-
},
|
|
149
|
-
}),
|
|
162
|
+
artifact: {
|
|
163
|
+
path: manifestPath,
|
|
164
|
+
scope: ws.scope,
|
|
165
|
+
change: "updated",
|
|
166
|
+
fileCount: 1,
|
|
167
|
+
packMembership,
|
|
168
|
+
},
|
|
169
|
+
run: run.pipe(Effect.map((result) => result.result === "success" && result.artifact !== undefined
|
|
170
|
+
? { ...result, artifact: { ...result.artifact, packMembership } }
|
|
171
|
+
: result)),
|
|
150
172
|
};
|
|
151
173
|
const memberCount = members.length;
|
|
152
174
|
const plan = {
|
|
@@ -164,7 +186,7 @@ export const preparePackMembership = Effect.fn("ChangePackMembership.prepare")(f
|
|
|
164
186
|
_tag: "Change",
|
|
165
187
|
change: request.change,
|
|
166
188
|
pack,
|
|
167
|
-
members: members.map((member) => member.
|
|
189
|
+
members: packMembership.members.map((member) => member.member),
|
|
168
190
|
execution: yield* prepareExecutionCandidate(plan),
|
|
169
191
|
};
|
|
170
192
|
return change;
|
|
@@ -217,19 +239,14 @@ const additions = Effect.fn("ChangePackMembership.additions")(function* (args) {
|
|
|
217
239
|
return resolved;
|
|
218
240
|
});
|
|
219
241
|
const removals = Effect.fn("ChangePackMembership.removals")(function* (args) {
|
|
220
|
-
const
|
|
221
|
-
const matched = args.pattern
|
|
222
|
-
? declared.filter((fqn) => selectorMatches(args.request.selector, fqn))
|
|
223
|
-
: declared.includes(args.request.selector)
|
|
224
|
-
? [args.request.selector]
|
|
225
|
-
: [];
|
|
242
|
+
const matched = Object.entries(args.manifest.dependencies).filter(([fqn]) => args.pattern ? selectorMatches(args.request.selector, fqn) : fqn === args.request.selector);
|
|
226
243
|
if (matched.length === 0) {
|
|
227
244
|
return yield* new PackMemberNotDeclared({
|
|
228
245
|
selector: args.request.selector,
|
|
229
246
|
pattern: args.pattern,
|
|
230
247
|
});
|
|
231
248
|
}
|
|
232
|
-
return matched.map((fqn) => ({ fqn, range
|
|
249
|
+
return matched.map(([fqn, range]) => ({ fqn, range }));
|
|
233
250
|
});
|
|
234
251
|
/** The plan a membership change of this direction resolves. */
|
|
235
252
|
export const packMembershipPlanName = (change) => change === "add" ? "Add to pack" : "Remove from pack";
|
package/package.json
CHANGED
|
@@ -4,25 +4,26 @@
|
|
|
4
4
|
"url": "https://github.com/agentxm/axm/issues"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@agentxm/extension-content": "^0.
|
|
8
|
-
"@agentxm/extension-materialization": "^0.
|
|
9
|
-
"@agentxm/extension-model": "^0.
|
|
10
|
-
"@agentxm/extension-sources": "^0.
|
|
11
|
-
"@agentxm/registry-auth": "^0.
|
|
12
|
-
"@agentxm/registry-client": "^0.
|
|
13
|
-
"@agentxm/workspace-operations": "^0.
|
|
14
|
-
"@agentxm/workspace-projection": "^0.
|
|
15
|
-
"@agentxm/workspace-
|
|
16
|
-
"@agentxm/workspace-
|
|
7
|
+
"@agentxm/extension-content": "^0.30.1",
|
|
8
|
+
"@agentxm/extension-materialization": "^0.30.1",
|
|
9
|
+
"@agentxm/extension-model": "^0.30.1",
|
|
10
|
+
"@agentxm/extension-sources": "^0.30.1",
|
|
11
|
+
"@agentxm/registry-auth": "^0.30.1",
|
|
12
|
+
"@agentxm/registry-client": "^0.30.1",
|
|
13
|
+
"@agentxm/workspace-operations": "^0.30.1",
|
|
14
|
+
"@agentxm/workspace-projection": "^0.30.1",
|
|
15
|
+
"@agentxm/workspace-reconciliation": "^0.30.1",
|
|
16
|
+
"@agentxm/workspace-state": "^0.30.1",
|
|
17
|
+
"@agentxm/workspace-transactions": "^0.30.1",
|
|
17
18
|
"effect": "4.0.0-rc.115",
|
|
18
19
|
"semver": "^7.8.5",
|
|
19
20
|
"yaml": "^2.9.0"
|
|
20
21
|
},
|
|
21
22
|
"description": "AXM extension-authoring feature: new-extension scaffolding, fork, native import, adopt/demote identity policy, and authored pack membership for the axm CLI. Unstable and unsupported — use the axm.sh CLI.",
|
|
22
23
|
"devDependencies": {
|
|
23
|
-
"@agentxm/agent-integration": "^0.
|
|
24
|
-
"@agentxm/extension-resolution": "^0.
|
|
25
|
-
"@agentxm/specification-metadata": "^0.
|
|
24
|
+
"@agentxm/agent-integration": "^0.30.1",
|
|
25
|
+
"@agentxm/extension-resolution": "^0.30.1",
|
|
26
|
+
"@agentxm/specification-metadata": "^0.30.1",
|
|
26
27
|
"@effect/platform-node": "4.0.0-rc.115",
|
|
27
28
|
"@effect/vitest": "4.0.0-rc.115",
|
|
28
29
|
"@types/bun": "^1.3.14",
|
|
@@ -36,14 +37,12 @@
|
|
|
36
37
|
},
|
|
37
38
|
"exports": {
|
|
38
39
|
".": {
|
|
39
|
-
"
|
|
40
|
-
"default": "./dist/src/index.js"
|
|
41
|
-
"types": "./dist/src/index.d.ts"
|
|
40
|
+
"types": "./dist/src/index.d.ts",
|
|
41
|
+
"default": "./dist/src/index.js"
|
|
42
42
|
},
|
|
43
43
|
"./testing": {
|
|
44
|
-
"
|
|
45
|
-
"default": "./dist/src/testing.js"
|
|
46
|
-
"types": "./dist/src/testing.d.ts"
|
|
44
|
+
"types": "./dist/src/testing.d.ts",
|
|
45
|
+
"default": "./dist/src/testing.js"
|
|
47
46
|
}
|
|
48
47
|
},
|
|
49
48
|
"files": [
|
|
@@ -66,5 +65,5 @@
|
|
|
66
65
|
},
|
|
67
66
|
"sideEffects": false,
|
|
68
67
|
"type": "module",
|
|
69
|
-
"version": "0.
|
|
68
|
+
"version": "0.30.1"
|
|
70
69
|
}
|