@agentxm/extension-model 0.31.1 → 0.32.0

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 (27) hide show
  1. package/dist/src/unstable/extensions/archival.d.ts +16 -0
  2. package/dist/src/unstable/extensions/archival.js +19 -0
  3. package/dist/src/unstable/extensions/common.d.ts +148 -0
  4. package/dist/src/unstable/extensions/common.js +66 -1
  5. package/dist/src/unstable/extensions/index.d.ts +1 -1
  6. package/dist/src/unstable/extensions/index.js +1 -1
  7. package/dist/src/unstable/extensions/installable-types.d.ts +4 -4
  8. package/dist/src/unstable/extensions/installable-types.js +9 -5
  9. package/dist/src/unstable/extensions/refs/pack.d.ts +20 -3
  10. package/dist/src/unstable/extensions/refs/ref-base.d.ts +6 -2
  11. package/dist/src/unstable/extensions/universal-skills-dir.d.ts +2 -2
  12. package/dist/src/unstable/extensions/universal-skills-dir.js +8 -2
  13. package/dist/src/unstable/hooks/manifest-schema.js +1 -1
  14. package/dist/src/unstable/packs/manifest-schema.d.ts +7 -1
  15. package/dist/src/unstable/packs/manifest-schema.js +3 -3
  16. package/dist/src/unstable/recommendations/agent-extensions.d.ts +89 -0
  17. package/dist/src/unstable/recommendations/agent-extensions.js +79 -0
  18. package/dist/src/unstable/sources/parser.d.ts +2 -1
  19. package/dist/src/unstable/sources/parser.js +17 -7
  20. package/dist/src/unstable/sources/printer.js +32 -9
  21. package/dist/src/unstable/sources/types.d.ts +8 -48
  22. package/dist/src/unstable/sources/types.js +1 -9
  23. package/dist/src/unstable/workspace-scope.d.ts +1 -1
  24. package/dist/src/unstable/workspace-scope.js +1 -1
  25. package/package.json +13 -5
  26. package/dist/src/unstable/release-channel.d.ts +0 -156
  27. package/dist/src/unstable/release-channel.js +0 -92
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Identity archival vocabulary carried by resolved extension references.
3
+ *
4
+ * Archival blocks new publication while leaving historical releases
5
+ * resolvable. Publisher-management composites stay in
6
+ * `@agentxm/registry-protocol`.
7
+ *
8
+ * @experimental This API is unstable and may change without notice.
9
+ */
10
+ import * as Schema from "effect/Schema";
11
+ export declare const ArchivalViewSchema: Schema.Struct<{
12
+ readonly archivedAt: Schema.decodeTo<Schema.DateTimeUtc, Schema.String, never, never>;
13
+ readonly reason: Schema.optional<Schema.String>;
14
+ }>;
15
+ export type ArchivalView = typeof ArchivalViewSchema.Type;
16
+ //# sourceMappingURL=archival.d.ts.map
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Identity archival vocabulary carried by resolved extension references.
3
+ *
4
+ * Archival blocks new publication while leaving historical releases
5
+ * resolvable. Publisher-management composites stay in
6
+ * `@agentxm/registry-protocol`.
7
+ *
8
+ * @experimental This API is unstable and may change without notice.
9
+ */
10
+ import * as Schema from "effect/Schema";
11
+ import { DateTimeUtcSchema } from "../date-time.js";
12
+ export const ArchivalViewSchema = Schema.Struct({
13
+ archivedAt: DateTimeUtcSchema,
14
+ reason: Schema.optional(Schema.String.check(Schema.isMinLength(1), Schema.isMaxLength(500))),
15
+ }).annotate({
16
+ identifier: "ArchivalView",
17
+ description: "Canonical authorization-safe extension archival state.",
18
+ });
19
+ //# sourceMappingURL=archival.js.map
@@ -6,6 +6,7 @@
6
6
  import * as Schema from "effect/Schema";
7
7
  import * as Option from "effect/Option";
8
8
  import { AgentIdSchema } from "../agent-capabilities/identity.js";
9
+ import { type VersionRange } from "../version-constraints/version-constraints.js";
9
10
  /**
10
11
  * Author information for a manifest.
11
12
  *
@@ -85,6 +86,12 @@ export type ExtensionPlacement = "per-agent" | "workspace" | "container";
85
86
  export type StandardGoverns = "package-body" | "runtime-protocol" | "host-file";
86
87
  /** Workspace-level capability a type participates in. */
87
88
  export type WorkspaceCapabilityKey = "instructions";
89
+ /** Authority families an extension may be installed from. */
90
+ export declare const extensionSourceFamilies: readonly ["git", "registry", "path", "workspace"];
91
+ export type ExtensionSourceFamily = (typeof extensionSourceFamilies)[number];
92
+ type ExtensionInstallability = {
93
+ readonly [Family in ExtensionSourceFamily]: boolean;
94
+ };
88
95
  /**
89
96
  * One extension type's naming and capability-axis row. Every CONDITIONAL
90
97
  * parity obligation is a predicate over the five axis columns.
@@ -95,10 +102,12 @@ interface ExtensionTypeRow {
95
102
  readonly pluralLabel: string;
96
103
  readonly sentenceLabel: string;
97
104
  readonly pluralSentenceLabel: string;
105
+ readonly sourceDirectory: "src" | null;
98
106
  readonly distribution: ExtensionDistribution;
99
107
  readonly placement: ExtensionPlacement;
100
108
  readonly governs: StandardGoverns | null;
101
109
  readonly installInputs: boolean;
110
+ readonly installableFrom: ExtensionInstallability;
102
111
  readonly workspaceCapability: WorkspaceCapabilityKey | null;
103
112
  }
104
113
  /**
@@ -118,10 +127,17 @@ export declare const EXTENSION_TYPE_TABLE: {
118
127
  readonly pluralLabel: "Skills";
119
128
  readonly sentenceLabel: "skill";
120
129
  readonly pluralSentenceLabel: "skills";
130
+ readonly sourceDirectory: "src";
121
131
  readonly distribution: "registry";
122
132
  readonly placement: "per-agent";
123
133
  readonly governs: "package-body";
124
134
  readonly installInputs: false;
135
+ readonly installableFrom: {
136
+ readonly git: true;
137
+ readonly registry: true;
138
+ readonly path: true;
139
+ readonly workspace: true;
140
+ };
125
141
  readonly workspaceCapability: null;
126
142
  };
127
143
  readonly "mcp-server": {
@@ -130,10 +146,17 @@ export declare const EXTENSION_TYPE_TABLE: {
130
146
  readonly pluralLabel: "MCP Servers";
131
147
  readonly sentenceLabel: "MCP server";
132
148
  readonly pluralSentenceLabel: "MCP servers";
149
+ readonly sourceDirectory: null;
133
150
  readonly distribution: "registry";
134
151
  readonly placement: "per-agent";
135
152
  readonly governs: "runtime-protocol";
136
153
  readonly installInputs: true;
154
+ readonly installableFrom: {
155
+ readonly git: true;
156
+ readonly registry: true;
157
+ readonly path: true;
158
+ readonly workspace: true;
159
+ };
137
160
  readonly workspaceCapability: null;
138
161
  };
139
162
  readonly subagent: {
@@ -142,10 +165,17 @@ export declare const EXTENSION_TYPE_TABLE: {
142
165
  readonly pluralLabel: "Subagents";
143
166
  readonly sentenceLabel: "subagent";
144
167
  readonly pluralSentenceLabel: "subagents";
168
+ readonly sourceDirectory: "src";
145
169
  readonly distribution: "registry";
146
170
  readonly placement: "per-agent";
147
171
  readonly governs: null;
148
172
  readonly installInputs: false;
173
+ readonly installableFrom: {
174
+ readonly git: true;
175
+ readonly registry: true;
176
+ readonly path: true;
177
+ readonly workspace: true;
178
+ };
149
179
  readonly workspaceCapability: null;
150
180
  };
151
181
  readonly rule: {
@@ -154,10 +184,17 @@ export declare const EXTENSION_TYPE_TABLE: {
154
184
  readonly pluralLabel: "Rules";
155
185
  readonly sentenceLabel: "rule";
156
186
  readonly pluralSentenceLabel: "rules";
187
+ readonly sourceDirectory: "src";
157
188
  readonly distribution: "registry";
158
189
  readonly placement: "workspace";
159
190
  readonly governs: "host-file";
160
191
  readonly installInputs: false;
192
+ readonly installableFrom: {
193
+ readonly git: true;
194
+ readonly registry: true;
195
+ readonly path: true;
196
+ readonly workspace: true;
197
+ };
161
198
  readonly workspaceCapability: "instructions";
162
199
  };
163
200
  readonly hook: {
@@ -166,10 +203,17 @@ export declare const EXTENSION_TYPE_TABLE: {
166
203
  readonly pluralLabel: "Hooks";
167
204
  readonly sentenceLabel: "hook";
168
205
  readonly pluralSentenceLabel: "hooks";
206
+ readonly sourceDirectory: "src";
169
207
  readonly distribution: "registry";
170
208
  readonly placement: "per-agent";
171
209
  readonly governs: null;
172
210
  readonly installInputs: false;
211
+ readonly installableFrom: {
212
+ readonly git: true;
213
+ readonly registry: true;
214
+ readonly path: true;
215
+ readonly workspace: true;
216
+ };
173
217
  readonly workspaceCapability: null;
174
218
  };
175
219
  readonly knowledge: {
@@ -178,10 +222,17 @@ export declare const EXTENSION_TYPE_TABLE: {
178
222
  readonly pluralLabel: "Knowledge";
179
223
  readonly sentenceLabel: "knowledge bundle";
180
224
  readonly pluralSentenceLabel: "knowledge bundles";
225
+ readonly sourceDirectory: "src";
181
226
  readonly distribution: "registry";
182
227
  readonly placement: "workspace";
183
228
  readonly governs: "package-body";
184
229
  readonly installInputs: false;
230
+ readonly installableFrom: {
231
+ readonly git: true;
232
+ readonly registry: true;
233
+ readonly path: true;
234
+ readonly workspace: true;
235
+ };
185
236
  readonly workspaceCapability: null;
186
237
  };
187
238
  readonly pack: {
@@ -190,10 +241,17 @@ export declare const EXTENSION_TYPE_TABLE: {
190
241
  readonly pluralLabel: "Packs";
191
242
  readonly sentenceLabel: "pack";
192
243
  readonly pluralSentenceLabel: "packs";
244
+ readonly sourceDirectory: null;
193
245
  readonly distribution: "registry";
194
246
  readonly placement: "container";
195
247
  readonly governs: null;
196
248
  readonly installInputs: false;
249
+ readonly installableFrom: {
250
+ readonly git: true;
251
+ readonly registry: true;
252
+ readonly path: true;
253
+ readonly workspace: true;
254
+ };
197
255
  readonly workspaceCapability: null;
198
256
  };
199
257
  };
@@ -239,6 +297,10 @@ export type ContainerType = TypesWhere<"placement", "container">;
239
297
  export type RegistryType = PerAgentType | WorkspaceType;
240
298
  /** Extension types whose installs accept user-provided inputs. */
241
299
  export type InputType = TypesWhere<"installInputs", true>;
300
+ /** Extension types installable from one source family. */
301
+ export type InstallableFrom<Family extends ExtensionSourceFamily> = {
302
+ [Type in ExtensionType]: ExtensionTypeRows[Type]["installableFrom"][Family] extends true ? Type : never;
303
+ }[ExtensionType];
242
304
  /** Extension types whose governing standard covers the package body. */
243
305
  export type BodyGovernedType = TypesWhere<"governs", "package-body">;
244
306
  /**
@@ -258,6 +320,45 @@ export declare const WORKSPACE_EXTENSION_TYPES: ReadonlyArray<WorkspaceType>;
258
320
  export declare const CONTAINER_EXTENSION_TYPES: ReadonlyArray<ContainerType>;
259
321
  export declare const REGISTRY_EXTENSION_TYPES: ReadonlyArray<RegistryType>;
260
322
  export declare const INPUT_EXTENSION_TYPES: ReadonlyArray<InputType>;
323
+ /** Installability policy, total over every extension type and source family. */
324
+ export declare const INSTALLABLE_FROM_BY_TYPE: Record<"skill" | "mcp-server" | "subagent" | "rule" | "hook" | "knowledge" | "pack", {
325
+ readonly git: true;
326
+ readonly registry: true;
327
+ readonly path: true;
328
+ readonly workspace: true;
329
+ } | {
330
+ readonly git: true;
331
+ readonly registry: true;
332
+ readonly path: true;
333
+ readonly workspace: true;
334
+ } | {
335
+ readonly git: true;
336
+ readonly registry: true;
337
+ readonly path: true;
338
+ readonly workspace: true;
339
+ } | {
340
+ readonly git: true;
341
+ readonly registry: true;
342
+ readonly path: true;
343
+ readonly workspace: true;
344
+ } | {
345
+ readonly git: true;
346
+ readonly registry: true;
347
+ readonly path: true;
348
+ readonly workspace: true;
349
+ } | {
350
+ readonly git: true;
351
+ readonly registry: true;
352
+ readonly path: true;
353
+ readonly workspace: true;
354
+ } | {
355
+ readonly git: true;
356
+ readonly registry: true;
357
+ readonly path: true;
358
+ readonly workspace: true;
359
+ }>;
360
+ export declare const extensionTypesInstallableFrom: <Family extends ExtensionSourceFamily>(family: Family) => ReadonlyArray<InstallableFrom<Family>>;
361
+ export declare const isInstallableFrom: <Family extends ExtensionSourceFamily>(type: ExtensionType, family: Family) => type is InstallableFrom<Family>;
261
362
  export declare const BODY_GOVERNED_EXTENSION_TYPES: ReadonlyArray<BodyGovernedType>;
262
363
  export declare const SPEC_TRACKED_EXTENSION_TYPES: ReadonlyArray<SpecTrackedType>;
263
364
  export declare const WORKSPACE_CAPABILITY_EXTENSION_TYPES: ReadonlyArray<WorkspaceCapabilityType>;
@@ -434,6 +535,53 @@ export declare const NonPackExtensionDependencyConstraintMapSchema: Schema.$Reco
434
535
  * @experimental This API is unstable and may change without notice.
435
536
  */
436
537
  export type NonPackExtensionDependencyConstraintMap = Schema.Schema.Type<typeof NonPackExtensionDependencyConstraintMapSchema>;
538
+ /**
539
+ * An explicit Registry source for one Pack member.
540
+ *
541
+ * Pack manifests intentionally carry the Registry URL rather than a configured
542
+ * source name so the declaration remains self-describing when shared.
543
+ *
544
+ * @experimental This API is unstable and may change without notice.
545
+ */
546
+ export declare const PackMemberRegistrySourceSchema: Schema.Struct<{
547
+ readonly type: Schema.Literal<"registry">;
548
+ readonly url: Schema.URLFromString;
549
+ }>;
550
+ /** @experimental This API is unstable and may change without notice. */
551
+ export type PackMemberRegistrySource = Schema.Schema.Type<typeof PackMemberRegistrySourceSchema>;
552
+ /**
553
+ * A Pack member constraint either inherits the Pack's source or names an
554
+ * explicit Registry source. Other locator families are deliberately absent.
555
+ *
556
+ * @experimental This API is unstable and may change without notice.
557
+ */
558
+ export declare const PackMemberConstraintSchema: Schema.Union<readonly [Schema.brand<Schema.NonEmptyString, "VersionRange">, Schema.Struct<{
559
+ readonly source: Schema.Struct<{
560
+ readonly type: Schema.Literal<"registry">;
561
+ readonly url: Schema.URLFromString;
562
+ }>;
563
+ readonly versionRange: Schema.brand<Schema.NonEmptyString, "VersionRange">;
564
+ }>]>;
565
+ /** @experimental This API is unstable and may change without notice. */
566
+ export type PackMemberConstraint = Schema.Schema.Type<typeof PackMemberConstraintSchema>;
567
+ /** The semver range carried by either Pack member declaration form. */
568
+ export declare const packMemberVersionRange: (constraint: PackMemberConstraint) => VersionRange;
569
+ /** The explicit Registry locator, when the member does not inherit the Pack source. */
570
+ export declare const packMemberRegistrySource: (constraint: PackMemberConstraint) => PackMemberRegistrySource | undefined;
571
+ /**
572
+ * Map of non-Pack extension identities to source-aware Pack member constraints.
573
+ *
574
+ * @experimental This API is unstable and may change without notice.
575
+ */
576
+ export declare const PackMemberConstraintMapSchema: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.brand<Schema.NonEmptyString, "VersionRange">, Schema.Struct<{
577
+ readonly source: Schema.Struct<{
578
+ readonly type: Schema.Literal<"registry">;
579
+ readonly url: Schema.URLFromString;
580
+ }>;
581
+ readonly versionRange: Schema.brand<Schema.NonEmptyString, "VersionRange">;
582
+ }>]>>;
583
+ /** @experimental This API is unstable and may change without notice. */
584
+ export type PackMemberConstraintMap = Schema.Schema.Type<typeof PackMemberConstraintMapSchema>;
437
585
  /**
438
586
  * Publish-time packaging options.
439
587
  *
@@ -12,7 +12,7 @@ import { HANDLE_PATTERN_SOURCE, HandleSchema } from "./handle.js";
12
12
  import { parseLicenseExpression } from "./license.js";
13
13
  import { CompanionPackageSchema } from "../package-urls/index.js";
14
14
  import { ExtensionMetadataSchema } from "./manifest-metadata.js";
15
- import { VersionSchema, VersionRangeSchema } from "../version-constraints/version-constraints.js";
15
+ import { VersionSchema, VersionRangeSchema, } from "../version-constraints/version-constraints.js";
16
16
  /**
17
17
  * Author information for a manifest.
18
18
  *
@@ -112,6 +112,8 @@ export const LicenseSchema = Schema.String.annotate({
112
112
  }).check(Schema.makeFilter((value) => Result.isSuccess(parseLicenseExpression(value))
113
113
  ? true
114
114
  : "Expected a valid SPDX license expression or UNLICENSED"));
115
+ /** Authority families an extension may be installed from. */
116
+ export const extensionSourceFamilies = ["git", "registry", "path", "workspace"];
115
117
  /**
116
118
  * Single source of truth for extension type naming. Row order is the canonical
117
119
  * display order. Every other type-naming export in this module derives from
@@ -129,10 +131,12 @@ export const EXTENSION_TYPE_TABLE = {
129
131
  pluralLabel: "Skills",
130
132
  sentenceLabel: "skill",
131
133
  pluralSentenceLabel: "skills",
134
+ sourceDirectory: "src",
132
135
  distribution: "registry",
133
136
  placement: "per-agent",
134
137
  governs: "package-body",
135
138
  installInputs: false,
139
+ installableFrom: { git: true, registry: true, path: true, workspace: true },
136
140
  workspaceCapability: null,
137
141
  },
138
142
  "mcp-server": {
@@ -141,10 +145,12 @@ export const EXTENSION_TYPE_TABLE = {
141
145
  pluralLabel: "MCP Servers",
142
146
  sentenceLabel: "MCP server",
143
147
  pluralSentenceLabel: "MCP servers",
148
+ sourceDirectory: null,
144
149
  distribution: "registry",
145
150
  placement: "per-agent",
146
151
  governs: "runtime-protocol",
147
152
  installInputs: true,
153
+ installableFrom: { git: true, registry: true, path: true, workspace: true },
148
154
  workspaceCapability: null,
149
155
  },
150
156
  subagent: {
@@ -153,10 +159,12 @@ export const EXTENSION_TYPE_TABLE = {
153
159
  pluralLabel: "Subagents",
154
160
  sentenceLabel: "subagent",
155
161
  pluralSentenceLabel: "subagents",
162
+ sourceDirectory: "src",
156
163
  distribution: "registry",
157
164
  placement: "per-agent",
158
165
  governs: null,
159
166
  installInputs: false,
167
+ installableFrom: { git: true, registry: true, path: true, workspace: true },
160
168
  workspaceCapability: null,
161
169
  },
162
170
  rule: {
@@ -165,10 +173,12 @@ export const EXTENSION_TYPE_TABLE = {
165
173
  pluralLabel: "Rules",
166
174
  sentenceLabel: "rule",
167
175
  pluralSentenceLabel: "rules",
176
+ sourceDirectory: "src",
168
177
  distribution: "registry",
169
178
  placement: "workspace",
170
179
  governs: "host-file",
171
180
  installInputs: false,
181
+ installableFrom: { git: true, registry: true, path: true, workspace: true },
172
182
  workspaceCapability: "instructions",
173
183
  },
174
184
  hook: {
@@ -177,10 +187,12 @@ export const EXTENSION_TYPE_TABLE = {
177
187
  pluralLabel: "Hooks",
178
188
  sentenceLabel: "hook",
179
189
  pluralSentenceLabel: "hooks",
190
+ sourceDirectory: "src",
180
191
  distribution: "registry",
181
192
  placement: "per-agent",
182
193
  governs: null,
183
194
  installInputs: false,
195
+ installableFrom: { git: true, registry: true, path: true, workspace: true },
184
196
  workspaceCapability: null,
185
197
  },
186
198
  knowledge: {
@@ -189,10 +201,12 @@ export const EXTENSION_TYPE_TABLE = {
189
201
  pluralLabel: "Knowledge",
190
202
  sentenceLabel: "knowledge bundle",
191
203
  pluralSentenceLabel: "knowledge bundles",
204
+ sourceDirectory: "src",
192
205
  distribution: "registry",
193
206
  placement: "workspace",
194
207
  governs: "package-body",
195
208
  installInputs: false,
209
+ installableFrom: { git: true, registry: true, path: true, workspace: true },
196
210
  workspaceCapability: null,
197
211
  },
198
212
  pack: {
@@ -201,10 +215,12 @@ export const EXTENSION_TYPE_TABLE = {
201
215
  pluralLabel: "Packs",
202
216
  sentenceLabel: "pack",
203
217
  pluralSentenceLabel: "packs",
218
+ sourceDirectory: null,
204
219
  distribution: "registry",
205
220
  placement: "container",
206
221
  governs: null,
207
222
  installInputs: false,
223
+ installableFrom: { git: true, registry: true, path: true, workspace: true },
208
224
  workspaceCapability: null,
209
225
  },
210
226
  };
@@ -237,6 +253,10 @@ export const WORKSPACE_EXTENSION_TYPES = extensionTypes.filter((type) => EXTENSI
237
253
  export const CONTAINER_EXTENSION_TYPES = extensionTypes.filter((type) => EXTENSION_TYPE_TABLE[type].placement === "container");
238
254
  export const REGISTRY_EXTENSION_TYPES = extensionTypes.filter((type) => EXTENSION_TYPE_TABLE[type].placement !== "container");
239
255
  export const INPUT_EXTENSION_TYPES = extensionTypes.filter((type) => EXTENSION_TYPE_TABLE[type].installInputs);
256
+ /** Installability policy, total over every extension type and source family. */
257
+ export const INSTALLABLE_FROM_BY_TYPE = EffectRecord.map(EXTENSION_TYPE_TABLE, (row) => row.installableFrom);
258
+ export const extensionTypesInstallableFrom = (family) => extensionTypes.filter((type) => INSTALLABLE_FROM_BY_TYPE[type][family]);
259
+ export const isInstallableFrom = (type, family) => INSTALLABLE_FROM_BY_TYPE[type][family];
240
260
  export const BODY_GOVERNED_EXTENSION_TYPES = extensionTypes.filter((type) => EXTENSION_TYPE_TABLE[type].governs === "package-body");
241
261
  export const SPEC_TRACKED_EXTENSION_TYPES = extensionTypes.filter((type) => EXTENSION_TYPE_TABLE[type].governs !== null);
242
262
  export const WORKSPACE_CAPABILITY_EXTENSION_TYPES = extensionTypes.filter((type) => EXTENSION_TYPE_TABLE[type].workspaceCapability !== null);
@@ -482,6 +502,51 @@ export const NonPackExtensionDependencyConstraintMapSchema = Schema.Record(Schem
482
502
  .annotate({
483
503
  description: "Map of fully-qualified non-pack extension names to version ranges. Packs cannot depend on other packs.",
484
504
  });
505
+ /**
506
+ * An explicit Registry source for one Pack member.
507
+ *
508
+ * Pack manifests intentionally carry the Registry URL rather than a configured
509
+ * source name so the declaration remains self-describing when shared.
510
+ *
511
+ * @experimental This API is unstable and may change without notice.
512
+ */
513
+ export const PackMemberRegistrySourceSchema = Schema.Struct({
514
+ type: Schema.Literal("registry"),
515
+ url: Schema.URLFromString,
516
+ }).annotate({
517
+ identifier: "PackMemberRegistrySource",
518
+ description: "A self-describing Registry locator for one Pack member.",
519
+ });
520
+ /**
521
+ * A Pack member constraint either inherits the Pack's source or names an
522
+ * explicit Registry source. Other locator families are deliberately absent.
523
+ *
524
+ * @experimental This API is unstable and may change without notice.
525
+ */
526
+ export const PackMemberConstraintSchema = Schema.Union([
527
+ VersionRangeSchema,
528
+ Schema.Struct({
529
+ source: PackMemberRegistrySourceSchema,
530
+ versionRange: VersionRangeSchema,
531
+ }).annotate({ identifier: "ExplicitRegistryPackMemberConstraint" }),
532
+ ]).annotate({
533
+ identifier: "PackMemberConstraint",
534
+ description: "A version range that inherits the Pack source, or an explicit Registry locator and range.",
535
+ });
536
+ /** The semver range carried by either Pack member declaration form. */
537
+ export const packMemberVersionRange = (constraint) => typeof constraint === "string" ? constraint : constraint.versionRange;
538
+ /** The explicit Registry locator, when the member does not inherit the Pack source. */
539
+ export const packMemberRegistrySource = (constraint) => typeof constraint === "string" ? undefined : constraint.source;
540
+ /**
541
+ * Map of non-Pack extension identities to source-aware Pack member constraints.
542
+ *
543
+ * @experimental This API is unstable and may change without notice.
544
+ */
545
+ export const PackMemberConstraintMapSchema = Schema.Record(Schema.String, PackMemberConstraintSchema)
546
+ .check(Schema.isPropertyNames(NonPackExtensionFqnSchema))
547
+ .annotate({
548
+ description: "Map of fully-qualified non-Pack extension names to inherited ranges or explicit Registry locators. Packs cannot depend on other Packs.",
549
+ });
485
550
  /**
486
551
  * Publish-time packaging options.
487
552
  *
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @experimental This API is unstable and may change without notice.
5
5
  */
6
- export { AgentIdSchema, type Author, AuthorSchema, CONTAINER_EXTENSION_TYPES, CommonManifestBaseFields, type ConfigurableAgentId, ConfigurableAgentIdSchema, type ContainerType, EXTENSION_NAME_PATTERN, EXTENSION_ONLY_TYPES, type ExtensionDependencyConstraintMap, ExtensionDependencyConstraintMapSchema, type ExtensionFqn, type ExtensionFqnParts, ExtensionFqnPartsSchema, ExtensionFqnSchema, type ExtensionName, ExtensionNameSchema, type ExtensionSpec, ExtensionSpecSchema, type ExtensionType, type ExtensionTypePlural, ExtensionTypePluralSchema, ExtensionTypeSchema, type ExtensionVisibility, ExtensionVisibilitySchema, FQN_PATTERN, LicenseSchema, NON_PACK_FQN_PATTERN, type NonPackExtensionDependencyConstraintMap, NonPackExtensionDependencyConstraintMapSchema, type NonPackExtensionFqn, NonPackExtensionFqnSchema, type NonPackExtensionTypePlural, NonPackManifestFields, PACK_FQN_PATTERN, PER_AGENT_EXTENSION_TYPES, type PackFqn, PackFqnSchema, type PackSpec, PackSpecSchema, type PerAgentType, type PublishOptions, PublishOptionsSchema, WORKSPACE_CAPABILITY_EXTENSION_TYPES, type WorkspaceCapabilityType, decodeExtensionNameSync, extensionTypeFromPlural, extensionTypeLabels, extensionTypePluralLabels, extensionTypePluralSegments, extensionTypePluralSentenceLabels, extensionTypeSentenceLabels, extensionTypeToPlural, extensionTypes, isExtensionType, isExtensionTypePlural, nonPackExtensionTypePluralSegments, parseExtensionFqnParts, parseExtensionSpecParts, toAuthor, toExtensionType, toExtensionTypePlural, } from "./common.js";
6
+ export { AgentIdSchema, type Author, AuthorSchema, CONTAINER_EXTENSION_TYPES, CommonManifestBaseFields, type ConfigurableAgentId, ConfigurableAgentIdSchema, type ContainerType, EXTENSION_NAME_PATTERN, EXTENSION_ONLY_TYPES, INSTALLABLE_FROM_BY_TYPE, type ExtensionDependencyConstraintMap, ExtensionDependencyConstraintMapSchema, type ExtensionFqn, type ExtensionFqnParts, ExtensionFqnPartsSchema, ExtensionFqnSchema, type ExtensionName, ExtensionNameSchema, type ExtensionSpec, ExtensionSpecSchema, type ExtensionSourceFamily, type ExtensionType, type ExtensionTypePlural, ExtensionTypePluralSchema, ExtensionTypeSchema, type ExtensionVisibility, ExtensionVisibilitySchema, FQN_PATTERN, LicenseSchema, NON_PACK_FQN_PATTERN, type NonPackExtensionDependencyConstraintMap, NonPackExtensionDependencyConstraintMapSchema, type NonPackExtensionFqn, NonPackExtensionFqnSchema, type NonPackExtensionTypePlural, NonPackManifestFields, PACK_FQN_PATTERN, PER_AGENT_EXTENSION_TYPES, type PackFqn, PackFqnSchema, type PackMemberConstraint, PackMemberConstraintMapSchema, PackMemberConstraintSchema, type PackMemberConstraintMap, type PackMemberRegistrySource, PackMemberRegistrySourceSchema, packMemberRegistrySource, packMemberVersionRange, type PackSpec, PackSpecSchema, type PerAgentType, type PublishOptions, PublishOptionsSchema, WORKSPACE_CAPABILITY_EXTENSION_TYPES, type WorkspaceCapabilityType, decodeExtensionNameSync, extensionTypeFromPlural, extensionTypeLabels, extensionTypePluralLabels, extensionTypePluralSegments, extensionTypePluralSentenceLabels, extensionTypeSentenceLabels, extensionTypeToPlural, extensionTypes, extensionSourceFamilies, extensionTypesInstallableFrom, isInstallableFrom, isExtensionType, isExtensionTypePlural, nonPackExtensionTypePluralSegments, parseExtensionFqnParts, parseExtensionSpecParts, toAuthor, toExtensionType, toExtensionTypePlural, } from "./common.js";
7
7
  export { type ReleaseAgeExcludePattern, ReleaseAgeExcludePatternSchema, matchesReleaseAgeExcludePattern, } from "./fqn-pattern.js";
8
8
  export { FqnInvalidError, formatFqn, parseFqn, parseFqnOrThrow } from "./fqn.js";
9
9
  export { HANDLE_PATTERN, HANDLE_PATTERN_SOURCE, type Handle, HandleSchema, SLUG_PATTERN, SLUG_PATTERN_SOURCE, type Slug, SlugSchema, decodeHandleSync, decodeSlugSync, handleFromSlug, normalizeHandle, normalizeSlug, slugFromHandle, } from "./handle.js";
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @experimental This API is unstable and may change without notice.
5
5
  */
6
- export { AgentIdSchema, AuthorSchema, CONTAINER_EXTENSION_TYPES, CommonManifestBaseFields, ConfigurableAgentIdSchema, EXTENSION_NAME_PATTERN, EXTENSION_ONLY_TYPES, ExtensionDependencyConstraintMapSchema, ExtensionFqnPartsSchema, ExtensionFqnSchema, ExtensionNameSchema, ExtensionSpecSchema, ExtensionTypePluralSchema, ExtensionTypeSchema, ExtensionVisibilitySchema, FQN_PATTERN, LicenseSchema, NON_PACK_FQN_PATTERN, NonPackExtensionDependencyConstraintMapSchema, NonPackExtensionFqnSchema, NonPackManifestFields, PACK_FQN_PATTERN, PER_AGENT_EXTENSION_TYPES, PackFqnSchema, PackSpecSchema, PublishOptionsSchema, WORKSPACE_CAPABILITY_EXTENSION_TYPES, decodeExtensionNameSync, extensionTypeFromPlural, extensionTypeLabels, extensionTypePluralLabels, extensionTypePluralSegments, extensionTypePluralSentenceLabels, extensionTypeSentenceLabels, extensionTypeToPlural, extensionTypes, isExtensionType, isExtensionTypePlural, nonPackExtensionTypePluralSegments, parseExtensionFqnParts, parseExtensionSpecParts, toAuthor, toExtensionType, toExtensionTypePlural, } from "./common.js";
6
+ export { AgentIdSchema, AuthorSchema, CONTAINER_EXTENSION_TYPES, CommonManifestBaseFields, ConfigurableAgentIdSchema, EXTENSION_NAME_PATTERN, EXTENSION_ONLY_TYPES, INSTALLABLE_FROM_BY_TYPE, ExtensionDependencyConstraintMapSchema, ExtensionFqnPartsSchema, ExtensionFqnSchema, ExtensionNameSchema, ExtensionSpecSchema, ExtensionTypePluralSchema, ExtensionTypeSchema, ExtensionVisibilitySchema, FQN_PATTERN, LicenseSchema, NON_PACK_FQN_PATTERN, NonPackExtensionDependencyConstraintMapSchema, NonPackExtensionFqnSchema, NonPackManifestFields, PACK_FQN_PATTERN, PER_AGENT_EXTENSION_TYPES, PackFqnSchema, PackMemberConstraintMapSchema, PackMemberConstraintSchema, PackMemberRegistrySourceSchema, packMemberRegistrySource, packMemberVersionRange, PackSpecSchema, PublishOptionsSchema, WORKSPACE_CAPABILITY_EXTENSION_TYPES, decodeExtensionNameSync, extensionTypeFromPlural, extensionTypeLabels, extensionTypePluralLabels, extensionTypePluralSegments, extensionTypePluralSentenceLabels, extensionTypeSentenceLabels, extensionTypeToPlural, extensionTypes, extensionSourceFamilies, extensionTypesInstallableFrom, isInstallableFrom, isExtensionType, isExtensionTypePlural, nonPackExtensionTypePluralSegments, parseExtensionFqnParts, parseExtensionSpecParts, toAuthor, toExtensionType, toExtensionTypePlural, } from "./common.js";
7
7
  export { ReleaseAgeExcludePatternSchema, matchesReleaseAgeExcludePattern, } from "./fqn-pattern.js";
8
8
  export { FqnInvalidError, formatFqn, parseFqn, parseFqnOrThrow } from "./fqn.js";
9
9
  export { HANDLE_PATTERN, HANDLE_PATTERN_SOURCE, HandleSchema, SLUG_PATTERN, SLUG_PATTERN_SOURCE, SlugSchema, decodeHandleSync, decodeSlugSync, handleFromSlug, normalizeHandle, normalizeSlug, slugFromHandle, } from "./handle.js";
@@ -1,12 +1,12 @@
1
1
  import * as Schema from "effect/Schema";
2
- export declare const installableExtensionTypes: readonly ("skill" | "mcp-server" | "subagent" | "rule" | "hook" | "knowledge" | "pack")[];
2
+ export declare const installableExtensionTypes: import("./common.js").InstallableFrom<"git" | "workspace" | "registry" | "path">[];
3
3
  export type InstallableExtensionType = (typeof installableExtensionTypes)[number];
4
4
  export declare const isInstallableExtensionType: (value: string | undefined) => value is InstallableExtensionType;
5
- export declare const installableExtensionTypePluralSegments: readonly ("skills" | "mcps" | "subagents" | "rules" | "hooks" | "knowledge" | "packs")[];
5
+ export declare const installableExtensionTypePluralSegments: ("skills" | "mcps" | "subagents" | "rules" | "hooks" | "knowledge" | "packs")[];
6
6
  export type InstallableExtensionTypePlural = (typeof installableExtensionTypePluralSegments)[number];
7
7
  export declare const isInstallableExtensionTypePlural: (value: string | undefined) => value is InstallableExtensionTypePlural;
8
8
  export declare const toInstallableExtensionType: (segment: InstallableExtensionTypePlural) => InstallableExtensionType;
9
9
  export declare const toInstallableExtensionTypePlural: (type: InstallableExtensionType) => InstallableExtensionTypePlural;
10
- export declare const InstallableExtensionTypeSchema: Schema.Literals<readonly ("skill" | "mcp-server" | "subagent" | "rule" | "hook" | "knowledge" | "pack")[]>;
11
- export declare const InstallableExtensionTypePluralSchema: Schema.Literals<readonly ("skills" | "mcps" | "subagents" | "rules" | "hooks" | "knowledge" | "packs")[]>;
10
+ export declare const InstallableExtensionTypeSchema: Schema.Literals<import("./common.js").InstallableFrom<"git" | "workspace" | "registry" | "path">[]>;
11
+ export declare const InstallableExtensionTypePluralSchema: Schema.Literals<("skills" | "mcps" | "subagents" | "rules" | "hooks" | "knowledge" | "packs")[]>;
12
12
  //# sourceMappingURL=installable-types.d.ts.map
@@ -1,9 +1,13 @@
1
1
  import * as Schema from "effect/Schema";
2
- import { extensionTypeFromPlural, extensionTypePluralSegments, extensionTypes, extensionTypeToPlural, isExtensionType, isExtensionTypePlural, } from "./common.js";
3
- export const installableExtensionTypes = extensionTypes;
4
- export const isInstallableExtensionType = (value) => isExtensionType(value);
5
- export const installableExtensionTypePluralSegments = extensionTypePluralSegments;
6
- export const isInstallableExtensionTypePlural = (value) => isExtensionTypePlural(value);
2
+ import { extensionTypeFromPlural, extensionSourceFamilies, extensionTypesInstallableFrom, extensionTypeToPlural, } from "./common.js";
3
+ export const installableExtensionTypes = extensionSourceFamilies
4
+ .flatMap((family) => extensionTypesInstallableFrom(family))
5
+ .filter((type, index, types) => types.indexOf(type) === index);
6
+ const installableExtensionTypeSet = new Set(installableExtensionTypes);
7
+ export const isInstallableExtensionType = (value) => value !== undefined && installableExtensionTypeSet.has(value);
8
+ export const installableExtensionTypePluralSegments = installableExtensionTypes.map((type) => extensionTypeToPlural[type]);
9
+ const installableExtensionTypePluralSet = new Set(installableExtensionTypePluralSegments);
10
+ export const isInstallableExtensionTypePlural = (value) => value !== undefined && installableExtensionTypePluralSet.has(value);
7
11
  const installableExtensionTypeFromPlural = extensionTypeFromPlural;
8
12
  const installableExtensionTypeToPlural = extensionTypeToPlural;
9
13
  export const toInstallableExtensionType = (segment) => installableExtensionTypeFromPlural[segment];
@@ -6,12 +6,29 @@
6
6
  * @experimental This API is unstable and may change without notice.
7
7
  * @packageDocumentation
8
8
  */
9
- import type { PackRefBase, RegistryRefDetails, WorkspaceRefDetails } from "./ref-base.js";
10
- import type { RegistrySource, WorkspaceSource } from "../../sources/types.js";
9
+ import type { GitHostedRefDetails, LocalRefDetails, PackRefBase, RegistryRefDetails, WorkspaceRefDetails } from "./ref-base.js";
10
+ import type { GitBasedSource, LocalSource, RegistrySource, WorkspaceSource } from "../../sources/types.js";
11
+ import type { HookExtensionRef } from "./hook.js";
12
+ import type { KnowledgeExtensionRef } from "./knowledge.js";
13
+ import type { McpServerExtensionRef } from "./mcp-server.js";
14
+ import type { RuleExtensionRef } from "./rule.js";
15
+ import type { SkillExtensionRef } from "./skill.js";
16
+ import type { SubagentExtensionRef } from "./subagent.js";
17
+ /** A non-Pack ref discovered from the same immutable source view. @experimental */
18
+ export type SourceInheritedPackMemberRef = SkillExtensionRef | McpServerExtensionRef | SubagentExtensionRef | RuleExtensionRef | HookExtensionRef | KnowledgeExtensionRef;
19
+ type SourceInheritedPackMembers = {
20
+ /** Runtime-only candidates discovered beside this Pack at the same accepted source view. */
21
+ readonly sourceMembers: ReadonlyArray<SourceInheritedPackMemberRef>;
22
+ };
11
23
  /** @experimental */
12
24
  export type RegistryPackRef = PackRefBase<"registry", RegistrySource> & RegistryRefDetails;
13
25
  /** @experimental */
26
+ export type GitHostedPackRef = PackRefBase<"git-hosted", GitBasedSource> & GitHostedRefDetails & SourceInheritedPackMembers;
27
+ /** @experimental */
28
+ export type LocalPackRef = PackRefBase<"local", LocalSource> & LocalRefDetails & SourceInheritedPackMembers;
29
+ /** @experimental */
14
30
  export type WorkspacePackRef = PackRefBase<"workspace", WorkspaceSource> & WorkspaceRefDetails;
15
31
  /** @experimental */
16
- export type PackRef = RegistryPackRef | WorkspacePackRef;
32
+ export type PackRef = RegistryPackRef | GitHostedPackRef | LocalPackRef | WorkspacePackRef;
33
+ export {};
17
34
  //# sourceMappingURL=pack.d.ts.map
@@ -12,13 +12,14 @@ import type { ExtensionName, ExtensionType } from "../common.js";
12
12
  import type * as Option from "effect/Option";
13
13
  import type * as Record from "effect/Record";
14
14
  import type { RefType, Source } from "../../sources/types.js";
15
- import type { ExtensionDependencyConstraintMap } from "../common.js";
15
+ import type { PackMemberConstraintMap } from "../common.js";
16
16
  import type { Version } from "../../version-constraints/version-constraints.js";
17
17
  import type { Handle } from "../handle.js";
18
18
  import type { PackageUrlParts } from "../../packaging/package-url.js";
19
19
  import type { WorkspaceScope } from "../../workspace-scope.js";
20
20
  import type { SourceHash } from "../../sources/source-hash.js";
21
21
  import type { DeprecationView } from "../deprecation.js";
22
+ import type { ArchivalView } from "../archival.js";
22
23
  /** Ref details for git-hosted sources (GitHub, GitLab, Bitbucket, AzureRepos, Git). @experimental */
23
24
  export interface GitHostedRefDetails {
24
25
  /** Publisher identity declared by the resolved package manifest. */
@@ -54,6 +55,8 @@ export interface RegistryRefDetails {
54
55
  readonly packages: ReadonlyArray<PackageUrlParts>;
55
56
  /** Structured Registry lifecycle evidence captured at resolution time. */
56
57
  readonly deprecation?: DeprecationView;
58
+ /** Registry archival state captured at resolution time. */
59
+ readonly archival?: ArchivalView;
57
60
  /** Lifecycle notices that must be shown before an exact historical install. */
58
61
  readonly lifecycleWarnings?: ReadonlyArray<string>;
59
62
  }
@@ -117,9 +120,10 @@ export type SubagentExtensionRefBase<TRefType extends RefType, TSource extends S
117
120
  /** @experimental */
118
121
  export type PackRefBase<TRefType extends RefType, TSource extends Source> = ExtensionRefBase<"pack", TRefType, TSource> & {
119
122
  readonly owner: Handle;
123
+ readonly version: Version;
120
124
  readonly pack: {
121
125
  readonly name: ExtensionName;
122
- readonly dependencies: ExtensionDependencyConstraintMap;
126
+ readonly dependencies: PackMemberConstraintMap;
123
127
  };
124
128
  };
125
129
  //# sourceMappingURL=ref-base.d.ts.map
@@ -10,7 +10,7 @@
10
10
  * @packageDocumentation
11
11
  */
12
12
  /**
13
- * WorkspaceMutations-relative path of the universal skills directory.
13
+ * Workspace-relative path of the universal skills directory.
14
14
  */
15
15
  export declare const UNIVERSAL_SKILLS_DIR = ".agents/skills";
16
16
  /**
@@ -23,7 +23,7 @@ export declare const UNIVERSAL_SKILLS_DIR_SEGMENT: string;
23
23
  /**
24
24
  * Strips trailing path separators from a path string.
25
25
  */
26
- export declare const stripTrailingSeparators: (p: string) => string;
26
+ export declare const stripTrailingSeparators: (path: string) => string;
27
27
  /**
28
28
  * Returns `true` when `dir` is the workspace-relative universal skills
29
29
  * directory path. Use for descriptor-level comparisons where paths are
@@ -10,7 +10,7 @@
10
10
  * @packageDocumentation
11
11
  */
12
12
  /**
13
- * WorkspaceMutations-relative path of the universal skills directory.
13
+ * Workspace-relative path of the universal skills directory.
14
14
  */
15
15
  export const UNIVERSAL_SKILLS_DIR = ".agents/skills";
16
16
  /**
@@ -23,7 +23,13 @@ export const UNIVERSAL_SKILLS_DIR_SEGMENT = UNIVERSAL_SKILLS_DIR.split("/")[0] ?
23
23
  /**
24
24
  * Strips trailing path separators from a path string.
25
25
  */
26
- export const stripTrailingSeparators = (p) => p.length > 1 ? p.replace(/[/\\]+$/, "") : p;
26
+ export const stripTrailingSeparators = (path) => {
27
+ let end = path.length;
28
+ while (end > 1 && (path[end - 1] === "/" || path[end - 1] === "\\")) {
29
+ end -= 1;
30
+ }
31
+ return path.slice(0, end);
32
+ };
27
33
  /**
28
34
  * Returns `true` when `dir` is the workspace-relative universal skills
29
35
  * directory path. Use for descriptor-level comparisons where paths are