cueline 0.1.0 → 0.1.2
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.
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/CHANGELOG.md +14 -0
- package/README.ja.md +51 -8
- package/README.ko.md +51 -8
- package/README.md +51 -8
- package/README.zh-CN.md +51 -8
- package/README.zh-TW.md +51 -8
- package/dist/src/api.d.ts +2 -0
- package/dist/src/api.js +7 -0
- package/dist/src/api.js.map +1 -1
- package/dist/src/browser/browser-adapter.d.ts +19 -1
- package/dist/src/browser/codex-iab/bootstrap.d.ts +3 -0
- package/dist/src/browser/codex-iab/bootstrap.js +21 -2
- package/dist/src/browser/codex-iab/bootstrap.js.map +1 -1
- package/dist/src/browser/codex-iab/chatgpt-client.js +302 -15
- package/dist/src/browser/codex-iab/chatgpt-client.js.map +1 -1
- package/dist/src/core/controller-loop.d.ts +3 -0
- package/dist/src/core/controller-loop.js +215 -29
- package/dist/src/core/controller-loop.js.map +1 -1
- package/dist/src/core/state-machine.d.ts +22 -0
- package/dist/src/core/state-machine.js +99 -5
- package/dist/src/core/state-machine.js.map +1 -1
- package/dist/src/state/store.js +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/docs/architecture.md +9 -8
- package/docs/controller-protocol.md +2 -2
- package/docs/state-and-recovery.md +36 -6
- package/package.json +2 -1
- package/skills/cueline/SKILL.md +13 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.2 - 2026-07-15
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Wait up to five seconds for the ChatGPT composer model control to hydrate before reconciling an existing controller response. This prevents a visible `Pro` control from being rejected by an early DOM read.
|
|
8
|
+
- Preserve strict model verification during recovery: CueLine still requires both a `Pro` composer label and a Pro response model slug, and still refuses reconciliation when either proof is missing.
|
|
9
|
+
- Keep reconciliation read-only. Recovering an existing response does not resend the prompt, register a job, or execute Grove work.
|
|
10
|
+
|
|
11
|
+
### Documentation
|
|
12
|
+
|
|
13
|
+
- Clarify that `default` is a lane while `codex-default` is a runner candidate inside that lane.
|
|
14
|
+
- Document safe `0.1.2` continuation behavior for pending controller turns, exact prompt matching, and ambiguous submissions.
|
package/README.ja.md
CHANGED
|
@@ -25,12 +25,42 @@ CueLine は独立した実装で、**ランタイムの npm 依存はゼロ**で
|
|
|
25
25
|
|
|
26
26
|
コントローラーは*何が起こるべきか*を選びます。ローカル側は*それを許すか、どう許すか*を選びます。レーンが有効であること、候補がプロセス起動の**前に**利用可能だと確認されていること、`argv[0]` があなたのルーティング設定によってすでに登録されていること。シェルを経由するものは何もありません。ワーカーがいったん起動したら、黙って 2 番目の候補にフォールバックすることはありません。失敗は再試行ではなく、証拠として返ります。
|
|
27
27
|
|
|
28
|
+
コントローラープロトコルでは、ルーティングの階層を明確に区別します。`lane` に指定するのはレーン名の `default` であり、`codex-default` はそのレーン内の候補ランナーであって、レーンではありません。CueLine はジョブを一つでも登録する前に `dispatch` 全体を検証します。無効なレーンまたはランナーが一つでもあれば、途中まで実行せず、`dispatch` 全体を修正のために差し戻します。
|
|
29
|
+
|
|
28
30
|
これは許可リスト(allow-list)であって、サンドボックスではありません。登録されたワーカーは CueLine プロセス自身と同じ権限で動きます。`advise` は Codex の読み取り専用サンドボックスに、`work` は `workspace-write` に対応しますが、登録したものが、そのまま許可したものになります。
|
|
29
31
|
|
|
32
|
+
## コントローラーは Pro モデルでなければならない
|
|
33
|
+
|
|
34
|
+
コンポーザーのモデルセレクターが `Pro` を示していないかぎり、CueLine は送信を拒否します。会話が別のモデルにある場合、CueLine はまずコンポーザーを `Pro` に切り替えます——それが唯一許されたモデル切り替えです。検証済みのライブ実行では、Instant を Pro に切り替え、応答は `gpt-5-6-pro` として返りました。
|
|
35
|
+
|
|
36
|
+
選ぶことと、証明することは違います。各応答のあと CueLine は、完了したアシスタントメッセージのモデル slug を読み、それが Pro の slug であることを要求します。送信から返信までのあいだに格下げが起きても、信用せずに検出します。失敗は `MODEL_SELECTOR_MISSING`、`PRO_MODEL_UNAVAILABLE`、`PRO_MODEL_SELECTION_FAILED`、`PRO_MODEL_MISMATCH` として表面化し、受理された回答になることは決してありません。
|
|
37
|
+
|
|
38
|
+
ChatGPT Pro のサブスクリプションと、選択された Pro モデルは別物です。アカウントやプロフィールのラベルに `Pro` が含まれていても、それはサブスクリプションの証拠にすぎず、モデルの証拠には決してなりません。モデルの証拠になるのは応答のモデル slug だけです。ライブのターンごとに `controller_response_received` が `selected_model_label`、`response_model_slug`、`model_evidence_source` とともに永続化されるため、どちらの証拠がモデルを裏づけたのかは後からでも監査できます。
|
|
39
|
+
|
|
30
40
|
## クイックスタート
|
|
31
41
|
|
|
32
42
|
必要なもの:Node.js 22 以上、組み込みブラウザーを備えた Codex、そして——同梱の既定レーンを使う場合は——`PATH` 上の `codex` CLI。
|
|
33
43
|
|
|
44
|
+
npm レジストリからインストールします。
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm install -g cueline@0.1.2
|
|
48
|
+
cueline install
|
|
49
|
+
cueline doctor
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
フォールバックとして、[v0.1.2 リリース](https://github.com/Seraphim0916/cueline/releases/tag/v0.1.2) のパッケージ済み tarball をインストールすることもできます。同じリリースに `.sha256` チェックサムも置いてあります。
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npm install -g https://github.com/Seraphim0916/cueline/releases/download/v0.1.2/cueline-0.1.2.tgz
|
|
56
|
+
cueline install
|
|
57
|
+
cueline doctor
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
`cueline install` が作るシンボリックリンクは 1 つだけ、同梱スキルを `$CODEX_HOME/skills/cueline`(既定では `~/.codex/skills/cueline`)に張ります。自分が所有していないパスの置き換えは拒否し、二度実行しても何も変わりません。`cueline uninstall` はそのリンクだけを外します。そこに他人のファイルがあれば、削除せず保持します。
|
|
61
|
+
|
|
62
|
+
### ソースからインストールする
|
|
63
|
+
|
|
34
64
|
```bash
|
|
35
65
|
git clone https://github.com/Seraphim0916/cueline.git
|
|
36
66
|
cd cueline
|
|
@@ -45,8 +75,8 @@ cueline doctor
|
|
|
45
75
|
次に、Codex で:
|
|
46
76
|
|
|
47
77
|
1. Codex の組み込みブラウザーで `https://chatgpt.com` を開き、サインインします。
|
|
48
|
-
2.
|
|
49
|
-
3. Codex にこう頼みます:*「CueLine
|
|
78
|
+
2. 主導させたい会話を選択したままにします。そのページがコントローラーです。そのコンポーザーは `Pro` モデルでなければなりません。そうでない場合、CueLine が `Pro` を選び、選べなければ送信を拒否します。
|
|
79
|
+
3. Codex にこう頼みます:*「CueLine を使って、開いている ChatGPT Pro の会話にこのタスクを指揮させて。」*
|
|
50
80
|
4. 返ってきた `runId` を控えておきます。中断した実行を再開する手がかりになります。
|
|
51
81
|
|
|
52
82
|
同梱の `cueline` スキルは、Codex 自身の Node ランタイムからこのパッケージを駆動します。組み込みブラウザーのオブジェクトはそこに存在するためです。別に起動したプレーンな `node` プロセスはそれを継承しません。
|
|
@@ -67,21 +97,29 @@ if (result.status === "complete") {
|
|
|
67
97
|
}
|
|
68
98
|
```
|
|
69
99
|
|
|
100
|
+
Codex のランタイムでは、`cueline api path` が出力する絶対パスのモジュールを import します。それがインストールしたパッケージのビルド済み API です。
|
|
101
|
+
|
|
70
102
|
`startCueLineRun` が明示的な開始点です(`runCueLine` はその別名)。`continueCueLineRun({ runId })` は中断した実行を同じ会話で再開し、新しいアダプターを渡さないかぎり保存済みの会話 URL を再利用します。`loadCueLineRunState(runId)` は永続化された状態を読むだけで、何も駆動しません。すでに `complete` または `blocked` に達した実行はそのまま返され、二度とディスパッチされません。
|
|
71
103
|
|
|
72
104
|
## CLI
|
|
73
105
|
|
|
74
|
-
CLI
|
|
106
|
+
CLI はブラウザーを駆動しません。スキルのリンクを管理し、ローカル側が健全かどうかを教えます。
|
|
75
107
|
|
|
76
108
|
```console
|
|
109
|
+
$ cueline install
|
|
110
|
+
CueLine skill installed: /Users/you/.codex/skills/cueline
|
|
111
|
+
|
|
77
112
|
$ cueline doctor
|
|
78
|
-
CueLine 0.1.
|
|
113
|
+
CueLine 0.1.2
|
|
79
114
|
status ok
|
|
80
115
|
node 22.14.0 ok
|
|
81
|
-
config /
|
|
116
|
+
config /usr/local/lib/node_modules/cueline/config/routing.default.json valid
|
|
82
117
|
home /Users/you/.cueline
|
|
83
118
|
available_lanes 1
|
|
84
119
|
|
|
120
|
+
$ cueline api path
|
|
121
|
+
/usr/local/lib/node_modules/cueline/dist/src/api.js
|
|
122
|
+
|
|
85
123
|
$ cueline routing
|
|
86
124
|
default codex-default available
|
|
87
125
|
|
|
@@ -89,10 +127,13 @@ $ cueline jobs
|
|
|
89
127
|
No jobs.
|
|
90
128
|
|
|
91
129
|
$ cueline config path
|
|
92
|
-
/
|
|
130
|
+
/usr/local/lib/node_modules/cueline/config/routing.default.json
|
|
131
|
+
|
|
132
|
+
$ cueline uninstall
|
|
133
|
+
CueLine skill removed: /Users/you/.codex/skills/cueline
|
|
93
134
|
```
|
|
94
135
|
|
|
95
|
-
Node が古すぎる場合、あるいは解決できるレーンが一つもない場合、`cueline doctor` は非ゼロで終了します。そのため事前チェックとしてそのまま使えます。`cueline routing` は、黙って別のものを選ぶのではなく、そのレーンがなぜ使えないのかを示します。`cueline help` ですべて一覧できます。
|
|
136
|
+
Node が古すぎる場合、あるいは解決できるレーンが一つもない場合、`cueline doctor` は非ゼロで終了します。そのため事前チェックとしてそのまま使えます。`cueline routing` は、黙って別のものを選ぶのではなく、そのレーンがなぜ使えないのかを示します。`cueline api path` が出すのはスキルが import するモジュールなので、パッケージ導入ならリポジトリの取得は不要です。`cueline help` ですべて一覧できます。
|
|
96
137
|
|
|
97
138
|
## 設定
|
|
98
139
|
|
|
@@ -110,6 +151,8 @@ jobs/<job-id>.json ジョブごとの実行証拠
|
|
|
110
151
|
|
|
111
152
|
記録そのものはイベントログです。コントローラーのターンは送信する前に書かれ、ジョブはプロセスが起動する前に登録されます。だからこそ、意図と副作用のあいだで中断が起きても痕跡が残ります。壊れたスナップショットは信用されず、無視されてイベント 1 番から再構築されます。
|
|
112
153
|
|
|
154
|
+
復帰は、その実行が記録したまさにその会話 URL にだけ再接続します。よく似たタブにつなぐことはありません。保留中のコントローラーターンについては、まず正確なリクエストに対応する完了済みの応答をその会話内で探し、見つかれば再送せず読み取り専用で照合します。古い状態に複数の保留ターンがある場合、呼び出し側が一つを明示的に選ぶ必要があります。唯一の保留中プロンプトが `definitely_not_sent` だと証明できた場合に限り、CueLine は自動で再試行します。送信状態が不明、またはタブが消えた場合は `TAB_RECOVERY_UNSAFE` を投げて停止します。
|
|
155
|
+
|
|
113
156
|
## 検証
|
|
114
157
|
|
|
115
158
|
```bash
|
|
@@ -125,7 +168,7 @@ npm pack --dry-run
|
|
|
125
168
|
|
|
126
169
|
## 0.1 の制限
|
|
127
170
|
|
|
128
|
-
テキストのみ。1 回の実行につき会話は 1
|
|
171
|
+
テキストのみ。1 回の実行につき会話は 1 つ。CueLine が行うモデル切り替えは `Pro` の選択だけです。画像、ファイルアップロード、Deep Research、Projects、Apps には対応しません。ワーカーが起動したあとの自動リトライやフォールバックはありません。失敗した `work` ジョブは、どこまで進んだか CueLine には証明できないため、副作用が不確定であるという印つきで報告されます。主なデスクトップ対象は macOS、CI 対象は Linux です。Windows は未検証で、`install.sh` は Windows 用インストーラーではありません。アダプターは現行の ChatGPT ウェブ UI に依存するため、UI が変わった場合は `COMPOSER_MISSING`、`SEND_BUTTON_MISSING`、あるいは応答タイムアウトとして明示的に表面化します——でっち上げの回答になることは決してありません。
|
|
129
172
|
|
|
130
173
|
完全な対応表は [compatibility](docs/compatibility.md) を参照してください。
|
|
131
174
|
|
package/README.ko.md
CHANGED
|
@@ -25,12 +25,42 @@ CueLine은 독립적인 구현이며 **런타임 npm 의존성이 전혀 없습
|
|
|
25
25
|
|
|
26
26
|
컨트롤러는 *무엇이 일어나야 하는지*를 고릅니다. 로컬 쪽은 *그것이 허용되는지, 어떻게 허용되는지*를 고릅니다. 레인이 활성화되어 있어야 하고, 후보는 어떤 프로세스가 뜨기 **전에** 사용 가능함이 확인되어야 하며, `argv[0]`은 당신의 라우팅 설정에 이미 등록되어 있어야 합니다. 셸을 거치는 것은 아무것도 없습니다. 워커가 일단 시작되면 두 번째 후보로 조용히 넘어가는 폴백은 없습니다. 실패는 재시도가 아니라 증거로 돌아옵니다.
|
|
27
27
|
|
|
28
|
+
컨트롤러 프로토콜은 라우팅 계층을 명확히 구분합니다. `lane`에는 레인 이름인 `default`를 써야 하며, `codex-default`는 그 레인 안의 후보 러너이지 레인이 아닙니다. CueLine은 작업을 하나라도 등록하기 전에 `dispatch` 전체를 검증합니다. 잘못된 레인이나 러너가 하나라도 있으면 일부를 먼저 실행하지 않고 `dispatch` 전체를 수정하도록 돌려보냅니다.
|
|
29
|
+
|
|
28
30
|
이것은 허용 목록(allow-list)이지 샌드박스가 아닙니다. 등록된 워커는 CueLine 프로세스 자신과 동일한 권한으로 실행됩니다. `advise`는 Codex의 읽기 전용 샌드박스에, `work`는 `workspace-write`에 대응하지만, 당신이 등록한 것이 곧 당신이 승인한 것입니다.
|
|
29
31
|
|
|
32
|
+
## 컨트롤러는 반드시 Pro 모델이어야 합니다
|
|
33
|
+
|
|
34
|
+
컴포저의 모델 선택기가 `Pro`를 가리키지 않으면 CueLine은 전송을 거부합니다. 대화가 다른 모델에 머물러 있으면 CueLine이 먼저 컴포저를 `Pro`로 전환합니다 — 이것이 CueLine에게 허용된 유일한 모델 전환입니다. 검증된 실제 실행에서 CueLine은 Instant를 Pro로 전환했고, 응답은 `gpt-5-6-pro`로 돌아왔습니다.
|
|
35
|
+
|
|
36
|
+
고르는 것과 증명하는 것은 다릅니다. 응답이 올 때마다 CueLine은 완료된 어시스턴트 메시지의 모델 slug를 읽고 그것이 Pro slug이기를 요구합니다. 전송과 응답 사이에 등급이 낮아지더라도 신뢰하지 않고 잡아냅니다. 실패는 `MODEL_SELECTOR_MISSING`, `PRO_MODEL_UNAVAILABLE`, `PRO_MODEL_SELECTION_FAILED`, `PRO_MODEL_MISMATCH`로 드러나며, 받아들여진 답으로 둔갑하는 일은 결코 없습니다.
|
|
37
|
+
|
|
38
|
+
ChatGPT Pro 구독과 선택된 Pro 모델은 서로 다른 것입니다. 계정이나 프로필 라벨에 `Pro`가 들어 있어도 그것은 구독의 증거일 뿐, 결코 모델의 증거가 되지 않습니다. 모델의 증거가 되는 것은 응답의 모델 slug뿐입니다. 실제 턴마다 `controller_response_received`가 `selected_model_label`, `response_model_slug`, `model_evidence_source`와 함께 저장되므로, 어느 증거가 모델을 입증했는지는 나중에도 감사할 수 있습니다.
|
|
39
|
+
|
|
30
40
|
## 빠른 시작
|
|
31
41
|
|
|
32
42
|
필요한 것: Node.js 22 이상, 내장 브라우저를 갖춘 Codex, 그리고 — 기본 제공 레인을 쓴다면 — `PATH` 위의 `codex` CLI.
|
|
33
43
|
|
|
44
|
+
npm 레지스트리에서 설치합니다:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm install -g cueline@0.1.2
|
|
48
|
+
cueline install
|
|
49
|
+
cueline doctor
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
대안으로, [v0.1.2 릴리스](https://github.com/Seraphim0916/cueline/releases/tag/v0.1.2)의 패키지 tarball을 설치할 수도 있습니다. 같은 릴리스에 `.sha256` 체크섬도 함께 있습니다.
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npm install -g https://github.com/Seraphim0916/cueline/releases/download/v0.1.2/cueline-0.1.2.tgz
|
|
56
|
+
cueline install
|
|
57
|
+
cueline doctor
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
`cueline install`이 만드는 심볼릭 링크는 하나뿐입니다. 번들된 스킬을 `$CODEX_HOME/skills/cueline`(기본값 `~/.codex/skills/cueline`)에 연결합니다. 자신이 소유하지 않은 경로는 덮어쓰기를 거부하고, 두 번 실행해도 아무것도 달라지지 않습니다. `cueline uninstall`은 그 링크만 제거하며, 그 자리에 다른 파일이 있으면 지우지 않고 보존합니다.
|
|
61
|
+
|
|
62
|
+
### 소스에서 설치하기
|
|
63
|
+
|
|
34
64
|
```bash
|
|
35
65
|
git clone https://github.com/Seraphim0916/cueline.git
|
|
36
66
|
cd cueline
|
|
@@ -45,8 +75,8 @@ cueline doctor
|
|
|
45
75
|
그다음 Codex에서:
|
|
46
76
|
|
|
47
77
|
1. Codex의 내장 브라우저로 `https://chatgpt.com`을 열고 로그인합니다.
|
|
48
|
-
2. 지휘를 맡길 대화를 선택한 상태로 둡니다. 그
|
|
49
|
-
3. Codex에게 CueLine으로 처리해 달라고 요청합니다: *"CueLine
|
|
78
|
+
2. 지휘를 맡길 대화를 선택한 상태로 둡니다. 그 페이지가 컨트롤러입니다. 그 컴포저는 반드시 `Pro` 모델이어야 하며, 그렇지 않으면 CueLine이 `Pro`를 대신 선택하고, 선택하지 못하면 전송을 거부합니다.
|
|
79
|
+
3. Codex에게 CueLine으로 처리해 달라고 요청합니다: *"CueLine을 써서, 열려 있는 ChatGPT Pro 대화가 이 작업을 지휘하게 해 줘."*
|
|
50
80
|
4. 반환된 `runId`를 보관하세요. 중단된 실행을 이어서 진행하는 열쇠입니다.
|
|
51
81
|
|
|
52
82
|
기본 제공 `cueline` 스킬은 Codex 자체의 Node 런타임에서 이 패키지를 구동합니다. 내장 브라우저 객체가 바로 그곳에 있기 때문입니다. 옆에서 따로 띄운 평범한 `node` 프로세스는 그것을 물려받지 못합니다.
|
|
@@ -67,21 +97,29 @@ if (result.status === "complete") {
|
|
|
67
97
|
}
|
|
68
98
|
```
|
|
69
99
|
|
|
100
|
+
Codex 런타임에서는 `cueline api path`가 출력하는 절대 경로 모듈을 import하세요. 그것이 설치한 패키지의 빌드된 API입니다.
|
|
101
|
+
|
|
70
102
|
`startCueLineRun`이 명시적인 시작점입니다(`runCueLine`은 그 별칭). `continueCueLineRun({ runId })`은 중단된 실행을 같은 대화에서 재개하며, 새 어댑터를 넘기지 않는 한 저장된 대화 URL을 재사용합니다. `loadCueLineRunState(runId)`는 저장된 상태를 읽기만 하고 아무것도 구동하지 않습니다. 이미 `complete`나 `blocked`에 도달한 실행은 그대로 반환되며, 두 번 디스패치되지 않습니다.
|
|
71
103
|
|
|
72
104
|
## CLI
|
|
73
105
|
|
|
74
|
-
CLI는 브라우저를 구동하지 않습니다. 로컬 쪽이 멀쩡한지
|
|
106
|
+
CLI는 브라우저를 구동하지 않습니다. 스킬 링크를 관리하고, 로컬 쪽이 멀쩡한지 알려줍니다.
|
|
75
107
|
|
|
76
108
|
```console
|
|
109
|
+
$ cueline install
|
|
110
|
+
CueLine skill installed: /Users/you/.codex/skills/cueline
|
|
111
|
+
|
|
77
112
|
$ cueline doctor
|
|
78
|
-
CueLine 0.1.
|
|
113
|
+
CueLine 0.1.2
|
|
79
114
|
status ok
|
|
80
115
|
node 22.14.0 ok
|
|
81
|
-
config /
|
|
116
|
+
config /usr/local/lib/node_modules/cueline/config/routing.default.json valid
|
|
82
117
|
home /Users/you/.cueline
|
|
83
118
|
available_lanes 1
|
|
84
119
|
|
|
120
|
+
$ cueline api path
|
|
121
|
+
/usr/local/lib/node_modules/cueline/dist/src/api.js
|
|
122
|
+
|
|
85
123
|
$ cueline routing
|
|
86
124
|
default codex-default available
|
|
87
125
|
|
|
@@ -89,10 +127,13 @@ $ cueline jobs
|
|
|
89
127
|
No jobs.
|
|
90
128
|
|
|
91
129
|
$ cueline config path
|
|
92
|
-
/
|
|
130
|
+
/usr/local/lib/node_modules/cueline/config/routing.default.json
|
|
131
|
+
|
|
132
|
+
$ cueline uninstall
|
|
133
|
+
CueLine skill removed: /Users/you/.codex/skills/cueline
|
|
93
134
|
```
|
|
94
135
|
|
|
95
|
-
Node 버전이 너무 낮거나 해석 가능한 레인이 하나도 없으면 `cueline doctor`는 0이 아닌 코드로 종료합니다. 그래서 사전 점검용으로 그대로 쓸 수 있습니다. `cueline routing`은 조용히 다른 것을 고르는 대신, 그 레인이 왜 사용 불가인지 보여줍니다. `cueline help`가 전부를 나열합니다.
|
|
136
|
+
Node 버전이 너무 낮거나 해석 가능한 레인이 하나도 없으면 `cueline doctor`는 0이 아닌 코드로 종료합니다. 그래서 사전 점검용으로 그대로 쓸 수 있습니다. `cueline routing`은 조용히 다른 것을 고르는 대신, 그 레인이 왜 사용 불가인지 보여줍니다. `cueline api path`가 출력하는 것이 곧 스킬이 import하는 모듈이므로, 패키지로 설치했다면 저장소를 받을 필요가 없습니다. `cueline help`가 전부를 나열합니다.
|
|
96
137
|
|
|
97
138
|
## 설정
|
|
98
139
|
|
|
@@ -110,6 +151,8 @@ jobs/<job-id>.json 작업별 실행 증거
|
|
|
110
151
|
|
|
111
152
|
기록 그 자체는 이벤트 로그입니다. 컨트롤러의 턴은 보내기 전에 기록되고, 작업은 프로세스가 시작되기 전에 등록됩니다. 그래서 의도와 부작용 사이에서 중단이 일어나도 흔적이 남습니다. 손상된 스냅샷은 신뢰되지 않고, 무시된 뒤 이벤트 1번부터 다시 만들어집니다.
|
|
112
153
|
|
|
154
|
+
복구는 그 실행이 기록해 둔 바로 그 대화 URL에만 다시 연결하며, 비슷해 보이는 탭에는 결코 붙지 않습니다. 보류 중인 컨트롤러 턴이 있으면 먼저 그 대화에서 정확한 요청과 연결된 완료 응답을 찾고, 찾으면 다시 보내지 않고 읽기 전용으로 대조해 복구합니다. 이전 상태에 보류 중인 턴이 여러 개 있으면 호출자가 하나를 명시적으로 선택해야 합니다. 유일한 보류 프롬프트가 `definitely_not_sent`임이 증명된 경우에만 CueLine이 자동으로 다시 시도합니다. 제출 상태가 불명확하거나 탭이 사라지면 `TAB_RECOVERY_UNSAFE`를 던지고 멈춥니다.
|
|
155
|
+
|
|
113
156
|
## 검증
|
|
114
157
|
|
|
115
158
|
```bash
|
|
@@ -125,7 +168,7 @@ npm pack --dry-run
|
|
|
125
168
|
|
|
126
169
|
## 0.1의 한계
|
|
127
170
|
|
|
128
|
-
텍스트 전용. 실행 하나당 대화 하나. 모델
|
|
171
|
+
텍스트 전용. 실행 하나당 대화 하나. CueLine이 수행하는 모델 전환은 `Pro` 선택뿐입니다. 이미지, 파일 업로드, Deep Research, Projects, Apps는 지원하지 않습니다. 워커가 시작된 뒤의 자동 재시도나 폴백도 없습니다. 실패한 `work` 작업은 어디까지 진행됐는지 CueLine이 증명할 수 없으므로, 부작용이 불확실하다는 표시와 함께 보고됩니다. 주력 데스크톱 대상은 macOS이고 CI 대상은 Linux입니다. Windows는 검증되지 않았으며 `install.sh`는 Windows용 설치 프로그램이 아닙니다. 어댑터는 현재의 ChatGPT 웹 UI에 의존하므로, UI가 바뀌면 `COMPOSER_MISSING`, `SEND_BUTTON_MISSING`, 또는 응답 타임아웃으로 명시적으로 드러납니다 — 지어낸 답으로 둔갑하는 일은 결코 없습니다.
|
|
129
172
|
|
|
130
173
|
전체 표는 [compatibility](docs/compatibility.md)를 보세요.
|
|
131
174
|
|
package/README.md
CHANGED
|
@@ -25,12 +25,42 @@ Each round: CueLine writes down what it is about to ask, sends one observation i
|
|
|
25
25
|
|
|
26
26
|
The controller chooses *what should happen*. The local side chooses *whether and how it may happen*: the lane must be enabled, the candidate must be available **before** anything spawns, and `argv[0]` must already be registered by your routing config. Nothing is passed through a shell. Once a worker starts, there is no silent fallback to a second candidate — a failure comes back as evidence, not as a retry.
|
|
27
27
|
|
|
28
|
+
The controller protocol keeps routing levels explicit: `lane` names the lane (`default`), while `codex-default` is a candidate runner inside that lane, not a lane. CueLine validates the entire `dispatch` before registering any job; an invalid lane or runner rejects the whole dispatch for repair, so no valid-looking subset starts early.
|
|
29
|
+
|
|
28
30
|
That is an allow-list, not a sandbox. A registered worker runs with the same permissions as the CueLine process itself; `advise` maps to a read-only Codex sandbox and `work` to `workspace-write`, but what you register is what you have authorized.
|
|
29
31
|
|
|
32
|
+
## The controller must be a Pro model
|
|
33
|
+
|
|
34
|
+
CueLine refuses to send unless the composer's model selector reads `Pro`. If the conversation sits on another model, CueLine switches the composer to `Pro` first — that is the only model switch it is allowed to make. In a verified live run it switched Instant to Pro and the reply came back as `gpt-5-6-pro`.
|
|
35
|
+
|
|
36
|
+
Selecting is not the same as proving. After each response CueLine reads the completed assistant message's model slug and requires it to be a Pro slug, so a downgrade between send and reply is caught rather than trusted. A failure surfaces as `MODEL_SELECTOR_MISSING`, `PRO_MODEL_UNAVAILABLE`, `PRO_MODEL_SELECTION_FAILED`, or `PRO_MODEL_MISMATCH` — never as an accepted answer.
|
|
37
|
+
|
|
38
|
+
A ChatGPT Pro subscription and the selected Pro model are two different things. An account or profile label containing `Pro` is subscription evidence only and never counts as model evidence; only the response's model slug does. Every live turn persists `controller_response_received` with `selected_model_label`, `response_model_slug`, and `model_evidence_source`, so which evidence proved the model stays auditable afterwards.
|
|
39
|
+
|
|
30
40
|
## Quick start
|
|
31
41
|
|
|
32
42
|
You need Node.js 22+, Codex with its built-in Browser, and — for the bundled default lane — the `codex` CLI on `PATH`.
|
|
33
43
|
|
|
44
|
+
Install from the npm registry:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm install -g cueline@0.1.2
|
|
48
|
+
cueline install
|
|
49
|
+
cueline doctor
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
As a fallback, install the packaged tarball from the [v0.1.2 release](https://github.com/Seraphim0916/cueline/releases/tag/v0.1.2), which also carries its `.sha256` checksum:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npm install -g https://github.com/Seraphim0916/cueline/releases/download/v0.1.2/cueline-0.1.2.tgz
|
|
56
|
+
cueline install
|
|
57
|
+
cueline doctor
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
`cueline install` creates one symlink, the bundled skill at `$CODEX_HOME/skills/cueline` (`~/.codex/skills/cueline` by default). It refuses to replace a path it does not own, and running it twice is a no-op. `cueline uninstall` removes that link and nothing else; a foreign path in its place is preserved, not deleted.
|
|
61
|
+
|
|
62
|
+
### Install from source
|
|
63
|
+
|
|
34
64
|
```bash
|
|
35
65
|
git clone https://github.com/Seraphim0916/cueline.git
|
|
36
66
|
cd cueline
|
|
@@ -45,8 +75,8 @@ cueline doctor
|
|
|
45
75
|
Then, in Codex:
|
|
46
76
|
|
|
47
77
|
1. Open `https://chatgpt.com` in Codex's built-in Browser and sign in.
|
|
48
|
-
2. Leave the conversation you want to be in charge selected — that page
|
|
49
|
-
3. Ask Codex to use CueLine for the task: *"Use CueLine
|
|
78
|
+
2. Leave the conversation you want to be in charge selected — that page is the controller. Its composer must be on a `Pro` model; CueLine selects `Pro` for you if it is not, and refuses to send otherwise.
|
|
79
|
+
3. Ask Codex to use CueLine for the task: *"Use CueLine and let the open ChatGPT Pro conversation direct this task."*
|
|
50
80
|
4. Keep the returned `runId`. It is how an interrupted run is resumed.
|
|
51
81
|
|
|
52
82
|
The bundled `cueline` skill drives the package from Codex's own Node runtime, which is where the in-app Browser object lives. A plain `node` process started on the side does not inherit it.
|
|
@@ -69,19 +99,27 @@ if (result.status === "complete") {
|
|
|
69
99
|
|
|
70
100
|
`startCueLineRun` is the explicit start (`runCueLine` is its alias). `continueCueLineRun({ runId })` resumes an interrupted run in the same conversation, and reuses the stored conversation URL unless you hand it a new adapter. `loadCueLineRunState(runId)` reads persisted state without driving anything. A run that already reached `complete` or `blocked` is returned as-is, never dispatched twice.
|
|
71
101
|
|
|
102
|
+
Inside Codex's runtime, import the absolute module that `cueline api path` prints — that is the built API of the package you installed.
|
|
103
|
+
|
|
72
104
|
## The CLI
|
|
73
105
|
|
|
74
|
-
The CLI does not drive the browser. It tells you whether the local half is sound.
|
|
106
|
+
The CLI does not drive the browser. It manages the skill link and tells you whether the local half is sound.
|
|
75
107
|
|
|
76
108
|
```console
|
|
109
|
+
$ cueline install
|
|
110
|
+
CueLine skill installed: /Users/you/.codex/skills/cueline
|
|
111
|
+
|
|
77
112
|
$ cueline doctor
|
|
78
|
-
CueLine 0.1.
|
|
113
|
+
CueLine 0.1.2
|
|
79
114
|
status ok
|
|
80
115
|
node 22.14.0 ok
|
|
81
|
-
config /
|
|
116
|
+
config /usr/local/lib/node_modules/cueline/config/routing.default.json valid
|
|
82
117
|
home /Users/you/.cueline
|
|
83
118
|
available_lanes 1
|
|
84
119
|
|
|
120
|
+
$ cueline api path
|
|
121
|
+
/usr/local/lib/node_modules/cueline/dist/src/api.js
|
|
122
|
+
|
|
85
123
|
$ cueline routing
|
|
86
124
|
default codex-default available
|
|
87
125
|
|
|
@@ -89,10 +127,13 @@ $ cueline jobs
|
|
|
89
127
|
No jobs.
|
|
90
128
|
|
|
91
129
|
$ cueline config path
|
|
92
|
-
/
|
|
130
|
+
/usr/local/lib/node_modules/cueline/config/routing.default.json
|
|
131
|
+
|
|
132
|
+
$ cueline uninstall
|
|
133
|
+
CueLine skill removed: /Users/you/.codex/skills/cueline
|
|
93
134
|
```
|
|
94
135
|
|
|
95
|
-
`cueline doctor` exits non-zero when Node is too old or no lane can resolve, which makes it usable as a preflight check. `cueline routing` shows why a lane is unavailable instead of quietly selecting something else. `cueline help` lists everything.
|
|
136
|
+
`cueline doctor` exits non-zero when Node is too old or no lane can resolve, which makes it usable as a preflight check. `cueline routing` shows why a lane is unavailable instead of quietly selecting something else. `cueline api path` is what the skill imports, so a packaged install needs no repository checkout. `cueline help` lists everything.
|
|
96
137
|
|
|
97
138
|
## Configuration
|
|
98
139
|
|
|
@@ -110,6 +151,8 @@ jobs/<job-id>.json per-job execution evidence
|
|
|
110
151
|
|
|
111
152
|
The event log is the record: the controller turn is written before it is sent, and a job is registered before its process starts, so an interruption between intent and side effect leaves a trace. A corrupt snapshot is ignored and rebuilt from event 1 rather than trusted.
|
|
112
153
|
|
|
154
|
+
Recovery reattaches only to the exact conversation URL the run recorded — never to a lookalike tab. For a pending controller turn, CueLine first looks in that conversation for a completed response correlated to the exact request; if found, it reconciles the response read-only instead of resending. If legacy state contains multiple pending turns, the caller must select one explicitly. CueLine retries automatically only when the sole pending prompt is proven `definitely_not_sent`; an ambiguous submission or a vanished tab throws `TAB_RECOVERY_UNSAFE` and stops.
|
|
155
|
+
|
|
113
156
|
## Verify
|
|
114
157
|
|
|
115
158
|
```bash
|
|
@@ -125,7 +168,7 @@ npm pack --dry-run
|
|
|
125
168
|
|
|
126
169
|
## Limits in 0.1
|
|
127
170
|
|
|
128
|
-
Text only. One conversation per run.
|
|
171
|
+
Text only. One conversation per run. Selecting `Pro` is the only model switch CueLine makes; no images, no file upload, no Deep Research, Projects, or Apps. No automatic retry or fallback once a worker has started — a failed `work` job is reported with its side effects flagged as ambiguous, because CueLine cannot prove how far it got. macOS is the primary desktop target and Linux is the CI target; Windows is unverified, and `install.sh` is not a Windows installer. The adapter depends on the current ChatGPT web UI, so a UI change surfaces as an explicit `COMPOSER_MISSING`, `SEND_BUTTON_MISSING`, or response timeout — never as a fabricated answer.
|
|
129
172
|
|
|
130
173
|
See [compatibility](docs/compatibility.md) for the full matrix.
|
|
131
174
|
|
package/README.zh-CN.md
CHANGED
|
@@ -25,12 +25,42 @@ CueLine 是独立实现,**没有任何运行时 npm 依赖**,也不是 Omnil
|
|
|
25
25
|
|
|
26
26
|
控制器决定*应该发生什么*;本地这一侧决定*是否允许发生、以何种方式发生*:通道(lane)必须启用、候选必须在任何进程启动**之前**确认可用、`argv[0]` 必须早已由你的路由配置注册。没有任何内容会经过 shell。worker 一旦启动,就不会悄悄退回到第二个候选——失败以证据的形式返回,而不是自动重试。
|
|
27
27
|
|
|
28
|
+
控制器协议有意区分路由层级:`lane` 填的是通道名称 `default`;`codex-default` 是该通道内的候选执行器,不是通道。CueLine 会在注册任何作业之前先验证整份 `dispatch`;只要包含无效通道或执行器,整份派工就会被退回修复,不会先执行其中一部分。
|
|
29
|
+
|
|
28
30
|
这是白名单(allow-list),不是沙箱。已注册的 worker 拥有与 CueLine 进程本身相同的权限;`advise` 对应 Codex 的只读沙箱、`work` 对应 `workspace-write`,但你注册了什么,就等于你授权了什么。
|
|
29
31
|
|
|
32
|
+
## 控制器必须是 Pro 模型
|
|
33
|
+
|
|
34
|
+
除非输入框的模型选择器显示 `Pro`,否则 CueLine 拒绝发送。会话若停在别的模型,CueLine 会先把输入框切换到 `Pro`——这是它唯一被允许做的模型切换。在一次已验证的实机运行中,它把 Instant 切换为 Pro,返回的响应是 `gpt-5-6-pro`。
|
|
35
|
+
|
|
36
|
+
选中不等于证明。每次响应之后,CueLine 会读取该条已完成助手消息的模型 slug,并要求它是 Pro 的 slug;发送与回复之间若发生降级,会被抓出来,而不是被信任。失败会以 `MODEL_SELECTOR_MISSING`、`PRO_MODEL_UNAVAILABLE`、`PRO_MODEL_SELECTION_FAILED` 或 `PRO_MODEL_MISMATCH` 暴露出来——绝不会变成一个被接受的答案。
|
|
37
|
+
|
|
38
|
+
ChatGPT Pro 订阅套餐与“选定的 Pro 模型”是两回事。账号或个人资料标签上出现 `Pro`,只是订阅套餐的证据,永远不算模型证据;只有响应的模型 slug 才算。每一轮实机回合都会持久化 `controller_response_received`,携带 `selected_model_label`、`response_model_slug` 与 `model_evidence_source`,因此“是哪一种证据证明了模型”事后依然可审计。
|
|
39
|
+
|
|
30
40
|
## 五分钟上手
|
|
31
41
|
|
|
32
42
|
你需要 Node.js 22 以上、带内置浏览器的 Codex,以及——若使用内置的默认通道——`PATH` 上有 `codex` CLI。
|
|
33
43
|
|
|
44
|
+
从 npm registry 安装:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm install -g cueline@0.1.2
|
|
48
|
+
cueline install
|
|
49
|
+
cueline doctor
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
作为后备,也可以安装 [v0.1.2 release](https://github.com/Seraphim0916/cueline/releases/tag/v0.1.2) 上的打包 tarball,该 release 同时附带它的 `.sha256` 校验值:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npm install -g https://github.com/Seraphim0916/cueline/releases/download/v0.1.2/cueline-0.1.2.tgz
|
|
56
|
+
cueline install
|
|
57
|
+
cueline doctor
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
`cueline install` 只创建一个软链接:把内置的 skill 接到 `$CODEX_HOME/skills/cueline`(默认 `~/.codex/skills/cueline`)。它拒绝覆盖不属于自己的路径,重复执行也不会产生副作用。`cueline uninstall` 只移除那一个链接;若该位置换成了别人的文件,它会保留而不删除。
|
|
61
|
+
|
|
62
|
+
### 从源码安装
|
|
63
|
+
|
|
34
64
|
```bash
|
|
35
65
|
git clone https://github.com/Seraphim0916/cueline.git
|
|
36
66
|
cd cueline
|
|
@@ -45,8 +75,8 @@ cueline doctor
|
|
|
45
75
|
然后,在 Codex 里:
|
|
46
76
|
|
|
47
77
|
1. 用 Codex 的内置浏览器打开 `https://chatgpt.com` 并登录。
|
|
48
|
-
2.
|
|
49
|
-
3. 让 Codex 用 CueLine 处理任务:*“用 CueLine
|
|
78
|
+
2. 让你想让它当控制器的那个会话保持选中——该页面就是控制器。它的输入框必须停在 `Pro` 模型;若不是,CueLine 会替你选成 `Pro`,否则就拒绝发送。
|
|
79
|
+
3. 让 Codex 用 CueLine 处理任务:*“用 CueLine,让那个打开的 ChatGPT Pro 会话来指挥这项任务。”*
|
|
50
80
|
4. 保留返回的 `runId`。被中断的运行要续跑,就靠它。
|
|
51
81
|
|
|
52
82
|
内置的 `cueline` skill 是从 Codex 自身的 Node runtime 驱动这个包的——内置浏览器对象就存在于那里。另外单独启动的 `node` 进程不会继承它。
|
|
@@ -67,21 +97,29 @@ if (result.status === "complete") {
|
|
|
67
97
|
}
|
|
68
98
|
```
|
|
69
99
|
|
|
100
|
+
在 Codex 的 runtime 里,import `cueline api path` 打印出的那个绝对路径模块——那就是你安装的那份包构建出来的 API。
|
|
101
|
+
|
|
70
102
|
`startCueLineRun` 是显式的启动入口(`runCueLine` 是它的别名)。`continueCueLineRun({ runId })` 会在同一个会话中续跑被中断的运行,并复用已保存的会话链接,除非你传入新的 adapter。`loadCueLineRunState(runId)` 只读取已持久化的状态,不驱动任何东西。已经到达 `complete` 或 `blocked` 的运行会原样返回,绝不会被再次派发。
|
|
71
103
|
|
|
72
104
|
## CLI
|
|
73
105
|
|
|
74
|
-
CLI
|
|
106
|
+
CLI 不驱动浏览器。它负责管理 skill 链接,并告诉你本地这一半是否健康。
|
|
75
107
|
|
|
76
108
|
```console
|
|
109
|
+
$ cueline install
|
|
110
|
+
CueLine skill installed: /Users/you/.codex/skills/cueline
|
|
111
|
+
|
|
77
112
|
$ cueline doctor
|
|
78
|
-
CueLine 0.1.
|
|
113
|
+
CueLine 0.1.2
|
|
79
114
|
status ok
|
|
80
115
|
node 22.14.0 ok
|
|
81
|
-
config /
|
|
116
|
+
config /usr/local/lib/node_modules/cueline/config/routing.default.json valid
|
|
82
117
|
home /Users/you/.cueline
|
|
83
118
|
available_lanes 1
|
|
84
119
|
|
|
120
|
+
$ cueline api path
|
|
121
|
+
/usr/local/lib/node_modules/cueline/dist/src/api.js
|
|
122
|
+
|
|
85
123
|
$ cueline routing
|
|
86
124
|
default codex-default available
|
|
87
125
|
|
|
@@ -89,10 +127,13 @@ $ cueline jobs
|
|
|
89
127
|
No jobs.
|
|
90
128
|
|
|
91
129
|
$ cueline config path
|
|
92
|
-
/
|
|
130
|
+
/usr/local/lib/node_modules/cueline/config/routing.default.json
|
|
131
|
+
|
|
132
|
+
$ cueline uninstall
|
|
133
|
+
CueLine skill removed: /Users/you/.codex/skills/cueline
|
|
93
134
|
```
|
|
94
135
|
|
|
95
|
-
当 Node 版本过旧、或没有任何通道可解析时,`cueline doctor` 会以非零状态退出,因此可直接用作预检。`cueline routing` 会说明某个通道为何不可用,而不是悄悄改选别的。`cueline help` 会列出全部。
|
|
136
|
+
当 Node 版本过旧、或没有任何通道可解析时,`cueline doctor` 会以非零状态退出,因此可直接用作预检。`cueline routing` 会说明某个通道为何不可用,而不是悄悄改选别的。`cueline api path` 打印的就是 skill 会 import 的模块,所以使用打包安装时完全不需要 clone 源码。`cueline help` 会列出全部。
|
|
96
137
|
|
|
97
138
|
## 配置
|
|
98
139
|
|
|
@@ -110,6 +151,8 @@ jobs/<job-id>.json 每个作业的执行证据
|
|
|
110
151
|
|
|
111
152
|
事件日志才是记录本身:控制器这一轮在发送之前先写入、作业在进程启动之前先注册,因此“意图”与“副作用”之间若被中断,会留下痕迹。损坏的快照会被忽略并从第 1 号事件重建,而不是被信任。
|
|
112
153
|
|
|
154
|
+
续跑只会重新接回该次运行记录下来的那个会话 URL,绝不接到长得像的标签页。对仍待处理的控制器回合,它会先在该会话中查找与确切请求对应的已完成回复;找到后以只读方式接回,而不是重发。若旧状态中同时有多个待处理回合,调用方必须明确选择一个。只有当唯一待处理提示能被证明为 `definitely_not_sent` 时,CueLine 才会自动重试;提交状态不明或标签页消失时,它会抛出 `TAB_RECOVERY_UNSAFE` 并停下。
|
|
155
|
+
|
|
113
156
|
## 验证
|
|
114
157
|
|
|
115
158
|
```bash
|
|
@@ -125,7 +168,7 @@ npm pack --dry-run
|
|
|
125
168
|
|
|
126
169
|
## 0.1 的限制
|
|
127
170
|
|
|
128
|
-
|
|
171
|
+
仅支持纯文本。一次运行只对应一个会话。选成 `Pro` 是 CueLine 唯一会做的模型切换;不支持图片、不支持文件上传,也不支持 Deep Research、Projects 或 Apps。worker 一旦启动便没有自动重试或回退——失败的 `work` 作业会在副作用被标记为不确定后回报,因为 CueLine 无法证明它执行到了哪一步。macOS 是主要的桌面目标、Linux 是 CI 目标;Windows 未经验证,且 `install.sh` 不是 Windows 安装程序。adapter 依赖 ChatGPT 网页当前的界面,因此界面变更会以明确的 `COMPOSER_MISSING`、`SEND_BUTTON_MISSING` 或响应超时暴露出来——绝不会变成编造的答案。
|
|
129
172
|
|
|
130
173
|
完整矩阵见 [compatibility](docs/compatibility.md)。
|
|
131
174
|
|