Skip to content

feat: export observability helpers#444

Merged
thymikee merged 1 commit intomainfrom
feat/observability-helpers
Apr 26, 2026
Merged

feat: export observability helpers#444
thymikee merged 1 commit intomainfrom
feat/observability-helpers

Conversation

@thymikee
Copy link
Copy Markdown
Contributor

@thymikee thymikee commented Apr 26, 2026

Summary

Export agent-device/observability with portable network dump parsing, merge, backend mapping, and text redaction helpers.
Reuse the existing network parser, keep filesystem log reading internal, keep daemon backend typing closed, and expose custom backend labels only at the public boundary. Touched 7 files; scope stayed within observability/parser exports and tests.

Validation

  • pnpm format
  • pnpm vitest run src/__tests__/observability.test.ts
  • pnpm check:tooling
  • pnpm check:unit

@github-actions
Copy link
Copy Markdown

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callstackincubator.github.io/agent-device/pr-preview/pr-444/

Built to branch gh-pages at 2026-04-26 00:14 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 538ad70ccd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

return `${String(prefix)}[REDACTED]`;
});
next = next.replaceAll(
/((?:authorization|cookie|token|secret|password|passwd|api[-_]?key)\s*[:=]\s*)([^\s,;&]+)/gi,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve full secret token in key-value redaction

The redaction pattern for key: value style secrets now stops at &, so inputs like authorization: abc&def are rewritten to authorization: [REDACTED]&def, leaking part of the credential. This helper is now used by diagnostics formatting, so logs/perf output can expose secret suffixes whenever values contain ampersands (common in encoded tokens or cookies).

Useful? React with 👍 / 👎.

Comment thread src/observability-redaction.ts Outdated
changed = true;
}
if (changed) markRedacted();
return parsed.toString();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid rewriting non-redacted URLs

This callback always returns parsed.toString() even when no secret fields were changed, which normalizes URLs in otherwise safe text (for example host casing and trailing slash) while redacted stays false. That means diagnostics output can be altered despite no redaction, making logs less faithful and potentially breaking exact URL comparisons or signature-bearing URLs copied from diagnostics.

Useful? React with 👍 / 👎.

@thymikee thymikee force-pushed the feat/observability-helpers branch from 538ad70 to 80510a4 Compare April 26, 2026 00:22
@thymikee thymikee merged commit 3645479 into main Apr 26, 2026
14 of 15 checks passed
@thymikee thymikee deleted the feat/observability-helpers branch April 26, 2026 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant