@cat-factory/agents 0.99.0 → 0.100.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.
@@ -28,15 +28,22 @@ export interface FoundationalServiceSourceServiceDependencies {
28
28
  * The shared repo-source engine (`repoSourceSync`) owns the mechanics that every repo-sourced
29
29
  * library gets identically — pin the head commit BEFORE reading, run the reconcile, sweep
30
30
  * tombstones by produced id, stamp the sync state, invalidate only on a real change. The
31
- * differentiator supplied here is what a UNIT is, and there are two of them:
31
+ * differentiator supplied here is what a UNIT is, and there are three of them:
32
32
  *
33
33
  * - **`directory`**: one service per immediate subdirectory, identified by its `service.md`.
34
+ * - **`folder`**: one service, named on the LINK, whose contracts are every contract document
35
+ * found under `dirPath` — optionally including its subfolders.
34
36
  * - **`files`**: one service, named on the LINK, whose contracts are the linked file paths.
35
- * There is no directory convention to read identity from, which is exactly why the link
36
- * carries it (refused at the write boundary otherwise).
37
37
  *
38
- * Both modes anchor their staleness probe on ONE directory (`dirPath`), so a `files` source
39
- * with a dozen linked files still costs a single commit read per freshness check.
38
+ * Neither single-service mode has a directory convention to read identity from, which is
39
+ * exactly why the link carries it (refused at the write boundary otherwise). What separates
40
+ * them is WHEN the file set is decided: `files` pins the paths at link time, so a contract
41
+ * added upstream stays invisible until somebody edits the link, while `folder` re-discovers
42
+ * the set on every sync — which is why a spec directory that grows wants the folder shape.
43
+ *
44
+ * All three anchor their staleness probe on ONE directory (`dirPath`), so a `files` source with
45
+ * a dozen linked files, and a `folder` source with a whole subtree, each still cost a single
46
+ * commit read per freshness check.
40
47
  */
41
48
  export declare class FoundationalServiceSourceService {
42
49
  private readonly deps;
@@ -66,15 +73,36 @@ export declare class FoundationalServiceSourceService {
66
73
  */
67
74
  refreshStale(staleAfterMs: number, limit: number): Promise<number>;
68
75
  private runSync;
76
+ /**
77
+ * `folder` mode: ONE service, named on the link, whose contracts are every contract document
78
+ * under the linked folder (and its subfolders when the link says so).
79
+ */
80
+ private reconcileFolder;
81
+ /** Read the folder root's optional `service.md`, or null when there is none / it is unreadable. */
82
+ private readFolderOverview;
69
83
  /** `directory` mode: one service per immediate subdirectory carrying a `service.md`. */
70
84
  private reconcileDirectories;
71
85
  /** `files` mode: ONE service, named on the link, whose contracts are the linked paths. */
72
86
  private reconcileFiles;
87
+ /**
88
+ * The identity a single-service source names, or a refusal.
89
+ *
90
+ * Guaranteed by the link-time `v.check`, but a stored row outlives the schema that wrote it —
91
+ * so this is a real guard, not a type-narrowing convenience. It returns BOTH proven fields
92
+ * rather than just the id, so a caller narrows by using the result instead of re-asserting
93
+ * `serviceName as string` at each use — a cast that would survive the guard being weakened.
94
+ */
95
+ private requireNamedService;
73
96
  /**
74
97
  * Read the given repo paths and keep the ones that ARE contract documents. A file whose
75
98
  * format is unrecognised is skipped rather than stored as an opaque blob: the format is what
76
99
  * tells a downstream agent how to read it, and a "contract" nobody can interpret is worse in
77
100
  * an agent's context than an absent one.
101
+ *
102
+ * A path whose EXTENSION could never yield a format is dropped without a read and without a
103
+ * count — it is a README beside the specs, not a contract that failed. Everything else that
104
+ * fails is COUNTED on the report, because a link that produced fewer contracts than its
105
+ * author expected has no other explanation available to them.
78
106
  */
79
107
  private readContracts;
80
108
  private writeService;
@@ -1 +1 @@
1
- {"version":3,"file":"FoundationalServiceSourceService.d.ts","sourceRoot":"","sources":["../../src/foundationalServices/FoundationalServiceSourceService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,4BAA4B,EAC5B,yBAAyB,EACzB,+BAA+B,EAC/B,6BAA6B,EAC7B,kCAAkC,EACnC,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAEV,qBAAqB,EACrB,KAAK,EAEL,6BAA6B,EAE7B,mCAAmC,EACnC,YAAY,EACZ,WAAW,EACX,MAAM,EAEP,MAAM,qBAAqB,CAAA;AAyB5B;;;;;GAKG;AACH,MAAM,MAAM,iCAAiC,GAAG,CAC9C,SAAS,EAAE,4BAA4B,EACvC,OA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,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAQvE;IAED,uFAAuF;IACjF,IAAI,CACR,SAAS,EAAE,4BAA4B,EACvC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,6BAA6B,CAAC,CAExC;IAED;;;;;;;;;OASG;IACG,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAiBvE;YAIa,OAAO;IA+CrB,wFAAwF;YAC1E,oBAAoB;IA+ElC,0FAA0F;YAC5E,cAAc;IAmD5B;;;;;OAKG;YACW,aAAa;YA4Cb,YAAY;IAsC1B,OAAO,CAAC,OAAO;IAcf,OAAO,CAAC,QAAQ;YAcF,OAAO;YAkBP,mBAAmB;CAUlC"}
1
+ {"version":3,"file":"FoundationalServiceSourceService.d.ts","sourceRoot":"","sources":["../../src/foundationalServices/FoundationalServiceSourceService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,4BAA4B,EAC5B,yBAAyB,EACzB,+BAA+B,EAC/B,6BAA6B,EAC7B,kCAAkC,EACnC,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAEV,qBAAqB,EACrB,KAAK,EAEL,6BAA6B,EAE7B,mCAAmC,EACnC,YAAY,EACZ,WAAW,EACX,MAAM,EAEP,MAAM,qBAAqB,CAAA;AAqD5B;;;;;GAKG;AACH,MAAM,MAAM,iCAAiC,GAAG,CAC9C,SAAS,EAAE,4BAA4B,EACvC,OAAO,EAAE,MAAM,KACZ,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;AAE3B,MAAM,WAAW,4CAA4C;IAC3D,mCAAmC,EAAE,mCAAmC,CAAA;IACxE,6BAA6B,EAAE,6BAA6B,CAAA;IAC5D,qBAAqB,EAAE,qBAAqB,CAAA;IAC5C,YAAY,EAAE,YAAY,CAAA;IAC1B,qBAAqB,EAAE,iCAAiC,C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AM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAiBvE;YAIa,OAAO;IA8DrB;;;OAGG;YACW,eAAe;IA4E7B,mGAAmG;YACrF,kBAAkB;IAWhC,wFAAwF;YAC1E,oBAAoB;IAkFlC,0FAA0F;YAC5E,cAAc;IA8C5B;;;;;;;OAOG;IACH,OAAO,CAAC,mBAAmB;IAa3B;;;;;;;;;;OAUG;YACW,aAAa;YAgEb,YAAY;IAsC1B,OAAO,CAAC,OAAO;IAcf,OAAO,CAAC,QAAQ;YAcF,OAAO;YAkBP,mBAAmB;CAUlC"}
@@ -1,6 +1,14 @@
1
- import { NotFoundError, ValidationError, assertFound, detectContractFormat, noopLogger, runBestEffort, summarizeContract, } from '@cat-factory/kernel';
1
+ import { NotFoundError, ValidationError, assertFound, detectContractFormat, isContractCandidatePath, noopLogger, runBestEffort, summarizeContract, } from '@cat-factory/kernel';
2
+ import pMap from 'p-map';
2
3
  import { normalizeDirPath, probeRepoSourceStatus, syncRepoSource, } from '../repoSourceSync/repo-source-sync.js';
3
- import { SERVICE_MANIFEST_FILE, commonDirectory, contractIdFromPath, contractTitleFromPath, normalizeFilePath, parseServiceManifest, slugFromDirName, } from './foundational-source.logic.js';
4
+ import { scanContractFolder } from './folder-scan.js';
5
+ import { SERVICE_MANIFEST_FILE, commonDirectory, contractIdFromPath, contractIdFromRelativePath, contractTitleFromPath, normalizeFilePath, parseServiceManifest, parseServiceOverview, slugFromDirName, } from './foundational-source.logic.js';
6
+ /**
7
+ * How many contract bodies one reconcile fetches at once. A `folder` source can take up to
8
+ * {@link MAX_FOLDER_CONTRACT_FILES} documents, and paying that one round trip at a time is the
9
+ * dominant cost of a sync that has any real work to do.
10
+ */
11
+ const CONTRACT_READ_CONCURRENCY = 8;
4
12
  /**
5
13
  * Repo-sourced foundational services: link a repo FOLDER of service definitions (or an
6
14
  * explicit FILE list for one service), resync it, and answer the cheap "check for changes"
@@ -10,15 +18,22 @@ import { SERVICE_MANIFEST_FILE, commonDirectory, contractIdFromPath, contractTit
10
18
  * The shared repo-source engine (`repoSourceSync`) owns the mechanics that every repo-sourced
11
19
  * library gets identically — pin the head commit BEFORE reading, run the reconcile, sweep
12
20
  * tombstones by produced id, stamp the sync state, invalidate only on a real change. The
13
- * differentiator supplied here is what a UNIT is, and there are two of them:
21
+ * differentiator supplied here is what a UNIT is, and there are three of them:
14
22
  *
15
23
  * - **`directory`**: one service per immediate subdirectory, identified by its `service.md`.
24
+ * - **`folder`**: one service, named on the LINK, whose contracts are every contract document
25
+ * found under `dirPath` — optionally including its subfolders.
16
26
  * - **`files`**: one service, named on the LINK, whose contracts are the linked file paths.
17
- * There is no directory convention to read identity from, which is exactly why the link
18
- * carries it (refused at the write boundary otherwise).
19
27
  *
20
- * Both modes anchor their staleness probe on ONE directory (`dirPath`), so a `files` source
21
- * with a dozen linked files still costs a single commit read per freshness check.
28
+ * Neither single-service mode has a directory convention to read identity from, which is
29
+ * exactly why the link carries it (refused at the write boundary otherwise). What separates
30
+ * them is WHEN the file set is decided: `files` pins the paths at link time, so a contract
31
+ * added upstream stays invisible until somebody edits the link, while `folder` re-discovers
32
+ * the set on every sync — which is why a spec directory that grows wants the folder shape.
33
+ *
34
+ * All three anchor their staleness probe on ONE directory (`dirPath`), so a `files` source with
35
+ * a dozen linked files, and a `folder` source with a whole subtree, each still cost a single
36
+ * commit read per freshness check.
22
37
  */
23
38
  export class FoundationalServiceSourceService {
24
39
  deps;
@@ -37,9 +52,13 @@ export class FoundationalServiceSourceService {
37
52
  const now = this.deps.clock.now();
38
53
  const filePaths = (input.filePaths ?? []).map(normalizeFilePath).filter(Boolean);
39
54
  // A `files` source anchors its probe on the linked files' deepest common directory, so
40
- // one commit read covers the whole set (see the class note). A `directory` source anchors
41
- // on the scanned subtree itself.
55
+ // one commit read covers the whole set (see the class note). The `directory` and `folder`
56
+ // sources anchor on the scanned subtree itself.
42
57
  const dirPath = input.mode === 'files' ? commonDirectory(filePaths) : normalizeDirPath(input.dirPath);
58
+ // Both single-service modes name their service on the link; only `files` enumerates paths
59
+ // and only `folder` walks a subtree. Storing each field solely where it is READ keeps a
60
+ // stored row from claiming a shape its mode never uses.
61
+ const namesService = input.mode === 'files' || input.mode === 'folder';
43
62
  const record = {
44
63
  id: this.deps.idGenerator.next('fndsrc'),
45
64
  ownerKind,
@@ -49,10 +68,11 @@ export class FoundationalServiceSourceService {
49
68
  gitRef: input.gitRef?.trim() || 'HEAD',
50
69
  mode: input.mode,
51
70
  dirPath,
52
- filePaths,
53
- serviceId: input.mode === 'files' ? (input.serviceId ?? null) : null,
54
- serviceName: input.mode === 'files' ? (input.serviceName ?? null) : null,
55
- serviceSummary: input.mode === 'files' ? (input.serviceSummary ?? null) : null,
71
+ recursive: input.mode === 'folder' && input.recursive === true,
72
+ filePaths: input.mode === 'files' ? filePaths : [],
73
+ serviceId: namesService ? (input.serviceId ?? null) : null,
74
+ serviceName: namesService ? (input.serviceName ?? null) : null,
75
+ serviceSummary: namesService ? (input.serviceSummary ?? null) : null,
56
76
  lastSyncedCommit: null,
57
77
  lastSyncedAt: null,
58
78
  createdAt: now,
@@ -118,7 +138,11 @@ export class FoundationalServiceSourceService {
118
138
  async runSync(source) {
119
139
  // Invariant across the whole sync — resolved ONCE, never per file.
120
140
  const installationId = await this.requireInstallation(source);
121
- return syncRepoSource({
141
+ // Accumulated by the reconcile and lifted onto the result below. The shared engine has no
142
+ // notion of a dropped file, and giving it one would put a foundational-services concern in
143
+ // the module the fragment and skill libraries share.
144
+ const report = { skipped: 0, truncated: false };
145
+ const outcome = await syncRepoSource({
122
146
  source,
123
147
  installationId,
124
148
  githubClient: this.deps.githubClient,
@@ -136,9 +160,12 @@ export class FoundationalServiceSourceService {
136
160
  unchanged: existing.length,
137
161
  };
138
162
  }
139
- return source.mode === 'files'
140
- ? this.reconcileFiles(source, installationId, readRef, now, existing)
141
- : this.reconcileDirectories(source, installationId, readRef, now, existing);
163
+ const args = [source, installationId, readRef, now, existing, report];
164
+ if (source.mode === 'files')
165
+ return this.reconcileFiles(...args);
166
+ if (source.mode === 'folder')
167
+ return this.reconcileFolder(...args);
168
+ return this.reconcileDirectories(...args);
142
169
  },
143
170
  tombstone: async (service, now) => {
144
171
  await this.deps.foundationalServiceRepository.softDelete(service.ownerKind, service.ownerId, service.serviceId, now);
@@ -147,9 +174,87 @@ export class FoundationalServiceSourceService {
147
174
  updateSyncState: (commit, now) => this.deps.foundationalServiceSourceRepository.updateSyncState(source.id, commit, now),
148
175
  invalidate: () => this.deps.invalidateCatalog?.(source.ownerKind, source.ownerId) ?? Promise.resolve(),
149
176
  });
177
+ if (report.truncated) {
178
+ this.log.warn('Foundational folder source truncated by a scan cap', {
179
+ sourceId: source.id,
180
+ ownerKind: source.ownerKind,
181
+ ownerId: source.ownerId,
182
+ dirPath: source.dirPath,
183
+ recursive: source.recursive,
184
+ });
185
+ }
186
+ return { ...outcome, skippedFiles: report.skipped, truncated: report.truncated };
187
+ }
188
+ /**
189
+ * `folder` mode: ONE service, named on the link, whose contracts are every contract document
190
+ * under the linked folder (and its subfolders when the link says so).
191
+ */
192
+ async reconcileFolder(source, installationId, readRef, now, existing, report) {
193
+ const { serviceId, serviceName } = this.requireNamedService(source);
194
+ const prior = existing.find((s) => s.serviceId === serviceId);
195
+ const scan = await scanContractFolder({
196
+ listDir: (path) => this.listDir(source, installationId, path, readRef),
197
+ root: source.dirPath,
198
+ recursive: source.recursive,
199
+ });
200
+ // A truncation is a STABLE outcome, so it is reported but never folded into `incomplete`:
201
+ // holding the pin back would make the next sync re-read, truncate identically, and the
202
+ // source would look permanently behind while serving exactly what it already serves.
203
+ report.truncated = scan.truncated;
204
+ const contracts = await this.readContracts({
205
+ source,
206
+ installationId,
207
+ readRef,
208
+ serviceId,
209
+ paths: scan.paths,
210
+ now,
211
+ report,
212
+ contractIdFor: (path) => contractIdFromRelativePath(path, source.dirPath),
213
+ });
214
+ if (contracts.length === 0) {
215
+ // Two DIFFERENT zero-contract outcomes reach this line, and only one of them is a failure.
216
+ //
217
+ // Nothing under the folder even LOOKED like a contract: a spec folder nobody has filled in
218
+ // yet, one holding only prose, or one whose contents were removed upstream (a listing of a
219
+ // missing path reads back empty, not as an error). That is a stable state, so the pass is
220
+ // COMPLETE — pin it, and let the tombstone sweep retire a service whose folder was emptied,
221
+ // exactly as `directory` mode retires a directory that lost its `service.md`. Calling it
222
+ // incomplete instead would hold the pin back forever: every later sweep would re-walk the
223
+ // whole subtree to reach the same answer while the source never stopped reporting changes
224
+ // upstream — the very re-read loop the truncation disposition above exists to avoid.
225
+ if (scan.paths.length === 0)
226
+ return { liveIds: new Set(), upserted: 0, unchanged: 0 };
227
+ // Candidates WERE found and every one of them read back unusable — a transient read
228
+ // failure, or a tree caught mid-edit. Keep a prior row alive and leave the pin behind so
229
+ // the next pass re-reads, the same disposition `files` mode takes, for the same reason:
230
+ // retiring a service over a momentary read failure strips a capability from every
231
+ // subsequent design.
232
+ if (prior)
233
+ return { liveIds: new Set([serviceId]), upserted: 0, unchanged: 1, incomplete: true };
234
+ return { liveIds: new Set(), upserted: 0, unchanged: 0, incomplete: true };
235
+ }
236
+ // An OPTIONAL `service.md` at the folder root enriches the catalog entry; it can never
237
+ // identify the service, because the link already did that (see `parseServiceOverview`).
238
+ const overview = await this.readFolderOverview(source, installationId, readRef, scan.manifestPath);
239
+ await this.writeService(source, {
240
+ serviceId,
241
+ name: serviceName,
242
+ summary: source.serviceSummary || overview?.summary || serviceName,
243
+ description: overview?.description ?? '',
244
+ capabilities: overview?.capabilities ?? [],
245
+ sourcePath: source.dirPath,
246
+ }, contracts, prior, readRef, now);
247
+ return { liveIds: new Set([serviceId]), upserted: 1, unchanged: 0 };
248
+ }
249
+ /** Read the folder root's optional `service.md`, or null when there is none / it is unreadable. */
250
+ async readFolderOverview(source, installationId, readRef, manifestPath) {
251
+ if (!manifestPath)
252
+ return null;
253
+ const file = await this.readFile(source, installationId, manifestPath, readRef);
254
+ return file ? parseServiceOverview(file.content) : null;
150
255
  }
151
256
  /** `directory` mode: one service per immediate subdirectory carrying a `service.md`. */
152
- async reconcileDirectories(source, installationId, readRef, now, existing) {
257
+ async reconcileDirectories(source, installationId, readRef, now, existing, report) {
153
258
  const existingById = new Map(existing.map((s) => [s.serviceId, s]));
154
259
  // Sorted by name (code-unit order, locale-independent) so slug-collision resolution is
155
260
  // deterministic — first wins — regardless of ICU collation.
@@ -188,9 +293,18 @@ export class FoundationalServiceSourceService {
188
293
  }
189
294
  continue;
190
295
  }
191
- const contracts = await this.readContracts(source, installationId, readRef, serviceId, entries
192
- .filter((e) => e.type === 'file' && e.path !== manifestEntry.path)
193
- .map((e) => e.path), now);
296
+ const contracts = await this.readContracts({
297
+ source,
298
+ installationId,
299
+ readRef,
300
+ serviceId,
301
+ paths: entries
302
+ .filter((e) => e.type === 'file' && e.path !== manifestEntry.path)
303
+ .map((e) => e.path),
304
+ now,
305
+ report,
306
+ contractIdFor: contractIdFromPath,
307
+ });
194
308
  await this.writeService(source, {
195
309
  serviceId,
196
310
  name: parsed.name,
@@ -208,18 +322,19 @@ export class FoundationalServiceSourceService {
208
322
  return { liveIds, upserted, unchanged: 0, ...(incomplete ? { incomplete: true } : {}) };
209
323
  }
210
324
  /** `files` mode: ONE service, named on the link, whose contracts are the linked paths. */
211
- async reconcileFiles(source, installationId, readRef, now, existing) {
212
- const serviceId = source.serviceId;
213
- // Guaranteed by the link-time `v.check`, but a stored row outlives the schema that wrote
214
- // it — so this is a real guard, not a type narrowing convenience.
215
- if (!serviceId || !source.serviceName) {
216
- throw new ValidationError('This source does not name the service its files describe', {
217
- reason: 'foundational_source_unnamed_service',
218
- sourceId: source.id,
219
- });
220
- }
325
+ async reconcileFiles(source, installationId, readRef, now, existing, report) {
326
+ const { serviceId, serviceName } = this.requireNamedService(source);
221
327
  const prior = existing.find((s) => s.serviceId === serviceId);
222
- const contracts = await this.readContracts(source, installationId, readRef, serviceId, source.filePaths, now);
328
+ const contracts = await this.readContracts({
329
+ source,
330
+ installationId,
331
+ readRef,
332
+ serviceId,
333
+ paths: source.filePaths,
334
+ now,
335
+ report,
336
+ contractIdFor: contractIdFromPath,
337
+ });
223
338
  if (contracts.length === 0) {
224
339
  // Every linked file read back unusable. Keep a prior row alive and leave the pin behind
225
340
  // so the next pass re-reads — the alternative is retiring a service that a momentary
@@ -230,33 +345,66 @@ export class FoundationalServiceSourceService {
230
345
  }
231
346
  await this.writeService(source, {
232
347
  serviceId,
233
- name: source.serviceName,
234
- summary: source.serviceSummary ?? source.serviceName,
348
+ name: serviceName,
349
+ summary: source.serviceSummary ?? serviceName,
235
350
  description: '',
236
351
  capabilities: [],
237
352
  sourcePath: source.dirPath,
238
353
  }, contracts, prior, readRef, now);
239
354
  return { liveIds: new Set([serviceId]), upserted: 1, unchanged: 0 };
240
355
  }
356
+ /**
357
+ * The identity a single-service source names, or a refusal.
358
+ *
359
+ * Guaranteed by the link-time `v.check`, but a stored row outlives the schema that wrote it —
360
+ * so this is a real guard, not a type-narrowing convenience. It returns BOTH proven fields
361
+ * rather than just the id, so a caller narrows by using the result instead of re-asserting
362
+ * `serviceName as string` at each use — a cast that would survive the guard being weakened.
363
+ */
364
+ requireNamedService(source) {
365
+ if (!source.serviceId || !source.serviceName) {
366
+ throw new ValidationError('This source does not name the service its contracts describe', {
367
+ reason: 'foundational_source_unnamed_service',
368
+ sourceId: source.id,
369
+ });
370
+ }
371
+ return { serviceId: source.serviceId, serviceName: source.serviceName };
372
+ }
241
373
  /**
242
374
  * Read the given repo paths and keep the ones that ARE contract documents. A file whose
243
375
  * format is unrecognised is skipped rather than stored as an opaque blob: the format is what
244
376
  * tells a downstream agent how to read it, and a "contract" nobody can interpret is worse in
245
377
  * an agent's context than an absent one.
378
+ *
379
+ * A path whose EXTENSION could never yield a format is dropped without a read and without a
380
+ * count — it is a README beside the specs, not a contract that failed. Everything else that
381
+ * fails is COUNTED on the report, because a link that produced fewer contracts than its
382
+ * author expected has no other explanation available to them.
246
383
  */
247
- async readContracts(source, installationId, readRef, serviceId, paths, now) {
384
+ async readContracts(params) {
385
+ const { source, installationId, readRef, serviceId, paths, now, report, contractIdFor } = params;
248
386
  const out = [];
249
387
  const seen = new Set();
250
- for (const path of paths) {
251
- const file = await this.readFile(source, installationId, path, readRef);
252
- if (!file)
388
+ // Read the bodies concurrently, then DECIDE over them in path order. The split matters: the
389
+ // reads are independent, but the id dedupe keeps the FIRST claimant of a colliding id, so
390
+ // the decision pass has to run in a deterministic order or which contract survives would
391
+ // depend on which response arrived first. `pMap` resolves in input order, so it does.
392
+ const fetched = await pMap(paths.filter(isContractCandidatePath), async (path) => ({ path, file: await this.readFile(source, installationId, path, readRef) }), { concurrency: CONTRACT_READ_CONCURRENCY });
393
+ for (const { path, file } of fetched) {
394
+ if (!file) {
395
+ report.skipped++;
253
396
  continue;
397
+ }
254
398
  const format = detectContractFormat(path, file.content);
255
- if (!format)
399
+ if (!format) {
400
+ report.skipped++;
256
401
  continue;
257
- const contractId = contractIdFromPath(path);
258
- if (seen.has(contractId))
402
+ }
403
+ const contractId = contractIdFor(path);
404
+ if (seen.has(contractId)) {
405
+ report.skipped++;
259
406
  continue;
407
+ }
260
408
  seen.add(contractId);
261
409
  const summary = summarizeContract({
262
410
  contractId,
@@ -334,6 +482,7 @@ function toWire(record) {
334
482
  gitRef: record.gitRef,
335
483
  mode: record.mode,
336
484
  dirPath: record.dirPath,
485
+ recursive: record.recursive,
337
486
  filePaths: record.filePaths,
338
487
  serviceId: record.serviceId,
339
488
  serviceName: record.serviceName,
@@ -1 +1 @@
1
- {"version":3,"file":"FoundationalServiceSourceService.js","sourceRoot":"","sources":["../../src/foundationalServices/FoundationalServiceSourceService.ts"],"names":[],"mappings":"AAoBA,OAAO,EACL,aAAa,EACb,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,UAAU,EACV,aAAa,EACb,iBAAiB,GAClB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,GACf,MAAM,uCAAuC,C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AAE;QACb,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,SAAS,EAAE,MAAM,CAAC,SAAS;QAC3B,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,cAAc,EAAE,MAAM,CAAC,cAAc;QACrC,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;QACzC,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,SAAS,EAAE,MAAM,CAAC,SAAS;KAC5B,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"FoundationalServiceSourceService.js","sourceRoot":"","sources":["../../src/foundationalServices/FoundationalServiceSourceService.ts"],"names":[],"mappings":"AAoBA,OAAO,EACL,aAAa,EACb,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,uBAAuB,EACvB,UAAU,EACV,aAAa,EACb,iBAAiB,GAClB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,IAAI,MAAM,OAAO,CAAA;AACxB,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,GACf,MAAM,uCAAuC,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,kBAAkB,EAClB,0BAA0B,EAC1B,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,GAChB,MAAM,gCAAgC,CAAA;AAkBvC;;;;GAIG;AACH,MAAM,yBAAyB,GAAG,CAAC,CAAA;AA0BnC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,OAAO,gC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@@
1
+ import type { RepoContentEntry } from '@cat-factory/kernel';
2
+ /**
3
+ * How many subfolder levels below the scanned root a recursive walk descends. Deep enough for
4
+ * any real spec layout (`specs/<domain>/<version>/…`), shallow enough that a link pointed at a
5
+ * repo root cannot walk a whole monorepo.
6
+ */
7
+ export declare const MAX_FOLDER_SCAN_DEPTH = 8;
8
+ /**
9
+ * How many directory listings ONE scan may perform. This is the cost bound that matters: every
10
+ * directory is a separate upstream read, and a folder link is the one source shape whose reach
11
+ * nobody enumerated by hand.
12
+ */
13
+ export declare const MAX_FOLDER_SCAN_DIRECTORIES = 200;
14
+ /**
15
+ * How many candidate contract files one folder source may take. Each becomes a stored document
16
+ * that a declaring design's consumer folds into its context, so this bounds what a single link
17
+ * can put in front of an agent.
18
+ */
19
+ export declare const MAX_FOLDER_CONTRACT_FILES = 100;
20
+ /**
21
+ * How many of a level's directory listings are in flight at once. The walk's cost bound is
22
+ * {@link MAX_FOLDER_SCAN_DIRECTORIES} reads; this is what stops those reads from being paid
23
+ * one round trip at a time, which on a deep tree is the difference between a sync that takes
24
+ * seconds and one that takes minutes.
25
+ */
26
+ export declare const FOLDER_SCAN_CONCURRENCY = 8;
27
+ /** Lists one repo directory at the scan's pinned ref. */
28
+ export type ListRepoDirectory = (path: string) => Promise<RepoContentEntry[]>;
29
+ export interface FolderScanResult {
30
+ /** Candidate contract file paths, shallowest-first then by name. */
31
+ paths: string[];
32
+ /** The OPTIONAL `service.md` sitting at the folder root, if there is one. */
33
+ manifestPath: string | null;
34
+ /**
35
+ * A cap stopped the walk short, so {@link paths} is a PREFIX of what the folder holds. The
36
+ * caller reports it; it is deliberately NOT treated as a transient failure, because a
37
+ * re-read would truncate identically and the source would never look caught up.
38
+ */
39
+ truncated: boolean;
40
+ }
41
+ /**
42
+ * Walk `root` for contract documents.
43
+ *
44
+ * BREADTH-first with each listing sorted by name, which makes two things true at once: the
45
+ * result is deterministic across syncs (so a truncated scan keeps the same contracts rather
46
+ * than flapping), and the cap falls on the DEEPEST, least-specific files — a root-level
47
+ * `openapi.yaml` is never dropped in favour of something nested six levels down.
48
+ *
49
+ * Only files whose extension could yield a contract format are returned; the caller still has
50
+ * to read each body to know. That pre-filter is what keeps a scan's file reads proportional to
51
+ * the candidates rather than to everything the folder happens to contain.
52
+ */
53
+ export declare function scanContractFolder(params: {
54
+ listDir: ListRepoDirectory;
55
+ root: string;
56
+ recursive: boolean;
57
+ }): Promise<FolderScanResult>;
58
+ //# sourceMappingURL=folder-scan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"folder-scan.d.ts","sourceRoot":"","sources":["../../src/foundationalServices/folder-scan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAc3D;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,IAAI,CAAA;AAEtC;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,MAAM,CAAA;AAE9C;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,MAAM,CAAA;AAE5C;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,IAAI,CAAA;AAExC,yDAAyD;AACzD,MAAM,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAA;AA+D7E,MAAM,WAAW,gBAAgB;IAC/B,oEAAoE;IACpE,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,6EAA6E;IAC7E,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B;;;;OAIG;IACH,SAAS,EAAE,OAAO,CAAA;CACnB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,kBAAkB,CAAC,MAAM,EAAE;IAC/C,OAAO,EAAE,iBAAiB,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,OAAO,CAAA;CACnB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAiD5B"}
@@ -0,0 +1,139 @@
1
+ import { isContractCandidatePath } from '@cat-factory/kernel';
2
+ import pMap from 'p-map';
3
+ import { SERVICE_MANIFEST_FILE } from './foundational-source.logic.js';
4
+ // ---------------------------------------------------------------------------
5
+ // The `folder`-mode walk: find every candidate contract document under one repo folder,
6
+ // optionally descending into its subfolders (backend/docs/adr/0031-foundational-services.md).
7
+ //
8
+ // The directory listing is INJECTED rather than taken as a GitHub client, so the walk's whole
9
+ // contract — ordering, the caps, what counts as a candidate — is unit-testable with no client
10
+ // and both facades get identical behaviour by construction.
11
+ // ---------------------------------------------------------------------------
12
+ /**
13
+ * How many subfolder levels below the scanned root a recursive walk descends. Deep enough for
14
+ * any real spec layout (`specs/<domain>/<version>/…`), shallow enough that a link pointed at a
15
+ * repo root cannot walk a whole monorepo.
16
+ */
17
+ export const MAX_FOLDER_SCAN_DEPTH = 8;
18
+ /**
19
+ * How many directory listings ONE scan may perform. This is the cost bound that matters: every
20
+ * directory is a separate upstream read, and a folder link is the one source shape whose reach
21
+ * nobody enumerated by hand.
22
+ */
23
+ export const MAX_FOLDER_SCAN_DIRECTORIES = 200;
24
+ /**
25
+ * How many candidate contract files one folder source may take. Each becomes a stored document
26
+ * that a declaring design's consumer folds into its context, so this bounds what a single link
27
+ * can put in front of an agent.
28
+ */
29
+ export const MAX_FOLDER_CONTRACT_FILES = 100;
30
+ /**
31
+ * How many of a level's directory listings are in flight at once. The walk's cost bound is
32
+ * {@link MAX_FOLDER_SCAN_DIRECTORIES} reads; this is what stops those reads from being paid
33
+ * one round trip at a time, which on a deep tree is the difference between a sync that takes
34
+ * seconds and one that takes minutes.
35
+ */
36
+ export const FOLDER_SCAN_CONCURRENCY = 8;
37
+ /**
38
+ * Classify one directory's entries. Pure and per-directory, so the walk above stays a loop over
39
+ * levels and this stays the single place that decides what an entry IS.
40
+ *
41
+ * It deliberately applies no cap of its own: the file cap is a property of the WALK (it counts
42
+ * across directories), so applying it here would either need the running total threaded in or
43
+ * would silently cap per directory.
44
+ */
45
+ function readDirectoryListing(dir, entries, recursive) {
46
+ const files = [];
47
+ const children = [];
48
+ let manifestPath = null;
49
+ let depthCapped = false;
50
+ // Code-unit order, locale-independent — the same rule the `directory` reconcile sorts by, so
51
+ // neither walk's outcome depends on ICU collation.
52
+ const sorted = [...entries].sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0));
53
+ for (const entry of sorted) {
54
+ if (entry.type === 'file') {
55
+ if (dir.depth === 0 && entry.name.toLowerCase() === SERVICE_MANIFEST_FILE) {
56
+ manifestPath = entry.path;
57
+ continue;
58
+ }
59
+ if (isContractCandidatePath(entry.path))
60
+ files.push(entry.path);
61
+ continue;
62
+ }
63
+ if (entry.type !== 'dir' || !recursive)
64
+ continue;
65
+ // A directory we decline to descend into is dropped COVERAGE, whether or not it happens to
66
+ // hold a contract — we cannot know which without the listing the cap just refused. So
67
+ // reporting truncation here is the only honest answer, not an over-report.
68
+ if (dir.depth + 1 > MAX_FOLDER_SCAN_DEPTH) {
69
+ depthCapped = true;
70
+ continue;
71
+ }
72
+ children.push({ path: entry.path, depth: dir.depth + 1 });
73
+ }
74
+ return { files, children, manifestPath, depthCapped };
75
+ }
76
+ /**
77
+ * Walk `root` for contract documents.
78
+ *
79
+ * BREADTH-first with each listing sorted by name, which makes two things true at once: the
80
+ * result is deterministic across syncs (so a truncated scan keeps the same contracts rather
81
+ * than flapping), and the cap falls on the DEEPEST, least-specific files — a root-level
82
+ * `openapi.yaml` is never dropped in favour of something nested six levels down.
83
+ *
84
+ * Only files whose extension could yield a contract format are returned; the caller still has
85
+ * to read each body to know. That pre-filter is what keeps a scan's file reads proportional to
86
+ * the candidates rather than to everything the folder happens to contain.
87
+ */
88
+ export async function scanContractFolder(params) {
89
+ const { listDir, root, recursive } = params;
90
+ const paths = [];
91
+ let manifestPath = null;
92
+ let truncated = false;
93
+ let listings = 0;
94
+ // One LEVEL at a time. The listings within a level are independent of each other, so they run
95
+ // concurrently; the level boundary is what keeps the walk breadth-first, and therefore keeps
96
+ // the visit order — and every cap's outcome — identical to a one-at-a-time walk.
97
+ let frontier = [{ path: root, depth: 0 }];
98
+ while (frontier.length > 0 && paths.length < MAX_FOLDER_CONTRACT_FILES) {
99
+ const budget = MAX_FOLDER_SCAN_DIRECTORIES - listings;
100
+ if (budget <= 0) {
101
+ truncated = true;
102
+ break;
103
+ }
104
+ // The frontier is already in visit order, so taking its first `budget` entries drops exactly
105
+ // the directories a sequential walk would have run out of listings before reaching.
106
+ const batch = frontier.slice(0, budget);
107
+ if (batch.length < frontier.length)
108
+ truncated = true;
109
+ listings += batch.length;
110
+ // `pMap` resolves in INPUT order, so the decision pass below still sees the level in the
111
+ // order the walk defines rather than the order the network happened to answer in.
112
+ const listed = await pMap(batch, async (dir) => ({ dir, entries: await listDir(dir.path) }), {
113
+ concurrency: FOLDER_SCAN_CONCURRENCY,
114
+ });
115
+ const next = [];
116
+ for (const { dir, entries } of listed) {
117
+ const yielded = readDirectoryListing(dir, entries, recursive);
118
+ if (yielded.manifestPath)
119
+ manifestPath = yielded.manifestPath;
120
+ if (yielded.depthCapped)
121
+ truncated = true;
122
+ for (const file of yielded.files) {
123
+ if (paths.length >= MAX_FOLDER_CONTRACT_FILES) {
124
+ truncated = true;
125
+ break;
126
+ }
127
+ paths.push(file);
128
+ }
129
+ next.push(...yielded.children);
130
+ }
131
+ frontier = next;
132
+ }
133
+ // Anything left queued when the file cap ended the walk is unvisited, so the result is a
134
+ // prefix — say so rather than letting a full-looking list stand for a partial folder.
135
+ if (frontier.length > 0 && paths.length >= MAX_FOLDER_CONTRACT_FILES)
136
+ truncated = true;
137
+ return { paths, manifestPath, truncated };
138
+ }
139
+ //# sourceMappingURL=folder-scan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"folder-scan.js","sourceRoot":"","sources":["../../src/foundationalServices/folder-scan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAC7D,OAAO,IAAI,MAAM,OAAO,CAAA;AACxB,OAAO,EAAE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AA;QAChC,CAAC;QACD,QAAQ,GAAG,IAAI,CAAA;IACjB,CAAC;IACD,yFAAyF;IACzF,sFAAsF;IACtF,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,IAAI,yBAAyB;QAAE,SAAS,GAAG,IAAI,CAAA;IAEtF,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,CAAA;AAC3C,CAAC"}
@@ -1,12 +1,25 @@
1
1
  /** The manifest file naming a service inside a `directory`-mode source. */
2
2
  export declare const SERVICE_MANIFEST_FILE = "service.md";
3
- /** The parsed identity half of a `service.md`. */
4
- export interface ParsedServiceManifest {
5
- name: string;
3
+ /** The DESCRIPTIVE half of a `service.md` — everything that is not the service's identity. */
4
+ export interface ParsedServiceOverview {
6
5
  summary: string;
7
6
  capabilities: string[];
8
7
  description: string;
9
8
  }
9
+ /** The parsed identity half of a `service.md`, with its overview. */
10
+ export interface ParsedServiceManifest extends ParsedServiceOverview {
11
+ name: string;
12
+ }
13
+ /**
14
+ * Parse the descriptive half of a `service.md` — no `name` required.
15
+ *
16
+ * This is what a `folder` source reads from an OPTIONAL `service.md` at the folder root: the
17
+ * link already names the service (there is no directory convention to take a name from), so a
18
+ * manifest there can only enrich, never identify. Requiring a name to read the description
19
+ * would silently drop the prose of a manifest whose frontmatter omits one, leaving the
20
+ * Architect's catalog with a service that has contracts and nothing saying what it is for.
21
+ */
22
+ export declare function parseServiceOverview(content: string): ParsedServiceOverview;
10
23
  /**
11
24
  * Parse a `service.md`. Returns null when it carries no `name` — an unnamed manifest
12
25
  * cannot be presented to a design agent as a service to consume, and inventing a name
@@ -29,6 +42,21 @@ export declare function slugFromDirName(name: string): string;
29
42
  * (so a renamed file replaces rather than duplicates, because the whole set is replaced).
30
43
  */
31
44
  export declare function contractIdFromPath(path: string): string;
45
+ /**
46
+ * The contract id a file yields inside a `folder` source: its path RELATIVE to the scanned
47
+ * folder, minus the extension, lower-kebabed — so `v1/users.yaml` under `specs/` becomes
48
+ * `v1-users`.
49
+ *
50
+ * A recursive scan is exactly where {@link contractIdFromPath}'s basename rule breaks down:
51
+ * `v1/users.yaml` and `v2/users.yaml` are the two most ordinary files a versioned spec folder
52
+ * holds, and collapsing both to `users` would silently keep one and drop the other — handing a
53
+ * coder v1's endpoints as though they were the whole interface. Relative paths collide only
54
+ * when the files genuinely are the same file.
55
+ *
56
+ * For a file sitting directly in the folder root this degrades to exactly the basename rule, so
57
+ * a non-recursive `folder` source and a `files` source produce identical ids.
58
+ */
59
+ export declare function contractIdFromRelativePath(path: string, root: string): string;
32
60
  /**
33
61
  * A human title for a contract file, derived from its path. Used only when the document
34
62
  * itself offers none (the TypeScript formats never do; an OpenAPI document's `info.title` is
@@ -1 +1 @@
1
- {"version":3,"file":"foundational-source.logic.d.ts","sourceRoot":"","sources":["../../src/foundationalServices/foundational-source.logic.ts"],"names":[],"mappings":"AAcA,2EAA2E;AAC3E,eAAO,MAAM,qBAAqB,eAAe,CAAA;AAEjD,kDAAkD;AAClD,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,qBAAqB,GAAG,IAAI,CAWlF;AAiBD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQpD;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGvD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAWvD;AAED,uFAAuF;AACvF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtD"}
1
+ {"version":3,"file":"foundational-source.logic.d.ts","sourceRoot":"","sources":["../../src/foundationalServices/foundational-source.logic.ts"],"names":[],"mappings":"AAcA,2EAA2E;AAC3E,eAAO,MAAM,qBAAqB,eAAe,CAAA;AAEjD,8FAA8F;AAC9F,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,qEAAqE;AACrE,MAAM,WAAW,qBAAsB,SAAQ,qBAAqB;IAClE,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,qBAAqB,CAQ3E;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,qBAAqB,GAAG,IAAI,CAMlF;AAiBD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQpD;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGvD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAM7E;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAWvD;AAED,uFAAuF;AACvF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtD"}
@@ -12,6 +12,24 @@ import { parseSimpleYaml, splitFrontmatter } from '../repoSourceSync/frontmatter
12
12
  // ---------------------------------------------------------------------------
13
13
  /** The manifest file naming a service inside a `directory`-mode source. */
14
14
  export const SERVICE_MANIFEST_FILE = 'service.md';
15
+ /**
16
+ * Parse the descriptive half of a `service.md` — no `name` required.
17
+ *
18
+ * This is what a `folder` source reads from an OPTIONAL `service.md` at the folder root: the
19
+ * link already names the service (there is no directory convention to take a name from), so a
20
+ * manifest there can only enrich, never identify. Requiring a name to read the description
21
+ * would silently drop the prose of a manifest whose frontmatter omits one, leaving the
22
+ * Architect's catalog with a service that has contracts and nothing saying what it is for.
23
+ */
24
+ export function parseServiceOverview(content) {
25
+ const { frontmatter, body } = splitFrontmatter(content);
26
+ const meta = parseSimpleYaml(frontmatter);
27
+ return {
28
+ summary: str(meta.summary) || str(meta.description),
29
+ capabilities: strList(meta.capabilities),
30
+ description: body.trim(),
31
+ };
32
+ }
15
33
  /**
16
34
  * Parse a `service.md`. Returns null when it carries no `name` — an unnamed manifest
17
35
  * cannot be presented to a design agent as a service to consume, and inventing a name
@@ -22,17 +40,12 @@ export const SERVICE_MANIFEST_FILE = 'service.md';
22
40
  * rather than two rows silently claiming the same id from different folders.
23
41
  */
24
42
  export function parseServiceManifest(content) {
25
- const { frontmatter, body } = splitFrontmatter(content);
26
- const meta = parseSimpleYaml(frontmatter);
27
- const name = str(meta.name);
43
+ const { frontmatter } = splitFrontmatter(content);
44
+ const name = str(parseSimpleYaml(frontmatter).name);
28
45
  if (!name)
29
46
  return null;
30
- return {
31
- name,
32
- summary: str(meta.summary) || str(meta.description) || name,
33
- capabilities: strList(meta.capabilities),
34
- description: body.trim(),
35
- };
47
+ const overview = parseServiceOverview(content);
48
+ return { ...overview, name, summary: overview.summary || name };
36
49
  }
37
50
  function str(value) {
38
51
  return typeof value === 'string' ? value.trim() : '';
@@ -69,6 +82,27 @@ export function contractIdFromPath(path) {
69
82
  const base = path.split('/').pop() ?? path;
70
83
  return slugFromDirName(base.replace(/\.[^.]+$/, ''));
71
84
  }
85
+ /**
86
+ * The contract id a file yields inside a `folder` source: its path RELATIVE to the scanned
87
+ * folder, minus the extension, lower-kebabed — so `v1/users.yaml` under `specs/` becomes
88
+ * `v1-users`.
89
+ *
90
+ * A recursive scan is exactly where {@link contractIdFromPath}'s basename rule breaks down:
91
+ * `v1/users.yaml` and `v2/users.yaml` are the two most ordinary files a versioned spec folder
92
+ * holds, and collapsing both to `users` would silently keep one and drop the other — handing a
93
+ * coder v1's endpoints as though they were the whole interface. Relative paths collide only
94
+ * when the files genuinely are the same file.
95
+ *
96
+ * For a file sitting directly in the folder root this degrades to exactly the basename rule, so
97
+ * a non-recursive `folder` source and a `files` source produce identical ids.
98
+ */
99
+ export function contractIdFromRelativePath(path, root) {
100
+ const prefix = root ? `${root}/` : '';
101
+ const relative = path.startsWith(prefix)
102
+ ? path.slice(prefix.length)
103
+ : (path.split('/').pop() ?? path);
104
+ return slugFromDirName(relative.replace(/\.[^.]+$/, ''));
105
+ }
72
106
  /**
73
107
  * A human title for a contract file, derived from its path. Used only when the document
74
108
  * itself offers none (the TypeScript formats never do; an OpenAPI document's `info.title` is
@@ -1 +1 @@
1
- {"version":3,"file":"foundational-source.logic.js","sourceRoot":"","sources":["../../src/foundationalServices/foundational-source.logic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AAEpF,8EAA8E;AAC9E,4DAA4D;AAC5D,sFAAsF;AACtF,yEAAyE;AACzE,iFAAiF;AACjF,kFAAkF;AAClF,kFAAkF;AAClF,qDAAqD;AACrD,EAAE;AACF,8EAA8E;AAC9E,8EAA8E;AAE9E,2EAA2E;AAC3E,MAAM,CAAC,MAAM,qBAAqB,GAAG,YAAY,CAAA;AAUjD;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAe;IAClD,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAA;IACvD,MAAM,IAAI,GAAG,eAAe,CAAC,WAAW,CAA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AAU,iBAAiB,CAAC,IAAY;IAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAA;AAC5D,CAAC"}
1
+ {"version":3,"file":"foundational-source.logic.js","sourceRoot":"","sources":["../../src/foundationalServices/foundational-source.logic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AAEpF,8EAA8E;AAC9E,4DAA4D;AAC5D,sFAAsF;AACtF,yEAAyE;AACzE,iFAAiF;AACjF,kFAAkF;AAClF,kFAAkF;AAClF,qDAAqD;AACrD,EAAE;AACF,8EAA8E;AAC9E,8EAA8E;AAE9E,2EAA2E;AAC3E,MAAM,CAAC,MAAM,qBAAqB,GAAG,YAAY,CAAA;AAcjD;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAe;IAClD,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAA;IACvD,MAAM,IAAI,GAAG,eAAe,CAAC,WAAW,CAAC,CAAA;IACzC,OAAO;QACL,OAAO,EAAE,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC;QACnD,YAAY,EAAE,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC;QACxC,WAAW,EAAE,IAAI,CAAC,IAAI,EAAE;KACzB,CAAA;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAe;IAClD,MAAM,EAAE,WAAW,EAAE,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAA;IACjD,MAAM,IAAI,GAAG,GAAG,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAA;IACnD,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAA;IACtB,MAAM,QAAQ,GAAG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;QACxB,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC;YAAE,MAAM,CAAC,IAAI,CAAC,OAAiB,CAAC,CAAA;;YAC/E,MAAK;IACZ,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACzB,CAAC;AAED,uFAAuF;AACvF,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAA;AAC5D,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/agents",
3
- "version": "0.99.0",
3
+ "version": "0.100.0",
4
4
  "description": "Agent catalog, routing, prompts and fragment library for the Agent Architecture Board.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -32,14 +32,14 @@
32
32
  "handlebars": "^4.7.9",
33
33
  "p-map": "^7.0.6",
34
34
  "valibot": "^1.4.2",
35
- "@cat-factory/contracts": "0.207.0",
36
- "@cat-factory/kernel": "0.207.0",
37
- "@cat-factory/prompt-fragments": "0.15.31"
35
+ "@cat-factory/contracts": "0.208.0",
36
+ "@cat-factory/kernel": "0.208.0",
37
+ "@cat-factory/prompt-fragments": "0.15.32"
38
38
  },
39
39
  "devDependencies": {
40
40
  "typescript": "7.0.2",
41
41
  "vitest": "^4.1.10",
42
- "@cat-factory/caching": "0.12.4"
42
+ "@cat-factory/caching": "0.12.5"
43
43
  },
44
44
  "scripts": {
45
45
  "build": "tsc -b tsconfig.build.json",