lycheedev 2.5.1 → 3.0.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.
Files changed (52) hide show
  1. package/native/windows-amd64/lycheedev.exe +0 -0
  2. package/package.json +1 -1
  3. package/payload/addon/Bridge/ActivityView.lua +26 -12
  4. package/payload/addon/Bridge/InputProtection.lua +63 -0
  5. package/payload/addon/Bridge/InputSignal.lua +36 -0
  6. package/payload/addon/Bridge/InputState.lua +93 -0
  7. package/payload/addon/Bridge/MemoryProtocol.lua +31 -0
  8. package/payload/addon/Bridge/ProbeExecution.lua +147 -0
  9. package/payload/addon/Bridge/ReceiverBindings.lua +6 -0
  10. package/payload/addon/Bridge/SlotProtocol.lua +172 -0
  11. package/payload/addon/Bridge/SlotRuntime.lua +125 -0
  12. package/payload/addon/Bridge/StartupBeacon.lua +8 -11
  13. package/payload/addon/Core/Compat.lua +16 -0
  14. package/payload/addon/Core/Controls.lua +16 -0
  15. package/payload/addon/Core/Locale.lua +6 -4
  16. package/payload/addon/Core/Locale_enUS.lua +4 -2
  17. package/payload/addon/Core/Platform.lua +4 -2
  18. package/payload/addon/Core/Runtime.lua +17 -6
  19. package/payload/addon/Lychee Dev.toc +9 -2
  20. package/payload/addon/Modules/AutomationHistory.lua +119 -0
  21. package/payload/addon/Modules/AutomationView.lua +26 -6
  22. package/payload/addon/UI/Pages/About.lua +0 -3
  23. package/payload/addon/UI/Pages/Automation.lua +40 -27
  24. package/payload/addon/UI/Pages/Diagnostics.lua +2 -4
  25. package/payload/addon/UI/Pages/Object.lua +0 -1
  26. package/payload/addon/UI/Pages/Run.lua +2 -1
  27. package/payload/addon/UI/Pages/Trace.lua +0 -1
  28. package/payload/addon/UI/Theme.lua +3 -2
  29. package/payload/addon/UI/Widgets.lua +32 -22
  30. package/payload/addon/UI/Window.lua +3 -35
  31. package/payload/skill/SKILL.md +89 -162
  32. package/payload/skill/agents/openai.yaml +2 -2
  33. package/payload/skill/references/asset-export.md +1 -1
  34. package/payload/skill/references/commands.md +37 -35
  35. package/payload/skill/references/data-hotfix.md +112 -0
  36. package/payload/skill/references/data-investigation.md +74 -320
  37. package/payload/skill/references/data-recovery.md +55 -0
  38. package/payload/skill/references/data-tables.md +170 -0
  39. package/payload/skill/references/data-targets.md +93 -0
  40. package/payload/skill/references/error-diagnosis.md +8 -12
  41. package/payload/skill/references/installation.md +20 -13
  42. package/payload/skill/references/live-investigation.md +84 -367
  43. package/payload/skill/references/live-probes.md +160 -0
  44. package/payload/skill/references/live-recovery.md +190 -0
  45. package/payload/skill/references/live-startup.md +63 -133
  46. package/payload/skill/references/runtime-investigations.md +17 -3
  47. package/payload/skill/references/source-preparation.md +58 -0
  48. package/payload/skill/references/source-relations.md +51 -0
  49. package/payload/skill/references/source-research.md +66 -162
  50. package/payload/skill/references/source-value-flow.md +48 -0
  51. package/release.json +155 -75
  52. package/payload/addon/UI/Pages/Settings.lua +0 -82
@@ -0,0 +1,170 @@
1
+ # Static tables and SQL
2
+
3
+ Read for name-to-ID discovery, schema, domain relationships, paging or SQL.
4
+
5
+ ## Find the requested records
6
+
7
+ For a business name rather than a known ID, first inspect the relevant name table's
8
+ schema, then search its actual localized field. For example, after pinning the
9
+ requested Forever build with enUS data:
10
+
11
+ ```text
12
+ lycheedev data db2 schema SpellName --snapshot <pin> --cdn --format json
13
+ lycheedev data db2 search SpellName --snapshot <pin> --cdn --field Name_lang --query Claw --limit 50 --format json
14
+ ```
15
+
16
+ Use `--installation` instead of `--cdn` for the selected local source. A substring
17
+ search can match other abilities, NPC spells and multiple ranks; never choose the
18
+ first row merely because its name matches. Inspect candidate relationships and
19
+ the requested class/rank context. A translated name is a search hypothesis, not
20
+ proof of identity. For a verified spell ID, use `data spell info` for its related
21
+ spell closure or `data db2 foreign-key SpellEffect --field SpellID --value <id>
22
+ --limit 50` with the same snapshot/source to inspect effects. Read the actual
23
+ schema before naming coefficient fields. Retain truncation and missing-section
24
+ coverage; a zero-result partial search cannot establish absence.
25
+
26
+ For a known table and record ID in an explicitly selected local installation:
27
+
28
+ ```text
29
+ lycheedev data db2 --snapshot <pin> --installation <game-root> --table <name> --id <id> --format json
30
+ ```
31
+
32
+ For the same query from CDN, replace the installation selector with `--cdn`.
33
+ Add `--offline` to prohibit all network access and reuse only this workspace's
34
+ verified configuration, fragment and definition caches. Missing cache data fails;
35
+ the command does not fall back to a local installation or change the pin.
36
+ The initial archive lookup can be slow when the provider lacks a group index.
37
+ Static `data` queries have one total time budget across preparation, downloads,
38
+ recovery and execution: 300 seconds by default. Use `--timeout-seconds <1-3600>`
39
+ to set it explicitly. A timeout returns `command.deadline` (exit 5), not an empty
40
+ successful result. Verified cached fragments remain reusable on a later query;
41
+ retry retains the same pin. This option does not apply to `data hotfix`, whose
42
+ scan/request budgets and saved checkpoints are documented in [data-hotfix.md](data-hotfix.md).
43
+
44
+ `game-root` contains `.build.info` and `Data/`; the same selected client directory
45
+ used in target resolution is also accepted and checked against the pin. The command selects the DB2
46
+ FileDataID from the pinned WoWDBDefs manifest, verifies the table hash in the
47
+ actual file, and binds its exact layout hash to the definition. It returns
48
+ `row`, `schema`, `layoutHash`, raw-source blob references and a JSON capture.
49
+ The capture concerns that requested record; inspect its coverage fields before
50
+ claiming completion. It does not establish whole-table coverage.
51
+ Record ID zero is allowed. A missing record is an error, not an empty full-table
52
+ query. Field verification/foreign-key metadata in `schema` is retained evidence,
53
+ not proof that every inferred DBD field meaning is correct.
54
+
55
+ Omit `--id` to read a bounded page (default 50, maximum 200 rows):
56
+
57
+ ```text
58
+ lycheedev data db2 --snapshot <pin> --installation <game-root> --table <name> --limit 50 --format json
59
+ lycheedev data db2 --snapshot <same-pin> --installation <same-root> --table <same-name> --limit 50 --after-id <page.next> --offline --format json
60
+ ```
61
+
62
+ Pages use ascending logical IDs, including copies. Omitted `--after-id` includes
63
+ ID zero; an explicit cursor excludes that ID. Continue only when `page.more`
64
+ is true, carrying `page.next` with the same snapshot and table. `--id` cannot
65
+ be combined with `--limit` or `--after-id`. Empty pages are valid. Preserve
66
+ each page's capture and cursor; a suffix ending at the last record is still not
67
+ the whole table. Captures mark full-table completion only when a first page
68
+ contains all rows. `truncated` denotes more rows after this page; false does
69
+ not imply that earlier rows were included.
70
+
71
+ On a cache miss, the command reads only manifest/DBD files at the DataPin's
72
+ exact definition commit from WoWDBDefs; it does not fetch a newer branch. Local
73
+ mode never fetches CDN game data. Add `--offline` to prohibit downloads; missing or corrupt
74
+ cached definitions fail explicitly. Cache bytes are rehashed before use. No
75
+ game input or game installation writes occur. Hotfix records are not overlaid.
76
+
77
+ The file limit is `--max-bytes` (default 128 MiB, maximum 512 MiB, applied to
78
+ both encoded and decoded file sizes). Parser budgets additionally bound metadata
79
+ to 64 MiB, indexed physical/copy rows to one million, columns/partitions to 4096,
80
+ and decoded row text to 1 MiB. A page's serialized row array is capped at 8 MiB;
81
+ any row failure or budget overflow returns no partial page. Page selection uses
82
+ bounded extra memory, but each CLI invocation currently reopens the table and
83
+ checks its selected source. Encrypted BLTE chunks use a pinned public TACT key
84
+ snapshot, fetched only when needed and cached with a verified digest. Offline
85
+ uses only cached keys. Supply `--key-file <WoW.txt|keys.json>` to use an explicit
86
+ text or JSON key set instead; private keys stay in request memory.
87
+
88
+ DB2 reads keep readable encrypted/non-encrypted sections when other sections
89
+ lack keys. Inspect `complete`, `partial`, `unavailablePartitions` (direct DB2)
90
+ or `tables[].unavailablePartitions` (schema/domain results). File provenance
91
+ separates `partialContent` plus missing chunk ranges from full CKey-verified
92
+ `content`; placeholder bytes never become decoded fields. A schema's `rowCount`
93
+ is the readable logical count, not the total number of records in a partial table.
94
+ Report missing keys and row coverage with the answer. Do not describe a partial
95
+ search, empty result, SQL aggregate or CSV as a full-build answer. Changing from
96
+ installation to CDN does not supply a missing key. Raw asset exports still
97
+ require the complete verified file.
98
+
99
+ ## Implemented static SQL
100
+
101
+ For parameterized lookups, flags, explicit Hotfix overlays and query diagnostics,
102
+ read [data-query-recipes.md](data-query-recipes.md). The `meta` catalog exposes
103
+ pinned enum/flag definitions; `effective` requires explicitly selected raw cache
104
+ captures in the query JSON. Unqualified and `static` tables retain static values.
105
+
106
+ Supply SQL as text, from a `.sql` or `.json` file, or from stdin. Exactly one
107
+ input mode is accepted. For JSON requests, use a UTF-8 file (at most 1 MiB):
108
+
109
+ ```json
110
+ {"sql":"SELECT ID, Filename FROM ChrClasses WHERE ID=:id","parameters":{"id":1}}
111
+ ```
112
+
113
+ ```text
114
+ lycheedev data sql --snapshot <pin> --installation <game-root> --file <query.json> --format json
115
+ lycheedev data sql --snapshot <pin> --cdn --sql 'SELECT ID FROM ChrClasses WHERE ID=:id' --param id=1 --format json
116
+ lycheedev data sql --snapshot <pin> --installation <game-root> --stdin --encoding csv --output <new-file.csv> --format json
117
+ ```
118
+
119
+ Repeat `--param <name=scalar>` for named SQL parameters; values must be scalar
120
+ JSON values. JSON request parameters must exactly match SQL parameters, and
121
+ integer tokens retain 64-bit precision. Duplicate or unknown request fields
122
+ fail. `--encoding csv` requires `--output <file>` and writes a CSV export with
123
+ its capture/manifest. Use SQL LIMIT/OFFSET, not CLI `--limit`. `--offline` and
124
+ `--max-bytes` have the same cache and per-file meanings as DB2 reading. Replace
125
+ `--installation` with `--cdn` for explicitly selected remote content.
126
+
127
+ Unqualified tables and qualified `static.Table` read pinned static values;
128
+ `static.Table` also bypasses CTE names. A Hotfix overlay is used only when the
129
+ query document explicitly names raw cache captures and queries `effective.Table`
130
+ as described in [data-query-recipes.md](data-query-recipes.md). There is no
131
+ implicit overlay or source fallback. Query output contains `query`,
132
+ `result` (ordered `columns` and positional `rows`, or `plan` for EXPLAIN), and
133
+ `sources` with each prepared table's provenance. Verify the returned capture
134
+ with `evidence verify <capture-id>`. Complete means the requested query result,
135
+ including any SQL LIMIT, not an unrestricted whole-table export. Missing-key
136
+ sections propagate `complete: false` and `partial: true` to SQL; source tables
137
+ retain missing ranges/partitions. CSV captures and manifests also retain
138
+ `complete: false`. JSONL end frames report partial coverage explicitly; a legal
139
+ end frame and exit 0 alone do not prove all encrypted sections were readable.
140
+
141
+ Supported paths include joins, grouping, ordinary CTEs, UNION ALL, correlated
142
+ expression subqueries (also in GROUP BY and aggregate inputs), and
143
+ one-seed/one-member recursive CTEs. Complex recursive forms still fail explicitly.
144
+ DB2 array fields become quoted scalar column names such as `"Field[0]"`.
145
+ Text functions require text; conversions and integer overflow fail explicitly.
146
+ EXPLAIN binds sources without scanning rows; it may still prepare table
147
+ bytes and definitions. EXPLAIN ANALYZE executes and reports scan counts/work/
148
+ charged bytes; charged bytes are not process peak memory.
149
+
150
+ Budgets: at most 32 physical tables, 512 MiB cumulative raw table content,
151
+ 10 million execution work units, 64 MiB execution accounting and 16 MiB JSON
152
+ evidence. Budget failures yield no partial query result. Narrow the query when
153
+ appropriate to the request; do not change the pinned build or imply full
154
+ coverage from a narrower successful query.
155
+
156
+ SQL errors use `error.stage: query` with `query.invalid_syntax` or
157
+ `query.unresolved_binding` (exit 2), `query.unsupported_expression` or
158
+ `query.budget_exceeded` (exit 3), and type/range/cardinality faults (exit 4).
159
+ Syntax faults include `error.location` with byte offset and line/column.
160
+ Correct the request or report the limitation; repeating an unchanged query
161
+ does not resolve these failures. Source/cache/I/O faults retain their own codes.
162
+
163
+ Domain commands are implemented for spells (`data spell info`, `data spell auras`,
164
+ `data spell summons`), items (`data item get`, `data item models`,
165
+ `data item geosets`, `data item textures`), creatures (`data creature display`,
166
+ `data creature model`), journal encounters (`data encounter get`), and house
167
+ decor (`data decor list`, `data decor get`). Prefer the domain command when it owns
168
+ the relationship needed to answer the question; use SQL/DB2 for other supported
169
+ tables. A static table result is not a substitute for requested Hotfix data.
170
+ Preserve source, table/record, locale, filters, row counts and capture hashes.
@@ -0,0 +1,93 @@
1
+ # Data target preparation
2
+
3
+ Read when no matching fixed data pin exists, or when comparing local and remote delivery identities.
4
+
5
+ Start from the requested product and business entity, not a guessed archive path.
6
+ Reuse the invoking project's fixed data pin when it matches the requested scope.
7
+ `target list` lists saved named targets, not supported products or available data;
8
+ an empty list does not mean Forever is unsupported. `target available --region
9
+ <region> --format json` discovers advertised releases. Inspect each product's
10
+ rows and error separately; a successful listing can contain a failed product.
11
+ `totalRows` counts matching verified rows before the output bound; `truncated`
12
+ means the displayed list is incomplete. A reused-slot product/build mismatch
13
+ requires updating verified product metadata, not treating another beta as Forever.
14
+ Use region/locale from the request or established project context, not the language
15
+ of the conversation. The CLI maps `--product forever` to its publication endpoint;
16
+ do not substitute the endpoint name for the product. Resolve a matching target
17
+ when no fixed data pin exists. Ask only for identity choices still ambiguous.
18
+
19
+ Prepare a local target from a game root or selected client directory. When the
20
+ request names a product, pass it as an identity constraint; do not construct
21
+ CASC keys or a DataPin by hand:
22
+
23
+ ```text
24
+ lycheedev target resolve --installation <game-root-or-client> --product <product> --region <region> --locale <locale> --format json
25
+ ```
26
+
27
+ When a named target has already been configured, resolve that fixed
28
+ configuration with `lycheedev target resolve --target <name> --format json`.
29
+ Use `lycheedev target show <name>` to inspect the named configuration, or
30
+ `lycheedev target show <PIN-id>` to inspect a resolved selection. Showing a
31
+ target reads it; it does not resolve or refresh it. Use `target add` to create
32
+ or explicitly replace a named configuration.
33
+
34
+ Region and locale are explicit choices; use those requested for the task.
35
+ The CLI reads product/build/config identities from the installation and resolves
36
+ WoWDBDefs `refs/heads/master` once to an exact commit. Use `--definitions` for a
37
+ specific 40-hex commit or full branch/tag ref. `--offline` resolves a symbolic
38
+ ref only from its existing workspace record; an explicit commit needs no
39
+ network. Table definitions are prepared on first query, not by target resolve.
40
+
41
+ The result is a fixed pin ID. Carry it between calls and agents. `--from <pin>`
42
+ adds data to a source-only pin without modifying the parent; if it already has
43
+ data, the existing definition commit is retained by default and conflicting
44
+ fixed identities fail. Do not resolve a fixed target again as latest.
45
+
46
+ The target evidence records the observed client/catalog and archived config
47
+ bytes. It does not prove that every table or locale is present, or that the
48
+ game is running. `target resolve --file` remains available for already-resolved
49
+ identities, but cannot be mixed with preparation flags.
50
+
51
+ For a remote product, use the same resolver without an installation path:
52
+
53
+ ```text
54
+ lycheedev target resolve --product retail --region <region> --locale <locale> --format json
55
+ ```
56
+
57
+ It records the selected region's advertised build, verified build/CDN configs,
58
+ and exact definition commit. `--build <full-build>` constrains that observation;
59
+ it does not search historical builds or fall back to a neighboring one. Online
60
+ failures do not silently reuse old catalogs. `--offline` requires a previously
61
+ recorded catalog pair and configurations in this workspace; preserve the returned
62
+ `context.observedAt` and do not call an offline observation the current server
63
+ state. An exact `--definitions` commit alone does not supply remote catalogs.
64
+
65
+ Remote target preparation does not download game archives or prove content
66
+ availability. DB2/SQL/asset queries accept either `--installation <directory>`
67
+ or `--cdn` against the same pin; do not combine them. In target resolution,
68
+ `--installation` chooses local selection; its optional `--product` filters observed
69
+ identity and cannot override it. Without installation, `--product` selects remote
70
+ preparation. `--file` and `--target` remain separate selection modes.
71
+
72
+ A game root enumerates existing immediate client directories, not catalog rows
73
+ alone. One verified match is selected directly; multiple matches return
74
+ `context.installationSelection` with candidates. Choose the intended client path
75
+ when product alone is insufficient. Metadata conflicts are listed as issues;
76
+ do not edit flavor/version files or discard conflicting evidence to force selection.
77
+ The explicit client path never selects a sibling. Local missing/mismatched clients
78
+ never switch to remote preparation. CLI errors distinguish missing installation,
79
+ ambiguous selection, product mismatch and conflicting metadata.
80
+
81
+ A locally resolved pin retains the installation's CDNConfig; selecting region
82
+ `us` does not replace it with the US service's configuration. If CDN preparation
83
+ or archive lookup fails, compare with a separately resolved remote target using
84
+ the **same product, region, locale, full build and definition commit**. Preserve
85
+ the original project lock. Compare both BuildConfig and CDNConfig: even an
86
+ identical BuildConfig may be delivered by a different archive inventory. Use
87
+ the separate remote snapshot explicitly and label its provenance; do not mutate
88
+ the original pin or pass off the two configurations as identical.
89
+
90
+ The selected product/region's version-service `cdns` manifest is the authority
91
+ for CDN hosts and paths. The CLI refreshes a stale delivery route once on
92
+ availability failure without changing the pin or consulting latest versions.
93
+ Do not hand-build alternate CDN URLs. Offline queries never refresh routes.
@@ -7,25 +7,21 @@ another probe merely to recreate an error.
7
7
  For an authorized snapshot of errors already retained by the addon provider:
8
8
 
9
9
  ```text
10
- lycheedev live bugs --session <session-id> --request <stable-key> --count <1-100> --format json
10
+ lycheedev live bugs --project <project-directory> --session <CON-id> --request <stable-key> --count <1-100> --wait-seconds 120 --format json
11
11
  ```
12
12
 
13
- This reports !BugGrabber provider storage newest-first. It does not claim to
14
- capture every addon error. `provider_unavailable`, partial fields, zero returned
15
- rows and incomplete coverage must remain distinct. After reading the verified
16
- report, call `live finish <operation-id>` to acknowledge and dismiss the final
17
- receipt. Check `display.state: cleared` and `complete: true`; a pending display
18
- retains the verified report and is recovered with finish on the same operation.
19
- Perform this within the
20
- authorized task without asking for a separate ACK confirmation. A QR or verified
21
- report with pending cleanup is not the end of this workflow.
22
-
13
+ This reads !BugGrabber provider storage newest-first through a bounded native
14
+ observation. It does not claim to capture every addon error. Provider unavailable,
15
+ partial fields, zero rows and incomplete coverage remain distinct. Native bugs
16
+ completes verified result persistence and release; inspect `report.ok` and the
17
+ snapshot's own status, then require `complete: true` and `cleanup: complete`.
18
+ Do not add legacy ACK/finish/hide commands. Use [recovery](live-recovery.md) on interruption, retaining the same CON.
23
19
  Use a question-specific probe only when the retained error snapshot cannot
24
20
  distinguish the hypotheses. Follow [live-investigation.md](live-investigation.md)
25
21
  and keep sampling, output and async lifetime bounded.
26
22
 
27
23
  For secret-value or secure-taint errors, connect the relevant fixed source path
28
- to [live hypothesis testing](live-investigation.md#test-source-hypotheses).
24
+ to [live hypothesis testing](live-probes.md#test-source-hypotheses).
29
25
  Use runtime observations to distinguish the remaining source hypotheses, then
30
26
  return to those locations to explain the result; an error snapshot alone need
31
27
  not end an authorized deep investigation.
@@ -64,6 +64,13 @@ task includes it, using the verified selected client below.
64
64
 
65
65
  ## Install, remove and activate
66
66
 
67
+ Installation selection accepts a game root or an explicit client directory. Reuse
68
+ the returned verified client path for subsequent writes. A unique valid match needs
69
+ no question; resolve multiple candidates before deployment. Conflicting metadata
70
+ must be reported, never overwritten by a folder name or user-supplied product.
71
+ Use `context.installationSelection` to inspect candidates/issues. Do not copy the
72
+ target resolver's product flag onto addon/update commands that do not expose it.
73
+
67
74
  Before a write, inspect the target's ownership, product/build identity, and
68
75
  file integrity. An unmanaged, modified, ambiguous, or conflicting target is a
69
76
  reportable stop condition; do not overwrite it, delete it, forge ownership, or
@@ -81,19 +88,19 @@ semantics. Verify the release inventory through the normal installer and
81
88
  installation uses the lightweight TOC/XML/Lua checker and does not require Git
82
89
  or LuaLS on the target machine.
83
90
 
84
- For an authorized running-client upgrade with a saved session, install the
85
- current release through the managed installer, then use `live reload --session
86
- <session-id> --request <stable-key>`. This controlled upgrade path can connect
87
- the archived older runtime to the exact current CLI's managed addon; it checks
88
- the target files again before refresh input. A modified or mismatched install
89
- must be resolved, not bypassed. The new runtime requires correlated ready
90
- evidence; ordinary live commands do not accept an old runtime merely because
91
- its new files exist on disk. Recover an interrupted reload by its operation ID.
92
- The original session remains constrained to the same process, window and actor
93
- when reconnecting after upgrade. Dismiss a standalone reload's final receipt
94
- with `live hide`; first activation without a usable session follows the startup
95
- reference below.
96
-
91
+ Before updating a managed installation, finish current operations and disconnect
92
+ your own native CON connections. The installer refuses unresolved host ownership;
93
+ do not clear a foreign project's claim. Deploy through the managed installer,
94
+ then activate the selected process using the startup workflow. All 200 slot-v2 files
95
+ are part of the managed installation. An installed CLI or Skill does not update
96
+ an already running client, and a disk-only result is not live readiness.
97
+ Migration from the old 64-slot pool refuses unresolved reservations; recover
98
+ them through their owning CON rather than deleting files. Existing 64-slot CONs can resume and clean up their original slots before
99
+ migration; new connections require 200 slots. Old records retain their evidence
100
+ and retirement value. With multiple
101
+ instances, activate and verify each authorized PID after the shared installation
102
+ is updated. If the runtime reports `restart_required` because newly installed
103
+ slot folders are unavailable, retain that blocker and restart only within scope.
97
104
  If the authorized task includes using the running client, follow
98
105
  [live-startup.md](live-startup.md) after deployment. Activation precedes a
99
106
  bridge session when the addon is not running; do not require that session as