@cat-factory/integrations 0.128.1 → 0.130.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/documents/DocumentLinkService.d.ts +6 -1
- package/dist/modules/documents/DocumentLinkService.d.ts.map +1 -1
- package/dist/modules/documents/DocumentLinkService.js +14 -17
- package/dist/modules/documents/DocumentLinkService.js.map +1 -1
- package/dist/modules/publicApi/PublicApiKeyService.d.ts +14 -1
- package/dist/modules/publicApi/PublicApiKeyService.d.ts.map +1 -1
- package/dist/modules/publicApi/PublicApiKeyService.js +16 -2
- package/dist/modules/publicApi/PublicApiKeyService.js.map +1 -1
- package/dist/modules/tasks/BugHuntService.d.ts +15 -1
- package/dist/modules/tasks/BugHuntService.d.ts.map +1 -1
- package/dist/modules/tasks/BugHuntService.js +19 -6
- package/dist/modules/tasks/BugHuntService.js.map +1 -1
- package/dist/modules/tasks/TaskLinkService.d.ts +36 -4
- package/dist/modules/tasks/TaskLinkService.d.ts.map +1 -1
- package/dist/modules/tasks/TaskLinkService.js +21 -4
- package/dist/modules/tasks/TaskLinkService.js.map +1 -1
- package/package.json +6 -6
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DocKind, DocumentBoardPlan, DocumentLinkRole, DocumentRef, SourceDocument, DocumentOrigin } from '@cat-factory/kernel';
|
|
2
|
+
import type { BlockEditActor } from '@cat-factory/contracts';
|
|
2
3
|
import type { BlockRepository } from '@cat-factory/kernel';
|
|
3
4
|
import type { DocumentRepository } from '@cat-factory/kernel';
|
|
4
5
|
import type { BoardWritePort } from '@cat-factory/kernel';
|
|
@@ -20,8 +21,12 @@ export declare class DocumentLinkService {
|
|
|
20
21
|
* Apply a board plan to a workspace. Without `frameId` each planned frame
|
|
21
22
|
* becomes a new top-level frame; with it, the plan's modules and tasks are
|
|
22
23
|
* added inside that existing frame (the planned frames are flattened into it).
|
|
24
|
+
*
|
|
25
|
+
* `editor` is whose authority every block below is written under. The STRUCTURE comes from an
|
|
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 BlockEditActor}).
|
|
23
28
|
*/
|
|
24
|
-
spawn(workspaceId: string, plan: DocumentBoardPlan, frameId?: string): Promise<SpawnResult>;
|
|
29
|
+
spawn(workspaceId: string, plan: DocumentBoardPlan, editor: BlockEditActor, frameId?: string): Promise<SpawnResult>;
|
|
25
30
|
/** Add a planned frame's modules and tasks inside an existing frame. */
|
|
26
31
|
private spawnInto;
|
|
27
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;
|
|
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,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAE5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAczD,MAAM,WAAW,+BAA+B;IAC9C,YAAY,EAAE,cAAc,CAAA;IAC5B,eAAe,EAAE,eAAe,CAAA;IAChC,kBAAkB,EAAE,kBAAkB,CAAA;CACvC;AAED,iEAAiE;AACjE,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAA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GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAGlE;CACF"}
|
|
@@ -13,8 +13,12 @@ export class DocumentLinkService {
|
|
|
13
13
|
* Apply a board plan to a workspace. Without `frameId` each planned frame
|
|
14
14
|
* becomes a new top-level frame; with it, the plan's modules and tasks are
|
|
15
15
|
* added inside that existing frame (the planned frames are flattened into it).
|
|
16
|
+
*
|
|
17
|
+
* `editor` is whose authority every block below is written under. The STRUCTURE comes from an
|
|
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 BlockEditActor}).
|
|
16
20
|
*/
|
|
17
|
-
async spawn(workspaceId, plan, frameId) {
|
|
21
|
+
async spawn(workspaceId, plan, editor, frameId) {
|
|
18
22
|
const result = { frames: 0, modules: 0, tasks: 0 };
|
|
19
23
|
if (frameId) {
|
|
20
24
|
const target = assertFound(await this.deps.blockRepository.get(workspaceId, frameId), 'Block', frameId);
|
|
@@ -22,7 +26,7 @@ export class DocumentLinkService {
|
|
|
22
26
|
throw new ValidationError('Document structure can only be spawned into a service frame');
|
|
23
27
|
}
|
|
24
28
|
for (const frame of plan.frames) {
|
|
25
|
-
await this.spawnInto(workspaceId, target.id, frame, result);
|
|
29
|
+
await this.spawnInto(workspaceId, target.id, frame, result, editor);
|
|
26
30
|
}
|
|
27
31
|
return result;
|
|
28
32
|
}
|
|
@@ -34,18 +38,15 @@ export class DocumentLinkService {
|
|
|
34
38
|
});
|
|
35
39
|
column += 1;
|
|
36
40
|
result.frames += 1;
|
|
37
|
-
await this.deps.boardService.updateBlock(workspaceId, created.id, {
|
|
38
|
-
|
|
39
|
-
...(frame.description ? { description: frame.description } : {}),
|
|
40
|
-
});
|
|
41
|
-
await this.spawnInto(workspaceId, created.id, frame, result);
|
|
41
|
+
await this.deps.boardService.updateBlock(workspaceId, created.id, { title: frame.title, ...(frame.description ? { description: frame.description } : {}) }, editor);
|
|
42
|
+
await this.spawnInto(workspaceId, created.id, frame, result, editor);
|
|
42
43
|
}
|
|
43
44
|
return result;
|
|
44
45
|
}
|
|
45
46
|
/** Add a planned frame's modules and tasks inside an existing frame. */
|
|
46
|
-
async spawnInto(workspaceId, frameId, frame, result) {
|
|
47
|
+
async spawnInto(workspaceId, frameId, frame, result, editor) {
|
|
47
48
|
for (const task of frame.tasks) {
|
|
48
|
-
await this.addTask(workspaceId, frameId, task, result);
|
|
49
|
+
await this.addTask(workspaceId, frameId, task, result, editor);
|
|
49
50
|
}
|
|
50
51
|
for (const planModule of frame.modules) {
|
|
51
52
|
const module = await this.deps.boardService.addModule(workspaceId, frameId, {
|
|
@@ -53,19 +54,15 @@ export class DocumentLinkService {
|
|
|
53
54
|
});
|
|
54
55
|
result.modules += 1;
|
|
55
56
|
for (const task of planModule.tasks) {
|
|
56
|
-
await this.addTask(workspaceId, module.id, task, result);
|
|
57
|
+
await this.addTask(workspaceId, module.id, task, result, editor);
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
|
-
async addTask(workspaceId, containerId, task, result) {
|
|
61
|
-
const created = await this.deps.boardService.addTask(workspaceId, containerId, {
|
|
62
|
-
title: task.title,
|
|
63
|
-
});
|
|
61
|
+
async addTask(workspaceId, containerId, task, result, editor) {
|
|
62
|
+
const created = await this.deps.boardService.addTask(workspaceId, containerId, { title: task.title }, editor);
|
|
64
63
|
result.tasks += 1;
|
|
65
64
|
if (task.description) {
|
|
66
|
-
await this.deps.boardService.updateBlock(workspaceId, created.id, {
|
|
67
|
-
description: task.description,
|
|
68
|
-
});
|
|
65
|
+
await this.deps.boardService.updateBlock(workspaceId, created.id, { description: task.description }, editor);
|
|
69
66
|
}
|
|
70
67
|
}
|
|
71
68
|
// Everything below addresses a document by its stored `(source, externalId)` key and asks
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentLinkService.js","sourceRoot":"","sources":["../../../src/modules/documents/DocumentLinkService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Doc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AC,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"}
|
|
@@ -46,10 +46,23 @@ export declare class PublicApiKeyService {
|
|
|
46
46
|
accountId: string;
|
|
47
47
|
workspaceId: string;
|
|
48
48
|
createdByUserId?: string | null;
|
|
49
|
+
/** Set only for a headless mint: the key that authenticated `POST /api/v1/keys`. */
|
|
50
|
+
createdByKeyId?: string | null;
|
|
49
51
|
}, label: string, scope?: PublicApiScope): Promise<IssuedPublicApiKey>;
|
|
50
52
|
/** All live keys for a workspace (metadata only, never a secret). */
|
|
51
53
|
list(workspaceId: string): Promise<PublicApiKeyRecord[]>;
|
|
52
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* Revoke a key AND every key it minted, scoped to its workspace. Idempotent.
|
|
56
|
+
*
|
|
57
|
+
* The cascade is what makes headless provisioning (`POST /api/v1/keys`) safe to offer: without
|
|
58
|
+
* it, revoking a leaked key that had minted others would revoke the credential the operator can
|
|
59
|
+
* SEE and leave behind the ones the attacker made, which is the compromise surviving its own
|
|
60
|
+
* cleanup. The chain is exactly one link long by construction (a minted key can never reach the
|
|
61
|
+
* `admin` rung minting requires), so this is one extra statement, never a walk.
|
|
62
|
+
*
|
|
63
|
+
* Ordered minter-first: the two writes are not one transaction, so a failure between them must
|
|
64
|
+
* leave the credential someone came here to kill already dead.
|
|
65
|
+
*/
|
|
53
66
|
revoke(workspaceId: string, id: string): Promise<void>;
|
|
54
67
|
/**
|
|
55
68
|
* Verify a presented raw key. Returns the resolved scope on success (and stamps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicApiKeyService.d.ts","sourceRoot":"","sources":["../../../src/modules/publicApi/PublicApiKeyService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,WAAW,EACX,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAA;AA0B/E,MAAM,WAAW,+BAA+B;IAC9C,UAAU,EAAE,sBAAsB,CAAA;IAClC;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,WAAW,CAAA;IACxB,KAAK,EAAE,KAAK,CAAA;CACb;AAED,iEAAiE;AACjE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB;;;OAGG;IACH,KAAK,EAAE,cAAc,CAAA;CACtB;AAYD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,cAAc,GAAG,OAAO,CAElF;AAED,6FAA6F;AAC7F,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,kBAAkB,CAAA;IAC1B,gEAAgE;IAChE,MAAM,EAAE,MAAM,CAAA;CACf;AAED,qBAAa,mBAAmB;IAGlB,OAAO,CAAC,QAAQ,CAAC,IAAI;IAFjC,OAAO,CAAC,cAAc,CAAC,CAAoB;IAE3C,YAA6B,IAAI,EAAE,+BAA+B,EAAI;IAEtE;;;OAGG;IACG,KAAK,CACT,KAAK,EAAE;
|
|
1
|
+
{"version":3,"file":"PublicApiKeyService.d.ts","sourceRoot":"","sources":["../../../src/modules/publicApi/PublicApiKeyService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,WAAW,EACX,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAA;AA0B/E,MAAM,WAAW,+BAA+B;IAC9C,UAAU,EAAE,sBAAsB,CAAA;IAClC;;;;OAIG;IACH,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,WAAW,CAAA;IACxB,KAAK,EAAE,KAAK,CAAA;CACb;AAED,iEAAiE;AACjE,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB;;;OAGG;IACH,KAAK,EAAE,cAAc,CAAA;CACtB;AAYD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,cAAc,GAAG,OAAO,CAElF;AAED,6FAA6F;AAC7F,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,kBAAkB,CAAA;IAC1B,gEAAgE;IAChE,MAAM,EAAE,MAAM,CAAA;CACf;AAED,qBAAa,mBAAmB;IAGlB,OAAO,CAAC,QAAQ,CAAC,IAAI;IAFjC,OAAO,CAAC,cAAc,CAAC,CAAoB;IAE3C,YAA6B,IAAI,EAAE,+BAA+B,EAAI;IAEtE;;;OAGG;IACG,KAAK,CACT,KAAK,EAAE;QACL,SAAS,EAAE,MAAM,CAAA;QACjB,WAAW,EAAE,MAAM,CAAA;QACnB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QAC/B,oFAAoF;QACpF,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAC/B,EACD,KAAK,EAAE,MAAM,EACb,KAAK,GAAE,cAAwB,GAC9B,OAAO,CAAC,kBAAkB,CAAC,CA+B7B;IAED,qEAAqE;IAC/D,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAE7D;IAED;;;;;;;;;;;OAWG;IACG,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAI3D;IAED;;;;;OAKG;IACG,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAmB/E;IAED;;;;;OAKG;IACG,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAG9C;IAED,OAAO,CAAC,OAAO;YAaD,IAAI;CAQnB"}
|
|
@@ -69,6 +69,7 @@ export class PublicApiKeyService {
|
|
|
69
69
|
scope,
|
|
70
70
|
secretHash: await this.hash(secret),
|
|
71
71
|
createdByUserId: owner.createdByUserId ?? null,
|
|
72
|
+
createdByKeyId: owner.createdByKeyId ?? null,
|
|
72
73
|
createdAt: this.deps.clock.now(),
|
|
73
74
|
lastUsedAt: null,
|
|
74
75
|
revokedAt: null,
|
|
@@ -80,9 +81,22 @@ export class PublicApiKeyService {
|
|
|
80
81
|
async list(workspaceId) {
|
|
81
82
|
return this.deps.repository.listByWorkspace(workspaceId);
|
|
82
83
|
}
|
|
83
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* Revoke a key AND every key it minted, scoped to its workspace. Idempotent.
|
|
86
|
+
*
|
|
87
|
+
* The cascade is what makes headless provisioning (`POST /api/v1/keys`) safe to offer: without
|
|
88
|
+
* it, revoking a leaked key that had minted others would revoke the credential the operator can
|
|
89
|
+
* SEE and leave behind the ones the attacker made, which is the compromise surviving its own
|
|
90
|
+
* cleanup. The chain is exactly one link long by construction (a minted key can never reach the
|
|
91
|
+
* `admin` rung minting requires), so this is one extra statement, never a walk.
|
|
92
|
+
*
|
|
93
|
+
* Ordered minter-first: the two writes are not one transaction, so a failure between them must
|
|
94
|
+
* leave the credential someone came here to kill already dead.
|
|
95
|
+
*/
|
|
84
96
|
async revoke(workspaceId, id) {
|
|
85
|
-
|
|
97
|
+
const at = this.deps.clock.now();
|
|
98
|
+
await this.deps.repository.revoke(workspaceId, id, at);
|
|
99
|
+
await this.deps.repository.revokeMintedBy(workspaceId, id, at);
|
|
86
100
|
}
|
|
87
101
|
/**
|
|
88
102
|
* Verify a presented raw key. Returns the resolved scope on success (and stamps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicApiKeyService.js","sourceRoot":"","sources":["../../../src/modules/publicApi/PublicApiKeyService.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,iBAAiB,EAAuB,MAAM,wBAAwB,CAAA;AAE/E,wFAAwF;AACxF,0FAA0F;AAC1F,uFAAuF;AACvF,sFAAsF;AACtF,2FAA2F;AAC3F,4FAA4F;AAC5F,EAAE;AACF,0FAA0F;AAC1F,6FAA6F;AAE7F,8CAA8C;AAC9C,MAAM,cAAc,GAAG,UAAU,CAAA;AACjC,qDAAqD;AACrD,MAAM,YAAY,GAAG,EAAE,CAAA;AACvB,kFAAkF;AAClF,MAAM,sBAAsB,GAAG,EAAE,CAAA;AACjC;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AE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAA;IAC7D,OAAO,GAAG,CAAA;AACZ,CAAC;AAED,0FAA0F;AAC1F,SAAS,kBAAkB,CAAC,CAAS,EAAE,CAAS;IAC9C,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QAAE,OAAO,KAAK,CAAA;IACvC,IAAI,IAAI,GAAG,CAAC,CAAA;IACZ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE;QAAE,IAAI,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;IAC5E,OAAO,IAAI,KAAK,CAAC,CAAA;AACnB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { BlockEditActor } from '@cat-factory/contracts';
|
|
1
2
|
import type { BugHuntAssessor, BugHuntResult, RunBugHuntInput, TaskConnectionRepository, TaskRepository, TaskSourceKind, TaskSourceRegistry, TrackerBoard } from '@cat-factory/kernel';
|
|
2
3
|
import type { TaskImportService } from './TaskImportService.js';
|
|
3
4
|
import type { TaskFromIssue, TaskLinkService } from './TaskLinkService.js';
|
|
@@ -59,8 +60,21 @@ export declare class BugHuntService {
|
|
|
59
60
|
* Stops there deliberately. Starting the run needs the execution engine (and the initiator's
|
|
60
61
|
* personal-credential gate), which is the HTTP layer's job — this service stays inside the
|
|
61
62
|
* integrations layer, exactly as `BugIntakeService` hands its pickup back to the engine.
|
|
63
|
+
*
|
|
64
|
+
* `editor` travels beside `createdBy` and is the same person: an adoption is a member-tier board
|
|
65
|
+
* write, and the run it leads to is an ATTRIBUTED start (`runInitiatorRole`). The two answers
|
|
66
|
+
* have to agree, or a tier sandboxed for its runs could still author the task those runs are
|
|
67
|
+
* governed by (ADR 0037).
|
|
62
68
|
*/
|
|
63
|
-
adopt(
|
|
69
|
+
adopt(input: {
|
|
70
|
+
workspaceId: string;
|
|
71
|
+
source: TaskSourceKind;
|
|
72
|
+
externalId: string;
|
|
73
|
+
containerId: string;
|
|
74
|
+
editor: BlockEditActor;
|
|
75
|
+
createdBy: string | null;
|
|
76
|
+
pipelineId: string;
|
|
77
|
+
}): Promise<TaskFromIssue>;
|
|
64
78
|
/**
|
|
65
79
|
* Rank a candidate set, degrading to the unranked list with a stated reason. The model's
|
|
66
80
|
* verdicts are joined onto the provider's rows by `rankBugCandidates`, so a hallucinated
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BugHuntService.d.ts","sourceRoot":"","sources":["../../../src/modules/tasks/BugHuntService.ts"],"names":[],"mappings":"AAAA,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;;;;OAI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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,cAAc,CAAA;QACtB,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"}
|
|
@@ -89,14 +89,27 @@ export class BugHuntService {
|
|
|
89
89
|
* Stops there deliberately. Starting the run needs the execution engine (and the initiator's
|
|
90
90
|
* personal-credential gate), which is the HTTP layer's job — this service stays inside the
|
|
91
91
|
* integrations layer, exactly as `BugIntakeService` hands its pickup back to the engine.
|
|
92
|
+
*
|
|
93
|
+
* `editor` travels beside `createdBy` and is the same person: an adoption is a member-tier board
|
|
94
|
+
* write, and the run it leads to is an ATTRIBUTED start (`runInitiatorRole`). The two answers
|
|
95
|
+
* have to agree, or a tier sandboxed for its runs could still author the task those runs are
|
|
96
|
+
* governed by (ADR 0037).
|
|
92
97
|
*/
|
|
93
|
-
async adopt(
|
|
98
|
+
async adopt(input) {
|
|
99
|
+
const { workspaceId, source, externalId, containerId, editor, createdBy, pipelineId } = input;
|
|
94
100
|
await this.deps.importService.import(workspaceId, source, externalId);
|
|
95
|
-
return this.deps.linkService.createTaskFromIssue(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
101
|
+
return this.deps.linkService.createTaskFromIssue({
|
|
102
|
+
workspaceId,
|
|
103
|
+
containerId,
|
|
104
|
+
source,
|
|
105
|
+
externalId,
|
|
106
|
+
editor,
|
|
107
|
+
createdBy,
|
|
108
|
+
// A hunted issue is a bug by construction, and the pipeline the human confirmed is the
|
|
109
|
+
// one the task's Run controls should default to — so the created task carries both
|
|
110
|
+
// rather than landing as a generic `feature` the user has to re-classify.
|
|
111
|
+
shape: { taskType: 'bug', pipelineId },
|
|
112
|
+
});
|
|
100
113
|
}
|
|
101
114
|
/**
|
|
102
115
|
* Rank a candidate set, degrading to the unranked list with a stated reason. The model's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BugHuntService.js","sourceRoot":"","sources":["../../../src/modules/tasks/BugHuntService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BugHuntService.js","sourceRoot":"","sources":["../../../src/modules/tasks/BugHuntService.ts"],"names":[],"mappings":"AAeA,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,aAAa,GACd,MAAM,qBAAqB,CAAA;AA8C5B;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAA;AAErC,0FAA0F;AAC1F,MAAM,kBAAkB,GAAG,KAAK,CAAA;AAEhC,MAAM,OAAO,cAAc;IACI,IAAI;IAAjC,YAA6B,IAAgC;oBAAhC,IAAI;IAA+B,CAAC;IAEjE;;;;OAIG;IACH,KAAK,CAAC,UAAU,CAAC,WAAmB,EAAE,MAAsB;QAC1D,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QACzD,IAAI,CAAC,QAAQ,EAAE,UAAU,EAAE,CAAC;YAC1B,sFAAsF;YACtF,uFAAuF;YACvF,yFAAyF;YACzF,oFAAoF;YACpF,MAAM,IAAI,eAAe,CAAC,QAAQ,MAAM,iDAAiD,EAAE;gBACzF,MAAM,EAAE,oB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Type, Position, SourceTask, TaskSourceKind } from '@cat-factory/kernel';
|
|
2
|
+
import type { BlockEditActor } from '@cat-factory/contracts';
|
|
2
3
|
import type { BlockRepository } from '@cat-factory/kernel';
|
|
3
4
|
import type { BoardWritePort } from '@cat-factory/kernel';
|
|
4
5
|
import type { TaskRepository } from '@cat-factory/kernel';
|
|
@@ -77,10 +78,29 @@ export declare class TaskLinkService {
|
|
|
77
78
|
* new task — the bug hunt adopts a candidate as a `bug` on the bug-fix pipeline. Omitted
|
|
78
79
|
* (every pre-existing caller) leaves both to `BoardService.addTask`'s defaults, so the
|
|
79
80
|
* generic import path is unchanged.
|
|
81
|
+
*
|
|
82
|
+
* `editor` is whose authority the board write is made under, and it comes from the CALLER
|
|
83
|
+
* because only the caller knows: filing an issue from the SPA is a member acting on their own
|
|
84
|
+
* board, while the tracker reconciliation sweep behind the same method holds no tier at all.
|
|
85
|
+
* Deciding it here would pick one of those and be wrong about the other (see
|
|
86
|
+
* {@link BlockEditActor}).
|
|
87
|
+
*
|
|
88
|
+
* Takes an input OBJECT: `editor` was the seventh thing to identify (which board, which
|
|
89
|
+
* container, which issue, on whose authority, filed by whom, shaped how), and past a handful a
|
|
90
|
+
* positional list stops being readable at the call site and starts being a place to transpose
|
|
91
|
+
* two strings. Same shape as the resolution helpers this file's neighbours already take.
|
|
80
92
|
*/
|
|
81
|
-
createTaskFromIssue(
|
|
82
|
-
|
|
83
|
-
|
|
93
|
+
createTaskFromIssue(input: {
|
|
94
|
+
workspaceId: string;
|
|
95
|
+
containerId: string;
|
|
96
|
+
source: TaskSourceKind;
|
|
97
|
+
externalId: string;
|
|
98
|
+
editor: BlockEditActor;
|
|
99
|
+
createdBy?: string | null;
|
|
100
|
+
shape?: {
|
|
101
|
+
taskType?: CreateTaskType;
|
|
102
|
+
pipelineId?: string;
|
|
103
|
+
};
|
|
84
104
|
}): Promise<TaskFromIssue>;
|
|
85
105
|
/**
|
|
86
106
|
* Spawn an epic and its children onto the board. Imports the epic issue, creates an
|
|
@@ -91,8 +111,20 @@ export declare class TaskLinkService {
|
|
|
91
111
|
* outside the imported set are skipped, and the board's cycle guard protects against bad
|
|
92
112
|
* data (a rejected edge is ignored, never fatal). The board (`epicId` + `dependsOn`) is
|
|
93
113
|
* the source of truth after the spawn; the issue projections back agent context.
|
|
114
|
+
*
|
|
115
|
+
* `editor` is whose authority every child task is created under, supplied by the caller for the
|
|
116
|
+
* reason {@link TaskLinkService.createTaskFromIssue} states, and this takes an input object for
|
|
117
|
+
* the reason stated there too.
|
|
94
118
|
*/
|
|
95
|
-
spawnEpic(
|
|
119
|
+
spawnEpic(input: {
|
|
120
|
+
workspaceId: string;
|
|
121
|
+
source: TaskSourceKind;
|
|
122
|
+
epicRef: string;
|
|
123
|
+
containerId: string;
|
|
124
|
+
editor: BlockEditActor;
|
|
125
|
+
createdBy?: string | null;
|
|
126
|
+
position?: Position;
|
|
127
|
+
}): Promise<SpawnedEpic>;
|
|
96
128
|
}
|
|
97
129
|
/** The issue fields the title/description seeders read (satisfied by TaskRecord + TaskContent). */
|
|
98
130
|
type IssueSeed = {
|
|
@@ -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;
|
|
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,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAE5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,KAAK,EAAE,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
|
|
84
84
|
* new task — the bug hunt adopts a candidate as a `bug` on the bug-fix pipeline. Omitted
|
|
85
85
|
* (every pre-existing caller) leaves both to `BoardService.addTask`'s defaults, so the
|
|
86
86
|
* generic import path is unchanged.
|
|
87
|
+
*
|
|
88
|
+
* `editor` is whose authority the board write is made under, and it comes from the CALLER
|
|
89
|
+
* because only the caller knows: filing an issue from the SPA is a member acting on their own
|
|
90
|
+
* board, while the tracker reconciliation sweep behind the same method holds no tier at all.
|
|
91
|
+
* Deciding it here would pick one of those and be wrong about the other (see
|
|
92
|
+
* {@link BlockEditActor}).
|
|
93
|
+
*
|
|
94
|
+
* Takes an input OBJECT: `editor` was the seventh thing to identify (which board, which
|
|
95
|
+
* container, which issue, on whose authority, filed by whom, shaped how), and past a handful a
|
|
96
|
+
* positional list stops being readable at the call site and starts being a place to transpose
|
|
97
|
+
* two strings. Same shape as the resolution helpers this file's neighbours already take.
|
|
87
98
|
*/
|
|
88
|
-
async createTaskFromIssue(
|
|
99
|
+
async createTaskFromIssue(input) {
|
|
100
|
+
const { workspaceId, containerId, source, externalId, editor, createdBy, shape } = input;
|
|
89
101
|
const issue = assertFound(await this.deps.taskRepository.get(workspaceId, source, externalId), 'Task', externalId);
|
|
90
102
|
// An issue carries a single `linkedBlockId`, so creating a second task from it
|
|
91
103
|
// would silently re-point the link and orphan the first task's issue context.
|
|
@@ -108,7 +120,7 @@ export class TaskLinkService {
|
|
|
108
120
|
description: issueTaskDescription(issue),
|
|
109
121
|
...(shape?.taskType ? { taskType: shape.taskType } : {}),
|
|
110
122
|
...(shape?.pipelineId ? { pipelineId: shape.pipelineId } : {}),
|
|
111
|
-
}, createdBy ?? null);
|
|
123
|
+
}, editor, createdBy ?? null);
|
|
112
124
|
// Link the issue to the new task so agents get the full issue (description,
|
|
113
125
|
// comments, metadata) as context, and the task carries the back-reference. A CLAIM, so a
|
|
114
126
|
// filing that raced the pre-check refuses here instead of re-pointing the winner's link.
|
|
@@ -130,8 +142,13 @@ export class TaskLinkService {
|
|
|
130
142
|
* outside the imported set are skipped, and the board's cycle guard protects against bad
|
|
131
143
|
* data (a rejected edge is ignored, never fatal). The board (`epicId` + `dependsOn`) is
|
|
132
144
|
* the source of truth after the spawn; the issue projections back agent context.
|
|
145
|
+
*
|
|
146
|
+
* `editor` is whose authority every child task is created under, supplied by the caller for the
|
|
147
|
+
* reason {@link TaskLinkService.createTaskFromIssue} states, and this takes an input object for
|
|
148
|
+
* the reason stated there too.
|
|
133
149
|
*/
|
|
134
|
-
async spawnEpic(
|
|
150
|
+
async spawnEpic(input) {
|
|
151
|
+
const { workspaceId, source, epicRef, containerId, editor, createdBy, position } = input;
|
|
135
152
|
// The container must be visible to this workspace (a frame/module the issue tasks land in).
|
|
136
153
|
assertFound(await this.deps.blockRepository.get(workspaceId, containerId), 'Block', containerId);
|
|
137
154
|
const { content: epicContent } = await this.deps.importService.importDetailed(workspaceId, source, epicRef);
|
|
@@ -166,7 +183,7 @@ export class TaskLinkService {
|
|
|
166
183
|
title: issueTaskTitle(content),
|
|
167
184
|
description: issueTaskDescription(content),
|
|
168
185
|
epicId: epic.id,
|
|
169
|
-
}, createdBy ?? null);
|
|
186
|
+
}, editor, createdBy ?? null);
|
|
170
187
|
await this.deps.taskRepository.linkBlock(workspaceId, source, content.externalId, block.id);
|
|
171
188
|
blockOf.set(content.externalId, block.id);
|
|
172
189
|
contents.set(content.externalId, content);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TaskLinkService.js","sourceRoot":"","sources":["../../../src/modules/tasks/TaskLinkService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TaskLinkService.js","sourceRoot":"","sources":["../../../src/modules/tasks/TaskLinkService.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAKhE,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AA6BrD,MAAM,OAAO,eAAe;IACG,IAAI;IAA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AS,GAAG,iBAAiB,IAAI,CAAC,GAAG,EAAE,CAAA;IAC7C,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAA;IACpC,OAAO,IAAI,CAAC,CAAC,CAAC,GAAG,SAAS,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAA;AACrD,CAAC;AAWD,yEAAyE;AACzE,MAAM,UAAU,cAAc,CAAC,KAAgB;IAC7C,OAAO,GAAG,KAAK,CAAC,UAAU,KAAK,KAAK,CAAC,KAAK,EAAE,CAAA;AAC9C,CAAC;AAED,iFAAiF;AACjF,MAAM,UAAU,oBAAoB,CAAC,KAAgB;IACnD,MAAM,SAAS,GAAG,iBAAiB,KAAK,CAAC,GAAG,EAAE,CAAA;IAC9C,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAA;IACrE,OAAO,IAAI,CAAC,CAAC,CAAC,GAAG,SAAS,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAA;AACrD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cat-factory/integrations",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.130.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",
|
|
@@ -24,18 +24,18 @@
|
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"ai": "^7.0.
|
|
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.243.0",
|
|
31
|
+
"@cat-factory/kernel": "0.242.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"typescript": "7.0.2",
|
|
35
|
-
"undici": "^8.
|
|
35
|
+
"undici": "^8.10.0",
|
|
36
36
|
"valibot": "^1.4.2",
|
|
37
37
|
"vitest": "^4.1.10",
|
|
38
|
-
"@cat-factory/caching": "0.14.
|
|
38
|
+
"@cat-factory/caching": "0.14.24"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "tsc -b tsconfig.build.json",
|