@cat-factory/agents 0.26.18 → 0.27.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.
- package/dist/fragmentLibrary/FragmentSourceService.d.ts +16 -11
- package/dist/fragmentLibrary/FragmentSourceService.d.ts.map +1 -1
- package/dist/fragmentLibrary/FragmentSourceService.js +38 -48
- package/dist/fragmentLibrary/FragmentSourceService.js.map +1 -1
- package/dist/fragmentLibrary/fragment-source.logic.d.ts +0 -9
- package/dist/fragmentLibrary/fragment-source.logic.d.ts.map +1 -1
- package/dist/fragmentLibrary/fragment-source.logic.js +3 -20
- package/dist/fragmentLibrary/fragment-source.logic.js.map +1 -1
- package/package.json +4 -4
|
@@ -24,6 +24,11 @@ export interface FragmentSourceServiceDependencies {
|
|
|
24
24
|
* go through the account's existing GitHub installation — no new credential store.
|
|
25
25
|
* Sync runs inline (bounded directory); the sha-keyed upsert is idempotent so it
|
|
26
26
|
* can later move behind a Workflow safely.
|
|
27
|
+
*
|
|
28
|
+
* The full fragment bodies are cached on our side (in `prompt_fragments`), so the
|
|
29
|
+
* run path never re-fetches. Staleness is therefore a **single lightweight commit
|
|
30
|
+
* probe**: sync pins the source dir's head commit sha, and {@link status} compares
|
|
31
|
+
* that stored commit against the current head — no directory listing, no body reads.
|
|
27
32
|
*/
|
|
28
33
|
export declare class FragmentSourceService {
|
|
29
34
|
private readonly deps;
|
|
@@ -37,25 +42,25 @@ export declare class FragmentSourceService {
|
|
|
37
42
|
/**
|
|
38
43
|
* Resync a source: list the directory, upsert every Markdown file whose blob
|
|
39
44
|
* sha changed, tombstone fragments no longer produced by any current file, and
|
|
40
|
-
* stamp the
|
|
41
|
-
* touches nothing.
|
|
45
|
+
* stamp the source dir's head commit sha. Idempotent — re-running with no upstream
|
|
46
|
+
* change touches nothing.
|
|
42
47
|
*/
|
|
43
48
|
sync(ownerKind: FragmentOwnerKind, ownerId: string, sourceId: string): Promise<FragmentSyncResult>;
|
|
44
49
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* it). It cannot see an in-place explicit-`id` edit (that needs parsing), so for that
|
|
51
|
-
* rare case the count can still trail sync by one; `changed` (the digest comparison) is
|
|
52
|
-
* always exact.
|
|
50
|
+
* Lightweight "check for changes": read only the source dir's current head commit sha
|
|
51
|
+
* and compare it to the one stored at the last sync. One cheap commit lookup — no
|
|
52
|
+
* directory listing, no file bodies (those are already cached on our side). `changed`
|
|
53
|
+
* is exact at commit granularity: any commit touching the dir (edit, add, remove,
|
|
54
|
+
* rename) advances the head sha.
|
|
53
55
|
*/
|
|
54
56
|
status(ownerKind: FragmentOwnerKind, ownerId: string, sourceId: string): Promise<FragmentSourceStatus>;
|
|
55
57
|
private require;
|
|
56
58
|
/** Resolve the GitHub installation that reads this source's tier, or throw cleanly. */
|
|
57
59
|
private requireInstallation;
|
|
58
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* List the source directory and keep only Markdown files (with their shas). Reads at
|
|
62
|
+
* `readRef` — the sync's pinned head commit sha (falls back to the source's `gitRef`).
|
|
63
|
+
*/
|
|
59
64
|
private readMarkdown;
|
|
60
65
|
/**
|
|
61
66
|
* Read, parse and upsert one file as a fragment owned by the source's tier.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FragmentSourceService.d.ts","sourceRoot":"","sources":["../../src/fragmentLibrary/FragmentSourceService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,EACxB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,qBAAqB,CAAA;AACzE,OAAO,KAAK,EAEV,wBAAwB,EAExB,wBAAwB,EACzB,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"FragmentSourceService.d.ts","sourceRoot":"","sources":["../../src/fragmentLibrary/FragmentSourceService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,EACxB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAoB,MAAM,qBAAqB,CAAA;AACzE,OAAO,KAAK,EAEV,wBAAwB,EAExB,wBAAwB,EACzB,MAAM,qBAAqB,CAAA;AAG5B;;;;;GAKG;AACH,MAAM,MAAM,6BAA6B,GAAG,CAC1C,SAAS,EAAE,iBAAiB,EAC5B,OAAO,EAAE,MAAM,KACZ,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;AAE3B,MAAM,WAAW,iCAAiC;IAChD,wBAAwB,EAAE,wBAAwB,CAAA;IAClD,wBAAwB,EAAE,wBAAwB,CAAA;IAClD,YAAY,EAAE,YAAY,CAAA;IAC1B,qBAAqB,EAAE,6BAA6B,CAAA;IACpD,WAAW,EAAE,WAAW,CAAA;IACxB,KAAK,EAAE,KAAK,CAAA;CACb;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,qBAAqB;IACpB,OAAO,CAAC,QAAQ,CAAC,IAAI;IAAjC,YAA6B,IAAI,EAAE,iCAAiC,EAAI;IAExE,2DAA2D;IACrD,IAAI,CAAC,SAAS,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAGnF;IAED,qFAAqF;IAC/E,IAAI,CACR,SAAS,EAAE,iBAAiB,EAC5B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,uBAAuB,GAC7B,OAAO,CAAC,cAAc,CAAC,CAiBzB;IAED,gEAAgE;IAC1D,MAAM,CAAC,SAAS,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAQ3F;IAED;;;;;OAKG;IACG,IAAI,CACR,SAAS,EAAE,iBAAiB,EAC5B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,kBAAkB,CAAC,CA4E7B;IAED;;;;;;OAMG;IACG,MAAM,CACV,SAAS,EAAE,iBAAiB,EAC5B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,oBAAoB,CAAC,CAc/B;YAIa,OAAO;IAmBrB,uFAAuF;YACzE,mBAAmB;IAUjC;;;OAGG;YACW,YAAY;IAc1B;;;;OAIG;YACW,SAAS;CAmDxB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NotFoundError, ValidationError, assertFound } from '@cat-factory/kernel';
|
|
2
|
-
import {
|
|
2
|
+
import { isMarkdownFile, parseFragmentMarkdown, slugFromPath } from './fragment-source.logic.js';
|
|
3
3
|
/**
|
|
4
4
|
* Repo-sourced fragments (ADR 0006 §3, §6): link a repo directory of Markdown
|
|
5
5
|
* guidelines to a tier, resync it (read the tree, upsert changed files, tombstone
|
|
@@ -7,6 +7,11 @@ import { digestListing, isMarkdownFile, parseFragmentMarkdown, slugFromPath, } f
|
|
|
7
7
|
* go through the account's existing GitHub installation — no new credential store.
|
|
8
8
|
* Sync runs inline (bounded directory); the sha-keyed upsert is idempotent so it
|
|
9
9
|
* can later move behind a Workflow safely.
|
|
10
|
+
*
|
|
11
|
+
* The full fragment bodies are cached on our side (in `prompt_fragments`), so the
|
|
12
|
+
* run path never re-fetches. Staleness is therefore a **single lightweight commit
|
|
13
|
+
* probe**: sync pins the source dir's head commit sha, and {@link status} compares
|
|
14
|
+
* that stored commit against the current head — no directory listing, no body reads.
|
|
10
15
|
*/
|
|
11
16
|
export class FragmentSourceService {
|
|
12
17
|
deps;
|
|
@@ -29,7 +34,7 @@ export class FragmentSourceService {
|
|
|
29
34
|
repoName: input.repoName.trim(),
|
|
30
35
|
gitRef: input.gitRef?.trim() || 'HEAD',
|
|
31
36
|
dirPath: normalizeDir(input.dirPath),
|
|
32
|
-
|
|
37
|
+
lastSyncedCommit: null,
|
|
33
38
|
lastSyncedAt: null,
|
|
34
39
|
createdAt: now,
|
|
35
40
|
deletedAt: null,
|
|
@@ -50,15 +55,21 @@ export class FragmentSourceService {
|
|
|
50
55
|
/**
|
|
51
56
|
* Resync a source: list the directory, upsert every Markdown file whose blob
|
|
52
57
|
* sha changed, tombstone fragments no longer produced by any current file, and
|
|
53
|
-
* stamp the
|
|
54
|
-
* touches nothing.
|
|
58
|
+
* stamp the source dir's head commit sha. Idempotent — re-running with no upstream
|
|
59
|
+
* change touches nothing.
|
|
55
60
|
*/
|
|
56
61
|
async sync(ownerKind, ownerId, sourceId) {
|
|
57
62
|
const source = await this.require(ownerKind, ownerId, sourceId);
|
|
58
63
|
// The installation is invariant across the whole sync — resolve it ONCE here,
|
|
59
64
|
// never per file (the per-entry reads below share it).
|
|
60
65
|
const installationId = await this.requireInstallation(source);
|
|
61
|
-
|
|
66
|
+
// Pin the dir's head commit BEFORE reading so we never record a newer commit than
|
|
67
|
+
// the content we actually pulled: if a commit lands mid-sync we read at (and stamp)
|
|
68
|
+
// the pinned sha, and the next status flags it as changed rather than silently
|
|
69
|
+
// treating stale content as current. Read the tree at that exact commit when known.
|
|
70
|
+
const headCommit = await this.deps.githubClient.latestCommitSha(installationId, { owner: source.repoOwner, repo: source.repoName }, source.dirPath, source.gitRef);
|
|
71
|
+
const readRef = headCommit ?? source.gitRef;
|
|
72
|
+
const entries = await this.readMarkdown(source, installationId, readRef);
|
|
62
73
|
const existing = await this.deps.promptFragmentRepository.listBySource(sourceId);
|
|
63
74
|
const existingByPath = new Map(existing.map((f) => [f.sourcePath ?? '', f]));
|
|
64
75
|
// Keyed by fragment id too, so `syncEntry` can inherit an existing fragment's
|
|
@@ -81,7 +92,7 @@ export class FragmentSourceService {
|
|
|
81
92
|
liveIds.add(prior.fragmentId);
|
|
82
93
|
continue;
|
|
83
94
|
}
|
|
84
|
-
const syncedId = await this.syncEntry(source, entry, existingById, now, installationId);
|
|
95
|
+
const syncedId = await this.syncEntry(source, entry, existingById, now, installationId, readRef);
|
|
85
96
|
if (syncedId) {
|
|
86
97
|
liveIds.add(syncedId);
|
|
87
98
|
upserted++;
|
|
@@ -101,48 +112,24 @@ export class FragmentSourceService {
|
|
|
101
112
|
tombstoned++;
|
|
102
113
|
}
|
|
103
114
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
return { upserted, tombstoned, unchanged, lastSyncedSha };
|
|
115
|
+
await this.deps.fragmentSourceRepository.updateSyncState(source.id, headCommit, now);
|
|
116
|
+
return { upserted, tombstoned, unchanged, lastSyncedCommit: headCommit };
|
|
107
117
|
}
|
|
108
118
|
/**
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
* it). It cannot see an in-place explicit-`id` edit (that needs parsing), so for that
|
|
115
|
-
* rare case the count can still trail sync by one; `changed` (the digest comparison) is
|
|
116
|
-
* always exact.
|
|
119
|
+
* Lightweight "check for changes": read only the source dir's current head commit sha
|
|
120
|
+
* and compare it to the one stored at the last sync. One cheap commit lookup — no
|
|
121
|
+
* directory listing, no file bodies (those are already cached on our side). `changed`
|
|
122
|
+
* is exact at commit granularity: any commit touching the dir (edit, add, remove,
|
|
123
|
+
* rename) advances the head sha.
|
|
117
124
|
*/
|
|
118
125
|
async status(ownerKind, ownerId, sourceId) {
|
|
119
126
|
const source = await this.require(ownerKind, ownerId, sourceId);
|
|
120
|
-
const
|
|
121
|
-
const
|
|
122
|
-
const existingByPath = new Map(existing.map((f) => [f.sourcePath ?? '', f]));
|
|
123
|
-
// A blob sha still present in the current tree is a move/rename, not a deletion.
|
|
124
|
-
const currentShas = new Set(entries.map((e) => e.sha));
|
|
125
|
-
let changedCount = 0;
|
|
126
|
-
const seen = new Set();
|
|
127
|
-
for (const entry of entries) {
|
|
128
|
-
seen.add(entry.path);
|
|
129
|
-
const prior = existingByPath.get(entry.path);
|
|
130
|
-
if (!prior || prior.sourceSha !== entry.sha)
|
|
131
|
-
changedCount++;
|
|
132
|
-
}
|
|
133
|
-
for (const f of existing) {
|
|
134
|
-
// A removed path whose blob sha reappears elsewhere in the tree is a rename (already
|
|
135
|
-
// counted as the new path above), so don't also count it as a deletion.
|
|
136
|
-
const movedNotDeleted = f.sourceSha !== null && currentShas.has(f.sourceSha);
|
|
137
|
-
if (f.sourcePath && !seen.has(f.sourcePath) && !movedNotDeleted)
|
|
138
|
-
changedCount++;
|
|
139
|
-
}
|
|
140
|
-
const remoteSha = digestListing(entries.map((e) => ({ path: e.path, sha: e.sha })));
|
|
127
|
+
const installationId = await this.requireInstallation(source);
|
|
128
|
+
const remoteCommit = await this.deps.githubClient.latestCommitSha(installationId, { owner: source.repoOwner, repo: source.repoName }, source.dirPath, source.gitRef);
|
|
141
129
|
return {
|
|
142
|
-
changed:
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
remoteSha,
|
|
130
|
+
changed: remoteCommit !== source.lastSyncedCommit,
|
|
131
|
+
lastSyncedCommit: source.lastSyncedCommit,
|
|
132
|
+
remoteCommit,
|
|
146
133
|
};
|
|
147
134
|
}
|
|
148
135
|
// --- internals ----------------------------------------------------------
|
|
@@ -165,9 +152,12 @@ export class FragmentSourceService {
|
|
|
165
152
|
}
|
|
166
153
|
return installationId;
|
|
167
154
|
}
|
|
168
|
-
/**
|
|
169
|
-
|
|
170
|
-
|
|
155
|
+
/**
|
|
156
|
+
* List the source directory and keep only Markdown files (with their shas). Reads at
|
|
157
|
+
* `readRef` — the sync's pinned head commit sha (falls back to the source's `gitRef`).
|
|
158
|
+
*/
|
|
159
|
+
async readMarkdown(source, installationId, readRef) {
|
|
160
|
+
const entries = await this.deps.githubClient.listDirectory(installationId, { owner: source.repoOwner, repo: source.repoName }, source.dirPath, readRef);
|
|
171
161
|
return entries.filter((e) => e.type === 'file' && isMarkdownFile(e.name));
|
|
172
162
|
}
|
|
173
163
|
/**
|
|
@@ -175,8 +165,8 @@ export class FragmentSourceService {
|
|
|
175
165
|
* Returns the fragment id it produced, or null when the file was unreadable /
|
|
176
166
|
* unparseable (nothing written).
|
|
177
167
|
*/
|
|
178
|
-
async syncEntry(source, entry, existingById, now, installationId) {
|
|
179
|
-
const file = await this.deps.githubClient.getFileContent(installationId, { owner: source.repoOwner, repo: source.repoName }, entry.path,
|
|
168
|
+
async syncEntry(source, entry, existingById, now, installationId, readRef) {
|
|
169
|
+
const file = await this.deps.githubClient.getFileContent(installationId, { owner: source.repoOwner, repo: source.repoName }, entry.path, readRef);
|
|
180
170
|
if (!file)
|
|
181
171
|
return null;
|
|
182
172
|
const parsed = parseFragmentMarkdown(entry.path, file.content);
|
|
@@ -228,7 +218,7 @@ function toWire(record) {
|
|
|
228
218
|
repoName: record.repoName,
|
|
229
219
|
gitRef: record.gitRef,
|
|
230
220
|
dirPath: record.dirPath,
|
|
231
|
-
|
|
221
|
+
lastSyncedCommit: record.lastSyncedCommit,
|
|
232
222
|
lastSyncedAt: record.lastSyncedAt,
|
|
233
223
|
createdAt: record.createdAt,
|
|
234
224
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FragmentSourceService.js","sourceRoot":"","sources":["../../src/fragmentLibrary/FragmentSourceService.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AASjF,OAAO,
|
|
1
|
+
{"version":3,"file":"FragmentSourceService.js","sourceRoot":"","sources":["../../src/fragmentLibrary/FragmentSourceService.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AASjF,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,YAAY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C,SAAS;QAC3B,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;QACzC,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,SAAS,EAAE,MAAM,CAAC,SAAS;KAC5B,CAAA;AACH,CAAC"}
|
|
@@ -14,15 +14,6 @@ export interface ParsedFragmentFile {
|
|
|
14
14
|
export declare function slugFromPath(path: string): string;
|
|
15
15
|
/** Whether a listing entry is a Markdown file we should parse. */
|
|
16
16
|
export declare function isMarkdownFile(name: string): boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Stable digest of a source's file listing — sorted `path:sha` pairs hashed with
|
|
19
|
-
* FNV-1a. Stored as the source's `lastSyncedSha`; comparing it against a fresh
|
|
20
|
-
* listing is the cheap change check the resync badge uses, no per-file reads.
|
|
21
|
-
*/
|
|
22
|
-
export declare function digestListing(entries: {
|
|
23
|
-
path: string;
|
|
24
|
-
sha: string;
|
|
25
|
-
}[]): string;
|
|
26
17
|
/**
|
|
27
18
|
* Parse a Markdown guideline file. Frontmatter is the leading `--- … ---` block
|
|
28
19
|
* (a small YAML subset: `key: value`, inline `[a, b]` arrays, and nested
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fragment-source.logic.d.ts","sourceRoot":"","sources":["../../src/fragmentLibrary/fragment-source.logic.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"fragment-source.logic.d.ts","sourceRoot":"","sources":["../../src/fragmentLibrary/fragment-source.logic.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAmB5D,mEAAmE;AACnE,MAAM,WAAW,kBAAkB;IACjC,kFAAkF;IAClF,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,SAAS,CAAC,EAAE,iBAAiB,CAAA;CAC9B;AAED,qGAAqG;AACrG,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQjD;AAED,kEAAkE;AAClE,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI,CAwB9F"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// Pure logic for repo-sourced fragments (ADR 0006 §4): parse one Markdown file
|
|
2
2
|
// with YAML frontmatter into a fragment, plus the small helpers the sync flow
|
|
3
|
-
// needs (slugging an id from a path,
|
|
4
|
-
//
|
|
3
|
+
// needs (slugging an id from a path, recognising Markdown files). No I/O lives here
|
|
4
|
+
// so it is unit-testable. Staleness is a commit-sha probe (see FragmentSourceService),
|
|
5
|
+
// so no directory-digest helper lives here any more.
|
|
5
6
|
const BLOCK_TYPES = [
|
|
6
7
|
'frontend',
|
|
7
8
|
'service',
|
|
@@ -24,24 +25,6 @@ export function slugFromPath(path) {
|
|
|
24
25
|
export function isMarkdownFile(name) {
|
|
25
26
|
return /\.md$/i.test(name);
|
|
26
27
|
}
|
|
27
|
-
/**
|
|
28
|
-
* Stable digest of a source's file listing — sorted `path:sha` pairs hashed with
|
|
29
|
-
* FNV-1a. Stored as the source's `lastSyncedSha`; comparing it against a fresh
|
|
30
|
-
* listing is the cheap change check the resync badge uses, no per-file reads.
|
|
31
|
-
*/
|
|
32
|
-
export function digestListing(entries) {
|
|
33
|
-
const joined = entries
|
|
34
|
-
.map((e) => `${e.path}:${e.sha}`)
|
|
35
|
-
.sort()
|
|
36
|
-
.join('\n');
|
|
37
|
-
// FNV-1a (32-bit), hex. Sufficient for change detection (not cryptographic).
|
|
38
|
-
let hash = 0x811c9dc5;
|
|
39
|
-
for (let i = 0; i < joined.length; i++) {
|
|
40
|
-
hash ^= joined.charCodeAt(i);
|
|
41
|
-
hash = Math.imul(hash, 0x01000193);
|
|
42
|
-
}
|
|
43
|
-
return (hash >>> 0).toString(16).padStart(8, '0');
|
|
44
|
-
}
|
|
45
28
|
/**
|
|
46
29
|
* Parse a Markdown guideline file. Frontmatter is the leading `--- … ---` block
|
|
47
30
|
* (a small YAML subset: `key: value`, inline `[a, b]` arrays, and nested
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fragment-source.logic.js","sourceRoot":"","sources":["../../src/fragmentLibrary/fragment-source.logic.ts"],"names":[],"mappings":"AAGA,+EAA+E;AAC/E,8EAA8E;AAC9E,
|
|
1
|
+
{"version":3,"file":"fragment-source.logic.js","sourceRoot":"","sources":["../../src/fragmentLibrary/fragment-source.logic.ts"],"names":[],"mappings":"AAGA,+EAA+E;AAC/E,8EAA8E;AAC9E,oFAAoF;AACpF,uFAAuF;AACvF,qDAAqD;AAErD,MAAM,WAAW,GAAsB;IACrC,UAAU;IACV,SAAS;IACT,KAAK;IACL,UAAU;IACV,OAAO;IACP,aAAa;IACb,UAAU;IACV,aAAa;CACd,CAAA;AAcD,qGAAqG;AACrG,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,OAAO,CACL,IAAI;SACD,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;SACrB,WAAW,EAAE;SACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,IAAI,UAAU,CACzC,CAAA;AACH,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CA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AAC,CAAC,CAAC,SAAS,CAAA;AAC3D,CAAC;AAED,SAAS,SAAS,CAAC,IAAY;IAC7B,MAAM,IAAI,GAAG,IAAI;SACd,KAAK,CAAC,OAAO,CAAC;SACd,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;SAC/C,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;IAC5B,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;AAC9C,CAAC;AAED,SAAS,QAAQ,CAAC,IAAY;IAC5B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,IAAI,CAAA;IAC1C,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAA;IACrE,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAA;AACzE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cat-factory/agents",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"description": "Agent catalog, routing, prompts and fragment library for the Agent Architecture Board.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"ai": "^6.0.214",
|
|
32
32
|
"handlebars": "^4.7.9",
|
|
33
33
|
"valibot": "^1.4.2",
|
|
34
|
-
"@cat-factory/contracts": "0.
|
|
35
|
-
"@cat-factory/kernel": "0.
|
|
36
|
-
"@cat-factory/prompt-fragments": "0.9.
|
|
34
|
+
"@cat-factory/contracts": "0.86.0",
|
|
35
|
+
"@cat-factory/kernel": "0.74.0",
|
|
36
|
+
"@cat-factory/prompt-fragments": "0.9.46"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"typescript": "7.0.1-rc",
|