canon-signal 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.
- package/CHANGELOG.md +31 -0
- package/LICENSE +21 -0
- package/README.md +1024 -0
- package/bin/canon-signal.js +155 -0
- package/dist/auto.cjs +1305 -0
- package/dist/auto.cjs.map +1 -0
- package/dist/auto.d.cts +15 -0
- package/dist/auto.d.ts +15 -0
- package/dist/auto.js +1288 -0
- package/dist/auto.js.map +1 -0
- package/dist/bridges/pino.cjs +110 -0
- package/dist/bridges/pino.cjs.map +1 -0
- package/dist/bridges/pino.js +85 -0
- package/dist/bridges/pino.js.map +1 -0
- package/dist/bridges/winston.cjs +114 -0
- package/dist/bridges/winston.cjs.map +1 -0
- package/dist/bridges/winston.js +96 -0
- package/dist/bridges/winston.js.map +1 -0
- package/dist/cli/create.cjs +99 -0
- package/dist/cli/create.cjs.map +1 -0
- package/dist/cli/create.d.cts +26 -0
- package/dist/cli/create.d.ts +26 -0
- package/dist/cli/create.js +74 -0
- package/dist/cli/create.js.map +1 -0
- package/dist/cli/install-docs.cjs +154 -0
- package/dist/cli/install-docs.cjs.map +1 -0
- package/dist/cli/install-docs.d.cts +37 -0
- package/dist/cli/install-docs.d.ts +37 -0
- package/dist/cli/install-docs.js +135 -0
- package/dist/cli/install-docs.js.map +1 -0
- package/dist/cli/report-issue.cjs +186 -0
- package/dist/cli/report-issue.cjs.map +1 -0
- package/dist/cli/report-issue.d.cts +58 -0
- package/dist/cli/report-issue.d.ts +58 -0
- package/dist/cli/report-issue.js +167 -0
- package/dist/cli/report-issue.js.map +1 -0
- package/dist/cli/tutorial.cjs +85 -0
- package/dist/cli/tutorial.cjs.map +1 -0
- package/dist/cli/tutorial.d.cts +27 -0
- package/dist/cli/tutorial.d.ts +27 -0
- package/dist/cli/tutorial.js +59 -0
- package/dist/cli/tutorial.js.map +1 -0
- package/dist/index.cjs +1284 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +58 -0
- package/dist/index.d.ts +58 -0
- package/dist/index.js +1260 -0
- package/dist/index.js.map +1 -0
- package/dist/inspect/cli.cjs +147 -0
- package/dist/inspect/cli.cjs.map +1 -0
- package/dist/inspect/cli.d.cts +27 -0
- package/dist/inspect/cli.d.ts +27 -0
- package/dist/inspect/cli.js +122 -0
- package/dist/inspect/cli.js.map +1 -0
- package/dist/signal-D3f8sTUh.d.cts +466 -0
- package/dist/signal-D3f8sTUh.d.ts +466 -0
- package/dist/testing/index.cjs +227 -0
- package/dist/testing/index.cjs.map +1 -0
- package/dist/testing/index.js +196 -0
- package/dist/testing/index.js.map +1 -0
- package/package.json +143 -0
- package/resources/ANTI_PATTERNS.md +614 -0
- package/resources/API.md +713 -0
- package/resources/CONSTITUTION.md +903 -0
- package/resources/PATTERNS.md +559 -0
- package/resources/PLAYBOOK.md +385 -0
- package/resources/README.md +53 -0
- package/resources/TROUBLESHOOTING.md +405 -0
- package/resources/tutorial/canon-signal-tutorial.html +962 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to canon-signal will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Initial release of canon-signal — opinionated OpenTelemetry toolkit for Node.js/TypeScript
|
|
13
|
+
- `createSignal<T>()` factory with closure-based state, fully typed against the user's `AppAttributes` interface
|
|
14
|
+
- Full `signal.*` API: `attr`, `attrs`, `getAttr`, `traceId`, `span`, `trace`, `link`, `event`, `error`, `keep`, `log`, `systemLog`, `meter`, `schema`, `shutdown`
|
|
15
|
+
- Framework middleware for Hono, Express, Fastify, and Next.js
|
|
16
|
+
- Auto-instrumentation via `@opentelemetry/auto-instrumentations-node` (37 instrumentations)
|
|
17
|
+
- Custom tail-sampling SpanProcessor with deterministic hashing
|
|
18
|
+
- DB summary SpanProcessor that auto-computes `app.db.total_duration_ms` and `app.db.query_count`
|
|
19
|
+
- Pretty-console exporter for dev waterfall rendering
|
|
20
|
+
- File, console, OTLP, and ring-buffer exporters
|
|
21
|
+
- Logger bridges for Pino and Winston
|
|
22
|
+
- Test harness with typed assertions
|
|
23
|
+
- CLI: `create`, `install-docs`, `tutorial`, `inspect`, `report-issue`
|
|
24
|
+
- Single-file HTML tutorial at `resources/tutorial/canon-signal-tutorial.html`
|
|
25
|
+
- Agent documentation suite at `resources/` (CONSTITUTION, PLAYBOOK, API, PATTERNS, ANTI_PATTERNS, TROUBLESHOOTING)
|
|
26
|
+
- Telemetry constitution documenting trace-first observability principles
|
|
27
|
+
- Environment variable overrides: `OTEL_SERVICE_NAME`, `OTEL_RESOURCE_ATTRIBUTES`, `OTEL_EXPORTER_OTLP_ENDPOINT`, `OTEL_EXPORTER_OTLP_HEADERS`, `CANON_SIGNAL_SAMPLE_RATE`, `CANON_SIGNAL_DEBUG`
|
|
28
|
+
- Discriminated union for `ExporterConfig` so the type system enforces required fields per exporter kind
|
|
29
|
+
- 64 unit tests covering the full public API
|
|
30
|
+
|
|
31
|
+
[Unreleased]: https://github.com/derekurban/canon-signal/compare/v0.1.0...HEAD
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 canon-signal contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|