codex-chatgpt-control 0.5.1-alpha.3 → 0.5.1-alpha.4

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.
Files changed (90) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +16 -0
  3. package/contracts/v1/fixtures/download-blocked-by-browser.json +22 -0
  4. package/contracts/v1/fixtures/download-receipt-failed.json +22 -0
  5. package/contracts/v1/fixtures/download-receipt-timeout.json +22 -0
  6. package/contracts/v1/fixtures/journal-rpc-indeterminate.json +32 -0
  7. package/contracts/v1/fixtures/journal-rpc-unsupported-platform.json +32 -0
  8. package/contracts/v1/fixtures/journal-runtime-unavailable.json +32 -0
  9. package/contracts/v1/manifest.json +30 -0
  10. package/contracts/v1/parity-suite.json +10 -7
  11. package/dist/codex-chatgpt-control-backend.mjs +3795 -2077
  12. package/dist/codex-chatgpt-control-journal.mjs +5547 -0
  13. package/dist/codex-chatgpt-control-live-smoke.bundle.mjs +51677 -0
  14. package/dist/codex-chatgpt-control-release-canary.bundle.mjs +52104 -0
  15. package/dist/codex-chatgpt-control.bundle.mjs +3403 -1369
  16. package/dist/src/browser/chatgpt-url.d.ts +2 -0
  17. package/dist/src/browser/chatgpt-url.js +9 -0
  18. package/dist/src/browser/downloads.d.ts +15 -1
  19. package/dist/src/browser/downloads.js +150 -28
  20. package/dist/src/browser/page-state.js +6 -0
  21. package/dist/src/client.d.ts +5 -0
  22. package/dist/src/client.js +69 -12
  23. package/dist/src/commands/artifacts.js +6 -4
  24. package/dist/src/commands/chat-popover.d.ts +37 -0
  25. package/dist/src/commands/chat-popover.js +537 -0
  26. package/dist/src/commands/configuration.d.ts +5 -0
  27. package/dist/src/commands/configuration.js +121 -14
  28. package/dist/src/commands/context.js +10 -3
  29. package/dist/src/commands/doctor.js +1 -1
  30. package/dist/src/commands/experience.d.ts +5 -0
  31. package/dist/src/commands/experience.js +69 -21
  32. package/dist/src/commands/files.js +10 -6
  33. package/dist/src/commands/modes.js +36 -4
  34. package/dist/src/commands/power-discovery.js +52 -10
  35. package/dist/src/commands/session.js +12 -4
  36. package/dist/src/dom/composer-text.d.ts +6 -0
  37. package/dist/src/dom/composer-text.js +85 -0
  38. package/dist/src/operations/artifact-transfer.d.ts +1 -1
  39. package/dist/src/operations/artifact-transfer.js +3 -3
  40. package/dist/src/operations/browser-adapter.d.ts +10 -4
  41. package/dist/src/operations/browser-adapter.js +95 -15
  42. package/dist/src/operations/browser-observation.d.ts +1 -1
  43. package/dist/src/operations/browser-observation.js +97 -49
  44. package/dist/src/operations/browser-target.d.ts +3 -1
  45. package/dist/src/operations/browser-target.js +49 -7
  46. package/dist/src/operations/chatgpt-runtime.js +85 -3
  47. package/dist/src/operations/client.js +2 -0
  48. package/dist/src/operations/configuration-routing.d.ts +4 -0
  49. package/dist/src/operations/configuration-routing.js +14 -0
  50. package/dist/src/operations/index.d.ts +3 -0
  51. package/dist/src/operations/index.js +3 -0
  52. package/dist/src/operations/journal-authority.d.ts +12 -0
  53. package/dist/src/operations/journal-authority.js +1 -0
  54. package/dist/src/operations/journal-rpc-client.d.ts +12 -0
  55. package/dist/src/operations/journal-rpc-client.js +225 -0
  56. package/dist/src/operations/journal-rpc-protocol.d.ts +32 -0
  57. package/dist/src/operations/journal-rpc-protocol.js +214 -0
  58. package/dist/src/operations/journal-rpc-server.d.ts +15 -0
  59. package/dist/src/operations/journal-rpc-server.js +272 -0
  60. package/dist/src/operations/journal.d.ts +1 -0
  61. package/dist/src/operations/journal.js +28 -2
  62. package/dist/src/operations/production-attachments.d.ts +3 -1
  63. package/dist/src/operations/production-attachments.js +25 -8
  64. package/dist/src/operations/production-chatgpt-artifacts.js +3 -3
  65. package/dist/src/operations/production-chatgpt-attachments.d.ts +10 -1
  66. package/dist/src/operations/production-chatgpt-attachments.js +133 -57
  67. package/dist/src/operations/production-configuration.d.ts +1 -1
  68. package/dist/src/operations/production-configuration.js +205 -24
  69. package/dist/src/operations/production-primitives.js +35 -252
  70. package/dist/src/operations/production-work-steer.js +35 -35
  71. package/dist/src/operations/runtime-adapter.d.ts +8 -0
  72. package/dist/src/operations/runtime-adapter.js +20 -4
  73. package/dist/src/operations/service.d.ts +7 -2
  74. package/dist/src/operations/service.js +80 -59
  75. package/dist/src/operations/transactional-chat-power.d.ts +17 -0
  76. package/dist/src/operations/transactional-chat-power.js +212 -0
  77. package/dist/src/runtime/coordinated-page.d.ts +2 -0
  78. package/dist/src/runtime/coordinated-page.js +23 -6
  79. package/dist/src/safety/blockers.js +8 -1
  80. package/dist/src/scripts/capture-surface-profile.js +7 -2
  81. package/dist/src/scripts/journal-server.d.ts +2 -0
  82. package/dist/src/scripts/journal-server.js +37 -0
  83. package/dist/src/scripts/live-smoke/scenarios.d.ts +16 -3
  84. package/dist/src/scripts/live-smoke/scenarios.js +47 -22
  85. package/dist/src/scripts/live-smoke/transactional.d.ts +17 -0
  86. package/dist/src/scripts/live-smoke/transactional.js +254 -0
  87. package/package.json +8 -3
  88. package/references/2026-09-06-journal-service.md +140 -0
  89. package/references/backend-protocol.md +103 -0
  90. package/references/python-parity.md +65 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.1-alpha.4
4
+
5
+ - Detects Chrome's explicit blocked-download error page, avoids alternate
6
+ download attempts, and keeps signed download URLs out of rejected-page results.
7
+ - Requires filename-scoped workbook previews when browser filtering is absent.
8
+ - Repairs Chat detection and configuration when current Power or Advanced
9
+ menus are open, preserving scoped Work evidence and verified effort changes.
10
+ - Recognizes current Work model/Power menus and the independent Fast-mode
11
+ checkbox, with verified selection/restoration and legacy Advanced support.
12
+ - Recovers an unconfirmed Send through a fresh client using the authenticated
13
+ saved tab, baseline, unique turn and matching prompt, without sending again.
14
+ - Adds an explicit authenticated journal service and packaged CLI for browser
15
+ hosts without process identity. Journal files and locks remain owned by real
16
+ Node; browser capabilities remain in the active browser host.
17
+ - Supports the new private-file journal transport on macOS/Linux; Windows
18
+ returns an explicit unsupported-platform error before filesystem access.
19
+ - Preserves multiline composer text, recognizes zero-file composer state,
20
+ and forwards the requested response format during exact-turn collection.
21
+ - Bounds native download completion receipt waits and reports unverified
22
+ completion without repeating the download or switching strategies.
23
+ - Uses one journal-call deadline across queued admission and dispatch and
24
+ bounds concurrent turn evidence requests while preserving digest identities.
25
+ - Adds transactional live qualification with durable Send inspection, guarded
26
+ same-ID recovery, owned receipts and duplicate-submission checks.
27
+ - Preserves journal-unavailable and indeterminate-write results across Node
28
+ and Python through shared fixtures, with bounded transport and private reports.
29
+
3
30
  ## 0.5.1-alpha.3
4
31
 
5
32
  - Adds the transactional `operations.submit`, `collect`, `inspect`, `control`,
package/README.md CHANGED
@@ -56,6 +56,22 @@ is unavailable. See
56
56
  for request schemas, concurrency, recovery, privacy, transport bounds, and the
57
57
  stricter transactional artifact-provider capability matrix.
58
58
 
59
+ If the browser host lacks process identity, start `codex-chatgpt-control-journal`
60
+ in an ordinary Node terminal with `--state-root /absolute/private/state` and
61
+ `--directory /absolute/private/new-session`. Then configure
62
+ `operations: { journalService: { descriptorPath: "/absolute/private/new-session/connection.json" } }`
63
+ on the browser client. The explicit private-file connection keeps browser
64
+ control in the active host and durable journal authority in the Node process.
65
+ Keep the descriptor secret and reuse the same operation identity after any
66
+ uncertain write. See [the journal service runbook](references/2026-09-06-journal-service.md)
67
+ for startup, recovery and qualification. Without a configured service, an
68
+ unsupported local journal returns `journal_runtime_unavailable` before browser
69
+ work.
70
+
71
+ The private-file journal service supports macOS/Linux. On Windows it returns
72
+ `journal_rpc_unsupported_platform` before filesystem access; the existing local
73
+ Node journal path is unchanged.
74
+
59
75
  Inspect the visible surface and apply verified configuration:
60
76
 
61
77
  ```ts
@@ -0,0 +1,22 @@
1
+ {
2
+ "result": {
3
+ "blocker": {
4
+ "code": "download_blocked_by_browser",
5
+ "kind": "download_unavailable",
6
+ "message": "Chrome displayed ERR_BLOCKED_BY_CLIENT during the download. Inspect the existing download and Chrome restrictions before retrying; completion is unverified.",
7
+ "resumable": false
8
+ },
9
+ "context": {
10
+ "timestamp": "2026-06-06T00:00:00.000Z"
11
+ },
12
+ "error": {
13
+ "message": "Chrome displayed ERR_BLOCKED_BY_CLIENT during the download. Inspect the existing download and Chrome restrictions before retrying; completion is unverified.",
14
+ "name": "DownloadBrowserBlockedError",
15
+ "recoverable": false
16
+ },
17
+ "ok": false,
18
+ "status": "blocked",
19
+ "warnings": []
20
+ },
21
+ "schemaVersion": "chatgpt.browser_control.command_result.v1"
22
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "result": {
3
+ "blocker": {
4
+ "code": "download_receipt_failed",
5
+ "kind": "download_unavailable",
6
+ "message": "The browser did not provide a verified download receipt. Inspect the existing download before retrying; completion is unverified.",
7
+ "resumable": false
8
+ },
9
+ "context": {
10
+ "timestamp": "2026-06-06T00:00:00.000Z"
11
+ },
12
+ "error": {
13
+ "message": "The browser did not provide a verified download receipt. Inspect the existing download before retrying; completion is unverified.",
14
+ "name": "DownloadReceiptFailedError",
15
+ "recoverable": false
16
+ },
17
+ "ok": false,
18
+ "status": "blocked",
19
+ "warnings": []
20
+ },
21
+ "schemaVersion": "chatgpt.browser_control.command_result.v1"
22
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "result": {
3
+ "blocker": {
4
+ "code": "download_receipt_timeout",
5
+ "kind": "download_unavailable",
6
+ "message": "Download event receipt did not complete before the deadline. Completion is unverified; inspect the existing download before retrying.",
7
+ "resumable": false
8
+ },
9
+ "context": {
10
+ "timestamp": "2026-06-06T00:00:00.000Z"
11
+ },
12
+ "error": {
13
+ "message": "Download event receipt did not complete before the deadline. Completion is unverified; inspect the existing download before retrying.",
14
+ "name": "DownloadReceiptTimeoutError",
15
+ "recoverable": false
16
+ },
17
+ "ok": false,
18
+ "status": "blocked",
19
+ "warnings": []
20
+ },
21
+ "schemaVersion": "chatgpt.browser_control.command_result.v1"
22
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "result": {
3
+ "blocker": {
4
+ "code": "journal_rpc_outcome_indeterminate",
5
+ "kind": "unknown",
6
+ "message": "The journal service connection ended without confirming a durable write. Preserve the operation identity and reconcile its state before any further browser action.",
7
+ "remediation": [
8
+ {
9
+ "instruction": "Restore the private journal-service connection, then inspect or reconcile the same operation identity. Never create a new operation ID to retry an uncertain Send.",
10
+ "label": "Reconnect the same journal",
11
+ "userActionRequired": false
12
+ }
13
+ ],
14
+ "resumable": false
15
+ },
16
+ "context": {
17
+ "timestamp": "2026-06-06T00:00:00.000Z"
18
+ },
19
+ "data": {
20
+ "operationId": "123e4567-e89b-42d3-a456-426614174000"
21
+ },
22
+ "error": {
23
+ "message": "The journal service connection ended without confirming a durable write. Preserve the operation identity and reconcile its state before any further browser action.",
24
+ "name": "OperationError",
25
+ "recoverable": false
26
+ },
27
+ "ok": false,
28
+ "status": "partial",
29
+ "warnings": []
30
+ },
31
+ "schemaVersion": "chatgpt.browser_control.command_result.v1"
32
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "result": {
3
+ "blocker": {
4
+ "code": "journal_rpc_unsupported_platform",
5
+ "kind": "unknown",
6
+ "message": "The private-file journal service requires POSIX file ownership and permissions and is unavailable on Windows.",
7
+ "remediation": [
8
+ {
9
+ "instruction": "On Windows, use the local journal in an ordinary Node browser host without operations.journalService. The private-file journal service requires a POSIX host. Preserve any existing operation identity.",
10
+ "label": "Use a supported journal host",
11
+ "userActionRequired": false
12
+ }
13
+ ],
14
+ "resumable": false
15
+ },
16
+ "context": {
17
+ "timestamp": "2026-06-06T00:00:00.000Z"
18
+ },
19
+ "data": {
20
+ "operationId": "123e4567-e89b-42d3-a456-426614174000"
21
+ },
22
+ "error": {
23
+ "message": "The private-file journal service requires POSIX file ownership and permissions and is unavailable on Windows.",
24
+ "name": "OperationError",
25
+ "recoverable": false
26
+ },
27
+ "ok": false,
28
+ "status": "blocked",
29
+ "warnings": []
30
+ },
31
+ "schemaVersion": "chatgpt.browser_control.command_result.v1"
32
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "result": {
3
+ "blocker": {
4
+ "code": "journal_runtime_unavailable",
5
+ "kind": "unknown",
6
+ "message": "Transactional operations require a Node host with process identity, file ownership, and process liveness APIs. This host cannot safely open the operation journal.",
7
+ "remediation": [
8
+ {
9
+ "instruction": "Start the packaged journal service in a supported Node host and configure operations.journalService.descriptorPath in the browser client.",
10
+ "label": "Use a supported transactional host",
11
+ "userActionRequired": false
12
+ }
13
+ ],
14
+ "resumable": false
15
+ },
16
+ "context": {
17
+ "timestamp": "2026-06-06T00:00:00.000Z"
18
+ },
19
+ "data": {
20
+ "operationId": "123e4567-e89b-42d3-a456-426614174000"
21
+ },
22
+ "error": {
23
+ "message": "Transactional operations require a Node host with process identity, file ownership, and process liveness APIs. This host cannot safely open the operation journal.",
24
+ "name": "OperationError",
25
+ "recoverable": false
26
+ },
27
+ "ok": false,
28
+ "status": "blocked",
29
+ "warnings": []
30
+ },
31
+ "schemaVersion": "chatgpt.browser_control.command_result.v1"
32
+ }
@@ -56,6 +56,21 @@
56
56
  "file": "doctor-scenario-preflight.json",
57
57
  "schema": "commandResult"
58
58
  },
59
+ {
60
+ "case": "download_blocked_by_browser",
61
+ "file": "download-blocked-by-browser.json",
62
+ "schema": "commandResult"
63
+ },
64
+ {
65
+ "case": "download_receipt_failed",
66
+ "file": "download-receipt-failed.json",
67
+ "schema": "commandResult"
68
+ },
69
+ {
70
+ "case": "download_receipt_timeout",
71
+ "file": "download-receipt-timeout.json",
72
+ "schema": "commandResult"
73
+ },
59
74
  {
60
75
  "case": "existing_tab_diagnostics_blocker",
61
76
  "file": "existing-tab-diagnostics-blocker.json",
@@ -76,6 +91,21 @@
76
91
  "file": "help-root.json",
77
92
  "schema": "backendResponse"
78
93
  },
94
+ {
95
+ "case": "journal_rpc_indeterminate",
96
+ "file": "journal-rpc-indeterminate.json",
97
+ "schema": "commandResult"
98
+ },
99
+ {
100
+ "case": "journal_rpc_unsupported_platform",
101
+ "file": "journal-rpc-unsupported-platform.json",
102
+ "schema": "commandResult"
103
+ },
104
+ {
105
+ "case": "journal_runtime_unavailable",
106
+ "file": "journal-runtime-unavailable.json",
107
+ "schema": "commandResult"
108
+ },
79
109
  {
80
110
  "case": "messages_stop_indeterminate",
81
111
  "file": "messages-stop-indeterminate.json",
@@ -186,6 +186,9 @@
186
186
  "blocker-explanation-profiles.json",
187
187
  "doctor-bridge-upload.json",
188
188
  "doctor-scenario-preflight.json",
189
+ "download-receipt-timeout.json",
190
+ "download-blocked-by-browser.json",
191
+ "download-receipt-failed.json",
189
192
  "existing-tab-diagnostics-blocker.json",
190
193
  "files-preflight-success.json",
191
194
  "project-sources-plan-add.json",
@@ -430,7 +433,7 @@
430
433
  },
431
434
  "ask": {
432
435
  "surface": "workflows-primitives-diagnostics",
433
- "fixtures": ["workflow-ask-success.json", "command-descriptors.json"],
436
+ "fixtures": ["workflow-ask-success.json", "journal-runtime-unavailable.json", "journal-rpc-indeterminate.json", "journal-rpc-unsupported-platform.json", "command-descriptors.json"],
434
437
  "nodeTests": ["tests/unit/client.test.ts", "tests/unit/sequence.test.ts", "tests/unit/backend-conformance.test.ts"],
435
438
  "pythonTests": ["tests/test_workflows.py", "tests/test_async_client.py"],
436
439
  "docs": ["references/backend-protocol.md", "references/python-parity.md", "../../README.md"]
@@ -745,9 +748,9 @@
745
748
  },
746
749
  "artifacts.downloadLatest": {
747
750
  "surface": "workflows-primitives-diagnostics",
748
- "fixtures": ["command-descriptors.json"],
749
- "nodeTests": ["tests/unit/artifacts.test.ts", "tests/unit/files.test.ts"],
750
- "pythonTests": ["tests/test_primitives.py", "tests/test_async_client.py"],
751
+ "fixtures": ["command-descriptors.json", "download-receipt-timeout.json", "download-blocked-by-browser.json", "download-receipt-failed.json"],
752
+ "nodeTests": ["tests/unit/artifacts.test.ts", "tests/unit/files.test.ts", "tests/unit/browser-downloads.test.ts"],
753
+ "pythonTests": ["tests/test_primitives.py", "tests/test_async_client.py", "tests/test_parity_snapshots.py"],
751
754
  "docs": ["references/backend-protocol.md", "references/python-parity.md"]
752
755
  },
753
756
  "files.preflight": {
@@ -766,9 +769,9 @@
766
769
  },
767
770
  "files.downloadLatest": {
768
771
  "surface": "workflows-primitives-diagnostics",
769
- "fixtures": ["command-descriptors.json"],
770
- "nodeTests": ["tests/unit/files.test.ts", "tests/unit/client.test.ts"],
771
- "pythonTests": ["tests/test_primitives.py"],
772
+ "fixtures": ["command-descriptors.json", "download-receipt-timeout.json", "download-blocked-by-browser.json", "download-receipt-failed.json"],
773
+ "nodeTests": ["tests/unit/files.test.ts", "tests/unit/client.test.ts", "tests/unit/browser-downloads.test.ts"],
774
+ "pythonTests": ["tests/test_primitives.py", "tests/test_parity_snapshots.py"],
772
775
  "docs": ["references/backend-protocol.md", "references/troubleshooting.md", "references/python-parity.md"]
773
776
  },
774
777
  "projects.sources.list": {