overleaf-codex 0.1.0-rc.1
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.
Potentially problematic release.
This version of overleaf-codex might be problematic. Click here for more details.
- package/LICENSE +21 -0
- package/NOTICE.md +25 -0
- package/README.md +217 -0
- package/assets/olcx-mark.svg +22 -0
- package/dist/auth/projectAuth.d.ts +19 -0
- package/dist/auth/projectAuth.js +163 -0
- package/dist/auth/projectAuth.js.map +1 -0
- package/dist/auth/redact.d.ts +3 -0
- package/dist/auth/redact.js +7 -0
- package/dist/auth/redact.js.map +1 -0
- package/dist/auth/types.d.ts +10 -0
- package/dist/auth/types.js +4 -0
- package/dist/auth/types.js.map +1 -0
- package/dist/backend/index.d.ts +6 -0
- package/dist/backend/index.js +2 -0
- package/dist/backend/index.js.map +1 -0
- package/dist/backend/olcli/client.d.ts +329 -0
- package/dist/backend/olcli/client.js +1757 -0
- package/dist/backend/olcli/client.js.map +1 -0
- package/dist/backend/olcli/index.d.ts +2 -0
- package/dist/backend/olcli/index.js +2 -0
- package/dist/backend/olcli/index.js.map +1 -0
- package/dist/backend/overleafBackend.d.ts +41 -0
- package/dist/backend/overleafBackend.js +200 -0
- package/dist/backend/overleafBackend.js.map +1 -0
- package/dist/backend/types.d.ts +73 -0
- package/dist/backend/types.js +2 -0
- package/dist/backend/types.js.map +1 -0
- package/dist/cli-behavior.d.ts +14 -0
- package/dist/cli-behavior.js +59 -0
- package/dist/cli-behavior.js.map +1 -0
- package/dist/cli.d.ts +30 -0
- package/dist/cli.js +441 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/auth.d.ts +21 -0
- package/dist/commands/auth.js +104 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/compile.d.ts +7 -0
- package/dist/commands/compile.js +73 -0
- package/dist/commands/compile.js.map +1 -0
- package/dist/commands/doctor.d.ts +11 -0
- package/dist/commands/doctor.js +9 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/endpoint.d.ts +23 -0
- package/dist/commands/endpoint.js +69 -0
- package/dist/commands/endpoint.js.map +1 -0
- package/dist/commands/init.d.ts +14 -0
- package/dist/commands/init.js +48 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/status.d.ts +4 -0
- package/dist/commands/status.js +5 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/sync.d.ts +26 -0
- package/dist/commands/sync.js +139 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/commands/watch.d.ts +28 -0
- package/dist/commands/watch.js +124 -0
- package/dist/commands/watch.js.map +1 -0
- package/dist/compile/compileFlow.d.ts +32 -0
- package/dist/compile/compileFlow.js +290 -0
- package/dist/compile/compileFlow.js.map +1 -0
- package/dist/compile/pdfOutput.d.ts +12 -0
- package/dist/compile/pdfOutput.js +64 -0
- package/dist/compile/pdfOutput.js.map +1 -0
- package/dist/config/ignoreRules.d.ts +5 -0
- package/dist/config/ignoreRules.js +53 -0
- package/dist/config/ignoreRules.js.map +1 -0
- package/dist/config/overleafProject.d.ts +9 -0
- package/dist/config/overleafProject.js +61 -0
- package/dist/config/overleafProject.js.map +1 -0
- package/dist/config/projectConfig.d.ts +6 -0
- package/dist/config/projectConfig.js +180 -0
- package/dist/config/projectConfig.js.map +1 -0
- package/dist/config/projectRoot.d.ts +1 -0
- package/dist/config/projectRoot.js +36 -0
- package/dist/config/projectRoot.js.map +1 -0
- package/dist/config/types.d.ts +50 -0
- package/dist/config/types.js +34 -0
- package/dist/config/types.js.map +1 -0
- package/dist/config/vscode.d.ts +10 -0
- package/dist/config/vscode.js +134 -0
- package/dist/config/vscode.js.map +1 -0
- package/dist/diagnostics/doctor.d.ts +8 -0
- package/dist/diagnostics/doctor.js +209 -0
- package/dist/diagnostics/doctor.js.map +1 -0
- package/dist/diagnostics/status.d.ts +6 -0
- package/dist/diagnostics/status.js +110 -0
- package/dist/diagnostics/status.js.map +1 -0
- package/dist/diagnostics/types.d.ts +33 -0
- package/dist/diagnostics/types.js +2 -0
- package/dist/diagnostics/types.js.map +1 -0
- package/dist/endpoint/overleafEndpoint.d.ts +36 -0
- package/dist/endpoint/overleafEndpoint.js +105 -0
- package/dist/endpoint/overleafEndpoint.js.map +1 -0
- package/dist/errors.d.ts +32 -0
- package/dist/errors.js +53 -0
- package/dist/errors.js.map +1 -0
- package/dist/sync/apply.d.ts +14 -0
- package/dist/sync/apply.js +92 -0
- package/dist/sync/apply.js.map +1 -0
- package/dist/sync/conflicts.d.ts +7 -0
- package/dist/sync/conflicts.js +59 -0
- package/dist/sync/conflicts.js.map +1 -0
- package/dist/sync/ignore.d.ts +5 -0
- package/dist/sync/ignore.js +74 -0
- package/dist/sync/ignore.js.map +1 -0
- package/dist/sync/plan.d.ts +3 -0
- package/dist/sync/plan.js +197 -0
- package/dist/sync/plan.js.map +1 -0
- package/dist/sync/snapshot.d.ts +13 -0
- package/dist/sync/snapshot.js +82 -0
- package/dist/sync/snapshot.js.map +1 -0
- package/dist/sync/state.d.ts +16 -0
- package/dist/sync/state.js +214 -0
- package/dist/sync/state.js.map +1 -0
- package/dist/sync/types.d.ts +113 -0
- package/dist/sync/types.js +4 -0
- package/dist/sync/types.js.map +1 -0
- package/dist/testing/fakeBackend.d.ts +27 -0
- package/dist/testing/fakeBackend.js +213 -0
- package/dist/testing/fakeBackend.js.map +1 -0
- package/dist/watch/queue.d.ts +2 -0
- package/dist/watch/queue.js +91 -0
- package/dist/watch/queue.js.map +1 -0
- package/dist/watch/types.d.ts +52 -0
- package/dist/watch/types.js +2 -0
- package/dist/watch/types.js.map +1 -0
- package/dist/watch/watcher.d.ts +6 -0
- package/dist/watch/watcher.js +58 -0
- package/dist/watch/watcher.js.map +1 -0
- package/dist/watch/workflow.d.ts +30 -0
- package/dist/watch/workflow.js +62 -0
- package/dist/watch/workflow.js.map +1 -0
- package/docs/architecture.md +603 -0
- package/docs/auth.md +65 -0
- package/docs/cli-behavior.md +95 -0
- package/docs/compile.md +51 -0
- package/docs/design.md +82 -0
- package/docs/endpoint.md +84 -0
- package/docs/npm-packaging.md +148 -0
- package/docs/quickdev-queue-audit.md +193 -0
- package/docs/release-gates.md +119 -0
- package/docs/release-notes-v1.md +97 -0
- package/docs/security.md +61 -0
- package/docs/sync-state.md +305 -0
- package/docs/sync.md +50 -0
- package/docs/troubleshooting.md +124 -0
- package/docs/usage.md +184 -0
- package/examples/minimal-paper/.olcx/auth.local.example.json +7 -0
- package/examples/minimal-paper/.olcx/config.json +23 -0
- package/examples/minimal-paper/README.md +88 -0
- package/examples/minimal-paper/main.tex +23 -0
- package/package.json +66 -0
- package/src/backend/olcli/LICENSE +21 -0
- package/src/backend/olcli/README.md +26 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# CLI Behavior
|
|
2
|
+
|
|
3
|
+
This document is the v1 command-line behavior contract for `olcx`. It defines
|
|
4
|
+
the user-facing behavior for auth, init, endpoint, sync, compile, watch,
|
|
5
|
+
status, and doctor workflows.
|
|
6
|
+
|
|
7
|
+
`olcx` is a lightweight CLI. It must not require local LaTeX for the core
|
|
8
|
+
workflow, must not silently overwrite local or remote changes, and must not
|
|
9
|
+
print credentials, cookies, session values, passwords, or private project
|
|
10
|
+
identifiers.
|
|
11
|
+
|
|
12
|
+
## Command Surface
|
|
13
|
+
|
|
14
|
+
| Command | Required parameters | Optional parameters | Environment variables | Interactive input | Non-interactive behavior |
|
|
15
|
+
| --- | --- | --- | --- | --- | --- |
|
|
16
|
+
| `olcx auth` | In non-interactive mode, one auth source is required: `--cookie <value>` or `--from-env <name>`. | `--cookie <value>`, `--from-env <name>`. | The variable named by `--from-env`; recommended local name is `OLCX_OVERLEAF_SESSION`. `OLCX_NON_INTERACTIVE=1` and `CI=true` force non-interactive mode. | In interactive mode, may prompt on stderr for a pasted session cookie. It must never ask for or store an Overleaf password. | If no auth source is available, fail with `USER_INPUT_ERROR` and print a next-step hint. Do not wait forever for input. |
|
|
17
|
+
| `olcx init --project <overleaf-url-or-id>` | `--project <overleaf-url-or-id>`. | None. | `OLCX_NON_INTERACTIVE=1` and `CI=true` force non-interactive mode. | None in v1. | Missing or invalid `--project` fails with `USER_INPUT_ERROR`; conflicting local files fail with an actionable error instead of overwriting. Init creates or repairs local VS Code settings/tasks by default. |
|
|
18
|
+
| `olcx endpoint status` | Bound project config. | None. | None. | None. | Reads `overleaf.baseUrl`, performs no network access, and returns `CONFIG_ERROR` if config is missing or invalid. |
|
|
19
|
+
| `olcx endpoint test` | Bound project config. | `--timeout <ms>`, `--apply`. | None. | None. | Probes only `https://www.overleaf.com/project` and `https://cn.overleaf.com/project`. Without `--apply`, never writes config. With `--apply`, writes only the fastest available endpoint. If both fail, returns `NETWORK_ERROR` and leaves config unchanged. Invalid timeout returns `USER_INPUT_ERROR`. |
|
|
20
|
+
| `olcx endpoint set cn` | Bound project config and endpoint alias `www` or `cn`. | None. | None. | None. | Writes `overleaf.baseUrl` without probing. Invalid aliases return `USER_INPUT_ERROR` and leave config unchanged. |
|
|
21
|
+
| `olcx sync` | Bound project config and auth. | `--dry-run`. | `OLCX_NON_INTERACTIVE=1` and `CI=true` force non-interactive mode. | None in v1. | Missing config returns `CONFIG_ERROR`; missing auth returns `AUTH_ERROR`; conflicts return `SYNC_CONFLICT`; `--dry-run` must not mutate local or remote files. |
|
|
22
|
+
| `olcx compile` | Bound project config and auth. | `--pdf <path>`, `--disable-fast-fallback`, `--fast-fallback-attempts <count>`, and `--fast-fallback-timeout <ms>`. | `OLCX_NON_INTERACTIVE=1` and `CI=true` force non-interactive mode. | None in v1. | Missing config returns `CONFIG_ERROR`; missing auth returns `AUTH_ERROR`; network failures return `NETWORK_ERROR`; compile failures or timeouts return `COMPILE_FAILED`. |
|
|
23
|
+
| `olcx watch` | Bound project config and auth. | `--debounce <ms>` defaults to `2500`. | `OLCX_NON_INTERACTIVE=1` and `CI=true` force non-interactive mode. | None in v1. | Must not prompt while watching. On sync conflict or compile failure, pause the automatic loop and print the next manual command to run. |
|
|
24
|
+
| `olcx status` | None. | None. | `OLCX_NON_INTERACTIVE=1` and `CI=true` force non-interactive mode. | None. | Must return a redacted local summary. Missing config or auth is reported as status, not as leaked detail. |
|
|
25
|
+
| `olcx doctor` | None. | None. | `OLCX_NON_INTERACTIVE=1` and `CI=true` force non-interactive mode. | None. | Must run local checks without real Overleaf access by default. Failures return the most specific exit code and a next-step hint. |
|
|
26
|
+
|
|
27
|
+
## Exit Codes
|
|
28
|
+
|
|
29
|
+
| Name | Number | Meaning |
|
|
30
|
+
| --- | ---: | --- |
|
|
31
|
+
| `SUCCESS` | `0` | Successful command, help, or version output. |
|
|
32
|
+
| `INTERNAL_ERROR` | `1` | Unexpected thrown error or uncategorized local I/O failure. |
|
|
33
|
+
| `USER_INPUT_ERROR` | `2` | Invalid arguments, missing required options, invalid option values, unsupported command usage, or required non-interactive input not provided. |
|
|
34
|
+
| `CONFIG_ERROR` | `3` | Missing or invalid `.olcx/config.json`. |
|
|
35
|
+
| `AUTH_ERROR` | `4` | Missing, invalid, expired, or rejected project-local auth. |
|
|
36
|
+
| `NETWORK_ERROR` | `5` | Backend network or protocol failure while talking to Overleaf. |
|
|
37
|
+
| `SYNC_CONFLICT` | `6` | Sync conflict or unsafe sync operation that pauses instead of overwriting. |
|
|
38
|
+
| `COMPILE_FAILED` | `7` | Overleaf compile failure, compile timeout, or failed PDF retrieval. |
|
|
39
|
+
|
|
40
|
+
## Output Streams
|
|
41
|
+
|
|
42
|
+
- stdout is for successful command results, help, version output, status
|
|
43
|
+
summaries, dry-run summaries, sync plans, compile summaries, and future JSON
|
|
44
|
+
payloads.
|
|
45
|
+
- stderr is for prompts, warnings, errors, conflict notices, compile failure
|
|
46
|
+
summaries, and next-step hints.
|
|
47
|
+
- A failed command must not write partial machine-readable data to stdout. It
|
|
48
|
+
should write a redacted error and a `Next:` hint to stderr.
|
|
49
|
+
- Help requested directly with `--help` exits `0`. Help shown after a usage
|
|
50
|
+
error exits `2`.
|
|
51
|
+
- Endpoint test failures where neither `www` nor `cn` is reachable write the
|
|
52
|
+
formatted probe result to stderr and exit `NETWORK_ERROR`.
|
|
53
|
+
- `olcx endpoint test --apply` writes `.olcx/config.json` only after a
|
|
54
|
+
successful probe finds at least one reachable endpoint.
|
|
55
|
+
|
|
56
|
+
## Human Output
|
|
57
|
+
|
|
58
|
+
- Human-readable output should be short, direct, and actionable.
|
|
59
|
+
- Failure output uses this shape:
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
Error: <redacted failure message>
|
|
63
|
+
Next: <one command or action the user can take>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
- Stack traces are not printed for expected failures.
|
|
67
|
+
- Commands must not use local LaTeX in the core compile path.
|
|
68
|
+
- When fast/draft fallback produces the PDF, stdout must show
|
|
69
|
+
`Status: fallback-success` and a `Fallback: fast/draft` line. The command must
|
|
70
|
+
not present the fallback PDF as a full normal compile artifact.
|
|
71
|
+
|
|
72
|
+
## Future JSON Output
|
|
73
|
+
|
|
74
|
+
JSON output is reserved for a future `--json` mode. Until that mode is
|
|
75
|
+
implemented, command implementations must not print ad hoc JSON. When
|
|
76
|
+
introduced, JSON payloads will go to stdout, warnings and errors will remain on
|
|
77
|
+
stderr, and secrets will still be redacted before serialization.
|
|
78
|
+
|
|
79
|
+
## Redaction
|
|
80
|
+
|
|
81
|
+
All command output, errors, diagnostics, test fixtures, snapshots, docs, and
|
|
82
|
+
handoff reports must redact:
|
|
83
|
+
|
|
84
|
+
- Overleaf cookies and session values.
|
|
85
|
+
- Password-like, token-like, auth-like, and CSRF-like values.
|
|
86
|
+
- Account-private values such as raw emails when they appear in errors or
|
|
87
|
+
diagnostic details.
|
|
88
|
+
- Overleaf project URLs and project-id-like values.
|
|
89
|
+
- Endpoint base URLs such as `https://www.overleaf.com` and
|
|
90
|
+
`https://cn.overleaf.com` are not secrets, but project URLs under either host
|
|
91
|
+
must be redacted.
|
|
92
|
+
|
|
93
|
+
Use placeholders such as `<redacted-secret>`, `<redacted-account>`, and
|
|
94
|
+
`<redacted-project-id>`. Do not write real credentials or private project IDs to
|
|
95
|
+
tests, fixtures, docs, QuickDev handoff files, terminal output, or CI logs.
|
package/docs/compile.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Compile
|
|
2
|
+
|
|
3
|
+
`olcx compile` asks Overleaf to compile the bound project and downloads the PDF.
|
|
4
|
+
The core workflow does not require local LaTeX.
|
|
5
|
+
|
|
6
|
+
## Default Compile
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
olcx compile
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
The default PDF output path is:
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
build/overleaf/main.pdf
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## PDF Path
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
olcx compile --pdf build/overleaf/main.pdf
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Use `--pdf` when a project needs a different local preview path.
|
|
25
|
+
|
|
26
|
+
## Fast Fallback
|
|
27
|
+
|
|
28
|
+
`olcx compile` can use a fast/draft fallback when normal compilation times out.
|
|
29
|
+
For debugging, compare these modes:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
olcx compile --disable-fast-fallback
|
|
33
|
+
olcx compile --fast-fallback-timeout 60000
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
When fallback produces the PDF, command output includes `Status:
|
|
37
|
+
fallback-success` and `Fallback: fast/draft`. Treat that PDF as a recovery
|
|
38
|
+
artifact, not a full normal compile result.
|
|
39
|
+
|
|
40
|
+
If both modes fail, inspect the compile output, fix the LaTeX source locally or
|
|
41
|
+
on Overleaf, run `olcx sync --dry-run`, and compile again.
|
|
42
|
+
|
|
43
|
+
## Troubleshooting
|
|
44
|
+
|
|
45
|
+
If the PDF is not updated, check the exact file path and timestamp:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
olcx compile
|
|
49
|
+
ls -l build/overleaf/main.pdf
|
|
50
|
+
olcx status
|
|
51
|
+
```
|
package/docs/design.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Design
|
|
2
|
+
|
|
3
|
+
## Product intent
|
|
4
|
+
|
|
5
|
+
`olcx` connects a local paper repository to one Overleaf project. The local side
|
|
6
|
+
owns editing, Git history, VS Code preview, and Codex-assisted writing. Overleaf
|
|
7
|
+
owns LaTeX compilation and PDF generation.
|
|
8
|
+
|
|
9
|
+
The target experience is:
|
|
10
|
+
|
|
11
|
+
1. Author edits locally.
|
|
12
|
+
2. `olcx watch` detects a quiet period after changes.
|
|
13
|
+
3. `olcx` synchronizes safe changes with Overleaf.
|
|
14
|
+
4. `olcx` triggers Overleaf compilation.
|
|
15
|
+
5. `olcx` downloads the PDF to `build/overleaf/main.pdf`.
|
|
16
|
+
6. VS Code previews that file.
|
|
17
|
+
|
|
18
|
+
## Architecture
|
|
19
|
+
|
|
20
|
+
The first implementation is an npm/TypeScript CLI named `olcx`.
|
|
21
|
+
|
|
22
|
+
The Overleaf backend will be based on a one-time integration of MIT-licensed
|
|
23
|
+
`aloth/olcli` code. Users install `olcx` only; they do not install `olcli`
|
|
24
|
+
separately. This repository owns future behavior, maintenance, docs, and release
|
|
25
|
+
packaging.
|
|
26
|
+
|
|
27
|
+
The CLI should remain split into small units:
|
|
28
|
+
|
|
29
|
+
- command parsing and user-facing output;
|
|
30
|
+
- project config and auth file handling;
|
|
31
|
+
- Overleaf backend adapter;
|
|
32
|
+
- sync and conflict policy;
|
|
33
|
+
- compile and PDF download flow;
|
|
34
|
+
- watch and debounce queue;
|
|
35
|
+
- diagnostics.
|
|
36
|
+
|
|
37
|
+
## Project-local state
|
|
38
|
+
|
|
39
|
+
Each real paper repository has a `.olcx/` directory.
|
|
40
|
+
|
|
41
|
+
`config.json` is intended to be shareable:
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"projectId": "overleaf-project-id",
|
|
46
|
+
"pdfPath": "build/overleaf/main.pdf",
|
|
47
|
+
"sync": {
|
|
48
|
+
"mode": "bidirectional",
|
|
49
|
+
"conflictPolicy": "pause"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`auth.local.json` is local-only:
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"account": "user@example.com",
|
|
59
|
+
"sessionCookie": "redacted",
|
|
60
|
+
"updatedAt": "2026-06-25T00:00:00.000Z"
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The exact schema can evolve, but auth stays project-local and ignored by Git.
|
|
65
|
+
|
|
66
|
+
## Sync policy
|
|
67
|
+
|
|
68
|
+
The default sync mode is bidirectional, but not destructive.
|
|
69
|
+
|
|
70
|
+
If local and Overleaf versions changed the same file, `olcx` pauses the automatic
|
|
71
|
+
queue and reports the conflict. It must not choose a winner silently. Manual
|
|
72
|
+
commands can later resolve conflicts by choosing local, remote, or a user-merged
|
|
73
|
+
file.
|
|
74
|
+
|
|
75
|
+
## Non-goals for v1
|
|
76
|
+
|
|
77
|
+
- No GUI.
|
|
78
|
+
- No VS Code extension.
|
|
79
|
+
- No local LaTeX dependency.
|
|
80
|
+
- No multi-project workspace manager.
|
|
81
|
+
- No silent overwrites.
|
|
82
|
+
- No committed credentials or cookies.
|
package/docs/endpoint.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Endpoint Management
|
|
2
|
+
|
|
3
|
+
`olcx` supports the public Overleaf web endpoints:
|
|
4
|
+
|
|
5
|
+
- `https://www.overleaf.com`
|
|
6
|
+
- `https://cn.overleaf.com`
|
|
7
|
+
|
|
8
|
+
The default is `https://www.overleaf.com`. Endpoint selection is manual by
|
|
9
|
+
default and is stored per paper repository.
|
|
10
|
+
|
|
11
|
+
## Status
|
|
12
|
+
|
|
13
|
+
Show the configured endpoint without network access:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
olcx endpoint status
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
This reads `.olcx/config.json` and prints the current alias and URL.
|
|
20
|
+
|
|
21
|
+
## Read-only Test
|
|
22
|
+
|
|
23
|
+
Probe public endpoint reachability:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
olcx endpoint test
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`olcx endpoint test` probes only:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
https://www.overleaf.com/project
|
|
33
|
+
https://cn.overleaf.com/project
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
It does not sync, upload, compile, validate auth, read project-specific URLs, or
|
|
37
|
+
modify remote projects. Without `--apply`, it never writes config.
|
|
38
|
+
|
|
39
|
+
## Manual Switch
|
|
40
|
+
|
|
41
|
+
Set the endpoint explicitly:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
olcx endpoint set cn
|
|
45
|
+
olcx endpoint set www
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
This writes `.olcx/config.json` and does not contact Overleaf.
|
|
49
|
+
|
|
50
|
+
## Apply Fastest Available
|
|
51
|
+
|
|
52
|
+
Probe both endpoints and write the fastest reachable one:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
olcx endpoint test --apply
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
`--apply` writes config only when at least one endpoint is available. If both
|
|
59
|
+
endpoints fail, `olcx` returns `NETWORK_ERROR`, prints both redacted failure
|
|
60
|
+
reasons, and leaves `.olcx/config.json` unchanged.
|
|
61
|
+
|
|
62
|
+
## Configuration
|
|
63
|
+
|
|
64
|
+
Endpoint state lives in `overleaf.baseUrl`:
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"overleaf": {
|
|
69
|
+
"baseUrl": "https://www.overleaf.com"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Allowed values are `https://www.overleaf.com` and `https://cn.overleaf.com`.
|
|
75
|
+
Legacy configs without `overleaf.baseUrl` default to `https://www.overleaf.com`
|
|
76
|
+
in memory.
|
|
77
|
+
|
|
78
|
+
## Security
|
|
79
|
+
|
|
80
|
+
Endpoint base URLs are not secrets. Probe failure messages are still redacted
|
|
81
|
+
because network errors can include cookies, session values, project URLs, or
|
|
82
|
+
project-id-like strings. Do not paste real cookies, account labels, private
|
|
83
|
+
project IDs, or private paper content into docs, tests, issues, or handoff
|
|
84
|
+
files.
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# npm Packaging
|
|
2
|
+
|
|
3
|
+
The npm package is intentionally small and user-facing. Check it with:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm pack --dry-run --json --ignore-scripts
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
`npm run prepublish:check` runs the same dry-run package inspection after build,
|
|
10
|
+
typecheck, tests, audit, license checks, notice checks, and release text scans.
|
|
11
|
+
|
|
12
|
+
## Required Package Surface
|
|
13
|
+
|
|
14
|
+
The package must include:
|
|
15
|
+
|
|
16
|
+
- `dist/`
|
|
17
|
+
- `docs/`
|
|
18
|
+
- `examples/`
|
|
19
|
+
- `assets/`
|
|
20
|
+
- `README.md`
|
|
21
|
+
- `LICENSE`
|
|
22
|
+
- `NOTICE.md`
|
|
23
|
+
- `package.json`
|
|
24
|
+
- `src/backend/olcli/LICENSE`
|
|
25
|
+
- `src/backend/olcli/README.md`
|
|
26
|
+
|
|
27
|
+
Focused user docs such as `docs/usage.md`, `docs/auth.md`, `docs/endpoint.md`,
|
|
28
|
+
`docs/sync.md`, `docs/compile.md`, `docs/troubleshooting.md`,
|
|
29
|
+
`docs/release-gates.md`, `docs/npm-packaging.md`, and
|
|
30
|
+
`docs/release-notes-v1.md` are required package files.
|
|
31
|
+
|
|
32
|
+
## Excluded Content
|
|
33
|
+
|
|
34
|
+
The package gate rejects tests, scripts, `.github/`, `tmp/`, `node_modules/`,
|
|
35
|
+
local auth files, local or secret JSON files, environment files, logs, generated
|
|
36
|
+
Overleaf output, and real E2E output.
|
|
37
|
+
|
|
38
|
+
The only tracked `.olcx` files allowed in the package are sanitized example
|
|
39
|
+
files under `examples/minimal-paper/`.
|
|
40
|
+
|
|
41
|
+
## Manual npm Publish
|
|
42
|
+
|
|
43
|
+
Run all release gates before any manual publish:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm run build
|
|
47
|
+
npm run typecheck
|
|
48
|
+
npm test
|
|
49
|
+
OLCX_E2E_IGNORE_LOCAL_ENV=1 OLCX_E2E_ENABLE_REAL=0 npm run test:e2e:real
|
|
50
|
+
npm audit --audit-level=high
|
|
51
|
+
npm pack --dry-run --json --ignore-scripts
|
|
52
|
+
npm run prepublish:check
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Confirm the package name and current registry state before publishing:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npm view overleaf-codex version
|
|
59
|
+
npm login
|
|
60
|
+
npm whoami
|
|
61
|
+
npm publish --dry-run
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
For the current unscoped package name, the real manual publish command is:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npm publish
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
If the package is ever renamed to a scoped public package, use
|
|
71
|
+
`npm publish --access public` and update `package.json`, this document, the
|
|
72
|
+
Trusted Publisher binding, and the workflow tests together.
|
|
73
|
+
|
|
74
|
+
Interactive npm publishes or package settings changes can prompt for `2FA` or
|
|
75
|
+
an `OTP`. Enter those values only in the npm prompt. Do not write OTPs,
|
|
76
|
+
passwords, npm auth values, or session values into docs, scripts, CI, or Git.
|
|
77
|
+
|
|
78
|
+
Stable release is not approved until a sanitized disposable real Overleaf E2E pass is recorded. The forced skip smoke is not a stable-release substitute.
|
|
79
|
+
|
|
80
|
+
## GitHub Actions Trusted Publishing
|
|
81
|
+
|
|
82
|
+
Prefer GitHub Actions Trusted Publisher configuration over long-lived npm
|
|
83
|
+
tokens. The repository workflow is `.github/workflows/npm-publish.yml`; it uses
|
|
84
|
+
OIDC with `permissions: id-token: write` and publishes only from explicit
|
|
85
|
+
GitHub release publication events.
|
|
86
|
+
|
|
87
|
+
Do not configure repository `NPM_TOKEN`, `NODE_AUTH_TOKEN`, npm automation
|
|
88
|
+
token material, `_authToken`, or a checked-in `.npmrc` for publishing.
|
|
89
|
+
|
|
90
|
+
Configure the npm Trusted Publisher binding on npm with these fields:
|
|
91
|
+
|
|
92
|
+
- `owner: umiskky`
|
|
93
|
+
- `repository: overleaf-codex`
|
|
94
|
+
- `workflow filename: npm-publish.yml`
|
|
95
|
+
- `environment: npm-publish`
|
|
96
|
+
- `package: overleaf-codex`
|
|
97
|
+
- `allowed action: npm publish`
|
|
98
|
+
|
|
99
|
+
The workflow runs on GitHub-hosted `ubuntu-latest`, installs a trusted
|
|
100
|
+
publishing capable npm CLI, runs the forced E2E skip smoke, then runs
|
|
101
|
+
`npm run prepublish:check` before `npm publish --tag "$NPM_DIST_TAG"`.
|
|
102
|
+
Trusted publishing is expected to generate npm provenance automatically; verify
|
|
103
|
+
the published package provenance after release from npm or the package page.
|
|
104
|
+
|
|
105
|
+
## Version, Tag, And Release Strategy
|
|
106
|
+
|
|
107
|
+
GitHub release tags must match the `package.json` version exactly after removing
|
|
108
|
+
the leading `v`.
|
|
109
|
+
|
|
110
|
+
- Stable package versions use non-prerelease GitHub releases such as `vX.Y.Z`
|
|
111
|
+
and publish with npm dist-tag `latest`.
|
|
112
|
+
- Prerelease package versions use GitHub prereleases such as `vX.Y.Z-rc.1` and
|
|
113
|
+
publish with npm dist-tag `next`.
|
|
114
|
+
|
|
115
|
+
The stable workflow path checks `docs/release-notes-v1.md` for explicit stable
|
|
116
|
+
approval and a concrete sanitized real E2E artifact reference before publishing
|
|
117
|
+
`latest`. The required format is:
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
Sanitized real E2E artifact: gh-release://umiskky/overleaf-codex/vX.Y.Z/sanitized-real-e2e.md
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Concrete sanitized real E2E artifact reference means the path names a reviewed
|
|
124
|
+
release artifact. Placeholder text such as `not recorded`, `placeholder`, or
|
|
125
|
+
`not evidence` must be removed before stable npm publish can proceed.
|
|
126
|
+
|
|
127
|
+
## Stable Release Block
|
|
128
|
+
|
|
129
|
+
Stable npm publication remains blocked in the current repository state. The
|
|
130
|
+
release notes must continue to say the release is not approved until the
|
|
131
|
+
sanitized disposable real Overleaf E2E result is recorded and reviewed.
|
|
132
|
+
|
|
133
|
+
The forced skip smoke proves CI does not read local E2E secrets or contact
|
|
134
|
+
Overleaf. It is required for safety, but it is not proof that a disposable real
|
|
135
|
+
Overleaf project passed the E2E flow.
|
|
136
|
+
|
|
137
|
+
## Rollback, Unpublish, And Deprecate
|
|
138
|
+
|
|
139
|
+
Prefer fixing forward with a new patch version for a bad release. If users need
|
|
140
|
+
a warning on an already-published version, use:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
npm deprecate overleaf-codex@<version> "<message>"
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
`npm unpublish overleaf-codex@<version>` is time-limited and policy-limited.
|
|
147
|
+
After a version has been published, that exact package name and version cannot
|
|
148
|
+
be reused. Use unpublish only when npm policy allows it and deprecate otherwise.
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
# QuickDev Queue Audit
|
|
2
|
+
|
|
3
|
+
## Scope And Inputs
|
|
4
|
+
|
|
5
|
+
Audit timestamp: `2026-06-25T18:53:52+08:00`.
|
|
6
|
+
|
|
7
|
+
Source of truth for the current queue is `todo.md` as observed top to bottom during this audit. `done.md` contains no completed task blocks. The audit is documentation-only: no task was marked complete, blocked, skipped, deleted, archived, or reordered.
|
|
8
|
+
|
|
9
|
+
Files inspected:
|
|
10
|
+
|
|
11
|
+
- `AGENTS.md`
|
|
12
|
+
- `goal.md`
|
|
13
|
+
- `todo.md`
|
|
14
|
+
- `done.md`
|
|
15
|
+
- `package.json`
|
|
16
|
+
- `README.md`
|
|
17
|
+
- `ROADMAP.md`
|
|
18
|
+
- `docs/design.md`
|
|
19
|
+
- `docs/usage.md`
|
|
20
|
+
- `docs/security.md`
|
|
21
|
+
- every current `tmp/*/00-task.md` handoff copy for the 20 queued tasks
|
|
22
|
+
- current `git status --short`
|
|
23
|
+
|
|
24
|
+
Important input note: `todo.md` has the current task text. The current real E2E queue block is more specific than its `00-task.md` handoff copy because it names placeholder environment variables and says missing local secrets should block rather than prompting for values. Use the current `todo.md` block when that task is executed, or refresh the handoff copy before planning it.
|
|
25
|
+
|
|
26
|
+
## Current Queue
|
|
27
|
+
|
|
28
|
+
| Pos | Task ID | Title | Status | Created At | Handoff Dir |
|
|
29
|
+
| --- | --- | --- | --- | --- | --- |
|
|
30
|
+
| 1 | `20260625-163340-992326` | 审计 QuickDev 队列顺序与任务可执行性 | `todo` | `2026-06-25T16:33:40+08:00` | `tmp/20260625-163340-992326-审计 QuickDev 队列顺序与任务可执行性` |
|
|
31
|
+
| 2 | `20260625-163153-333824` | 冻结 v1 架构模块与公共接口契约 | `todo` | `2026-06-25T16:31:53+08:00` | `tmp/20260625-163153-333824-冻结 v1 架构模块与公共接口契约` |
|
|
32
|
+
| 3 | `20260625-163246-549133` | 统一 CLI 行为输出与退出码规范 | `todo` | `2026-06-25T16:32:46+08:00` | `tmp/20260625-163246-549133-统一 CLI 行为输出与退出码规范` |
|
|
33
|
+
| 4 | `20260625-163308-046461` | 定义同步状态机快照与冲突报告格式 | `todo` | `2026-06-25T16:33:08+08:00` | `tmp/20260625-163308-046461-定义同步状态机快照与冲突报告格式` |
|
|
34
|
+
| 5 | `20260625-160751-353900` | 引入 olcli 后端代码与许可证合规 | `todo` | `2026-06-25T16:07:51+08:00` | `tmp/20260625-160751-353900-引入 olcli 后端代码与许可证合规` |
|
|
35
|
+
| 6 | `20260625-160853-429297` | 实现 Overleaf 后端适配层 | `todo` | `2026-06-25T16:08:53+08:00` | `tmp/20260625-160853-429297-实现 Overleaf 后端适配层` |
|
|
36
|
+
| 7 | `20260625-160804-867992` | 建立项目配置认证与安全基础设施 | `todo` | `2026-06-25T16:08:04+08:00` | `tmp/20260625-160804-867992-建立项目配置认证与安全基础设施` |
|
|
37
|
+
| 8 | `20260625-160819-417512` | 实现 olcx init 与 VS Code 配置生成 | `todo` | `2026-06-25T16:08:19+08:00` | `tmp/20260625-160819-417512-实现 olcx init 与 VS Code 配置生成` |
|
|
38
|
+
| 9 | `20260625-160836-699088` | 实现 olcx auth status doctor | `todo` | `2026-06-25T16:08:36+08:00` | `tmp/20260625-160836-699088-实现 olcx auth status doctor` |
|
|
39
|
+
| 10 | `20260625-160912-750072` | 实现安全双向同步与冲突暂停 | `todo` | `2026-06-25T16:09:12+08:00` | `tmp/20260625-160912-750072-实现安全双向同步与冲突暂停` |
|
|
40
|
+
| 11 | `20260625-160925-146032` | 实现远程编译和 PDF 下载 | `todo` | `2026-06-25T16:09:25+08:00` | `tmp/20260625-160925-146032-实现远程编译和 PDF 下载` |
|
|
41
|
+
| 12 | `20260625-165248-545991` | 实现 Overleaf 编译超时快速模式降级恢复 | `todo` | `2026-06-25T16:52:48+08:00` | `tmp/20260625-165248-545991-实现 Overleaf 编译超时快速模式降级恢复` |
|
|
42
|
+
| 13 | `20260625-160938-324045` | 实现 olcx watch 自动工作流 | `todo` | `2026-06-25T16:09:38+08:00` | `tmp/20260625-160938-324045-实现 olcx watch 自动工作流` |
|
|
43
|
+
| 14 | `20260625-162413-873208` | 全链路本地沙箱回归测试 | `todo` | `2026-06-25T16:24:13+08:00` | `tmp/20260625-162413-873208-全链路本地沙箱回归测试` |
|
|
44
|
+
| 15 | `20260625-160946-910101` | 真实 Overleaf 集成 E2E 测试 | `todo` | `2026-06-25T16:09:46+08:00` | `tmp/20260625-160946-910101-真实 Overleaf 集成 E2E 测试` |
|
|
45
|
+
| 16 | `20260625-162426-756284` | 跨平台与无头环境兼容性验证 | `todo` | `2026-06-25T16:24:26+08:00` | `tmp/20260625-162426-756284-跨平台与无头环境兼容性验证` |
|
|
46
|
+
| 17 | `20260625-162438-154174` | 安全许可证与供应链发布门禁 | `todo` | `2026-06-25T16:24:38+08:00` | `tmp/20260625-162438-154174-安全许可证与供应链发布门禁` |
|
|
47
|
+
| 18 | `20260625-162447-918619` | 示例论文项目与故障排查资料 | `todo` | `2026-06-25T16:24:47+08:00` | `tmp/20260625-162447-918619-示例论文项目与故障排查资料` |
|
|
48
|
+
| 19 | `20260625-161006-526237` | 文档发布与社区维护完善 | `todo` | `2026-06-25T16:10:06+08:00` | `tmp/20260625-161006-526237-文档发布与社区维护完善` |
|
|
49
|
+
| 20 | `20260625-162518-364796` | v1 发布候选总验收与冻结 | `todo` | `2026-06-25T16:25:18+08:00` | `tmp/20260625-162518-364796-v1 发布候选总验收与冻结` |
|
|
50
|
+
|
|
51
|
+
## Completeness Matrix
|
|
52
|
+
|
|
53
|
+
All current task blocks contain the required QuickDev fields: target/goal, scope, acceptance criteria, constraints, and notes. The matrix focuses on whether the text is sufficient for independent `plan`, `actor`, and `verify` roles.
|
|
54
|
+
|
|
55
|
+
| Pos | Task ID | Required Fields | Implementation Context | Actor Executable | Verifier Independent | Main Prerequisites Or Blockers |
|
|
56
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
57
|
+
| 1 | `20260625-163340-992326` | Present | Sufficient for docs audit | Yes | Yes | None; current audit task |
|
|
58
|
+
| 2 | `20260625-163153-333824` | Present | Sufficient; builds on existing design docs | Yes | Yes | Should run before most implementation tasks |
|
|
59
|
+
| 3 | `20260625-163246-549133` | Present | Sufficient after architecture contract | Yes | Yes | Depends on architecture vocabulary and command list |
|
|
60
|
+
| 4 | `20260625-163308-046461` | Present | Sufficient after architecture contract | Yes | Yes | Depends on architecture vocabulary; should precede sync/watch |
|
|
61
|
+
| 5 | `20260625-160751-353900` | Present | Sufficient, but requires current olcli source/license lookup | Yes | Yes | Architecture should define adapter boundary; network access may be needed |
|
|
62
|
+
| 6 | `20260625-160853-429297` | Present | Sufficient after olcli import and architecture contract | Yes | Yes | Depends on olcli import, backend interface, and auth model |
|
|
63
|
+
| 7 | `20260625-160804-867992` | Present | Sufficient; security paths are documented | Yes | Yes | Should follow CLI behavior contract; should precede command flows |
|
|
64
|
+
| 8 | `20260625-160819-417512` | Present | Sufficient after config/auth and CLI behavior | Yes | Yes | Depends on config schema, ignore rules, CLI output/exit codes |
|
|
65
|
+
| 9 | `20260625-160836-699088` | Present | Sufficient after config/auth, init, CLI behavior | Yes | Yes | Uses placeholder auth values only; no real account required |
|
|
66
|
+
| 10 | `20260625-160912-750072` | Present | Sufficient after sync state, backend, config/auth | Yes | Yes | Depends on fake backend, sync plan contract, ignore rules |
|
|
67
|
+
| 11 | `20260625-160925-146032` | Present | Sufficient after backend, config/auth, CLI behavior | Yes | Yes | Depends on compile adapter and PDF path ownership |
|
|
68
|
+
| 12 | `20260625-165248-545991` | Present | Medium; real private interface behavior is uncertain | Yes with fake tests | Yes for fake tests | Depends on compile flow and adapter; real behavior belongs in E2E |
|
|
69
|
+
| 13 | `20260625-160938-324045` | Present | Sufficient after sync and compile | Yes | Yes | Depends on sync safety, compile command, watch queue contract |
|
|
70
|
+
| 14 | `20260625-162413-873208` | Present | Sufficient after core fake-backend commands exist | Yes | Yes | Depends on init, auth, sync, compile, watch flows |
|
|
71
|
+
| 15 | `20260625-160946-910101` | Present | Sufficient in current `todo.md`; handoff copy should be refreshed | Conditional | Conditional | Requires pre-provided local E2E placeholders; blocks if missing or invalid |
|
|
72
|
+
| 16 | `20260625-162426-756284` | Present | Sufficient but broad | Yes | Yes | Depends on stable core behavior; CI/platform access needed |
|
|
73
|
+
| 17 | `20260625-162438-154174` | Present | Sufficient after code and notices stabilize | Yes | Yes | Depends on olcli notice state and package contents |
|
|
74
|
+
| 18 | `20260625-162447-918619` | Present | Sufficient after core commands and docs stabilize | Yes | Yes | Must use placeholders only; depends on stable config examples |
|
|
75
|
+
| 19 | `20260625-161006-526237` | Present | Sufficient but broad final-doc task | Yes | Yes | Depends on core implementation, examples, gates, E2E decision |
|
|
76
|
+
| 20 | `20260625-162518-364796` | Present | Sufficient as final gate | Yes | Yes | Must wait for all prior tasks; cannot fake real E2E status |
|
|
77
|
+
|
|
78
|
+
## Dependency Graph
|
|
79
|
+
|
|
80
|
+
Primary prerequisite relationships:
|
|
81
|
+
|
|
82
|
+
- `20260625-163340-992326` audit completes first so any queue reorder has a documented basis.
|
|
83
|
+
- `20260625-163153-333824` architecture contract should precede CLI, config/auth, backend, sync, compile, watch, diagnostics, fixtures, and docs that refer to internal module boundaries.
|
|
84
|
+
- `20260625-163246-549133` CLI behavior and exit-code contract should precede command implementation tasks: init, auth/status/doctor, sync, compile, watch, status-like diagnostics, and integration tests.
|
|
85
|
+
- `20260625-163308-046461` sync state machine should precede sync and watch so conflict semantics and snapshot ownership are shared.
|
|
86
|
+
- `20260625-160804-867992` config/auth security should precede init, auth/status/doctor, sync, compile, watch, local sandbox, real E2E, examples, and release gates.
|
|
87
|
+
- `20260625-160751-353900` olcli import/license should precede `20260625-160853-429297` backend adapter.
|
|
88
|
+
- `20260625-160853-429297` backend adapter should precede sync, compile, fast fallback, local sandbox, and real E2E.
|
|
89
|
+
- `20260625-160819-417512` init should precede auth/status/doctor and most user-flow integration tests because it establishes project binding.
|
|
90
|
+
- `20260625-160912-750072` sync and `20260625-160925-146032` compile should precede `20260625-160938-324045` watch.
|
|
91
|
+
- `20260625-160925-146032` compile should precede `20260625-165248-545991` fast/draft fallback.
|
|
92
|
+
- `20260625-162413-873208` local sandbox regression should run after the fake-backend core flows exist.
|
|
93
|
+
- `20260625-160946-910101` real E2E should run only after gated test handling, local secret loading, sync, compile, and fallback fake coverage exist.
|
|
94
|
+
- `20260625-162426-756284`, `20260625-162438-154174`, `20260625-162447-918619`, and `20260625-161006-526237` are hardening, package, example, and documentation tasks that should follow stable core behavior.
|
|
95
|
+
- `20260625-162518-364796` release-candidate freeze is last and depends on every prior result.
|
|
96
|
+
|
|
97
|
+
## Recommended Execution Order
|
|
98
|
+
|
|
99
|
+
This order preserves every current `todo.md` task exactly once. It is a recommendation only; no automatic reorder was performed.
|
|
100
|
+
|
|
101
|
+
1. `20260625-163340-992326` - 审计 QuickDev 队列顺序与任务可执行性. Finish and verify the current governance task before changing execution strategy.
|
|
102
|
+
2. `20260625-163153-333824` - 冻结 v1 架构模块与公共接口契约. Establish module boundaries, shared types, file ownership, and adapter boundaries.
|
|
103
|
+
3. `20260625-163246-549133` - 统一 CLI 行为输出与退出码规范. Lock command UX, output streams, non-interactive behavior, redaction, and exit codes.
|
|
104
|
+
4. `20260625-163308-046461` - 定义同步状态机快照与冲突报告格式. Lock sync/watch conflict semantics before implementation.
|
|
105
|
+
5. `20260625-160804-867992` - 建立项目配置认证与安全基础设施. Implement config/auth, local-only secret storage, schema validation, redaction, and ignore handling before user-flow commands.
|
|
106
|
+
6. `20260625-160751-353900` - 引入 olcli 后端代码与许可证合规. Bring in backend foundation with MIT attribution before wrapping it.
|
|
107
|
+
7. `20260625-160853-429297` - 实现 Overleaf 后端适配层. Encapsulate imported backend details behind the stable internal adapter and fake backend.
|
|
108
|
+
8. `20260625-160819-417512` - 实现 olcx init 与 VS Code 配置生成. Implement binding and local project setup after config schema and CLI contract exist.
|
|
109
|
+
9. `20260625-160836-699088` - 实现 olcx auth status doctor. Implement auth entry and diagnostics after project binding and config/auth storage exist.
|
|
110
|
+
10. `20260625-160912-750072` - 实现安全双向同步与冲突暂停. Implement safe sync using the state-machine contract, backend adapter, and ignore rules.
|
|
111
|
+
11. `20260625-160925-146032` - 实现远程编译和 PDF 下载. Implement compile and PDF download using the backend adapter and config ownership.
|
|
112
|
+
12. `20260625-165248-545991` - 实现 Overleaf 编译超时快速模式降级恢复. Extend compile after the baseline compile flow exists; verify real behavior later through gated E2E where possible.
|
|
113
|
+
13. `20260625-160938-324045` - 实现 olcx watch 自动工作流. Compose sync and compile into the debounced watcher only after both manual commands are stable.
|
|
114
|
+
14. `20260625-162413-873208` - 全链路本地沙箱回归测试. Validate the complete fake-backend CLI journey before real external testing.
|
|
115
|
+
15. `20260625-160946-910101` - 真实 Overleaf 集成 E2E 测试. Run only when local E2E placeholders are already provided; if missing or invalid, this task should block per its own constraints.
|
|
116
|
+
16. `20260625-162426-756284` - 跨平台与无头环境兼容性验证. Broaden platform confidence after the core flow is stable.
|
|
117
|
+
17. `20260625-162438-154174` - 安全许可证与供应链发布门禁. Add publish gates once code, notices, package contents, and E2E skip behavior are known.
|
|
118
|
+
18. `20260625-162447-918619` - 示例论文项目与故障排查资料. Create placeholder-only examples and troubleshooting after behavior and gates stabilize.
|
|
119
|
+
19. `20260625-161006-526237` - 文档发布与社区维护完善. Finalize public docs after examples, gates, platform notes, and E2E status are known.
|
|
120
|
+
20. `20260625-162518-364796` - v1 发布候选总验收与冻结. Final gate; must not claim stable release readiness without honest E2E status.
|
|
121
|
+
|
|
122
|
+
## Directly Executable Tasks
|
|
123
|
+
|
|
124
|
+
Directly executable here means the task has enough information for `plan`, `actor`, and `verify` roles and does not require real Overleaf account participation. It may still need earlier prerequisite tasks to complete first.
|
|
125
|
+
|
|
126
|
+
- Immediate under current FIFO: `20260625-163340-992326`.
|
|
127
|
+
- Directly executable after the current audit is archived: `20260625-163153-333824`, `20260625-163246-549133`, `20260625-163308-046461`.
|
|
128
|
+
- Directly executable after their prerequisites complete, using fake backends or placeholders only: `20260625-160804-867992`, `20260625-160751-353900`, `20260625-160853-429297`, `20260625-160819-417512`, `20260625-160836-699088`, `20260625-160912-750072`, `20260625-160925-146032`, `20260625-165248-545991`, `20260625-160938-324045`, `20260625-162413-873208`, `20260625-162426-756284`, `20260625-162438-154174`, `20260625-162447-918619`, `20260625-161006-526237`, `20260625-162518-364796`.
|
|
129
|
+
|
|
130
|
+
## Should Be Frontloaded
|
|
131
|
+
|
|
132
|
+
- `20260625-163153-333824` architecture contract: prevents command, backend, sync, compile, watch, and fixture tasks from inventing incompatible module boundaries.
|
|
133
|
+
- `20260625-163246-549133` CLI behavior contract: prevents inconsistent help text, exit codes, output streams, non-interactive behavior, and redaction behavior across commands.
|
|
134
|
+
- `20260625-163308-046461` sync state machine: prevents sync and watch from diverging on conflict, delete, ignore, and snapshot semantics.
|
|
135
|
+
- `20260625-160804-867992` config/auth security infrastructure: should be implemented before user-flow commands because it owns `.olcx/config.json`, `.olcx/auth.local.json`, redaction, and ignore behavior.
|
|
136
|
+
- `20260625-160751-353900` olcli import/license and `20260625-160853-429297` backend adapter: should precede network-facing sync, compile, fallback, and E2E work.
|
|
137
|
+
|
|
138
|
+
## Needs User Or Test Account Participation
|
|
139
|
+
|
|
140
|
+
- `20260625-160946-910101` real Overleaf E2E requires pre-provided local-only test values such as `OLCX_E2E_ENABLE_REAL`, `OLCX_E2E_OVERLEAF_SESSION`, `OLCX_E2E_PROJECT_ID`, optional `OLCX_E2E_ACCOUNT_LABEL`, and optional `OLCX_E2E_PROJECT_URL`, or equivalent `.env.e2e.local` entries. Do not write real values into git, queue files, docs, or handoff reports.
|
|
141
|
+
- `20260625-165248-545991` fast/draft fallback can be implemented and verified with fake backend coverage, but real fallback behavior depends on Overleaf private interface availability and should be covered by the gated E2E task when feasible.
|
|
142
|
+
- `20260625-162518-364796` release-candidate freeze needs a user/release decision if real E2E was skipped, blocked, or unavailable. It must report that limitation instead of treating stable release readiness as verified.
|
|
143
|
+
- Any reorder of `todo.md` requires explicit user confirmation before editing queue state.
|
|
144
|
+
|
|
145
|
+
## Needs Split Or Clarification
|
|
146
|
+
|
|
147
|
+
No task is missing required QuickDev fields. These are execution-risk clarifications, not reasons to mutate status during this audit.
|
|
148
|
+
|
|
149
|
+
- `20260625-160946-910101`: current `todo.md` and its existing `00-task.md` handoff copy differ. Before execution, refresh the handoff copy from the current queue block or have the plan role explicitly cite `todo.md` as authoritative.
|
|
150
|
+
- `20260625-165248-545991`: fast/draft fallback may need a small discovery subtask if the adapter cannot safely identify compile-setting APIs. Keep the fallback implementation separate from real E2E proof.
|
|
151
|
+
- `20260625-162426-756284`: broad across CI, platform path handling, environment variables, and watch behavior. Split into CI matrix plus platform-specific test/doc subtasks if the actor cannot keep the change reviewable.
|
|
152
|
+
- `20260625-161006-526237`: broad public documentation and maintenance task. Split README/tutorial, release docs, and contributor docs if it becomes too large for one reviewable actor pass.
|
|
153
|
+
|
|
154
|
+
## Reorder Safety
|
|
155
|
+
|
|
156
|
+
QuickDev is FIFO and append-only by default: the manager reads `todo.md` from top to bottom and selects the first task with `status: todo`. Skipping, deleting, or moving blocks without explicit confirmation would violate `goal.md` and could hide user intent.
|
|
157
|
+
|
|
158
|
+
No automatic reorder was performed in this audit. Safe manual reorder procedure, only after user confirmation:
|
|
159
|
+
|
|
160
|
+
1. Stop the queue manager before editing.
|
|
161
|
+
2. Confirm the exact recommended order and whether credential-dependent E2E should remain before later non-secret hardening tasks or be deferred.
|
|
162
|
+
3. Back up `todo.md`.
|
|
163
|
+
4. Move whole `<!-- quickdev-task:start ... -->` through `<!-- quickdev-task:end -->` blocks only; never edit IDs, titles, statuses, handoff directories, or task text while reordering.
|
|
164
|
+
5. Preserve every current task exactly once.
|
|
165
|
+
6. Run a block-count check and inspect `git diff -- todo.md`.
|
|
166
|
+
7. Resume QuickDev only after the user approves the diff.
|
|
167
|
+
|
|
168
|
+
If no user confirmation is given, keep FIFO execution. Under the current queue, the next implementation-relevant tasks after this audit are already the three frontloaded contract tasks.
|
|
169
|
+
|
|
170
|
+
## Security Review
|
|
171
|
+
|
|
172
|
+
This audit includes only policy names, placeholder variable names, paths, and task IDs. It does not include real credentials, raw cookie values, session values, passwords, private Overleaf project IDs, or real paper content.
|
|
173
|
+
|
|
174
|
+
Security requirements to preserve during future tasks:
|
|
175
|
+
|
|
176
|
+
- Project-local auth belongs in `.olcx/auth.local.json`.
|
|
177
|
+
- `.olcx/auth.local.json`, `.olcx/*.local.json`, `.olcx/*.secret.json`, and `.env.e2e.local` must remain ignored by Git.
|
|
178
|
+
- `.env.e2e.example` may contain empty placeholder variable names only.
|
|
179
|
+
- Fixtures, examples, docs, QuickDev handoff files, CI logs, and npm packages must not contain real credentials, private project IDs, or private paper content.
|
|
180
|
+
- Sync, watch, and package gates must explicitly avoid uploading or publishing local auth, generated PDFs, build artifacts, and unredacted logs.
|
|
181
|
+
|
|
182
|
+
## Git State Notes
|
|
183
|
+
|
|
184
|
+
Pre-audit `git status --short` showed:
|
|
185
|
+
|
|
186
|
+
- `M .gitignore`
|
|
187
|
+
- `?? .env.e2e.example`
|
|
188
|
+
- `?? done.md`
|
|
189
|
+
- `?? goal.md`
|
|
190
|
+
- `?? tmp/`
|
|
191
|
+
- `?? todo.md`
|
|
192
|
+
|
|
193
|
+
The `.gitignore` diff observed during audit adds an allowlist entry for `.env.e2e.example`. The QuickDev queue files and `tmp/` directory were already untracked or modified before this actor wrote the audit. This audit is expected to add `docs/quickdev-queue-audit.md` and `tmp/20260625-163340-992326-审计 QuickDev 队列顺序与任务可执行性/20-actor-report.md` only. It must not change `todo.md`, `done.md`, or `goal.md`.
|