codex-chatgpt-control 0.5.0-alpha.1 → 0.5.1-alpha.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/CHANGELOG.md +22 -0
- package/contracts/v1/fixtures/backend-capabilities.json +1 -0
- package/contracts/v1/fixtures/command-descriptors.json +29 -2
- package/contracts/v1/fixtures/doctor-bridge-upload.json +2 -2
- package/contracts/v1/fixtures/doctor-scenario-preflight.json +26 -4
- package/contracts/v1/fixtures/files-attach-indeterminate.json +30 -0
- package/contracts/v1/fixtures/help-root.json +1 -1
- package/contracts/v1/fixtures/messages-stop-indeterminate.json +31 -0
- package/contracts/v1/fixtures/messages-stop-needs-confirmation.json +20 -0
- package/contracts/v1/fixtures/messages-stop-noop.json +19 -0
- package/contracts/v1/fixtures/messages-stop-success.json +21 -0
- package/contracts/v1/fixtures/primitive-bootstrap-blocker.json +3 -3
- package/contracts/v1/fixtures/reports-create-redacted.json +3 -3
- package/contracts/v1/fixtures/reports-summarize-redacted.json +1 -1
- package/contracts/v1/fixtures/run-browser-bridge-blocker.json +12 -12
- package/contracts/v1/fixtures/stream-blocked.ndjson +2 -2
- package/contracts/v1/manifest.json +25 -0
- package/contracts/v1/parity-suite.json +19 -1
- package/dist/codex-chatgpt-control-backend.mjs +3654 -603
- package/dist/codex-chatgpt-control.bundle.mjs +3627 -546
- package/dist/src/backend/client.d.ts +2 -1
- package/dist/src/backend/client.js +1 -0
- package/dist/src/backend/protocol.d.ts +1 -1
- package/dist/src/backend/protocol.js +1 -0
- package/dist/src/backend/session.js +2 -0
- package/dist/src/browser/attach.d.ts +1 -0
- package/dist/src/browser/attach.js +69 -35
- package/dist/src/browser/chatgpt-url.d.ts +8 -0
- package/dist/src/browser/chatgpt-url.js +28 -0
- package/dist/src/browser/downloads.d.ts +1 -1
- package/dist/src/browser/downloads.js +13 -4
- package/dist/src/browser/page-state.js +211 -4
- package/dist/src/client.d.ts +2 -1
- package/dist/src/client.js +2 -1
- package/dist/src/commands/configuration.js +330 -73
- package/dist/src/commands/context.d.ts +5 -1
- package/dist/src/commands/context.js +2 -2
- package/dist/src/commands/conversation.js +13 -1
- package/dist/src/commands/doctor.js +24 -2
- package/dist/src/commands/experience.d.ts +1 -0
- package/dist/src/commands/experience.js +156 -23
- package/dist/src/commands/files.d.ts +1 -0
- package/dist/src/commands/files.js +877 -170
- package/dist/src/commands/messages.d.ts +2 -1
- package/dist/src/commands/messages.js +310 -2
- package/dist/src/commands/modes.js +197 -52
- package/dist/src/commands/registry.js +8 -0
- package/dist/src/commands/sequence.js +3 -1
- package/dist/src/commands/session.d.ts +4 -1
- package/dist/src/commands/session.js +34 -3
- package/dist/src/dom/generation-state.d.ts +6 -1
- package/dist/src/dom/generation-state.js +206 -45
- package/dist/src/dom/locale/am.d.ts +23 -1
- package/dist/src/dom/locale/am.js +23 -1
- package/dist/src/dom/locale/ar.d.ts +21 -1
- package/dist/src/dom/locale/ar.js +24 -4
- package/dist/src/dom/locale/bg.d.ts +19 -1
- package/dist/src/dom/locale/bg.js +22 -4
- package/dist/src/dom/locale/bn.d.ts +23 -1
- package/dist/src/dom/locale/bn.js +23 -1
- package/dist/src/dom/locale/bs.d.ts +17 -1
- package/dist/src/dom/locale/bs.js +21 -5
- package/dist/src/dom/locale/ca.d.ts +20 -1
- package/dist/src/dom/locale/ca.js +25 -6
- package/dist/src/dom/locale/cs.d.ts +17 -1
- package/dist/src/dom/locale/cs.js +17 -1
- package/dist/src/dom/locale/da.d.ts +17 -1
- package/dist/src/dom/locale/da.js +18 -2
- package/dist/src/dom/locale/de.d.ts +16 -1
- package/dist/src/dom/locale/de.js +18 -3
- package/dist/src/dom/locale/el.d.ts +18 -1
- package/dist/src/dom/locale/el.js +21 -4
- package/dist/src/dom/locale/en.d.ts +2 -1
- package/dist/src/dom/locale/en.js +2 -1
- package/dist/src/dom/locale/es-419.d.ts +18 -1
- package/dist/src/dom/locale/es-419.js +18 -1
- package/dist/src/dom/locale/es-ES.d.ts +18 -1
- package/dist/src/dom/locale/es-ES.js +18 -1
- package/dist/src/dom/locale/et.d.ts +16 -1
- package/dist/src/dom/locale/et.js +16 -1
- package/dist/src/dom/locale/fa.d.ts +21 -1
- package/dist/src/dom/locale/fa.js +23 -3
- package/dist/src/dom/locale/fi.d.ts +18 -1
- package/dist/src/dom/locale/fi.js +18 -1
- package/dist/src/dom/locale/fr-CA.d.ts +15 -1
- package/dist/src/dom/locale/fr-CA.js +15 -1
- package/dist/src/dom/locale/fr-FR.d.ts +18 -1
- package/dist/src/dom/locale/fr-FR.js +22 -5
- package/dist/src/dom/locale/gu.d.ts +23 -1
- package/dist/src/dom/locale/gu.js +27 -5
- package/dist/src/dom/locale/hi.d.ts +23 -1
- package/dist/src/dom/locale/hi.js +25 -3
- package/dist/src/dom/locale/hr.d.ts +16 -1
- package/dist/src/dom/locale/hr.js +19 -4
- package/dist/src/dom/locale/hu.d.ts +17 -1
- package/dist/src/dom/locale/hu.js +20 -4
- package/dist/src/dom/locale/hy.d.ts +23 -1
- package/dist/src/dom/locale/hy.js +26 -4
- package/dist/src/dom/locale/id.d.ts +17 -1
- package/dist/src/dom/locale/id.js +19 -3
- package/dist/src/dom/locale/index.js +1 -0
- package/dist/src/dom/locale/is.d.ts +21 -1
- package/dist/src/dom/locale/is.js +21 -1
- package/dist/src/dom/locale/it.d.ts +15 -1
- package/dist/src/dom/locale/it.js +20 -6
- package/dist/src/dom/locale/ja.d.ts +19 -1
- package/dist/src/dom/locale/ja.js +23 -5
- package/dist/src/dom/locale/ka.d.ts +23 -1
- package/dist/src/dom/locale/ka.js +23 -1
- package/dist/src/dom/locale/kk.d.ts +23 -1
- package/dist/src/dom/locale/kk.js +25 -3
- package/dist/src/dom/locale/kn.d.ts +22 -1
- package/dist/src/dom/locale/kn.js +26 -5
- package/dist/src/dom/locale/ko.d.ts +17 -1
- package/dist/src/dom/locale/ko.js +17 -1
- package/dist/src/dom/locale/lt.d.ts +18 -1
- package/dist/src/dom/locale/lt.js +20 -3
- package/dist/src/dom/locale/lv.d.ts +18 -1
- package/dist/src/dom/locale/lv.js +18 -1
- package/dist/src/dom/locale/mk.d.ts +22 -1
- package/dist/src/dom/locale/mk.js +26 -5
- package/dist/src/dom/locale/ml.d.ts +23 -1
- package/dist/src/dom/locale/ml.js +25 -3
- package/dist/src/dom/locale/mn.d.ts +23 -1
- package/dist/src/dom/locale/mn.js +23 -1
- package/dist/src/dom/locale/mr.d.ts +23 -1
- package/dist/src/dom/locale/mr.js +25 -3
- package/dist/src/dom/locale/ms.d.ts +20 -1
- package/dist/src/dom/locale/ms.js +20 -1
- package/dist/src/dom/locale/my.d.ts +22 -1
- package/dist/src/dom/locale/my.js +24 -3
- package/dist/src/dom/locale/nb.d.ts +17 -1
- package/dist/src/dom/locale/nb.js +17 -1
- package/dist/src/dom/locale/nl.d.ts +20 -2
- package/dist/src/dom/locale/nl.js +22 -4
- package/dist/src/dom/locale/pa.d.ts +23 -1
- package/dist/src/dom/locale/pa.js +27 -5
- package/dist/src/dom/locale/pl.d.ts +17 -1
- package/dist/src/dom/locale/pl.js +19 -3
- package/dist/src/dom/locale/pt-BR.d.ts +18 -1
- package/dist/src/dom/locale/pt-BR.js +20 -3
- package/dist/src/dom/locale/pt-PT.d.ts +18 -1
- package/dist/src/dom/locale/pt-PT.js +22 -5
- package/dist/src/dom/locale/ro.d.ts +15 -1
- package/dist/src/dom/locale/ro.js +18 -4
- package/dist/src/dom/locale/ru.d.ts +23 -1
- package/dist/src/dom/locale/ru.js +24 -2
- package/dist/src/dom/locale/sk.d.ts +17 -1
- package/dist/src/dom/locale/sk.js +19 -3
- package/dist/src/dom/locale/sl.d.ts +21 -1
- package/dist/src/dom/locale/sl.js +24 -4
- package/dist/src/dom/locale/so.d.ts +22 -1
- package/dist/src/dom/locale/so.js +24 -3
- package/dist/src/dom/locale/sq.d.ts +21 -1
- package/dist/src/dom/locale/sq.js +25 -5
- package/dist/src/dom/locale/sr.d.ts +24 -1
- package/dist/src/dom/locale/sr.js +25 -2
- package/dist/src/dom/locale/sv.d.ts +16 -1
- package/dist/src/dom/locale/sv.js +16 -1
- package/dist/src/dom/locale/sw.d.ts +18 -1
- package/dist/src/dom/locale/sw.js +18 -1
- package/dist/src/dom/locale/ta.d.ts +23 -1
- package/dist/src/dom/locale/ta.js +27 -5
- package/dist/src/dom/locale/te.d.ts +23 -1
- package/dist/src/dom/locale/te.js +27 -5
- package/dist/src/dom/locale/th.d.ts +11 -1
- package/dist/src/dom/locale/th.js +11 -1
- package/dist/src/dom/locale/tl.d.ts +8 -1
- package/dist/src/dom/locale/tl.js +8 -1
- package/dist/src/dom/locale/tr.d.ts +21 -1
- package/dist/src/dom/locale/tr.js +23 -3
- package/dist/src/dom/locale/types.d.ts +1 -1
- package/dist/src/dom/locale/uk.d.ts +23 -1
- package/dist/src/dom/locale/uk.js +25 -3
- package/dist/src/dom/locale/ur.d.ts +22 -1
- package/dist/src/dom/locale/ur.js +25 -4
- package/dist/src/dom/locale/vi.d.ts +22 -1
- package/dist/src/dom/locale/vi.js +25 -4
- package/dist/src/dom/locale/zh-HK.d.ts +21 -1
- package/dist/src/dom/locale/zh-HK.js +23 -3
- package/dist/src/dom/locale/zh-Hans.d.ts +23 -1
- package/dist/src/dom/locale/zh-Hans.js +27 -5
- package/dist/src/dom/locale/zh-TW.d.ts +23 -1
- package/dist/src/dom/locale/zh-TW.js +25 -3
- package/dist/src/dom/menus.js +26 -2
- package/dist/src/dom/selectors.d.ts +1 -0
- package/dist/src/dom/selectors.js +9 -1
- package/dist/src/dom/wait-snapshot.d.ts +1 -0
- package/dist/src/dom/wait-snapshot.js +45 -22
- package/dist/src/errors.d.ts +1 -1
- package/dist/src/errors.js +2 -2
- package/dist/src/platform/local-paths.d.ts +1 -0
- package/dist/src/platform/local-paths.js +7 -3
- package/dist/src/safety/risk.d.ts +1 -0
- package/dist/src/safety/risk.js +1 -0
- package/dist/src/scripts/apply-intelligence-locale-captures.d.ts +10 -1
- package/dist/src/scripts/apply-intelligence-locale-captures.js +219 -7
- package/dist/src/scripts/capture-intelligence-locales.d.ts +119 -1
- package/dist/src/scripts/capture-intelligence-locales.js +653 -232
- package/dist/src/scripts/capture-surface-profile.d.ts +3 -1
- package/dist/src/scripts/capture-surface-profile.js +75 -25
- package/dist/src/scripts/live-smoke/scenarios.d.ts +3 -0
- package/dist/src/scripts/live-smoke/scenarios.js +321 -13
- package/dist/src/scripts/live-smoke.js +1 -0
- package/dist/src/scripts/locale-capture/surface-graph.d.ts +31 -0
- package/dist/src/scripts/locale-capture/surface-graph.js +50 -0
- package/dist/src/scripts/release-canary-module.d.ts +20 -0
- package/dist/src/scripts/release-canary-module.js +86 -0
- package/dist/src/types.d.ts +30 -6
- package/package.json +8 -2
- package/references/2026-07-16-chat-work-surfaces.md +13 -0
- package/references/2026-08-08-model-selection-locale-sweep.md +32 -0
- package/references/backend-protocol.md +22 -7
- package/references/language-coverage.md +24 -13
- package/references/localization.md +36 -14
- package/references/python-parity.md +9 -3
- package/references/troubleshooting.md +26 -4
|
@@ -1,4 +1,78 @@
|
|
|
1
|
-
import type { BrowserLike, ExistingTabPolicy } from "../types.js";
|
|
1
|
+
import type { BrowserLike, ExistingTabPolicy, PageLike } from "../types.js";
|
|
2
|
+
import { type CoverageLanguage } from "./locale-capture/language-coverage.js";
|
|
3
|
+
import { type CapturedChatConfigurationRow, type CapturedWorkConfigurationRow } from "./locale-capture/surface-graph.js";
|
|
4
|
+
declare const SCHEMA_VERSION = "chatgpt.browser_control.intelligence_locale_capture.v1";
|
|
5
|
+
type CaptureStatus = "ok" | "blocked";
|
|
6
|
+
type CaptureRecord = {
|
|
7
|
+
schemaVersion: typeof SCHEMA_VERSION;
|
|
8
|
+
status: CaptureStatus;
|
|
9
|
+
capturedAt: string;
|
|
10
|
+
requestedLocale: string;
|
|
11
|
+
requestedNativeName: string;
|
|
12
|
+
htmlLang?: string | undefined;
|
|
13
|
+
url?: string | undefined;
|
|
14
|
+
menuHeading?: string | undefined;
|
|
15
|
+
intelligenceLabels?: string[] | undefined;
|
|
16
|
+
selectedIntelligenceLabel?: string | undefined;
|
|
17
|
+
versionFamilyLabels?: string[] | undefined;
|
|
18
|
+
modelVersionLabels?: string[] | undefined;
|
|
19
|
+
generationStopLabels?: string[] | undefined;
|
|
20
|
+
generationStoppedLabels?: string[] | undefined;
|
|
21
|
+
generationSignals?: string[] | undefined;
|
|
22
|
+
surfaceCapture?: LocaleSurfaceCapture | undefined;
|
|
23
|
+
warnings: string[];
|
|
24
|
+
blocker?: {
|
|
25
|
+
kind: string;
|
|
26
|
+
code: string;
|
|
27
|
+
message: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
type LocaleSurfaceCapture = {
|
|
31
|
+
schemaVersion: "chatgpt.browser_control.locale_surface_capture.v1";
|
|
32
|
+
status: CaptureStatus;
|
|
33
|
+
chat?: {
|
|
34
|
+
optionLabel: string;
|
|
35
|
+
composerLabels: string[];
|
|
36
|
+
power: CapturedPowerControl;
|
|
37
|
+
advanced: CapturedAdvancedControl;
|
|
38
|
+
configurationRows: CapturedChatConfigurationRow[];
|
|
39
|
+
};
|
|
40
|
+
work?: {
|
|
41
|
+
optionLabel: string;
|
|
42
|
+
composerLabels: string[];
|
|
43
|
+
power: CapturedPowerControl;
|
|
44
|
+
advanced: CapturedAdvancedControl;
|
|
45
|
+
configurationRows: CapturedWorkConfigurationRow[];
|
|
46
|
+
};
|
|
47
|
+
restoredChat: boolean;
|
|
48
|
+
warnings: string[];
|
|
49
|
+
blocker?: {
|
|
50
|
+
kind: "selector_drift";
|
|
51
|
+
code: string;
|
|
52
|
+
message: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
type CapturedPowerControl = {
|
|
56
|
+
axisLabel: string;
|
|
57
|
+
valueLabel: string;
|
|
58
|
+
minimum: number;
|
|
59
|
+
maximum: number;
|
|
60
|
+
value: number;
|
|
61
|
+
position: number;
|
|
62
|
+
count: number;
|
|
63
|
+
};
|
|
64
|
+
type CapturedAdvancedControl = {
|
|
65
|
+
label: string;
|
|
66
|
+
accessibleLabel?: string | undefined;
|
|
67
|
+
expanded: boolean;
|
|
68
|
+
initiallyExpanded?: boolean | undefined;
|
|
69
|
+
};
|
|
70
|
+
type CapturedConfigurationMenu<TRow extends CapturedChatConfigurationRow | CapturedWorkConfigurationRow> = {
|
|
71
|
+
openerLabel: string;
|
|
72
|
+
power: CapturedPowerControl;
|
|
73
|
+
advanced: CapturedAdvancedControl;
|
|
74
|
+
rows: TRow[];
|
|
75
|
+
};
|
|
2
76
|
type CaptureOptions = {
|
|
3
77
|
locale: string | undefined;
|
|
4
78
|
nativeName: string | undefined;
|
|
@@ -10,6 +84,7 @@ type CaptureOptions = {
|
|
|
10
84
|
locales: string[] | undefined;
|
|
11
85
|
openVersionSubmenu: boolean;
|
|
12
86
|
captureGenerationState: boolean;
|
|
87
|
+
captureSurfaces: boolean;
|
|
13
88
|
generationPrompt: string;
|
|
14
89
|
generationCaptureTimeoutMs: number;
|
|
15
90
|
restore: boolean;
|
|
@@ -23,6 +98,49 @@ type CaptureRuntime = {
|
|
|
23
98
|
agent?: unknown;
|
|
24
99
|
browser?: BrowserLike;
|
|
25
100
|
};
|
|
101
|
+
type GenerationUiSnapshot = {
|
|
102
|
+
controls: CapturedGenerationControl[];
|
|
103
|
+
shortLatestAssistantTexts: string[];
|
|
104
|
+
};
|
|
105
|
+
type CapturedGenerationControl = {
|
|
106
|
+
label: string;
|
|
107
|
+
text?: string | undefined;
|
|
108
|
+
ariaLabel?: string | undefined;
|
|
109
|
+
title?: string | undefined;
|
|
110
|
+
testId?: string | undefined;
|
|
111
|
+
role?: string | undefined;
|
|
112
|
+
};
|
|
113
|
+
type GenerationStateCapture = {
|
|
114
|
+
stopLabels: string[];
|
|
115
|
+
stoppedLabels: string[];
|
|
116
|
+
signals: string[];
|
|
117
|
+
warnings: string[];
|
|
118
|
+
submitted: boolean;
|
|
119
|
+
stopped: boolean;
|
|
120
|
+
};
|
|
121
|
+
type CaptureDependencies = {
|
|
122
|
+
captureIntelligencePicker: typeof captureIntelligencePicker;
|
|
123
|
+
captureGenerationStateLabels: typeof captureGenerationStateLabels;
|
|
124
|
+
};
|
|
26
125
|
export declare function main(argv?: string[], runtime?: CaptureRuntime): Promise<number>;
|
|
126
|
+
export declare function surfaceCaptureSucceeded(requested: boolean, capture: {
|
|
127
|
+
status: "ok" | "blocked";
|
|
128
|
+
restoredChat: boolean;
|
|
129
|
+
} | undefined): boolean;
|
|
27
130
|
export declare function parseArgs(argv: readonly string[]): CaptureOptions;
|
|
131
|
+
export declare function captureOne(page: PageLike, language: CoverageLanguage, options: CaptureOptions, knownLanguageNames: readonly string[], dependencies?: Partial<CaptureDependencies>): Promise<CaptureRecord>;
|
|
132
|
+
declare function captureIntelligencePicker(page: PageLike, options: CaptureOptions): Promise<{
|
|
133
|
+
htmlLang: string;
|
|
134
|
+
url: string;
|
|
135
|
+
menuHeading?: string;
|
|
136
|
+
intelligenceLabels: string[];
|
|
137
|
+
selectedIntelligenceLabel?: string;
|
|
138
|
+
versionFamilyLabels: string[];
|
|
139
|
+
modelVersionLabels: string[];
|
|
140
|
+
configuration: CapturedConfigurationMenu<CapturedChatConfigurationRow>;
|
|
141
|
+
}>;
|
|
142
|
+
declare function captureGenerationStateLabels(page: PageLike, options: Pick<CaptureOptions, "generationPrompt" | "generationCaptureTimeoutMs" | "settleMs">): Promise<GenerationStateCapture>;
|
|
143
|
+
export declare function generationStopLabels(before: GenerationUiSnapshot, active: GenerationUiSnapshot): string[];
|
|
144
|
+
export declare function snapshotLooksActive(snapshot: GenerationUiSnapshot): boolean;
|
|
145
|
+
export declare function stopGenerationIfVisible(page: PageLike, labels: readonly string[]): Promise<boolean>;
|
|
28
146
|
export {};
|