@websitelabs/n8n-nodes-software-teams 0.12.3
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/ARCHITECTURE.md +1232 -0
- package/CONTRACT.md +450 -0
- package/README.md +491 -0
- package/dist/agents/software-teams-architect.md +155 -0
- package/dist/agents/software-teams-backend.md +93 -0
- package/dist/agents/software-teams-codebase-mapper.md +67 -0
- package/dist/agents/software-teams-committer.md +90 -0
- package/dist/agents/software-teams-debugger.md +91 -0
- package/dist/agents/software-teams-dev-planner.md +175 -0
- package/dist/agents/software-teams-devops.md +92 -0
- package/dist/agents/software-teams-feedback-learner.md +118 -0
- package/dist/agents/software-teams-frontend.md +107 -0
- package/dist/agents/software-teams-game-ai-engineer.md +179 -0
- package/dist/agents/software-teams-game-art-pipeline.md +180 -0
- package/dist/agents/software-teams-game-designer.md +245 -0
- package/dist/agents/software-teams-game-devops.md +134 -0
- package/dist/agents/software-teams-game-engineer.md +146 -0
- package/dist/agents/software-teams-game-producer.md +288 -0
- package/dist/agents/software-teams-game-qa.md +297 -0
- package/dist/agents/software-teams-game-tech-artist.md +186 -0
- package/dist/agents/software-teams-head-engineering.md +37 -0
- package/dist/agents/software-teams-perf-analyst.md +124 -0
- package/dist/agents/software-teams-phase-researcher.md +75 -0
- package/dist/agents/software-teams-plan-checker.md +87 -0
- package/dist/agents/software-teams-planner.md +456 -0
- package/dist/agents/software-teams-pr-feedback.md +127 -0
- package/dist/agents/software-teams-pr-generator.md +107 -0
- package/dist/agents/software-teams-producer.md +203 -0
- package/dist/agents/software-teams-product-lead.md +51 -0
- package/dist/agents/software-teams-programmer.md +126 -0
- package/dist/agents/software-teams-qa-tester.md +165 -0
- package/dist/agents/software-teams-quality.md +153 -0
- package/dist/agents/software-teams-researcher.md +151 -0
- package/dist/agents/software-teams-security.md +126 -0
- package/dist/agents/software-teams-ux-designer.md +92 -0
- package/dist/agents/software-teams-verifier.md +87 -0
- package/dist/credentials/SoftwareTeamsApi.credentials.d.ts +18 -0
- package/dist/credentials/SoftwareTeamsApi.credentials.d.ts.map +1 -0
- package/dist/credentials/SoftwareTeamsApi.credentials.js +110 -0
- package/dist/credentials/SoftwareTeamsApi.credentials.js.map +1 -0
- package/dist/credentials/softwareTeamsApi.svg +14 -0
- package/dist/nodes/SoftwareTeamsAgent/SoftwareTeamsAgent.node.d.ts +23 -0
- package/dist/nodes/SoftwareTeamsAgent/SoftwareTeamsAgent.node.d.ts.map +1 -0
- package/dist/nodes/SoftwareTeamsAgent/SoftwareTeamsAgent.node.js +308 -0
- package/dist/nodes/SoftwareTeamsAgent/SoftwareTeamsAgent.node.js.map +1 -0
- package/dist/nodes/SoftwareTeamsAgent/softwareTeamsAgent.svg +18 -0
- package/dist/nodes/SoftwareTeamsCleanup/SoftwareTeamsCleanup.node.d.ts +24 -0
- package/dist/nodes/SoftwareTeamsCleanup/SoftwareTeamsCleanup.node.d.ts.map +1 -0
- package/dist/nodes/SoftwareTeamsCleanup/SoftwareTeamsCleanup.node.js +2635 -0
- package/dist/nodes/SoftwareTeamsCleanup/SoftwareTeamsCleanup.node.js.map +1 -0
- package/dist/nodes/SoftwareTeamsCleanup/SoftwareTeamsCleanup.svg +6 -0
- package/dist/nodes/SoftwareTeamsFinaliser/SoftwareTeamsFinaliser.node.d.ts +6 -0
- package/dist/nodes/SoftwareTeamsFinaliser/SoftwareTeamsFinaliser.node.d.ts.map +1 -0
- package/dist/nodes/SoftwareTeamsFinaliser/SoftwareTeamsFinaliser.node.js +231 -0
- package/dist/nodes/SoftwareTeamsFinaliser/SoftwareTeamsFinaliser.node.js.map +1 -0
- package/dist/nodes/SoftwareTeamsFinaliser/softwareTeamsFinaliser.svg +11 -0
- package/dist/nodes/SoftwareTeamsHitl/SoftwareTeamsHitl.node.d.ts +25 -0
- package/dist/nodes/SoftwareTeamsHitl/SoftwareTeamsHitl.node.d.ts.map +1 -0
- package/dist/nodes/SoftwareTeamsHitl/SoftwareTeamsHitl.node.js +366 -0
- package/dist/nodes/SoftwareTeamsHitl/SoftwareTeamsHitl.node.js.map +1 -0
- package/dist/nodes/SoftwareTeamsHitl/softwareTeamsHitl.svg +11 -0
- package/dist/nodes/SoftwareTeamsOrchestrator/SoftwareTeamsOrchestrator.node.d.ts +15 -0
- package/dist/nodes/SoftwareTeamsOrchestrator/SoftwareTeamsOrchestrator.node.d.ts.map +1 -0
- package/dist/nodes/SoftwareTeamsOrchestrator/SoftwareTeamsOrchestrator.node.js +373 -0
- package/dist/nodes/SoftwareTeamsOrchestrator/SoftwareTeamsOrchestrator.node.js.map +1 -0
- package/dist/nodes/SoftwareTeamsOrchestrator/softwareTeamsOrchestrator.svg +20 -0
- package/dist/nodes/SoftwareTeamsOutput/SoftwareTeamsOutput.node.d.ts +6 -0
- package/dist/nodes/SoftwareTeamsOutput/SoftwareTeamsOutput.node.d.ts.map +1 -0
- package/dist/nodes/SoftwareTeamsOutput/SoftwareTeamsOutput.node.js +2685 -0
- package/dist/nodes/SoftwareTeamsOutput/SoftwareTeamsOutput.node.js.map +1 -0
- package/dist/nodes/SoftwareTeamsOutput/SoftwareTeamsOutput.svg +6 -0
- package/dist/nodes/SoftwareTeamsPrFeedback/SoftwareTeamsPrFeedback.node.d.ts +22 -0
- package/dist/nodes/SoftwareTeamsPrFeedback/SoftwareTeamsPrFeedback.node.d.ts.map +1 -0
- package/dist/nodes/SoftwareTeamsPrFeedback/SoftwareTeamsPrFeedback.node.js +2655 -0
- package/dist/nodes/SoftwareTeamsPrFeedback/SoftwareTeamsPrFeedback.node.js.map +1 -0
- package/dist/nodes/SoftwareTeamsPrFeedback/softwareTeamsPrFeedback.svg +8 -0
- package/dist/nodes/SoftwareTeamsSlackHitl/SoftwareTeamsSlackHitl.node.d.ts +19 -0
- package/dist/nodes/SoftwareTeamsSlackHitl/SoftwareTeamsSlackHitl.node.d.ts.map +1 -0
- package/dist/nodes/SoftwareTeamsSlackHitl/SoftwareTeamsSlackHitl.node.js +198 -0
- package/dist/nodes/SoftwareTeamsSlackHitl/SoftwareTeamsSlackHitl.node.js.map +1 -0
- package/dist/nodes/SoftwareTeamsSlackHitl/softwareTeamsSlackHitl.svg +10 -0
- package/dist/nodes/SoftwareTeamsTrigger/SoftwareTeamsTrigger.node.d.ts +6 -0
- package/dist/nodes/SoftwareTeamsTrigger/SoftwareTeamsTrigger.node.d.ts.map +1 -0
- package/dist/nodes/SoftwareTeamsTrigger/SoftwareTeamsTrigger.node.js +2601 -0
- package/dist/nodes/SoftwareTeamsTrigger/SoftwareTeamsTrigger.node.js.map +1 -0
- package/dist/nodes/SoftwareTeamsTrigger/SoftwareTeamsTrigger.node.svg +6 -0
- package/dist/nodes/SoftwareTeamsWorkspace/SoftwareTeamsWorkspace.node.d.ts +20 -0
- package/dist/nodes/SoftwareTeamsWorkspace/SoftwareTeamsWorkspace.node.d.ts.map +1 -0
- package/dist/nodes/SoftwareTeamsWorkspace/SoftwareTeamsWorkspace.node.js +175 -0
- package/dist/nodes/SoftwareTeamsWorkspace/SoftwareTeamsWorkspace.node.js.map +1 -0
- package/dist/nodes/SoftwareTeamsWorkspace/softwareTeamsWorkspace.svg +13 -0
- package/dist/src/execution/single-turn.d.ts +6 -0
- package/dist/src/execution/single-turn.d.ts.map +1 -0
- package/dist/src/execution/single-turn.js +2662 -0
- package/dist/src/execution/single-turn.js.map +1 -0
- package/dist/src/hitl/channels.d.ts +48 -0
- package/dist/src/hitl/channels.d.ts.map +1 -0
- package/dist/src/hitl/channels.js +297 -0
- package/dist/src/hitl/channels.js.map +1 -0
- package/dist/src/hitl/conversation-state.d.ts +45 -0
- package/dist/src/hitl/conversation-state.d.ts.map +1 -0
- package/dist/src/hitl/conversation-state.js +69 -0
- package/dist/src/hitl/conversation-state.js.map +1 -0
- package/dist/src/hitl/slack.d.ts +32 -0
- package/dist/src/hitl/slack.d.ts.map +1 -0
- package/dist/src/hitl/slack.js +202 -0
- package/dist/src/hitl/slack.js.map +1 -0
- package/dist/src/ingestion/context.d.ts +38 -0
- package/dist/src/ingestion/context.d.ts.map +1 -0
- package/dist/src/ingestion/context.js +2501 -0
- package/dist/src/ingestion/context.js.map +1 -0
- package/dist/src/ingestion/pr-feedback.d.ts +48 -0
- package/dist/src/ingestion/pr-feedback.d.ts.map +1 -0
- package/dist/src/ingestion/pr-feedback.js +85 -0
- package/dist/src/ingestion/pr-feedback.js.map +1 -0
- package/dist/src/n8n-cast.d.ts +11 -0
- package/dist/src/n8n-cast.d.ts.map +1 -0
- package/dist/src/n8n-cast.js +17 -0
- package/dist/src/n8n-cast.js.map +1 -0
- package/dist/src/orchestration/run-state/global-store.d.ts +7 -0
- package/dist/src/orchestration/run-state/global-store.d.ts.map +1 -0
- package/dist/src/orchestration/run-state/global-store.js +27 -0
- package/dist/src/orchestration/run-state/global-store.js.map +1 -0
- package/dist/src/orchestration/run-state/ordering.d.ts +14 -0
- package/dist/src/orchestration/run-state/ordering.d.ts.map +1 -0
- package/dist/src/orchestration/run-state/ordering.js +59 -0
- package/dist/src/orchestration/run-state/ordering.js.map +1 -0
- package/dist/src/orchestration/run-state/persistence.d.ts +9 -0
- package/dist/src/orchestration/run-state/persistence.d.ts.map +1 -0
- package/dist/src/orchestration/run-state/persistence.js +29 -0
- package/dist/src/orchestration/run-state/persistence.js.map +1 -0
- package/dist/src/orchestration/run-state/planning.d.ts +17 -0
- package/dist/src/orchestration/run-state/planning.d.ts.map +1 -0
- package/dist/src/orchestration/run-state/planning.js +117 -0
- package/dist/src/orchestration/run-state/planning.js.map +1 -0
- package/dist/src/orchestration/run-state/readiness.d.ts +20 -0
- package/dist/src/orchestration/run-state/readiness.d.ts.map +1 -0
- package/dist/src/orchestration/run-state/readiness.js +105 -0
- package/dist/src/orchestration/run-state/readiness.js.map +1 -0
- package/dist/src/orchestration/run-state/shapes.d.ts +53 -0
- package/dist/src/orchestration/run-state/shapes.d.ts.map +1 -0
- package/dist/src/orchestration/run-state/shapes.js +3 -0
- package/dist/src/orchestration/run-state/shapes.js.map +1 -0
- package/dist/src/orchestration/run-state/transitions.d.ts +46 -0
- package/dist/src/orchestration/run-state/transitions.d.ts.map +1 -0
- package/dist/src/orchestration/run-state/transitions.js +133 -0
- package/dist/src/orchestration/run-state/transitions.js.map +1 -0
- package/dist/src/orchestration/run-state.d.ts +8 -0
- package/dist/src/orchestration/run-state.d.ts.map +1 -0
- package/dist/src/orchestration/run-state.js +35 -0
- package/dist/src/orchestration/run-state.js.map +1 -0
- package/dist/src/output/github.d.ts +39 -0
- package/dist/src/output/github.d.ts.map +1 -0
- package/dist/src/output/github.js +2492 -0
- package/dist/src/output/github.js.map +1 -0
- package/dist/src/repo/git.d.ts +71 -0
- package/dist/src/repo/git.d.ts.map +1 -0
- package/dist/src/repo/git.js +207 -0
- package/dist/src/repo/git.js.map +1 -0
- package/dist/src/repo/merge.d.ts +36 -0
- package/dist/src/repo/merge.d.ts.map +1 -0
- package/dist/src/repo/merge.js +133 -0
- package/dist/src/repo/merge.js.map +1 -0
- package/dist/src/repo/repo-context.d.ts +23 -0
- package/dist/src/repo/repo-context.d.ts.map +1 -0
- package/dist/src/repo/repo-context.js +10 -0
- package/dist/src/repo/repo-context.js.map +1 -0
- package/dist/src/repo/teardown.d.ts +38 -0
- package/dist/src/repo/teardown.d.ts.map +1 -0
- package/dist/src/repo/teardown.js +171 -0
- package/dist/src/repo/teardown.js.map +1 -0
- package/dist/src/repo/validate.d.ts +4 -0
- package/dist/src/repo/validate.d.ts.map +1 -0
- package/dist/src/repo/validate.js +42 -0
- package/dist/src/repo/validate.js.map +1 -0
- package/package.json +73 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/ingestion/context.ts"],"names":[],"mappings":";;AAyCA,kDA2BC;AAOD,kDAkCC;AA7GD,gEAKqC;AA8BrC;;;;;GAKG;AACI,KAAK,UAAU,mBAAmB,CACvC,GAAe,EACf,KAAgC;IAEhC,IAAI,CAAC,KAAK,CAAC,aAAa;QAAE,OAAO,IAAI,C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AAC;QACxD,IAAI,CAAC,KAAK;YAAE,OAAO,IAAI,CAAC;QACxB,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,OAAO,EAAE,KAAK,CAAC,EAAE;YACjB,OAAO,EAAE,IAAA,uCAAsB,EAAC,KAAK,CAAC;SACvC,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,mGAAmG;QACnG,OAAO,IAAI,CAAC;IACd,CAAC;YAAS,CAAC;QACT,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YAC7B,OAAO,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;QACrC,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,eAAe,GAAG,UAAU,CAAC;QAC3C,CAAC;QACD,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;YAC7B,OAAO,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;QACrC,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,eAAe,GAAG,UAAU,CAAC;QAC3C,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PR-feedback ingestion — continue-marker constant + comments-to-envelope mapper.
|
|
3
|
+
*
|
|
4
|
+
* Pure, Bun-free, side-effect-free module. Safe to import in Node/n8n and in
|
|
5
|
+
* unit tests. T7 (the PR-Feedback node) imports `PR_FEEDBACK_TASK_ID` and
|
|
6
|
+
* `prCommentsToEnvelope` from here — no duplicate literals.
|
|
7
|
+
*
|
|
8
|
+
* Plan 1-01 T4 — AC2 (PR-feedback re-entry).
|
|
9
|
+
*/
|
|
10
|
+
import type { NodeEnvelope } from "@websitelabs/software-teams";
|
|
11
|
+
/**
|
|
12
|
+
* The continue-run marker string written to `input.context.taskId` so the
|
|
13
|
+
* Orchestrator continue branch (`SoftwareTeamsOrchestrator.node.ts:163-181`,
|
|
14
|
+
* keys on `typeof ctx?.taskId === 'string'`) re-enters the run.
|
|
15
|
+
*
|
|
16
|
+
* T7 imports this same constant — no second literal.
|
|
17
|
+
*/
|
|
18
|
+
export declare const PR_FEEDBACK_TASK_ID = "pr-feedback";
|
|
19
|
+
/**
|
|
20
|
+
* Shape emitted by `feedback --json`. Mirrors `ReviewComment` in
|
|
21
|
+
* `packages/cli/src/commands/feedback.ts` without creating a runtime import
|
|
22
|
+
* dependency on the CLI package (which uses Bun APIs).
|
|
23
|
+
*/
|
|
24
|
+
export interface ReviewComment {
|
|
25
|
+
path: string;
|
|
26
|
+
line: number | null;
|
|
27
|
+
body: string;
|
|
28
|
+
author: string;
|
|
29
|
+
category: string;
|
|
30
|
+
action: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Build a continue-run `NodeEnvelope` from categorised PR review comments.
|
|
34
|
+
*
|
|
35
|
+
* The returned envelope satisfies the Orchestrator's continue branch:
|
|
36
|
+
* - `correlationId` matches the original run (supplied via `base.correlationId`)
|
|
37
|
+
* - `input.context.taskId` is a non-empty string (`PR_FEEDBACK_TASK_ID`)
|
|
38
|
+
* - `status` is `'ok'`
|
|
39
|
+
* - `feedback.comments` carries the categorised review comments
|
|
40
|
+
*
|
|
41
|
+
* The caller (T7 — the PR-Feedback node) supplies the real `correlationId`
|
|
42
|
+
* parsed from the PR-tag and the `agentId` that should handle the feedback.
|
|
43
|
+
*/
|
|
44
|
+
export declare function prCommentsToEnvelope(base: {
|
|
45
|
+
correlationId: string;
|
|
46
|
+
agentId: string;
|
|
47
|
+
}, comments: readonly ReviewComment[]): NodeEnvelope;
|
|
48
|
+
//# sourceMappingURL=pr-feedback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pr-feedback.d.ts","sourceRoot":"","sources":["../../../src/ingestion/pr-feedback.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAmB,MAAM,6BAA6B,CAAC;AAMjF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,gBAAgB,CAAC;AAMjD;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAMD;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAChD,QAAQ,EAAE,SAAS,aAAa,EAAE,GACjC,YAAY,CAgDd"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* PR-feedback ingestion — continue-marker constant + comments-to-envelope mapper.
|
|
4
|
+
*
|
|
5
|
+
* Pure, Bun-free, side-effect-free module. Safe to import in Node/n8n and in
|
|
6
|
+
* unit tests. T7 (the PR-Feedback node) imports `PR_FEEDBACK_TASK_ID` and
|
|
7
|
+
* `prCommentsToEnvelope` from here — no duplicate literals.
|
|
8
|
+
*
|
|
9
|
+
* Plan 1-01 T4 — AC2 (PR-feedback re-entry).
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PR_FEEDBACK_TASK_ID = void 0;
|
|
13
|
+
exports.prCommentsToEnvelope = prCommentsToEnvelope;
|
|
14
|
+
// ---------------------------------------------------------------------------
|
|
15
|
+
// Continue-run marker
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
/**
|
|
18
|
+
* The continue-run marker string written to `input.context.taskId` so the
|
|
19
|
+
* Orchestrator continue branch (`SoftwareTeamsOrchestrator.node.ts:163-181`,
|
|
20
|
+
* keys on `typeof ctx?.taskId === 'string'`) re-enters the run.
|
|
21
|
+
*
|
|
22
|
+
* T7 imports this same constant — no second literal.
|
|
23
|
+
*/
|
|
24
|
+
exports.PR_FEEDBACK_TASK_ID = "pr-feedback";
|
|
25
|
+
// ---------------------------------------------------------------------------
|
|
26
|
+
// Mapper
|
|
27
|
+
// ---------------------------------------------------------------------------
|
|
28
|
+
/**
|
|
29
|
+
* Build a continue-run `NodeEnvelope` from categorised PR review comments.
|
|
30
|
+
*
|
|
31
|
+
* The returned envelope satisfies the Orchestrator's continue branch:
|
|
32
|
+
* - `correlationId` matches the original run (supplied via `base.correlationId`)
|
|
33
|
+
* - `input.context.taskId` is a non-empty string (`PR_FEEDBACK_TASK_ID`)
|
|
34
|
+
* - `status` is `'ok'`
|
|
35
|
+
* - `feedback.comments` carries the categorised review comments
|
|
36
|
+
*
|
|
37
|
+
* The caller (T7 — the PR-Feedback node) supplies the real `correlationId`
|
|
38
|
+
* parsed from the PR-tag and the `agentId` that should handle the feedback.
|
|
39
|
+
*/
|
|
40
|
+
function prCommentsToEnvelope(base, comments) {
|
|
41
|
+
const blocking = comments.filter((c) => c.category === "blocking");
|
|
42
|
+
const changeRequests = comments.filter((c) => c.category === "change_request");
|
|
43
|
+
const questions = comments.filter((c) => c.category === "question");
|
|
44
|
+
const suggestions = comments.filter((c) => c.category === "suggestion");
|
|
45
|
+
const nitpicks = comments.filter((c) => c.category === "nitpick");
|
|
46
|
+
const lines = [
|
|
47
|
+
"Address the following PR review feedback:",
|
|
48
|
+
];
|
|
49
|
+
if (blocking.length > 0) {
|
|
50
|
+
lines.push(`- ${blocking.length} blocking issue(s) — must fix before merge`);
|
|
51
|
+
}
|
|
52
|
+
if (changeRequests.length > 0) {
|
|
53
|
+
lines.push(`- ${changeRequests.length} change request(s) — apply requested changes`);
|
|
54
|
+
}
|
|
55
|
+
if (questions.length > 0) {
|
|
56
|
+
lines.push(`- ${questions.length} question(s) — respond with clarification`);
|
|
57
|
+
}
|
|
58
|
+
if (suggestions.length > 0) {
|
|
59
|
+
lines.push(`- ${suggestions.length} suggestion(s) — consider applying`);
|
|
60
|
+
}
|
|
61
|
+
if (nitpicks.length > 0) {
|
|
62
|
+
lines.push(`- ${nitpicks.length} nitpick(s) — optional fixes`);
|
|
63
|
+
}
|
|
64
|
+
const feedbackComments = comments.map((c) => ({
|
|
65
|
+
path: c.path,
|
|
66
|
+
line: c.line,
|
|
67
|
+
body: c.body,
|
|
68
|
+
author: c.author,
|
|
69
|
+
category: c.category,
|
|
70
|
+
action: c.action,
|
|
71
|
+
}));
|
|
72
|
+
return {
|
|
73
|
+
correlationId: base.correlationId,
|
|
74
|
+
agentId: base.agentId,
|
|
75
|
+
status: "ok",
|
|
76
|
+
input: {
|
|
77
|
+
prompt: lines.join("\n"),
|
|
78
|
+
context: { taskId: exports.PR_FEEDBACK_TASK_ID },
|
|
79
|
+
},
|
|
80
|
+
result: { text: "" },
|
|
81
|
+
artifacts: [],
|
|
82
|
+
feedback: { comments: feedbackComments },
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=pr-feedback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pr-feedback.js","sourceRoot":"","sources":["../../../src/ingestion/pr-feedback.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAmDH,oDAmDC;AAlGD,8EAA8E;AAC9E,sBAAsB;AACtB,8EAA8E;AAE9E;;;;;;GAMG;AACU,QAAA,mBAAmB,GAAG,aAAa,CAAC;AAoBjD,8EAA8E;AAC9E,SAAS;AACT,8EAA8E;AAE9E;;;;;;;;;;;GAWG;AACH,SAAgB,oBAAoB,CAClC,IAAgD,EAChD,QAAkC;IAElC,MAAM,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,UAAU,CAAC,CAAC;IACnE,MAAM,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,gBAAgB,CAAC,CAAC;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,EAAE,CAAC,CAAC,IAAI;QACZ,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,QAAQ,EAAE,CAAC,CAAC,QAAQ;QACpB,MAAM,EAAE,CAAC,CAAC,MAAM;KACjB,CAAC,CAAC,CAAC;IAEJ,OAAO;QACL,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE;YACL,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;YACxB,OAAO,EAAE,EAAE,MAAM,EAAE,2BAAmB,EAAE;SACzC;QACD,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QACpB,SAAS,EAAE,EAAE;QACb,QAAQ,EAAE,EAAE,QAAQ,EAAE,gBAAgB,EAAE;KACzC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IDataObject } from "n8n-workflow";
|
|
2
|
+
import type { NodeEnvelope } from "@websitelabs/software-teams";
|
|
3
|
+
/**
|
|
4
|
+
* n8n's INodeExecutionData.json is typed IDataObject, but our domain types
|
|
5
|
+
* (NodeEnvelope, Record<string,unknown>) are structurally compatible. These
|
|
6
|
+
* two helpers centralise the double-cast so call sites stay clean.
|
|
7
|
+
* R-04: only cross this boundary here — never scatter `as unknown as` elsewhere.
|
|
8
|
+
*/
|
|
9
|
+
export declare function toDataObject(value: NodeEnvelope | Record<string, unknown>): IDataObject;
|
|
10
|
+
export declare function fromDataObject<T>(d: IDataObject): T;
|
|
11
|
+
//# sourceMappingURL=n8n-cast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"n8n-cast.d.ts","sourceRoot":"","sources":["../../src/n8n-cast.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,WAAW,CAEvF;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,GAAG,CAAC,CAEnD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toDataObject = toDataObject;
|
|
4
|
+
exports.fromDataObject = fromDataObject;
|
|
5
|
+
/**
|
|
6
|
+
* n8n's INodeExecutionData.json is typed IDataObject, but our domain types
|
|
7
|
+
* (NodeEnvelope, Record<string,unknown>) are structurally compatible. These
|
|
8
|
+
* two helpers centralise the double-cast so call sites stay clean.
|
|
9
|
+
* R-04: only cross this boundary here — never scatter `as unknown as` elsewhere.
|
|
10
|
+
*/
|
|
11
|
+
function toDataObject(value) {
|
|
12
|
+
return value;
|
|
13
|
+
}
|
|
14
|
+
function fromDataObject(d) {
|
|
15
|
+
return d;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=n8n-cast.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"n8n-cast.js","sourceRoot":"","sources":["../../src/n8n-cast.ts"],"names":[],"mappings":";;AASA,oCAEC;AAED,wCAEC;AAZD;;;;;GAKG;AACH,SAAgB,YAAY,CAAC,KAA6C;IACxE,OAAO,KAA+B,CAAC;AACzC,CAAC;AAED,SAAgB,cAAc,CAAI,CAAc;IAC9C,OAAO,CAAiB,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { RunState } from "./shapes";
|
|
2
|
+
export type RunStore = Record<string, unknown>;
|
|
3
|
+
export declare function getRunStore(staticData: Record<string, unknown>): RunStore;
|
|
4
|
+
export declare function readRunState(staticData: Record<string, unknown>, correlationId: string): RunState | null;
|
|
5
|
+
export declare function writeRunState(staticData: Record<string, unknown>, correlationId: string, state: RunState): void;
|
|
6
|
+
export declare function deleteRunState(staticData: Record<string, unknown>, correlationId: string): boolean;
|
|
7
|
+
//# sourceMappingURL=global-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-store.d.ts","sourceRoot":"","sources":["../../../../src/orchestration/run-state/global-store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGzC,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE/C,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,QAAQ,CAKzE;AAED,wBAAgB,YAAY,CAC1B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,aAAa,EAAE,MAAM,GACpB,QAAQ,GAAG,IAAI,CAEjB;AAED,wBAAgB,aAAa,CAC3B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,QAAQ,GACd,IAAI,CAEN;AAED,wBAAgB,cAAc,CAC5B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,aAAa,EAAE,MAAM,GACpB,OAAO,CAKT"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRunStore = getRunStore;
|
|
4
|
+
exports.readRunState = readRunState;
|
|
5
|
+
exports.writeRunState = writeRunState;
|
|
6
|
+
exports.deleteRunState = deleteRunState;
|
|
7
|
+
const persistence_1 = require("./persistence");
|
|
8
|
+
function getRunStore(staticData) {
|
|
9
|
+
const existing = staticData["runs"];
|
|
10
|
+
const runs = existing !== null && existing !== void 0 ? existing : {};
|
|
11
|
+
staticData["runs"] = runs;
|
|
12
|
+
return runs;
|
|
13
|
+
}
|
|
14
|
+
function readRunState(staticData, correlationId) {
|
|
15
|
+
return (0, persistence_1.deserialiseRunState)(getRunStore(staticData)[correlationId]);
|
|
16
|
+
}
|
|
17
|
+
function writeRunState(staticData, correlationId, state) {
|
|
18
|
+
getRunStore(staticData)[correlationId] = (0, persistence_1.serialiseRunState)(state);
|
|
19
|
+
}
|
|
20
|
+
function deleteRunState(staticData, correlationId) {
|
|
21
|
+
const runs = getRunStore(staticData);
|
|
22
|
+
if (!(correlationId in runs))
|
|
23
|
+
return false;
|
|
24
|
+
delete runs[correlationId];
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=global-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-store.js","sourceRoot":"","sources":["../../../../src/orchestration/run-state/global-store.ts"],"names":[],"mappings":";;AAKA,kCAKC;AAED,oCAKC;AAED,sCAMC;AAED,wCAQC;AAlCD,+CAAuE;AAIvE,SAAgB,WAAW,CAAC,UAAmC;IAC7D,MAAM,QAAQ,GAAG,UAAU,CAAC,MAAM,CAAyB,CAAC;IAC5D,MAAM,IAAI,GAAG,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,EAAE,CAAC;IAC5B,UAAU,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAC1B,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAgB,YAAY,CAC1B,UAAmC,EACnC,aAAqB;IAErB,OAAO,IAAA,iCAAmB,EAAC,WAAW,CAAC,UAAU,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;AACrE,CAAC;AAED,SAAgB,aAAa,CAC3B,UAAmC,EACnC,aAAqB,EACrB,KAAe;IAEf,WAAW,CAAC,UAAU,CAAC,CAAC,aAAa,CAAC,GAAG,IAAA,+BAAiB,EAAC,KAAK,CAAC,CAAC;AACpE,CAAC;AAED,SAAgB,cAAc,CAC5B,UAAmC,EACnC,aAAqB;IAErB,MAAM,IAAI,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;IACrC,IAAI,CAAC,CAAC,aAAa,IAAI,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IAC3C,OAAO,IAAI,CAAC,aAAa,CAAC,CAAC;IAC3B,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { NodeEnvelope } from "@websitelabs/software-teams";
|
|
2
|
+
import type { OrchestrationTask } from "./shapes";
|
|
3
|
+
/**
|
|
4
|
+
* Order tasks for canvas delegation: wave-major, Kahn-style topological sort.
|
|
5
|
+
* Ties within a wave break on the planner's original index for deterministic output.
|
|
6
|
+
* Throws on a dependency cycle / unsatisfiable dependency so malformed plans surface loudly (R-05).
|
|
7
|
+
*/
|
|
8
|
+
export declare function orderTasks(tasks: OrchestrationTask[]): OrchestrationTask[];
|
|
9
|
+
/**
|
|
10
|
+
* Turn ordered tasks into the per-task envelopes the Orchestrator emits (one item per wave-task).
|
|
11
|
+
* ARCHITECTURE.md §"Decision C" is the authority for this emission contract.
|
|
12
|
+
*/
|
|
13
|
+
export declare function tasksToEnvelopes(tasks: OrchestrationTask[], correlationId: string): NodeEnvelope[];
|
|
14
|
+
//# sourceMappingURL=ordering.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ordering.d.ts","sourceRoot":"","sources":["../../../../src/orchestration/run-state/ordering.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,iBAAiB,EAAE,GAAG,iBAAiB,EAAE,CAgC1E;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,iBAAiB,EAAE,EAC1B,aAAa,EAAE,MAAM,GACpB,YAAY,EAAE,CAiBhB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.orderTasks = orderTasks;
|
|
4
|
+
exports.tasksToEnvelopes = tasksToEnvelopes;
|
|
5
|
+
/**
|
|
6
|
+
* Order tasks for canvas delegation: wave-major, Kahn-style topological sort.
|
|
7
|
+
* Ties within a wave break on the planner's original index for deterministic output.
|
|
8
|
+
* Throws on a dependency cycle / unsatisfiable dependency so malformed plans surface loudly (R-05).
|
|
9
|
+
*/
|
|
10
|
+
function orderTasks(tasks) {
|
|
11
|
+
const known = new Set(tasks.map((t) => t.taskId));
|
|
12
|
+
const originalIndex = new Map();
|
|
13
|
+
tasks.forEach((t, i) => originalIndex.set(t.taskId, i));
|
|
14
|
+
const done = new Set();
|
|
15
|
+
const ordered = [];
|
|
16
|
+
const remaining = [...tasks];
|
|
17
|
+
while (remaining.length > 0) {
|
|
18
|
+
const available = remaining.filter((t) => t.dependsOn.every((d) => !known.has(d) || done.has(d)));
|
|
19
|
+
if (available.length === 0) {
|
|
20
|
+
throw new Error(`Cyclic or unsatisfiable dependencies in task breakdown: ${remaining
|
|
21
|
+
.map((t) => t.taskId)
|
|
22
|
+
.join(", ")}`);
|
|
23
|
+
}
|
|
24
|
+
available.sort((a, b) => {
|
|
25
|
+
var _a, _b;
|
|
26
|
+
return a.wave !== b.wave
|
|
27
|
+
? a.wave - b.wave
|
|
28
|
+
: ((_a = originalIndex.get(a.taskId)) !== null && _a !== void 0 ? _a : 0) - ((_b = originalIndex.get(b.taskId)) !== null && _b !== void 0 ? _b : 0);
|
|
29
|
+
});
|
|
30
|
+
const next = available[0];
|
|
31
|
+
ordered.push(next);
|
|
32
|
+
done.add(next.taskId);
|
|
33
|
+
remaining.splice(remaining.indexOf(next), 1);
|
|
34
|
+
}
|
|
35
|
+
return ordered;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Turn ordered tasks into the per-task envelopes the Orchestrator emits (one item per wave-task).
|
|
39
|
+
* ARCHITECTURE.md §"Decision C" is the authority for this emission contract.
|
|
40
|
+
*/
|
|
41
|
+
function tasksToEnvelopes(tasks, correlationId) {
|
|
42
|
+
return tasks.map((t) => ({
|
|
43
|
+
correlationId,
|
|
44
|
+
agentId: t.agent,
|
|
45
|
+
status: "ok",
|
|
46
|
+
input: {
|
|
47
|
+
prompt: t.name,
|
|
48
|
+
context: {
|
|
49
|
+
taskId: t.taskId,
|
|
50
|
+
wave: t.wave,
|
|
51
|
+
dependsOn: [...t.dependsOn],
|
|
52
|
+
...(t.slice ? { slice: t.slice } : {}),
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
result: { text: "" },
|
|
56
|
+
artifacts: [],
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=ordering.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ordering.js","sourceRoot":"","sources":["../../../../src/orchestration/run-state/ordering.ts"],"names":[],"mappings":";;AAQA,gCAgCC;AAMD,4CAoBC;AA/DD;;;;GAIG;AACH,SAAgB,UAAU,CAAC,KAA0B;IACnD,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IAClD,MAAM,aAAa,GAAG,IAAI,GAAG,EAAkB,CAAC;IAChD,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;IAExD,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,MAAM,OAAO,GAAwB,EAAE,CAAC;IACxC,MAAM,SAAS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,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;GAGG;AACH,SAAgB,gBAAgB,CAC9B,KAA0B,EAC1B,aAAqB;IAErB,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACvB,aAAa;QACb,OAAO,EAAE,CAAC,CAAC,KAAK;QAChB,MAAM,EAAE,IAAa;QACrB,KAAK,EAAE;YACL,MAAM,EAAE,CAAC,CAAC,IAAI;YACd,OAAO,EAAE;gBACP,MAAM,EAAE,CAAC,CAAC,MAAM;gBAChB,IAAI,EAAE,CAAC,CAAC,IAAI;gBACZ,SAAS,EAAE,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC;gBAC3B,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACvC;SACF;QACD,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QACpB,SAAS,EAAE,EAAE;KACd,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { NodeEnvelope } from "@websitelabs/software-teams";
|
|
2
|
+
import type { RunState } from "./shapes";
|
|
3
|
+
/** Deep-clone to a plain JSON object for storage in workflow static data. */
|
|
4
|
+
export declare function serialiseRunState(state: RunState): Record<string, unknown>;
|
|
5
|
+
/** Ingestion boundary: value arrives from n8n workflow static data whose type is `unknown`; narrows here. */
|
|
6
|
+
export declare function deserialiseRunState(value: unknown): RunState | null;
|
|
7
|
+
/** Ingestion boundary: value arrives from n8n item.json whose type is `unknown`; narrows to NodeEnvelope. */
|
|
8
|
+
export declare function isNodeEnvelope(value: unknown): value is NodeEnvelope;
|
|
9
|
+
//# sourceMappingURL=persistence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"persistence.d.ts","sourceRoot":"","sources":["../../../../src/orchestration/run-state/persistence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,6EAA6E;AAC7E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAE1E;AAED,6GAA6G;AAC7G,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,IAAI,CAKnE;AAED,6GAA6G;AAC7G,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CASpE"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.serialiseRunState = serialiseRunState;
|
|
4
|
+
exports.deserialiseRunState = deserialiseRunState;
|
|
5
|
+
exports.isNodeEnvelope = isNodeEnvelope;
|
|
6
|
+
/** Deep-clone to a plain JSON object for storage in workflow static data. */
|
|
7
|
+
function serialiseRunState(state) {
|
|
8
|
+
return JSON.parse(JSON.stringify(state));
|
|
9
|
+
}
|
|
10
|
+
/** Ingestion boundary: value arrives from n8n workflow static data whose type is `unknown`; narrows here. */
|
|
11
|
+
function deserialiseRunState(value) {
|
|
12
|
+
if (value == null || typeof value !== "object")
|
|
13
|
+
return null;
|
|
14
|
+
const v = value;
|
|
15
|
+
if (typeof v.correlationId !== "string" || !Array.isArray(v.tasks))
|
|
16
|
+
return null;
|
|
17
|
+
return value;
|
|
18
|
+
}
|
|
19
|
+
/** Ingestion boundary: value arrives from n8n item.json whose type is `unknown`; narrows to NodeEnvelope. */
|
|
20
|
+
function isNodeEnvelope(value) {
|
|
21
|
+
if (value == null || typeof value !== "object")
|
|
22
|
+
return false;
|
|
23
|
+
const v = value;
|
|
24
|
+
return (typeof v.correlationId === "string" &&
|
|
25
|
+
v.correlationId.length > 0 &&
|
|
26
|
+
typeof v.agentId === "string" &&
|
|
27
|
+
(v.status === "ok" || v.status === "error" || v.status === "needs-input"));
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=persistence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"persistence.js","sourceRoot":"","sources":["../../../../src/orchestration/run-state/persistence.ts"],"names":[],"mappings":";;AAIA,8CAEC;AAGD,kDAKC;AAGD,wCASC;AAvBD,6EAA6E;AAC7E,SAAgB,iBAAiB,CAAC,KAAe;IAC/C,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAA4B,CAAC;AACtE,CAAC;AAED,6GAA6G;AAC7G,SAAgB,mBAAmB,CAAC,KAAc;IAChD,IAAI,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC5D,MAAM,CAAC,GAAG,KAAgC,CAAC;IAC3C,IAAI,OAAO,CAAC,CAAC,aAAa,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAChF,OAAO,KAAiB,CAAC;AAC3B,CAAC;AAED,6GAA6G;AAC7G,SAAgB,cAAc,CAAC,KAAc;IAC3C,IAAI,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC7D,MAAM,CAAC,GAAG,KAAgC,CAAC;IAC3C,OAAO,CACL,OAAO,CAAC,CAAC,aAAa,KAAK,QAAQ;QACnC,CAAC,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC;QAC1B,OAAO,CAAC,CAAC,OAAO,KAAK,QAAQ;QAC7B,CAAC,CAAC,CAAC,MAAM,KAAK,IAAI,IAAI,CAAC,CAAC,MAAM,KAAK,OAAO,IAAI,CAAC,CAAC,MAAM,KAAK,aAAa,CAAC,CAC1E,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { NodeEnvelope } from "@websitelabs/software-teams";
|
|
2
|
+
import type { AgentTurnAdapter, OrchestrationTask, PlanResult } from "./shapes";
|
|
3
|
+
export declare const BREAKDOWN_INSTRUCTION: string;
|
|
4
|
+
/** Build the single-turn envelope that runs the planner. */
|
|
5
|
+
export declare function buildPlannerEnvelope(epic: string, correlationId: string): NodeEnvelope;
|
|
6
|
+
/**
|
|
7
|
+
* Parse a planner response into `OrchestrationTask`-shaped items.
|
|
8
|
+
* Tolerant of markdown fences and stray prose; throws with a clear message when
|
|
9
|
+
* nothing parseable is found (R-05 — traceable failures).
|
|
10
|
+
*/
|
|
11
|
+
export declare function parseBreakdown(text: string): OrchestrationTask[];
|
|
12
|
+
/**
|
|
13
|
+
* Run a single-turn planning pass and produce canvas-delegation payload.
|
|
14
|
+
* Planner `needs-input` → returned via `plannerNeedsInput`; `error` → throws.
|
|
15
|
+
*/
|
|
16
|
+
export declare function planEpic(epic: string, correlationId: string, adapter: AgentTurnAdapter): Promise<PlanResult>;
|
|
17
|
+
//# sourceMappingURL=planning.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planning.d.ts","sourceRoot":"","sources":["../../../../src/orchestration/run-state/planning.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAIhF,eAAO,MAAM,qBAAqB,QActB,CAAC;AAEb,4DAA4D;AAC5D,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,GACpB,YAAY,CAYd;AAWD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,EAAE,CA4ChE;AAED;;;GAGG;AACH,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,UAAU,CAAC,CAyBrB"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BREAKDOWN_INSTRUCTION = void 0;
|
|
4
|
+
exports.buildPlannerEnvelope = buildPlannerEnvelope;
|
|
5
|
+
exports.parseBreakdown = parseBreakdown;
|
|
6
|
+
exports.planEpic = planEpic;
|
|
7
|
+
const ordering_1 = require("./ordering");
|
|
8
|
+
const transitions_1 = require("./transitions");
|
|
9
|
+
exports.BREAKDOWN_INSTRUCTION = [
|
|
10
|
+
"Break the epic / sprint goal below into a waved task breakdown using your",
|
|
11
|
+
"Task Breakdown and Wave Computation workflow.",
|
|
12
|
+
"",
|
|
13
|
+
"Return ONLY a single JSON array — no surrounding prose. Each element MUST",
|
|
14
|
+
"have exactly these fields:",
|
|
15
|
+
' - "taskId": string (e.g. "T1")',
|
|
16
|
+
' - "name": string (the sub-task brief handed to the specialist)',
|
|
17
|
+
' - "agent": string (assigned specialist, e.g. "software-teams-frontend")',
|
|
18
|
+
' - "wave": number (1-based execution wave)',
|
|
19
|
+
' - "dependsOn": string[] (taskIds this task depends on; [] for wave 1)',
|
|
20
|
+
"",
|
|
21
|
+
"Emission order does not matter — the orchestrator computes execution order",
|
|
22
|
+
"from waves and dependencies.",
|
|
23
|
+
].join("\n");
|
|
24
|
+
/** Build the single-turn envelope that runs the planner. */
|
|
25
|
+
function buildPlannerEnvelope(epic, correlationId) {
|
|
26
|
+
return {
|
|
27
|
+
correlationId,
|
|
28
|
+
agentId: "software-teams-planner",
|
|
29
|
+
status: "ok",
|
|
30
|
+
input: {
|
|
31
|
+
prompt: `${exports.BREAKDOWN_INSTRUCTION}\n\n## Epic / Goal\n${epic}`,
|
|
32
|
+
context: null,
|
|
33
|
+
},
|
|
34
|
+
result: { text: "" },
|
|
35
|
+
artifacts: [],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function extractJsonArray(text) {
|
|
39
|
+
const fenced = text.match(/```(?:json)?\s*([\s\S]*?)```/i);
|
|
40
|
+
const candidate = fenced ? fenced[1] : text;
|
|
41
|
+
const start = candidate.indexOf("[");
|
|
42
|
+
const end = candidate.lastIndexOf("]");
|
|
43
|
+
if (start >= 0 && end > start)
|
|
44
|
+
return candidate.slice(start, end + 1);
|
|
45
|
+
return candidate.trim();
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Parse a planner response into `OrchestrationTask`-shaped items.
|
|
49
|
+
* Tolerant of markdown fences and stray prose; throws with a clear message when
|
|
50
|
+
* nothing parseable is found (R-05 — traceable failures).
|
|
51
|
+
*/
|
|
52
|
+
function parseBreakdown(text) {
|
|
53
|
+
const raw = (() => {
|
|
54
|
+
try {
|
|
55
|
+
return JSON.parse(extractJsonArray(text));
|
|
56
|
+
}
|
|
57
|
+
catch (err) {
|
|
58
|
+
throw new Error(`Planner did not return a parseable JSON task breakdown: ${err instanceof Error ? err.message : String(err)}`);
|
|
59
|
+
}
|
|
60
|
+
})();
|
|
61
|
+
if (!Array.isArray(raw)) {
|
|
62
|
+
throw new Error("Planner breakdown is not a JSON array.");
|
|
63
|
+
}
|
|
64
|
+
const tasks = [];
|
|
65
|
+
raw.forEach((entry, i) => {
|
|
66
|
+
var _a;
|
|
67
|
+
if (entry == null || typeof entry !== "object")
|
|
68
|
+
return;
|
|
69
|
+
const o = entry;
|
|
70
|
+
const name = typeof o.name === "string" ? o.name.trim() : "";
|
|
71
|
+
const agent = typeof o.agent === "string" ? o.agent.trim() : "";
|
|
72
|
+
if (!name || !agent)
|
|
73
|
+
return;
|
|
74
|
+
const taskId = typeof o.taskId === "string" && o.taskId.trim() ? o.taskId.trim() : `T${i + 1}`;
|
|
75
|
+
const waveNum = typeof o.wave === "number" && Number.isFinite(o.wave)
|
|
76
|
+
? Math.trunc(o.wave)
|
|
77
|
+
: Number.parseInt(String((_a = o.wave) !== null && _a !== void 0 ? _a : ""), 10);
|
|
78
|
+
const wave = Number.isFinite(waveNum) && waveNum > 0 ? waveNum : 1;
|
|
79
|
+
// Ingestion boundary: dependsOn arrives as unknown[] from parsed JSON; filtered to string[] here.
|
|
80
|
+
const dependsOn = Array.isArray(o.dependsOn)
|
|
81
|
+
? o.dependsOn.filter((d) => typeof d === "string")
|
|
82
|
+
: [];
|
|
83
|
+
const slice = typeof o.slice === "string" ? o.slice : undefined;
|
|
84
|
+
tasks.push({ taskId, name, agent, wave, dependsOn, slice });
|
|
85
|
+
});
|
|
86
|
+
if (tasks.length === 0) {
|
|
87
|
+
throw new Error("Planner breakdown contained no valid tasks.");
|
|
88
|
+
}
|
|
89
|
+
return tasks;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Run a single-turn planning pass and produce canvas-delegation payload.
|
|
93
|
+
* Planner `needs-input` → returned via `plannerNeedsInput`; `error` → throws.
|
|
94
|
+
*/
|
|
95
|
+
async function planEpic(epic, correlationId, adapter) {
|
|
96
|
+
const planned = await adapter(buildPlannerEnvelope(epic, correlationId));
|
|
97
|
+
if (planned.status === "needs-input") {
|
|
98
|
+
return {
|
|
99
|
+
correlationId,
|
|
100
|
+
tasks: [],
|
|
101
|
+
envelopes: [],
|
|
102
|
+
state: (0, transitions_1.initRunState)(correlationId, []),
|
|
103
|
+
plannerNeedsInput: planned,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
if (planned.status === "error") {
|
|
107
|
+
throw new Error(`Planner turn failed: ${planned.result.text || "unknown error"}`);
|
|
108
|
+
}
|
|
109
|
+
const tasks = (0, ordering_1.orderTasks)(parseBreakdown(planned.result.text));
|
|
110
|
+
return {
|
|
111
|
+
correlationId,
|
|
112
|
+
tasks,
|
|
113
|
+
envelopes: (0, ordering_1.tasksToEnvelopes)(tasks, correlationId),
|
|
114
|
+
state: (0, transitions_1.initRunState)(correlationId, tasks),
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=planning.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planning.js","sourceRoot":"","sources":["../../../../src/orchestration/run-state/planning.ts"],"names":[],"mappings":";;;AAsBA,oDAeC;AAgBD,wCA4CC;AAMD,4BA6BC;AAlID,yCAA0D;AAC1D,+CAA6C;AAEhC,QAAA,qBAAqB,GAAG;IACnC,2EAA2E;IAC3E,+CAA+C;IAC/C,EAAE;IACF,2EAA2E;IAC3E,4BAA4B;IAC5B,uCAAuC;IACvC,yEAAyE;IACzE,iFAAiF;IACjF,oDAAoD;IACpD,yEAAyE;IACzE,EAAE;IACF,4EAA4E;IAC5E,8BAA8B;CAC/B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,4DAA4D;AAC5D,SAAgB,oBAAoB,CAClC,IAAY,EACZ,aAAqB;IAErB,OAAO;QACL,aAAa;QACb,OAAO,EAAE,wBAAwB;QACjC,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE;YACL,MAAM,EAAE,GAAG,6BAAqB,uBAAuB,IAAI,EAAE;YAC7D,OAAO,EAAE,IAAI;SACd;QACD,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QACpB,SAAS,EAAE,EAAE;KACd,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAY;IACpC,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;IAC3D,MAAM,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7C,MAAM,KAAK,GAAG,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACrC,MAAM,GAAG,GAAG,SAAS,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACvC,IAAI,KAAK,IAAI,CAAC,IAAI,GAAG,GAAG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,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;IACjE,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,QAAQ,CAC5B,IAAY,EACZ,aAAqB,EACrB,OAAyB;IAEzB,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,oBAAoB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC;IAEzE,IAAI,OAAO,CAAC,MAAM,KAAK,aAAa,EAAE,CAAC;QACrC,OAAO;YACL,aAAa;YACb,KAAK,EAAE,EAAE;YACT,SAAS,EAAE,EAAE;YACb,KAAK,EAAE,IAAA,0BAAY,EAAC,aAAa,EAAE,EAAE,CAAC;YACtC,iBAAiB,EAAE,OAAO;SAC3B,CAAC;IACJ,CAAC;IACD,IAAI,OAAO,CAAC,MAAM,KAAK,OAAO,EAAE,CAAC;QAC/B,MAAM,IAAI,KAAK,CACb,wBAAwB,OAAO,CAAC,MAAM,CAAC,IAAI,IAAI,eAAe,EAAE,CACjE,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,GAAG,IAAA,qBAAU,EAAC,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9D,OAAO;QACL,aAAa;QACb,KAAK;QACL,SAAS,EAAE,IAAA,2BAAgB,EAAC,KAAK,EAAE,aAAa,CAAC;QACjD,KAAK,EAAE,IAAA,0BAAY,EAAC,aAAa,EAAE,KAAK,CAAC;KAC1C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { NodeEnvelope } from "@websitelabs/software-teams";
|
|
2
|
+
import type { RunState } from "./shapes";
|
|
3
|
+
/**
|
|
4
|
+
* Build the single-turn envelope that runs the readiness quality pass.
|
|
5
|
+
* The `agentId` is `software-teams-quality`; the prompt serialises the plan's
|
|
6
|
+
* task list so the quality agent can evaluate it without disk access.
|
|
7
|
+
*/
|
|
8
|
+
export declare function buildReadinessEnvelope(state: RunState, correlationId: string): NodeEnvelope;
|
|
9
|
+
export interface ReadinessVerdict {
|
|
10
|
+
/** true when the quality pass approves the plan for fan-out. */
|
|
11
|
+
ready: boolean;
|
|
12
|
+
/** blocking gaps surfaced by the quality agent (empty when ready). */
|
|
13
|
+
gaps: string[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Parse the structured READINESS verdict from the quality agent's response text.
|
|
17
|
+
* Tolerant of markdown fences and minor formatting variations.
|
|
18
|
+
*/
|
|
19
|
+
export declare function parseReadinessVerdict(text: string): ReadinessVerdict;
|
|
20
|
+
//# sourceMappingURL=readiness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readiness.d.ts","sourceRoot":"","sources":["../../../../src/orchestration/run-state/readiness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAqDzC;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,QAAQ,EACf,aAAa,EAAE,MAAM,GACpB,YAAY,CAad;AAMD,MAAM,WAAW,gBAAgB;IAC/B,gEAAgE;IAChE,KAAK,EAAE,OAAO,CAAC;IACf,sEAAsE;IACtE,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,CA2CpE"}
|