paperclip/packages/adapter-utils/src
Nicky Leach d1573244b5
refactor: disambiguate the Telemetry and Observability data paths (#12128)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work
> - Paperclip records first-party events, OpenTelemetry data, and local
run-log events
> - The code and documents used one term for these three data paths
> - This naming made the required review level unclear
> - This pull request names each data path in the module names,
documents, and code comments
> - The benefit is a clear review rule without a runtime change

## Linked Issues or Issue Description

**Issue type**

Unclear or confusing.

**Where is the issue?**

`packages/shared/src/telemetry/README.md`, `doc/observability.md`,
`doc/run-log-events.md`, and the duplex instrumentation modules.

**What's wrong?**

The repository used Telemetry for first-party events, OpenTelemetry
data, and local run-log events. This usage made the data path and review
level unclear.

**Suggested fix**

Use Telemetry only for Paperclip first-party events. Use Observability
for OpenTelemetry data. Use the run log for rows in
`heartbeat_run_events`.

Related public pull requests: #8476 and #9672.

## What Changed

- Rename the duplex instrumentation modules and identifiers from
`Telemetry` to `Observability`.
- Move the Observability and run-log contracts out of the Telemetry
README.
- Add `doc/observability.md` and `doc/run-log-events.md` as the
canonical documents.
- Add a file-path review rule to `AGENTS.md`.
- Correct the remaining code comments that name the wrong data path.
- Keep all event names, payloads, database records, spans, configuration
keys, environment variables, and runtime paths unchanged.

## Verification

- `npx vitest run packages/shared/src/telemetry/readme-contract.test.ts`
passes.
- `npx vitest run packages/adapter-utils/src/published-exports.test.ts`
passes.
- `npx vitest run
packages/adapter-utils/src/acpx-engine/startup-timing.test.ts` passes
with 42 tests.
- `pnpm --filter @paperclipai/adapter-utils typecheck` passes.
- `pnpm --filter server typecheck` passes.
- The old module name does not remain in TypeScript or JSON files,
except for the intentional publication guard.
- CI and Greptile checks remain pending after PR creation.

## Risks

- The old duplex module subpath no longer has a compatibility shim. The
board accepted this intentional hard break.
- The new duplex module subpath stays blocked from package publication.
- The change has no runtime effect. The main risk is an incorrect
document or module reference.

## Model Used

OpenAI GPT-5 Codex, exact model ID `gpt-5`, with tool use and code
review support.

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have described the issue in-PR with the documentation issue
fields
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change and contains no internal
Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] All Paperclip CI gates are green
- [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before
requesting merge

---------

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-08-24 16:42:33 -07:00
..
acpx-engine refactor: disambiguate the Telemetry and Observability data paths (#12128) 2026-08-24 16:42:33 -07:00
test-support feat(mcp) [split 4/8]: wire gateway runtime and Smoke Lab (#9559) 2026-07-14 15:07:30 -05:00
billing.test.ts feat(costs): add billing, quota, and budget control plane 2026-03-16 15:11:01 -05:00
billing.ts feat(costs): add billing, quota, and budget control plane 2026-03-16 15:11:01 -05:00
command-managed-runtime.test.ts feat: parallelize sandbox file-sync behind a provider opt-in capability (#11736) 2026-08-19 12:34:11 -07:00
command-managed-runtime.ts fix(daytona-duplex): chunk host-to-sandbox writes and make a transport close legible (#11986) 2026-08-22 16:35:47 -07:00
command-redaction.test.ts feat: Claude login on the new-agent page before agent creation (#11347) 2026-08-17 13:42:51 -07:00
command-redaction.ts feat: Claude login on the new-agent page before agent creation (#11347) 2026-08-17 13:42:51 -07:00
duplex-aggregate-byte-ledger.test.ts feat(duplex): bound aggregate duplex route resource consumption with a process-owned byte ledger (#12003) 2026-08-22 22:14:35 -07:00
duplex-aggregate-byte-ledger.ts refactor: disambiguate the Telemetry and Observability data paths (#12128) 2026-08-24 16:42:33 -07:00
duplex-body-spool.test.ts feat(adapter-utils): stream duplex bridge bodies as sequenced chunks with receive-side spill (#12006) 2026-08-23 08:52:31 -07:00
duplex-body-spool.ts feat(adapter-utils): stream duplex bridge bodies as sequenced chunks with receive-side spill (#12006) 2026-08-23 08:52:31 -07:00
duplex-bridge-broker-byte-ledger.test.ts feat(adapter-utils): stream duplex bridge bodies as sequenced chunks with receive-side spill (#12006) 2026-08-23 08:52:31 -07:00
duplex-bridge-broker.test.ts refactor: disambiguate the Telemetry and Observability data paths (#12128) 2026-08-24 16:42:33 -07:00
duplex-bridge-broker.ts refactor: disambiguate the Telemetry and Observability data paths (#12128) 2026-08-24 16:42:33 -07:00
duplex-bridge-local-e2e.test.ts feat(adapter-utils): stream duplex bridge bodies as sequenced chunks with receive-side spill (#12006) 2026-08-23 08:52:31 -07:00
duplex-frame-codec.test.ts feat(adapter-utils): stream duplex bridge bodies as sequenced chunks with receive-side spill (#12006) 2026-08-23 08:52:31 -07:00
duplex-frame-codec.ts feat(adapter-utils): stream duplex bridge bodies as sequenced chunks with receive-side spill (#12006) 2026-08-23 08:52:31 -07:00
duplex-frame-vectors.json feat(adapter-utils): stream duplex bridge bodies as sequenced chunks with receive-side spill (#12006) 2026-08-23 08:52:31 -07:00
duplex-observability.ts refactor: disambiguate the Telemetry and Observability data paths (#12128) 2026-08-24 16:42:33 -07:00
env-bindings.test.ts fix(adapters): keep user-scoped env bindings on the agent Test action (#10926) 2026-08-05 17:18:41 -07:00
env-bindings.ts fix(adapters): keep user-scoped env bindings on the agent Test action (#10926) 2026-08-05 17:18:41 -07:00
exclude-patterns.ts Fix sandbox git publishing and large workspace uploads (#8422) 2026-06-20 22:03:55 -07:00
execution-target-sandbox.test.ts refactor: disambiguate the Telemetry and Observability data paths (#12128) 2026-08-24 16:42:33 -07:00
execution-target-stdin-race.test.ts fix(adapter-utils): order stdin file writes in the sandbox process-session bridge (#11406) 2026-08-14 18:45:31 -07:00
execution-target.test.ts Add secrets provider vaults and remote import (#5429) 2026-05-09 18:22:17 -05:00
execution-target.ts refactor: disambiguate the Telemetry and Observability data paths (#12128) 2026-08-24 16:42:33 -07:00
git-workspace-sync.test.ts fix(adapter-utils): graft unrelated imported histories instead of failing the run (#11638) 2026-08-18 11:14:39 -07:00
git-workspace-sync.ts fix(adapter-utils): graft unrelated imported histories instead of failing the run (#11638) 2026-08-18 11:14:39 -07:00
index.ts feat(login): use the login pseudo-terminal for Codex device login and de-Claude the shared channel (#12020) 2026-08-23 09:44:59 -07:00
local-process-sandbox.test.ts fix(adapter-utils): keep sandbox proxy sockets within Linux path limit (#10221) 2026-07-26 10:52:16 -05:00
local-process-sandbox.ts fix(adapter-utils): keep sandbox proxy sockets within Linux path limit (#10221) 2026-07-26 10:52:16 -05:00
log-redaction.ts fix(ui): external adapter selection, config field placement, and transcript parser freshness 2026-04-03 21:11:22 +01:00
login-capability.test.ts feat(login): use the login pseudo-terminal for Codex device login and de-Claude the shared channel (#12020) 2026-08-23 09:44:59 -07:00
login-capability.ts feat(login): use the login pseudo-terminal for Codex device login and de-Claude the shared channel (#12020) 2026-08-23 09:44:59 -07:00
login-pty-transport.test.ts feat(login): use the login pseudo-terminal for Codex device login and de-Claude the shared channel (#12020) 2026-08-23 09:44:59 -07:00
login-pty-transport.ts feat(login): use the login pseudo-terminal for Codex device login and de-Claude the shared channel (#12020) 2026-08-23 09:44:59 -07:00
login-runner-lifecycle.test.ts feat(auth): normalize agent login in the sandbox onto one session table and a capability contract (#11730) 2026-08-19 11:51:31 -07:00
login-runner-lifecycle.ts feat(auth): normalize agent login in the sandbox onto one session table and a capability contract (#11730) 2026-08-19 11:51:31 -07:00
mcp-isolation.integration.test.ts feat(skills): import skills from projects (#9620) 2026-07-15 18:01:44 -05:00
published-exports.test.ts refactor: disambiguate the Telemetry and Observability data paths (#12128) 2026-08-24 16:42:33 -07:00
remote-execution-env.ts Sanitize remote execution envs at the boundary (#5325) 2026-05-05 19:30:14 -07:00
remote-managed-runtime.test.ts feat(sandbox): stage referenced projects into the run sandbox (#10469) 2026-07-29 16:09:57 -07:00
remote-managed-runtime.ts feat(sandbox): stage referenced projects into the run sandbox (#10469) 2026-07-29 16:09:57 -07:00
runtime-progress.test.ts feat(environments): refer to the managed default environment by name, not the sandbox driver key (#11838) 2026-08-21 12:51:22 -07:00
runtime-progress.ts feat(environments): refer to the managed default environment by name, not the sandbox driver key (#11838) 2026-08-21 12:51:22 -07:00
sandbox-callback-bridge.test.ts fix: harden the sandbox bridge gateway against crashes and queue wedge (#12060) 2026-08-24 08:52:05 -07:00
sandbox-callback-bridge.ts fix: harden the sandbox bridge gateway against crashes and queue wedge (#12060) 2026-08-24 08:52:05 -07:00
sandbox-file-sync.test.ts feat(sandbox): stage referenced projects into the run sandbox (#10469) 2026-07-29 16:09:57 -07:00
sandbox-install-command.test.ts fix(build): enforce Node 24 across Paperclip (#11792) 2026-08-21 10:17:52 -07:00
sandbox-install-command.ts fix(build): enforce Node 24 across Paperclip (#11792) 2026-08-21 10:17:52 -07:00
sandbox-managed-runtime.test.ts feat(environments): refer to the managed default environment by name, not the sandbox driver key (#11838) 2026-08-21 12:51:22 -07:00
sandbox-managed-runtime.ts feat(environments): refer to the managed default environment by name, not the sandbox driver key (#11838) 2026-08-21 12:51:22 -07:00
sandbox-run-log-stream.ts Improve live agent feedback during sandboxed runs (#8915) 2026-07-02 22:21:56 -07:00
sandbox-shell.ts Add secrets provider vaults and remote import (#5429) 2026-05-09 18:22:17 -05:00
server-utils-env.test.ts fix: preserve control plane access in Codex sandbox (#10152) 2026-07-24 15:25:59 -05:00
server-utils.test.ts fix: stop teaching agents to curl literal {id} route templates (#12061) 2026-08-23 17:16:30 -07:00
server-utils.ts fix: stop teaching agents to curl literal {id} route templates (#12061) 2026-08-23 17:16:30 -07:00
session-compaction.ts feat: add kimi-local adapter for Kimi Code CLI (CLI + ACP engines) (#9967) 2026-08-20 12:06:33 -07:00
ssh-fixture.test.ts perf(sandbox-providers): drop nvm sourcing from exec wrappers (#10443) 2026-07-29 12:40:16 -07:00
ssh.ts fix(adapter-utils): graft unrelated imported histories instead of failing the run (#11638) 2026-08-18 11:14:39 -07:00
sync-operation-schedule.test.ts feat: parallelize sandbox file-sync behind a provider opt-in capability (#11736) 2026-08-19 12:34:11 -07:00
sync-operation-schedule.ts feat: parallelize sandbox file-sync behind a provider opt-in capability (#11736) 2026-08-19 12:34:11 -07:00
types.ts feat: parallelize sandbox file-sync behind a provider opt-in capability (#11736) 2026-08-19 12:34:11 -07:00
workspace-restore-merge.test.ts refactor(codex-local): relocate Codex auth-merge scripts + decision predicate into the adapter (#9785) 2026-07-17 14:45:36 -05:00
workspace-restore-merge.ts Fix sandbox restore index drift (#8595) 2026-06-24 23:21:13 -07:00