@ai-primitives-hub/core 0.1.0 → 0.2.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 (113) hide show
  1. package/dist/domain/bundle/id.d.ts +58 -7
  2. package/dist/domain/bundle/id.d.ts.map +1 -1
  3. package/dist/domain/bundle/id.js +68 -7
  4. package/dist/domain/bundle/id.js.map +1 -1
  5. package/dist/domain/bundle/types.d.ts +50 -0
  6. package/dist/domain/bundle/types.d.ts.map +1 -1
  7. package/dist/domain/bundle/types.js +110 -0
  8. package/dist/domain/bundle/types.js.map +1 -1
  9. package/dist/domain/bundle/version.d.ts +10 -0
  10. package/dist/domain/bundle/version.d.ts.map +1 -1
  11. package/dist/domain/bundle/version.js +21 -0
  12. package/dist/domain/bundle/version.js.map +1 -1
  13. package/dist/domain/collection/manifest-validator.d.ts +11 -3
  14. package/dist/domain/collection/manifest-validator.d.ts.map +1 -1
  15. package/dist/domain/collection/manifest-validator.js +13 -1
  16. package/dist/domain/collection/manifest-validator.js.map +1 -1
  17. package/dist/domain/collection/release-manifest-plan.d.ts +75 -0
  18. package/dist/domain/collection/release-manifest-plan.d.ts.map +1 -0
  19. package/dist/domain/collection/release-manifest-plan.js +476 -0
  20. package/dist/domain/collection/release-manifest-plan.js.map +1 -0
  21. package/dist/domain/hub/replicate.d.ts +58 -0
  22. package/dist/domain/hub/replicate.d.ts.map +1 -0
  23. package/dist/domain/hub/replicate.js +229 -0
  24. package/dist/domain/hub/replicate.js.map +1 -0
  25. package/dist/domain/hub/types.d.ts +10 -4
  26. package/dist/domain/hub/types.d.ts.map +1 -1
  27. package/dist/domain/hub/validate.d.ts +5 -0
  28. package/dist/domain/hub/validate.d.ts.map +1 -1
  29. package/dist/domain/hub/validate.js +32 -3
  30. package/dist/domain/hub/validate.js.map +1 -1
  31. package/dist/domain/index.d.ts +6 -0
  32. package/dist/domain/index.d.ts.map +1 -1
  33. package/dist/domain/index.js +6 -0
  34. package/dist/domain/index.js.map +1 -1
  35. package/dist/domain/install/installable.d.ts +1 -1
  36. package/dist/domain/install/installable.d.ts.map +1 -1
  37. package/dist/domain/install/integrity.d.ts +12 -18
  38. package/dist/domain/install/integrity.d.ts.map +1 -1
  39. package/dist/domain/install/integrity.js +28 -5
  40. package/dist/domain/install/integrity.js.map +1 -1
  41. package/dist/domain/install/layout.d.ts +15 -0
  42. package/dist/domain/install/layout.d.ts.map +1 -1
  43. package/dist/domain/install/layout.js +18 -7
  44. package/dist/domain/install/layout.js.map +1 -1
  45. package/dist/domain/mcp/env-placeholders.d.ts +29 -0
  46. package/dist/domain/mcp/env-placeholders.d.ts.map +1 -0
  47. package/dist/domain/mcp/env-placeholders.js +32 -0
  48. package/dist/domain/mcp/env-placeholders.js.map +1 -0
  49. package/dist/domain/mcp/index.d.ts +1 -0
  50. package/dist/domain/mcp/index.d.ts.map +1 -1
  51. package/dist/domain/mcp/index.js +1 -0
  52. package/dist/domain/mcp/index.js.map +1 -1
  53. package/dist/domain/plugin/agent-plugin-spec.d.ts +75 -0
  54. package/dist/domain/plugin/agent-plugin-spec.d.ts.map +1 -0
  55. package/dist/domain/plugin/agent-plugin-spec.js +270 -0
  56. package/dist/domain/plugin/agent-plugin-spec.js.map +1 -0
  57. package/dist/domain/registry-error.d.ts +1 -1
  58. package/dist/domain/registry-error.d.ts.map +1 -1
  59. package/dist/domain/registry-error.js +1 -1
  60. package/dist/domain/registry-error.js.map +1 -1
  61. package/dist/domain/source/artifactory-source-index.d.ts +58 -0
  62. package/dist/domain/source/artifactory-source-index.d.ts.map +1 -0
  63. package/dist/domain/source/artifactory-source-index.js +175 -0
  64. package/dist/domain/source/artifactory-source-index.js.map +1 -0
  65. package/dist/domain/source/github-repository-target.d.ts +16 -0
  66. package/dist/domain/source/github-repository-target.d.ts.map +1 -0
  67. package/dist/domain/source/github-repository-target.js +3 -0
  68. package/dist/domain/source/github-repository-target.js.map +1 -0
  69. package/dist/domain/source/github-source-authentication.d.ts +6 -0
  70. package/dist/domain/source/github-source-authentication.d.ts.map +1 -0
  71. package/dist/domain/source/github-source-authentication.js +3 -0
  72. package/dist/domain/source/github-source-authentication.js.map +1 -0
  73. package/dist/domain/source/types.d.ts +9 -2
  74. package/dist/domain/source/types.d.ts.map +1 -1
  75. package/dist/domain/source-id.d.ts +6 -3
  76. package/dist/domain/source-id.d.ts.map +1 -1
  77. package/dist/domain/source-id.js +14 -11
  78. package/dist/domain/source-id.js.map +1 -1
  79. package/dist/index.d.ts +10 -0
  80. package/dist/index.d.ts.map +1 -1
  81. package/dist/index.js +13 -1
  82. package/dist/index.js.map +1 -1
  83. package/dist/ports/github-api.d.ts +4 -0
  84. package/dist/ports/github-api.d.ts.map +1 -1
  85. package/dist/ports/http-credentials.d.ts +10 -0
  86. package/dist/ports/http-credentials.d.ts.map +1 -0
  87. package/dist/ports/http-credentials.js +3 -0
  88. package/dist/ports/http-credentials.js.map +1 -0
  89. package/dist/ports/http.d.ts +6 -2
  90. package/dist/ports/http.d.ts.map +1 -1
  91. package/dist/ports/http.js +0 -9
  92. package/dist/ports/http.js.map +1 -1
  93. package/dist/ports/index.d.ts +3 -0
  94. package/dist/ports/index.d.ts.map +1 -1
  95. package/dist/ports/index.js +3 -0
  96. package/dist/ports/index.js.map +1 -1
  97. package/dist/ports/process-executor.d.ts +13 -0
  98. package/dist/ports/process-executor.d.ts.map +1 -0
  99. package/dist/ports/process-executor.js +3 -0
  100. package/dist/ports/process-executor.js.map +1 -0
  101. package/dist/ports/registry-operations.d.ts +91 -4
  102. package/dist/ports/registry-operations.d.ts.map +1 -1
  103. package/dist/ports/release-source.d.ts +52 -0
  104. package/dist/ports/release-source.d.ts.map +1 -0
  105. package/dist/ports/release-source.js +3 -0
  106. package/dist/ports/release-source.js.map +1 -0
  107. package/dist/ports/target-writer.d.ts +15 -1
  108. package/dist/ports/target-writer.d.ts.map +1 -1
  109. package/dist/public/schemas/agent-plugins/1.0.0/plugin.schema.json +65 -0
  110. package/dist/public/schemas/artifactory-source-index.schema.json +44 -0
  111. package/dist/public/schemas/hub-config.schema.json +18 -3
  112. package/dist/public/schemas/lockfile.schema.json +37 -2
  113. package/package.json +3 -3
@@ -9,10 +9,13 @@ export * from './clock';
9
9
  export * from './copilot-sdk';
10
10
  export * from './filesystem';
11
11
  export * from './http';
12
+ export * from './http-credentials';
12
13
  export * from './github-api';
13
14
  export * from './azure-devops-api';
14
15
  export * from './process-runner';
16
+ export * from './process-executor';
15
17
  export * from './bundle-extractor';
18
+ export * from './release-source';
16
19
  export * from './target-writer';
17
20
  export * from './layout-config-loader';
18
21
  export * from './log-sink';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ports/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ports/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC"}
@@ -25,10 +25,13 @@ __exportStar(require("./clock"), exports);
25
25
  __exportStar(require("./copilot-sdk"), exports);
26
26
  __exportStar(require("./filesystem"), exports);
27
27
  __exportStar(require("./http"), exports);
28
+ __exportStar(require("./http-credentials"), exports);
28
29
  __exportStar(require("./github-api"), exports);
29
30
  __exportStar(require("./azure-devops-api"), exports);
30
31
  __exportStar(require("./process-runner"), exports);
32
+ __exportStar(require("./process-executor"), exports);
31
33
  __exportStar(require("./bundle-extractor"), exports);
34
+ __exportStar(require("./release-source"), exports);
32
35
  __exportStar(require("./target-writer"), exports);
33
36
  __exportStar(require("./layout-config-loader"), exports);
34
37
  __exportStar(require("./log-sink"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ports/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;GAGG;AACH,mDAAiC;AACjC,gDAA8B;AAC9B,0DAAwC;AACxC,0CAAwB;AACxB,gDAA8B;AAC9B,+CAA6B;AAC7B,yCAAuB;AACvB,+CAA6B;AAC7B,qDAAmC;AACnC,mDAAiC;AACjC,qDAAmC;AACnC,kDAAgC;AAChC,yDAAuC;AACvC,6CAA2B;AAC3B,yDAAuC;AACvC,oDAAkC;AAClC,sDAAoC;AACpC,wDAAsC;AACtC,iDAA+B;AAC/B,oDAAkC;AAClC,8CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ports/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;GAGG;AACH,mDAAiC;AACjC,gDAA8B;AAC9B,0DAAwC;AACxC,0CAAwB;AACxB,gDAA8B;AAC9B,+CAA6B;AAC7B,yCAAuB;AACvB,qDAAmC;AACnC,+CAA6B;AAC7B,qDAAmC;AACnC,mDAAiC;AACjC,qDAAmC;AACnC,qDAAmC;AACnC,mDAAiC;AACjC,kDAAgC;AAChC,yDAAuC;AACvC,6CAA2B;AAC3B,yDAAuC;AACvC,oDAAkC;AAClC,sDAAoC;AACpC,wDAAsC;AACtC,iDAA+B;AAC/B,oDAAkC;AAClC,8CAA4B"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Argv-safe process-execution port for external CLI integrations.
3
+ *
4
+ * Unlike `ProcessRunner`, this port never accepts a shell command string.
5
+ * Callers provide the executable and arguments separately so values such as
6
+ * repository names cannot be interpreted as shell syntax.
7
+ * @module ports/process-executor
8
+ */
9
+ import type { ProcessResult, ProcessRunOptions } from './process-runner';
10
+ export interface ProcessExecutor {
11
+ execFile(file: string, args: readonly string[], options?: ProcessRunOptions): Promise<ProcessResult>;
12
+ }
13
+ //# sourceMappingURL=process-executor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"process-executor.d.ts","sourceRoot":"","sources":["../../src/ports/process-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EAClB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,eAAe;IAC9B,QAAQ,CACN,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,aAAa,CAAC,CAAC;CAC3B"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=process-executor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"process-executor.js","sourceRoot":"","sources":["../../src/ports/process-executor.ts"],"names":[],"mappings":""}
@@ -40,14 +40,84 @@ export interface SourceOperations {
40
40
  /**
41
41
  * Source read/write operations needed to sync a hub's declared sources
42
42
  * into the registry: list existing sources to detect duplicates/updates
43
- * against, add genuinely new ones, and update ones that already came
44
- * from the same hub. Deliberately narrower than a full source-CRUD
45
- * port (no `removeSource`) since hub-source syncing never deletes.
43
+ * against, add genuinely new ones, update ones that already came from the
44
+ * same hub, and remove ones this hub previously contributed that have
45
+ * since disappeared from its config (e.g. a collection whose repository
46
+ * URL was renamed, which yields a new sourceId and would otherwise leave
47
+ * the old source lingering as a duplicate).
46
48
  */
47
49
  export interface HubSourceSync {
48
50
  listSources(): Promise<RegistrySource[]>;
49
51
  addSource(source: RegistrySource): Promise<void>;
50
52
  updateSource(sourceId: string, updates: Partial<RegistrySource>): Promise<void>;
53
+ removeSource(sourceId: string): Promise<void>;
54
+ /**
55
+ * Installed bundles across all scopes, used to guard orphan pruning so a
56
+ * source with still-installed consumers is preserved or remapped rather
57
+ * than deleted (which would strand those bundles in an unmanaged state —
58
+ * see `loadHubSources`).
59
+ */
60
+ listInstalledBundles(): Promise<InstalledBundle[]>;
61
+ /**
62
+ * Optional: remap installed bundles from an old source to a new one
63
+ * (e.g. after a collection URL rename). Updates lockfile entries and
64
+ * installation records so consumers seamlessly track the new source.
65
+ * When omitted, orphans with installed consumers are kept alive with a
66
+ * warning rather than remapped.
67
+ */
68
+ remapBundleSource?(oldSourceId: string, newSourceId: string): Promise<void>;
69
+ }
70
+ /**
71
+ * The replacement source's descriptor, needed to write a repository-scope
72
+ * lockfile's `sources` map when installed bundles are moved onto it.
73
+ *
74
+ * Structurally the `LockfileSourceEntry` shape that `app`'s pure
75
+ * `remapSourceId` transform (`stores/json-lockfile-store.ts`) already
76
+ * consumes, declared here rather than imported because `core` sits at the
77
+ * bottom of the dependency graph and cannot reach `app`. Kept structural —
78
+ * a plain shape over `type`/`url` — so both sides stay assignable without
79
+ * either one owning the other's module.
80
+ */
81
+ export interface LockfileSourceDescriptor {
82
+ /** Source type (`github`, `local`, `awesome-copilot`, `apm`, ...). */
83
+ type: string;
84
+ /** URL of the replacement source. */
85
+ url: string;
86
+ /** Git branch, for git-based sources. */
87
+ branch?: string;
88
+ /** Collections subdirectory, for `awesome-copilot`-type sources. */
89
+ collectionsPath?: string;
90
+ }
91
+ /**
92
+ * The external access a bundle-source remap needs: resolve the replacement
93
+ * source's descriptor before touching anything, then rewrite the
94
+ * repository-scope lockfile and the user-scope/workspace-scope
95
+ * installation records onto the new source id.
96
+ *
97
+ * Deliberately separate from `HubSourceSync` rather than an extension of
98
+ * it (interface segregation): a remap never adds, updates, or removes a
99
+ * source, and `HubSourceSync.remapBundleSource` — which stays optional and
100
+ * keeps its `(oldSourceId, newSourceId) => Promise<void>` shape — is the
101
+ * calling side's view of this operation, not its implementation surface.
102
+ */
103
+ export interface BundleSourceRemap {
104
+ /** All stored sources, used to resolve the replacement descriptor. */
105
+ listSources(): Promise<RegistrySource[]>;
106
+ /**
107
+ * Remap repository-scope lockfile entries onto the new source id.
108
+ *
109
+ * Optional, and absence is a normal condition rather than an error: the
110
+ * port is left unwired when the host has no repository in scope (no
111
+ * workspace root, or a CLI invocation outside a repository). Without a
112
+ * repository in scope there are no repository-scope bundles to migrate,
113
+ * so skipping this step is correct and the user-scope/workspace-scope
114
+ * remap must still complete successfully.
115
+ */
116
+ remapLockfileSourceId?(oldSourceId: string, newSourceId: string, descriptor: LockfileSourceDescriptor): Promise<void>;
117
+ /** Installation records for one non-repository scope. */
118
+ getInstalledBundles(scope: InstallationScope): Promise<InstalledBundle[]>;
119
+ /** Persist one installation record (upsert by bundle id + scope). */
120
+ recordInstallation(bundle: InstalledBundle): Promise<void>;
51
121
  }
52
122
  /**
53
123
  * Registry operations needed while activating a hub profile: properly
@@ -60,6 +130,13 @@ export interface HubSourceSync {
60
130
  */
61
131
  export interface ProfileLifecycleSync {
62
132
  deactivateProfile(profileId: string): Promise<void>;
133
+ /**
134
+ * Install the profile's bundles. An implementation that knows which
135
+ * bundles were actually installed (and at which version) may return a
136
+ * {@link ProfileBundleSyncResult}; `activateProfile` then records only
137
+ * those in the activation state. Returning nothing keeps the default:
138
+ * every profile bundle is recorded at its profile-declared version.
139
+ */
63
140
  installBundles(items: {
64
141
  bundleId: string;
65
142
  options: {
@@ -67,7 +144,17 @@ export interface ProfileLifecycleSync {
67
144
  force: boolean;
68
145
  profileId: string;
69
146
  };
70
- }[]): Promise<void>;
147
+ }[]): Promise<ProfileBundleSyncResult | void>;
148
+ }
149
+ /**
150
+ * Optional outcome of {@link ProfileLifecycleSync.installBundles}: the
151
+ * bundles that were installed, with the version actually installed.
152
+ */
153
+ export interface ProfileBundleSyncResult {
154
+ synced: {
155
+ bundleId: string;
156
+ version: string;
157
+ }[];
71
158
  }
72
159
  /**
73
160
  * The read-only registry surface `UpdateChecker` needs: sync sources,
@@ -1 +1 @@
1
- {"version":3,"file":"registry-operations.d.ts","sourceRoot":"","sources":["../../src/ports/registry-operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EACV,MAAM,EACN,YAAY,EACb,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EACV,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,6BAA6B,EAC9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACV,OAAO,EACR,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EACV,cAAc,EACf,MAAM,wBAAwB,CAAC;AAEh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E,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACvE;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,0BAA2B,SAAQ,YAAY;IAC9D,WAAW,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IACzC,SAAS,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,wFAAwF;IACxF,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,gBAAgB,IAAI,6BAA6B,CAAC;IAClD,mBAAmB,CAAC,OAAO,EAAE,6BAA6B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5E"}
1
+ {"version":3,"file":"registry-operations.d.ts","sourceRoot":"","sources":["../../src/ports/registry-operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EACV,MAAM,EACN,YAAY,EACb,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EACV,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,6BAA6B,EAC9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EACV,OAAO,EACR,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EACV,cAAc,EACf,MAAM,wBAAwB,CAAC;AAEhC;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,oBAAoB,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;IACnD,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACrD;AAED;;;GAGG;AACH,MAAM,WAAW,g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AG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5E"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Release-source port — read-only access to the repository content a
3
+ * release is planned from.
4
+ *
5
+ * Governed release planning reads exact bytes from an immutable Git
6
+ * revision; the legacy compatibility path reads the working tree. Both are
7
+ * addressed by repo-relative POSIX paths. Concrete adapters live in `infra`
8
+ * (`NodeReleaseSourceReader`); tests inject an in-memory double.
9
+ * @module ports/release-source
10
+ */
11
+ /** Read-only view over repository content addressed by repo-relative POSIX paths. */
12
+ export interface ReleaseSourceTree {
13
+ /**
14
+ * Read the exact bytes of one file.
15
+ * @param repositoryPath Repo-relative path of the file.
16
+ * @returns The file bytes. Rejects when the file is absent.
17
+ */
18
+ readFile(repositoryPath: string): Promise<Uint8Array>;
19
+ /**
20
+ * Recursively list files under a repo-relative directory.
21
+ * @param repositoryDirectory Repo-relative directory (`'.'` for the root).
22
+ * @returns Normalized repo-relative file paths, in no guaranteed order.
23
+ */
24
+ listFiles(repositoryDirectory: string): Promise<string[]>;
25
+ }
26
+ /** A tree pinned to an immutable Git object id. */
27
+ export interface RevisionedReleaseSourceTree extends ReleaseSourceTree {
28
+ /** Full, lowercase, immutable commit id the tree was opened at. */
29
+ readonly revision: string;
30
+ }
31
+ /** Opens the source trees a release is planned from. */
32
+ export interface ReleaseSourceReader {
33
+ /**
34
+ * Resolve a revision to a full immutable commit id and open that tree.
35
+ * @param repoRoot Absolute repository root.
36
+ * @param revision Revision to resolve (default `'HEAD'`).
37
+ */
38
+ openRevision(repoRoot: string, revision?: string): Promise<RevisionedReleaseSourceTree>;
39
+ /**
40
+ * Open the working tree. Its `listFiles` resolves `[]` when the directory
41
+ * is missing or is not a directory.
42
+ * @param repoRoot Absolute repository root.
43
+ */
44
+ openWorkingTree(repoRoot: string): ReleaseSourceTree;
45
+ /**
46
+ * Read the `origin` remote URL.
47
+ * @param repoRoot Absolute repository root.
48
+ * @returns The URL, or `''` when unavailable. Never rejects.
49
+ */
50
+ readRemoteUrl(repoRoot: string): Promise<string>;
51
+ }
52
+ //# sourceMappingURL=release-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release-source.d.ts","sourceRoot":"","sources":["../../src/ports/release-source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,qFAAqF;AACrF,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IACtD;;;;OAIG;IACH,SAAS,CAAC,mBAAmB,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;CAC3D;AAED,mDAAmD;AACnD,MAAM,WAAW,2BAA4B,SAAQ,iBAAiB;IACpE,mEAAmE;IACnE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,wDAAwD;AACxD,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACxF;;;;OAIG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAAC;IACrD;;;;OAIG;IACH,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAClD"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=release-source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release-source.js","sourceRoot":"","sources":["../../src/ports/release-source.ts"],"names":[],"mappings":""}
@@ -22,6 +22,16 @@ export interface TargetWriteResult {
22
22
  * this when present instead of assuming every extracted file was installed.
23
23
  */
24
24
  writtenBundlePaths?: string[];
25
+ /**
26
+ * Where each written bundle path landed, relative to the target's base
27
+ * directory (`/`-separated), keyed by bundle-relative path.
28
+ *
29
+ * Optional: set only by writers whose output location cannot be
30
+ * recomputed from the bundle path alone (manifest-driven placement
31
+ * renames files and skill directories by manifest item id). Installers
32
+ * record it in the lockfile so uninstall can find the file again.
33
+ */
34
+ installedPaths?: Record<string, string>;
25
35
  }
26
36
  /**
27
37
  * Side-effect-free assessment of a target write.
@@ -71,7 +81,11 @@ export interface TargetWriter {
71
81
  * Remove a single file from the target.
72
82
  * @param target Target chosen via `--target <name>`.
73
83
  * @param filePath Relative file path to remove.
84
+ * @param installedPath Optional output path relative to the target's
85
+ * base directory, as recorded from `TargetWriteResult.installedPaths`.
86
+ * Writers that support it remove that file instead of recomputing the
87
+ * location from `filePath`; others may ignore it.
74
88
  */
75
- remove(target: Target, filePath: string): Promise<void>;
89
+ remove(target: Target, filePath: string, installedPath?: string): Promise<void>;
76
90
  }
77
91
  //# sourceMappingURL=target-writer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"target-writer.d.ts","sourceRoot":"","sources":["../../src/ports/target-writer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EACV,MAAM,EACP,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EACV,cAAc,EACf,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,uCAAuC;IACvC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,gEAAgE;IAChE,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC9B,kDAAkD;IAClD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,qDAAqD;IACrD,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;;;OAQG;IACH,SAAS,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,GAAG,O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CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAEzE;;;;;;;;OAQG;IACH,QAAQ,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErE;;;;;;;;OAQG;IACH,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjF"}
@@ -0,0 +1,65 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
4
+ "title": "Agent Plugins Manifest",
5
+ "description": "Machine-readable schema for plugin.json in Agent Plugins 1.0.0. The Agent Plugins specification defines additional semantic and operational requirements.",
6
+ "type": "object",
7
+ "properties": {
8
+ "$schema": {
9
+ "const": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
10
+ "description": "Canonical identifier of the plugin manifest schema for the Agent Plugins version targeted by this document."
11
+ },
12
+ "name": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "maxLength": 64,
16
+ "pattern": "^(?!.*(?:--|\\.\\.))[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$",
17
+ "description": "Human-readable plugin name."
18
+ },
19
+ "version": {
20
+ "type": "string"
21
+ },
22
+ "description": {
23
+ "type": "string"
24
+ },
25
+ "author": {
26
+ "type": "object",
27
+ "properties": {
28
+ "name": {
29
+ "type": "string"
30
+ },
31
+ "email": {
32
+ "type": "string"
33
+ },
34
+ "url": {
35
+ "type": "string"
36
+ }
37
+ },
38
+ "additionalProperties": false
39
+ },
40
+ "homepage": {
41
+ "type": "string"
42
+ },
43
+ "repository": {
44
+ "type": "string"
45
+ },
46
+ "license": {
47
+ "type": "string"
48
+ },
49
+ "keywords": {
50
+ "type": "array",
51
+ "items": {
52
+ "type": "string"
53
+ }
54
+ },
55
+ "extensions": {
56
+ "type": "object",
57
+ "description": "Client-specific manifest data keyed by reverse-domain extension namespace. Agent Plugins assigns no semantics to namespace object contents.",
58
+ "additionalProperties": {
59
+ "type": "object"
60
+ }
61
+ }
62
+ },
63
+ "required": ["$schema", "name"],
64
+ "additionalProperties": false
65
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://github.com/AmadeusITGroup/ai-primitives-hub/schemas/artifactory-source-index.schema.json",
4
+ "title": "AI Primitives Hub Artifactory source index",
5
+ "type": "object",
6
+ "required": ["formatVersion", "source", "bundles"],
7
+ "properties": {
8
+ "formatVersion": { "const": 1 },
9
+ "source": {
10
+ "type": "object",
11
+ "required": ["id", "name", "updatedAt"],
12
+ "properties": {
13
+ "id": { "type": "string", "pattern": "^[a-zA-Z0-9-_]+$", "minLength": 1, "maxLength": 50 },
14
+ "name": { "type": "string", "minLength": 1, "maxLength": 100 },
15
+ "description": { "type": "string", "maxLength": 500 },
16
+ "updatedAt": { "type": "string", "format": "date-time" }
17
+ },
18
+ "additionalProperties": false
19
+ },
20
+ "bundles": { "type": "array", "items": { "$ref": "#/definitions/bundle" } }
21
+ },
22
+ "additionalProperties": false,
23
+ "definitions": {
24
+ "relativePath": { "type": "string", "description": "Syntax guard only. Consumers must also enforce source-root confinement.", "minLength": 1, "pattern": "^(?!/)(?!.*%)(?!.*\\\\)(?!.*(?:^|/)\\.\\.(?:/|$))(?![a-zA-Z][a-zA-Z0-9+.-]*:).+$" },
25
+ "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
26
+ "object": {
27
+ "type": "object", "required": ["path", "size", "sha256"],
28
+ "properties": { "path": { "$ref": "#/definitions/relativePath" }, "size": { "type": "integer", "minimum": 0 }, "sha256": { "$ref": "#/definitions/sha256" }, "mediaType": { "type": "string", "minLength": 1 } },
29
+ "additionalProperties": false
30
+ },
31
+ "dependency": {
32
+ "type": "object", "required": ["bundleId", "versionRange", "optional"],
33
+ "properties": { "bundleId": { "type": "string", "minLength": 1 }, "versionRange": { "type": "string", "minLength": 1 }, "optional": { "type": "boolean" } },
34
+ "additionalProperties": false
35
+ },
36
+ "bundle": {
37
+ "type": "object", "required": ["id", "version", "name", "description", "author", "environments", "tags", "lastUpdated", "dependencies", "license", "manifest", "archive"],
38
+ "properties": {
39
+ "id": { "type": "string", "pattern": "^[\\w.\\-]+$", "minLength": 1, "maxLength": 200 }, "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+(?:-[0-9A-Za-z.-]+)?$" }, "name": { "type": "string", "minLength": 1, "maxLength": 100 }, "description": { "type": "string", "maxLength": 500 }, "author": { "type": "string" }, "environments": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "type": "string" } }, "lastUpdated": { "type": "string", "format": "date-time" }, "dependencies": { "type": "array", "items": { "$ref": "#/definitions/dependency" } }, "homepage": { "type": "string", "format": "uri" }, "repository": { "type": "string" }, "license": { "type": "string" }, "manifest": { "$ref": "#/definitions/object" }, "archive": { "allOf": [{ "$ref": "#/definitions/object" }, { "properties": { "mediaType": { "const": "application/zip" } } }] }, "readme": { "$ref": "#/definitions/object" }, "canonicalSource": { "type": "string", "format": "uri" }, "revision": { "type": "string", "minLength": 1 }
40
+ },
41
+ "additionalProperties": false
42
+ }
43
+ }
44
+ }
@@ -76,7 +76,7 @@
76
76
  },
77
77
  "type": {
78
78
  "type": "string",
79
- "description": "Type of the source repository (github, local, awesome-copilot, local-awesome-copilot, apm, local-apm, skills, local-skills, azure-devops)",
79
+ "description": "Type of the source repository (github, local, awesome-copilot, local-awesome-copilot, apm, local-apm, skills, local-skills, azure-devops, artifactory)",
80
80
  "enum": [
81
81
  "github",
82
82
  "local",
@@ -86,7 +86,8 @@
86
86
  "local-apm",
87
87
  "skills",
88
88
  "local-skills",
89
- "azure-devops"
89
+ "azure-devops",
90
+ "artifactory"
90
91
  ]
91
92
  },
92
93
  "url": {
@@ -109,6 +110,10 @@
109
110
  "type": "boolean",
110
111
  "description": "Whether this source is currently active"
111
112
  },
113
+ "private": {
114
+ "type": "boolean",
115
+ "description": "Whether the source requires private credentials"
116
+ },
112
117
  "priority": {
113
118
  "type": "number",
114
119
  "description": "Priority order for source resolution (higher = higher priority)",
@@ -129,7 +134,17 @@
129
134
  },
130
135
  "indexFile": {
131
136
  "type": "string",
132
- "description": "Index file name (for awesome-copilot sources)"
137
+ "description": "Index file name (for awesome-copilot and Artifactory sources)"
138
+ },
139
+ "authMode": {
140
+ "type": "string",
141
+ "enum": ["anonymous", "bearer"],
142
+ "description": "Artifactory authentication mode"
143
+ },
144
+ "credentialRef": {
145
+ "type": "string",
146
+ "minLength": 1,
147
+ "description": "Reference to an external Artifactory credential; never a secret value"
133
148
  }
134
149
  }
135
150
  },
@@ -107,7 +107,11 @@
107
107
  "awesome-copilot",
108
108
  "local-awesome-copilot",
109
109
  "apm",
110
- "local-apm"
110
+ "local-apm",
111
+ "skills",
112
+ "local-skills",
113
+ "azure-devops",
114
+ "artifactory"
111
115
  ]
112
116
  },
113
117
  "installedAt": {
@@ -158,6 +162,15 @@
158
162
  "type": "string",
159
163
  "description": "SHA256 checksum of the file contents",
160
164
  "pattern": "^[a-f0-9]{64}$"
165
+ },
166
+ "installedPath": {
167
+ "type": "string",
168
+ "description": "Where the file was installed, relative to the target's base directory. Recorded only when it cannot be derived from path (manifest-driven placement renames files by manifest item id).",
169
+ "minLength": 1,
170
+ "examples": [
171
+ "skills/my-skill/SKILL.md",
172
+ "steering/my-rules.instructions.md"
173
+ ]
161
174
  }
162
175
  },
163
176
  "additionalProperties": false
@@ -179,7 +192,11 @@
179
192
  "awesome-copilot",
180
193
  "local-awesome-copilot",
181
194
  "apm",
182
- "local-apm"
195
+ "local-apm",
196
+ "skills",
197
+ "local-skills",
198
+ "azure-devops",
199
+ "artifactory"
183
200
  ]
184
201
  },
185
202
  "url": {
@@ -190,6 +207,24 @@
190
207
  "branch": {
191
208
  "type": "string",
192
209
  "description": "Optional Git branch for git-based sources"
210
+ },
211
+ "collectionsPath": {
212
+ "type": "string",
213
+ "description": "Optional collections subdirectory for awesome-copilot sources"
214
+ },
215
+ "indexFile": {
216
+ "type": "string",
217
+ "description": "Optional Artifactory index file"
218
+ },
219
+ "authMode": {
220
+ "type": "string",
221
+ "enum": ["anonymous", "bearer"],
222
+ "description": "Optional Artifactory authentication mode"
223
+ },
224
+ "credentialRef": {
225
+ "type": "string",
226
+ "minLength": 1,
227
+ "description": "Optional external Artifactory credential reference"
193
228
  }
194
229
  },
195
230
  "additionalProperties": false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-primitives-hub/core",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Core domain types and port interfaces for AI Primitives Hub. No dependency on other @ai-primitives-hub packages.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -31,9 +31,9 @@
31
31
  "@types/js-yaml": "^4.0.9",
32
32
  "@types/node": "^22.20.1",
33
33
  "@types/semver": "^7.7.1",
34
- "@vitest/coverage-v8": "^4.1.10",
34
+ "@vitest/coverage-v8": "^5.0.0",
35
35
  "typescript": "^5.9.3",
36
- "vitest": "^4.1.10"
36
+ "vitest": "^5.0.0"
37
37
  },
38
38
  "engines": {
39
39
  "node": ">=24.0.0"