@cat-factory/orchestration 0.156.0 → 0.158.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/engine-collaborators.d.ts.map +1 -1
- package/dist/container/engine-collaborators.js +9 -0
- package/dist/container/engine-collaborators.js.map +1 -1
- package/dist/container/foundation.d.ts.map +1 -1
- package/dist/container/foundation.js +5 -4
- package/dist/container/foundation.js.map +1 -1
- package/dist/container.d.ts.map +1 -1
- package/dist/container.js +2 -10
- package/dist/container.js.map +1 -1
- package/dist/modules/board/BoardService.d.ts +30 -14
- package/dist/modules/board/BoardService.d.ts.map +1 -1
- package/dist/modules/board/BoardService.js +21 -17
- package/dist/modules/board/BoardService.js.map +1 -1
- package/dist/modules/board/newServiceFrameDefaults.d.ts +76 -0
- package/dist/modules/board/newServiceFrameDefaults.d.ts.map +1 -0
- package/dist/modules/board/newServiceFrameDefaults.js +66 -0
- package/dist/modules/board/newServiceFrameDefaults.js.map +1 -0
- package/dist/modules/board/reviewFrictionGuard.d.ts +3 -6
- package/dist/modules/board/reviewFrictionGuard.d.ts.map +1 -1
- package/dist/modules/board/reviewFrictionGuard.js.map +1 -1
- package/dist/modules/board/workspaceSettingsReader.d.ts +15 -0
- package/dist/modules/board/workspaceSettingsReader.d.ts.map +1 -0
- package/dist/modules/board/workspaceSettingsReader.js +2 -0
- package/dist/modules/board/workspaceSettingsReader.js.map +1 -0
- package/dist/modules/execution/AgentContextBuilder.d.ts +7 -22
- package/dist/modules/execution/AgentContextBuilder.d.ts.map +1 -1
- package/dist/modules/execution/AgentContextBuilder.js +13 -105
- package/dist/modules/execution/AgentContextBuilder.js.map +1 -1
- package/dist/modules/execution/linked-context.d.ts +64 -0
- package/dist/modules/execution/linked-context.d.ts.map +1 -0
- package/dist/modules/execution/linked-context.js +136 -0
- package/dist/modules/execution/linked-context.js.map +1 -0
- package/dist/modules/initiative/InitiativeInterviewService.d.ts +22 -0
- package/dist/modules/initiative/InitiativeInterviewService.d.ts.map +1 -1
- package/dist/modules/initiative/InitiativeInterviewService.js +45 -7
- package/dist/modules/initiative/InitiativeInterviewService.js.map +1 -1
- package/dist/modules/settings/WorkspaceSettingsService.d.ts.map +1 -1
- package/dist/modules/settings/WorkspaceSettingsService.js +19 -0
- package/dist/modules/settings/WorkspaceSettingsService.js.map +1 -1
- package/package.json +11 -11
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { AgentRunContext, DocumentRecord, DocumentRepository, DocumentSourceKind, TaskRecord, TaskRepository } from '@cat-factory/kernel';
|
|
2
|
+
/**
|
|
3
|
+
* Resolve a URL named in prose to the document it refers to, by its stable
|
|
4
|
+
* `(source, externalId)` key. Built from the document providers' `parseRef` so a noisy
|
|
5
|
+
* pasted link (title segment, `&t=` tracking params, dash vs colon node id) still maps to
|
|
6
|
+
* the canonical id the document was imported under. Returns null when no provider claims
|
|
7
|
+
* the URL.
|
|
8
|
+
*/
|
|
9
|
+
export type DocumentUrlResolver = (url: string) => {
|
|
10
|
+
source: DocumentSourceKind;
|
|
11
|
+
externalId: string;
|
|
12
|
+
} | null;
|
|
13
|
+
/** What the resolver needs; every source is optional, so an unwired deployment resolves nothing. */
|
|
14
|
+
export interface LinkedContextSources {
|
|
15
|
+
documents?: DocumentRepository;
|
|
16
|
+
tasks?: TaskRepository;
|
|
17
|
+
/** Canonicalise a pasted URL to a `(source, externalId)` so link variants still resolve. */
|
|
18
|
+
documentUrlResolver?: DocumentUrlResolver;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Build the URL→document canonicaliser from the configured document providers, so a Figma/Notion
|
|
22
|
+
* link pasted into prose auto-matches its imported page even when it carries a title segment or
|
|
23
|
+
* tracking params the stored canonical url omits. No providers ⇒ undefined (url-string match only).
|
|
24
|
+
*/
|
|
25
|
+
export declare function makeDocumentUrlResolver(providers?: readonly {
|
|
26
|
+
kind: DocumentSourceKind;
|
|
27
|
+
parseRef: (url: string) => string | null;
|
|
28
|
+
}[]): DocumentUrlResolver | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Assemble the resolver's sources from the container's dependency bag, so the engine's dispatch
|
|
31
|
+
* path and the inline initiative interviewer read the same corpus through the same canonicaliser
|
|
32
|
+
* rather than each hand-rolling the assembly.
|
|
33
|
+
*/
|
|
34
|
+
export declare function linkedContextSourcesFrom(deps: {
|
|
35
|
+
documentRepository?: DocumentRepository;
|
|
36
|
+
taskRepository?: TaskRepository;
|
|
37
|
+
documentSourceProviders?: readonly {
|
|
38
|
+
kind: DocumentSourceKind;
|
|
39
|
+
parseRef: (url: string) => string | null;
|
|
40
|
+
}[];
|
|
41
|
+
}): LinkedContextSources;
|
|
42
|
+
/** The resolved context, in the exact shape `AgentRunContext.block` carries it. */
|
|
43
|
+
export interface LinkedContext {
|
|
44
|
+
docs: NonNullable<AgentRunContext['block']['contextDocs']>;
|
|
45
|
+
tasks: NonNullable<AgentRunContext['block']['contextTasks']>;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Resolve the high-confidence external context for a block: the docs/tasks a human attached to it
|
|
49
|
+
* (only when `includeLinked` — skipped in reworked mode, where the incorporated requirements doc
|
|
50
|
+
* already folds them in) UNIONed with any items the `description` names explicitly (a Jira key, a
|
|
51
|
+
* fully-qualified GitHub `owner/repo#N`, or a URL), each resolved against the imported corpus by a
|
|
52
|
+
* POINT LOOKUP (no full-corpus scan — a single keyed/URL query per named reference). Each source
|
|
53
|
+
* repo is optional, so this is a no-op for sources that aren't wired. Deduped by
|
|
54
|
+
* (source, externalId). The full body travels to the container as a materialised file; the prompt
|
|
55
|
+
* carries only the one-line `summary` (see the executor + `linkedContextSection`).
|
|
56
|
+
*/
|
|
57
|
+
export declare function resolveLinkedContext(sources: LinkedContextSources, workspaceId: string, blockId: string, description: string, opts: {
|
|
58
|
+
includeLinked: boolean;
|
|
59
|
+
}): Promise<LinkedContext>;
|
|
60
|
+
/** Map a document record to the agent-context doc shape (summary index + materialisable body). */
|
|
61
|
+
export declare function toContextDoc(d: DocumentRecord): NonNullable<AgentRunContext['block']['contextDocs']>[number];
|
|
62
|
+
/** Map a task record to the agent-context task shape (adds the index `summary`). */
|
|
63
|
+
export declare function toContextTask(t: TaskRecord): NonNullable<AgentRunContext['block']['contextTasks']>[number];
|
|
64
|
+
//# sourceMappingURL=linked-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linked-context.d.ts","sourceRoot":"","sources":["../../../src/modules/execution/linked-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,cAAc,EACf,MAAM,qBAAqB,CAAA;AAI5B;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAChC,GAAG,EAAE,MAAM,KACR;IAAE,MAAM,EAAE,kBAAkB,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAAA;AAY9D,oGAAoG;AACpG,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE,kBAAkB,CAAA;IAC9B,KAAK,CAAC,EAAE,cAAc,CAAA;IACtB,4FAA4F;IAC5F,mBAAmB,CAAC,EAAE,mBAAmB,CAAA;CAC1C;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,GAAE,SAAS;IAAE,IAAI,EAAE,kBAAkB,CAAC;IAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;CAAE,EAAO,GAChG,mBAAmB,GAAG,SAAS,CASjC;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE;IAC7C,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;IACvC,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,uBAAuB,CAAC,EAAE,SAAS;QACjC,IAAI,EAAE,kBAAkB,CAAA;QACxB,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;KACzC,EAAE,CAAA;CACJ,GAAG,oBAAoB,CAOvB;AAED,mFAAmF;AACnF,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,WAAW,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,CAAC,CAAA;IAC1D,KAAK,EAAE,WAAW,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,cAAc,CAAC,CAAC,CAAA;CAC7D;AAED;;;;;;;;;GASG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,oBAAoB,EAC7B,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE;IAAE,aAAa,EAAE,OAAO,CAAA;CAAE,GAC/B,OAAO,CAAC,aAAa,CAAC,CAkExB;AAED,kGAAkG;AAClG,wBAAgB,YAAY,CAC1B,CAAC,EAAE,cAAc,GAChB,WAAW,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAQ9D;AAED,oFAAoF;AACpF,wBAAgB,aAAa,CAC3B,CAAC,EAAE,UAAU,GACZ,WAAW,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,CAc/D"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { buildExcerpt, CONTEXT_BUDGET } from '@cat-factory/kernel';
|
|
2
|
+
import { extractReferences } from '@cat-factory/integrations';
|
|
3
|
+
/**
|
|
4
|
+
* Build the URL→document canonicaliser from the configured document providers, so a Figma/Notion
|
|
5
|
+
* link pasted into prose auto-matches its imported page even when it carries a title segment or
|
|
6
|
+
* tracking params the stored canonical url omits. No providers ⇒ undefined (url-string match only).
|
|
7
|
+
*/
|
|
8
|
+
export function makeDocumentUrlResolver(providers = []) {
|
|
9
|
+
if (!providers.length)
|
|
10
|
+
return undefined;
|
|
11
|
+
return (url) => {
|
|
12
|
+
for (const provider of providers) {
|
|
13
|
+
const externalId = provider.parseRef(url);
|
|
14
|
+
if (externalId)
|
|
15
|
+
return { source: provider.kind, externalId };
|
|
16
|
+
}
|
|
17
|
+
return null;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Assemble the resolver's sources from the container's dependency bag, so the engine's dispatch
|
|
22
|
+
* path and the inline initiative interviewer read the same corpus through the same canonicaliser
|
|
23
|
+
* rather than each hand-rolling the assembly.
|
|
24
|
+
*/
|
|
25
|
+
export function linkedContextSourcesFrom(deps) {
|
|
26
|
+
const documentUrlResolver = makeDocumentUrlResolver(deps.documentSourceProviders);
|
|
27
|
+
return {
|
|
28
|
+
...(deps.documentRepository ? { documents: deps.documentRepository } : {}),
|
|
29
|
+
...(deps.taskRepository ? { tasks: deps.taskRepository } : {}),
|
|
30
|
+
...(documentUrlResolver ? { documentUrlResolver } : {}),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Resolve the high-confidence external context for a block: the docs/tasks a human attached to it
|
|
35
|
+
* (only when `includeLinked` — skipped in reworked mode, where the incorporated requirements doc
|
|
36
|
+
* already folds them in) UNIONed with any items the `description` names explicitly (a Jira key, a
|
|
37
|
+
* fully-qualified GitHub `owner/repo#N`, or a URL), each resolved against the imported corpus by a
|
|
38
|
+
* POINT LOOKUP (no full-corpus scan — a single keyed/URL query per named reference). Each source
|
|
39
|
+
* repo is optional, so this is a no-op for sources that aren't wired. Deduped by
|
|
40
|
+
* (source, externalId). The full body travels to the container as a materialised file; the prompt
|
|
41
|
+
* carries only the one-line `summary` (see the executor + `linkedContextSection`).
|
|
42
|
+
*/
|
|
43
|
+
export async function resolveLinkedContext(sources, workspaceId, blockId, description, opts) {
|
|
44
|
+
const docs = new Map();
|
|
45
|
+
const tasks = new Map();
|
|
46
|
+
const docKey = (d) => `${d.source}:${d.externalId}`;
|
|
47
|
+
const taskKey = (t) => `${t.source}:${t.externalId}`;
|
|
48
|
+
const addDoc = (d) => {
|
|
49
|
+
if (d && !docs.has(docKey(d)))
|
|
50
|
+
docs.set(docKey(d), d);
|
|
51
|
+
};
|
|
52
|
+
const addTask = (t) => {
|
|
53
|
+
if (t && !tasks.has(taskKey(t)))
|
|
54
|
+
tasks.set(taskKey(t), t);
|
|
55
|
+
};
|
|
56
|
+
if (opts.includeLinked) {
|
|
57
|
+
const [linkedDocs, linkedTasks] = await Promise.all([
|
|
58
|
+
sources.documents?.listByBlock(workspaceId, blockId) ?? [],
|
|
59
|
+
sources.tasks?.listByBlock(workspaceId, blockId) ?? [],
|
|
60
|
+
]);
|
|
61
|
+
for (const d of linkedDocs)
|
|
62
|
+
addDoc(d);
|
|
63
|
+
for (const t of linkedTasks)
|
|
64
|
+
addTask(t);
|
|
65
|
+
}
|
|
66
|
+
// Resolve explicitly-named references against the imported corpus — never a full-corpus
|
|
67
|
+
// scan. Only items that actually exist are added (a `UTF-8` that happens to match the
|
|
68
|
+
// Jira-key shape just resolves to nothing); nothing is fetched live. The keyed jira/github
|
|
69
|
+
// refs are BATCH-resolved in one chunked-`IN` read per source (`listByRefs`, never a
|
|
70
|
+
// point-read per reference — an N+1); the URL lookups stay per-URL point reads. Both run
|
|
71
|
+
// concurrently, and results are folded in in reference order so the dedupe (and the
|
|
72
|
+
// resulting context ordering) stays deterministic.
|
|
73
|
+
const refs = extractReferences(description ?? '');
|
|
74
|
+
const documents = sources.documents;
|
|
75
|
+
const taskRepo = sources.tasks;
|
|
76
|
+
const [keyedTasks, urlItems] = await Promise.all([
|
|
77
|
+
taskRepo?.listByRefs(workspaceId, refs.taskRefs) ?? [],
|
|
78
|
+
Promise.all(refs.urls.map(async (url) => {
|
|
79
|
+
const [doc, task] = await Promise.all([
|
|
80
|
+
(async () => {
|
|
81
|
+
if (!documents)
|
|
82
|
+
return null;
|
|
83
|
+
// Prefer a precise match by the document's stable (source, externalId) — a pasted
|
|
84
|
+
// link canonicalised through the providers' parseRef — so a Figma/Notion URL with a
|
|
85
|
+
// title segment or tracking params still resolves. Fall back to the url-string
|
|
86
|
+
// lookup for any source the resolver doesn't claim (or when it isn't wired).
|
|
87
|
+
const ref = sources.documentUrlResolver?.(url);
|
|
88
|
+
const byRef = ref ? await documents.get(workspaceId, ref.source, ref.externalId) : null;
|
|
89
|
+
return byRef ?? (await documents.getByUrl(workspaceId, url));
|
|
90
|
+
})(),
|
|
91
|
+
taskRepo?.getByUrl(workspaceId, url) ?? null,
|
|
92
|
+
]);
|
|
93
|
+
return { doc, task };
|
|
94
|
+
})),
|
|
95
|
+
]);
|
|
96
|
+
// Fold the batch result in in reference order (listByRefs makes no ordering guarantee),
|
|
97
|
+
// so the dedupe and context ordering match the by-reference sequence deterministically.
|
|
98
|
+
const keyedByRef = new Map(keyedTasks.map((t) => [taskKey(t), t]));
|
|
99
|
+
for (const ref of refs.taskRefs)
|
|
100
|
+
addTask(keyedByRef.get(`${ref.source}:${ref.externalId}`) ?? null);
|
|
101
|
+
for (const { doc, task } of urlItems) {
|
|
102
|
+
addDoc(doc);
|
|
103
|
+
addTask(task);
|
|
104
|
+
}
|
|
105
|
+
return {
|
|
106
|
+
docs: [...docs.values()].map((d) => toContextDoc(d)),
|
|
107
|
+
tasks: [...tasks.values()].map((t) => toContextTask(t)),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
/** Map a document record to the agent-context doc shape (summary index + materialisable body). */
|
|
111
|
+
export function toContextDoc(d) {
|
|
112
|
+
return {
|
|
113
|
+
title: d.title,
|
|
114
|
+
url: d.url,
|
|
115
|
+
excerpt: d.excerpt,
|
|
116
|
+
summary: buildExcerpt(d.body || d.excerpt, CONTEXT_BUDGET.summaryChars),
|
|
117
|
+
body: d.body,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
/** Map a task record to the agent-context task shape (adds the index `summary`). */
|
|
121
|
+
export function toContextTask(t) {
|
|
122
|
+
return {
|
|
123
|
+
key: t.externalId,
|
|
124
|
+
url: t.url,
|
|
125
|
+
title: t.title,
|
|
126
|
+
status: t.status,
|
|
127
|
+
type: t.type,
|
|
128
|
+
assignee: t.assignee,
|
|
129
|
+
priority: t.priority,
|
|
130
|
+
labels: t.labels,
|
|
131
|
+
description: t.description,
|
|
132
|
+
comments: t.comments,
|
|
133
|
+
summary: buildExcerpt(t.description || t.title, CONTEXT_BUDGET.summaryChars),
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=linked-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linked-context.js","sourceRoot":"","sources":["../../../src/modules/execution/linked-context.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AA+B7D;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CACrC,SAAS,GAAsF,EAAE;IAEjG,IAAI,CAAC,SAAS,CAAC,MAAM;QAAE,OAAO,SAAS,CAAA;IACvC,OAAO,CAAC,GAAW,EAAE,EAAE;QACrB,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;YACjC,MAAM,UAAU,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;YACzC,IAAI,UAAU;gBAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,EAAE,CAAA;QAC9D,CAAC;QACD,OAAO,IAAI,CAAA;IACb,CAAC,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAC,IAOxC;IACC,MAAM,mBAAmB,GAAG,uBAAuB,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAA;IACjF,OAAO;QACL,GAAG,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC,EAAE,CA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Aa,CAAC,CAAC,CAAC,CAAC;KACxD,CAAA;AACH,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,YAAY,CAC1B,CAAiB;IAEjB,OAAO;QACL,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,GAAG,EAAE,CAAC,CAAC,GAAG;QACV,OAAO,EAAE,CAAC,CAAC,OAAO;QAClB,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,OAAO,EAAE,cAAc,CAAC,YAAY,CAAC;QACvE,IAAI,EAAE,CAAC,CAAC,IAAI;KACb,CAAA;AACH,CAAC;AAED,oFAAoF;AACpF,MAAM,UAAU,aAAa,CAC3B,CAAa;IAEb,OAAO;QACL,GAAG,EAAE,CAAC,CAAC,UAAU;QACjB,GAAG,EAAE,CAAC,CAAC,GAAG;QACV,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,QAAQ,EAAE,CAAC,CAAC,QAAQ;QACpB,QAAQ,EAAE,CAAC,CAAC,QAAQ;QACpB,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,QAAQ,EAAE,CAAC,CAAC,QAAQ;QACpB,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,WAAW,IAAI,CAAC,CAAC,KAAK,EAAE,cAAc,CAAC,YAAY,CAAC;KAC7E,CAAA;AACH,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Block, Initiative, ModelProvider, ModelProviderResolver, ModelRef } from '@cat-factory/kernel';
|
|
2
2
|
import type { InitiativePresetRegistry } from '@cat-factory/kernel';
|
|
3
3
|
import { type ResolveBlockRunContext } from '../../inlineScope.js';
|
|
4
|
+
import type { LinkedContext } from '../execution/linked-context.js';
|
|
4
5
|
import { type InterviewOutput } from './initiative.logic.js';
|
|
5
6
|
/** What the interviewer needs to resolve its inline model + reach the provider. */
|
|
6
7
|
export interface InitiativeInterviewDeps {
|
|
@@ -20,6 +21,16 @@ export interface InitiativeInterviewDeps {
|
|
|
20
21
|
resolveWorkspaceModelDefault?: (workspaceId: string, agentKind: string, modelPresetId?: string) => Promise<string | undefined>;
|
|
21
22
|
/** Resolve the block's run/execution + initiator, folded into the inline model scope. */
|
|
22
23
|
resolveRunContext?: ResolveBlockRunContext;
|
|
24
|
+
/**
|
|
25
|
+
* Resolve the initiative block's linked context (attached requirements / RFCs / PRDs / tracker
|
|
26
|
+
* issues, plus anything the brief names outright). Needed explicitly because this service is
|
|
27
|
+
* INLINE and assembles its own prompt — it never passes through `AgentContextBuilder`, which is
|
|
28
|
+
* what puts the same attachments in front of the analyst and planner that follow.
|
|
29
|
+
*
|
|
30
|
+
* Absent (or unwired document/task sources) ⇒ the prompts are byte-for-byte their previous
|
|
31
|
+
* shape, so a deployment without the documents/tasks integrations is unaffected.
|
|
32
|
+
*/
|
|
33
|
+
resolveLinkedContext?: (workspaceId: string, blockId: string, description: string) => Promise<LinkedContext>;
|
|
23
34
|
}
|
|
24
35
|
export declare class InitiativeInterviewService {
|
|
25
36
|
private readonly deps;
|
|
@@ -40,6 +51,17 @@ export declare class InitiativeInterviewService {
|
|
|
40
51
|
* interviewer is already inline and there is only ever one question in play.
|
|
41
52
|
*/
|
|
42
53
|
recommendAnswer(workspaceId: string, block: Block, initiative: Initiative, question: string): Promise<string>;
|
|
54
|
+
/**
|
|
55
|
+
* The initiative's attached requirements / RFCs / issues, rendered for the prompt, or '' when
|
|
56
|
+
* nothing is attached (or no resolver is wired). INLINE rendering — the interviewer has no
|
|
57
|
+
* checkout to materialise files into, so the bodies are injected, clamped by the shared
|
|
58
|
+
* `CONTEXT_BUDGET` the container path also honours.
|
|
59
|
+
*
|
|
60
|
+
* A read failure PROPAGATES rather than degrading to '', matching how the analyst and planner
|
|
61
|
+
* resolve the same attachments through `AgentContextBuilder`: interviewing a stakeholder about
|
|
62
|
+
* a document the platform silently failed to open is worse than failing the round outright.
|
|
63
|
+
*/
|
|
64
|
+
private linkedSection;
|
|
43
65
|
/** Assemble the interviewer prompt: the brief + the answered digest + the round intent. */
|
|
44
66
|
private buildPrompt;
|
|
45
67
|
/** Assemble the recommend prompt: the brief + answered digest + the ONE question to answer. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InitiativeInterviewService.d.ts","sourceRoot":"","sources":["../../../src/modules/initiative/InitiativeInterviewService.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,KAAK,EACL,UAAU,EACV,aAAa,EACb,qBAAqB,EACrB,QAAQ,EACT,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AAQnE,OAAO,EAAE,KAAK,sBAAsB,EAAoB,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"InitiativeInterviewService.d.ts","sourceRoot":"","sources":["../../../src/modules/initiative/InitiativeInterviewService.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,KAAK,EACL,UAAU,EACV,aAAa,EACb,qBAAqB,EACrB,QAAQ,EACT,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AAQnE,OAAO,EAAE,KAAK,sBAAsB,EAAoB,MAAM,sBAAsB,CAAA;AACpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAEnE,OAAO,EAEL,KAAK,eAAe,EAErB,MAAM,uBAAuB,CAAA;AAmF9B,mFAAmF;AACnF,MAAM,WAAW,uBAAuB;IACtC,gGAAgG;IAChG,wBAAwB,EAAE,wBAAwB,CAAA;IAClD,8EAA8E;IAC9E,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;IAC7C,2EAA2E;IAC3E,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,QAA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YAC9E,QAAQ;CAgBvB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { generateText } from 'ai';
|
|
2
2
|
import { INITIATIVE_INTERVIEWER_AGENT_KIND, inlineModelRef, resolveScopedModelProvider, ValidationError, } from '@cat-factory/kernel';
|
|
3
|
-
import { catFactoryObservability } from '@cat-factory/agents';
|
|
3
|
+
import { catFactoryObservability, renderLinkedContext } from '@cat-factory/agents';
|
|
4
4
|
import { scopeForBlockRun } from '../../inlineScope.js';
|
|
5
5
|
import { extractJson } from '../requirements/requirements.logic.js';
|
|
6
6
|
import { coerceInterviewOutput, seedPresetInterviewQa, } from './initiative.logic.js';
|
|
@@ -93,14 +93,17 @@ export class InitiativeInterviewService {
|
|
|
93
93
|
* proceeded, or the round cap was hit) so the model is asked only to synthesize the brief.
|
|
94
94
|
*/
|
|
95
95
|
async runInterview(workspaceId, block, initiative, opts) {
|
|
96
|
-
const { modelProvider, ref } = await
|
|
96
|
+
const [{ modelProvider, ref }, linked] = await Promise.all([
|
|
97
|
+
this.resolveModel(workspaceId, block),
|
|
98
|
+
this.linkedSection(workspaceId, block),
|
|
99
|
+
]);
|
|
97
100
|
let text;
|
|
98
101
|
try {
|
|
99
102
|
const model = modelProvider.resolve(ref);
|
|
100
103
|
const result = await generateText({
|
|
101
104
|
model,
|
|
102
105
|
system: INITIATIVE_INTERVIEW_SYSTEM_PROMPT,
|
|
103
|
-
prompt: this.buildPrompt(block, initiative, opts.finalize),
|
|
106
|
+
prompt: this.buildPrompt(block, initiative, opts.finalize, linked),
|
|
104
107
|
temperature: 0.2,
|
|
105
108
|
maxOutputTokens: 3000,
|
|
106
109
|
providerOptions: catFactoryObservability({
|
|
@@ -122,13 +125,16 @@ export class InitiativeInterviewService {
|
|
|
122
125
|
* interviewer is already inline and there is only ever one question in play.
|
|
123
126
|
*/
|
|
124
127
|
async recommendAnswer(workspaceId, block, initiative, question) {
|
|
125
|
-
const { modelProvider, ref } = await
|
|
128
|
+
const [{ modelProvider, ref }, linked] = await Promise.all([
|
|
129
|
+
this.resolveModel(workspaceId, block),
|
|
130
|
+
this.linkedSection(workspaceId, block),
|
|
131
|
+
]);
|
|
126
132
|
try {
|
|
127
133
|
const model = modelProvider.resolve(ref);
|
|
128
134
|
const result = await generateText({
|
|
129
135
|
model,
|
|
130
136
|
system: INITIATIVE_RECOMMEND_SYSTEM_PROMPT,
|
|
131
|
-
prompt: this.buildRecommendPrompt(block, initiative, question),
|
|
137
|
+
prompt: this.buildRecommendPrompt(block, initiative, question, linked),
|
|
132
138
|
temperature: 0.3,
|
|
133
139
|
maxOutputTokens: 800,
|
|
134
140
|
providerOptions: catFactoryObservability({
|
|
@@ -142,8 +148,24 @@ export class InitiativeInterviewService {
|
|
|
142
148
|
throw new ValidationError(`The initiative interviewer (${ref.provider}:${ref.model}) could not recommend an answer: ${e instanceof Error ? e.message : String(e)}`);
|
|
143
149
|
}
|
|
144
150
|
}
|
|
151
|
+
/**
|
|
152
|
+
* The initiative's attached requirements / RFCs / issues, rendered for the prompt, or '' when
|
|
153
|
+
* nothing is attached (or no resolver is wired). INLINE rendering — the interviewer has no
|
|
154
|
+
* checkout to materialise files into, so the bodies are injected, clamped by the shared
|
|
155
|
+
* `CONTEXT_BUDGET` the container path also honours.
|
|
156
|
+
*
|
|
157
|
+
* A read failure PROPAGATES rather than degrading to '', matching how the analyst and planner
|
|
158
|
+
* resolve the same attachments through `AgentContextBuilder`: interviewing a stakeholder about
|
|
159
|
+
* a document the platform silently failed to open is worse than failing the round outright.
|
|
160
|
+
*/
|
|
161
|
+
async linkedSection(workspaceId, block) {
|
|
162
|
+
if (!this.deps.resolveLinkedContext)
|
|
163
|
+
return '';
|
|
164
|
+
const { docs, tasks } = await this.deps.resolveLinkedContext(workspaceId, block.id, block.description ?? '');
|
|
165
|
+
return renderLinkedContext(docs, tasks);
|
|
166
|
+
}
|
|
145
167
|
/** Assemble the interviewer prompt: the brief + the answered digest + the round intent. */
|
|
146
|
-
buildPrompt(block, initiative, finalize) {
|
|
168
|
+
buildPrompt(block, initiative, finalize, linked) {
|
|
147
169
|
const lines = [`Initiative: ${block.title || '(untitled initiative)'}`];
|
|
148
170
|
const brief = block.description?.trim();
|
|
149
171
|
if (brief)
|
|
@@ -156,6 +178,17 @@ export class InitiativeInterviewService {
|
|
|
156
178
|
if (steering) {
|
|
157
179
|
lines.push('', `## Initiative preset: ${steering.label}`, '', steering.promptAddition);
|
|
158
180
|
}
|
|
181
|
+
// The stakeholder's own attached source material, before the answers gathered so far: it is
|
|
182
|
+
// part of the BRIEF, so the interviewer must read it before deciding what is still unclear.
|
|
183
|
+
// The instruction is what makes attaching a PRD worth doing — without it the model treats the
|
|
184
|
+
// document as background and still asks the questions the document already answers, which is
|
|
185
|
+
// precisely the interrogation the attachment was meant to spare the stakeholder.
|
|
186
|
+
if (linked) {
|
|
187
|
+
lines.push(linked);
|
|
188
|
+
lines.push('', 'The linked context above was attached to this initiative by the stakeholder. Read it ' +
|
|
189
|
+
'as part of the brief and treat everything it settles as ALREADY ANSWERED: do NOT ask ' +
|
|
190
|
+
'about anything it states. Ask only about what it leaves genuinely open or ambiguous.');
|
|
191
|
+
}
|
|
159
192
|
const answered = (initiative.qa ?? []).filter((q) => (q.answer ?? '').trim().length > 0);
|
|
160
193
|
if (answered.length) {
|
|
161
194
|
lines.push('', 'Answers gathered so far:');
|
|
@@ -193,11 +226,16 @@ export class InitiativeInterviewService {
|
|
|
193
226
|
return lines.join('\n');
|
|
194
227
|
}
|
|
195
228
|
/** Assemble the recommend prompt: the brief + answered digest + the ONE question to answer. */
|
|
196
|
-
buildRecommendPrompt(block, initiative, question) {
|
|
229
|
+
buildRecommendPrompt(block, initiative, question, linked) {
|
|
197
230
|
const lines = [`Initiative: ${block.title || '(untitled initiative)'}`];
|
|
198
231
|
const brief = block.description?.trim();
|
|
199
232
|
if (brief)
|
|
200
233
|
lines.push('', 'Brief:', brief);
|
|
234
|
+
// The attached material is the best source a suggested answer can be grounded in — this is
|
|
235
|
+
// the action a stakeholder reaches for precisely when they would rather the platform read
|
|
236
|
+
// the document than answer from it themselves.
|
|
237
|
+
if (linked)
|
|
238
|
+
lines.push(linked);
|
|
201
239
|
if (initiative.goal?.trim())
|
|
202
240
|
lines.push('', `Goal so far: ${initiative.goal.trim()}`);
|
|
203
241
|
const answered = (initiative.qa ?? []).filter((q) => (q.answer ?? '').trim().length > 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InitiativeInterviewService.js","sourceRoot":"","sources":["../../../src/modules/initiative/InitiativeInterviewService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAA;AASjC,OAAO,EACL,iCAAiC,EACjC,cAAc,EACd,0BAA0B,EAC1B,eAAe,GAChB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"InitiativeInterviewService.js","sourceRoot":"","sources":["../../../src/modules/initiative/InitiativeInterviewService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAA;AASjC,OAAO,EACL,iCAAiC,EACjC,cAAc,EACd,0BAA0B,EAC1B,eAAe,GAChB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAClF,OAAO,EAA+B,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAEpF,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAA;AACnE,OAAO,EACL,qBAAqB,EAErB,qBAAqB,GACtB,MAAM,uBAAuB,CAAA;AAE9B,8EAA8E;AAC9E,6FAA6F;AAC7F,4FAA4F;AAC5F,6FAA6F;AAC7F,wEAAwE;AACxE,4FAA4F;AAC5F,4FAA4F;AAC5F,EAAE;AACF,0FAA0F;AAC1F,0FAA0F;AAC1F,6FAA6F;AAC7F,iFAAiF;AACjF,qFAAqF;AAC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C,QAAQ,CAAC,mBAAmB,CAAqB;IACzD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAA+C;IAEtE,YAAY,IAAI,EAAE,oCAAoC,EAIrD;IAED,0FAA0F;IACpF,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAMzD;IAED;;;;OAIG;IACG,OAAO,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAO7E;IAED,kEAAkE;IAC5D,MAAM,CACV,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,4BAA4B,GAClC,OAAO,CAAC,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"WorkspaceSettingsService.d.ts","sourceRoot":"","sources":["../../../src/modules/settings/WorkspaceSettingsService.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,4BAA4B,EAC5B,mBAAmB,EACnB,iBAAiB,EACjB,2BAA2B,EAC3B,2BAA2B,EAC5B,MAAM,qBAAqB,CAAA;AAQ5B,MAAM,WAAW,oCAAoC;IACnD,2BAA2B,EAAE,2BAA2B,CAAA;IACxD,mBAAmB,EAAE,mBAAmB,CAAA;IACxC;;;;;;OAMG;IACH,sBAAsB,CAAC,EAAE,gBAAgB,CAAC,2BAA2B,CAAC,CAAA;CACvE;AAED;;;;;;GAMG;AACH,qBAAa,wBAAwB;IACnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA6B;IACtD,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAqB;IACzD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAA+C;IAEtE,YAAY,IAAI,EAAE,oCAAoC,EAIrD;IAED,0FAA0F;IACpF,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAMzD;IAED;;;;OAIG;IACG,OAAO,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAO7E;IAED,kEAAkE;IAC5D,MAAM,CACV,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,4BAA4B,GAClC,OAAO,CAAC,iBAAiB,CAAC,CA0F5B;CACF"}
|
|
@@ -58,6 +58,12 @@ export class WorkspaceSettingsService {
|
|
|
58
58
|
: current.reviewFrictionBlockStuckMinutes,
|
|
59
59
|
spendCurrency: patch.spendCurrency !== undefined ? patch.spendCurrency : current.spendCurrency,
|
|
60
60
|
spendMonthlyLimit: patch.spendMonthlyLimit !== undefined ? patch.spendMonthlyLimit : current.spendMonthlyLimit,
|
|
61
|
+
defaultProvisionType: patch.defaultProvisionType !== undefined
|
|
62
|
+
? patch.defaultProvisionType
|
|
63
|
+
: current.defaultProvisionType,
|
|
64
|
+
defaultProvisionManifestId: patch.defaultProvisionManifestId !== undefined
|
|
65
|
+
? patch.defaultProvisionManifestId
|
|
66
|
+
: current.defaultProvisionManifestId,
|
|
61
67
|
};
|
|
62
68
|
// Keep the limit fields consistent with the mode so the enforcement logic + UI never
|
|
63
69
|
// read a stale cap from an inactive mode.
|
|
@@ -87,6 +93,19 @@ export class WorkspaceSettingsService {
|
|
|
87
93
|
throw new ValidationError('The review-debt block count must be greater than or equal to the warn count.');
|
|
88
94
|
}
|
|
89
95
|
}
|
|
96
|
+
// Default test-environment provisioning cross-field validation. The manifest id is
|
|
97
|
+
// meaningful ONLY for `custom`, so anything else clears it rather than leaving a stale id
|
|
98
|
+
// that would silently reappear on the next switch back — the same "keep the inactive
|
|
99
|
+
// branch's fields consistent with the mode" rule the task-limit block above follows.
|
|
100
|
+
// `custom` WITHOUT an id is refused outright instead of normalised away: it would seed
|
|
101
|
+
// every new service with a type that matches no `remote-custom` handler, and the failure
|
|
102
|
+
// would surface much later, at the deployer step, on a service nobody knowingly misconfigured.
|
|
103
|
+
if (next.defaultProvisionType !== 'custom') {
|
|
104
|
+
next.defaultProvisionManifestId = null;
|
|
105
|
+
}
|
|
106
|
+
else if (!next.defaultProvisionManifestId) {
|
|
107
|
+
throw new ValidationError('A custom default provisioning mechanism must name the custom manifest type it uses.');
|
|
108
|
+
}
|
|
90
109
|
await this.settings.upsert(workspaceId, next);
|
|
91
110
|
// Drop the cached row (and broadcast to peers) after the write commits, so the next
|
|
92
111
|
// read on this or any replica — including SpendService's pricing overlay — sees the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceSettingsService.js","sourceRoot":"","sources":["../../../src/modules/settings/WorkspaceSettingsService.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC3B,gBAAgB,EAChB,eAAe,GAChB,MAAM,qBAAqB,CAAA;AAe5B;;;;;;GAMG;AACH,MAAM,OAAO,wBAAwB;IAClB,QAAQ,CAA6B;IACrC,mBAAmB,CAAqB;IACxC,KAAK,CAAgD;IAEtE,YAAY,IAA0C;QACpD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,2BAA2B,CAAA;QAChD,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAA;QACnD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,sBAAsB,CAAA;IAC1C,CAAC;IAED,0FAA0F;IAC1F,KAAK,CAAC,GAAG,CAAC,WAAmB;QAC3B,OAAO,CACL,CAAC,MAAM,2BAA2B,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,IAAI;YAC7E,GAAG,0BAA0B;SAC9B,CACF,CAAA;IACH,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,OAAO,CAAC,YAAsB;QAClC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAA;QACnE,MAAM,GAAG,GAAG,IAAI,GAAG,EAA6B,CAAA;QAChD,KAAK,MAAM,EAAE,IAAI,YAA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,uBAAuB,IAAI,OAAO,CAAC,uBAAuB;YACzF,wBAAwB,EACtB,KAAK,CAAC,wBAAwB,KAAK,SAAS;gBAC1C,CAAC,CAAC,KAAK,CAAC,wBAAwB;gBAChC,CAAC,CAAC,OAAO,CAAC,wBAAwB;YACtC,+BAA+B,EAC7B,KAAK,CAAC,+BAA+B,KAAK,SAAS;gBACjD,CAAC,CAAC,KAAK,CAAC,+BAA+B;gBACvC,CAAC,CAAC,OAAO,CAAC,+BAA+B;YAC7C,aAAa,EACX,KAAK,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa;YACjF,iBAAiB,EACf,KAAK,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,OAAO,CAAC,iBAAiB;
|
|
1
|
+
{"version":3,"file":"WorkspaceSettingsService.js","sourceRoot":"","sources":["../../../src/modules/settings/WorkspaceSettingsService.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC3B,gBAAgB,EAChB,eAAe,GAChB,MAAM,qBAAqB,CAAA;AAe5B;;;;;;GAMG;AACH,MAAM,OAAO,wBAAwB;IAClB,QAAQ,CAA6B;IACrC,mBAAmB,CAAqB;IACxC,KAAK,CAAgD;IAEtE,YAAY,IAA0C;QACpD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,2BAA2B,CAAA;QAChD,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAA;QACnD,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,sBAAsB,CAAA;IAC1C,CAAC;IAED,0FAA0F;IAC1F,KAAK,CAAC,GAAG,CAAC,WAAmB;QAC3B,OAAO,CACL,CAAC,MAAM,2BAA2B,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,IAAI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M,CAAC,WAAW,EAAE,IAAI,CAAC,CAAA;QAC7C,oFAAoF;QACpF,oFAAoF;QACpF,6DAA6D;QAC7D,MAAM,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,EAAE,WAAW,CAAC,CAAA;QACtD,OAAO,IAAI,CAAA;IACb,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cat-factory/orchestration",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.158.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",
|
|
@@ -25,20 +25,20 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"ai": "^7.0.37",
|
|
28
|
-
"@cat-factory/agents": "0.
|
|
29
|
-
"@cat-factory/caching": "0.11.
|
|
30
|
-
"@cat-factory/contracts": "0.
|
|
31
|
-
"@cat-factory/integrations": "0.107.
|
|
32
|
-
"@cat-factory/kernel": "0.
|
|
33
|
-
"@cat-factory/prompt-fragments": "0.15.
|
|
34
|
-
"@cat-factory/sandbox": "0.10.
|
|
35
|
-
"@cat-factory/spend": "0.12.
|
|
36
|
-
"@cat-factory/workspaces": "0.19.
|
|
28
|
+
"@cat-factory/agents": "0.81.0",
|
|
29
|
+
"@cat-factory/caching": "0.11.6",
|
|
30
|
+
"@cat-factory/contracts": "0.185.0",
|
|
31
|
+
"@cat-factory/integrations": "0.107.3",
|
|
32
|
+
"@cat-factory/kernel": "0.178.0",
|
|
33
|
+
"@cat-factory/prompt-fragments": "0.15.8",
|
|
34
|
+
"@cat-factory/sandbox": "0.10.6",
|
|
35
|
+
"@cat-factory/spend": "0.12.107",
|
|
36
|
+
"@cat-factory/workspaces": "0.19.6"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"typescript": "7.0.2",
|
|
40
40
|
"vitest": "^4.1.10",
|
|
41
|
-
"@cat-factory/sandbox-fixtures": "0.7.
|
|
41
|
+
"@cat-factory/sandbox-fixtures": "0.7.216"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "tsc -b tsconfig.build.json",
|