@rudderhq/agent-runtime-codex-local 0.5.2-canary.2 → 0.6.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.
@@ -0,0 +1,50 @@
1
+ import { isCodexClosedStdinToolSessionError } from "../shared/tool-errors.js";
2
+ const CODEX_BENIGN_STDERR_RES = [
3
+ /^\d{4}-\d{2}-\d{2}T[^\s]+\s+ERROR\s+codex_core::rollout::list:\s+state db missing rollout path for thread\s+[a-z0-9-]+$/i,
4
+ /^Error:\s+thread\/resume:\s+thread\/resume failed:\s+no rollout found for thread id\s+[a-z0-9-]+$/i,
5
+ /^\d{4}-\d{2}-\d{2}T[^\s]+\s+WARN\s+codex_core::shell_snapshot:\s+Failed to delete shell snapshot at\s+".+?\.tmp-\d+":\s+Os\s+\{\s+code:\s*2,\s+kind:\s*NotFound,\s+message:\s*"No such file or directory"\s+\}$/i,
6
+ /^\d{4}-\d{2}-\d{2}T[^\s]+\s+WARN\s+codex_protocol::openai_models:\s+Model personality requested but model_messages is missing, falling back to base instructions\.\s+model=\S+\s+personality=\S+$/i,
7
+ /^\d{4}-\d{2}-\d{2}T[^\s]+\s+ERROR\s+codex_core::models_manager::manager:\s+failed to refresh available models:\s+timeout waiting for child process to exit$/i,
8
+ /^\d{4}-\d{2}-\d{2}T[^\s]+\s+WARN\s+codex_rmcp_client::stdio_server_launcher:\s+Failed to kill MCP process group for server (?:rudder-tools|rudder-browser):\s+No such process\s+\(os error 3\)$/i,
9
+ /^\d{4}-\d{2}-\d{2}T[^\s]+\s+ERROR\s+codex_memories_write::phase2:\s+Phase 2 no changes$/i,
10
+ ];
11
+ const CODEX_ANALYTICS_FORBIDDEN_HTML_START_RE = /^\d{4}-\d{2}-\d{2}T[^\s]+\s+WARN\s+codex_analytics::analytics_client:\s+events failed with status 403 Forbidden:\s+<html>$/i;
12
+ export const CODEX_STDERR_LINE_BUFFER_LIMIT = 64 * 1024;
13
+ const APP_SERVER_EVENT_STREAM_LAG_RE = /^in-process app-server event stream lagged; dropped\s+\d+\s+events$/i;
14
+ export function createCodexStderrLineFilter() {
15
+ let suppressingAnalyticsHtml = false;
16
+ return (line) => {
17
+ const trimmed = line.trim();
18
+ if (suppressingAnalyticsHtml) {
19
+ if (/^<\/html>$/i.test(trimmed))
20
+ suppressingAnalyticsHtml = false;
21
+ return true;
22
+ }
23
+ if (CODEX_ANALYTICS_FORBIDDEN_HTML_START_RE.test(trimmed)) {
24
+ suppressingAnalyticsHtml = true;
25
+ return true;
26
+ }
27
+ return isCodexClosedStdinToolSessionError(trimmed)
28
+ || APP_SERVER_EVENT_STREAM_LAG_RE.test(trimmed)
29
+ || CODEX_BENIGN_STDERR_RES.some((pattern) => pattern.test(trimmed));
30
+ };
31
+ }
32
+ export function stripCodexBenignStderr(text) {
33
+ const shouldSuppress = createCodexStderrLineFilter();
34
+ return text
35
+ .split(/\r?\n/)
36
+ .filter((line) => !line.trim() || !shouldSuppress(line))
37
+ .join("\n");
38
+ }
39
+ export function splitCompleteLines(text) {
40
+ const lines = [];
41
+ let start = 0;
42
+ for (let index = 0; index < text.length; index += 1) {
43
+ if (text[index] !== "\n")
44
+ continue;
45
+ lines.push(text.slice(start, index + 1));
46
+ start = index + 1;
47
+ }
48
+ return { lines, remainder: text.slice(start) };
49
+ }
50
+ //# sourceMappingURL=stderr-filter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stderr-filter.js","sourceRoot":"","sources":["../../src/server/stderr-filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,0BAA0B,CAAC;AAE9E,MAAM,uBAAuB,GAAG;IAC9B,0HAA0H;IAC1H,oGAAoG;IACpG,kNAAkN;IAClN,oMAAoM;IACpM,8JAA8J;IAC9J,kMAAkM;IAClM,0FAA0F;CAClF,CAAC;AACX,MAAM,uCAAuC,GAC3C,6HAA6H,CAAC;AAChI,MAAM,CAAC,MAAM,8BAA8B,GAAG,EAAE,GAAG,IAAI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,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI;YAAE,SAAS;QACnC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;QACzC,KAAK,GAAG,KAAK,GAAG,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;AACjD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rudderhq/agent-runtime-codex-local",
3
- "version": "0.5.2-canary.2",
3
+ "version": "0.6.0",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "homepage": "https://github.com/Undertone0809/rudder",
6
6
  "bugs": {
@@ -68,8 +68,8 @@
68
68
  "probe:quota": "pnpm exec tsx src/cli/quota-probe.ts --json"
69
69
  },
70
70
  "dependencies": {
71
- "@rudderhq/agent-runtime-utils": "0.5.2-canary.2",
72
- "@rudderhq/shared": "0.5.2-canary.2",
71
+ "@rudderhq/agent-runtime-utils": "0.6.0",
72
+ "@rudderhq/shared": "0.6.0",
73
73
  "picocolors": "^1.1.1"
74
74
  },
75
75
  "devDependencies": {
@@ -42,8 +42,13 @@ because work is executable, durable, long-running, or reviewable.
42
42
 
43
43
  ## Ownership, Checkout, And Wake Scope
44
44
 
45
- - Before issue-scoped execution, checkout the assigned issue. Never retry a
46
- checkout that returns `409`; stop and report the ownership conflict.
45
+ - Before checkout-eligible assignment or follow-up execution, checkout the
46
+ assigned issue. Never retry a checkout that returns `409`; stop and report
47
+ the ownership conflict.
48
+ - When an explicit comment wake identifies the authenticated agent as the
49
+ issue's current assignee or reviewer, the run already holds the issue
50
+ execution lease. Work the explicit request in any issue status without
51
+ checkout, reassignment, or an implicit status change.
47
52
  - Never look for unassigned work. Work the authenticated agent's assignee or
48
53
  reviewer inbox and the explicit wake context.
49
54
  - Self-assign only when a wake comment explicitly transfers ownership.
@@ -85,9 +90,11 @@ If blocked, set the issue to `blocked`, identify the blocker, name the next
85
90
  actor or action, and leave the blocker comment before exit. Do not present
86
91
  partial work as complete.
87
92
 
88
- A reviewer does not take over implementation unless explicitly asked.
89
- Reviewer work may cover `in_review` or `blocked`; the latter is blocker triage,
90
- not implementation ownership. Record one structured durable decision:
93
+ A reviewer does not take over implementation unless explicitly asked. Ordinary
94
+ explicit reviewer work may happen in any issue status while preserving
95
+ ownership and status. Formal reviewer decisions cover `in_review` or `blocked`;
96
+ the latter is blocker triage, not implementation ownership. Record one
97
+ structured durable decision for a formal review:
91
98
 
92
99
  - `--decision approve` for accepted work;
93
100
  - `--decision request_changes` for required changes;