@taifoon/n8n-nodes-typesafe 1.5.0 → 2.0.1
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 +48 -326
- package/dist/nodes/TaifoonTypeSafe/TaifoonTypeSafe.node.js +10 -27
- package/dist/nodes/TaifoonTypeSafe/TaifoonTypeSafe.node.js.map +1 -1
- package/dist/nodes/TaifoonTypeSafe/jev/contracts.d.ts +1 -0
- package/dist/nodes/TaifoonTypeSafe/jev/contracts.js +3 -2
- package/dist/nodes/TaifoonTypeSafe/jev/contracts.js.map +1 -1
- package/dist/package.json +11 -5
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/docs/HOW_IT_WORKS.md +74 -0
- package/docs/JEV_OPTIONS.md +20 -0
- package/docs/KEY_POLICY.md +0 -6
- package/docs/MCP.md +2 -3
- package/docs/OUTPUTS.md +55 -0
- package/docs/RELIABILITY.md +51 -0
- package/docs/SECURE_KEYS.md +2 -2
- package/docs/TRADING_EXAMPLES.md +79 -0
- package/docs/TRANSLATION.md +32 -0
- package/docs/UPGRADING.md +8 -0
- package/package.json +11 -5
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# How it works
|
|
2
|
+
|
|
3
|
+
Most automations have a moment where someone has to *decide*: is this a refund request, which team
|
|
4
|
+
gets this ticket, how urgent is it, is this invoice a duplicate. Today you either write brittle rules
|
|
5
|
+
for that, or you ask a chat model and then fight with its prose: parse the answer, handle the day it
|
|
6
|
+
says "It depends", pay for a paragraph you throw away.
|
|
7
|
+
|
|
8
|
+
This node does the deciding and nothing else. You hand it an item and a few questions. It hands back
|
|
9
|
+
answers your workflow can branch on directly, with a probability attached, usually in well under a
|
|
10
|
+
second and for about two thousandths of a cent.
|
|
11
|
+
|
|
12
|
+
It works by calling [TypeSafe's Jev](https://docs.typesafe.ai/introduction), a System One model built to make
|
|
13
|
+
decisions rather than write text, with TypeSafe's three question types: Noul (yes/no), Choice (pick one)
|
|
14
|
+
and Score (rate it).
|
|
15
|
+
|
|
16
|
+
## Three systems, each doing the one thing it is good at
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
n8n Taifoon TypeSafe
|
|
20
|
+
the workflow the coordination layer the judge
|
|
21
|
+
───────────── ────────────────────── ─────────
|
|
22
|
+
gathers the item ──► turns your words into ──► answers each question
|
|
23
|
+
runs the branches typed questions with a probability
|
|
24
|
+
▲ turns the answers back ◄──
|
|
25
|
+
└──────────────── into Pass / Fail / Review,
|
|
26
|
+
and into sentences in the
|
|
27
|
+
asker's own language
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
- **n8n** is where your process already lives: the triggers, the data, the people who get notified.
|
|
31
|
+
It is good at moving things and bad at judgment.
|
|
32
|
+
- **TypeSafe** is a model that only judges. It cannot write an essay, which is the point: it returns
|
|
33
|
+
a number you can threshold, quickly and cheaply, instead of prose you have to interpret.
|
|
34
|
+
- **Taifoon's part is the layer between them**, and it is plain code that ships inside this node. Going
|
|
35
|
+
in, it compiles what you mean ("is this a refund?") into the three question types the model
|
|
36
|
+
understands. Coming out, it compiles the model's probabilities into the only three things a workflow
|
|
37
|
+
can act on: go ahead, do not, or ask a human. Every threshold in that step is yours and sits on the
|
|
38
|
+
canvas where you can see it. And when a person is waiting on the other end, it says the answers back
|
|
39
|
+
as sentences in the language they wrote in.
|
|
40
|
+
|
|
41
|
+
Why three outputs and not two: a yes/no forces a confident answer even when the model is guessing, and
|
|
42
|
+
that is how automations go wrong silently. **Review** is the honest third option. It is where the
|
|
43
|
+
low-confidence cases and the malformed answers go, so a person sees exactly the items that need one.
|
|
44
|
+
|
|
45
|
+
## Who this is for
|
|
46
|
+
|
|
47
|
+
- **Support and ops teams** routing tickets, emails and alerts without maintaining a wall of IF nodes.
|
|
48
|
+
- **Anyone putting an LLM in a workflow** who wants a cheap, fast guard in front of it or behind it:
|
|
49
|
+
is this input safe, is this output on topic, does it contain personal data.
|
|
50
|
+
- **Builders of data pipelines** who need to classify, de-duplicate or score thousands of rows and
|
|
51
|
+
cannot afford, or wait for, a chat model on each one.
|
|
52
|
+
- **People who do not trust a yes/no without a number.** Every answer comes with how sure the model
|
|
53
|
+
is, so the uncertain cases go to a human instead of going wrong quietly.
|
|
54
|
+
|
|
55
|
+
It is not for writing text, summarising, or reasoning about code. We measured that honestly; see
|
|
56
|
+
[What it is good and bad at](RELIABILITY.md#what-it-is-good-and-bad-at).
|
|
57
|
+
|
|
58
|
+
## Three kinds of question
|
|
59
|
+
|
|
60
|
+
| You ask | You get back | Think of it as |
|
|
61
|
+
|---|---|---|
|
|
62
|
+
| **Yes / no** ("Noul") | `p`, the probability the statement is true | an IF with a dial |
|
|
63
|
+
| **Pick one** ("Choice") | the option, a probability for every option, and a `confidence` | a Switch that knows when it is guessing |
|
|
64
|
+
| **Rate it** ("Score") | a level on a rubric you write, and a `confidence` | a ranking you can threshold |
|
|
65
|
+
|
|
66
|
+
Two things make the answers sharper, and both are optional:
|
|
67
|
+
|
|
68
|
+
- **Describe the options.** Write `billing = payments and refunds; technical = bugs and outages; other = fits none`.
|
|
69
|
+
The descriptions go to the model and are what separates options that sound alike. Add an `other`: a message
|
|
70
|
+
that fits nowhere is then answered *other* with confidence, instead of being forced into a team.
|
|
71
|
+
- **Say what yes and no mean.** A yes/no question has *Yes Means* and *No Means* fields for where the line is.
|
|
72
|
+
|
|
73
|
+
Ask all the questions that might matter in the same node. They are answered at once and independently,
|
|
74
|
+
so ten questions cost about the same as one.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Grade a job with Jev, and put it on chain (Jev Options, 1.5.0)
|
|
2
|
+
|
|
3
|
+
For agent jobs with an escrow and an evaluator seat, the Ask operation has **Jev Options**. All of them are off by
|
|
4
|
+
default, and without them the node behaves exactly as 1.4.0.
|
|
5
|
+
|
|
6
|
+
- **Ask RUBRIC_v1** adds the four questions of the published rubric: spec_met, unsupported_claim, ending and
|
|
7
|
+
cheat_shaped. Jev reads the item, then a section listing the facts your workflow established. The node composes
|
|
8
|
+
**complete / reject / needs_review** under THRESHOLDS_v1 and routes them to Pass / Fail / Review.
|
|
9
|
+
- **Facts (JSON)** holds the checks you already made, e.g. `{"delivered": true, "checks": {"proof_verifies": true}}`.
|
|
10
|
+
A false check rejects on Fail, and Jev is not asked.
|
|
11
|
+
- **Record On** (`none`, `devnet`, `base`, `both`) adds the unsigned calls that record the receipt on JevAnswerLog
|
|
12
|
+
and JevDecisionLog. On devnet 36927 the calls carry the logs' addresses. In this version the Base calls carry
|
|
13
|
+
`to: null`.
|
|
14
|
+
- **Evaluator Call**, **Job ID** and **Evaluator Address** add the one unsigned call that ends the job as its
|
|
15
|
+
evaluator. The protocols are Virtuals ERC-8183, Virtuals memo-ACP, BitAgent ERC-8183, an assurance hook or the judge
|
|
16
|
+
adapter. For needs_review the call is `null`.
|
|
17
|
+
|
|
18
|
+
The output carries `jev: { verdict, reasons, receiptHash, decisionDigest, answersDigest, record?, evaluator?, receipt }`.
|
|
19
|
+
Nothing is signed or sent: a signer node or your wallet does that. The same code, with its tests against real
|
|
20
|
+
transactions, is the standalone package [`@taifoon/jev`](https://github.com/taifoon-io/jev).
|
package/docs/KEY_POLICY.md
CHANGED
|
@@ -12,10 +12,4 @@ This node uses **one secret: your TypeSafe API key.**
|
|
|
12
12
|
(90 days is a reasonable default) and at once if a teammate leaves, a screenshot or log may have shown
|
|
13
13
|
it, or a credential test ran on a machine you do not control.
|
|
14
14
|
|
|
15
|
-
**The Free Trial connection uses no secret of yours.** It sends the item and your questions to
|
|
16
|
-
`typesafe.taifoon.dev`, which asks TypeSafe with Taifoon's key: three calls per client, up to 4
|
|
17
|
-
questions and 4,000 characters each. Taifoon logs the outcome, the country and the client type, and a
|
|
18
|
-
salted hash that lets it count clients. It does not log your address, your item or your questions.
|
|
19
|
-
Do not send personal data through the trial; use your own key for real work.
|
|
20
|
-
|
|
21
15
|
Provisioning a key for a team without anyone seeing it: [Supplying keys securely](SECURE_KEYS.md).
|
package/docs/MCP.md
CHANGED
|
@@ -7,7 +7,7 @@ agents, Claude. It is a separate service run by Taifoon, not part of this npm pa
|
|
|
7
7
|
```
|
|
8
8
|
URL https://typesafe.taifoon.dev/mcp
|
|
9
9
|
Transport HTTP Streamable (stateless: one POST, one JSON answer)
|
|
10
|
-
Auth Bearer = your own TypeSafe key (console.typesafe.ai),
|
|
10
|
+
Auth Bearer = your own TypeSafe key (console.typesafe.ai), required
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
| tool | what it does | model call |
|
|
@@ -53,5 +53,4 @@ never written, never logged, never returned. Logs hold the tool name, the outcom
|
|
|
53
53
|
caller, the country and the client product; never the key, the address, the state or a question's text.
|
|
54
54
|
If you would rather have nobody in the path, use this package's node with the direct connection.
|
|
55
55
|
|
|
56
|
-
Limits: 60 requests a minute per address
|
|
57
|
-
Without: 4 questions, 4,000 characters, 3 calls in total, shared with the node's Free Trial connection.
|
|
56
|
+
Limits: 60 requests a minute per address, 20 questions and a 32,000-character state per call.
|
package/docs/OUTPUTS.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Reply and Raw Output
|
|
2
|
+
|
|
3
|
+
Two options on the Ask operation change what the node returns. **Reply Language** adds sentences for a
|
|
4
|
+
person. **Raw Output** removes the node's interpretation and returns the model's own numbers.
|
|
5
|
+
|
|
6
|
+
## Answering people in their own language
|
|
7
|
+
|
|
8
|
+
Branches are for workflows. When a person is waiting for the answer (a support chat, a Telegram bot, a
|
|
9
|
+
trading assistant), `{"noul": 0.97}` is no use to them. Set **Reply Language** on the Ask operation and
|
|
10
|
+
the output gains a `reply`:
|
|
11
|
+
|
|
12
|
+
```json
|
|
13
|
+
{ "lang": "de", "flagHuman": true,
|
|
14
|
+
"text": "Prüfe, ob die Volatilität ungewöhnlich hoch ist. Ja (94 % sicher)\n? Bewerte die Dringlichkeit ... Vermutlich 4 (4 von 5), aber unsicher (36 %)\nNicht sicher genug: Ich gebe das an einen Menschen weiter.",
|
|
15
|
+
"lines": [{ "id": "...", "question": "...", "answer": "...", "outcome": "review" }], "verdict": "..." }
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
- **Match Questions** answers in the language the questions were written in, so one workflow serves
|
|
19
|
+
every customer. Or pin a language: English questions, Polish answers.
|
|
20
|
+
- It is templates, not a model: free, offline, and the same answers always read the same. The person's
|
|
21
|
+
own sentence, options and rubric levels are echoed exactly as they wrote them; only the glue around
|
|
22
|
+
them is translated, so nothing is paraphrased and nothing is invented.
|
|
23
|
+
- It never rounds doubt away. A coin-flip reads as *hard to say*, not yes. A rating the model is spread
|
|
24
|
+
across reads as *probably 4, but not sure*. And when anything went to Review, `flagHuman` is true and the
|
|
25
|
+
last line says a person is taking over. Wire that to a person, do not soften it.
|
|
26
|
+
|
|
27
|
+
The same eleven languages as Translate, and the same request: a voice is one row of thirteen short
|
|
28
|
+
strings in [`translate.ts`](../nodes/TaifoonTypeSafe/translate.ts). Native speakers, please correct ours.
|
|
29
|
+
The full wording rules are in [How Translate works](TRANSLATION.md#the-reply-answers-back-into-sentences).
|
|
30
|
+
|
|
31
|
+
## Raw output: the model's own numbers, untouched
|
|
32
|
+
|
|
33
|
+
Routing, Reply and the per-question shaping are this node interpreting the answer for you. When you
|
|
34
|
+
would rather do that yourself, turn on **Raw Output** on the Ask operation. The node then returns the
|
|
35
|
+
API's answer *exactly as TypeSafe sent it*, with none of its interpretation:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{ "model": "jev-latest", "provider": "typesafe", "connection": "direct", "latency_ms": 812,
|
|
39
|
+
"usage": { "input_tokens": 545 },
|
|
40
|
+
"raw": { "model": "jev-latest",
|
|
41
|
+
"answers": {
|
|
42
|
+
"is_refund": { "noul": 0.98 },
|
|
43
|
+
"urgency": { "score": 3.6, "confidence": 0.41, "probabilities": [ ... ], "legend": [ ... ] },
|
|
44
|
+
"which_lane": { "choice": "billing", "confidence": 0.77, "probabilities": { "billing": 0.77, "shipping": 0.19, "other": 0.04 } }
|
|
45
|
+
} } }
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
- **No Routing, no Reply, no reshaping.** `raw` is the whole `{answers, model, usage}` object the model
|
|
49
|
+
returned. The probabilities, confidences and `noul`/`score`/`choice` values are the model's own. This
|
|
50
|
+
is the `--raw` form for when you want the raw calibration to feed your own logic, a training set, or a
|
|
51
|
+
model that learns from Jev's best cases.
|
|
52
|
+
- **Everything flows on the first output.** The fail/review outputs are a Routing feature, and Routing
|
|
53
|
+
is skipped in raw mode, so nothing is split off.
|
|
54
|
+
- `Fail Closed` still applies before the raw
|
|
55
|
+
object is emitted, so a malformed answer still stops the item unless you turn it off.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Routing, reliability, cost
|
|
2
|
+
|
|
3
|
+
## Routing: the one rule
|
|
4
|
+
|
|
5
|
+
An item leaves by **Pass** only if *every* question you put in Routing passed. So only route the
|
|
6
|
+
questions you actually want to gate on. If you route `urgency` as well, a perfectly good refund ticket
|
|
7
|
+
"fails" just because it is not urgent. We made exactly that mistake while building this.
|
|
8
|
+
|
|
9
|
+
| Question | Routing keys | What happens |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| Yes / no | `gte`, `lte` on `p` | pass or fail |
|
|
12
|
+
| Pick one | `minConfidence`, and `in` for the options you accept | below the confidence → **Review** |
|
|
13
|
+
| Rate it | `min`, `max` on the level, and optionally `minConfidence` | pass or fail; below the confidence → **Review** |
|
|
14
|
+
|
|
15
|
+
A mistake in Routing never reads as a pass. A rule that names a question you did not ask (a typo, a renamed ID), a
|
|
16
|
+
yes/no rule with no threshold, or a confidence bar on an answer that carries no confidence all send the item to
|
|
17
|
+
**Review**, with the reason in `decisions`.
|
|
18
|
+
|
|
19
|
+
Two details: a rating is a **zero-based level number** (0 is your first level; every answer includes a
|
|
20
|
+
`legend`), and an answer that does not validate always goes to Review. Nothing fails open.
|
|
21
|
+
|
|
22
|
+
## What it is good and bad at
|
|
23
|
+
|
|
24
|
+
We benchmarked it against Claude Sonnet, and the results are mixed in a useful way:
|
|
25
|
+
|
|
26
|
+
- **Answering a real system's yes/no checks:** it matched or beat Sonnet on every decision.
|
|
27
|
+
- **Forecasting next-day rain from two days of weather:** a tie (81% against 78%), and neither clearly
|
|
28
|
+
beat the naive "same as today".
|
|
29
|
+
- **Judging claims about small Python functions:** Sonnet got 100%, this got 83%. It is not a code
|
|
30
|
+
reasoner.
|
|
31
|
+
|
|
32
|
+
In all three it was about **ten times faster and a thousand times cheaper**. Its raw probabilities were
|
|
33
|
+
the less well calibrated of the two, which is the practical reason to **fit your thresholds on a few
|
|
34
|
+
dozen of your own labelled items** before trusting them.
|
|
35
|
+
|
|
36
|
+
## Habits that keep it reliable
|
|
37
|
+
|
|
38
|
+
- **Calculate first, then ask.** Do arithmetic in a Code node. Ask the model for judgment, never a sum.
|
|
39
|
+
- **One thing per question.** If a question weighs several factors, split it and combine the answers
|
|
40
|
+
yourself, with weights you can see.
|
|
41
|
+
- **Keep thresholds on the canvas,** where they can be reviewed and changed, not inside a prompt.
|
|
42
|
+
- **Leave Fail Closed on.** A malformed answer stops the item instead of flowing on as an empty value.
|
|
43
|
+
- **Remember what n8n stores.** By default n8n keeps every execution's data. If your items contain
|
|
44
|
+
personal data, set `EXECUTIONS_DATA_SAVE_ON_SUCCESS=none` on your instance. This node never writes
|
|
45
|
+
your key into an execution record, including when a request fails.
|
|
46
|
+
|
|
47
|
+
## Cost and limits
|
|
48
|
+
|
|
49
|
+
About 0.6 to 0.8 s and 450 input tokens for three questions. TypeSafe charges 0.042 USD per million
|
|
50
|
+
input tokens and nothing for output: roughly 0.00002 USD per item. Rate limits and overload responses
|
|
51
|
+
are retried with backoff. Input is text or JSON; no images or audio.
|
package/docs/SECURE_KEYS.md
CHANGED
|
@@ -56,8 +56,8 @@ and gain nothing.
|
|
|
56
56
|
|
|
57
57
|
## Never send us a key
|
|
58
58
|
|
|
59
|
-
You do not need to give Taifoon a TypeSafe key, ever.
|
|
60
|
-
|
|
59
|
+
You do not need to give Taifoon a TypeSafe key, ever. The node sends your key to TypeSafe and to
|
|
60
|
+
no one else, so we are never in the path. There is deliberately no form, email address or chat
|
|
61
61
|
where we accept keys. If anyone asks you for one in our name, it is not us.
|
|
62
62
|
|
|
63
63
|
If two organisations ever must hand a secret to each other, do it with public-key encryption to the
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Basic trading tasks, with gates
|
|
2
|
+
|
|
3
|
+
A worked example of the whole loop on something less forgiving than support tickets. These are real:
|
|
4
|
+
live 5-minute candles, the real model, run on 2026-09-21. A program computed the facts first
|
|
5
|
+
(averages, ranges, volatility ratios, whether the New York morning session is open); each task is
|
|
6
|
+
written the way a person would type it, one per language; the gates are plain thresholds in code.
|
|
7
|
+
|
|
8
|
+
**A pre-trade entry gate, in English** (NQ, 798 ms, left by **Fail**)
|
|
9
|
+
|
|
10
|
+
> Check if price is above its 20-bar average. Check if the last hour's move is larger than usual for this market. Classify the market into trending up, trending down or ranging. Rate how stretched price is from its average from 1 to 5.
|
|
11
|
+
|
|
12
|
+
| compiled to | gate |
|
|
13
|
+
|---|---|
|
|
14
|
+
| noul | `gte` 0.7 |
|
|
15
|
+
| noul | `lte` 0.5 |
|
|
16
|
+
| choice | `minConfidence` 0.6, `in` trending up |
|
|
17
|
+
| score | `max` 2 |
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
✓ Check if price is above its 20-bar average. Yes (99% sure)
|
|
21
|
+
✗ Check if the last hour's move is larger than usual for this market. Yes (94% sure)
|
|
22
|
+
✓ Classify the market into trending up, trending down or ranging. trending up (86% confident)
|
|
23
|
+
✓ Rate how stretched price is from its average from 1 to 5. 2 (2 of 5), 55% confident
|
|
24
|
+
At least one check did not pass.
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The second check failed on purpose: the gate wants a calm last hour (`lte 0.5`) and the hour was not calm.
|
|
28
|
+
That is a gate doing its job, not the model being wrong.
|
|
29
|
+
|
|
30
|
+
**A pre-trade order sanity check, in Japanese** (BTC, 301 ms, left by **Review**)
|
|
31
|
+
|
|
32
|
+
> この注文の数量は通常より異常に大きいですか。指値は現在の価格から大きく離れていますか。この注文を次のいずれかに分類してください:通常、要確認、誤発注の疑い。
|
|
33
|
+
|
|
34
|
+
| compiled to | gate |
|
|
35
|
+
|---|---|
|
|
36
|
+
| noul | `lte` 0.3 |
|
|
37
|
+
| noul | `lte` 0.3 |
|
|
38
|
+
| choice | `minConfidence` 0.6, `in` 通常 |
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
✓ この注文の数量は通常より異常に大きいですか。 いいえ(確信度86%)
|
|
42
|
+
✓ 指値は現在の価格から大きく離れていますか。 いいえ(確信度94%)
|
|
43
|
+
? この注文を次のいずれかに分類してください:通常、要確認、誤発注の疑い。 おそらく通常ですが、確信はありません(46%)
|
|
44
|
+
確信が足りないため、担当者に確認を依頼します。
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Both yes/no checks passed, but the model would not commit to a category, so the order goes to a person.
|
|
48
|
+
That is what Review is for. (The order is a sample ticket measured against the real last price.)
|
|
49
|
+
|
|
50
|
+
**An exit guard, in German** (BTC, 663 ms, left by **Review**)
|
|
51
|
+
|
|
52
|
+
> Prüfe, ob der Kurs unter dem 20-Perioden-Durchschnitt liegt. Prüfe, ob die Volatilität ungewöhnlich hoch ist. Bewerte die Dringlichkeit, eine Long-Position zu verkleinern, von 1 bis 5.
|
|
53
|
+
|
|
54
|
+
| compiled to | gate |
|
|
55
|
+
|---|---|
|
|
56
|
+
| noul | reported, not gated |
|
|
57
|
+
| noul | reported, not gated |
|
|
58
|
+
| score | `min` 3, `minConfidence` 0.5 |
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
Prüfe, ob der Kurs unter dem 20-Perioden-Durchschnitt liegt. Nein (99 % sicher)
|
|
62
|
+
Prüfe, ob die Volatilität ungewöhnlich hoch ist. Ja (94 % sicher)
|
|
63
|
+
? Bewerte die Dringlichkeit, eine Long-Position zu verkleinern, von 1 bis 5. Vermutlich 4 (4 von 5), aber unsicher (36 %)
|
|
64
|
+
Nicht sicher genug: Ich gebe das an einen Menschen weiter.
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
A rating is a centre of mass. Without `minConfidence` this one would have cleared `min 3` while the model
|
|
68
|
+
was only about a third sure. We found that in this very run, which is why a rating gate can now ask for
|
|
69
|
+
confidence too.
|
|
70
|
+
|
|
71
|
+
All eleven languages, with the facts the model was shown: [TRADING_GATES.md](TRADING_GATES.md).
|
|
72
|
+
Across the run, 11 of 11 languages were detected, the model's reading of the first fact matched plain code in
|
|
73
|
+
11 of 11, the median call took 295 ms, and all 11 calls together cost 0.000331 USD.
|
|
74
|
+
|
|
75
|
+
**What this is not.** These gates describe and guard a state a program has already measured. They do not
|
|
76
|
+
forecast. We tested that hard: six pre-registered trials on these same markets, and no model (this one,
|
|
77
|
+
Claude, or our own) forecast direction. A model in a trading loop supplies judgment about *now*; it does
|
|
78
|
+
not create an edge, and a strategy without one loses faster with a model in it. Keep the arithmetic, the
|
|
79
|
+
thresholds and every veto in code.
|
package/docs/TRANSLATION.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# What the translation layer can and cannot do
|
|
2
2
|
|
|
3
|
+
## The Translate operation, in short
|
|
4
|
+
|
|
5
|
+
The **Translate** operation turns a sentence into questions:
|
|
6
|
+
|
|
7
|
+
> *Check if the customer is asking for a refund. Classify the ticket into billing, technical, sales or
|
|
8
|
+
> abuse. Rate the urgency from 1 to 5.*
|
|
9
|
+
|
|
10
|
+
becomes a yes/no, a pick-one with exactly those four options, and a five-level rating. It runs inside
|
|
11
|
+
the node: no network call, no key, no cost, and the same sentence always gives the same result.
|
|
12
|
+
|
|
13
|
+
It understands **English, Spanish, German, French, Portuguese, Italian, Polish, Dutch, Russian, Japanese
|
|
14
|
+
and Arabic**, detects the language per sentence, and you can mix them in one task. Anything else still
|
|
15
|
+
works as a yes/no.
|
|
16
|
+
|
|
17
|
+
**Your language is not here? Please add it.** A language is one small word pack in
|
|
18
|
+
[`nodes/TaifoonTypeSafe/translate.ts`](../nodes/TaifoonTypeSafe/translate.ts): the verbs that mean "pick
|
|
19
|
+
one", the words that mean "rate it", how options are introduced and separated, how a scale is written,
|
|
20
|
+
and a four-level default rubric. No logic changes. Add the pack, add one test sentence to the self-test,
|
|
21
|
+
open a pull request. Native speakers catch what we cannot: we would especially welcome Chinese, Korean,
|
|
22
|
+
Hindi, Turkish, Ukrainian, Swedish, Hebrew and Indonesian, and corrections to the eleven we ship.
|
|
23
|
+
|
|
24
|
+
It splits a sentence that holds several jobs (*check if it is a refund and rate the urgency*), keeps the levels you
|
|
25
|
+
name (*rate the tone as polite, neutral or rude*) and reads *from 5 to 1* as the 1 to 5 scale. When it cannot do what
|
|
26
|
+
you wrote it says so in `warnings` rather than substituting quietly: a *0 to 10* scale has eleven steps and a rating
|
|
27
|
+
takes at most ten, and *is the customer new or returning?* asked as a yes/no answers whether EITHER holds, not which.
|
|
28
|
+
|
|
29
|
+
It is deliberately literal. It will not invent categories you did not name: *"classify this ticket"*
|
|
30
|
+
with no list comes back flagged `needs_input`. It suggests thresholds but never applies them for you,
|
|
31
|
+
for the reason in [Backward: answers become branches](#backward-answers-become-branches-the-routing-map-on-ask).
|
|
32
|
+
|
|
33
|
+
## The rules in full
|
|
34
|
+
|
|
3
35
|
**Languages:** English, Spanish, German, French, Portuguese, Italian, Polish, Dutch, Russian, Japanese, Arabic. The tables below show the English words; every language has the equivalent pack in `translate.ts`. European packs match whole words (Unicode-aware, so accents are safe). Japanese and Arabic match anywhere, because Japanese has no spaces between words and Arabic attaches particles; for the same reason a one-letter particle is never used as a marker. A colon, in any language, always starts the option list.
|
|
4
36
|
|
|
5
37
|
The node sits between a workflow, which speaks JSON items and branches, and a System One model, which
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Upgrading
|
|
2
|
+
|
|
3
|
+
## From 1.1 or earlier
|
|
4
|
+
|
|
5
|
+
The credential type was renamed (from `typeSafeApi` to `taifoonTypeSafeApi`) so it cannot collide with other
|
|
6
|
+
TypeSafe packages or a future built-in node. After updating, create the **TypeSafe API** credential again and
|
|
7
|
+
select it in your TypeSafe nodes. Nothing else changed. If you pre-fill credentials from a file, use the new
|
|
8
|
+
name as the key ([Supplying keys securely](SECURE_KEYS.md)).
|
package/package.json
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taifoon/n8n-nodes-typesafe",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
|
+
"description": "n8n community node for TypeSafe System One (Jev): ask Noul, Choice and Score questions about any item, branch on calibrated probabilities, and send low-confidence answers to human review.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"n8n-community-node-package",
|
|
7
|
+
"n8n",
|
|
7
8
|
"typesafe",
|
|
9
|
+
"typesafe-ai",
|
|
8
10
|
"jev",
|
|
9
11
|
"system-one",
|
|
10
|
-
"taifoon",
|
|
11
|
-
"decision",
|
|
12
12
|
"classification",
|
|
13
13
|
"routing",
|
|
14
|
-
"
|
|
14
|
+
"structured-output",
|
|
15
|
+
"confidence",
|
|
16
|
+
"human-in-the-loop",
|
|
17
|
+
"approval",
|
|
18
|
+
"guardrail",
|
|
19
|
+
"ai-agent",
|
|
20
|
+
"decision"
|
|
15
21
|
],
|
|
16
22
|
"license": "MIT",
|
|
17
23
|
"homepage": "https://github.com/taifoon-io/n8n-nodes-typesafe#readme",
|