@senpi/runtime 3.0.58 → 3.0.62
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 +73 -2
- package/dist/actions/action-events.d.ts +3 -3
- package/dist/actions/action-events.d.ts.map +1 -1
- package/dist/actions/action-events.js +24 -16
- package/dist/actions/action-events.js.map +1 -1
- package/dist/actions/action-runtime-module.d.ts.map +1 -1
- package/dist/actions/action-runtime-module.js +18 -1
- package/dist/actions/action-runtime-module.js.map +1 -1
- package/dist/actions/close-position/close-position.action.d.ts.map +1 -1
- package/dist/actions/close-position/close-position.action.js +84 -11
- package/dist/actions/close-position/close-position.action.js.map +1 -1
- package/dist/actions/decision-engine.d.ts +0 -2
- package/dist/actions/decision-engine.d.ts.map +1 -1
- package/dist/actions/decision-engine.js +1 -79
- package/dist/actions/decision-engine.js.map +1 -1
- package/dist/actions/event-derivation.d.ts +40 -2
- package/dist/actions/event-derivation.d.ts.map +1 -1
- package/dist/actions/event-derivation.js +178 -5
- package/dist/actions/event-derivation.js.map +1 -1
- package/dist/actions/open-position/open-position.action.d.ts.map +1 -1
- package/dist/actions/open-position/open-position.action.js +103 -16
- package/dist/actions/open-position/open-position.action.js.map +1 -1
- package/dist/actions/position-tracker/position-tracker.action.d.ts +2 -1
- package/dist/actions/position-tracker/position-tracker.action.d.ts.map +1 -1
- package/dist/actions/position-tracker/position-tracker.action.js +47 -15
- package/dist/actions/position-tracker/position-tracker.action.js.map +1 -1
- package/dist/actions/skipped-signal-results.d.ts +16 -0
- package/dist/actions/skipped-signal-results.d.ts.map +1 -0
- package/dist/actions/skipped-signal-results.js +47 -0
- package/dist/actions/skipped-signal-results.js.map +1 -0
- package/dist/cli/deploy-render.d.ts +91 -0
- package/dist/cli/deploy-render.d.ts.map +1 -0
- package/dist/cli/deploy-render.js +216 -0
- package/dist/cli/deploy-render.js.map +1 -0
- package/dist/cli/guide-commands.d.ts.map +1 -1
- package/dist/cli/guide-commands.js +78 -6
- package/dist/cli/guide-commands.js.map +1 -1
- package/dist/cli/senpi-commands.d.ts +6 -1
- package/dist/cli/senpi-commands.d.ts.map +1 -1
- package/dist/cli/senpi-commands.js +164 -5
- package/dist/cli/senpi-commands.js.map +1 -1
- package/dist/cli/validate-command.d.ts.map +1 -1
- package/dist/cli/validate-command.js +32 -1
- package/dist/cli/validate-command.js.map +1 -1
- package/dist/deploy/deadlines.d.ts +47 -0
- package/dist/deploy/deadlines.d.ts.map +1 -0
- package/dist/deploy/deadlines.js +56 -0
- package/dist/deploy/deadlines.js.map +1 -0
- package/dist/deploy/error-text.d.ts +25 -0
- package/dist/deploy/error-text.d.ts.map +1 -0
- package/dist/deploy/error-text.js +42 -0
- package/dist/deploy/error-text.js.map +1 -0
- package/dist/deploy/funding.d.ts +87 -0
- package/dist/deploy/funding.d.ts.map +1 -0
- package/dist/deploy/funding.js +229 -0
- package/dist/deploy/funding.js.map +1 -0
- package/dist/deploy/install-gate-runner.d.ts +12 -0
- package/dist/deploy/install-gate-runner.d.ts.map +1 -0
- package/dist/deploy/install-gate-runner.js +17 -0
- package/dist/deploy/install-gate-runner.js.map +1 -0
- package/dist/deploy/job.d.ts +199 -0
- package/dist/deploy/job.d.ts.map +1 -0
- package/dist/deploy/job.js +463 -0
- package/dist/deploy/job.js.map +1 -0
- package/dist/deploy/min-budget.d.ts +68 -0
- package/dist/deploy/min-budget.d.ts.map +1 -0
- package/dist/deploy/min-budget.js +297 -0
- package/dist/deploy/min-budget.js.map +1 -0
- package/dist/deploy/orchestrator.d.ts +305 -0
- package/dist/deploy/orchestrator.d.ts.map +1 -0
- package/dist/deploy/orchestrator.js +2910 -0
- package/dist/deploy/orchestrator.js.map +1 -0
- package/dist/deploy/package.d.ts +130 -0
- package/dist/deploy/package.d.ts.map +1 -0
- package/dist/deploy/package.js +351 -0
- package/dist/deploy/package.js.map +1 -0
- package/dist/deploy/proof-gate.d.ts +82 -0
- package/dist/deploy/proof-gate.d.ts.map +1 -0
- package/dist/deploy/proof-gate.js +269 -0
- package/dist/deploy/proof-gate.js.map +1 -0
- package/dist/deploy/python-float.d.ts +34 -0
- package/dist/deploy/python-float.d.ts.map +1 -0
- package/dist/deploy/python-float.js +46 -0
- package/dist/deploy/python-float.js.map +1 -0
- package/dist/deploy/recheck-commands.d.ts +50 -0
- package/dist/deploy/recheck-commands.d.ts.map +1 -0
- package/dist/deploy/recheck-commands.js +59 -0
- package/dist/deploy/recheck-commands.js.map +1 -0
- package/dist/deploy/register.d.ts +99 -0
- package/dist/deploy/register.d.ts.map +1 -0
- package/dist/deploy/register.js +689 -0
- package/dist/deploy/register.js.map +1 -0
- package/dist/deploy/taxonomy.d.ts +24 -0
- package/dist/deploy/taxonomy.d.ts.map +1 -0
- package/dist/deploy/taxonomy.js +31 -0
- package/dist/deploy/taxonomy.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +244 -132
- package/dist/index.js.map +1 -1
- package/dist/runtime/lifecycle-events.d.ts +13 -0
- package/dist/runtime/lifecycle-events.d.ts.map +1 -1
- package/dist/runtime/lifecycle-events.js +32 -0
- package/dist/runtime/lifecycle-events.js.map +1 -1
- package/dist/runtime/runtime.d.ts.map +1 -1
- package/dist/runtime/runtime.js +3 -1
- package/dist/runtime/runtime.js.map +1 -1
- package/dist/runtime/strategy-registry.d.ts +8 -0
- package/dist/runtime/strategy-registry.d.ts.map +1 -1
- package/dist/runtime/strategy-registry.js +14 -1
- package/dist/runtime/strategy-registry.js.map +1 -1
- package/dist/runtime/supervisor/long-running-supervisor.d.ts +8 -0
- package/dist/runtime/supervisor/long-running-supervisor.d.ts.map +1 -1
- package/dist/runtime/supervisor/long-running-supervisor.js +1 -0
- package/dist/runtime/supervisor/long-running-supervisor.js.map +1 -1
- package/dist/runtime-api/intake/intake-events.d.ts +19 -3
- package/dist/runtime-api/intake/intake-events.d.ts.map +1 -1
- package/dist/runtime-api/intake/intake-events.js +64 -2
- package/dist/runtime-api/intake/intake-events.js.map +1 -1
- package/dist/runtime-api/intake/intake-mount.d.ts.map +1 -1
- package/dist/runtime-api/intake/intake-mount.js +7 -4
- package/dist/runtime-api/intake/intake-mount.js.map +1 -1
- package/dist/runtime-api/intake/process-signal-post.d.ts.map +1 -1
- package/dist/runtime-api/intake/process-signal-post.js +7 -1
- package/dist/runtime-api/intake/process-signal-post.js.map +1 -1
- package/dist/runtime-api/intake/scanner-launcher.d.ts.map +1 -1
- package/dist/runtime-api/intake/scanner-launcher.js +12 -0
- package/dist/runtime-api/intake/scanner-launcher.js.map +1 -1
- package/dist/runtime-api/intake/types.d.ts +24 -0
- package/dist/runtime-api/intake/types.d.ts.map +1 -1
- package/dist/runtime-api/routes/signals.d.ts.map +1 -1
- package/dist/runtime-api/routes/signals.js +10 -1
- package/dist/runtime-api/routes/signals.js.map +1 -1
- package/dist/runtime-api/routes/signals.schema.d.ts +10 -0
- package/dist/runtime-api/routes/signals.schema.d.ts.map +1 -1
- package/dist/runtime-api/routes/signals.schema.js +14 -0
- package/dist/runtime-api/routes/signals.schema.js.map +1 -1
- package/dist/scanners/events.d.ts +7 -0
- package/dist/scanners/events.d.ts.map +1 -1
- package/dist/scanners/events.js.map +1 -1
- package/dist/scanners/external/scaffold/delivery.py +23 -12
- package/dist/scanners/external/scaffold/scaffold.py +55 -7
- package/dist/scanners/implementations/market-regime.d.ts +1 -1
- package/dist/scanners/runtime-module.d.ts.map +1 -1
- package/dist/scanners/runtime-module.js +10 -2
- package/dist/scanners/runtime-module.js.map +1 -1
- package/dist/senpi/client.d.ts +58 -4
- package/dist/senpi/client.d.ts.map +1 -1
- package/dist/senpi/client.js +192 -15
- package/dist/senpi/client.js.map +1 -1
- package/dist/senpi/strategy-status.d.ts +32 -0
- package/dist/senpi/strategy-status.d.ts.map +1 -0
- package/dist/senpi/strategy-status.js +70 -0
- package/dist/senpi/strategy-status.js.map +1 -0
- package/dist/senpi/types.d.ts +47 -3
- package/dist/senpi/types.d.ts.map +1 -1
- package/dist/skills-manager/manifest.js +1 -1
- package/dist/skills-manager/skills-manifest.json +1 -1
- package/dist/telemetry/event-builders.d.ts +45 -6
- package/dist/telemetry/event-builders.d.ts.map +1 -1
- package/dist/telemetry/event-builders.js +99 -11
- package/dist/telemetry/event-builders.js.map +1 -1
- package/dist/telemetry/metrics.d.ts +37 -2
- package/dist/telemetry/metrics.d.ts.map +1 -1
- package/dist/telemetry/metrics.js +84 -4
- package/dist/telemetry/metrics.js.map +1 -1
- package/dist/telemetry/scanner-tick-event.d.ts +32 -0
- package/dist/telemetry/scanner-tick-event.d.ts.map +1 -0
- package/dist/telemetry/scanner-tick-event.js +32 -0
- package/dist/telemetry/scanner-tick-event.js.map +1 -0
- package/dist/types/strategy.d.ts +9 -1
- package/dist/types/strategy.d.ts.map +1 -1
- package/dist/universe/package-universe.d.ts +97 -0
- package/dist/universe/package-universe.d.ts.map +1 -0
- package/dist/universe/package-universe.js +275 -0
- package/dist/universe/package-universe.js.map +1 -0
- package/dist/utils/event-catalog.d.ts +58 -0
- package/dist/utils/event-catalog.d.ts.map +1 -1
- package/dist/utils/event-catalog.js +1 -0
- package/dist/utils/event-catalog.js.map +1 -1
- package/dist/validate/codes.d.ts +20 -0
- package/dist/validate/codes.d.ts.map +1 -1
- package/dist/validate/codes.js +36 -0
- package/dist/validate/codes.js.map +1 -1
- package/dist/validate/import-stage.js +5 -5
- package/dist/validate/import-stage.js.map +1 -1
- package/dist/validate/index.d.ts +1 -1
- package/dist/validate/index.d.ts.map +1 -1
- package/dist/validate/index.js.map +1 -1
- package/dist/validate/install-gate.d.ts.map +1 -1
- package/dist/validate/install-gate.js +10 -2
- package/dist/validate/install-gate.js.map +1 -1
- package/dist/validate/live-instruments.d.ts +44 -0
- package/dist/validate/live-instruments.d.ts.map +1 -0
- package/dist/validate/live-instruments.js +71 -0
- package/dist/validate/live-instruments.js.map +1 -0
- package/dist/validate/live-stage.js +5 -5
- package/dist/validate/live-stage.js.map +1 -1
- package/dist/validate/proof.d.ts +11 -1
- package/dist/validate/proof.d.ts.map +1 -1
- package/dist/validate/proof.js +7 -6
- package/dist/validate/proof.js.map +1 -1
- package/dist/validate/recipe-checks.d.ts.map +1 -1
- package/dist/validate/recipe-checks.js +6 -4
- package/dist/validate/recipe-checks.js.map +1 -1
- package/dist/validate/run.d.ts +5 -0
- package/dist/validate/run.d.ts.map +1 -1
- package/dist/validate/run.js +10 -1
- package/dist/validate/run.js.map +1 -1
- package/dist/validate/target.d.ts +41 -0
- package/dist/validate/target.d.ts.map +1 -1
- package/dist/validate/target.js +192 -16
- package/dist/validate/target.js.map +1 -1
- package/dist/validate/universe-stage.d.ts +71 -0
- package/dist/validate/universe-stage.d.ts.map +1 -0
- package/dist/validate/universe-stage.js +183 -0
- package/dist/validate/universe-stage.js.map +1 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/dist/runtime/managed-wallet-guard.d.ts +0 -47
- package/dist/runtime/managed-wallet-guard.d.ts.map +0 -1
- package/dist/runtime/managed-wallet-guard.js +0 -106
- package/dist/runtime/managed-wallet-guard.js.map +0 -1
- package/dist/runtime/protection-nudge.d.ts +0 -67
- package/dist/runtime/protection-nudge.d.ts.map +0 -1
- package/dist/runtime/protection-nudge.js +0 -244
- package/dist/runtime/protection-nudge.js.map +0 -1
|
@@ -1,68 +1,4 @@
|
|
|
1
1
|
import { withSpan } from '../telemetry/tracing.js';
|
|
2
|
-
import { createLogger } from '../utils/logger.js';
|
|
3
|
-
const logger = createLogger('[actions][decision-engine]');
|
|
4
|
-
// The resolved per-signal reason lands on a user-facing card via
|
|
5
|
-
// createPosition({ reason }); nothing downstream bounds its length.
|
|
6
|
-
const MAX_REASON_LENGTH = 300;
|
|
7
|
-
const REASON_ELLIPSIS = '…';
|
|
8
|
-
function hardCutReason(text) {
|
|
9
|
-
let cut = text.slice(0, MAX_REASON_LENGTH - REASON_ELLIPSIS.length);
|
|
10
|
-
// Never end on a lone high surrogate (a split emoji renders as junk).
|
|
11
|
-
const last = cut.charCodeAt(cut.length - 1);
|
|
12
|
-
if (last >= 0xd800 && last <= 0xdbff) {
|
|
13
|
-
cut = cut.slice(0, -1);
|
|
14
|
-
}
|
|
15
|
-
return cut + REASON_ELLIPSIS;
|
|
16
|
-
}
|
|
17
|
-
function capReason(text) {
|
|
18
|
-
return text.length <= MAX_REASON_LENGTH ? text : hardCutReason(text);
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Joins factor tokens keeping a greedy in-order prefix of whole tokens within
|
|
22
|
-
* the cap — dropping trailing tokens beats cutting one mid-way.
|
|
23
|
-
*/
|
|
24
|
-
function joinReasonTokens(tokens) {
|
|
25
|
-
let out = '';
|
|
26
|
-
for (const token of tokens) {
|
|
27
|
-
const candidate = out ? `${out}, ${token}` : token;
|
|
28
|
-
if (candidate.length + REASON_ELLIPSIS.length > MAX_REASON_LENGTH) {
|
|
29
|
-
return out ? out + REASON_ELLIPSIS : hardCutReason(token);
|
|
30
|
-
}
|
|
31
|
-
out = candidate;
|
|
32
|
-
}
|
|
33
|
-
return out;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Resolves the human-readable trade rationale from signal metadata, or
|
|
37
|
-
* undefined when nothing usable was sent.
|
|
38
|
-
*
|
|
39
|
-
* `reason` (singular, non-empty string) is the internal single-reason contract
|
|
40
|
-
* (e.g. liquidation-watchdog) and wins; anything else falls through to
|
|
41
|
-
* `reasons` — the external producers' contract: an array of factor tokens
|
|
42
|
-
* whose members are untrusted (the wire schema only checks Array.isArray), so
|
|
43
|
-
* only non-empty trimmed strings are kept. A bare non-empty string under
|
|
44
|
-
* `reasons` is accepted too.
|
|
45
|
-
*/
|
|
46
|
-
function resolveSignalReason(meta) {
|
|
47
|
-
const single = meta?.reason;
|
|
48
|
-
if (typeof single === 'string' && single.trim().length > 0) {
|
|
49
|
-
return capReason(single.trim());
|
|
50
|
-
}
|
|
51
|
-
const many = meta?.reasons;
|
|
52
|
-
if (typeof many === 'string' && many.trim().length > 0) {
|
|
53
|
-
return capReason(many.trim());
|
|
54
|
-
}
|
|
55
|
-
if (Array.isArray(many)) {
|
|
56
|
-
const tokens = many
|
|
57
|
-
.filter((member) => typeof member === 'string')
|
|
58
|
-
.map((member) => member.trim())
|
|
59
|
-
.filter((member) => member.length > 0);
|
|
60
|
-
if (tokens.length > 0) {
|
|
61
|
-
return joinReasonTokens(tokens);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
return undefined;
|
|
65
|
-
}
|
|
66
2
|
// ─── Decision Engine ────────────────────────────────────────────────────────
|
|
67
3
|
export class DecisionEngine {
|
|
68
4
|
strategies = new Map();
|
|
@@ -133,20 +69,6 @@ export class LlmDecisionStrategy {
|
|
|
133
69
|
// ─── Rule Decision Strategy ─────────────────────────────────────────────────
|
|
134
70
|
export class RuleDecisionStrategy {
|
|
135
71
|
mode = 'rule';
|
|
136
|
-
// One WARN per signalType: this sits in the per-signal decision path and
|
|
137
|
-
// would otherwise fire on every tick of a reason-less producer.
|
|
138
|
-
warnedMissingReason = new Set();
|
|
139
|
-
resolveReason(signal) {
|
|
140
|
-
const resolved = resolveSignalReason(signal.meta);
|
|
141
|
-
if (resolved !== undefined) {
|
|
142
|
-
return resolved;
|
|
143
|
-
}
|
|
144
|
-
if (!this.warnedMissingReason.has(signal.signalType)) {
|
|
145
|
-
this.warnedMissingReason.add(signal.signalType);
|
|
146
|
-
logger.warn('signal carried no usable meta.reason/meta.reasons; user-facing rationale degrades to the signal type', undefined, { signalType: signal.signalType, scannerId: signal.scannerId, asset: signal.asset });
|
|
147
|
-
}
|
|
148
|
-
return signal.signalType;
|
|
149
|
-
}
|
|
150
72
|
async decide(request) {
|
|
151
73
|
const scanResult = request.event?.data?.scanResult;
|
|
152
74
|
const signals = (scanResult?.signals ?? []).filter((s) => s.asset && s.asset.length > 0);
|
|
@@ -174,7 +96,7 @@ export class RuleDecisionStrategy {
|
|
|
174
96
|
direction: s.direction,
|
|
175
97
|
score: s.score,
|
|
176
98
|
signalType: s.signalType,
|
|
177
|
-
reason:
|
|
99
|
+
reason: s.meta?.reason ?? s.signalType,
|
|
178
100
|
dex: s.meta?.dex,
|
|
179
101
|
// Canonical per-signal sizing/leverage flow to the open action.
|
|
180
102
|
...(s.marginPct != null ? { marginPct: s.marginPct } : {}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decision-engine.js","sourceRoot":"","sources":["../../src/actions/decision-engine.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"decision-engine.js","sourceRoot":"","sources":["../../src/actions/decision-engine.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAiBnD,+EAA+E;AAE/E,MAAM,OAAO,cAAc;IACjB,UAAU,GAAG,IAAI,GAAG,EAAkC,CAAC;IAE/D,QAAQ,CAAC,QAA0B;QACjC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAkB,EAAE,OAAwB;QACvD,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,6CAA6C,IAAI,EAAE,CAAC,CAAC;QACvE,CAAC;QACD,OAAO,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;CACF;AAED,8EAA8E;AAE9E,MAAM,OAAO,mBAAmB;IAGV;IAFX,IAAI,GAAiB,KAAK,CAAC;IAEpC,YAAoB,WAAwB;QAAxB,gBAAW,GAAX,WAAW,CAAa;IAAG,CAAC;IAEhD,KAAK,CAAC,MAAM,CAAC,OAAwB;QACnC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,qCAAq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kB;IACpB,IAAI,GAAiB,MAAM,CAAC;IAErC,KAAK,CAAC,MAAM,CAAC,OAAwB;QACnC,OAAO;YACL,OAAO,EAAE,KAAK;YACd,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,UAAU,EAAE,EAAE;YACd,SAAS,EAAE,sBAAsB;YACjC,OAAO,EAAE,EAAE;SACZ,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -7,11 +7,17 @@
|
|
|
7
7
|
* we reuse the pure builders ({@link buildSignalEvaluated} → {@link buildDecisionMade} /
|
|
8
8
|
* {@link buildSignalOutcomes}), which are pure and already battle-tested, then project their records
|
|
9
9
|
* onto the event contract. Body lines are deterministic narratives; reasoning (decision.made) and any
|
|
10
|
-
* error text reach `redact`; the raw scanner `meta` bag
|
|
10
|
+
* error text reach `redact`; the raw scanner `meta` bag rides one JSON string attribute, verbatim,
|
|
11
|
+
* and the per-gate risk-gate bag rides another.
|
|
12
|
+
*
|
|
13
|
+
* The one side effect is a once-per-process WARN from {@link serializeRiskGates} when the risk-gate
|
|
14
|
+
* bag has to shed fields to fit the attribute budget — silent loss on a trust surface is worse than
|
|
15
|
+
* a log line. The returned events are unaffected by it.
|
|
11
16
|
*/
|
|
12
17
|
import { type PositionIdResolver } from "../telemetry/event-builders.js";
|
|
13
18
|
import { type AttrsFor, type EventName } from "../utils/event-catalog.js";
|
|
14
|
-
import type
|
|
19
|
+
import { type Logger, type LogLevel } from "../utils/logger.js";
|
|
20
|
+
import type { RiskGateSnapshot } from "../telemetry/event-builders.js";
|
|
15
21
|
/**
|
|
16
22
|
* A fully-built event ready to hand to `logger.event(name, level, { body, attributes, redact })`.
|
|
17
23
|
*
|
|
@@ -52,6 +58,38 @@ export interface ActionResultEventInput {
|
|
|
52
58
|
readonly nowMs: number;
|
|
53
59
|
readonly resolvePositionId?: PositionIdResolver;
|
|
54
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* The gate bag as a JSON array string, or `undefined` when even the leanest projection will not fit.
|
|
63
|
+
*
|
|
64
|
+
* The logger caps every string attribute at {@link MAX_ATTR_VALUE_CHARS}, and a cap applied to JSON
|
|
65
|
+
* yields unparseable garbage — so the budget is spent here instead: shed `metrics`, then `reason`,
|
|
66
|
+
* and give up rather than emit a fragment. What comes out is always valid JSON or nothing.
|
|
67
|
+
*
|
|
68
|
+
* An empty `gates` array serializes to `"[]"` on purpose: "the gates ran and none are configured"
|
|
69
|
+
* is a fact the drill-down needs, distinct from the absent attribute's "there is no snapshot".
|
|
70
|
+
*
|
|
71
|
+
* A `metrics` bag that `JSON.stringify` refuses (a BigInt, a throwing `toJSON`) fails only its own
|
|
72
|
+
* tier — the metrics-less tiers below it still produce a bag.
|
|
73
|
+
*
|
|
74
|
+
* `log` is injectable so the once-per-process warnings can be observed in a test; production call
|
|
75
|
+
* sites take the default.
|
|
76
|
+
*/
|
|
77
|
+
export declare function serializeRiskGates(gates: readonly RiskGateSnapshot[], log?: Pick<Logger, "warn">): string | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* The scanner's `meta` bag as ONE JSON string attribute, or `undefined` when it cannot be carried.
|
|
80
|
+
*
|
|
81
|
+
* The bag is scanner-defined and NOT interpreted here: no key is lifted, dropped, or reordered — the
|
|
82
|
+
* JSON is emitted whole or not at all. A bag over the per-value attribute cap is therefore dropped
|
|
83
|
+
* rather than truncated (a cut JSON string is unparseable) and rather than thinned (choosing which
|
|
84
|
+
* scanner keys survive would be interpretation). An empty bag legitimately serializes to `"{}"`, but
|
|
85
|
+
* that value only says a bag arrived: ingest normalizes a missing bag to `{}`, so a scanner that sent
|
|
86
|
+
* an empty one and a scanner that sent none both land here as `{}` and cannot be told apart. The
|
|
87
|
+
* absent attribute is the one that means something — no bag reached the mapper at all.
|
|
88
|
+
*
|
|
89
|
+
* The warn payload carries only counts — the bag's own content is scanner free-text and never safe as
|
|
90
|
+
* an attribute. `log` is injectable so the once-per-process warns are observable.
|
|
91
|
+
*/
|
|
92
|
+
export declare function serializeSignalMeta(meta: Record<string, unknown>, log?: Pick<Logger, "warn">): string | undefined;
|
|
55
93
|
/**
|
|
56
94
|
* Build the full event array for one action-result pass: `decision.made` first (when the pass carried
|
|
57
95
|
* a decision), then one `signal.outcome` per evaluated signal. A failed outcome escalates the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-derivation.d.ts","sourceRoot":"","sources":["../../src/actions/event-derivation.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"event-derivation.d.ts","sourceRoot":"","sources":["../../src/actions/event-derivation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAKL,KAAK,kBAAkB,EACxB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAmD,KAAK,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3H,OAAO,EAAgB,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,KAAK,EAEV,gBAAgB,EAGjB,MAAM,gCAAgC,CAAC;AAIxC;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,IAAI,CAAC,SAAS,SAAS,GAC7E;IACE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IACjB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;IAClC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,gGAAgG;IAChG,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;CAC1B,GACD,KAAK,CAAC;AAEV;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,cAAc,GAAG,IAAI,GAAG,IAAI,CAclF;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,SAAS,cAAc,EAAE,GAAG,IAAI,CAavF;AAED,kFAAkF;AAClF,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;CACjD;AAoGD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,SAAS,gBAAgB,EAAE,EAClC,GAAG,GAAE,IAAI,CAAC,MAAM,EAAE,MAAM,CAAiB,GACxC,MAAM,GAAG,SAAS,CA2BpB;AAkCD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,GAAG,GAAE,IAAI,CAAC,MAAM,EAAE,MAAM,CAAiB,GACxC,MAAM,GAAG,SAAS,CA8BpB;AAsCD;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,sBAAsB,GAAG,cAAc,EAAE,CAqCxF"}
|
|
@@ -7,10 +7,18 @@
|
|
|
7
7
|
* we reuse the pure builders ({@link buildSignalEvaluated} → {@link buildDecisionMade} /
|
|
8
8
|
* {@link buildSignalOutcomes}), which are pure and already battle-tested, then project their records
|
|
9
9
|
* onto the event contract. Body lines are deterministic narratives; reasoning (decision.made) and any
|
|
10
|
-
* error text reach `redact`; the raw scanner `meta` bag
|
|
10
|
+
* error text reach `redact`; the raw scanner `meta` bag rides one JSON string attribute, verbatim,
|
|
11
|
+
* and the per-gate risk-gate bag rides another.
|
|
12
|
+
*
|
|
13
|
+
* The one side effect is a once-per-process WARN from {@link serializeRiskGates} when the risk-gate
|
|
14
|
+
* bag has to shed fields to fit the attribute budget — silent loss on a trust surface is worse than
|
|
15
|
+
* a log line. The returned events are unaffected by it.
|
|
11
16
|
*/
|
|
12
|
-
import { buildDecisionMade, buildSignalEvaluated, buildSignalOutcomes, } from "../telemetry/event-builders.js";
|
|
17
|
+
import { asObject, buildDecisionMade, buildSignalEvaluated, buildSignalOutcomes, } from "../telemetry/event-builders.js";
|
|
18
|
+
import { MAX_ATTR_VALUE_CHARS } from "../telemetry/attributes.js";
|
|
13
19
|
import { EVENT_NAME, JOIN_ATTR, eventAttrs, fmtThousands } from "../utils/event-catalog.js";
|
|
20
|
+
import { createLogger } from "../utils/logger.js";
|
|
21
|
+
const derivationLog = createLogger("[senpi-core][event-derivation]");
|
|
14
22
|
/**
|
|
15
23
|
* Build then emit a single {@link EmittableEvent} through a logger, with build + emit guarded as one
|
|
16
24
|
* unit so neither a throwing builder nor a telemetry failure can disturb the host (trading/scan/
|
|
@@ -115,8 +123,171 @@ function outcomeBody(o, ev) {
|
|
|
115
123
|
}
|
|
116
124
|
return `${head}${score} → ${verb}${detail}`;
|
|
117
125
|
}
|
|
118
|
-
/**
|
|
126
|
+
/**
|
|
127
|
+
* Which optional per-gate fields survive one serialization attempt. Tried in order; the first
|
|
128
|
+
* projection that fits {@link MAX_ATTR_VALUE_CHARS} wins.
|
|
129
|
+
*/
|
|
130
|
+
const GATE_TIERS = [
|
|
131
|
+
{ metrics: true, reason: true },
|
|
132
|
+
{ metrics: false, reason: true },
|
|
133
|
+
{ metrics: false, reason: false },
|
|
134
|
+
];
|
|
135
|
+
/**
|
|
136
|
+
* Each warn below fires once per process — the guard is not a routine path, and if it does trip it
|
|
137
|
+
* trips on every outcome of every pass. The two are tracked separately: shedding a field still
|
|
138
|
+
* leaves a usable bag, dropping it leaves nothing, and one must never mask the other.
|
|
139
|
+
*/
|
|
140
|
+
let warnedGateShed = false;
|
|
141
|
+
let warnedGateDropped = false;
|
|
142
|
+
/**
|
|
143
|
+
* One gate's wire projection. `gateName` is omitted — it is a static function of `gateId`, so
|
|
144
|
+
* putting it on every row buys nothing. The three reliability fields ride only when they say
|
|
145
|
+
* something: a healthy gate is `evaluationOk: true`, `fallbackApplied: false`, `failureKind: "none"`,
|
|
146
|
+
* and repeating that on every gate of every pass is noise. Their presence marks the fail-closed
|
|
147
|
+
* gate, which is the one a reader must not mistake for a real breach.
|
|
148
|
+
*/
|
|
149
|
+
function projectGate(g, tier) {
|
|
150
|
+
return {
|
|
151
|
+
gateId: g.gateId,
|
|
152
|
+
status: g.status,
|
|
153
|
+
...(tier.reason && g.reason !== undefined ? { reason: g.reason } : {}),
|
|
154
|
+
...(g.evaluationOk === false ? { evaluationOk: false } : {}),
|
|
155
|
+
...(g.fallbackApplied === true ? { fallbackApplied: true } : {}),
|
|
156
|
+
...(g.failureKind !== undefined && g.failureKind !== "none" ? { failureKind: g.failureKind } : {}),
|
|
157
|
+
...(tier.metrics && g.metrics !== undefined ? { metrics: g.metrics } : {}),
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* The gate bag as a JSON array string, or `undefined` when even the leanest projection will not fit.
|
|
162
|
+
*
|
|
163
|
+
* The logger caps every string attribute at {@link MAX_ATTR_VALUE_CHARS}, and a cap applied to JSON
|
|
164
|
+
* yields unparseable garbage — so the budget is spent here instead: shed `metrics`, then `reason`,
|
|
165
|
+
* and give up rather than emit a fragment. What comes out is always valid JSON or nothing.
|
|
166
|
+
*
|
|
167
|
+
* An empty `gates` array serializes to `"[]"` on purpose: "the gates ran and none are configured"
|
|
168
|
+
* is a fact the drill-down needs, distinct from the absent attribute's "there is no snapshot".
|
|
169
|
+
*
|
|
170
|
+
* A `metrics` bag that `JSON.stringify` refuses (a BigInt, a throwing `toJSON`) fails only its own
|
|
171
|
+
* tier — the metrics-less tiers below it still produce a bag.
|
|
172
|
+
*
|
|
173
|
+
* `log` is injectable so the once-per-process warnings can be observed in a test; production call
|
|
174
|
+
* sites take the default.
|
|
175
|
+
*/
|
|
176
|
+
export function serializeRiskGates(gates, log = derivationLog) {
|
|
177
|
+
for (const tier of GATE_TIERS) {
|
|
178
|
+
let json;
|
|
179
|
+
try {
|
|
180
|
+
json = JSON.stringify(gates.map((g) => projectGate(g, tier)));
|
|
181
|
+
}
|
|
182
|
+
catch {
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
if (json.length <= MAX_ATTR_VALUE_CHARS) {
|
|
186
|
+
if (tier !== GATE_TIERS[0] && !warnedGateShed) {
|
|
187
|
+
warnedGateShed = true;
|
|
188
|
+
log.warn("Risk gate bag exceeded the attribute budget; shed fields to fit", {
|
|
189
|
+
gateCount: gates.length,
|
|
190
|
+
keptReason: tier.reason,
|
|
191
|
+
keptMetrics: tier.metrics,
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
return json;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
if (!warnedGateDropped) {
|
|
198
|
+
warnedGateDropped = true;
|
|
199
|
+
log.warn("Risk gate bag exceeded the attribute budget even bare; dropped", {
|
|
200
|
+
gateCount: gates.length,
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
return undefined;
|
|
204
|
+
}
|
|
205
|
+
// Both faults drop the bag for a different reason, so each owns its flag: one firing must not silence
|
|
206
|
+
// the other, and neither may repeat per signal on a scanner that produces the same bag every tick.
|
|
207
|
+
let warnedMetaOversize = false;
|
|
208
|
+
let warnedMetaUnserializable = false;
|
|
209
|
+
/**
|
|
210
|
+
* Report a dropped bag without letting the report become a second, worse fault. The bag is
|
|
211
|
+
* scanner-controlled all the way down, so even counting its keys can throw (a proxy with a hostile
|
|
212
|
+
* `ownKeys` trap) — an uncountable bag is reported with no `keyCount` rather than with an escaping
|
|
213
|
+
* throw, and the emit itself is guarded so a failing logger cannot escape either. A throw here would
|
|
214
|
+
* leave `serializeSignalMeta` through the mapper and cost the caller its ENTIRE event array, so one
|
|
215
|
+
* hostile bag would blank the pass it rode in on: the diagnostic must never cost more than the bag.
|
|
216
|
+
*/
|
|
217
|
+
function warnMetaDropped(log, message, meta, extra) {
|
|
218
|
+
let keyCount;
|
|
219
|
+
try {
|
|
220
|
+
keyCount = Object.keys(meta).length;
|
|
221
|
+
}
|
|
222
|
+
catch {
|
|
223
|
+
keyCount = undefined;
|
|
224
|
+
}
|
|
225
|
+
try {
|
|
226
|
+
log.warn(message, { ...(keyCount !== undefined ? { keyCount } : {}), ...extra });
|
|
227
|
+
}
|
|
228
|
+
catch {
|
|
229
|
+
// The drop stands; there is nowhere left to report it to.
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* The scanner's `meta` bag as ONE JSON string attribute, or `undefined` when it cannot be carried.
|
|
234
|
+
*
|
|
235
|
+
* The bag is scanner-defined and NOT interpreted here: no key is lifted, dropped, or reordered — the
|
|
236
|
+
* JSON is emitted whole or not at all. A bag over the per-value attribute cap is therefore dropped
|
|
237
|
+
* rather than truncated (a cut JSON string is unparseable) and rather than thinned (choosing which
|
|
238
|
+
* scanner keys survive would be interpretation). An empty bag legitimately serializes to `"{}"`, but
|
|
239
|
+
* that value only says a bag arrived: ingest normalizes a missing bag to `{}`, so a scanner that sent
|
|
240
|
+
* an empty one and a scanner that sent none both land here as `{}` and cannot be told apart. The
|
|
241
|
+
* absent attribute is the one that means something — no bag reached the mapper at all.
|
|
242
|
+
*
|
|
243
|
+
* The warn payload carries only counts — the bag's own content is scanner free-text and never safe as
|
|
244
|
+
* an attribute. `log` is injectable so the once-per-process warns are observable.
|
|
245
|
+
*/
|
|
246
|
+
export function serializeSignalMeta(meta, log = derivationLog) {
|
|
247
|
+
let json;
|
|
248
|
+
try {
|
|
249
|
+
// A `toJSON` returning undefined makes stringify return undefined instead of throwing, so the
|
|
250
|
+
// result is checked as well as the throw.
|
|
251
|
+
json = JSON.stringify(meta);
|
|
252
|
+
}
|
|
253
|
+
catch {
|
|
254
|
+
json = undefined;
|
|
255
|
+
}
|
|
256
|
+
// The attribute is contracted as a JSON OBJECT that a consumer renders as a key-value map, but a
|
|
257
|
+
// bag carrying its own `toJSON` can render as any JSON value. A scalar or an array is the same
|
|
258
|
+
// fault as one that does not render at all — the bag did not come out a bag — so it takes the same
|
|
259
|
+
// path. This tests the shape of the whole value, never the meaning of a key inside it.
|
|
260
|
+
if (typeof json !== "string" || !json.startsWith("{")) {
|
|
261
|
+
if (!warnedMetaUnserializable) {
|
|
262
|
+
warnedMetaUnserializable = true;
|
|
263
|
+
warnMetaDropped(log, "scanner signal meta dropped: the bag does not serialize to a JSON object", meta);
|
|
264
|
+
}
|
|
265
|
+
return undefined;
|
|
266
|
+
}
|
|
267
|
+
if (json.length > MAX_ATTR_VALUE_CHARS) {
|
|
268
|
+
if (!warnedMetaOversize) {
|
|
269
|
+
warnedMetaOversize = true;
|
|
270
|
+
warnMetaDropped(log, "scanner signal meta dropped: JSON is over the per-attribute size cap", meta, {
|
|
271
|
+
jsonChars: json.length,
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
return undefined;
|
|
275
|
+
}
|
|
276
|
+
return json;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* signal.outcome attributes: the queryable scalar surface, plus the scanner's `meta` bag as one
|
|
280
|
+
* verbatim JSON string. The bag is read off the record's `rawSignal` through `asObject`, and there is
|
|
281
|
+
* none to read when the outcome row matched no input signal — the record builder synthesizes a bare
|
|
282
|
+
* summary for such a row, so nothing behind it carries a bag. `asObject` additionally guards a
|
|
283
|
+
* hand-built payload whose `meta` is not a plain object; every scanner signal reaching here already
|
|
284
|
+
* carries at least `{}`. Either way the attribute is omitted rather than coerced to `{}`.
|
|
285
|
+
*
|
|
286
|
+
* The per-gate risk-gate snapshot rides its own JSON string attribute the same way, through
|
|
287
|
+
* {@link serializeRiskGates}.
|
|
288
|
+
*/
|
|
119
289
|
function outcomeAttributes(o) {
|
|
290
|
+
const meta = asObject(o.rawSignal?.meta);
|
|
120
291
|
return eventAttrs({
|
|
121
292
|
[JOIN_ATTR.positionId]: o.positionId,
|
|
122
293
|
[JOIN_ATTR.orderId]: o.orderId,
|
|
@@ -127,6 +298,7 @@ function outcomeAttributes(o) {
|
|
|
127
298
|
// Always a number off the record builder (`num(...) ?? 0`); the fallback mirrors that and keeps
|
|
128
299
|
// score a required, always-queryable scalar.
|
|
129
300
|
"senpi.signal.score": o.score ?? 0,
|
|
301
|
+
"senpi.signal.meta": meta !== undefined ? serializeSignalMeta(meta) : undefined,
|
|
130
302
|
"senpi.outcome.result": o.result,
|
|
131
303
|
"senpi.outcome.reason_code": o.reasonCode,
|
|
132
304
|
"senpi.outcome.margin_amount": o.marginAmount,
|
|
@@ -135,6 +307,7 @@ function outcomeAttributes(o) {
|
|
|
135
307
|
"senpi.outcome.leverage": o.leverage,
|
|
136
308
|
"senpi.outcome.notional_value": o.notionalValue,
|
|
137
309
|
"senpi.outcome.size": o.size,
|
|
310
|
+
"senpi.risk.gates": o.riskGates !== undefined ? serializeRiskGates(o.riskGates) : undefined,
|
|
138
311
|
});
|
|
139
312
|
}
|
|
140
313
|
/**
|
|
@@ -160,8 +333,8 @@ export function deriveActionResultEvents(input) {
|
|
|
160
333
|
}
|
|
161
334
|
// buildSignalOutcomes and pass.evaluations are both one-per-evaluation, same order — zipped so the
|
|
162
335
|
// narrative can template the fill (entryPrice) and the error text rides `redact` from the same
|
|
163
|
-
// evaluation. The record carries the queryable scalar surface
|
|
164
|
-
// carries the free-text error and the entry fill the body templates.
|
|
336
|
+
// evaluation. The record carries the queryable scalar surface plus the raw `meta` bag (on its
|
|
337
|
+
// `rawSignal`); the evaluation carries the free-text error and the entry fill the body templates.
|
|
165
338
|
const outcomes = buildSignalOutcomes(pass);
|
|
166
339
|
outcomes.forEach((outcome, i) => {
|
|
167
340
|
const ev = pass.evaluations[i];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-derivation.js","sourceRoot":"","sources":["../../src/actions/event-derivation.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"event-derivation.js","sourceRoot":"","sources":["../../src/actions/event-der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M,EACN,YAAY,EAEZ,aAAa,EACb,cAAc,EACd,YAAY,EACZ,SAAS,EAEV,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"open-position.action.d.ts","sourceRoot":"","sources":["../../../src/actions/open-position/open-position.action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,YAAY,EAEZ,aAAa,EACb,cAAc,EACd,YAAY,EACZ,SAAS,EAEV,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AA6BtD,qBAAa,kBAAmB,YAAW,MAAM;IAO7C,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,OAAO;IAPjB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,UAAU,EAAG,eAAe,CAAU;IAE/C,OAAO,CAAC,cAAc,CAAiB;gBAG7B,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,cAAc;IASjC,OAAO,CAAC,QAAQ;IAYV,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC;IAqRrD,OAAO,CAAC,gBAAgB;YAaV,aAAa;CAwe5B;AAID,eAAO,MAAM,mBAAmB,EAAE,aACO,CAAC;AAE1C,eAAO,MAAM,oBAAoB,EAAE,cAMlC,CAAC"}
|