Skip to content

feat(cli,core): add opt-in dev-only telnet log streaming#4110

Merged
0ski merged 1 commit into
mainfrom
oskar/feat-telnet-log-streaming
Jul 2, 2026
Merged

feat(cli,core): add opt-in dev-only telnet log streaming#4110
0ski merged 1 commit into
mainfrom
oskar/feat-telnet-log-streaming

Conversation

@0ski

@0ski 0ski commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Stream dev logs over a local telnet/TCP socket. trigger dev mirrors its terminal output on port 6767 by default (override with --telnet-logs-port or TRIGGER_DEV_TELNET_LOGS_PORT, 0 disables). webapp, supervisor, and coordinator each expose an opt-in stream gated on a per-service *_TELNET_LOGS_PORT env var. New @trigger.dev/core/v3/telnetLogServer module (localhost-only, backpressure-safe, plain-text) plus optional static Logger.onLog / SimpleStructuredLogger.onLog sinks.

Then you (or your agent) can use nc to connect and filter out the stream.
image

@changeset-bot

changeset-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9b04c42

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 28 packages
Name Type
@trigger.dev/core Patch
@trigger.dev/build Patch
trigger.dev Patch
@trigger.dev/plugins Patch
@trigger.dev/python Patch
@trigger.dev/redis-worker Patch
@trigger.dev/schema-to-json Patch
@trigger.dev/sdk Patch
@internal/cache Patch
@internal/clickhouse Patch
@internal/llm-model-catalog Patch
@trigger.dev/rbac Patch
@internal/redis Patch
@internal/replication Patch
@internal/run-engine Patch
@internal/run-store Patch
@internal/schedule-engine Patch
@trigger.dev/sso Patch
@internal/testcontainers Patch
@internal/tracing Patch
@internal/tsql Patch
@internal/zod-worker Patch
@internal/dashboard-agent Patch
@internal/sdk-compat-tests Patch
@trigger.dev/react-hooks Patch
@trigger.dev/rsc Patch
@trigger.dev/database Patch
@trigger.dev/otlp-importer Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

This pull request adds an opt-in, dev-only telnet/TCP log streaming feature to the Trigger.dev core package. A new @trigger.dev/core/v3/telnetLogServer module provides a TelnetLogServer class along with formatLogLine, stripAnsi, formatConsoleLine, and patchConsoleToTelnet helpers. Static onLog sinks are added to Logger and SimpleStructuredLogger to forward structured logs. Supervisor and webapp apps are wired to optionally start the telnet server based on new environment variables (SUPERVISOR_TELNET_LOGS_PORT, WEBAPP_TELNET_LOGS_PORT). Package exports, env examples, documentation, a changeset, and tests are included.

Changes

Cohort / File(s) Summary
Core telnet server module (packages/core/src/v3/telnetLogServer.ts, .test.ts, package.json) New TelnetLogServer class, formatLogLine, stripAnsi, formatConsoleLine, patchConsoleToTelnet, startTelnetLogServer; new package export subpath; test suite added
Logger sink hooks (packages/core/src/logger.ts, packages/core/src/v3/utils/structuredLogger.ts) Optional static onLog callbacks added to Logger and SimpleStructuredLogger, invoked in #structuredLog
App integrations (apps/supervisor/src/index.ts, src/env.ts, .env.example, apps/webapp/app/services/logger.server.ts, app/env.server.ts, .env.example) Env-gated startup of telnet log server, replacing/patching log sinks
Docs and changeset (.server-changes/*.md, .changeset/telnet-dev-logs.md) Documentation and changeset entries describing the feature

Sequence Diagram(s)

sequenceDiagram
  participant EnvVar
  participant AppStartup
  participant TelnetLogServer
  participant OnLogHook
  participant TCPClient
  EnvVar->>AppStartup: telnet port value
  AppStartup->>TelnetLogServer: start()
  AppStartup->>OnLogHook: assign log callback
  OnLogHook->>TelnetLogServer: broadcast(formatted log)
  TelnetLogServer->>TCPClient: write(line)
Loading

Related PRs: None identified.

Suggested labels: area: supervisor, area: webapp, area: core, type: feature

Suggested reviewers: None identified.

🐰 A whisker-thin port, a telnet-y stream,
logs hop through the wire like a dev-only dream,
console gets patched, ANSI stripped clean,
nc localhost dials in to the scene.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description lacks the required template sections, including Closes #, checklist, Testing, Changelog, and Screenshots headings. Add the template sections and fill in the issue reference, checklist items, testing steps, changelog summary, and screenshots or state none.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: opt-in dev-only telnet log streaming for CLI/core.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch oskar/feat-telnet-log-streaming

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot]

This comment was marked as resolved.

@0ski 0ski force-pushed the oskar/feat-telnet-log-streaming branch from b14264b to 992097f Compare July 2, 2026 15:22
@pkg-pr-new

pkg-pr-new Bot commented Jul 2, 2026

Copy link
Copy Markdown

Open in StackBlitz

@trigger.dev/build

npm i https://pkg.pr.new/@trigger.dev/build@9b04c42

trigger.dev

npm i https://pkg.pr.new/trigger.dev@9b04c42

@trigger.dev/core

npm i https://pkg.pr.new/@trigger.dev/core@9b04c42

@trigger.dev/python

npm i https://pkg.pr.new/@trigger.dev/python@9b04c42

@trigger.dev/react-hooks

npm i https://pkg.pr.new/@trigger.dev/react-hooks@9b04c42

@trigger.dev/redis-worker

npm i https://pkg.pr.new/@trigger.dev/redis-worker@9b04c42

@trigger.dev/rsc

npm i https://pkg.pr.new/@trigger.dev/rsc@9b04c42

@trigger.dev/schema-to-json

npm i https://pkg.pr.new/@trigger.dev/schema-to-json@9b04c42

@trigger.dev/sdk

npm i https://pkg.pr.new/@trigger.dev/sdk@9b04c42

commit: 9b04c42

@0ski 0ski force-pushed the oskar/feat-telnet-log-streaming branch from 992097f to 802cc0d Compare July 2, 2026 15:29
coderabbitai[bot]

This comment was marked as resolved.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
packages/core/src/v3/telnetLogServer.ts (2)

29-30: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

host override can silently defeat the localhost-only guarantee.

The doc comment says to "never bind a public interface for an unauthenticated stream," but options.host is accepted as-is with no validation. A future caller passing "0.0.0.0" (or any non-loopback address) would expose an unauthenticated, unauthenticated write-only log stream externally, with nothing in this module to prevent it.

🛡️ Proposed guard against non-loopback hosts
+const LOOPBACK_HOSTS = new Set(["127.0.0.1", "localhost", "::1"]);
+
 constructor(options: TelnetLogServerOptions) {
   this.name = options.name;
   this.port = options.port;
   this.host = options.host ?? "127.0.0.1";
+  if (!LOOPBACK_HOSTS.has(this.host)) {
+    throw new Error(
+      `[telnet-logs] refusing to bind non-loopback host "${this.host}" for an unauthenticated stream`
+    );
+  }
   this.#banner = options.banner;

Also applies to: 50-54


225-251: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Repeated patchConsoleToTelnet calls stack patches.

No guard prevents calling this twice on the same process; a second call would wrap the already-patched methods, double-broadcasting every line if restore() isn't called between invocations. Low risk given this is a dev-only, single-call-site utility.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 2a3006f6-e8f8-45c7-b3a9-db690ce89db2

📥 Commits

Reviewing files that changed from the base of the PR and between 992097f and 802cc0d.

📒 Files selected for processing (17)
  • .changeset/telnet-dev-logs.md
  • .env.example
  • .server-changes/coordinator-telnet-logs.md
  • .server-changes/supervisor-telnet-logs.md
  • .server-changes/webapp-telnet-logs.md
  • apps/coordinator/.env.example
  • apps/coordinator/src/index.ts
  • apps/supervisor/.env.example
  • apps/supervisor/src/env.ts
  • apps/supervisor/src/index.ts
  • apps/webapp/app/env.server.ts
  • apps/webapp/app/services/logger.server.ts
  • packages/core/package.json
  • packages/core/src/logger.ts
  • packages/core/src/v3/telnetLogServer.test.ts
  • packages/core/src/v3/telnetLogServer.ts
  • packages/core/src/v3/utils/structuredLogger.ts
✅ Files skipped from review due to trivial changes (5)
  • .server-changes/webapp-telnet-logs.md
  • apps/supervisor/src/env.ts
  • .server-changes/supervisor-telnet-logs.md
  • .server-changes/coordinator-telnet-logs.md
  • .changeset/telnet-dev-logs.md
🚧 Files skipped from review as they are similar to previous changes (9)
  • apps/webapp/app/env.server.ts
  • apps/supervisor/src/index.ts
  • .env.example
  • apps/coordinator/src/index.ts
  • packages/core/src/logger.ts
  • packages/core/src/v3/telnetLogServer.test.ts
  • packages/core/package.json
  • apps/webapp/app/services/logger.server.ts
  • packages/core/src/v3/utils/structuredLogger.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (5)
  • GitHub Check: webapp / 📊 Merge Reports
  • GitHub Check: packages / 📊 Merge Reports
  • GitHub Check: internal / 🧪 Unit Tests: Internal (2, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (6, 12)
  • GitHub Check: internal / 🧪 Unit Tests: Internal (3, 12)
🧰 Additional context used
📓 Path-based instructions (8)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{ts,tsx}: Use types over interfaces for TypeScript
Avoid using enums; prefer string unions or const objects instead

Files:

  • packages/core/src/v3/telnetLogServer.ts
{packages/core,apps/webapp}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use zod for validation in packages/core and apps/webapp

Files:

  • packages/core/src/v3/telnetLogServer.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use function declarations instead of default exports

Files:

  • packages/core/src/v3/telnetLogServer.ts
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/otel-metrics.mdc)

**/*.ts: When creating or editing OTEL metrics (counters, histograms, gauges), ensure metric attributes have low cardinality by using only enums, booleans, bounded error codes, or bounded shard IDs
Do not use high-cardinality attributes in OTEL metrics such as UUIDs/IDs (envId, userId, runId, projectId, organizationId), unbounded integers (itemCount, batchSize, retryCount), timestamps (createdAt, startTime), or free-form strings (errorMessage, taskName, queueName)
When exporting OTEL metrics via OTLP to Prometheus, be aware that the exporter automatically adds unit suffixes to metric names (e.g., 'my_duration_ms' becomes 'my_duration_ms_milliseconds', 'my_counter' becomes 'my_counter_total'). Account for these transformations when writing Grafana dashboards or Prometheus queries

Files:

  • packages/core/src/v3/telnetLogServer.ts
packages/core/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (packages/core/CLAUDE.md)

Never import the root package (@trigger.dev/core). Always use subpath imports such as @trigger.dev/core/v3, @trigger.dev/core/v3/utils, @trigger.dev/core/logger, or @trigger.dev/core/schemas

Files:

  • packages/core/src/v3/telnetLogServer.ts
**/*.{ts,tsx,js,jsx,mts,cts,mjs,cjs}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx,js,jsx,mts,cts,mjs,cjs}: Use pnpm run typecheck for changes in apps (apps/*) and internal packages (internal-packages/*), and never use build to verify those changes.
Use Vitest for tests, and never mock anything; use testcontainers instead.
Prefer static imports over dynamic import(), and only use dynamic imports for unresolved circular dependencies, genuine code-splitting needs, or conditional runtime loading.

Files:

  • packages/core/src/v3/telnetLogServer.ts
packages/**/*.{ts,tsx,js,jsx,mts,cts,mjs,cjs}

📄 CodeRabbit inference engine (CLAUDE.md)

Use pnpm run build to verify changes in public packages (packages/*).

Files:

  • packages/core/src/v3/telnetLogServer.ts
**/*.{ts,tsx,js,jsx,mts,cts,mjs,cjs,md,mdx}

📄 CodeRabbit inference engine (CLAUDE.md)

Always import from @trigger.dev/sdk when writing Trigger.dev tasks; never use @trigger.dev/sdk/v3 or deprecated client.defineJob.

Files:

  • packages/core/src/v3/telnetLogServer.ts
🧠 Learnings (9)
📚 Learning: 2026-03-22T13:26:12.060Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3244
File: apps/webapp/app/components/code/TextEditor.tsx:81-86
Timestamp: 2026-03-22T13:26:12.060Z
Learning: In the triggerdotdev/trigger.dev codebase, do not flag `navigator.clipboard.writeText(...)` calls for `missing-await`/`unhandled-promise` issues. These clipboard writes are intentionally invoked without `await` and without `catch` handlers across the project; keep that behavior consistent when reviewing TypeScript/TSX files (e.g., usages like in `apps/webapp/app/components/code/TextEditor.tsx`).

Applied to files:

  • packages/core/src/v3/telnetLogServer.ts
📚 Learning: 2026-03-22T19:24:14.403Z
Learnt from: matt-aitken
Repo: triggerdotdev/trigger.dev PR: 3187
File: apps/webapp/app/v3/services/alerts/deliverErrorGroupAlert.server.ts:200-204
Timestamp: 2026-03-22T19:24:14.403Z
Learning: In the triggerdotdev/trigger.dev codebase, webhook URLs are not expected to contain embedded credentials/secrets (e.g., fields like `ProjectAlertWebhookProperties` should only hold credential-free webhook endpoints). During code review, if you see logging or inclusion of raw webhook URLs in error messages, do not automatically treat it as a credential-leak/secrets-in-logs issue by default—first verify the URL does not contain embedded credentials (for example, no username/password in the URL, no obvious secret/token query params or fragments). If the URL is credential-free per this project’s conventions, allow the logging.

Applied to files:

  • packages/core/src/v3/telnetLogServer.ts
📚 Learning: 2026-05-18T08:21:27.694Z
Learnt from: d-cs
Repo: triggerdotdev/trigger.dev PR: 3632
File: apps/webapp/sentry.server.ts:4-21
Timestamp: 2026-05-18T08:21:27.694Z
Learning: When handling Prisma error P1001 ("Can't reach database server") in TypeScript, don’t assume a single error shape. Prisma can surface P1001 via two different error classes/fields: `PrismaClientKnownRequestError` exposes it as `err.code === "P1001"` (common during mid-query connection drops), while `PrismaClientInitializationError` exposes it as `err.errorCode === "P1001"` (common on client startup failure). Therefore, predicates should use `err.code === "P1001" || err.errorCode === "P1001"`. Do not flag `err.code === "P1001"` as “unreachable/never matches,” as it is expected in production.

Applied to files:

  • packages/core/src/v3/telnetLogServer.ts
📚 Learning: 2026-05-18T08:21:27.694Z
Learnt from: d-cs
Repo: triggerdotdev/trigger.dev PR: 3632
File: apps/webapp/sentry.server.ts:4-21
Timestamp: 2026-05-18T08:21:27.694Z
Learning: When handling Prisma errors for P1001 ("Can't reach database server"), do not assume it only appears under a single property name. Prisma may surface P1001 via either `PrismaClientKnownRequestError` (`err.code === "P1001"`, e.g., mid-query connection drops) or `PrismaClientInitializationError` (`err.errorCode === "P1001"`, e.g., client startup connection failure). To reliably detect the condition, check `err.code === "P1001" || err.errorCode === "P1001"`, and avoid review rules that would incorrectly flag `err.code === "P1001"` as unreachable/never-matching.

Applied to files:

  • packages/core/src/v3/telnetLogServer.ts
📚 Learning: 2026-06-13T19:53:13.759Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 3937
File: packages/trigger-sdk/skills/realtime-and-frontend/SKILL.md:258-260
Timestamp: 2026-06-13T19:53:13.759Z
Learning: When reviewing code that uses `trigger.dev/react-hooks`’s `useRealtimeRun`, preserve the call signature where the first argument is the full realtime handle object (not `handle.id`). This is intentional to maintain type-safety and is consistent with the official docs; do not suggest changing the first argument from the handle object to `handle.id`.

Applied to files:

  • packages/core/src/v3/telnetLogServer.ts
📚 Learning: 2026-06-17T17:13:49.929Z
Learnt from: matt-aitken
Repo: triggerdotdev/trigger.dev PR: 3948
File: apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.bulk-actions.$bulkActionParam/route.tsx:48-62
Timestamp: 2026-06-17T17:13:49.929Z
Learning: In triggerdotdev/trigger.dev, within `dashboardLoader`/`dashboardAction` (or similar context resolver code) whenever you resolve an organization ID from an organization slug for RBAC/enterprise authorization scope, always read from the primary Prisma client (`prisma`), not `$replica`. Using `$replica` can hit replica-lag and cause the RBAC lookup/authorization to run without the correct org scope (bypassing intended role enforcement). Implement the slug→org lookup with `prisma.organization.findFirst(...)` (or equivalent primary-client query) and add an inline comment documenting why the primary client is required (replica lag could lead to unscoped RBAC checks).

Applied to files:

  • packages/core/src/v3/telnetLogServer.ts
📚 Learning: 2026-06-23T13:04:21.413Z
Learnt from: carderne
Repo: triggerdotdev/trigger.dev PR: 4023
File: apps/webapp/app/services/upsertBranch.server.ts:14-18
Timestamp: 2026-06-23T13:04:21.413Z
Learning: In TypeScript, it’s valid to `import { type X }` and then use `typeof X` in a type-only position, e.g. `type Alias = z.infer<typeof X>`. The `type` modifier suppresses the runtime import, but the type checker still has the full exported type so `z.infer<typeof X>` can resolve correctly. In code reviews, don’t flag this as a TypeScript compile error as long as `typeof X` is used in a type context (e.g., with `z.infer`, `type` aliases, generics), not as a runtime value.

Applied to files:

  • packages/core/src/v3/telnetLogServer.ts
📚 Learning: 2026-06-04T18:16:35.386Z
Learnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 3836
File: apps/supervisor/src/backpressure/backpressureMonitor.ts:3-5
Timestamp: 2026-06-04T18:16:35.386Z
Learning: When reviewing TypeScript in this repo, apply the rule “prefer type aliases over interfaces” only to data/object shapes and union/intersection type modeling. If an interface is being used as a behavioral contract for collaborators to implement (e.g., method-shape interfaces that define required behavior, such as `BackpressureLogger` / `BackpressureSignalSource` in `apps/supervisor/src/backpressure/backpressureMonitor.ts`), keep it as an `interface` and do not flag it as a type-alias-vs-interface violation.

Applied to files:

  • packages/core/src/v3/telnetLogServer.ts
📚 Learning: 2026-06-09T17:58:04.699Z
Learnt from: 0ski
Repo: triggerdotdev/trigger.dev PR: 3879
File: apps/webapp/app/models/vercelIntegration.server.ts:619-630
Timestamp: 2026-06-09T17:58:04.699Z
Learning: In this codebase, outbound raw `fetch` calls should typically rely on Node/undici’s default request timeout (about ~300s) rather than adding a per-call `AbortController` + `setTimeout` wrapper inside individual functions (e.g. in files like `apps/webapp/app/models/vercelIntegration.server.ts`). During code review, do not flag the absence of a per-call timeout on a single `fetch` as an issue; if per-call timeouts are needed, they should be implemented via a codebase-wide convention (e.g., a shared fetch wrapper or documented pattern) rather than ad-hoc per-function changes.

Applied to files:

  • packages/core/src/v3/telnetLogServer.ts
🪛 ast-grep (0.44.0)
packages/core/src/v3/telnetLogServer.ts

[warning] 15-19: Do not use variable for regular expressions
Context: new RegExp(
"[\u001B\u009B][\#;?](?:(?:(?:[a-zA-Z\d](?:;[-a-zA-Z\d/#&.:=?%@_]))?\u0007)" +
"|(?:(?:\d{1,4}(?:;\d{0,4})*)?[\dA-PR-TZcf-ntqry=><
]))",
"g"
)
Note: [CWE-1333] Inefficient Regular Expression Complexity. Security best practice.

(regexp-non-literal-typescript)

🪛 dotenv-linter (4.0.0)
apps/coordinator/.env.example

[warning] 6-6: [EndingBlankLine] No blank line at the end of the file

(EndingBlankLine)


[warning] 6-6: [UnorderedKey] The COORDINATOR_TELNET_LOGS_PORT key should go before the HTTP_SERVER_PORT key

(UnorderedKey)

apps/supervisor/.env.example

[warning] 20-20: [EndingBlankLine] No blank line at the end of the file

(EndingBlankLine)

🔇 Additional comments (4)
apps/coordinator/.env.example (1)

4-6: 📐 Maintainability & Code Quality | 💤 Low value

Fix dotenv-lint warnings: missing trailing newline and key ordering.

dotenv-linter flags EndingBlankLine (no trailing newline) and UnorderedKey (COORDINATOR_TELNET_LOGS_PORT should precede HTTP_SERVER_PORT) on this range.

Source: Linters/SAST tools

apps/supervisor/.env.example (1)

17-20: 📐 Maintainability & Code Quality | 💤 Low value

Add trailing newline.

dotenv-linter still reports EndingBlankLine for this file.

Source: Linters/SAST tools

packages/core/src/v3/telnetLogServer.ts (2)

14-24: 🔒 Security & Privacy | ⚖️ Poor tradeoff

Hand-rolled ANSI-stripping regex re-flagged.

Same backtracking-prone regex as before, still executed on every patchConsoleToTelnet-mirrored console call. Prior investigation found strip-ansi v7+ is ESM-only and would need a dynamic import to use from this CJS/dual-mode package — worth deciding on that tradeoff (dynamic import vs. a simpler/anchored regex) rather than leaving the current pattern.

Source: Linters/SAST tools


61-66: LGTM!

Also applies to: 93-99

@0ski 0ski force-pushed the oskar/feat-telnet-log-streaming branch from 802cc0d to 6535565 Compare July 2, 2026 15:43
@0ski 0ski self-assigned this Jul 2, 2026
@0ski 0ski force-pushed the oskar/feat-telnet-log-streaming branch from 6535565 to 9718aaf Compare July 2, 2026 15:55
coderabbitai[bot]

This comment was marked as resolved.

@0ski 0ski marked this pull request as ready for review July 2, 2026 16:14
Comment thread .env.example Outdated
Comment thread apps/supervisor/.env.example Outdated
Comment thread apps/coordinator/.env.example Outdated
Comment thread .server-changes/coordinator-telnet-logs.md Outdated
@0ski 0ski force-pushed the oskar/feat-telnet-log-streaming branch from 9718aaf to fbbdd25 Compare July 2, 2026 17:25
coderabbitai[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@0ski

0ski commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator Author

@nicktrn applied your feedback, thanks! 🙏

@0ski 0ski force-pushed the oskar/feat-telnet-log-streaming branch from fbbdd25 to 53c03e9 Compare July 2, 2026 19:00
devin-ai-integration[bot]

This comment was marked as resolved.

Stream dev logs over a local telnet/TCP socket. `trigger dev` mirrors its terminal output on port 6700 by default (override with --telnet-logs-port or TRIGGER_DEV_TELNET_LOGS_PORT, 0 disables). webapp, supervisor, and coordinator each expose an opt-in stream gated on a per-service *_TELNET_LOGS_PORT env var. New @trigger.dev/core/v3/telnetLogServer module (localhost-only, backpressure-safe, plain-text) plus optional static Logger.onLog / SimpleStructuredLogger.onLog sinks.
@0ski 0ski force-pushed the oskar/feat-telnet-log-streaming branch from 53c03e9 to 9b04c42 Compare July 2, 2026 19:08
@0ski 0ski enabled auto-merge (squash) July 2, 2026 19:14
@0ski 0ski merged commit c7f6ed5 into main Jul 2, 2026
56 checks passed
@0ski 0ski deleted the oskar/feat-telnet-log-streaming branch July 2, 2026 19:16
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.

2 participants