@cat-factory/orchestration 0.323.2 → 0.324.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/container/dependencies.d.ts +7 -1
- package/dist/container/dependencies.d.ts.map +1 -1
- package/dist/container/modules.d.ts.map +1 -1
- package/dist/container/modules.js +1 -0
- package/dist/container/modules.js.map +1 -1
- package/dist/container/review-modules.d.ts.map +1 -1
- package/dist/container/review-modules.js +10 -0
- package/dist/container/review-modules.js.map +1 -1
- package/dist/modules/artifacts/artifactRetention.d.ts +3 -1
- package/dist/modules/artifacts/artifactRetention.d.ts.map +1 -1
- package/dist/modules/artifacts/artifactRetention.js +19 -0
- package/dist/modules/artifacts/artifactRetention.js.map +1 -1
- package/dist/modules/board/BoardService.d.ts +12 -2
- package/dist/modules/board/BoardService.d.ts.map +1 -1
- package/dist/modules/board/BoardService.js +12 -1
- package/dist/modules/board/BoardService.js.map +1 -1
- package/dist/modules/board/blockArtifacts.d.ts +27 -0
- package/dist/modules/board/blockArtifacts.d.ts.map +1 -0
- package/dist/modules/board/blockArtifacts.js +35 -0
- package/dist/modules/board/blockArtifacts.js.map +1 -0
- package/dist/modules/board/blockRemoval.d.ts +7 -1
- package/dist/modules/board/blockRemoval.d.ts.map +1 -1
- package/dist/modules/board/blockRemoval.js +2 -0
- package/dist/modules/board/blockRemoval.js.map +1 -1
- package/dist/modules/board/reparentWrite.d.ts +4 -1
- package/dist/modules/board/reparentWrite.d.ts.map +1 -1
- package/dist/modules/board/reparentWrite.js +2 -0
- package/dist/modules/board/reparentWrite.js.map +1 -1
- package/dist/modules/execution/AgentContextBuilder.d.ts +3 -1
- package/dist/modules/execution/AgentContextBuilder.d.ts.map +1 -1
- package/dist/modules/execution/AgentContextBuilder.js.map +1 -1
- package/dist/modules/execution/ExecutionServiceDependencies.d.ts +3 -1
- package/dist/modules/execution/ExecutionServiceDependencies.d.ts.map +1 -1
- package/dist/modules/execution/block-reference-set.d.ts +3 -1
- package/dist/modules/execution/block-reference-set.d.ts.map +1 -1
- package/dist/modules/execution/block-reference-set.js +4 -2
- package/dist/modules/execution/block-reference-set.js.map +1 -1
- package/dist/modules/execution/run-context-admission.d.ts +1 -1
- package/dist/modules/execution/run-context-admission.d.ts.map +1 -1
- package/dist/modules/execution/run-context-admission.js +1 -0
- package/dist/modules/execution/run-context-admission.js.map +1 -1
- package/dist/modules/execution/run-images.d.ts +9 -3
- package/dist/modules/execution/run-images.d.ts.map +1 -1
- package/dist/modules/execution/run-images.js +20 -3
- package/dist/modules/execution/run-images.js.map +1 -1
- package/dist/modules/execution/run-reference-screenshots.d.ts +1 -1
- package/dist/modules/execution/run-reference-screenshots.d.ts.map +1 -1
- package/dist/modules/execution/run-reference-screenshots.js.map +1 -1
- package/dist/modules/execution/run-task-images.d.ts +12 -0
- package/dist/modules/execution/run-task-images.d.ts.map +1 -0
- package/dist/modules/execution/run-task-images.js +31 -0
- package/dist/modules/execution/run-task-images.js.map +1 -0
- package/dist/modules/recurring/RecurringPipelineService.d.ts +4 -1
- package/dist/modules/recurring/RecurringPipelineService.d.ts.map +1 -1
- package/dist/modules/recurring/RecurringPipelineService.js +4 -0
- package/dist/modules/recurring/RecurringPipelineService.js.map +1 -1
- package/dist/modules/review/IterativeReviewService.d.ts +8 -1
- package/dist/modules/review/IterativeReviewService.d.ts.map +1 -1
- package/dist/modules/review/IterativeReviewService.js +3 -2
- package/dist/modules/review/IterativeReviewService.js.map +1 -1
- package/dist/modules/review/reviewTaskImages.d.ts +37 -0
- package/dist/modules/review/reviewTaskImages.d.ts.map +1 -0
- package/dist/modules/review/reviewTaskImages.js +48 -0
- package/dist/modules/review/reviewTaskImages.js.map +1 -0
- package/package.json +11 -11
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Block, Logger, ModelRef, ResolveBinaryArtifactStore } from '@cat-factory/kernel';
|
|
2
|
+
/** What an inline review call's prompt needs from the task's attached images. */
|
|
3
|
+
export interface ReviewTaskImageDeps {
|
|
4
|
+
resolveBinaryArtifactStore?: ResolveBinaryArtifactStore;
|
|
5
|
+
runsInline?: (ref: ModelRef) => boolean;
|
|
6
|
+
logger?: Logger;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* The request body of one inline review call: the prompt plus the images attached to the task
|
|
10
|
+
* under review, as a spread-ready `{ prompt }` or `{ messages }`.
|
|
11
|
+
*
|
|
12
|
+
* The reviewers judge a task's description, and an image its author attached is part of that
|
|
13
|
+
* description, so the call carries it as image input wherever the model takes one and STATES it
|
|
14
|
+
* otherwise. A task with no attached image (most of them) gets the plain prompt, byte-identical.
|
|
15
|
+
*
|
|
16
|
+
* No store failure fails a review. A LISTING that failed cannot say whether the task had images,
|
|
17
|
+
* so it adds nothing to the prompt; a BYTE read that failed after the listing named the images
|
|
18
|
+
* settles as `transfer_failed`, so the prompt states that they were withheld.
|
|
19
|
+
*/
|
|
20
|
+
export declare function reviewRequestWithTaskImages(deps: ReviewTaskImageDeps, workspaceId: string, block: Block, ref: ModelRef, prompt: string): Promise<{
|
|
21
|
+
messages: {
|
|
22
|
+
role: 'user';
|
|
23
|
+
content: ({
|
|
24
|
+
type: 'image';
|
|
25
|
+
image: Uint8Array<ArrayBufferLike>;
|
|
26
|
+
mediaType: string;
|
|
27
|
+
} | {
|
|
28
|
+
type: 'text';
|
|
29
|
+
text: string;
|
|
30
|
+
})[];
|
|
31
|
+
}[];
|
|
32
|
+
prompt?: undefined;
|
|
33
|
+
} | {
|
|
34
|
+
messages?: undefined;
|
|
35
|
+
prompt: string;
|
|
36
|
+
}>;
|
|
37
|
+
//# sourceMappingURL=reviewTaskImages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reviewTaskImages.d.ts","sourceRoot":"","sources":["../../../src/modules/review/reviewTaskImages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAA;AAU9F,iFAAiF;AACjF,MAAM,WAAW,mBAAmB;IAClC,0BAA0B,CAAC,EAAE,0BAA0B,CAAA;IACvD,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,QAAQ,KAAK,OAAO,CAAA;IACvC,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,2BAA2B,CAC/C,IAAI,EAAE,mBAAmB,EACzB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,QAAQ,EACb,MAAM,EAAE,MAAM;;cA+BE,MAAM;;;;;;kBACM,MAAM;;;;;;;;GAKnC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { noopLogger, runBestEffort } from '@cat-factory/kernel';
|
|
2
|
+
import { imageParts, inlineImageStore, prepareInlineImages, renderTaskImages, } from '@cat-factory/agents';
|
|
3
|
+
import { taskImageSet } from '../execution/run-task-images.js';
|
|
4
|
+
/**
|
|
5
|
+
* The request body of one inline review call: the prompt plus the images attached to the task
|
|
6
|
+
* under review, as a spread-ready `{ prompt }` or `{ messages }`.
|
|
7
|
+
*
|
|
8
|
+
* The reviewers judge a task's description, and an image its author attached is part of that
|
|
9
|
+
* description, so the call carries it as image input wherever the model takes one and STATES it
|
|
10
|
+
* otherwise. A task with no attached image (most of them) gets the plain prompt, byte-identical.
|
|
11
|
+
*
|
|
12
|
+
* No store failure fails a review. A LISTING that failed cannot say whether the task had images,
|
|
13
|
+
* so it adds nothing to the prompt; a BYTE read that failed after the listing named the images
|
|
14
|
+
* settles as `transfer_failed`, so the prompt states that they were withheld.
|
|
15
|
+
*/
|
|
16
|
+
export async function reviewRequestWithTaskImages(deps, workspaceId, block, ref, prompt) {
|
|
17
|
+
const logger = deps.logger ?? noopLogger;
|
|
18
|
+
// Resolved once for the listing and the byte reads both.
|
|
19
|
+
const store = inlineImageStore(deps.resolveBinaryArtifactStore, workspaceId);
|
|
20
|
+
const set = store
|
|
21
|
+
? await runBestEffort(logger, 'review: read task images', async () => {
|
|
22
|
+
const resolved = await store();
|
|
23
|
+
return resolved
|
|
24
|
+
? taskImageSet(await resolved.listByBlock(workspaceId, block.id))
|
|
25
|
+
: undefined;
|
|
26
|
+
}, { workspaceId, blockId: block.id })
|
|
27
|
+
: undefined;
|
|
28
|
+
const prepared = await prepareInlineImages({
|
|
29
|
+
set,
|
|
30
|
+
ref,
|
|
31
|
+
textOnly: deps.runsInline?.(ref) ?? false,
|
|
32
|
+
store,
|
|
33
|
+
workspaceId,
|
|
34
|
+
logger,
|
|
35
|
+
});
|
|
36
|
+
const text = prompt + renderTaskImages(prepared.outcome?.set, prepared.outcome?.delivery);
|
|
37
|
+
return prepared.images.length
|
|
38
|
+
? {
|
|
39
|
+
messages: [
|
|
40
|
+
{
|
|
41
|
+
role: 'user',
|
|
42
|
+
content: [{ type: 'text', text }, ...imageParts(prepared.images)],
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
}
|
|
46
|
+
: { prompt: text };
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=reviewTaskImages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reviewTaskImages.js","sourceRoot":"","sources":["../../../src/modules/review/reviewTaskImages.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAS9D;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC/C,IAAyB,EACzB,WAAmB,EACnB,KAAY,EACZ,GAAa,EACb,MAAc;IAEd,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,UAAU,CAAA;IACxC,yDAAyD;IACzD,MAAM,KAAK,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|
|
3
|
+
"version": "0.324.0",
|
|
4
4
|
"description": "Delivery-workflow engine for the Agent Architecture Board (execution, bootstrap, pipelines, board, boardScan, requirements, and composition root).",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,19 +24,19 @@
|
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@cat-factory/agents": "0.
|
|
28
|
-
"@cat-factory/caching": "0.20.
|
|
29
|
-
"@cat-factory/contracts": "0.
|
|
30
|
-
"@cat-factory/integrations": "0.178.
|
|
31
|
-
"@cat-factory/kernel": "0.
|
|
32
|
-
"@cat-factory/prompt-fragments": "1.1.
|
|
33
|
-
"@cat-factory/sandbox": "0.12.
|
|
34
|
-
"@cat-factory/spend": "0.23.
|
|
35
|
-
"@cat-factory/workspaces": "0.31.
|
|
27
|
+
"@cat-factory/agents": "0.173.0",
|
|
28
|
+
"@cat-factory/caching": "0.20.114",
|
|
29
|
+
"@cat-factory/contracts": "0.377.0",
|
|
30
|
+
"@cat-factory/integrations": "0.178.3",
|
|
31
|
+
"@cat-factory/kernel": "0.364.0",
|
|
32
|
+
"@cat-factory/prompt-fragments": "1.1.76",
|
|
33
|
+
"@cat-factory/sandbox": "0.12.90",
|
|
34
|
+
"@cat-factory/spend": "0.23.25",
|
|
35
|
+
"@cat-factory/workspaces": "0.31.3",
|
|
36
36
|
"ai": "^7.0.142"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@cat-factory/sandbox-fixtures": "0.8.
|
|
39
|
+
"@cat-factory/sandbox-fixtures": "0.8.63",
|
|
40
40
|
"typescript": "7.0.2",
|
|
41
41
|
"vitest": "^5.0.5"
|
|
42
42
|
},
|