@senad-d/observme 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/.env.example +57 -0
- package/CHANGELOG.md +52 -0
- package/LICENSE +21 -0
- package/ObservMe-Production-Docs/00-README.md +79 -0
- package/ObservMe-Production-Docs/01-requirements-and-scope.md +207 -0
- package/ObservMe-Production-Docs/02-reference-architecture.md +306 -0
- package/ObservMe-Production-Docs/03-pi-event-and-session-model.md +266 -0
- package/ObservMe-Production-Docs/04-telemetry-semantic-conventions.md +722 -0
- package/ObservMe-Production-Docs/05-otel-pipeline-and-collector.md +355 -0
- package/ObservMe-Production-Docs/06-security-privacy-redaction.md +294 -0
- package/ObservMe-Production-Docs/07-extension-implementation-blueprint.md +447 -0
- package/ObservMe-Production-Docs/08-query-grafana-integration.md +276 -0
- package/ObservMe-Production-Docs/09-dashboards-alerts-slos.md +640 -0
- package/ObservMe-Production-Docs/10-testing-release-operations.md +319 -0
- package/ObservMe-Production-Docs/11-deployment-runbooks.md +203 -0
- package/ObservMe-Production-Docs/12-configuration-reference.md +337 -0
- package/ObservMe-Production-Docs/13-source-notes.md +33 -0
- package/ObservMe-Production-Docs/pi-session-format.md +427 -0
- package/README.md +356 -0
- package/SECURITY.md +45 -0
- package/dashboards/observme-agent-node-graphs.json +250 -0
- package/dashboards/observme-agents.json +1880 -0
- package/dashboards/observme-alerts.yaml +113 -0
- package/dashboards/observme-branches-compactions.json +1042 -0
- package/dashboards/observme-cost.json +1254 -0
- package/dashboards/observme-errors.json +1659 -0
- package/dashboards/observme-export-health.json +1802 -0
- package/dashboards/observme-latency.json +1494 -0
- package/dashboards/observme-llm-conversations.json +730 -0
- package/dashboards/observme-logs-llm.json +644 -0
- package/dashboards/observme-models.json +933 -0
- package/dashboards/observme-overview.json +2129 -0
- package/dashboards/observme-slo-health.json +737 -0
- package/dashboards/observme-slos.yaml +56 -0
- package/dashboards/observme-tools.json +902 -0
- package/dashboards/observme-trace-journey.json +1793 -0
- package/docs/STRUCTURE.md +49 -0
- package/docs/agent-subagent-observability-requirements.md +997 -0
- package/docs/compatibility-matrix.md +39 -0
- package/docs/configuration-tui-design-standard.md +767 -0
- package/docs/configuration.md +38 -0
- package/docs/review-validation.md +115 -0
- package/docs/validation-flow.md +117 -0
- package/examples/collector.yaml +123 -0
- package/examples/observme.yaml +131 -0
- package/img/demo.gif +0 -0
- package/img/icon.svg +47 -0
- package/package.json +103 -0
- package/src/commands/obs-agents-runtime.ts +150 -0
- package/src/commands/obs-agents.ts +491 -0
- package/src/commands/obs-args.ts +63 -0
- package/src/commands/obs-backfill.ts +1334 -0
- package/src/commands/obs-command-support.ts +43 -0
- package/src/commands/obs-cost.ts +228 -0
- package/src/commands/obs-diagnostics.ts +22 -0
- package/src/commands/obs-errors.ts +156 -0
- package/src/commands/obs-health.ts +301 -0
- package/src/commands/obs-link.ts +90 -0
- package/src/commands/obs-logs.ts +194 -0
- package/src/commands/obs-loki-summary.ts +184 -0
- package/src/commands/obs-session.ts +259 -0
- package/src/commands/obs-status.ts +359 -0
- package/src/commands/obs-tools.ts +274 -0
- package/src/commands/obs-trace.ts +411 -0
- package/src/commands/obs.ts +211 -0
- package/src/config/bootstrap-project-config.ts +300 -0
- package/src/config/defaults.ts +143 -0
- package/src/config/load-config.ts +631 -0
- package/src/config/project-paths.ts +61 -0
- package/src/config/schema.ts +405 -0
- package/src/config/validate.ts +456 -0
- package/src/constants.ts +4 -0
- package/src/diagnostics/sanitize.ts +6 -0
- package/src/extension.ts +38 -0
- package/src/otel/logs.ts +160 -0
- package/src/otel/metrics.ts +165 -0
- package/src/otel/otlp-endpoint.ts +10 -0
- package/src/otel/sdk.ts +114 -0
- package/src/otel/shutdown.ts +102 -0
- package/src/otel/traces.ts +166 -0
- package/src/pi/agent-lineage.ts +378 -0
- package/src/pi/agent-tree-tracker.ts +258 -0
- package/src/pi/event-handlers/agent-turn.ts +155 -0
- package/src/pi/event-handlers/lifecycle.ts +642 -0
- package/src/pi/event-handlers/llm.ts +115 -0
- package/src/pi/event-handlers/session-events.ts +159 -0
- package/src/pi/event-handlers/tool-bash.ts +275 -0
- package/src/pi/handler-internals.ts +2154 -0
- package/src/pi/handler-runtime.ts +633 -0
- package/src/pi/handler-types.ts +261 -0
- package/src/pi/handlers.ts +75 -0
- package/src/pi/subagent-spawn.ts +975 -0
- package/src/pi/subagent-types.ts +29 -0
- package/src/privacy/content-capture.ts +104 -0
- package/src/privacy/hash.ts +93 -0
- package/src/privacy/redact.ts +619 -0
- package/src/privacy/secret-patterns.ts +185 -0
- package/src/privacy/truncate.ts +69 -0
- package/src/query/grafana-readiness.ts +164 -0
- package/src/query/grafana-transport.ts +481 -0
- package/src/query/grafana.ts +371 -0
- package/src/query/loki.ts +332 -0
- package/src/query/prometheus.ts +388 -0
- package/src/query/tempo.ts +332 -0
- package/src/safety/sensitive-input.ts +208 -0
- package/src/semconv/attributes.ts +279 -0
- package/src/semconv/metrics.ts +146 -0
- package/src/semconv/spans.ts +19 -0
- package/src/semconv/values.ts +13 -0
- package/src/util/bounded-map.ts +97 -0
- package/tsconfig.json +15 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Template Structure Guide
|
|
2
|
+
|
|
3
|
+
Use this file as the note for future Pi extension projects. Replace template names as soon as the new extension has a real purpose.
|
|
4
|
+
|
|
5
|
+
## Recommended file layout
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
src/
|
|
9
|
+
├── extension.ts # only imports modules and registers them
|
|
10
|
+
├── commands/ # slash-command modules
|
|
11
|
+
├── tools/ # LLM-callable tool modules
|
|
12
|
+
├── events/ # lifecycle/input/tool/model event hooks
|
|
13
|
+
├── ui/ # custom TUI components or renderers, when needed
|
|
14
|
+
├── config/ # config loading and validation, when needed
|
|
15
|
+
├── types.ts # shared domain types, when needed
|
|
16
|
+
└── utils/ # pure helpers with unit tests
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## How to add multiple files by purpose
|
|
20
|
+
|
|
21
|
+
1. Pick the folder by behavior:
|
|
22
|
+
- `commands/` for `/command` handlers.
|
|
23
|
+
- `tools/` for `pi.registerTool()` definitions.
|
|
24
|
+
- `events/` for `pi.on(...)` hooks.
|
|
25
|
+
- `ui/` for renderers, widgets, and custom components.
|
|
26
|
+
- `config/` for settings parsing and environment handling.
|
|
27
|
+
- `utils/` for reusable pure helpers.
|
|
28
|
+
2. Export one registration function from each feature module, for example `registerReviewTool(pi)`.
|
|
29
|
+
3. Import and call that registration function from `src/extension.ts`.
|
|
30
|
+
4. Keep project names in constants (`src/constants.ts`) so renaming does not require hunting through every file.
|
|
31
|
+
5. Add tests for pure helpers and package metadata under `test/`.
|
|
32
|
+
|
|
33
|
+
## Pi extension conventions
|
|
34
|
+
|
|
35
|
+
- Do not start long-lived processes, file watchers, timers, or sockets directly in the extension factory.
|
|
36
|
+
- Start session-scoped resources from `session_start`, a command, or a tool.
|
|
37
|
+
- Clean up resources in `session_shutdown`.
|
|
38
|
+
- Use `promptSnippet` and `promptGuidelines` on tools when the agent needs to know when to call them.
|
|
39
|
+
- If a custom tool edits files, use Pi's file-mutation queue helpers from `@earendil-works/pi-coding-agent`.
|
|
40
|
+
- Keep Pi core packages in `peerDependencies` with `"*"`; put non-Pi runtime packages in `dependencies`.
|
|
41
|
+
- Run `npm run lint` after adding TypeScript or development script files so ESLint catches unused symbols and import-style drift.
|
|
42
|
+
|
|
43
|
+
## Rename points for a new project
|
|
44
|
+
|
|
45
|
+
- `package.json` → `name`, `description`, URLs, keywords, and `pi.extensions` if the entry point moves.
|
|
46
|
+
- `src/constants.ts` → display name and status key.
|
|
47
|
+
- `src/commands/*` → command names and descriptions.
|
|
48
|
+
- `src/tools/*` → tool names, descriptions, schemas, snippets, and guidelines.
|
|
49
|
+
- `.github/*`, `SECURITY.md`, `CHANGELOG.md`, and `README.md` → public project wording.
|