@senpi/runtime 3.0.6-dev.runtime-phase-2.20260630134145 → 3.0.6-dev.runtime-phase-2.20260630134307

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.
Files changed (63) hide show
  1. package/dist/actions/close-position/close-position.action.d.ts.map +1 -1
  2. package/dist/actions/close-position/close-position.action.js +95 -65
  3. package/dist/actions/close-position/close-position.action.js.map +1 -1
  4. package/dist/actions/decision-engine.d.ts.map +1 -1
  5. package/dist/actions/decision-engine.js +40 -28
  6. package/dist/actions/decision-engine.js.map +1 -1
  7. package/dist/actions/open-position/open-position.action.d.ts.map +1 -1
  8. package/dist/actions/open-position/open-position.action.js +261 -202
  9. package/dist/actions/open-position/open-position.action.js.map +1 -1
  10. package/dist/dsl/monitor/create-monitor.d.ts +3 -0
  11. package/dist/dsl/monitor/create-monitor.d.ts.map +1 -1
  12. package/dist/dsl/monitor/create-monitor.js +76 -28
  13. package/dist/dsl/monitor/create-monitor.js.map +1 -1
  14. package/dist/dsl/monitor/process-one-position.d.ts +2 -1
  15. package/dist/dsl/monitor/process-one-position.d.ts.map +1 -1
  16. package/dist/dsl/monitor/process-one-position.js +84 -38
  17. package/dist/dsl/monitor/process-one-position.js.map +1 -1
  18. package/dist/dsl/plugin/index.d.ts +2 -0
  19. package/dist/dsl/plugin/index.d.ts.map +1 -1
  20. package/dist/dsl/plugin/index.js +6 -2
  21. package/dist/dsl/plugin/index.js.map +1 -1
  22. package/dist/dsl/plugin/options.d.ts +3 -0
  23. package/dist/dsl/plugin/options.d.ts.map +1 -1
  24. package/dist/runtime/create-actions.d.ts.map +1 -1
  25. package/dist/runtime/create-actions.js +40 -5
  26. package/dist/runtime/create-actions.js.map +1 -1
  27. package/dist/runtime/create-scanner-module.d.ts +2 -1
  28. package/dist/runtime/create-scanner-module.d.ts.map +1 -1
  29. package/dist/runtime/create-scanner-module.js +2 -1
  30. package/dist/runtime/create-scanner-module.js.map +1 -1
  31. package/dist/runtime/runtime.d.ts +10 -0
  32. package/dist/runtime/runtime.d.ts.map +1 -1
  33. package/dist/runtime/runtime.js +120 -65
  34. package/dist/runtime/runtime.js.map +1 -1
  35. package/dist/scanners/engine/data-providers.d.ts +3 -0
  36. package/dist/scanners/engine/data-providers.d.ts.map +1 -1
  37. package/dist/scanners/engine/data-providers.js.map +1 -1
  38. package/dist/scanners/engine/engine.d.ts +18 -0
  39. package/dist/scanners/engine/engine.d.ts.map +1 -1
  40. package/dist/scanners/engine/engine.js +93 -2
  41. package/dist/scanners/engine/engine.js.map +1 -1
  42. package/dist/scanners/engine/input-resolver.d.ts.map +1 -1
  43. package/dist/scanners/engine/input-resolver.js +9 -7
  44. package/dist/scanners/engine/input-resolver.js.map +1 -1
  45. package/dist/scanners/runtime-module.d.ts +3 -0
  46. package/dist/scanners/runtime-module.d.ts.map +1 -1
  47. package/dist/scanners/runtime-module.js +1 -0
  48. package/dist/scanners/runtime-module.js.map +1 -1
  49. package/dist/telemetry/otel-sdk.d.ts +6 -0
  50. package/dist/telemetry/otel-sdk.d.ts.map +1 -1
  51. package/dist/telemetry/otel-sdk.js +11 -0
  52. package/dist/telemetry/otel-sdk.js.map +1 -1
  53. package/dist/telemetry/trace-identity.d.ts +31 -0
  54. package/dist/telemetry/trace-identity.d.ts.map +1 -0
  55. package/dist/telemetry/trace-identity.js +58 -0
  56. package/dist/telemetry/trace-identity.js.map +1 -0
  57. package/dist/telemetry/tracing.d.ts +32 -0
  58. package/dist/telemetry/tracing.d.ts.map +1 -0
  59. package/dist/telemetry/tracing.js +70 -0
  60. package/dist/telemetry/tracing.js.map +1 -0
  61. package/dist/types/scanner.d.ts +2 -0
  62. package/dist/types/scanner.d.ts.map +1 -1
  63. package/package.json +4 -1
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Pure, vendor-neutral mapping `IdentityEnvelope → senpi.* attributes`, set per-trace
3
+ * at each root span's birth. Per-runtime identity can't live on the process-global OTel
4
+ * resource — N wallets share one process, so a resource attribute would stamp the first
5
+ * runtime's value onto everyone's telemetry (see `otel-sdk.ts` SCOPING note).
6
+ *
7
+ * The actual stamping is HyperDX's `setTraceAttributes` (rides every span in the trace),
8
+ * called at the root-span seams — NOT here: importing `@hyperdx/node-opentelemetry`
9
+ * captures its OTLP transport env at module-load, so it must stay behind code that runs
10
+ * only after `initOtelSdk()`.
11
+ */
12
+ import { isOtelInitialized } from "./otel-sdk.js";
13
+ import { createLogger } from "../utils/logger.js";
14
+ const logger = createLogger("telemetry/trace-identity");
15
+ /**
16
+ * Map the runtime {@link IdentityEnvelope} to its `senpi.*` trace attributes. Optional
17
+ * envelope fields are omitted when unset rather than emitted as empty/undefined, so a
18
+ * trace never carries a hollow `senpi.config.hash=""`.
19
+ */
20
+ export function identityTraceAttributes(identity) {
21
+ const attributes = {
22
+ "senpi.strategy.address": identity.strategyAddress,
23
+ "senpi.recipe": identity.recipe,
24
+ "senpi.runtime": identity.runtime,
25
+ "senpi.boot.id": identity.bootId,
26
+ };
27
+ if (identity.recipeVersion !== undefined) {
28
+ attributes["senpi.recipe.version"] = String(identity.recipeVersion);
29
+ }
30
+ if (identity.configHash !== undefined) {
31
+ attributes["senpi.config.hash"] = identity.configHash;
32
+ }
33
+ return attributes;
34
+ }
35
+ /**
36
+ * Stamp the runtime's `senpi.*` identity onto the active trace via HyperDX's
37
+ * `setTraceAttributes`, which rides every span in the trace. Call it from a root-span
38
+ * seam (inside an active span's context) so the whole trace carries the identity.
39
+ *
40
+ * No-ops until the SDK is initialised: the import is dynamic so `@hyperdx/node-opentelemetry`
41
+ * (which captures its OTLP env at module-load) only loads after `initOtelSdk()`, and there is
42
+ * no trace to stamp before then. Best-effort: a failure is logged and swallowed — tracing must
43
+ * never break trading.
44
+ */
45
+ export async function setTraceIdentityAttributes(identity) {
46
+ if (!isOtelInitialized())
47
+ return;
48
+ try {
49
+ const hyperdx = (await import("@hyperdx/node-opentelemetry"));
50
+ hyperdx.setTraceAttributes(identityTraceAttributes(identity));
51
+ }
52
+ catch (err) {
53
+ logger.warn("failed to stamp per-trace identity attributes", {
54
+ err: err instanceof Error ? err.message : String(err),
55
+ });
56
+ }
57
+ }
58
+ //# sourceMappingURL=trace-identity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trace-identity.js","sourceRoot":"","sources":["../../src/telemetry/trace-identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,MAAM,GAAG,YAAY,CAAC,0BAA0B,CAAC,CAAC;AAExD;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,QAA0B;IAChE,MAAM,UAAU,GAAe;QAC7B,wBAAwB,EAAE,QAAQ,CAAC,eAAe;QAClD,cAAc,EAAE,QAAQ,CAAC,MAAM;QAC/B,eAAe,EAAE,QAAQ,CAAC,OAAO;QACjC,eAAe,EAAE,QAAQ,CAAC,MAAM;KACjC,CAAC;IACF,IAAI,QAAQ,CAAC,aAAa,KAAK,SAAS,EAAE,CAAC;QACzC,UAAU,CAAC,sBAAsB,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;IACtE,CAAC;IACD,IAAI,QAAQ,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;QACtC,UAAU,CAAC,mBAAmB,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC;IACxD,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAAC,QAA0B;IACzE,IAAI,CAAC,iBAAiB,EAAE;QAAE,OAAO;IACjC,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,CAAC,MAAM,MAAM,CAAC,6BAA6B,CAAC,CAE3D,CAAC;QACF,OAAO,CAAC,kBAAkB,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAC,CAAC;IAChE,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,CAAC,IAAI,CAAC,+CAA+C,EAAE;YAC3D,GAAG,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;SACtD,CAAC,CAAC;IACL,CAAC;AACH,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * The one place runtime code touches the OTel trace API: manual spans are created
3
+ * exclusively through {@link withSpan}. Vendor-neutral (depends only on
4
+ * `@opentelemetry/api`); the SDK itself is stood up in `otel-sdk.ts`. When the SDK
5
+ * is not initialised (telemetry off, or under test) the API resolves a no-op tracer,
6
+ * so `withSpan` runs the callback with near-zero overhead — no `enabled` gate needed.
7
+ */
8
+ import { type Span, type Attributes, type Tracer } from "@opentelemetry/api";
9
+ /** The single tracer for our manual spans. Resolves the no-op tracer pre-init. */
10
+ export declare function getTracer(): Tracer;
11
+ /**
12
+ * Run `fn` inside a new active span, standardising the lifecycle:
13
+ *
14
+ * - `startActiveSpan`, so the span is the active context: auto-instrumented HTTP
15
+ * children and nested {@link withSpan} calls nest under it while work stays on the
16
+ * synchronous `await` chain. (`startSpan` would detach children into roots.)
17
+ * - Passes the span **handle** into `fn` — use it for `addEvent`/`setAttribute`/
18
+ * `recordException`, never `trace.getActiveSpan()` (ambiguous under concurrent
19
+ * sibling spans, e.g. a `Promise.all` fan-out).
20
+ * - On throw: records the exception, sets ERROR status, then **rethrows** — tracing
21
+ * observes, never alters control flow. Pass `options.expected` to mark control-flow
22
+ * throws (e.g. `SkipScan`) that should propagate *without* painting the span red.
23
+ * - Always ends the span (`finally`), so a span can never leak.
24
+ *
25
+ * Tracing must never break runtime code: the span operations are guarded so a throw
26
+ * from the SDK — or from a caller's `expected` predicate — can neither mask `fn`'s
27
+ * error nor corrupt its result.
28
+ */
29
+ export declare function withSpan<T>(name: string, attributes: Attributes, fn: (span: Span) => Promise<T>, options?: {
30
+ expected?: (err: unknown) => boolean;
31
+ }): Promise<T>;
32
+ //# sourceMappingURL=tracing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../src/telemetry/tracing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAGL,KAAK,IAAI,EACT,KAAK,UAAU,EACf,KAAK,MAAM,EACZ,MAAM,oBAAoB,CAAC;AAK5B,kFAAkF;AAClF,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EACxB,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,UAAU,EACtB,EAAE,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,EAC9B,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAA;CAAE,GACjD,OAAO,CAAC,CAAC,CAAC,CA8BZ"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * The one place runtime code touches the OTel trace API: manual spans are created
3
+ * exclusively through {@link withSpan}. Vendor-neutral (depends only on
4
+ * `@opentelemetry/api`); the SDK itself is stood up in `otel-sdk.ts`. When the SDK
5
+ * is not initialised (telemetry off, or under test) the API resolves a no-op tracer,
6
+ * so `withSpan` runs the callback with near-zero overhead — no `enabled` gate needed.
7
+ */
8
+ import { trace, SpanStatusCode, } from "@opentelemetry/api";
9
+ /** Instrumentation scope for every span this runtime creates. */
10
+ const TRACER_NAME = "senpi-trading-runtime";
11
+ /** The single tracer for our manual spans. Resolves the no-op tracer pre-init. */
12
+ export function getTracer() {
13
+ return trace.getTracer(TRACER_NAME);
14
+ }
15
+ /**
16
+ * Run `fn` inside a new active span, standardising the lifecycle:
17
+ *
18
+ * - `startActiveSpan`, so the span is the active context: auto-instrumented HTTP
19
+ * children and nested {@link withSpan} calls nest under it while work stays on the
20
+ * synchronous `await` chain. (`startSpan` would detach children into roots.)
21
+ * - Passes the span **handle** into `fn` — use it for `addEvent`/`setAttribute`/
22
+ * `recordException`, never `trace.getActiveSpan()` (ambiguous under concurrent
23
+ * sibling spans, e.g. a `Promise.all` fan-out).
24
+ * - On throw: records the exception, sets ERROR status, then **rethrows** — tracing
25
+ * observes, never alters control flow. Pass `options.expected` to mark control-flow
26
+ * throws (e.g. `SkipScan`) that should propagate *without* painting the span red.
27
+ * - Always ends the span (`finally`), so a span can never leak.
28
+ *
29
+ * Tracing must never break runtime code: the span operations are guarded so a throw
30
+ * from the SDK — or from a caller's `expected` predicate — can neither mask `fn`'s
31
+ * error nor corrupt its result.
32
+ */
33
+ export function withSpan(name, attributes, fn, options) {
34
+ return getTracer().startActiveSpan(name, { attributes }, async (span) => {
35
+ try {
36
+ return await fn(span);
37
+ }
38
+ catch (err) {
39
+ let expected = false;
40
+ try {
41
+ expected = options?.expected?.(err) ?? false;
42
+ }
43
+ catch {
44
+ // A throwing predicate must never mask the real error; treat as unexpected.
45
+ }
46
+ if (expected)
47
+ throw err;
48
+ try {
49
+ span.recordException(err);
50
+ span.setStatus({
51
+ code: SpanStatusCode.ERROR,
52
+ message: err instanceof Error ? err.message : String(err),
53
+ });
54
+ }
55
+ catch {
56
+ // A tracing failure must never replace the real error the caller needs.
57
+ }
58
+ throw err;
59
+ }
60
+ finally {
61
+ try {
62
+ span.end();
63
+ }
64
+ catch {
65
+ // Span teardown must never break the caller's result or error.
66
+ }
67
+ }
68
+ });
69
+ }
70
+ //# sourceMappingURL=tracing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../src/telemetry/tracing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,KAAK,EACL,cAAc,GAIf,MAAM,oBAAoB,CAAC;AAE5B,iEAAiE;AACjE,MAAM,WAAW,GAAG,uBAAuB,CAAC;AAE5C,kFAAkF;AAClF,MAA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run metrics/details. */
73
73
  summary: Record<string, unknown>;
74
+ /** Telemetry-owned per-run id; join key linking scanner.run → signal.process. */
75
+ runId?: string;
74
76
  }
75
77
  //# sourceMappingURL=scanner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scanner.d.ts","sourceRoot":"","sources":["../../src/types/scanner.ts"],"names":[],"mappings":"AAEA,6EAA6E;AAC7E,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAC/B,2CAA2C;AAC3C,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAIhC,uEAAuE;AACvE,oBAAY,UAAU;IACpB,EAAE,OAAO;IACT,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,KAAK,UAAU;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,SAAS,EAAE,SAAS,CAAC;IACrB,mEAAmE;IACnE,UAAU,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;IACnC,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,mEAAmE;AACnE,MAAM,WAAW,UAAU;IACzB,qDAAqD;IACrD,OAA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E;IAChE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,mEAAmE;AACnE,MAAM,WAAW,UAAU;IACzB,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAC;IAChB,oCAAoC;IACpC,SAAS,EAAE,SAAS,CAAC;IACrB,0DAA0D;IAC1D,MAAM,EAAE,UAAU,CAAC;IACnB,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,oDAAoD;IACpD,eAAe,EAAE,MAAM,CAAC;IACxB,sCAAsC;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,iFAAiF;IACjF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@senpi/runtime",
3
- "version": "3.0.6-dev.runtime-phase-2.20260630134145",
3
+ "version": "3.0.6-dev.runtime-phase-2.20260630134307",
4
4
  "description": "Senpi runtime plugin for OpenClaw",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -34,6 +34,7 @@
34
34
  "@anthropic-ai/sdk": "^0.39.0",
35
35
  "@hyperdx/node-opentelemetry": "^0.11.0",
36
36
  "@modelcontextprotocol/sdk": "^1.0.0",
37
+ "@opentelemetry/api": "^1.9.1",
37
38
  "@opentelemetry/instrumentation-undici": "^0.28.0",
38
39
  "@sinclair/typebox": "^0.34.0",
39
40
  "async-retry": "^1.3.3",
@@ -49,6 +50,8 @@
49
50
  "openclaw": ">=2026.5.0"
50
51
  },
51
52
  "devDependencies": {
53
+ "@opentelemetry/context-async-hooks": "^2.8.0",
54
+ "@opentelemetry/sdk-trace-base": "^2.8.0",
52
55
  "@types/async-retry": "^1.4.9",
53
56
  "@types/node": "^22.0.0",
54
57
  "tsx": "^4.21.0",