dsh-observe 0.1.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.
Files changed (92) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/LICENSE +201 -0
  3. package/README.es.md +198 -0
  4. package/README.hi.md +198 -0
  5. package/README.md +198 -0
  6. package/README.pt.md +198 -0
  7. package/README.zh.md +198 -0
  8. package/THIRD_PARTY_NOTICES.md +21 -0
  9. package/cordis.patch.yml +86 -0
  10. package/lib/index.js +1947 -0
  11. package/lib/typert.host.js +109 -0
  12. package/lib/types/backoff.d.ts +17 -0
  13. package/lib/types/backoff.d.ts.map +1 -0
  14. package/lib/types/backoff.js +17 -0
  15. package/lib/types/backoff.js.map +1 -0
  16. package/lib/types/collector.d.ts +83 -0
  17. package/lib/types/collector.d.ts.map +1 -0
  18. package/lib/types/collector.js +506 -0
  19. package/lib/types/collector.js.map +1 -0
  20. package/lib/types/config.d.ts +286 -0
  21. package/lib/types/config.d.ts.map +1 -0
  22. package/lib/types/config.js +312 -0
  23. package/lib/types/config.js.map +1 -0
  24. package/lib/types/ids.d.ts +43 -0
  25. package/lib/types/ids.d.ts.map +1 -0
  26. package/lib/types/ids.js +63 -0
  27. package/lib/types/ids.js.map +1 -0
  28. package/lib/types/index.d.ts +35 -0
  29. package/lib/types/index.d.ts.map +1 -0
  30. package/lib/types/index.js +162 -0
  31. package/lib/types/index.js.map +1 -0
  32. package/lib/types/model.d.ts +89 -0
  33. package/lib/types/model.d.ts.map +1 -0
  34. package/lib/types/model.js +25 -0
  35. package/lib/types/model.js.map +1 -0
  36. package/lib/types/pipeline.d.ts +71 -0
  37. package/lib/types/pipeline.d.ts.map +1 -0
  38. package/lib/types/pipeline.js +193 -0
  39. package/lib/types/pipeline.js.map +1 -0
  40. package/lib/types/pricing.d.ts +34 -0
  41. package/lib/types/pricing.d.ts.map +1 -0
  42. package/lib/types/pricing.js +45 -0
  43. package/lib/types/pricing.js.map +1 -0
  44. package/lib/types/project.d.ts +26 -0
  45. package/lib/types/project.d.ts.map +1 -0
  46. package/lib/types/project.js +52 -0
  47. package/lib/types/project.js.map +1 -0
  48. package/lib/types/remote.d.ts +28 -0
  49. package/lib/types/remote.d.ts.map +1 -0
  50. package/lib/types/remote.js +45 -0
  51. package/lib/types/remote.js.map +1 -0
  52. package/lib/types/sanitize.d.ts +78 -0
  53. package/lib/types/sanitize.d.ts.map +1 -0
  54. package/lib/types/sanitize.js +132 -0
  55. package/lib/types/sanitize.js.map +1 -0
  56. package/lib/types/sinks.d.ts +84 -0
  57. package/lib/types/sinks.d.ts.map +1 -0
  58. package/lib/types/sinks.js +434 -0
  59. package/lib/types/sinks.js.map +1 -0
  60. package/lib/types/spool.d.ts +113 -0
  61. package/lib/types/spool.d.ts.map +1 -0
  62. package/lib/types/spool.js +167 -0
  63. package/lib/types/spool.js.map +1 -0
  64. package/lib/types/typert.host.d.ts +93 -0
  65. package/lib/types/typert.host.d.ts.map +1 -0
  66. package/lib/types/typert.host.js +23 -0
  67. package/lib/types/typert.host.js.map +1 -0
  68. package/lib/types/version.d.ts +10 -0
  69. package/lib/types/version.d.ts.map +1 -0
  70. package/lib/types/version.js +10 -0
  71. package/lib/types/version.js.map +1 -0
  72. package/lib/types/wire.d.ts +206 -0
  73. package/lib/types/wire.d.ts.map +1 -0
  74. package/lib/types/wire.js +71 -0
  75. package/lib/types/wire.js.map +1 -0
  76. package/package.json +147 -0
  77. package/src/backoff.ts +20 -0
  78. package/src/collector.ts +561 -0
  79. package/src/config.ts +604 -0
  80. package/src/ids.ts +68 -0
  81. package/src/index.ts +186 -0
  82. package/src/model.ts +100 -0
  83. package/src/pipeline.ts +205 -0
  84. package/src/pricing.ts +55 -0
  85. package/src/project.ts +55 -0
  86. package/src/remote.ts +56 -0
  87. package/src/sanitize.ts +132 -0
  88. package/src/sinks.ts +471 -0
  89. package/src/spool.ts +196 -0
  90. package/src/typert.host.ts +24 -0
  91. package/src/version.ts +10 -0
  92. package/src/wire.ts +97 -0
@@ -0,0 +1,86 @@
1
+ # dsh-observe bundle patch: mount the observability exporter.
2
+ #
3
+ # Every key below is a Config field (Schemastery schema); invalid values fail
4
+ # the profile load loudly. See README.md "Configuration" for the full table.
5
+ # Off by default: `enabled: true` PLUS at least one backend is an explicit
6
+ # opt-in — exporting observability data never happens implicitly.
7
+ - insert:
8
+ - id: dsh-observe
9
+ name: dsh-observe
10
+ config:
11
+ # Master switch. Off by default: nothing is captured or exported.
12
+ enabled: false
13
+ # OpenTelemetry OTLP/HTTP backend; null/omitted disables it.
14
+ # endpoint must be the OTLP base URL — /v1/traces and /v1/metrics
15
+ # are appended by the plugin.
16
+ otlp: null
17
+ # otlp:
18
+ # endpoint: http://localhost:4318
19
+ # serviceName: deepseek-harness
20
+ # serviceVersion: ''
21
+ # headers: {}
22
+ # timeoutMs: 10000
23
+ # Langfuse backend; null/omitted disables it. publicKey/secretKey
24
+ # are project credentials — prefer credential references or
25
+ # environment-injected profile values; never commit them.
26
+ langfuse: null
27
+ # langfuse:
28
+ # baseUrl: https://cloud.langfuse.com
29
+ # publicKey: ''
30
+ # secretKey: ''
31
+ # release: ''
32
+ # timeoutMs: 10000
33
+ # Span families to capture.
34
+ capture:
35
+ turns: true
36
+ steps: true
37
+ tools: true
38
+ llm: true
39
+ # LLM prompt/completion capture policy. `false` records only sizes
40
+ # and counts, never bodies.
41
+ llm:
42
+ prompt: true
43
+ completion: true
44
+ # Metadata capture switches. `cwd` is a local path — off by default.
45
+ metadata:
46
+ sessionId: true
47
+ cwd: false
48
+ agentPreset: true
49
+ model: true
50
+ # Metric families to export.
51
+ metrics:
52
+ tokens: true
53
+ cost: true
54
+ contextTokens: true
55
+ # Pricing table for the cost metric (USD per token, first match
56
+ # wins). Empty by default: no prices are hardcoded in the plugin.
57
+ pricing: []
58
+ # Pre-send sanitization policy. Key-name redaction always includes
59
+ # key/token/secret/password/authorization/credential/apiKey;
60
+ # redactPatterns are additional regular expressions.
61
+ sanitize:
62
+ enabled: true
63
+ redactKeys: []
64
+ redactPatterns: []
65
+ truncatePromptChars: 4000
66
+ truncateCompletionChars: 4000
67
+ truncateToolInputChars: 2000
68
+ truncateToolOutputChars: 2000
69
+ truncateAttributeChars: 512
70
+ # Shared batching policy (in-memory queue + durable offline buffer).
71
+ batch:
72
+ maxRecords: 256
73
+ flushIntervalMs: 5000
74
+ maxQueueRecords: 2000
75
+ maxBufferRecords: 10000
76
+ bufferRetryIntervalMs: 30000
77
+ # Shared retry/backoff policy for network exports.
78
+ retry:
79
+ maxAttempts: 5
80
+ baseDelayMs: 1000
81
+ factor: 2
82
+ maxDelayMs: 60000
83
+ # Optional Typert remote surface (observe/status, observe/setEnabled)
84
+ # for settings pages — setEnabled is the runtime kill switch.
85
+ remote:
86
+ enabled: false