@vibesdotdev/logging 0.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 +80 -0
- package/SPEC.md +65 -0
- package/dist/audit/audit.descriptor.d.ts +11 -0
- package/dist/audit/audit.descriptor.d.ts.map +1 -0
- package/dist/audit/audit.descriptor.js +40 -0
- package/dist/audit/audit.descriptor.js.map +1 -0
- package/dist/audit/audit.storage.schema.d.ts +79 -0
- package/dist/audit/audit.storage.schema.d.ts.map +1 -0
- package/dist/audit/audit.storage.schema.js +33 -0
- package/dist/audit/audit.storage.schema.js.map +1 -0
- package/dist/audit/index.d.ts +2 -0
- package/dist/audit/index.d.ts.map +1 -0
- package/dist/audit/index.js +2 -0
- package/dist/audit/index.js.map +1 -0
- package/dist/cli/logs.descriptor.d.ts +9 -0
- package/dist/cli/logs.descriptor.d.ts.map +1 -0
- package/dist/cli/logs.descriptor.js +16 -0
- package/dist/cli/logs.descriptor.js.map +1 -0
- package/dist/cli/logs.list.descriptor.d.ts +9 -0
- package/dist/cli/logs.list.descriptor.d.ts.map +1 -0
- package/dist/cli/logs.list.descriptor.js +23 -0
- package/dist/cli/logs.list.descriptor.js.map +1 -0
- package/dist/cli/logs.list.impl.d.ts +13 -0
- package/dist/cli/logs.list.impl.d.ts.map +1 -0
- package/dist/cli/logs.list.impl.js +81 -0
- package/dist/cli/logs.list.impl.js.map +1 -0
- package/dist/cli/logs.rotate.descriptor.d.ts +9 -0
- package/dist/cli/logs.rotate.descriptor.d.ts.map +1 -0
- package/dist/cli/logs.rotate.descriptor.js +34 -0
- package/dist/cli/logs.rotate.descriptor.js.map +1 -0
- package/dist/cli/logs.rotate.impl.d.ts +17 -0
- package/dist/cli/logs.rotate.impl.d.ts.map +1 -0
- package/dist/cli/logs.rotate.impl.js +48 -0
- package/dist/cli/logs.rotate.impl.js.map +1 -0
- package/dist/cli/logs.search.descriptor.d.ts +9 -0
- package/dist/cli/logs.search.descriptor.d.ts.map +1 -0
- package/dist/cli/logs.search.descriptor.js +55 -0
- package/dist/cli/logs.search.descriptor.js.map +1 -0
- package/dist/cli/logs.search.impl.d.ts +22 -0
- package/dist/cli/logs.search.impl.d.ts.map +1 -0
- package/dist/cli/logs.search.impl.js +145 -0
- package/dist/cli/logs.search.impl.js.map +1 -0
- package/dist/cli/logs.tail.descriptor.d.ts +9 -0
- package/dist/cli/logs.tail.descriptor.d.ts.map +1 -0
- package/dist/cli/logs.tail.descriptor.js +43 -0
- package/dist/cli/logs.tail.descriptor.js.map +1 -0
- package/dist/cli/logs.tail.impl.d.ts +19 -0
- package/dist/cli/logs.tail.impl.d.ts.map +1 -0
- package/dist/cli/logs.tail.impl.js +78 -0
- package/dist/cli/logs.tail.impl.js.map +1 -0
- package/dist/cli/logs.view.descriptor.d.ts +9 -0
- package/dist/cli/logs.view.descriptor.d.ts.map +1 -0
- package/dist/cli/logs.view.descriptor.js +51 -0
- package/dist/cli/logs.view.descriptor.js.map +1 -0
- package/dist/cli/logs.view.impl.d.ts +21 -0
- package/dist/cli/logs.view.impl.d.ts.map +1 -0
- package/dist/cli/logs.view.impl.js +85 -0
- package/dist/cli/logs.view.impl.js.map +1 -0
- package/dist/cli/types.d.ts +57 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +9 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/contexts/audit.d.ts +34 -0
- package/dist/contexts/audit.d.ts.map +1 -0
- package/dist/contexts/audit.js +13 -0
- package/dist/contexts/audit.js.map +1 -0
- package/dist/contexts/fallback-logger.d.ts +3 -0
- package/dist/contexts/fallback-logger.d.ts.map +1 -0
- package/dist/contexts/fallback-logger.js +67 -0
- package/dist/contexts/fallback-logger.js.map +1 -0
- package/dist/contexts/index.d.ts +8 -0
- package/dist/contexts/index.d.ts.map +1 -0
- package/dist/contexts/index.js +9 -0
- package/dist/contexts/index.js.map +1 -0
- package/dist/contexts/logger.d.ts +26 -0
- package/dist/contexts/logger.d.ts.map +1 -0
- package/dist/contexts/logger.js +88 -0
- package/dist/contexts/logger.js.map +1 -0
- package/dist/core/index.d.ts +9 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +10 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/logger.d.ts +3 -0
- package/dist/core/logger.d.ts.map +1 -0
- package/dist/core/logger.js +118 -0
- package/dist/core/logger.js.map +1 -0
- package/dist/core/namespace.d.ts +69 -0
- package/dist/core/namespace.d.ts.map +1 -0
- package/dist/core/namespace.js +136 -0
- package/dist/core/namespace.js.map +1 -0
- package/dist/core/parsing.d.ts +3 -0
- package/dist/core/parsing.d.ts.map +1 -0
- package/dist/core/parsing.js +25 -0
- package/dist/core/parsing.js.map +1 -0
- package/dist/core/types.d.ts +69 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +7 -0
- package/dist/core/types.js.map +1 -0
- package/dist/docs/levels.docs.descriptor.d.ts +4 -0
- package/dist/docs/levels.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/levels.docs.descriptor.js +342 -0
- package/dist/docs/levels.docs.descriptor.js.map +1 -0
- package/dist/docs/structured.docs.descriptor.d.ts +4 -0
- package/dist/docs/structured.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/structured.docs.descriptor.js +442 -0
- package/dist/docs/structured.docs.descriptor.js.map +1 -0
- package/dist/docs/transports.docs.descriptor.d.ts +4 -0
- package/dist/docs/transports.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/transports.docs.descriptor.js +426 -0
- package/dist/docs/transports.docs.descriptor.js.map +1 -0
- package/dist/formatters/index.d.ts +7 -0
- package/dist/formatters/index.d.ts.map +1 -0
- package/dist/formatters/index.js +8 -0
- package/dist/formatters/index.js.map +1 -0
- package/dist/formatters/json/json.formatters.descriptor.d.ts +9 -0
- package/dist/formatters/json/json.formatters.descriptor.d.ts.map +1 -0
- package/dist/formatters/json/json.formatters.descriptor.js +22 -0
- package/dist/formatters/json/json.formatters.descriptor.js.map +1 -0
- package/dist/formatters/json/json.impl.d.ts +22 -0
- package/dist/formatters/json/json.impl.d.ts.map +1 -0
- package/dist/formatters/json/json.impl.js +32 -0
- package/dist/formatters/json/json.impl.js.map +1 -0
- package/dist/formatters/json5/json5.descriptor.d.ts +9 -0
- package/dist/formatters/json5/json5.descriptor.d.ts.map +1 -0
- package/dist/formatters/json5/json5.descriptor.js +22 -0
- package/dist/formatters/json5/json5.descriptor.js.map +1 -0
- package/dist/formatters/json5/json5.impl.d.ts +23 -0
- package/dist/formatters/json5/json5.impl.d.ts.map +1 -0
- package/dist/formatters/json5/json5.impl.js +34 -0
- package/dist/formatters/json5/json5.impl.js.map +1 -0
- package/dist/formatters/jsonl/jsonl.descriptor.d.ts +10 -0
- package/dist/formatters/jsonl/jsonl.descriptor.d.ts.map +1 -0
- package/dist/formatters/jsonl/jsonl.descriptor.js +23 -0
- package/dist/formatters/jsonl/jsonl.descriptor.js.map +1 -0
- package/dist/formatters/jsonl/jsonl.impl.d.ts +21 -0
- package/dist/formatters/jsonl/jsonl.impl.d.ts.map +1 -0
- package/dist/formatters/jsonl/jsonl.impl.js +30 -0
- package/dist/formatters/jsonl/jsonl.impl.js.map +1 -0
- package/dist/formatters/pretty/pretty.descriptor.d.ts +9 -0
- package/dist/formatters/pretty/pretty.descriptor.d.ts.map +1 -0
- package/dist/formatters/pretty/pretty.descriptor.js +23 -0
- package/dist/formatters/pretty/pretty.descriptor.js.map +1 -0
- package/dist/formatters/pretty/pretty.impl.cli.d.ts +23 -0
- package/dist/formatters/pretty/pretty.impl.cli.d.ts.map +1 -0
- package/dist/formatters/pretty/pretty.impl.cli.js +81 -0
- package/dist/formatters/pretty/pretty.impl.cli.js.map +1 -0
- package/dist/index.d.ts +67 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +97 -0
- package/dist/index.js.map +1 -0
- package/dist/kinds/audit.d.ts +85 -0
- package/dist/kinds/audit.d.ts.map +1 -0
- package/dist/kinds/audit.js +71 -0
- package/dist/kinds/audit.js.map +1 -0
- package/dist/kinds/contexts.d.ts +21 -0
- package/dist/kinds/contexts.d.ts.map +1 -0
- package/dist/kinds/contexts.js +8 -0
- package/dist/kinds/contexts.js.map +1 -0
- package/dist/kinds/formatter.d.ts +42 -0
- package/dist/kinds/formatter.d.ts.map +1 -0
- package/dist/kinds/formatter.js +69 -0
- package/dist/kinds/formatter.js.map +1 -0
- package/dist/kinds/index.d.ts +13 -0
- package/dist/kinds/index.d.ts.map +1 -0
- package/dist/kinds/index.js +13 -0
- package/dist/kinds/index.js.map +1 -0
- package/dist/kinds/logger.contracts.d.ts +16 -0
- package/dist/kinds/logger.contracts.d.ts.map +1 -0
- package/dist/kinds/logger.contracts.js +9 -0
- package/dist/kinds/logger.contracts.js.map +1 -0
- package/dist/kinds/logger.d.ts +15 -0
- package/dist/kinds/logger.d.ts.map +1 -0
- package/dist/kinds/logger.impl.d.ts +40 -0
- package/dist/kinds/logger.impl.d.ts.map +1 -0
- package/dist/kinds/logger.impl.js +139 -0
- package/dist/kinds/logger.impl.js.map +1 -0
- package/dist/kinds/logger.js +28 -0
- package/dist/kinds/logger.js.map +1 -0
- package/dist/kinds/logger.utils.d.ts +15 -0
- package/dist/kinds/logger.utils.d.ts.map +1 -0
- package/dist/kinds/logger.utils.js +55 -0
- package/dist/kinds/logger.utils.js.map +1 -0
- package/dist/kinds/output.contracts.d.ts +50 -0
- package/dist/kinds/output.contracts.d.ts.map +1 -0
- package/dist/kinds/output.contracts.js +10 -0
- package/dist/kinds/output.contracts.js.map +1 -0
- package/dist/kinds/output.d.ts +20 -0
- package/dist/kinds/output.d.ts.map +1 -0
- package/dist/kinds/output.impl.d.ts +22 -0
- package/dist/kinds/output.impl.d.ts.map +1 -0
- package/dist/kinds/output.impl.js +84 -0
- package/dist/kinds/output.impl.js.map +1 -0
- package/dist/kinds/output.js +29 -0
- package/dist/kinds/output.js.map +1 -0
- package/dist/kinds/output.types.d.ts +92 -0
- package/dist/kinds/output.types.d.ts.map +1 -0
- package/dist/kinds/output.types.js +7 -0
- package/dist/kinds/output.types.js.map +1 -0
- package/dist/kinds/sink.d.ts +40 -0
- package/dist/kinds/sink.d.ts.map +1 -0
- package/dist/kinds/sink.js +61 -0
- package/dist/kinds/sink.js.map +1 -0
- package/dist/logger.context.descriptor.d.ts +21 -0
- package/dist/logger.context.descriptor.d.ts.map +1 -0
- package/dist/logger.context.descriptor.js +12 -0
- package/dist/logger.context.descriptor.js.map +1 -0
- package/dist/logging.cli.plugin.d.ts +20 -0
- package/dist/logging.cli.plugin.d.ts.map +1 -0
- package/dist/logging.cli.plugin.js +39 -0
- package/dist/logging.cli.plugin.js.map +1 -0
- package/dist/logging.plugin.d.ts +16 -0
- package/dist/logging.plugin.d.ts.map +1 -0
- package/dist/logging.plugin.js +83 -0
- package/dist/logging.plugin.js.map +1 -0
- package/dist/outputs/index.d.ts +7 -0
- package/dist/outputs/index.d.ts.map +1 -0
- package/dist/outputs/index.js +8 -0
- package/dist/outputs/index.js.map +1 -0
- package/dist/outputs/remote/remote.descriptor.d.ts +10 -0
- package/dist/outputs/remote/remote.descriptor.d.ts.map +1 -0
- package/dist/outputs/remote/remote.descriptor.js +24 -0
- package/dist/outputs/remote/remote.descriptor.js.map +1 -0
- package/dist/outputs/remote/remote.impl.d.ts +50 -0
- package/dist/outputs/remote/remote.impl.d.ts.map +1 -0
- package/dist/outputs/remote/remote.impl.js +178 -0
- package/dist/outputs/remote/remote.impl.js.map +1 -0
- package/dist/outputs.context.descriptor.d.ts +19 -0
- package/dist/outputs.context.descriptor.d.ts.map +1 -0
- package/dist/outputs.context.descriptor.js +9 -0
- package/dist/outputs.context.descriptor.js.map +1 -0
- package/dist/outputs.context.impl.d.ts +9 -0
- package/dist/outputs.context.impl.d.ts.map +1 -0
- package/dist/outputs.context.impl.js +18 -0
- package/dist/outputs.context.impl.js.map +1 -0
- package/dist/paths.d.ts +8 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +10 -0
- package/dist/paths.js.map +1 -0
- package/dist/schemas/audit.d.ts +133 -0
- package/dist/schemas/audit.d.ts.map +1 -0
- package/dist/schemas/audit.js +80 -0
- package/dist/schemas/audit.js.map +1 -0
- package/dist/schemas/entry.d.ts +74 -0
- package/dist/schemas/entry.d.ts.map +1 -0
- package/dist/schemas/entry.js +62 -0
- package/dist/schemas/entry.js.map +1 -0
- package/dist/schemas/formatter.d.ts +46 -0
- package/dist/schemas/formatter.d.ts.map +1 -0
- package/dist/schemas/formatter.js +31 -0
- package/dist/schemas/formatter.js.map +1 -0
- package/dist/schemas/index.d.ts +12 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +18 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/logger.d.ts +48 -0
- package/dist/schemas/logger.d.ts.map +1 -0
- package/dist/schemas/logger.js +27 -0
- package/dist/schemas/logger.js.map +1 -0
- package/dist/schemas/output.d.ts +68 -0
- package/dist/schemas/output.d.ts.map +1 -0
- package/dist/schemas/output.js +48 -0
- package/dist/schemas/output.js.map +1 -0
- package/dist/schemas/sink.d.ts +52 -0
- package/dist/schemas/sink.d.ts.map +1 -0
- package/dist/schemas/sink.js +30 -0
- package/dist/schemas/sink.js.map +1 -0
- package/dist/sinks/buffer/buffer.descriptor.d.ts +4 -0
- package/dist/sinks/buffer/buffer.descriptor.d.ts.map +1 -0
- package/dist/sinks/buffer/buffer.descriptor.js +11 -0
- package/dist/sinks/buffer/buffer.descriptor.js.map +1 -0
- package/dist/sinks/buffer/buffer.impl.cli.d.ts +21 -0
- package/dist/sinks/buffer/buffer.impl.cli.d.ts.map +1 -0
- package/dist/sinks/buffer/buffer.impl.cli.js +34 -0
- package/dist/sinks/buffer/buffer.impl.cli.js.map +1 -0
- package/dist/sinks/console/console.descriptor.d.ts +10 -0
- package/dist/sinks/console/console.descriptor.d.ts.map +1 -0
- package/dist/sinks/console/console.descriptor.js +17 -0
- package/dist/sinks/console/console.descriptor.js.map +1 -0
- package/dist/sinks/console/console.impl.browser.d.ts +21 -0
- package/dist/sinks/console/console.impl.browser.d.ts.map +1 -0
- package/dist/sinks/console/console.impl.browser.js +57 -0
- package/dist/sinks/console/console.impl.browser.js.map +1 -0
- package/dist/sinks/console/console.impl.cli.d.ts +21 -0
- package/dist/sinks/console/console.impl.cli.d.ts.map +1 -0
- package/dist/sinks/console/console.impl.cli.js +57 -0
- package/dist/sinks/console/console.impl.cli.js.map +1 -0
- package/dist/sinks/index.d.ts +8 -0
- package/dist/sinks/index.d.ts.map +1 -0
- package/dist/sinks/index.js +8 -0
- package/dist/sinks/index.js.map +1 -0
- package/dist/sinks/memory/memory.descriptor.d.ts +10 -0
- package/dist/sinks/memory/memory.descriptor.d.ts.map +1 -0
- package/dist/sinks/memory/memory.descriptor.js +17 -0
- package/dist/sinks/memory/memory.descriptor.js.map +1 -0
- package/dist/sinks/memory/memory.impl.d.ts +50 -0
- package/dist/sinks/memory/memory.impl.d.ts.map +1 -0
- package/dist/sinks/memory/memory.impl.js +88 -0
- package/dist/sinks/memory/memory.impl.js.map +1 -0
- package/dist/sinks/stdout/stdout.descriptor.d.ts +4 -0
- package/dist/sinks/stdout/stdout.descriptor.d.ts.map +1 -0
- package/dist/sinks/stdout/stdout.descriptor.js +11 -0
- package/dist/sinks/stdout/stdout.descriptor.js.map +1 -0
- package/dist/sinks/stdout/stdout.impl.cli.d.ts +10 -0
- package/dist/sinks/stdout/stdout.impl.cli.d.ts.map +1 -0
- package/dist/sinks/stdout/stdout.impl.cli.js +21 -0
- package/dist/sinks/stdout/stdout.impl.cli.js.map +1 -0
- package/dist/sinks.context.descriptor.d.ts +19 -0
- package/dist/sinks.context.descriptor.d.ts.map +1 -0
- package/dist/sinks.context.descriptor.js +9 -0
- package/dist/sinks.context.descriptor.js.map +1 -0
- package/dist/sinks.context.impl.d.ts +9 -0
- package/dist/sinks.context.impl.d.ts.map +1 -0
- package/dist/sinks.context.impl.js +18 -0
- package/dist/sinks.context.impl.js.map +1 -0
- package/package.json +331 -0
- package/src/audit/audit.descriptor.ts +45 -0
- package/src/audit/audit.storage.schema.ts +57 -0
- package/src/audit/index.ts +8 -0
- package/src/cli/logs.descriptor.ts +19 -0
- package/src/cli/logs.list.descriptor.ts +28 -0
- package/src/cli/logs.list.impl.ts +93 -0
- package/src/cli/logs.rotate.descriptor.ts +40 -0
- package/src/cli/logs.rotate.impl.ts +61 -0
- package/src/cli/logs.search.descriptor.ts +61 -0
- package/src/cli/logs.search.impl.ts +173 -0
- package/src/cli/logs.tail.descriptor.ts +49 -0
- package/src/cli/logs.tail.impl.ts +105 -0
- package/src/cli/logs.view.descriptor.ts +57 -0
- package/src/cli/logs.view.impl.ts +108 -0
- package/src/cli/types.ts +59 -0
- package/src/contexts/audit.ts +36 -0
- package/src/contexts/fallback-logger.ts +80 -0
- package/src/contexts/index.ts +23 -0
- package/src/contexts/logger.ts +119 -0
- package/src/core/index.ts +32 -0
- package/src/core/logger.ts +150 -0
- package/src/core/namespace.ts +195 -0
- package/src/core/parsing.ts +21 -0
- package/src/core/types.ts +82 -0
- package/src/docs/levels.docs.descriptor.ts +344 -0
- package/src/docs/structured.docs.descriptor.ts +444 -0
- package/src/docs/transports.docs.descriptor.ts +428 -0
- package/src/formatters/index.ts +6 -0
- package/src/formatters/json/json.formatters.descriptor.ts +25 -0
- package/src/formatters/json/json.impl.ts +41 -0
- package/src/formatters/json5/json5.descriptor.ts +25 -0
- package/src/formatters/json5/json5.impl.ts +43 -0
- package/src/formatters/jsonl/jsonl.descriptor.ts +26 -0
- package/src/formatters/jsonl/jsonl.impl.ts +39 -0
- package/src/formatters/pretty/pretty.descriptor.ts +26 -0
- package/src/formatters/pretty/pretty.impl.cli.ts +101 -0
- package/src/index.ts +190 -0
- package/src/kinds/audit.ts +169 -0
- package/src/kinds/contexts.ts +22 -0
- package/src/kinds/formatter.ts +117 -0
- package/src/kinds/index.ts +25 -0
- package/src/kinds/logger.contracts.ts +17 -0
- package/src/kinds/logger.impl.ts +206 -0
- package/src/kinds/logger.ts +46 -0
- package/src/kinds/logger.utils.ts +91 -0
- package/src/kinds/output.contracts.ts +54 -0
- package/src/kinds/output.impl.ts +118 -0
- package/src/kinds/output.ts +59 -0
- package/src/kinds/output.types.ts +105 -0
- package/src/kinds/sink.ts +100 -0
- package/src/logger.context.descriptor.ts +13 -0
- package/src/logging.cli.plugin.ts +43 -0
- package/src/logging.plugin.ts +93 -0
- package/src/outputs/index.ts +6 -0
- package/src/outputs/remote/remote.descriptor.ts +27 -0
- package/src/outputs/remote/remote.impl.ts +218 -0
- package/src/outputs.context.descriptor.ts +10 -0
- package/src/outputs.context.impl.ts +30 -0
- package/src/paths.ts +10 -0
- package/src/schemas/audit.ts +98 -0
- package/src/schemas/entry.ts +88 -0
- package/src/schemas/formatter.ts +37 -0
- package/src/schemas/index.ts +80 -0
- package/src/schemas/logger.ts +38 -0
- package/src/schemas/output.ts +62 -0
- package/src/schemas/sink.ts +39 -0
- package/src/sinks/buffer/buffer.descriptor.ts +13 -0
- package/src/sinks/buffer/buffer.impl.cli.ts +49 -0
- package/src/sinks/console/console.descriptor.ts +20 -0
- package/src/sinks/console/console.impl.browser.ts +69 -0
- package/src/sinks/console/console.impl.cli.ts +71 -0
- package/src/sinks/index.ts +8 -0
- package/src/sinks/memory/memory.descriptor.ts +20 -0
- package/src/sinks/memory/memory.impl.ts +119 -0
- package/src/sinks/stdout/stdout.descriptor.ts +13 -0
- package/src/sinks/stdout/stdout.impl.cli.ts +27 -0
- package/src/sinks.context.descriptor.ts +10 -0
- package/src/sinks.context.impl.ts +30 -0
package/README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# @vibesdotdev/logging
|
|
2
|
+
|
|
3
|
+
Universal logging core for vibes. Defines the runtime kinds, the core logger,
|
|
4
|
+
isomorphic sinks/formatters, and the audit kind. Environment-specific sinks
|
|
5
|
+
(file, browser, OTEL) live in sibling packages.
|
|
6
|
+
|
|
7
|
+
## Quickstart
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { getLogger, getDefaultLogger } from '@vibesdotdev/logging';
|
|
11
|
+
|
|
12
|
+
const logger = getLogger('myapp');
|
|
13
|
+
logger.info('Started', { version: '1.0.0' });
|
|
14
|
+
logger.error('Failed', { error: err.message });
|
|
15
|
+
|
|
16
|
+
const child = logger.child('database');
|
|
17
|
+
child.debug('Connected');
|
|
18
|
+
|
|
19
|
+
const contextual = logger.withRequestContext({
|
|
20
|
+
requestId: 'req-123',
|
|
21
|
+
userId: 'user-456',
|
|
22
|
+
});
|
|
23
|
+
contextual.info('Request handled');
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Audit
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import { auditLog } from '@vibesdotdev/logging/audit';
|
|
30
|
+
|
|
31
|
+
await auditLog({
|
|
32
|
+
category: 'authentication',
|
|
33
|
+
severity: 'medium',
|
|
34
|
+
action: 'login',
|
|
35
|
+
actor: { id: 'user-123', type: 'user' },
|
|
36
|
+
outcome: 'success',
|
|
37
|
+
});
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Filter via env
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
VIBES_LOG='vibes:pm:*,-vibes:pm:verbose' \
|
|
44
|
+
VIBES_LOG_LEVEL=debug \
|
|
45
|
+
bun run app
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## CLI
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
vibes logs list
|
|
52
|
+
vibes logs view <output>
|
|
53
|
+
vibes logs tail <output>
|
|
54
|
+
vibes logs search <pattern>
|
|
55
|
+
vibes logs rotate <output>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Sinks
|
|
59
|
+
|
|
60
|
+
Core ships isomorphic sinks only:
|
|
61
|
+
- `console` — colorized stderr
|
|
62
|
+
- `buffer` — in-memory startup buffer
|
|
63
|
+
- `memory` — testable in-memory store
|
|
64
|
+
- `stdout` — raw stderr (MCP-safe)
|
|
65
|
+
|
|
66
|
+
Environment-specific sinks load from sibling packages (apps choose what to load):
|
|
67
|
+
- [`@vibesdotdev/logging-fs`](../logging-fs/) — file sink, file output, stdout-capture, file-backed audit
|
|
68
|
+
- [`@vibesdotdev/logging-browser`](../logging-browser/) — browser sink
|
|
69
|
+
- [`@vibesdotdev/logging-otel`](../logging-otel/) — OpenTelemetry sink
|
|
70
|
+
|
|
71
|
+
## Test
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
bun test
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Docs
|
|
78
|
+
|
|
79
|
+
- [SPEC.md](./SPEC.md) — package contract, owned surfaces, hard rules, migration debt
|
|
80
|
+
- [runtime](../runtime/SPEC.md), [runtime-plugin](../runtime-plugin/SPEC.md)
|
package/SPEC.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# @vibesdotdev/logging
|
|
2
|
+
|
|
3
|
+
Structured logging for vibes. Universal core: kinds, schemas, core logger, isomorphic sinks/formatters/outputs, audit kind, MCP-safe defaults. Environment-specific sinks live in sibling packages and register themselves.
|
|
4
|
+
|
|
5
|
+
## Owns
|
|
6
|
+
|
|
7
|
+
- **Runtime kinds:** `logging/sink`, `logging/formatter`, `logging/output`, `logging/audit`, `logging/logger`
|
|
8
|
+
- **Context providers:** `logging/sinks`, `logging/outputs`, `cli/logger`
|
|
9
|
+
- **Core** (`./core`): `createRuntimeLogger`, `getLogger(namespace)`, `getDefaultLogger`, child loggers, `withRequestContext`, glob-based namespace settings + per-namespace level
|
|
10
|
+
- **Isomorphic sinks** (`./sinks/*`): `console`, `buffer`, `memory`, `stdout`
|
|
11
|
+
- **Formatters** (`./formatters/*`): `jsonl`, `json`, `json5`, `pretty` (pure transforms — universal)
|
|
12
|
+
- **Universal outputs** (`./outputs/*`): `remote` (HTTP via fetch)
|
|
13
|
+
- **Audit** (`./audit`): `logging/audit` kind, descriptor schema, retention-policy schema. File-backed impl extracts to [`logging-fs`](../logging-fs/).
|
|
14
|
+
- **Schemas** (`./schemas`): `LogLevelSchema`, `RuntimeLogEntry`, `SinkDescriptor`, `FormatterDescriptor`, `OutputDescriptor`, `AuditEntry`, `AuditDescriptor`, `LoggerDescriptor`
|
|
15
|
+
- **CLI** (`./cli`): `vibes logs` group + `list/view/tail/search/rotate` descriptors. Commands query the runtime; they do not import environment-specific sinks/outputs.
|
|
16
|
+
- **Paths** (`./paths`): canonical log file path resolution (string-only, no FS)
|
|
17
|
+
- **Plugins:** `./plugin` (root) and `./cli-plugin` (CLI commands) — register kinds + isomorphic sinks/formatters/outputs only
|
|
18
|
+
|
|
19
|
+
## Does not own
|
|
20
|
+
|
|
21
|
+
- **Filesystem-backed sinks/outputs/audit impl** → [`logging-fs`](../logging-fs/) — `file` sink, `file` output, `stdout-capture` sink, file-backed audit logger
|
|
22
|
+
- **Browser sink** → [`logging-browser`](../logging-browser/)
|
|
23
|
+
- **OpenTelemetry sink** → [`logging-otel`](../logging-otel/) — owns OTEL peer deps
|
|
24
|
+
- **Daemon-specific logger config** → [`runtime-plugin/logging`](../runtime-plugin/SPEC.md)
|
|
25
|
+
- **App-specific audit policies.** Apps register their own `logging/audit` descriptors with domain rules.
|
|
26
|
+
- **Logging consumers** (apps calling `getLogger`)
|
|
27
|
+
- **Durable archival** (S3, etc.) — that's an output adapter, not core
|
|
28
|
+
|
|
29
|
+
## Hard rules
|
|
30
|
+
|
|
31
|
+
- **The core package is universal.** No Node/Bun/FS/process imports in core. Anything that breaks browser or Cloudflare bundles belongs in an environment-specific package.
|
|
32
|
+
- **All logging through `getLogger(ns)` / `getDefaultLogger()`.** No raw `console.log` in features.
|
|
33
|
+
- **Stdout is reserved (MCP-safe).** Universal sinks default to stderr. The `stdout-capture` sink (in `logging-fs`) redirects rogue stdout to a file.
|
|
34
|
+
- **Sink/output/audit selection is runtime-resolved.** Apps register descriptors; the runtime composes them into `logging/sinks` and `logging/outputs` context providers.
|
|
35
|
+
- **Sink package contract:** each environment-specific package exports a plugin that registers `logging/sink`, `logging/output`, or `logging/audit` descriptors + impls. Apps load only the packages their scope can support. Core never imports them.
|
|
36
|
+
- **Namespaces are colon-separated, hierarchical.** Filter via `VIBES_LOG` (globs with `+/-`); level via `VIBES_LOG_LEVEL`.
|
|
37
|
+
- **Audit entries are immutable, append-only, retention by category.** Categories: `authentication`, `authorization`, `security`, `data_access`, `data_modification`, `configuration`, `system`.
|
|
38
|
+
|
|
39
|
+
## Public entrypoints
|
|
40
|
+
|
|
41
|
+
`.`, `./plugin`, `./cli-plugin`, `./core`, `./core/logger`, `./core/namespace`, `./kinds`, `./kinds/sink`, `./kinds/formatter`, `./kinds/output`, `./kinds/audit`, `./kinds/logger`, `./kinds/logger.impl`, `./paths`, `./contexts`, `./contexts/logger`, `./contexts/audit`, `./schemas`, `./schemas/entry`, `./schemas/sink`, `./schemas/formatter`, `./schemas/output`, `./schemas/audit`, `./schemas/logger`, `./sinks` (universal-only barrel), `./formatters`, `./outputs` (universal-only barrel), `./audit` (kind/schema only), `./cli/types`, `./cli/logs.descriptor`, `./cli/logs.list.descriptor`, `./cli/logs.list.impl`, `./cli/logs.search.descriptor`, `./cli/logs.search.impl`, `./cli/logs.tail.descriptor`, `./cli/logs.tail.impl`, `./cli/logs.rotate.descriptor`, `./cli/logs.rotate.impl`, `./cli/logs.view.descriptor`, `./cli/logs.view.impl`.
|
|
42
|
+
|
|
43
|
+
Per-adapter sub-subpaths (`./sinks/console`, `./formatters/json`, `./outputs/remote`, …) are intentionally not exposed: the canonical access pattern is descriptor registration via the plugin + `runtime.query('logging/sink' | 'logging/formatter' | 'logging/output')`. Consumers do not import the impl files directly.
|
|
44
|
+
|
|
45
|
+
## Environment
|
|
46
|
+
|
|
47
|
+
| Variable | Default | Purpose |
|
|
48
|
+
| --- | --- | --- |
|
|
49
|
+
| `VIBES_LOG` | — | Namespace selectors (`vibes:pm:*,-vibes:pm:verbose`) |
|
|
50
|
+
| `VIBES_LOG_LEVEL` | `info` | Minimum level |
|
|
51
|
+
| `VIBES_LOG_DIR` | `~/.vibes/logs` | Log directory (consumed by `logging-fs`) |
|
|
52
|
+
| `VIBES_LOG_FILE` | `app.jsonl` | File sink filename (consumed by `logging-fs`) |
|
|
53
|
+
| `OTEL_SERVICE_NAME` | `vibes` | OTEL service name (consumed by `logging-otel`) |
|
|
54
|
+
| `OTEL_EXPORTER_OTLP_LOGS_ENDPOINT` | `http://localhost:4318/v1/logs` | OTEL endpoint |
|
|
55
|
+
| `MCP_ENABLE_STDERR` | `false` | Mirror captured stdout to stderr |
|
|
56
|
+
|
|
57
|
+
## Verification
|
|
58
|
+
|
|
59
|
+
`bun test` from package root. Covers schemas, namespace globs, core logger + context providers, isomorphic sinks/formatters, `remote` output, audit retention policy. Environment-specific tests live in each extract package.
|
|
60
|
+
|
|
61
|
+
## Links
|
|
62
|
+
|
|
63
|
+
- [runtime/SPEC.md](../runtime/SPEC.md)
|
|
64
|
+
- [runtime-plugin/SPEC.md](../runtime-plugin/SPEC.md)
|
|
65
|
+
- [logging-fs](../logging-fs/), [logging-browser](../logging-browser/), [logging-otel](../logging-otel/)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default Audit Descriptor
|
|
3
|
+
*
|
|
4
|
+
* Generic audit logging configuration.
|
|
5
|
+
*/
|
|
6
|
+
import type { AuditDescriptor } from '../schemas/audit.ts';
|
|
7
|
+
export declare const defaultAuditDescriptor: AuditDescriptor;
|
|
8
|
+
export declare const authenticationAuditDescriptor: AuditDescriptor;
|
|
9
|
+
export declare const securityAuditDescriptor: AuditDescriptor;
|
|
10
|
+
export default defaultAuditDescriptor;
|
|
11
|
+
//# sourceMappingURL=audit.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.descriptor.d.ts","sourceRoot":"","sources":["../../src/audit/audit.descriptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,eAAO,MAAM,sBAAsB,EAAE,eAUpC,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,eAU3C,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,eAUrC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default Audit Descriptor
|
|
3
|
+
*
|
|
4
|
+
* Generic audit logging configuration.
|
|
5
|
+
*/
|
|
6
|
+
export const defaultAuditDescriptor = {
|
|
7
|
+
kind: 'logging/audit',
|
|
8
|
+
id: 'default',
|
|
9
|
+
name: 'Default Audit Logger',
|
|
10
|
+
description: 'Default audit logging for all categories',
|
|
11
|
+
tags: ['compliance', 'security'],
|
|
12
|
+
category: 'system',
|
|
13
|
+
severity: 'low',
|
|
14
|
+
retention: '90d',
|
|
15
|
+
immutable: true
|
|
16
|
+
};
|
|
17
|
+
export const authenticationAuditDescriptor = {
|
|
18
|
+
kind: 'logging/audit',
|
|
19
|
+
id: 'authentication',
|
|
20
|
+
name: 'Authentication Audit Logger',
|
|
21
|
+
description: 'Audit logging for authentication events',
|
|
22
|
+
tags: ['auth', 'security'],
|
|
23
|
+
category: 'authentication',
|
|
24
|
+
severity: 'medium',
|
|
25
|
+
retention: '1y',
|
|
26
|
+
immutable: true
|
|
27
|
+
};
|
|
28
|
+
export const securityAuditDescriptor = {
|
|
29
|
+
kind: 'logging/audit',
|
|
30
|
+
id: 'security',
|
|
31
|
+
name: 'Security Audit Logger',
|
|
32
|
+
description: 'Audit logging for security events',
|
|
33
|
+
tags: ['security', 'compliance'],
|
|
34
|
+
category: 'security',
|
|
35
|
+
severity: 'high',
|
|
36
|
+
retention: '2y',
|
|
37
|
+
immutable: true
|
|
38
|
+
};
|
|
39
|
+
export default defaultAuditDescriptor;
|
|
40
|
+
//# sourceMappingURL=audit.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.descriptor.js","sourceRoot":"","sources":["../../src/audit/audit.descriptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,CAAC,MAAM,sBAAsB,GAAoB;IACtD,IAAI,EAAE,eAAe;IACrB,EAAE,EAAE,SAAS;IACb,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,0CAA0C;IACvD,IAAI,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;IAChC,QAAQ,EAAE,QAAQ;IAClB,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,KAAK;IAChB,SAAS,EAAE,IAAI;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAoB;IAC7D,IAAI,EAAE,eAAe;IACrB,EAAE,EAAE,gBAAgB;IACpB,IAAI,EAAE,6BAA6B;IACnC,WAAW,EAAE,yCAAyC;IACtD,IAAI,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC;IAC1B,QAAQ,EAAE,gBAAgB;IAC1B,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAoB;IACvD,IAAI,EAAE,eAAe;IACrB,EAAE,EAAE,UAAU;IACd,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,mCAAmC;IAChD,IAAI,EAAE,CAAC,UAAU,EAAE,YAAY,CAAC;IAChC,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,MAAM;IAChB,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;CACf,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
import { AuditCategorySchema } from '../schemas/audit.ts';
|
|
3
|
+
export declare const AuditEntryStorageSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
timestamp: z.ZodString;
|
|
6
|
+
category: z.ZodEnum<{
|
|
7
|
+
system: "system";
|
|
8
|
+
authentication: "authentication";
|
|
9
|
+
authorization: "authorization";
|
|
10
|
+
data_access: "data_access";
|
|
11
|
+
data_modification: "data_modification";
|
|
12
|
+
configuration: "configuration";
|
|
13
|
+
security: "security";
|
|
14
|
+
}>;
|
|
15
|
+
severity: z.ZodEnum<{
|
|
16
|
+
low: "low";
|
|
17
|
+
medium: "medium";
|
|
18
|
+
high: "high";
|
|
19
|
+
critical: "critical";
|
|
20
|
+
}>;
|
|
21
|
+
action: z.ZodString;
|
|
22
|
+
actor: z.ZodObject<{
|
|
23
|
+
id: z.ZodString;
|
|
24
|
+
type: z.ZodEnum<{
|
|
25
|
+
user: "user";
|
|
26
|
+
system: "system";
|
|
27
|
+
service: "service";
|
|
28
|
+
}>;
|
|
29
|
+
name: z.ZodOptional<z.ZodString>;
|
|
30
|
+
ip: z.ZodOptional<z.ZodString>;
|
|
31
|
+
userAgent: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
target: z.ZodOptional<z.ZodObject<{
|
|
34
|
+
id: z.ZodString;
|
|
35
|
+
type: z.ZodString;
|
|
36
|
+
name: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$strip>>;
|
|
38
|
+
outcome: z.ZodEnum<{
|
|
39
|
+
error: "error";
|
|
40
|
+
unknown: "unknown";
|
|
41
|
+
success: "success";
|
|
42
|
+
failure: "failure";
|
|
43
|
+
}>;
|
|
44
|
+
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
45
|
+
error: z.ZodOptional<z.ZodString>;
|
|
46
|
+
pk: z.ZodOptional<z.ZodNumber>;
|
|
47
|
+
createdAt: z.ZodOptional<z.ZodDate>;
|
|
48
|
+
actorId: z.ZodString;
|
|
49
|
+
actorType: z.ZodEnum<{
|
|
50
|
+
user: "user";
|
|
51
|
+
system: "system";
|
|
52
|
+
service: "service";
|
|
53
|
+
}>;
|
|
54
|
+
targetId: z.ZodOptional<z.ZodString>;
|
|
55
|
+
targetType: z.ZodOptional<z.ZodString>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
export type AuditEntryStorage = z.infer<typeof AuditEntryStorageSchema>;
|
|
58
|
+
export interface AuditRetentionPolicy {
|
|
59
|
+
category: z.infer<typeof AuditCategorySchema>;
|
|
60
|
+
retentionDays: number;
|
|
61
|
+
archive: boolean;
|
|
62
|
+
archivePath?: string;
|
|
63
|
+
}
|
|
64
|
+
export declare const DEFAULT_RETENTION_POLICIES: AuditRetentionPolicy[];
|
|
65
|
+
export interface AuditStorageConfig {
|
|
66
|
+
adapter: 'drizzle' | 'localdb';
|
|
67
|
+
tableName: string;
|
|
68
|
+
indexes: {
|
|
69
|
+
category: boolean;
|
|
70
|
+
severity: boolean;
|
|
71
|
+
actorId: boolean;
|
|
72
|
+
targetId: boolean;
|
|
73
|
+
timestamp: boolean;
|
|
74
|
+
action: boolean;
|
|
75
|
+
};
|
|
76
|
+
retention: AuditRetentionPolicy[];
|
|
77
|
+
}
|
|
78
|
+
export declare const defaultAuditStorageConfig: AuditStorageConfig;
|
|
79
|
+
//# sourceMappingURL=audit.storage.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.storage.schema.d.ts","sourceRoot":"","sources":["../../src/audit/audit.storage.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAoB,MAAM,qBAAqB,CAAC;AAE5E,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAOlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,MAAM,WAAW,oBAAoB;IACpC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;IAC9C,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,0BAA0B,EAAE,oBAAoB,EAQ5D,CAAC;AAEF,MAAM,WAAW,kBAAkB;IAClC,OAAO,EAAE,SAAS,GAAG,SAAS,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE;QACR,QAAQ,EAAE,OAAO,CAAC;QAClB,QAAQ,EAAE,OAAO,CAAC;QAClB,OAAO,EAAE,OAAO,CAAC;QACjB,QAAQ,EAAE,OAAO,CAAC;QAClB,SAAS,EAAE,OAAO,CAAC;QACnB,MAAM,EAAE,OAAO,CAAC;KAChB,CAAC;IACF,SAAS,EAAE,oBAAoB,EAAE,CAAC;CAClC;AAED,eAAO,MAAM,yBAAyB,EAAE,kBAYvC,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
import { AuditCategorySchema, AuditEntrySchema } from "../schemas/audit.js";
|
|
3
|
+
export const AuditEntryStorageSchema = AuditEntrySchema.extend({
|
|
4
|
+
pk: z.number().int().optional(),
|
|
5
|
+
createdAt: z.date().optional(),
|
|
6
|
+
actorId: z.string(),
|
|
7
|
+
actorType: z.enum(['user', 'service', 'system']),
|
|
8
|
+
targetId: z.string().optional(),
|
|
9
|
+
targetType: z.string().optional()
|
|
10
|
+
});
|
|
11
|
+
export const DEFAULT_RETENTION_POLICIES = [
|
|
12
|
+
{ category: 'authentication', retentionDays: 365, archive: true },
|
|
13
|
+
{ category: 'authorization', retentionDays: 365, archive: true },
|
|
14
|
+
{ category: 'security', retentionDays: 730, archive: true },
|
|
15
|
+
{ category: 'data_access', retentionDays: 90, archive: false },
|
|
16
|
+
{ category: 'data_modification', retentionDays: 365, archive: true },
|
|
17
|
+
{ category: 'configuration', retentionDays: 365, archive: true },
|
|
18
|
+
{ category: 'system', retentionDays: 90, archive: false }
|
|
19
|
+
];
|
|
20
|
+
export const defaultAuditStorageConfig = {
|
|
21
|
+
adapter: 'drizzle',
|
|
22
|
+
tableName: 'audit_entries',
|
|
23
|
+
indexes: {
|
|
24
|
+
category: true,
|
|
25
|
+
severity: true,
|
|
26
|
+
actorId: true,
|
|
27
|
+
targetId: true,
|
|
28
|
+
timestamp: true,
|
|
29
|
+
action: true
|
|
30
|
+
},
|
|
31
|
+
retention: DEFAULT_RETENTION_POLICIES
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=audit.storage.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.storage.schema.js","sourceRoot":"","sources":["../../src/audit/audit.storage.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5E,MAAM,CAAC,MAAM,uBAAuB,GAAG,gBAAgB,CAAC,MAAM,CAAC;IAC9D,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAC/B,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAC9B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IAChD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC;AAUH,MAAM,CAAC,MAAM,0BAA0B,GAA2B;IACjE,EAAE,QAAQ,EAAE,gBAAgB,EAAE,aAAa,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE;IACjE,EAAE,QAAQ,EAAE,eAAe,EAAE,aAAa,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE;IAChE,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE;IAC3D,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;IAC9D,EAAE,QAAQ,EAAE,mBAAmB,EAAE,aAAa,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE;IACpE,EAAE,QAAQ,EAAE,eAAe,EAAE,aAAa,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE;IAChE,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;CACzD,CAAC;AAgBF,MAAM,CAAC,MAAM,yBAAyB,GAAuB;IAC5D,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,eAAe;IAC1B,OAAO,EAAE;QACR,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,IAAI;QACd,SAAS,EAAE,IAAI;QACf,MAAM,EAAE,IAAI;KACZ;IACD,SAAS,EAAE,0BAA0B;CACrC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/audit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,uBAAuB,EACvB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,0BAA0B,EAC1B,KAAK,kBAAkB,EACvB,yBAAyB,EACzB,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/audit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,uBAAuB,EAGvB,0BAA0B,EAE1B,yBAAyB,EACzB,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logs CLI Group Descriptor
|
|
3
|
+
*
|
|
4
|
+
* Root group for log management commands.
|
|
5
|
+
*/
|
|
6
|
+
import type { CLIGroupAssetDescriptor } from './types.ts';
|
|
7
|
+
declare const descriptor: CLIGroupAssetDescriptor;
|
|
8
|
+
export default descriptor;
|
|
9
|
+
//# sourceMappingURL=logs.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs.descriptor.d.ts","sourceRoot":"","sources":["../../src/cli/logs.descriptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAE1D,QAAA,MAAM,UAAU,EAAE,uBAQjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logs CLI Group Descriptor
|
|
3
|
+
*
|
|
4
|
+
* Root group for log management commands.
|
|
5
|
+
*/
|
|
6
|
+
const descriptor = {
|
|
7
|
+
kind: 'cli/group',
|
|
8
|
+
id: 'logs',
|
|
9
|
+
name: 'logs',
|
|
10
|
+
description: 'View and manage application logs',
|
|
11
|
+
surfaces: ['cli'],
|
|
12
|
+
hardware: ['consumer', 'cloud'],
|
|
13
|
+
enabled: true
|
|
14
|
+
};
|
|
15
|
+
export default descriptor;
|
|
16
|
+
//# sourceMappingURL=logs.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs.descriptor.js","sourceRoot":"","sources":["../../src/cli/logs.descriptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,UAAU,GAA4B;IAC3C,IAAI,EAAE,WAAW;IACjB,EAAE,EAAE,MAAM;IACV,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,kCAAkC;IAC/C,QAAQ,EAAE,CAAC,KAAK,CAAC;IACjB,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;IAC/B,OAAO,EAAE,IAAI;CACb,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logs List CLI Command Descriptor
|
|
3
|
+
*
|
|
4
|
+
* Lists all registered log outputs.
|
|
5
|
+
*/
|
|
6
|
+
import type { CLICommandAssetDescriptor } from './types.ts';
|
|
7
|
+
declare const descriptor: CLICommandAssetDescriptor;
|
|
8
|
+
export default descriptor;
|
|
9
|
+
//# sourceMappingURL=logs.list.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs.list.descriptor.d.ts","sourceRoot":"","sources":["../../src/cli/logs.list.descriptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAE5D,QAAA,MAAM,UAAU,EAAE,yBAiBjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logs List CLI Command Descriptor
|
|
3
|
+
*
|
|
4
|
+
* Lists all registered log outputs.
|
|
5
|
+
*/
|
|
6
|
+
const descriptor = {
|
|
7
|
+
kind: 'cli/command',
|
|
8
|
+
id: 'logs.list',
|
|
9
|
+
name: 'list',
|
|
10
|
+
description: 'List registered log outputs and their status',
|
|
11
|
+
group: 'logs',
|
|
12
|
+
options: [
|
|
13
|
+
{
|
|
14
|
+
flags: '--json',
|
|
15
|
+
description: 'Output as JSON'
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
surfaces: ['cli'],
|
|
19
|
+
hardware: ['consumer', 'cloud'],
|
|
20
|
+
enabled: true
|
|
21
|
+
};
|
|
22
|
+
export default descriptor;
|
|
23
|
+
//# sourceMappingURL=logs.list.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs.list.descriptor.js","sourceRoot":"","sources":["../../src/cli/logs.list.descriptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,UAAU,GAA8B;IAC7C,IAAI,EAAE,aAAa;IACnB,EAAE,EAAE,WAAW;IACf,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,8CAA8C;IAC3D,KAAK,EAAE,MAAM;IAEb,OAAO,EAAE;QACR;YACC,KAAK,EAAE,QAAQ;YACf,WAAW,EAAE,gBAAgB;SAC7B;KACD;IAED,QAAQ,EAAE,CAAC,KAAK,CAAC;IACjB,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;IAC/B,OAAO,EAAE,IAAI;CACb,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logs List CLI Command Implementation
|
|
3
|
+
*
|
|
4
|
+
* Lists all registered log outputs with their status.
|
|
5
|
+
*/
|
|
6
|
+
interface ListOptions {
|
|
7
|
+
json?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: {
|
|
10
|
+
execute(_args: Record<string, unknown>, opts: ListOptions): Promise<void>;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
13
|
+
//# sourceMappingURL=logs.list.impl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs.list.impl.d.ts","sourceRoot":"","sources":["../../src/cli/logs.list.impl.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,UAAU,WAAW;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;CACf;;mBAGqB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;;AADhF,wBA8EE"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logs List CLI Command Implementation
|
|
3
|
+
*
|
|
4
|
+
* Lists all registered log outputs with their status.
|
|
5
|
+
*/
|
|
6
|
+
import { getVibesRuntime } from '@vibesdotdev/runtime';
|
|
7
|
+
export default {
|
|
8
|
+
async execute(_args, opts) {
|
|
9
|
+
const runtime = getVibesRuntime();
|
|
10
|
+
// Get all output descriptors
|
|
11
|
+
const descriptors = runtime
|
|
12
|
+
.query('logging/output')
|
|
13
|
+
.enabled()
|
|
14
|
+
.descriptors();
|
|
15
|
+
if (descriptors.length === 0) {
|
|
16
|
+
console.log('No log outputs registered.');
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
if (opts.json) {
|
|
20
|
+
const items = await Promise.all(descriptors.map(async (d) => {
|
|
21
|
+
try {
|
|
22
|
+
const output = await runtime
|
|
23
|
+
.query('logging/output')
|
|
24
|
+
.withId(d.id)
|
|
25
|
+
.resolve();
|
|
26
|
+
const stats = await output.stats();
|
|
27
|
+
return {
|
|
28
|
+
id: d.id,
|
|
29
|
+
name: d.name,
|
|
30
|
+
storage: d.storage,
|
|
31
|
+
path: d.path,
|
|
32
|
+
format: d.format,
|
|
33
|
+
hardware: d.hardware,
|
|
34
|
+
stats
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return {
|
|
39
|
+
id: d.id,
|
|
40
|
+
name: d.name,
|
|
41
|
+
storage: d.storage,
|
|
42
|
+
path: d.path,
|
|
43
|
+
format: d.format,
|
|
44
|
+
hardware: d.hardware,
|
|
45
|
+
stats: null
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}));
|
|
49
|
+
console.log(JSON.stringify(items, null, 2));
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
console.log('\n Log Outputs\n');
|
|
53
|
+
for (const d of descriptors) {
|
|
54
|
+
let statsLine = '';
|
|
55
|
+
try {
|
|
56
|
+
const output = await runtime
|
|
57
|
+
.query('logging/output')
|
|
58
|
+
.withId(d.id)
|
|
59
|
+
.resolve();
|
|
60
|
+
const stats = await output.stats();
|
|
61
|
+
if (stats.exists) {
|
|
62
|
+
const sizeKb = (stats.size / 1024).toFixed(1);
|
|
63
|
+
const modified = stats.modifiedAt?.toLocaleString() ?? 'unknown';
|
|
64
|
+
statsLine = ` Size: ${sizeKb}KB, Modified: ${modified}`;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
statsLine = ' (no file yet)';
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
statsLine = ' (unable to get stats)';
|
|
72
|
+
}
|
|
73
|
+
console.log(` ${d.id}`);
|
|
74
|
+
console.log(` Storage: ${d.storage ?? 'file'} | Format: ${d.format ?? 'jsonl'}`);
|
|
75
|
+
console.log(` Path: ${d.path ?? 'default'}`);
|
|
76
|
+
console.log(statsLine);
|
|
77
|
+
console.log('');
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=logs.list.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs.list.impl.js","sourceRoot":"","sources":["../../src/cli/logs.list.impl.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logs Rotate CLI Command Descriptor
|
|
3
|
+
*
|
|
4
|
+
* Rotate a log output file.
|
|
5
|
+
*/
|
|
6
|
+
import type { CLICommandAssetDescriptor } from './types.ts';
|
|
7
|
+
declare const descriptor: CLICommandAssetDescriptor;
|
|
8
|
+
export default descriptor;
|
|
9
|
+
//# sourceMappingURL=logs.rotate.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs.rotate.descriptor.d.ts","sourceRoot":"","sources":["../../src/cli/logs.rotate.descriptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAE5D,QAAA,MAAM,UAAU,EAAE,yBA6BjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logs Rotate CLI Command Descriptor
|
|
3
|
+
*
|
|
4
|
+
* Rotate a log output file.
|
|
5
|
+
*/
|
|
6
|
+
const descriptor = {
|
|
7
|
+
kind: 'cli/command',
|
|
8
|
+
id: 'logs.rotate',
|
|
9
|
+
name: 'rotate',
|
|
10
|
+
description: 'Rotate a log output file',
|
|
11
|
+
group: 'logs',
|
|
12
|
+
arguments: [
|
|
13
|
+
{
|
|
14
|
+
name: 'output',
|
|
15
|
+
description: 'Output ID to rotate',
|
|
16
|
+
required: true
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
options: [
|
|
20
|
+
{
|
|
21
|
+
flags: '--all',
|
|
22
|
+
description: 'Rotate all outputs'
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
flags: '--cleanup',
|
|
26
|
+
description: 'Also run cleanup of old rotated files'
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
surfaces: ['cli'],
|
|
30
|
+
hardware: ['consumer'],
|
|
31
|
+
enabled: true
|
|
32
|
+
};
|
|
33
|
+
export default descriptor;
|
|
34
|
+
//# sourceMappingURL=logs.rotate.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs.rotate.descriptor.js","sourceRoot":"","sources":["../../src/cli/logs.rotate.descriptor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,UAAU,GAA8B;IAC7C,IAAI,EAAE,aAAa;IACnB,EAAE,EAAE,aAAa;IACjB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,0BAA0B;IACvC,KAAK,EAAE,MAAM;IAEb,SAAS,EAAE;QACV;YACC,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,qBAAqB;YAClC,QAAQ,EAAE,IAAI;SACd;KACD;IAED,OAAO,EAAE;QACR;YACC,KAAK,EAAE,OAAO;YACd,WAAW,EAAE,oBAAoB;SACjC;QACD;YACC,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,uCAAuC;SACpD;KACD;IAED,QAAQ,EAAE,CAAC,KAAK,CAAC;IACjB,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,OAAO,EAAE,IAAI;CACb,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Logs Rotate CLI Command Implementation
|
|
3
|
+
*
|
|
4
|
+
* Rotate log output files.
|
|
5
|
+
*/
|
|
6
|
+
interface RotateArgs {
|
|
7
|
+
output?: string;
|
|
8
|
+
}
|
|
9
|
+
interface RotateOptions {
|
|
10
|
+
all?: boolean;
|
|
11
|
+
cleanup?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const _default: {
|
|
14
|
+
execute(args: RotateArgs, opts: RotateOptions): Promise<void>;
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|
|
17
|
+
//# sourceMappingURL=logs.rotate.impl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs.rotate.impl.d.ts","sourceRoot":"","sources":["../../src/cli/logs.rotate.impl.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,UAAU,UAAU;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,aAAa;IACtB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;;kBAGoB,UAAU,QAAQ,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;;AADpE,wBAyCE"}
|