@cat-factory/integrations 0.138.2 → 0.140.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/modules/audit/AuditService.d.ts +2 -2
- package/dist/modules/audit/AuditService.d.ts.map +1 -1
- package/dist/modules/audit/AuditService.js.map +1 -1
- package/dist/modules/documents/DocumentImportService.d.ts.map +1 -1
- package/dist/modules/documents/DocumentImportService.js +17 -18
- package/dist/modules/documents/DocumentImportService.js.map +1 -1
- package/dist/modules/documents/DocumentLinkService.d.ts +3 -3
- package/dist/modules/documents/DocumentLinkService.d.ts.map +1 -1
- package/dist/modules/documents/DocumentLinkService.js +1 -1
- package/dist/modules/documents/DocumentLinkService.js.map +1 -1
- package/dist/modules/documents/LinkedDocumentRefreshService.d.ts +45 -7
- package/dist/modules/documents/LinkedDocumentRefreshService.d.ts.map +1 -1
- package/dist/modules/documents/LinkedDocumentRefreshService.js +116 -38
- package/dist/modules/documents/LinkedDocumentRefreshService.js.map +1 -1
- package/dist/modules/documents/documents.logic.d.ts +22 -0
- package/dist/modules/documents/documents.logic.d.ts.map +1 -1
- package/dist/modules/documents/documents.logic.js +18 -0
- package/dist/modules/documents/documents.logic.js.map +1 -1
- package/dist/modules/tasks/BugHuntService.d.ts +2 -2
- package/dist/modules/tasks/BugHuntService.d.ts.map +1 -1
- package/dist/modules/tasks/TaskLinkService.d.ts +4 -4
- package/dist/modules/tasks/TaskLinkService.d.ts.map +1 -1
- package/dist/modules/tasks/TaskLinkService.js +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AuditEvent, AuditEventPage, AuditEventRepository, AuditRecorder, Clock, IdGenerator, Logger } from '@cat-factory/kernel';
|
|
1
|
+
import type { AuditEvent, AuditEventPage, AuditEventRepository, AuditLogReader, AuditRecorder, Clock, IdGenerator, Logger } from '@cat-factory/kernel';
|
|
2
2
|
export interface AuditServiceDependencies {
|
|
3
3
|
auditEventRepository: AuditEventRepository;
|
|
4
4
|
idGenerator: IdGenerator;
|
|
@@ -9,7 +9,7 @@ export interface AuditServiceDependencies {
|
|
|
9
9
|
*/
|
|
10
10
|
logger?: Logger;
|
|
11
11
|
}
|
|
12
|
-
export declare class AuditService implements AuditRecorder {
|
|
12
|
+
export declare class AuditService implements AuditRecorder, AuditLogReader {
|
|
13
13
|
private readonly deps;
|
|
14
14
|
private readonly log;
|
|
15
15
|
constructor(deps: AuditServiceDependencies);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuditService.d.ts","sourceRoot":"","sources":["../../../src/modules/audit/AuditService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,KAAK,EACL,WAAW,EACX,MAAM,EACP,MAAM,qBAAqB,CAAA;AAwB5B,MAAM,WAAW,wBAAwB;IACvC,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,WAAW,EAAE,WAAW,CAAA;IACxB,KAAK,EAAE,KAAK,CAAA;IACZ;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,qBAAa,YAAa,YAAW,aAAa;
|
|
1
|
+
{"version":3,"file":"AuditService.d.ts","sourceRoot":"","sources":["../../../src/modules/audit/AuditService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,cAAc,EACd,aAAa,EACb,KAAK,EACL,WAAW,EACX,MAAM,EACP,MAAM,qBAAqB,CAAA;AAwB5B,MAAM,WAAW,wBAAwB;IACvC,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,WAAW,EAAE,WAAW,CAAA;IACxB,KAAK,EAAE,KAAK,CAAA;IACZ;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,qBAAa,YAAa,YAAW,aAAa,EAAE,cAAc;IAGpD,OAAO,CAAC,QAAQ,CAAC,IAAI;IAFjC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAQ;IAE5B,YAA6B,IAAI,EAAE,wBAAwB,EAE1D;IAED;;;;;;OAMG;IACG,MAAM,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB7C;IAED;;;;;;OAMG;IACH,aAAa,CACX,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GACnD,OAAO,CAAC,cAAc,CAAC,CAEzB;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuditService.js","sourceRoot":"","sources":["../../../src/modules/audit/AuditService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AuditService.js","sourceRoot":"","sources":["../../../src/modules/audit/AuditService.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAkC/D,MAAM,OAAO,YAAY;IAGM,IAAI;IAFhB,GAAG,CAAQ;IAE5B,YAA6B,IAA8B;oBAA9B,IAAI;QAC/B,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,IAAI,UAAU,CAAA;IACtC,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,MAAM,CAAC,KAAiB;QAC5B,MAAM,MAAM,GAAG;YACb,GAAG,KAAK;YACR,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC;YACrC,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE;SAC1B,CAAA;QACD,MAAM,aAAa,CACjB,IAAI,CAAC,GAAG,EACR,cAAc,EACd,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,MAAM,CAAC,EACnD;YACE,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI;SAC5B,CACF,CAAA;IACH,CAAC;IAED;;;;;;OAMG;IACH,aAAa,CACX,SAAiB,EACjB,OAAoD;QAEpD,OAAO,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,aAAa,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;IACzE,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentImportService.d.ts","sourceRoot":"","sources":["../../../src/modules/documents/DocumentImportService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAC7D,OAAO,KAAK,EAA0B,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AACzF,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAA;AACzF,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAEnG,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,wBAAwB,CAAA;AAE/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA;AAU/E,MAAM,WAAW,iCAAiC;IAChD,QAAQ,EAAE,sBAAsB,CAAA;IAChC,kBAAkB,EAAE,kBAAkB,CAAA;IACtC,iBAAiB,EAAE,yBAAyB,CAAA;IAC5C,mBAAmB,EAAE,mBAAmB,CAAA;IACxC,KAAK,EAAE,KAAK,CAAA;IACZ,iGAAiG;IACjG,WAAW,EAAE,WAAW,CAAA;IACxB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,gBAAgB,CAAC,4BAA4B,CAAC,CAAA;CAC9D;AAED,iGAAiG;AACjG,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CASpE;AAED,qFAAqF;AACrF,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,CAYvE;AAED,qBAAa,qBAAqB;IACpB,OAAO,CAAC,QAAQ,CAAC,IAAI;IAAjC,YAA6B,IAAI,EAAE,iCAAiC,EAAI;IAExE,OAAO,CAAC,eAAe;IAMvB;;;;;;;;;;;;;;;;;OAiBG;IACH,UAAU,CAAC,MAAM,EAAE,kBAAkB,EAAE,GAAG,EAAE,MAAM,GAAG,mBAAmB,CAUvE;IAED,6FAA6F;IAC7F,OAAO,CAAC,aAAa;IAqBrB;;;;;;;OAOG;IACH,OAAO,CAAC,cAAc;IAKtB;;;;;;;;;;OAUG;IACG,MAAM,CACV,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,kBAAkB,EAC1B,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,cAAc,CAAC,CASzB;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACG,QAAQ,CACZ,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,kBAAkB,EAC1B,UAAU,EAAE,MAAM,EAClB,IAAI,GAAE;QAAE,eAAe,CAAC,EAAE,MAAM,CAAA;KAAO,GACtC,OAAO,CAAC,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"DocumentImportService.d.ts","sourceRoot":"","sources":["../../../src/modules/documents/DocumentImportService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAC7D,OAAO,KAAK,EAA0B,sBAAsB,EAAE,MAAM,qBAAqB,CAAA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,EAAE,MAAM,GAAG,mBAAmB,CAUvE;IAED,6FAA6F;IAC7F,OAAO,CAAC,aAAa;IAqBrB;;;;;;;OAOG;IACH,OAAO,CAAC,cAAc;IAKtB;;;;;;;;;;OAUG;IACG,MAAM,CACV,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,kBAAkB,EAC1B,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,cAAc,CAAC,CASzB;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACG,QAAQ,CACZ,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,kBAAkB,EAC1B,UAAU,EAAE,MAAM,EAClB,IAAI,GAAE;QAAE,eAAe,CAAC,EAAE,MAAM,CAAA;KAAO,GACtC,OAAO,CAAC,cAAc,CAAC,CAoDzB;IAED;;;;;;;;;;;;;;;;;OAiBG;IACG,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,cAAc,CAAC,CA0BlF;IAED;;;;;OAKG;IACG,MAAM,CACV,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,kBAAkB,EAC1B,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAQjC;IAED,kFAAkF;IAC5E,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAGlE;IAED,6EAA6E;IACvE,eAAe,CACnB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,kBAAkB,EAC1B,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,cAAc,CAAC,CAMzB;CACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { contentHash, redactSecrets, ValidationError } from '@cat-factory/kernel';
|
|
2
2
|
import { orderSourcesByClaimConfidence, } from '@cat-factory/contracts';
|
|
3
3
|
import { requireWorkspace } from '@cat-factory/kernel';
|
|
4
|
-
import { buildExcerpt, probeCacheKey } from './documents.logic.js';
|
|
4
|
+
import { buildExcerpt, probeCacheKey, sameAgentVisibleProjection } from './documents.logic.js';
|
|
5
5
|
/**
|
|
6
6
|
* The excerpt an uploaded body yields, or a refusal when it yields none.
|
|
7
7
|
*
|
|
@@ -157,24 +157,20 @@ export class DocumentImportService {
|
|
|
157
157
|
// Preserve any existing block link across a re-import.
|
|
158
158
|
const existing = await this.deps.documentRepository.get(workspaceId, source, content.externalId);
|
|
159
159
|
const hash = contentHash(content.body);
|
|
160
|
-
// Idempotent re-import: skip the write
|
|
161
|
-
//
|
|
162
|
-
//
|
|
163
|
-
//
|
|
164
|
-
|
|
165
|
-
// `sourceVersion` is part of that comparison even though no agent reads it, because it is what
|
|
166
|
-
// the refresh COMPARES: a page whose version bumped without changing a byte of its Markdown (a
|
|
167
|
-
// Figma file version moves on any edit in the file, including a frame this document doesn't
|
|
168
|
-
// cover) would otherwise keep the old token on the row and be re-fetched on every single
|
|
169
|
-
// dispatch forever, which is the cost the version probe exists to avoid.
|
|
170
|
-
if (existing &&
|
|
160
|
+
// Idempotent re-import: skip the write entirely when NOTHING that reaches an agent has changed
|
|
161
|
+
// (`sameAgentVisibleProjection` owns what that means) AND the version token the refresh compares
|
|
162
|
+
// against is the one already on the row. A renamed/moved page whose body is unchanged still
|
|
163
|
+
// re-projects, so the stale title/url don't linger.
|
|
164
|
+
const unchangedForReaders = !!existing &&
|
|
171
165
|
existing.deletedAt === null &&
|
|
172
|
-
existing
|
|
173
|
-
|
|
174
|
-
existing.url === content.url &&
|
|
175
|
-
existing.sourceVersion === version) {
|
|
166
|
+
sameAgentVisibleProjection(existing, { ...content, contentHash: hash });
|
|
167
|
+
if (existing && unchangedForReaders && existing.sourceVersion === version)
|
|
176
168
|
return existing;
|
|
177
|
-
|
|
169
|
+
// The write that remains, when `unchangedForReaders` still holds, exists ONLY to record the
|
|
170
|
+
// moved token: a page whose version bumped without changing a byte (a Figma file version moves
|
|
171
|
+
// on any edit in the file, including frames this document does not cover) would otherwise keep
|
|
172
|
+
// the old token and be re-fetched on every dispatch forever, which is the cost the version probe
|
|
173
|
+
// exists to avoid.
|
|
178
174
|
const record = {
|
|
179
175
|
workspaceId,
|
|
180
176
|
source,
|
|
@@ -192,7 +188,10 @@ export class DocumentImportService {
|
|
|
192
188
|
// any existing tag across a re-import (the repo's upsert also leaves these columns alone).
|
|
193
189
|
role: existing?.role ?? null,
|
|
194
190
|
docKind: existing?.docKind ?? null,
|
|
195
|
-
syncedAt
|
|
191
|
+
// `syncedAt` is "when the body was last written", which is what every reader renders it as,
|
|
192
|
+
// so a token-only write must NOT move it. Moving it would put a fresh timestamp on bytes
|
|
193
|
+
// nobody changed, and the person reading it would conclude their edit had landed.
|
|
194
|
+
syncedAt: unchangedForReaders ? existing.syncedAt : this.deps.clock.now(),
|
|
196
195
|
deletedAt: null,
|
|
197
196
|
};
|
|
198
197
|
await this.deps.documentRepository.upsert(record);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentImportService.js","sourceRoot":"","sources":["../../../src/modules/documents/DocumentImportService.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACjF,OAAO,EACL,6BAA6B,GAG9B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAGtD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"DocumentImportService.js","sourceRoot":"","sources":["../../../src/modules/documents/DocumentImportService.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AACjF,OAAO,EACL,6BAA6B,GAG9B,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAGtD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,0BAA0B,EAAE,MA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, DocumentBoardPlan, DocumentLinkRole, DocumentRef, SourceDocument, DocumentOrigin } from '@cat-factory/kernel';
|
|
2
|
-
import type {
|
|
2
|
+
import type { BlockEditAuthority } from '@cat-factory/contracts';
|
|
3
3
|
import type { BlockRepository } from '@cat-factory/kernel';
|
|
4
4
|
import type { DocumentRepository } from '@cat-factory/kernel';
|
|
5
5
|
import type { BoardWritePort } from '@cat-factory/kernel';
|
|
@@ -24,9 +24,9 @@ export declare class DocumentLinkService {
|
|
|
24
24
|
*
|
|
25
25
|
* `editor` is whose authority every block below is written under. The STRUCTURE comes from an
|
|
26
26
|
* imported document, but the write is still made by whoever asked for the spawn, so the tier
|
|
27
|
-
* comes from the caller rather than being decided here (see {@link
|
|
27
|
+
* comes from the caller rather than being decided here (see {@link BlockEditAuthority}).
|
|
28
28
|
*/
|
|
29
|
-
spawn(workspaceId: string, plan: DocumentBoardPlan, editor:
|
|
29
|
+
spawn(workspaceId: string, plan: DocumentBoardPlan, editor: BlockEditAuthority, frameId?: string): Promise<SpawnResult>;
|
|
30
30
|
/** Add a planned frame's modules and tasks inside an existing frame. */
|
|
31
31
|
private spawnInto;
|
|
32
32
|
private addTask;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentLinkService.d.ts","sourceRoot":"","sources":["../../../src/modules/documents/DocumentLinkService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,OAAO,EACP,iBAAiB,EACjB,gBAAgB,EAEhB,WAAW,EACX,cAAc,EACd,cAAc,EAEf,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"DocumentLinkService.d.ts","sourceRoot":"","sources":["../../../src/modules/documents/DocumentLinkService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,OAAO,EACP,iBAAiB,EACjB,gBAAgB,EAEhB,WAAW,EACX,cAAc,EACd,cAAc,EAEf,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAA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;;;;;;;;;;;OAYG;YACW,sBAAsB;IA0BpC;;;;;;OAMG;IACG,WAAW,CACf,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,cAAc,EACtB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,gBAAgB,EACtB,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,cAAc,CAAC,CAWzB;IAED,oGAAoG;IAC9F,aAAa,CACjB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,cAAc,EACtB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAEf;IAED,gGAAgG;IAC1F,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAGlE;CACF"}
|
|
@@ -16,7 +16,7 @@ export class DocumentLinkService {
|
|
|
16
16
|
*
|
|
17
17
|
* `editor` is whose authority every block below is written under. The STRUCTURE comes from an
|
|
18
18
|
* imported document, but the write is still made by whoever asked for the spawn, so the tier
|
|
19
|
-
* comes from the caller rather than being decided here (see {@link
|
|
19
|
+
* comes from the caller rather than being decided here (see {@link BlockEditAuthority}).
|
|
20
20
|
*/
|
|
21
21
|
async spawn(workspaceId, plan, editor, frameId) {
|
|
22
22
|
const result = { frames: 0, modules: 0, tasks: 0 };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentLinkService.js","sourceRoot":"","sources":["../../../src/modules/documents/DocumentLinkService.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAIjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAE7D,mGAAmG;AACnG,SAAS,MAAM,CAAC,GAAgB;IAC9B,OAAO,GAAG,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,UAAU,EAAE,CAAA;AAC1C,CAAC;AAqBD,MAAM,OAAO,mBAAmB;IACD,IAAI;IAAjC,YAA6B,IAAqC;oBAArC,IAAI;IAAoC,CAAC;IAEtE;;;;;;;;OAQG;IACH,KAAK,CAAC,KAAK,CACT,WAAmB,EACnB,IAAuB,EACvB,
|
|
1
|
+
{"version":3,"file":"DocumentLinkService.js","sourceRoot":"","sources":["../../../src/modules/documents/DocumentLinkService.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAIjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAE7D,mGAAmG;AACnG,SAAS,MAAM,CAAC,GAAgB;IAC9B,OAAO,GAAG,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,UAAU,EAAE,CAAA;AAC1C,CAAC;AAqBD,MAAM,OAAO,mBAAmB;IACD,IAAI;IAAjC,YAA6B,IAAqC;oBAArC,IAAI;IAAoC,CAAC;IAEtE;;;;;;;;OAQG;IACH,KAAK,CAAC,KAAK,CACT,WAAmB,EACnB,IAAuB,EACvB,MAA0B,EAC1B,OAAgB;QAEhB,MAAM,MAAM,GAAgB,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAA;QAE/D,IAAI,OAAO,EAAE,CAAC;YACZ,MAAM,MAAM,GAAG,WAAW,CACxB,MAAM,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,EACzD,OAAO,EACP,OAAO,CACR,CAAA;YACD,IAAI,MAAM,CAAC,KAAK,KAAK,OAAO,EAAE,CAAC;gBAC7B,MAAM,IAAI,eAAe,CAAC,6DAA6D,CAAC,CAAA;YAC1F,CAAC;YACD,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;gBAChC,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;YACrE,C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,WAAmB,EACnB,MAAsB,EACtB,UAAkB,EAClB,IAAsB,EACtB,OAAgB;QAEhB,MAAM,QAAQ,GAAG,WAAW,CAC1B,MAAM,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC,EACvE,UAAU,EACV,UAAU,CACX,CAAA;QACD,IAAI,IAAI,KAAK,UAAU,EAAE,CAAC;YACxB,MAAM,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,WAAW,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;QACvF,CAAC;QACD,MAAM,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;QAC1F,OAAO,gBAAgB,CAAC,EAAE,GAAG,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAA;IACzD,CAAC;IAED,oGAAoG;IACpG,KAAK,CAAC,aAAa,CACjB,WAAmB,EACnB,MAAsB,EACtB,UAAkB;QAElB,MAAM,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC,CAAA;IAC/E,CAAC;IAED,gGAAgG;IAChG,KAAK,CAAC,aAAa,CAAC,WAAmB;QACrC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,wBAAwB,CAAC,WAAW,CAAC,CAAA;QACrF,OAAO,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAA;IACnC,CAAC;CACF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { DocumentRecord, DocumentSourceRegistry, GroupCacheHandle, LinkedDocumentRefreshOutcome, LinkedDocumentRefresher, Logger, OperationalMetrics, RefreshedDocument } from '@cat-factory/kernel';
|
|
1
|
+
import type { DocumentRecord, DocumentSourceKind, DocumentSourceRegistry, GroupCacheHandle, LinkedDocumentRefreshOutcome, LinkedDocumentRefresher, Logger, OperationalMetrics, RefreshedDocument } from '@cat-factory/kernel';
|
|
2
|
+
import { type RefreshedDocumentView } from '@cat-factory/contracts';
|
|
2
3
|
import type { DocumentConnectionService } from './DocumentConnectionService.js';
|
|
3
|
-
import type
|
|
4
|
+
import { type DocumentImportService } from './DocumentImportService.js';
|
|
4
5
|
export interface LinkedDocumentRefreshServiceDependencies {
|
|
5
6
|
registry: DocumentSourceRegistry;
|
|
6
7
|
connectionService: DocumentConnectionService;
|
|
@@ -35,6 +36,23 @@ export declare class LinkedDocumentRefreshService implements LinkedDocumentRefre
|
|
|
35
36
|
* and handed down, rather than re-read per document and then again inside each probe.
|
|
36
37
|
*/
|
|
37
38
|
refresh(workspaceId: string, documents: readonly DocumentRecord[]): Promise<readonly RefreshedDocument[]>;
|
|
39
|
+
/**
|
|
40
|
+
* Confirm ONE stored document because a PERSON asked, not because a dispatch did.
|
|
41
|
+
*
|
|
42
|
+
* Same ladder, run under the `manual` trigger. The cached verdict is dropped first: the cache
|
|
43
|
+
* exists so a burst of step dispatches costs one round trip, and it deliberately remembers a
|
|
44
|
+
* failure so an outage is not re-probed by every dispatch. Both are exactly wrong for a human
|
|
45
|
+
* clicking Refresh: the click IS the request for a new answer, and the most common reason to
|
|
46
|
+
* click is that the last answer said the source was unreachable, so a refresh served from that
|
|
47
|
+
* cache would report the very outage the person is retrying past.
|
|
48
|
+
*
|
|
49
|
+
* A SUCCESSFUL outcome is still stored, so the dispatches that follow a manual refresh inherit it
|
|
50
|
+
* rather than re-asking the source. A failed one is not, which is the asymmetry {@link runLadder}
|
|
51
|
+
* exists to hold: dropping the entry and then re-filling it with whatever one click found would
|
|
52
|
+
* let a person retrying past a flaky source install an `unreachable` verdict that every dispatch
|
|
53
|
+
* for the next TTL window reads, degrading the run path with a failure no dispatch observed.
|
|
54
|
+
*/
|
|
55
|
+
refreshNow(workspaceId: string, source: DocumentSourceKind, externalId: string): Promise<RefreshedDocumentView>;
|
|
38
56
|
/**
|
|
39
57
|
* The live connection per source this corpus actually needs, in ONE read.
|
|
40
58
|
*
|
|
@@ -55,13 +73,33 @@ export declare class LinkedDocumentRefreshService implements LinkedDocumentRefre
|
|
|
55
73
|
/** The probe → compare → re-import ladder for a source-backed document. */
|
|
56
74
|
private confirm;
|
|
57
75
|
/**
|
|
58
|
-
* Run the ladder
|
|
76
|
+
* Run the ladder, turning ANY failure into the `unreachable` outcome the caller can render.
|
|
59
77
|
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* dispatch for as long as it stayed down. Remembering the failure for the TTL is what bounds that,
|
|
63
|
-
* and it costs a run at most one TTL window of reading the stored body after the source recovers.
|
|
78
|
+
* Whether that failure is also REMEMBERED by the shared cache is {@link runLadder}'s call, so this
|
|
79
|
+
* stays the one place a failure becomes a verdict however it got here.
|
|
64
80
|
*/
|
|
65
81
|
private attempt;
|
|
82
|
+
/**
|
|
83
|
+
* The ladder under the short-TTL cache, with the trigger's failure rule applied. The rule is
|
|
84
|
+
* ASYMMETRIC, and each half is load-bearing.
|
|
85
|
+
*
|
|
86
|
+
* A DISPATCH's failure is REMEMBERED: its loader catches and returns `unreachable` as a value, so
|
|
87
|
+
* the cache stores it. A loader that throws caches nothing, and without this a rate-limited or
|
|
88
|
+
* unreachable source would be re-asked (and its changed documents re-downloaded) by every step
|
|
89
|
+
* dispatch for as long as it stayed down. Remembering it bounds an outage to one probe per TTL
|
|
90
|
+
* window, at a cost of at most one window of reading the stored body after the source recovers.
|
|
91
|
+
*
|
|
92
|
+
* A PERSON's failure is NOT remembered: their loader rethrows. `refreshNow` has just DROPPED the
|
|
93
|
+
* cached entry, precisely because the commonest reason to click is that the last answer said the
|
|
94
|
+
* source was down, so re-filling it with whatever the click found would put an `unreachable`
|
|
95
|
+
* verdict in front of every dispatch for the next TTL window: a human retrying past a flaky source
|
|
96
|
+
* would degrade the run path with a failure no dispatch ever observed, and each further click
|
|
97
|
+
* would renew it. Leaving the entry empty is the honest state, and it costs the next dispatch one
|
|
98
|
+
* probe. A SUCCESS is cached on both paths, so the dispatches after a manual refresh still inherit
|
|
99
|
+
* it rather than re-asking the source.
|
|
100
|
+
*/
|
|
101
|
+
private runLadder;
|
|
102
|
+
/** The ONE place a failed confirmation is logged and named, however the pass reached it. */
|
|
103
|
+
private unreachable;
|
|
66
104
|
}
|
|
67
105
|
//# sourceMappingURL=LinkedDocumentRefreshService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkedDocumentRefreshService.d.ts","sourceRoot":"","sources":["../../../src/modules/documents/LinkedDocumentRefreshService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,cAAc,
|
|
1
|
+
{"version":3,"file":"LinkedDocumentRefreshService.d.ts","sourceRoot":"","sources":["../../../src/modules/documents/LinkedDocumentRefreshService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,cAAc,EACd,kBAAkB,EAElB,sBAAsB,EACtB,gBAAgB,EAChB,4BAA4B,EAC5B,uBAAuB,EACvB,MAAM,EACN,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAAuB,KAAK,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAExF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAA;AAC/E,OAAO,EAAE,KAAK,qBAAqB,EAAoB,MAAM,4BAA4B,CAAA;AAsDzF,MAAM,WAAW,wCAAwC;IACvD,QAAQ,EAAE,sBAAsB,CAAA;IAChC,iBAAiB,EAAE,yBAAyB,CAAA;IAC5C,sEAAsE;IACtE,aAAa,EAAE,qBAAqB,CAAA;IACpC;;;;OAIG;IACH,YAAY,CAAC,EAAE,gBAAgB,CAAC,4BAA4B,CAAC,CAAA;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,kGAAkG;IAClG,OAAO,CAAC,EAAE,kBAAkB,CAAA;CAC7B;AAED,qBAAa,4BAA6B,YAAW,uBAAuB;IAI9D,OAAO,CAAC,QAAQ,CAAC,IAAI;IAHjC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAQ;IAC5B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoB;IAE5C,YAA6B,IAAI,EAAE,wCAAwC,EAG1E;IAED;;;;;;;;;;;;OAYG;IACG,OAAO,CACX,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,SAAS,cAAc,EAAE,GACnC,OAAO,CAAC,SAAS,iBAAiB,EAAE,CAAC,CAOvC;IAED;;;;;;;;;;;;;;;OAeG;IACG,UAAU,CACd,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,kBAAkB,EAC1B,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,qBAAqB,CAAC,CAUhC;IAED;;;;;;;;;OASG;YACW,kBAAkB;IA8BhC;;;OAGG;YACW,UAAU;YA0BV,UAAU;IAiCxB,2EAA2E;YAC7D,OAAO;IAuFrB;;;;;OAKG;YACW,OAAO;IAkBrB;;;;;;;;;;;;;;;;;;OAkBG;IACH,OAAO,CAAC,SAAS;IAsBjB,4FAA4F;IAC5F,OAAO,CAAC,WAAW;CAgBpB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { describeError, noopLogger, noopOperationalMetrics } from '@cat-factory/kernel';
|
|
2
2
|
import { isConnectableSource } from '@cat-factory/contracts';
|
|
3
3
|
import pMap from 'p-map';
|
|
4
|
-
import {
|
|
4
|
+
import { toSourceDocument } from './DocumentImportService.js';
|
|
5
|
+
import { probeCacheKey, sameAgentVisibleProjection } from './documents.logic.js';
|
|
5
6
|
// LinkedDocumentRefreshService: the {@link LinkedDocumentRefresher} implementation — the
|
|
6
7
|
// dispatch-time half of document freshness.
|
|
7
8
|
//
|
|
@@ -57,9 +58,34 @@ export class LinkedDocumentRefreshService {
|
|
|
57
58
|
*/
|
|
58
59
|
async refresh(workspaceId, documents) {
|
|
59
60
|
const connections = await this.resolveConnections(workspaceId, documents);
|
|
60
|
-
return pMap(documents, (record) => this.refreshOne(workspaceId, record, connections), {
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
return pMap(documents, (record) => this.refreshOne(workspaceId, record, connections, 'dispatch'), { concurrency: REFRESH_CONCURRENCY });
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Confirm ONE stored document because a PERSON asked, not because a dispatch did.
|
|
65
|
+
*
|
|
66
|
+
* Same ladder, run under the `manual` trigger. The cached verdict is dropped first: the cache
|
|
67
|
+
* exists so a burst of step dispatches costs one round trip, and it deliberately remembers a
|
|
68
|
+
* failure so an outage is not re-probed by every dispatch. Both are exactly wrong for a human
|
|
69
|
+
* clicking Refresh: the click IS the request for a new answer, and the most common reason to
|
|
70
|
+
* click is that the last answer said the source was unreachable, so a refresh served from that
|
|
71
|
+
* cache would report the very outage the person is retrying past.
|
|
72
|
+
*
|
|
73
|
+
* A SUCCESSFUL outcome is still stored, so the dispatches that follow a manual refresh inherit it
|
|
74
|
+
* rather than re-asking the source. A failed one is not, which is the asymmetry {@link runLadder}
|
|
75
|
+
* exists to hold: dropping the entry and then re-filling it with whatever one click found would
|
|
76
|
+
* let a person retrying past a flaky source install an `unreachable` verdict that every dispatch
|
|
77
|
+
* for the next TTL window reads, degrading the run path with a failure no dispatch observed.
|
|
78
|
+
*/
|
|
79
|
+
async refreshNow(workspaceId, source, externalId) {
|
|
80
|
+
const stored = await this.deps.importService.requireDocument(workspaceId, source, externalId);
|
|
81
|
+
await this.deps.versionCache?.invalidate(probeCacheKey(source, externalId), workspaceId);
|
|
82
|
+
const connections = await this.resolveConnections(workspaceId, [stored]);
|
|
83
|
+
const { record, freshness } = await this.refreshOne(workspaceId, stored, connections, 'manual');
|
|
84
|
+
// BOTH halves, because neither answers alone: the row carries the title/excerpt/`syncedAt` the
|
|
85
|
+
// caller re-renders, and only the verdict says whether it was confirmed current. An unchanged
|
|
86
|
+
// row under a `confirmed` verdict and the same row under an `unconfirmed` one are identical
|
|
87
|
+
// bytes and opposite facts.
|
|
88
|
+
return { document: toSourceDocument(record), freshness };
|
|
63
89
|
}
|
|
64
90
|
/**
|
|
65
91
|
* The live connection per source this corpus actually needs, in ONE read.
|
|
@@ -98,11 +124,19 @@ export class LinkedDocumentRefreshService {
|
|
|
98
124
|
* One document's verdict. NEVER throws (the port's best-effort contract): a source outage costs the
|
|
99
125
|
* run a stale body and a stated warning, never the run.
|
|
100
126
|
*/
|
|
101
|
-
async refreshOne(workspaceId, record, connections) {
|
|
102
|
-
const refreshed = await this.verdictFor(workspaceId, record, connections);
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
127
|
+
async refreshOne(workspaceId, record, connections, trigger) {
|
|
128
|
+
const refreshed = await this.verdictFor(workspaceId, record, connections, trigger);
|
|
129
|
+
// ONE increment site for every gap, whichever branch produced it, so the rate cannot drift from
|
|
130
|
+
// the verdicts actually rendered. Both dimensions are closed vocabularies.
|
|
131
|
+
//
|
|
132
|
+
// DISPATCHES ONLY, and that is the counter's contract rather than a sampling shortcut: it counts
|
|
133
|
+
// runs that read a copy the source has moved past. A person clicking Refresh hands no body to
|
|
134
|
+
// any agent, and the commonest reason to click is that the source was down a moment ago, so
|
|
135
|
+
// counting the click would let one person retrying an outage move a deployment-wide rate as far
|
|
136
|
+
// as they have patience for, in the exact direction that reads as "agents are being handed more
|
|
137
|
+
// stale designs than they were". The click is not invisible: it is logged like every other pass,
|
|
138
|
+
// with its `trigger`.
|
|
139
|
+
if (trigger === 'dispatch' && refreshed.freshness.status === 'unconfirmed') {
|
|
106
140
|
this.metrics.increment('document.freshness_gap', {
|
|
107
141
|
reason: refreshed.freshness.reason,
|
|
108
142
|
source: record.source,
|
|
@@ -110,7 +144,7 @@ export class LinkedDocumentRefreshService {
|
|
|
110
144
|
}
|
|
111
145
|
return refreshed;
|
|
112
146
|
}
|
|
113
|
-
async verdictFor(workspaceId, record, connections) {
|
|
147
|
+
async verdictFor(workspaceId, record, connections, trigger) {
|
|
114
148
|
// An `upload` has no provider to ask, and a source this deployment never wired has no provider
|
|
115
149
|
// either. Both are "nothing fresher exists to compare against", which is NOT a degradation —
|
|
116
150
|
// distinct from the gaps below, which are.
|
|
@@ -126,7 +160,7 @@ export class LinkedDocumentRefreshService {
|
|
|
126
160
|
if (!connection)
|
|
127
161
|
return unconfirmed(record, 'not_connected');
|
|
128
162
|
try {
|
|
129
|
-
return await this.confirm(workspaceId, source, provider, connection, record);
|
|
163
|
+
return await this.confirm(workspaceId, source, provider, connection, record, trigger);
|
|
130
164
|
}
|
|
131
165
|
catch (error) {
|
|
132
166
|
// The ladder catches its own failures inside the cache loader (so they are REMEMBERED rather
|
|
@@ -143,12 +177,12 @@ export class LinkedDocumentRefreshService {
|
|
|
143
177
|
}
|
|
144
178
|
}
|
|
145
179
|
/** The probe → compare → re-import ladder for a source-backed document. */
|
|
146
|
-
async confirm(workspaceId, source, provider, connection, record) {
|
|
180
|
+
async confirm(workspaceId, source, provider, connection, record, trigger) {
|
|
147
181
|
// Set by the ladder when THIS call ran the re-import; left undefined on a cache HIT, where the
|
|
148
182
|
// download already happened (on an earlier dispatch, or on a concurrent one this call deduped
|
|
149
183
|
// onto) and the row we were handed may not carry it yet.
|
|
150
184
|
let reimported;
|
|
151
|
-
const outcome = await this.attempt(workspaceId, source, record.externalId, async () => {
|
|
185
|
+
const outcome = await this.attempt(workspaceId, source, record.externalId, trigger, async () => {
|
|
152
186
|
const probed = await provider.probeVersion(connection.credentials, record.externalId, workspaceId);
|
|
153
187
|
// The source answered but has no version to compare. Not an error and not fixable, but the
|
|
154
188
|
// copy still cannot be called confirmed, and claiming otherwise is the one lie this feature
|
|
@@ -163,10 +197,11 @@ export class LinkedDocumentRefreshService {
|
|
|
163
197
|
reimported = await this.deps.importService.reimport(workspaceId, source, record.externalId, {
|
|
164
198
|
fallbackVersion: probed,
|
|
165
199
|
});
|
|
166
|
-
this.log.debug('linked document re-imported
|
|
200
|
+
this.log.debug('linked document re-imported', {
|
|
167
201
|
workspaceId,
|
|
168
202
|
source,
|
|
169
203
|
externalId: record.externalId,
|
|
204
|
+
trigger,
|
|
170
205
|
});
|
|
171
206
|
// The version of the body ACTUALLY STORED, read off the written row rather than reusing the
|
|
172
207
|
// probed token: the fetch that followed the probe can legitimately land a newer revision than
|
|
@@ -179,56 +214,99 @@ export class LinkedDocumentRefreshService {
|
|
|
179
214
|
return unconfirmed(record, 'source_unreachable');
|
|
180
215
|
if (outcome.status === 'unversioned')
|
|
181
216
|
return unconfirmed(record, 'unversioned');
|
|
182
|
-
// The row this
|
|
217
|
+
// The row this pass was handed already carries the token the source last answered with, so
|
|
218
|
+
// nothing was fetched and nothing was written.
|
|
183
219
|
if (record.sourceVersion === outcome.version) {
|
|
184
220
|
return {
|
|
185
221
|
record,
|
|
186
|
-
freshness: { status: 'confirmed', version: outcome.version,
|
|
222
|
+
freshness: { status: 'confirmed', version: outcome.version, change: 'unchanged' },
|
|
187
223
|
};
|
|
188
224
|
}
|
|
189
|
-
// It does not, so the
|
|
190
|
-
// or a concurrent dispatch did and this call deduped onto its cached outcome, in which case
|
|
191
|
-
// row moved AFTER our corpus read. Re-read it rather than labelling a stale body with a
|
|
192
|
-
// revision, which is the exact lie the whole feature exists to prevent.
|
|
225
|
+
// It does not, so the source has moved past the token in hand: either this call just re-imported
|
|
226
|
+
// it, or a concurrent dispatch did and this call deduped onto its cached outcome, in which case
|
|
227
|
+
// the row moved AFTER our corpus read. Re-read it rather than labelling a stale body with a
|
|
228
|
+
// fresh revision, which is the exact lie the whole feature exists to prevent.
|
|
193
229
|
const current = reimported ??
|
|
194
230
|
(await this.deps.importService.requireDocument(workspaceId, source, record.externalId));
|
|
231
|
+
// A MOVED TOKEN IS NOT A CHANGED DOCUMENT, and collapsing the two is the same class of lie in
|
|
232
|
+
// the other direction. A Figma file's version bumps on any edit anywhere in it, so the common
|
|
233
|
+
// case for a document covering one frame is that the token moved and not one byte a reader sees
|
|
234
|
+
// did. Calling that `reimported` would tell a person their design had been pulled in when their
|
|
235
|
+
// own edit may be in a frame nothing here covers. The comparison is `reimport`'s own
|
|
236
|
+
// ("what reaches an agent"), shared rather than restated so the two cannot disagree.
|
|
195
237
|
return {
|
|
196
238
|
record: current,
|
|
197
239
|
freshness: {
|
|
198
240
|
status: 'confirmed',
|
|
199
241
|
version: current.sourceVersion ?? outcome.version,
|
|
200
|
-
|
|
242
|
+
change: sameAgentVisibleProjection(record, current) ? 'revision_only' : 'reimported',
|
|
201
243
|
},
|
|
202
244
|
};
|
|
203
245
|
}
|
|
204
246
|
/**
|
|
205
|
-
* Run the ladder
|
|
247
|
+
* Run the ladder, turning ANY failure into the `unreachable` outcome the caller can render.
|
|
206
248
|
*
|
|
207
|
-
*
|
|
208
|
-
*
|
|
209
|
-
* dispatch for as long as it stayed down. Remembering the failure for the TTL is what bounds that,
|
|
210
|
-
* and it costs a run at most one TTL window of reading the stored body after the source recovers.
|
|
249
|
+
* Whether that failure is also REMEMBERED by the shared cache is {@link runLadder}'s call, so this
|
|
250
|
+
* stays the one place a failure becomes a verdict however it got here.
|
|
211
251
|
*/
|
|
212
|
-
async attempt(workspaceId, source, externalId, ladder) {
|
|
213
|
-
|
|
252
|
+
async attempt(workspaceId, source, externalId, trigger, ladder) {
|
|
253
|
+
try {
|
|
254
|
+
return await this.runLadder(workspaceId, source, externalId, trigger, ladder);
|
|
255
|
+
}
|
|
256
|
+
catch (error) {
|
|
257
|
+
// A `manual` pass routes its failures here BY DESIGN (its loader rethrows, so the cache stores
|
|
258
|
+
// nothing); a `dispatch` reaches it only if the cache handle itself failed. Bespoke rather
|
|
259
|
+
// than `runBestEffort` because the swallow has to produce a VALUE: the caller needs a verdict,
|
|
260
|
+
// so there is nothing to return `undefined` for.
|
|
261
|
+
return this.unreachable(workspaceId, source, externalId, trigger, error);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* The ladder under the short-TTL cache, with the trigger's failure rule applied. The rule is
|
|
266
|
+
* ASYMMETRIC, and each half is load-bearing.
|
|
267
|
+
*
|
|
268
|
+
* A DISPATCH's failure is REMEMBERED: its loader catches and returns `unreachable` as a value, so
|
|
269
|
+
* the cache stores it. A loader that throws caches nothing, and without this a rate-limited or
|
|
270
|
+
* unreachable source would be re-asked (and its changed documents re-downloaded) by every step
|
|
271
|
+
* dispatch for as long as it stayed down. Remembering it bounds an outage to one probe per TTL
|
|
272
|
+
* window, at a cost of at most one window of reading the stored body after the source recovers.
|
|
273
|
+
*
|
|
274
|
+
* A PERSON's failure is NOT remembered: their loader rethrows. `refreshNow` has just DROPPED the
|
|
275
|
+
* cached entry, precisely because the commonest reason to click is that the last answer said the
|
|
276
|
+
* source was down, so re-filling it with whatever the click found would put an `unreachable`
|
|
277
|
+
* verdict in front of every dispatch for the next TTL window: a human retrying past a flaky source
|
|
278
|
+
* would degrade the run path with a failure no dispatch ever observed, and each further click
|
|
279
|
+
* would renew it. Leaving the entry empty is the honest state, and it costs the next dispatch one
|
|
280
|
+
* probe. A SUCCESS is cached on both paths, so the dispatches after a manual refresh still inherit
|
|
281
|
+
* it rather than re-asking the source.
|
|
282
|
+
*/
|
|
283
|
+
runLadder(workspaceId, source, externalId, trigger, ladder) {
|
|
284
|
+
const cache = this.deps.versionCache;
|
|
285
|
+
if (!cache)
|
|
286
|
+
return ladder();
|
|
287
|
+
const remembering = async () => {
|
|
214
288
|
try {
|
|
215
289
|
return await ladder();
|
|
216
290
|
}
|
|
217
291
|
catch (error) {
|
|
218
|
-
this.
|
|
219
|
-
workspaceId,
|
|
220
|
-
source,
|
|
221
|
-
externalId,
|
|
222
|
-
...describeError(error),
|
|
223
|
-
});
|
|
224
|
-
return { status: 'unreachable' };
|
|
292
|
+
return this.unreachable(workspaceId, source, externalId, trigger, error);
|
|
225
293
|
}
|
|
226
294
|
};
|
|
227
|
-
if (!this.deps.versionCache)
|
|
228
|
-
return guarded();
|
|
229
295
|
// Grouped by workspace so a workspace's connection change can drop every verdict it authorised in
|
|
230
296
|
// one call, and keyed per document within it — the same shape as the fragment body cache.
|
|
231
|
-
|
|
297
|
+
const key = probeCacheKey(source, externalId);
|
|
298
|
+
return cache.get(key, workspaceId, trigger === 'dispatch' ? remembering : ladder);
|
|
299
|
+
}
|
|
300
|
+
/** The ONE place a failed confirmation is logged and named, however the pass reached it. */
|
|
301
|
+
unreachable(workspaceId, source, externalId, trigger, error) {
|
|
302
|
+
this.log.warn('linked document could not be confirmed against its source', {
|
|
303
|
+
workspaceId,
|
|
304
|
+
source,
|
|
305
|
+
externalId,
|
|
306
|
+
trigger,
|
|
307
|
+
...describeError(error),
|
|
308
|
+
});
|
|
309
|
+
return { status: 'unreachable' };
|
|
232
310
|
}
|
|
233
311
|
}
|
|
234
312
|
function notApplicable(record) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkedDocumentRefreshService.js","sourceRoot":"","sources":["../../../src/modules/documents/LinkedDocumentRefreshService.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AACvF,OAAO,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"LinkedDocumentRefreshService.js","sourceRoot":"","sources":["../../../src/modules/documents/LinkedDocumentRefreshService.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AACvF,OAAO,EAAE,mBAAmB,EAA8B,MAAM,wBAAwB,CAAA;AACxF,OAAO,IAAI,MAAM,OAAO,CAAA;AAExB,OAAO,EAA8B,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AACzF,OAAO,EAAE,aAAa,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAA;AAEhF,yFAAyF;AACzF,4CAA4C;AAC5C,EAAE;AACF,mGAAmG;AACnG,mGAAmG;AACnG,mGAAmG;AACnG,sFAAsF;AACtF,EAAE;AACF,8FAA8F;AAC9F,iGAA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GAAG,KAAK,IAA2C,EAAE;YACpE,IAAI,CAAC;gBACH,OAAO,MAAM,MAAM,EAAE,CAAA;YACvB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,CAAA;YAC1E,CAAC;QACH,CAAC,CAAA;QACD,kGAAkG;QAClG,0FAA0F;QAC1F,MAAM,GAAG,GAAG,aAAa,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;QAC7C,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,WAAW,EAAE,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;IACnF,CAAC;IAED,4FAA4F;IACpF,WAAW,CACjB,WAAmB,EACnB,MAA0B,EAC1B,UAAkB,EAClB,OAAuB,EACvB,KAAc;QAEd,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,2DAA2D,EAAE;YACzE,WAAW;YACX,MAAM;YACN,UAAU;YACV,OAAO;YACP,GAAG,aAAa,CAAC,KAAK,CAAC;SACxB,CAAC,CAAA;QACF,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,CAAA;IAClC,CAAC;CACF;AAED,SAAS,aAAa,CAAC,MAAsB;IAC3C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE,EAAE,CAAA;AAC5D,CAAC;AAED,SAAS,WAAW,CAAC,MAAsB,EAAE,MAA4B;IACvE,MAAM,SAAS,GAAsB,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,CAAA;IACtE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,CAAA;AAC9B,CAAC"}
|
|
@@ -12,6 +12,28 @@ export { buildExcerpt, markdownToText };
|
|
|
12
12
|
* differ, and an invalidation that targets a key nothing reads fails silently.
|
|
13
13
|
*/
|
|
14
14
|
export declare function probeCacheKey(source: DocumentSourceKind, externalId: string): string;
|
|
15
|
+
/** The part of a stored document projection that an agent (or a reader of the board) actually sees. */
|
|
16
|
+
export interface AgentVisibleProjection {
|
|
17
|
+
readonly contentHash: string;
|
|
18
|
+
readonly title: string;
|
|
19
|
+
readonly url: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Whether two projections of the same page carry the same thing for a reader.
|
|
23
|
+
*
|
|
24
|
+
* ONE definition, because two callers have to agree about it and they reach opposite conclusions
|
|
25
|
+
* from disagreeing. `DocumentImportService.reimport` uses it to decide whether a fetch is worth a
|
|
26
|
+
* WRITE (and therefore whether `syncedAt`, "when the body was last written", may move);
|
|
27
|
+
* `LinkedDocumentRefreshService` uses it to classify a confirmed check as `reimported` or
|
|
28
|
+
* `revision_only`. A second copy that drifted would render "pulled the newer version" over a row
|
|
29
|
+
* whose bytes the import path had just decided were identical.
|
|
30
|
+
*
|
|
31
|
+
* `sourceVersion` is deliberately NOT part of it. The token is bookkeeping the refresh compares
|
|
32
|
+
* against and no reader ever sees, and the whole point of the `revision_only` verdict is that a
|
|
33
|
+
* moved token with an unmoved body is a real, common state (a Figma file version bumps on any edit
|
|
34
|
+
* in the file). Both callers add their own `sourceVersion` rule around this.
|
|
35
|
+
*/
|
|
36
|
+
export declare function sameAgentVisibleProjection(a: AgentVisibleProjection, b: AgentVisibleProjection): boolean;
|
|
15
37
|
/** A trivial in-memory provider registry built from the wired providers. */
|
|
16
38
|
export declare class MapDocumentSourceRegistry extends MapSourceRegistry<DocumentSourceKind, DocumentSourceProvider> implements DocumentSourceRegistry {
|
|
17
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documents.logic.d.ts","sourceRoot":"","sources":["../../../src/modules/documents/documents.logic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,cAAc,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AACxF,OAAO,KAAK,EAAE,iBAAi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kBAAkB,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAEpF;AAED,uGAAuG;AACvG,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CACrB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CACxC,CAAC,EAAE,sBAAsB,EACzB,CAAC,EAAE,sBAAsB,GACxB,OAAO,CAET;AAED,4EAA4E;AAC5E,qBAAa,yBACX,SAAQ,iBAAiB,CAAC,kBAAkB,EAAE,sBAAsB,CACpE,YAAW,sBAAsB;CAAG;AAmBtC;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,cAAc,EACtB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,GACX,iBAAiB,CAiCnB;AAiBD;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,cAAc,EACtB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,OAAO,GACd,iBAAiB,GAAG,IAAI,CAiC1B"}
|
|
@@ -29,6 +29,24 @@ const BLOCK_TYPES = [
|
|
|
29
29
|
export function probeCacheKey(source, externalId) {
|
|
30
30
|
return `${source}:${externalId}`;
|
|
31
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Whether two projections of the same page carry the same thing for a reader.
|
|
34
|
+
*
|
|
35
|
+
* ONE definition, because two callers have to agree about it and they reach opposite conclusions
|
|
36
|
+
* from disagreeing. `DocumentImportService.reimport` uses it to decide whether a fetch is worth a
|
|
37
|
+
* WRITE (and therefore whether `syncedAt`, "when the body was last written", may move);
|
|
38
|
+
* `LinkedDocumentRefreshService` uses it to classify a confirmed check as `reimported` or
|
|
39
|
+
* `revision_only`. A second copy that drifted would render "pulled the newer version" over a row
|
|
40
|
+
* whose bytes the import path had just decided were identical.
|
|
41
|
+
*
|
|
42
|
+
* `sourceVersion` is deliberately NOT part of it. The token is bookkeeping the refresh compares
|
|
43
|
+
* against and no reader ever sees, and the whole point of the `revision_only` verdict is that a
|
|
44
|
+
* moved token with an unmoved body is a real, common state (a Figma file version bumps on any edit
|
|
45
|
+
* in the file). Both callers add their own `sourceVersion` rule around this.
|
|
46
|
+
*/
|
|
47
|
+
export function sameAgentVisibleProjection(a, b) {
|
|
48
|
+
return a.contentHash === b.contentHash && a.title === b.title && a.url === b.url;
|
|
49
|
+
}
|
|
32
50
|
/** A trivial in-memory provider registry built from the wired providers. */
|
|
33
51
|
export class MapDocumentSourceRegistry extends MapSourceRegistry {
|
|
34
52
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documents.logic.js","sourceRoot":"","sources":["../../../src/modules/documents/documents.logic.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAErF,gFAAgF;AAChF,qEAAqE;AACrE,8CAA8C;AAC9C,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,CAAA;AAEvC,iFAAiF;AACjF,6EAA6E;AAC7E,+EAA+E;AAC/E,iFAAiF;AACjF,yEAAyE;AACzE,sDAAsD;AAEtD,MAAM,WAAW,GAAyB;IACxC,UAAU;IACV,SAAS;IACT,KAAK;IACL,UAAU;IACV,OAAO;IACP,aAAa;IACb,UAAU;CACX,CAAA;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,MAA0B,EAAE,UAAkB;IAC1E,OAAO,GAAG,MAAM,IAAI,UAAU,EAAE,CAAA;AAClC,CAAC;AAED,4EAA4E;AAC5E,MAAM,OAAO,yBACX,SAAQ,iBAA6D;CACjC;AAOtC,2EAA2E;AAC3E,SAAS,eAAe,CAAC,QAAgB;IACvC,MAAM,QAAQ,GAAc,EAAE,CAAA;IAC9B,MAAM,EAAE,GAAG,uCAAuC,C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AAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;iBACtD,GAAG,CAAC,UAAU,CAAC;iBACf,MAAM,CAAC,CAAC,CAAC,EAAiB,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAA;YAC3C,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAA;QAC/B,CAAC;QACD,MAAM,KAAK,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;aACtD,GAAG,CAAC,UAAU,CAAC;aACf,MAAM,CAAC,CAAC,CAAC,EAAiB,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAA;QAC3C,MAAM,KAAK,GAAc,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAA;QACxD,MAAM,WAAW,GAAG,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;QAC7C,IAAI,WAAW;YAAE,KAAK,CAAC,WAAW,GAAG,WAAW,CAAA;QAChD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACpB,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAA;IACpC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAA;AACvD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BlockEditAuthority } from '@cat-factory/contracts';
|
|
2
2
|
import type { BugHuntAssessor, BugHuntResult, RunBugHuntInput, TaskConnectionRepository, TaskRepository, TaskSourceKind, TaskSourceRegistry, TrackerBoard } from '@cat-factory/kernel';
|
|
3
3
|
import type { TaskImportService } from './TaskImportService.js';
|
|
4
4
|
import type { TaskFromIssue, TaskLinkService } from './TaskLinkService.js';
|
|
@@ -71,7 +71,7 @@ export declare class BugHuntService {
|
|
|
71
71
|
source: TaskSourceKind;
|
|
72
72
|
externalId: string;
|
|
73
73
|
containerId: string;
|
|
74
|
-
editor:
|
|
74
|
+
editor: BlockEditAuthority;
|
|
75
75
|
createdBy: string | null;
|
|
76
76
|
pipelineId: string;
|
|
77
77
|
}): Promise<TaskFromIssue>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BugHuntService.d.ts","sourceRoot":"","sources":["../../../src/modules/tasks/BugHuntService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"BugHuntService.d.ts","sourceRoot":"","sources":["../../../src/modules/tasks/BugHuntService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAChE,OAAO,KAAK,EAGV,eAAe,EAEf,aAAa,EAEb,eAAe,EACf,wBAAwB,EACxB,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,YAAY,EACb,MAAM,qBAAqB,CAAA;AAQ5B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAkB1E,MAAM,WAAW,0BAA0B;IACzC,kBAAkB,EAAE,kBAAkB,CAAA;IACtC,wBAAwB,EAAE,wBAAwB,CAAA;IAClD,cAAc,EAAE,cAAc,CAAA;IAC9B,aAAa,EAAE,iBAAiB,CAAA;IAChC,WAAW,EAAE,eAAe,CAAA;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAA;IAC1B;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;CACzD;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,KAAK,CAAA;AAKrC,qBAAa,cAAc;IACb,OAAO,CAAC,QAAQ,CAAC,IAAI;IAAjC,YAA6B,IAAI,EAAE,0BAA0B,EAAI;IAEjE;;;;OAIG;IACG,UAAU,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAarF;IAED;;;;;;;;OAQG;IACG,IAAI,CACR,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,cAAc,EACtB,KAAK,EAAE,eAAe,GACrB,OAAO,CAAC,aAAa,CAAC,CA0CxB;IAED;;;;;;;;;;;;OAYG;IACG,KAAK,CAAC,KAAK,EAAE;QACjB,WAAW,EAAE,MAAM,CAAA;QACnB,MAAM,EAAE,cAAc,CAAA;QACtB,UAAU,EAAE,MAAM,CAAA;QAClB,WAAW,EAAE,MAAM,CAAA;QACnB,MAAM,EAAE,kBAAkB,CAAA;QAC1B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;QACxB,UAAU,EAAE,MAAM,CAAA;KACnB,GAAG,OAAO,CAAC,aAAa,CAAC,CAezB;IAED;;;;OAIG;YACW,IAAI;IAgDlB,gGAAgG;YAClF,cAAc;CAO7B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Block, CreateTaskType, Position, SourceTask, TaskSourceKind } from '@cat-factory/kernel';
|
|
2
|
-
import type {
|
|
2
|
+
import type { BlockEditAuthority } from '@cat-factory/contracts';
|
|
3
3
|
import type { BlockRepository } from '@cat-factory/kernel';
|
|
4
4
|
import type { BoardWritePort } from '@cat-factory/kernel';
|
|
5
5
|
import type { TaskRepository } from '@cat-factory/kernel';
|
|
@@ -83,7 +83,7 @@ export declare class TaskLinkService {
|
|
|
83
83
|
* because only the caller knows: filing an issue from the SPA is a member acting on their own
|
|
84
84
|
* board, while the tracker reconciliation sweep behind the same method holds no tier at all.
|
|
85
85
|
* Deciding it here would pick one of those and be wrong about the other (see
|
|
86
|
-
* {@link
|
|
86
|
+
* {@link BlockEditAuthority}).
|
|
87
87
|
*
|
|
88
88
|
* Takes an input OBJECT: `editor` was the seventh thing to identify (which board, which
|
|
89
89
|
* container, which issue, on whose authority, filed by whom, shaped how), and past a handful a
|
|
@@ -95,7 +95,7 @@ export declare class TaskLinkService {
|
|
|
95
95
|
containerId: string;
|
|
96
96
|
source: TaskSourceKind;
|
|
97
97
|
externalId: string;
|
|
98
|
-
editor:
|
|
98
|
+
editor: BlockEditAuthority;
|
|
99
99
|
createdBy?: string | null;
|
|
100
100
|
shape?: {
|
|
101
101
|
taskType?: CreateTaskType;
|
|
@@ -121,7 +121,7 @@ export declare class TaskLinkService {
|
|
|
121
121
|
source: TaskSourceKind;
|
|
122
122
|
epicRef: string;
|
|
123
123
|
containerId: string;
|
|
124
|
-
editor:
|
|
124
|
+
editor: BlockEditAuthority;
|
|
125
125
|
createdBy?: string | null;
|
|
126
126
|
position?: Position;
|
|
127
127
|
}): Promise<SpawnedEpic>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskLinkService.d.ts","sourceRoot":"","sources":["../../../src/modules/tasks/TaskLinkService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,cAAc,EACd,QAAQ,EACR,UAAU,EAGV,cAAc,EACf,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"TaskLinkService.d.ts","sourceRoot":"","sources":["../../../src/modules/tasks/TaskLinkService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,cAAc,EACd,QAAQ,EACR,UAAU,EAGV,cAAc,EACf,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,KAAK,EAAE,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AC,CAcrB;IAED;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACG,mBAAmB,CAAC,KAAK,EAAE;QAC/B,WAAW,EAAE,MAAM,CAAA;QACnB,WAAW,EAAE,MAAM,CAAA;QACnB,MAAM,EAAE,cAAc,CAAA;QACtB,UAAU,EAAE,MAAM,CAAA;QAClB,MAAM,EAAE,kBAAkB,CAAA;QAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QACzB,KAAK,CAAC,EAAE;YAAE,QAAQ,CAAC,EAAE,cAAc,CAAC;YAAC,UAAU,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAC3D,GAAG,OAAO,CAAC,aAAa,CAAC,CAkDzB;IAED;;;;;;;;;;;;;OAaG;IACG,SAAS,CAAC,KAAK,EAAE;QACrB,WAAW,EAAE,MAAM,CAAA;QACnB,MAAM,EAAE,cAAc,CAAA;QACtB,OAAO,EAAE,MAAM,CAAA;QACf,WAAW,EAAE,MAAM,CAAA;QACnB,MAAM,EAAE,kBAAkB,CAAA;QAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QACzB,QAAQ,CAAC,EAAE,QAAQ,CAAA;KACpB,GAAG,OAAO,CAAC,WAAW,CAAC,CA0FvB;CACF;AAcD,mGAAmG;AACnG,KAAK,SAAS,GAAG;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,yEAAyE;AACzE,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAEvD;AAED,iFAAiF;AACjF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAI7D"}
|
|
@@ -89,7 +89,7 @@ export class TaskLinkService {
|
|
|
89
89
|
* because only the caller knows: filing an issue from the SPA is a member acting on their own
|
|
90
90
|
* board, while the tracker reconciliation sweep behind the same method holds no tier at all.
|
|
91
91
|
* Deciding it here would pick one of those and be wrong about the other (see
|
|
92
|
-
* {@link
|
|
92
|
+
* {@link BlockEditAuthority}).
|
|
93
93
|
*
|
|
94
94
|
* Takes an input OBJECT: `editor` was the seventh thing to identify (which board, which
|
|
95
95
|
* container, which issue, on whose authority, filed by whom, shaped how), and past a handful a
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cat-factory/integrations",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.140.0",
|
|
4
4
|
"description": "External-system integration domain logic for the Agent Architecture Board (GitHub, documents, tasks, environments, runners).",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
"ai": "^7.0.51",
|
|
28
28
|
"p-map": "^7.0.6",
|
|
29
29
|
"yaml": "^2.9.0",
|
|
30
|
-
"@cat-factory/contracts": "0.
|
|
31
|
-
"@cat-factory/kernel": "0.
|
|
30
|
+
"@cat-factory/contracts": "0.261.0",
|
|
31
|
+
"@cat-factory/kernel": "0.259.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"typescript": "7.0.2",
|
|
35
35
|
"undici": "^8.10.0",
|
|
36
36
|
"valibot": "^1.4.2",
|
|
37
37
|
"vitest": "^4.1.10",
|
|
38
|
-
"@cat-factory/caching": "0.
|
|
38
|
+
"@cat-factory/caching": "0.17.0"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "tsc -b tsconfig.build.json",
|