1688-cli 0.1.41 → 0.1.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/AGENTS.md +112 -318
  2. package/ARCHITECTURE.md +107 -0
  3. package/CHANGELOG.md +79 -0
  4. package/README.md +186 -18
  5. package/dist/cli.js +131 -25
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/cart-list.js +2 -1
  8. package/dist/commands/cart-list.js.map +1 -1
  9. package/dist/commands/checkout-confirm.js +8 -8
  10. package/dist/commands/checkout-confirm.js.map +1 -1
  11. package/dist/commands/compare.js +107 -0
  12. package/dist/commands/compare.js.map +1 -0
  13. package/dist/commands/doctor.js +64 -47
  14. package/dist/commands/doctor.js.map +1 -1
  15. package/dist/commands/inbox.js +1 -1
  16. package/dist/commands/inbox.js.map +1 -1
  17. package/dist/commands/login.js +14 -14
  18. package/dist/commands/login.js.map +1 -1
  19. package/dist/commands/logout.js +6 -4
  20. package/dist/commands/logout.js.map +1 -1
  21. package/dist/commands/offer.js +7 -5
  22. package/dist/commands/offer.js.map +1 -1
  23. package/dist/commands/order-list.js +4 -2
  24. package/dist/commands/order-list.js.map +1 -1
  25. package/dist/commands/order-logistics.js +4 -2
  26. package/dist/commands/order-logistics.js.map +1 -1
  27. package/dist/commands/profile.js +25 -9
  28. package/dist/commands/profile.js.map +1 -1
  29. package/dist/commands/research.js +142 -0
  30. package/dist/commands/research.js.map +1 -0
  31. package/dist/commands/search.js +59 -18
  32. package/dist/commands/search.js.map +1 -1
  33. package/dist/commands/seller-chat.js +1 -1
  34. package/dist/commands/seller-chat.js.map +1 -1
  35. package/dist/commands/seller-inquire.js +1 -1
  36. package/dist/commands/seller-inquire.js.map +1 -1
  37. package/dist/commands/seller-messages.js +8 -5
  38. package/dist/commands/seller-messages.js.map +1 -1
  39. package/dist/commands/sourcing-utils.js +438 -0
  40. package/dist/commands/sourcing-utils.js.map +1 -0
  41. package/dist/commands/supplier-inspect.js +559 -0
  42. package/dist/commands/supplier-inspect.js.map +1 -0
  43. package/dist/commands/supplier-search.js +522 -0
  44. package/dist/commands/supplier-search.js.map +1 -0
  45. package/dist/commands/whoami.js +6 -3
  46. package/dist/commands/whoami.js.map +1 -1
  47. package/dist/daemon/client.js +10 -6
  48. package/dist/daemon/client.js.map +1 -1
  49. package/dist/daemon/manager.js +53 -37
  50. package/dist/daemon/manager.js.map +1 -1
  51. package/dist/daemon/protocol.js +2 -1
  52. package/dist/daemon/protocol.js.map +1 -1
  53. package/dist/daemon/server.js +26 -22
  54. package/dist/daemon/server.js.map +1 -1
  55. package/dist/session/context.js +1 -1
  56. package/dist/session/context.js.map +1 -1
  57. package/dist/session/dispatch.js +25 -22
  58. package/dist/session/dispatch.js.map +1 -1
  59. package/dist/session/im-ws.js +8 -5
  60. package/dist/session/im-ws.js.map +1 -1
  61. package/dist/session/lock.js +14 -14
  62. package/dist/session/lock.js.map +1 -1
  63. package/dist/session/paths.js +50 -16
  64. package/dist/session/paths.js.map +1 -1
  65. package/dist/session/search-mtop.js +53 -0
  66. package/dist/session/search-mtop.js.map +1 -1
  67. package/dist/session/shared.js +17 -7
  68. package/dist/session/shared.js.map +1 -1
  69. package/dist/session/state.js +7 -7
  70. package/dist/session/state.js.map +1 -1
  71. package/dist/session/supplier-search.js +403 -0
  72. package/dist/session/supplier-search.js.map +1 -0
  73. package/dist/util/encoding.js +8 -0
  74. package/dist/util/encoding.js.map +1 -0
  75. package/dist/util/temp.js +6 -0
  76. package/dist/util/temp.js.map +1 -0
  77. package/docs/AGENT_MAPS_PLAN.md +171 -0
  78. package/docs/AGENT_WORKING_PRINCIPLES.md +143 -0
  79. package/docs/COMMANDS.md +205 -0
  80. package/docs/FEATURES.md +45 -0
  81. package/docs/JSON_CONTRACTS.md +476 -0
  82. package/docs/QUALITY_SCORE.md +61 -0
  83. package/docs/README.md +36 -0
  84. package/docs/RELIABILITY.md +69 -0
  85. package/docs/SAFETY.md +99 -0
  86. package/docs/WORKFLOW.md +82 -0
  87. package/docs/exec-plans/README.md +9 -0
  88. package/docs/exec-plans/active/README.md +4 -0
  89. package/docs/exec-plans/completed/2026-05-28-sourcing-research-v1.md +125 -0
  90. package/docs/exec-plans/completed/2026-05-31-supplier-inspect-v1.md +113 -0
  91. package/docs/exec-plans/completed/2026-06-04-supplier-search-v1.md +81 -0
  92. package/docs/exec-plans/completed/2026-06-07-windows-cli-compatibility.md +138 -0
  93. package/docs/exec-plans/completed/2026-06-16-profile-daemon.md +146 -0
  94. package/docs/exec-plans/completed/README.md +4 -0
  95. package/docs/exec-plans/tech-debt-tracker.md +5 -0
  96. package/docs/generated/command-index.md +54 -0
  97. package/docs/generated/json-shapes.md +111 -0
  98. package/docs/generated/module-map.md +13 -0
  99. package/docs/generated/test-index.md +34 -0
  100. package/docs/playbooks/add-command.md +15 -0
  101. package/docs/playbooks/add-mtop-capture.md +13 -0
  102. package/docs/playbooks/change-json-output.md +11 -0
  103. package/docs/playbooks/debug-risk-control.md +12 -0
  104. package/docs/playbooks/update-cli-release.md +61 -0
  105. package/docs/records/release-omissions.md +34 -0
  106. package/docs/specs/checkout-and-orders.md +30 -0
  107. package/docs/specs/index.md +9 -0
  108. package/docs/specs/profile-daemon.md +114 -0
  109. package/docs/specs/seller-im.md +28 -0
  110. package/docs/specs/sourcing-research.md +186 -0
  111. package/docs/specs/supplier-inspect.md +144 -0
  112. package/docs/specs/supplier-search.md +179 -0
  113. package/docs/specs/windows-cli-compatibility.md +123 -0
  114. package/package.json +21 -4
  115. package/scripts/check_agent_map.mjs +87 -0
  116. package/scripts/check_release.mjs +40 -0
  117. package/scripts/fix_bin_mode.mjs +18 -0
  118. package/scripts/generate_agent_context.mjs +253 -0
  119. package/scripts/postinstall.mjs +12 -4
@@ -0,0 +1,143 @@
1
+ # Agent Working Principles
2
+
3
+ These principles apply to all coding agents working in this repository. The
4
+ first half is a reusable baseline shared with other agent-ready repositories;
5
+ the second half adds `1688-cli`-specific rules for buyer safety, JSON
6
+ contracts, and browser automation.
7
+
8
+ Tradeoff: these guidelines bias toward caution over speed. For trivial tasks,
9
+ use judgment.
10
+
11
+ ## 1. Think Before Coding
12
+
13
+ Don't assume. Don't hide confusion. Surface tradeoffs.
14
+
15
+ Before implementing:
16
+
17
+ - State assumptions explicitly when they matter.
18
+ - If multiple interpretations exist, present them instead of picking silently.
19
+ - If a simpler approach exists, say so.
20
+ - Push back when a request conflicts with safety, compatibility, or the repo's
21
+ existing architecture.
22
+ - Ask only when the missing answer changes product behavior, account safety,
23
+ checkout/order behavior, data retention, or a breaking contract.
24
+
25
+ ## 2. Simplicity First
26
+
27
+ Minimum code that solves the problem. Nothing speculative.
28
+
29
+ - No features beyond what was asked.
30
+ - No abstractions for single-use code.
31
+ - No flexibility or configurability that was not requested.
32
+ - No broad error handling that hides the real failure.
33
+ - If the implementation is much larger than the problem, simplify it.
34
+
35
+ Ask yourself: would a senior engineer say this is overcomplicated? If yes,
36
+ rewrite it smaller.
37
+
38
+ ## 3. Surgical Changes
39
+
40
+ Touch only what you must. Clean up only your own mess.
41
+
42
+ When editing existing code:
43
+
44
+ - Do not improve adjacent code, comments, or formatting unless needed.
45
+ - Do not refactor unrelated behavior.
46
+ - Match existing style, even if you would design it differently.
47
+ - If you notice unrelated dead code or risk, mention it; do not delete it.
48
+
49
+ When your changes create orphans:
50
+
51
+ - Remove imports, variables, files, and functions that your changes made unused.
52
+ - Do not remove pre-existing dead code unless asked.
53
+
54
+ Every changed line should trace directly to the user's request.
55
+
56
+ ## 4. Goal-Driven Execution
57
+
58
+ Define success criteria. Loop until verified.
59
+
60
+ Transform tasks into verifiable goals:
61
+
62
+ - "Add validation" -> write invalid-input tests, then make them pass.
63
+ - "Fix the bug" -> reproduce it or narrow it, then make the check pass.
64
+ - "Refactor X" -> keep behavior stable and run the relevant gate.
65
+ - "Add command" -> implement, document, update generated context, and verify.
66
+
67
+ For multi-step tasks, use a brief plan:
68
+
69
+ ```text
70
+ 1. [Step] -> verify: [check]
71
+ 2. [Step] -> verify: [check]
72
+ 3. [Step] -> verify: [check]
73
+ ```
74
+
75
+ Strong success criteria let agents loop independently. Weak criteria such as
76
+ "make it work" require clarification or a conservative assumption.
77
+
78
+ ## 5. Read The Map First
79
+
80
+ - Start with `AGENTS.md`, then load only the relevant deeper docs.
81
+ - Use `ARCHITECTURE.md` to find the owning layer before changing code.
82
+ - Use `docs/generated/*` for fast orientation instead of hand-building stale
83
+ inventories.
84
+ - Do not rely on chat history for durable decisions; write important context
85
+ into docs or an ExecPlan.
86
+
87
+ ## 6. Work In Small Verified Slices
88
+
89
+ - Prefer one bounded change that can be tested independently.
90
+ - Run focused checks first, then the default gate when risk warrants it.
91
+ - Use `pnpm agent-context` after command, JSON contract, source layout, or test
92
+ layout changes.
93
+ - Use `pnpm agent-verify` as the default green gate before handoff.
94
+
95
+ ## 7. Preserve Buyer Safety
96
+
97
+ - Treat 1688 as a real buyer account with real sellers, cart state, orders, and
98
+ session risk controls.
99
+ - Never place an order without the prepare plus current-turn approval protocol.
100
+ - Never send seller messages unless the user requested the specific send or
101
+ approved the exact message.
102
+ - Do not force logout, force login reset, or global package upgrades without
103
+ explicit current-turn approval.
104
+ - Login and slider/risk-control flows require the user; do not silently loop.
105
+
106
+ ## 8. Protect JSON Contracts
107
+
108
+ - Agent-facing JSON is part of the product surface.
109
+ - Prefer additive fields over renamed or removed fields.
110
+ - Keep `--json`, `--get`, `--pick`, and watch-mode line-delimited JSON stable.
111
+ - Update `docs/JSON_CONTRACTS.md` when output shape changes.
112
+ - Add tests or fixtures when parser changes affect stable JSON.
113
+
114
+ ## 9. Make Failures Inspectable
115
+
116
+ - Preserve `requestId`, `errorCode`, `pageState`, `verification`, and
117
+ `artifactDir` when browser/session flows fail.
118
+ - Use `1688 debug list`, `1688 debug last`, and `1688 debug show <requestId>`
119
+ to inspect recent command events.
120
+ - Do not hide failures by broad retry loops or vague error messages.
121
+ - Record exact command and failure summary in ExecPlans or final responses when
122
+ verification cannot pass.
123
+ - Distinguish system-level failure from item-level failure in batch workflows.
124
+
125
+ ## 10. Browser Automation Discipline
126
+
127
+ - Prefer mtop/structured payload parsing over fragile DOM scraping.
128
+ - Keep locator changes scoped and add fixture-backed tests where practical.
129
+ - Use `--headed` as the manual escape hatch for slider verification.
130
+ - Probe scripts are for discovery; stable behavior belongs in `src/`, `tests/`,
131
+ and docs.
132
+ - Avoid aggressive bulk scraping patterns that increase WAF/risk-control
133
+ exposure.
134
+
135
+ ## 11. Documentation Discipline
136
+
137
+ - Update command docs when command names, flags, examples, or behavior change.
138
+ - Update safety docs when write actions or approval boundaries change.
139
+ - Promote repeated debugging steps into playbooks.
140
+ - Keep feature ideas in `docs/FEATURES.md` and long-running work in
141
+ `docs/exec-plans/`.
142
+ - Keep `AGENTS.md` short; move durable detail into `docs/`.
143
+
@@ -0,0 +1,205 @@
1
+ # Command Catalog
2
+
3
+ Commands are organized by buyer journey: sourcing -> inquiry -> cart ->
4
+ checkout -> tracking -> post-sale.
5
+
6
+ ## Sourcing
7
+
8
+ ```bash
9
+ 1688 search <keyword> # keyword search; --max N to limit
10
+ 1688 search <keyword> --sort best-selling --price-max 50 --exclude-ads
11
+ 1688 search --headed # open window if slider verification appears
12
+ 1688 research <keyword...> # multi-keyword research, scoring, export
13
+ 1688 similar <offerId> # find similar offers from other suppliers
14
+ 1688 image-search <pathOrUrl> # local .jpg/.png/.webp or http(s) URL
15
+ 1688 offer <offerId> # product detail, SKUs, price tiers, package info
16
+ 1688 compare <offerId...> # compare offer details for sourcing
17
+ 1688 supplier inspect <target> # supplier/factory trust signals from offerId or b2b-* memberId
18
+ 1688 supplier search <keyword...> # supplier discovery from 1688 company search
19
+ 1688 supplier research <keyword...> # supplier scoring + inspect enrichment from company search
20
+ ```
21
+
22
+ Research-oriented `search` filters:
23
+
24
+ ```bash
25
+ --sort relevance|best-selling|price-asc|price-desc
26
+ --price-min <n>
27
+ --price-max <n>
28
+ --province <name>
29
+ --city <name>
30
+ --verified any|factory|business|super-factory
31
+ --min-turnover <n>
32
+ --exclude-ads
33
+ ```
34
+
35
+ `research` adds:
36
+
37
+ ```bash
38
+ --max-per-query <n>
39
+ --enrich top:N|N|0|none
40
+ --jsonl
41
+ --csv
42
+ --output <file>
43
+ ```
44
+
45
+ Supplier company-search commands:
46
+
47
+ ```bash
48
+ 1688 supplier search 键盘 --factory-only --json
49
+ 1688 supplier research 键盘 --enrich top:10 --csv
50
+ ```
51
+
52
+ `supplier search` and `supplier research` use 1688's company search source
53
+ (`companySearchBusinessService`). They do not aggregate suppliers from offer
54
+ search results. Shared flags:
55
+
56
+ ```bash
57
+ --max <n>
58
+ --factory-only
59
+ --province <name>
60
+ --city <name>
61
+ --min-years <n>
62
+ --min-repeat-rate <n> # accepts 0.4 or 40
63
+ --min-response-rate <n> # accepts 0.6 or 60
64
+ --enrich top:N|N|all|0|none
65
+ --jsonl
66
+ --csv
67
+ --output <file>
68
+ ```
69
+
70
+ `supplier search` defaults to `--enrich 0`. `supplier research` defaults to
71
+ `--enrich top:10`.
72
+
73
+ ## Pre-Sale Inquiry
74
+
75
+ ```bash
76
+ 1688 seller inquire <offerId> <message>
77
+ 1688 seller messages --offer <offerId>
78
+ 1688 seller messages --offer <offerId> --watch [--interval N]
79
+ ```
80
+
81
+ `--watch` is long-running and emits one line of JSON per newly-arrived message
82
+ when stdout is piped. Default interval is 30 seconds, minimum is 10 seconds.
83
+
84
+ ## Cart
85
+
86
+ ```bash
87
+ 1688 cart list
88
+ 1688 cart add <offerId> --sku <skuId> --qty N
89
+ 1688 cart remove <cartId>
90
+ ```
91
+
92
+ `cart add` returns `{added, isNewRow, addedQuantity}` so pipelines can pick up
93
+ the cart row reliably.
94
+
95
+ ## Checkout
96
+
97
+ ```bash
98
+ 1688 checkout prepare <cartId>...
99
+ 1688 checkout confirm <cartId>...
100
+ 1688 checkout confirm <cartId>... --agent
101
+ ```
102
+
103
+ `prepare` is read-only. `confirm` places a real order and must follow the
104
+ approval protocol in `docs/SAFETY.md`.
105
+
106
+ ## Order Tracking
107
+
108
+ ```bash
109
+ 1688 order list
110
+ 1688 order list --status waitsellersend
111
+ 1688 order list --status waitbuyerreceive
112
+ 1688 order get <orderId>
113
+ 1688 order logistics <orderId>
114
+ 1688 shipped <orderId>
115
+ 1688 stuck [--days N]
116
+ 1688 fake-shipped [--days N] [--debug]
117
+ 1688 seller-history <sellerName>
118
+ ```
119
+
120
+ Status filters:
121
+
122
+ | Value | Meaning |
123
+ |---|---|
124
+ | `all` | All orders |
125
+ | `waitbuyerpay` | Pending payment |
126
+ | `waitsellersend` | Paid, seller has not shipped |
127
+ | `waitbuyerreceive` | Shipped, awaiting delivery |
128
+ | `success` | Completed |
129
+ | `cancel` | Canceled |
130
+
131
+ ## Post-Sale Chat
132
+
133
+ ```bash
134
+ 1688 seller chat <orderId|loginId> <message>
135
+ 1688 seller chat <orderId> <message> --no-card
136
+ 1688 seller messages <orderId>
137
+ 1688 seller messages <orderId> --watch
138
+ ```
139
+
140
+ With an `orderId`, chat auto-attaches the order card unless `--no-card` is
141
+ given.
142
+
143
+ ## Account And Daemon
144
+
145
+ ```bash
146
+ 1688 login
147
+ 1688 login --headed
148
+ 1688 login --force
149
+ 1688 logout [--yes]
150
+ 1688 whoami [--verify]
151
+ 1688 doctor [--no-launch] [--profile <name>]
152
+ 1688 daemon start | stop | status | reload [--profile <name>]
153
+ 1688 serve [--profile <name>]
154
+ 1688 profile list
155
+ 1688 profile status [name]
156
+ ```
157
+
158
+ All account, browser, daemon, and buyer-workflow commands default to the
159
+ `default` profile. Passing `--profile <name>` uses that profile's persistent
160
+ browser directory, state file, daemon process, lock, and daemon artifacts.
161
+
162
+ ## Output Flags
163
+
164
+ Every command supports:
165
+
166
+ ```bash
167
+ --json # force JSON output even in a TTY
168
+ --pretty # indent JSON by 2 spaces
169
+ --get <path> # print one field by dot-path
170
+ --pick <paths> # comma-separated dot-paths as a JSON object
171
+ ```
172
+
173
+ Examples:
174
+
175
+ ```bash
176
+ 1688 offer X --get supplier.name
177
+ 1688 offer X --get supplier
178
+ 1688 offer X --get 'skus[*].price'
179
+ 1688 offer X --pick price,supplier.name
180
+ 1688 offer X --json --pretty
181
+ 1688 research 手机壳 数据线 --jsonl
182
+ 1688 research 手机壳 --csv --output research.csv
183
+ 1688 compare 123 456 --csv
184
+ 1688 supplier inspect 628196518518 --json --pretty
185
+ 1688 supplier search 键盘 --json --pretty
186
+ 1688 supplier research 键盘 --csv --output suppliers.csv
187
+ ```
188
+
189
+ ## Agent-Friendly Pipelines
190
+
191
+ ```bash
192
+ 1688 search 雨伞 | jq '.offers[0:5]'
193
+ 1688 order list --status waitsellersend | jq '.orders[] | {id: .orderId, paid: .paidAt}'
194
+ id=$(1688 cart add <offerId> --sku <skuId> --qty 1 | jq -r '.added.cartId')
195
+ ```
196
+
197
+ PowerShell without `jq`:
198
+
199
+ ```powershell
200
+ 1688 offer <offerId> --get supplier.name
201
+ 1688 supplier search 键盘 --pick total,source.kind,'items[0].supplier.companyName'
202
+ $added = 1688 cart add <offerId> --sku <skuId> --qty 1 --json | ConvertFrom-Json
203
+ 1688 cart remove $added.added.cartId
204
+ 1688 supplier research 键盘 --csv --output "$env:TEMP\suppliers.csv"
205
+ ```
@@ -0,0 +1,45 @@
1
+ # Feature Backlog
2
+
3
+ This file records product ideas that should survive chat context loss. Status
4
+ is intentionally lightweight: `Idea`, `Planned`, `Active`, or `Done`.
5
+
6
+ Last updated: 2026-06-04
7
+
8
+ ## Sourcing Research
9
+
10
+ | Feature | Status | Notes |
11
+ |---|---|---|
12
+ | `1688 search --sort` | Done | Added `relevance`, `best-selling`, `price-asc`, and `price-desc`; local deterministic sorting is the contract, with remote sort hints where known. |
13
+ | Search filters | Done | Added price range, province/city, verified supplier, minimum turnover/order count, and optional ad exclusion. |
14
+ | `1688 research <keyword...>` | Done | Multi-keyword research records `sourceKeyword`, rank, demand signals, supplier trust signals, score, JSON/JSONL/CSV output. |
15
+ | Top-N enrichment | Done | `research --enrich top:N` enriches only top N results through `offer` detail extraction. |
16
+ | Supplier quality fields | Planned | Basic service tags, product badges, demand, and verification fields are additive; deeper trade-service scores still need reliable payload mapping. |
17
+ | `1688 supplier inspect` | Done | Inspect supplier/factory trust signals from offerId or `b2b-*` memberId. loginId-only lookup is intentionally rejected until a deterministic resolver exists. |
18
+ | `1688 supplier search` | Done | Supplier discovery now comes from 1688 company search (`companySearchBusinessService`) with GBK keyword encoding, not offer-result aggregation. |
19
+ | `1688 supplier research` | Done | Scores company-search suppliers and optionally enriches top N via `supplier inspect`; supports JSONL/CSV export. |
20
+ | `1688 compare <offerId...>` | Done | Compares price tiers, MOQ, sales signals, supplier identity, SKU depth, stock, freight/package hints, and score. |
21
+ | Export formats | Done | Added `--jsonl` and `--csv` for research datasets while keeping normal command JSON stable for agents. |
22
+ | Sourcing score | Done | Computed, explainable V1 score from price, demand, supplier tenure, verification, tags, and ad status. |
23
+
24
+ ## Agent Maps
25
+
26
+ | Feature | Status | Notes |
27
+ |---|---|---|
28
+ | Short agent entrypoint | Done | `AGENTS.md` is now a concise routing map; durable detail moved into `docs/`. |
29
+ | Documentation map | Done | `docs/README.md` now maps commands, JSON contracts, safety, reliability, workflow, specs, playbooks, exec plans, and generated indexes. |
30
+ | Architecture map | Done | `ARCHITECTURE.md` describes CLI layers, command ownership, session/daemon boundaries, and verification surfaces. |
31
+ | Specs directory | Done | Domain specs live under `docs/specs/` instead of `docs/product-specs/`. |
32
+ | Playbooks | Done | Added playbooks for adding commands, changing JSON output, debugging risk control, adding mtop capture, and release/update work. |
33
+ | Generated context | Done | `scripts/generate_agent_context.mjs` generates command, module, test, and JSON-shape indexes under `docs/generated/`. |
34
+ | Agent verification gate | Done | Added `pnpm agent-context`, `pnpm docs-check`, `pnpm agent-map-check`, `pnpm test:unit`, and `pnpm agent-verify`. |
35
+ | Agent map grader | Done | `scripts/check_agent_map.mjs` checks required docs, generated indexes, package scripts, and short-map constraints. |
36
+ | Quality score | Done | `docs/QUALITY_SCORE.md` tracks agent-readiness, known gaps, and latest verification. |
37
+ | Live doctor gate split | Planned | Full `pnpm test` still includes `tests/doctor-live.test.ts`; consider adding explicit `pnpm test:live` and making `pnpm test` deterministic or clearly documented. |
38
+ | JSON schema/snapshot tests | Idea | Add tests that lock stable agent-facing JSON contracts beyond the heuristic `docs/generated/json-shapes.md` index. |
39
+ | AST-based JSON shape index | Idea | Replace the current regex/heuristic interface extractor with TypeScript AST parsing when shape extraction needs more precision. |
40
+
41
+ ## Platform Compatibility
42
+
43
+ | Feature | Status | Notes |
44
+ |---|---|---|
45
+ | Windows CLI compatibility baseline | Done | Implemented cross-platform build, root-hashed Windows named-pipe daemon isolation, platform-aware doctor/postinstall hints, `os.tmpdir()` debug paths, PowerShell docs, and deterministic tests. Verified with focused tests, `pnpm build`, `pnpm test:unit`, `pnpm agent-verify`, and `npm pack --dry-run`; manual Windows smoke checklist remains documented in the spec. |