@deepidealab/n8n-nodes-tracira 0.10.0 → 0.12.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/README.md +21 -17
- package/dist/nodes/Tracira/Tracira.node.js +111 -51
- package/dist/nodes/Tracira/Tracira.node.js.map +1 -1
- package/dist/nodes/TraciraTrigger/TraciraTrigger.node.js +5 -4
- package/dist/nodes/TraciraTrigger/TraciraTrigger.node.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This is an n8n community node for Tracira.
|
|
4
4
|
|
|
5
|
-
Tracira monitors AI outputs from your automations, evaluates them against rules, and lets you inspect
|
|
5
|
+
Tracira monitors AI outputs from your automations, evaluates them against rules, and lets you inspect results from inside n8n workflows.
|
|
6
6
|
|
|
7
7
|
[n8n](https://n8n.io/) is a [fair-code licensed](https://docs.n8n.io/sustainable-use-license/) workflow automation platform.
|
|
8
8
|
|
|
@@ -31,24 +31,28 @@ The package ships two nodes: **Tracira** (actions) and **Tracira Trigger** (watc
|
|
|
31
31
|
|
|
32
32
|
### Tracira Trigger
|
|
33
33
|
|
|
34
|
-
Starts a workflow the moment
|
|
34
|
+
Starts a workflow the moment an output gets a verdict or a human decision in Tracira. Pick which events to watch - the default (`approved` / `rejected` / `edited`) fires once a human has decided, the usual choice for approval flows; `flagged`, `passed`, and `error` evaluation events are opt-in. Activating the workflow registers the trigger with Tracira automatically (visible under Integrations → Connected triggers); deactivating removes it. Decision events include the AI `output` and its `metadata`, so an approval workflow can deliver the approved reply with no extra lookup. When a reviewer edits an output, `output` already carries their corrected version, so a workflow that maps `output` needs no changes: it delivers what the human approved, never the version they replaced. `correctedOutput` and `aiOutput` are there when you need to tell the cases apart.
|
|
35
35
|
|
|
36
|
-
The typical human-in-the-loop pattern uses two workflows: workflow A
|
|
36
|
+
The typical human-in-the-loop pattern uses two workflows: workflow A submits the output (AI step → `Check an Output`, Wait for Verdict off), and workflow B starts with the Tracira Trigger, filters on `decision = approved`, and delivers the output.
|
|
37
37
|
|
|
38
38
|
### Tracira (actions)
|
|
39
39
|
|
|
40
|
-
The node supports the `
|
|
40
|
+
The node supports the `Output` resource with these operations (named to match the Tracira Make app modules):
|
|
41
41
|
|
|
42
|
-
- `
|
|
43
|
-
- `Get
|
|
44
|
-
- `Search
|
|
45
|
-
- `Set a Decision`:
|
|
46
|
-
- `
|
|
47
|
-
- `
|
|
42
|
+
- `Check an Output`: Send an AI output to Tracira and have it checked against your rules. Waits for the verdict by default; supports async (fire-and-forget) mode, callback URL with event filtering, and all standard context fields. `Project Name` and `Task Name` offer a searchable dropdown of your existing Tracira projects/tasks, or accept a new name typed manually.
|
|
43
|
+
- `Get an Output`: Fetch a single output by ID.
|
|
44
|
+
- `Search Outputs`: List outputs with filters such as status, project, task, and date range.
|
|
45
|
+
- `Set a Decision`: record a human decision on an output.
|
|
46
|
+
- `Approve` - the workflow proceeds with the output as it stands.
|
|
47
|
+
- `Edit` - the output was wrong. Either send the corrected version (`I Have the Corrected Version`), which the workflow acts on with nothing regenerated, or a comment (`Ask the AI to Redo It`), which is delivered to the downstream automation so it regenerates the output and resubmits it with the `Check an Output` operation's `Revision Of` field set to the original output ID, forming a revision chain.
|
|
48
|
+
- `Reject` - the workflow does not proceed. Always inaction: it never means "do the opposite". To reverse a call the AI made, use `Edit` with the corrected value.
|
|
49
|
+
- `Take Over` - a human handled it outside Tracira. The task is done and the AI output went unused. Records no teaching signal, because taking over is not a judgement that the AI was wrong.
|
|
50
|
+
- `Flag an Output`: Flag an already-checked output for human review, for example when an end-user reports an issue with an AI response. The output re-enters the pending-review queue and notification channels fire.
|
|
51
|
+
- `Upload a File`: Upload a large file (PDF, image, audio) directly to Tracira storage and get back a `key`. Use it for files over ~3 MB that exceed the request size limit; map a binary field (e.g. `data`). Supports up to 32 MB. Pass the returned `key` to the `Check an Output` operation's `Input Attachments` or `Output Attachments` field.
|
|
48
52
|
|
|
49
|
-
The `
|
|
53
|
+
The `Check an Output` operation also has `Input Attachments` (files the AI received) and `Output Attachments` (media the AI produced: generated images, synthesized audio, rendered documents) fields, each with three sources: `Upload File` (send a binary field inline with the request — keep under ~3 MB), `From URL` (a publicly accessible HTTPS URL), or `Tracira Upload` (a `key` from the `Upload a File` operation, for large files). `AI Output` text is required unless an `Output Attachment` carries a media-only output.
|
|
50
54
|
|
|
51
|
-
The `
|
|
55
|
+
The `Check an Output` operation's optional `Action (Gate Mode)` field gates a **proposed action** on human review. When your AI decides to run something with side effects (issue a refund, delete a record), fill in the action's `Name`, a plain-language `Summary`, and optional `Parameters (JSON)`. Reviewers approve or reject the action in Tracira before your workflow executes it, and data-field rules can gate it via paths like `action.params.amount`. Combine with a `Callback URL` so the workflow runs the action only after approval.
|
|
52
56
|
|
|
53
57
|
The node also supports the `API` resource with:
|
|
54
58
|
|
|
@@ -56,7 +60,7 @@ The node also supports the `API` resource with:
|
|
|
56
60
|
|
|
57
61
|
### Sync vs async
|
|
58
62
|
|
|
59
|
-
By default the `
|
|
63
|
+
By default the `Check an Output` operation **waits for the verdict** (`Wait for Verdict` is on): Tracira evaluates inline and responds with the full `{ ok, id, status, verdict, confidenceScore, explanation }` so you can branch on `status` or `verdict` in the same workflow execution. Evaluation is capped at 30 seconds.
|
|
60
64
|
|
|
61
65
|
Turn **Wait for Verdict** off for fire-and-forget logging: Tracira responds immediately with HTTP `202` and `{ ok, id, status: "pending" }`, then evaluates in the background. Use this for high-volume logging where you don't need the verdict inline.
|
|
62
66
|
|
|
@@ -86,9 +90,9 @@ This package is being set up against the current n8n community-node tooling and
|
|
|
86
90
|
Typical pattern:
|
|
87
91
|
|
|
88
92
|
1. Run your AI step in n8n.
|
|
89
|
-
2. Send the model output to `Tracira ->
|
|
93
|
+
2. Send the model output to `Tracira -> Output -> Check an Output`.
|
|
90
94
|
3. Branch on the returned `status`, `verdict`, or `confidenceScore`.
|
|
91
|
-
4. Optionally query
|
|
95
|
+
4. Optionally query past outputs with `Get an Output` or `Search Outputs`.
|
|
92
96
|
|
|
93
97
|
## Example workflow
|
|
94
98
|
|
|
@@ -97,7 +101,7 @@ An importable example workflow is available at [examples/log-and-branch.workflow
|
|
|
97
101
|
The example does this:
|
|
98
102
|
|
|
99
103
|
1. Starts from a manual trigger.
|
|
100
|
-
2.
|
|
104
|
+
2. Submits an output to Tracira.
|
|
101
105
|
3. Branches with an `If` node based on the returned `status`.
|
|
102
106
|
|
|
103
107
|
## Verification notes
|
|
@@ -133,7 +137,7 @@ Every node class in this package must follow the conventions that got the existi
|
|
|
133
137
|
4. **`usableAsTool`**: set `true` on every node class, triggers included. Do NOT try to exempt the `node-usable-as-tool` rule with an eslint-disable comment: the verification scanner lints with `allowInlineConfig: false`, so disable comments are ignored and the package fails review (0.9.2 review finding). A trigger is never actually invoked as a tool, so the property is inert there, and the type only permits `true`.
|
|
134
138
|
5. **Trigger nodes**: name them `<X> Trigger` / `<x>Trigger`, add `activationMessage` and `eventTriggerDescription`, keep the registration id in `getWorkflowStaticData('node')`, and make `checkExists` verify against the API (Tracira auto-prunes dead subscriptions, so a stale local id must re-register).
|
|
135
139
|
6. **Register the node** in `package.json` → `n8n.nodes` (the `dist/...js` path) - the build does not do this for you.
|
|
136
|
-
7. **Field naming and order**: manager-friendly labels matching the Make custom app ("Input Text", "Input Attachments", "AI Output", "Output Attachments"), ordered as the story of the
|
|
140
|
+
7. **Field naming and order**: manager-friendly labels matching the Make custom app ("Input Text", "Input Attachments", "AI Output", "Output Attachments"), ordered as the story of the output: project/task → what the AI received → what it produced → behaviour. Renaming a `displayName` is free; **never rename a parameter `name`** - that breaks existing workflows.
|
|
137
141
|
8. **Add a `default`** to every parameter object the scanner can see - including each mode object inside a resourceLocator's `modes` array (`default: ''` on the `list` and `name` modes; 0.9.2 review finding).
|
|
138
142
|
9. **Verify locally** with `npm run verify` (lint + scanner ESLint + build; needs Node 22+). `npm run scan:source` alone reproduces the verification scanner's ESLint pass against the working tree - `npm run lint` does NOT match it (see PUBLISHING.md). The full published-package scan runs in CI post-publish.
|
|
139
143
|
|
|
@@ -107,7 +107,7 @@ class Tracira {
|
|
|
107
107
|
group: ['transform'],
|
|
108
108
|
version: 1,
|
|
109
109
|
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
110
|
-
description: '
|
|
110
|
+
description: 'Check and inspect your AI outputs in Tracira',
|
|
111
111
|
usableAsTool: true,
|
|
112
112
|
codex: {
|
|
113
113
|
categories: ['Analytics'],
|
|
@@ -144,7 +144,7 @@ class Tracira {
|
|
|
144
144
|
noDataExpression: true,
|
|
145
145
|
options: [
|
|
146
146
|
{
|
|
147
|
-
name: '
|
|
147
|
+
name: 'Output',
|
|
148
148
|
value: 'log',
|
|
149
149
|
},
|
|
150
150
|
{
|
|
@@ -168,40 +168,40 @@ class Tracira {
|
|
|
168
168
|
},
|
|
169
169
|
options: [
|
|
170
170
|
{
|
|
171
|
-
name: '
|
|
171
|
+
name: 'Check an Output',
|
|
172
172
|
value: 'log',
|
|
173
|
-
action: '
|
|
174
|
-
description: 'Send an AI output to Tracira and
|
|
173
|
+
action: 'Check an output',
|
|
174
|
+
description: 'Send an AI output to Tracira and have it checked against your rules. Returns a verdict, confidence score, and explanation based on your configured rules.',
|
|
175
175
|
},
|
|
176
176
|
{
|
|
177
|
-
name: 'Flag
|
|
177
|
+
name: 'Flag an Output',
|
|
178
178
|
value: 'flag',
|
|
179
|
-
action: 'Flag
|
|
180
|
-
description: 'Flag an
|
|
179
|
+
action: 'Flag an output',
|
|
180
|
+
description: 'Flag an already-checked output for human review, e.g. when an end-user reports an issue',
|
|
181
181
|
},
|
|
182
182
|
{
|
|
183
|
-
name: 'Get
|
|
183
|
+
name: 'Get an Output',
|
|
184
184
|
value: 'get',
|
|
185
|
-
action: 'Get
|
|
186
|
-
description: 'Fetch a single
|
|
185
|
+
action: 'Get an output',
|
|
186
|
+
description: 'Fetch a single output by ID, including verdict, explanation, and human decision',
|
|
187
187
|
},
|
|
188
188
|
{
|
|
189
|
-
name: 'Search
|
|
189
|
+
name: 'Search Outputs',
|
|
190
190
|
value: 'search',
|
|
191
|
-
action: 'Search
|
|
192
|
-
description: 'Return a filtered list of
|
|
191
|
+
action: 'Search outputs',
|
|
192
|
+
description: 'Return a filtered list of outputs from Tracira. Filter by status, project, task name, or date range.',
|
|
193
193
|
},
|
|
194
194
|
{
|
|
195
195
|
name: 'Set a Decision',
|
|
196
196
|
value: 'setDecision',
|
|
197
197
|
action: 'Set a decision',
|
|
198
|
-
description: 'Approve
|
|
198
|
+
description: 'Approve or reject an output, edit it, or record that a human took over',
|
|
199
199
|
},
|
|
200
200
|
{
|
|
201
201
|
name: 'Upload a File',
|
|
202
202
|
value: 'upload',
|
|
203
203
|
action: 'Upload a file',
|
|
204
|
-
description: 'Upload a large file directly to Tracira storage, then attach it to
|
|
204
|
+
description: 'Upload a large file directly to Tracira storage, then attach it to an output by key',
|
|
205
205
|
},
|
|
206
206
|
],
|
|
207
207
|
default: 'log',
|
|
@@ -239,7 +239,7 @@ class Tracira {
|
|
|
239
239
|
displayOptions: {
|
|
240
240
|
show: instructionsAnyDisplay,
|
|
241
241
|
},
|
|
242
|
-
description: 'Must match the Project Name used in the
|
|
242
|
+
description: 'Must match the Project Name used in the Check an Output operation so the instructions and the outputs belong together',
|
|
243
243
|
modes: [
|
|
244
244
|
{
|
|
245
245
|
displayName: 'From List',
|
|
@@ -268,7 +268,7 @@ class Tracira {
|
|
|
268
268
|
displayOptions: {
|
|
269
269
|
show: instructionsAnyDisplay,
|
|
270
270
|
},
|
|
271
|
-
description: 'Must match the Task Name used in the
|
|
271
|
+
description: 'Must match the Task Name used in the Check an Output operation',
|
|
272
272
|
modes: [
|
|
273
273
|
{
|
|
274
274
|
displayName: 'From List',
|
|
@@ -329,14 +329,14 @@ class Tracira {
|
|
|
329
329
|
description: 'Optional. The reviewer comment that caused this update (map the Comment from the Tracira Trigger). Shown in the Tracira dashboard as the reason this version exists.',
|
|
330
330
|
},
|
|
331
331
|
{
|
|
332
|
-
displayName: '
|
|
332
|
+
displayName: 'Output ID',
|
|
333
333
|
name: 'instructionsLogId',
|
|
334
334
|
type: 'string',
|
|
335
335
|
default: '',
|
|
336
336
|
displayOptions: {
|
|
337
337
|
show: instructionsUpdateDisplay,
|
|
338
338
|
},
|
|
339
|
-
description: 'Optional. The Tracira
|
|
339
|
+
description: 'Optional. The Tracira output the feedback came from (map the Output ID from the Tracira Trigger).',
|
|
340
340
|
},
|
|
341
341
|
{
|
|
342
342
|
displayName: 'Operation',
|
|
@@ -357,7 +357,7 @@ class Tracira {
|
|
|
357
357
|
default: 'call',
|
|
358
358
|
},
|
|
359
359
|
{
|
|
360
|
-
displayName: '
|
|
360
|
+
displayName: 'Output ID',
|
|
361
361
|
name: 'logId',
|
|
362
362
|
type: 'string',
|
|
363
363
|
required: true,
|
|
@@ -365,10 +365,10 @@ class Tracira {
|
|
|
365
365
|
displayOptions: {
|
|
366
366
|
show: getDisplay,
|
|
367
367
|
},
|
|
368
|
-
description: 'The
|
|
368
|
+
description: 'The output ID to fetch',
|
|
369
369
|
},
|
|
370
370
|
{
|
|
371
|
-
displayName: '
|
|
371
|
+
displayName: 'Output ID',
|
|
372
372
|
name: 'decisionLogId',
|
|
373
373
|
type: 'string',
|
|
374
374
|
required: true,
|
|
@@ -376,7 +376,7 @@ class Tracira {
|
|
|
376
376
|
displayOptions: {
|
|
377
377
|
show: setDecisionDisplay,
|
|
378
378
|
},
|
|
379
|
-
description: 'The
|
|
379
|
+
description: 'The output ID to approve or reject',
|
|
380
380
|
},
|
|
381
381
|
{
|
|
382
382
|
displayName: 'Decision',
|
|
@@ -397,12 +397,61 @@ class Tracira {
|
|
|
397
397
|
value: 'rejected',
|
|
398
398
|
},
|
|
399
399
|
{
|
|
400
|
-
name: '
|
|
400
|
+
name: 'Edit',
|
|
401
401
|
value: 'changed',
|
|
402
|
-
description: '
|
|
402
|
+
description: 'The output was wrong. Send the corrected version, or a comment asking the AI to redo it.',
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
name: 'Take Over',
|
|
406
|
+
value: 'handled',
|
|
407
|
+
description: 'A human handled this outside Tracira. The task is done and the AI output went unused. Records no teaching signal.',
|
|
403
408
|
},
|
|
404
409
|
],
|
|
405
|
-
description: 'Approve or reject the
|
|
410
|
+
description: 'Approve or reject the output, edit it, or record that a human took over. Reject always means the workflow does not proceed - it never means "do the opposite"; to reverse a call the AI made, use Edit with the corrected value.',
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
displayName: 'How',
|
|
414
|
+
name: 'editMode',
|
|
415
|
+
type: 'options',
|
|
416
|
+
required: true,
|
|
417
|
+
default: 'redo',
|
|
418
|
+
displayOptions: {
|
|
419
|
+
show: {
|
|
420
|
+
...setDecisionDisplay,
|
|
421
|
+
decision: ['changed'],
|
|
422
|
+
},
|
|
423
|
+
},
|
|
424
|
+
options: [
|
|
425
|
+
{
|
|
426
|
+
name: 'I Have the Corrected Version',
|
|
427
|
+
value: 'corrected',
|
|
428
|
+
description: 'Send the fixed output. Nothing is regenerated, so there is no second review round.',
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
name: 'Ask the AI to Redo It',
|
|
432
|
+
value: 'redo',
|
|
433
|
+
description: 'Send an instruction back to the AI so it can rewrite the output',
|
|
434
|
+
},
|
|
435
|
+
],
|
|
436
|
+
description: 'Send the corrected version when you already know the right answer: it is the faster path and teaches Tracira more. Ask the AI to redo it when the output needs rewriting rather than fixing.',
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
displayName: 'Corrected Output',
|
|
440
|
+
name: 'correctedOutput',
|
|
441
|
+
type: 'string',
|
|
442
|
+
typeOptions: {
|
|
443
|
+
rows: 4,
|
|
444
|
+
},
|
|
445
|
+
required: true,
|
|
446
|
+
default: '',
|
|
447
|
+
displayOptions: {
|
|
448
|
+
show: {
|
|
449
|
+
...setDecisionDisplay,
|
|
450
|
+
decision: ['changed'],
|
|
451
|
+
editMode: ['corrected'],
|
|
452
|
+
},
|
|
453
|
+
},
|
|
454
|
+
description: 'The corrected version of the output, in the same shape the workflow submitted (plain text, or the same JSON fields). The workflow acts on this version. It arrives on the Tracira Trigger as both output and correctedOutput.',
|
|
406
455
|
},
|
|
407
456
|
{
|
|
408
457
|
displayName: 'Comment',
|
|
@@ -417,12 +466,13 @@ class Tracira {
|
|
|
417
466
|
show: {
|
|
418
467
|
...setDecisionDisplay,
|
|
419
468
|
decision: ['changed'],
|
|
469
|
+
editMode: ['redo'],
|
|
420
470
|
},
|
|
421
471
|
},
|
|
422
|
-
description: 'The instruction sent back to the AI describing what to change.
|
|
472
|
+
description: 'The instruction sent back to the AI describing what to change. The AI should regenerate the output and resubmit it with the Check an Output operation, setting Revision Of to this output ID.',
|
|
423
473
|
},
|
|
424
474
|
{
|
|
425
|
-
displayName: '
|
|
475
|
+
displayName: 'Output ID',
|
|
426
476
|
name: 'flagLogId',
|
|
427
477
|
type: 'string',
|
|
428
478
|
required: true,
|
|
@@ -430,7 +480,7 @@ class Tracira {
|
|
|
430
480
|
displayOptions: {
|
|
431
481
|
show: flagDisplay,
|
|
432
482
|
},
|
|
433
|
-
description: 'The
|
|
483
|
+
description: 'The output ID to flag for review',
|
|
434
484
|
},
|
|
435
485
|
{
|
|
436
486
|
displayName: 'Reason',
|
|
@@ -443,7 +493,7 @@ class Tracira {
|
|
|
443
493
|
displayOptions: {
|
|
444
494
|
show: flagDisplay,
|
|
445
495
|
},
|
|
446
|
-
description: 'Optional reason for flagging, stored as the
|
|
496
|
+
description: 'Optional reason for flagging, stored as the output explanation, for example the message your end-user submitted when reporting the issue',
|
|
447
497
|
},
|
|
448
498
|
{
|
|
449
499
|
displayName: 'Input Binary Field',
|
|
@@ -545,7 +595,7 @@ class Tracira {
|
|
|
545
595
|
displayOptions: {
|
|
546
596
|
show: logOperationDisplay,
|
|
547
597
|
},
|
|
548
|
-
description: "Optional. The text the AI received: the user's message or the prompt. Shown on the person's side of the
|
|
598
|
+
description: "Optional. The text the AI received: the user's message or the prompt. Shown on the person's side of the conversation.",
|
|
549
599
|
},
|
|
550
600
|
{
|
|
551
601
|
displayName: 'Input Attachments',
|
|
@@ -662,7 +712,7 @@ class Tracira {
|
|
|
662
712
|
displayOptions: {
|
|
663
713
|
show: logOperationDisplay,
|
|
664
714
|
},
|
|
665
|
-
description: "Files the AI produced: generated images, synthesized audio, or rendered documents. Same options as Input Attachments; shown as the AI's reply in the
|
|
715
|
+
description: "Files the AI produced: generated images, synthesized audio, or rendered documents. Same options as Input Attachments; shown as the AI's reply in the conversation.",
|
|
666
716
|
options: [
|
|
667
717
|
{
|
|
668
718
|
name: 'attachment',
|
|
@@ -850,7 +900,7 @@ class Tracira {
|
|
|
850
900
|
name: 'instructionsVersion',
|
|
851
901
|
type: 'number',
|
|
852
902
|
default: 0,
|
|
853
|
-
description: 'Optional. The Version returned by the Get Instructions operation. The
|
|
903
|
+
description: 'Optional. The Version returned by the Get Instructions operation. The output then links back to the exact instructions the AI ran with, and reviewers can open them from the output.',
|
|
854
904
|
},
|
|
855
905
|
{
|
|
856
906
|
displayName: 'Latency',
|
|
@@ -859,12 +909,6 @@ class Tracira {
|
|
|
859
909
|
default: 0,
|
|
860
910
|
description: 'Duration of the AI call in milliseconds',
|
|
861
911
|
},
|
|
862
|
-
{
|
|
863
|
-
displayName: 'Log ID',
|
|
864
|
-
name: 'id',
|
|
865
|
-
type: 'string',
|
|
866
|
-
default: '',
|
|
867
|
-
},
|
|
868
912
|
{
|
|
869
913
|
displayName: 'Metadata JSON',
|
|
870
914
|
name: 'metadataJson',
|
|
@@ -873,14 +917,20 @@ class Tracira {
|
|
|
873
917
|
rows: 4,
|
|
874
918
|
},
|
|
875
919
|
default: '',
|
|
876
|
-
description: 'Optional JSON object to store as
|
|
920
|
+
description: 'Optional JSON object to store as output metadata',
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
displayName: 'Output ID',
|
|
924
|
+
name: 'id',
|
|
925
|
+
type: 'string',
|
|
926
|
+
default: '',
|
|
877
927
|
},
|
|
878
928
|
{
|
|
879
929
|
displayName: 'Revision Of',
|
|
880
930
|
name: 'revisionOf',
|
|
881
931
|
type: 'string',
|
|
882
932
|
default: '',
|
|
883
|
-
description: 'The original
|
|
933
|
+
description: 'The original output ID when this submission is a regeneration triggered by a Changed decision. Tracira links the two as a revision chain so reviewers see every attempt.',
|
|
884
934
|
},
|
|
885
935
|
{
|
|
886
936
|
displayName: 'Session ID',
|
|
@@ -899,7 +949,7 @@ class Tracira {
|
|
|
899
949
|
name: 'timestamp',
|
|
900
950
|
type: 'dateTime',
|
|
901
951
|
default: '',
|
|
902
|
-
description: 'Optional. Override the
|
|
952
|
+
description: 'Optional. Override the output timestamp: useful when replaying or reprocessing past executions. Leave blank to use the current time.',
|
|
903
953
|
},
|
|
904
954
|
],
|
|
905
955
|
},
|
|
@@ -918,7 +968,7 @@ class Tracira {
|
|
|
918
968
|
{ name: 'Pass', value: 'pass' },
|
|
919
969
|
{ name: 'Pending', value: 'pending' },
|
|
920
970
|
],
|
|
921
|
-
description: 'Filter
|
|
971
|
+
description: 'Filter outputs by status',
|
|
922
972
|
},
|
|
923
973
|
{
|
|
924
974
|
displayName: 'Project Name',
|
|
@@ -928,7 +978,7 @@ class Tracira {
|
|
|
928
978
|
displayOptions: {
|
|
929
979
|
show: getAllDisplay,
|
|
930
980
|
},
|
|
931
|
-
description: 'Optional. Filter
|
|
981
|
+
description: 'Optional. Filter outputs to a specific project name.',
|
|
932
982
|
modes: [
|
|
933
983
|
{
|
|
934
984
|
displayName: 'From List',
|
|
@@ -956,7 +1006,7 @@ class Tracira {
|
|
|
956
1006
|
displayOptions: {
|
|
957
1007
|
show: getAllDisplay,
|
|
958
1008
|
},
|
|
959
|
-
description: 'Optional. Filter
|
|
1009
|
+
description: 'Optional. Filter outputs to a specific task name within a project.',
|
|
960
1010
|
modes: [
|
|
961
1011
|
{
|
|
962
1012
|
displayName: 'From List',
|
|
@@ -994,7 +1044,7 @@ class Tracira {
|
|
|
994
1044
|
displayOptions: {
|
|
995
1045
|
show: getAllDisplay,
|
|
996
1046
|
},
|
|
997
|
-
description: 'Only include
|
|
1047
|
+
description: 'Only include outputs at or after this date',
|
|
998
1048
|
},
|
|
999
1049
|
{
|
|
1000
1050
|
displayName: 'To Date',
|
|
@@ -1004,7 +1054,7 @@ class Tracira {
|
|
|
1004
1054
|
displayOptions: {
|
|
1005
1055
|
show: getAllDisplay,
|
|
1006
1056
|
},
|
|
1007
|
-
description: 'Only include
|
|
1057
|
+
description: 'Only include outputs up to this date',
|
|
1008
1058
|
},
|
|
1009
1059
|
{
|
|
1010
1060
|
displayName: 'Limit',
|
|
@@ -1312,11 +1362,20 @@ class Tracira {
|
|
|
1312
1362
|
else if (resource === 'log' && operation === 'setDecision') {
|
|
1313
1363
|
const logId = this.getNodeParameter('decisionLogId', itemIndex);
|
|
1314
1364
|
const decision = this.getNodeParameter('decision', itemIndex);
|
|
1315
|
-
const
|
|
1365
|
+
const editMode = decision === 'changed'
|
|
1366
|
+
? this.getNodeParameter('editMode', itemIndex, 'redo')
|
|
1367
|
+
: '';
|
|
1368
|
+
const comment = editMode === 'redo'
|
|
1316
1369
|
? this.getNodeParameter('comment', itemIndex, '')
|
|
1317
1370
|
: '';
|
|
1318
|
-
|
|
1319
|
-
|
|
1371
|
+
const correctedOutput = editMode === 'corrected'
|
|
1372
|
+
? this.getNodeParameter('correctedOutput', itemIndex, '')
|
|
1373
|
+
: '';
|
|
1374
|
+
if (editMode === 'redo' && !comment.trim()) {
|
|
1375
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Comment is required when you ask the AI to redo the output', { itemIndex });
|
|
1376
|
+
}
|
|
1377
|
+
if (editMode === 'corrected' && !correctedOutput.trim()) {
|
|
1378
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'Corrected Output is required when you send the corrected version', { itemIndex });
|
|
1320
1379
|
}
|
|
1321
1380
|
requestOptions = {
|
|
1322
1381
|
method: 'PATCH',
|
|
@@ -1324,6 +1383,7 @@ class Tracira {
|
|
|
1324
1383
|
body: stripEmpty({
|
|
1325
1384
|
decision,
|
|
1326
1385
|
comment: comment || undefined,
|
|
1386
|
+
correctedOutput: correctedOutput || undefined,
|
|
1327
1387
|
}),
|
|
1328
1388
|
};
|
|
1329
1389
|
}
|