@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,366 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SoftwareTeamsHitl = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const n8n_cast_1 = require("../../src/n8n-cast");
|
|
6
|
+
const SINGLE_TURN_MODULE = '../../src/execution/single-turn';
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
8
|
+
const { runAgentTurn } = require(SINGLE_TURN_MODULE);
|
|
9
|
+
// Conversation-state store (T2) — reuses correlationId-keyed JSON file.
|
|
10
|
+
const CONV_STATE_MODULE = '../../src/hitl/conversation-state';
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
12
|
+
const convState = require(CONV_STATE_MODULE);
|
|
13
|
+
// Channel adapters (T8)
|
|
14
|
+
const CHANNELS_MODULE = '../../src/hitl/channels';
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
16
|
+
const channelsModule = require(CHANNELS_MODULE);
|
|
17
|
+
/**
|
|
18
|
+
* Generic, channel-agnostic HITL node (T8 — AC3, AC4).
|
|
19
|
+
*
|
|
20
|
+
* Supports Slack, Email, n8n-notification, AND Discord. Multi-round: on
|
|
21
|
+
* resume, if the agent still needs input, re-parks with an incremented
|
|
22
|
+
* round instead of deleting state. State is only deleted once the agent
|
|
23
|
+
* returns ok/error.
|
|
24
|
+
*
|
|
25
|
+
* ASK MODE (status: 'needs-input'): posts the question via the selected
|
|
26
|
+
* channel adapter, saves state with channel + round + delivery ref, then
|
|
27
|
+
* putExecutionToWait.
|
|
28
|
+
*
|
|
29
|
+
* RESUME MODE (hitlAnswer + correlationId): loads state, acks via the
|
|
30
|
+
* channel adapter, merges answer into context, runs runAgentTurn. If the
|
|
31
|
+
* agent returns needs-input again, re-saves state with incremented round
|
|
32
|
+
* and re-waits (genuine multi-round). Only deletes state on ok/error.
|
|
33
|
+
*
|
|
34
|
+
* PASS-THROUGH: status 'ok' or 'error' passes unchanged.
|
|
35
|
+
*/
|
|
36
|
+
class SoftwareTeamsHitl {
|
|
37
|
+
constructor() {
|
|
38
|
+
this.description = {
|
|
39
|
+
displayName: 'Software Teams HITL',
|
|
40
|
+
name: 'softwareTeamsHitl',
|
|
41
|
+
icon: 'file:softwareTeamsHitl.svg',
|
|
42
|
+
group: ['transform'],
|
|
43
|
+
version: 1,
|
|
44
|
+
description: 'Channel-agnostic human-in-the-loop node (AC3/AC4). ' +
|
|
45
|
+
'Supports Slack, Email, n8n-notification, and Discord with genuine ' +
|
|
46
|
+
'multi-round back-and-forth. When an upstream agent returns needs-input, ' +
|
|
47
|
+
'posts the question via the selected channel, pauses the workflow, and ' +
|
|
48
|
+
'resumes the same agent with the human\'s reply. Re-parks for additional ' +
|
|
49
|
+
'rounds until the agent returns ok or error.',
|
|
50
|
+
subtitle: '={{ $parameter["channel"] }} / {{ $parameter["destination"] }}',
|
|
51
|
+
defaults: { name: 'Software Teams HITL' },
|
|
52
|
+
inputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
53
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.Main],
|
|
54
|
+
credentials: [{ name: 'softwareTeamsApi', required: true }],
|
|
55
|
+
properties: [
|
|
56
|
+
{
|
|
57
|
+
displayName: 'Channel',
|
|
58
|
+
name: 'channel',
|
|
59
|
+
type: 'options',
|
|
60
|
+
options: [
|
|
61
|
+
{ name: 'Auto (Envelope Hint)', value: 'auto' },
|
|
62
|
+
{ name: 'Discord', value: 'discord' },
|
|
63
|
+
{ name: 'Email', value: 'email' },
|
|
64
|
+
{ name: 'N8n Notification', value: 'notify' },
|
|
65
|
+
{ name: 'Slack', value: 'slack' },
|
|
66
|
+
],
|
|
67
|
+
default: 'auto',
|
|
68
|
+
description: 'Which channel to use for delivering questions to the human. ' +
|
|
69
|
+
'"Auto" reads the optional hitlChannel hint from the upstream envelope ' +
|
|
70
|
+
'(defaults to discord if no hint is present). The node\'s explicit selection ' +
|
|
71
|
+
'always wins over the envelope hint.',
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
displayName: 'Destination',
|
|
75
|
+
name: 'destination',
|
|
76
|
+
type: 'string',
|
|
77
|
+
default: '',
|
|
78
|
+
required: true,
|
|
79
|
+
description: 'Channel-specific destination: Slack channel ID (e.g. C0123456), ' +
|
|
80
|
+
'Discord channel ID (e.g. 1234567890), email address, or n8n notification ' +
|
|
81
|
+
'target identifier.',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
displayName: 'Wait Timeout (Hours)',
|
|
85
|
+
name: 'waitTimeoutHours',
|
|
86
|
+
type: 'number',
|
|
87
|
+
default: 24,
|
|
88
|
+
description: 'Maximum hours to wait for a human reply before execution times out. ' +
|
|
89
|
+
'Set WEBHOOK_URL env var to the n8n public FQDN so the resume URL is ' +
|
|
90
|
+
'reachable from the channel\'s servers.',
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
usableAsTool: true,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
async execute() {
|
|
97
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
98
|
+
const items = this.getInputData();
|
|
99
|
+
const returnData = [];
|
|
100
|
+
// Credentials (R-02: NEVER written to output)
|
|
101
|
+
const credentials = await this.getCredentials('softwareTeamsApi');
|
|
102
|
+
const slackToken = credentials['slackBotToken'];
|
|
103
|
+
const discordToken = credentials['discordBotToken'];
|
|
104
|
+
const smtpUrl = credentials['smtpUrl'];
|
|
105
|
+
const channelParam = this.getNodeParameter('channel', 0, 'auto');
|
|
106
|
+
const destination = this.getNodeParameter('destination', 0, '');
|
|
107
|
+
const waitTimeoutHours = this.getNodeParameter('waitTimeoutHours', 0, 24);
|
|
108
|
+
const itemCount = items.length > 0 ? items.length : 1;
|
|
109
|
+
for (const [i] of Array.from({ length: itemCount }).entries()) {
|
|
110
|
+
try {
|
|
111
|
+
const data = ((_b = (_a = items[i]) === null || _a === void 0 ? void 0 : _a.json) !== null && _b !== void 0 ? _b : {});
|
|
112
|
+
// ── RESUME MODE ──────────────────────────────────────────────────
|
|
113
|
+
if (typeof data['hitlAnswer'] === 'string' &&
|
|
114
|
+
typeof data['correlationId'] === 'string') {
|
|
115
|
+
const hitlAnswer = data['hitlAnswer'];
|
|
116
|
+
const correlationId = data['correlationId'];
|
|
117
|
+
const state = convState.loadState(correlationId);
|
|
118
|
+
if (!state) {
|
|
119
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `HITL resume: no conversation state found for correlationId "${correlationId}". ` +
|
|
120
|
+
'Ensure the HITL state file (HITL_STATE_PATH) is on persistent storage ' +
|
|
121
|
+
'shared between the ask and resume execution contexts.', { itemIndex: i });
|
|
122
|
+
}
|
|
123
|
+
// Non-fatal channel acknowledgement
|
|
124
|
+
const resolvedChannel = (_c = state.channel) !== null && _c !== void 0 ? _c : 'slack';
|
|
125
|
+
const ackToken = resolveToken(resolvedChannel, { slackToken, discordToken, smtpUrl });
|
|
126
|
+
if (ackToken && state.delivery) {
|
|
127
|
+
try {
|
|
128
|
+
const adapter = channelsModule.getChannel(resolvedChannel);
|
|
129
|
+
await adapter.postAck({
|
|
130
|
+
answer: hitlAnswer,
|
|
131
|
+
correlationId,
|
|
132
|
+
token: ackToken,
|
|
133
|
+
delivery: state.delivery,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
catch {
|
|
137
|
+
// ack failure must not block agent resume
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
// Merge the human's answer into context
|
|
141
|
+
const originalContext = state.originalEnvelope.input.context;
|
|
142
|
+
const mergedContext = {
|
|
143
|
+
...(typeof originalContext === 'object' &&
|
|
144
|
+
originalContext !== null &&
|
|
145
|
+
!Array.isArray(originalContext)
|
|
146
|
+
? originalContext
|
|
147
|
+
: { originalContext }),
|
|
148
|
+
hitl: {
|
|
149
|
+
question: state.question,
|
|
150
|
+
answer: hitlAnswer,
|
|
151
|
+
round: (_d = state.round) !== null && _d !== void 0 ? _d : 1,
|
|
152
|
+
},
|
|
153
|
+
};
|
|
154
|
+
const resumeEnvelope = {
|
|
155
|
+
...state.originalEnvelope,
|
|
156
|
+
status: 'ok',
|
|
157
|
+
input: {
|
|
158
|
+
prompt: state.originalEnvelope.input.prompt,
|
|
159
|
+
context: mergedContext,
|
|
160
|
+
},
|
|
161
|
+
result: { text: '' },
|
|
162
|
+
};
|
|
163
|
+
const agentResult = await runAgentTurn(resumeEnvelope).catch((err) => {
|
|
164
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `HITL resume: runAgentTurn failed: ${err instanceof Error ? err.message : String(err)}`, { itemIndex: i });
|
|
165
|
+
});
|
|
166
|
+
// ── MULTI-ROUND RE-PARK (AC3 / R-07) ──────────────────────────
|
|
167
|
+
// If the agent still needs input, re-save state with incremented
|
|
168
|
+
// round and re-wait instead of deleting state.
|
|
169
|
+
if (agentResult.status === 'needs-input') {
|
|
170
|
+
const nextRound = convState.nextRound(state);
|
|
171
|
+
const newQuestion = agentResult.result.text;
|
|
172
|
+
// Post the new question via the same channel
|
|
173
|
+
const questionToken = resolveToken(resolvedChannel, { slackToken, discordToken, smtpUrl });
|
|
174
|
+
if (!questionToken && resolvedChannel !== 'notify') {
|
|
175
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `HITL multi-round: no token available for channel "${resolvedChannel}". ` +
|
|
176
|
+
'Ensure the appropriate credential field is set on SoftwareTeamsApi.', { itemIndex: i });
|
|
177
|
+
}
|
|
178
|
+
const resumeUrl = this.getSignedResumeUrl();
|
|
179
|
+
const adapter = channelsModule.getChannel(resolvedChannel);
|
|
180
|
+
const { deliveryRef } = await adapter.postQuestion({
|
|
181
|
+
question: newQuestion,
|
|
182
|
+
correlationId,
|
|
183
|
+
resumeUrl,
|
|
184
|
+
token: questionToken !== null && questionToken !== void 0 ? questionToken : '',
|
|
185
|
+
destination: resolveDestination(resolvedChannel, destination, state.delivery),
|
|
186
|
+
}).catch((err) => {
|
|
187
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `HITL multi-round: failed to post follow-up question via ${resolvedChannel}: ${err instanceof Error ? err.message : String(err)}`, { itemIndex: i });
|
|
188
|
+
});
|
|
189
|
+
// Re-save state with incremented round
|
|
190
|
+
convState.saveState({
|
|
191
|
+
correlationId,
|
|
192
|
+
originalEnvelope: agentResult,
|
|
193
|
+
slackChannel: (_f = (_e = deliveryRef['slackChannel']) !== null && _e !== void 0 ? _e : state.slackChannel) !== null && _f !== void 0 ? _f : '',
|
|
194
|
+
slackThreadTs: (_h = (_g = deliveryRef['slackThreadTs']) !== null && _g !== void 0 ? _g : state.slackThreadTs) !== null && _h !== void 0 ? _h : '',
|
|
195
|
+
resumeUrl,
|
|
196
|
+
question: newQuestion,
|
|
197
|
+
createdAt: Date.now(),
|
|
198
|
+
channel: resolvedChannel,
|
|
199
|
+
round: nextRound,
|
|
200
|
+
delivery: deliveryRef,
|
|
201
|
+
});
|
|
202
|
+
const waitTill = new Date(Date.now() + waitTimeoutHours * 60 * 60 * 1000);
|
|
203
|
+
await this.putExecutionToWait(waitTill);
|
|
204
|
+
returnData.push({
|
|
205
|
+
json: (0, n8n_cast_1.toDataObject)({
|
|
206
|
+
...agentResult,
|
|
207
|
+
hitl: {
|
|
208
|
+
question: newQuestion,
|
|
209
|
+
channel: resolvedChannel,
|
|
210
|
+
round: nextRound,
|
|
211
|
+
delivery: deliveryRef,
|
|
212
|
+
resumeUrl,
|
|
213
|
+
},
|
|
214
|
+
}),
|
|
215
|
+
pairedItem: { item: i },
|
|
216
|
+
});
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
// Agent returned ok/error — clear state (end of conversation).
|
|
220
|
+
try {
|
|
221
|
+
convState.deleteState(correlationId);
|
|
222
|
+
}
|
|
223
|
+
catch {
|
|
224
|
+
// stale state is benign
|
|
225
|
+
}
|
|
226
|
+
returnData.push({
|
|
227
|
+
json: (0, n8n_cast_1.toDataObject)(agentResult),
|
|
228
|
+
pairedItem: { item: i },
|
|
229
|
+
});
|
|
230
|
+
continue;
|
|
231
|
+
}
|
|
232
|
+
// ── ASK MODE ─────────────────────────────────────────────────────
|
|
233
|
+
const envelope = (0, n8n_cast_1.fromDataObject)(items[i].json);
|
|
234
|
+
if (envelope.status !== 'needs-input') {
|
|
235
|
+
returnData.push({
|
|
236
|
+
json: (0, n8n_cast_1.toDataObject)(data),
|
|
237
|
+
pairedItem: { item: i },
|
|
238
|
+
});
|
|
239
|
+
continue;
|
|
240
|
+
}
|
|
241
|
+
const question = envelope.result.text;
|
|
242
|
+
const correlationId = envelope.correlationId;
|
|
243
|
+
// Resolve the channel: explicit param wins, then envelope hint, then discord default.
|
|
244
|
+
const resolvedChannel = resolveChannelName(channelParam, envelope);
|
|
245
|
+
const token = resolveToken(resolvedChannel, { slackToken, discordToken, smtpUrl });
|
|
246
|
+
if (!token && resolvedChannel !== 'notify') {
|
|
247
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `No credential token found for channel "${resolvedChannel}". ` +
|
|
248
|
+
resolveTokenHint(resolvedChannel), { itemIndex: i });
|
|
249
|
+
}
|
|
250
|
+
const resumeUrl = this.getSignedResumeUrl();
|
|
251
|
+
const adapter = channelsModule.getChannel(resolvedChannel);
|
|
252
|
+
const { deliveryRef } = await adapter.postQuestion({
|
|
253
|
+
question,
|
|
254
|
+
correlationId,
|
|
255
|
+
resumeUrl,
|
|
256
|
+
token: token !== null && token !== void 0 ? token : '',
|
|
257
|
+
destination,
|
|
258
|
+
}).catch((err) => {
|
|
259
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Failed to post agent question via ${resolvedChannel}: ${err instanceof Error ? err.message : String(err)}`, { itemIndex: i });
|
|
260
|
+
});
|
|
261
|
+
convState.saveState({
|
|
262
|
+
correlationId,
|
|
263
|
+
originalEnvelope: envelope,
|
|
264
|
+
slackChannel: (_j = deliveryRef['slackChannel']) !== null && _j !== void 0 ? _j : '',
|
|
265
|
+
slackThreadTs: (_k = deliveryRef['slackThreadTs']) !== null && _k !== void 0 ? _k : '',
|
|
266
|
+
resumeUrl,
|
|
267
|
+
question,
|
|
268
|
+
createdAt: Date.now(),
|
|
269
|
+
channel: resolvedChannel,
|
|
270
|
+
round: 1,
|
|
271
|
+
delivery: deliveryRef,
|
|
272
|
+
});
|
|
273
|
+
const waitTill = new Date(Date.now() + waitTimeoutHours * 60 * 60 * 1000);
|
|
274
|
+
await this.putExecutionToWait(waitTill);
|
|
275
|
+
returnData.push({
|
|
276
|
+
json: (0, n8n_cast_1.toDataObject)({
|
|
277
|
+
...envelope,
|
|
278
|
+
hitl: {
|
|
279
|
+
question,
|
|
280
|
+
channel: resolvedChannel,
|
|
281
|
+
round: 1,
|
|
282
|
+
delivery: deliveryRef,
|
|
283
|
+
resumeUrl,
|
|
284
|
+
},
|
|
285
|
+
}),
|
|
286
|
+
pairedItem: { item: i },
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
catch (err) {
|
|
290
|
+
if (this.continueOnFail()) {
|
|
291
|
+
returnData.push({
|
|
292
|
+
json: { error: err instanceof Error ? err.message : String(err) },
|
|
293
|
+
pairedItem: { item: i },
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
else {
|
|
297
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), err instanceof Error ? err.message : String(err));
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
return [returnData];
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
exports.SoftwareTeamsHitl = SoftwareTeamsHitl;
|
|
305
|
+
// ── Helpers ────────────────────────────────────────────────────────────────
|
|
306
|
+
/** Resolve the effective channel name from param + envelope hint. */
|
|
307
|
+
function resolveChannelName(param, envelope) {
|
|
308
|
+
if (param !== 'auto')
|
|
309
|
+
return param;
|
|
310
|
+
// Check the envelope's optional hitlChannel hint (T3)
|
|
311
|
+
const hint = envelope['hitlChannel'];
|
|
312
|
+
if (hint === 'slack' || hint === 'email' || hint === 'notify' || hint === 'discord') {
|
|
313
|
+
return hint;
|
|
314
|
+
}
|
|
315
|
+
// Default to discord for the first live test
|
|
316
|
+
return 'discord';
|
|
317
|
+
}
|
|
318
|
+
/** Return the credential token for a given channel. */
|
|
319
|
+
function resolveToken(channel, tokens) {
|
|
320
|
+
switch (channel) {
|
|
321
|
+
case 'slack':
|
|
322
|
+
return tokens.slackToken || undefined;
|
|
323
|
+
case 'discord':
|
|
324
|
+
return tokens.discordToken || undefined;
|
|
325
|
+
case 'email':
|
|
326
|
+
return tokens.smtpUrl || undefined;
|
|
327
|
+
case 'notify':
|
|
328
|
+
return undefined; // notify needs no token
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
/** Return a user-friendly hint about which credential field to set. */
|
|
332
|
+
function resolveTokenHint(channel) {
|
|
333
|
+
switch (channel) {
|
|
334
|
+
case 'slack':
|
|
335
|
+
return 'Add a Slack Bot OAuth token (xoxb-...) to the SoftwareTeamsApi credential under "Slack Bot Token".';
|
|
336
|
+
case 'discord':
|
|
337
|
+
return 'Add a Discord Bot Token to the SoftwareTeamsApi credential under "Discord Bot Token".';
|
|
338
|
+
case 'email':
|
|
339
|
+
return 'Add an SMTP URL (smtp://user:pass@host:port) to the SoftwareTeamsApi credential under "SMTP URL".';
|
|
340
|
+
case 'notify':
|
|
341
|
+
return ''; // should never reach here
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Resolve the destination for a multi-round follow-up question.
|
|
346
|
+
* On re-park we may need the destination from the original delivery ref
|
|
347
|
+
* (e.g. the Discord channel ID) if it differs from the node param.
|
|
348
|
+
*/
|
|
349
|
+
function resolveDestination(channel, nodeDestination, delivery) {
|
|
350
|
+
var _a, _b, _c, _d;
|
|
351
|
+
if (nodeDestination)
|
|
352
|
+
return nodeDestination;
|
|
353
|
+
if (!delivery)
|
|
354
|
+
return '';
|
|
355
|
+
switch (channel) {
|
|
356
|
+
case 'slack':
|
|
357
|
+
return (_a = delivery['slackChannel']) !== null && _a !== void 0 ? _a : '';
|
|
358
|
+
case 'discord':
|
|
359
|
+
return (_b = delivery['discordChannelId']) !== null && _b !== void 0 ? _b : '';
|
|
360
|
+
case 'email':
|
|
361
|
+
return (_c = delivery['emailTo']) !== null && _c !== void 0 ? _c : '';
|
|
362
|
+
case 'notify':
|
|
363
|
+
return (_d = delivery['destination']) !== null && _d !== void 0 ? _d : '';
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
//# sourceMappingURL=SoftwareTeamsHitl.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SoftwareTeamsHitl.node.js","sourceRoot":"","sources":["../../../nodes/SoftwareTeamsHitl/SoftwareTeamsHitl.node.ts"],"names":[],"mappings":";;;AAAA,+CAOsB;AAEtB,iDAAkE;AAIlE,MAAM,kBAAkB,GAAW,iCAAiC,CAAC;AACrE,iEAAiE;AACjE,MAAM,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,kBAAkB,CAElD,CAAC;AAEF,wEAAwE;AACxE,MAAM,iBAAiB,GAAW,mCAAmC,CAAC;AACtE,iEAAiE;AACjE,MAAM,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAO1C,CAAC;AAEF,wBAAwB;AACxB,MAAM,eAAe,GAAW,yBAAyB,CAAC;AAC1D,iEAAiE;AACjE,MAAM,cAAc,GAAG,OAAO,CAAC,eAAe,CAE7C,CAAC;AAIF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAa,iBAAiB;IAA9B;QACE,gBAAW,GAAyB;YAClC,WAAW,EAAE,qBAAqB;YAClC,IAAI,EAAE,mBAAmB;YACzB,IAAI,EAAE,4BAA4B;YAClC,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EACT,qDAAqD;gBACrD,oEAAoE;gBACpE,0EAA0E;gBAC1E,wEAAwE;gBACxE,0EAA0E;gBAC1E,6CAA6C;YAC/C,QAAQ,EAAE,gEAAgE;YAC1E,QAAQ,EAAE,EAAE,IAAI,EAAE,qBAAqB,EAAE;YACzC,MAAM,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YAClC,OAAO,EAAE,CAAC,kCAAmB,CAAC,IAAI,CAAC;YACnC,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,QAAQ,EAAE,IAAI,EAAE,CA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,CAAC;QACpD,KAAK,SAAS;YACZ,OAAO,MAAC,QAAQ,CAAC,kBAAkB,CAAY,mCAAI,EAAE,CAAC;QACxD,KAAK,OAAO;YACV,OAAO,MAAC,QAAQ,CAAC,SAAS,CAAY,mCAAI,EAAE,CAAC;QAC/C,KAAK,QAAQ;YACX,OAAO,MAAC,QAAQ,CAAC,aAAa,CAAY,mCAAI,EAAE,CAAC;IACrD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 60 60" width="60" height="60">
|
|
2
|
+
<!-- Background rounded rectangle — multi-channel teal tone -->
|
|
3
|
+
<rect width="60" height="60" rx="10" ry="10" fill="#0D7377"/>
|
|
4
|
+
<!-- Speech bubble body -->
|
|
5
|
+
<rect x="8" y="10" width="38" height="26" rx="6" ry="6" fill="none" stroke="white" stroke-width="2.5"/>
|
|
6
|
+
<!-- Speech bubble tail -->
|
|
7
|
+
<path d="M14 36 L10 46 L22 38" fill="none" stroke="white" stroke-width="2.5" stroke-linejoin="round"/>
|
|
8
|
+
<!-- Circular arrow inside bubble — represents multi-round -->
|
|
9
|
+
<path d="M22 20 A7 7 0 1 1 22 28" fill="none" stroke="#F0C040" stroke-width="2.5" stroke-linecap="round"/>
|
|
10
|
+
<polyline points="22,17 22,21 26,20" fill="none" stroke="#F0C040" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
11
|
+
</svg>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
/**
|
|
3
|
+
* SoftwareTeamsOrchestrator node (AC4, R-04, R-05).
|
|
4
|
+
*
|
|
5
|
+
* Accepts an epic / sprint goal, runs ONE single-turn planning pass through the
|
|
6
|
+
* T3 adapter as `software-teams-planner`, and emits one output item per
|
|
7
|
+
* wave-task as a NodeEnvelope, ordered by wave then dependency.
|
|
8
|
+
* ARCHITECTURE.md §"Decision C — Canvas handoff" is the authority for item
|
|
9
|
+
* emission. Run state is persisted to workflow static data (R-05).
|
|
10
|
+
*/
|
|
11
|
+
export declare class SoftwareTeamsOrchestrator implements INodeType {
|
|
12
|
+
description: INodeTypeDescription;
|
|
13
|
+
execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=SoftwareTeamsOrchestrator.node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SoftwareTeamsOrchestrator.node.d.ts","sourceRoot":"","sources":["../../../nodes/SoftwareTeamsOrchestrator/SoftwareTeamsOrchestrator.node.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,oBAAoB,EAGrB,MAAM,cAAc,CAAC;AA0CtB;;;;;;;;GAQG;AACH,qBAAa,yBAA0B,YAAW,SAAS;IACzD,WAAW,EAAE,oBAAoB,CA+E/B;IAEI,OAAO,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;CA0UxE"}
|